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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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/hydrogen-instructions.h ('k') | src/crankshaft/mips/lithium-codegen-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 // 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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2796 .code(); 2796 .code();
2797 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2797 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2798 } 2798 }
2799 2799
2800 2800
2801 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 2801 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
2802 Register result = ToRegister(instr->result()); 2802 Register result = ToRegister(instr->result());
2803 2803
2804 if (instr->hydrogen()->from_inlined()) { 2804 if (instr->hydrogen()->from_inlined()) {
2805 __ lea(result, Operand(esp, -2 * kPointerSize)); 2805 __ lea(result, Operand(esp, -2 * kPointerSize));
2806 } else { 2806 } else if (instr->hydrogen()->arguments_adaptor()) {
2807 // Check for arguments adapter frame. 2807 // Check for arguments adapter frame.
2808 Label done, adapted; 2808 Label done, adapted;
2809 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); 2809 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
2810 __ mov(result, 2810 __ mov(result,
2811 Operand(result, CommonFrameConstants::kContextOrFrameTypeOffset)); 2811 Operand(result, CommonFrameConstants::kContextOrFrameTypeOffset));
2812 __ cmp(Operand(result), 2812 __ cmp(Operand(result),
2813 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 2813 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2814 __ j(equal, &adapted, Label::kNear); 2814 __ j(equal, &adapted, Label::kNear);
2815 2815
2816 // No arguments adaptor frame. 2816 // No arguments adaptor frame.
2817 __ mov(result, Operand(ebp)); 2817 __ mov(result, Operand(ebp));
2818 __ jmp(&done, Label::kNear); 2818 __ jmp(&done, Label::kNear);
2819 2819
2820 // Arguments adaptor frame present. 2820 // Arguments adaptor frame present.
2821 __ bind(&adapted); 2821 __ bind(&adapted);
2822 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); 2822 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
2823 2823
2824 // Result is the frame pointer for the frame if not adapted and for the real 2824 // Result is the frame pointer for the frame if not adapted and for the real
2825 // frame below the adaptor frame if adapted. 2825 // frame below the adaptor frame if adapted.
2826 __ bind(&done); 2826 __ bind(&done);
2827 } else {
2828 __ mov(result, Operand(ebp));
2827 } 2829 }
2828 } 2830 }
2829 2831
2830 2832
2831 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { 2833 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) {
2832 Operand elem = ToOperand(instr->elements()); 2834 Operand elem = ToOperand(instr->elements());
2833 Register result = ToRegister(instr->result()); 2835 Register result = ToRegister(instr->result());
2834 2836
2835 Label done; 2837 Label done;
2836 2838
(...skipping 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after
5264 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); 5266 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context);
5265 } 5267 }
5266 5268
5267 5269
5268 #undef __ 5270 #undef __
5269 5271
5270 } // namespace internal 5272 } // namespace internal
5271 } // namespace v8 5273 } // namespace v8
5272 5274
5273 #endif // V8_TARGET_ARCH_IA32 5275 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698