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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } | 290 } |
291 | 291 |
292 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { | 292 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { |
293 DataPropertyParameters const& p = DataPropertyParametersOf(node->op()); | 293 DataPropertyParameters const& p = DataPropertyParametersOf(node->op()); |
294 node->InsertInputs(zone(), 4, 2); | 294 node->InsertInputs(zone(), 4, 2); |
295 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); | 295 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); |
296 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); | 296 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); |
297 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); | 297 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); |
298 } | 298 } |
299 | 299 |
| 300 void JSGenericLowering::LowerJSCollectTypeProfile(Node* node) { |
| 301 DataPropertyParameters const& p = DataPropertyParametersOf(node->op()); |
| 302 node->InsertInputs(zone(), 2, 2); |
| 303 node->ReplaceInput(2, jsgraph()->HeapConstant(p.feedback().vector())); |
| 304 node->ReplaceInput(3, jsgraph()->SmiConstant(p.feedback().index())); |
| 305 ReplaceWithRuntimeCall(node, Runtime::kStoreTypeInformation); |
| 306 } |
| 307 |
300 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 308 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
301 LanguageMode language_mode = OpParameter<LanguageMode>(node); | 309 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
302 ReplaceWithRuntimeCall(node, is_strict(language_mode) | 310 ReplaceWithRuntimeCall(node, is_strict(language_mode) |
303 ? Runtime::kDeleteProperty_Strict | 311 ? Runtime::kDeleteProperty_Strict |
304 : Runtime::kDeleteProperty_Sloppy); | 312 : Runtime::kDeleteProperty_Sloppy); |
305 } | 313 } |
306 | 314 |
307 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { | 315 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { |
308 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 316 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
309 Callable callable = CodeFactory::GetSuperConstructor(isolate()); | 317 Callable callable = CodeFactory::GetSuperConstructor(isolate()); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 } | 714 } |
707 | 715 |
708 | 716 |
709 MachineOperatorBuilder* JSGenericLowering::machine() const { | 717 MachineOperatorBuilder* JSGenericLowering::machine() const { |
710 return jsgraph()->machine(); | 718 return jsgraph()->machine(); |
711 } | 719 } |
712 | 720 |
713 } // namespace compiler | 721 } // namespace compiler |
714 } // namespace internal | 722 } // namespace internal |
715 } // namespace v8 | 723 } // namespace v8 |
OLD | NEW |