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

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

Issue 157543002: A64: Synchronize with r18581. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/a64/full-codegen-a64.cc ('k') | src/a64/lithium-a64.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 if (id == IC::kCallIC_Miss) { 578 if (id == IC::kCallIC_Miss) {
579 Label invoke, global; 579 Label invoke, global;
580 __ Peek(x2, argc * kPointerSize); // receiver 580 __ Peek(x2, argc * kPointerSize); // receiver
581 __ JumpIfSmi(x2, &invoke); 581 __ JumpIfSmi(x2, &invoke);
582 __ JumpIfObjectType(x2, x3, x3, JS_GLOBAL_OBJECT_TYPE, &global); 582 __ JumpIfObjectType(x2, x3, x3, JS_GLOBAL_OBJECT_TYPE, &global);
583 __ Cmp(x3, JS_BUILTINS_OBJECT_TYPE); 583 __ Cmp(x3, JS_BUILTINS_OBJECT_TYPE);
584 __ B(ne, &invoke); 584 __ B(ne, &invoke);
585 585
586 // Patch the receiver on the stack. 586 // Patch the receiver on the stack.
587 __ Bind(&global); 587 __ Bind(&global);
588 __ Ldr(x2, FieldMemOperand(x2, GlobalObject::kGlobalReceiverOffset)); 588 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex);
589 __ Poke(x2, argc * kXRegSizeInBytes); 589 __ Poke(x2, argc * kXRegSizeInBytes);
590 __ Bind(&invoke); 590 __ Bind(&invoke);
591 } 591 }
592 592
593 // Invoke the function. 593 // Invoke the function.
594 CallKind call_kind = CallICBase::Contextual::decode(extra_state) 594 CallKind call_kind = CallICBase::Contextual::decode(extra_state)
595 ? CALL_AS_FUNCTION 595 ? CALL_AS_FUNCTION
596 : CALL_AS_METHOD; 596 : CALL_AS_METHOD;
597 ParameterCount actual(argc); 597 ParameterCount actual(argc);
598 __ InvokeFunction(x1, 598 __ InvokeFunction(x1,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 Label miss; 780 Label miss;
781 __ JumpIfSmi(name, &miss); 781 __ JumpIfSmi(name, &miss);
782 __ IsObjectNameType(name, x0, &miss); 782 __ IsObjectNameType(name, x0, &miss);
783 CallICBase::GenerateNormal(masm, argc); 783 CallICBase::GenerateNormal(masm, argc);
784 784
785 __ Bind(&miss); 785 __ Bind(&miss);
786 GenerateMiss(masm, argc); 786 GenerateMiss(masm, argc);
787 } 787 }
788 788
789 789
790 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 790 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, ContextualMode mode) {
791 // ----------- S t a t e ------------- 791 // ----------- S t a t e -------------
792 // -- x2 : name 792 // -- x2 : name
793 // -- lr : return address 793 // -- lr : return address
794 // -- x0 : receiver 794 // -- x0 : receiver
795 // ----------------------------------- 795 // -----------------------------------
796 796
797 // Probe the stub cache. 797 // Probe the stub cache.
798 ExtraICState extra_ic_state = IC::ComputeExtraICState(mode);
798 Code::Flags flags = Code::ComputeFlags( 799 Code::Flags flags = Code::ComputeFlags(
799 Code::HANDLER, MONOMORPHIC, kNoExtraICState, 800 Code::HANDLER, MONOMORPHIC, extra_ic_state,
800 Code::NORMAL, Code::LOAD_IC); 801 Code::NORMAL, Code::LOAD_IC);
801 masm->isolate()->stub_cache()->GenerateProbe( 802 masm->isolate()->stub_cache()->GenerateProbe(
802 masm, flags, x0, x2, x3, x4, x5, x6); 803 masm, flags, x0, x2, x3, x4, x5, x6);
803 804
804 // Cache miss: Jump to runtime. 805 // Cache miss: Jump to runtime.
805 GenerateMiss(masm); 806 GenerateMiss(masm);
806 } 807 }
807 808
808 809
809 void LoadIC::GenerateNormal(MacroAssembler* masm) { 810 void LoadIC::GenerateNormal(MacroAssembler* masm) {
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); 1817 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ);
1817 // This is JumpIfSmi(smi_reg, branch_imm). 1818 // This is JumpIfSmi(smi_reg, branch_imm).
1818 patcher.tbz(smi_reg, 0, branch_imm); 1819 patcher.tbz(smi_reg, 0, branch_imm);
1819 } 1820 }
1820 } 1821 }
1821 1822
1822 1823
1823 } } // namespace v8::internal 1824 } } // namespace v8::internal
1824 1825
1825 #endif // V8_TARGET_ARCH_A64 1826 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/full-codegen-a64.cc ('k') | src/a64/lithium-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698