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/node-matchers.h" | |
mythria
2015/11/24 13:07:28
This may not be needed now.
Michael Starzinger
2015/11/24 13:51:24
+1
| |
8 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
9 #include "src/interpreter/bytecode-array-iterator.h" | 10 #include "src/interpreter/bytecode-array-iterator.h" |
10 | 11 |
11 namespace v8 { | 12 namespace v8 { |
12 namespace internal { | 13 namespace internal { |
13 namespace compiler { | 14 namespace compiler { |
14 | 15 |
15 // Issues: | 16 // Issues: |
16 // - Need to deal with FrameState / FrameStateBeforeAndAfter / StateValue. | 17 // - Need to deal with FrameState / FrameStateBeforeAndAfter / StateValue. |
17 // - Scopes - intimately tied to AST. Need to eval what is needed. | 18 // - Scopes - intimately tied to AST. Need to eval what is needed. |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
636 | 637 |
637 | 638 |
638 void BytecodeGraphBuilder::VisitPopContext( | 639 void BytecodeGraphBuilder::VisitPopContext( |
639 const interpreter::BytecodeArrayIterator& iterator) { | 640 const interpreter::BytecodeArrayIterator& iterator) { |
640 UNIMPLEMENTED(); | 641 UNIMPLEMENTED(); |
641 } | 642 } |
642 | 643 |
643 | 644 |
644 void BytecodeGraphBuilder::VisitCreateClosure( | 645 void BytecodeGraphBuilder::VisitCreateClosure( |
645 const interpreter::BytecodeArrayIterator& iterator) { | 646 const interpreter::BytecodeArrayIterator& iterator) { |
646 UNIMPLEMENTED(); | 647 Handle<SharedFunctionInfo> shared_info = |
648 Handle<SharedFunctionInfo>::cast(iterator.GetConstantForIndexOperand(0)); | |
649 PretenureFlag tenured = | |
650 iterator.GetImmediateOperand(1) ? TENURED : NOT_TENURED; | |
651 const Operator* op = javascript()->CreateClosure(shared_info, tenured); | |
652 Node* closure = NewNode(op); | |
653 AddEmptyFrameStateInputs(closure); | |
654 environment()->BindAccumulator(closure); | |
647 } | 655 } |
648 | 656 |
649 | 657 |
658 void BytecodeGraphBuilder::VisitCreateClosureWide( | |
659 const interpreter::BytecodeArrayIterator& iterator) { | |
660 VisitCreateClosure(iterator); | |
661 } | |
662 | |
663 | |
650 void BytecodeGraphBuilder::VisitCreateMappedArguments( | 664 void BytecodeGraphBuilder::VisitCreateMappedArguments( |
651 const interpreter::BytecodeArrayIterator& iterator) { | 665 const interpreter::BytecodeArrayIterator& iterator) { |
652 UNIMPLEMENTED(); | 666 UNIMPLEMENTED(); |
653 } | 667 } |
654 | 668 |
655 | 669 |
656 void BytecodeGraphBuilder::VisitCreateUnmappedArguments( | 670 void BytecodeGraphBuilder::VisitCreateUnmappedArguments( |
657 const interpreter::BytecodeArrayIterator& iterator) { | 671 const interpreter::BytecodeArrayIterator& iterator) { |
658 UNIMPLEMENTED(); | 672 UNIMPLEMENTED(); |
659 } | 673 } |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1228 | 1242 |
1229 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1243 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
1230 if (environment()->IsMarkedAsUnreachable()) return; | 1244 if (environment()->IsMarkedAsUnreachable()) return; |
1231 environment()->MarkAsUnreachable(); | 1245 environment()->MarkAsUnreachable(); |
1232 exit_controls_.push_back(exit); | 1246 exit_controls_.push_back(exit); |
1233 } | 1247 } |
1234 | 1248 |
1235 } // namespace compiler | 1249 } // namespace compiler |
1236 } // namespace internal | 1250 } // namespace internal |
1237 } // namespace v8 | 1251 } // namespace v8 |
OLD | NEW |