The improvement is included in the port of r8367 to earlier versions of V8.
Review URL: http://codereview.chromium.org/7229011
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8370
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
if (spill_index > LUnallocated::kMaxFixedIndex) {
Abort("Too many spill slots needed for OSR");
+ spill_index = 0;
}
return DefineAsSpilled(new LUnknownOSRValue, spill_index);
}
const int locals_limit = LUnallocated::kMaxFixedIndex;
Scope* scope = info->scope();
if ((scope->num_parameters() + 1) > parameter_limit ||
- scope->num_stack_slots() > locals_limit) {
+ (info->osr_ast_id() != AstNode::kNoNumber &&
+ scope->num_parameters() + 1 + scope->num_stack_slots() > locals_limit)) {
info->AbortOptimization();
Handle<JSFunction> closure = info->closure();
info->shared_info()->DisableOptimization(*closure);
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
if (spill_index > LUnallocated::kMaxFixedIndex) {
Abort("Too many spill slots needed for OSR");
+ spill_index = 0;
}
return DefineAsSpilled(new LUnknownOSRValue, spill_index);
}
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
if (spill_index > LUnallocated::kMaxFixedIndex) {
Abort("Too many spill slots needed for OSR");
+ spill_index = 0;
}
return DefineAsSpilled(new LUnknownOSRValue, spill_index);
}