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

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

Issue 1622493002: [stubs] Introduce ToNameStub to implement %_ToName. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix BuildNumberToString type in Crankshaft. Created 4 years, 11 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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 3527 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 // Convert the object to an integer. 3538 // Convert the object to an integer.
3539 Label done_convert; 3539 Label done_convert;
3540 __ JumpIfSmi(v0, &done_convert); 3540 __ JumpIfSmi(v0, &done_convert);
3541 __ Push(v0); 3541 __ Push(v0);
3542 __ CallRuntime(Runtime::kToInteger); 3542 __ CallRuntime(Runtime::kToInteger);
3543 __ bind(&done_convert); 3543 __ bind(&done_convert);
3544 context()->Plug(v0); 3544 context()->Plug(v0);
3545 } 3545 }
3546 3546
3547 3547
3548 void FullCodeGenerator::EmitToName(CallRuntime* expr) {
3549 ZoneList<Expression*>* args = expr->arguments();
3550 DCHECK_EQ(1, args->length());
3551
3552 // Load the argument into v0 and convert it.
3553 VisitForAccumulatorValue(args->at(0));
3554
3555 Label convert, done_convert;
3556 __ JumpIfSmi(v0, &convert);
3557 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
3558 __ GetObjectType(v0, a1, a1);
3559 __ Branch(&done_convert, le, a1, Operand(LAST_NAME_TYPE));
3560 __ bind(&convert);
3561 __ Push(v0);
3562 __ CallRuntime(Runtime::kToName);
3563 __ bind(&done_convert);
3564 context()->Plug(v0);
3565 }
3566
3567
3568 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { 3548 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
3569 ZoneList<Expression*>* args = expr->arguments(); 3549 ZoneList<Expression*>* args = expr->arguments();
3570 DCHECK(args->length() == 1); 3550 DCHECK(args->length() == 1);
3571 3551
3572 VisitForAccumulatorValue(args->at(0)); 3552 VisitForAccumulatorValue(args->at(0));
3573 3553
3574 Label done; 3554 Label done;
3575 StringCharFromCodeGenerator generator(v0, a1); 3555 StringCharFromCodeGenerator generator(v0, a1);
3576 generator.GenerateFast(masm_); 3556 generator.GenerateFast(masm_);
3577 __ jmp(&done); 3557 __ jmp(&done);
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 reinterpret_cast<uint64_t>( 4816 reinterpret_cast<uint64_t>(
4837 isolate->builtins()->OsrAfterStackCheck()->entry())); 4817 isolate->builtins()->OsrAfterStackCheck()->entry()));
4838 return OSR_AFTER_STACK_CHECK; 4818 return OSR_AFTER_STACK_CHECK;
4839 } 4819 }
4840 4820
4841 4821
4842 } // namespace internal 4822 } // namespace internal
4843 } // namespace v8 4823 } // namespace v8
4844 4824
4845 #endif // V8_TARGET_ARCH_MIPS64 4825 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.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