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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 1355253002: [x64] Compare map instead of value to heap number map in ToStringStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, &not_string, Label::kNear); 3130 __ j(above_equal, &not_string, Label::kNear);
3131 __ Ret(); 3131 __ Ret();
3132 __ bind(&not_string); 3132 __ bind(&not_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, &not_heap_number, Label::kNear); 3136 __ j(not_equal, &not_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(&not_heap_number); 3140 __ bind(&not_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, &not_oddball, Label::kNear); 3144 __ j(not_equal, &not_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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698