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

Unified Diff: src/fast-codegen.cc

Issue 341081: Begin using the top-level code generator for code that is inside... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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
Index: src/fast-codegen.cc
===================================================================
--- src/fast-codegen.cc (revision 3203)
+++ src/fast-codegen.cc (working copy)
@@ -75,6 +75,7 @@
void FastCodeGenerator::VisitDeclarations(
ZoneList<Declaration*>* declarations) {
+ Comment cmnt(masm_, "[ Declarations");
int length = declarations->length();
int globals = 0;
for (int i = 0; i < length; i++) {
@@ -289,6 +290,7 @@
void FastCodeGenerator::VisitIfStatement(IfStatement* stmt) {
+ Comment cmnt(masm_, "[ IfStatement");
// Expressions cannot recursively enter statements, there are no labels in
// the state.
ASSERT_EQ(NULL, true_label_);
@@ -350,9 +352,11 @@
void FastCodeGenerator::VisitForStatement(ForStatement* stmt) {
+ Comment cmnt(masm_, "[ ForStatement");
Label test, body, exit;
if (stmt->init() != NULL) Visit(stmt->init());
+ increment_loop_depth();
Søren Thygesen Gjesse 2009/11/03 13:57:47 How placing the increment_loop_depth()/decrement_l
Kevin Millikin (Chromium) 2009/11/03 14:16:09 I thought about that, but it seemed too complicate
// Emit the test at the bottom of the loop (even if empty).
__ jmp(&test);
__ bind(&body);
@@ -377,6 +381,7 @@
}
__ bind(&exit);
+ decrement_loop_depth();
}
@@ -407,6 +412,7 @@
void FastCodeGenerator::VisitConditional(Conditional* expr) {
+ Comment cmnt(masm_, "[ Conditional");
ASSERT_EQ(Expression::kTest, expr->condition()->context());
ASSERT_EQ(expr->context(), expr->then_expression()->context());
ASSERT_EQ(expr->context(), expr->else_expression()->context());
@@ -447,6 +453,7 @@
void FastCodeGenerator::VisitLiteral(Literal* expr) {
+ Comment cmnt(masm_, "[ Literal");
Move(expr->context(), expr);
}
« src/ast.h ('K') | « src/fast-codegen.h ('k') | src/ia32/fast-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698