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

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

Issue 2581683003: Introduce {ConstantElementsPair} struct for type safety. (Closed)
Patch Set: Rebased. Created 4 years 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/x87/full-codegen-x87.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/base/compiler-specific.h" 9 #include "src/base/compiler-specific.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // with the |object| in a register and the closure in the accumulator. 181 // with the |object| in a register and the closure in the accumulator.
182 BytecodeArrayBuilder& CreateWithContext(Register object, 182 BytecodeArrayBuilder& CreateWithContext(Register object,
183 Handle<ScopeInfo> scope_info); 183 Handle<ScopeInfo> scope_info);
184 184
185 // Create a new arguments object in the accumulator. 185 // Create a new arguments object in the accumulator.
186 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); 186 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type);
187 187
188 // Literals creation. Constant elements should be in the accumulator. 188 // Literals creation. Constant elements should be in the accumulator.
189 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, 189 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern,
190 int literal_index, int flags); 190 int literal_index, int flags);
191 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, 191 BytecodeArrayBuilder& CreateArrayLiteral(
192 int literal_index, int flags); 192 Handle<ConstantElementsPair> constant_elements, int literal_index,
193 int flags);
193 BytecodeArrayBuilder& CreateObjectLiteral( 194 BytecodeArrayBuilder& CreateObjectLiteral(
194 Handle<FixedArray> constant_properties, int literal_index, int flags, 195 Handle<FixedArray> constant_properties, int literal_index, int flags,
195 Register output); 196 Register output);
196 197
197 // Push the context in accumulator as the new context, and store in register 198 // Push the context in accumulator as the new context, and store in register
198 // |context|. 199 // |context|.
199 BytecodeArrayBuilder& PushContext(Register context); 200 BytecodeArrayBuilder& PushContext(Register context);
200 201
201 // Pop the current context and replace with |context|. 202 // Pop the current context and replace with |context|.
202 BytecodeArrayBuilder& PopContext(Register context); 203 BytecodeArrayBuilder& PopContext(Register context);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 static int const kNoFeedbackSlot = 0; 432 static int const kNoFeedbackSlot = 0;
432 433
433 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 434 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
434 }; 435 };
435 436
436 } // namespace interpreter 437 } // namespace interpreter
437 } // namespace internal 438 } // namespace internal
438 } // namespace v8 439 } // namespace v8
439 440
440 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 441 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698