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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 1816553002: Introduce a code stub version of Array.prototype.push (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 4 years, 9 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
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3158 } 3158 }
3159 3159
3160 3160
3161 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3161 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3162 Register scratch = scratch0(); 3162 Register scratch = scratch0();
3163 Register temp = scratch1(); 3163 Register temp = scratch1();
3164 Register result = ToRegister(instr->result()); 3164 Register result = ToRegister(instr->result());
3165 3165
3166 if (instr->hydrogen()->from_inlined()) { 3166 if (instr->hydrogen()->from_inlined()) {
3167 __ Dsubu(result, sp, 2 * kPointerSize); 3167 __ Dsubu(result, sp, 2 * kPointerSize);
3168 } else { 3168 } else if (instr->hydrogen()->arguments_adaptor()) {
3169 // Check if the calling frame is an arguments adaptor frame. 3169 // Check if the calling frame is an arguments adaptor frame.
3170 Label done, adapted; 3170 Label done, adapted;
3171 __ ld(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3171 __ ld(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3172 __ ld(result, 3172 __ ld(result,
3173 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); 3173 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset));
3174 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 3174 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3175 3175
3176 // Result is the frame pointer for the frame if not adapted and for the real 3176 // Result is the frame pointer for the frame if not adapted and for the real
3177 // frame below the adaptor frame if adapted. 3177 // frame below the adaptor frame if adapted.
3178 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne). 3178 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne).
3179 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq). 3179 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq).
3180 } else {
3181 __ mov(result, fp);
3180 } 3182 }
3181 } 3183 }
3182 3184
3183 3185
3184 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { 3186 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) {
3185 Register elem = ToRegister(instr->elements()); 3187 Register elem = ToRegister(instr->elements());
3186 Register result = ToRegister(instr->result()); 3188 Register result = ToRegister(instr->result());
3187 3189
3188 Label done; 3190 Label done;
3189 3191
(...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after
5762 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5764 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5763 Register context = ToRegister(instr->context()); 5765 Register context = ToRegister(instr->context());
5764 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5766 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5765 } 5767 }
5766 5768
5767 5769
5768 #undef __ 5770 #undef __
5769 5771
5770 } // namespace internal 5772 } // namespace internal
5771 } // namespace v8 5773 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698