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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 2934893002: [builtins] Properly optimize Object.prototype.isPrototypeOf. (Closed)
Patch Set: Address feedback. Created 3 years, 6 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/compiler/js-call-reducer.cc ('k') | src/compiler/js-native-context-specialization.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/js-generic-lowering.h" 5 #include "src/compiler/js-generic-lowering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/builtins/builtins-constructor.h" 8 #include "src/builtins/builtins-constructor.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 ReplaceWithStubCall(node, callable, flags); 331 ReplaceWithStubCall(node, callable, flags);
332 } 332 }
333 333
334 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { 334 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) {
335 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 335 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
336 Callable callable = 336 Callable callable =
337 Builtins::CallableFor(isolate(), Builtins::kGetSuperConstructor); 337 Builtins::CallableFor(isolate(), Builtins::kGetSuperConstructor);
338 ReplaceWithStubCall(node, callable, flags); 338 ReplaceWithStubCall(node, callable, flags);
339 } 339 }
340 340
341 void JSGenericLowering::LowerJSHasInPrototypeChain(Node* node) {
342 ReplaceWithRuntimeCall(node, Runtime::kHasInPrototypeChain);
343 }
344
341 void JSGenericLowering::LowerJSInstanceOf(Node* node) { 345 void JSGenericLowering::LowerJSInstanceOf(Node* node) {
342 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 346 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
343 Callable callable = Builtins::CallableFor(isolate(), Builtins::kInstanceOf); 347 Callable callable = Builtins::CallableFor(isolate(), Builtins::kInstanceOf);
344 ReplaceWithStubCall(node, callable, flags); 348 ReplaceWithStubCall(node, callable, flags);
345 } 349 }
346 350
347 void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) { 351 void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) {
348 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 352 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
349 Callable callable = 353 Callable callable =
350 Builtins::CallableFor(isolate(), Builtins::kOrdinaryHasInstance); 354 Builtins::CallableFor(isolate(), Builtins::kOrdinaryHasInstance);
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 779 }
776 780
777 781
778 MachineOperatorBuilder* JSGenericLowering::machine() const { 782 MachineOperatorBuilder* JSGenericLowering::machine() const {
779 return jsgraph()->machine(); 783 return jsgraph()->machine();
780 } 784 }
781 785
782 } // namespace compiler 786 } // namespace compiler
783 } // namespace internal 787 } // namespace internal
784 } // namespace v8 788 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-call-reducer.cc ('k') | src/compiler/js-native-context-specialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698