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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1196 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
1197 | 1197 |
1198 // Save value register, so we can restore it later. | 1198 // Save value register, so we can restore it later. |
1199 __ push(value()); | 1199 __ push(value()); |
1200 | 1200 |
1201 if (!setter.is_null()) { | 1201 if (!setter.is_null()) { |
1202 // Call the JavaScript setter with receiver and value on the stack. | 1202 // Call the JavaScript setter with receiver and value on the stack. |
1203 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1203 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1204 // Swap in the global receiver. | 1204 // Swap in the global receiver. |
1205 __ ldr(receiver, | 1205 __ ldr(receiver, |
1206 FieldMemOperand( | 1206 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
1207 receiver, JSGlobalObject::kGlobalReceiverOffset)); | |
1208 } | 1207 } |
1209 __ Push(receiver, value()); | 1208 __ Push(receiver, value()); |
1210 ParameterCount actual(1); | 1209 ParameterCount actual(1); |
1211 ParameterCount expected(setter); | 1210 ParameterCount expected(setter); |
1212 __ InvokeFunction(setter, expected, actual, | 1211 __ InvokeFunction(setter, expected, actual, |
1213 CALL_FUNCTION, NullCallWrapper()); | 1212 CALL_FUNCTION, NullCallWrapper()); |
1214 } else { | 1213 } else { |
1215 // If we generate a global code snippet for deoptimization only, remember | 1214 // If we generate a global code snippet for deoptimization only, remember |
1216 // the place to continue after deoptimization. | 1215 // the place to continue after deoptimization. |
1217 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 1216 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 // -- lr : return address | 1311 // -- lr : return address |
1313 // ----------------------------------- | 1312 // ----------------------------------- |
1314 { | 1313 { |
1315 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 1314 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
1316 | 1315 |
1317 if (!getter.is_null()) { | 1316 if (!getter.is_null()) { |
1318 // Call the JavaScript getter with the receiver on the stack. | 1317 // Call the JavaScript getter with the receiver on the stack. |
1319 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1318 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1320 // Swap in the global receiver. | 1319 // Swap in the global receiver. |
1321 __ ldr(receiver, | 1320 __ ldr(receiver, |
1322 FieldMemOperand( | 1321 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
1323 receiver, JSGlobalObject::kGlobalReceiverOffset)); | |
1324 } | 1322 } |
1325 __ push(receiver); | 1323 __ push(receiver); |
1326 ParameterCount actual(0); | 1324 ParameterCount actual(0); |
1327 ParameterCount expected(getter); | 1325 ParameterCount expected(getter); |
1328 __ InvokeFunction(getter, expected, actual, | 1326 __ InvokeFunction(getter, expected, actual, |
1329 CALL_FUNCTION, NullCallWrapper()); | 1327 CALL_FUNCTION, NullCallWrapper()); |
1330 } else { | 1328 } else { |
1331 // If we generate a global code snippet for deoptimization only, remember | 1329 // If we generate a global code snippet for deoptimization only, remember |
1332 // the place to continue after deoptimization. | 1330 // the place to continue after deoptimization. |
1333 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 1331 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 // ----------------------------------- | 1511 // ----------------------------------- |
1514 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1512 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1515 } | 1513 } |
1516 | 1514 |
1517 | 1515 |
1518 #undef __ | 1516 #undef __ |
1519 | 1517 |
1520 } } // namespace v8::internal | 1518 } } // namespace v8::internal |
1521 | 1519 |
1522 #endif // V8_TARGET_ARCH_ARM | 1520 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |