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

Unified Diff: src/full-codegen.cc

Issue 3203005: Start using the overwrite mode from the full codegens to generate... (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/full-codegen.h ('k') | src/ia32/code-stubs-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
===================================================================
--- src/full-codegen.cc (revision 5338)
+++ src/full-codegen.cc (working copy)
@@ -317,6 +317,13 @@
}
+bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) {
+ if (Debugger::IsDebuggerActive()) return false;
+ if (op == Token::DIV ||op == Token::MOD) return false;
+ return loop_depth_ > 0;
+}
+
+
void FullCodeGenerator::PrepareTest(Label* materialize_true,
Label* materialize_false,
Label** if_true,
@@ -503,6 +510,14 @@
void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) {
Comment cmnt(masm_, "[ BinaryOperation");
+
+ OverwriteMode overwrite_mode = NO_OVERWRITE;
+ if (expr->left()->ResultOverwriteAllowed()) {
+ overwrite_mode = OVERWRITE_LEFT;
+ } else if (expr->right()->ResultOverwriteAllowed()) {
+ overwrite_mode = OVERWRITE_RIGHT;
+ }
+
switch (expr->op()) {
case Token::COMMA:
VisitForEffect(expr->left());
@@ -528,7 +543,7 @@
VisitForValue(expr->left(), kStack);
VisitForValue(expr->right(), kAccumulator);
SetSourcePosition(expr->position());
- EmitBinaryOp(expr->op(), context_);
+ EmitBinaryOp(expr->op(), context_, overwrite_mode);
break;
default:
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/code-stubs-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698