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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 3762 matching lines...) Expand 10 before | Expand all | Expand 10 after
3773 // overwritten by the write barrier code and is needed afterward. 3773 // overwritten by the write barrier code and is needed afterward.
3774 __ mr(r5, r3); 3774 __ mr(r5, r3);
3775 __ RecordWriteField(r4, JSValue::kValueOffset, r5, r6, kLRHasBeenSaved, 3775 __ RecordWriteField(r4, JSValue::kValueOffset, r5, r6, kLRHasBeenSaved,
3776 kDontSaveFPRegs); 3776 kDontSaveFPRegs);
3777 3777
3778 __ bind(&done); 3778 __ bind(&done);
3779 context()->Plug(r3); 3779 context()->Plug(r3);
3780 } 3780 }
3781 3781
3782 3782
3783 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) {
3784 ZoneList<Expression*>* args = expr->arguments();
3785 DCHECK_EQ(1, args->length());
3786
3787 // Load the argument into r3 and convert it.
3788 VisitForAccumulatorValue(args->at(0));
3789
3790 // Convert the object to an integer.
3791 Label done_convert;
3792 __ JumpIfSmi(r3, &done_convert);
3793 __ Push(r3);
3794 __ CallRuntime(Runtime::kToInteger, 1);
3795 __ bind(&done_convert);
3796 context()->Plug(r3);
3797 }
3798
3799
3783 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { 3800 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) {
3784 ZoneList<Expression*>* args = expr->arguments(); 3801 ZoneList<Expression*>* args = expr->arguments();
3785 DCHECK_EQ(args->length(), 1); 3802 DCHECK_EQ(args->length(), 1);
3786 // Load the argument into r3 and call the stub. 3803 // Load the argument into r3 and call the stub.
3787 VisitForAccumulatorValue(args->at(0)); 3804 VisitForAccumulatorValue(args->at(0));
3788 3805
3789 NumberToStringStub stub(isolate()); 3806 NumberToStringStub stub(isolate());
3790 __ CallStub(&stub); 3807 __ CallStub(&stub);
3791 context()->Plug(r3); 3808 context()->Plug(r3);
3792 } 3809 }
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
5206 return ON_STACK_REPLACEMENT; 5223 return ON_STACK_REPLACEMENT;
5207 } 5224 }
5208 5225
5209 DCHECK(interrupt_address == 5226 DCHECK(interrupt_address ==
5210 isolate->builtins()->OsrAfterStackCheck()->entry()); 5227 isolate->builtins()->OsrAfterStackCheck()->entry());
5211 return OSR_AFTER_STACK_CHECK; 5228 return OSR_AFTER_STACK_CHECK;
5212 } 5229 }
5213 } // namespace internal 5230 } // namespace internal
5214 } // namespace v8 5231 } // namespace v8
5215 #endif // V8_TARGET_ARCH_PPC 5232 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698