From: fpizlo@apple.com Date: Fri, 22 Apr 2016 01:25:50 +0000 (+0000) Subject: JSC virtual call thunk shouldn't do a structure->classInfo lookup X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=b0accb134d1beea0123ac8d6046644700e7cad0d JSC virtual call thunk shouldn't do a structure->classInfo lookup https://bugs.webkit.org/show_bug.cgi?id=156874 Reviewed by Keith Miller. This lookup was unnecessary because we can just test the inlined type field. But also, this meant that we were exempting JSBoundFunction from the virtual call optimization. That's pretty bad. * jit/ThunkGenerators.cpp: (JSC::virtualThunkFor): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199861 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 985e078..00acead 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,18 @@ +2016-04-21 Filip Pizlo + + JSC virtual call thunk shouldn't do a structure->classInfo lookup + https://bugs.webkit.org/show_bug.cgi?id=156874 + + Reviewed by Keith Miller. + + This lookup was unnecessary because we can just test the inlined type field. + + But also, this meant that we were exempting JSBoundFunction from the virtual call optimization. + That's pretty bad. + + * jit/ThunkGenerators.cpp: + (JSC::virtualThunkFor): + 2016-04-21 Joseph Pecoraro Web Inspector: sourceMappingURL not loaded in generated script diff --git a/Source/JavaScriptCore/jit/ThunkGenerators.cpp b/Source/JavaScriptCore/jit/ThunkGenerators.cpp index 38439d6..dea3a7c 100644 --- a/Source/JavaScriptCore/jit/ThunkGenerators.cpp +++ b/Source/JavaScriptCore/jit/ThunkGenerators.cpp @@ -189,12 +189,7 @@ MacroAssemblerCodeRef virtualThunkFor(VM* vm, CallLinkInfo& callLinkInfo) CCallHelpers::NotEqual, GPRInfo::regT1, CCallHelpers::TrustedImm32(JSValue::CellTag))); #endif - jit.emitLoadStructure(GPRInfo::regT0, GPRInfo::regT4, GPRInfo::regT1); - slowCase.append( - jit.branchPtr( - CCallHelpers::NotEqual, - CCallHelpers::Address(GPRInfo::regT4, Structure::classInfoOffset()), - CCallHelpers::TrustedImmPtr(JSFunction::info()))); + slowCase.append(jit.branchIfNotType(GPRInfo::regT0, JSFunctionType)); // Now we know we have a JSFunction.