Slightly improve r8367, fix to overflow of on-stack replacement.
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
This commit is contained in:
parent
a8921c4681
commit
183efaee32
@ -2122,6 +2122,7 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
||||
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);
|
||||
}
|
||||
|
@ -217,7 +217,8 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
|
||||
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);
|
||||
|
@ -2170,6 +2170,7 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
||||
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);
|
||||
}
|
||||
|
@ -2114,6 +2114,7 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user