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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { | 303 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { |
304 FeedbackParameter const& p = FeedbackParameterOf(node->op()); | 304 FeedbackParameter const& p = FeedbackParameterOf(node->op()); |
305 node->InsertInputs(zone(), 4, 2); | 305 node->InsertInputs(zone(), 4, 2); |
306 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); | 306 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); |
307 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); | 307 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); |
308 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); | 308 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); |
309 } | 309 } |
310 | 310 |
311 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 311 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
312 LanguageMode language_mode = OpParameter<LanguageMode>(node); | 312 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
313 ReplaceWithRuntimeCall(node, is_strict(language_mode) | 313 Callable callable = |
314 ? Runtime::kDeleteProperty_Strict | 314 Builtins::CallableFor(isolate(), Builtins::kDeleteProperty); |
315 : Runtime::kDeleteProperty_Sloppy); | 315 ReplaceWithStubCall(node, callable, flags); |
316 } | 316 } |
317 | 317 |
318 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { | 318 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { |
319 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 319 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
320 Callable callable = CodeFactory::GetSuperConstructor(isolate()); | 320 Callable callable = CodeFactory::GetSuperConstructor(isolate()); |
321 ReplaceWithStubCall(node, callable, flags); | 321 ReplaceWithStubCall(node, callable, flags); |
322 } | 322 } |
323 | 323 |
324 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 324 void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
325 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 325 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 } | 722 } |
723 | 723 |
724 | 724 |
725 MachineOperatorBuilder* JSGenericLowering::machine() const { | 725 MachineOperatorBuilder* JSGenericLowering::machine() const { |
726 return jsgraph()->machine(); | 726 return jsgraph()->machine(); |
727 } | 727 } |
728 | 728 |
729 } // namespace compiler | 729 } // namespace compiler |
730 } // namespace internal | 730 } // namespace internal |
731 } // namespace v8 | 731 } // namespace v8 |
OLD | NEW |