Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(793)

Unified Diff: src/deoptimizer.h

Issue 10443114: Progress towards making Zones independent of Isolates and Threads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index 6bc4a5103627aeb4fb3e6b7358be0edc96e1330c..167e30d09905a644a15fb962264a379d5268ef83 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,8 @@ class Translation BASE_EMBEDDED {
private:
TranslationBuffer* buffer_;
int index_;
+
danno 2012/06/04 10:46:46 nit: no space here, stay consistent with surroundi
sanjoy 2012/06/04 11:05:42 Removed space.
+ Zone* zone_;
};

Powered by Google App Engine
This is Rietveld 408576698