OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |