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

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

Issue 16703007: Merged r15047, r15048, r15049 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
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 | « src/mips/full-codegen-mips.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 __ bind(&miss); 644 __ bind(&miss);
645 GenerateMiss(masm, argc); 645 GenerateMiss(masm, argc);
646 } 646 }
647 647
648 648
649 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 649 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
650 // ----------- S t a t e ------------- 650 // ----------- S t a t e -------------
651 // -- a2 : name 651 // -- a2 : name
652 // -- ra : return address 652 // -- ra : return address
653 // -- a0 : receiver 653 // -- a0 : receiver
654 // -- sp[0] : receiver
655 // ----------------------------------- 654 // -----------------------------------
656 655
657 // Probe the stub cache. 656 // Probe the stub cache.
658 Code::Flags flags = Code::ComputeFlags( 657 Code::Flags flags = Code::ComputeFlags(
659 Code::STUB, MONOMORPHIC, Code::kNoExtraICState, 658 Code::STUB, MONOMORPHIC, Code::kNoExtraICState,
660 Code::NORMAL, Code::LOAD_IC); 659 Code::NORMAL, Code::LOAD_IC);
661 Isolate::Current()->stub_cache()->GenerateProbe( 660 Isolate::Current()->stub_cache()->GenerateProbe(
662 masm, flags, a0, a2, a3, t0, t1, t2); 661 masm, flags, a0, a2, a3, t0, t1, t2);
663 662
664 // Cache miss: Jump to runtime. 663 // Cache miss: Jump to runtime.
665 GenerateMiss(masm); 664 GenerateMiss(masm);
666 } 665 }
667 666
668 667
669 void LoadIC::GenerateNormal(MacroAssembler* masm) { 668 void LoadIC::GenerateNormal(MacroAssembler* masm) {
670 // ----------- S t a t e ------------- 669 // ----------- S t a t e -------------
671 // -- a2 : name 670 // -- a2 : name
672 // -- lr : return address 671 // -- lr : return address
673 // -- a0 : receiver 672 // -- a0 : receiver
674 // -- sp[0] : receiver
675 // ----------------------------------- 673 // -----------------------------------
676 Label miss; 674 Label miss;
677 675
678 GenerateNameDictionaryReceiverCheck(masm, a0, a1, a3, t0, &miss); 676 GenerateNameDictionaryReceiverCheck(masm, a0, a1, a3, t0, &miss);
679 677
680 // a1: elements 678 // a1: elements
681 GenerateDictionaryLoad(masm, &miss, a1, a2, v0, a3, t0); 679 GenerateDictionaryLoad(masm, &miss, a1, a2, v0, a3, t0);
682 __ Ret(); 680 __ Ret();
683 681
684 // Cache miss: Jump to runtime. 682 // Cache miss: Jump to runtime.
685 __ bind(&miss); 683 __ bind(&miss);
686 GenerateMiss(masm); 684 GenerateMiss(masm);
687 } 685 }
688 686
689 687
690 void LoadIC::GenerateMiss(MacroAssembler* masm) { 688 void LoadIC::GenerateMiss(MacroAssembler* masm) {
691 // ----------- S t a t e ------------- 689 // ----------- S t a t e -------------
692 // -- a2 : name 690 // -- a2 : name
693 // -- ra : return address 691 // -- ra : return address
694 // -- a0 : receiver 692 // -- a0 : receiver
695 // -- sp[0] : receiver
696 // ----------------------------------- 693 // -----------------------------------
697 Isolate* isolate = masm->isolate(); 694 Isolate* isolate = masm->isolate();
698 695
699 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 696 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
700 697
701 __ mov(a3, a0); 698 __ mov(a3, a0);
702 __ Push(a3, a2); 699 __ Push(a3, a2);
703 700
704 // Perform tail call to the entry. 701 // Perform tail call to the entry.
705 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 702 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
706 __ TailCallExternalReference(ref, 2, 1); 703 __ TailCallExternalReference(ref, 2, 1);
707 } 704 }
708 705
709 706
710 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 707 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
711 // ---------- S t a t e -------------- 708 // ---------- S t a t e --------------
712 // -- a2 : name 709 // -- a2 : name
713 // -- ra : return address 710 // -- ra : return address
714 // -- a0 : receiver 711 // -- a0 : receiver
715 // -- sp[0] : receiver
716 // ----------------------------------- 712 // -----------------------------------
717 713
718 __ mov(a3, a0); 714 __ mov(a3, a0);
719 __ Push(a3, a2); 715 __ Push(a3, a2);
720 716
721 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 717 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
722 } 718 }
723 719
724 720
725 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm, 721 static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 } else { 1703 } else {
1708 ASSERT(Assembler::IsBne(branch_instr)); 1704 ASSERT(Assembler::IsBne(branch_instr));
1709 patcher.ChangeBranchCondition(eq); 1705 patcher.ChangeBranchCondition(eq);
1710 } 1706 }
1711 } 1707 }
1712 1708
1713 1709
1714 } } // namespace v8::internal 1710 } } // namespace v8::internal
1715 1711
1716 #endif // V8_TARGET_ARCH_MIPS 1712 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698