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

Unified Diff: src/deoptimizer.h

Issue 6793013: Cache optimized code on shared function info. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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
« no previous file with comments | « src/compiler.cc ('k') | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « src/compiler.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698