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

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

Issue 2435283002: [stubs] Add IsCallableMap predicate to CSA (Closed)
Patch Set: Remove unused variable 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/builtins/builtins-conversion.cc ('k') | src/builtins/builtins-regexp.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 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 436
437 assembler->Bind(&return_jsproxy); 437 assembler->Bind(&return_jsproxy);
438 { 438 {
439 assembler->GotoIf(assembler->WordEqual(var_proxy_is_array.value(), 439 assembler->GotoIf(assembler->WordEqual(var_proxy_is_array.value(),
440 assembler->BooleanConstant(true)), 440 assembler->BooleanConstant(true)),
441 &return_array); 441 &return_array);
442 442
443 Node* map = assembler->LoadMap(receiver); 443 Node* map = assembler->LoadMap(receiver);
444 444
445 // Return object if the proxy {receiver} is not callable. 445 // Return object if the proxy {receiver} is not callable.
446 assembler->Branch( 446 assembler->Branch(assembler->IsCallableMap(map), &return_function,
447 assembler->Word32Equal( 447 &return_object);
448 assembler->Word32And(
449 assembler->LoadMapBitField(map),
450 assembler->Int32Constant(1 << Map::kIsCallable)),
451 assembler->Int32Constant(0)),
452 &return_object, &return_function);
453 } 448 }
454 449
455 // Default 450 // Default
456 assembler->Bind(&return_object); 451 assembler->Bind(&return_object);
457 assembler->Return(assembler->HeapConstant( 452 assembler->Return(assembler->HeapConstant(
458 assembler->isolate()->factory()->object_to_string())); 453 assembler->isolate()->factory()->object_to_string()));
459 } 454 }
460 } 455 }
461 456
462 void Builtins::Generate_ObjectCreate(CodeStubAssembler* a) { 457 void Builtins::Generate_ObjectCreate(CodeStubAssembler* a) {
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 typedef CompareDescriptor Descriptor; 1041 typedef CompareDescriptor Descriptor;
1047 Node* object = assembler->Parameter(Descriptor::kLeft); 1042 Node* object = assembler->Parameter(Descriptor::kLeft);
1048 Node* callable = assembler->Parameter(Descriptor::kRight); 1043 Node* callable = assembler->Parameter(Descriptor::kRight);
1049 Node* context = assembler->Parameter(Descriptor::kContext); 1044 Node* context = assembler->Parameter(Descriptor::kContext);
1050 1045
1051 assembler->Return(assembler->InstanceOf(object, callable, context)); 1046 assembler->Return(assembler->InstanceOf(object, callable, context));
1052 } 1047 }
1053 1048
1054 } // namespace internal 1049 } // namespace internal
1055 } // namespace v8 1050 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-conversion.cc ('k') | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698