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

Unified Diff: src/lithium-allocator-inl.h

Issue 11550005: Elide unnecessary context reload in generated stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years 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/lithium.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium-allocator-inl.h
diff --git a/src/lithium-allocator-inl.h b/src/lithium-allocator-inl.h
index 8f660ce0e00373bdd5521b183527e972fc68c75c..1f59cb47783fac74a42fb94502e97eecc352ab54 100644
--- a/src/lithium-allocator-inl.h
+++ b/src/lithium-allocator-inl.h
@@ -99,6 +99,7 @@ bool InputIterator::Done() { return current_ >= limit_; }
LOperand* InputIterator::Current() {
ASSERT(!Done());
+ ASSERT(instr_->InputAt(current_) != NULL);
return instr_->InputAt(current_);
}
@@ -110,7 +111,9 @@ void InputIterator::Advance() {
void InputIterator::SkipUninteresting() {
- while (current_ < limit_ && instr_->InputAt(current_)->IsConstantOperand()) {
+ while (current_ < limit_) {
+ LOperand* current = instr_->InputAt(current_);
+ if (current != NULL && !current->IsConstantOperand()) break;
++current_;
}
}
@@ -127,9 +130,11 @@ bool UseIterator::Done() {
LOperand* UseIterator::Current() {
ASSERT(!Done());
- return input_iterator_.Done()
+ LOperand* result = input_iterator_.Done()
? env_iterator_.Current()
: input_iterator_.Current();
+ ASSERT(result != NULL);
+ return result;
}
« no previous file with comments | « src/lithium.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698