| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 FrameScope scope(masm, StackFrame::INTERNAL); | 1170 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1171 | 1171 |
| 1172 // Save value register, so we can restore it later. | 1172 // Save value register, so we can restore it later. |
| 1173 __ push(value()); | 1173 __ push(value()); |
| 1174 | 1174 |
| 1175 if (!setter.is_null()) { | 1175 if (!setter.is_null()) { |
| 1176 // Call the JavaScript setter with receiver and value on the stack. | 1176 // Call the JavaScript setter with receiver and value on the stack. |
| 1177 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1177 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
| 1178 // Swap in the global receiver. | 1178 // Swap in the global receiver. |
| 1179 __ mov(receiver, | 1179 __ mov(receiver, |
| 1180 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1180 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 1181 } | 1181 } |
| 1182 __ push(receiver); | 1182 __ push(receiver); |
| 1183 __ push(value()); | 1183 __ push(value()); |
| 1184 ParameterCount actual(1); | 1184 ParameterCount actual(1); |
| 1185 ParameterCount expected(setter); | 1185 ParameterCount expected(setter); |
| 1186 __ InvokeFunction(setter, expected, actual, | 1186 __ InvokeFunction(setter, expected, actual, |
| 1187 CALL_FUNCTION, NullCallWrapper()); | 1187 CALL_FUNCTION, NullCallWrapper()); |
| 1188 } else { | 1188 } else { |
| 1189 // If we generate a global code snippet for deoptimization only, remember | 1189 // If we generate a global code snippet for deoptimization only, remember |
| 1190 // the place to continue after deoptimization. | 1190 // the place to continue after deoptimization. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 Register receiver, | 1327 Register receiver, |
| 1328 Handle<JSFunction> getter) { | 1328 Handle<JSFunction> getter) { |
| 1329 { | 1329 { |
| 1330 FrameScope scope(masm, StackFrame::INTERNAL); | 1330 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1331 | 1331 |
| 1332 if (!getter.is_null()) { | 1332 if (!getter.is_null()) { |
| 1333 // Call the JavaScript getter with the receiver on the stack. | 1333 // Call the JavaScript getter with the receiver on the stack. |
| 1334 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1334 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
| 1335 // Swap in the global receiver. | 1335 // Swap in the global receiver. |
| 1336 __ mov(receiver, | 1336 __ mov(receiver, |
| 1337 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1337 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 1338 } | 1338 } |
| 1339 __ push(receiver); | 1339 __ push(receiver); |
| 1340 ParameterCount actual(0); | 1340 ParameterCount actual(0); |
| 1341 ParameterCount expected(getter); | 1341 ParameterCount expected(getter); |
| 1342 __ InvokeFunction(getter, expected, actual, | 1342 __ InvokeFunction(getter, expected, actual, |
| 1343 CALL_FUNCTION, NullCallWrapper()); | 1343 CALL_FUNCTION, NullCallWrapper()); |
| 1344 } else { | 1344 } else { |
| 1345 // If we generate a global code snippet for deoptimization only, remember | 1345 // If we generate a global code snippet for deoptimization only, remember |
| 1346 // the place to continue after deoptimization. | 1346 // the place to continue after deoptimization. |
| 1347 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 1347 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 // ----------------------------------- | 1491 // ----------------------------------- |
| 1492 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1492 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1493 } | 1493 } |
| 1494 | 1494 |
| 1495 | 1495 |
| 1496 #undef __ | 1496 #undef __ |
| 1497 | 1497 |
| 1498 } } // namespace v8::internal | 1498 } } // namespace v8::internal |
| 1499 | 1499 |
| 1500 #endif // V8_TARGET_ARCH_IA32 | 1500 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |