Chromium Code Reviews| Index: src/interpreter/bytecode-array-builder.h |
| diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h |
| index d68d5e7ffbf4b3860cfa985eb1d041732a799a8e..edbe3bfc1d04ce0cd0faeeff1af6ee50e1d823e4 100644 |
| --- a/src/interpreter/bytecode-array-builder.h |
| +++ b/src/interpreter/bytecode-array-builder.h |
| @@ -87,6 +87,8 @@ class BytecodeArrayBuilder { |
| // Flow Control. |
| BytecodeArrayBuilder& Bind(BytecodeLabel* label); |
| + BytecodeArrayBuilder& Bind(BytecodeLabel* unbound, |
| + const BytecodeLabel* const bound); |
|
rmcilroy
2015/10/01 12:12:07
const ref instead? Also, the names still confuse m
oth
2015/10/01 13:13:56
As discussed, changed to:
BytecodeArrayBuilder::B
|
| BytecodeArrayBuilder& Jump(BytecodeLabel* label); |
| BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); |
| BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); |
| @@ -95,6 +97,9 @@ class BytecodeArrayBuilder { |
| BytecodeArrayBuilder& EnterBlock(); |
| BytecodeArrayBuilder& LeaveBlock(); |
| + // Accessors |
| + Zone* zone() const { return zone_; } |
| + |
| private: |
| ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } |
| const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } |
| @@ -133,6 +138,7 @@ class BytecodeArrayBuilder { |
| void ReturnTemporaryRegister(int reg_index); |
| Isolate* isolate_; |
| + Zone* zone_; |
| ZoneVector<uint8_t> bytecodes_; |
| bool bytecode_generated_; |
| size_t last_block_end_; |
| @@ -159,7 +165,6 @@ class BytecodeArrayBuilder { |
| class BytecodeLabel final { |
| public: |
| BytecodeLabel() : bound_(false), offset_(kInvalidOffset) {} |
| - ~BytecodeLabel() { DCHECK(bound_ && offset_ != kInvalidOffset); } |
| private: |
| static const size_t kInvalidOffset = static_cast<size_t>(-1); |
| @@ -188,7 +193,6 @@ class BytecodeLabel final { |
| size_t offset_; |
| friend class BytecodeArrayBuilder; |
| - DISALLOW_COPY_AND_ASSIGN(BytecodeLabel); |
| }; |