Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/mips/ic-mips.cc

Issue 16452011: MIPS: Add LoadIC_Slow builtin and use it for loading properties from primitive values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
639 Label miss; 639 Label miss;
640 __ JumpIfSmi(a2, &miss); 640 __ JumpIfSmi(a2, &miss);
641 __ IsObjectNameType(a2, a0, &miss); 641 __ IsObjectNameType(a2, a0, &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 // -- a2 : name 651 // -- a2 : name
655 // -- ra : return address 652 // -- ra : return address
656 // -- a0 : receiver 653 // -- a0 : 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 700
704 __ mov(a3, a0); 701 __ mov(a3, a0);
705 __ Push(a3, a2); 702 __ Push(a3, a2);
706 703
707 // Perform tail call to the entry. 704 // Perform tail call to the entry.
708 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 705 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
709 __ TailCallExternalReference(ref, 2, 1); 706 __ TailCallExternalReference(ref, 2, 1);
710 } 707 }
711 708
712 709
710 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
711 // ---------- S t a t e --------------
712 // -- a2 : name
713 // -- ra : return address
714 // -- a0 : receiver
715 // -- sp[0] : receiver
716 // -----------------------------------
717
718 __ mov(a3, a0);
719 __ Push(a3, a2);
720
721 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
722 }
723
724
713 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, 725 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
714 Register object, 726 Register object,
715 Register key, 727 Register key,
716 Register scratch1, 728 Register scratch1,
717 Register scratch2, 729 Register scratch2,
718 Register scratch3, 730 Register scratch3,
719 Label* unmapped_case, 731 Label* unmapped_case,
720 Label* slow_case) { 732 Label* slow_case) {
721 // Check that the receiver is a JSObject. Because of the map check 733 // Check that the receiver is a JSObject. Because of the map check
722 // later, we do not need to check for interceptors or whether it 734 // later, we do not need to check for interceptors or whether it
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 GenerateUnmappedArgumentsLookup(masm, a2, a3, t0, &slow); 888 GenerateUnmappedArgumentsLookup(masm, a2, a3, t0, &slow);
877 __ lw(a1, unmapped_location); 889 __ lw(a1, unmapped_location);
878 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex); 890 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex);
879 __ Branch(&slow, eq, a1, Operand(a3)); 891 __ Branch(&slow, eq, a1, Operand(a3));
880 GenerateFunctionTailCall(masm, argc, &slow, a3); 892 GenerateFunctionTailCall(masm, argc, &slow, a3);
881 __ bind(&slow); 893 __ bind(&slow);
882 GenerateMiss(masm, argc); 894 GenerateMiss(masm, argc);
883 } 895 }
884 896
885 897
886 Object* KeyedLoadIC_Miss(Arguments args);
887
888
889 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) { 898 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm, ICMissMode miss_mode) {
890 // ---------- S t a t e -------------- 899 // ---------- S t a t e --------------
891 // -- ra : return address 900 // -- ra : return address
892 // -- a0 : key 901 // -- a0 : key
893 // -- a1 : receiver 902 // -- a1 : receiver
894 // ----------------------------------- 903 // -----------------------------------
895 Isolate* isolate = masm->isolate(); 904 Isolate* isolate = masm->isolate();
896 905
897 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 906 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
898 907
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 } else { 1707 } else {
1699 ASSERT(Assembler::IsBne(branch_instr)); 1708 ASSERT(Assembler::IsBne(branch_instr));
1700 patcher.ChangeBranchCondition(eq); 1709 patcher.ChangeBranchCondition(eq);
1701 } 1710 }
1702 } 1711 }
1703 1712
1704 1713
1705 } } // namespace v8::internal 1714 } } // namespace v8::internal
1706 1715
1707 #endif // V8_TARGET_ARCH_MIPS 1716 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698