Index: src/deoptimizer.h |
diff --git a/src/deoptimizer.h b/src/deoptimizer.h |
index 6bc4a5103627aeb4fb3e6b7358be0edc96e1330c..6cf7143c04836d58bda8328790040b37a881fc4d 100644 |
--- a/src/deoptimizer.h |
+++ b/src/deoptimizer.h |
@@ -515,10 +515,10 @@ class FrameDescription { |
class TranslationBuffer BASE_EMBEDDED { |
public: |
- TranslationBuffer() : contents_(256) { } |
+ explicit TranslationBuffer(Zone* zone) : contents_(256, zone) { } |
int CurrentIndex() const { return contents_.length(); } |
- void Add(int32_t value); |
+ void Add(int32_t value, Zone* zone); |
Handle<ByteArray> CreateByteArray(); |
@@ -569,12 +569,14 @@ class Translation BASE_EMBEDDED { |
DUPLICATE |
}; |
- Translation(TranslationBuffer* buffer, int frame_count, int jsframe_count) |
+ Translation(TranslationBuffer* buffer, int frame_count, int jsframe_count, |
+ Zone* zone) |
: buffer_(buffer), |
- index_(buffer->CurrentIndex()) { |
- buffer_->Add(BEGIN); |
- buffer_->Add(frame_count); |
- buffer_->Add(jsframe_count); |
+ index_(buffer->CurrentIndex()), |
+ zone_(zone) { |
+ buffer_->Add(BEGIN, zone); |
+ buffer_->Add(frame_count, zone); |
+ buffer_->Add(jsframe_count, zone); |
} |
int index() const { return index_; } |
@@ -593,6 +595,8 @@ class Translation BASE_EMBEDDED { |
void StoreArgumentsObject(); |
void MarkDuplicate(); |
+ Zone* zone() { return zone_; } |
+ |
static int NumberOfOperandsFor(Opcode opcode); |
#if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) |
@@ -602,6 +606,7 @@ class Translation BASE_EMBEDDED { |
private: |
TranslationBuffer* buffer_; |
int index_; |
+ Zone* zone_; |
}; |