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

Unified Diff: src/fast-codegen.cc

Issue 550043: Fix issue 541 and some refactoring of the top-level compiler. (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/fast-codegen.h ('k') | src/ia32/fast-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-codegen.cc
===================================================================
--- src/fast-codegen.cc (revision 3610)
+++ src/fast-codegen.cc (working copy)
@@ -639,9 +639,6 @@
void FastCodeGenerator::VisitAssignment(Assignment* expr) {
Comment cmnt(masm_, "[ Assignment");
- // Record source code position of the (possible) IC call.
- SetSourcePosition(expr->position());
-
// Left-hand side can only be a property, a global or a (parameter or local)
// slot. Variables with rewrite to .arguments are treated as KEYED_PROPERTY.
enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
@@ -682,10 +679,12 @@
Expression::kValue);
break;
case NAMED_PROPERTY:
- EmitNamedPropertyLoad(prop, Expression::kValue);
+ EmitNamedPropertyLoad(prop);
+ __ push(result_register());
break;
case KEYED_PROPERTY:
- EmitKeyedPropertyLoad(prop, Expression::kValue);
+ EmitKeyedPropertyLoad(prop);
+ __ push(result_register());
break;
}
}
@@ -700,6 +699,9 @@
EmitCompoundAssignmentOp(expr->binary_op(), Expression::kValue);
}
+ // Record source position before possible IC call.
+ SetSourcePosition(expr->position());
+
// Store the value.
switch (assign_type) {
case VARIABLE:
« no previous file with comments | « 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