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

Side by Side Diff: src/builtins/mips/builtins-mips.cc

Issue 2380973002: [stubs] replaced ToString MacroAssembler Stub with CodeStubAssembler builtin (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/v8/v8 into ToStringTFStub Created 4 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/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 __ bind(&no_arguments); 388 __ bind(&no_arguments);
389 { 389 {
390 __ LoadRoot(v0, Heap::kempty_stringRootIndex); 390 __ LoadRoot(v0, Heap::kempty_stringRootIndex);
391 __ DropAndRet(1); 391 __ DropAndRet(1);
392 } 392 }
393 393
394 // 3a. Convert a0 to a string. 394 // 3a. Convert a0 to a string.
395 __ bind(&to_string); 395 __ bind(&to_string);
396 { 396 {
397 FrameScope scope(masm, StackFrame::MANUAL); 397 FrameScope scope(masm, StackFrame::MANUAL);
398 ToStringStub stub(masm->isolate());
399 __ SmiTag(t0); 398 __ SmiTag(t0);
400 __ EnterBuiltinFrame(cp, a1, t0); 399 __ EnterBuiltinFrame(cp, a1, t0);
401 __ CallStub(&stub); 400 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
402 __ LeaveBuiltinFrame(cp, a1, t0); 401 __ LeaveBuiltinFrame(cp, a1, t0);
403 __ SmiUntag(t0); 402 __ SmiUntag(t0);
404 } 403 }
405 __ jmp(&drop_frame_and_ret); 404 __ jmp(&drop_frame_and_ret);
406 405
407 // 3b. Convert symbol in a0 to a string. 406 // 3b. Convert symbol in a0 to a string.
408 __ bind(&symbol_descriptive_string); 407 __ bind(&symbol_descriptive_string);
409 { 408 {
410 __ Lsa(sp, sp, t0, kPointerSizeLog2); 409 __ Lsa(sp, sp, t0, kPointerSizeLog2);
411 __ Drop(1); 410 __ Drop(1);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // 3. Make sure a0 is a string. 451 // 3. Make sure a0 is a string.
453 { 452 {
454 Label convert, done_convert; 453 Label convert, done_convert;
455 __ JumpIfSmi(a0, &convert); 454 __ JumpIfSmi(a0, &convert);
456 __ GetObjectType(a0, a2, a2); 455 __ GetObjectType(a0, a2, a2);
457 __ And(t1, a2, Operand(kIsNotStringMask)); 456 __ And(t1, a2, Operand(kIsNotStringMask));
458 __ Branch(&done_convert, eq, t1, Operand(zero_reg)); 457 __ Branch(&done_convert, eq, t1, Operand(zero_reg));
459 __ bind(&convert); 458 __ bind(&convert);
460 { 459 {
461 FrameScope scope(masm, StackFrame::MANUAL); 460 FrameScope scope(masm, StackFrame::MANUAL);
462 ToStringStub stub(masm->isolate());
463 __ SmiTag(t0); 461 __ SmiTag(t0);
464 __ EnterBuiltinFrame(cp, a1, t0); 462 __ EnterBuiltinFrame(cp, a1, t0);
465 __ Push(a3); 463 __ Push(a3);
466 __ CallStub(&stub); 464 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
467 __ Move(a0, v0); 465 __ Move(a0, v0);
468 __ Pop(a3); 466 __ Pop(a3);
469 __ LeaveBuiltinFrame(cp, a1, t0); 467 __ LeaveBuiltinFrame(cp, a1, t0);
470 __ SmiUntag(t0); 468 __ SmiUntag(t0);
471 } 469 }
472 __ bind(&done_convert); 470 __ bind(&done_convert);
473 } 471 }
474 472
475 // 4. Check if new target and constructor differ. 473 // 4. Check if new target and constructor differ.
476 Label drop_frame_and_ret, new_object; 474 Label drop_frame_and_ret, new_object;
(...skipping 2522 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 __ break_(0xCC); 2997 __ break_(0xCC);
3000 } 2998 }
3001 } 2999 }
3002 3000
3003 #undef __ 3001 #undef __
3004 3002
3005 } // namespace internal 3003 } // namespace internal
3006 } // namespace v8 3004 } // namespace v8
3007 3005
3008 #endif // V8_TARGET_ARCH_MIPS 3006 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698