OLD | NEW |
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 TypeofMode typeof_mode); | 128 TypeofMode typeof_mode); |
129 | 129 |
130 // Store value in the accumulator into the variable with |name|. | 130 // Store value in the accumulator into the variable with |name|. |
131 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name, | 131 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name, |
132 LanguageMode language_mode); | 132 LanguageMode language_mode); |
133 | 133 |
134 // Create a new closure for a SharedFunctionInfo which will be inserted at | 134 // Create a new closure for a SharedFunctionInfo which will be inserted at |
135 // constant pool index |entry|. | 135 // constant pool index |entry|. |
136 BytecodeArrayBuilder& CreateClosure(size_t entry, int flags); | 136 BytecodeArrayBuilder& CreateClosure(size_t entry, int flags); |
137 | 137 |
| 138 // Create a new local context for a ScopeInfo which will be inserted at |
| 139 // constant pool index |entry| and with a closure which should be in the |
| 140 // accumulator. |
| 141 BytecodeArrayBuilder& CreateBlockContext(size_t entry); |
| 142 |
138 // Create a new context with size |slots|. | 143 // Create a new context with size |slots|. |
139 BytecodeArrayBuilder& CreateFunctionContext(int slots); | 144 BytecodeArrayBuilder& CreateFunctionContext(int slots); |
140 | 145 |
141 // Create a new arguments object in the accumulator. | 146 // Create a new arguments object in the accumulator. |
142 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); | 147 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); |
143 | 148 |
144 // Literals creation. Constant elements should be in the accumulator. | 149 // Literals creation. Constant elements should be in the accumulator. |
145 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, | 150 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, |
146 int literal_index, int flags); | 151 int literal_index, int flags); |
147 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, | 152 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 BytecodeSourceInfo latest_source_info_; | 395 BytecodeSourceInfo latest_source_info_; |
391 | 396 |
392 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 397 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
393 }; | 398 }; |
394 | 399 |
395 } // namespace interpreter | 400 } // namespace interpreter |
396 } // namespace internal | 401 } // namespace internal |
397 } // namespace v8 | 402 } // namespace v8 |
398 | 403 |
399 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 404 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |