OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
6 | 6 |
7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
10 | 10 |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 636 |
637 | 637 |
638 void BytecodeGraphBuilder::VisitPopContext( | 638 void BytecodeGraphBuilder::VisitPopContext( |
639 const interpreter::BytecodeArrayIterator& iterator) { | 639 const interpreter::BytecodeArrayIterator& iterator) { |
640 UNIMPLEMENTED(); | 640 UNIMPLEMENTED(); |
641 } | 641 } |
642 | 642 |
643 | 643 |
644 void BytecodeGraphBuilder::VisitCreateClosure( | 644 void BytecodeGraphBuilder::VisitCreateClosure( |
645 const interpreter::BytecodeArrayIterator& iterator) { | 645 const interpreter::BytecodeArrayIterator& iterator) { |
646 UNIMPLEMENTED(); | 646 Handle<SharedFunctionInfo> shared_info = |
| 647 Handle<SharedFunctionInfo>::cast(iterator.GetConstantForIndexOperand(0)); |
| 648 PretenureFlag tenured = |
| 649 iterator.GetImmediateOperand(1) ? TENURED : NOT_TENURED; |
| 650 const Operator* op = javascript()->CreateClosure(shared_info, tenured); |
| 651 Node* closure = NewNode(op); |
| 652 AddEmptyFrameStateInputs(closure); |
| 653 environment()->BindAccumulator(closure); |
647 } | 654 } |
648 | 655 |
649 | 656 |
| 657 void BytecodeGraphBuilder::VisitCreateClosureWide( |
| 658 const interpreter::BytecodeArrayIterator& iterator) { |
| 659 VisitCreateClosure(iterator); |
| 660 } |
| 661 |
| 662 |
650 void BytecodeGraphBuilder::VisitCreateMappedArguments( | 663 void BytecodeGraphBuilder::VisitCreateMappedArguments( |
651 const interpreter::BytecodeArrayIterator& iterator) { | 664 const interpreter::BytecodeArrayIterator& iterator) { |
652 UNIMPLEMENTED(); | 665 UNIMPLEMENTED(); |
653 } | 666 } |
654 | 667 |
655 | 668 |
656 void BytecodeGraphBuilder::VisitCreateUnmappedArguments( | 669 void BytecodeGraphBuilder::VisitCreateUnmappedArguments( |
657 const interpreter::BytecodeArrayIterator& iterator) { | 670 const interpreter::BytecodeArrayIterator& iterator) { |
658 UNIMPLEMENTED(); | 671 UNIMPLEMENTED(); |
659 } | 672 } |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 | 1241 |
1229 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1242 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
1230 if (environment()->IsMarkedAsUnreachable()) return; | 1243 if (environment()->IsMarkedAsUnreachable()) return; |
1231 environment()->MarkAsUnreachable(); | 1244 environment()->MarkAsUnreachable(); |
1232 exit_controls_.push_back(exit); | 1245 exit_controls_.push_back(exit); |
1233 } | 1246 } |
1234 | 1247 |
1235 } // namespace compiler | 1248 } // namespace compiler |
1236 } // namespace internal | 1249 } // namespace internal |
1237 } // namespace v8 | 1250 } // namespace v8 |
OLD | NEW |