Reviewers: Sven Panne,
Message:
Hey Sven,
This one adds two ASSERTs to make sure that one does not use AndIf or OrIf
initially by accident. PTAL
-- Benedikt
Description:
Guard against misuse of IfBuilder.
Please review this at https://codereview.chromium.org/30693007/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -0 lines):
M src/hydrogen.cc
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();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.