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

Unified Diff: src/hydrogen.cc

Issue 30693007: Guard against misuse of IfBuilder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 73b23cb2fd4c6395a5c1fb21857b6d550af09ae8..ad00cd07638e41cc90a65769aa8187b3cee2793c 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -795,6 +795,7 @@ HControlInstruction* HGraphBuilder::IfBuilder::AddCompare(
void HGraphBuilder::IfBuilder::Or() {
+ ASSERT(!needs_compare_);
ASSERT(!did_and_);
did_or_ = true;
HEnvironment* env = first_false_block_->last_environment();
@@ -810,6 +811,7 @@ void HGraphBuilder::IfBuilder::Or() {
void HGraphBuilder::IfBuilder::And() {
+ ASSERT(!needs_compare_);
ASSERT(!did_or_);
did_and_ = true;
HEnvironment* env = first_false_block_->last_environment();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698