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

Side by Side Diff: src/builtins/arm/builtins-arm.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/arm64/code-stubs-arm64.cc ('k') | src/builtins/arm64/builtins-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/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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 __ bind(&no_arguments); 380 __ bind(&no_arguments);
381 { 381 {
382 __ LoadRoot(r0, Heap::kempty_stringRootIndex); 382 __ LoadRoot(r0, Heap::kempty_stringRootIndex);
383 __ Ret(1); 383 __ Ret(1);
384 } 384 }
385 385
386 // 3a. Convert r0 to a string. 386 // 3a. Convert r0 to a string.
387 __ bind(&to_string); 387 __ bind(&to_string);
388 { 388 {
389 FrameScope scope(masm, StackFrame::MANUAL); 389 FrameScope scope(masm, StackFrame::MANUAL);
390 ToStringStub stub(masm->isolate());
391 __ SmiTag(r2); 390 __ SmiTag(r2);
392 __ EnterBuiltinFrame(cp, r1, r2); 391 __ EnterBuiltinFrame(cp, r1, r2);
393 __ CallStub(&stub); 392 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
394 __ LeaveBuiltinFrame(cp, r1, r2); 393 __ LeaveBuiltinFrame(cp, r1, r2);
395 __ SmiUntag(r2); 394 __ SmiUntag(r2);
396 } 395 }
397 __ b(&drop_frame_and_ret); 396 __ b(&drop_frame_and_ret);
398 397
399 // 3b. Convert symbol in r0 to a string. 398 // 3b. Convert symbol in r0 to a string.
400 __ bind(&symbol_descriptive_string); 399 __ bind(&symbol_descriptive_string);
401 { 400 {
402 __ Drop(r2); 401 __ Drop(r2);
403 __ Drop(1); 402 __ Drop(1);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 441
443 // 3. Make sure r2 is a string. 442 // 3. Make sure r2 is a string.
444 { 443 {
445 Label convert, done_convert; 444 Label convert, done_convert;
446 __ JumpIfSmi(r2, &convert); 445 __ JumpIfSmi(r2, &convert);
447 __ CompareObjectType(r2, r4, r4, FIRST_NONSTRING_TYPE); 446 __ CompareObjectType(r2, r4, r4, FIRST_NONSTRING_TYPE);
448 __ b(lo, &done_convert); 447 __ b(lo, &done_convert);
449 __ bind(&convert); 448 __ bind(&convert);
450 { 449 {
451 FrameScope scope(masm, StackFrame::MANUAL); 450 FrameScope scope(masm, StackFrame::MANUAL);
452 ToStringStub stub(masm->isolate());
453 __ SmiTag(r6); 451 __ SmiTag(r6);
454 __ EnterBuiltinFrame(cp, r1, r6); 452 __ EnterBuiltinFrame(cp, r1, r6);
455 __ Push(r3); 453 __ Push(r3);
456 __ Move(r0, r2); 454 __ Move(r0, r2);
457 __ CallStub(&stub); 455 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET);
458 __ Move(r2, r0); 456 __ Move(r2, r0);
459 __ Pop(r3); 457 __ Pop(r3);
460 __ LeaveBuiltinFrame(cp, r1, r6); 458 __ LeaveBuiltinFrame(cp, r1, r6);
461 __ SmiUntag(r6); 459 __ SmiUntag(r6);
462 } 460 }
463 __ bind(&done_convert); 461 __ bind(&done_convert);
464 } 462 }
465 463
466 // 4. Check if new target and constructor differ. 464 // 4. Check if new target and constructor differ.
467 Label drop_frame_and_ret, new_object; 465 Label drop_frame_and_ret, new_object;
(...skipping 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2925 __ bkpt(0); 2923 __ bkpt(0);
2926 } 2924 }
2927 } 2925 }
2928 2926
2929 #undef __ 2927 #undef __
2930 2928
2931 } // namespace internal 2929 } // namespace internal
2932 } // namespace v8 2930 } // namespace v8
2933 2931
2934 #endif // V8_TARGET_ARCH_ARM 2932 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698