| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 return reg; | 1365 return reg; |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 | 1368 |
| 1369 void LoadStubCompiler::GenerateLoadField(Register reg, | 1369 void LoadStubCompiler::GenerateLoadField(Register reg, |
| 1370 Handle<JSObject> holder, | 1370 Handle<JSObject> holder, |
| 1371 PropertyIndex field, | 1371 PropertyIndex field, |
| 1372 Representation representation) { | 1372 Representation representation) { |
| 1373 if (!reg.is(receiver())) __ mov(receiver(), reg); | 1373 if (!reg.is(receiver())) __ mov(receiver(), reg); |
| 1374 if (kind() == Code::LOAD_IC) { | 1374 if (kind() == Code::LOAD_IC) { |
| 1375 LoadFieldStub stub(field.is_inobject(holder), | 1375 LoadFieldStub stub(field.is_inobject(holder->map()), |
| 1376 field.translate(holder), | 1376 field.translate(holder->map()), |
| 1377 representation); | 1377 representation); |
| 1378 GenerateTailCall(masm(), stub.GetCode(isolate())); | 1378 GenerateTailCall(masm(), stub.GetCode(isolate())); |
| 1379 } else { | 1379 } else { |
| 1380 KeyedLoadFieldStub stub(field.is_inobject(holder), | 1380 KeyedLoadFieldStub stub(field.is_inobject(holder->map()), |
| 1381 field.translate(holder), | 1381 field.translate(holder->map()), |
| 1382 representation); | 1382 representation); |
| 1383 GenerateTailCall(masm(), stub.GetCode(isolate())); | 1383 GenerateTailCall(masm(), stub.GetCode(isolate())); |
| 1384 } | 1384 } |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 | 1387 |
| 1388 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { | 1388 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { |
| 1389 // Return the constant value. | 1389 // Return the constant value. |
| 1390 __ Move(r0, value); | 1390 __ Move(r0, value); |
| 1391 __ Ret(); | 1391 __ Ret(); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 | 1633 |
| 1634 const int argc = arguments().immediate(); | 1634 const int argc = arguments().immediate(); |
| 1635 | 1635 |
| 1636 // Get the receiver of the function from the stack into r0. | 1636 // Get the receiver of the function from the stack into r0. |
| 1637 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); | 1637 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); |
| 1638 // Check that the receiver isn't a smi. | 1638 // Check that the receiver isn't a smi. |
| 1639 __ JumpIfSmi(r0, &miss); | 1639 __ JumpIfSmi(r0, &miss); |
| 1640 | 1640 |
| 1641 // Do the right check and compute the holder register. | 1641 // Do the right check and compute the holder register. |
| 1642 Register reg = CheckPrototypes(object, r0, holder, r1, r3, r4, name, &miss); | 1642 Register reg = CheckPrototypes(object, r0, holder, r1, r3, r4, name, &miss); |
| 1643 GenerateFastPropertyLoad(masm(), r1, reg, index.is_inobject(holder), | 1643 GenerateFastPropertyLoad( |
| 1644 index.translate(holder), Representation::Tagged()); | 1644 masm(), r1, reg, index.is_inobject(holder->map()), |
| 1645 index.translate(holder->map()), Representation::Tagged()); |
| 1645 | 1646 |
| 1646 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); | 1647 GenerateCallFunction(masm(), object, arguments(), &miss, extra_state_); |
| 1647 | 1648 |
| 1648 // Handle call cache miss. | 1649 // Handle call cache miss. |
| 1649 __ bind(&miss); | 1650 __ bind(&miss); |
| 1650 GenerateMissBranch(); | 1651 GenerateMissBranch(); |
| 1651 | 1652 |
| 1652 // Return the generated code. | 1653 // Return the generated code. |
| 1653 return GetCode(Code::FIELD, name); | 1654 return GetCode(Code::FIELD, name); |
| 1654 } | 1655 } |
| (...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 // ----------------------------------- | 3173 // ----------------------------------- |
| 3173 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 3174 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 3174 } | 3175 } |
| 3175 | 3176 |
| 3176 | 3177 |
| 3177 #undef __ | 3178 #undef __ |
| 3178 | 3179 |
| 3179 } } // namespace v8::internal | 3180 } } // namespace v8::internal |
| 3180 | 3181 |
| 3181 #endif // V8_TARGET_ARCH_ARM | 3182 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |