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

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.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/code-stubs-hydrogen.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 3034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3045 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); 3045 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
3046 } 3046 }
3047 3047
3048 3048
3049 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3049 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3050 Register scratch = scratch0(); 3050 Register scratch = scratch0();
3051 Register result = ToRegister(instr->result()); 3051 Register result = ToRegister(instr->result());
3052 3052
3053 if (instr->hydrogen()->from_inlined()) { 3053 if (instr->hydrogen()->from_inlined()) {
3054 __ sub(result, sp, Operand(2 * kPointerSize)); 3054 __ sub(result, sp, Operand(2 * kPointerSize));
3055 } else { 3055 } else if (instr->hydrogen()->arguments_adaptor()) {
3056 // Check if the calling frame is an arguments adaptor frame. 3056 // Check if the calling frame is an arguments adaptor frame.
3057 Label done, adapted; 3057 Label done, adapted;
3058 __ ldr(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3058 __ ldr(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3059 __ ldr(result, MemOperand(scratch, 3059 __ ldr(result, MemOperand(scratch,
3060 CommonFrameConstants::kContextOrFrameTypeOffset)); 3060 CommonFrameConstants::kContextOrFrameTypeOffset));
3061 __ cmp(result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 3061 __ cmp(result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3062 3062
3063 // Result is the frame pointer for the frame if not adapted and for the real 3063 // Result is the frame pointer for the frame if not adapted and for the real
3064 // frame below the adaptor frame if adapted. 3064 // frame below the adaptor frame if adapted.
3065 __ mov(result, fp, LeaveCC, ne); 3065 __ mov(result, fp, LeaveCC, ne);
3066 __ mov(result, scratch, LeaveCC, eq); 3066 __ mov(result, scratch, LeaveCC, eq);
3067 } else {
3068 __ mov(result, fp);
3067 } 3069 }
3068 } 3070 }
3069 3071
3070 3072
3071 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { 3073 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) {
3072 Register elem = ToRegister(instr->elements()); 3074 Register elem = ToRegister(instr->elements());
3073 Register result = ToRegister(instr->result()); 3075 Register result = ToRegister(instr->result());
3074 3076
3075 Label done; 3077 Label done;
3076 3078
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after
5543 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5545 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5544 Register context = ToRegister(instr->context()); 5546 Register context = ToRegister(instr->context());
5545 __ str(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5547 __ str(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5546 } 5548 }
5547 5549
5548 5550
5549 #undef __ 5551 #undef __
5550 5552
5551 } // namespace internal 5553 } // namespace internal
5552 } // namespace v8 5554 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698