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

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

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: relax dchecks Created 4 years, 1 month 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 // Create a new context for a catch block with |exception|, |name|, 163 // Create a new context for a catch block with |exception|, |name|,
164 // |scope_info|, and the closure in the accumulator. 164 // |scope_info|, and the closure in the accumulator.
165 BytecodeArrayBuilder& CreateCatchContext(Register exception, 165 BytecodeArrayBuilder& CreateCatchContext(Register exception,
166 Handle<String> name, 166 Handle<String> name,
167 Handle<ScopeInfo> scope_info); 167 Handle<ScopeInfo> scope_info);
168 168
169 // Create a new context with size |slots|. 169 // Create a new context with size |slots|.
170 BytecodeArrayBuilder& CreateFunctionContext(int slots); 170 BytecodeArrayBuilder& CreateFunctionContext(int slots);
171 171
172 // Create a new eval context with size |slots|.
173 BytecodeArrayBuilder& CreateEvalContext(int slots);
174
172 // Creates a new context with the given |scope_info| for a with-statement 175 // Creates a new context with the given |scope_info| for a with-statement
173 // with the |object| in a register and the closure in the accumulator. 176 // with the |object| in a register and the closure in the accumulator.
174 BytecodeArrayBuilder& CreateWithContext(Register object, 177 BytecodeArrayBuilder& CreateWithContext(Register object,
175 Handle<ScopeInfo> scope_info); 178 Handle<ScopeInfo> scope_info);
176 179
177 // Create a new arguments object in the accumulator. 180 // Create a new arguments object in the accumulator.
178 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); 181 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type);
179 182
180 // Literals creation. Constant elements should be in the accumulator. 183 // Literals creation. Constant elements should be in the accumulator.
181 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, 184 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern,
(...skipping 229 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