-
fpizlo@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=89617 Reviewed by Oliver Hunt. This adds inlining of ResolveGlobal accesses that are known monomorphic. It also adds the specific function optimization to ResolveGlobal, when it is inlined. And, it makes internal functions act like specific functions, since that will be the most common use-case of this optimization. This is only a slighy speed-up (sub 1%), since we don't yet do the obvious thing with this optimization, which is to completely inline common "globally resolved" function and constructor calls, like "new Array()". * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::globalResolveInfoForBytecodeOffset): * bytecode/CodeBlock.h: (CodeBlock): (JSC::CodeBlock::numberOfGlobalResolveInfos): * bytecode/GlobalResolveInfo.h: (JSC::getGlobalResolveInfoBytecodeOffset): (JSC): * bytecode/ResolveGlobalStatus.cpp: Added. (JSC): (JSC::computeForStructure): (JSC::computeForLLInt): (JSC::ResolveGlobalStatus::computeFor): * bytecode/ResolveGlobalStatus.h: Added. (JSC): (ResolveGlobalStatus): (JSC::ResolveGlobalStatus::ResolveGlobalStatus): (JSC::ResolveGlobalStatus::state): (JSC::ResolveGlobalStatus::isSet): (JSC::ResolveGlobalStatus::operator!): (JSC::ResolveGlobalStatus::isSimple): (JSC::ResolveGlobalStatus::takesSlowPath): (JSC::ResolveGlobalStatus::structure): (JSC::ResolveGlobalStatus::offset): (JSC::ResolveGlobalStatus::specificValue): * dfg/DFGByteCodeParser.cpp: (ByteCodeParser): (JSC::DFG::ByteCodeParser::handleGetByOffset): (DFG): (JSC::DFG::ByteCodeParser::handleGetById): (JSC::DFG::ByteCodeParser::parseBlock): * runtime/JSObject.cpp: (JSC::getCallableObjectSlow): (JSC): (JSC::JSObject::put): (JSC::JSObject::putDirectVirtual): (JSC::JSObject::putDirectAccessor): * runtime/JSObject.h: (JSC): (JSC::getCallableObject): (JSC::JSObject::putOwnDataProperty): (JSC::JSObject::putDirect): (JSC::JSObject::putDirectWithoutTransition): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3bcb211b