Unuse labels when bailing out of StubCompiler methods.

There are 3 methods where early return happen before the 
miss label is bound. This is harmless in Release mode, 
in Debug an assertion fails.

Review URL: http://codereview.chromium.org/3405022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
kaznacheev@chromium.org 2010-09-23 08:06:19 +00:00
parent 31284c01f8
commit e69278a70c
3 changed files with 37 additions and 9 deletions

View File

@ -2084,7 +2084,10 @@ Object* LoadStubCompiler::CompileLoadNonexistent(String* name,
name,
r1,
&miss);
if (cell->IsFailure()) return cell;
if (cell->IsFailure()) {
miss.Unuse();
return cell;
}
}
// Return undefined if maps of the full prototype chain are still the
@ -2134,7 +2137,10 @@ Object* LoadStubCompiler::CompileLoadCallback(String* name,
Failure* failure = Failure::InternalError();
bool success = GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4,
callback, name, &miss, &failure);
if (!success) return failure;
if (!success) {
miss.Unuse();
return failure;
}
__ bind(&miss);
GenerateLoadMiss(masm(), Code::LOAD_IC);
@ -2282,7 +2288,10 @@ Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
Failure* failure = Failure::InternalError();
bool success = GenerateLoadCallback(receiver, holder, r1, r0, r2, r3, r4,
callback, name, &miss, &failure);
if (!success) return failure;
if (!success) {
miss.Unuse();
return failure;
}
__ bind(&miss);
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);

View File

@ -2455,7 +2455,10 @@ Object* LoadStubCompiler::CompileLoadNonexistent(String* name,
name,
edx,
&miss);
if (cell->IsFailure()) return cell;
if (cell->IsFailure()) {
miss.Unuse();
return cell;
}
}
// Return undefined if maps of the full prototype chain are still the
@ -2505,7 +2508,10 @@ Object* LoadStubCompiler::CompileLoadCallback(String* name,
Failure* failure = Failure::InternalError();
bool success = GenerateLoadCallback(object, holder, eax, ecx, ebx, edx, edi,
callback, name, &miss, &failure);
if (!success) return failure;
if (!success) {
miss.Unuse();
return failure;
}
__ bind(&miss);
GenerateLoadMiss(masm(), Code::LOAD_IC);
@ -2666,9 +2672,13 @@ Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
Failure* failure = Failure::InternalError();
bool success = GenerateLoadCallback(receiver, holder, edx, eax, ebx, ecx, edi,
callback, name, &miss, &failure);
if (!success) return failure;
if (!success) {
miss.Unuse();
return failure;
}
__ bind(&miss);
__ DecrementCounter(&Counters::keyed_load_callback, 1);
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);

View File

@ -1701,7 +1701,10 @@ Object* LoadStubCompiler::CompileLoadCallback(String* name,
Failure* failure = Failure::InternalError();
bool success = GenerateLoadCallback(object, holder, rax, rcx, rbx, rdx, rdi,
callback, name, &miss, &failure);
if (!success) return failure;
if (!success) {
miss.Unuse();
return failure;
}
__ bind(&miss);
GenerateLoadMiss(masm(), Code::LOAD_IC);
@ -1757,7 +1760,10 @@ Object* LoadStubCompiler::CompileLoadNonexistent(String* name,
name,
rdx,
&miss);
if (cell->IsFailure()) return cell;
if (cell->IsFailure()) {
miss.Unuse();
return cell;
}
}
// Return undefined if maps of the full prototype chain are still the
@ -1895,7 +1901,10 @@ Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name,
Failure* failure = Failure::InternalError();
bool success = GenerateLoadCallback(receiver, holder, rdx, rax, rbx, rcx, rdi,
callback, name, &miss, &failure);
if (!success) return failure;
if (!success) {
miss.Unuse();
return failure;
}
__ bind(&miss);
__ DecrementCounter(&Counters::keyed_load_callback, 1);