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

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

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Crankshaft backends and scope deserialization Created 4 years, 2 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 #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/base/compiler-specific.h" 9 #include "src/base/compiler-specific.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // Create a new context for a catch block with |exception|, |name|, 154 // Create a new context for a catch block with |exception|, |name|,
155 // |scope_info|, and the closure in the accumulator. 155 // |scope_info|, and the closure in the accumulator.
156 BytecodeArrayBuilder& CreateCatchContext(Register exception, 156 BytecodeArrayBuilder& CreateCatchContext(Register exception,
157 Handle<String> name, 157 Handle<String> name,
158 Handle<ScopeInfo> scope_info); 158 Handle<ScopeInfo> scope_info);
159 159
160 // Create a new context with size |slots|. 160 // Create a new context with size |slots|.
161 BytecodeArrayBuilder& CreateFunctionContext(int slots); 161 BytecodeArrayBuilder& CreateFunctionContext(int slots);
162 162
163 // Create a new eval context with size |slots|.
164 BytecodeArrayBuilder& CreateEvalContext(int slots);
165
163 // Creates a new context with the given |scope_info| for a with-statement 166 // Creates a new context with the given |scope_info| for a with-statement
164 // with the |object| in a register and the closure in the accumulator. 167 // with the |object| in a register and the closure in the accumulator.
165 BytecodeArrayBuilder& CreateWithContext(Register object, 168 BytecodeArrayBuilder& CreateWithContext(Register object,
166 Handle<ScopeInfo> scope_info); 169 Handle<ScopeInfo> scope_info);
167 170
168 // Create a new arguments object in the accumulator. 171 // Create a new arguments object in the accumulator.
169 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); 172 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type);
170 173
171 // Literals creation. Constant elements should be in the accumulator. 174 // Literals creation. Constant elements should be in the accumulator.
172 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, 175 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern,
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 static int const kNoFeedbackSlot = 0; 414 static int const kNoFeedbackSlot = 0;
412 415
413 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 416 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
414 }; 417 };
415 418
416 } // namespace interpreter 419 } // namespace interpreter
417 } // namespace internal 420 } // namespace internal
418 } // namespace v8 421 } // namespace v8
419 422
420 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 423 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698