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

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
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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 // Phi does not exist yet, introduce one. 1958 // Phi does not exist yet, introduce one.
1957 value = NewPhi(inputs, value, control); 1959 value = NewPhi(inputs, value, control);
1958 value->ReplaceInput(inputs - 1, other); 1960 value->ReplaceInput(inputs - 1, other);
1959 } 1961 }
1960 return value; 1962 return value;
1961 } 1963 }
1962 1964
1963 } // namespace compiler 1965 } // namespace compiler
1964 } // namespace internal 1966 } // namespace internal
1965 } // namespace v8 1967 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698