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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 } | 282 } |
283 | 283 |
284 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { | 284 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { |
285 FeedbackParameter const& p = FeedbackParameterOf(node->op()); | 285 FeedbackParameter const& p = FeedbackParameterOf(node->op()); |
286 node->InsertInputs(zone(), 4, 2); | 286 node->InsertInputs(zone(), 4, 2); |
287 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); | 287 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); |
288 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); | 288 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); |
289 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); | 289 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); |
290 } | 290 } |
291 | 291 |
| 292 void JSGenericLowering::LowerJSCollectTypeProfile(Node* node) { |
| 293 FeedbackParameter const& p = FeedbackParameterOf(node->op()); |
| 294 node->InsertInputs(zone(), 2, 2); |
| 295 node->ReplaceInput(2, jsgraph()->HeapConstant(p.feedback().vector())); |
| 296 node->ReplaceInput(3, jsgraph()->SmiConstant(p.feedback().index())); |
| 297 ReplaceWithRuntimeCall(node, Runtime::kCollectTypeProfile); |
| 298 } |
| 299 |
292 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 300 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
293 LanguageMode language_mode = OpParameter<LanguageMode>(node); | 301 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
294 ReplaceWithRuntimeCall(node, is_strict(language_mode) | 302 ReplaceWithRuntimeCall(node, is_strict(language_mode) |
295 ? Runtime::kDeleteProperty_Strict | 303 ? Runtime::kDeleteProperty_Strict |
296 : Runtime::kDeleteProperty_Sloppy); | 304 : Runtime::kDeleteProperty_Sloppy); |
297 } | 305 } |
298 | 306 |
299 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { | 307 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { |
300 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 308 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
301 Callable callable = CodeFactory::GetSuperConstructor(isolate()); | 309 Callable callable = CodeFactory::GetSuperConstructor(isolate()); |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 } | 705 } |
698 | 706 |
699 | 707 |
700 MachineOperatorBuilder* JSGenericLowering::machine() const { | 708 MachineOperatorBuilder* JSGenericLowering::machine() const { |
701 return jsgraph()->machine(); | 709 return jsgraph()->machine(); |
702 } | 710 } |
703 | 711 |
704 } // namespace compiler | 712 } // namespace compiler |
705 } // namespace internal | 713 } // namespace internal |
706 } // namespace v8 | 714 } // namespace v8 |
OLD | NEW |