| 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/bytecode-branch-analysis.h" | 7 #include "src/compiler/bytecode-branch-analysis.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
| 10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 environment()->BindAccumulator(closure); | 921 environment()->BindAccumulator(closure); |
| 922 } | 922 } |
| 923 | 923 |
| 924 | 924 |
| 925 void BytecodeGraphBuilder::VisitCreateClosureWide( | 925 void BytecodeGraphBuilder::VisitCreateClosureWide( |
| 926 const interpreter::BytecodeArrayIterator& iterator) { | 926 const interpreter::BytecodeArrayIterator& iterator) { |
| 927 VisitCreateClosure(iterator); | 927 VisitCreateClosure(iterator); |
| 928 } | 928 } |
| 929 | 929 |
| 930 | 930 |
| 931 void BytecodeGraphBuilder::BuildCreateArguments( |
| 932 CreateArgumentsParameters::Type type, |
| 933 const interpreter::BytecodeArrayIterator& iterator) { |
| 934 FrameStateBeforeAndAfter states(this, iterator); |
| 935 const Operator* op = javascript()->CreateArguments(type, 0); |
| 936 Node* object = NewNode(op, GetFunctionClosure()); |
| 937 environment()->BindAccumulator(object, &states); |
| 938 } |
| 939 |
| 940 |
| 931 void BytecodeGraphBuilder::VisitCreateMappedArguments( | 941 void BytecodeGraphBuilder::VisitCreateMappedArguments( |
| 932 const interpreter::BytecodeArrayIterator& iterator) { | 942 const interpreter::BytecodeArrayIterator& iterator) { |
| 933 UNIMPLEMENTED(); | 943 BuildCreateArguments(CreateArgumentsParameters::kMappedArguments, iterator); |
| 934 } | 944 } |
| 935 | 945 |
| 936 | 946 |
| 937 void BytecodeGraphBuilder::VisitCreateUnmappedArguments( | 947 void BytecodeGraphBuilder::VisitCreateUnmappedArguments( |
| 938 const interpreter::BytecodeArrayIterator& iterator) { | 948 const interpreter::BytecodeArrayIterator& iterator) { |
| 939 UNIMPLEMENTED(); | 949 BuildCreateArguments(CreateArgumentsParameters::kUnmappedArguments, iterator); |
| 940 } | 950 } |
| 941 | 951 |
| 942 | 952 |
| 943 void BytecodeGraphBuilder::BuildCreateLiteral( | 953 void BytecodeGraphBuilder::BuildCreateLiteral( |
| 944 const Operator* op, const interpreter::BytecodeArrayIterator& iterator) { | 954 const Operator* op, const interpreter::BytecodeArrayIterator& iterator) { |
| 945 FrameStateBeforeAndAfter states(this, iterator); | 955 FrameStateBeforeAndAfter states(this, iterator); |
| 946 Node* literal = NewNode(op, GetFunctionClosure()); | 956 Node* literal = NewNode(op, GetFunctionClosure()); |
| 947 environment()->BindAccumulator(literal, &states); | 957 environment()->BindAccumulator(literal, &states); |
| 948 } | 958 } |
| 949 | 959 |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 | 1781 |
| 1772 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1782 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 1773 if (environment()->IsMarkedAsUnreachable()) return; | 1783 if (environment()->IsMarkedAsUnreachable()) return; |
| 1774 environment()->MarkAsUnreachable(); | 1784 environment()->MarkAsUnreachable(); |
| 1775 exit_controls_.push_back(exit); | 1785 exit_controls_.push_back(exit); |
| 1776 } | 1786 } |
| 1777 | 1787 |
| 1778 } // namespace compiler | 1788 } // namespace compiler |
| 1779 } // namespace internal | 1789 } // namespace internal |
| 1780 } // namespace v8 | 1790 } // namespace v8 |
| OLD | NEW |