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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
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 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 FrameScope scope(masm, StackFrame::INTERNAL); | 1188 FrameScope scope(masm, StackFrame::INTERNAL); |
1189 | 1189 |
1190 // Save value register, so we can restore it later. | 1190 // Save value register, so we can restore it later. |
1191 __ push(value()); | 1191 __ push(value()); |
1192 | 1192 |
1193 if (!setter.is_null()) { | 1193 if (!setter.is_null()) { |
1194 // Call the JavaScript setter with receiver and value on the stack. | 1194 // Call the JavaScript setter with receiver and value on the stack. |
1195 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1195 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1196 // Swap in the global receiver. | 1196 // Swap in the global receiver. |
1197 __ lw(receiver, | 1197 __ lw(receiver, |
1198 FieldMemOperand( | 1198 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
1199 receiver, JSGlobalObject::kGlobalReceiverOffset)); | |
1200 } | 1199 } |
1201 __ Push(receiver, value()); | 1200 __ Push(receiver, value()); |
1202 ParameterCount actual(1); | 1201 ParameterCount actual(1); |
1203 ParameterCount expected(setter); | 1202 ParameterCount expected(setter); |
1204 __ InvokeFunction(setter, expected, actual, | 1203 __ InvokeFunction(setter, expected, actual, |
1205 CALL_FUNCTION, NullCallWrapper()); | 1204 CALL_FUNCTION, NullCallWrapper()); |
1206 } else { | 1205 } else { |
1207 // If we generate a global code snippet for deoptimization only, remember | 1206 // If we generate a global code snippet for deoptimization only, remember |
1208 // the place to continue after deoptimization. | 1207 // the place to continue after deoptimization. |
1209 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); | 1208 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 // -- ra : return address | 1302 // -- ra : return address |
1304 // ----------------------------------- | 1303 // ----------------------------------- |
1305 { | 1304 { |
1306 FrameScope scope(masm, StackFrame::INTERNAL); | 1305 FrameScope scope(masm, StackFrame::INTERNAL); |
1307 | 1306 |
1308 if (!getter.is_null()) { | 1307 if (!getter.is_null()) { |
1309 // Call the JavaScript getter with the receiver on the stack. | 1308 // Call the JavaScript getter with the receiver on the stack. |
1310 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1309 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1311 // Swap in the global receiver. | 1310 // Swap in the global receiver. |
1312 __ lw(receiver, | 1311 __ lw(receiver, |
1313 FieldMemOperand( | 1312 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); |
1314 receiver, JSGlobalObject::kGlobalReceiverOffset)); | |
1315 } | 1313 } |
1316 __ push(receiver); | 1314 __ push(receiver); |
1317 ParameterCount actual(0); | 1315 ParameterCount actual(0); |
1318 ParameterCount expected(getter); | 1316 ParameterCount expected(getter); |
1319 __ InvokeFunction(getter, expected, actual, | 1317 __ InvokeFunction(getter, expected, actual, |
1320 CALL_FUNCTION, NullCallWrapper()); | 1318 CALL_FUNCTION, NullCallWrapper()); |
1321 } else { | 1319 } else { |
1322 // If we generate a global code snippet for deoptimization only, remember | 1320 // If we generate a global code snippet for deoptimization only, remember |
1323 // the place to continue after deoptimization. | 1321 // the place to continue after deoptimization. |
1324 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); | 1322 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 // ----------------------------------- | 1505 // ----------------------------------- |
1508 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1506 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1509 } | 1507 } |
1510 | 1508 |
1511 | 1509 |
1512 #undef __ | 1510 #undef __ |
1513 | 1511 |
1514 } } // namespace v8::internal | 1512 } } // namespace v8::internal |
1515 | 1513 |
1516 #endif // V8_TARGET_ARCH_MIPS | 1514 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |