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

Unified Diff: src/fast-codegen.h

Issue 550010: Cleanup the handling of control flow in the toplevel code generator.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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/arm/fast-codegen-arm.cc ('k') | src/fast-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-codegen.h
===================================================================
--- src/fast-codegen.h (revision 3580)
+++ src/fast-codegen.h (working copy)
@@ -241,6 +241,19 @@
// control flow to a pair of labels.
void TestAndBranch(Register source, Label* true_label, Label* false_label);
+ void VisitForControl(Expression* expr, Label* if_true, Label* if_false) {
+ ASSERT(expr->context() == Expression::kTest ||
+ expr->context() == Expression::kValueTest ||
+ expr->context() == Expression::kTestValue);
+ Label* saved_true = true_label_;
+ Label* saved_false = false_label_;
+ true_label_ = if_true;
+ false_label_ = if_false;
+ Visit(expr);
+ true_label_ = saved_true;
+ false_label_ = saved_false;
+ }
+
void VisitDeclarations(ZoneList<Declaration*>* declarations);
void DeclareGlobals(Handle<FixedArray> pairs);
« no previous file with comments | « src/arm/fast-codegen-arm.cc ('k') | src/fast-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698