| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |scope_info| and a closure which should be | 138 // Create a new local context for a |scope_info| and a closure which should be |
| 139 // in the accumulator. | 139 // in the accumulator. |
| 140 BytecodeArrayBuilder& CreateBlockContext(Handle<ScopeInfo> scope_info); | 140 BytecodeArrayBuilder& CreateBlockContext(Handle<ScopeInfo> scope_info); |
| 141 | 141 |
| 142 // Create a new context with size |slots|. | 142 // Create a new context with size |slots|. |
| 143 BytecodeArrayBuilder& CreateFunctionContext(int slots); | 143 BytecodeArrayBuilder& CreateFunctionContext(int slots); |
| 144 | 144 |
| 145 // Creates a new context for a with-statement with the |object| in a register |
| 146 // and the closure in the accumulator. |
| 147 BytecodeArrayBuilder& CreateWithContext(Register object); |
| 148 |
| 145 // Create a new arguments object in the accumulator. | 149 // Create a new arguments object in the accumulator. |
| 146 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); | 150 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); |
| 147 | 151 |
| 148 // Literals creation. Constant elements should be in the accumulator. | 152 // Literals creation. Constant elements should be in the accumulator. |
| 149 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, | 153 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, |
| 150 int literal_index, int flags); | 154 int literal_index, int flags); |
| 151 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, | 155 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, |
| 152 int literal_index, int flags); | 156 int literal_index, int flags); |
| 153 BytecodeArrayBuilder& CreateObjectLiteral( | 157 BytecodeArrayBuilder& CreateObjectLiteral( |
| 154 Handle<FixedArray> constant_properties, int literal_index, int flags, | 158 Handle<FixedArray> constant_properties, int literal_index, int flags, |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 BytecodeSourceInfo latest_source_info_; | 398 BytecodeSourceInfo latest_source_info_; |
| 395 | 399 |
| 396 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 400 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 397 }; | 401 }; |
| 398 | 402 |
| 399 } // namespace interpreter | 403 } // namespace interpreter |
| 400 } // namespace internal | 404 } // namespace internal |
| 401 } // namespace v8 | 405 } // namespace v8 |
| 402 | 406 |
| 403 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 407 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |