| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1257 MacroAssembler* masm, | 1257 MacroAssembler* masm, |
| 1258 Handle<HeapType> type, | 1258 Handle<HeapType> type, |
| 1259 Handle<JSFunction> setter) { | 1259 Handle<JSFunction> setter) { |
| 1260 // ----------- S t a t e ------------- | 1260 // ----------- S t a t e ------------- |
| 1261 // -- r0 : value | 1261 // -- r0 : value |
| 1262 // -- r1 : receiver | 1262 // -- r1 : receiver |
| 1263 // -- r2 : name | 1263 // -- r2 : name |
| 1264 // -- lr : return address | 1264 // -- lr : return address |
| 1265 // ----------------------------------- | 1265 // ----------------------------------- |
| 1266 { | 1266 { |
| 1267 FrameScope scope(masm, StackFrame::INTERNAL); | 1267 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 1268 Register receiver = r1; | 1268 Register receiver = r1; |
| 1269 Register value = r0; | 1269 Register value = r0; |
| 1270 | 1270 |
| 1271 // Save value register, so we can restore it later. | 1271 // Save value register, so we can restore it later. |
| 1272 __ push(value); | 1272 __ push(value); |
| 1273 | 1273 |
| 1274 if (!setter.is_null()) { | 1274 if (!setter.is_null()) { |
| 1275 // Call the JavaScript setter with receiver and value on the stack. | 1275 // Call the JavaScript setter with receiver and value on the stack. |
| 1276 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1276 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
| 1277 // Swap in the global receiver. | 1277 // Swap in the global receiver. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, | 1388 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, |
| 1389 Handle<HeapType> type, | 1389 Handle<HeapType> type, |
| 1390 Register receiver, | 1390 Register receiver, |
| 1391 Handle<JSFunction> getter) { | 1391 Handle<JSFunction> getter) { |
| 1392 // ----------- S t a t e ------------- | 1392 // ----------- S t a t e ------------- |
| 1393 // -- r0 : receiver | 1393 // -- r0 : receiver |
| 1394 // -- r2 : name | 1394 // -- r2 : name |
| 1395 // -- lr : return address | 1395 // -- lr : return address |
| 1396 // ----------------------------------- | 1396 // ----------------------------------- |
| 1397 { | 1397 { |
| 1398 FrameScope scope(masm, StackFrame::INTERNAL); | 1398 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 1399 | 1399 |
| 1400 if (!getter.is_null()) { | 1400 if (!getter.is_null()) { |
| 1401 // Call the JavaScript getter with the receiver on the stack. | 1401 // Call the JavaScript getter with the receiver on the stack. |
| 1402 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { | 1402 if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) { |
| 1403 // Swap in the global receiver. | 1403 // Swap in the global receiver. |
| 1404 __ ldr(receiver, | 1404 __ ldr(receiver, |
| 1405 FieldMemOperand( | 1405 FieldMemOperand( |
| 1406 receiver, JSGlobalObject::kGlobalReceiverOffset)); | 1406 receiver, JSGlobalObject::kGlobalReceiverOffset)); |
| 1407 } | 1407 } |
| 1408 __ push(receiver); | 1408 __ push(receiver); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 // ----------------------------------- | 1583 // ----------------------------------- |
| 1584 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1584 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 | 1587 |
| 1588 #undef __ | 1588 #undef __ |
| 1589 | 1589 |
| 1590 } } // namespace v8::internal | 1590 } } // namespace v8::internal |
| 1591 | 1591 |
| 1592 #endif // V8_TARGET_ARCH_ARM | 1592 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |