| 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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 Node* closure = environment()->LookupAccumulator(); | 957 Node* closure = environment()->LookupAccumulator(); |
| 958 | 958 |
| 959 const Operator* op = javascript()->CreateCatchContext(name, scope_info); | 959 const Operator* op = javascript()->CreateCatchContext(name, scope_info); |
| 960 Node* context = NewNode(op, exception, closure); | 960 Node* context = NewNode(op, exception, closure); |
| 961 environment()->BindAccumulator(context); | 961 environment()->BindAccumulator(context); |
| 962 } | 962 } |
| 963 | 963 |
| 964 void BytecodeGraphBuilder::VisitCreateWithContext() { | 964 void BytecodeGraphBuilder::VisitCreateWithContext() { |
| 965 Node* object = | 965 Node* object = |
| 966 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 966 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 967 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast( |
| 968 bytecode_iterator().GetConstantForIndexOperand(1)); |
| 967 | 969 |
| 968 const Operator* op = javascript()->CreateWithContext(); | 970 const Operator* op = javascript()->CreateWithContext(scope_info); |
| 969 Node* context = NewNode(op, object, environment()->LookupAccumulator()); | 971 Node* context = NewNode(op, object, environment()->LookupAccumulator()); |
| 970 environment()->BindAccumulator(context); | 972 environment()->BindAccumulator(context); |
| 971 } | 973 } |
| 972 | 974 |
| 973 void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) { | 975 void BytecodeGraphBuilder::BuildCreateArguments(CreateArgumentsType type) { |
| 974 FrameStateBeforeAndAfter states(this); | 976 FrameStateBeforeAndAfter states(this); |
| 975 const Operator* op = javascript()->CreateArguments(type); | 977 const Operator* op = javascript()->CreateArguments(type); |
| 976 Node* object = NewNode(op, GetFunctionClosure()); | 978 Node* object = NewNode(op, GetFunctionClosure()); |
| 977 environment()->BindAccumulator(object, &states); | 979 environment()->BindAccumulator(object, &states); |
| 978 } | 980 } |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1962 // Phi does not exist yet, introduce one. | 1964 // Phi does not exist yet, introduce one. |
| 1963 value = NewPhi(inputs, value, control); | 1965 value = NewPhi(inputs, value, control); |
| 1964 value->ReplaceInput(inputs - 1, other); | 1966 value->ReplaceInput(inputs - 1, other); |
| 1965 } | 1967 } |
| 1966 return value; | 1968 return value; |
| 1967 } | 1969 } |
| 1968 | 1970 |
| 1969 } // namespace compiler | 1971 } // namespace compiler |
| 1970 } // namespace internal | 1972 } // namespace internal |
| 1971 } // namespace v8 | 1973 } // namespace v8 |
| OLD | NEW |