| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 FrameScope scope(masm, StackFrame::INTERNAL); | 1102 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1103 | 1103 |
| 1104 // Save value register, so we can restore it later. | 1104 // Save value register, so we can restore it later. |
| 1105 __ Push(value()); | 1105 __ Push(value()); |
| 1106 | 1106 |
| 1107 if (!setter.is_null()) { | 1107 if (!setter.is_null()) { |
| 1108 // Call the JavaScript setter with receiver and value on the stack. | 1108 // Call the JavaScript setter with receiver and value on the stack. |
| 1109 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1109 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
| 1110 // Swap in the global receiver. | 1110 // Swap in the global receiver. |
| 1111 __ movp(receiver, | 1111 __ movp(receiver, |
| 1112 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1112 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 1113 } | 1113 } |
| 1114 __ Push(receiver); | 1114 __ Push(receiver); |
| 1115 __ Push(value()); | 1115 __ Push(value()); |
| 1116 ParameterCount actual(1); | 1116 ParameterCount actual(1); |
| 1117 ParameterCount expected(setter); | 1117 ParameterCount expected(setter); |
| 1118 __ InvokeFunction(setter, expected, actual, | 1118 __ InvokeFunction(setter, expected, actual, |
| 1119 CALL_FUNCTION, NullCallWrapper()); | 1119 CALL_FUNCTION, NullCallWrapper()); |
| 1120 } else { | 1120 } else { |
| 1121 // If we generate a global code snippet for deoptimization only, remember | 1121 // If we generate a global code snippet for deoptimization only, remember |
| 1122 // the place to continue after deoptimization. | 1122 // the place to continue after deoptimization. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 // -- rsp[0] : return address | 1271 // -- rsp[0] : return address |
| 1272 // ----------------------------------- | 1272 // ----------------------------------- |
| 1273 { | 1273 { |
| 1274 FrameScope scope(masm, StackFrame::INTERNAL); | 1274 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1275 | 1275 |
| 1276 if (!getter.is_null()) { | 1276 if (!getter.is_null()) { |
| 1277 // Call the JavaScript getter with the receiver on the stack. | 1277 // Call the JavaScript getter with the receiver on the stack. |
| 1278 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1278 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
| 1279 // Swap in the global receiver. | 1279 // Swap in the global receiver. |
| 1280 __ movp(receiver, | 1280 __ movp(receiver, |
| 1281 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1281 FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
| 1282 } | 1282 } |
| 1283 __ Push(receiver); | 1283 __ Push(receiver); |
| 1284 ParameterCount actual(0); | 1284 ParameterCount actual(0); |
| 1285 ParameterCount expected(getter); | 1285 ParameterCount expected(getter); |
| 1286 __ InvokeFunction(getter, expected, actual, | 1286 __ InvokeFunction(getter, expected, actual, |
| 1287 CALL_FUNCTION, NullCallWrapper()); | 1287 CALL_FUNCTION, NullCallWrapper()); |
| 1288 } else { | 1288 } else { |
| 1289 // If we generate a global code snippet for deoptimization only, remember | 1289 // If we generate a global code snippet for deoptimization only, remember |
| 1290 // the place to continue after deoptimization. | 1290 // the place to continue after deoptimization. |
| 1291 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 1291 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 // ----------------------------------- | 1433 // ----------------------------------- |
| 1434 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1434 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1435 } | 1435 } |
| 1436 | 1436 |
| 1437 | 1437 |
| 1438 #undef __ | 1438 #undef __ |
| 1439 | 1439 |
| 1440 } } // namespace v8::internal | 1440 } } // namespace v8::internal |
| 1441 | 1441 |
| 1442 #endif // V8_TARGET_ARCH_X64 | 1442 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |