| 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 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 return reg; | 1347 return reg; |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 | 1350 |
| 1351 void LoadStubCompiler::GenerateLoadField(Register reg, | 1351 void LoadStubCompiler::GenerateLoadField(Register reg, |
| 1352 Handle<JSObject> holder, | 1352 Handle<JSObject> holder, |
| 1353 PropertyIndex field, | 1353 PropertyIndex field, |
| 1354 Representation representation) { | 1354 Representation representation) { |
| 1355 if (!reg.is(receiver())) __ mov(receiver(), reg); | 1355 if (!reg.is(receiver())) __ mov(receiver(), reg); |
| 1356 if (kind() == Code::LOAD_IC) { | 1356 if (kind() == Code::LOAD_IC) { |
| 1357 LoadFieldStub stub(field.is_inobject(holder), | 1357 LoadFieldStub stub(field.is_inobject(holder->map()), |
| 1358 field.translate(holder), | 1358 field.translate(holder->map()), |
| 1359 representation); | 1359 representation); |
| 1360 GenerateTailCall(masm(), stub.GetCode(isolate())); | 1360 GenerateTailCall(masm(), stub.GetCode(isolate())); |
| 1361 } else { | 1361 } else { |
| 1362 KeyedLoadFieldStub stub(field.is_inobject(holder), | 1362 KeyedLoadFieldStub stub(field.is_inobject(holder->map()), |
| 1363 field.translate(holder), | 1363 field.translate(holder->map()), |
| 1364 representation); | 1364 representation); |
| 1365 GenerateTailCall(masm(), stub.GetCode(isolate())); | 1365 GenerateTailCall(masm(), stub.GetCode(isolate())); |
| 1366 } | 1366 } |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 | 1369 |
| 1370 void LoadStubCompiler::GenerateLoadCallback( | 1370 void LoadStubCompiler::GenerateLoadCallback( |
| 1371 const CallOptimization& call_optimization) { | 1371 const CallOptimization& call_optimization) { |
| 1372 GenerateFastApiCall( | 1372 GenerateFastApiCall( |
| 1373 masm(), call_optimization, receiver(), scratch3(), 0, NULL); | 1373 masm(), call_optimization, receiver(), scratch3(), 0, NULL); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); | 1637 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); |
| 1638 | 1638 |
| 1639 // Check that the receiver isn't a smi. | 1639 // Check that the receiver isn't a smi. |
| 1640 __ JumpIfSmi(edx, &miss); | 1640 __ JumpIfSmi(edx, &miss); |
| 1641 | 1641 |
| 1642 // Do the right check and compute the holder register. | 1642 // Do the right check and compute the holder register. |
| 1643 Register reg = CheckPrototypes(object, edx, holder, ebx, eax, edi, | 1643 Register reg = CheckPrototypes(object, edx, holder, ebx, eax, edi, |
| 1644 name, &miss); | 1644 name, &miss); |
| 1645 | 1645 |
| 1646 GenerateFastPropertyLoad( | 1646 GenerateFastPropertyLoad( |
| 1647 masm(), edi, reg, index.is_inobject(holder), | 1647 masm(), edi, reg, index.is_inobject(holder->map()), |
| 1648 index.translate(holder), Representation::Tagged()); | 1648 index.translate(holder->map()), Representation::Tagged()); |
| 1649 | 1649 |
| 1650 // Check that the function really is a function. | 1650 // Check that the function really is a function. |
| 1651 __ JumpIfSmi(edi, &miss); | 1651 __ JumpIfSmi(edi, &miss); |
| 1652 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ebx); | 1652 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ebx); |
| 1653 __ j(not_equal, &miss); | 1653 __ j(not_equal, &miss); |
| 1654 | 1654 |
| 1655 // Patch the receiver on the stack with the global proxy if | 1655 // Patch the receiver on the stack with the global proxy if |
| 1656 // necessary. | 1656 // necessary. |
| 1657 if (object->IsGlobalObject()) { | 1657 if (object->IsGlobalObject()) { |
| 1658 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); | 1658 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); |
| (...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3246 // ----------------------------------- | 3246 // ----------------------------------- |
| 3247 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 3247 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 3248 } | 3248 } |
| 3249 | 3249 |
| 3250 | 3250 |
| 3251 #undef __ | 3251 #undef __ |
| 3252 | 3252 |
| 3253 } } // namespace v8::internal | 3253 } } // namespace v8::internal |
| 3254 | 3254 |
| 3255 #endif // V8_TARGET_ARCH_IA32 | 3255 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |