| 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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 void BytecodeGraphBuilder::VisitPopContext() { | 915 void BytecodeGraphBuilder::VisitPopContext() { |
| 916 Node* context = | 916 Node* context = |
| 917 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 917 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 918 environment()->SetContext(context); | 918 environment()->SetContext(context); |
| 919 } | 919 } |
| 920 | 920 |
| 921 void BytecodeGraphBuilder::VisitCreateClosure() { | 921 void BytecodeGraphBuilder::VisitCreateClosure() { |
| 922 Handle<SharedFunctionInfo> shared_info = Handle<SharedFunctionInfo>::cast( | 922 Handle<SharedFunctionInfo> shared_info = Handle<SharedFunctionInfo>::cast( |
| 923 bytecode_iterator().GetConstantForIndexOperand(0)); | 923 bytecode_iterator().GetConstantForIndexOperand(0)); |
| 924 PretenureFlag tenured = | 924 PretenureFlag tenured = |
| 925 bytecode_iterator().GetFlagOperand(1) ? TENURED : NOT_TENURED; | 925 interpreter::CreateClosureFlags::PretenuredBit::decode( |
| 926 bytecode_iterator().GetFlagOperand(1)) |
| 927 ? TENURED |
| 928 : NOT_TENURED; |
| 926 const Operator* op = javascript()->CreateClosure(shared_info, tenured); | 929 const Operator* op = javascript()->CreateClosure(shared_info, tenured); |
| 927 Node* closure = NewNode(op); | 930 Node* closure = NewNode(op); |
| 928 environment()->BindAccumulator(closure); | 931 environment()->BindAccumulator(closure); |
| 929 } | 932 } |
| 930 | 933 |
| 931 void BytecodeGraphBuilder::VisitCreateBlockContext() { | 934 void BytecodeGraphBuilder::VisitCreateBlockContext() { |
| 932 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast( | 935 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast( |
| 933 bytecode_iterator().GetConstantForIndexOperand(0)); | 936 bytecode_iterator().GetConstantForIndexOperand(0)); |
| 934 | 937 |
| 935 const Operator* op = javascript()->CreateBlockContext(scope_info); | 938 const Operator* op = javascript()->CreateBlockContext(scope_info); |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1951 // Phi does not exist yet, introduce one. | 1954 // Phi does not exist yet, introduce one. |
| 1952 value = NewPhi(inputs, value, control); | 1955 value = NewPhi(inputs, value, control); |
| 1953 value->ReplaceInput(inputs - 1, other); | 1956 value->ReplaceInput(inputs - 1, other); |
| 1954 } | 1957 } |
| 1955 return value; | 1958 return value; |
| 1956 } | 1959 } |
| 1957 | 1960 |
| 1958 } // namespace compiler | 1961 } // namespace compiler |
| 1959 } // namespace internal | 1962 } // namespace internal |
| 1960 } // namespace v8 | 1963 } // namespace v8 |
| OLD | NEW |