From: kaznacheev@chromium.org Date: Thu, 23 Sep 2010 08:06:19 +0000 (+0000) Subject: Unuse labels when bailing out of StubCompiler methods. X-Git-Tag: upstream/4.7.83~21175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e69278a70cc6b02eaf13f46c04bd73d8eab3b4e0;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index 070e352..659f29c 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -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); diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index 672d8c7..dd0d636 100644 --- a/src/ia32/stub-cache-ia32.cc +++ b/src/ia32/stub-cache-ia32.cc @@ -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); diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 75956eb..68b18a2 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -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);