| Index: src/deoptimizer.h
|
| diff --git a/src/deoptimizer.h b/src/deoptimizer.h
|
| index 514de05f267ae4dc42328badd6732a4862fb2364..9ed14f9802a551d09d1beeb8b1156854c615932d 100644
|
| --- a/src/deoptimizer.h
|
| +++ b/src/deoptimizer.h
|
| @@ -466,14 +466,19 @@ class TranslationIterator BASE_EMBEDDED {
|
|
|
| int32_t Next();
|
|
|
| - bool HasNext() const { return index_ >= 0; }
|
| + bool HasNext() const { return index_ < buffer_->length(); }
|
|
|
| - void Done() { index_ = -1; }
|
| + void Done() { index_ = buffer_->length(); }
|
|
|
| void Skip(int n) {
|
| for (int i = 0; i < n; i++) Next();
|
| }
|
|
|
| + void Undo() {
|
| + ASSERT(index_ > 0);
|
| + index_--;
|
| + }
|
| +
|
| private:
|
| ByteArray* buffer_;
|
| int index_;
|
| @@ -526,6 +531,9 @@ class Translation BASE_EMBEDDED {
|
| static const char* StringFor(Opcode opcode);
|
| #endif
|
|
|
| + // A literal id which refers to the JSFunction itself.
|
| + static const int kSelfLiteralId = -239;
|
| +
|
| private:
|
| TranslationBuffer* buffer_;
|
| int index_;
|
|
|