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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 FrameScope scope(masm, StackFrame::INTERNAL); | 1169 FrameScope scope(masm, StackFrame::INTERNAL); |
1170 | 1170 |
1171 // Save value register, so we can restore it later. | 1171 // Save value register, so we can restore it later. |
1172 __ push(value()); | 1172 __ push(value()); |
1173 | 1173 |
1174 if (!setter.is_null()) { | 1174 if (!setter.is_null()) { |
1175 // Call the JavaScript setter with receiver and value on the stack. | 1175 // Call the JavaScript setter with receiver and value on the stack. |
1176 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1176 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1177 // Swap in the global receiver. | 1177 // Swap in the global receiver. |
1178 __ mov(receiver, | 1178 __ mov(receiver, |
1179 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1179 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
1180 } | 1180 } |
1181 __ push(receiver); | 1181 __ push(receiver); |
1182 __ push(value()); | 1182 __ push(value()); |
1183 ParameterCount actual(1); | 1183 ParameterCount actual(1); |
1184 ParameterCount expected(setter); | 1184 ParameterCount expected(setter); |
1185 __ InvokeFunction(setter, expected, actual, | 1185 __ InvokeFunction(setter, expected, actual, |
1186 CALL_FUNCTION, NullCallWrapper()); | 1186 CALL_FUNCTION, NullCallWrapper()); |
1187 } else { | 1187 } else { |
1188 // If we generate a global code snippet for deoptimization only, remember | 1188 // If we generate a global code snippet for deoptimization only, remember |
1189 // the place to continue after deoptimization. | 1189 // the place to continue after deoptimization. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 Register receiver, | 1326 Register receiver, |
1327 Handle<JSFunction> getter) { | 1327 Handle<JSFunction> getter) { |
1328 { | 1328 { |
1329 FrameScope scope(masm, StackFrame::INTERNAL); | 1329 FrameScope scope(masm, StackFrame::INTERNAL); |
1330 | 1330 |
1331 if (!getter.is_null()) { | 1331 if (!getter.is_null()) { |
1332 // Call the JavaScript getter with the receiver on the stack. | 1332 // Call the JavaScript getter with the receiver on the stack. |
1333 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1333 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1334 // Swap in the global receiver. | 1334 // Swap in the global receiver. |
1335 __ mov(receiver, | 1335 __ mov(receiver, |
1336 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1336 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
1337 } | 1337 } |
1338 __ push(receiver); | 1338 __ push(receiver); |
1339 ParameterCount actual(0); | 1339 ParameterCount actual(0); |
1340 ParameterCount expected(getter); | 1340 ParameterCount expected(getter); |
1341 __ InvokeFunction(getter, expected, actual, | 1341 __ InvokeFunction(getter, expected, actual, |
1342 CALL_FUNCTION, NullCallWrapper()); | 1342 CALL_FUNCTION, NullCallWrapper()); |
1343 } else { | 1343 } else { |
1344 // If we generate a global code snippet for deoptimization only, remember | 1344 // If we generate a global code snippet for deoptimization only, remember |
1345 // the place to continue after deoptimization. | 1345 // the place to continue after deoptimization. |
1346 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 1346 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1490 // ----------------------------------- | 1490 // ----------------------------------- |
1491 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1491 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1492 } | 1492 } |
1493 | 1493 |
1494 | 1494 |
1495 #undef __ | 1495 #undef __ |
1496 | 1496 |
1497 } } // namespace v8::internal | 1497 } } // namespace v8::internal |
1498 | 1498 |
1499 #endif // V8_TARGET_ARCH_X87 | 1499 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |