OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 { | 372 { |
373 __ LoadRoot(x0, Heap::kempty_stringRootIndex); | 373 __ LoadRoot(x0, Heap::kempty_stringRootIndex); |
374 __ Drop(1); | 374 __ Drop(1); |
375 __ Ret(); | 375 __ Ret(); |
376 } | 376 } |
377 | 377 |
378 // 3a. Convert x0 to a string. | 378 // 3a. Convert x0 to a string. |
379 __ Bind(&to_string); | 379 __ Bind(&to_string); |
380 { | 380 { |
381 FrameScope scope(masm, StackFrame::MANUAL); | 381 FrameScope scope(masm, StackFrame::MANUAL); |
382 ToStringStub stub(masm->isolate()); | |
383 __ SmiTag(x2); | 382 __ SmiTag(x2); |
384 __ EnterBuiltinFrame(cp, x1, x2); | 383 __ EnterBuiltinFrame(cp, x1, x2); |
385 __ CallStub(&stub); | 384 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
386 __ LeaveBuiltinFrame(cp, x1, x2); | 385 __ LeaveBuiltinFrame(cp, x1, x2); |
387 __ SmiUntag(x2); | 386 __ SmiUntag(x2); |
388 } | 387 } |
389 __ b(&drop_frame_and_ret); | 388 __ b(&drop_frame_and_ret); |
390 | 389 |
391 // 3b. Convert symbol in x0 to a string. | 390 // 3b. Convert symbol in x0 to a string. |
392 __ Bind(&symbol_descriptive_string); | 391 __ Bind(&symbol_descriptive_string); |
393 { | 392 { |
394 __ Drop(x2); | 393 __ Drop(x2); |
395 __ Drop(1); | 394 __ Drop(1); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 } | 434 } |
436 | 435 |
437 // 3. Make sure x2 is a string. | 436 // 3. Make sure x2 is a string. |
438 { | 437 { |
439 Label convert, done_convert; | 438 Label convert, done_convert; |
440 __ JumpIfSmi(x2, &convert); | 439 __ JumpIfSmi(x2, &convert); |
441 __ JumpIfObjectType(x2, x4, x4, FIRST_NONSTRING_TYPE, &done_convert, lo); | 440 __ JumpIfObjectType(x2, x4, x4, FIRST_NONSTRING_TYPE, &done_convert, lo); |
442 __ Bind(&convert); | 441 __ Bind(&convert); |
443 { | 442 { |
444 FrameScope scope(masm, StackFrame::MANUAL); | 443 FrameScope scope(masm, StackFrame::MANUAL); |
445 ToStringStub stub(masm->isolate()); | |
446 __ SmiTag(x6); | 444 __ SmiTag(x6); |
447 __ EnterBuiltinFrame(cp, x1, x6); | 445 __ EnterBuiltinFrame(cp, x1, x6); |
448 __ Push(x3); | 446 __ Push(x3); |
449 __ Move(x0, x2); | 447 __ Move(x0, x2); |
450 __ CallStub(&stub); | 448 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); |
451 __ Move(x2, x0); | 449 __ Move(x2, x0); |
452 __ Pop(x3); | 450 __ Pop(x3); |
453 __ LeaveBuiltinFrame(cp, x1, x6); | 451 __ LeaveBuiltinFrame(cp, x1, x6); |
454 __ SmiUntag(x6); | 452 __ SmiUntag(x6); |
455 } | 453 } |
456 __ Bind(&done_convert); | 454 __ Bind(&done_convert); |
457 } | 455 } |
458 | 456 |
459 // 4. Check if new target and constructor differ. | 457 // 4. Check if new target and constructor differ. |
460 Label drop_frame_and_ret, new_object; | 458 Label drop_frame_and_ret, new_object; |
(...skipping 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 __ Unreachable(); | 3024 __ Unreachable(); |
3027 } | 3025 } |
3028 } | 3026 } |
3029 | 3027 |
3030 #undef __ | 3028 #undef __ |
3031 | 3029 |
3032 } // namespace internal | 3030 } // namespace internal |
3033 } // namespace v8 | 3031 } // namespace v8 |
3034 | 3032 |
3035 #endif // V8_TARGET_ARCH_ARM | 3033 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |