| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 __ pop(scratch2); // save old return address | 439 __ pop(scratch2); // save old return address |
| 440 __ push(holder); | 440 __ push(holder); |
| 441 __ mov(holder, Immediate(Handle<AccessorInfo>(callback))); | 441 __ mov(holder, Immediate(Handle<AccessorInfo>(callback))); |
| 442 __ push(holder); | 442 __ push(holder); |
| 443 __ push(FieldOperand(holder, AccessorInfo::kDataOffset)); | 443 __ push(FieldOperand(holder, AccessorInfo::kDataOffset)); |
| 444 __ push(name_); | 444 __ push(name_); |
| 445 __ push(scratch2); // restore old return address | 445 __ push(scratch2); // restore old return address |
| 446 | 446 |
| 447 ExternalReference ref = | 447 ExternalReference ref = |
| 448 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); | 448 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); |
| 449 __ TailCallRuntime(ref, 5, 1); | 449 __ TailCallExternalReference(ref, 5, 1); |
| 450 | 450 |
| 451 __ bind(&cleanup); | 451 __ bind(&cleanup); |
| 452 __ pop(scratch1); | 452 __ pop(scratch1); |
| 453 __ pop(scratch2); | 453 __ pop(scratch2); |
| 454 __ push(scratch1); | 454 __ push(scratch1); |
| 455 } | 455 } |
| 456 } | 456 } |
| 457 | 457 |
| 458 | 458 |
| 459 void CompileRegular(MacroAssembler* masm, | 459 void CompileRegular(MacroAssembler* masm, |
| 460 Register receiver, | 460 Register receiver, |
| 461 Register holder, | 461 Register holder, |
| 462 Register scratch, | 462 Register scratch, |
| 463 JSObject* holder_obj, | 463 JSObject* holder_obj, |
| 464 Label* miss_label) { | 464 Label* miss_label) { |
| 465 __ pop(scratch); // save old return address | 465 __ pop(scratch); // save old return address |
| 466 PushInterceptorArguments(masm, receiver, holder, name_, holder_obj); | 466 PushInterceptorArguments(masm, receiver, holder, name_, holder_obj); |
| 467 __ push(scratch); // restore old return address | 467 __ push(scratch); // restore old return address |
| 468 | 468 |
| 469 ExternalReference ref = ExternalReference( | 469 ExternalReference ref = ExternalReference( |
| 470 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); | 470 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); |
| 471 __ TailCallRuntime(ref, 5, 1); | 471 __ TailCallExternalReference(ref, 5, 1); |
| 472 } | 472 } |
| 473 | 473 |
| 474 private: | 474 private: |
| 475 Register name_; | 475 Register name_; |
| 476 }; | 476 }; |
| 477 | 477 |
| 478 | 478 |
| 479 // Holds information about possible function call optimizations. | 479 // Holds information about possible function call optimizations. |
| 480 class CallOptimization BASE_EMBEDDED { | 480 class CallOptimization BASE_EMBEDDED { |
| 481 public: | 481 public: |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 | 900 |
| 901 // Perform map transition for the receiver if necessary. | 901 // Perform map transition for the receiver if necessary. |
| 902 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { | 902 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { |
| 903 // The properties must be extended before we can store the value. | 903 // The properties must be extended before we can store the value. |
| 904 // We jump to a runtime call that extends the properties array. | 904 // We jump to a runtime call that extends the properties array. |
| 905 __ pop(scratch); // Return address. | 905 __ pop(scratch); // Return address. |
| 906 __ push(receiver_reg); | 906 __ push(receiver_reg); |
| 907 __ push(Immediate(Handle<Map>(transition))); | 907 __ push(Immediate(Handle<Map>(transition))); |
| 908 __ push(eax); | 908 __ push(eax); |
| 909 __ push(scratch); | 909 __ push(scratch); |
| 910 __ TailCallRuntime( | 910 __ TailCallExternalReference( |
| 911 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage)), 3, 1); | 911 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage)), 3, 1); |
| 912 return; | 912 return; |
| 913 } | 913 } |
| 914 | 914 |
| 915 if (transition != NULL) { | 915 if (transition != NULL) { |
| 916 // Update the map of the object; no write barrier updating is | 916 // Update the map of the object; no write barrier updating is |
| 917 // needed because the map is never in new space. | 917 // needed because the map is never in new space. |
| 918 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), | 918 __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), |
| 919 Immediate(Handle<Map>(transition))); | 919 Immediate(Handle<Map>(transition))); |
| 920 } | 920 } |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 __ pop(ebx); // remove the return address | 1580 __ pop(ebx); // remove the return address |
| 1581 __ push(edx); // receiver | 1581 __ push(edx); // receiver |
| 1582 __ push(Immediate(Handle<AccessorInfo>(callback))); // callback info | 1582 __ push(Immediate(Handle<AccessorInfo>(callback))); // callback info |
| 1583 __ push(ecx); // name | 1583 __ push(ecx); // name |
| 1584 __ push(eax); // value | 1584 __ push(eax); // value |
| 1585 __ push(ebx); // restore return address | 1585 __ push(ebx); // restore return address |
| 1586 | 1586 |
| 1587 // Do tail-call to the runtime system. | 1587 // Do tail-call to the runtime system. |
| 1588 ExternalReference store_callback_property = | 1588 ExternalReference store_callback_property = |
| 1589 ExternalReference(IC_Utility(IC::kStoreCallbackProperty)); | 1589 ExternalReference(IC_Utility(IC::kStoreCallbackProperty)); |
| 1590 __ TailCallRuntime(store_callback_property, 4, 1); | 1590 __ TailCallExternalReference(store_callback_property, 4, 1); |
| 1591 | 1591 |
| 1592 // Handle store cache miss. | 1592 // Handle store cache miss. |
| 1593 __ bind(&miss); | 1593 __ bind(&miss); |
| 1594 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 1594 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
| 1595 __ jmp(ic, RelocInfo::CODE_TARGET); | 1595 __ jmp(ic, RelocInfo::CODE_TARGET); |
| 1596 | 1596 |
| 1597 // Return the generated code. | 1597 // Return the generated code. |
| 1598 return GetCode(CALLBACKS, name); | 1598 return GetCode(CALLBACKS, name); |
| 1599 } | 1599 } |
| 1600 | 1600 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1629 | 1629 |
| 1630 __ pop(ebx); // remove the return address | 1630 __ pop(ebx); // remove the return address |
| 1631 __ push(edx); // receiver | 1631 __ push(edx); // receiver |
| 1632 __ push(ecx); // name | 1632 __ push(ecx); // name |
| 1633 __ push(eax); // value | 1633 __ push(eax); // value |
| 1634 __ push(ebx); // restore return address | 1634 __ push(ebx); // restore return address |
| 1635 | 1635 |
| 1636 // Do tail-call to the runtime system. | 1636 // Do tail-call to the runtime system. |
| 1637 ExternalReference store_ic_property = | 1637 ExternalReference store_ic_property = |
| 1638 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); | 1638 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); |
| 1639 __ TailCallRuntime(store_ic_property, 3, 1); | 1639 __ TailCallExternalReference(store_ic_property, 3, 1); |
| 1640 | 1640 |
| 1641 // Handle store cache miss. | 1641 // Handle store cache miss. |
| 1642 __ bind(&miss); | 1642 __ bind(&miss); |
| 1643 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 1643 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
| 1644 __ jmp(ic, RelocInfo::CODE_TARGET); | 1644 __ jmp(ic, RelocInfo::CODE_TARGET); |
| 1645 | 1645 |
| 1646 // Return the generated code. | 1646 // Return the generated code. |
| 1647 return GetCode(INTERCEPTOR, name); | 1647 return GetCode(INTERCEPTOR, name); |
| 1648 } | 1648 } |
| 1649 | 1649 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2202 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); | 2202 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 2203 | 2203 |
| 2204 // Return the generated code. | 2204 // Return the generated code. |
| 2205 return GetCode(); | 2205 return GetCode(); |
| 2206 } | 2206 } |
| 2207 | 2207 |
| 2208 | 2208 |
| 2209 #undef __ | 2209 #undef __ |
| 2210 | 2210 |
| 2211 } } // namespace v8::internal | 2211 } } // namespace v8::internal |
| OLD | NEW |