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

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

Issue 2496043003: [builtins] Fix pointer comparison in ToString builtin. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/property-descriptor.h" 9 #include "src/property-descriptor.h"
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 Label if_isproxy(assembler, Label::kDeferred); 290 Label if_isproxy(assembler, Label::kDeferred);
291 291
292 Label checkstringtag(assembler); 292 Label checkstringtag(assembler);
293 Label if_tostringtag(assembler), if_notostringtag(assembler); 293 Label if_tostringtag(assembler), if_notostringtag(assembler);
294 294
295 Node* receiver = assembler->Parameter(0); 295 Node* receiver = assembler->Parameter(0);
296 Node* context = assembler->Parameter(3); 296 Node* context = assembler->Parameter(3);
297 297
298 assembler->GotoIf( 298 assembler->GotoIf(
299 assembler->Word32Equal(receiver, assembler->UndefinedConstant()), 299 assembler->WordEqual(receiver, assembler->UndefinedConstant()),
300 &return_undefined); 300 &return_undefined);
301 301
302 assembler->GotoIf(assembler->Word32Equal(receiver, assembler->NullConstant()), 302 assembler->GotoIf(assembler->WordEqual(receiver, assembler->NullConstant()),
303 &return_null); 303 &return_null);
304 304
305 assembler->GotoIf(assembler->TaggedIsSmi(receiver), &return_number); 305 assembler->GotoIf(assembler->TaggedIsSmi(receiver), &return_number);
306 306
307 Node* receiver_instance_type = assembler->LoadInstanceType(receiver); 307 Node* receiver_instance_type = assembler->LoadInstanceType(receiver);
308 ReturnIfPrimitive(assembler, receiver_instance_type, &return_string, 308 ReturnIfPrimitive(assembler, receiver_instance_type, &return_string,
309 &return_boolean, &return_number); 309 &return_boolean, &return_number);
310 310
311 // for proxies, check IsArray before getting @@toStringTag 311 // for proxies, check IsArray before getting @@toStringTag
312 Variable var_proxy_is_array(assembler, MachineRepresentation::kTagged); 312 Variable var_proxy_is_array(assembler, MachineRepresentation::kTagged);
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 typedef CompareDescriptor Descriptor; 1046 typedef CompareDescriptor Descriptor;
1047 Node* object = assembler->Parameter(Descriptor::kLeft); 1047 Node* object = assembler->Parameter(Descriptor::kLeft);
1048 Node* callable = assembler->Parameter(Descriptor::kRight); 1048 Node* callable = assembler->Parameter(Descriptor::kRight);
1049 Node* context = assembler->Parameter(Descriptor::kContext); 1049 Node* context = assembler->Parameter(Descriptor::kContext);
1050 1050
1051 assembler->Return(assembler->InstanceOf(object, callable, context)); 1051 assembler->Return(assembler->InstanceOf(object, callable, context));
1052 } 1052 }
1053 1053
1054 } // namespace internal 1054 } // namespace internal
1055 } // namespace v8 1055 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-664506.js » ('j') | test/mjsunit/regress/regress-crbug-664506.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698