Chromium Code Reviews| 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 639 Label miss; | 639 Label miss; |
| 640 __ JumpIfSmi(r2, &miss); | 640 __ JumpIfSmi(r2, &miss); |
| 641 __ IsObjectNameType(r2, r0, &miss); | 641 __ IsObjectNameType(r2, r0, &miss); |
| 642 | 642 |
| 643 CallICBase::GenerateNormal(masm, argc); | 643 CallICBase::GenerateNormal(masm, argc); |
| 644 __ bind(&miss); | 644 __ bind(&miss); |
| 645 GenerateMiss(masm, argc); | 645 GenerateMiss(masm, argc); |
| 646 } | 646 } |
| 647 | 647 |
| 648 | 648 |
| 649 // Defined in ic.cc. | |
| 650 Object* LoadIC_Miss(Arguments args); | |
| 651 | |
| 652 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 649 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 653 // ----------- S t a t e ------------- | 650 // ----------- S t a t e ------------- |
| 654 // -- r2 : name | 651 // -- r2 : name |
| 655 // -- lr : return address | 652 // -- lr : return address |
| 656 // -- r0 : receiver | 653 // -- r0 : receiver |
| 657 // -- sp[0] : receiver | 654 // -- sp[0] : receiver |
| 658 // ----------------------------------- | 655 // ----------------------------------- |
| 659 | 656 |
| 660 // Probe the stub cache. | 657 // Probe the stub cache. |
| 661 Code::Flags flags = Code::ComputeFlags( | 658 Code::Flags flags = Code::ComputeFlags( |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 704 __ mov(r3, r0); | 701 __ mov(r3, r0); |
| 705 __ Push(r3, r2); | 702 __ Push(r3, r2); |
| 706 | 703 |
| 707 // Perform tail call to the entry. | 704 // Perform tail call to the entry. |
| 708 ExternalReference ref = | 705 ExternalReference ref = |
| 709 ExternalReference(IC_Utility(kLoadIC_Miss), isolate); | 706 ExternalReference(IC_Utility(kLoadIC_Miss), isolate); |
| 710 __ TailCallExternalReference(ref, 2, 1); | 707 __ TailCallExternalReference(ref, 2, 1); |
| 711 } | 708 } |
| 712 | 709 |
| 713 | 710 |
| 711 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | |
| 712 // ---------- S t a t e -------------- | |
| 713 // -- r2 : name | |
| 714 // -- lr : return address | |
| 715 // -- r0 : receiver | |
| 716 // -- sp[0] : receiver | |
| 717 // ----------------------------------- | |
| 718 | |
| 719 __ mov(r3, r0); | |
| 720 __ Push(r3, r2); | |
| 721 | |
| 722 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | |
|
Toon Verwaest
2013/06/04 17:51:08
Please call into the non-keyed version of this met
Jakob Kummerow
2013/06/05 11:11:51
Done.
| |
| 723 } | |
| 724 | |
| 725 | |
| 714 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, | 726 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, |
| 715 Register object, | 727 Register object, |
| 716 Register key, | 728 Register key, |
| 717 Register scratch1, | 729 Register scratch1, |
| 718 Register scratch2, | 730 Register scratch2, |
| 719 Register scratch3, | 731 Register scratch3, |
| 720 Label* unmapped_case, | 732 Label* unmapped_case, |
| 721 Label* slow_case) { | 733 Label* slow_case) { |
| 722 Heap* heap = masm->isolate()->heap(); | 734 Heap* heap = masm->isolate()->heap(); |
| 723 | 735 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 871 __ ldr(r1, unmapped_location); | 883 __ ldr(r1, unmapped_location); |
| 872 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); | 884 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); |
| 873 __ cmp(r1, r3); | 885 __ cmp(r1, r3); |
| 874 __ b(eq, &slow); | 886 __ b(eq, &slow); |
| 875 GenerateFunctionTailCall(masm, argc, &slow, r3); | 887 GenerateFunctionTailCall(masm, argc, &slow, r3); |
| 876 __ bind(&slow); | 888 __ bind(&slow); |
| 877 GenerateMiss(masm, argc); | 889 GenerateMiss(masm, argc); |
| 878 } | 890 } |
| 879 | 891 |
| 880 | 892 |
| 881 Object* KeyedLoadIC_Miss(Arguments args); | |
| 882 | |
| 883 | |
| 884 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) { | 893 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) { |
| 885 // ---------- S t a t e -------------- | 894 // ---------- S t a t e -------------- |
| 886 // -- lr : return address | 895 // -- lr : return address |
| 887 // -- r0 : key | 896 // -- r0 : key |
| 888 // -- r1 : receiver | 897 // -- r1 : receiver |
| 889 // ----------------------------------- | 898 // ----------------------------------- |
| 890 Isolate* isolate = masm->isolate(); | 899 Isolate* isolate = masm->isolate(); |
| 891 | 900 |
| 892 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4); | 901 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4); |
| 893 | 902 |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1691 } else { | 1700 } else { |
| 1692 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1701 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
| 1693 patcher.EmitCondition(eq); | 1702 patcher.EmitCondition(eq); |
| 1694 } | 1703 } |
| 1695 } | 1704 } |
| 1696 | 1705 |
| 1697 | 1706 |
| 1698 } } // namespace v8::internal | 1707 } } // namespace v8::internal |
| 1699 | 1708 |
| 1700 #endif // V8_TARGET_ARCH_ARM | 1709 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |