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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3125 | 3125 |
3126 Label not_string; | 3126 Label not_string; |
3127 __ CmpObjectType(rax, FIRST_NONSTRING_TYPE, rdi); | 3127 __ CmpObjectType(rax, FIRST_NONSTRING_TYPE, rdi); |
3128 // rax: receiver | 3128 // rax: receiver |
3129 // rdi: receiver map | 3129 // rdi: receiver map |
3130 __ j(above_equal, ¬_string, Label::kNear); | 3130 __ j(above_equal, ¬_string, Label::kNear); |
3131 __ Ret(); | 3131 __ Ret(); |
3132 __ bind(¬_string); | 3132 __ bind(¬_string); |
3133 | 3133 |
3134 Label not_heap_number; | 3134 Label not_heap_number; |
3135 __ CompareRoot(rax, Heap::kHeapNumberMapRootIndex); | 3135 __ CompareRoot(rdi, Heap::kHeapNumberMapRootIndex); |
3136 __ j(not_equal, ¬_heap_number, Label::kNear); | 3136 __ j(not_equal, ¬_heap_number, Label::kNear); |
3137 __ bind(&is_number); | 3137 __ bind(&is_number); |
3138 NumberToStringStub stub(isolate()); | 3138 NumberToStringStub stub(isolate()); |
3139 __ TailCallStub(&stub); | 3139 __ TailCallStub(&stub); |
3140 __ bind(¬_heap_number); | 3140 __ bind(¬_heap_number); |
3141 | 3141 |
3142 Label not_oddball; | 3142 Label not_oddball; |
3143 __ CmpInstanceType(rdi, ODDBALL_TYPE); | 3143 __ CmpInstanceType(rdi, ODDBALL_TYPE); |
3144 __ j(not_equal, ¬_oddball, Label::kNear); | 3144 __ j(not_equal, ¬_oddball, Label::kNear); |
3145 __ movp(rax, FieldOperand(rax, Oddball::kToStringOffset)); | 3145 __ movp(rax, FieldOperand(rax, Oddball::kToStringOffset)); |
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5541 kStackSpace, nullptr, return_value_operand, NULL); | 5541 kStackSpace, nullptr, return_value_operand, NULL); |
5542 } | 5542 } |
5543 | 5543 |
5544 | 5544 |
5545 #undef __ | 5545 #undef __ |
5546 | 5546 |
5547 } // namespace internal | 5547 } // namespace internal |
5548 } // namespace v8 | 5548 } // namespace v8 |
5549 | 5549 |
5550 #endif // V8_TARGET_ARCH_X64 | 5550 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |