| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |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 for a catch block with |exception| and |name| and the |
| 143 // closure in the accumulator. |
| 144 BytecodeArrayBuilder& CreateCatchContext(Register exception, |
| 145 Handle<String> name); |
| 146 |
| 142 // Create a new context with size |slots|. | 147 // Create a new context with size |slots|. |
| 143 BytecodeArrayBuilder& CreateFunctionContext(int slots); | 148 BytecodeArrayBuilder& CreateFunctionContext(int slots); |
| 144 | 149 |
| 145 // Creates a new context for a with-statement with the |object| in a register | 150 // Creates a new context for a with-statement with the |object| in a register |
| 146 // and the closure in the accumulator. | 151 // and the closure in the accumulator. |
| 147 BytecodeArrayBuilder& CreateWithContext(Register object); | 152 BytecodeArrayBuilder& CreateWithContext(Register object); |
| 148 | 153 |
| 149 // Create a new arguments object in the accumulator. | 154 // Create a new arguments object in the accumulator. |
| 150 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); | 155 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); |
| 151 | 156 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 BytecodeSourceInfo latest_source_info_; | 401 BytecodeSourceInfo latest_source_info_; |
| 397 | 402 |
| 398 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 403 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 399 }; | 404 }; |
| 400 | 405 |
| 401 } // namespace interpreter | 406 } // namespace interpreter |
| 402 } // namespace internal | 407 } // namespace internal |
| 403 } // namespace v8 | 408 } // namespace v8 |
| 404 | 409 |
| 405 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 410 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |