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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 3519 matching lines...) Expand 10 before | Expand all | Expand 10 after
3530 // Convert the object to an integer. 3530 // Convert the object to an integer.
3531 Label done_convert; 3531 Label done_convert;
3532 __ JumpIfSmi(v0, &done_convert); 3532 __ JumpIfSmi(v0, &done_convert);
3533 __ Push(v0); 3533 __ Push(v0);
3534 __ CallRuntime(Runtime::kToInteger); 3534 __ CallRuntime(Runtime::kToInteger);
3535 __ bind(&done_convert); 3535 __ bind(&done_convert);
3536 context()->Plug(v0); 3536 context()->Plug(v0);
3537 } 3537 }
3538 3538
3539 3539
3540 void FullCodeGenerator::EmitToName(CallRuntime* expr) {
3541 ZoneList<Expression*>* args = expr->arguments();
3542 DCHECK_EQ(1, args->length());
3543
3544 // Load the argument into v0 and convert it.
3545 VisitForAccumulatorValue(args->at(0));
3546
3547 Label convert, done_convert;
3548 __ JumpIfSmi(v0, &convert);
3549 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
3550 __ GetObjectType(v0, a1, a1);
3551 __ Branch(&done_convert, le, a1, Operand(LAST_NAME_TYPE));
3552 __ bind(&convert);
3553 __ Push(v0);
3554 __ CallRuntime(Runtime::kToName);
3555 __ bind(&done_convert);
3556 context()->Plug(v0);
3557 }
3558
3559
3560 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { 3540 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
3561 ZoneList<Expression*>* args = expr->arguments(); 3541 ZoneList<Expression*>* args = expr->arguments();
3562 DCHECK(args->length() == 1); 3542 DCHECK(args->length() == 1);
3563 3543
3564 VisitForAccumulatorValue(args->at(0)); 3544 VisitForAccumulatorValue(args->at(0));
3565 3545
3566 Label done; 3546 Label done;
3567 StringCharFromCodeGenerator generator(v0, a1); 3547 StringCharFromCodeGenerator generator(v0, a1);
3568 generator.GenerateFast(masm_); 3548 generator.GenerateFast(masm_);
3569 __ jmp(&done); 3549 __ jmp(&done);
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4821 reinterpret_cast<uint32_t>( 4801 reinterpret_cast<uint32_t>(
4822 isolate->builtins()->OsrAfterStackCheck()->entry())); 4802 isolate->builtins()->OsrAfterStackCheck()->entry()));
4823 return OSR_AFTER_STACK_CHECK; 4803 return OSR_AFTER_STACK_CHECK;
4824 } 4804 }
4825 4805
4826 4806
4827 } // namespace internal 4807 } // namespace internal
4828 } // namespace v8 4808 } // namespace v8
4829 4809
4830 #endif // V8_TARGET_ARCH_MIPS 4810 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698