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/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/bytecode-branch-analysis.h" | 8 #include "src/compiler/bytecode-branch-analysis.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 const Operator* op = javascript()->CreateFunctionContext(slots); | 942 const Operator* op = javascript()->CreateFunctionContext(slots); |
943 Node* context = NewNode(op, GetFunctionClosure()); | 943 Node* context = NewNode(op, GetFunctionClosure()); |
944 environment()->BindAccumulator(context); | 944 environment()->BindAccumulator(context); |
945 } | 945 } |
946 | 946 |
947 void BytecodeGraphBuilder::VisitCreateCatchContext() { | 947 void BytecodeGraphBuilder::VisitCreateCatchContext() { |
948 interpreter::Register reg = bytecode_iterator().GetRegisterOperand(0); | 948 interpreter::Register reg = bytecode_iterator().GetRegisterOperand(0); |
949 Node* exception = environment()->LookupRegister(reg); | 949 Node* exception = environment()->LookupRegister(reg); |
950 Handle<String> name = | 950 Handle<String> name = |
951 Handle<String>::cast(bytecode_iterator().GetConstantForIndexOperand(1)); | 951 Handle<String>::cast(bytecode_iterator().GetConstantForIndexOperand(1)); |
| 952 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast( |
| 953 bytecode_iterator().GetConstantForIndexOperand(2)); |
952 Node* closure = environment()->LookupAccumulator(); | 954 Node* closure = environment()->LookupAccumulator(); |
953 | 955 |
954 const Operator* op = javascript()->CreateCatchContext(name); | 956 const Operator* op = javascript()->CreateCatchContext(name, scope_info); |
955 Node* context = NewNode(op, exception, closure); | 957 Node* context = NewNode(op, exception, closure); |
956 environment()->BindAccumulator(context); | 958 environment()->BindAccumulator(context); |
957 } | 959 } |
958 | 960 |
959 void BytecodeGraphBuilder::VisitCreateWithContext() { | 961 void BytecodeGraphBuilder::VisitCreateWithContext() { |
960 Node* object = | 962 Node* object = |
961 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 963 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
962 | 964 |
963 const Operator* op = javascript()->CreateWithContext(); | 965 const Operator* op = javascript()->CreateWithContext(); |
964 Node* context = NewNode(op, object, environment()->LookupAccumulator()); | 966 Node* context = NewNode(op, object, environment()->LookupAccumulator()); |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 // Phi does not exist yet, introduce one. | 1953 // Phi does not exist yet, introduce one. |
1952 value = NewPhi(inputs, value, control); | 1954 value = NewPhi(inputs, value, control); |
1953 value->ReplaceInput(inputs - 1, other); | 1955 value->ReplaceInput(inputs - 1, other); |
1954 } | 1956 } |
1955 return value; | 1957 return value; |
1956 } | 1958 } |
1957 | 1959 |
1958 } // namespace compiler | 1960 } // namespace compiler |
1959 } // namespace internal | 1961 } // namespace internal |
1960 } // namespace v8 | 1962 } // namespace v8 |
OLD | NEW |