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

Unified Diff: src/full-codegen.h

Issue 3166033: Improve the code generated by the full codegen by keeping... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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/full-codegen-arm.cc ('k') | 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
===================================================================
--- src/full-codegen.h (revision 5336)
+++ src/full-codegen.h (working copy)
@@ -73,7 +73,8 @@
loop_depth_(0),
location_(kStack),
true_label_(NULL),
- false_label_(NULL) {
+ false_label_(NULL),
+ fall_through_(NULL) {
}
static Handle<Code> MakeCode(CompilationInfo* info);
@@ -258,7 +259,8 @@
void PrepareTest(Label* materialize_true,
Label* materialize_false,
Label** if_true,
- Label** if_false);
+ Label** if_false,
+ Label** fall_through);
// Emit code to convert pure control flow to a pair of labels into the
// result expected according to an expression context.
@@ -307,17 +309,23 @@
location_ = saved_location;
}
- void VisitForControl(Expression* expr, Label* if_true, Label* if_false) {
+ void VisitForControl(Expression* expr,
+ Label* if_true,
+ Label* if_false,
+ Label* fall_through) {
Expression::Context saved_context = context_;
Label* saved_true = true_label_;
Label* saved_false = false_label_;
+ Label* saved_fall_through = fall_through_;
context_ = Expression::kTest;
true_label_ = if_true;
false_label_ = if_false;
+ fall_through_ = fall_through;
Visit(expr);
context_ = saved_context;
true_label_ = saved_true;
false_label_ = saved_false;
+ fall_through_ = saved_fall_through;
}
void VisitDeclarations(ZoneList<Declaration*>* declarations);
@@ -459,6 +467,7 @@
Location location_;
Label* true_label_;
Label* false_label_;
+ Label* fall_through_;
friend class NestedStatement;
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698