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

Unified Diff: src/full-codegen.h

Issue 3621013: Fix a bug in our handling of conditional expressions in test contexts. (Closed)
Patch Set: Created 10 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 | src/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index 9e126b848356b642f84b3c587c63bd795193f034..201507b2af338ea6e32b59d36c6a8cc145e22e0a 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -604,6 +604,15 @@ class FullCodeGenerator: public AstVisitor {
false_label_(false_label),
fall_through_(fall_through) { }
+ static const TestContext* cast(const ExpressionContext* context) {
+ ASSERT(context->IsTest());
+ return reinterpret_cast<const TestContext*>(context);
+ }
+
+ Label* true_label() const { return true_label_; }
+ Label* false_label() const { return false_label_; }
+ Label* fall_through() const { return fall_through_; }
+
virtual void Plug(bool flag) const;
virtual void Plug(Register reg) const;
virtual void Plug(Label* materialize_true, Label* materialize_false) const;
« no previous file with comments | « no previous file | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698