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

Unified Diff: src/codegen-ia32.cc

Issue 11346: Experimental: peridic merge from bleeding_edge. Merge... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 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
« no previous file with comments | « src/codegen-ia32.h ('k') | src/compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 813)
+++ src/codegen-ia32.cc (working copy)
@@ -109,6 +109,10 @@
cc_reg_ = no_condition;
function_return_.set_code_generator(this);
function_return_is_shadowed_ = false;
+
+ // Adjust for function-level loop nesting.
+ loop_nesting_ += fun->loop_nesting();
+
{
CodeGenState state(this);
@@ -294,6 +298,9 @@
}
}
+ // Adjust for function-level loop nesting.
+ loop_nesting_ -= fun->loop_nesting();
+
// Code generation state must be reset.
ASSERT(!function_return_is_shadowed_);
function_return_.Unuse();
@@ -301,6 +308,7 @@
delete_frame();
ASSERT(!has_cc());
ASSERT(state_ == NULL);
+ ASSERT(loop_nesting() == 0);
}
@@ -2853,7 +2861,6 @@
// patch the stack to use the global proxy as 'this' in the
// invoked function.
LoadGlobal();
-
// Load the arguments.
int arg_count = args->length();
for (int i = 0; i < arg_count; i++) {
@@ -2861,7 +2868,9 @@
}
// Setup the receiver register and call the IC initialization code.
- Handle<Code> stub = ComputeCallInitialize(arg_count);
+ Handle<Code> stub = (loop_nesting() > 0)
+ ? ComputeCallInitializeInLoop(arg_count)
+ : ComputeCallInitialize(arg_count);
__ RecordPosition(node->position());
frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET_CONTEXT,
arg_count + 1);
@@ -2909,7 +2918,9 @@
}
// Call the IC initialization code.
- Handle<Code> stub = ComputeCallInitialize(arg_count);
+ Handle<Code> stub = (loop_nesting() > 0)
+ ? ComputeCallInitializeInLoop(arg_count)
+ : ComputeCallInitialize(arg_count);
__ RecordPosition(node->position());
frame_->CallCodeObject(stub, RelocInfo::CODE_TARGET, arg_count + 1);
__ mov(esi, frame_->Context());
« no previous file with comments | « src/codegen-ia32.h ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698