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-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 BytecodeArrayBuilder& MarkTryEnd(int handler_id); | 256 BytecodeArrayBuilder& MarkTryEnd(int handler_id); |
257 | 257 |
258 // Creates a new handler table entry and returns a {hander_id} identifying the | 258 // Creates a new handler table entry and returns a {hander_id} identifying the |
259 // entry, so that it can be referenced by above exception handling support. | 259 // entry, so that it can be referenced by above exception handling support. |
260 int NewHandlerEntry() { return handler_table_builder()->NewHandlerEntry(); } | 260 int NewHandlerEntry() { return handler_table_builder()->NewHandlerEntry(); } |
261 | 261 |
262 void InitializeReturnPosition(FunctionLiteral* literal); | 262 void InitializeReturnPosition(FunctionLiteral* literal); |
263 | 263 |
264 void SetStatementPosition(Statement* stmt); | 264 void SetStatementPosition(Statement* stmt); |
265 void SetExpressionPosition(Expression* expr); | 265 void SetExpressionPosition(Expression* expr); |
| 266 void SetExpressionAsStatementPosition(Expression* expr); |
266 | 267 |
267 // Accessors | 268 // Accessors |
268 Zone* zone() const { return zone_; } | 269 Zone* zone() const { return zone_; } |
269 TemporaryRegisterAllocator* temporary_register_allocator() { | 270 TemporaryRegisterAllocator* temporary_register_allocator() { |
270 return &temporary_allocator_; | 271 return &temporary_allocator_; |
271 } | 272 } |
272 const TemporaryRegisterAllocator* temporary_register_allocator() const { | 273 const TemporaryRegisterAllocator* temporary_register_allocator() const { |
273 return &temporary_allocator_; | 274 return &temporary_allocator_; |
274 } | 275 } |
275 | 276 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 size_t offset_; | 422 size_t offset_; |
422 | 423 |
423 friend class BytecodeArrayBuilder; | 424 friend class BytecodeArrayBuilder; |
424 }; | 425 }; |
425 | 426 |
426 } // namespace interpreter | 427 } // namespace interpreter |
427 } // namespace internal | 428 } // namespace internal |
428 } // namespace v8 | 429 } // namespace v8 |
429 | 430 |
430 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 431 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |