Changeset 108358 in webkit
- Timestamp:
- Feb 21, 2012 8:26:12 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 deleted
- 79 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/CMakeLists.txt
r108309 r108358 12 12 "${JAVASCRIPTCORE_DIR}/interpreter" 13 13 "${JAVASCRIPTCORE_DIR}/jit" 14 "${JAVASCRIPTCORE_DIR}/llint"15 14 "${JAVASCRIPTCORE_DIR}/parser" 16 15 "${JAVASCRIPTCORE_DIR}/profiler" … … 104 103 105 104 jit/ExecutableAllocator.cpp 106 jit/HostCallReturnValue.cpp107 105 jit/JITArithmetic32_64.cpp 108 106 jit/JITArithmetic.cpp -
trunk/Source/JavaScriptCore/ChangeLog
r108347 r108358 1 2012-02-21 Adam Roben <aroben@apple.com> 2 3 Roll out r108309, r108323, and r108326 4 5 They broke the 32-bit Lion build. 6 7 Original bugs is <http://webkit.org/b/75812> <rdar://problem/10079694>. 8 9 * CMakeLists.txt: 10 * GNUmakefile.am: 11 * GNUmakefile.list.am: 12 * JavaScriptCore.pri: 13 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: 14 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: 15 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: 16 * JavaScriptCore.xcodeproj/project.pbxproj: 17 * Target.pri: 18 * assembler/LinkBuffer.h: 19 * assembler/MacroAssemblerCodeRef.h: 20 * bytecode/BytecodeConventions.h: Removed. 21 * bytecode/CallLinkStatus.cpp: 22 * bytecode/CallLinkStatus.h: 23 * bytecode/CodeBlock.cpp: 24 * bytecode/CodeBlock.h: 25 * bytecode/GetByIdStatus.cpp: 26 * bytecode/GetByIdStatus.h: 27 * bytecode/Instruction.h: 28 * bytecode/LLIntCallLinkInfo.h: Removed. 29 * bytecode/MethodCallLinkStatus.cpp: 30 * bytecode/Opcode.cpp: 31 * bytecode/Opcode.h: 32 * bytecode/PutByIdStatus.cpp: 33 * bytecode/PutByIdStatus.h: 34 * bytecompiler/BytecodeGenerator.cpp: 35 * dfg/DFGByteCodeParser.cpp: 36 * dfg/DFGCapabilities.h: 37 * dfg/DFGOSRExitCompiler.cpp: 38 * dfg/DFGOperations.cpp: 39 * heap/Heap.h: 40 * heap/MarkStack.cpp: 41 * heap/MarkedAllocator.h: 42 * heap/MarkedSpace.h: 43 * interpreter/CallFrame.cpp: 44 * interpreter/CallFrame.h: 45 * interpreter/Interpreter.cpp: 46 * interpreter/Interpreter.h: 47 * interpreter/RegisterFile.h: 48 * jit/ExecutableAllocator.h: 49 * jit/HostCallReturnValue.cpp: Removed. 50 * jit/HostCallReturnValue.h: Removed. 51 * jit/JIT.cpp: 52 * jit/JITCode.h: 53 * jit/JITDriver.h: 54 * jit/JITExceptions.cpp: 55 * jit/JITInlineMethods.h: 56 * jit/JITStubs.cpp: 57 * jit/JITStubs.h: 58 * jit/JSInterfaceJIT.h: 59 * llint/LLIntCommon.h: Removed. 60 * llint/LLIntData.cpp: Removed. 61 * llint/LLIntData.h: Removed. 62 * llint/LLIntEntrypoints.cpp: Removed. 63 * llint/LLIntEntrypoints.h: Removed. 64 * llint/LLIntExceptions.cpp: Removed. 65 * llint/LLIntExceptions.h: Removed. 66 * llint/LLIntOfflineAsmConfig.h: Removed. 67 * llint/LLIntOffsetsExtractor.cpp: Removed. 68 * llint/LLIntSlowPaths.cpp: Removed. 69 * llint/LLIntSlowPaths.h: Removed. 70 * llint/LLIntThunks.cpp: Removed. 71 * llint/LLIntThunks.h: Removed. 72 * llint/LowLevelInterpreter.asm: Removed. 73 * llint/LowLevelInterpreter.cpp: Removed. 74 * llint/LowLevelInterpreter.h: Removed. 75 * offlineasm/armv7.rb: Removed. 76 * offlineasm/asm.rb: Removed. 77 * offlineasm/ast.rb: Removed. 78 * offlineasm/backends.rb: Removed. 79 * offlineasm/generate_offset_extractor.rb: Removed. 80 * offlineasm/instructions.rb: Removed. 81 * offlineasm/offset_extractor_constants.rb: Removed. 82 * offlineasm/offsets.rb: Removed. 83 * offlineasm/opt.rb: Removed. 84 * offlineasm/parser.rb: Removed. 85 * offlineasm/registers.rb: Removed. 86 * offlineasm/self_hash.rb: Removed. 87 * offlineasm/settings.rb: Removed. 88 * offlineasm/transform.rb: Removed. 89 * offlineasm/x86.rb: Removed. 90 * runtime/CodeSpecializationKind.h: Removed. 91 * runtime/CommonSlowPaths.h: 92 * runtime/Executable.cpp: 93 * runtime/Executable.h: 94 * runtime/ExecutionHarness.h: Removed. 95 * runtime/JSArray.h: 96 * runtime/JSCell.h: 97 * runtime/JSFunction.h: 98 * runtime/JSGlobalData.cpp: 99 * runtime/JSGlobalData.h: 100 * runtime/JSGlobalObject.h: 101 * runtime/JSObject.h: 102 * runtime/JSPropertyNameIterator.h: 103 * runtime/JSString.h: 104 * runtime/JSTypeInfo.h: 105 * runtime/JSValue.cpp: 106 * runtime/JSValue.h: 107 * runtime/JSVariableObject.h: 108 * runtime/Options.cpp: 109 * runtime/Options.h: 110 * runtime/ScopeChain.h: 111 * runtime/Structure.cpp: 112 * runtime/Structure.h: 113 * runtime/StructureChain.h: 114 * wtf/InlineASM.h: 115 * wtf/Platform.h: 116 * wtf/SentinelLinkedList.h: 117 * wtf/text/StringImpl.h: 118 1 119 2012-02-21 Gustavo Noronha Silva <kov@debian.org> and Bob Tracy <rct@frus.com> 2 120 -
trunk/Source/JavaScriptCore/GNUmakefile.am
r108309 r108358 58 58 -I$(srcdir)/Source/JavaScriptCore/jit \ 59 59 -I$(srcdir)/Source/JavaScriptCore/jit \ 60 -I$(srcdir)/Source/JavaScriptCore/llint \61 60 -I$(srcdir)/Source/JavaScriptCore/parser \ 62 61 -I$(srcdir)/Source/JavaScriptCore/profiler \ -
trunk/Source/JavaScriptCore/GNUmakefile.list.am
r108309 r108358 82 82 Source/JavaScriptCore/assembler/SH4Assembler.h \ 83 83 Source/JavaScriptCore/assembler/X86Assembler.h \ 84 Source/JavaScriptCore/bytecode/BytecodeConventions.h \85 84 Source/JavaScriptCore/bytecode/CallLinkInfo.cpp \ 86 85 Source/JavaScriptCore/bytecode/CallLinkInfo.h \ … … 104 103 Source/JavaScriptCore/bytecode/JumpTable.cpp \ 105 104 Source/JavaScriptCore/bytecode/JumpTable.h \ 106 Source/JavaScriptCore/bytecode/LLIntCallLinkInfo.h \107 105 Source/JavaScriptCore/bytecode/LineInfo.h \ 108 106 Source/JavaScriptCore/bytecode/MethodCallLinkInfo.cpp \ … … 300 298 Source/JavaScriptCore/jit/ExecutableAllocator.cpp \ 301 299 Source/JavaScriptCore/jit/ExecutableAllocator.h \ 302 Source/JavaScriptCore/jit/HostCallReturnValue.cpp \303 Source/JavaScriptCore/jit/HostCallReturnValue.h \304 300 Source/JavaScriptCore/jit/JITArithmetic32_64.cpp \ 305 301 Source/JavaScriptCore/jit/JITArithmetic.cpp \ … … 325 321 Source/JavaScriptCore/jit/ThunkGenerators.cpp \ 326 322 Source/JavaScriptCore/jit/ThunkGenerators.h \ 327 Source/JavaScriptCore/llint/LLIntData.h \328 323 Source/JavaScriptCore/os-win32/stdbool.h \ 329 324 Source/JavaScriptCore/os-win32/stdint.h \ … … 376 371 Source/JavaScriptCore/runtime/CallData.h \ 377 372 Source/JavaScriptCore/runtime/ClassInfo.h \ 378 Source/JavaScriptCore/runtime/CodeSpecializationKind.h \379 373 Source/JavaScriptCore/runtime/CommonIdentifiers.cpp \ 380 374 Source/JavaScriptCore/runtime/CommonIdentifiers.h \ … … 405 399 Source/JavaScriptCore/runtime/Executable.cpp \ 406 400 Source/JavaScriptCore/runtime/Executable.h \ 407 Source/JavaScriptCore/runtime/ExecutionHarness.h \408 401 Source/JavaScriptCore/runtime/FunctionConstructor.cpp \ 409 402 Source/JavaScriptCore/runtime/FunctionConstructor.h \ -
trunk/Source/JavaScriptCore/JavaScriptCore.pri
r108309 r108358 21 21 $$SOURCE_DIR/interpreter \ 22 22 $$SOURCE_DIR/jit \ 23 $$SOURCE_DIR/llint \24 23 $$SOURCE_DIR/parser \ 25 24 $$SOURCE_DIR/profiler \ -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
r108309 r108358 1763 1763 </File> 1764 1764 <File 1765 RelativePath="..\..\jit\HostCallReturnValue.cpp"1766 >1767 </File>1768 <File1769 1765 RelativePath="..\..\jit\JIT.cpp" 1770 1766 > … … 1848 1844 <File 1849 1845 RelativePath="..\..\jit\ThunkGenerators.h" 1850 >1851 </File>1852 </Filter>1853 <Filter1854 Name="llint"1855 >1856 <File1857 RelativePath="..\..\llint\LLIntData.h"1858 1846 > 1859 1847 </File> -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops
r108309 r108358 7 7 <Tool 8 8 Name="VCCLCompilerTool" 9 AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\";../../;../../API/;../../parser/;../../bytecompiler/;../../dfg/;../../jit/;../../ llint/;../../runtime/;../../tools/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;../../heap/;"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(ConfigurationBuildDir)\include\private";"$(WebKitLibrariesDir)\include\pthreads""9 AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\obj\JavaScriptCore\DerivedSources\";../../;../../API/;../../parser/;../../bytecompiler/;../../dfg/;../../jit/;../../runtime/;../../tools/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;../../heap/;"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(ConfigurationBuildDir)\include\private";"$(WebKitLibrariesDir)\include\pthreads"" 10 10 PreprocessorDefinitions="__STD_C" 11 11 ForcedIncludeFiles="ICUVersion.h" -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd
r108309 r108358 44 44 interpreter 45 45 jit 46 llint47 46 parser 48 47 profiler -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r108309 r108358 8 8 9 9 /* Begin PBXAggregateTarget section */ 10 0F4680A914BA7FD900BFE272 /* LLInt Offsets */ = {11 isa = PBXAggregateTarget;12 buildConfigurationList = 0F4680AC14BA7FD900BFE272 /* Build configuration list for PBXAggregateTarget "LLInt Offsets" */;13 buildPhases = (14 0F4680AA14BA7FD900BFE272 /* Generate Derived Sources */,15 );16 name = "LLInt Offsets";17 productName = "Derived Sources";18 };19 10 65FB3F6609D11E9100F49DEB /* Derived Sources */ = { 20 11 isa = PBXAggregateTarget; … … 23 14 65FB3F6509D11E9100F49DEB /* Generate Derived Sources */, 24 15 5D35DEE10C7C140B008648B2 /* Generate DTrace header */, 25 );26 dependencies = (27 0F4680B414BA821400BFE272 /* PBXTargetDependency */,28 16 ); 29 17 name = "Derived Sources"; … … 61 49 0BCD83571485845200EA2003 /* TemporaryChange.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BCD83541485841200EA2003 /* TemporaryChange.h */; settings = {ATTRIBUTES = (Private, ); }; }; 62 50 0BF28A2911A33DC300638F84 /* SizeLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */; }; 63 0F0B839A14BCF45D00885B4F /* LLIntEntrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F0B839514BCF45A00885B4F /* LLIntEntrypoints.cpp */; };64 0F0B839B14BCF46000885B4F /* LLIntEntrypoints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B839614BCF45A00885B4F /* LLIntEntrypoints.h */; settings = {ATTRIBUTES = (Private, ); }; };65 0F0B839C14BCF46300885B4F /* LLIntThunks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F0B839714BCF45A00885B4F /* LLIntThunks.cpp */; };66 0F0B839D14BCF46600885B4F /* LLIntThunks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B839814BCF45A00885B4F /* LLIntThunks.h */; settings = {ATTRIBUTES = (Private, ); }; };67 51 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83A514BCF50400885B4F /* CodeType.h */; settings = {ATTRIBUTES = (Private, ); }; }; 68 52 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 75 59 0F0B83B714BCF8E100885B4F /* GlobalResolveInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B614BCF8DF00885B4F /* GlobalResolveInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 76 60 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */; settings = {ATTRIBUTES = (Private, ); }; }; 77 0F0FC45A14BD15F500B81154 /* LLIntCallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };78 61 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */; settings = {ATTRIBUTES = (Private, ); }; }; 79 62 0F16D726142C39C000CF784A /* BitVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F16D724142C39A200CF784A /* BitVector.cpp */; }; 80 63 0F21C26814BE5F6800ADC64B /* JITDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F21C26614BE5F5E00ADC64B /* JITDriver.h */; settings = {ATTRIBUTES = (Private, ); }; }; 81 0F21C27C14BE727600ADC64B /* ExecutionHarness.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F21C27A14BE727300ADC64B /* ExecutionHarness.h */; settings = {ATTRIBUTES = (Private, ); }; };82 0F21C27D14BE727A00ADC64B /* CodeSpecializationKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F21C27914BE727300ADC64B /* CodeSpecializationKind.h */; settings = {ATTRIBUTES = (Private, ); }; };83 0F21C27F14BEAA8200ADC64B /* BytecodeConventions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F21C27E14BEAA8000ADC64B /* BytecodeConventions.h */; settings = {ATTRIBUTES = (Private, ); }; };84 64 0F242DA713F3B1E8007ADD4C /* WeakReferenceHarvester.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */; settings = {ATTRIBUTES = (Private, ); }; }; 85 65 0F2C556F14738F3100121E4F /* DFGCodeBlocks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 92 72 0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F46808014BA572700BFE272 /* JITExceptions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 93 73 0F46808314BA573100BFE272 /* JITExceptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F46807F14BA572700BFE272 /* JITExceptions.cpp */; }; 94 0F4680A314BA7F8D00BFE272 /* LLIntExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F46809E14BA7F8200BFE272 /* LLIntExceptions.h */; settings = {ATTRIBUTES = (Private, ); }; };95 0F4680A414BA7F8D00BFE272 /* LLIntSlowPaths.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F46809F14BA7F8200BFE272 /* LLIntSlowPaths.cpp */; settings = {COMPILER_FLAGS = "-Wno-unused-parameter"; }; };96 0F4680A514BA7F8D00BFE272 /* LLIntSlowPaths.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680A014BA7F8200BFE272 /* LLIntSlowPaths.h */; settings = {ATTRIBUTES = (Private, ); }; };97 0F4680A714BA7FA100BFE272 /* LLIntOffsetsExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4680A114BA7F8200BFE272 /* LLIntOffsetsExtractor.cpp */; };98 0F4680A814BA7FAB00BFE272 /* LLIntExceptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F46809D14BA7F8200BFE272 /* LLIntExceptions.cpp */; };99 0F4680CA14BBB16C00BFE272 /* LLIntCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680C514BBB16900BFE272 /* LLIntCommon.h */; settings = {ATTRIBUTES = (Private, ); }; };100 0F4680CB14BBB17200BFE272 /* LLIntOfflineAsmConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680C614BBB16900BFE272 /* LLIntOfflineAsmConfig.h */; settings = {ATTRIBUTES = (Private, ); }; };101 0F4680CC14BBB17A00BFE272 /* LowLevelInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4680C714BBB16900BFE272 /* LowLevelInterpreter.cpp */; };102 0F4680CD14BBB17D00BFE272 /* LowLevelInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680C814BBB16900BFE272 /* LowLevelInterpreter.h */; settings = {ATTRIBUTES = (Private, ); }; };103 0F4680D214BBD16500BFE272 /* LLIntData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4680CE14BBB3D100BFE272 /* LLIntData.cpp */; };104 0F4680D314BBD16700BFE272 /* LLIntData.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680CF14BBB3D100BFE272 /* LLIntData.h */; settings = {ATTRIBUTES = (Private, ); }; };105 0F4680D414BBD24900BFE272 /* HostCallReturnValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4680D014BBC5F800BFE272 /* HostCallReturnValue.cpp */; };106 0F4680D514BBD24B00BFE272 /* HostCallReturnValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */; settings = {ATTRIBUTES = (Private, ); }; };107 74 0F55F0F414D1063900AC7649 /* AbstractPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F55F0F114D1063600AC7649 /* AbstractPC.cpp */; }; 108 75 0F55F0F514D1063C00AC7649 /* AbstractPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F55F0F214D1063600AC7649 /* AbstractPC.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 453 420 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BB09BE138E381B0056702F /* DFGRepatch.cpp */; }; 454 421 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BB09BF138E381B0056702F /* DFGRepatch.h */; }; 455 86C36EEA0EE1289D00B3DF59 /* MacroAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */; settings = {ATTRIBUTES = (Private, ); };};422 86C36EEA0EE1289D00B3DF59 /* MacroAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */; }; 456 423 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86C568DD11A213EE0007F7F0 /* MacroAssemblerARM.cpp */; }; 457 424 86C568E111A213EE0007F7F0 /* MacroAssemblerMIPS.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C568DE11A213EE0007F7F0 /* MacroAssemblerMIPS.h */; }; … … 824 791 825 792 /* Begin PBXContainerItemProxy section */ 826 0F4680B114BA811500BFE272 /* PBXContainerItemProxy */ = {827 isa = PBXContainerItemProxy;828 containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;829 proxyType = 1;830 remoteGlobalIDString = 0F4680A914BA7FD900BFE272;831 remoteInfo = "LLInt Offsets";832 };833 0F4680B314BA821400BFE272 /* PBXContainerItemProxy */ = {834 isa = PBXContainerItemProxy;835 containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;836 proxyType = 1;837 remoteGlobalIDString = 0F46808E14BA7E5E00BFE272;838 remoteInfo = JSCLLIntOffsetsExtractor;839 };840 793 141214BE0A49190E00480255 /* PBXContainerItemProxy */ = { 841 794 isa = PBXContainerItemProxy; … … 883 836 884 837 /* Begin PBXCopyFilesBuildPhase section */ 885 0F46808D14BA7E5E00BFE272 /* CopyFiles */ = {886 isa = PBXCopyFilesBuildPhase;887 buildActionMask = 2147483647;888 dstPath = /usr/share/man/man1/;889 dstSubfolderSpec = 0;890 files = (891 );892 runOnlyForDeploymentPostprocessing = 1;893 };894 838 5DBB1511131D0B130056AD36 /* Copy Support Script */ = { 895 839 isa = PBXCopyFilesBuildPhase; … … 932 876 0BCD83541485841200EA2003 /* TemporaryChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TemporaryChange.h; sourceTree = "<group>"; }; 933 877 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SizeLimits.cpp; sourceTree = "<group>"; }; 934 0F0B839514BCF45A00885B4F /* LLIntEntrypoints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntEntrypoints.cpp; path = llint/LLIntEntrypoints.cpp; sourceTree = "<group>"; };935 0F0B839614BCF45A00885B4F /* LLIntEntrypoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntEntrypoints.h; path = llint/LLIntEntrypoints.h; sourceTree = "<group>"; };936 0F0B839714BCF45A00885B4F /* LLIntThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntThunks.cpp; path = llint/LLIntThunks.cpp; sourceTree = "<group>"; };937 0F0B839814BCF45A00885B4F /* LLIntThunks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntThunks.h; path = llint/LLIntThunks.h; sourceTree = "<group>"; };938 878 0F0B83A514BCF50400885B4F /* CodeType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeType.h; sourceTree = "<group>"; }; 939 879 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HandlerInfo.h; sourceTree = "<group>"; }; … … 946 886 0F0B83B614BCF8DF00885B4F /* GlobalResolveInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalResolveInfo.h; sourceTree = "<group>"; }; 947 887 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallReturnOffsetToBytecodeOffset.h; sourceTree = "<group>"; }; 948 0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLIntCallLinkInfo.h; sourceTree = "<group>"; };949 888 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonSlowPaths.h; sourceTree = "<group>"; }; 950 889 0F16D724142C39A200CF784A /* BitVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BitVector.cpp; sourceTree = "<group>"; }; 951 890 0F21C26614BE5F5E00ADC64B /* JITDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITDriver.h; sourceTree = "<group>"; }; 952 0F21C27914BE727300ADC64B /* CodeSpecializationKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeSpecializationKind.h; sourceTree = "<group>"; };953 0F21C27A14BE727300ADC64B /* ExecutionHarness.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutionHarness.h; sourceTree = "<group>"; };954 0F21C27E14BEAA8000ADC64B /* BytecodeConventions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BytecodeConventions.h; sourceTree = "<group>"; };955 891 0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakReferenceHarvester.h; sourceTree = "<group>"; }; 956 892 0F2C556D14738F2E00121E4F /* DFGCodeBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFGCodeBlocks.cpp; sourceTree = "<group>"; }; … … 963 899 0F46807F14BA572700BFE272 /* JITExceptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITExceptions.cpp; sourceTree = "<group>"; }; 964 900 0F46808014BA572700BFE272 /* JITExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITExceptions.h; sourceTree = "<group>"; }; 965 0F46808F14BA7E5E00BFE272 /* JSCLLIntOffsetsExtractor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = JSCLLIntOffsetsExtractor; sourceTree = BUILT_PRODUCTS_DIR; };966 0F46809D14BA7F8200BFE272 /* LLIntExceptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntExceptions.cpp; path = llint/LLIntExceptions.cpp; sourceTree = "<group>"; };967 0F46809E14BA7F8200BFE272 /* LLIntExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntExceptions.h; path = llint/LLIntExceptions.h; sourceTree = "<group>"; };968 0F46809F14BA7F8200BFE272 /* LLIntSlowPaths.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntSlowPaths.cpp; path = llint/LLIntSlowPaths.cpp; sourceTree = "<group>"; };969 0F4680A014BA7F8200BFE272 /* LLIntSlowPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntSlowPaths.h; path = llint/LLIntSlowPaths.h; sourceTree = "<group>"; };970 0F4680A114BA7F8200BFE272 /* LLIntOffsetsExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntOffsetsExtractor.cpp; path = llint/LLIntOffsetsExtractor.cpp; sourceTree = "<group>"; };971 0F4680C514BBB16900BFE272 /* LLIntCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntCommon.h; path = llint/LLIntCommon.h; sourceTree = "<group>"; };972 0F4680C614BBB16900BFE272 /* LLIntOfflineAsmConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntOfflineAsmConfig.h; path = llint/LLIntOfflineAsmConfig.h; sourceTree = "<group>"; };973 0F4680C714BBB16900BFE272 /* LowLevelInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LowLevelInterpreter.cpp; path = llint/LowLevelInterpreter.cpp; sourceTree = "<group>"; };974 0F4680C814BBB16900BFE272 /* LowLevelInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LowLevelInterpreter.h; path = llint/LowLevelInterpreter.h; sourceTree = "<group>"; };975 0F4680CE14BBB3D100BFE272 /* LLIntData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntData.cpp; path = llint/LLIntData.cpp; sourceTree = "<group>"; };976 0F4680CF14BBB3D100BFE272 /* LLIntData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntData.h; path = llint/LLIntData.h; sourceTree = "<group>"; };977 0F4680D014BBC5F800BFE272 /* HostCallReturnValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostCallReturnValue.cpp; sourceTree = "<group>"; };978 0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostCallReturnValue.h; sourceTree = "<group>"; };979 901 0F55F0F114D1063600AC7649 /* AbstractPC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AbstractPC.cpp; sourceTree = "<group>"; }; 980 902 0F55F0F214D1063600AC7649 /* AbstractPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractPC.h; sourceTree = "<group>"; }; … … 1735 1657 1736 1658 /* Begin PBXFrameworksBuildPhase section */ 1737 0F46808C14BA7E5E00BFE272 /* Frameworks */ = {1738 isa = PBXFrameworksBuildPhase;1739 buildActionMask = 2147483647;1740 files = (1741 );1742 runOnlyForDeploymentPostprocessing = 0;1743 };1744 1659 1412111E0A48793C00480255 /* Frameworks */ = { 1745 1660 isa = PBXFrameworksBuildPhase; … … 1800 1715 14BD59BF0A3E8F9000BAF59C /* testapi */, 1801 1716 6511230514046A4C002B101D /* testRegExp */, 1802 0F46808F14BA7E5E00BFE272 /* JSCLLIntOffsetsExtractor */,1803 1717 ); 1804 1718 name = Products; … … 1826 1740 45E12D8806A49B0F00E9DF84 /* jsc.cpp */, 1827 1741 F68EBB8C0255D4C601FF60F7 /* config.h */, 1828 0F46809C14BA7F4D00BFE272 /* llint */,1829 1742 1432EBD70A34CAD400717B9F /* API */, 1830 1743 9688CB120ED12B4E001D649F /* assembler */, … … 1866 1779 usesTabs = 0; 1867 1780 }; 1868 0F46809C14BA7F4D00BFE272 /* llint */ = {1869 isa = PBXGroup;1870 children = (1871 0F0B839514BCF45A00885B4F /* LLIntEntrypoints.cpp */,1872 0F0B839614BCF45A00885B4F /* LLIntEntrypoints.h */,1873 0F0B839714BCF45A00885B4F /* LLIntThunks.cpp */,1874 0F0B839814BCF45A00885B4F /* LLIntThunks.h */,1875 0F4680CE14BBB3D100BFE272 /* LLIntData.cpp */,1876 0F4680CF14BBB3D100BFE272 /* LLIntData.h */,1877 0F4680C514BBB16900BFE272 /* LLIntCommon.h */,1878 0F4680C614BBB16900BFE272 /* LLIntOfflineAsmConfig.h */,1879 0F4680C714BBB16900BFE272 /* LowLevelInterpreter.cpp */,1880 0F4680C814BBB16900BFE272 /* LowLevelInterpreter.h */,1881 0F46809D14BA7F8200BFE272 /* LLIntExceptions.cpp */,1882 0F46809E14BA7F8200BFE272 /* LLIntExceptions.h */,1883 0F46809F14BA7F8200BFE272 /* LLIntSlowPaths.cpp */,1884 0F4680A014BA7F8200BFE272 /* LLIntSlowPaths.h */,1885 0F4680A114BA7F8200BFE272 /* LLIntOffsetsExtractor.cpp */,1886 );1887 name = llint;1888 sourceTree = "<group>";1889 };1890 1781 141211000A48772600480255 /* tests */ = { 1891 1782 isa = PBXGroup; … … 1922 1813 isa = PBXGroup; 1923 1814 children = ( 1924 0F4680D014BBC5F800BFE272 /* HostCallReturnValue.cpp */,1925 0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */,1926 1815 0F46807F14BA572700BFE272 /* JITExceptions.cpp */, 1927 1816 0F46808014BA572700BFE272 /* JITExceptions.h */, … … 2398 2287 isa = PBXGroup; 2399 2288 children = ( 2400 0F21C27914BE727300ADC64B /* CodeSpecializationKind.h */,2401 0F21C27A14BE727300ADC64B /* ExecutionHarness.h */,2402 2289 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */, 2403 2290 BCF605110E203EF800B9A64D /* ArgList.cpp */, … … 2784 2671 isa = PBXGroup; 2785 2672 children = ( 2786 0F21C27E14BEAA8000ADC64B /* BytecodeConventions.h */,2787 0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */,2788 2673 0F9FC8BF14E1B5FB00D52AE0 /* PolymorphicPutByIdList.cpp */, 2789 2674 0F9FC8C014E1B5FB00D52AE0 /* PolymorphicPutByIdList.h */, … … 3350 3235 86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */, 3351 3236 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */, 3352 0F4680A314BA7F8D00BFE272 /* LLIntExceptions.h in Headers */,3353 0F4680A514BA7F8D00BFE272 /* LLIntSlowPaths.h in Headers */,3354 3237 0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */, 3355 0F4680CA14BBB16C00BFE272 /* LLIntCommon.h in Headers */,3356 0F4680CB14BBB17200BFE272 /* LLIntOfflineAsmConfig.h in Headers */,3357 0F4680CD14BBB17D00BFE272 /* LowLevelInterpreter.h in Headers */,3358 0F4680D314BBD16700BFE272 /* LLIntData.h in Headers */,3359 0F4680D514BBD24B00BFE272 /* HostCallReturnValue.h in Headers */,3360 0F0B839B14BCF46000885B4F /* LLIntEntrypoints.h in Headers */,3361 0F0B839D14BCF46600885B4F /* LLIntThunks.h in Headers */,3362 3238 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */, 3363 3239 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */, … … 3368 3244 0F0B83B714BCF8E100885B4F /* GlobalResolveInfo.h in Headers */, 3369 3245 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */, 3370 0F0FC45A14BD15F500B81154 /* LLIntCallLinkInfo.h in Headers */,3371 3246 0F21C26814BE5F6800ADC64B /* JITDriver.h in Headers */, 3372 0F21C27C14BE727600ADC64B /* ExecutionHarness.h in Headers */,3373 0F21C27D14BE727A00ADC64B /* CodeSpecializationKind.h in Headers */,3374 0F21C27F14BEAA8200ADC64B /* BytecodeConventions.h in Headers */,3375 3247 0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */, 3376 3248 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */, … … 3404 3276 3405 3277 /* Begin PBXNativeTarget section */ 3406 0F46808E14BA7E5E00BFE272 /* JSCLLIntOffsetsExtractor */ = {3407 isa = PBXNativeTarget;3408 buildConfigurationList = 0F46809A14BA7E5F00BFE272 /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */;3409 buildPhases = (3410 0F46808B14BA7E5E00BFE272 /* Sources */,3411 0F46808C14BA7E5E00BFE272 /* Frameworks */,3412 0F46808D14BA7E5E00BFE272 /* CopyFiles */,3413 );3414 buildRules = (3415 );3416 dependencies = (3417 0F4680B214BA811500BFE272 /* PBXTargetDependency */,3418 );3419 name = JSCLLIntOffsetsExtractor;3420 productName = JSCLLIntOffsetsExtractor;3421 productReference = 0F46808F14BA7E5E00BFE272 /* JSCLLIntOffsetsExtractor */;3422 productType = "com.apple.product-type.tool";3423 };3424 3278 1412111F0A48793C00480255 /* minidom */ = { 3425 3279 isa = PBXNativeTarget; … … 3548 3402 932F5BDA0822A1C700736975 /* jsc */, 3549 3403 651122F714046A4C002B101D /* testRegExp */, 3550 0F46808E14BA7E5E00BFE272 /* JSCLLIntOffsetsExtractor */,3551 0F4680A914BA7FD900BFE272 /* LLInt Offsets */,3552 3404 ); 3553 3405 }; … … 3555 3407 3556 3408 /* Begin PBXShellScriptBuildPhase section */ 3557 0F4680AA14BA7FD900BFE272 /* Generate Derived Sources */ = {3558 isa = PBXShellScriptBuildPhase;3559 buildActionMask = 2147483647;3560 files = (3561 );3562 inputPaths = (3563 "$(SRCROOT)/llint/LowLevelAssembler.asm",3564 );3565 name = "Generate Derived Sources";3566 outputPaths = (3567 "$(BUILT_PRODUCTS_DIR)/LLIntOffsets/LLIntDesiredOffsets.h",3568 );3569 runOnlyForDeploymentPostprocessing = 0;3570 shellPath = /bin/sh;3571 shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/LLIntDesiredOffsets.h\"\n";3572 };3573 3409 3713F014142905240036387F /* Check For Inappropriate Objective-C Class Names */ = { 3574 3410 isa = PBXShellScriptBuildPhase; … … 3676 3512 runOnlyForDeploymentPostprocessing = 0; 3677 3513 shellPath = /bin/sh; 3678 shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore/docs\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\n\n/bin/ln -sfh \"${SRCROOT}\" JavaScriptCore\nexport JavaScriptCore=\"JavaScriptCore\"\nexport BUILT_PRODUCTS_DIR=\"../..\"\n\nmake --no-builtin-rules -f \"JavaScriptCore/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.ncpu`\n \n/usr/bin/env ruby JavaScriptCore/offlineasm/asm.rb JavaScriptCore/llint/LowLevelInterpreter.asm ${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor LLIntAssembly.h\n";3514 shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore/docs\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\n\n/bin/ln -sfh \"${SRCROOT}\" JavaScriptCore\nexport JavaScriptCore=\"JavaScriptCore\"\nexport BUILT_PRODUCTS_DIR=\"../..\"\n\nmake --no-builtin-rules -f \"JavaScriptCore/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.ncpu`\n"; 3679 3515 }; 3680 3516 9319586B09D9F91A00A56FD4 /* Check For Global Initializers */ = { … … 3711 3547 3712 3548 /* Begin PBXSourcesBuildPhase section */ 3713 0F46808B14BA7E5E00BFE272 /* Sources */ = {3714 isa = PBXSourcesBuildPhase;3715 buildActionMask = 2147483647;3716 files = (3717 0F4680A714BA7FA100BFE272 /* LLIntOffsetsExtractor.cpp in Sources */,3718 );3719 runOnlyForDeploymentPostprocessing = 0;3720 };3721 3549 1412111D0A48793C00480255 /* Sources */ = { 3722 3550 isa = PBXSourcesBuildPhase; … … 3979 3807 86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */, 3980 3808 86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */, 3981 0F4680A414BA7F8D00BFE272 /* LLIntSlowPaths.cpp in Sources */,3982 0F4680A814BA7FAB00BFE272 /* LLIntExceptions.cpp in Sources */,3983 3809 0F46808314BA573100BFE272 /* JITExceptions.cpp in Sources */, 3984 0F4680CC14BBB17A00BFE272 /* LowLevelInterpreter.cpp in Sources */,3985 0F4680D214BBD16500BFE272 /* LLIntData.cpp in Sources */,3986 0F4680D414BBD24900BFE272 /* HostCallReturnValue.cpp in Sources */,3987 0F0B839A14BCF45D00885B4F /* LLIntEntrypoints.cpp in Sources */,3988 0F0B839C14BCF46300885B4F /* LLIntThunks.cpp in Sources */,3989 3810 0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */, 3990 3811 0F0B83B414BCF86000885B4F /* MethodCallLinkInfo.cpp in Sources */, … … 4020 3841 4021 3842 /* Begin PBXTargetDependency section */ 4022 0F4680B214BA811500BFE272 /* PBXTargetDependency */ = {4023 isa = PBXTargetDependency;4024 target = 0F4680A914BA7FD900BFE272 /* LLInt Offsets */;4025 targetProxy = 0F4680B114BA811500BFE272 /* PBXContainerItemProxy */;4026 };4027 0F4680B414BA821400BFE272 /* PBXTargetDependency */ = {4028 isa = PBXTargetDependency;4029 target = 0F46808E14BA7E5E00BFE272 /* JSCLLIntOffsetsExtractor */;4030 targetProxy = 0F4680B314BA821400BFE272 /* PBXContainerItemProxy */;4031 };4032 3843 141214BF0A49190E00480255 /* PBXTargetDependency */ = { 4033 3844 isa = PBXTargetDependency; … … 4063 3874 4064 3875 /* Begin XCBuildConfiguration section */ 4065 0F46809614BA7E5E00BFE272 /* Debug */ = {4066 isa = XCBuildConfiguration;4067 buildSettings = {4068 ALWAYS_SEARCH_USER_PATHS = NO;4069 ARCHS = "$(ARCHS_STANDARD_64_BIT)";4070 COPY_PHASE_STRIP = NO;4071 GCC_C_LANGUAGE_STANDARD = gnu99;4072 GCC_DYNAMIC_NO_PIC = NO;4073 GCC_ENABLE_OBJC_EXCEPTIONS = YES;4074 GCC_OPTIMIZATION_LEVEL = 0;4075 GCC_PREPROCESSOR_DEFINITIONS = (4076 "DEBUG=1",4077 "$(inherited)",4078 );4079 GCC_SYMBOLS_PRIVATE_EXTERN = NO;4080 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;4081 GCC_WARN_64_TO_32_BIT_CONVERSION = NO;4082 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;4083 GCC_WARN_ABOUT_RETURN_TYPE = YES;4084 GCC_WARN_UNUSED_VARIABLE = YES;4085 "HEADER_SEARCH_PATHS[arch=*]" = (4086 .,4087 icu,4088 "$(BUILT_PRODUCTS_DIR)/LLIntOffsets",4089 "$(HEADER_SEARCH_PATHS)",4090 );4091 MACOSX_DEPLOYMENT_TARGET = 10.7;4092 ONLY_ACTIVE_ARCH = NO;4093 PRODUCT_NAME = "$(TARGET_NAME)";4094 SDKROOT = macosx;4095 USER_HEADER_SEARCH_PATHS = ". icu $(BUILT_PRODUCTS_DIR)/LLIntOffsets $(HEADER_SEARCH_PATHS)";4096 };4097 name = Debug;4098 };4099 0F46809714BA7E5E00BFE272 /* Release */ = {4100 isa = XCBuildConfiguration;4101 buildSettings = {4102 ALWAYS_SEARCH_USER_PATHS = NO;4103 ARCHS = "$(ARCHS_STANDARD_64_BIT)";4104 COPY_PHASE_STRIP = YES;4105 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";4106 GCC_C_LANGUAGE_STANDARD = gnu99;4107 GCC_ENABLE_OBJC_EXCEPTIONS = YES;4108 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;4109 GCC_WARN_64_TO_32_BIT_CONVERSION = NO;4110 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;4111 GCC_WARN_ABOUT_RETURN_TYPE = YES;4112 GCC_WARN_UNUSED_VARIABLE = YES;4113 "HEADER_SEARCH_PATHS[arch=*]" = (4114 .,4115 icu,4116 "$(BUILT_PRODUCTS_DIR)/LLIntOffsets$(HEADER_SEARCH_PATHS)",4117 );4118 MACOSX_DEPLOYMENT_TARGET = 10.7;4119 ONLY_ACTIVE_ARCH = NO;4120 PRODUCT_NAME = "$(TARGET_NAME)";4121 SDKROOT = macosx;4122 USER_HEADER_SEARCH_PATHS = ". icu $(BUILT_PRODUCTS_DIR)/LLIntOffsets $(HEADER_SEARCH_PATHS)";4123 };4124 name = Release;4125 };4126 0F46809814BA7E5E00BFE272 /* Profiling */ = {4127 isa = XCBuildConfiguration;4128 buildSettings = {4129 ALWAYS_SEARCH_USER_PATHS = NO;4130 ARCHS = "$(ARCHS_STANDARD_64_BIT)";4131 COPY_PHASE_STRIP = YES;4132 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";4133 GCC_C_LANGUAGE_STANDARD = gnu99;4134 GCC_ENABLE_OBJC_EXCEPTIONS = YES;4135 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;4136 GCC_WARN_64_TO_32_BIT_CONVERSION = NO;4137 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;4138 GCC_WARN_ABOUT_RETURN_TYPE = YES;4139 GCC_WARN_UNUSED_VARIABLE = YES;4140 "HEADER_SEARCH_PATHS[arch=*]" = (4141 .,4142 icu,4143 "$(BUILT_PRODUCTS_DIR)/LLIntOffsets",4144 "$(HEADER_SEARCH_PATHS)",4145 );4146 MACOSX_DEPLOYMENT_TARGET = 10.7;4147 ONLY_ACTIVE_ARCH = NO;4148 PRODUCT_NAME = "$(TARGET_NAME)";4149 SDKROOT = macosx;4150 USER_HEADER_SEARCH_PATHS = ". icu $(BUILT_PRODUCTS_DIR)/LLIntOffsets $(HEADER_SEARCH_PATHS)";4151 };4152 name = Profiling;4153 };4154 0F46809914BA7E5E00BFE272 /* Production */ = {4155 isa = XCBuildConfiguration;4156 buildSettings = {4157 ALWAYS_SEARCH_USER_PATHS = NO;4158 ARCHS = "$(ARCHS_STANDARD_64_BIT)";4159 COPY_PHASE_STRIP = YES;4160 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";4161 GCC_C_LANGUAGE_STANDARD = gnu99;4162 GCC_ENABLE_OBJC_EXCEPTIONS = YES;4163 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;4164 GCC_WARN_64_TO_32_BIT_CONVERSION = NO;4165 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;4166 GCC_WARN_ABOUT_RETURN_TYPE = YES;4167 GCC_WARN_UNUSED_VARIABLE = YES;4168 "HEADER_SEARCH_PATHS[arch=*]" = (4169 .,4170 icu,4171 "$(BUILT_PRODUCTS_DIR)/LLIntOffsets",4172 "$(HEADER_SEARCH_PATHS)",4173 );4174 MACOSX_DEPLOYMENT_TARGET = 10.7;4175 PRODUCT_NAME = "$(TARGET_NAME)";4176 SDKROOT = macosx;4177 USER_HEADER_SEARCH_PATHS = ". icu $(BUILT_PRODUCTS_DIR)/LLIntOffsets $(HEADER_SEARCH_PATHS)";4178 };4179 name = Production;4180 };4181 0F4680AD14BA7FD900BFE272 /* Debug */ = {4182 isa = XCBuildConfiguration;4183 buildSettings = {4184 PRODUCT_NAME = "Derived Sources copy";4185 };4186 name = Debug;4187 };4188 0F4680AE14BA7FD900BFE272 /* Release */ = {4189 isa = XCBuildConfiguration;4190 buildSettings = {4191 PRODUCT_NAME = "Derived Sources copy";4192 };4193 name = Release;4194 };4195 0F4680AF14BA7FD900BFE272 /* Profiling */ = {4196 isa = XCBuildConfiguration;4197 buildSettings = {4198 PRODUCT_NAME = "Derived Sources copy";4199 };4200 name = Profiling;4201 };4202 0F4680B014BA7FD900BFE272 /* Production */ = {4203 isa = XCBuildConfiguration;4204 buildSettings = {4205 PRODUCT_NAME = "Derived Sources copy";4206 };4207 name = Production;4208 };4209 3876 1412113A0A48798400480255 /* Debug */ = { 4210 3877 isa = XCBuildConfiguration; … … 4448 4115 4449 4116 /* Begin XCConfigurationList section */ 4450 0F46809A14BA7E5F00BFE272 /* Build configuration list for PBXNativeTarget "JSCLLIntOffsetsExtractor" */ = {4451 isa = XCConfigurationList;4452 buildConfigurations = (4453 0F46809614BA7E5E00BFE272 /* Debug */,4454 0F46809714BA7E5E00BFE272 /* Release */,4455 0F46809814BA7E5E00BFE272 /* Profiling */,4456 0F46809914BA7E5E00BFE272 /* Production */,4457 );4458 defaultConfigurationIsVisible = 0;4459 defaultConfigurationName = Production;4460 };4461 0F4680AC14BA7FD900BFE272 /* Build configuration list for PBXAggregateTarget "LLInt Offsets" */ = {4462 isa = XCConfigurationList;4463 buildConfigurations = (4464 0F4680AD14BA7FD900BFE272 /* Debug */,4465 0F4680AE14BA7FD900BFE272 /* Release */,4466 0F4680AF14BA7FD900BFE272 /* Profiling */,4467 0F4680B014BA7FD900BFE272 /* Production */,4468 );4469 defaultConfigurationIsVisible = 0;4470 defaultConfigurationName = Production;4471 };4472 4117 141211390A48798400480255 /* Build configuration list for PBXNativeTarget "minidom" */ = { 4473 4118 isa = XCConfigurationList; -
trunk/Source/JavaScriptCore/Target.pri
r108309 r108358 114 114 jit/ExecutableAllocatorFixedVMPool.cpp \ 115 115 jit/ExecutableAllocator.cpp \ 116 jit/HostCallReturnValue.cpp \117 116 jit/JITArithmetic.cpp \ 118 117 jit/JITArithmetic32_64.cpp \ -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.h
r108309 r108358 35 35 #define REGEXP_CODE_ID reinterpret_cast<void*>(static_cast<intptr_t>(-2)) 36 36 37 #include "MacroAssembler.h"37 #include <MacroAssembler.h> 38 38 #include <wtf/DataLog.h> 39 39 #include <wtf/Noncopyable.h> -
trunk/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
r108309 r108358 32 32 #include "UnusedParam.h" 33 33 34 #if ENABLE(ASSEMBLER) 35 34 36 // ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid 35 37 // instruction address on the platform (for example, check any alignment requirements). … … 272 274 ASSERT_VALID_CODE_POINTER(m_value); 273 275 } 274 275 static MacroAssemblerCodePtr createFromExecutableAddress(void* value)276 {277 ASSERT_VALID_CODE_POINTER(value);278 MacroAssemblerCodePtr result;279 result.m_value = value;280 return result;281 }282 276 283 277 explicit MacroAssemblerCodePtr(ReturnAddressPtr ra) … … 367 361 } // namespace JSC 368 362 363 #endif // ENABLE(ASSEMBLER) 364 369 365 #endif // MacroAssemblerCodeRef_h -
trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp
r108309 r108358 28 28 29 29 #include "CodeBlock.h" 30 #include "LLIntCallLinkInfo.h"31 30 32 31 namespace JSC { 33 34 CallLinkStatus CallLinkStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex)35 {36 UNUSED_PARAM(profiledBlock);37 UNUSED_PARAM(bytecodeIndex);38 #if ENABLE(LLINT)39 Instruction* instruction = profiledBlock->instructions().begin() + bytecodeIndex;40 LLIntCallLinkInfo* callLinkInfo = instruction[4].u.callLinkInfo;41 42 return CallLinkStatus(callLinkInfo->lastSeenCallee.get(), false);43 #else44 return CallLinkStatus(0, false);45 #endif46 }47 32 48 33 CallLinkStatus CallLinkStatus::computeFor(CodeBlock* profiledBlock, unsigned bytecodeIndex) … … 51 36 UNUSED_PARAM(bytecodeIndex); 52 37 #if ENABLE(JIT) && ENABLE(VALUE_PROFILER) 53 if (!profiledBlock->numberOfCallLinkInfos()) 54 return computeFromLLInt(profiledBlock, bytecodeIndex); 55 56 if (profiledBlock->couldTakeSlowCase(bytecodeIndex)) 57 return CallLinkStatus(0, true); 58 59 JSFunction* target = profiledBlock->getCallLinkInfo(bytecodeIndex).lastSeenCallee.get(); 60 if (!target) 61 return computeFromLLInt(profiledBlock, bytecodeIndex); 62 63 return CallLinkStatus(target, false); 38 return CallLinkStatus( 39 profiledBlock->getCallLinkInfo(bytecodeIndex).lastSeenCallee.get(), 40 profiledBlock->couldTakeSlowCase(bytecodeIndex)); 64 41 #else 65 42 return CallLinkStatus(0, false); -
trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.h
r108309 r108358 48 48 static CallLinkStatus computeFor(CodeBlock*, unsigned bytecodeIndex); 49 49 50 bool isSet() const { return !!m_callTarget || m_couldTakeSlowPath; }50 bool isSet() const { return !!m_callTarget; } 51 51 52 bool operator!() const { return ! isSet(); }52 bool operator!() const { return !m_callTarget; } 53 53 54 54 bool couldTakeSlowPath() const { return m_couldTakeSlowPath; } … … 57 57 58 58 private: 59 static CallLinkStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex);60 61 59 JSFunction* m_callTarget; 62 60 bool m_couldTakeSlowPath; -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r108309 r108358 43 43 #include "JSStaticScopeObject.h" 44 44 #include "JSValue.h" 45 #include "LowLevelInterpreter.h"46 45 #include "RepatchBuffer.h" 47 46 #include "UStringConcatenate.h" … … 358 357 ++instructionCount; 359 358 360 dataLog("%lu m_instructions; %lu bytes at %p; %d parameter(s); %d callee register(s) ; %d variable(s)\n\n",359 dataLog("%lu m_instructions; %lu bytes at %p; %d parameter(s); %d callee register(s)\n\n", 361 360 static_cast<unsigned long>(instructionCount), 362 361 static_cast<unsigned long>(instructions().size() * sizeof(Instruction)), 363 this, m_numParameters, m_numCalleeRegisters , m_numVars);362 this, m_numParameters, m_numCalleeRegisters); 364 363 365 364 Vector<Instruction>::const_iterator begin = instructions().begin(); … … 896 895 case op_put_by_id_transition: { 897 896 printPutByIdOp(exec, location, it, "put_by_id_transition"); 898 break;899 }900 case op_put_by_id_transition_direct: {901 printPutByIdOp(exec, location, it, "put_by_id_transition_direct");902 break;903 }904 case op_put_by_id_transition_normal: {905 printPutByIdOp(exec, location, it, "put_by_id_transition_normal");906 897 break; 907 898 } … … 1463 1454 setNumParameters(other.numParameters()); 1464 1455 optimizeAfterWarmUp(); 1465 jitAfterWarmUp();1466 1456 1467 1457 if (other.m_rareData) { … … 1512 1502 1513 1503 optimizeAfterWarmUp(); 1514 jitAfterWarmUp();1515 1504 1516 1505 #if DUMP_CODE_BLOCK_STATISTICS … … 1530 1519 dumpValueProfiles(); 1531 1520 #endif 1532 1533 #if ENABLE(LLINT) 1534 while (m_incomingLLIntCalls.begin() != m_incomingLLIntCalls.end()) 1535 m_incomingLLIntCalls.begin()->remove(); 1536 #endif // ENABLE(LLINT) 1521 1537 1522 #if ENABLE(JIT) 1538 1523 // We may be destroyed before any CodeBlocks that refer to us are destroyed. … … 1746 1731 static const bool verboseUnlinking = false; 1747 1732 #endif 1748 #endif // ENABLE(JIT) 1749 1750 #if ENABLE(LLINT) 1751 Interpreter* interpreter = m_globalData->interpreter; 1752 // interpreter->classicEnabled() returns true if the old C++ interpreter is enabled. If that's enabled 1753 // then we're not using LLInt. 1754 if (!interpreter->classicEnabled()) { 1755 for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i) { 1756 Instruction* curInstruction = &instructions()[m_propertyAccessInstructions[i]]; 1757 switch (interpreter->getOpcodeID(curInstruction[0].u.opcode)) { 1758 case op_get_by_id: 1759 case op_put_by_id: 1760 if (!curInstruction[4].u.structure || Heap::isMarked(curInstruction[4].u.structure.get())) 1761 break; 1762 if (verboseUnlinking) 1763 dataLog("Clearing LLInt property access with structure %p.\n", curInstruction[4].u.structure.get()); 1764 curInstruction[4].u.structure.clear(); 1765 curInstruction[5].u.operand = 0; 1766 break; 1767 case op_put_by_id_transition_direct: 1768 case op_put_by_id_transition_normal: 1769 if (Heap::isMarked(curInstruction[4].u.structure.get()) 1770 && Heap::isMarked(curInstruction[6].u.structure.get()) 1771 && Heap::isMarked(curInstruction[7].u.structureChain.get())) 1772 break; 1773 if (verboseUnlinking) { 1774 dataLog("Clearing LLInt put transition with structures %p -> %p, chain %p.\n", 1775 curInstruction[4].u.structure.get(), 1776 curInstruction[6].u.structure.get(), 1777 curInstruction[7].u.structureChain.get()); 1778 } 1779 curInstruction[4].u.structure.clear(); 1780 curInstruction[6].u.structure.clear(); 1781 curInstruction[7].u.structureChain.clear(); 1782 curInstruction[0].u.opcode = interpreter->getOpcode(op_put_by_id); 1783 break; 1784 default: 1785 ASSERT_NOT_REACHED(); 1786 } 1787 } 1788 for (size_t size = m_globalResolveInstructions.size(), i = 0; i < size; ++i) { 1789 Instruction* curInstruction = &instructions()[m_globalResolveInstructions[i]]; 1790 ASSERT(interpreter->getOpcodeID(curInstruction[0].u.opcode) == op_resolve_global 1791 || interpreter->getOpcodeID(curInstruction[0].u.opcode) == op_resolve_global_dynamic); 1792 if (!curInstruction[3].u.structure || Heap::isMarked(curInstruction[3].u.structure.get())) 1793 continue; 1794 if (verboseUnlinking) 1795 dataLog("Clearing LLInt global resolve cache with structure %p.\n", curInstruction[3].u.structure.get()); 1796 curInstruction[3].u.structure.clear(); 1797 curInstruction[4].u.operand = 0; 1798 } 1799 for (unsigned i = 0; i < m_llintCallLinkInfos.size(); ++i) { 1800 if (m_llintCallLinkInfos[i].isLinked() && !Heap::isMarked(m_llintCallLinkInfos[i].callee.get())) { 1801 if (verboseUnlinking) 1802 dataLog("Clearing LLInt call from %p.\n", this); 1803 m_llintCallLinkInfos[i].unlink(); 1804 } 1805 if (!!m_llintCallLinkInfos[i].lastSeenCallee && !Heap::isMarked(m_llintCallLinkInfos[i].lastSeenCallee.get())) 1806 m_llintCallLinkInfos[i].lastSeenCallee.clear(); 1807 } 1808 } 1809 #endif // ENABLE(LLINT) 1810 1733 #endif 1734 1811 1735 #if ENABLE(DFG_JIT) 1812 1736 // Check if we're not live. If we are, then jettison. … … 1831 1755 if (callLinkInfo(i).isLinked() && !Heap::isMarked(callLinkInfo(i).callee.get())) { 1832 1756 if (verboseUnlinking) 1833 dataLog("Clearing call from %p to %p.\n", this, callLinkInfo(i).callee.get());1757 dataLog("Clearing call from %p.\n", this); 1834 1758 callLinkInfo(i).unlink(*m_globalData, repatchBuffer); 1835 1759 } … … 1929 1853 visitor.append(&m_functionDecls[i]); 1930 1854 #if ENABLE(CLASSIC_INTERPRETER) 1931 if (m_globalData->interpreter->classicEnabled()) { 1932 for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i) 1933 visitStructures(visitor, &instructions()[m_propertyAccessInstructions[i]]); 1934 for (size_t size = m_globalResolveInstructions.size(), i = 0; i < size; ++i) 1935 visitStructures(visitor, &instructions()[m_globalResolveInstructions[i]]); 1936 } 1855 for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i) 1856 visitStructures(visitor, &instructions()[m_propertyAccessInstructions[i]]); 1857 for (size_t size = m_globalResolveInstructions.size(), i = 0; i < size; ++i) 1858 visitStructures(visitor, &instructions()[m_globalResolveInstructions[i]]); 1937 1859 #endif 1938 1860 … … 1942 1864 // FIXME: If they would have otherwise died, we should probably trigger recompilation. 1943 1865 for (size_t i = 0; i < inlineCallFrames().size(); ++i) { 1944 InlineCallFrame& inlineCallFrame = inlineCallFrames()[i]; 1945 visitor.append(&inlineCallFrame.executable); 1946 visitor.append(&inlineCallFrame.callee); 1866 visitor.append(&inlineCallFrames()[i].executable); 1867 visitor.append(&inlineCallFrames()[i].callee); 1947 1868 } 1948 1869 } … … 2148 2069 return addConstant(v); 2149 2070 } 2150 2071 2151 2072 #if ENABLE(JIT) 2152 2073 void CodeBlock::unlinkCalls() … … 2154 2075 if (!!m_alternative) 2155 2076 m_alternative->unlinkCalls(); 2156 #if ENABLE(LLINT)2157 for (size_t i = 0; i < m_llintCallLinkInfos.size(); ++i) {2158 if (m_llintCallLinkInfos[i].isLinked())2159 m_llintCallLinkInfos[i].unlink();2160 }2161 #endif2162 2077 if (!(m_callLinkInfos.size() || m_methodCallLinkInfos.size())) 2163 2078 return; … … 2174 2089 void CodeBlock::unlinkIncomingCalls() 2175 2090 { 2176 #if ENABLE(LLINT)2177 while (m_incomingLLIntCalls.begin() != m_incomingLLIntCalls.end())2178 m_incomingLLIntCalls.begin()->unlink();2179 #endif2180 if (m_incomingCalls.isEmpty())2181 return;2182 2091 RepatchBuffer repatchBuffer(this); 2183 2092 while (m_incomingCalls.begin() != m_incomingCalls.end()) 2184 2093 m_incomingCalls.begin()->unlink(*m_globalData, repatchBuffer); 2185 }2186 2187 unsigned CodeBlock::bytecodeOffset(ExecState* exec, ReturnAddressPtr returnAddress)2188 {2189 #if ENABLE(LLINT)2190 if (returnAddress.value() >= bitwise_cast<void*>(&llint_begin)2191 && returnAddress.value() <= bitwise_cast<void*>(&llint_end)) {2192 ASSERT(exec->codeBlock());2193 ASSERT(exec->codeBlock() == this);2194 ASSERT(JITCode::isBaselineCode(getJITType()));2195 Instruction* instruction = exec->currentVPC();2196 ASSERT(instruction);2197 2198 // The LLInt stores the PC after the call instruction rather than the PC of2199 // the call instruction. This requires some correcting. We rely on the fact2200 // that the preceding instruction must be one of the call instructions, so2201 // either it's a call_varargs or it's a call, construct, or eval.2202 ASSERT(OPCODE_LENGTH(op_call_varargs) <= OPCODE_LENGTH(op_call));2203 ASSERT(OPCODE_LENGTH(op_call) == OPCODE_LENGTH(op_construct));2204 ASSERT(OPCODE_LENGTH(op_call) == OPCODE_LENGTH(op_call_eval));2205 if (instruction[-OPCODE_LENGTH(op_call_varargs)].u.pointer == bitwise_cast<void*>(llint_op_call_varargs)) {2206 // We know that the preceding instruction must be op_call_varargs because there is no way that2207 // the pointer to the call_varargs could be an operand to the call.2208 instruction -= OPCODE_LENGTH(op_call_varargs);2209 ASSERT(instruction[-OPCODE_LENGTH(op_call)].u.pointer != bitwise_cast<void*>(llint_op_call)2210 && instruction[-OPCODE_LENGTH(op_call)].u.pointer != bitwise_cast<void*>(llint_op_construct)2211 && instruction[-OPCODE_LENGTH(op_call)].u.pointer != bitwise_cast<void*>(llint_op_call_eval));2212 } else {2213 // Must be that the last instruction was some op_call.2214 ASSERT(instruction[-OPCODE_LENGTH(op_call)].u.pointer == bitwise_cast<void*>(llint_op_call)2215 || instruction[-OPCODE_LENGTH(op_call)].u.pointer == bitwise_cast<void*>(llint_op_construct)2216 || instruction[-OPCODE_LENGTH(op_call)].u.pointer == bitwise_cast<void*>(llint_op_call_eval));2217 instruction -= OPCODE_LENGTH(op_call);2218 }2219 2220 return bytecodeOffset(instruction);2221 }2222 #else2223 UNUSED_PARAM(exec);2224 #endif2225 if (!m_rareData)2226 return 1;2227 Vector<CallReturnOffsetToBytecodeOffset>& callIndices = m_rareData->m_callReturnIndexVector;2228 if (!callIndices.size())2229 return 1;2230 return binarySearch<CallReturnOffsetToBytecodeOffset, unsigned, getCallReturnOffset>(callIndices.begin(), callIndices.size(), getJITCode().offsetOf(returnAddress.value()))->bytecodeOffset;2231 2094 } 2232 2095 #endif … … 2325 2188 void ProgramCodeBlock::jettison() 2326 2189 { 2327 ASSERT( JITCode::isOptimizingJIT(getJITType()));2190 ASSERT(getJITType() != JITCode::BaselineJIT); 2328 2191 ASSERT(this == replacement()); 2329 2192 static_cast<ProgramExecutable*>(ownerExecutable())->jettisonOptimizedCode(*globalData()); … … 2332 2195 void EvalCodeBlock::jettison() 2333 2196 { 2334 ASSERT( JITCode::isOptimizingJIT(getJITType()));2197 ASSERT(getJITType() != JITCode::BaselineJIT); 2335 2198 ASSERT(this == replacement()); 2336 2199 static_cast<EvalExecutable*>(ownerExecutable())->jettisonOptimizedCode(*globalData()); … … 2339 2202 void FunctionCodeBlock::jettison() 2340 2203 { 2341 ASSERT( JITCode::isOptimizingJIT(getJITType()));2204 ASSERT(getJITType() != JITCode::BaselineJIT); 2342 2205 ASSERT(this == replacement()); 2343 2206 static_cast<FunctionExecutable*>(ownerExecutable())->jettisonOptimizedCodeFor(*globalData(), m_isConstructor ? CodeForConstruct : CodeForCall); 2344 }2345 2346 void ProgramCodeBlock::jitCompileImpl(JSGlobalData& globalData)2347 {2348 ASSERT(getJITType() == JITCode::InterpreterThunk);2349 ASSERT(this == replacement());2350 return static_cast<ProgramExecutable*>(ownerExecutable())->jitCompile(globalData);2351 }2352 2353 void EvalCodeBlock::jitCompileImpl(JSGlobalData& globalData)2354 {2355 ASSERT(getJITType() == JITCode::InterpreterThunk);2356 ASSERT(this == replacement());2357 return static_cast<EvalExecutable*>(ownerExecutable())->jitCompile(globalData);2358 }2359 2360 void FunctionCodeBlock::jitCompileImpl(JSGlobalData& globalData)2361 {2362 ASSERT(getJITType() == JITCode::InterpreterThunk);2363 ASSERT(this == replacement());2364 return static_cast<FunctionExecutable*>(ownerExecutable())->jitCompileFor(globalData, m_isConstructor ? CodeForConstruct : CodeForCall);2365 2207 } 2366 2208 #endif -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r108309 r108358 31 31 #define CodeBlock_h 32 32 33 #include "BytecodeConventions.h"34 33 #include "CallLinkInfo.h" 35 34 #include "CallReturnOffsetToBytecodeOffset.h" … … 52 51 #include "JSGlobalObject.h" 53 52 #include "JumpTable.h" 54 #include "LLIntCallLinkInfo.h"55 53 #include "LineInfo.h" 56 54 #include "Nodes.h" … … 68 66 #include "StructureStubInfo.h" 69 67 68 // Register numbers used in bytecode operations have different meaning according to their ranges: 69 // 0x80000000-0xFFFFFFFF Negative indices from the CallFrame pointer are entries in the call frame, see RegisterFile.h. 70 // 0x00000000-0x3FFFFFFF Forwards indices from the CallFrame pointer are local vars and temporaries with the function's callframe. 71 // 0x40000000-0x7FFFFFFF Positive indices from 0x40000000 specify entries in the constant pool on the CodeBlock. 72 static const int FirstConstantRegisterIndex = 0x40000000; 73 70 74 namespace JSC { 71 75 76 class ExecState; 72 77 class DFGCodeBlocks; 73 class ExecState;74 class LLIntOffsetsExtractor;75 78 76 79 inline int unmodifiedArgumentsRegister(int argumentsRegister) { return argumentsRegister - 1; } … … 81 84 WTF_MAKE_FAST_ALLOCATED; 82 85 friend class JIT; 83 friend class LLIntOffsetsExtractor;84 86 public: 85 87 enum CopyParsedBlockTag { CopyParsedBlock }; … … 122 124 result = result->alternative(); 123 125 ASSERT(result); 124 ASSERT( JITCode::isBaselineCode(result->getJITType()));126 ASSERT(result->getJITType() == JITCode::BaselineJIT); 125 127 return result; 126 128 } … … 191 193 } 192 194 193 unsigned bytecodeOffset(ExecState*, ReturnAddressPtr); 195 unsigned bytecodeOffset(ReturnAddressPtr returnAddress) 196 { 197 if (!m_rareData) 198 return 1; 199 Vector<CallReturnOffsetToBytecodeOffset>& callIndices = m_rareData->m_callReturnIndexVector; 200 if (!callIndices.size()) 201 return 1; 202 return binarySearch<CallReturnOffsetToBytecodeOffset, unsigned, getCallReturnOffset>(callIndices.begin(), callIndices.size(), getJITCode().offsetOf(returnAddress.value()))->bytecodeOffset; 203 } 194 204 195 205 unsigned bytecodeOffsetForCallAtIndex(unsigned index) … … 212 222 m_incomingCalls.push(incoming); 213 223 } 214 #if ENABLE(LLINT)215 void linkIncomingCall(LLIntCallLinkInfo* incoming)216 {217 m_incomingLLIntCalls.push(incoming);218 }219 #endif // ENABLE(LLINT)220 224 221 225 void unlinkIncomingCalls(); 222 #endif // ENABLE(JIT)223 224 #if ENABLE(DFG_JIT) || ENABLE(LLINT)226 #endif 227 228 #if ENABLE(DFG_JIT) 225 229 void setJITCodeMap(PassOwnPtr<CompactJITCodeMap> jitCodeMap) 226 230 { … … 231 235 return m_jitCodeMap.get(); 232 236 } 233 #endif 234 235 #if ENABLE(DFG_JIT) 237 236 238 void createDFGDataIfNecessary() 237 239 { … … 332 334 #endif 333 335 336 #if ENABLE(CLASSIC_INTERPRETER) 334 337 unsigned bytecodeOffset(Instruction* returnAddress) 335 338 { 336 ASSERT(returnAddress >= instructions().begin() && returnAddress < instructions().end());337 339 return static_cast<Instruction*>(returnAddress) - instructions().begin(); 338 340 } 341 #endif 339 342 340 343 void setIsNumericCompareFunction(bool isNumericCompareFunction) { m_isNumericCompareFunction = isNumericCompareFunction; } … … 374 377 virtual JSObject* compileOptimized(ExecState*, ScopeChainNode*) = 0; 375 378 virtual void jettison() = 0; 376 bool jitCompile(JSGlobalData& globalData)377 {378 if (getJITType() != JITCode::InterpreterThunk) {379 ASSERT(getJITType() == JITCode::BaselineJIT);380 return false;381 }382 #if ENABLE(JIT)383 jitCompileImpl(globalData);384 return true;385 #else386 UNUSED_PARAM(globalData);387 return false;388 #endif389 }390 379 virtual CodeBlock* replacement() = 0; 391 380 … … 407 396 bool hasOptimizedReplacement() 408 397 { 409 ASSERT( JITCode::isBaselineCode(getJITType()));398 ASSERT(getJITType() == JITCode::BaselineJIT); 410 399 bool result = replacement()->getJITType() > getJITType(); 411 400 #if !ASSERT_DISABLED … … 413 402 ASSERT(replacement()->getJITType() == JITCode::DFGJIT); 414 403 else { 415 ASSERT( JITCode::isBaselineCode(replacement()->getJITType()));404 ASSERT(replacement()->getJITType() == JITCode::BaselineJIT); 416 405 ASSERT(replacement() == this); 417 406 } … … 472 461 void clearEvalCache(); 473 462 463 #if ENABLE(CLASSIC_INTERPRETER) 474 464 void addPropertyAccessInstruction(unsigned propertyAccessInstruction) 475 465 { 476 m_propertyAccessInstructions.append(propertyAccessInstruction); 466 if (!m_globalData->canUseJIT()) 467 m_propertyAccessInstructions.append(propertyAccessInstruction); 477 468 } 478 469 void addGlobalResolveInstruction(unsigned globalResolveInstruction) 479 470 { 480 m_globalResolveInstructions.append(globalResolveInstruction); 471 if (!m_globalData->canUseJIT()) 472 m_globalResolveInstructions.append(globalResolveInstruction); 481 473 } 482 474 bool hasGlobalResolveInstructionAtBytecodeOffset(unsigned bytecodeOffset); 483 #if ENABLE(LLINT)484 LLIntCallLinkInfo* addLLIntCallLinkInfo()485 {486 m_llintCallLinkInfos.append(LLIntCallLinkInfo());487 return &m_llintCallLinkInfos.last();488 }489 475 #endif 490 476 #if ENABLE(JIT) … … 495 481 void addGlobalResolveInfo(unsigned globalResolveInstruction) 496 482 { 497 m_globalResolveInfos.append(GlobalResolveInfo(globalResolveInstruction)); 483 if (m_globalData->canUseJIT()) 484 m_globalResolveInfos.append(GlobalResolveInfo(globalResolveInstruction)); 498 485 } 499 486 GlobalResolveInfo& globalResolveInfo(int index) { return m_globalResolveInfos[index]; } … … 506 493 void addMethodCallLinkInfos(unsigned n) { ASSERT(m_globalData->canUseJIT()); m_methodCallLinkInfos.grow(n); } 507 494 MethodCallLinkInfo& methodCallLinkInfo(int index) { return m_methodCallLinkInfos[index]; } 508 size_t numberOfMethodCallLinkInfos() { return m_methodCallLinkInfos.size(); }509 495 #endif 510 496 … … 548 534 return result; 549 535 } 550 PredictedType valueProfilePredictionForBytecodeOffset(int bytecodeOffset)551 {552 return valueProfileForBytecodeOffset(bytecodeOffset)->computeUpdatedPrediction();553 }554 536 555 537 unsigned totalNumberOfValueProfiles() … … 578 560 bool likelyToTakeSlowCase(int bytecodeOffset) 579 561 { 580 if (!numberOfRareCaseProfiles())581 return false;582 562 unsigned value = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; 583 563 return value >= Options::likelyToTakeSlowCaseMinimumCount && static_cast<double>(value) / m_executionEntryCount >= Options::likelyToTakeSlowCaseThreshold; … … 586 566 bool couldTakeSlowCase(int bytecodeOffset) 587 567 { 588 if (!numberOfRareCaseProfiles())589 return false;590 568 unsigned value = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; 591 569 return value >= Options::couldTakeSlowCaseMinimumCount && static_cast<double>(value) / m_executionEntryCount >= Options::couldTakeSlowCaseThreshold; … … 606 584 bool likelyToTakeSpecialFastCase(int bytecodeOffset) 607 585 { 608 if (!numberOfRareCaseProfiles())609 return false;610 586 unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; 611 587 return specialFastCaseCount >= Options::likelyToTakeSlowCaseMinimumCount && static_cast<double>(specialFastCaseCount) / m_executionEntryCount >= Options::likelyToTakeSlowCaseThreshold; … … 614 590 bool likelyToTakeDeepestSlowCase(int bytecodeOffset) 615 591 { 616 if (!numberOfRareCaseProfiles())617 return false;618 592 unsigned slowCaseCount = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; 619 593 unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; … … 624 598 bool likelyToTakeAnySlowCase(int bytecodeOffset) 625 599 { 626 if (!numberOfRareCaseProfiles())627 return false;628 600 unsigned slowCaseCount = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; 629 601 unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; … … 723 695 bool addFrequentExitSite(const DFG::FrequentExitSite& site) 724 696 { 725 ASSERT( JITCode::isBaselineCode(getJITType()));697 ASSERT(getJITType() == JITCode::BaselineJIT); 726 698 return m_exitProfile.add(site); 727 699 } … … 830 802 void copyPostParseDataFrom(CodeBlock* alternative); 831 803 void copyPostParseDataFromAlternative(); 832 833 // Functions for controlling when JITting kicks in, in a mixed mode834 // execution world.835 836 void dontJITAnytimeSoon()837 {838 m_llintExecuteCounter = Options::executionCounterValueForDontJITAnytimeSoon;839 }840 841 void jitAfterWarmUp()842 {843 m_llintExecuteCounter = Options::executionCounterValueForJITAfterWarmUp;844 }845 846 void jitSoon()847 {848 m_llintExecuteCounter = Options::executionCounterValueForJITSoon;849 }850 851 int32_t llintExecuteCounter() const852 {853 return m_llintExecuteCounter;854 }855 804 856 805 // Functions for controlling when tiered compilation kicks in. This … … 1046 995 1047 996 protected: 1048 #if ENABLE(JIT)1049 virtual void jitCompileImpl(JSGlobalData&) = 0;1050 #endif1051 997 virtual void visitWeakReferences(SlotVisitor&); 1052 998 virtual void finalizeUnconditionally(); … … 1130 1076 unsigned m_sourceOffset; 1131 1077 1078 #if ENABLE(CLASSIC_INTERPRETER) 1132 1079 Vector<unsigned> m_propertyAccessInstructions; 1133 1080 Vector<unsigned> m_globalResolveInstructions; 1134 #if ENABLE(LLINT)1135 SegmentedVector<LLIntCallLinkInfo, 8> m_llintCallLinkInfos;1136 SentinelLinkedList<LLIntCallLinkInfo, BasicRawSentinelNode<LLIntCallLinkInfo> > m_incomingLLIntCalls;1137 1081 #endif 1138 1082 #if ENABLE(JIT) … … 1145 1089 SentinelLinkedList<CallLinkInfo, BasicRawSentinelNode<CallLinkInfo> > m_incomingCalls; 1146 1090 #endif 1147 #if ENABLE(DFG_JIT) || ENABLE(LLINT)1091 #if ENABLE(DFG_JIT) 1148 1092 OwnPtr<CompactJITCodeMap> m_jitCodeMap; 1149 #endif 1150 #if ENABLE(DFG_JIT) 1093 1151 1094 struct WeakReferenceTransition { 1152 1095 WeakReferenceTransition() { } … … 1211 1154 OwnPtr<CodeBlock> m_alternative; 1212 1155 1213 int32_t m_llintExecuteCounter;1214 1215 1156 int32_t m_jitExecuteCounter; 1216 1157 uint32_t m_speculativeSuccessCounter; … … 1218 1159 uint8_t m_optimizationDelayCounter; 1219 1160 uint8_t m_reoptimizationRetryCounter; 1220 1161 1221 1162 struct RareData { 1222 1163 WTF_MAKE_FAST_ALLOCATED; … … 1294 1235 virtual JSObject* compileOptimized(ExecState*, ScopeChainNode*); 1295 1236 virtual void jettison(); 1296 virtual void jitCompileImpl(JSGlobalData&);1297 1237 virtual CodeBlock* replacement(); 1298 1238 virtual bool canCompileWithDFGInternal(); … … 1329 1269 virtual JSObject* compileOptimized(ExecState*, ScopeChainNode*); 1330 1270 virtual void jettison(); 1331 virtual void jitCompileImpl(JSGlobalData&);1332 1271 virtual CodeBlock* replacement(); 1333 1272 virtual bool canCompileWithDFGInternal(); … … 1367 1306 virtual JSObject* compileOptimized(ExecState*, ScopeChainNode*); 1368 1307 virtual void jettison(); 1369 virtual void jitCompileImpl(JSGlobalData&);1370 1308 virtual CodeBlock* replacement(); 1371 1309 virtual bool canCompileWithDFGInternal(); -
trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp
r108309 r108358 28 28 29 29 #include "CodeBlock.h" 30 #include "LowLevelInterpreter.h"31 30 32 31 namespace JSC { 33 34 GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, Identifier& ident)35 {36 UNUSED_PARAM(profiledBlock);37 UNUSED_PARAM(bytecodeIndex);38 UNUSED_PARAM(ident);39 #if ENABLE(LLINT)40 Instruction* instruction = profiledBlock->instructions().begin() + bytecodeIndex;41 42 if (instruction[0].u.opcode == llint_op_method_check)43 instruction++;44 45 Structure* structure = instruction[4].u.structure.get();46 if (!structure)47 return GetByIdStatus(NoInformation, StructureSet(), notFound, false);48 49 size_t offset = structure->get(*profiledBlock->globalData(), ident);50 if (offset == notFound)51 return GetByIdStatus(NoInformation, StructureSet(), notFound, false);52 53 return GetByIdStatus(SimpleDirect, StructureSet(structure), offset, false);54 #else55 return GetByIdStatus(NoInformation, StructureSet(), notFound, false);56 #endif57 }58 32 59 33 GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytecodeIndex, Identifier& ident) … … 63 37 UNUSED_PARAM(ident); 64 38 #if ENABLE(JIT) && ENABLE(VALUE_PROFILER) 65 if (!profiledBlock->numberOfStructureStubInfos())66 return computeFromLLInt(profiledBlock, bytecodeIndex, ident);67 68 39 // First check if it makes either calls, in which case we want to be super careful, or 69 40 // if it's not set at all, in which case we punt. 70 41 StructureStubInfo& stubInfo = profiledBlock->getStubInfo(bytecodeIndex); 71 42 if (!stubInfo.seen) 72 return computeFromLLInt(profiledBlock, bytecodeIndex, ident);43 return GetByIdStatus(NoInformation, StructureSet(), notFound); 73 44 74 45 PolymorphicAccessStructureList* list; … … 90 61 for (int i = 0; i < listSize; ++i) { 91 62 if (!list->list[i].isDirect) 92 return GetByIdStatus(MakesCalls, StructureSet(), notFound , true);63 return GetByIdStatus(MakesCalls, StructureSet(), notFound); 93 64 } 94 65 95 66 // Next check if it takes slow case, in which case we want to be kind of careful. 96 67 if (profiledBlock->likelyToTakeSlowCase(bytecodeIndex)) 97 return GetByIdStatus(TakesSlowPath, StructureSet(), notFound , true);68 return GetByIdStatus(TakesSlowPath, StructureSet(), notFound); 98 69 99 70 // Finally figure out if we can derive an access strategy. 100 71 GetByIdStatus result; 101 result.m_wasSeenInJIT = true;102 72 switch (stubInfo.accessType) { 103 73 case access_unset: 104 return computeFromLLInt(profiledBlock, bytecodeIndex, ident);74 return GetByIdStatus(NoInformation, StructureSet(), notFound); 105 75 106 76 case access_get_by_id_self: { … … 161 131 return result; 162 132 #else // ENABLE(JIT) 163 return GetByIdStatus(NoInformation, StructureSet(), notFound , false);133 return GetByIdStatus(NoInformation, StructureSet(), notFound); 164 134 #endif // ENABLE(JIT) 165 135 } -
trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.h
r108309 r108358 50 50 } 51 51 52 GetByIdStatus(State state, const StructureSet& structureSet, size_t offset , bool wasSeenInJIT)52 GetByIdStatus(State state, const StructureSet& structureSet, size_t offset) 53 53 : m_state(state) 54 54 , m_structureSet(structureSet) 55 55 , m_offset(offset) 56 , m_wasSeenInJIT(wasSeenInJIT)57 56 { 58 57 ASSERT((state == SimpleDirect) == (offset != notFound)); … … 72 71 size_t offset() const { return m_offset; } 73 72 74 bool wasSeenInJIT() const { return m_wasSeenInJIT; }75 76 73 private: 77 static GetByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, Identifier&);78 79 74 State m_state; 80 75 StructureSet m_structureSet; 81 76 size_t m_offset; 82 bool m_wasSeenInJIT;83 77 }; 84 78 -
trunk/Source/JavaScriptCore/bytecode/Instruction.h
r108309 r108358 49 49 class Structure; 50 50 class StructureChain; 51 struct LLIntCallLinkInfo;52 51 struct ValueProfile; 53 52 … … 148 147 149 148 struct Instruction { 150 Instruction()151 {152 u.jsCell.clear();153 }154 155 149 Instruction(Opcode opcode) 156 150 { … … 188 182 189 183 Instruction(PropertySlot::GetValueFunc getterFunc) { u.getterFunc = getterFunc; } 190 191 Instruction(LLIntCallLinkInfo* callLinkInfo) { u.callLinkInfo = callLinkInfo; }192 184 193 185 Instruction(ValueProfile* profile) { u.profile = profile; } … … 200 192 WriteBarrierBase<JSCell> jsCell; 201 193 PropertySlot::GetValueFunc getterFunc; 202 LLIntCallLinkInfo* callLinkInfo;203 194 ValueProfile* profile; 204 void* pointer;205 195 } u; 206 196 -
trunk/Source/JavaScriptCore/bytecode/MethodCallLinkStatus.cpp
r108309 r108358 36 36 UNUSED_PARAM(bytecodeIndex); 37 37 #if ENABLE(JIT) && ENABLE(VALUE_PROFILER) 38 // NOTE: This does not have an LLInt fall-back because LLInt does not do any method39 // call link caching.40 if (!profiledBlock->numberOfMethodCallLinkInfos())41 return MethodCallLinkStatus();42 43 38 MethodCallLinkInfo& methodCall = profiledBlock->getMethodCallLinkInfo(bytecodeIndex); 44 39 -
trunk/Source/JavaScriptCore/bytecode/Opcode.cpp
r108309 r108358 40 40 namespace JSC { 41 41 42 #if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) || ENABLE(CODEBLOCK_SAMPLING) || ENABLE(OPCODE_STATS) 43 42 44 const char* const opcodeNames[] = { 43 45 #define OPCODE_NAME_ENTRY(opcode, size) #opcode, … … 45 47 #undef OPCODE_NAME_ENTRY 46 48 }; 49 50 #endif 47 51 48 52 #if ENABLE(OPCODE_STATS) -
trunk/Source/JavaScriptCore/bytecode/Opcode.h
r108309 r108358 124 124 macro(op_put_by_id, 9) \ 125 125 macro(op_put_by_id_transition, 9) \ 126 macro(op_put_by_id_transition_direct, 9) \127 macro(op_put_by_id_transition_normal, 9) \128 126 macro(op_put_by_id_replace, 9) \ 129 127 macro(op_put_by_id_generic, 9) \ … … 204 202 #undef OPCODE_ID_ENUM 205 203 206 const int maxOpcodeLength = 9;207 204 const int numOpcodeIDs = op_end + 1; 208 205 … … 221 218 #undef VERIFY_OPCODE_ID 222 219 223 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) || ENABLE(LLINT)220 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 224 221 #if COMPILER(RVCT) || COMPILER(INTEL) 225 222 typedef void* Opcode; … … 230 227 typedef OpcodeID Opcode; 231 228 #endif 229 230 #if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) || ENABLE(CODEBLOCK_SAMPLING) || ENABLE(OPCODE_STATS) 232 231 233 232 #define PADDING_STRING " " … … 245 244 #undef PADDING_STRING_LENGTH 246 245 #undef PADDING_STRING 246 247 #endif 247 248 248 249 #if ENABLE(OPCODE_STATS) -
trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp
r108309 r108358 28 28 29 29 #include "CodeBlock.h" 30 #include "LowLevelInterpreter.h"31 30 #include "Structure.h" 32 31 #include "StructureChain.h" 33 32 34 33 namespace JSC { 35 36 PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, Identifier& ident)37 {38 UNUSED_PARAM(profiledBlock);39 UNUSED_PARAM(bytecodeIndex);40 UNUSED_PARAM(ident);41 #if ENABLE(LLINT)42 Instruction* instruction = profiledBlock->instructions().begin() + bytecodeIndex;43 44 Structure* structure = instruction[4].u.structure.get();45 if (!structure)46 return PutByIdStatus(NoInformation, 0, 0, 0, notFound);47 48 if (instruction[0].u.opcode == llint_op_put_by_id) {49 size_t offset = structure->get(*profiledBlock->globalData(), ident);50 if (offset == notFound)51 return PutByIdStatus(NoInformation, 0, 0, 0, notFound);52 53 return PutByIdStatus(SimpleReplace, structure, 0, 0, offset);54 }55 56 ASSERT(instruction[0].u.opcode == llint_op_put_by_id_transition_direct57 || instruction[0].u.opcode == llint_op_put_by_id_transition_normal);58 59 Structure* newStructure = instruction[6].u.structure.get();60 StructureChain* chain = instruction[7].u.structureChain.get();61 ASSERT(newStructure);62 ASSERT(chain);63 64 size_t offset = newStructure->get(*profiledBlock->globalData(), ident);65 if (offset == notFound)66 return PutByIdStatus(NoInformation, 0, 0, 0, notFound);67 68 return PutByIdStatus(SimpleTransition, structure, newStructure, chain, offset);69 #else70 return PutByIdStatus(NoInformation, 0, 0, 0, notFound);71 #endif72 }73 34 74 35 PutByIdStatus PutByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytecodeIndex, Identifier& ident) … … 78 39 UNUSED_PARAM(ident); 79 40 #if ENABLE(JIT) && ENABLE(VALUE_PROFILER) 80 if (!profiledBlock->numberOfStructureStubInfos())81 return computeFromLLInt(profiledBlock, bytecodeIndex, ident);82 83 41 if (profiledBlock->likelyToTakeSlowCase(bytecodeIndex)) 84 42 return PutByIdStatus(TakesSlowPath, 0, 0, 0, notFound); … … 86 44 StructureStubInfo& stubInfo = profiledBlock->getStubInfo(bytecodeIndex); 87 45 if (!stubInfo.seen) 88 return computeFromLLInt(profiledBlock, bytecodeIndex, ident);46 return PutByIdStatus(NoInformation, 0, 0, 0, notFound); 89 47 90 48 switch (stubInfo.accessType) { 91 49 case access_unset: 92 return computeFromLLInt(profiledBlock, bytecodeIndex, ident);50 return PutByIdStatus(NoInformation, 0, 0, 0, notFound); 93 51 94 52 case access_put_by_id_replace: { -
trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.h
r108309 r108358 94 94 95 95 private: 96 static PutByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, Identifier&);97 98 96 State m_state; 99 97 Structure* m_oldStructure; -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r108309 r108358 36 36 #include "JSFunction.h" 37 37 #include "Interpreter.h" 38 #include "LowLevelInterpreter.h"39 38 #include "ScopeChain.h" 40 39 #include "StrongInlines.h" … … 1280 1279 m_codeBlock->addGlobalResolveInfo(instructions().size()); 1281 1280 #endif 1281 #if ENABLE(CLASSIC_INTERPRETER) 1282 1282 m_codeBlock->addGlobalResolveInstruction(instructions().size()); 1283 #endif 1283 1284 bool dynamic = resolveResult.isDynamic() && resolveResult.depth(); 1284 1285 ValueProfile* profile = emitProfiledOpcode(dynamic ? op_resolve_global_dynamic : op_resolve_global); … … 1384 1385 } 1385 1386 1387 1388 1389 1386 1390 ValueProfile* profile = emitProfiledOpcode(op_resolve_with_base); 1387 1391 instructions().append(baseDst->index()); … … 1491 1495 RegisterID* BytecodeGenerator::emitGetById(RegisterID* dst, RegisterID* base, const Identifier& property) 1492 1496 { 1497 #if ENABLE(CLASSIC_INTERPRETER) 1493 1498 m_codeBlock->addPropertyAccessInstruction(instructions().size()); 1499 #endif 1494 1500 1495 1501 ValueProfile* profile = emitProfiledOpcode(op_get_by_id); … … 1517 1523 RegisterID* BytecodeGenerator::emitPutById(RegisterID* base, const Identifier& property, RegisterID* value) 1518 1524 { 1525 #if ENABLE(CLASSIC_INTERPRETER) 1519 1526 m_codeBlock->addPropertyAccessInstruction(instructions().size()); 1527 #endif 1520 1528 1521 1529 emitOpcode(op_put_by_id); … … 1533 1541 RegisterID* BytecodeGenerator::emitDirectPutById(RegisterID* base, const Identifier& property, RegisterID* value) 1534 1542 { 1543 #if ENABLE(CLASSIC_INTERPRETER) 1535 1544 m_codeBlock->addPropertyAccessInstruction(instructions().size()); 1545 #endif 1536 1546 1537 1547 emitOpcode(op_put_by_id); … … 1814 1824 instructions().append(callArguments.argumentCountIncludingThis()); // argCount 1815 1825 instructions().append(callArguments.registerOffset()); // registerOffset 1816 #if ENABLE(LLINT)1817 instructions().append(m_codeBlock->addLLIntCallLinkInfo());1818 #else1819 1826 instructions().append(0); 1820 #endif1821 1827 instructions().append(0); 1822 1828 if (dst != ignoredResult()) { … … 1922 1928 instructions().append(callArguments.argumentCountIncludingThis()); // argCount 1923 1929 instructions().append(callArguments.registerOffset()); // registerOffset 1924 #if ENABLE(LLINT)1925 instructions().append(m_codeBlock->addLLIntCallLinkInfo());1926 #else1927 1930 instructions().append(0); 1928 #endif1929 1931 instructions().append(0); 1930 1932 if (dst != ignoredResult()) { … … 2187 2189 m_usesExceptions = true; 2188 2190 #if ENABLE(JIT) 2189 #if ENABLE(LLINT)2190 HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth, CodeLocationLabel(MacroAssemblerCodePtr::createFromExecutableAddress(bitwise_cast<void*>(&llint_op_catch))) };2191 #else2192 2191 HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth, CodeLocationLabel() }; 2193 #endif2194 2192 #else 2195 2193 HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth }; -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r108309 r108358 586 586 UNUSED_PARAM(nodeIndex); 587 587 588 PredictedType prediction = m_inlineStackTop->m_profiledBlock->valueProfilePredictionForBytecodeOffset(bytecodeIndex); 588 ValueProfile* profile = m_inlineStackTop->m_profiledBlock->valueProfileForBytecodeOffset(bytecodeIndex); 589 ASSERT(profile); 590 PredictedType prediction = profile->computeUpdatedPrediction(); 589 591 #if DFG_ENABLE(DEBUG_VERBOSE) 590 592 dataLog("Dynamic [@%u, bc#%u] prediction: %s\n", nodeIndex, bytecodeIndex, predictionToString(prediction)); … … 1021 1023 // If we get here then it looks like we should definitely inline this code. Proceed 1022 1024 // with parsing the code to get bytecode, so that we can then parse the bytecode. 1023 // Note that if LLInt is enabled, the bytecode will always be available. Also note1024 // that if LLInt is enabled, we may inline a code block that has never been JITted1025 // before!1026 1025 CodeBlock* codeBlock = m_codeBlockCache.get(CodeBlockKey(executable, kind), expectedFunction->scope()); 1027 1026 if (!codeBlock) … … 1724 1723 1725 1724 if (methodCallStatus.isSet() 1726 && !getByIdStatus. wasSeenInJIT()1725 && !getByIdStatus.isSet() 1727 1726 && !m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCache)) { 1728 1727 // It's monomorphic as far as we can tell, since the method_check was linked … … 1793 1792 NEXT_OPCODE(op_get_by_id); 1794 1793 } 1795 case op_put_by_id: 1796 case op_put_by_id_transition_direct: 1797 case op_put_by_id_transition_normal: { 1794 case op_put_by_id: { 1798 1795 NodeIndex value = get(currentInstruction[3].u.operand); 1799 1796 NodeIndex base = get(currentInstruction[1].u.operand); -
trunk/Source/JavaScriptCore/dfg/DFGCapabilities.h
r108309 r108358 112 112 case op_get_by_id: 113 113 case op_put_by_id: 114 case op_put_by_id_transition_direct:115 case op_put_by_id_transition_normal:116 114 case op_get_global_var: 117 115 case op_put_global_var: -
trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp
r108309 r108358 49 49 OSRExit& exit = codeBlock->osrExit(exitIndex); 50 50 51 // Make sure all code on our inline stack is JIT compiled. This is necessary since52 // we may opt to inline a code block even before it had ever been compiled by the53 // JIT, but our OSR exit infrastructure currently only works if the target of the54 // OSR exit is JIT code. This could be changed since there is nothing particularly55 // hard about doing an OSR exit into the interpreter, but for now this seems to make56 // sense in that if we're OSR exiting from inlined code of a DFG code block, then57 // probably it's a good sign that the thing we're exiting into is hot. Even more58 // interestingly, since the code was inlined, it may never otherwise get JIT59 // compiled since the act of inlining it may ensure that it otherwise never runs.60 for (CodeOrigin codeOrigin = exit.m_codeOrigin; codeOrigin.inlineCallFrame; codeOrigin = codeOrigin.inlineCallFrame->caller) {61 static_cast<FunctionExecutable*>(codeOrigin.inlineCallFrame->executable.get())62 ->baselineCodeBlockFor(codeOrigin.inlineCallFrame->isCall ? CodeForCall : CodeForConstruct)63 ->jitCompile(*globalData);64 }65 66 51 SpeculationRecovery* recovery = 0; 67 52 if (exit.m_recoveryIndex) -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r108326 r108358 27 27 #include "DFGOperations.h" 28 28 29 #if ENABLE(DFG_JIT) 30 29 31 #include "CodeBlock.h" 30 32 #include "DFGOSRExit.h" 31 33 #include "DFGRepatch.h" 32 #include "HostCallReturnValue.h"33 34 #include "GetterSetter.h" 34 35 #include "InlineASM.h" … … 37 38 #include "JSGlobalData.h" 38 39 #include "Operations.h" 39 40 #if ENABLE(DFG_JIT)41 40 42 41 #if CPU(X86_64) … … 739 738 } 740 739 741 static void* handleHostCall(ExecState* execCallee, JSValue callee, CodeSpecializationKind kind) 742 { 743 ExecState* exec = execCallee->callerFrame(); 744 JSGlobalData* globalData = &exec->globalData(); 745 746 execCallee->setScopeChain(exec->scopeChain()); 747 execCallee->setCodeBlock(0); 748 execCallee->clearReturnPC(); 749 750 if (kind == CodeForCall) { 751 CallData callData; 752 CallType callType = getCallData(callee, callData); 753 754 ASSERT(callType != CallTypeJS); 755 756 if (callType == CallTypeHost) { 757 globalData->hostCallReturnValue = JSValue::decode(callData.native.function(execCallee)); 758 if (globalData->exception) 759 return 0; 760 761 return reinterpret_cast<void*>(getHostCallReturnValue); 762 } 763 764 ASSERT(callType == CallTypeNone); 765 exec->globalData().exception = createNotAFunctionError(exec, callee); 766 return 0; 767 } 768 769 ASSERT(kind == CodeForConstruct); 770 771 ConstructData constructData; 772 ConstructType constructType = getConstructData(callee, constructData); 773 774 ASSERT(constructType != ConstructTypeJS); 775 776 if (constructType == ConstructTypeHost) { 777 globalData->hostCallReturnValue = JSValue::decode(constructData.native.function(execCallee)); 778 if (globalData->exception) 779 return 0; 780 781 return reinterpret_cast<void*>(getHostCallReturnValue); 782 } 783 784 ASSERT(constructType == ConstructTypeNone); 785 exec->globalData().exception = createNotAConstructorError(exec, callee); 786 return 0; 787 } 788 789 inline void* linkFor(ExecState* execCallee, ReturnAddressPtr returnAddress, CodeSpecializationKind kind) 790 { 791 ExecState* exec = execCallee->callerFrame(); 792 JSGlobalData* globalData = &exec->globalData(); 793 NativeCallFrameTracer tracer(globalData, exec); 794 795 JSValue calleeAsValue = execCallee->calleeAsValue(); 796 JSCell* calleeAsFunctionCell = getJSFunction(calleeAsValue); 797 if (!calleeAsFunctionCell) 798 return handleHostCall(execCallee, calleeAsValue, kind); 799 800 JSFunction* callee = asFunction(calleeAsFunctionCell); 801 execCallee->setScopeChain(callee->scopeUnchecked()); 802 ExecutableBase* executable = callee->executable(); 803 804 MacroAssemblerCodePtr codePtr; 805 CodeBlock* codeBlock = 0; 806 if (executable->isHostFunction()) 807 codePtr = executable->generatedJITCodeFor(kind).addressForCall(); 808 else { 809 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 810 JSObject* error = functionExecutable->compileFor(execCallee, callee->scope(), kind); 811 if (error) { 812 globalData->exception = createStackOverflowError(exec); 813 return 0; 814 } 815 codeBlock = &functionExecutable->generatedBytecodeFor(kind); 816 if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters())) 817 codePtr = functionExecutable->generatedJITCodeWithArityCheckFor(kind); 818 else 819 codePtr = functionExecutable->generatedJITCodeFor(kind).addressForCall(); 820 } 821 CallLinkInfo& callLinkInfo = exec->codeBlock()->getCallLinkInfo(returnAddress); 822 if (!callLinkInfo.seenOnce()) 823 callLinkInfo.setSeen(); 824 else 825 dfgLinkFor(execCallee, callLinkInfo, codeBlock, callee, codePtr, kind); 826 return codePtr.executableAddress(); 827 } 828 829 P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(operationLinkCall); 830 void* DFG_OPERATION operationLinkCallWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress) 831 { 832 return linkFor(execCallee, returnAddress, CodeForCall); 833 } 834 835 P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(operationLinkConstruct); 836 void* DFG_OPERATION operationLinkConstructWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress) 837 { 838 return linkFor(execCallee, returnAddress, CodeForConstruct); 839 } 840 841 inline void* virtualFor(ExecState* execCallee, CodeSpecializationKind kind) 842 { 843 ExecState* exec = execCallee->callerFrame(); 844 JSGlobalData* globalData = &exec->globalData(); 845 NativeCallFrameTracer tracer(globalData, exec); 846 847 JSValue calleeAsValue = execCallee->calleeAsValue(); 848 JSCell* calleeAsFunctionCell = getJSFunction(calleeAsValue); 849 if (UNLIKELY(!calleeAsFunctionCell)) 850 return handleHostCall(execCallee, calleeAsValue, kind); 851 852 JSFunction* function = asFunction(calleeAsFunctionCell); 853 execCallee->setScopeChain(function->scopeUnchecked()); 854 ExecutableBase* executable = function->executable(); 855 if (UNLIKELY(!executable->hasJITCodeFor(kind))) { 856 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 857 JSObject* error = functionExecutable->compileFor(execCallee, function->scope(), kind); 858 if (error) { 859 exec->globalData().exception = error; 860 return 0; 861 } 862 } 863 return executable->generatedJITCodeWithArityCheckFor(kind).executableAddress(); 864 } 865 866 void* DFG_OPERATION operationVirtualCall(ExecState* execCallee) 867 { 868 return virtualFor(execCallee, CodeForCall); 869 } 870 871 void* DFG_OPERATION operationVirtualConstruct(ExecState* execCallee) 872 { 873 return virtualFor(execCallee, CodeForConstruct); 874 } 875 876 EncodedJSValue DFG_OPERATION operationResolve(ExecState* exec, Identifier* propertyName) 877 { 878 JSGlobalData* globalData = &exec->globalData(); 879 NativeCallFrameTracer tracer(globalData, exec); 880 881 ScopeChainNode* scopeChain = exec->scopeChain(); 882 ScopeChainIterator iter = scopeChain->begin(); 883 ScopeChainIterator end = scopeChain->end(); 884 ASSERT(iter != end); 885 886 do { 887 JSObject* record = iter->get(); 888 PropertySlot slot(record); 889 if (record->getPropertySlot(exec, *propertyName, slot)) 890 return JSValue::encode(slot.getValue(exec, *propertyName)); 891 } while (++iter != end); 892 893 return throwVMError(exec, createUndefinedVariableError(exec, *propertyName)); 894 } 895 896 EncodedJSValue DFG_OPERATION operationResolveBase(ExecState* exec, Identifier* propertyName) 897 { 898 JSGlobalData* globalData = &exec->globalData(); 899 NativeCallFrameTracer tracer(globalData, exec); 900 901 return JSValue::encode(resolveBase(exec, *propertyName, exec->scopeChain(), false)); 902 } 903 904 EncodedJSValue DFG_OPERATION operationResolveBaseStrictPut(ExecState* exec, Identifier* propertyName) 905 { 906 JSGlobalData* globalData = &exec->globalData(); 907 NativeCallFrameTracer tracer(globalData, exec); 908 909 JSValue base = resolveBase(exec, *propertyName, exec->scopeChain(), true); 910 if (!base) 911 throwError(exec, createErrorForInvalidGlobalAssignment(exec, propertyName->ustring())); 912 return JSValue::encode(base); 913 } 914 915 EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState* exec, GlobalResolveInfo* resolveInfo, Identifier* propertyName) 916 { 917 JSGlobalData* globalData = &exec->globalData(); 918 NativeCallFrameTracer tracer(globalData, exec); 919 920 JSGlobalObject* globalObject = exec->lexicalGlobalObject(); 921 922 PropertySlot slot(globalObject); 923 if (globalObject->getPropertySlot(exec, *propertyName, slot)) { 924 JSValue result = slot.getValue(exec, *propertyName); 925 926 if (slot.isCacheableValue() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { 927 resolveInfo->structure.set(exec->globalData(), exec->codeBlock()->ownerExecutable(), globalObject->structure()); 928 resolveInfo->offset = slot.cachedOffset(); 929 } 930 931 return JSValue::encode(result); 932 } 933 934 return throwVMError(exec, createUndefinedVariableError(exec, *propertyName)); 935 } 936 937 EncodedJSValue DFG_OPERATION operationToPrimitive(ExecState* exec, EncodedJSValue value) 938 { 939 JSGlobalData* globalData = &exec->globalData(); 940 NativeCallFrameTracer tracer(globalData, exec); 941 942 return JSValue::encode(JSValue::decode(value).toPrimitive(exec)); 943 } 944 945 EncodedJSValue DFG_OPERATION operationStrCat(ExecState* exec, void* start, size_t size) 946 { 947 JSGlobalData* globalData = &exec->globalData(); 948 NativeCallFrameTracer tracer(globalData, exec); 949 950 return JSValue::encode(jsString(exec, static_cast<Register*>(start), size)); 951 } 952 953 EncodedJSValue DFG_OPERATION operationNewArray(ExecState* exec, void* start, size_t size) 954 { 955 JSGlobalData* globalData = &exec->globalData(); 956 NativeCallFrameTracer tracer(globalData, exec); 957 958 return JSValue::encode(constructArray(exec, static_cast<JSValue*>(start), size)); 959 } 960 961 EncodedJSValue DFG_OPERATION operationNewArrayBuffer(ExecState* exec, size_t start, size_t size) 962 { 963 return JSValue::encode(constructArray(exec, exec->codeBlock()->constantBuffer(start), size)); 964 } 965 966 EncodedJSValue DFG_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr) 967 { 968 RegExp* regexp = static_cast<RegExp*>(regexpPtr); 969 if (!regexp->isValid()) { 970 throwError(exec, createSyntaxError(exec, "Invalid flags supplied to RegExp constructor.")); 971 return JSValue::encode(jsUndefined()); 972 } 973 974 return JSValue::encode(RegExpObject::create(exec->globalData(), exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->regExpStructure(), regexp)); 975 } 976 977 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState* exec, uint32_t callIndex) 978 { 979 JSGlobalData* globalData = &exec->globalData(); 980 NativeCallFrameTracer tracer(globalData, exec); 981 982 JSValue exceptionValue = exec->exception(); 983 ASSERT(exceptionValue); 984 985 unsigned vPCIndex = exec->codeBlock()->bytecodeOffsetForCallAtIndex(callIndex); 986 HandlerInfo* handler = exec->globalData().interpreter->throwException(exec, exceptionValue, vPCIndex); 987 988 void* catchRoutine = handler ? handler->nativeCode.executableAddress() : (void*)ctiOpThrowNotCaught; 989 ASSERT(catchRoutine); 990 return dfgHandlerEncoded(exec, catchRoutine); 991 } 992 993 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandlerInStub(ExecState* exec, StructureStubInfo* stubInfo) 994 { 995 JSGlobalData* globalData = &exec->globalData(); 996 NativeCallFrameTracer tracer(globalData, exec); 997 998 JSValue exceptionValue = exec->exception(); 999 ASSERT(exceptionValue); 1000 1001 CodeOrigin codeOrigin = stubInfo->codeOrigin; 1002 while (codeOrigin.inlineCallFrame) 1003 codeOrigin = codeOrigin.inlineCallFrame->caller; 1004 1005 HandlerInfo* handler = exec->globalData().interpreter->throwException(exec, exceptionValue, codeOrigin.bytecodeIndex); 1006 1007 void* catchRoutine = handler ? handler->nativeCode.executableAddress() : (void*)ctiOpThrowNotCaught; 1008 ASSERT(catchRoutine); 1009 return dfgHandlerEncoded(exec, catchRoutine); 1010 } 1011 1012 double DFG_OPERATION dfgConvertJSValueToNumber(ExecState* exec, EncodedJSValue value) 1013 { 1014 JSGlobalData* globalData = &exec->globalData(); 1015 NativeCallFrameTracer tracer(globalData, exec); 1016 1017 return JSValue::decode(value).toNumber(exec); 1018 } 1019 1020 size_t DFG_OPERATION dfgConvertJSValueToInt32(ExecState* exec, EncodedJSValue value) 1021 { 1022 JSGlobalData* globalData = &exec->globalData(); 1023 NativeCallFrameTracer tracer(globalData, exec); 1024 1025 // toInt32/toUInt32 return the same value; we want the value zero extended to fill the register. 1026 return JSValue::decode(value).toUInt32(exec); 1027 } 1028 1029 size_t DFG_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp) 1030 { 1031 JSGlobalData* globalData = &exec->globalData(); 1032 NativeCallFrameTracer tracer(globalData, exec); 1033 1034 return JSValue::decode(encodedOp).toBoolean(exec); 1035 } 1036 1037 #if DFG_ENABLE(VERBOSE_SPECULATION_FAILURE) 1038 void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw) 1039 { 1040 JSGlobalData* globalData = &exec->globalData(); 1041 NativeCallFrameTracer tracer(globalData, exec); 1042 1043 SpeculationFailureDebugInfo* debugInfo = static_cast<SpeculationFailureDebugInfo*>(debugInfoRaw); 1044 CodeBlock* codeBlock = debugInfo->codeBlock; 1045 CodeBlock* alternative = codeBlock->alternative(); 1046 dataLog("Speculation failure in %p at @%u with executeCounter = %d, reoptimizationRetryCounter = %u, optimizationDelayCounter = %u, success/fail %u/%u\n", codeBlock, debugInfo->nodeIndex, alternative ? alternative->jitExecuteCounter() : 0, alternative ? alternative->reoptimizationRetryCounter() : 0, alternative ? alternative->optimizationDelayCounter() : 0, codeBlock->speculativeSuccessCounter(), codeBlock->speculativeFailCounter()); 1047 } 1048 #endif 1049 1050 } // extern "C" 1051 } } // namespace JSC::DFG 1052 1053 #endif 1054 1055 #if COMPILER(GCC) 1056 1057 namespace JSC { 740 EncodedJSValue DFG_OPERATION getHostCallReturnValue(); 741 EncodedJSValue DFG_OPERATION getHostCallReturnValueWithExecState(ExecState*); 1058 742 1059 743 #if CPU(X86_64) … … 1090 774 #endif 1091 775 1092 extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec) 1093 { 1094 if (!exec) 1095 return JSValue::encode(JSValue()); 776 EncodedJSValue DFG_OPERATION getHostCallReturnValueWithExecState(ExecState* exec) 777 { 778 JSGlobalData* globalData = &exec->globalData(); 779 NativeCallFrameTracer tracer(globalData, exec); 780 1096 781 return JSValue::encode(exec->globalData().hostCallReturnValue); 1097 782 } 1098 783 1099 } // namespace JSC 1100 1101 #endif // COMPILER(GCC) 1102 784 static void* handleHostCall(ExecState* execCallee, JSValue callee, CodeSpecializationKind kind) 785 { 786 ExecState* exec = execCallee->callerFrame(); 787 JSGlobalData* globalData = &exec->globalData(); 788 789 execCallee->setScopeChain(exec->scopeChain()); 790 execCallee->setCodeBlock(0); 791 792 if (kind == CodeForCall) { 793 CallData callData; 794 CallType callType = getCallData(callee, callData); 795 796 ASSERT(callType != CallTypeJS); 797 798 if (callType == CallTypeHost) { 799 globalData->hostCallReturnValue = JSValue::decode(callData.native.function(execCallee)); 800 if (globalData->exception) 801 return 0; 802 803 return reinterpret_cast<void*>(getHostCallReturnValue); 804 } 805 806 ASSERT(callType == CallTypeNone); 807 exec->globalData().exception = createNotAFunctionError(exec, callee); 808 return 0; 809 } 810 811 ASSERT(kind == CodeForConstruct); 812 813 ConstructData constructData; 814 ConstructType constructType = getConstructData(callee, constructData); 815 816 ASSERT(constructType != ConstructTypeJS); 817 818 if (constructType == ConstructTypeHost) { 819 globalData->hostCallReturnValue = JSValue::decode(constructData.native.function(execCallee)); 820 if (globalData->exception) 821 return 0; 822 823 return reinterpret_cast<void*>(getHostCallReturnValue); 824 } 825 826 ASSERT(constructType == ConstructTypeNone); 827 exec->globalData().exception = createNotAConstructorError(exec, callee); 828 return 0; 829 } 830 831 inline void* linkFor(ExecState* execCallee, ReturnAddressPtr returnAddress, CodeSpecializationKind kind) 832 { 833 ExecState* exec = execCallee->callerFrame(); 834 JSGlobalData* globalData = &exec->globalData(); 835 NativeCallFrameTracer tracer(globalData, exec); 836 837 JSValue calleeAsValue = execCallee->calleeAsValue(); 838 JSCell* calleeAsFunctionCell = getJSFunction(calleeAsValue); 839 if (!calleeAsFunctionCell) 840 return handleHostCall(execCallee, calleeAsValue, kind); 841 842 JSFunction* callee = asFunction(calleeAsFunctionCell); 843 execCallee->setScopeChain(callee->scopeUnchecked()); 844 ExecutableBase* executable = callee->executable(); 845 846 MacroAssemblerCodePtr codePtr; 847 CodeBlock* codeBlock = 0; 848 if (executable->isHostFunction()) 849 codePtr = executable->generatedJITCodeFor(kind).addressForCall(); 850 else { 851 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 852 JSObject* error = functionExecutable->compileFor(execCallee, callee->scope(), kind); 853 if (error) { 854 globalData->exception = createStackOverflowError(exec); 855 return 0; 856 } 857 codeBlock = &functionExecutable->generatedBytecodeFor(kind); 858 if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters())) 859 codePtr = functionExecutable->generatedJITCodeWithArityCheckFor(kind); 860 else 861 codePtr = functionExecutable->generatedJITCodeFor(kind).addressForCall(); 862 } 863 CallLinkInfo& callLinkInfo = exec->codeBlock()->getCallLinkInfo(returnAddress); 864 if (!callLinkInfo.seenOnce()) 865 callLinkInfo.setSeen(); 866 else 867 dfgLinkFor(execCallee, callLinkInfo, codeBlock, callee, codePtr, kind); 868 return codePtr.executableAddress(); 869 } 870 871 P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(operationLinkCall); 872 void* DFG_OPERATION operationLinkCallWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress) 873 { 874 return linkFor(execCallee, returnAddress, CodeForCall); 875 } 876 877 P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(operationLinkConstruct); 878 void* DFG_OPERATION operationLinkConstructWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress) 879 { 880 return linkFor(execCallee, returnAddress, CodeForConstruct); 881 } 882 883 inline void* virtualFor(ExecState* execCallee, CodeSpecializationKind kind) 884 { 885 ExecState* exec = execCallee->callerFrame(); 886 JSGlobalData* globalData = &exec->globalData(); 887 NativeCallFrameTracer tracer(globalData, exec); 888 889 JSValue calleeAsValue = execCallee->calleeAsValue(); 890 JSCell* calleeAsFunctionCell = getJSFunction(calleeAsValue); 891 if (UNLIKELY(!calleeAsFunctionCell)) 892 return handleHostCall(execCallee, calleeAsValue, kind); 893 894 JSFunction* function = asFunction(calleeAsFunctionCell); 895 execCallee->setScopeChain(function->scopeUnchecked()); 896 ExecutableBase* executable = function->executable(); 897 if (UNLIKELY(!executable->hasJITCodeFor(kind))) { 898 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 899 JSObject* error = functionExecutable->compileFor(execCallee, function->scope(), kind); 900 if (error) { 901 exec->globalData().exception = error; 902 return 0; 903 } 904 } 905 return executable->generatedJITCodeWithArityCheckFor(kind).executableAddress(); 906 } 907 908 void* DFG_OPERATION operationVirtualCall(ExecState* execCallee) 909 { 910 return virtualFor(execCallee, CodeForCall); 911 } 912 913 void* DFG_OPERATION operationVirtualConstruct(ExecState* execCallee) 914 { 915 return virtualFor(execCallee, CodeForConstruct); 916 } 917 918 EncodedJSValue DFG_OPERATION operationResolve(ExecState* exec, Identifier* propertyName) 919 { 920 JSGlobalData* globalData = &exec->globalData(); 921 NativeCallFrameTracer tracer(globalData, exec); 922 923 ScopeChainNode* scopeChain = exec->scopeChain(); 924 ScopeChainIterator iter = scopeChain->begin(); 925 ScopeChainIterator end = scopeChain->end(); 926 ASSERT(iter != end); 927 928 do { 929 JSObject* record = iter->get(); 930 PropertySlot slot(record); 931 if (record->getPropertySlot(exec, *propertyName, slot)) 932 return JSValue::encode(slot.getValue(exec, *propertyName)); 933 } while (++iter != end); 934 935 return throwVMError(exec, createUndefinedVariableError(exec, *propertyName)); 936 } 937 938 EncodedJSValue DFG_OPERATION operationResolveBase(ExecState* exec, Identifier* propertyName) 939 { 940 JSGlobalData* globalData = &exec->globalData(); 941 NativeCallFrameTracer tracer(globalData, exec); 942 943 return JSValue::encode(resolveBase(exec, *propertyName, exec->scopeChain(), false)); 944 } 945 946 EncodedJSValue DFG_OPERATION operationResolveBaseStrictPut(ExecState* exec, Identifier* propertyName) 947 { 948 JSGlobalData* globalData = &exec->globalData(); 949 NativeCallFrameTracer tracer(globalData, exec); 950 951 JSValue base = resolveBase(exec, *propertyName, exec->scopeChain(), true); 952 if (!base) 953 throwError(exec, createErrorForInvalidGlobalAssignment(exec, propertyName->ustring())); 954 return JSValue::encode(base); 955 } 956 957 EncodedJSValue DFG_OPERATION operationResolveGlobal(ExecState* exec, GlobalResolveInfo* resolveInfo, Identifier* propertyName) 958 { 959 JSGlobalData* globalData = &exec->globalData(); 960 NativeCallFrameTracer tracer(globalData, exec); 961 962 JSGlobalObject* globalObject = exec->lexicalGlobalObject(); 963 964 PropertySlot slot(globalObject); 965 if (globalObject->getPropertySlot(exec, *propertyName, slot)) { 966 JSValue result = slot.getValue(exec, *propertyName); 967 968 if (slot.isCacheableValue() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { 969 resolveInfo->structure.set(exec->globalData(), exec->codeBlock()->ownerExecutable(), globalObject->structure()); 970 resolveInfo->offset = slot.cachedOffset(); 971 } 972 973 return JSValue::encode(result); 974 } 975 976 return throwVMError(exec, createUndefinedVariableError(exec, *propertyName)); 977 } 978 979 EncodedJSValue DFG_OPERATION operationToPrimitive(ExecState* exec, EncodedJSValue value) 980 { 981 JSGlobalData* globalData = &exec->globalData(); 982 NativeCallFrameTracer tracer(globalData, exec); 983 984 return JSValue::encode(JSValue::decode(value).toPrimitive(exec)); 985 } 986 987 EncodedJSValue DFG_OPERATION operationStrCat(ExecState* exec, void* start, size_t size) 988 { 989 JSGlobalData* globalData = &exec->globalData(); 990 NativeCallFrameTracer tracer(globalData, exec); 991 992 return JSValue::encode(jsString(exec, static_cast<Register*>(start), size)); 993 } 994 995 EncodedJSValue DFG_OPERATION operationNewArray(ExecState* exec, void* start, size_t size) 996 { 997 JSGlobalData* globalData = &exec->globalData(); 998 NativeCallFrameTracer tracer(globalData, exec); 999 1000 return JSValue::encode(constructArray(exec, static_cast<JSValue*>(start), size)); 1001 } 1002 1003 EncodedJSValue DFG_OPERATION operationNewArrayBuffer(ExecState* exec, size_t start, size_t size) 1004 { 1005 return JSValue::encode(constructArray(exec, exec->codeBlock()->constantBuffer(start), size)); 1006 } 1007 1008 EncodedJSValue DFG_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr) 1009 { 1010 RegExp* regexp = static_cast<RegExp*>(regexpPtr); 1011 if (!regexp->isValid()) { 1012 throwError(exec, createSyntaxError(exec, "Invalid flags supplied to RegExp constructor.")); 1013 return JSValue::encode(jsUndefined()); 1014 } 1015 1016 return JSValue::encode(RegExpObject::create(exec->globalData(), exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->regExpStructure(), regexp)); 1017 } 1018 1019 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState* exec, uint32_t callIndex) 1020 { 1021 JSGlobalData* globalData = &exec->globalData(); 1022 NativeCallFrameTracer tracer(globalData, exec); 1023 1024 JSValue exceptionValue = exec->exception(); 1025 ASSERT(exceptionValue); 1026 1027 unsigned vPCIndex = exec->codeBlock()->bytecodeOffsetForCallAtIndex(callIndex); 1028 HandlerInfo* handler = exec->globalData().interpreter->throwException(exec, exceptionValue, vPCIndex); 1029 1030 void* catchRoutine = handler ? handler->nativeCode.executableAddress() : (void*)ctiOpThrowNotCaught; 1031 ASSERT(catchRoutine); 1032 return dfgHandlerEncoded(exec, catchRoutine); 1033 } 1034 1035 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandlerInStub(ExecState* exec, StructureStubInfo* stubInfo) 1036 { 1037 JSGlobalData* globalData = &exec->globalData(); 1038 NativeCallFrameTracer tracer(globalData, exec); 1039 1040 JSValue exceptionValue = exec->exception(); 1041 ASSERT(exceptionValue); 1042 1043 CodeOrigin codeOrigin = stubInfo->codeOrigin; 1044 while (codeOrigin.inlineCallFrame) 1045 codeOrigin = codeOrigin.inlineCallFrame->caller; 1046 1047 HandlerInfo* handler = exec->globalData().interpreter->throwException(exec, exceptionValue, codeOrigin.bytecodeIndex); 1048 1049 void* catchRoutine = handler ? handler->nativeCode.executableAddress() : (void*)ctiOpThrowNotCaught; 1050 ASSERT(catchRoutine); 1051 return dfgHandlerEncoded(exec, catchRoutine); 1052 } 1053 1054 double DFG_OPERATION dfgConvertJSValueToNumber(ExecState* exec, EncodedJSValue value) 1055 { 1056 JSGlobalData* globalData = &exec->globalData(); 1057 NativeCallFrameTracer tracer(globalData, exec); 1058 1059 return JSValue::decode(value).toNumber(exec); 1060 } 1061 1062 size_t DFG_OPERATION dfgConvertJSValueToInt32(ExecState* exec, EncodedJSValue value) 1063 { 1064 JSGlobalData* globalData = &exec->globalData(); 1065 NativeCallFrameTracer tracer(globalData, exec); 1066 1067 // toInt32/toUInt32 return the same value; we want the value zero extended to fill the register. 1068 return JSValue::decode(value).toUInt32(exec); 1069 } 1070 1071 size_t DFG_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp) 1072 { 1073 JSGlobalData* globalData = &exec->globalData(); 1074 NativeCallFrameTracer tracer(globalData, exec); 1075 1076 return JSValue::decode(encodedOp).toBoolean(exec); 1077 } 1078 1079 #if DFG_ENABLE(VERBOSE_SPECULATION_FAILURE) 1080 void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw) 1081 { 1082 JSGlobalData* globalData = &exec->globalData(); 1083 NativeCallFrameTracer tracer(globalData, exec); 1084 1085 SpeculationFailureDebugInfo* debugInfo = static_cast<SpeculationFailureDebugInfo*>(debugInfoRaw); 1086 CodeBlock* codeBlock = debugInfo->codeBlock; 1087 CodeBlock* alternative = codeBlock->alternative(); 1088 dataLog("Speculation failure in %p at @%u with executeCounter = %d, reoptimizationRetryCounter = %u, optimizationDelayCounter = %u, success/fail %u/%u\n", codeBlock, debugInfo->nodeIndex, alternative ? alternative->jitExecuteCounter() : 0, alternative ? alternative->reoptimizationRetryCounter() : 0, alternative ? alternative->optimizationDelayCounter() : 0, codeBlock->speculativeSuccessCounter(), codeBlock->speculativeFailCounter()); 1089 } 1090 #endif 1091 1092 } // extern "C" 1093 } } // namespace JSC::DFG 1094 1095 #endif -
trunk/Source/JavaScriptCore/heap/Heap.h
r108309 r108358 51 51 class JSValue; 52 52 class LiveObjectIterator; 53 class LLIntOffsetsExtractor;54 53 class MarkedArgumentBuffer; 55 54 class RegisterFile; … … 97 96 inline bool isBusy(); 98 97 99 MarkedAllocator& firstAllocatorWithoutDestructors() { return m_objectSpace.firstAllocator(); }100 98 MarkedAllocator& allocatorForObjectWithoutDestructor(size_t bytes) { return m_objectSpace.allocatorFor(bytes); } 101 99 MarkedAllocator& allocatorForObjectWithDestructor(size_t bytes) { return m_objectSpace.destructorAllocatorFor(bytes); } … … 139 137 140 138 private: 141 friend class CodeBlock;142 friend class LLIntOffsetsExtractor;143 139 friend class MarkedSpace; 144 140 friend class MarkedAllocator; … … 146 142 friend class CopiedSpace; 147 143 friend class SlotVisitor; 144 friend class CodeBlock; 148 145 template<typename T> friend void* allocateCell(Heap&); 149 146 -
trunk/Source/JavaScriptCore/heap/MarkStack.cpp
r108309 r108358 304 304 305 305 ASSERT(Heap::isMarked(cell)); 306 306 307 307 if (isJSString(cell)) { 308 308 JSString::visitChildren(const_cast<JSCell*>(cell), visitor); -
trunk/Source/JavaScriptCore/heap/MarkedAllocator.h
r108309 r108358 9 9 class Heap; 10 10 class MarkedSpace; 11 class LLIntOffsetsExtractor;12 11 13 12 namespace DFG { … … 35 34 36 35 private: 37 friend class LLIntOffsetsExtractor;38 39 36 JS_EXPORT_PRIVATE void* allocateSlowCase(); 40 37 void* tryAllocate(); -
trunk/Source/JavaScriptCore/heap/MarkedSpace.h
r108309 r108358 42 42 class JSCell; 43 43 class LiveObjectIterator; 44 class LLIntOffsetsExtractor;45 44 class WeakGCHandle; 46 45 class SlotVisitor; … … 53 52 MarkedSpace(Heap*); 54 53 55 MarkedAllocator& firstAllocator();56 54 MarkedAllocator& allocatorFor(size_t); 57 55 MarkedAllocator& allocatorFor(MarkedBlock*); … … 82 80 83 81 private: 84 friend class LLIntOffsetsExtractor;85 86 82 // [ 32... 256 ] 87 83 static const size_t preciseStep = MarkedBlock::atomSize; … … 132 128 Functor functor; 133 129 return forEachCell(functor); 134 }135 136 inline MarkedAllocator& MarkedSpace::firstAllocator()137 {138 return m_normalSpace.preciseAllocators[0];139 130 } 140 131 -
trunk/Source/JavaScriptCore/interpreter/CallFrame.cpp
r108309 r108358 51 51 #endif 52 52 53 #if USE(JSVALUE32_64)54 unsigned CallFrame::bytecodeOffsetForNonDFGCode() const55 {56 ASSERT(codeBlock());57 return currentVPC() - codeBlock()->instructions().begin();58 }59 60 void CallFrame::setBytecodeOffsetForNonDFGCode(unsigned offset)61 {62 ASSERT(codeBlock());63 setCurrentVPC(codeBlock()->instructions().begin() + offset);64 }65 #else66 Instruction* CallFrame::currentVPC() const67 {68 return codeBlock()->instructions().begin() + bytecodeOffsetForNonDFGCode();69 }70 void CallFrame::setCurrentVPC(Instruction* vpc)71 {72 setBytecodeOffsetForNonDFGCode(vpc - codeBlock()->instructions().begin());73 }74 #endif75 76 53 #if ENABLE(DFG_JIT) 77 54 bool CallFrame::isInlineCallFrameSlow() … … 166 143 167 144 // Am I an inline call frame? If so, we're done. 168 if (isInlineCallFrame() )145 if (isInlineCallFrame() || !hasReturnPC()) 169 146 return callerFrame()->removeHostCallFrameFlag(); 170 147 … … 177 154 178 155 // Figure out how we want to get the current code location. 179 if ( !hasReturnPC() || returnAddressIsInCtiTrampoline(returnPC()))156 if (hasHostCallFrameFlag() || returnAddressIsInCtiTrampoline(returnPC())) 180 157 return machineCaller->trueCallFrameFromVMCode()->removeHostCallFrameFlag(); 181 158 -
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r108309 r108358 104 104 CallFrame* callerFrame() const { return this[RegisterFile::CallerFrame].callFrame(); } 105 105 #if ENABLE(JIT) 106 bool hasReturnPC() const { return this[RegisterFile::ReturnPC].vPC(); } 106 107 ReturnAddressPtr returnPC() const { return ReturnAddressPtr(this[RegisterFile::ReturnPC].vPC()); } 107 bool hasReturnPC() const { return !!this[RegisterFile::ReturnPC].vPC(); }108 void clearReturnPC() { registers()[RegisterFile::ReturnPC] = static_cast<Instruction*>(0); }109 108 #endif 110 109 AbstractPC abstractReturnPC(JSGlobalData& globalData) { return AbstractPC(globalData, this); } 111 #if USE(JSVALUE32_64) 112 unsigned bytecodeOffsetForNonDFGCode() const; 113 void setBytecodeOffsetForNonDFGCode(unsigned offset); 114 #else 115 unsigned bytecodeOffsetForNonDFGCode() const 110 unsigned bytecodeOffsetForNonDFGCode() 116 111 { 117 112 ASSERT(codeBlock()); … … 124 119 this[RegisterFile::ArgumentCount].tag() = static_cast<int32_t>(offset); 125 120 } 126 #endif127 121 128 122 #if ENABLE(DFG_JIT) … … 141 135 #if ENABLE(CLASSIC_INTERPRETER) 142 136 Instruction* returnVPC() const { return this[RegisterFile::ReturnPC].vPC(); } 143 #endif144 #if USE(JSVALUE32_64)145 Instruction* currentVPC() const146 {147 return bitwise_cast<Instruction*>(this[RegisterFile::ArgumentCount].tag());148 }149 void setCurrentVPC(Instruction* vpc)150 {151 this[RegisterFile::ArgumentCount].tag() = bitwise_cast<int32_t>(vpc);152 }153 #else154 Instruction* currentVPC() const;155 void setCurrentVPC(Instruction* vpc);156 137 #endif 157 138 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r108309 r108358 70 70 #endif 71 71 72 #define WTF_USE_GCC_COMPUTED_GOTO_WORKAROUND ( (ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) || ENABLE(LLINT)) && !defined(__llvm__))72 #define WTF_USE_GCC_COMPUTED_GOTO_WORKAROUND (ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) && !defined(__llvm__)) 73 73 74 74 using namespace std; … … 544 544 , m_initialized(false) 545 545 #endif 546 , m_ classicEnabled(false)546 , m_enabled(false) 547 547 { 548 548 } 549 549 550 Interpreter::~Interpreter()550 void Interpreter::initialize(bool canUseJIT) 551 551 { 552 #if ENABLE(LLINT) 553 if (m_classicEnabled) 554 delete[] m_opcodeTable; 555 #endif 556 } 557 558 void Interpreter::initialize(LLInt::Data* llintData, bool canUseJIT) 559 { 560 UNUSED_PARAM(llintData); 561 UNUSED_PARAM(canUseJIT); 562 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) || ENABLE(LLINT) 563 #if !ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 564 // Having LLInt enabled, but not being able to use the JIT, and not having 565 // a computed goto interpreter, is not supported. Not because we cannot 566 // support it, but because I decided to draw the line at the number of 567 // permutations of execution engines that I wanted this code to grok. 568 ASSERT(canUseJIT); 569 #endif 552 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 570 553 if (canUseJIT) { 571 #if ENABLE(LLINT)572 m_opcodeTable = llintData->opcodeMap();573 for (int i = 0; i < numOpcodeIDs; ++i)574 m_opcodeIDTable.add(m_opcodeTable[i], static_cast<OpcodeID>(i));575 #else576 554 // If the JIT is present, don't use jump destinations for opcodes. 577 555 … … 580 558 m_opcodeTable[i] = opcode; 581 559 } 582 #endif583 560 } else { 584 #if ENABLE(LLINT)585 m_opcodeTable = new Opcode[numOpcodeIDs];586 #endif587 561 privateExecute(InitializeAndReturn, 0, 0); 588 562 … … 590 564 m_opcodeIDTable.add(m_opcodeTable[i], static_cast<OpcodeID>(i)); 591 565 592 m_ classicEnabled = true;566 m_enabled = true; 593 567 } 594 568 #else 569 UNUSED_PARAM(canUseJIT); 595 570 #if ENABLE(CLASSIC_INTERPRETER) 596 m_ classicEnabled = true;571 m_enabled = true; 597 572 #else 598 m_ classicEnabled = false;573 m_enabled = false; 599 574 #endif 600 575 #endif // ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) … … 693 668 bool Interpreter::isOpcode(Opcode opcode) 694 669 { 695 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) || ENABLE(LLINT) 696 #if !ENABLE(LLINT) 697 if (!m_classicEnabled) 670 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 671 if (!m_enabled) 698 672 return opcode >= 0 && static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode)) <= op_end; 699 #endif700 673 return opcode != HashTraits<Opcode>::emptyValue() 701 674 && !HashTraits<Opcode>::isDeletedValue(opcode) … … 754 727 #if ENABLE(JIT) && ENABLE(CLASSIC_INTERPRETER) 755 728 if (callerFrame->globalData().canUseJIT()) 756 bytecodeOffset = codeBlock->bytecodeOffset(call erFrame, callFrame->returnPC());729 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnPC()); 757 730 else 758 731 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnVPC()) - 1; 759 732 #elif ENABLE(JIT) 760 bytecodeOffset = codeBlock->bytecodeOffset(call erFrame, callFrame->returnPC());733 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnPC()); 761 734 #else 762 735 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnVPC()) - 1; … … 885 858 } else 886 859 #endif 887 bytecodeOffset = callerCodeBlock->bytecodeOffset(call erFrame, callFrame->returnPC());860 bytecodeOffset = callerCodeBlock->bytecodeOffset(callFrame->returnPC()); 888 861 #endif 889 862 } … … 1843 1816 1844 1817 ASSERT(m_initialized); 1845 ASSERT(m_ classicEnabled);1818 ASSERT(m_enabled); 1846 1819 1847 1820 #if ENABLE(JIT) … … 3494 3467 skip_put_by_id: 3495 3468 #endif 3496 DEFINE_OPCODE(op_put_by_id_transition_direct)3497 DEFINE_OPCODE(op_put_by_id_transition_normal)3498 3469 DEFINE_OPCODE(op_put_by_id_transition) { 3499 3470 /* op_put_by_id_transition base(r) property(id) value(r) oldStructure(sID) newStructure(sID) structureChain(chain) offset(n) direct(b) … … 5329 5300 #if ENABLE(JIT) 5330 5301 else 5331 bytecodeOffset = callerCodeBlock->bytecodeOffset(call erFrame, callFrame->returnPC());5302 bytecodeOffset = callerCodeBlock->bytecodeOffset(callFrame->returnPC()); 5332 5303 #endif 5333 5304 #else 5334 bytecodeOffset = callerCodeBlock->bytecodeOffset(call erFrame, callFrame->returnPC());5305 bytecodeOffset = callerCodeBlock->bytecodeOffset(callFrame->returnPC()); 5335 5306 #endif 5336 5307 lineNumber = callerCodeBlock->lineNumberForBytecodeOffset(bytecodeOffset - 1); -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r108309 r108358 35 35 #include "JSValue.h" 36 36 #include "JSObject.h" 37 #include "LLIntData.h"38 37 #include "Opcode.h" 39 38 #include "RegisterFile.h" … … 48 47 class FunctionExecutable; 49 48 class JSGlobalObject; 50 class LLIntOffsetsExtractor;51 49 class ProgramExecutable; 52 50 class Register; … … 161 159 class Interpreter { 162 160 WTF_MAKE_FAST_ALLOCATED; 161 friend class JIT; 163 162 friend class CachedCall; 164 friend class LLIntOffsetsExtractor;165 friend class JIT;166 163 public: 167 164 Interpreter(); 168 ~Interpreter(); 169 170 void initialize(LLInt::Data*, bool canUseJIT); 165 166 void initialize(bool canUseJIT); 171 167 172 168 RegisterFile& registerFile() { return m_registerFile; } … … 175 171 { 176 172 ASSERT(m_initialized); 177 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) || ENABLE(LLINT)173 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 178 174 return m_opcodeTable[id]; 179 175 #else … … 185 181 { 186 182 ASSERT(m_initialized); 187 #if ENABLE( LLINT)183 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 188 184 ASSERT(isOpcode(opcode)); 189 return m_opcodeIDTable.get(opcode); 190 #elif ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 191 ASSERT(isOpcode(opcode)); 192 if (!m_classicEnabled) 185 if (!m_enabled) 193 186 return static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode)); 194 187 … … 197 190 return opcode; 198 191 #endif 199 }200 201 bool classicEnabled()202 {203 return m_classicEnabled;204 192 } 205 193 … … 272 260 RegisterFile m_registerFile; 273 261 274 #if ENABLE(LLINT) 275 Opcode* m_opcodeTable; // Maps OpcodeID => Opcode for compiling 276 HashMap<Opcode, OpcodeID> m_opcodeIDTable; // Maps Opcode => OpcodeID for decompiling 277 #elif ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 262 #if ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER) 278 263 Opcode m_opcodeTable[numOpcodeIDs]; // Maps OpcodeID => Opcode for compiling 279 264 HashMap<Opcode, OpcodeID> m_opcodeIDTable; // Maps Opcode => OpcodeID for decompiling … … 283 268 bool m_initialized; 284 269 #endif 285 bool m_ classicEnabled;270 bool m_enabled; 286 271 }; 287 272 -
trunk/Source/JavaScriptCore/interpreter/RegisterFile.h
r108309 r108358 40 40 class ConservativeRoots; 41 41 class DFGCodeBlocks; 42 class LLIntOffsetsExtractor;43 42 44 43 class RegisterFile { … … 83 82 84 83 private: 85 friend class LLIntOffsetsExtractor;86 87 84 bool growSlowCase(Register*); 88 85 void releaseExcessCapacity(); -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h
r108309 r108358 90 90 } 91 91 92 #if ENABLE(JIT) && ENABLE(ASSEMBLER) 93 92 94 namespace JSC { 93 95 94 96 typedef WTF::MetaAllocatorHandle ExecutableMemoryHandle; 95 96 #if ENABLE(JIT) && ENABLE(ASSEMBLER)97 97 98 98 class ExecutableAllocator { … … 236 236 }; 237 237 238 } // namespace JSC 239 238 240 #endif // ENABLE(JIT) && ENABLE(ASSEMBLER) 239 241 240 } // namespace JSC241 242 242 #endif // !defined(ExecutableAllocator) -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r108309 r108358 326 326 DEFINE_OP(op_push_new_scope) 327 327 DEFINE_OP(op_push_scope) 328 case op_put_by_id_transition_direct:329 case op_put_by_id_transition_normal:330 328 DEFINE_OP(op_put_by_id) 331 329 DEFINE_OP(op_put_by_index) … … 489 487 DEFINE_SLOWCASE_OP(op_pre_dec) 490 488 DEFINE_SLOWCASE_OP(op_pre_inc) 491 case op_put_by_id_transition_direct:492 case op_put_by_id_transition_normal:493 489 DEFINE_SLOWCASE_OP(op_put_by_id) 494 490 DEFINE_SLOWCASE_OP(op_put_by_val) … … 530 526 JITCode JIT::privateCompile(CodePtr* functionEntryArityCheck) 531 527 { 532 #if ENABLE(JIT_VERBOSE_OSR)533 printf("Compiling JIT code!\n");534 #endif535 536 528 #if ENABLE(VALUE_PROFILER) 537 529 m_canBeOptimized = m_codeBlock->canCompileWithDFG(); … … 702 694 } 703 695 704 #if ENABLE(DFG_JIT) || ENABLE(LLINT) 705 if (m_canBeOptimized 706 #if ENABLE(LLINT) 707 || true 708 #endif 709 ) { 696 #if ENABLE(DFG_JIT) 697 if (m_canBeOptimized) { 710 698 CompactJITCodeMap::Encoder jitCodeMapEncoder; 711 699 for (unsigned bytecodeOffset = 0; bytecodeOffset < m_labels.size(); ++bytecodeOffset) { -
trunk/Source/JavaScriptCore/jit/JITCode.h
r108309 r108358 49 49 #endif 50 50 public: 51 enum JITType { None, HostCallThunk, InterpreterThunk, BaselineJIT, DFGJIT };51 enum JITType { HostCallThunk, BaselineJIT, DFGJIT }; 52 52 53 53 static JITType bottomTierJIT() … … 67 67 } 68 68 69 static bool isOptimizingJIT(JITType jitType)70 {71 return jitType == DFGJIT;72 }73 74 static bool isBaselineCode(JITType jitType)75 {76 return jitType == InterpreterThunk || jitType == BaselineJIT;77 }78 79 69 #if ENABLE(JIT) 80 70 JITCode() 81 : m_jitType(None)82 71 { 83 72 } … … 87 76 , m_jitType(jitType) 88 77 { 89 ASSERT(jitType != None);90 78 } 91 79 -
trunk/Source/JavaScriptCore/jit/JITDriver.h
r108309 r108358 34 34 #include "DFGDriver.h" 35 35 #include "JIT.h" 36 #include "LLIntEntrypoints.h"37 36 38 37 namespace JSC { … … 41 40 inline bool jitCompileIfAppropriate(JSGlobalData& globalData, OwnPtr<CodeBlockType>& codeBlock, JITCode& jitCode, JITCode::JITType jitType) 42 41 { 43 if (jitType == codeBlock->getJITType())44 return true;45 46 42 if (!globalData.canUseJIT()) 47 43 return true; 48 49 codeBlock->unlinkIncomingCalls();50 44 51 45 bool dfgCompiled = false; … … 69 63 inline bool jitCompileFunctionIfAppropriate(JSGlobalData& globalData, OwnPtr<FunctionCodeBlock>& codeBlock, JITCode& jitCode, MacroAssemblerCodePtr& jitCodeWithArityCheck, SharedSymbolTable*& symbolTable, JITCode::JITType jitType) 70 64 { 71 if (jitType == codeBlock->getJITType())72 return true;73 74 65 if (!globalData.canUseJIT()) 75 66 return true; 76 77 codeBlock->unlinkIncomingCalls();78 67 79 68 bool dfgCompiled = false; … … 91 80 jitCode = JIT::compile(&globalData, codeBlock.get(), &jitCodeWithArityCheck); 92 81 } 82 93 83 codeBlock->setJITCode(jitCode, jitCodeWithArityCheck); 94 84 -
trunk/Source/JavaScriptCore/jit/JITExceptions.cpp
r108309 r108358 65 65 ExceptionHandler jitThrow(JSGlobalData* globalData, ExecState* callFrame, JSValue exceptionValue, ReturnAddressPtr faultLocation) 66 66 { 67 return genericThrow(globalData, callFrame, exceptionValue, callFrame->codeBlock()->bytecodeOffset( callFrame,faultLocation));67 return genericThrow(globalData, callFrame, exceptionValue, callFrame->codeBlock()->bytecodeOffset(faultLocation)); 68 68 } 69 69 -
trunk/Source/JavaScriptCore/jit/JITInlineMethods.h
r108309 r108358 266 266 { 267 267 ASSERT(static_cast<int>(m_bytecodeOffset) >= 0); 268 if (m_bytecodeOffset) { 269 #if USE(JSVALUE32_64) 270 storePtr(TrustedImmPtr(m_codeBlock->instructions().begin() + m_bytecodeOffset + 1), intTagFor(RegisterFile::ArgumentCount)); 271 #else 268 if (m_bytecodeOffset) 272 269 store32(Imm32(m_bytecodeOffset + 1), intTagFor(RegisterFile::ArgumentCount)); 273 #endif274 }275 270 storePtr(callFrameRegister, &m_globalData->topCallFrame); 276 271 } -
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r108309 r108358 1447 1447 JSValue baseValue = stackFrame.args[0].jsValue(); 1448 1448 ASSERT(baseValue.isObject()); 1449 1450 1449 asObject(baseValue)->putDirect(callFrame->globalData(), ident, stackFrame.args[2].jsValue(), slot); 1451 1450 … … 1933 1932 1934 1933 #if ENABLE(JIT_VERBOSE_OSR) 1935 dataLog(" %p: Entered optimize_from_loop with executeCounter = %d, reoptimizationRetryCounter = %u, optimizationDelayCounter = %u\n", codeBlock, codeBlock->jitExecuteCounter(), codeBlock->reoptimizationRetryCounter(), codeBlock->optimizationDelayCounter());1934 dataLog("Entered optimize_from_loop with executeCounter = %d, reoptimizationRetryCounter = %u, optimizationDelayCounter = %u\n", codeBlock->jitExecuteCounter(), codeBlock->reoptimizationRetryCounter(), codeBlock->optimizationDelayCounter()); 1936 1935 #endif 1937 1936 … … 2188 2187 } 2189 2188 2189 inline CallFrame* arityCheckFor(CallFrame* callFrame, RegisterFile* registerFile, CodeSpecializationKind kind) 2190 { 2191 JSFunction* callee = asFunction(callFrame->callee()); 2192 ASSERT(!callee->isHostFunction()); 2193 CodeBlock* newCodeBlock = &callee->jsExecutable()->generatedBytecodeFor(kind); 2194 int argumentCountIncludingThis = callFrame->argumentCountIncludingThis(); 2195 2196 // This ensures enough space for the worst case scenario of zero arguments passed by the caller. 2197 if (!registerFile->grow(callFrame->registers() + newCodeBlock->numParameters() + newCodeBlock->m_numCalleeRegisters)) 2198 return 0; 2199 2200 ASSERT(argumentCountIncludingThis < newCodeBlock->numParameters()); 2201 2202 // Too few arguments -- copy call frame and arguments, then fill in missing arguments with undefined. 2203 size_t delta = newCodeBlock->numParameters() - argumentCountIncludingThis; 2204 Register* src = callFrame->registers(); 2205 Register* dst = callFrame->registers() + delta; 2206 2207 int i; 2208 int end = -CallFrame::offsetFor(argumentCountIncludingThis); 2209 for (i = -1; i >= end; --i) 2210 dst[i] = src[i]; 2211 2212 end -= delta; 2213 for ( ; i >= end; --i) 2214 dst[i] = jsUndefined(); 2215 2216 CallFrame* newCallFrame = CallFrame::create(dst); 2217 ASSERT((void*)newCallFrame <= registerFile->end()); 2218 return newCallFrame; 2219 } 2220 2190 2221 DEFINE_STUB_FUNCTION(void*, op_call_arityCheck) 2191 2222 { … … 2194 2225 CallFrame* callFrame = stackFrame.callFrame; 2195 2226 2196 CallFrame* newCallFrame = CommonSlowPaths::arityCheckFor(callFrame, stackFrame.registerFile, CodeForCall);2227 CallFrame* newCallFrame = arityCheckFor(callFrame, stackFrame.registerFile, CodeForCall); 2197 2228 if (!newCallFrame) 2198 2229 return throwExceptionFromOpCall<void*>(stackFrame, callFrame, STUB_RETURN_ADDRESS, createStackOverflowError(callFrame->callerFrame())); … … 2207 2238 CallFrame* callFrame = stackFrame.callFrame; 2208 2239 2209 CallFrame* newCallFrame = CommonSlowPaths::arityCheckFor(callFrame, stackFrame.registerFile, CodeForConstruct);2240 CallFrame* newCallFrame = arityCheckFor(callFrame, stackFrame.registerFile, CodeForConstruct); 2210 2241 if (!newCallFrame) 2211 2242 return throwExceptionFromOpCall<void*>(stackFrame, callFrame, STUB_RETURN_ADDRESS, createStackOverflowError(callFrame->callerFrame())); … … 2284 2315 2285 2316 CallFrame* callFrame = stackFrame.callFrame; 2286 2287 2317 JSValue callee = callFrame->calleeAsValue(); 2288 2318 -
trunk/Source/JavaScriptCore/jit/JITStubs.h
r108309 r108358 38 38 #include <wtf/HashMap.h> 39 39 40 #if ENABLE(JIT) 41 40 42 namespace JSC { 41 43 … … 261 263 262 264 #define JITSTACKFRAME_ARGS_INDEX (OBJECT_OFFSETOF(JITStackFrame, args) / sizeof(void*)) 263 264 #if ENABLE(JIT)265 265 266 266 #define STUB_ARGS_DECLARATION void** args … … 457 457 } // extern "C" 458 458 459 } // namespace JSC 460 459 461 #endif // ENABLE(JIT) 460 462 461 } // namespace JSC462 463 463 #endif // JITStubs_h -
trunk/Source/JavaScriptCore/jit/JSInterfaceJIT.h
r108309 r108358 27 27 #define JSInterfaceJIT_h 28 28 29 #include "BytecodeConventions.h"30 29 #include "JITCode.h" 31 30 #include "JITStubs.h" 32 #include "JSString.h"33 31 #include "JSValue.h" 34 32 #include "MacroAssembler.h" -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h
r108309 r108358 28 28 29 29 #include "CodeBlock.h" 30 #include "CodeSpecializationKind.h"31 30 #include "ExceptionHelpers.h" 32 31 #include "JSArray.h" … … 42 41 43 42 namespace CommonSlowPaths { 44 45 ALWAYS_INLINE ExecState* arityCheckFor(ExecState* exec, RegisterFile* registerFile, CodeSpecializationKind kind)46 {47 JSFunction* callee = asFunction(exec->callee());48 ASSERT(!callee->isHostFunction());49 CodeBlock* newCodeBlock = &callee->jsExecutable()->generatedBytecodeFor(kind);50 int argumentCountIncludingThis = exec->argumentCountIncludingThis();51 52 // This ensures enough space for the worst case scenario of zero arguments passed by the caller.53 if (!registerFile->grow(exec->registers() + newCodeBlock->numParameters() + newCodeBlock->m_numCalleeRegisters))54 return 0;55 56 ASSERT(argumentCountIncludingThis < newCodeBlock->numParameters());57 58 // Too few arguments -- copy call frame and arguments, then fill in missing arguments with undefined.59 size_t delta = newCodeBlock->numParameters() - argumentCountIncludingThis;60 Register* src = exec->registers();61 Register* dst = exec->registers() + delta;62 63 int i;64 int end = -ExecState::offsetFor(argumentCountIncludingThis);65 for (i = -1; i >= end; --i)66 dst[i] = src[i];67 68 end -= delta;69 for ( ; i >= end; --i)70 dst[i] = jsUndefined();71 72 ExecState* newExec = ExecState::create(dst);73 ASSERT((void*)newExec <= registerFile->end());74 return newExec;75 }76 43 77 44 ALWAYS_INLINE bool opInstanceOfSlow(ExecState* exec, JSValue value, JSValue baseVal, JSValue proto) -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r108309 r108358 30 30 #include "CodeBlock.h" 31 31 #include "DFGDriver.h" 32 #include "ExecutionHarness.h"33 32 #include "JIT.h" 34 33 #include "JITDriver.h" … … 90 89 static void jettisonCodeBlock(JSGlobalData& globalData, OwnPtr<T>& codeBlock) 91 90 { 92 ASSERT( JITCode::isOptimizingJIT(codeBlock->getJITType()));91 ASSERT(codeBlock->getJITType() != JITCode::BaselineJIT); 93 92 ASSERT(codeBlock->alternative()); 94 93 OwnPtr<T> codeBlockToJettison = codeBlock.release(); … … 177 176 } 178 177 179 #if ENABLE(JIT)180 void EvalExecutable::jitCompile(JSGlobalData& globalData)181 {182 bool result = jitCompileIfAppropriate(globalData, m_evalCodeBlock, m_jitCodeForCall, JITCode::bottomTierJIT());183 ASSERT_UNUSED(result, result);184 }185 #endif186 187 inline const char* samplingDescription(JITCode::JITType jitType)188 {189 switch (jitType) {190 case JITCode::InterpreterThunk:191 return "Interpreter Compilation (TOTAL)";192 case JITCode::BaselineJIT:193 return "Baseline Compilation (TOTAL)";194 case JITCode::DFGJIT:195 return "DFG Compilation (TOTAL)";196 default:197 ASSERT_NOT_REACHED();198 return 0;199 }200 }201 202 178 JSObject* EvalExecutable::compileInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 203 179 { 204 SamplingRegion samplingRegion( samplingDescription(jitType));180 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 205 181 206 182 #if !ENABLE(JIT) … … 243 219 244 220 #if ENABLE(JIT) 245 if (! prepareForExecution(*globalData, m_evalCodeBlock, m_jitCodeForCall, jitType))221 if (!jitCompileIfAppropriate(*globalData, m_evalCodeBlock, m_jitCodeForCall, jitType)) 246 222 return 0; 247 223 #endif … … 328 304 } 329 305 330 #if ENABLE(JIT)331 void ProgramExecutable::jitCompile(JSGlobalData& globalData)332 {333 bool result = jitCompileIfAppropriate(globalData, m_programCodeBlock, m_jitCodeForCall, JITCode::bottomTierJIT());334 ASSERT_UNUSED(result, result);335 }336 #endif337 338 306 JSObject* ProgramExecutable::compileInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 339 307 { 340 SamplingRegion samplingRegion( samplingDescription(jitType));308 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 341 309 342 310 #if !ENABLE(JIT) … … 377 345 378 346 #if ENABLE(JIT) 379 if (! prepareForExecution(*globalData, m_programCodeBlock, m_jitCodeForCall, jitType))347 if (!jitCompileIfAppropriate(*globalData, m_programCodeBlock, m_jitCodeForCall, jitType)) 380 348 return 0; 381 349 #endif … … 453 421 result = static_cast<FunctionCodeBlock*>(result->alternative()); 454 422 ASSERT(result); 455 ASSERT( JITCode::isBaselineCode(result->getJITType()));423 ASSERT(result->getJITType() == JITCode::BaselineJIT); 456 424 return result; 457 425 } … … 478 446 return error; 479 447 } 480 481 #if ENABLE(JIT)482 void FunctionExecutable::jitCompileForCall(JSGlobalData& globalData)483 {484 bool result = jitCompileFunctionIfAppropriate(globalData, m_codeBlockForCall, m_jitCodeForCall, m_jitCodeForCallWithArityCheck, m_symbolTable, JITCode::bottomTierJIT());485 ASSERT_UNUSED(result, result);486 }487 488 void FunctionExecutable::jitCompileForConstruct(JSGlobalData& globalData)489 {490 bool result = jitCompileFunctionIfAppropriate(globalData, m_codeBlockForConstruct, m_jitCodeForConstruct, m_jitCodeForConstructWithArityCheck, m_symbolTable, JITCode::bottomTierJIT());491 ASSERT_UNUSED(result, result);492 }493 #endif494 448 495 449 FunctionCodeBlock* FunctionExecutable::codeBlockWithBytecodeFor(CodeSpecializationKind kind) … … 537 491 JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 538 492 { 539 SamplingRegion samplingRegion( samplingDescription(jitType));493 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 540 494 541 495 #if !ENABLE(JIT) … … 559 513 560 514 #if ENABLE(JIT) 561 if (! prepareFunctionForExecution(exec->globalData(), m_codeBlockForCall, m_jitCodeForCall, m_jitCodeForCallWithArityCheck, m_symbolTable, jitType, CodeForCall))515 if (!jitCompileFunctionIfAppropriate(exec->globalData(), m_codeBlockForCall, m_jitCodeForCall, m_jitCodeForCallWithArityCheck, m_symbolTable, jitType)) 562 516 return 0; 563 517 #endif … … 579 533 JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, ScopeChainNode* scopeChainNode, JITCode::JITType jitType) 580 534 { 581 SamplingRegion samplingRegion( samplingDescription(jitType));535 SamplingRegion samplingRegion(jitType == JITCode::BaselineJIT ? "Baseline Compilation (TOTAL)" : "DFG Compilation (TOTAL)"); 582 536 583 537 #if !ENABLE(JIT) … … 601 555 602 556 #if ENABLE(JIT) 603 if (! prepareFunctionForExecution(exec->globalData(), m_codeBlockForConstruct, m_jitCodeForConstruct, m_jitCodeForConstructWithArityCheck, m_symbolTable, jitType, CodeForConstruct))557 if (!jitCompileFunctionIfAppropriate(exec->globalData(), m_codeBlockForConstruct, m_jitCodeForConstruct, m_jitCodeForConstructWithArityCheck, m_symbolTable, jitType)) 604 558 return 0; 605 559 #endif -
trunk/Source/JavaScriptCore/runtime/Executable.h
r108309 r108358 28 28 29 29 #include "CallData.h" 30 #include "CodeSpecializationKind.h"31 30 #include "JSFunction.h" 32 31 #include "Interpreter.h" … … 41 40 class EvalCodeBlock; 42 41 class FunctionCodeBlock; 43 class LLIntOffsetsExtractor;44 42 class ProgramCodeBlock; 45 43 class ScopeChainNode; … … 47 45 struct ExceptionInfo; 48 46 47 enum CodeSpecializationKind { CodeForCall, CodeForConstruct }; 49 48 enum CompilationKind { FirstCompilation, OptimizingCompilation }; 50 49 … … 327 326 328 327 class EvalExecutable : public ScriptExecutable { 329 friend class LLIntOffsetsExtractor;330 328 public: 331 329 typedef ScriptExecutable Base; … … 347 345 #if ENABLE(JIT) 348 346 void jettisonOptimizedCode(JSGlobalData&); 349 void jitCompile(JSGlobalData&);350 347 #endif 351 348 … … 394 391 395 392 class ProgramExecutable : public ScriptExecutable { 396 friend class LLIntOffsetsExtractor;397 393 public: 398 394 typedef ScriptExecutable Base; … … 422 418 #if ENABLE(JIT) 423 419 void jettisonOptimizedCode(JSGlobalData&); 424 void jitCompile(JSGlobalData&);425 420 #endif 426 421 … … 465 460 class FunctionExecutable : public ScriptExecutable { 466 461 friend class JIT; 467 friend class LLIntOffsetsExtractor;468 462 public: 469 463 typedef ScriptExecutable Base; … … 521 515 #if ENABLE(JIT) 522 516 void jettisonOptimizedCodeForCall(JSGlobalData&); 523 void jitCompileForCall(JSGlobalData&);524 517 #endif 525 518 … … 549 542 #if ENABLE(JIT) 550 543 void jettisonOptimizedCodeForConstruct(JSGlobalData&); 551 void jitCompileForConstruct(JSGlobalData&);552 544 #endif 553 545 … … 596 588 jettisonOptimizedCodeForConstruct(globalData); 597 589 } 598 }599 600 void jitCompileFor(JSGlobalData& globalData, CodeSpecializationKind kind)601 {602 if (kind == CodeForCall) {603 jitCompileForCall(globalData);604 return;605 }606 ASSERT(kind == CodeForConstruct);607 jitCompileForConstruct(globalData);608 590 } 609 591 #endif -
trunk/Source/JavaScriptCore/runtime/JSArray.h
r108309 r108358 29 29 30 30 class JSArray; 31 class LLIntOffsetsExtractor;32 31 33 32 struct SparseArrayEntry : public WriteBarrier<Unknown> { … … 124 123 125 124 class JSArray : public JSNonFinalObject { 126 friend class LLIntOffsetsExtractor;127 125 friend class Walker; 128 126 -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r108309 r108358 37 37 38 38 class JSGlobalObject; 39 class LLIntOffsetsExtractor;39 class Structure; 40 40 class PropertyDescriptor; 41 41 class PropertyNameArray; 42 class Structure;43 42 44 43 enum EnumerationMode { … … 165 164 166 165 private: 167 friend class LLIntOffsetsExtractor;168 169 166 const ClassInfo* m_classInfo; 170 167 WriteBarrier<Structure> m_structure; -
trunk/Source/JavaScriptCore/runtime/JSFunction.h
r108309 r108358 34 34 class JSActivation; 35 35 class JSGlobalObject; 36 class LLIntOffsetsExtractor;37 36 class NativeExecutable; 38 37 class SourceCode; … … 142 141 143 142 private: 144 friend class LLIntOffsetsExtractor;145 146 143 JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const; 147 144 -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp
r108309 r108358 36 36 #include "FunctionConstructor.h" 37 37 #include "GetterSetter.h" 38 #include "HostCallReturnValue.h"39 38 #include "Interpreter.h" 40 39 #include "JSActivation.h" … … 143 142 , interpreter(0) 144 143 , heap(this, heapSize) 145 , jsArrayClassInfo(&JSArray::s_info)146 , jsFinalObjectClassInfo(&JSFinalObject::s_info)147 144 #if ENABLE(DFG_JIT) 148 145 , sizeOfLastScratchBuffer(0) … … 220 217 #endif 221 218 222 interpreter->initialize(&llintData, this->canUseJIT()); 223 224 initializeHostCallReturnValue(); // This is needed to convince the linker not to drop host call return support. 219 interpreter->initialize(this->canUseJIT()); 225 220 226 221 heap.notifyIsSafeToCollect(); 227 228 llintData.performAssertions(*this);229 222 } 230 223 -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.h
r108309 r108358 31 31 32 32 #include "CachedTranscendentalFunction.h" 33 #include "Intrinsic.h" 33 34 #include "DateInstanceCache.h" 34 35 #include "ExecutableAllocator.h" 35 36 #include "Heap.h" 36 #include " Intrinsic.h"37 #include "Strong.h" 37 38 #include "JITStubs.h" 38 39 #include "JSValue.h" 39 #include "LLIntData.h"40 40 #include "NumericStrings.h" 41 41 #include "SmallStrings.h" 42 #include "Strong.h"43 42 #include "Terminator.h" 44 43 #include "TimeoutChecker.h" … … 67 66 class JSObject; 68 67 class Keywords; 69 class LLIntOffsetsExtractor;70 68 class NativeExecutable; 71 69 class ParserArena; … … 244 242 245 243 JSValue exception; 246 247 const ClassInfo* const jsArrayClassInfo; 248 const ClassInfo* const jsFinalObjectClassInfo; 249 250 LLInt::Data llintData; 251 244 #if ENABLE(JIT) 252 245 ReturnAddressPtr exceptionLocation; 253 246 JSValue hostCallReturnValue; … … 279 272 } 280 273 #endif 274 #endif 281 275 282 276 HashMap<OpaqueJSClass*, OwnPtr<OpaqueJSClassContextData> > opaqueJSClassData; … … 353 347 354 348 private: 355 friend class LLIntOffsetsExtractor;356 357 349 JSGlobalData(GlobalDataType, ThreadStackType, HeapSize); 358 350 static JSGlobalData*& sharedInstanceInternal(); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r108309 r108358 45 45 class GetterSetter; 46 46 class GlobalCodeBlock; 47 class LLIntOffsetsExtractor;48 47 class NativeErrorConstructor; 49 48 class ProgramCodeBlock; … … 342 341 343 342 private: 344 friend class LLIntOffsetsExtractor;345 346 343 // FIXME: Fold reset into init. 347 344 JS_EXPORT_PRIVATE void init(JSObject* thisValue); -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r108309 r108358 50 50 class HashEntry; 51 51 class InternalFunction; 52 class LLIntOffsetsExtractor;53 52 class MarkedBlock; 54 53 class PropertyDescriptor; … … 266 265 267 266 private: 268 friend class LLIntOffsetsExtractor;269 270 267 // Nobody should ever ask any of these questions on something already known to be a JSObject. 271 268 using JSCell::isAPIValueWrapper; … … 373 370 374 371 private: 375 friend class LLIntOffsetsExtractor;376 377 372 explicit JSFinalObject(JSGlobalData& globalData, Structure* structure) 378 373 : JSObject(globalData, structure, m_inlineStorage) -
trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
r108309 r108358 39 39 class Identifier; 40 40 class JSObject; 41 class LLIntOffsetsExtractor;42 41 43 42 class JSPropertyNameIterator : public JSCell { … … 98 97 99 98 private: 100 friend class LLIntOffsetsExtractor;101 102 99 JSPropertyNameIterator(ExecState*, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlot); 103 100 -
trunk/Source/JavaScriptCore/runtime/JSString.h
r108309 r108358 33 33 34 34 class JSString; 35 class LLIntOffsetsExtractor;36 35 37 36 JSString* jsEmptyString(JSGlobalData*); … … 242 241 243 242 private: 244 friend class LLIntOffsetsExtractor;245 246 243 JS_EXPORT_PRIVATE void resolveRope(ExecState*) const; 247 244 void resolveRopeSlowCase8(LChar*) const; -
trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h
r108309 r108358 34 34 35 35 namespace JSC { 36 37 class LLIntOffsetsExtractor;38 36 39 37 static const unsigned MasqueradesAsUndefined = 1; // WebCore uses MasqueradesAsUndefined to make document.all undetectable. … … 90 88 91 89 private: 92 friend class LLIntOffsetsExtractor;93 94 90 bool isSetOnFlags1(unsigned flag) const { ASSERT(flag <= (1 << 7)); return m_flags & flag; } 95 91 bool isSetOnFlags2(unsigned flag) const { ASSERT(flag >= (1 << 8)); return m_flags2 & (flag >> 8); } -
trunk/Source/JavaScriptCore/runtime/JSValue.cpp
r108309 r108358 119 119 char* JSValue::description() 120 120 { 121 static const size_t size = 128;121 static const size_t size = 64; 122 122 static char description[size]; 123 123 … … 128 128 else if (isDouble()) { 129 129 #if USE(JSVALUE64) 130 snprintf(description, size, "Double: %l x, %lf", reinterpretDoubleToIntptr(asDouble()), asDouble());130 snprintf(description, size, "Double: %lf, %lx", asDouble(), reinterpretDoubleToIntptr(asDouble())); 131 131 #else 132 132 union { … … 135 135 } u; 136 136 u.asDouble = asDouble(); 137 snprintf(description, size, "Double: % 08x:%08x, %lf", u.asTwoInt32s[1], u.asTwoInt32s[0], asDouble());137 snprintf(description, size, "Double: %lf, %08x:%08x", asDouble(), u.asTwoInt32s[1], u.asTwoInt32s[0]); 138 138 #endif 139 139 } else if (isCell()) -
trunk/Source/JavaScriptCore/runtime/JSValue.h
r108309 r108358 56 56 } 57 57 #endif 58 namespace LLInt {59 class Data;60 }61 58 62 59 struct ClassInfo; … … 122 119 friend class DFG::SpeculativeJIT; 123 120 #endif 124 friend class LLInt::Data;125 121 126 122 public: -
trunk/Source/JavaScriptCore/runtime/JSVariableObject.h
r108309 r108358 39 39 namespace JSC { 40 40 41 class LLIntOffsetsExtractor;42 41 class Register; 43 42 44 43 class JSVariableObject : public JSNonFinalObject { 45 44 friend class JIT; 46 friend class LLIntOffsetsExtractor;47 45 48 46 public: -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r108309 r108358 53 53 unsigned maximumInliningDepth; 54 54 55 int32_t executionCounterValueForJITAfterWarmUp;56 int32_t executionCounterValueForDontJITAnytimeSoon;57 int32_t executionCounterValueForJITSoon;58 59 55 int32_t executionCounterValueForOptimizeAfterWarmUp; 60 56 int32_t executionCounterValueForOptimizeAfterLongWarmUp; … … 142 138 SET(maximumInliningDepth, 5); 143 139 144 SET(executionCounterValueForJITAfterWarmUp, -100);145 SET(executionCounterValueForDontJITAnytimeSoon, std::numeric_limits<int32_t>::min());146 SET(executionCounterValueForJITSoon, -100);147 148 140 SET(executionCounterValueForOptimizeAfterWarmUp, -1000); 149 141 SET(executionCounterValueForOptimizeAfterLongWarmUp, -5000); … … 193 185 if (cpusToUse < 1) 194 186 cpusToUse = 1; 195 196 cpusToUse = 1;197 187 198 188 SET(numberOfGCMarkers, cpusToUse); -
trunk/Source/JavaScriptCore/runtime/Options.h
r108309 r108358 37 37 38 38 extern unsigned maximumInliningDepth; // Depth of inline stack, so 1 = no inlining, 2 = one level, etc. 39 40 extern int32_t executionCounterValueForJITAfterWarmUp;41 extern int32_t executionCounterValueForDontJITAnytimeSoon;42 extern int32_t executionCounterValueForJITSoon;43 39 44 40 extern int32_t executionCounterValueForOptimizeAfterWarmUp; -
trunk/Source/JavaScriptCore/runtime/ScopeChain.h
r108309 r108358 31 31 class JSGlobalObject; 32 32 class JSObject; 33 class LLIntOffsetsExtractor;34 33 class ScopeChainIterator; 35 34 class SlotVisitor; … … 93 92 94 93 private: 95 friend class LLIntOffsetsExtractor;96 97 94 static const unsigned StructureFlags = OverridesVisitChildren; 98 95 }; -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r108309 r108358 326 326 return transition; 327 327 } 328 328 329 329 Structure* transition = create(globalData, structure); 330 330 -
trunk/Source/JavaScriptCore/runtime/Structure.h
r108309 r108358 46 46 namespace JSC { 47 47 48 class LLIntOffsetsExtractor;49 48 class PropertyNameArray; 50 49 class PropertyNameArrayData; … … 208 207 209 208 private: 210 friend class LLIntOffsetsExtractor;211 212 209 JS_EXPORT_PRIVATE Structure(JSGlobalData&, JSGlobalObject*, JSValue prototype, const TypeInfo&, const ClassInfo*); 213 210 Structure(JSGlobalData&); -
trunk/Source/JavaScriptCore/runtime/StructureChain.h
r108309 r108358 38 38 namespace JSC { 39 39 40 class LLIntOffsetsExtractor;41 40 class Structure; 42 41 … … 76 75 77 76 private: 78 friend class LLIntOffsetsExtractor;79 80 77 StructureChain(JSGlobalData&, Structure*); 81 78 static void destroy(JSCell*); -
trunk/Source/JavaScriptCore/wtf/InlineASM.h
r108309 r108358 71 71 #endif 72 72 73 // FIXME: figure out how this works on all the platforms. I know that74 // on Linux, the preferred form is ".Lstuff" as opposed to "Lstuff".75 // Don't know about any of the others.76 #if PLATFORM(MAC)77 #define LOCAL_LABEL_STRING(name) "L" #name78 #endif79 80 73 #endif // InlineASM_h -
trunk/Source/JavaScriptCore/wtf/Platform.h
r108309 r108358 929 929 #endif 930 930 931 /* On some of the platforms where we have a JIT, we want to also have the932 low-level interpreter. */933 #if !defined(ENABLE_LLINT) && ENABLE(JIT) && OS(DARWIN) && (CPU(X86) || CPU(ARM_THUMB2)) && USE(JSVALUE32_64)934 #define ENABLE_LLINT 1935 #endif936 937 931 #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT) 938 932 /* Enable the DFG JIT on X86 and X86_64. Only tested on Mac and GNU/Linux. */ -
trunk/Source/JavaScriptCore/wtf/SentinelLinkedList.h
r108309 r108358 87 87 iterator begin(); 88 88 iterator end(); 89 90 bool isEmpty() { return begin() == end(); }91 89 92 90 private: -
trunk/Source/JavaScriptCore/wtf/text/StringImpl.h
r108309 r108358 44 44 namespace JSC { 45 45 struct IdentifierCStringTranslator; 46 namespace LLInt { class Data; }47 class LLIntOffsetsExtractor;48 46 template <typename T> struct IdentifierCharBufferTranslator; 49 47 struct IdentifierLCharFromUCharTranslator; … … 75 73 friend struct WTF::UCharBufferTranslator; 76 74 friend class AtomicStringImpl; 77 friend class JSC::LLInt::Data; 78 friend class JSC::LLIntOffsetsExtractor; 79 75 80 76 private: 81 77 enum BufferOwnership { -
trunk/Source/WebCore/CMakeLists.txt
r108310 r108358 76 76 "${JAVASCRIPTCORE_DIR}/interpreter" 77 77 "${JAVASCRIPTCORE_DIR}/jit" 78 "${JAVASCRIPTCORE_DIR}/llint"79 78 "${JAVASCRIPTCORE_DIR}/parser" 80 79 "${JAVASCRIPTCORE_DIR}/profiler" -
trunk/Source/WebCore/ChangeLog
r108356 r108358 1 2012-02-21 Adam Roben <aroben@apple.com> 2 3 Roll out r108309, r108323, and r108326 4 5 They broke the 32-bit Lion build. 6 7 Original bugs is <http://webkit.org/b/75812> <rdar://problem/10079694>. 8 9 * CMakeLists.txt: 10 1 11 2012-02-21 Alexander Pavlov <apavlov@chromium.org> 2 12 -
trunk/Source/WebKit/CMakeLists.txt
r108309 r108358 46 46 "${JAVASCRIPTCORE_DIR}/interpreter" 47 47 "${JAVASCRIPTCORE_DIR}/jit" 48 "${JAVASCRIPTCORE_DIR}/llint"49 48 "${JAVASCRIPTCORE_DIR}/parser" 50 49 "${JAVASCRIPTCORE_DIR}/profiler" -
trunk/Source/WebKit/ChangeLog
r108309 r108358 1 2012-02-21 Adam Roben <aroben@apple.com> 2 3 Roll out r108309, r108323, and r108326 4 5 They broke the 32-bit Lion build. 6 7 Original bugs is <http://webkit.org/b/75812> <rdar://problem/10079694>. 8 9 * CMakeLists.txt: 10 1 11 2012-02-20 Filip Pizlo <fpizlo@apple.com> 2 12 -
trunk/Tools/ChangeLog
r108328 r108358 1 2012-02-21 Adam Roben <aroben@apple.com> 2 3 Roll out r108309, r108323, and r108326 4 5 They broke the 32-bit Lion build. 6 7 Original bugs is <http://webkit.org/b/75812> <rdar://problem/10079694>. 8 9 * DumpRenderTree/efl/CMakeLists.txt: 10 1 11 2012-02-21 Andras Becsi <andras.becsi@nokia.com> 2 12 -
trunk/Tools/DumpRenderTree/efl/CMakeLists.txt
r108309 r108358 71 71 ${JAVASCRIPTCORE_DIR}/API 72 72 ${JAVASCRIPTCORE_DIR}/assembler 73 ${JAVASCRIPTCORE_DIR}/bytecode74 73 ${JAVASCRIPTCORE_DIR}/dfg 75 74 ${JAVASCRIPTCORE_DIR}/heap 76 75 ${JAVASCRIPTCORE_DIR}/interpreter 77 76 ${JAVASCRIPTCORE_DIR}/jit 78 ${JAVASCRIPTCORE_DIR}/llint79 77 ${JAVASCRIPTCORE_DIR}/runtime 80 78 ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
Note: See TracChangeset
for help on using the changeset viewer.