Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 2314483002: Store the ScopeInfo in WithContexts (Closed)
Patch Set: updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698