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

Side by Side Diff: src/interpreter/bytecode-array-builder.h

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/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-array-builder.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 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-array-writer.h" 9 #include "src/interpreter/bytecode-array-writer.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Create a new context for a catch block with |exception|, |name|, 142 // Create a new context for a catch block with |exception|, |name|,
143 // |scope_info|, and the closure in the accumulator. 143 // |scope_info|, and the closure in the accumulator.
144 BytecodeArrayBuilder& CreateCatchContext(Register exception, 144 BytecodeArrayBuilder& CreateCatchContext(Register exception,
145 Handle<String> name, 145 Handle<String> name,
146 Handle<ScopeInfo> scope_info); 146 Handle<ScopeInfo> scope_info);
147 147
148 // Create a new context with size |slots|. 148 // Create a new context with size |slots|.
149 BytecodeArrayBuilder& CreateFunctionContext(int slots); 149 BytecodeArrayBuilder& CreateFunctionContext(int slots);
150 150
151 // Creates a new context for a with-statement with the |object| in a register 151 // Creates a new context with the given |scope_info| for a with-statement
152 // and the closure in the accumulator. 152 // with the |object| in a register and the closure in the accumulator.
153 BytecodeArrayBuilder& CreateWithContext(Register object); 153 BytecodeArrayBuilder& CreateWithContext(Register object,
154 Handle<ScopeInfo> scope_info);
154 155
155 // Create a new arguments object in the accumulator. 156 // Create a new arguments object in the accumulator.
156 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); 157 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type);
157 158
158 // Literals creation. Constant elements should be in the accumulator. 159 // Literals creation. Constant elements should be in the accumulator.
159 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, 160 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern,
160 int literal_index, int flags); 161 int literal_index, int flags);
161 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, 162 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements,
162 int literal_index, int flags); 163 int literal_index, int flags);
163 BytecodeArrayBuilder& CreateObjectLiteral( 164 BytecodeArrayBuilder& CreateObjectLiteral(
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 static int const kNoFeedbackSlot = 0; 403 static int const kNoFeedbackSlot = 0;
403 404
404 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 405 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
405 }; 406 };
406 407
407 } // namespace interpreter 408 } // namespace interpreter
408 } // namespace internal 409 } // namespace internal
409 } // namespace v8 410 } // namespace v8
410 411
411 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 412 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698