OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // checks. | 290 // checks. |
291 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | 291 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
292 | 292 |
293 // Perform map transition for the receiver if necessary. | 293 // Perform map transition for the receiver if necessary. |
294 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { | 294 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { |
295 // The properties must be extended before we can store the value. | 295 // The properties must be extended before we can store the value. |
296 // We jump to a runtime call that extends the properties array. | 296 // We jump to a runtime call that extends the properties array. |
297 __ push(receiver_reg); | 297 __ push(receiver_reg); |
298 __ mov(r2, Operand(Handle<Map>(transition))); | 298 __ mov(r2, Operand(Handle<Map>(transition))); |
299 __ stm(db_w, sp, r2.bit() | r0.bit()); | 299 __ stm(db_w, sp, r2.bit() | r0.bit()); |
300 __ TailCallRuntime( | 300 __ TailCallExternalReference( |
301 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage)), | 301 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage)), |
302 3, 1); | 302 3, 1); |
303 return; | 303 return; |
304 } | 304 } |
305 | 305 |
306 if (transition != NULL) { | 306 if (transition != NULL) { |
307 // Update the map of the object; no write barrier updating is | 307 // Update the map of the object; no write barrier updating is |
308 // needed because the map is never in new space. | 308 // needed because the map is never in new space. |
309 __ mov(ip, Operand(Handle<Map>(transition))); | 309 __ mov(ip, Operand(Handle<Map>(transition))); |
310 __ str(ip, FieldMemOperand(receiver_reg, HeapObject::kMapOffset)); | 310 __ str(ip, FieldMemOperand(receiver_reg, HeapObject::kMapOffset)); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 522 |
523 __ push(holder); | 523 __ push(holder); |
524 __ Move(holder, Handle<AccessorInfo>(callback)); | 524 __ Move(holder, Handle<AccessorInfo>(callback)); |
525 __ push(holder); | 525 __ push(holder); |
526 __ ldr(scratch1, FieldMemOperand(holder, AccessorInfo::kDataOffset)); | 526 __ ldr(scratch1, FieldMemOperand(holder, AccessorInfo::kDataOffset)); |
527 __ push(scratch1); | 527 __ push(scratch1); |
528 __ push(name_); | 528 __ push(name_); |
529 | 529 |
530 ExternalReference ref = | 530 ExternalReference ref = |
531 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); | 531 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); |
532 __ TailCallRuntime(ref, 5, 1); | 532 __ TailCallExternalReference(ref, 5, 1); |
533 | 533 |
534 __ bind(&cleanup); | 534 __ bind(&cleanup); |
535 __ pop(scratch1); | 535 __ pop(scratch1); |
536 __ pop(scratch2); | 536 __ pop(scratch2); |
537 __ push(scratch1); | 537 __ push(scratch1); |
538 } | 538 } |
539 } | 539 } |
540 | 540 |
541 | 541 |
542 void CompileRegular(MacroAssembler* masm, | 542 void CompileRegular(MacroAssembler* masm, |
543 Register receiver, | 543 Register receiver, |
544 Register holder, | 544 Register holder, |
545 Register scratch, | 545 Register scratch, |
546 JSObject* holder_obj, | 546 JSObject* holder_obj, |
547 Label* miss_label) { | 547 Label* miss_label) { |
548 PushInterceptorArguments(masm, receiver, holder, name_, holder_obj); | 548 PushInterceptorArguments(masm, receiver, holder, name_, holder_obj); |
549 | 549 |
550 ExternalReference ref = ExternalReference( | 550 ExternalReference ref = ExternalReference( |
551 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); | 551 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); |
552 __ TailCallRuntime(ref, 5, 1); | 552 __ TailCallExternalReference(ref, 5, 1); |
553 } | 553 } |
554 | 554 |
555 private: | 555 private: |
556 Register name_; | 556 Register name_; |
557 }; | 557 }; |
558 | 558 |
559 | 559 |
560 static void CompileLoadInterceptor(LoadInterceptorCompiler* compiler, | 560 static void CompileLoadInterceptor(LoadInterceptorCompiler* compiler, |
561 StubCompiler* stub_compiler, | 561 StubCompiler* stub_compiler, |
562 MacroAssembler* masm, | 562 MacroAssembler* masm, |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 __ push(reg); // holder | 712 __ push(reg); // holder |
713 __ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback data | 713 __ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback data |
714 __ push(ip); | 714 __ push(ip); |
715 __ ldr(reg, FieldMemOperand(ip, AccessorInfo::kDataOffset)); | 715 __ ldr(reg, FieldMemOperand(ip, AccessorInfo::kDataOffset)); |
716 __ push(reg); | 716 __ push(reg); |
717 __ push(name_reg); // name | 717 __ push(name_reg); // name |
718 | 718 |
719 // Do tail-call to the runtime system. | 719 // Do tail-call to the runtime system. |
720 ExternalReference load_callback_property = | 720 ExternalReference load_callback_property = |
721 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); | 721 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); |
722 __ TailCallRuntime(load_callback_property, 5, 1); | 722 __ TailCallExternalReference(load_callback_property, 5, 1); |
723 | 723 |
724 return true; | 724 return true; |
725 } | 725 } |
726 | 726 |
727 | 727 |
728 void StubCompiler::GenerateLoadInterceptor(JSObject* object, | 728 void StubCompiler::GenerateLoadInterceptor(JSObject* object, |
729 JSObject* holder, | 729 JSObject* holder, |
730 LookupResult* lookup, | 730 LookupResult* lookup, |
731 Register receiver, | 731 Register receiver, |
732 Register name_reg, | 732 Register name_reg, |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 // checks. | 1197 // checks. |
1198 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | 1198 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
1199 | 1199 |
1200 __ push(r1); // receiver | 1200 __ push(r1); // receiver |
1201 __ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback info | 1201 __ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback info |
1202 __ stm(db_w, sp, ip.bit() | r2.bit() | r0.bit()); | 1202 __ stm(db_w, sp, ip.bit() | r2.bit() | r0.bit()); |
1203 | 1203 |
1204 // Do tail-call to the runtime system. | 1204 // Do tail-call to the runtime system. |
1205 ExternalReference store_callback_property = | 1205 ExternalReference store_callback_property = |
1206 ExternalReference(IC_Utility(IC::kStoreCallbackProperty)); | 1206 ExternalReference(IC_Utility(IC::kStoreCallbackProperty)); |
1207 __ TailCallRuntime(store_callback_property, 4, 1); | 1207 __ TailCallExternalReference(store_callback_property, 4, 1); |
1208 | 1208 |
1209 // Handle store cache miss. | 1209 // Handle store cache miss. |
1210 __ bind(&miss); | 1210 __ bind(&miss); |
1211 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 1211 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
1212 __ Jump(ic, RelocInfo::CODE_TARGET); | 1212 __ Jump(ic, RelocInfo::CODE_TARGET); |
1213 | 1213 |
1214 // Return the generated code. | 1214 // Return the generated code. |
1215 return GetCode(CALLBACKS, name); | 1215 return GetCode(CALLBACKS, name); |
1216 } | 1216 } |
1217 | 1217 |
(...skipping 26 matching lines...) Expand all Loading... |
1244 // checks. | 1244 // checks. |
1245 ASSERT(receiver->IsJSGlobalProxy() || !receiver->IsAccessCheckNeeded()); | 1245 ASSERT(receiver->IsJSGlobalProxy() || !receiver->IsAccessCheckNeeded()); |
1246 | 1246 |
1247 __ push(r1); // receiver. | 1247 __ push(r1); // receiver. |
1248 __ push(r2); // name. | 1248 __ push(r2); // name. |
1249 __ push(r0); // value. | 1249 __ push(r0); // value. |
1250 | 1250 |
1251 // Do tail-call to the runtime system. | 1251 // Do tail-call to the runtime system. |
1252 ExternalReference store_ic_property = | 1252 ExternalReference store_ic_property = |
1253 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); | 1253 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); |
1254 __ TailCallRuntime(store_ic_property, 3, 1); | 1254 __ TailCallExternalReference(store_ic_property, 3, 1); |
1255 | 1255 |
1256 // Handle store cache miss. | 1256 // Handle store cache miss. |
1257 __ bind(&miss); | 1257 __ bind(&miss); |
1258 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 1258 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
1259 __ Jump(ic, RelocInfo::CODE_TARGET); | 1259 __ Jump(ic, RelocInfo::CODE_TARGET); |
1260 | 1260 |
1261 // Return the generated code. | 1261 // Return the generated code. |
1262 return GetCode(INTERCEPTOR, name); | 1262 return GetCode(INTERCEPTOR, name); |
1263 } | 1263 } |
1264 | 1264 |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 1801 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
1802 | 1802 |
1803 // Return the generated code. | 1803 // Return the generated code. |
1804 return GetCode(); | 1804 return GetCode(); |
1805 } | 1805 } |
1806 | 1806 |
1807 | 1807 |
1808 #undef __ | 1808 #undef __ |
1809 | 1809 |
1810 } } // namespace v8::internal | 1810 } } // namespace v8::internal |
OLD | NEW |