OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 // the holder and it is needed should the interceptor return without any | 1155 // the holder and it is needed should the interceptor return without any |
1156 // result. The CALLBACKS case needs the receiver to be passed into C++ code, | 1156 // result. The CALLBACKS case needs the receiver to be passed into C++ code, |
1157 // the FIELD case might cause a miss during the prototype check. | 1157 // the FIELD case might cause a miss during the prototype check. |
1158 bool must_perfrom_prototype_check = *interceptor_holder != lookup->holder(); | 1158 bool must_perfrom_prototype_check = *interceptor_holder != lookup->holder(); |
1159 bool must_preserve_receiver_reg = !receiver().is(holder_reg) && | 1159 bool must_preserve_receiver_reg = !receiver().is(holder_reg) && |
1160 (lookup->type() == CALLBACKS || must_perfrom_prototype_check); | 1160 (lookup->type() == CALLBACKS || must_perfrom_prototype_check); |
1161 | 1161 |
1162 // Save necessary data before invoking an interceptor. | 1162 // Save necessary data before invoking an interceptor. |
1163 // Requires a frame to make GC aware of pushed pointers. | 1163 // Requires a frame to make GC aware of pushed pointers. |
1164 { | 1164 { |
1165 FrameScope frame_scope(masm(), StackFrame::INTERNAL); | 1165 FrameAndConstantPoolScope frame_scope(masm(), StackFrame::INTERNAL); |
1166 if (must_preserve_receiver_reg) { | 1166 if (must_preserve_receiver_reg) { |
1167 __ Push(receiver(), holder_reg, this->name()); | 1167 __ Push(receiver(), holder_reg, this->name()); |
1168 } else { | 1168 } else { |
1169 __ Push(holder_reg, this->name()); | 1169 __ Push(holder_reg, this->name()); |
1170 } | 1170 } |
1171 // Invoke an interceptor. Note: map checks from receiver to | 1171 // Invoke an interceptor. Note: map checks from receiver to |
1172 // interceptor's holder has been compiled before (see a caller | 1172 // interceptor's holder has been compiled before (see a caller |
1173 // of this method.) | 1173 // of this method.) |
1174 CompileCallLoadPropertyWithInterceptor( | 1174 CompileCallLoadPropertyWithInterceptor( |
1175 masm(), receiver(), holder_reg, this->name(), interceptor_holder, | 1175 masm(), receiver(), holder_reg, this->name(), interceptor_holder, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 | 1255 |
1256 void StoreStubCompiler::GenerateStoreViaSetter( | 1256 void StoreStubCompiler::GenerateStoreViaSetter( |
1257 MacroAssembler* masm, | 1257 MacroAssembler* masm, |
1258 Handle<HeapType> type, | 1258 Handle<HeapType> type, |
1259 Register receiver, | 1259 Register receiver, |
1260 Handle<JSFunction> setter) { | 1260 Handle<JSFunction> setter) { |
1261 // ----------- S t a t e ------------- | 1261 // ----------- S t a t e ------------- |
1262 // -- lr : return address | 1262 // -- lr : return address |
1263 // ----------------------------------- | 1263 // ----------------------------------- |
1264 { | 1264 { |
1265 FrameScope scope(masm, StackFrame::INTERNAL); | 1265 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
1266 | 1266 |
1267 // Save value register, so we can restore it later. | 1267 // Save value register, so we can restore it later. |
1268 __ push(value()); | 1268 __ push(value()); |
1269 | 1269 |
1270 if (!setter.is_null()) { | 1270 if (!setter.is_null()) { |
1271 // Call the JavaScript setter with receiver and value on the stack. | 1271 // Call the JavaScript setter with receiver and value on the stack. |
1272 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1272 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1273 // Swap in the global receiver. | 1273 // Swap in the global receiver. |
1274 __ ldr(receiver, | 1274 __ ldr(receiver, |
1275 FieldMemOperand( | 1275 FieldMemOperand( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, | 1370 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, |
1371 Handle<HeapType> type, | 1371 Handle<HeapType> type, |
1372 Register receiver, | 1372 Register receiver, |
1373 Handle<JSFunction> getter) { | 1373 Handle<JSFunction> getter) { |
1374 // ----------- S t a t e ------------- | 1374 // ----------- S t a t e ------------- |
1375 // -- r0 : receiver | 1375 // -- r0 : receiver |
1376 // -- r2 : name | 1376 // -- r2 : name |
1377 // -- lr : return address | 1377 // -- lr : return address |
1378 // ----------------------------------- | 1378 // ----------------------------------- |
1379 { | 1379 { |
1380 FrameScope scope(masm, StackFrame::INTERNAL); | 1380 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
1381 | 1381 |
1382 if (!getter.is_null()) { | 1382 if (!getter.is_null()) { |
1383 // Call the JavaScript getter with the receiver on the stack. | 1383 // Call the JavaScript getter with the receiver on the stack. |
1384 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1384 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
1385 // Swap in the global receiver. | 1385 // Swap in the global receiver. |
1386 __ ldr(receiver, | 1386 __ ldr(receiver, |
1387 FieldMemOperand( | 1387 FieldMemOperand( |
1388 receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1388 receiver, JSGlobalObject::kGlobalReceiverOffset)); |
1389 } | 1389 } |
1390 __ push(receiver); | 1390 __ push(receiver); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 // ----------------------------------- | 1565 // ----------------------------------- |
1566 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1566 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1567 } | 1567 } |
1568 | 1568 |
1569 | 1569 |
1570 #undef __ | 1570 #undef __ |
1571 | 1571 |
1572 } } // namespace v8::internal | 1572 } } // namespace v8::internal |
1573 | 1573 |
1574 #endif // V8_TARGET_ARCH_ARM | 1574 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |