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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1378533002: [es6] Introduce %ToInteger and %ToLength. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/execution.cc ('k') | src/full-codegen/arm64/full-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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
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/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 3748 matching lines...) Expand 10 before | Expand all | Expand 10 after
3759 // overwritten by the write barrier code and is needed afterward. 3759 // overwritten by the write barrier code and is needed afterward.
3760 __ mov(r2, r0); 3760 __ mov(r2, r0);
3761 __ RecordWriteField( 3761 __ RecordWriteField(
3762 r1, JSValue::kValueOffset, r2, r3, kLRHasBeenSaved, kDontSaveFPRegs); 3762 r1, JSValue::kValueOffset, r2, r3, kLRHasBeenSaved, kDontSaveFPRegs);
3763 3763
3764 __ bind(&done); 3764 __ bind(&done);
3765 context()->Plug(r0); 3765 context()->Plug(r0);
3766 } 3766 }
3767 3767
3768 3768
3769 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
3770 ZoneList<Expression*>* args = expr->arguments();
3771 DCHECK_EQ(1, args->length());
3772
3773 // Load the argument into r0 and convert it.
3774 VisitForAccumulatorValue(args->at(0));
3775
3776 // Convert the object to an integer.
3777 Label done_convert;
3778 __ JumpIfSmi(r0, &done_convert);
3779 __ Push(r0);
3780 __ CallRuntime(Runtime::kToInteger, 1);
3781 __ bind(&done_convert);
3782 context()->Plug(r0);
3783 }
3784
3785
3769 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { 3786 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) {
3770 ZoneList<Expression*>* args = expr->arguments(); 3787 ZoneList<Expression*>* args = expr->arguments();
3771 DCHECK_EQ(args->length(), 1); 3788 DCHECK_EQ(args->length(), 1);
3772 // Load the argument into r0 and call the stub. 3789 // Load the argument into r0 and call the stub.
3773 VisitForAccumulatorValue(args->at(0)); 3790 VisitForAccumulatorValue(args->at(0));
3774 3791
3775 NumberToStringStub stub(isolate()); 3792 NumberToStringStub stub(isolate());
3776 __ CallStub(&stub); 3793 __ CallStub(&stub);
3777 context()->Plug(r0); 3794 context()->Plug(r0);
3778 } 3795 }
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
5253 DCHECK(interrupt_address == 5270 DCHECK(interrupt_address ==
5254 isolate->builtins()->OsrAfterStackCheck()->entry()); 5271 isolate->builtins()->OsrAfterStackCheck()->entry());
5255 return OSR_AFTER_STACK_CHECK; 5272 return OSR_AFTER_STACK_CHECK;
5256 } 5273 }
5257 5274
5258 5275
5259 } // namespace internal 5276 } // namespace internal
5260 } // namespace v8 5277 } // namespace v8
5261 5278
5262 #endif // V8_TARGET_ARCH_ARM 5279 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698