From d441d6f39bb846989d95bcf5caf387b42414718d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 13 Sep 2013 12:51:20 +0200 Subject: Import Qt5x2 branch of QtWebkit for Qt 5.2 Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen --- Source/JavaScriptCore/API/APICast.h | 46 +- Source/JavaScriptCore/API/APIShims.h | 58 +- Source/JavaScriptCore/API/JSAPIWrapperObject.h | 60 + Source/JavaScriptCore/API/JSAPIWrapperObject.mm | 112 + Source/JavaScriptCore/API/JSBase.cpp | 41 +- Source/JavaScriptCore/API/JSBase.h | 9 + Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp | 72 + Source/JavaScriptCore/API/JSCTestRunnerUtils.h | 39 + .../JavaScriptCore/API/JSCallbackConstructor.cpp | 22 +- Source/JavaScriptCore/API/JSCallbackConstructor.h | 4 +- Source/JavaScriptCore/API/JSCallbackFunction.cpp | 32 +- Source/JavaScriptCore/API/JSCallbackFunction.h | 18 +- Source/JavaScriptCore/API/JSCallbackObject.cpp | 23 +- Source/JavaScriptCore/API/JSCallbackObject.h | 26 +- .../JavaScriptCore/API/JSCallbackObjectFunctions.h | 103 +- Source/JavaScriptCore/API/JSClassRef.cpp | 17 +- Source/JavaScriptCore/API/JSClassRef.h | 11 +- Source/JavaScriptCore/API/JSContext.h | 129 + Source/JavaScriptCore/API/JSContext.mm | 289 + Source/JavaScriptCore/API/JSContextInternal.h | 80 + Source/JavaScriptCore/API/JSContextRef.cpp | 138 +- Source/JavaScriptCore/API/JSContextRefPrivate.h | 48 + Source/JavaScriptCore/API/JSExport.h | 130 + Source/JavaScriptCore/API/JSManagedValue.h | 66 + Source/JavaScriptCore/API/JSManagedValue.mm | 117 + Source/JavaScriptCore/API/JSObjectRef.cpp | 157 +- Source/JavaScriptCore/API/JSProfilerPrivate.cpp | 6 +- Source/JavaScriptCore/API/JSScriptRef.cpp | 151 + Source/JavaScriptCore/API/JSScriptRefPrivate.h | 99 + Source/JavaScriptCore/API/JSStringRef.cpp | 8 +- Source/JavaScriptCore/API/JSStringRefCF.cpp | 6 +- Source/JavaScriptCore/API/JSStringRefPrivate.h | 41 + Source/JavaScriptCore/API/JSStringRefQt.cpp | 50 + Source/JavaScriptCore/API/JSStringRefQt.h | 45 + Source/JavaScriptCore/API/JSValue.h | 306 + Source/JavaScriptCore/API/JSValue.mm | 1131 + Source/JavaScriptCore/API/JSValueInternal.h | 58 + Source/JavaScriptCore/API/JSValueRef.cpp | 121 +- Source/JavaScriptCore/API/JSVirtualMachine.h | 58 + Source/JavaScriptCore/API/JSVirtualMachine.mm | 255 + .../JavaScriptCore/API/JSVirtualMachineInternal.h | 57 + .../API/JSWeakObjectMapRefPrivate.cpp | 18 +- Source/JavaScriptCore/API/JSWrapperMap.h | 47 + Source/JavaScriptCore/API/JSWrapperMap.mm | 521 + Source/JavaScriptCore/API/JavaScriptCore.h | 10 + Source/JavaScriptCore/API/ObjCCallbackFunction.h | 73 + Source/JavaScriptCore/API/ObjCCallbackFunction.mm | 615 + Source/JavaScriptCore/API/ObjcRuntimeExtras.h | 231 + Source/JavaScriptCore/API/OpaqueJSString.cpp | 6 +- Source/JavaScriptCore/API/OpaqueJSString.h | 13 +- Source/JavaScriptCore/API/tests/JSNode.c | 1 - Source/JavaScriptCore/API/tests/JSNodeList.c | 1 - Source/JavaScriptCore/API/tests/minidom.c | 1 - Source/JavaScriptCore/API/tests/testapi.c | 315 +- Source/JavaScriptCore/API/tests/testapi.js | 4 + Source/JavaScriptCore/API/tests/testapi.mm | 841 + Source/JavaScriptCore/CMakeLists.txt | 228 +- Source/JavaScriptCore/ChangeLog | 9281 ------ Source/JavaScriptCore/ChangeLog-2013-04-24 | 29044 +++++++++++++++++++ Source/JavaScriptCore/Configurations/Base.xcconfig | 18 +- .../Configurations/FeatureDefines.xcconfig | 66 +- .../Configurations/ToolExecutable.xcconfig | 6 + .../JavaScriptCore/Configurations/Version.xcconfig | 4 +- Source/JavaScriptCore/DerivedSources.make | 21 +- Source/JavaScriptCore/DerivedSources.pri | 2 - .../JavaScriptCore/JSCTestRunnerUtils.h | 1 + Source/JavaScriptCore/GNUmakefile.am | 10 + Source/JavaScriptCore/GNUmakefile.list.am | 168 +- Source/JavaScriptCore/Info.plist | 2 +- Source/JavaScriptCore/JSCTypedArrayStubs.h | 25 +- Source/JavaScriptCore/JavaScriptCore.gir.in | 12 + .../JavaScriptCore.gyp/JavaScriptCore.gyp | 94 - Source/JavaScriptCore/JavaScriptCore.gypi | 14 - Source/JavaScriptCore/JavaScriptCore.order | 297 +- Source/JavaScriptCore/JavaScriptCore.pri | 2 +- .../JavaScriptCore.vcproj/JavaScriptCore.make | 41 - .../JavaScriptCore.resources/Info.plist | 24 - .../JavaScriptCore.vcproj/JavaScriptCore.sln | 170 - .../JavaScriptCore/JavaScriptCore.def | 439 - .../JavaScriptCore/JavaScriptCore.vcproj | 2668 -- .../JavaScriptCore/JavaScriptCoreCF.vsprops | 11 - .../JavaScriptCore/JavaScriptCoreCFLite.vsprops | 11 - .../JavaScriptCore/JavaScriptCoreCommon.vsprops | 20 - .../JavaScriptCore/JavaScriptCoreDebug.vsprops | 8 - .../JavaScriptCore/JavaScriptCoreDebugAll.vsprops | 8 - .../JavaScriptCoreDebugCairoCFLite.vsprops | 8 - .../JavaScriptCore/JavaScriptCoreGenerated.make | 12 - .../JavaScriptCore/JavaScriptCoreGenerated.vcproj | 104 - .../JavaScriptCoreGeneratedCommon.vsprops | 14 - .../JavaScriptCoreGeneratedDebug.vsprops | 8 - .../JavaScriptCoreGeneratedDebugAll.vsprops | 8 - ...JavaScriptCoreGeneratedDebugCairoCFLite.vsprops | 8 - .../JavaScriptCoreGeneratedProduction.vsprops | 8 - .../JavaScriptCoreGeneratedRelease.vsprops | 8 - ...vaScriptCoreGeneratedReleaseCairoCFLite.vsprops | 8 - .../JavaScriptCoreGeneratedReleasePGO.vsprops | 8 - .../JavaScriptCorePGOOptimize.vsprops | 15 - .../JavaScriptCore/JavaScriptCorePostBuild.cmd | 2 - .../JavaScriptCore/JavaScriptCorePreBuild.cmd | 6 - .../JavaScriptCore/JavaScriptCorePreLink.cmd | 9 - .../JavaScriptCoreProduction.vsprops | 8 - .../JavaScriptCore/JavaScriptCoreRelease.vsprops | 8 - .../JavaScriptCoreReleaseCairoCFLite.vsprops | 8 - .../JavaScriptCoreReleasePGO.vsprops | 16 - .../JavaScriptCoreReleasePGOOptimize.vsprops | 12 - .../JavaScriptCore/build-generated-files.sh | 37 - .../JavaScriptCore/copy-files.cmd | 67 - .../JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln | 80 - .../LLIntAssembly/LLIntAssembly.make | 9 - .../LLIntAssembly/LLIntAssembly.vcproj | 173 - .../LLIntAssembly/build-LLIntAssembly.sh | 26 - .../LLIntDesiredOffsets/LLIntDesiredOffsets.make | 9 - .../LLIntDesiredOffsets/LLIntDesiredOffsets.vcproj | 173 - .../build-LLIntDesiredOffsets.sh | 25 - .../LLIntOffsetsExtractor.vcproj | 476 - .../LLIntOffsetsExtractorCommon.vsprops | 20 - .../LLIntOffsetsExtractorDebug.vsprops | 8 - .../LLIntOffsetsExtractorDebugAll.vsprops | 8 - .../LLIntOffsetsExtractorDebugCairoCFLite.vsprops | 8 - .../LLIntOffsetsExtractorProduction.vsprops | 8 - .../LLIntOffsetsExtractorRelease.vsprops | 8 - ...LLIntOffsetsExtractorReleaseCairoCFLite.vsprops | 8 - .../LLIntOffsetsExtractorReleasePGO.vsprops | 12 - .../JavaScriptCore.vcproj/jsc/jsc.vcproj | 473 - .../JavaScriptCore.vcproj/jsc/jscCommon.vsprops | 20 - .../JavaScriptCore.vcproj/jsc/jscDebug.vsprops | 8 - .../JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops | 8 - .../jsc/jscDebugCairoCFLite.vsprops | 8 - .../JavaScriptCore.vcproj/jsc/jscPostBuild.cmd | 25 - .../JavaScriptCore.vcproj/jsc/jscPreBuild.cmd | 6 - .../JavaScriptCore.vcproj/jsc/jscPreLink.cmd | 9 - .../jsc/jscProduction.vsprops | 8 - .../JavaScriptCore.vcproj/jsc/jscRelease.vsprops | 8 - .../jsc/jscReleaseCairoCFLite.vsprops | 8 - .../jsc/jscReleasePGO.vsprops | 12 - .../testRegExp/testRegExp.vcproj | 480 - .../testRegExp/testRegExpCommon.vsprops | 20 - .../testRegExp/testRegExpDebug.vsprops | 8 - .../testRegExp/testRegExpDebugAll.vsprops | 8 - .../testRegExp/testRegExpDebugCairoCFLite.vsprops | 8 - .../testRegExp/testRegExpPostBuild.cmd | 25 - .../testRegExp/testRegExpPreBuild.cmd | 6 - .../testRegExp/testRegExpPreLink.cmd | 9 - .../testRegExp/testRegExpProduction.vsprops | 8 - .../testRegExp/testRegExpRelease.vsprops | 8 - .../testRegExpReleaseCairoCFLite.vsprops | 8 - .../testRegExp/testRegExpReleasePGO.vsprops | 12 - .../JavaScriptCore.vcproj/testapi/testapi.vcproj | 448 - .../testapi/testapiCommon.vsprops | 21 - .../testapi/testapiDebug.vsprops | 8 - .../testapi/testapiDebugAll.vsprops | 8 - .../testapi/testapiDebugCairoCFLite.vsprops | 8 - .../testapi/testapiPostBuild.cmd | 3 - .../testapi/testapiPreBuild.cmd | 6 - .../testapi/testapiPreLink.cmd | 9 - .../testapi/testapiProduction.vsprops | 8 - .../testapi/testapiRelease.vsprops | 8 - .../testapi/testapiReleaseCairoCFLite.vsprops | 8 - .../JavaScriptCore.vcxproj/JavaScriptCore.make | 30 + .../JavaScriptCore.resources/Info.plist | 24 + .../JavaScriptCore.submit.sln | 78 + .../JavaScriptCore.vcxproj/JavaScriptCore.vcxproj | 931 + .../JavaScriptCore.vcxproj.filters | 1940 ++ .../JavaScriptCore.vcxproj/JavaScriptCoreCF.props | 12 + .../JavaScriptCoreCFLite.props | 12 + .../JavaScriptCoreCommon.props | 19 + .../JavaScriptCoreDebug.props | 16 + .../JavaScriptCoreDebugCFLite.props | 16 + .../JavaScriptCoreGenerated.make | 12 + .../JavaScriptCoreGenerated.vcxproj | 214 + .../JavaScriptCoreGenerated.vcxproj.filters | 9 + .../JavaScriptCoreGeneratedCommon.props | 11 + .../JavaScriptCoreGeneratedDebug.props | 15 + .../JavaScriptCoreGeneratedProduction.props | 13 + .../JavaScriptCoreGeneratedRelease.props | 13 + .../JavaScriptCorePostBuild.cmd | 2 + .../JavaScriptCorePreBuild.cmd | 6 + .../JavaScriptCorePreLink.cmd | 0 .../JavaScriptCoreProduction.props | 14 + .../JavaScriptCoreRelease.props | 16 + .../JavaScriptCoreReleaseCFLite.props | 16 + .../LLInt/LLIntAssembly/LLIntAssembly.make | 8 + .../LLInt/LLIntAssembly/LLIntAssembly.vcxproj | 271 + .../LLInt/LLIntAssembly/build-LLIntAssembly.sh | 26 + .../LLIntDesiredOffsets/LLIntDesiredOffsets.make | 9 + .../LLIntDesiredOffsets.vcxproj | 257 + .../build-LLIntDesiredOffsets.sh | 25 + .../LLIntOffsetsExtractor.vcxproj | 199 + .../LLIntOffsetsExtractorCommon.props | 19 + .../LLIntOffsetsExtractorDebug.props | 9 + .../LLIntOffsetsExtractorProduction.props | 13 + .../LLIntOffsetsExtractorRelease.props | 15 + .../build-generated-files.sh | 36 + .../JavaScriptCore.vcxproj/copy-files.cmd | 68 + .../JavaScriptCore.vcxproj/jsc/jsc.vcxproj | 310 + .../JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters | 11 + .../JavaScriptCore.vcxproj/jsc/jscCommon.props | 22 + .../JavaScriptCore.vcxproj/jsc/jscDebug.props | 13 + .../JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd | 1 + .../JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd | 6 + .../JavaScriptCore.vcxproj/jsc/jscPreLink.cmd | 0 .../JavaScriptCore.vcxproj/jsc/jscProduction.props | 13 + .../JavaScriptCore.vcxproj/jsc/jscRelease.props | 13 + .../JavaScriptCore.vcxproj/resource.h | 14 + .../testRegExp/testRegExp.vcxproj | 317 + .../testRegExp/testRegExp.vcxproj.filters | 11 + .../testRegExp/testRegExpCommon.props | 17 + .../testRegExp/testRegExpDebug.props | 17 + .../testRegExp/testRegExpPostBuild.cmd | 3 + .../testRegExp/testRegExpPreBuild.cmd | 6 + .../testRegExp/testRegExpPreLink.cmd | 0 .../testRegExp/testRegExpProduction.props | 12 + .../testRegExp/testRegExpRelease.props | 12 + .../JavaScriptCore.vcxproj/testapi/testapi.vcxproj | 287 + .../testapi/testapi.vcxproj.filters | 12 + .../testapi/testapiCommon.props | 17 + .../testapi/testapiCommonCFLite.props | 17 + .../testapi/testapiDebug.props | 14 + .../testapi/testapiDebugCFLite.props | 14 + .../testapi/testapiPostBuild.cmd | 3 + .../testapi/testapiPreBuild.cmd | 6 + .../testapi/testapiPreLink.cmd | 0 .../testapi/testapiProduction.props | 12 + .../testapi/testapiRelease.props | 12 + .../testapi/testapiReleaseCFLite.props | 12 + .../JavaScriptCore.xcodeproj/project.pbxproj | 1261 +- Source/JavaScriptCore/KeywordLookupGenerator.py | 7 +- Source/JavaScriptCore/LLIntOffsetsExtractor.pro | 3 +- Source/JavaScriptCore/PlatformBlackBerry.cmake | 11 +- Source/JavaScriptCore/PlatformEfl.cmake | 22 +- Source/JavaScriptCore/PlatformWinCE.cmake | 20 - Source/JavaScriptCore/Target.pri | 75 +- Source/JavaScriptCore/assembler/ARMAssembler.cpp | 4 +- Source/JavaScriptCore/assembler/ARMAssembler.h | 83 +- Source/JavaScriptCore/assembler/ARMv7Assembler.h | 99 +- .../assembler/AbstractMacroAssembler.h | 86 +- Source/JavaScriptCore/assembler/AssemblerBuffer.h | 8 +- .../assembler/AssemblerBufferWithConstantPool.h | 4 +- Source/JavaScriptCore/assembler/LinkBuffer.cpp | 6 +- Source/JavaScriptCore/assembler/LinkBuffer.h | 8 +- Source/JavaScriptCore/assembler/MIPSAssembler.h | 4 +- Source/JavaScriptCore/assembler/MacroAssembler.h | 34 +- .../JavaScriptCore/assembler/MacroAssemblerARM.h | 82 +- .../JavaScriptCore/assembler/MacroAssemblerARMv7.h | 14 +- .../assembler/MacroAssemblerCodeRef.h | 1 - .../JavaScriptCore/assembler/MacroAssemblerMIPS.h | 69 +- .../JavaScriptCore/assembler/MacroAssemblerSH4.cpp | 52 - .../JavaScriptCore/assembler/MacroAssemblerSH4.h | 1404 +- .../assembler/MacroAssemblerX86Common.h | 6 +- Source/JavaScriptCore/assembler/SH4Assembler.h | 289 +- Source/JavaScriptCore/assembler/X86Assembler.h | 12 +- .../bytecode/ArrayAllocationProfile.cpp | 2 + Source/JavaScriptCore/bytecode/ArrayProfile.cpp | 150 +- Source/JavaScriptCore/bytecode/ArrayProfile.h | 34 +- Source/JavaScriptCore/bytecode/CallLinkInfo.cpp | 8 +- Source/JavaScriptCore/bytecode/CallLinkInfo.h | 6 +- Source/JavaScriptCore/bytecode/CallLinkStatus.cpp | 96 +- Source/JavaScriptCore/bytecode/CallLinkStatus.h | 84 +- Source/JavaScriptCore/bytecode/CodeBlock.cpp | 1434 +- Source/JavaScriptCore/bytecode/CodeBlock.h | 2342 +- Source/JavaScriptCore/bytecode/CodeBlockHash.cpp | 3 +- Source/JavaScriptCore/bytecode/CodeOrigin.cpp | 58 +- Source/JavaScriptCore/bytecode/CodeOrigin.h | 35 +- Source/JavaScriptCore/bytecode/Comment.h | 37 - Source/JavaScriptCore/bytecode/DFGExitProfile.cpp | 27 + Source/JavaScriptCore/bytecode/DFGExitProfile.h | 82 +- Source/JavaScriptCore/bytecode/DataFormat.h | 11 +- Source/JavaScriptCore/bytecode/EvalCodeCache.h | 13 +- .../JavaScriptCore/bytecode/ExecutionCounter.cpp | 3 +- Source/JavaScriptCore/bytecode/ExitKind.cpp | 107 + Source/JavaScriptCore/bytecode/ExitKind.h | 66 + .../JavaScriptCore/bytecode/ExpressionRangeInfo.h | 71 +- Source/JavaScriptCore/bytecode/GetByIdStatus.cpp | 18 +- Source/JavaScriptCore/bytecode/GetByIdStatus.h | 2 +- Source/JavaScriptCore/bytecode/Instruction.h | 256 +- .../bytecode/LazyOperandValueProfile.cpp | 2 + .../bytecode/MethodOfGettingAValueProfile.cpp | 2 +- .../bytecode/MethodOfGettingAValueProfile.h | 2 +- .../bytecode/ObjectAllocationProfile.h | 142 + Source/JavaScriptCore/bytecode/Opcode.h | 445 +- Source/JavaScriptCore/bytecode/Operands.h | 30 +- .../bytecode/PolymorphicAccessStructureList.h | 139 + .../bytecode/PolymorphicPutByIdList.cpp | 4 +- .../bytecode/PolymorphicPutByIdList.h | 12 +- .../JavaScriptCore/bytecode/PreciseJumpTargets.cpp | 128 + .../JavaScriptCore/bytecode/PreciseJumpTargets.h | 38 + Source/JavaScriptCore/bytecode/PutByIdStatus.cpp | 29 +- Source/JavaScriptCore/bytecode/PutByIdStatus.h | 4 +- .../JavaScriptCore/bytecode/ReduceWhitespace.cpp | 52 + Source/JavaScriptCore/bytecode/ReduceWhitespace.h | 38 + .../bytecode/ResolveGlobalStatus.cpp | 5 +- .../JavaScriptCore/bytecode/ResolveGlobalStatus.h | 2 +- Source/JavaScriptCore/bytecode/SamplingTool.cpp | 6 +- Source/JavaScriptCore/bytecode/SamplingTool.h | 9 +- Source/JavaScriptCore/bytecode/SpeculatedType.cpp | 28 +- Source/JavaScriptCore/bytecode/SpeculatedType.h | 34 +- .../JavaScriptCore/bytecode/StructureStubInfo.cpp | 2 +- Source/JavaScriptCore/bytecode/StructureStubInfo.h | 485 +- .../JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp | 192 +- Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h | 165 +- Source/JavaScriptCore/bytecode/ValueProfile.h | 19 +- Source/JavaScriptCore/bytecode/ValueRecovery.h | 4 +- .../bytecompiler/BytecodeGenerator.cpp | 534 +- .../bytecompiler/BytecodeGenerator.h | 234 +- Source/JavaScriptCore/bytecompiler/Label.h | 2 + Source/JavaScriptCore/bytecompiler/LabelScope.h | 67 +- .../JavaScriptCore/bytecompiler/NodesCodegen.cpp | 835 +- .../bytecompiler/StaticPropertyAnalysis.h | 67 + .../bytecompiler/StaticPropertyAnalyzer.h | 170 + Source/JavaScriptCore/config.h | 10 +- Source/JavaScriptCore/create_hash_table | 3 +- Source/JavaScriptCore/create_regex_tables | 8 +- Source/JavaScriptCore/debugger/Debugger.cpp | 25 +- Source/JavaScriptCore/debugger/Debugger.h | 4 +- .../JavaScriptCore/debugger/DebuggerActivation.cpp | 11 +- .../JavaScriptCore/debugger/DebuggerActivation.h | 14 +- .../JavaScriptCore/debugger/DebuggerCallFrame.cpp | 19 +- Source/JavaScriptCore/dfg/DFGAbstractState.cpp | 1475 +- Source/JavaScriptCore/dfg/DFGAbstractState.h | 134 +- Source/JavaScriptCore/dfg/DFGAbstractValue.h | 45 +- Source/JavaScriptCore/dfg/DFGAdjacencyList.h | 33 +- Source/JavaScriptCore/dfg/DFGAllocator.h | 241 + Source/JavaScriptCore/dfg/DFGArgumentPosition.h | 64 +- .../dfg/DFGArgumentsSimplificationPhase.cpp | 374 +- Source/JavaScriptCore/dfg/DFGArrayMode.cpp | 72 +- Source/JavaScriptCore/dfg/DFGArrayMode.h | 41 +- .../dfg/DFGArrayifySlowPathGenerator.h | 167 + Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h | 53 +- .../dfg/DFGBackwardsPropagationPhase.cpp | 368 + .../dfg/DFGBackwardsPropagationPhase.h | 49 + Source/JavaScriptCore/dfg/DFGBasicBlock.h | 30 +- Source/JavaScriptCore/dfg/DFGBasicBlockInlines.h | 51 + Source/JavaScriptCore/dfg/DFGByteCodeCache.h | 185 - Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp | 2154 +- Source/JavaScriptCore/dfg/DFGByteCodeParser.h | 4 +- Source/JavaScriptCore/dfg/DFGCCallHelpers.h | 42 +- Source/JavaScriptCore/dfg/DFGCFAPhase.cpp | 13 +- .../dfg/DFGCFGSimplificationPhase.cpp | 466 +- .../JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp | 499 + Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.h | 50 + Source/JavaScriptCore/dfg/DFGCSEPhase.cpp | 1063 +- Source/JavaScriptCore/dfg/DFGCSEPhase.h | 4 +- Source/JavaScriptCore/dfg/DFGCapabilities.cpp | 40 +- Source/JavaScriptCore/dfg/DFGCapabilities.h | 105 +- Source/JavaScriptCore/dfg/DFGCommon.cpp | 127 + Source/JavaScriptCore/dfg/DFGCommon.h | 193 +- .../JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp | 343 +- .../JavaScriptCore/dfg/DFGCorrectableJumpPoint.cpp | 43 - .../JavaScriptCore/dfg/DFGCorrectableJumpPoint.h | 164 - Source/JavaScriptCore/dfg/DFGDCEPhase.cpp | 201 + Source/JavaScriptCore/dfg/DFGDCEPhase.h | 49 + Source/JavaScriptCore/dfg/DFGDisassembler.cpp | 100 +- Source/JavaScriptCore/dfg/DFGDisassembler.h | 29 +- Source/JavaScriptCore/dfg/DFGDoubleFormatState.h | 4 +- Source/JavaScriptCore/dfg/DFGDriver.cpp | 85 +- Source/JavaScriptCore/dfg/DFGDriver.h | 2 +- Source/JavaScriptCore/dfg/DFGEdge.cpp | 48 + Source/JavaScriptCore/dfg/DFGEdge.h | 141 +- Source/JavaScriptCore/dfg/DFGFPRInfo.h | 77 +- Source/JavaScriptCore/dfg/DFGFixupPhase.cpp | 1495 +- Source/JavaScriptCore/dfg/DFGGPRInfo.h | 78 +- Source/JavaScriptCore/dfg/DFGGenerationInfo.h | 76 +- Source/JavaScriptCore/dfg/DFGGraph.cpp | 445 +- Source/JavaScriptCore/dfg/DFGGraph.h | 584 +- Source/JavaScriptCore/dfg/DFGInsertionSet.h | 47 +- Source/JavaScriptCore/dfg/DFGJITCompiler.cpp | 74 +- Source/JavaScriptCore/dfg/DFGJITCompiler.h | 40 +- Source/JavaScriptCore/dfg/DFGLongLivedState.cpp | 49 + Source/JavaScriptCore/dfg/DFGLongLivedState.h | 55 + Source/JavaScriptCore/dfg/DFGMinifiedGraph.h | 17 +- Source/JavaScriptCore/dfg/DFGMinifiedID.h | 109 + Source/JavaScriptCore/dfg/DFGMinifiedNode.cpp | 24 +- Source/JavaScriptCore/dfg/DFGMinifiedNode.h | 19 +- Source/JavaScriptCore/dfg/DFGNode.cpp | 57 + Source/JavaScriptCore/dfg/DFGNode.h | 311 +- Source/JavaScriptCore/dfg/DFGNodeAllocator.h | 51 + Source/JavaScriptCore/dfg/DFGNodeFlags.cpp | 131 +- Source/JavaScriptCore/dfg/DFGNodeFlags.h | 44 +- Source/JavaScriptCore/dfg/DFGNodeType.h | 67 +- Source/JavaScriptCore/dfg/DFGOSREntry.cpp | 17 +- Source/JavaScriptCore/dfg/DFGOSRExit.cpp | 33 +- Source/JavaScriptCore/dfg/DFGOSRExit.h | 24 +- .../JavaScriptCore/dfg/DFGOSRExitCompilationInfo.h | 48 + Source/JavaScriptCore/dfg/DFGOSRExitCompiler.cpp | 52 +- .../JavaScriptCore/dfg/DFGOSRExitCompiler32_64.cpp | 27 +- Source/JavaScriptCore/dfg/DFGOSRExitCompiler64.cpp | 35 +- .../dfg/DFGOSRExitJumpPlaceholder.cpp | 51 + .../JavaScriptCore/dfg/DFGOSRExitJumpPlaceholder.h | 71 + Source/JavaScriptCore/dfg/DFGOperations.cpp | 670 +- Source/JavaScriptCore/dfg/DFGOperations.h | 45 +- Source/JavaScriptCore/dfg/DFGPhase.cpp | 12 +- Source/JavaScriptCore/dfg/DFGPhase.h | 14 +- .../dfg/DFGPredictionInjectionPhase.cpp | 97 + .../dfg/DFGPredictionInjectionPhase.h | 48 + .../dfg/DFGPredictionPropagationPhase.cpp | 789 +- .../dfg/DFGPredictionPropagationPhase.h | 5 + Source/JavaScriptCore/dfg/DFGRegisterBank.h | 2 +- Source/JavaScriptCore/dfg/DFGRepatch.cpp | 111 +- Source/JavaScriptCore/dfg/DFGRepatch.h | 4 +- Source/JavaScriptCore/dfg/DFGScoreBoard.h | 23 +- .../dfg/DFGScratchRegisterAllocator.h | 10 +- .../JavaScriptCore/dfg/DFGSilentRegisterSavePlan.h | 16 +- Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h | 8 +- Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp | 3201 +- Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h | 1604 +- .../JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp | 2771 +- Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp | 2713 +- .../JavaScriptCore/dfg/DFGStructureAbstractValue.h | 6 +- .../dfg/DFGStructureCheckHoistingPhase.cpp | 377 - .../dfg/DFGStructureCheckHoistingPhase.h | 50 - Source/JavaScriptCore/dfg/DFGThunks.cpp | 58 +- Source/JavaScriptCore/dfg/DFGThunks.h | 16 +- .../dfg/DFGTypeCheckHoistingPhase.cpp | 392 + .../JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.h | 50 + Source/JavaScriptCore/dfg/DFGUnificationPhase.cpp | 93 + Source/JavaScriptCore/dfg/DFGUnificationPhase.h | 49 + Source/JavaScriptCore/dfg/DFGUseKind.cpp | 98 + Source/JavaScriptCore/dfg/DFGUseKind.h | 122 + Source/JavaScriptCore/dfg/DFGValidate.cpp | 275 +- Source/JavaScriptCore/dfg/DFGValidate.h | 4 - Source/JavaScriptCore/dfg/DFGValueSource.cpp | 23 +- Source/JavaScriptCore/dfg/DFGValueSource.h | 39 +- Source/JavaScriptCore/dfg/DFGVariableAccessData.h | 110 +- .../dfg/DFGVariableAccessDataDump.cpp | 4 + Source/JavaScriptCore/dfg/DFGVariableEvent.cpp | 12 +- Source/JavaScriptCore/dfg/DFGVariableEvent.h | 43 +- .../JavaScriptCore/dfg/DFGVariableEventStream.cpp | 176 +- Source/JavaScriptCore/dfg/DFGVariableEventStream.h | 2 + Source/JavaScriptCore/dfg/DFGVariadicFunction.h | 57 + .../dfg/DFGVirtualRegisterAllocationPhase.cpp | 46 +- .../disassembler/ARMv7/ARMv7DOpcode.cpp | 1565 + .../disassembler/ARMv7/ARMv7DOpcode.h | 1142 + .../disassembler/ARMv7Disassembler.cpp | 55 + Source/JavaScriptCore/disassembler/udis86/udis86.c | 1 - .../disassembler/udis86/udis86_decode.c | 1 - .../disassembler/udis86/udis86_input.c | 1 - .../disassembler/udis86/udis86_itab_holder.c | 1 - .../disassembler/udis86/udis86_syn-att.c | 1 - .../disassembler/udis86/udis86_syn-intel.c | 1 - .../disassembler/udis86/udis86_syn.c | 1 - Source/JavaScriptCore/heap/BlockAllocator.cpp | 25 +- Source/JavaScriptCore/heap/BlockAllocator.h | 151 +- Source/JavaScriptCore/heap/CardSet.h | 91 - Source/JavaScriptCore/heap/CopiedBlock.h | 5 +- Source/JavaScriptCore/heap/CopiedSpace.cpp | 5 +- Source/JavaScriptCore/heap/CopiedSpaceInlines.h | 4 +- Source/JavaScriptCore/heap/DFGCodeBlocks.cpp | 12 +- Source/JavaScriptCore/heap/GCAssertions.h | 9 +- Source/JavaScriptCore/heap/GCThread.cpp | 4 +- Source/JavaScriptCore/heap/GCThreadSharedData.cpp | 18 +- Source/JavaScriptCore/heap/GCThreadSharedData.h | 8 +- Source/JavaScriptCore/heap/Handle.h | 5 +- Source/JavaScriptCore/heap/HandleBlock.h | 73 + Source/JavaScriptCore/heap/HandleBlockInlines.h | 74 + Source/JavaScriptCore/heap/HandleSet.cpp | 36 +- Source/JavaScriptCore/heap/HandleSet.h | 108 +- Source/JavaScriptCore/heap/HandleStack.cpp | 2 +- Source/JavaScriptCore/heap/HandleStack.h | 2 - Source/JavaScriptCore/heap/HandleTypes.h | 2 +- Source/JavaScriptCore/heap/Heap.cpp | 149 +- Source/JavaScriptCore/heap/Heap.h | 58 +- Source/JavaScriptCore/heap/HeapBlock.h | 2 +- Source/JavaScriptCore/heap/HeapStatistics.cpp | 1 + Source/JavaScriptCore/heap/HeapStatistics.h | 1 + Source/JavaScriptCore/heap/HeapTimer.cpp | 152 +- Source/JavaScriptCore/heap/HeapTimer.h | 18 +- Source/JavaScriptCore/heap/IncrementalSweeper.cpp | 24 +- Source/JavaScriptCore/heap/IncrementalSweeper.h | 4 +- Source/JavaScriptCore/heap/Local.h | 22 +- Source/JavaScriptCore/heap/LocalScope.h | 8 +- Source/JavaScriptCore/heap/MachineStackMarker.cpp | 4 +- Source/JavaScriptCore/heap/MarkedAllocator.cpp | 4 +- Source/JavaScriptCore/heap/MarkedAllocator.h | 12 +- Source/JavaScriptCore/heap/MarkedBlock.cpp | 11 +- Source/JavaScriptCore/heap/MarkedBlock.h | 135 +- Source/JavaScriptCore/heap/MarkedSpace.cpp | 31 - Source/JavaScriptCore/heap/MarkedSpace.h | 9 +- Source/JavaScriptCore/heap/PassWeak.h | 74 +- Source/JavaScriptCore/heap/Region.h | 319 + Source/JavaScriptCore/heap/SlotVisitor.cpp | 52 +- Source/JavaScriptCore/heap/SlotVisitor.h | 3 +- Source/JavaScriptCore/heap/SlotVisitorInlines.h | 11 + Source/JavaScriptCore/heap/Strong.h | 13 +- Source/JavaScriptCore/heap/StrongInlines.h | 14 +- Source/JavaScriptCore/heap/SuperRegion.cpp | 82 + Source/JavaScriptCore/heap/SuperRegion.h | 58 + Source/JavaScriptCore/heap/VTableSpectrum.cpp | 1 - Source/JavaScriptCore/heap/Weak.cpp | 41 + Source/JavaScriptCore/heap/Weak.h | 190 +- Source/JavaScriptCore/heap/WeakBlock.cpp | 2 +- Source/JavaScriptCore/heap/WeakBlock.h | 6 +- Source/JavaScriptCore/heap/WeakImpl.h | 4 +- Source/JavaScriptCore/heap/WeakInlines.h | 178 + Source/JavaScriptCore/heap/WeakSet.cpp | 2 +- Source/JavaScriptCore/heap/WeakSet.h | 14 +- Source/JavaScriptCore/heap/WeakSetInlines.h | 2 +- Source/JavaScriptCore/interpreter/AbstractPC.cpp | 8 +- Source/JavaScriptCore/interpreter/AbstractPC.h | 4 +- Source/JavaScriptCore/interpreter/CachedCall.h | 2 +- Source/JavaScriptCore/interpreter/CallFrame.cpp | 28 +- Source/JavaScriptCore/interpreter/CallFrame.h | 64 +- .../JavaScriptCore/interpreter/CallFrameClosure.h | 2 +- Source/JavaScriptCore/interpreter/Interpreter.cpp | 538 +- Source/JavaScriptCore/interpreter/Interpreter.h | 67 +- Source/JavaScriptCore/interpreter/JSStack.cpp | 6 +- Source/JavaScriptCore/interpreter/JSStack.h | 6 +- Source/JavaScriptCore/interpreter/JSStackInlines.h | 1 - Source/JavaScriptCore/interpreter/Register.h | 2 +- Source/JavaScriptCore/interpreter/VMInspector.h | 2 +- .../JavaScriptCore/jit/ClosureCallStubRoutine.cpp | 11 +- Source/JavaScriptCore/jit/ClosureCallStubRoutine.h | 2 +- Source/JavaScriptCore/jit/CompactJITCodeMap.h | 1 - Source/JavaScriptCore/jit/ExecutableAllocator.cpp | 10 +- Source/JavaScriptCore/jit/ExecutableAllocator.h | 12 +- .../jit/ExecutableAllocatorFixedVMPool.cpp | 34 +- .../JavaScriptCore/jit/GCAwareJITStubRoutine.cpp | 23 +- Source/JavaScriptCore/jit/GCAwareJITStubRoutine.h | 10 +- Source/JavaScriptCore/jit/HostCallReturnValue.cpp | 4 +- Source/JavaScriptCore/jit/HostCallReturnValue.h | 2 +- Source/JavaScriptCore/jit/JIT.cpp | 175 +- Source/JavaScriptCore/jit/JIT.h | 231 +- Source/JavaScriptCore/jit/JITArithmetic.cpp | 69 +- Source/JavaScriptCore/jit/JITArithmetic32_64.cpp | 97 +- Source/JavaScriptCore/jit/JITCall.cpp | 62 +- Source/JavaScriptCore/jit/JITCall32_64.cpp | 59 +- Source/JavaScriptCore/jit/JITCode.h | 13 +- Source/JavaScriptCore/jit/JITDisassembler.cpp | 89 +- Source/JavaScriptCore/jit/JITDisassembler.h | 13 + Source/JavaScriptCore/jit/JITDriver.h | 12 +- Source/JavaScriptCore/jit/JITExceptions.cpp | 27 +- Source/JavaScriptCore/jit/JITExceptions.h | 8 +- Source/JavaScriptCore/jit/JITInlines.h | 190 +- Source/JavaScriptCore/jit/JITOpcodes.cpp | 495 +- Source/JavaScriptCore/jit/JITOpcodes32_64.cpp | 442 +- Source/JavaScriptCore/jit/JITPropertyAccess.cpp | 201 +- .../JavaScriptCore/jit/JITPropertyAccess32_64.cpp | 124 +- Source/JavaScriptCore/jit/JITStubRoutine.cpp | 2 +- Source/JavaScriptCore/jit/JITStubs.cpp | 558 +- Source/JavaScriptCore/jit/JITStubs.h | 755 +- Source/JavaScriptCore/jit/JITThunks.cpp | 108 + Source/JavaScriptCore/jit/JITThunks.h | 76 + Source/JavaScriptCore/jit/JITWriteBarrier.h | 18 +- Source/JavaScriptCore/jit/JSInterfaceJIT.h | 166 +- .../JavaScriptCore/jit/JumpReplacementWatchpoint.h | 7 + Source/JavaScriptCore/jit/SpecializedThunkJIT.h | 17 +- Source/JavaScriptCore/jit/ThunkGenerator.h | 44 + Source/JavaScriptCore/jit/ThunkGenerators.cpp | 538 +- Source/JavaScriptCore/jit/ThunkGenerators.h | 44 +- Source/JavaScriptCore/jit/UnusedPointer.h | 37 + Source/JavaScriptCore/jsc.cpp | 213 +- Source/JavaScriptCore/llint/LLIntCLoop.h | 2 +- Source/JavaScriptCore/llint/LLIntData.cpp | 15 +- Source/JavaScriptCore/llint/LLIntData.h | 8 +- Source/JavaScriptCore/llint/LLIntEntrypoints.cpp | 26 +- Source/JavaScriptCore/llint/LLIntEntrypoints.h | 16 +- Source/JavaScriptCore/llint/LLIntExceptions.cpp | 35 +- .../JavaScriptCore/llint/LLIntOfflineAsmConfig.h | 22 + .../JavaScriptCore/llint/LLIntOffsetsExtractor.cpp | 2 +- Source/JavaScriptCore/llint/LLIntSlowPaths.cpp | 229 +- Source/JavaScriptCore/llint/LLIntSlowPaths.h | 7 +- Source/JavaScriptCore/llint/LLIntThunks.cpp | 28 +- Source/JavaScriptCore/llint/LLIntThunks.h | 14 +- .../JavaScriptCore/llint/LowLevelInterpreter.asm | 140 +- .../JavaScriptCore/llint/LowLevelInterpreter.cpp | 15 +- .../llint/LowLevelInterpreter32_64.asm | 284 +- .../JavaScriptCore/llint/LowLevelInterpreter64.asm | 231 +- Source/JavaScriptCore/offlineasm/arm.rb | 587 + Source/JavaScriptCore/offlineasm/armv7.rb | 531 - Source/JavaScriptCore/offlineasm/ast.rb | 12 + Source/JavaScriptCore/offlineasm/backends.rb | 9 +- Source/JavaScriptCore/offlineasm/cloop.rb | 58 +- Source/JavaScriptCore/offlineasm/instructions.rb | 19 +- Source/JavaScriptCore/offlineasm/mips.rb | 2 +- Source/JavaScriptCore/offlineasm/parser.rb | 7 +- Source/JavaScriptCore/offlineasm/risc.rb | 9 +- Source/JavaScriptCore/offlineasm/sh4.rb | 778 + Source/JavaScriptCore/offlineasm/x86.rb | 276 +- Source/JavaScriptCore/os-win32/WinMain.cpp | 81 - Source/JavaScriptCore/os-win32/inttypes.h | 5 - Source/JavaScriptCore/os-win32/stdint.h | 67 - Source/JavaScriptCore/parser/ASTBuilder.h | 515 +- Source/JavaScriptCore/parser/Lexer.cpp | 173 +- Source/JavaScriptCore/parser/Lexer.h | 105 +- Source/JavaScriptCore/parser/NodeConstructors.h | 158 +- Source/JavaScriptCore/parser/Nodes.cpp | 89 +- Source/JavaScriptCore/parser/Nodes.h | 414 +- Source/JavaScriptCore/parser/Parser.cpp | 321 +- Source/JavaScriptCore/parser/Parser.h | 239 +- Source/JavaScriptCore/parser/ParserArena.h | 26 +- Source/JavaScriptCore/parser/ParserError.h | 110 + Source/JavaScriptCore/parser/ParserModes.h | 21 +- Source/JavaScriptCore/parser/ParserTokens.h | 40 +- Source/JavaScriptCore/parser/ResultType.h | 5 + Source/JavaScriptCore/parser/SourceCode.h | 34 +- Source/JavaScriptCore/parser/SourceProvider.cpp | 62 + Source/JavaScriptCore/parser/SourceProvider.h | 36 +- .../JavaScriptCore/parser/SourceProviderCache.cpp | 9 +- Source/JavaScriptCore/parser/SourceProviderCache.h | 9 +- .../parser/SourceProviderCacheItem.h | 100 +- Source/JavaScriptCore/parser/SyntaxChecker.h | 74 +- Source/JavaScriptCore/profiler/LegacyProfiler.cpp | 185 + Source/JavaScriptCore/profiler/LegacyProfiler.h | 73 + .../JavaScriptCore/profiler/ProfileGenerator.cpp | 5 +- Source/JavaScriptCore/profiler/ProfileNode.cpp | 2 +- Source/JavaScriptCore/profiler/Profiler.cpp | 178 - Source/JavaScriptCore/profiler/Profiler.h | 73 - .../JavaScriptCore/profiler/ProfilerBytecode.cpp | 45 + Source/JavaScriptCore/profiler/ProfilerBytecode.h | 65 + .../profiler/ProfilerBytecodeSequence.cpp | 90 + .../profiler/ProfilerBytecodeSequence.h | 65 + .../JavaScriptCore/profiler/ProfilerBytecodes.cpp | 69 + Source/JavaScriptCore/profiler/ProfilerBytecodes.h | 63 + .../profiler/ProfilerCompilation.cpp | 138 + .../JavaScriptCore/profiler/ProfilerCompilation.h | 88 + .../profiler/ProfilerCompilationKind.cpp | 52 + .../profiler/ProfilerCompilationKind.h | 47 + .../profiler/ProfilerCompiledBytecode.cpp | 56 + .../profiler/ProfilerCompiledBytecode.h | 55 + .../JavaScriptCore/profiler/ProfilerDatabase.cpp | 187 + Source/JavaScriptCore/profiler/ProfilerDatabase.h | 93 + .../profiler/ProfilerExecutionCounter.h | 50 + Source/JavaScriptCore/profiler/ProfilerOSRExit.cpp | 60 + Source/JavaScriptCore/profiler/ProfilerOSRExit.h | 61 + .../profiler/ProfilerOSRExitSite.cpp | 46 + .../JavaScriptCore/profiler/ProfilerOSRExitSite.h | 52 + Source/JavaScriptCore/profiler/ProfilerOrigin.cpp | 57 + Source/JavaScriptCore/profiler/ProfilerOrigin.h | 120 + .../profiler/ProfilerOriginStack.cpp | 111 + .../JavaScriptCore/profiler/ProfilerOriginStack.h | 102 + .../profiler/ProfilerProfiledBytecodes.cpp | 56 + .../profiler/ProfilerProfiledBytecodes.h | 51 + Source/JavaScriptCore/runtime/ArgList.cpp | 4 +- Source/JavaScriptCore/runtime/ArgList.h | 3 +- Source/JavaScriptCore/runtime/Arguments.cpp | 41 +- Source/JavaScriptCore/runtime/Arguments.h | 34 +- Source/JavaScriptCore/runtime/ArrayConstructor.cpp | 7 +- Source/JavaScriptCore/runtime/ArrayConstructor.h | 4 +- Source/JavaScriptCore/runtime/ArrayPrototype.cpp | 218 +- Source/JavaScriptCore/runtime/ArrayPrototype.h | 4 +- Source/JavaScriptCore/runtime/ArrayStorage.h | 6 +- .../runtime/BatchedTransitionOptimizer.h | 8 +- Source/JavaScriptCore/runtime/BigInteger.h | 2 +- .../JavaScriptCore/runtime/BooleanConstructor.cpp | 15 +- Source/JavaScriptCore/runtime/BooleanConstructor.h | 4 +- Source/JavaScriptCore/runtime/BooleanObject.cpp | 9 +- Source/JavaScriptCore/runtime/BooleanObject.h | 14 +- Source/JavaScriptCore/runtime/BooleanPrototype.cpp | 17 +- Source/JavaScriptCore/runtime/BooleanPrototype.h | 4 +- Source/JavaScriptCore/runtime/Butterfly.h | 68 +- Source/JavaScriptCore/runtime/ButterflyInlines.h | 51 +- .../runtime/CachedTranscendentalFunction.h | 2 +- Source/JavaScriptCore/runtime/CallData.cpp | 1 + Source/JavaScriptCore/runtime/CallData.h | 2 +- Source/JavaScriptCore/runtime/CodeCache.cpp | 143 +- Source/JavaScriptCore/runtime/CodeCache.h | 256 +- .../JavaScriptCore/runtime/CommonIdentifiers.cpp | 12 +- Source/JavaScriptCore/runtime/CommonIdentifiers.h | 69 +- Source/JavaScriptCore/runtime/CommonSlowPaths.h | 4 +- Source/JavaScriptCore/runtime/Completion.cpp | 26 +- Source/JavaScriptCore/runtime/Completion.h | 7 +- Source/JavaScriptCore/runtime/ConstructData.cpp | 1 + Source/JavaScriptCore/runtime/ConstructData.h | 2 +- Source/JavaScriptCore/runtime/DateConstructor.cpp | 35 +- Source/JavaScriptCore/runtime/DateConstructor.h | 4 +- Source/JavaScriptCore/runtime/DateInstance.cpp | 24 +- Source/JavaScriptCore/runtime/DateInstance.h | 12 +- Source/JavaScriptCore/runtime/DatePrototype.cpp | 64 +- Source/JavaScriptCore/runtime/DatePrototype.h | 4 +- Source/JavaScriptCore/runtime/Error.cpp | 30 +- Source/JavaScriptCore/runtime/Error.h | 8 +- Source/JavaScriptCore/runtime/ErrorConstructor.cpp | 7 +- Source/JavaScriptCore/runtime/ErrorConstructor.h | 4 +- Source/JavaScriptCore/runtime/ErrorInstance.cpp | 5 +- Source/JavaScriptCore/runtime/ErrorInstance.h | 20 +- Source/JavaScriptCore/runtime/ErrorPrototype.cpp | 7 +- Source/JavaScriptCore/runtime/ErrorPrototype.h | 4 +- Source/JavaScriptCore/runtime/ExceptionHelpers.cpp | 93 +- Source/JavaScriptCore/runtime/ExceptionHelpers.h | 53 +- Source/JavaScriptCore/runtime/Executable.cpp | 124 +- Source/JavaScriptCore/runtime/Executable.h | 205 +- Source/JavaScriptCore/runtime/ExecutionHarness.h | 8 +- .../JavaScriptCore/runtime/FunctionConstructor.cpp | 9 +- .../JavaScriptCore/runtime/FunctionConstructor.h | 4 +- .../runtime/FunctionExecutableDump.cpp | 37 + .../runtime/FunctionExecutableDump.h | 49 + .../JavaScriptCore/runtime/FunctionPrototype.cpp | 17 +- Source/JavaScriptCore/runtime/FunctionPrototype.h | 4 +- .../JavaScriptCore/runtime/GCActivityCallback.cpp | 53 +- Source/JavaScriptCore/runtime/GCActivityCallback.h | 22 +- .../runtime/GCActivityCallbackBlackBerry.cpp | 12 +- Source/JavaScriptCore/runtime/GetterSetter.cpp | 1 + Source/JavaScriptCore/runtime/GetterSetter.h | 12 +- Source/JavaScriptCore/runtime/Identifier.cpp | 64 +- Source/JavaScriptCore/runtime/Identifier.h | 52 +- Source/JavaScriptCore/runtime/IndexingHeader.h | 32 +- Source/JavaScriptCore/runtime/IndexingType.cpp | 9 +- Source/JavaScriptCore/runtime/IndexingType.h | 25 +- Source/JavaScriptCore/runtime/InternalFunction.cpp | 15 +- Source/JavaScriptCore/runtime/InternalFunction.h | 6 +- Source/JavaScriptCore/runtime/Intrinsic.h | 2 + Source/JavaScriptCore/runtime/JSAPIValueWrapper.h | 12 +- Source/JavaScriptCore/runtime/JSActivation.cpp | 19 +- Source/JavaScriptCore/runtime/JSActivation.h | 30 +- Source/JavaScriptCore/runtime/JSArray.cpp | 185 +- Source/JavaScriptCore/runtime/JSArray.h | 70 +- Source/JavaScriptCore/runtime/JSBoundFunction.cpp | 10 +- Source/JavaScriptCore/runtime/JSBoundFunction.h | 4 +- Source/JavaScriptCore/runtime/JSCJSValue.cpp | 326 + Source/JavaScriptCore/runtime/JSCJSValue.h | 499 + Source/JavaScriptCore/runtime/JSCJSValueInlines.h | 810 + Source/JavaScriptCore/runtime/JSCell.cpp | 29 +- Source/JavaScriptCore/runtime/JSCell.h | 189 +- Source/JavaScriptCore/runtime/JSCellInlines.h | 204 + Source/JavaScriptCore/runtime/JSDateMath.cpp | 102 +- .../JavaScriptCore/runtime/JSDestructibleObject.h | 39 + Source/JavaScriptCore/runtime/JSExportMacros.h | 2 +- Source/JavaScriptCore/runtime/JSFunction.cpp | 73 +- Source/JavaScriptCore/runtime/JSFunction.h | 66 +- Source/JavaScriptCore/runtime/JSFunctionInlines.h | 69 + Source/JavaScriptCore/runtime/JSGlobalData.cpp | 531 - Source/JavaScriptCore/runtime/JSGlobalData.h | 506 - Source/JavaScriptCore/runtime/JSGlobalObject.cpp | 311 +- Source/JavaScriptCore/runtime/JSGlobalObject.h | 876 +- .../runtime/JSGlobalObjectFunctions.cpp | 11 +- .../runtime/JSGlobalObjectFunctions.h | 58 +- Source/JavaScriptCore/runtime/JSLock.cpp | 54 +- Source/JavaScriptCore/runtime/JSLock.h | 29 +- Source/JavaScriptCore/runtime/JSNameScope.cpp | 3 +- Source/JavaScriptCore/runtime/JSNameScope.h | 8 +- Source/JavaScriptCore/runtime/JSNotAnObject.cpp | 2 +- Source/JavaScriptCore/runtime/JSNotAnObject.h | 8 +- Source/JavaScriptCore/runtime/JSONObject.cpp | 103 +- Source/JavaScriptCore/runtime/JSONObject.h | 4 +- Source/JavaScriptCore/runtime/JSObject.cpp | 712 +- Source/JavaScriptCore/runtime/JSObject.h | 610 +- .../runtime/JSPropertyNameIterator.cpp | 8 +- .../runtime/JSPropertyNameIterator.h | 29 +- Source/JavaScriptCore/runtime/JSProxy.cpp | 18 +- Source/JavaScriptCore/runtime/JSProxy.h | 28 +- Source/JavaScriptCore/runtime/JSScope.cpp | 23 +- Source/JavaScriptCore/runtime/JSScope.h | 20 +- .../runtime/JSSegmentedVariableObject.cpp | 2 + .../runtime/JSSegmentedVariableObject.h | 9 +- Source/JavaScriptCore/runtime/JSString.cpp | 12 +- Source/JavaScriptCore/runtime/JSString.h | 892 +- Source/JavaScriptCore/runtime/JSStringBuilder.h | 4 +- Source/JavaScriptCore/runtime/JSStringJoiner.cpp | 22 +- Source/JavaScriptCore/runtime/JSStringJoiner.h | 13 +- .../JavaScriptCore/runtime/JSSymbolTableObject.cpp | 3 +- .../JavaScriptCore/runtime/JSSymbolTableObject.h | 22 +- Source/JavaScriptCore/runtime/JSTypeInfo.h | 3 + Source/JavaScriptCore/runtime/JSValue.cpp | 323 - Source/JavaScriptCore/runtime/JSValue.h | 497 - Source/JavaScriptCore/runtime/JSValueInlines.h | 497 - Source/JavaScriptCore/runtime/JSVariableObject.cpp | 2 + Source/JavaScriptCore/runtime/JSVariableObject.h | 5 +- Source/JavaScriptCore/runtime/JSWithScope.cpp | 2 + Source/JavaScriptCore/runtime/JSWithScope.h | 16 +- Source/JavaScriptCore/runtime/JSWrapperObject.cpp | 4 +- Source/JavaScriptCore/runtime/JSWrapperObject.h | 32 +- Source/JavaScriptCore/runtime/LiteralParser.cpp | 42 +- Source/JavaScriptCore/runtime/LiteralParser.h | 2 +- Source/JavaScriptCore/runtime/Lookup.cpp | 24 +- Source/JavaScriptCore/runtime/Lookup.h | 47 +- Source/JavaScriptCore/runtime/MathObject.cpp | 45 +- Source/JavaScriptCore/runtime/MathObject.h | 4 +- Source/JavaScriptCore/runtime/MemoryStatistics.cpp | 2 +- Source/JavaScriptCore/runtime/MemoryStatistics.h | 2 +- Source/JavaScriptCore/runtime/NameConstructor.cpp | 9 +- Source/JavaScriptCore/runtime/NameConstructor.h | 4 +- Source/JavaScriptCore/runtime/NameInstance.cpp | 7 +- Source/JavaScriptCore/runtime/NameInstance.h | 16 +- Source/JavaScriptCore/runtime/NamePrototype.cpp | 5 +- Source/JavaScriptCore/runtime/NamePrototype.h | 4 +- .../runtime/NativeErrorConstructor.cpp | 1 + .../runtime/NativeErrorConstructor.h | 12 +- .../runtime/NativeErrorPrototype.cpp | 7 +- .../JavaScriptCore/runtime/NumberConstructor.cpp | 11 +- Source/JavaScriptCore/runtime/NumberConstructor.h | 4 +- Source/JavaScriptCore/runtime/NumberObject.cpp | 13 +- Source/JavaScriptCore/runtime/NumberObject.h | 14 +- Source/JavaScriptCore/runtime/NumberPrototype.cpp | 38 +- Source/JavaScriptCore/runtime/NumberPrototype.h | 4 +- .../JavaScriptCore/runtime/ObjectConstructor.cpp | 50 +- Source/JavaScriptCore/runtime/ObjectConstructor.h | 30 +- Source/JavaScriptCore/runtime/ObjectPrototype.cpp | 59 +- Source/JavaScriptCore/runtime/ObjectPrototype.h | 17 +- Source/JavaScriptCore/runtime/Operations.cpp | 26 +- Source/JavaScriptCore/runtime/Operations.h | 526 +- Source/JavaScriptCore/runtime/Options.cpp | 63 +- Source/JavaScriptCore/runtime/Options.h | 47 +- .../JavaScriptCore/runtime/PropertyDescriptor.cpp | 4 +- Source/JavaScriptCore/runtime/PropertyDescriptor.h | 2 +- .../JavaScriptCore/runtime/PropertyMapHashTable.h | 131 +- Source/JavaScriptCore/runtime/PropertyNameArray.h | 12 +- Source/JavaScriptCore/runtime/PropertyOffset.h | 21 +- Source/JavaScriptCore/runtime/PropertySlot.cpp | 1 + Source/JavaScriptCore/runtime/PropertySlot.h | 2 +- Source/JavaScriptCore/runtime/PropertyTable.cpp | 146 + Source/JavaScriptCore/runtime/Protect.h | 2 +- Source/JavaScriptCore/runtime/PrototypeMap.cpp | 75 + Source/JavaScriptCore/runtime/PrototypeMap.h | 65 + Source/JavaScriptCore/runtime/RegExp.cpp | 64 +- Source/JavaScriptCore/runtime/RegExp.h | 26 +- Source/JavaScriptCore/runtime/RegExpCache.cpp | 14 +- Source/JavaScriptCore/runtime/RegExpCache.h | 5 +- .../JavaScriptCore/runtime/RegExpCachedResult.cpp | 7 +- Source/JavaScriptCore/runtime/RegExpCachedResult.h | 12 +- .../JavaScriptCore/runtime/RegExpConstructor.cpp | 11 +- Source/JavaScriptCore/runtime/RegExpConstructor.h | 20 +- .../JavaScriptCore/runtime/RegExpMatchesArray.cpp | 23 +- Source/JavaScriptCore/runtime/RegExpMatchesArray.h | 8 +- Source/JavaScriptCore/runtime/RegExpObject.cpp | 13 +- Source/JavaScriptCore/runtime/RegExpObject.h | 12 +- Source/JavaScriptCore/runtime/RegExpPrototype.cpp | 7 +- Source/JavaScriptCore/runtime/RegExpPrototype.h | 4 +- Source/JavaScriptCore/runtime/SmallStrings.cpp | 32 +- Source/JavaScriptCore/runtime/SmallStrings.h | 27 +- .../JavaScriptCore/runtime/SparseArrayValueMap.cpp | 23 +- .../JavaScriptCore/runtime/SparseArrayValueMap.h | 8 +- .../runtime/StrictEvalActivation.cpp | 3 +- .../JavaScriptCore/runtime/StrictEvalActivation.h | 6 +- .../JavaScriptCore/runtime/StringConstructor.cpp | 12 +- Source/JavaScriptCore/runtime/StringConstructor.h | 6 +- Source/JavaScriptCore/runtime/StringObject.cpp | 13 +- Source/JavaScriptCore/runtime/StringObject.h | 16 +- Source/JavaScriptCore/runtime/StringPrototype.cpp | 159 +- Source/JavaScriptCore/runtime/StringPrototype.h | 19 +- .../runtime/StringRecursionChecker.cpp | 3 +- .../runtime/StringRecursionChecker.h | 10 +- Source/JavaScriptCore/runtime/Structure.cpp | 469 +- Source/JavaScriptCore/runtime/Structure.h | 843 +- Source/JavaScriptCore/runtime/StructureChain.cpp | 5 +- Source/JavaScriptCore/runtime/StructureChain.h | 16 +- Source/JavaScriptCore/runtime/StructureInlines.h | 226 + .../JavaScriptCore/runtime/StructureRareData.cpp | 83 + Source/JavaScriptCore/runtime/StructureRareData.h | 76 + .../runtime/StructureRareDataInlines.h | 60 + .../runtime/StructureTransitionTable.h | 22 +- Source/JavaScriptCore/runtime/SymbolTable.cpp | 4 +- Source/JavaScriptCore/runtime/SymbolTable.h | 661 +- Source/JavaScriptCore/runtime/Terminator.h | 47 - Source/JavaScriptCore/runtime/TimeoutChecker.cpp | 147 - Source/JavaScriptCore/runtime/TimeoutChecker.h | 74 - Source/JavaScriptCore/runtime/Uint16WithFraction.h | 2 +- Source/JavaScriptCore/runtime/VM.cpp | 572 + Source/JavaScriptCore/runtime/VM.h | 529 + Source/JavaScriptCore/runtime/VMStackBounds.h | 71 + Source/JavaScriptCore/runtime/Watchdog.cpp | 199 + Source/JavaScriptCore/runtime/Watchdog.h | 116 + Source/JavaScriptCore/runtime/WatchdogMac.cpp | 72 + Source/JavaScriptCore/runtime/WatchdogNone.cpp | 50 + Source/JavaScriptCore/runtime/WeakGCMap.h | 118 +- Source/JavaScriptCore/runtime/WriteBarrier.h | 34 +- Source/JavaScriptCore/shell/CMakeLists.txt | 39 +- .../JavaScriptCore/shell/PlatformBlackBerry.cmake | 9 +- Source/JavaScriptCore/shell/PlatformEfl.cmake | 3 +- Source/JavaScriptCore/shell/PlatformGTK.cmake | 3 + Source/JavaScriptCore/shell/PlatformWinCE.cmake | 3 - Source/JavaScriptCore/testRegExp.cpp | 50 +- Source/JavaScriptCore/tests/mozilla/jsDriver.pl | 21 +- Source/JavaScriptCore/tools/CodeProfile.cpp | 2 +- Source/JavaScriptCore/tools/TieredMMapArray.h | 3 +- Source/JavaScriptCore/wscript | 90 - Source/JavaScriptCore/yarr/YarrCanonicalizeUCS2.h | 6 +- Source/JavaScriptCore/yarr/YarrInterpreter.cpp | 59 +- Source/JavaScriptCore/yarr/YarrInterpreter.h | 25 +- Source/JavaScriptCore/yarr/YarrJIT.cpp | 39 +- Source/JavaScriptCore/yarr/YarrJIT.h | 6 +- Source/JavaScriptCore/yarr/YarrParser.h | 4 +- Source/JavaScriptCore/yarr/YarrPattern.cpp | 76 +- Source/JavaScriptCore/yarr/YarrPattern.h | 68 +- 872 files changed, 88418 insertions(+), 48064 deletions(-) create mode 100644 Source/JavaScriptCore/API/JSAPIWrapperObject.h create mode 100644 Source/JavaScriptCore/API/JSAPIWrapperObject.mm create mode 100644 Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp create mode 100644 Source/JavaScriptCore/API/JSCTestRunnerUtils.h create mode 100644 Source/JavaScriptCore/API/JSContext.h create mode 100644 Source/JavaScriptCore/API/JSContext.mm create mode 100644 Source/JavaScriptCore/API/JSContextInternal.h create mode 100644 Source/JavaScriptCore/API/JSExport.h create mode 100644 Source/JavaScriptCore/API/JSManagedValue.h create mode 100644 Source/JavaScriptCore/API/JSManagedValue.mm create mode 100644 Source/JavaScriptCore/API/JSScriptRef.cpp create mode 100644 Source/JavaScriptCore/API/JSScriptRefPrivate.h create mode 100644 Source/JavaScriptCore/API/JSStringRefPrivate.h create mode 100644 Source/JavaScriptCore/API/JSStringRefQt.cpp create mode 100644 Source/JavaScriptCore/API/JSStringRefQt.h create mode 100644 Source/JavaScriptCore/API/JSValue.h create mode 100644 Source/JavaScriptCore/API/JSValue.mm create mode 100644 Source/JavaScriptCore/API/JSValueInternal.h create mode 100644 Source/JavaScriptCore/API/JSVirtualMachine.h create mode 100644 Source/JavaScriptCore/API/JSVirtualMachine.mm create mode 100644 Source/JavaScriptCore/API/JSVirtualMachineInternal.h create mode 100644 Source/JavaScriptCore/API/JSWrapperMap.h create mode 100644 Source/JavaScriptCore/API/JSWrapperMap.mm create mode 100644 Source/JavaScriptCore/API/ObjCCallbackFunction.h create mode 100644 Source/JavaScriptCore/API/ObjCCallbackFunction.mm create mode 100644 Source/JavaScriptCore/API/ObjcRuntimeExtras.h create mode 100644 Source/JavaScriptCore/API/tests/testapi.mm delete mode 100644 Source/JavaScriptCore/ChangeLog create mode 100644 Source/JavaScriptCore/ChangeLog-2013-04-24 create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSCTestRunnerUtils.h create mode 100644 Source/JavaScriptCore/JavaScriptCore.gir.in delete mode 100644 Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp delete mode 100644 Source/JavaScriptCore/JavaScriptCore.gypi delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.make delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.vcproj delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/build-LLIntAssembly.sh delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcproj delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcproj delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugAll.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleaseCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleasePGO.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebug.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPostBuild.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreBuild.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreLink.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops delete mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebug.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreLink.cmd delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops delete mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.make create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.submit.sln create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCF.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebug.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreProduction.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreRelease.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh create mode 100755 Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscCommon.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscDebug.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreLink.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscProduction.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscRelease.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/resource.h create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommon.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebug.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiProduction.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiRelease.props create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props delete mode 100644 Source/JavaScriptCore/PlatformWinCE.cmake delete mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerSH4.cpp delete mode 100644 Source/JavaScriptCore/bytecode/Comment.h create mode 100644 Source/JavaScriptCore/bytecode/ExitKind.cpp create mode 100644 Source/JavaScriptCore/bytecode/ExitKind.h create mode 100644 Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h create mode 100644 Source/JavaScriptCore/bytecode/PolymorphicAccessStructureList.h create mode 100644 Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp create mode 100644 Source/JavaScriptCore/bytecode/PreciseJumpTargets.h create mode 100644 Source/JavaScriptCore/bytecode/ReduceWhitespace.cpp create mode 100644 Source/JavaScriptCore/bytecode/ReduceWhitespace.h create mode 100644 Source/JavaScriptCore/bytecompiler/StaticPropertyAnalysis.h create mode 100644 Source/JavaScriptCore/bytecompiler/StaticPropertyAnalyzer.h create mode 100644 Source/JavaScriptCore/dfg/DFGAllocator.h create mode 100644 Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h create mode 100644 Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.h create mode 100644 Source/JavaScriptCore/dfg/DFGBasicBlockInlines.h delete mode 100644 Source/JavaScriptCore/dfg/DFGByteCodeCache.h create mode 100644 Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.h create mode 100644 Source/JavaScriptCore/dfg/DFGCommon.cpp delete mode 100644 Source/JavaScriptCore/dfg/DFGCorrectableJumpPoint.cpp delete mode 100644 Source/JavaScriptCore/dfg/DFGCorrectableJumpPoint.h create mode 100644 Source/JavaScriptCore/dfg/DFGDCEPhase.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGDCEPhase.h create mode 100644 Source/JavaScriptCore/dfg/DFGEdge.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGLongLivedState.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGLongLivedState.h create mode 100644 Source/JavaScriptCore/dfg/DFGMinifiedID.h create mode 100644 Source/JavaScriptCore/dfg/DFGNode.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGNodeAllocator.h create mode 100644 Source/JavaScriptCore/dfg/DFGOSRExitCompilationInfo.h create mode 100644 Source/JavaScriptCore/dfg/DFGOSRExitJumpPlaceholder.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGOSRExitJumpPlaceholder.h create mode 100644 Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.h create mode 100644 Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.h create mode 100644 Source/JavaScriptCore/dfg/DFGUnificationPhase.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGUnificationPhase.h create mode 100644 Source/JavaScriptCore/dfg/DFGUseKind.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGUseKind.h create mode 100644 Source/JavaScriptCore/dfg/DFGVariadicFunction.h create mode 100644 Source/JavaScriptCore/disassembler/ARMv7/ARMv7DOpcode.cpp create mode 100644 Source/JavaScriptCore/disassembler/ARMv7/ARMv7DOpcode.h create mode 100644 Source/JavaScriptCore/disassembler/ARMv7Disassembler.cpp delete mode 100644 Source/JavaScriptCore/heap/CardSet.h create mode 100644 Source/JavaScriptCore/heap/HandleBlock.h create mode 100644 Source/JavaScriptCore/heap/HandleBlockInlines.h create mode 100644 Source/JavaScriptCore/heap/Region.h create mode 100644 Source/JavaScriptCore/heap/SuperRegion.cpp create mode 100644 Source/JavaScriptCore/heap/SuperRegion.h create mode 100644 Source/JavaScriptCore/heap/Weak.cpp create mode 100644 Source/JavaScriptCore/heap/WeakInlines.h create mode 100644 Source/JavaScriptCore/jit/JITThunks.cpp create mode 100644 Source/JavaScriptCore/jit/JITThunks.h create mode 100644 Source/JavaScriptCore/jit/ThunkGenerator.h create mode 100644 Source/JavaScriptCore/jit/UnusedPointer.h create mode 100644 Source/JavaScriptCore/offlineasm/arm.rb delete mode 100644 Source/JavaScriptCore/offlineasm/armv7.rb create mode 100644 Source/JavaScriptCore/offlineasm/sh4.rb delete mode 100644 Source/JavaScriptCore/os-win32/WinMain.cpp delete mode 100644 Source/JavaScriptCore/os-win32/stdint.h create mode 100644 Source/JavaScriptCore/parser/ParserError.h create mode 100644 Source/JavaScriptCore/parser/SourceProvider.cpp create mode 100644 Source/JavaScriptCore/profiler/LegacyProfiler.cpp create mode 100644 Source/JavaScriptCore/profiler/LegacyProfiler.h delete mode 100644 Source/JavaScriptCore/profiler/Profiler.cpp delete mode 100644 Source/JavaScriptCore/profiler/Profiler.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerBytecode.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerBytecode.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerBytecodes.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerBytecodes.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerCompilation.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerCompilation.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerCompilationKind.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerCompilationKind.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerCompiledBytecode.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerCompiledBytecode.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerDatabase.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerDatabase.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerExecutionCounter.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerOSRExit.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerOSRExit.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerOSRExitSite.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerOSRExitSite.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerOrigin.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerOrigin.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerOriginStack.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerProfiledBytecodes.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfilerProfiledBytecodes.h create mode 100644 Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp create mode 100644 Source/JavaScriptCore/runtime/FunctionExecutableDump.h create mode 100644 Source/JavaScriptCore/runtime/JSCJSValue.cpp create mode 100644 Source/JavaScriptCore/runtime/JSCJSValue.h create mode 100644 Source/JavaScriptCore/runtime/JSCJSValueInlines.h create mode 100644 Source/JavaScriptCore/runtime/JSCellInlines.h create mode 100644 Source/JavaScriptCore/runtime/JSFunctionInlines.h delete mode 100644 Source/JavaScriptCore/runtime/JSGlobalData.cpp delete mode 100644 Source/JavaScriptCore/runtime/JSGlobalData.h delete mode 100644 Source/JavaScriptCore/runtime/JSValue.cpp delete mode 100644 Source/JavaScriptCore/runtime/JSValue.h delete mode 100644 Source/JavaScriptCore/runtime/JSValueInlines.h create mode 100644 Source/JavaScriptCore/runtime/PropertyTable.cpp create mode 100644 Source/JavaScriptCore/runtime/PrototypeMap.cpp create mode 100644 Source/JavaScriptCore/runtime/PrototypeMap.h create mode 100644 Source/JavaScriptCore/runtime/StructureInlines.h create mode 100644 Source/JavaScriptCore/runtime/StructureRareData.cpp create mode 100644 Source/JavaScriptCore/runtime/StructureRareData.h create mode 100644 Source/JavaScriptCore/runtime/StructureRareDataInlines.h delete mode 100644 Source/JavaScriptCore/runtime/Terminator.h delete mode 100644 Source/JavaScriptCore/runtime/TimeoutChecker.cpp delete mode 100644 Source/JavaScriptCore/runtime/TimeoutChecker.h create mode 100644 Source/JavaScriptCore/runtime/VM.cpp create mode 100644 Source/JavaScriptCore/runtime/VM.h create mode 100644 Source/JavaScriptCore/runtime/VMStackBounds.h create mode 100644 Source/JavaScriptCore/runtime/Watchdog.cpp create mode 100644 Source/JavaScriptCore/runtime/Watchdog.h create mode 100644 Source/JavaScriptCore/runtime/WatchdogMac.cpp create mode 100644 Source/JavaScriptCore/runtime/WatchdogNone.cpp create mode 100644 Source/JavaScriptCore/shell/PlatformGTK.cmake delete mode 100644 Source/JavaScriptCore/shell/PlatformWinCE.cmake delete mode 100644 Source/JavaScriptCore/wscript (limited to 'Source/JavaScriptCore') diff --git a/Source/JavaScriptCore/API/APICast.h b/Source/JavaScriptCore/API/APICast.h index f019a7a4b..fc5d71b2e 100644 --- a/Source/JavaScriptCore/API/APICast.h +++ b/Source/JavaScriptCore/API/APICast.h @@ -27,14 +27,13 @@ #define APICast_h #include "JSAPIValueWrapper.h" +#include "JSCJSValue.h" #include "JSGlobalObject.h" -#include "JSValue.h" -#include namespace JSC { class ExecState; class PropertyNameArray; - class JSGlobalData; + class VM; class JSObject; class JSValue; } @@ -63,46 +62,63 @@ inline JSC::ExecState* toJS(JSGlobalContextRef c) inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v) { ASSERT_UNUSED(exec, exec); - ASSERT(v); #if USE(JSVALUE32_64) JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); if (!jsCell) - return JSC::JSValue(); + return JSC::jsNull(); + JSC::JSValue result; if (jsCell->isAPIValueWrapper()) - return JSC::jsCast(jsCell)->value(); - return jsCell; + result = JSC::jsCast(jsCell)->value(); + else + result = jsCell; #else - return JSC::JSValue::decode(reinterpret_cast(const_cast(v))); + JSC::JSValue result = JSC::JSValue::decode(reinterpret_cast(const_cast(v))); #endif + if (!result) + return JSC::jsNull(); + if (result.isCell()) + RELEASE_ASSERT(result.asCell()->methodTable()); + return result; } inline JSC::JSValue toJSForGC(JSC::ExecState* exec, JSValueRef v) { ASSERT_UNUSED(exec, exec); - ASSERT(v); #if USE(JSVALUE32_64) JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); if (!jsCell) return JSC::JSValue(); - return jsCell; + JSC::JSValue result = jsCell; #else - return JSC::JSValue::decode(reinterpret_cast(const_cast(v))); + JSC::JSValue result = JSC::JSValue::decode(reinterpret_cast(const_cast(v))); #endif + if (result && result.isCell()) + RELEASE_ASSERT(result.asCell()->methodTable()); + return result; } -inline JSC::JSObject* toJS(JSObjectRef o) +// Used in JSObjectGetPrivate as that may be called during finalization +inline JSC::JSObject* uncheckedToJS(JSObjectRef o) { return reinterpret_cast(o); } +inline JSC::JSObject* toJS(JSObjectRef o) +{ + JSC::JSObject* object = uncheckedToJS(o); + if (object) + RELEASE_ASSERT(object->methodTable()); + return object; +} + inline JSC::PropertyNameArray* toJS(JSPropertyNameAccumulatorRef a) { return reinterpret_cast(a); } -inline JSC::JSGlobalData* toJS(JSContextGroupRef g) +inline JSC::VM* toJS(JSContextGroupRef g) { - return reinterpret_cast(const_cast(g)); + return reinterpret_cast(const_cast(g)); } inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v) @@ -145,7 +161,7 @@ inline JSPropertyNameAccumulatorRef toRef(JSC::PropertyNameArray* l) return reinterpret_cast(l); } -inline JSContextGroupRef toRef(JSC::JSGlobalData* g) +inline JSContextGroupRef toRef(JSC::VM* g) { return reinterpret_cast(g); } diff --git a/Source/JavaScriptCore/API/APIShims.h b/Source/JavaScriptCore/API/APIShims.h index ef5f10466..d8e1fb790 100644 --- a/Source/JavaScriptCore/API/APIShims.h +++ b/Source/JavaScriptCore/API/APIShims.h @@ -35,34 +35,22 @@ namespace JSC { class APIEntryShimWithoutLock { -public: - enum RefGlobalDataTag { DontRefGlobalData = 0, RefGlobalData }; - protected: - APIEntryShimWithoutLock(JSGlobalData* globalData, bool registerThread, RefGlobalDataTag shouldRefGlobalData) - : m_shouldRefGlobalData(shouldRefGlobalData) - , m_globalData(globalData) - , m_entryIdentifierTable(wtfThreadData().setCurrentIdentifierTable(globalData->identifierTable)) + APIEntryShimWithoutLock(VM* vm, bool registerThread) + : m_vm(vm) + , m_entryIdentifierTable(wtfThreadData().setCurrentIdentifierTable(vm->identifierTable)) { - if (shouldRefGlobalData) - m_globalData->ref(); - UNUSED_PARAM(registerThread); if (registerThread) - globalData->heap.machineThreads().addCurrentThread(); - m_globalData->heap.activityCallback()->synchronize(); - m_globalData->heap.sweeper()->synchronize(); + vm->heap.machineThreads().addCurrentThread(); } ~APIEntryShimWithoutLock() { wtfThreadData().setCurrentIdentifierTable(m_entryIdentifierTable); - if (m_shouldRefGlobalData) - m_globalData->deref(); } protected: - RefGlobalDataTag m_shouldRefGlobalData; - JSGlobalData* m_globalData; + RefPtr m_vm; IdentifierTable* m_entryIdentifierTable; }; @@ -70,57 +58,45 @@ class APIEntryShim : public APIEntryShimWithoutLock { public: // Normal API entry APIEntryShim(ExecState* exec, bool registerThread = true) - : APIEntryShimWithoutLock(&exec->globalData(), registerThread, RefGlobalData) + : APIEntryShimWithoutLock(&exec->vm(), registerThread) + , m_lockHolder(exec) { - init(); } - // This constructor is necessary for HeapTimer to prevent it from accidentally resurrecting - // the ref count of a "dead" JSGlobalData. - APIEntryShim(JSGlobalData* globalData, RefGlobalDataTag refGlobalData, bool registerThread = true) - : APIEntryShimWithoutLock(globalData, registerThread, refGlobalData) + // JSPropertyNameAccumulator only has a vm. + APIEntryShim(VM* vm, bool registerThread = true) + : APIEntryShimWithoutLock(vm, registerThread) + , m_lockHolder(vm) { - init(); - } - - // JSPropertyNameAccumulator only has a globalData. - APIEntryShim(JSGlobalData* globalData, bool registerThread = true) - : APIEntryShimWithoutLock(globalData, registerThread, RefGlobalData) - { - init(); } ~APIEntryShim() { - m_globalData->timeoutChecker.stop(); - m_globalData->apiLock().unlock(); + // Destroying our JSLockHolder should also destroy the VM. + m_vm.clear(); } private: - void init() - { - m_globalData->apiLock().lock(); - m_globalData->timeoutChecker.start(); - } + JSLockHolder m_lockHolder; }; class APICallbackShim { public: APICallbackShim(ExecState* exec) : m_dropAllLocks(exec) - , m_globalData(&exec->globalData()) + , m_vm(&exec->vm()) { wtfThreadData().resetCurrentIdentifierTable(); } ~APICallbackShim() { - wtfThreadData().setCurrentIdentifierTable(m_globalData->identifierTable); + wtfThreadData().setCurrentIdentifierTable(m_vm->identifierTable); } private: JSLock::DropAllLocks m_dropAllLocks; - JSGlobalData* m_globalData; + VM* m_vm; }; } diff --git a/Source/JavaScriptCore/API/JSAPIWrapperObject.h b/Source/JavaScriptCore/API/JSAPIWrapperObject.h new file mode 100644 index 000000000..909039771 --- /dev/null +++ b/Source/JavaScriptCore/API/JSAPIWrapperObject.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSAPIWrapperObject_h +#define JSAPIWrapperObject_h + +#include "JSBase.h" +#include "JSDestructibleObject.h" +#include "WeakReferenceHarvester.h" + +#if JSC_OBJC_API_ENABLED + +namespace JSC { + +class JSAPIWrapperObject : public JSDestructibleObject { +public: + typedef JSDestructibleObject Base; + + void finishCreation(VM&); + static void visitChildren(JSCell*, JSC::SlotVisitor&); + + void* wrappedObject() { return m_wrappedObject; } + void setWrappedObject(void*); + +protected: + static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags; + + JSAPIWrapperObject(VM&, Structure*); + +private: + void* m_wrappedObject; +}; + +} // namespace JSC + +#endif // JSC_OBJC_API_ENABLED + +#endif // JSAPIWrapperObject_h diff --git a/Source/JavaScriptCore/API/JSAPIWrapperObject.mm b/Source/JavaScriptCore/API/JSAPIWrapperObject.mm new file mode 100644 index 000000000..c06de3978 --- /dev/null +++ b/Source/JavaScriptCore/API/JSAPIWrapperObject.mm @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSAPIWrapperObject.h" + +#include "JSCJSValueInlines.h" +#include "JSCallbackObject.h" +#include "JSCellInlines.h" +#include "JSVirtualMachineInternal.h" +#include "SlotVisitorInlines.h" +#include "Structure.h" +#include "StructureInlines.h" + +#if JSC_OBJC_API_ENABLED + +class JSAPIWrapperObjectHandleOwner : public JSC::WeakHandleOwner { +public: + virtual void finalize(JSC::Handle, void*); + virtual bool isReachableFromOpaqueRoots(JSC::Handle, void* context, JSC::SlotVisitor&); +}; + +static JSAPIWrapperObjectHandleOwner* jsAPIWrapperObjectHandleOwner() +{ + DEFINE_STATIC_LOCAL(JSAPIWrapperObjectHandleOwner, jsWrapperObjectHandleOwner, ()); + return &jsWrapperObjectHandleOwner; +} + +void JSAPIWrapperObjectHandleOwner::finalize(JSC::Handle handle, void*) +{ + JSC::JSAPIWrapperObject* wrapperObject = JSC::jsCast(handle.get().asCell()); + if (!wrapperObject->wrappedObject()) + return; + [static_cast(wrapperObject->wrappedObject()) release]; + JSC::WeakSet::deallocate(JSC::WeakImpl::asWeakImpl(handle.slot())); +} + +bool JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle handle, void*, JSC::SlotVisitor& visitor) +{ + JSC::JSAPIWrapperObject* wrapperObject = JSC::jsCast(handle.get().asCell()); + // We use the JSGlobalObject when processing weak handles to prevent the situation where using + // the same Objective-C object in multiple global objects keeps all of the global objects alive. + if (!wrapperObject->wrappedObject()) + return false; + return JSC::Heap::isMarked(wrapperObject->structure()->globalObject()) && visitor.containsOpaqueRoot(wrapperObject->wrappedObject()); +} + +namespace JSC { + +template <> const ClassInfo JSCallbackObject::s_info = { "JSAPIWrapperObject", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackObject) }; + +template<> const bool JSCallbackObject::needsDestruction = true; + +template <> +Structure* JSCallbackObject::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) +{ + return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); +} + +JSAPIWrapperObject::JSAPIWrapperObject(VM& vm, Structure* structure) + : Base(vm, structure) + , m_wrappedObject(0) +{ +} + +void JSAPIWrapperObject::finishCreation(VM& vm) +{ + Base::finishCreation(vm); + WeakSet::allocate(this, jsAPIWrapperObjectHandleOwner(), 0); // Balanced in JSAPIWrapperObjectHandleOwner::finalize. +} + +void JSAPIWrapperObject::setWrappedObject(void* wrappedObject) +{ + ASSERT(!m_wrappedObject); + m_wrappedObject = [static_cast(wrappedObject) retain]; +} + +void JSAPIWrapperObject::visitChildren(JSCell* cell, JSC::SlotVisitor& visitor) +{ + JSAPIWrapperObject* thisObject = JSC::jsCast(cell); + COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); + Base::visitChildren(cell, visitor); + + if (thisObject->wrappedObject()) + scanExternalObjectGraph(cell->structure()->globalObject()->vm(), visitor, thisObject->wrappedObject()); +} + +} // namespace JSC + +#endif // JSC_OBJC_API_ENABLED diff --git a/Source/JavaScriptCore/API/JSBase.cpp b/Source/JavaScriptCore/API/JSBase.cpp index 677c68187..7669ff1a9 100644 --- a/Source/JavaScriptCore/API/JSBase.cpp +++ b/Source/JavaScriptCore/API/JSBase.cpp @@ -29,20 +29,25 @@ #include "APICast.h" #include "APIShims.h" +#include "CallFrame.h" +#include "Completion.h" +#include "InitializeThreading.h" +#include "JSGlobalObject.h" +#include "JSLock.h" +#include "JSObject.h" #include "OpaqueJSString.h" +#include "Operations.h" #include "SourceCode.h" -#include -#include -#include -#include -#include -#include #include using namespace JSC; JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -70,6 +75,10 @@ JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef th bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -100,12 +109,28 @@ void JSGarbageCollect(JSContextRef ctx) ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec, false); - exec->globalData().heap.reportAbandonedObjectGraph(); + exec->vm().heap.reportAbandonedObjectGraph(); } void JSReportExtraMemoryCost(JSContextRef ctx, size_t size) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return; + } + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + exec->vm().heap.reportExtraMemoryCost(size); +} + +extern "C" JS_EXPORT void JSSynchronousGarbageCollectForDebugging(JSContextRef); + +void JSSynchronousGarbageCollectForDebugging(JSContextRef ctx) +{ + if (!ctx) + return; + ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); - exec->globalData().heap.reportExtraMemoryCost(size); + exec->vm().heap.collectAllGarbage(); } diff --git a/Source/JavaScriptCore/API/JSBase.h b/Source/JavaScriptCore/API/JSBase.h index f46a41755..50e8f1e64 100644 --- a/Source/JavaScriptCore/API/JSBase.h +++ b/Source/JavaScriptCore/API/JSBase.h @@ -30,6 +30,10 @@ #include #endif +#ifdef __OBJC__ +#import +#endif + /* JavaScript engine interface */ /*! @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. */ @@ -135,4 +139,9 @@ JS_EXPORT void JSGarbageCollect(JSContextRef ctx); } #endif +/* Enable the Objective-C API for platforms with a modern runtime. */ +#if !defined(JSC_OBJC_API_ENABLED) +#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) +#endif + #endif /* JSBase_h */ diff --git a/Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp b/Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp new file mode 100644 index 000000000..394246711 --- /dev/null +++ b/Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSCTestRunnerUtils.h" + +#include "APICast.h" +#include "CodeBlock.h" +#include "Operations.h" + +namespace JSC { + +static FunctionExecutable* getExecutable(JSContextRef context, JSValueRef theFunctionValueRef) +{ + ExecState* exec = toJS(context); + JSValue theFunctionValue = toJS(exec, theFunctionValueRef); + + JSFunction* theFunction = jsDynamicCast(theFunctionValue); + if (!theFunction) + return 0; + + FunctionExecutable* executable = jsDynamicCast( + theFunction->executable()); + return executable; +} + +JSValueRef numberOfDFGCompiles(JSContextRef context, JSValueRef theFunctionValueRef) +{ + if (FunctionExecutable* executable = getExecutable(context, theFunctionValueRef)) { + CodeBlock* baselineCodeBlock = executable->baselineCodeBlockFor(CodeForCall); + + if (!baselineCodeBlock) + return JSValueMakeNumber(context, 0); + + return JSValueMakeNumber(context, baselineCodeBlock->numberOfDFGCompiles()); + } + + return JSValueMakeUndefined(context); +} + +JSValueRef setNeverInline(JSContextRef context, JSValueRef theFunctionValueRef) +{ + if (FunctionExecutable* executable = getExecutable(context, theFunctionValueRef)) + executable->setNeverInline(true); + + return JSValueMakeUndefined(context); +} + +} // namespace JSC + diff --git a/Source/JavaScriptCore/API/JSCTestRunnerUtils.h b/Source/JavaScriptCore/API/JSCTestRunnerUtils.h new file mode 100644 index 000000000..aaecdd5c9 --- /dev/null +++ b/Source/JavaScriptCore/API/JSCTestRunnerUtils.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSCTestRunnerUtils_h +#define JSCTestRunnerUtils_h + +#include +#include + +namespace JSC { + +JS_EXPORT_PRIVATE JSValueRef numberOfDFGCompiles(JSContextRef, JSValueRef theFunction); +JS_EXPORT_PRIVATE JSValueRef setNeverInline(JSContextRef, JSValueRef theFunction); + +} // namespace JSC + +#endif // JSCTestRunnerUtils_h diff --git a/Source/JavaScriptCore/API/JSCallbackConstructor.cpp b/Source/JavaScriptCore/API/JSCallbackConstructor.cpp index c43182e8f..8340c10b4 100644 --- a/Source/JavaScriptCore/API/JSCallbackConstructor.cpp +++ b/Source/JavaScriptCore/API/JSCallbackConstructor.cpp @@ -28,10 +28,11 @@ #include "APIShims.h" #include "APICast.h" -#include -#include -#include -#include +#include "Error.h" +#include "JSGlobalObject.h" +#include "JSLock.h" +#include "ObjectPrototype.h" +#include "Operations.h" #include namespace JSC { @@ -39,7 +40,7 @@ namespace JSC { const ClassInfo JSCallbackConstructor::s_info = { "CallbackConstructor", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackConstructor) }; JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, Structure* structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) - : JSDestructibleObject(globalObject->globalData(), structure) + : JSDestructibleObject(globalObject->vm(), structure) , m_class(jsClass) , m_callback(callback) { @@ -47,7 +48,7 @@ JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, Struc void JSCallbackConstructor::finishCreation(JSGlobalObject* globalObject, JSClassRef jsClass) { - Base::finishCreation(globalObject->globalData()); + Base::finishCreation(globalObject->vm()); ASSERT(inherits(&s_info)); if (m_class) JSClassRetain(jsClass); @@ -72,10 +73,11 @@ static EncodedJSValue JSC_HOST_CALL constructJSCallback(ExecState* exec) JSObjectCallAsConstructorCallback callback = jsCast(constructor)->callback(); if (callback) { - int argumentCount = static_cast(exec->argumentCount()); - Vector arguments(argumentCount); - for (int i = 0; i < argumentCount; i++) - arguments[i] = toRef(exec, exec->argument(i)); + size_t argumentCount = exec->argumentCount(); + Vector arguments; + arguments.reserveInitialCapacity(argumentCount); + for (size_t i = 0; i < argumentCount; ++i) + arguments.uncheckedAppend(toRef(exec, exec->argument(i))); JSValueRef exception = 0; JSObjectRef result; diff --git a/Source/JavaScriptCore/API/JSCallbackConstructor.h b/Source/JavaScriptCore/API/JSCallbackConstructor.h index 2bb4d07af..72100e672 100644 --- a/Source/JavaScriptCore/API/JSCallbackConstructor.h +++ b/Source/JavaScriptCore/API/JSCallbackConstructor.h @@ -48,9 +48,9 @@ public: JSObjectCallAsConstructorCallback callback() const { return m_callback; } static const ClassInfo s_info; - static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); + return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); } protected: diff --git a/Source/JavaScriptCore/API/JSCallbackFunction.cpp b/Source/JavaScriptCore/API/JSCallbackFunction.cpp index aada87bfa..c29b9077c 100644 --- a/Source/JavaScriptCore/API/JSCallbackFunction.cpp +++ b/Source/JavaScriptCore/API/JSCallbackFunction.cpp @@ -29,11 +29,13 @@ #include "APIShims.h" #include "APICast.h" #include "CodeBlock.h" +#include "Error.h" #include "ExceptionHelpers.h" -#include "JSFunction.h" #include "FunctionPrototype.h" -#include -#include +#include "JSFunction.h" +#include "JSGlobalObject.h" +#include "JSLock.h" +#include "Operations.h" #include namespace JSC { @@ -42,28 +44,36 @@ ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSCallbackFunction); const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0, CREATE_METHOD_TABLE(JSCallbackFunction) }; -JSCallbackFunction::JSCallbackFunction(JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback) - : InternalFunction(globalObject, globalObject->callbackFunctionStructure()) +JSCallbackFunction::JSCallbackFunction(JSGlobalObject* globalObject, Structure* structure, JSObjectCallAsFunctionCallback callback) + : InternalFunction(globalObject, structure) , m_callback(callback) { } -void JSCallbackFunction::finishCreation(JSGlobalData& globalData, const String& name) +void JSCallbackFunction::finishCreation(VM& vm, const String& name) { - Base::finishCreation(globalData, name); + Base::finishCreation(vm, name); ASSERT(inherits(&s_info)); } +JSCallbackFunction* JSCallbackFunction::create(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const String& name) +{ + JSCallbackFunction* function = new (NotNull, allocateCell(*exec->heap())) JSCallbackFunction(globalObject, globalObject->callbackFunctionStructure(), callback); + function->finishCreation(exec->vm(), name); + return function; +} + EncodedJSValue JSCallbackFunction::call(ExecState* exec) { JSContextRef execRef = toRef(exec); JSObjectRef functionRef = toRef(exec->callee()); JSObjectRef thisObjRef = toRef(exec->hostThisValue().toThisObject(exec)); - int argumentCount = static_cast(exec->argumentCount()); - Vector arguments(argumentCount); - for (int i = 0; i < argumentCount; i++) - arguments[i] = toRef(exec, exec->argument(i)); + size_t argumentCount = exec->argumentCount(); + Vector arguments; + arguments.reserveInitialCapacity(argumentCount); + for (size_t i = 0; i < argumentCount; ++i) + arguments.uncheckedAppend(toRef(exec, exec->argument(i))); JSValueRef exception = 0; JSValueRef result; diff --git a/Source/JavaScriptCore/API/JSCallbackFunction.h b/Source/JavaScriptCore/API/JSCallbackFunction.h index 50630b550..885ef949d 100644 --- a/Source/JavaScriptCore/API/JSCallbackFunction.h +++ b/Source/JavaScriptCore/API/JSCallbackFunction.h @@ -33,31 +33,27 @@ namespace JSC { class JSCallbackFunction : public InternalFunction { protected: - JSCallbackFunction(JSGlobalObject*, JSObjectCallAsFunctionCallback); - void finishCreation(JSGlobalData&, const String& name); + JSCallbackFunction(JSGlobalObject*, Structure*, JSObjectCallAsFunctionCallback); + void finishCreation(VM&, const String& name); public: typedef InternalFunction Base; - static JSCallbackFunction* create(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const String& name) - { - JSCallbackFunction* function = new (NotNull, allocateCell(*exec->heap())) JSCallbackFunction(globalObject, callback); - function->finishCreation(exec->globalData(), name); - return function; - } + static JSCallbackFunction* create(ExecState*, JSGlobalObject*, JSObjectCallAsFunctionCallback, const String& name); static const ClassInfo s_info; // InternalFunction mish-mashes constructor and function behavior -- we should // refactor the code so this override isn't necessary - static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); + return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); } -private: +protected: static CallType getCallData(JSCell*, CallData&); +private: static EncodedJSValue JSC_HOST_CALL call(ExecState*); JSObjectCallAsFunctionCallback m_callback; diff --git a/Source/JavaScriptCore/API/JSCallbackObject.cpp b/Source/JavaScriptCore/API/JSCallbackObject.cpp index 76866feb0..7436e71f7 100644 --- a/Source/JavaScriptCore/API/JSCallbackObject.cpp +++ b/Source/JavaScriptCore/API/JSCallbackObject.cpp @@ -28,6 +28,7 @@ #include "JSCallbackObject.h" #include "Heap.h" +#include "Operations.h" #include namespace JSC { @@ -40,30 +41,24 @@ template<> const bool JSCallbackObject::needsDestruction = template<> const bool JSCallbackObject::needsDestruction = false; template<> -JSCallbackObject* JSCallbackObject::create(JSGlobalData& globalData, JSClassRef classRef, Structure* structure) +JSCallbackObject* JSCallbackObject::create(VM& vm, JSClassRef classRef, Structure* structure) { - JSCallbackObject* callbackObject = new (NotNull, allocateCell >(globalData.heap)) JSCallbackObject(globalData, classRef, structure); - callbackObject->finishCreation(globalData); - globalData.heap.addFinalizer(callbackObject, destroy); + JSCallbackObject* callbackObject = new (NotNull, allocateCell >(vm.heap)) JSCallbackObject(vm, classRef, structure); + callbackObject->finishCreation(vm); + vm.heap.addFinalizer(callbackObject, destroy); return callbackObject; } template <> -Structure* JSCallbackObject::createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) +Structure* JSCallbackObject::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); + return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info); } template <> -Structure* JSCallbackObject::createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) +Structure* JSCallbackObject::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(GlobalObjectType, StructureFlags), &s_info); -} - -template -void JSCallbackObject::destroy(JSCell* cell) -{ - static_cast(cell)->JSCallbackObject::~JSCallbackObject(); + return Structure::create(vm, globalObject, proto, TypeInfo(GlobalObjectType, StructureFlags), &s_info); } void JSCallbackObjectData::finalize(Handle handle, void* context) diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h index 3acf2ef10..16d8aa2c6 100644 --- a/Source/JavaScriptCore/API/JSCallbackObject.h +++ b/Source/JavaScriptCore/API/JSCallbackObject.h @@ -54,11 +54,11 @@ struct JSCallbackObjectData : WeakHandleOwner { return m_privateProperties->getPrivateProperty(propertyName); } - void setPrivateProperty(JSGlobalData& globalData, JSCell* owner, const Identifier& propertyName, JSValue value) + void setPrivateProperty(VM& vm, JSCell* owner, const Identifier& propertyName, JSValue value) { if (!m_privateProperties) m_privateProperties = adoptPtr(new JSPrivatePropertyMap); - m_privateProperties->setPrivateProperty(globalData, owner, propertyName, value); + m_privateProperties->setPrivateProperty(vm, owner, propertyName, value); } void deletePrivateProperty(const Identifier& propertyName) @@ -86,10 +86,10 @@ struct JSCallbackObjectData : WeakHandleOwner { return location->value.get(); } - void setPrivateProperty(JSGlobalData& globalData, JSCell* owner, const Identifier& propertyName, JSValue value) + void setPrivateProperty(VM& vm, JSCell* owner, const Identifier& propertyName, JSValue value) { WriteBarrier empty; - m_propertyMap.add(propertyName.impl(), empty).iterator->value.set(globalData, owner, value); + m_propertyMap.add(propertyName.impl(), empty).iterator->value.set(vm, owner, value); } void deletePrivateProperty(const Identifier& propertyName) @@ -118,10 +118,10 @@ template class JSCallbackObject : public Parent { protected: JSCallbackObject(ExecState*, Structure*, JSClassRef, void* data); - JSCallbackObject(JSGlobalData&, JSClassRef, Structure*); + JSCallbackObject(VM&, JSClassRef, Structure*); void finishCreation(ExecState*); - void finishCreation(JSGlobalData&); + void finishCreation(VM&); public: typedef Parent Base; @@ -133,10 +133,13 @@ public: callbackObject->finishCreation(exec); return callbackObject; } - static JSCallbackObject* create(JSGlobalData&, JSClassRef, Structure*); + static JSCallbackObject* create(VM&, JSClassRef, Structure*); static const bool needsDestruction; - static void destroy(JSCell*); + static void destroy(JSCell* cell) + { + static_cast(cell)->JSCallbackObject::~JSCallbackObject(); + } void setPrivate(void* data); void* getPrivate(); @@ -146,16 +149,16 @@ public: JSClassRef classRef() const { return m_callbackObjectData->jsClass; } bool inherits(JSClassRef) const; - static Structure* createStructure(JSGlobalData&, JSGlobalObject*, JSValue); + static Structure* createStructure(VM&, JSGlobalObject*, JSValue); JSValue getPrivateProperty(const Identifier& propertyName) const { return m_callbackObjectData->getPrivateProperty(propertyName); } - void setPrivateProperty(JSGlobalData& globalData, const Identifier& propertyName, JSValue value) + void setPrivateProperty(VM& vm, const Identifier& propertyName, JSValue value) { - m_callbackObjectData->setPrivateProperty(globalData, this, propertyName, value); + m_callbackObjectData->setPrivateProperty(vm, this, propertyName, value); } void deletePrivateProperty(const Identifier& propertyName) @@ -178,6 +181,7 @@ private: static bool getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&); static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); + static void putByIndex(JSCell*, ExecState*, unsigned, JSValue, bool shouldThrow); static bool deleteProperty(JSCell*, ExecState*, PropertyName); static bool deletePropertyByIndex(JSCell*, ExecState*, unsigned); diff --git a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h index 1a063e620..b92e3161e 100644 --- a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h +++ b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h @@ -51,7 +51,7 @@ inline JSCallbackObject* JSCallbackObject::asCallbackObject(JSVa template JSCallbackObject::JSCallbackObject(ExecState* exec, Structure* structure, JSClassRef jsClass, void* data) - : Parent(exec->globalData(), structure) + : Parent(exec->vm(), structure) , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass))) { } @@ -59,8 +59,8 @@ JSCallbackObject::JSCallbackObject(ExecState* exec, Structure* structure // Global object constructor. // FIXME: Move this into a separate JSGlobalCallbackObject class derived from this one. template -JSCallbackObject::JSCallbackObject(JSGlobalData& globalData, JSClassRef jsClass, Structure* structure) - : Parent(globalData, structure) +JSCallbackObject::JSCallbackObject(VM& vm, JSClassRef jsClass, Structure* structure) + : Parent(vm, structure) , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass))) { } @@ -68,18 +68,18 @@ JSCallbackObject::JSCallbackObject(JSGlobalData& globalData, JSClassRef template void JSCallbackObject::finishCreation(ExecState* exec) { - Base::finishCreation(exec->globalData()); + Base::finishCreation(exec->vm()); ASSERT(Parent::inherits(&s_info)); init(exec); } // This is just for Global object, so we can assume that Base::finishCreation is JSGlobalObject::finishCreation. template -void JSCallbackObject::finishCreation(JSGlobalData& globalData) +void JSCallbackObject::finishCreation(VM& vm) { ASSERT(Parent::inherits(&s_info)); ASSERT(Parent::isGlobalObject()); - Base::finishCreation(globalData); + Base::finishCreation(vm); init(jsCast(this)->globalExec()); } @@ -216,7 +216,7 @@ template bool JSCallbackObject::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor) { JSCallbackObject* thisObject = jsCast(object); - PropertySlot slot; + PropertySlot slot(thisObject); if (thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot)) { // Ideally we should return an access descriptor, but returning a value descriptor is better than nothing. JSValue value = slot.getValue(exec, propertyName); @@ -283,7 +283,7 @@ void JSCallbackObject::put(JSCell* cell, ExecState* exec, PropertyName p if (StaticFunctionEntry* entry = staticFunctions->get(name)) { if (entry->attributes & kJSPropertyAttributeReadOnly) return; - thisObject->JSCallbackObject::putDirect(exec->globalData(), propertyName, value); // put as override property + thisObject->JSCallbackObject::putDirect(exec->vm(), propertyName, value); // put as override property return; } } @@ -293,6 +293,65 @@ void JSCallbackObject::put(JSCell* cell, ExecState* exec, PropertyName p return Parent::put(thisObject, exec, propertyName, value, slot); } +template +void JSCallbackObject::putByIndex(JSCell* cell, ExecState* exec, unsigned propertyIndex, JSValue value, bool shouldThrow) +{ + JSCallbackObject* thisObject = jsCast(cell); + JSContextRef ctx = toRef(exec); + JSObjectRef thisRef = toRef(thisObject); + RefPtr propertyNameRef; + JSValueRef valueRef = toRef(exec, value); + Identifier propertyName = Identifier(exec, String::number(propertyIndex)); + + for (JSClassRef jsClass = thisObject->classRef(); jsClass; jsClass = jsClass->parentClass) { + if (JSObjectSetPropertyCallback setProperty = jsClass->setProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.impl()); + JSValueRef exception = 0; + bool result; + { + APICallbackShim callbackShim(exec); + result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + if (result || exception) + return; + } + + if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { + if (StaticValueEntry* entry = staticValues->get(propertyName.impl())) { + if (entry->attributes & kJSPropertyAttributeReadOnly) + return; + if (JSObjectSetPropertyCallback setProperty = entry->setProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.impl()); + JSValueRef exception = 0; + bool result; + { + APICallbackShim callbackShim(exec); + result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + if (result || exception) + return; + } + } + } + + if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { + if (StaticFunctionEntry* entry = staticFunctions->get(propertyName.impl())) { + if (entry->attributes & kJSPropertyAttributeReadOnly) + return; + break; + } + } + } + + return Parent::putByIndex(thisObject, exec, propertyIndex, value, shouldThrow); +} + template bool JSCallbackObject::deleteProperty(JSCell* cell, ExecState* exec, PropertyName propertyName) { @@ -368,10 +427,11 @@ EncodedJSValue JSCallbackObject::construct(ExecState* exec) for (JSClassRef jsClass = jsCast*>(constructor)->classRef(); jsClass; jsClass = jsClass->parentClass) { if (JSObjectCallAsConstructorCallback callAsConstructor = jsClass->callAsConstructor) { - int argumentCount = static_cast(exec->argumentCount()); - Vector arguments(argumentCount); - for (int i = 0; i < argumentCount; i++) - arguments[i] = toRef(exec, exec->argument(i)); + size_t argumentCount = exec->argumentCount(); + Vector arguments; + arguments.reserveInitialCapacity(argumentCount); + for (size_t i = 0; i < argumentCount; ++i) + arguments.uncheckedAppend(toRef(exec, exec->argument(i))); JSValueRef exception = 0; JSObject* result; { @@ -384,7 +444,7 @@ EncodedJSValue JSCallbackObject::construct(ExecState* exec) } } - ASSERT_NOT_REACHED(); // getConstructData should prevent us from reaching here + RELEASE_ASSERT_NOT_REACHED(); // getConstructData should prevent us from reaching here return JSValue::encode(JSValue()); } @@ -434,10 +494,11 @@ EncodedJSValue JSCallbackObject::call(ExecState* exec) for (JSClassRef jsClass = jsCast*>(toJS(functionRef))->classRef(); jsClass; jsClass = jsClass->parentClass) { if (JSObjectCallAsFunctionCallback callAsFunction = jsClass->callAsFunction) { - int argumentCount = static_cast(exec->argumentCount()); - Vector arguments(argumentCount); - for (int i = 0; i < argumentCount; i++) - arguments[i] = toRef(exec, exec->argument(i)); + size_t argumentCount = exec->argumentCount(); + Vector arguments; + arguments.reserveInitialCapacity(argumentCount); + for (size_t i = 0; i < argumentCount; ++i) + arguments.uncheckedAppend(toRef(exec, exec->argument(i))); JSValueRef exception = 0; JSValue result; { @@ -450,7 +511,7 @@ EncodedJSValue JSCallbackObject::call(ExecState* exec) } } - ASSERT_NOT_REACHED(); // getCallData should prevent us from reaching here + RELEASE_ASSERT_NOT_REACHED(); // getCallData should prevent us from reaching here return JSValue::encode(JSValue()); } @@ -508,10 +569,10 @@ void* JSCallbackObject::getPrivate() template bool JSCallbackObject::inherits(JSClassRef c) const { - for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { if (jsClass == c) return true; - + } return false; } @@ -566,7 +627,7 @@ JSValue JSCallbackObject::staticFunctionGetter(ExecState* exec, JSValue if (JSObjectCallAsFunctionCallback callAsFunction = entry->callAsFunction) { JSObject* o = JSCallbackFunction::create(exec, thisObj->globalObject(), callAsFunction, name); - thisObj->putDirect(exec->globalData(), propertyName, o, entry->attributes); + thisObj->putDirect(exec->vm(), propertyName, o, entry->attributes); return o; } } diff --git a/Source/JavaScriptCore/API/JSClassRef.cpp b/Source/JavaScriptCore/API/JSClassRef.cpp index f30b02a2a..c77f63cf9 100644 --- a/Source/JavaScriptCore/API/JSClassRef.cpp +++ b/Source/JavaScriptCore/API/JSClassRef.cpp @@ -27,12 +27,13 @@ #include "JSClassRef.h" #include "APICast.h" +#include "Identifier.h" +#include "InitializeThreading.h" #include "JSCallbackObject.h" +#include "JSGlobalObject.h" #include "JSObjectRef.h" -#include -#include -#include -#include +#include "ObjectPrototype.h" +#include "Operations.h" #include #include @@ -126,7 +127,7 @@ PassRefPtr OpaqueJSClass::create(const JSClassDefinition* clientD return adoptRef(new OpaqueJSClass(&definition, protoClass.get())); } -OpaqueJSClassContextData::OpaqueJSClassContextData(JSC::JSGlobalData&, OpaqueJSClass* jsClass) +OpaqueJSClassContextData::OpaqueJSClassContextData(JSC::VM&, OpaqueJSClass* jsClass) : m_class(jsClass) { if (jsClass->m_staticValues) { @@ -150,9 +151,9 @@ OpaqueJSClassContextData::OpaqueJSClassContextData(JSC::JSGlobalData&, OpaqueJSC OpaqueJSClassContextData& OpaqueJSClass::contextData(ExecState* exec) { - OwnPtr& contextData = exec->globalData().opaqueJSClassData.add(this, nullptr).iterator->value; + OwnPtr& contextData = exec->lexicalGlobalObject()->opaqueJSClassData().add(this, nullptr).iterator->value; if (!contextData) - contextData = adoptPtr(new OpaqueJSClassContextData(exec->globalData(), this)); + contextData = adoptPtr(new OpaqueJSClassContextData(exec->vm(), this)); return *contextData; } @@ -202,7 +203,7 @@ JSObject* OpaqueJSClass::prototype(ExecState* exec) JSObject* prototype = JSCallbackObject::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), prototypeClass, &jsClassData); // set jsClassData as the object's private data, so it can clear our reference on destruction if (parentClass) { if (JSObject* parentPrototype = parentClass->prototype(exec)) - prototype->setPrototype(exec->globalData(), parentPrototype); + prototype->setPrototype(exec->vm(), parentPrototype); } jsClassData.cachedPrototype = PassWeak(prototype); diff --git a/Source/JavaScriptCore/API/JSClassRef.h b/Source/JavaScriptCore/API/JSClassRef.h index 44d5d11b9..7bf18e758 100644 --- a/Source/JavaScriptCore/API/JSClassRef.h +++ b/Source/JavaScriptCore/API/JSClassRef.h @@ -26,10 +26,9 @@ #ifndef JSClassRef_h #define JSClassRef_h -#include "JSObjectRef.h" +#include #include "Weak.h" -#include "JSObject.h" #include "Protect.h" #include #include @@ -69,14 +68,14 @@ struct OpaqueJSClass; struct OpaqueJSClassContextData { WTF_MAKE_NONCOPYABLE(OpaqueJSClassContextData); WTF_MAKE_FAST_ALLOCATED; public: - OpaqueJSClassContextData(JSC::JSGlobalData&, OpaqueJSClass*); + OpaqueJSClassContextData(JSC::VM&, OpaqueJSClass*); // It is necessary to keep OpaqueJSClass alive because of the following rare scenario: - // 1. A class is created and used, so its context data is stored in JSGlobalData hash map. + // 1. A class is created and used, so its context data is stored in VM hash map. // 2. The class is released, and when all JS objects that use it are collected, OpaqueJSClass // is deleted (that's the part prevented by this RefPtr). // 3. Another class is created at the same address. - // 4. When it is used, the old context data is found in JSGlobalData and used. + // 4. When it is used, the old context data is found in VM and used. RefPtr m_class; OwnPtr staticValues; @@ -87,7 +86,7 @@ public: struct OpaqueJSClass : public ThreadSafeRefCounted { static PassRefPtr create(const JSClassDefinition*); static PassRefPtr createNoAutomaticPrototype(const JSClassDefinition*); - ~OpaqueJSClass(); + JS_EXPORT_PRIVATE ~OpaqueJSClass(); String className(); OpaqueJSClassStaticValuesTable* staticValues(JSC::ExecState*); diff --git a/Source/JavaScriptCore/API/JSContext.h b/Source/JavaScriptCore/API/JSContext.h new file mode 100644 index 000000000..ef3e51f17 --- /dev/null +++ b/Source/JavaScriptCore/API/JSContext.h @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSContext_h +#define JSContext_h + +#include + +#if JSC_OBJC_API_ENABLED + +@class JSVirtualMachine, JSValue; + +// An instance of JSContext represents a JavaScript execution environment. All +// JavaScript execution takes place within a context. +// JSContext is also used to manage the life-cycle of objects within the +// JavaScript virtual machine. Every instance of JSValue is associated with a +// JSContext via a strong reference. The JSValue will keep the JSContext it +// references alive so long as the JSValue remains alive. When all of the JSValues +// that reference a particular JSContext have been deallocated the JSContext +// will be deallocated unless it has been previously retained. + +NS_CLASS_AVAILABLE(10_9, NA) +@interface JSContext : NSObject + +// Create a JSContext. +- (id)init; +// Create a JSContext in the specified virtual machine. +- (id)initWithVirtualMachine:(JSVirtualMachine *)virtualMachine; + +// Evaluate a string of JavaScript code. +- (JSValue *)evaluateScript:(NSString *)script; + +// This method retrieves the global object of the JavaScript execution context. +// Instances of JSContext originating from WebKit will return a reference to the +// WindowProxy object. +- (JSValue *)globalObject; + +// This method may be called from within an Objective-C block or method invoked +// as a callback from JavaScript to retrieve the callback's context. Outside of +// a callback from JavaScript this method will return nil. ++ (JSContext *)currentContext; +// This method may be called from within an Objective-C block or method invoked +// as a callback from JavaScript to retrieve the callback's this value. Outside +// of a callback from JavaScript this method will return nil. ++ (JSValue *)currentThis; +// This method may be called from within an Objective-C block or method invoked +// as a callback from JavaScript to retrieve the callback's arguments, objects +// in the returned array are instances of JSValue. Outside of a callback from +// JavaScript this method will return nil. ++ (NSArray *)currentArguments; + +// The "exception" property may be used to throw an exception to JavaScript. +// Before a callback is made from JavaScript to an Objective-C block or method, +// the prior value of the exception property will be preserved and the property +// will be set to nil. After the callback has completed the new value of the +// exception property will be read, and prior value restored. If the new value +// of exception is not nil, the callback will result in that value being thrown. +// This property may also be used to check for uncaught exceptions arising from +// API function calls (since the default behaviour of "exceptionHandler" is to +// assign an uncaught exception to this property). +// If a JSValue originating from a different JSVirtualMachine than this context +// is assigned to this property, an Objective-C exception will be raised. +@property(retain) JSValue *exception; + +// If a call to an API function results in an uncaught JavaScript exception, the +// "exceptionHandler" block will be invoked. The default implementation for the +// exception handler will store the exception to the exception property on +// context. As a consequence the default behaviour is for unhandled exceptions +// occurring within a callback from JavaScript to be rethrown upon return. +// Setting this value to nil will result in all uncaught exceptions thrown from +// the API being silently consumed. +@property(copy) void(^exceptionHandler)(JSContext *context, JSValue *exception); + +// All instances of JSContext are associated with a single JSVirtualMachine. The +// virtual machine provides an "object space" or set of execution resources. +@property(readonly, retain) JSVirtualMachine *virtualMachine; + +@end + +// Instances of JSContext implement the following methods in order to enable +// support for subscript access by key and index, for example: +// +// JSContext *context; +// JSValue *v = context[@"X"]; // Get value for "X" from the global object. +// context[@"Y"] = v; // Assign 'v' to "Y" on the global object. +// +// An object key passed as a subscript will be converted to a JavaScript value, +// and then the value converted to a string used to resolve a property of the +// global object. +@interface JSContext(SubscriptSupport) + +- (JSValue *)objectForKeyedSubscript:(id)key; +- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key; + +@end + +// These functions are for bridging between the C API and the Objective-C API. +@interface JSContext(JSContextRefSupport) +// Creates a JSContext, wrapping its C API counterpart. ++ (JSContext *)contextWithJSGlobalContextRef:(JSGlobalContextRef)jsGlobalContextRef; +// Returns the C API counterpart wrapped by a JSContext. +- (JSGlobalContextRef)JSGlobalContextRef; +@end + +#endif + +#endif // JSContext_h diff --git a/Source/JavaScriptCore/API/JSContext.mm b/Source/JavaScriptCore/API/JSContext.mm new file mode 100644 index 000000000..58754b38c --- /dev/null +++ b/Source/JavaScriptCore/API/JSContext.mm @@ -0,0 +1,289 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#import "APICast.h" +#import "APIShims.h" +#import "JSContextInternal.h" +#import "JSGlobalObject.h" +#import "JSValueInternal.h" +#import "JSVirtualMachineInternal.h" +#import "JSWrapperMap.h" +#import "JavaScriptCore.h" +#import "ObjcRuntimeExtras.h" +#import "Operations.h" +#import "StrongInlines.h" +#import + +#if JSC_OBJC_API_ENABLED + +@implementation JSContext { + JSVirtualMachine *m_virtualMachine; + JSGlobalContextRef m_context; + JSWrapperMap *m_wrapperMap; + JSC::Strong m_exception; +} + +@synthesize exceptionHandler; + +- (JSGlobalContextRef)JSGlobalContextRef +{ + return m_context; +} + +- (id)init +{ + return [self initWithVirtualMachine:[[[JSVirtualMachine alloc] init] autorelease]]; +} + +- (id)initWithVirtualMachine:(JSVirtualMachine *)virtualMachine +{ + self = [super init]; + if (!self) + return nil; + + m_virtualMachine = [virtualMachine retain]; + m_context = JSGlobalContextCreateInGroup(getGroupFromVirtualMachine(virtualMachine), 0); + m_wrapperMap = [[JSWrapperMap alloc] initWithContext:self]; + + self.exceptionHandler = ^(JSContext *context, JSValue *exceptionValue) { + context.exception = exceptionValue; + }; + + [m_virtualMachine addContext:self forGlobalContextRef:m_context]; + + return self; +} + +- (void)dealloc +{ + [m_wrapperMap release]; + JSGlobalContextRelease(m_context); + [m_virtualMachine release]; + [self.exceptionHandler release]; + [super dealloc]; +} + +- (JSValue *)evaluateScript:(NSString *)script +{ + JSValueRef exceptionValue = 0; + JSStringRef scriptJS = JSStringCreateWithCFString((CFStringRef)script); + JSValueRef result = JSEvaluateScript(m_context, scriptJS, 0, 0, 0, &exceptionValue); + JSStringRelease(scriptJS); + + if (exceptionValue) + return [self valueFromNotifyException:exceptionValue]; + + return [JSValue valueWithJSValueRef:result inContext:self]; +} + +- (void)setException:(JSValue *)value +{ + if (value) + m_exception.set(toJS(m_context)->vm(), toJS(JSValueToObject(m_context, valueInternalValue(value), 0))); + else + m_exception.clear(); +} + +- (JSValue *)exception +{ + if (!m_exception) + return nil; + return [JSValue valueWithJSValueRef:toRef(m_exception.get()) inContext:self]; +} + +- (JSWrapperMap *)wrapperMap +{ + return m_wrapperMap; +} + +- (JSValue *)globalObject +{ + return [JSValue valueWithJSValueRef:JSContextGetGlobalObject(m_context) inContext:self]; +} + ++ (JSContext *)currentContext +{ + WTFThreadData& threadData = wtfThreadData(); + CallbackData *entry = (CallbackData *)threadData.m_apiData; + return entry ? entry->context : nil; +} + ++ (JSValue *)currentThis +{ + WTFThreadData& threadData = wtfThreadData(); + CallbackData *entry = (CallbackData *)threadData.m_apiData; + + if (!entry->currentThis) + entry->currentThis = [[JSValue alloc] initWithValue:entry->thisValue inContext:[JSContext currentContext]]; + + return entry->currentThis; +} + ++ (NSArray *)currentArguments +{ + WTFThreadData& threadData = wtfThreadData(); + CallbackData *entry = (CallbackData *)threadData.m_apiData; + + if (!entry->currentArguments) { + JSContext *context = [JSContext currentContext]; + size_t count = entry->argumentCount; + JSValue * argumentArray[count]; + for (size_t i =0; i < count; ++i) + argumentArray[i] = [JSValue valueWithJSValueRef:entry->arguments[i] inContext:context]; + entry->currentArguments = [[NSArray alloc] initWithObjects:argumentArray count:count]; + } + + return entry->currentArguments; +} + +- (JSVirtualMachine *)virtualMachine +{ + return m_virtualMachine; +} + +@end + +@implementation JSContext(SubscriptSupport) + +- (JSValue *)objectForKeyedSubscript:(id)key +{ + return [self globalObject][key]; +} + +- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key +{ + [self globalObject][key] = object; +} + +@end + +@implementation JSContext(Internal) + +- (id)initWithGlobalContextRef:(JSGlobalContextRef)context +{ + self = [super init]; + if (!self) + return nil; + + JSC::JSGlobalObject* globalObject = toJS(context)->lexicalGlobalObject(); + m_virtualMachine = [[JSVirtualMachine virtualMachineWithContextGroupRef:toRef(&globalObject->vm())] retain]; + ASSERT(m_virtualMachine); + m_context = JSGlobalContextRetain(context); + m_wrapperMap = [[JSWrapperMap alloc] initWithContext:self]; + + self.exceptionHandler = ^(JSContext *context, JSValue *exceptionValue) { + context.exception = exceptionValue; + }; + + [m_virtualMachine addContext:self forGlobalContextRef:m_context]; + + return self; +} + +- (void)notifyException:(JSValueRef)exceptionValue +{ + self.exceptionHandler(self, [JSValue valueWithJSValueRef:exceptionValue inContext:self]); +} + +- (JSValue *)valueFromNotifyException:(JSValueRef)exceptionValue +{ + [self notifyException:exceptionValue]; + return [JSValue valueWithUndefinedInContext:self]; +} + +- (BOOL)boolFromNotifyException:(JSValueRef)exceptionValue +{ + [self notifyException:exceptionValue]; + return NO; +} + +- (void)beginCallbackWithData:(CallbackData *)callbackData thisValue:(JSValueRef)thisValue argumentCount:(size_t)argumentCount arguments:(const JSValueRef *)arguments +{ + WTFThreadData& threadData = wtfThreadData(); + [self retain]; + CallbackData *prevStack = (CallbackData *)threadData.m_apiData; + *callbackData = (CallbackData){ prevStack, self, [self.exception retain], thisValue, nil, argumentCount, arguments, nil }; + threadData.m_apiData = callbackData; + self.exception = nil; +} + +- (void)endCallbackWithData:(CallbackData *)callbackData +{ + WTFThreadData& threadData = wtfThreadData(); + self.exception = callbackData->preservedException; + [callbackData->preservedException release]; + [callbackData->currentThis release]; + [callbackData->currentArguments release]; + threadData.m_apiData = callbackData->next; + [self release]; +} + +- (JSValue *)wrapperForObjCObject:(id)object +{ + // Lock access to m_wrapperMap + JSC::JSLockHolder lock(toJS(m_context)); + return [m_wrapperMap jsWrapperForObject:object]; +} + +- (JSValue *)wrapperForJSObject:(JSValueRef)value +{ + JSC::JSLockHolder lock(toJS(m_context)); + return [m_wrapperMap objcWrapperForJSValueRef:value]; +} + ++ (JSContext *)contextWithJSGlobalContextRef:(JSGlobalContextRef)globalContext +{ + JSVirtualMachine *virtualMachine = [JSVirtualMachine virtualMachineWithContextGroupRef:toRef(&toJS(globalContext)->vm())]; + JSContext *context = [virtualMachine contextForGlobalContextRef:globalContext]; + if (!context) + context = [[[JSContext alloc] initWithGlobalContextRef:globalContext] autorelease]; + return context; +} + +@end + +WeakContextRef::WeakContextRef(JSContext *context) +{ + objc_initWeak(&m_weakContext, context); +} + +WeakContextRef::~WeakContextRef() +{ + objc_destroyWeak(&m_weakContext); +} + +JSContext * WeakContextRef::get() +{ + return objc_loadWeak(&m_weakContext); +} + +void WeakContextRef::set(JSContext *context) +{ + objc_storeWeak(&m_weakContext, context); +} + +#endif diff --git a/Source/JavaScriptCore/API/JSContextInternal.h b/Source/JavaScriptCore/API/JSContextInternal.h new file mode 100644 index 000000000..d08e97d93 --- /dev/null +++ b/Source/JavaScriptCore/API/JSContextInternal.h @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSContextInternal_h +#define JSContextInternal_h + +#import + +#if JSC_OBJC_API_ENABLED + +#import + +struct CallbackData { + CallbackData *next; + JSContext *context; + JSValue *preservedException; + JSValueRef thisValue; + JSValue *currentThis; + size_t argumentCount; + const JSValueRef *arguments; + NSArray *currentArguments; +}; + +class WeakContextRef { +public: + WeakContextRef(JSContext * = nil); + ~WeakContextRef(); + + JSContext * get(); + void set(JSContext *); + +private: + JSContext *m_weakContext; +}; + +@class JSWrapperMap; + +@interface JSContext(Internal) + +- (id)initWithGlobalContextRef:(JSGlobalContextRef)context; + +- (void)notifyException:(JSValueRef)exception; +- (JSValue *)valueFromNotifyException:(JSValueRef)exception; +- (BOOL)boolFromNotifyException:(JSValueRef)exception; + +- (void)beginCallbackWithData:(CallbackData *)callbackData thisValue:(JSValueRef)thisValue argumentCount:(size_t)argumentCount arguments:(const JSValueRef *)arguments; +- (void)endCallbackWithData:(CallbackData *)callbackData; + +- (JSValue *)wrapperForObjCObject:(id)object; +- (JSValue *)wrapperForJSObject:(JSValueRef)value; + +@property (readonly, retain) JSWrapperMap *wrapperMap; + +@end + +#endif + +#endif // JSContextInternal_h diff --git a/Source/JavaScriptCore/API/JSContextRef.cpp b/Source/JavaScriptCore/API/JSContextRef.cpp index 162c825aa..3869e87bf 100644 --- a/Source/JavaScriptCore/API/JSContextRef.cpp +++ b/Source/JavaScriptCore/API/JSContextRef.cpp @@ -35,6 +35,8 @@ #include "JSClassRef.h" #include "JSGlobalObject.h" #include "JSObject.h" +#include "Operations.h" +#include "SourceProvider.h" #include #include @@ -54,7 +56,7 @@ using namespace JSC; JSContextGroupRef JSContextGroupCreate() { initializeThreading(); - return toRef(JSGlobalData::createContextGroup().leakRef()); + return toRef(VM::createContextGroup().leakRef()); } JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) @@ -65,7 +67,44 @@ JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) void JSContextGroupRelease(JSContextGroupRef group) { - toJS(group)->deref(); + IdentifierTable* savedIdentifierTable; + VM& vm = *toJS(group); + + { + JSLockHolder lock(vm); + savedIdentifierTable = wtfThreadData().setCurrentIdentifierTable(vm.identifierTable); + vm.deref(); + } + + wtfThreadData().setCurrentIdentifierTable(savedIdentifierTable); +} + +static bool internalScriptTimeoutCallback(ExecState* exec, void* callbackPtr, void* callbackData) +{ + JSShouldTerminateCallback callback = reinterpret_cast(callbackPtr); + JSContextRef contextRef = toRef(exec); + ASSERT(callback); + return callback(contextRef, callbackData); +} + +void JSContextGroupSetExecutionTimeLimit(JSContextGroupRef group, double limit, JSShouldTerminateCallback callback, void* callbackData) +{ + VM& vm = *toJS(group); + APIEntryShim entryShim(&vm); + Watchdog& watchdog = vm.watchdog; + if (callback) { + void* callbackPtr = reinterpret_cast(callback); + watchdog.setTimeLimit(vm, limit, internalScriptTimeoutCallback, callbackPtr, callbackData); + } else + watchdog.setTimeLimit(vm, limit); +} + +void JSContextGroupClearExecutionTimeLimit(JSContextGroupRef group) +{ + VM& vm = *toJS(group); + APIEntryShim entryShim(&vm); + Watchdog& watchdog = vm.watchdog; + watchdog.setTimeLimit(vm, std::numeric_limits::infinity()); } // From the API's perspective, a global context remains alive iff it has been JSGlobalContextRetained. @@ -75,10 +114,10 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) initializeThreading(); #if OS(DARWIN) - // If the application was linked before JSGlobalContextCreate was changed to use a unique JSGlobalData, + // If the application was linked before JSGlobalContextCreate was changed to use a unique VM, // we use a shared one for backwards compatibility. if (NSVersionOfLinkTimeLibrary("JavaScriptCore") <= webkitFirstVersionWithConcurrentGlobalContexts) { - return JSGlobalContextCreateInGroup(toRef(&JSGlobalData::sharedInstance()), globalObjectClass); + return JSGlobalContextCreateInGroup(toRef(&VM::sharedInstance()), globalObjectClass); } #endif // OS(DARWIN) @@ -89,22 +128,22 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass { initializeThreading(); - RefPtr globalData = group ? PassRefPtr(toJS(group)) : JSGlobalData::createContextGroup(); + RefPtr vm = group ? PassRefPtr(toJS(group)) : VM::createContextGroup(); - APIEntryShim entryShim(globalData.get(), false); - globalData->makeUsableFromMultipleThreads(); + APIEntryShim entryShim(vm.get(), false); + vm->makeUsableFromMultipleThreads(); if (!globalObjectClass) { - JSGlobalObject* globalObject = JSGlobalObject::create(*globalData, JSGlobalObject::createStructure(*globalData, jsNull())); + JSGlobalObject* globalObject = JSGlobalObject::create(*vm, JSGlobalObject::createStructure(*vm, jsNull())); return JSGlobalContextRetain(toGlobalRef(globalObject->globalExec())); } - JSGlobalObject* globalObject = JSCallbackObject::create(*globalData, globalObjectClass, JSCallbackObject::createStructure(*globalData, 0, jsNull())); + JSGlobalObject* globalObject = JSCallbackObject::create(*vm, globalObjectClass, JSCallbackObject::createStructure(*vm, 0, jsNull())); ExecState* exec = globalObject->globalExec(); JSValue prototype = globalObjectClass->prototype(exec); if (!prototype) prototype = jsNull(); - globalObject->resetPrototype(*globalData, prototype); + globalObject->resetPrototype(*vm, prototype); return JSGlobalContextRetain(toGlobalRef(exec)); } @@ -113,9 +152,9 @@ JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx) ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); - JSGlobalData& globalData = exec->globalData(); + VM& vm = exec->vm(); gcProtect(exec->dynamicGlobalObject()); - globalData.ref(); + vm.ref(); return ctx; } @@ -126,13 +165,13 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx) { JSLockHolder lock(exec); - JSGlobalData& globalData = exec->globalData(); - savedIdentifierTable = wtfThreadData().setCurrentIdentifierTable(globalData.identifierTable); + VM& vm = exec->vm(); + savedIdentifierTable = wtfThreadData().setCurrentIdentifierTable(vm.identifierTable); bool protectCountIsZero = Heap::heap(exec->dynamicGlobalObject())->unprotect(exec->dynamicGlobalObject()); if (protectCountIsZero) - globalData.heap.reportAbandonedObjectGraph(); - globalData.deref(); + vm.heap.reportAbandonedObjectGraph(); + vm.deref(); } wtfThreadData().setCurrentIdentifierTable(savedIdentifierTable); @@ -140,6 +179,10 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx) JSObjectRef JSContextGetGlobalObject(JSContextRef ctx) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -149,12 +192,20 @@ JSObjectRef JSContextGetGlobalObject(JSContextRef ctx) JSContextGroupRef JSContextGetGroup(JSContextRef ctx) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); - return toRef(&exec->globalData()); + return toRef(&exec->vm()); } JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -163,53 +214,46 @@ JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); JSLockHolder lock(exec); - - unsigned count = 0; StringBuilder builder; - CallFrame* callFrame = exec; - String functionName; - if (exec->callee()) { - if (asObject(exec->callee())->inherits(&InternalFunction::s_info)) { - functionName = asInternalFunction(exec->callee())->name(exec); - builder.appendLiteral("#0 "); - builder.append(functionName); - builder.appendLiteral("() "); - count++; - } - } - while (true) { - ASSERT(callFrame); - int signedLineNumber; - intptr_t sourceID; - String urlString; - JSValue function; + Vector stackTrace; + Interpreter::getStackTrace(&exec->vm(), stackTrace, maxStackSize); - exec->interpreter()->retrieveLastCaller(callFrame, signedLineNumber, sourceID, urlString, function); - - if (function) - functionName = jsCast(function)->name(exec); + for (size_t i = 0; i < stackTrace.size(); i++) { + String urlString; + String functionName; + StackFrame& frame = stackTrace[i]; + JSValue function = frame.callee.get(); + if (frame.callee) + functionName = frame.friendlyFunctionName(exec); else { // Caller is unknown, but if frame is empty we should still add the frame, because // something called us, and gave us arguments. - if (count) + if (i) break; } - unsigned lineNumber = signedLineNumber >= 0 ? signedLineNumber : 0; + unsigned lineNumber; + unsigned column; + frame.computeLineAndColumn(lineNumber, column); if (!builder.isEmpty()) builder.append('\n'); builder.append('#'); - builder.appendNumber(count); + builder.appendNumber(i); builder.append(' '); builder.append(functionName); builder.appendLiteral("() at "); builder.append(urlString); - builder.append(':'); - builder.appendNumber(lineNumber); - if (!function || ++count == maxStackSize) + if (frame.codeType != StackFrameNativeCode) { + builder.append(':'); + builder.appendNumber(lineNumber); + } + if (!function) break; - callFrame = callFrame->callerFrame(); } return OpaqueJSString::create(builder.toString()).leakRef(); } diff --git a/Source/JavaScriptCore/API/JSContextRefPrivate.h b/Source/JavaScriptCore/API/JSContextRefPrivate.h index 4f77aeada..8d7684ac0 100644 --- a/Source/JavaScriptCore/API/JSContextRefPrivate.h +++ b/Source/JavaScriptCore/API/JSContextRefPrivate.h @@ -55,6 +55,54 @@ JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx); */ JS_EXPORT JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! +@typedef JSShouldTerminateCallback +@abstract The callback invoked when script execution has exceeded the allowed + time limit previously specified via JSContextGroupSetExecutionTimeLimit. +@param ctx The execution context to use. +@param context User specified context data previously passed to + JSContextGroupSetExecutionTimeLimit. +@discussion If you named your function Callback, you would declare it like this: + + bool Callback(JSContextRef ctx, void* context); + + If you return true, the timed out script will terminate. + If you return false, the script will run for another period of the allowed + time limit specified via JSContextGroupSetExecutionTimeLimit. + + Within this callback function, you may call JSContextGroupSetExecutionTimeLimit + to set a new time limit, or JSContextGroupClearExecutionTimeLimit to cancel the + timeout. +*/ +typedef bool +(*JSShouldTerminateCallback) (JSContextRef ctx, void* context); + +/*! +@function +@abstract Sets the script execution time limit. +@param group The JavaScript context group that this time limit applies to. +@param limit The time limit of allowed script execution time in seconds. +@param callback The callback function that will be invoked when the time limit + has been reached. This will give you a chance to decide if you want to + terminate the script or not. If you pass a NULL callback, the script will be + terminated unconditionally when the time limit has been reached. +@param context User data that you can provide to be passed back to you + in your callback. + + In order to guarantee that the execution time limit will take effect, you will + need to call JSContextGroupSetExecutionTimeLimit before you start executing + any scripts. +*/ +JS_EXPORT void JSContextGroupSetExecutionTimeLimit(JSContextGroupRef, double limit, JSShouldTerminateCallback, void* context) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! +@function +@abstract Clears the script execution time limit. +@param group The JavaScript context group that the time limit is cleared on. +*/ +JS_EXPORT void JSContextGroupClearExecutionTimeLimit(JSContextGroupRef) AVAILABLE_IN_WEBKIT_VERSION_4_0; + #ifdef __cplusplus } #endif diff --git a/Source/JavaScriptCore/API/JSExport.h b/Source/JavaScriptCore/API/JSExport.h new file mode 100644 index 000000000..96e9fec35 --- /dev/null +++ b/Source/JavaScriptCore/API/JSExport.h @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + +#if JSC_OBJC_API_ENABLED + +// When a JavaScript value is created from an instance of an Objective-C class +// for which no copying conversion is specified a JavaScript wrapper object will +// be created. +// +// In JavaScript inheritance is supported via a chain of prototype objects, and +// for each Objective-C class (and per JSContext) an object appropriate for use +// as a prototype will be provided. For the class NSObject the prototype object +// will be the JavaScript context's Object Prototype. For all other Objective-C +// classes a Prototype object will be created. The Prototype object for a given +// Objective-C class will have its internal [Prototype] property set to point to +// the Prototype object of the Objective-C class's superclass. As such the +// prototype chain for a JavaScript wrapper object will reflect the wrapped +// Objective-C type's inheritance hierarchy. +// +// In addition to the Prototype object a JavaScript Constructor object will also +// be produced for each Objective-C class. The Constructor object has a property +// named 'prototype' that references the Prototype object, and the Prototype +// object has a property named 'constructor' that references the Constructor. +// The Constructor object is not callable. +// +// By default no methods or properties of the Objective-C class will be exposed +// to JavaScript, however methods and properties may explicitly be exported. +// For each protocol that a class conforms to, if the protocol incorporates the +// protocol JSExport, then the protocol will be interpreted as a list of methods +// and properties to be exported to JavaScript. +// +// For each instance method being exported, a corresponding JavaScript function +// will be assigned as a property of the Prototype object, for each Objective-C +// property being exported a JavaScript accessor property will be created on the +// Prototype, and for each class method exported a JavaScript function will be +// created on the Constructor object. For example: +// +// @protocol MyClassJavaScriptMethods +// - (void)foo; +// @end +// +// @interface MyClass : NSObject +// - (void)foo; +// - (void)bar; +// @end +// +// Data properties that are created on the prototype or constructor objects have +// the attributes: writable:true, enumerable:false, configurable:true. Accessor +// properties have the attributes: enumerable:false and configurable:true. +// +// If an instance of MyClass is converted to a JavaScript value, the resulting +// wrapper object will (via its prototype) export the method "foo" to JavaScript, +// since the class conforms to the MyClassJavaScriptMethods protocol, and this +// protocol incorporates JSExport. "bar" will not be exported. +// +// Properties, arguments, and return values of the following types are +// supported: +// +// Primitive numbers: signed values of up to 32-bits are converted in a manner +// consistent with valueWithInt32/toInt32, unsigned values of up to 32-bits +// are converted in a manner consistent with valueWithUInt32/toUInt32, all +// other numeric values are converted consistently with valueWithDouble/ +// toDouble. +// BOOL: values are converted consistently with valueWithBool/toBool. +// id: values are converted consistently with valueWithObject/toObject. +// : - where the type is a pointer to a specified Objective-C +// class, conversion is consistent with valueWithObjectOfClass/toObject. +// struct types: C struct types are supported, where JSValue provides support +// for the given type. Support is built in for CGPoint, NSRange, CGRect, and +// CGSize. +// block types: In addition to support provided by valueWithObject/toObject for +// block types, if a JavaScript Function is passed as an argument, where the +// type required is a block with a void return value (and where the block's +// arguments are all of supported types), then a special adaptor block +// will be created, allowing the JavaScript function to be used in the place +// of a block. +// +// For any interface that conforms to JSExport the normal copying conversion for +// built in types will be inhibited - so, for example, if an instance that +// derives from NSString but conforms to JSExport is passed to valueWithObject: +// then a wrapper object for the Objective-C object will be returned rather than +// a JavaScript string primitive. +@protocol JSExport +@end + +// When a selector that takes one or more arguments is converted to a JavaScript +// property name, by default a property name will be generated by performing the +// following conversion: +// - All colons are removed from the selector +// - Any lowercase letter that had followed a colon will be capitalized. +// Under the default conversion a selector "doFoo:withBar:" will be exported as +// "doFooWithBar". The default conversion may be overriden using the JSExportAs +// macro, for example to export a method "doFoo:withBar:" as "doFoo": +// +// @protocol MyClassJavaScriptMethods +// JSExportAs(doFoo, +// - (void)doFoo:(id)foo withBar:(id)bar +// ); +// @end +// +// Note that the JSExport macro may only be applied to a selector that takes one +// or more argument. +#define JSExportAs(PropertyName, Selector) \ + @optional Selector __JS_EXPORT_AS__##PropertyName:(id)argument; @required Selector + +#endif diff --git a/Source/JavaScriptCore/API/JSManagedValue.h b/Source/JavaScriptCore/API/JSManagedValue.h new file mode 100644 index 000000000..5ff3f83cb --- /dev/null +++ b/Source/JavaScriptCore/API/JSManagedValue.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSManagedValue_h +#define JSManagedValue_h + +#import + +#if JSC_OBJC_API_ENABLED + +@class JSValue; +@class JSContext; + +// JSManagedValue represents a "conditionally retained" JSValue. +// "Conditionally retained" means that as long as either the JSManagedValue +// JavaScript value is reachable through the JavaScript object graph +// or the JSManagedValue object is reachable through the external Objective-C +// object graph as reported to the JSVirtualMachine using +// addManagedReference:withOwner:, the corresponding JavaScript value will +// be retained. However, if neither of these conditions are true, the +// corresponding JSValue will be released and set to nil. +// +// The primary use case for JSManagedValue is for safely referencing JSValues +// from the Objective-C heap. It is incorrect to store a JSValue into an +// Objective-C heap object, as this can very easily create a reference cycle, +// keeping the entire JSContext alive. +NS_CLASS_AVAILABLE(10_9, NA) +@interface JSManagedValue : NSObject + +// Convenience method for creating JSManagedValues from JSValues. ++ (JSManagedValue *)managedValueWithValue:(JSValue *)value; + +// Create a JSManagedValue. +- (id)initWithValue:(JSValue *)value; + +// Get the JSValue to which this JSManagedValue refers. If the JavaScript value has been collected, +// this method returns nil. +- (JSValue *)value; + +@end + +#endif // JSC_OBJC_API_ENABLED + +#endif // JSManagedValue_h diff --git a/Source/JavaScriptCore/API/JSManagedValue.mm b/Source/JavaScriptCore/API/JSManagedValue.mm new file mode 100644 index 000000000..f336ba662 --- /dev/null +++ b/Source/JavaScriptCore/API/JSManagedValue.mm @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + + +#import "config.h" +#import "JSManagedValue.h" + +#if JSC_OBJC_API_ENABLED + +#import "APICast.h" +#import "Heap.h" +#import "JSCJSValueInlines.h" +#import "JSContextInternal.h" +#import "JSValueInternal.h" +#import "Weak.h" +#import "WeakHandleOwner.h" +#import "ObjcRuntimeExtras.h" + +class JSManagedValueHandleOwner : public JSC::WeakHandleOwner { +public: + virtual void finalize(JSC::Handle, void* context); + virtual bool isReachableFromOpaqueRoots(JSC::Handle, void* context, JSC::SlotVisitor&); +}; + +static JSManagedValueHandleOwner* managedValueHandleOwner() +{ + DEFINE_STATIC_LOCAL(JSManagedValueHandleOwner, jsManagedValueHandleOwner, ()); + return &jsManagedValueHandleOwner; +} + +@implementation JSManagedValue { + JSC::Weak m_value; +} + ++ (JSManagedValue *)managedValueWithValue:(JSValue *)value +{ + return [[[self alloc] initWithValue:value] autorelease]; +} + +- (id)init +{ + return [self initWithValue:nil]; +} + +- (id)initWithValue:(JSValue *)value +{ + self = [super init]; + if (!self) + return nil; + + if (!value || !JSValueIsObject([value.context JSGlobalContextRef], [value JSValueRef])) { + JSC::Weak weak; + m_value.swap(weak); + } else { + JSC::JSObject* object = toJS(const_cast([value JSValueRef])); + JSC::Weak weak(object, managedValueHandleOwner(), self); + m_value.swap(weak); + } + + return self; +} + +- (JSValue *)value +{ + if (!m_value) + return nil; + JSC::JSObject* object = m_value.get(); + JSContext *context = [JSContext contextWithJSGlobalContextRef:toGlobalRef(object->structure()->globalObject()->globalExec())]; + return [JSValue valueWithJSValueRef:toRef(object) inContext:context]; +} + +- (void)disconnectValue +{ + m_value.clear(); +} + +@end + +@interface JSManagedValue (PrivateMethods) +- (void)disconnectValue; +@end + +bool JSManagedValueHandleOwner::isReachableFromOpaqueRoots(JSC::Handle, void* context, JSC::SlotVisitor& visitor) +{ + JSManagedValue *managedValue = static_cast(context); + return visitor.containsOpaqueRoot(managedValue); +} + +void JSManagedValueHandleOwner::finalize(JSC::Handle, void* context) +{ + JSManagedValue *managedValue = static_cast(context); + [managedValue disconnectValue]; +} + +#endif // JSC_OBJC_API_ENABLED diff --git a/Source/JavaScriptCore/API/JSObjectRef.cpp b/Source/JavaScriptCore/API/JSObjectRef.cpp index c62efc60d..5ba446513 100644 --- a/Source/JavaScriptCore/API/JSObjectRef.cpp +++ b/Source/JavaScriptCore/API/JSObjectRef.cpp @@ -37,6 +37,7 @@ #include "FunctionConstructor.h" #include "Identifier.h" #include "InitializeThreading.h" +#include "JSAPIWrapperObject.h" #include "JSArray.h" #include "JSCallbackConstructor.h" #include "JSCallbackFunction.h" @@ -48,7 +49,9 @@ #include "JSRetainPtr.h" #include "JSString.h" #include "JSValueRef.h" +#include "ObjectConstructor.h" #include "ObjectPrototype.h" +#include "Operations.h" #include "PropertyNameArray.h" #include "RegExpConstructor.h" @@ -77,6 +80,10 @@ void JSClassRelease(JSClassRef jsClass) JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -85,13 +92,17 @@ JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) JSCallbackObject* object = JSCallbackObject::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), jsClass, data); if (JSObject* prototype = jsClass->prototype(exec)) - object->setPrototype(exec->globalData(), prototype); + object->setPrototype(exec->vm(), prototype); return toRef(object); } JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); return toRef(JSCallbackFunction::create(exec, exec->lexicalGlobalObject(), callAsFunction, name ? name->string() : ASCIILiteral("anonymous"))); @@ -99,6 +110,10 @@ JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -107,16 +122,20 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje jsPrototype = exec->lexicalGlobalObject()->objectPrototype(); JSCallbackConstructor* constructor = JSCallbackConstructor::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackConstructorStructure(), jsClass, callAsConstructor); - constructor->putDirect(exec->globalData(), exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly); + constructor->putDirect(exec->vm(), exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly); return toRef(constructor); } JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); - Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous"); + Identifier nameID = name ? name->identifier(&exec->vm()) : Identifier(exec, "anonymous"); MarkedArgumentBuffer args; for (unsigned i = 0; i < parameterCount; i++) @@ -135,6 +154,10 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -160,6 +183,10 @@ JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSVa JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -180,6 +207,10 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -199,6 +230,10 @@ JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSVa JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -219,6 +254,10 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -228,33 +267,45 @@ JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object) void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSValue jsValue = toJS(exec, value); - jsObject->setPrototypeWithCycleCheck(exec->globalData(), jsValue.isObject() ? jsValue : jsNull()); + jsObject->setPrototypeWithCycleCheck(exec->vm(), jsValue.isObject() ? jsValue : jsNull()); } bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); - return jsObject->hasProperty(exec, propertyName->identifier(&exec->globalData())); + return jsObject->hasProperty(exec, propertyName->identifier(&exec->vm())); } JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); - JSValue jsValue = jsObject->get(exec, propertyName->identifier(&exec->globalData())); + JSValue jsValue = jsObject->get(exec, propertyName->identifier(&exec->vm())); if (exec->hadException()) { if (exception) *exception = toRef(exec, exec->exception()); @@ -265,11 +316,15 @@ JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); - Identifier name(propertyName->identifier(&exec->globalData())); + Identifier name(propertyName->identifier(&exec->vm())); JSValue jsValue = toJS(exec, value); if (attributes && !jsObject->hasProperty(exec, name)) @@ -288,6 +343,10 @@ void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -305,6 +364,10 @@ JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsi void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -321,12 +384,16 @@ void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned p bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); - bool result = jsObject->methodTable()->deleteProperty(jsObject, exec, propertyName->identifier(&exec->globalData())); + bool result = jsObject->methodTable()->deleteProperty(jsObject, exec, propertyName->identifier(&exec->vm())); if (exec->hadException()) { if (exception) *exception = toRef(exec, exec->exception()); @@ -337,19 +404,23 @@ bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef pr void* JSObjectGetPrivate(JSObjectRef object) { - JSObject* jsObject = toJS(object); + JSObject* jsObject = uncheckedToJS(object); if (jsObject->inherits(&JSCallbackObject::s_info)) return jsCast*>(jsObject)->getPrivate(); if (jsObject->inherits(&JSCallbackObject::s_info)) return jsCast*>(jsObject)->getPrivate(); +#if JSC_OBJC_API_ENABLED + if (jsObject->inherits(&JSCallbackObject::s_info)) + return jsCast*>(jsObject)->getPrivate(); +#endif return 0; } bool JSObjectSetPrivate(JSObjectRef object, void* data) { - JSObject* jsObject = toJS(object); + JSObject* jsObject = uncheckedToJS(object); if (jsObject->inherits(&JSCallbackObject::s_info)) { jsCast*>(jsObject)->setPrivate(data); @@ -359,6 +430,12 @@ bool JSObjectSetPrivate(JSObjectRef object, void* data) jsCast*>(jsObject)->setPrivate(data); return true; } +#if JSC_OBJC_API_ENABLED + if (jsObject->inherits(&JSCallbackObject::s_info)) { + jsCast*>(jsObject)->setPrivate(data); + return true; + } +#endif return false; } @@ -369,11 +446,15 @@ JSValueRef JSObjectGetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSSt APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSValue result; - Identifier name(propertyName->identifier(&exec->globalData())); + Identifier name(propertyName->identifier(&exec->vm())); if (jsObject->inherits(&JSCallbackObject::s_info)) result = jsCast*>(jsObject)->getPrivateProperty(name); else if (jsObject->inherits(&JSCallbackObject::s_info)) result = jsCast*>(jsObject)->getPrivateProperty(name); +#if JSC_OBJC_API_ENABLED + else if (jsObject->inherits(&JSCallbackObject::s_info)) + result = jsCast*>(jsObject)->getPrivateProperty(name); +#endif return toRef(exec, result); } @@ -383,15 +464,21 @@ bool JSObjectSetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRe APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSValue jsValue = value ? toJS(exec, value) : JSValue(); - Identifier name(propertyName->identifier(&exec->globalData())); + Identifier name(propertyName->identifier(&exec->vm())); if (jsObject->inherits(&JSCallbackObject::s_info)) { - jsCast*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue); + jsCast*>(jsObject)->setPrivateProperty(exec->vm(), name, jsValue); return true; } if (jsObject->inherits(&JSCallbackObject::s_info)) { - jsCast*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue); + jsCast*>(jsObject)->setPrivateProperty(exec->vm(), name, jsValue); return true; } +#if JSC_OBJC_API_ENABLED + if (jsObject->inherits(&JSCallbackObject::s_info)) { + jsCast*>(jsObject)->setPrivateProperty(exec->vm(), name, jsValue); + return true; + } +#endif return false; } @@ -400,7 +487,7 @@ bool JSObjectDeletePrivateProperty(JSContextRef ctx, JSObjectRef object, JSStrin ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); - Identifier name(propertyName->identifier(&exec->globalData())); + Identifier name(propertyName->identifier(&exec->vm())); if (jsObject->inherits(&JSCallbackObject::s_info)) { jsCast*>(jsObject)->deletePrivateProperty(name); return true; @@ -409,11 +496,19 @@ bool JSObjectDeletePrivateProperty(JSContextRef ctx, JSObjectRef object, JSStrin jsCast*>(jsObject)->deletePrivateProperty(name); return true; } +#if JSC_OBJC_API_ENABLED + if (jsObject->inherits(&JSCallbackObject::s_info)) { + jsCast*>(jsObject)->deletePrivateProperty(name); + return true; + } +#endif return false; } bool JSObjectIsFunction(JSContextRef, JSObjectRef object) { + if (!object) + return false; CallData callData; JSCell* cell = toJS(object); return cell->methodTable()->getCallData(cell, callData) != CallTypeNone; @@ -424,6 +519,9 @@ JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObject ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); + if (!object) + return 0; + JSObject* jsObject = toJS(object); JSObject* jsThisObject = toJS(thisObject); @@ -453,6 +551,8 @@ JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObject bool JSObjectIsConstructor(JSContextRef, JSObjectRef object) { + if (!object) + return false; JSObject* jsObject = toJS(object); ConstructData constructData; return jsObject->methodTable()->getConstructData(jsObject, constructData) != ConstructTypeNone; @@ -463,6 +563,9 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); + if (!object) + return 0; + JSObject* jsObject = toJS(object); ConstructData constructData; @@ -486,33 +589,37 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size struct OpaqueJSPropertyNameArray { WTF_MAKE_FAST_ALLOCATED; public: - OpaqueJSPropertyNameArray(JSGlobalData* globalData) + OpaqueJSPropertyNameArray(VM* vm) : refCount(0) - , globalData(globalData) + , vm(vm) { } unsigned refCount; - JSGlobalData* globalData; + VM* vm; Vector > array; }; JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } JSObject* jsObject = toJS(object); ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); - JSGlobalData* globalData = &exec->globalData(); + VM* vm = &exec->vm(); - JSPropertyNameArrayRef propertyNames = new OpaqueJSPropertyNameArray(globalData); - PropertyNameArray array(globalData); + JSPropertyNameArrayRef propertyNames = new OpaqueJSPropertyNameArray(vm); + PropertyNameArray array(vm); jsObject->methodTable()->getPropertyNames(jsObject, exec, array, ExcludeDontEnumProperties); size_t size = array.size(); propertyNames->array.reserveInitialCapacity(size); for (size_t i = 0; i < size; ++i) - propertyNames->array.append(JSRetainPtr(Adopt, OpaqueJSString::create(array[i].string()).leakRef())); + propertyNames->array.uncheckedAppend(JSRetainPtr(Adopt, OpaqueJSString::create(array[i].string()).leakRef())); return JSPropertyNameArrayRetain(propertyNames); } @@ -526,7 +633,7 @@ JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array) void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array) { if (--array->refCount == 0) { - APIEntryShim entryShim(array->globalData, false); + APIEntryShim entryShim(array->vm, false); delete array; } } @@ -544,6 +651,6 @@ JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStringRef propertyName) { PropertyNameArray* propertyNames = toJS(array); - APIEntryShim entryShim(propertyNames->globalData()); - propertyNames->add(propertyName->identifier(propertyNames->globalData())); + APIEntryShim entryShim(propertyNames->vm()); + propertyNames->add(propertyName->identifier(propertyNames->vm())); } diff --git a/Source/JavaScriptCore/API/JSProfilerPrivate.cpp b/Source/JavaScriptCore/API/JSProfilerPrivate.cpp index c83bc63bd..0405b4b26 100644 --- a/Source/JavaScriptCore/API/JSProfilerPrivate.cpp +++ b/Source/JavaScriptCore/API/JSProfilerPrivate.cpp @@ -27,20 +27,20 @@ #include "JSProfilerPrivate.h" #include "APICast.h" +#include "LegacyProfiler.h" #include "OpaqueJSString.h" -#include "Profiler.h" using namespace JSC; void JSStartProfiling(JSContextRef ctx, JSStringRef title) { - Profiler::profiler()->startProfiling(toJS(ctx), title->string()); + LegacyProfiler::profiler()->startProfiling(toJS(ctx), title->string()); } void JSEndProfiling(JSContextRef ctx, JSStringRef title) { ExecState* exec = toJS(ctx); - Profiler* profiler = Profiler::profiler(); + LegacyProfiler* profiler = LegacyProfiler::profiler(); profiler->stopProfiling(exec, title->string()); } diff --git a/Source/JavaScriptCore/API/JSScriptRef.cpp b/Source/JavaScriptCore/API/JSScriptRef.cpp new file mode 100644 index 000000000..8a5f3caf3 --- /dev/null +++ b/Source/JavaScriptCore/API/JSScriptRef.cpp @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2012 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#include "APICast.h" +#include "APIShims.h" +#include "Completion.h" +#include "JSBasePrivate.h" +#include "VM.h" +#include "JSScriptRefPrivate.h" +#include "OpaqueJSString.h" +#include "Operations.h" +#include "Parser.h" +#include "SourceCode.h" +#include "SourceProvider.h" + +using namespace JSC; + +struct OpaqueJSScript : public SourceProvider { +public: + static WTF::PassRefPtr create(VM* vm, const String& url, int startingLineNumber, const String& source) + { + return WTF::adoptRef(new OpaqueJSScript(vm, url, startingLineNumber, source)); + } + + const String& source() const OVERRIDE + { + return m_source; + } + + VM* vm() const { return m_vm; } + +private: + OpaqueJSScript(VM* vm, const String& url, int startingLineNumber, const String& source) + : SourceProvider(url, TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber::first())) + , m_vm(vm) + , m_source(source) + { + } + + ~OpaqueJSScript() { } + + VM* m_vm; + String m_source; +}; + +static bool parseScript(VM* vm, const SourceCode& source, ParserError& error) +{ + return JSC::parse(vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error); +} + +extern "C" { + +JSScriptRef JSScriptCreateReferencingImmortalASCIIText(JSContextGroupRef contextGroup, JSStringRef url, int startingLineNumber, const char* source, size_t length, JSStringRef* errorMessage, int* errorLine) +{ + VM* vm = toJS(contextGroup); + APIEntryShim entryShim(vm); + for (size_t i = 0; i < length; i++) { + if (!isASCII(source[i])) + return 0; + } + + RefPtr result = OpaqueJSScript::create(vm, url->string(), startingLineNumber, String(StringImpl::createFromLiteral(source, length))); + + ParserError error; + if (!parseScript(vm, SourceCode(result), error)) { + if (errorMessage) + *errorMessage = OpaqueJSString::create(error.m_message).leakRef(); + if (errorLine) + *errorLine = error.m_line; + return 0; + } + + return result.release().leakRef(); +} + +JSScriptRef JSScriptCreateFromString(JSContextGroupRef contextGroup, JSStringRef url, int startingLineNumber, JSStringRef source, JSStringRef* errorMessage, int* errorLine) +{ + VM* vm = toJS(contextGroup); + APIEntryShim entryShim(vm); + + RefPtr result = OpaqueJSScript::create(vm, url->string(), startingLineNumber, source->string()); + + ParserError error; + if (!parseScript(vm, SourceCode(result), error)) { + if (errorMessage) + *errorMessage = OpaqueJSString::create(error.m_message).leakRef(); + if (errorLine) + *errorLine = error.m_line; + return 0; + } + + return result.release().leakRef(); +} + +void JSScriptRetain(JSScriptRef script) +{ + APIEntryShim entryShim(script->vm()); + script->ref(); +} + +void JSScriptRelease(JSScriptRef script) +{ + APIEntryShim entryShim(script->vm()); + script->deref(); +} + +JSValueRef JSScriptEvaluate(JSContextRef context, JSScriptRef script, JSValueRef thisValueRef, JSValueRef* exception) +{ + ExecState* exec = toJS(context); + APIEntryShim entryShim(exec); + if (script->vm() != &exec->vm()) { + RELEASE_ASSERT_NOT_REACHED(); + return 0; + } + JSValue internalException; + JSValue thisValue = thisValueRef ? toJS(exec, thisValueRef) : jsUndefined(); + JSValue result = evaluate(exec, SourceCode(script), thisValue, &internalException); + if (internalException) { + if (exception) + *exception = toRef(exec, internalException); + return 0; + } + ASSERT(result); + return toRef(exec, result); +} + +} diff --git a/Source/JavaScriptCore/API/JSScriptRefPrivate.h b/Source/JavaScriptCore/API/JSScriptRefPrivate.h new file mode 100644 index 000000000..e1992052a --- /dev/null +++ b/Source/JavaScriptCore/API/JSScriptRefPrivate.h @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2012 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSScriptRefPrivate_h +#define JSScriptRefPrivate_h + +#include +#include +#include + +/*! @typedef JSScriptRef A JavaScript script reference. */ +typedef struct OpaqueJSScript* JSScriptRef; + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + @function + @abstract Creates a script reference from an ascii string, without copying or taking ownership of the string + @param contextGroup The context group the script is to be used in. + @param url The source url to be reported in errors and exceptions. + @param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. + @param source The source string. This is required to be pure ASCII and to never be deallocated. + @param length The length of the source string. + @param errorMessage A pointer to a JSStringRef in which to store the parse error message if the source is not valid. Pass NULL if you do not care to store an error message. + @param errorLine A pointer to an int in which to store the line number of a parser error. Pass NULL if you do not care to store an error line. + @result A JSScriptRef for the provided source, or NULL if any non-ASCII character is found in source or if the source is not a valid JavaScript program. Ownership follows the Create Rule. + @discussion Use this function to create a reusable script reference with a constant + buffer as the backing string. The source string must outlive the global context. + */ +JS_EXPORT JSScriptRef JSScriptCreateReferencingImmortalASCIIText(JSContextGroupRef contextGroup, JSStringRef url, int startingLineNumber, const char* source, size_t length, JSStringRef* errorMessage, int* errorLine); + +/*! + @function + @abstract Creates a script reference from a string + @param contextGroup The context group the script is to be used in. + @param url The source url to be reported in errors and exceptions. + @param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. + @param source The source string. + @param errorMessage A pointer to a JSStringRef in which to store the parse error message if the source is not valid. Pass NULL if you do not care to store an error message. + @param errorLine A pointer to an int in which to store the line number of a parser error. Pass NULL if you do not care to store an error line. + @result A JSScriptRef for the provided source, or NULL is the source is not a valid JavaScript program. Ownership follows the Create Rule. + */ +JS_EXPORT JSScriptRef JSScriptCreateFromString(JSContextGroupRef contextGroup, JSStringRef url, int startingLineNumber, JSStringRef source, JSStringRef* errorMessage, int* errorLine); + +/*! + @function + @abstract Retains a JavaScript script. + @param script The script to retain. + */ +JS_EXPORT void JSScriptRetain(JSScriptRef script); + +/*! + @function + @abstract Releases a JavaScript script. + @param script The script to release. + */ +JS_EXPORT void JSScriptRelease(JSScriptRef script); + +/*! + @function + @abstract Evaluates a JavaScript script. + @param ctx The execution context to use. + @param script The JSScript to evaluate. + @param thisValue The value to use as "this" when evaluating the script. + @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. + @result The JSValue that results from evaluating script, or NULL if an exception is thrown. + */ +JS_EXPORT JSValueRef JSScriptEvaluate(JSContextRef ctx, JSScriptRef script, JSValueRef thisValue, JSValueRef* exception); + + +#ifdef __cplusplus +} +#endif + +#endif /* JSScriptRefPrivate_h */ diff --git a/Source/JavaScriptCore/API/JSStringRef.cpp b/Source/JavaScriptCore/API/JSStringRef.cpp index 7f2168dc2..a03afed5b 100644 --- a/Source/JavaScriptCore/API/JSStringRef.cpp +++ b/Source/JavaScriptCore/API/JSStringRef.cpp @@ -25,6 +25,7 @@ #include "config.h" #include "JSStringRef.h" +#include "JSStringRefPrivate.h" #include "InitializeThreading.h" #include "OpaqueJSString.h" @@ -55,10 +56,15 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string) } } - // Null string. return OpaqueJSString::create().leakRef(); } +JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars) +{ + initializeThreading(); + return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars)).leakRef(); +} + JSStringRef JSStringRetain(JSStringRef string) { string->ref(); diff --git a/Source/JavaScriptCore/API/JSStringRefCF.cpp b/Source/JavaScriptCore/API/JSStringRefCF.cpp index fd72a593c..64d2d6251 100644 --- a/Source/JavaScriptCore/API/JSStringRefCF.cpp +++ b/Source/JavaScriptCore/API/JSStringRefCF.cpp @@ -30,7 +30,7 @@ #include "InitializeThreading.h" #include "JSStringRef.h" #include "OpaqueJSString.h" -#include +#include #include JSStringRef JSStringCreateWithCFString(CFStringRef string) @@ -51,9 +51,9 @@ JSStringRef JSStringCreateWithCFString(CFStringRef string) CFStringGetCharacters(string, CFRangeMake(0, length), buffer.get()); COMPILE_ASSERT(sizeof(UniChar) == sizeof(UChar), unichar_and_uchar_must_be_same_size); return OpaqueJSString::create(reinterpret_cast(buffer.get()), length).leakRef(); - } else { - return OpaqueJSString::create(static_cast(0), 0).leakRef(); } + + return OpaqueJSString::create(reinterpret_cast(""), 0).leakRef(); } CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string) diff --git a/Source/JavaScriptCore/API/JSStringRefPrivate.h b/Source/JavaScriptCore/API/JSStringRefPrivate.h new file mode 100644 index 000000000..f1db806ee --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRefPrivate.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSStringRefPrivate_h +#define JSStringRefPrivate_h + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +JS_EXPORT JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars); + +#ifdef __cplusplus +} +#endif + +#endif /* JSStringRefPrivate_h */ diff --git a/Source/JavaScriptCore/API/JSStringRefQt.cpp b/Source/JavaScriptCore/API/JSStringRefQt.cpp new file mode 100644 index 000000000..259bad8e6 --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRefQt.cpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSStringRefQt.h" + +#include "APICast.h" +#include "InitializeThreading.h" +#include "JSStringRef.h" +#include "OpaqueJSString.h" +#include +#include + +QString JSStringCopyQString(JSStringRef string) +{ + return string->qString(); +} + +JSRetainPtr JSStringCreateWithQString(const QString& qString) +{ + RefPtr jsString = OpaqueJSString::create(qString); + + if (jsString) + return JSRetainPtr(Adopt, jsString.release().leakRef()); + + return JSRetainPtr(Adopt, OpaqueJSString::create().leakRef()); +} diff --git a/Source/JavaScriptCore/API/JSStringRefQt.h b/Source/JavaScriptCore/API/JSStringRefQt.h new file mode 100644 index 000000000..63a059fdb --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRefQt.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSStringRefQt_h +#define JSStringRefQt_h + +#include "JSBase.h" +#include "JSRetainPtr.h" +#include + +/* QString convenience methods */ + +/*! +@function +@abstract Creates a QString from a JavaScript string. +@param string The JSString to copy into the new QString. +@result A QString containing string. +*/ +JS_EXPORT QString JSStringCopyQString(JSStringRef string); +JS_EXPORT JSRetainPtr JSStringCreateWithQString(const QString&); + +#endif /* JSStringRefQt_h */ diff --git a/Source/JavaScriptCore/API/JSValue.h b/Source/JavaScriptCore/API/JSValue.h new file mode 100644 index 000000000..c77707538 --- /dev/null +++ b/Source/JavaScriptCore/API/JSValue.h @@ -0,0 +1,306 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSValue_h +#define JSValue_h + +#if JSC_OBJC_API_ENABLED + +@class JSContext; + +// A JSValue is a reference to a value within the JavaScript object space of a +// JSVirtualMachine. All instances of JSValue originate from a JSContext and +// hold a strong reference to this JSContext. As long as any value associated with +// a particular JSContext is retained, that JSContext will remain alive. +// Where an instance method is invoked upon a JSValue, and this returns another +// JSValue, the returned JSValue will originate from the same JSContext as the +// JSValue on which the method was invoked. +// +// For all methods taking arguments of type id, arguments will be converted +// into a JavaScript value according to the conversion specified below. +// All JavaScript values are associated with a particular JSVirtualMachine +// (the associated JSVirtualMachine is available indirectly via the context +// property). An instance of JSValue may only be passed as an argument to +// methods on instances of JSValue and JSContext that belong to the same +// JSVirtualMachine - passing a JSValue to a method on an object originating +// from a different JSVirtualMachine will result in an Objective-C exception +// being raised. +// +// Conversion between Objective-C and JavaScript types. +// +// When converting between JavaScript values and Objective-C objects a copy is +// performed. Values of types listed below are copied to the corresponding +// types on conversion in each direction. For NSDictionaries, entries in the +// dictionary that are keyed by strings are copied onto a JavaScript object. +// For dictionaries and arrays, conversion is recursive, with the same object +// conversion being applied to all entries in the collection. +// +// Objective-C type | JavaScript type +// --------------------+--------------------- +// nil | undefined +// NSNull | null +// NSString | string +// NSNumber | number, boolean +// NSDictionary | Object object +// NSArray | Array object +// NSDate | Date object +// NSBlock * | Function object * +// id ** | Wrapper object ** +// Class *** | Constructor object *** +// +// * Instances of NSBlock with supported arguments types will be presented to +// JavaScript as a callable Function object. For more information on supported +// argument types see JSExport.h. If a JavaScript Function originating from an +// Objective-C block is converted back to an Objective-C object the block will +// be returned. All other JavaScript functions will be converted in the same +// manner as a JavaScript object of type Object. +// +// ** For Objective-C instances that do not derive from the set of types listed +// above, a wrapper object to provide a retaining handle to the Objective-C +// instance from JavaScript. For more information on these wrapper objects, see +// JSExport.h. When a JavaScript wrapper object is converted back to Objective-C +// the Objective-C instance being retained by the wrapper is returned. +// +// *** For Objective-C Class objects a constructor object containing exported +// class methods will be returned. See JSExport.h for more information on +// constructor objects. + +NS_CLASS_AVAILABLE(10_9, NA) +@interface JSValue : NSObject + +// Create a JSValue by converting an Objective-C object. ++ (JSValue *)valueWithObject:(id)value inContext:(JSContext *)context; +// Create a JavaScript value from an Objective-C primitive type. ++ (JSValue *)valueWithBool:(BOOL)value inContext:(JSContext *)context; ++ (JSValue *)valueWithDouble:(double)value inContext:(JSContext *)context; ++ (JSValue *)valueWithInt32:(int32_t)value inContext:(JSContext *)context; ++ (JSValue *)valueWithUInt32:(uint32_t)value inContext:(JSContext *)context; +// Create a JavaScript value in this context. ++ (JSValue *)valueWithNewObjectInContext:(JSContext *)context; ++ (JSValue *)valueWithNewArrayInContext:(JSContext *)context; ++ (JSValue *)valueWithNewRegularExpressionFromPattern:(NSString *)pattern flags:(NSString *)flags inContext:(JSContext *)context; ++ (JSValue *)valueWithNewErrorFromMessage:(NSString *)message inContext:(JSContext *)context; ++ (JSValue *)valueWithNullInContext:(JSContext *)context; ++ (JSValue *)valueWithUndefinedInContext:(JSContext *)context; + +// Convert this value to a corresponding Objective-C object, according to the +// conversion specified above. +- (id)toObject; +// Convert this value to a corresponding Objective-C object, if the result is +// not of the specified class then nil will be returned. +- (id)toObjectOfClass:(Class)expectedClass; +// The value is copied to a boolean according to the conversion specified by the +// JavaScript language. +- (BOOL)toBool; +// The value is copied to a number according to the conversion specified by the +// JavaScript language. +- (double)toDouble; +// The value is copied to an integer according to the conversion specified by +// the JavaScript language. +- (int32_t)toInt32; +// The value is copied to an integer according to the conversion specified by +// the JavaScript language. +- (uint32_t)toUInt32; +// If the value is a boolean, a NSNumber value of @YES or @NO will be returned. +// For all other types the value will be copied to a number according to the +// conversion specified by the JavaScript language. +- (NSNumber *)toNumber; +// The value is copied to a string according to the conversion specified by the +// JavaScript language. +- (NSString *)toString; +// The value is converted to a number representing a time interval since 1970, +// and a new NSDate instance is returned. +- (NSDate *)toDate; +// If the value is null or undefined then nil is returned. +// If the value is not an object then a JavaScript TypeError will be thrown. +// The property "length" is read from the object, converted to an unsigned +// integer, and an NSArray of this size is allocated. Properties corresponding +// to indicies within the array bounds will be copied to the array, with +// Objective-C objects converted to equivalent JSValues as specified. +- (NSArray *)toArray; +// If the value is null or undefined then nil is returned. +// If the value is not an object then a JavaScript TypeError will be thrown. +// All enumerable properties of the object are copied to the dictionary, with +// Objective-C objects converted to equivalent JSValues as specified. +- (NSDictionary *)toDictionary; + +// Access a property from the value. This method will return the JavaScript value +// 'undefined' if the property does not exist. +- (JSValue *)valueForProperty:(NSString *)property; +// Set a property on the value. +- (void)setValue:(id)value forProperty:(NSString *)property; +// Delete a property from the value, returns YES if deletion is successful. +- (BOOL)deleteProperty:(NSString *)property; +// Returns YES if property is present on the value. +// This method has the same function as the JavaScript operator "in". +- (BOOL)hasProperty:(NSString *)property; +// This method may be used to create a data or accessor property on an object; +// this method operates in accordance with the Object.defineProperty method in +// the JavaScript language. +- (void)defineProperty:(NSString *)property descriptor:(id)descriptor; + +// Access an indexed property from the value. This method will return the +// JavaScript value 'undefined' if no property exists at that index. +- (JSValue *)valueAtIndex:(NSUInteger)index; +// Set an indexed property on the value. For JSValues that are JavaScript arrays, +// indices greater than UINT_MAX - 1 will not affect the length of the array. +- (void)setValue:(id)value atIndex:(NSUInteger)index; + +// All JavaScript values are precisely one of these types. +- (BOOL)isUndefined; +- (BOOL)isNull; +- (BOOL)isBoolean; +- (BOOL)isNumber; +- (BOOL)isString; +- (BOOL)isObject; + +// This method has the same function as the JavaScript operator "===". +- (BOOL)isEqualToObject:(id)value; +// This method has the same function as the JavaScript operator "==". +- (BOOL)isEqualWithTypeCoercionToObject:(id)value; +// This method has the same function as the JavaScript operator "instanceof". +- (BOOL)isInstanceOf:(id)value; + +// Call this value as a function passing the specified arguments. +- (JSValue *)callWithArguments:(NSArray *)arguments; +// Call this value as a constructor passing the specified arguments. +- (JSValue *)constructWithArguments:(NSArray *)arguments; +// Access the property named "method" from this value; call the value resulting +// from the property access as a function, passing this value as the "this" +// value, and the specified arguments. +- (JSValue *)invokeMethod:(NSString *)method withArguments:(NSArray *)arguments; + +// The JSContext that this value originates from. +@property(readonly, retain) JSContext *context; + +@end + +// Objective-C methods exported to JavaScript may have argument and/or return +// values of struct types, provided that conversion to and from the struct is +// supported by JSValue. Support is provided for any types where JSValue +// contains both a class method "valueWith:inContext:", and and instance +// method "to" - where the string "" in these selector names match, +// with the first argument to the former being of the same struct type as the +// return type of the latter. +// Support is provided for structs of type CGPoint, NSRange, CGRect and CGSize. +@interface JSValue(StructSupport) + +// This method returns a newly allocated JavaScript object containing properties +// named "x" and "y", with values from the CGPoint. ++ (JSValue *)valueWithPoint:(CGPoint)point inContext:(JSContext *)context; +// This method returns a newly allocated JavaScript object containing properties +// named "location" and "length", with values from the NSRange. ++ (JSValue *)valueWithRange:(NSRange)range inContext:(JSContext *)context; +// This method returns a newly allocated JavaScript object containing properties +// named "x", "y", "width", and "height", with values from the CGRect. ++ (JSValue *)valueWithRect:(CGRect)rect inContext:(JSContext *)context; +// This method returns a newly allocated JavaScript object containing properties +// named "width" and "height", with values from the CGSize. ++ (JSValue *)valueWithSize:(CGSize)size inContext:(JSContext *)context; + +// Convert a value to type CGPoint by reading properties named "x" and "y" from +// this value, and converting the results to double. +- (CGPoint)toPoint; +// Convert a value to type NSRange by accessing properties named "location" and +// "length" from this value converting the results to double. +- (NSRange)toRange; +// Convert a value to type CGRect by reading properties named "x", "y", "width", +// and "height" from this value, and converting the results to double. +- (CGRect)toRect; +// Convert a value to type CGSize by accessing properties named "width" and +// "height" from this value converting the results to double. +- (CGSize)toSize; + +@end + +// Instances of JSValue implement the following methods in order to enable +// support for subscript access by key and index, for example: +// +// JSValue *objectA, *objectB; +// JSValue *v1 = object[@"X"]; // Get value for property "X" from 'object'. +// JSValue *v2 = object[42]; // Get value for index 42 from 'object'. +// object[@"Y"] = v1; // Assign 'v1' to property "Y" of 'object'. +// object[101] = v2; // Assign 'v2' to index 101 of 'object'. +// +// An object key passed as a subscript will be converted to a JavaScript value, +// and then the value converted to a string used as a property name. +@interface JSValue(SubscriptSupport) + +- (JSValue *)objectForKeyedSubscript:(id)key; +- (JSValue *)objectAtIndexedSubscript:(NSUInteger)index; +- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key; +- (void)setObject:(id)object atIndexedSubscript:(NSUInteger)index; + +@end + +// These functions are for bridging between the C API and the Objective-C API. +@interface JSValue(JSValueRefSupport) +// Creates a JSValue, wrapping its C API counterpart. ++ (JSValue *)valueWithJSValueRef:(JSValueRef)value inContext:(JSContext *)context; +// Returns the C API counterpart wrapped by a JSContext. +- (JSValueRef)JSValueRef; +@end + +#ifdef __cplusplus +extern "C" { +#endif + +// These keys may assist in creating a property descriptor for use with the +// defineProperty method on JSValue. +// Property descriptors must fit one of three descriptions: +// Data Descriptor: +// - A descriptor containing one or both of the keys "value" and "writable", +// and optionally containing one or both of the keys "enumerable" and +// "configurable". A data descriptor may not contain either the "get" or +// "set" key. +// A data descriptor may be used to create or modify the attributes of a +// data property on an object (replacing any existing accessor property). +// Accessor Descriptor: +// - A descriptor containing one or both of the keys "get" and "set", and +// optionally containing one or both of the keys "enumerable" and +// "configurable". An accessor descriptor may not contain either the "value" +// or "writable" key. +// An accessor descriptor may be used to create or modify the attributes of +// an accessor property on an object (replacing any existing data property). +// Generic Descriptor: +// - A descriptor containing one or both of the keys "enumerable" and +// "configurable". A generic descriptor may not contain any of the keys +// "value", " writable", "get", or "set". +// A generic descriptor may be used to modify the attributes of an existing +// data or accessor property, or to create a new data property. +JS_EXPORT extern NSString * const JSPropertyDescriptorWritableKey; +JS_EXPORT extern NSString * const JSPropertyDescriptorEnumerableKey; +JS_EXPORT extern NSString * const JSPropertyDescriptorConfigurableKey; +JS_EXPORT extern NSString * const JSPropertyDescriptorValueKey; +JS_EXPORT extern NSString * const JSPropertyDescriptorGetKey; +JS_EXPORT extern NSString * const JSPropertyDescriptorSetKey; + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif + +#endif // JSValue_h diff --git a/Source/JavaScriptCore/API/JSValue.mm b/Source/JavaScriptCore/API/JSValue.mm new file mode 100644 index 000000000..e708cc674 --- /dev/null +++ b/Source/JavaScriptCore/API/JSValue.mm @@ -0,0 +1,1131 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#import "APICast.h" +#import "APIShims.h" +#import "DateInstance.h" +#import "Error.h" +#import "JavaScriptCore.h" +#import "JSContextInternal.h" +#import "JSVirtualMachineInternal.h" +#import "JSValueInternal.h" +#import "JSWrapperMap.h" +#import "ObjcRuntimeExtras.h" +#import "Operations.h" +#import "JSCJSValue.h" +#import +#import +#import +#import +#import +#import + +#if JSC_OBJC_API_ENABLED + +NSString * const JSPropertyDescriptorWritableKey = @"writable"; +NSString * const JSPropertyDescriptorEnumerableKey = @"enumerable"; +NSString * const JSPropertyDescriptorConfigurableKey = @"configurable"; +NSString * const JSPropertyDescriptorValueKey = @"value"; +NSString * const JSPropertyDescriptorGetKey = @"get"; +NSString * const JSPropertyDescriptorSetKey = @"set"; + +@implementation JSValue { + JSValueRef m_value; +} + +- (JSValueRef)JSValueRef +{ + return m_value; +} + ++ (JSValue *)valueWithObject:(id)value inContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:objectToValue(context, value) inContext:context]; +} + ++ (JSValue *)valueWithBool:(BOOL)value inContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSValueMakeBoolean([context JSGlobalContextRef], value) inContext:context]; +} + ++ (JSValue *)valueWithDouble:(double)value inContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSValueMakeNumber([context JSGlobalContextRef], value) inContext:context]; +} + ++ (JSValue *)valueWithInt32:(int32_t)value inContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSValueMakeNumber([context JSGlobalContextRef], value) inContext:context]; +} + ++ (JSValue *)valueWithUInt32:(uint32_t)value inContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSValueMakeNumber([context JSGlobalContextRef], value) inContext:context]; +} + ++ (JSValue *)valueWithNewObjectInContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSObjectMake([context JSGlobalContextRef], 0, 0) inContext:context]; +} + ++ (JSValue *)valueWithNewArrayInContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSObjectMakeArray([context JSGlobalContextRef], 0, NULL, 0) inContext:context]; +} + ++ (JSValue *)valueWithNewRegularExpressionFromPattern:(NSString *)pattern flags:(NSString *)flags inContext:(JSContext *)context +{ + JSStringRef patternString = JSStringCreateWithCFString((CFStringRef)pattern); + JSStringRef flagsString = JSStringCreateWithCFString((CFStringRef)flags); + JSValueRef arguments[2] = { JSValueMakeString([context JSGlobalContextRef], patternString), JSValueMakeString([context JSGlobalContextRef], flagsString) }; + JSStringRelease(patternString); + JSStringRelease(flagsString); + + return [JSValue valueWithJSValueRef:JSObjectMakeRegExp([context JSGlobalContextRef], 2, arguments, 0) inContext:context]; +} + ++ (JSValue *)valueWithNewErrorFromMessage:(NSString *)message inContext:(JSContext *)context +{ + JSStringRef string = JSStringCreateWithCFString((CFStringRef)message); + JSValueRef argument = JSValueMakeString([context JSGlobalContextRef], string); + JSStringRelease(string); + + return [JSValue valueWithJSValueRef:JSObjectMakeError([context JSGlobalContextRef], 1, &argument, 0) inContext:context]; +} + ++ (JSValue *)valueWithNullInContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSValueMakeNull([context JSGlobalContextRef]) inContext:context]; +} + ++ (JSValue *)valueWithUndefinedInContext:(JSContext *)context +{ + return [JSValue valueWithJSValueRef:JSValueMakeUndefined([context JSGlobalContextRef]) inContext:context]; +} + +- (id)toObject +{ + return valueToObject(_context, m_value); +} + +- (id)toObjectOfClass:(Class)expectedClass +{ + id result = [self toObject]; + return [result isKindOfClass:expectedClass] ? result : nil; +} + +- (BOOL)toBool +{ + return JSValueToBoolean([_context JSGlobalContextRef], m_value); +} + +- (double)toDouble +{ + JSValueRef exception = 0; + double result = JSValueToNumber([_context JSGlobalContextRef], m_value, &exception); + if (exception) { + [_context notifyException:exception]; + return std::numeric_limits::quiet_NaN(); + } + + return result; +} + +- (int32_t)toInt32 +{ + return JSC::toInt32([self toDouble]); +} + +- (uint32_t)toUInt32 +{ + return JSC::toUInt32([self toDouble]); +} + +- (NSNumber *)toNumber +{ + JSValueRef exception = 0; + id result = valueToNumber([_context JSGlobalContextRef], m_value, &exception); + if (exception) + [_context notifyException:exception]; + return result; +} + +- (NSString *)toString +{ + JSValueRef exception = 0; + id result = valueToString([_context JSGlobalContextRef], m_value, &exception); + if (exception) + [_context notifyException:exception]; + return result; +} + +- (NSDate *)toDate +{ + JSValueRef exception = 0; + id result = valueToDate([_context JSGlobalContextRef], m_value, &exception); + if (exception) + [_context notifyException:exception]; + return result; +} + +- (NSArray *)toArray +{ + JSValueRef exception = 0; + id result = valueToArray([_context JSGlobalContextRef], m_value, &exception); + if (exception) + [_context notifyException:exception]; + return result; +} + +- (NSDictionary *)toDictionary +{ + JSValueRef exception = 0; + id result = valueToDictionary([_context JSGlobalContextRef], m_value, &exception); + if (exception) + [_context notifyException:exception]; + return result; +} + +- (JSValue *)valueForProperty:(NSString *)propertyName +{ + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + JSStringRef name = JSStringCreateWithCFString((CFStringRef)propertyName); + JSValueRef result = JSObjectGetProperty([_context JSGlobalContextRef], object, name, &exception); + JSStringRelease(name); + if (exception) + return [_context valueFromNotifyException:exception]; + + return [JSValue valueWithJSValueRef:result inContext:_context]; +} + +- (void)setValue:(id)value forProperty:(NSString *)propertyName +{ + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) { + [_context notifyException:exception]; + return; + } + + JSStringRef name = JSStringCreateWithCFString((CFStringRef)propertyName); + JSObjectSetProperty([_context JSGlobalContextRef], object, name, objectToValue(_context, value), 0, &exception); + JSStringRelease(name); + if (exception) { + [_context notifyException:exception]; + return; + } +} + +- (BOOL)deleteProperty:(NSString *)propertyName +{ + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) + return [_context boolFromNotifyException:exception]; + + JSStringRef name = JSStringCreateWithCFString((CFStringRef)propertyName); + BOOL result = JSObjectDeleteProperty([_context JSGlobalContextRef], object, name, &exception); + JSStringRelease(name); + if (exception) + return [_context boolFromNotifyException:exception]; + + return result; +} + +- (BOOL)hasProperty:(NSString *)propertyName +{ + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) + return [_context boolFromNotifyException:exception]; + + JSStringRef name = JSStringCreateWithCFString((CFStringRef)propertyName); + BOOL result = JSObjectHasProperty([_context JSGlobalContextRef], object, name); + JSStringRelease(name); + return result; +} + +- (void)defineProperty:(NSString *)property descriptor:(id)descriptor +{ + [[_context globalObject][@"Object"] invokeMethod:@"defineProperty" withArguments:@[ self, property, descriptor ]]; +} + +- (JSValue *)valueAtIndex:(NSUInteger)index +{ + // Properties that are higher than an unsigned value can hold are converted to a double then inserted as a normal property. + // Indices that are bigger than the max allowed index size (UINT_MAX - 1) will be handled internally in get(). + if (index != (unsigned)index) + return [self valueForProperty:[[JSValue valueWithDouble:index inContext:_context] toString]]; + + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + JSValueRef result = JSObjectGetPropertyAtIndex([_context JSGlobalContextRef], object, (unsigned)index, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + return [JSValue valueWithJSValueRef:result inContext:_context]; +} + +- (void)setValue:(id)value atIndex:(NSUInteger)index +{ + // Properties that are higher than an unsigned value can hold are converted to a double, then inserted as a normal property. + // Indices that are bigger than the max allowed index size (UINT_MAX - 1) will be handled internally in putByIndex(). + if (index != (unsigned)index) + return [self setValue:value forProperty:[[JSValue valueWithDouble:index inContext:_context] toString]]; + + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) { + [_context notifyException:exception]; + return; + } + + JSObjectSetPropertyAtIndex([_context JSGlobalContextRef], object, (unsigned)index, objectToValue(_context, value), &exception); + if (exception) { + [_context notifyException:exception]; + return; + } +} + +- (BOOL)isUndefined +{ + return JSValueIsUndefined([_context JSGlobalContextRef], m_value); +} + +- (BOOL)isNull +{ + return JSValueIsNull([_context JSGlobalContextRef], m_value); +} + +- (BOOL)isBoolean +{ + return JSValueIsBoolean([_context JSGlobalContextRef], m_value); +} + +- (BOOL)isNumber +{ + return JSValueIsNumber([_context JSGlobalContextRef], m_value); +} + +- (BOOL)isString +{ + return JSValueIsString([_context JSGlobalContextRef], m_value); +} + +- (BOOL)isObject +{ + return JSValueIsObject([_context JSGlobalContextRef], m_value); +} + +- (BOOL)isEqualToObject:(id)value +{ + return JSValueIsStrictEqual([_context JSGlobalContextRef], m_value, objectToValue(_context, value)); +} + +- (BOOL)isEqualWithTypeCoercionToObject:(id)value +{ + JSValueRef exception = 0; + BOOL result = JSValueIsEqual([_context JSGlobalContextRef], m_value, objectToValue(_context, value), &exception); + if (exception) + return [_context boolFromNotifyException:exception]; + + return result; +} + +- (BOOL)isInstanceOf:(id)value +{ + JSValueRef exception = 0; + JSObjectRef constructor = JSValueToObject([_context JSGlobalContextRef], objectToValue(_context, value), &exception); + if (exception) + return [_context boolFromNotifyException:exception]; + + BOOL result = JSValueIsInstanceOfConstructor([_context JSGlobalContextRef], m_value, constructor, &exception); + if (exception) + return [_context boolFromNotifyException:exception]; + + return result; +} + +- (JSValue *)callWithArguments:(NSArray *)argumentArray +{ + NSUInteger argumentCount = [argumentArray count]; + JSValueRef arguments[argumentCount]; + for (unsigned i = 0; i < argumentCount; ++i) + arguments[i] = objectToValue(_context, [argumentArray objectAtIndex:i]); + + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + JSValueRef result = JSObjectCallAsFunction([_context JSGlobalContextRef], object, 0, argumentCount, arguments, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + return [JSValue valueWithJSValueRef:result inContext:_context]; +} + +- (JSValue *)constructWithArguments:(NSArray *)argumentArray +{ + NSUInteger argumentCount = [argumentArray count]; + JSValueRef arguments[argumentCount]; + for (unsigned i = 0; i < argumentCount; ++i) + arguments[i] = objectToValue(_context, [argumentArray objectAtIndex:i]); + + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + JSObjectRef result = JSObjectCallAsConstructor([_context JSGlobalContextRef], object, argumentCount, arguments, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + return [JSValue valueWithJSValueRef:result inContext:_context]; +} + +- (JSValue *)invokeMethod:(NSString *)method withArguments:(NSArray *)arguments +{ + NSUInteger argumentCount = [arguments count]; + JSValueRef argumentArray[argumentCount]; + for (unsigned i = 0; i < argumentCount; ++i) + argumentArray[i] = objectToValue(_context, [arguments objectAtIndex:i]); + + JSValueRef exception = 0; + JSObjectRef thisObject = JSValueToObject([_context JSGlobalContextRef], m_value, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + JSStringRef name = JSStringCreateWithCFString((CFStringRef)method); + JSValueRef function = JSObjectGetProperty([_context JSGlobalContextRef], thisObject, name, &exception); + JSStringRelease(name); + if (exception) + return [_context valueFromNotifyException:exception]; + + JSObjectRef object = JSValueToObject([_context JSGlobalContextRef], function, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + JSValueRef result = JSObjectCallAsFunction([_context JSGlobalContextRef], object, thisObject, argumentCount, argumentArray, &exception); + if (exception) + return [_context valueFromNotifyException:exception]; + + return [JSValue valueWithJSValueRef:result inContext:_context]; +} + +@end + +@implementation JSValue(StructSupport) + +- (CGPoint)toPoint +{ + return (CGPoint){ + [self[@"x"] toDouble], + [self[@"y"] toDouble] + }; +} + +- (NSRange)toRange +{ + return (NSRange){ + [[self[@"location"] toNumber] unsignedIntegerValue], + [[self[@"length"] toNumber] unsignedIntegerValue] + }; +} + +- (CGRect)toRect +{ + return (CGRect){ + [self toPoint], + [self toSize] + }; +} + +- (CGSize)toSize +{ + return (CGSize){ + [self[@"width"] toDouble], + [self[@"height"] toDouble] + }; +} + ++ (JSValue *)valueWithPoint:(CGPoint)point inContext:(JSContext *)context +{ + return [JSValue valueWithObject:@{ + @"x":@(point.x), + @"y":@(point.y) + } inContext:context]; +} + ++ (JSValue *)valueWithRange:(NSRange)range inContext:(JSContext *)context +{ + return [JSValue valueWithObject:@{ + @"location":@(range.location), + @"length":@(range.length) + } inContext:context]; +} + ++ (JSValue *)valueWithRect:(CGRect)rect inContext:(JSContext *)context +{ + return [JSValue valueWithObject:@{ + @"x":@(rect.origin.x), + @"y":@(rect.origin.y), + @"width":@(rect.size.width), + @"height":@(rect.size.height) + } inContext:context]; +} + ++ (JSValue *)valueWithSize:(CGSize)size inContext:(JSContext *)context +{ + return [JSValue valueWithObject:@{ + @"width":@(size.width), + @"height":@(size.height) + } inContext:context]; +} + +@end + +@implementation JSValue(SubscriptSupport) + +- (JSValue *)objectForKeyedSubscript:(id)key +{ + if (![key isKindOfClass:[NSString class]]) { + key = [[JSValue valueWithObject:key inContext:_context] toString]; + if (!key) + return [JSValue valueWithUndefinedInContext:_context]; + } + + return [self valueForProperty:(NSString *)key]; +} + +- (JSValue *)objectAtIndexedSubscript:(NSUInteger)index +{ + return [self valueAtIndex:index]; +} + +- (void)setObject:(id)object forKeyedSubscript:(NSObject *)key +{ + if (![key isKindOfClass:[NSString class]]) { + key = [[JSValue valueWithObject:key inContext:_context] toString]; + if (!key) + return; + } + + [self setValue:object forProperty:(NSString *)key]; +} + +- (void)setObject:(id)object atIndexedSubscript:(NSUInteger)index +{ + [self setValue:object atIndex:index]; +} + +@end + +inline bool isDate(JSObjectRef object, JSGlobalContextRef context) +{ + JSC::APIEntryShim entryShim(toJS(context)); + return toJS(object)->inherits(&JSC::DateInstance::s_info); +} + +inline bool isArray(JSObjectRef object, JSGlobalContextRef context) +{ + JSC::APIEntryShim entryShim(toJS(context)); + return toJS(object)->inherits(&JSC::JSArray::s_info); +} + +@implementation JSValue(Internal) + +enum ConversionType { + ContainerNone, + ContainerArray, + ContainerDictionary +}; + +class JSContainerConvertor { +public: + struct Task { + JSValueRef js; + id objc; + ConversionType type; + }; + + JSContainerConvertor(JSGlobalContextRef context) + : m_context(context) + { + } + + id convert(JSValueRef property); + void add(Task); + Task take(); + bool isWorkListEmpty() const { return !m_worklist.size(); } + +private: + JSGlobalContextRef m_context; + HashMap m_objectMap; + Vector m_worklist; +}; + +inline id JSContainerConvertor::convert(JSValueRef value) +{ + HashMap::iterator iter = m_objectMap.find(value); + if (iter != m_objectMap.end()) + return iter->value; + + Task result = valueToObjectWithoutCopy(m_context, value); + if (result.js) + add(result); + return result.objc; +} + +void JSContainerConvertor::add(Task task) +{ + m_objectMap.add(task.js, task.objc); + if (task.type != ContainerNone) + m_worklist.append(task); +} + +JSContainerConvertor::Task JSContainerConvertor::take() +{ + ASSERT(!isWorkListEmpty()); + Task last = m_worklist.last(); + m_worklist.removeLast(); + return last; +} + +static JSContainerConvertor::Task valueToObjectWithoutCopy(JSGlobalContextRef context, JSValueRef value) +{ + if (!JSValueIsObject(context, value)) { + id primitive; + if (JSValueIsBoolean(context, value)) + primitive = JSValueToBoolean(context, value) ? @YES : @NO; + else if (JSValueIsNumber(context, value)) { + // Normalize the number, so it will unique correctly in the hash map - + // it's nicer not to leak this internal implementation detail! + value = JSValueMakeNumber(context, JSValueToNumber(context, value, 0)); + primitive = [NSNumber numberWithDouble:JSValueToNumber(context, value, 0)]; + } else if (JSValueIsString(context, value)) { + // Would be nice to unique strings, too. + JSStringRef jsstring = JSValueToStringCopy(context, value, 0); + NSString * stringNS = (NSString *)JSStringCopyCFString(kCFAllocatorDefault, jsstring); + JSStringRelease(jsstring); + primitive = [stringNS autorelease]; + } else if (JSValueIsNull(context, value)) + primitive = [NSNull null]; + else { + ASSERT(JSValueIsUndefined(context, value)); + primitive = nil; + } + return (JSContainerConvertor::Task){ value, primitive, ContainerNone }; + } + + JSObjectRef object = JSValueToObject(context, value, 0); + + if (id wrapped = tryUnwrapObjcObject(context, object)) + return (JSContainerConvertor::Task){ object, wrapped, ContainerNone }; + + if (isDate(object, context)) + return (JSContainerConvertor::Task){ object, [NSDate dateWithTimeIntervalSince1970:JSValueToNumber(context, object, 0)], ContainerNone }; + + if (isArray(object, context)) + return (JSContainerConvertor::Task){ object, [NSMutableArray array], ContainerArray }; + + return (JSContainerConvertor::Task){ object, [NSMutableDictionary dictionary], ContainerDictionary }; +} + +static id containerValueToObject(JSGlobalContextRef context, JSContainerConvertor::Task task) +{ + ASSERT(task.type != ContainerNone); + JSContainerConvertor convertor(context); + convertor.add(task); + ASSERT(!convertor.isWorkListEmpty()); + + do { + JSContainerConvertor::Task current = convertor.take(); + ASSERT(JSValueIsObject(context, current.js)); + JSObjectRef js = JSValueToObject(context, current.js, 0); + + if (current.type == ContainerArray) { + ASSERT([current.objc isKindOfClass:[NSMutableArray class]]); + NSMutableArray *array = (NSMutableArray *)current.objc; + + JSStringRef lengthString = JSStringCreateWithUTF8CString("length"); + unsigned length = JSC::toUInt32(JSValueToNumber(context, JSObjectGetProperty(context, js, lengthString, 0), 0)); + JSStringRelease(lengthString); + + for (unsigned i = 0; i < length; ++i) { + id objc = convertor.convert(JSObjectGetPropertyAtIndex(context, js, i, 0)); + [array addObject:objc ? objc : [NSNull null]]; + } + } else { + ASSERT([current.objc isKindOfClass:[NSMutableDictionary class]]); + NSMutableDictionary *dictionary = (NSMutableDictionary *)current.objc; + + JSPropertyNameArrayRef propertyNameArray = JSObjectCopyPropertyNames(context, js); + size_t length = JSPropertyNameArrayGetCount(propertyNameArray); + + for (size_t i = 0; i < length; ++i) { + JSStringRef propertyName = JSPropertyNameArrayGetNameAtIndex(propertyNameArray, i); + if (id objc = convertor.convert(JSObjectGetProperty(context, js, propertyName, 0))) + dictionary[[(NSString *)JSStringCopyCFString(kCFAllocatorDefault, propertyName) autorelease]] = objc; + } + + JSPropertyNameArrayRelease(propertyNameArray); + } + + } while (!convertor.isWorkListEmpty()); + + return task.objc; +} + +id valueToObject(JSContext *context, JSValueRef value) +{ + JSContainerConvertor::Task result = valueToObjectWithoutCopy([context JSGlobalContextRef], value); + if (result.type == ContainerNone) + return result.objc; + return containerValueToObject([context JSGlobalContextRef], result); +} + +id valueToNumber(JSGlobalContextRef context, JSValueRef value, JSValueRef* exception) +{ + ASSERT(!*exception); + if (id wrapped = tryUnwrapObjcObject(context, value)) { + if ([wrapped isKindOfClass:[NSNumber class]]) + return wrapped; + } + + if (JSValueIsBoolean(context, value)) + return JSValueToBoolean(context, value) ? @YES : @NO; + + double result = JSValueToNumber(context, value, exception); + return [NSNumber numberWithDouble:*exception ? std::numeric_limits::quiet_NaN() : result]; +} + +id valueToString(JSGlobalContextRef context, JSValueRef value, JSValueRef* exception) +{ + ASSERT(!*exception); + if (id wrapped = tryUnwrapObjcObject(context, value)) { + if ([wrapped isKindOfClass:[NSString class]]) + return wrapped; + } + + JSStringRef jsstring = JSValueToStringCopy(context, value, exception); + if (*exception) { + ASSERT(!jsstring); + return nil; + } + + NSString *stringNS = [(NSString *)JSStringCopyCFString(kCFAllocatorDefault, jsstring) autorelease]; + JSStringRelease(jsstring); + return stringNS; +} + +id valueToDate(JSGlobalContextRef context, JSValueRef value, JSValueRef* exception) +{ + ASSERT(!*exception); + if (id wrapped = tryUnwrapObjcObject(context, value)) { + if ([wrapped isKindOfClass:[NSDate class]]) + return wrapped; + } + + double result = JSValueToNumber(context, value, exception); + return *exception ? nil : [NSDate dateWithTimeIntervalSince1970:result]; +} + +id valueToArray(JSGlobalContextRef context, JSValueRef value, JSValueRef* exception) +{ + ASSERT(!*exception); + if (id wrapped = tryUnwrapObjcObject(context, value)) { + if ([wrapped isKindOfClass:[NSArray class]]) + return wrapped; + } + + if (JSValueIsObject(context, value)) + return containerValueToObject(context, (JSContainerConvertor::Task){ value, [NSMutableArray array], ContainerArray}); + + if (!(JSValueIsNull(context, value) || JSValueIsUndefined(context, value))) + *exception = toRef(JSC::createTypeError(toJS(context), "Cannot convert primitive to NSArray")); + return nil; +} + +id valueToDictionary(JSGlobalContextRef context, JSValueRef value, JSValueRef* exception) +{ + ASSERT(!*exception); + if (id wrapped = tryUnwrapObjcObject(context, value)) { + if ([wrapped isKindOfClass:[NSDictionary class]]) + return wrapped; + } + + if (JSValueIsObject(context, value)) + return containerValueToObject(context, (JSContainerConvertor::Task){ value, [NSMutableDictionary dictionary], ContainerDictionary}); + + if (!(JSValueIsNull(context, value) || JSValueIsUndefined(context, value))) + *exception = toRef(JSC::createTypeError(toJS(context), "Cannot convert primitive to NSDictionary")); + return nil; +} + +class ObjcContainerConvertor { +public: + struct Task { + id objc; + JSValueRef js; + ConversionType type; + }; + + ObjcContainerConvertor(JSContext *context) + : m_context(context) + { + } + + JSValueRef convert(id object); + void add(Task); + Task take(); + bool isWorkListEmpty() const { return !m_worklist.size(); } + +private: + JSContext *m_context; + HashMap m_objectMap; + Vector m_worklist; +}; + +JSValueRef ObjcContainerConvertor::convert(id object) +{ + ASSERT(object); + + auto it = m_objectMap.find(object); + if (it != m_objectMap.end()) + return it->value; + + ObjcContainerConvertor::Task task = objectToValueWithoutCopy(m_context, object); + add(task); + return task.js; +} + +void ObjcContainerConvertor::add(ObjcContainerConvertor::Task task) +{ + m_objectMap.add(task.objc, task.js); + if (task.type != ContainerNone) + m_worklist.append(task); +} + +ObjcContainerConvertor::Task ObjcContainerConvertor::take() +{ + ASSERT(!isWorkListEmpty()); + Task last = m_worklist.last(); + m_worklist.removeLast(); + return last; +} + +inline bool isNSBoolean(id object) +{ + ASSERT([@YES class] == [@NO class]); + ASSERT([@YES class] != [NSNumber class]); + ASSERT([[@YES class] isSubclassOfClass:[NSNumber class]]); + return [object isKindOfClass:[@YES class]]; +} + +static ObjcContainerConvertor::Task objectToValueWithoutCopy(JSContext *context, id object) +{ + JSGlobalContextRef contextRef = [context JSGlobalContextRef]; + + if (!object) + return (ObjcContainerConvertor::Task){ object, JSValueMakeUndefined(contextRef), ContainerNone }; + + if (!class_conformsToProtocol(object_getClass(object), getJSExportProtocol())) { + if ([object isKindOfClass:[NSArray class]]) + return (ObjcContainerConvertor::Task){ object, JSObjectMakeArray(contextRef, 0, NULL, 0), ContainerArray }; + + if ([object isKindOfClass:[NSDictionary class]]) + return (ObjcContainerConvertor::Task){ object, JSObjectMake(contextRef, 0, 0), ContainerDictionary }; + + if ([object isKindOfClass:[NSNull class]]) + return (ObjcContainerConvertor::Task){ object, JSValueMakeNull(contextRef), ContainerNone }; + + if ([object isKindOfClass:[JSValue class]]) + return (ObjcContainerConvertor::Task){ object, ((JSValue *)object)->m_value, ContainerNone }; + + if ([object isKindOfClass:[NSString class]]) { + JSStringRef string = JSStringCreateWithCFString((CFStringRef)object); + JSValueRef js = JSValueMakeString(contextRef, string); + JSStringRelease(string); + return (ObjcContainerConvertor::Task){ object, js, ContainerNone }; + } + + if ([object isKindOfClass:[NSNumber class]]) { + if (isNSBoolean(object)) + return (ObjcContainerConvertor::Task){ object, JSValueMakeBoolean(contextRef, [object boolValue]), ContainerNone }; + return (ObjcContainerConvertor::Task){ object, JSValueMakeNumber(contextRef, [object doubleValue]), ContainerNone }; + } + + if ([object isKindOfClass:[NSDate class]]) { + JSValueRef argument = JSValueMakeNumber(contextRef, [object timeIntervalSince1970]); + JSObjectRef result = JSObjectMakeDate(contextRef, 1, &argument, 0); + return (ObjcContainerConvertor::Task){ object, result, ContainerNone }; + } + + if ([object isKindOfClass:[JSManagedValue class]]) { + JSValue *value = [static_cast(object) value]; + if (!value) + return (ObjcContainerConvertor::Task) { object, JSValueMakeUndefined(contextRef), ContainerNone }; + return (ObjcContainerConvertor::Task){ object, value->m_value, ContainerNone }; + } + } + + return (ObjcContainerConvertor::Task){ object, valueInternalValue([context wrapperForObjCObject:object]), ContainerNone }; +} + +JSValueRef objectToValue(JSContext *context, id object) +{ + JSGlobalContextRef contextRef = [context JSGlobalContextRef]; + + ObjcContainerConvertor::Task task = objectToValueWithoutCopy(context, object); + if (task.type == ContainerNone) + return task.js; + + ObjcContainerConvertor convertor(context); + convertor.add(task); + ASSERT(!convertor.isWorkListEmpty()); + + do { + ObjcContainerConvertor::Task current = convertor.take(); + ASSERT(JSValueIsObject(contextRef, current.js)); + JSObjectRef js = JSValueToObject(contextRef, current.js, 0); + + if (current.type == ContainerArray) { + ASSERT([current.objc isKindOfClass:[NSArray class]]); + NSArray *array = (NSArray *)current.objc; + NSUInteger count = [array count]; + for (NSUInteger index = 0; index < count; ++index) + JSObjectSetPropertyAtIndex(contextRef, js, index, convertor.convert([array objectAtIndex:index]), 0); + } else { + ASSERT(current.type == ContainerDictionary); + ASSERT([current.objc isKindOfClass:[NSDictionary class]]); + NSDictionary *dictionary = (NSDictionary *)current.objc; + for (id key in [dictionary keyEnumerator]) { + if ([key isKindOfClass:[NSString class]]) { + JSStringRef propertyName = JSStringCreateWithCFString((CFStringRef)key); + JSObjectSetProperty(contextRef, js, propertyName, convertor.convert([dictionary objectForKey:key]), 0, 0); + JSStringRelease(propertyName); + } + } + } + + } while (!convertor.isWorkListEmpty()); + + return task.js; +} + +JSValueRef valueInternalValue(JSValue * value) +{ + return value->m_value; +} + ++ (JSValue *)valueWithJSValueRef:(JSValueRef)value inContext:(JSContext *)context +{ + return [context wrapperForJSObject:value]; +} + +- (JSValue *)init +{ + return nil; +} + +- (JSValue *)initWithValue:(JSValueRef)value inContext:(JSContext *)context +{ + if (!value || !context) + return nil; + + self = [super init]; + if (!self) + return nil; + + _context = [context retain]; + m_value = value; + JSValueProtect([_context JSGlobalContextRef], m_value); + return self; +} + +struct StructTagHandler { + SEL typeToValueSEL; + SEL valueToTypeSEL; +}; +typedef HashMap StructHandlers; + +static StructHandlers* createStructHandlerMap() +{ + StructHandlers* structHandlers = new StructHandlers(); + + size_t valueWithXinContextLength = strlen("valueWithX:inContext:"); + size_t toXLength = strlen("toX"); + + // Step 1: find all valueWith:inContext: class methods in JSValue. + forEachMethodInClass(object_getClass([JSValue class]), ^(Method method){ + SEL selector = method_getName(method); + const char* name = sel_getName(selector); + size_t nameLength = strlen(name); + // Check for valueWith:context: + if (nameLength < valueWithXinContextLength || memcmp(name, "valueWith", 9) || memcmp(name + nameLength - 11, ":inContext:", 11)) + return; + // Check for [ id, SEL, , ] + if (method_getNumberOfArguments(method) != 4) + return; + char idType[3]; + // Check 2nd argument type is "@" + char* secondType = method_copyArgumentType(method, 3); + if (strcmp(secondType, "@") != 0) { + free(secondType); + return; + } + free(secondType); + // Check result type is also "@" + method_getReturnType(method, idType, 3); + if (strcmp(idType, "@") != 0) + return; + char* type = method_copyArgumentType(method, 2); + structHandlers->add(StringImpl::create(type), (StructTagHandler){ selector, 0 }); + free(type); + }); + + // Step 2: find all to instance methods in JSValue. + forEachMethodInClass([JSValue class], ^(Method method){ + SEL selector = method_getName(method); + const char* name = sel_getName(selector); + size_t nameLength = strlen(name); + // Check for to + if (nameLength < toXLength || memcmp(name, "to", 2)) + return; + // Check for [ id, SEL ] + if (method_getNumberOfArguments(method) != 2) + return; + // Try to find a matching valueWith:context: method. + char* type = method_copyReturnType(method); + + StructHandlers::iterator iter = structHandlers->find(type); + free(type); + if (iter == structHandlers->end()) + return; + StructTagHandler& handler = iter->value; + + // check that strlen() == strlen() + const char* valueWithName = sel_getName(handler.typeToValueSEL); + size_t valueWithLength = strlen(valueWithName); + if (valueWithLength - valueWithXinContextLength != nameLength - toXLength) + return; + // Check that == + if (memcmp(valueWithName + 9, name + 2, nameLength - toXLength - 1)) + return; + handler.valueToTypeSEL = selector; + }); + + // Step 3: clean up - remove entries where we found prospective valueWith:inContext: conversions, but no matching to methods. + typedef HashSet RemoveSet; + RemoveSet removeSet; + for (StructHandlers::iterator iter = structHandlers->begin(); iter != structHandlers->end(); ++iter) { + StructTagHandler& handler = iter->value; + if (!handler.valueToTypeSEL) + removeSet.add(iter->key); + } + + for (RemoveSet::iterator iter = removeSet.begin(); iter != removeSet.end(); ++iter) + structHandlers->remove(*iter); + + return structHandlers; +} + +static StructTagHandler* handerForStructTag(const char* encodedType) +{ + static SpinLock handerForStructTagLock = SPINLOCK_INITIALIZER; + SpinLockHolder lockHolder(&handerForStructTagLock); + + static StructHandlers* structHandlers = createStructHandlerMap(); + + StructHandlers::iterator iter = structHandlers->find(encodedType); + if (iter == structHandlers->end()) + return 0; + return &iter->value; +} + ++ (SEL)selectorForStructToValue:(const char *)structTag +{ + StructTagHandler* handler = handerForStructTag(structTag); + return handler ? handler->typeToValueSEL : nil; +} + ++ (SEL)selectorForValueToStruct:(const char *)structTag +{ + StructTagHandler* handler = handerForStructTag(structTag); + return handler ? handler->valueToTypeSEL : nil; +} + +- (void)dealloc +{ + JSValueUnprotect([_context JSGlobalContextRef], m_value); + [_context release]; + _context = nil; + [super dealloc]; +} + +- (NSString *)description +{ + if (id wrapped = tryUnwrapObjcObject([_context JSGlobalContextRef], m_value)) + return [wrapped description]; + return [self toString]; +} + +NSInvocation *typeToValueInvocationFor(const char* encodedType) +{ + SEL selector = [JSValue selectorForStructToValue:encodedType]; + if (!selector) + return 0; + + const char* methodTypes = method_getTypeEncoding(class_getClassMethod([JSValue class], selector)); + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[NSMethodSignature signatureWithObjCTypes:methodTypes]]; + [invocation setSelector:selector]; + return invocation; +} + +NSInvocation *valueToTypeInvocationFor(const char* encodedType) +{ + SEL selector = [JSValue selectorForValueToStruct:encodedType]; + if (!selector) + return 0; + + const char* methodTypes = method_getTypeEncoding(class_getInstanceMethod([JSValue class], selector)); + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[NSMethodSignature signatureWithObjCTypes:methodTypes]]; + [invocation setSelector:selector]; + return invocation; +} + +@end + +#endif diff --git a/Source/JavaScriptCore/API/JSValueInternal.h b/Source/JavaScriptCore/API/JSValueInternal.h new file mode 100644 index 000000000..4f1a8f69c --- /dev/null +++ b/Source/JavaScriptCore/API/JSValueInternal.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSValueInternal_h +#define JSValueInternal_h + +#import +#import + +#if JSC_OBJC_API_ENABLED + +@interface JSValue(Internal) + +JSValueRef valueInternalValue(JSValue *); + +- (JSValue *)initWithValue:(JSValueRef)value inContext:(JSContext *)context; + +JSValueRef objectToValue(JSContext *, id); +id valueToObject(JSContext *, JSValueRef); +id valueToNumber(JSGlobalContextRef, JSValueRef, JSValueRef* exception); +id valueToString(JSGlobalContextRef, JSValueRef, JSValueRef* exception); +id valueToDate(JSGlobalContextRef, JSValueRef, JSValueRef* exception); +id valueToArray(JSGlobalContextRef, JSValueRef, JSValueRef* exception); +id valueToDictionary(JSGlobalContextRef, JSValueRef, JSValueRef* exception); + ++ (SEL)selectorForStructToValue:(const char *)structTag; ++ (SEL)selectorForValueToStruct:(const char *)structTag; + +@end + +NSInvocation *typeToValueInvocationFor(const char* encodedType); +NSInvocation *valueToTypeInvocationFor(const char* encodedType); + +#endif + +#endif // JSValueInternal_h diff --git a/Source/JavaScriptCore/API/JSValueRef.cpp b/Source/JavaScriptCore/API/JSValueRef.cpp index 5ff7c03c6..81a2db7b7 100644 --- a/Source/JavaScriptCore/API/JSValueRef.cpp +++ b/Source/JavaScriptCore/API/JSValueRef.cpp @@ -28,15 +28,16 @@ #include "APICast.h" #include "APIShims.h" +#include "JSAPIWrapperObject.h" #include "JSCallbackObject.h" +#include #include #include #include #include #include #include -#include #include #include @@ -44,10 +45,29 @@ #include // for std::min +#if PLATFORM(MAC) +#include +#endif + using namespace JSC; +#if PLATFORM(MAC) +static bool evernoteHackNeeded() +{ + static const int32_t webkitLastVersionWithEvernoteHack = 35133959; + static bool hackNeeded = CFEqual(CFBundleGetIdentifier(CFBundleGetMainBundle()), CFSTR("com.evernote.Evernote")) + && NSVersionOfLinkTimeLibrary("JavaScriptCore") <= webkitLastVersionWithEvernoteHack; + + return hackNeeded; +} +#endif + ::JSType JSValueGetType(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return kJSTypeUndefined; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -69,6 +89,10 @@ using namespace JSC; bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -78,6 +102,10 @@ bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) bool JSValueIsNull(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -87,6 +115,10 @@ bool JSValueIsNull(JSContextRef ctx, JSValueRef value) bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -96,6 +128,10 @@ bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -105,6 +141,10 @@ bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) bool JSValueIsString(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -114,6 +154,10 @@ bool JSValueIsString(JSContextRef ctx, JSValueRef value) bool JSValueIsObject(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -123,6 +167,10 @@ bool JSValueIsObject(JSContextRef ctx, JSValueRef value) bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass) { + if (!ctx || !jsClass) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -133,12 +181,20 @@ bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsCla return jsCast*>(o)->inherits(jsClass); if (o->inherits(&JSCallbackObject::s_info)) return jsCast*>(o)->inherits(jsClass); +#if JSC_OBJC_API_ENABLED + if (o->inherits(&JSCallbackObject::s_info)) + return jsCast*>(o)->inherits(jsClass); +#endif } return false; } bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -156,6 +212,10 @@ bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* ex bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -167,6 +227,10 @@ bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b) bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -186,6 +250,10 @@ bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObject JSValueRef JSValueMakeUndefined(JSContextRef ctx) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -194,6 +262,10 @@ JSValueRef JSValueMakeUndefined(JSContextRef ctx) JSValueRef JSValueMakeNull(JSContextRef ctx) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -202,6 +274,10 @@ JSValueRef JSValueMakeNull(JSContextRef ctx) JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -210,13 +286,17 @@ JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); // Our JSValue representation relies on a standard bit pattern for NaN. NaNs // generated internally to JavaScriptCore naturally have that representation, // but an external NaN might not. - if (isnan(value)) + if (std::isnan(value)) value = QNaN; return toRef(exec, jsNumber(value)); @@ -224,6 +304,10 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -232,6 +316,10 @@ JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); String str = string->string(); @@ -246,6 +334,10 @@ JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsigned indent, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSValue value = toJS(exec, apiValue); @@ -263,6 +355,10 @@ JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsig bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return false; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -272,6 +368,10 @@ bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return QNaN; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -289,6 +389,10 @@ double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -306,6 +410,10 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -323,6 +431,10 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce void JSValueProtect(JSContextRef ctx, JSValueRef value) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); @@ -332,6 +444,11 @@ void JSValueProtect(JSContextRef ctx, JSValueRef value) void JSValueUnprotect(JSContextRef ctx, JSValueRef value) { +#if PLATFORM(MAC) + if ((!value || !ctx) && evernoteHackNeeded()) + return; +#endif + ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); diff --git a/Source/JavaScriptCore/API/JSVirtualMachine.h b/Source/JavaScriptCore/API/JSVirtualMachine.h new file mode 100644 index 000000000..b50616f4c --- /dev/null +++ b/Source/JavaScriptCore/API/JSVirtualMachine.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + +#if JSC_OBJC_API_ENABLED + +// An instance of JSVirtualMachine represents a single JavaScript "object space" +// or set of execution resources. Thread safety is supported by locking the +// virtual machine, with concurrent JavaScript execution supported by allocating +// separate instances of JSVirtualMachine. + +NS_CLASS_AVAILABLE(10_9, NA) +@interface JSVirtualMachine : NSObject + +// Create a new JSVirtualMachine. +- (id)init; + +// addManagedReference:withOwner and removeManagedReference:withOwner allow +// clients of JSVirtualMachine to make the JavaScript runtime aware of +// arbitrary external Objective-C object graphs. The runtime can then use +// this information to retain any JavaScript values that are referenced +// from somewhere in said object graph. +// +// For correct behavior clients must make their external object graphs +// reachable from within the JavaScript runtime. If an Objective-C object is +// reachable from within the JavaScript runtime, all managed references +// transitively reachable from it as recorded with +// addManagedReference:withOwner: will be scanned by the garbage collector. +// +- (void)addManagedReference:(id)object withOwner:(id)owner; +- (void)removeManagedReference:(id)object withOwner:(id)owner; + +@end + +#endif diff --git a/Source/JavaScriptCore/API/JSVirtualMachine.mm b/Source/JavaScriptCore/API/JSVirtualMachine.mm new file mode 100644 index 000000000..6bada34a6 --- /dev/null +++ b/Source/JavaScriptCore/API/JSVirtualMachine.mm @@ -0,0 +1,255 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#import "JavaScriptCore.h" + +#if JSC_OBJC_API_ENABLED + +#import "APICast.h" +#import "APIShims.h" +#import "JSVirtualMachine.h" +#import "JSVirtualMachineInternal.h" +#import "JSWrapperMap.h" + +static NSMapTable *globalWrapperCache = 0; + +static Mutex& wrapperCacheLock() +{ + DEFINE_STATIC_LOCAL(Mutex, mutex, ()); + return mutex; +} + +static void initWrapperCache() +{ + ASSERT(!globalWrapperCache); + NSPointerFunctionsOptions keyOptions = NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality; + NSPointerFunctionsOptions valueOptions = NSPointerFunctionsWeakMemory | NSPointerFunctionsObjectPersonality; + globalWrapperCache = [[NSMapTable alloc] initWithKeyOptions:keyOptions valueOptions:valueOptions capacity:0]; +} + +static NSMapTable *wrapperCache() +{ + if (!globalWrapperCache) + initWrapperCache(); + return globalWrapperCache; +} + +@interface JSVMWrapperCache : NSObject ++ (void)addWrapper:(JSVirtualMachine *)wrapper forJSContextGroupRef:(JSContextGroupRef)group; ++ (JSVirtualMachine *)wrapperForJSContextGroupRef:(JSContextGroupRef)group; +@end + +@implementation JSVMWrapperCache + ++ (void)addWrapper:(JSVirtualMachine *)wrapper forJSContextGroupRef:(JSContextGroupRef)group +{ + MutexLocker locker(wrapperCacheLock()); + NSMapInsert(wrapperCache(), group, wrapper); +} + ++ (JSVirtualMachine *)wrapperForJSContextGroupRef:(JSContextGroupRef)group +{ + MutexLocker locker(wrapperCacheLock()); + return static_cast(NSMapGet(wrapperCache(), group)); +} + +@end + +@implementation JSVirtualMachine { + JSContextGroupRef m_group; + NSMapTable *m_contextCache; + NSMapTable *m_externalObjectGraph; +} + +- (id)init +{ + JSContextGroupRef group = JSContextGroupCreate(); + self = [self initWithContextGroupRef:group]; + // The extra JSContextGroupRetain is balanced here. + JSContextGroupRelease(group); + return self; +} + +- (id)initWithContextGroupRef:(JSContextGroupRef)group +{ + self = [super init]; + if (!self) + return nil; + + m_group = JSContextGroupRetain(group); + + NSPointerFunctionsOptions keyOptions = NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality; + NSPointerFunctionsOptions valueOptions = NSPointerFunctionsWeakMemory | NSPointerFunctionsObjectPersonality; + m_contextCache = [[NSMapTable alloc] initWithKeyOptions:keyOptions valueOptions:valueOptions capacity:0]; + + NSPointerFunctionsOptions weakIDOptions = NSPointerFunctionsWeakMemory | NSPointerFunctionsObjectPersonality; + NSPointerFunctionsOptions strongIDOptions = NSPointerFunctionsStrongMemory | NSPointerFunctionsObjectPersonality; + m_externalObjectGraph = [[NSMapTable alloc] initWithKeyOptions:weakIDOptions valueOptions:strongIDOptions capacity:0]; + + [JSVMWrapperCache addWrapper:self forJSContextGroupRef:group]; + + return self; +} + +- (void)dealloc +{ + JSContextGroupRelease(m_group); + [m_contextCache release]; + [m_externalObjectGraph release]; + [super dealloc]; +} + +static id getInternalObjcObject(id object) +{ + if ([object isKindOfClass:[JSManagedValue class]]) { + JSValue* value = [static_cast(object) value]; + id temp = tryUnwrapObjcObject([value.context JSGlobalContextRef], [value JSValueRef]); + if (temp) + return temp; + return object; + } + + if ([object isKindOfClass:[JSValue class]]) { + JSValue *value = static_cast(object); + object = tryUnwrapObjcObject([value.context JSGlobalContextRef], [value JSValueRef]); + } + + return object; +} + +- (void)addManagedReference:(id)object withOwner:(id)owner +{ + object = getInternalObjcObject(object); + owner = getInternalObjcObject(owner); + + if (!object || !owner) + return; + + JSC::APIEntryShim shim(toJS(m_group)); + + NSMapTable *ownedObjects = [m_externalObjectGraph objectForKey:owner]; + if (!ownedObjects) { + NSPointerFunctionsOptions weakIDOptions = NSPointerFunctionsWeakMemory | NSPointerFunctionsObjectPersonality; + NSPointerFunctionsOptions integerOptions = NSPointerFunctionsOpaqueMemory | NSPointerFunctionsIntegerPersonality; + ownedObjects = [[NSMapTable alloc] initWithKeyOptions:weakIDOptions valueOptions:integerOptions capacity:1]; + + [m_externalObjectGraph setObject:ownedObjects forKey:owner]; + [ownedObjects release]; + } + NSMapInsert(ownedObjects, object, reinterpret_cast(reinterpret_cast(NSMapGet(ownedObjects, object)) + 1)); +} + +- (void)removeManagedReference:(id)object withOwner:(id)owner +{ + object = getInternalObjcObject(object); + owner = getInternalObjcObject(owner); + + if (!object || !owner) + return; + + JSC::APIEntryShim shim(toJS(m_group)); + + NSMapTable *ownedObjects = [m_externalObjectGraph objectForKey:owner]; + if (!ownedObjects) + return; + + size_t count = reinterpret_cast(NSMapGet(ownedObjects, object)); + if (count > 1) { + NSMapInsert(ownedObjects, object, reinterpret_cast(count - 1)); + return; + } + + if (count == 1) + NSMapRemove(ownedObjects, object); + + if (![ownedObjects count]) + [m_externalObjectGraph removeObjectForKey:owner]; +} + +@end + +@implementation JSVirtualMachine(Internal) + +JSContextGroupRef getGroupFromVirtualMachine(JSVirtualMachine *virtualMachine) +{ + return virtualMachine->m_group; +} + ++ (JSVirtualMachine *)virtualMachineWithContextGroupRef:(JSContextGroupRef)group +{ + JSVirtualMachine *virtualMachine = [JSVMWrapperCache wrapperForJSContextGroupRef:group]; + if (!virtualMachine) + virtualMachine = [[[JSVirtualMachine alloc] initWithContextGroupRef:group] autorelease]; + return virtualMachine; +} + +- (JSContext *)contextForGlobalContextRef:(JSGlobalContextRef)globalContext +{ + return static_cast(NSMapGet(m_contextCache, globalContext)); +} + +- (void)addContext:(JSContext *)wrapper forGlobalContextRef:(JSGlobalContextRef)globalContext +{ + NSMapInsert(m_contextCache, globalContext, wrapper); +} + +- (NSMapTable *)externalObjectGraph +{ + return m_externalObjectGraph; +} + +@end + +void scanExternalObjectGraph(JSC::VM& vm, JSC::SlotVisitor& visitor, void* root) +{ + @autoreleasepool { + JSVirtualMachine *virtualMachine = [JSVMWrapperCache wrapperForJSContextGroupRef:toRef(&vm)]; + if (!virtualMachine) + return; + NSMapTable *externalObjectGraph = [virtualMachine externalObjectGraph]; + Vector stack; + stack.append(root); + while (!stack.isEmpty()) { + void* nextRoot = stack.last(); + stack.removeLast(); + if (visitor.containsOpaqueRootTriState(nextRoot) == TrueTriState) + continue; + visitor.addOpaqueRoot(nextRoot); + + NSMapTable *ownedObjects = [externalObjectGraph objectForKey:static_cast(nextRoot)]; + id ownedObject; + NSEnumerator *enumerator = [ownedObjects keyEnumerator]; + while ((ownedObject = [enumerator nextObject])) { + ASSERT(reinterpret_cast(NSMapGet(ownedObjects, ownedObject)) == 1); + stack.append(static_cast(ownedObject)); + } + } + } +} + +#endif + diff --git a/Source/JavaScriptCore/API/JSVirtualMachineInternal.h b/Source/JavaScriptCore/API/JSVirtualMachineInternal.h new file mode 100644 index 000000000..729226566 --- /dev/null +++ b/Source/JavaScriptCore/API/JSVirtualMachineInternal.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSVirtualMachineInternal_h +#define JSVirtualMachineInternal_h + +#import + +#if JSC_OBJC_API_ENABLED + +namespace JSC { +class VM; +class SlotVisitor; +} + +#if defined(__OBJC__) +@interface JSVirtualMachine(Internal) + +JSContextGroupRef getGroupFromVirtualMachine(JSVirtualMachine *); + ++ (JSVirtualMachine *)virtualMachineWithContextGroupRef:(JSContextGroupRef)group; + +- (JSContext *)contextForGlobalContextRef:(JSGlobalContextRef)globalContext; +- (void)addContext:(JSContext *)wrapper forGlobalContextRef:(JSGlobalContextRef)globalContext; + +- (NSMapTable *)externalObjectGraph; + +@end +#endif // defined(__OBJC__) + +void scanExternalObjectGraph(JSC::VM&, JSC::SlotVisitor&, void* root); + +#endif + +#endif // JSVirtualMachineInternal_h diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp index bdfce08ee..8cbe263a7 100644 --- a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp @@ -28,9 +28,11 @@ #include "APICast.h" #include "APIShims.h" +#include "JSCJSValue.h" #include "JSCallbackObject.h" -#include "JSValue.h" #include "JSWeakObjectMapRefInternal.h" +#include "Operations.h" +#include "Weak.h" #include #include @@ -52,17 +54,25 @@ JSWeakObjectMapRef JSWeakObjectMapCreate(JSContextRef context, void* privateData void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); JSObject* obj = toJS(object); if (!obj) return; ASSERT(obj->inherits(&JSCallbackObject::s_info) || obj->inherits(&JSCallbackObject::s_info)); - map->map().set(exec->globalData(), key, obj); + map->map().set(key, obj); } JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return 0; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); return toRef(jsCast(map->map().get(key))); @@ -70,6 +80,10 @@ JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* k void JSWeakObjectMapRemove(JSContextRef ctx, JSWeakObjectMapRef map, void* key) { + if (!ctx) { + ASSERT_NOT_REACHED(); + return; + } ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); map->map().remove(key); diff --git a/Source/JavaScriptCore/API/JSWrapperMap.h b/Source/JavaScriptCore/API/JSWrapperMap.h new file mode 100644 index 000000000..ce74a9c61 --- /dev/null +++ b/Source/JavaScriptCore/API/JSWrapperMap.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import +#import + +#if JSC_OBJC_API_ENABLED + +@interface JSWrapperMap : NSObject + +- (id)initWithContext:(JSContext *)context; + +- (JSValue *)jsWrapperForObject:(id)object; + +- (JSValue *)objcWrapperForJSValueRef:(JSValueRef)value; + +@end + +id tryUnwrapObjcObject(JSGlobalContextRef, JSValueRef); + +Protocol *getJSExportProtocol(); +Class getNSBlockClass(); + +#endif diff --git a/Source/JavaScriptCore/API/JSWrapperMap.mm b/Source/JavaScriptCore/API/JSWrapperMap.mm new file mode 100644 index 000000000..4dde1a659 --- /dev/null +++ b/Source/JavaScriptCore/API/JSWrapperMap.mm @@ -0,0 +1,521 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#import "JavaScriptCore.h" + +#if JSC_OBJC_API_ENABLED + +#import "APICast.h" +#import "APIShims.h" +#import "JSAPIWrapperObject.h" +#import "JSCallbackObject.h" +#import "JSContextInternal.h" +#import "JSWrapperMap.h" +#import "ObjCCallbackFunction.h" +#import "ObjcRuntimeExtras.h" +#import "Operations.h" +#import "WeakGCMap.h" +#import +#import + +@class JSObjCClassInfo; + +@interface JSWrapperMap () + +- (JSObjCClassInfo*)classInfoForClass:(Class)cls; + +@end + +// Default conversion of selectors to property names. +// All semicolons are removed, lowercase letters following a semicolon are capitalized. +static NSString *selectorToPropertyName(const char* start) +{ + // Use 'index' to check for colons, if there are none, this is easy! + const char* firstColon = index(start, ':'); + if (!firstColon) + return [NSString stringWithUTF8String:start]; + + // 'header' is the length of string up to the first colon. + size_t header = firstColon - start; + // The new string needs to be long enough to hold 'header', plus the remainder of the string, excluding + // at least one ':', but including a '\0'. (This is conservative if there are more than one ':'). + char* buffer = static_cast(malloc(header + strlen(firstColon + 1) + 1)); + // Copy 'header' characters, set output to point to the end of this & input to point past the first ':'. + memcpy(buffer, start, header); + char* output = buffer + header; + const char* input = start + header + 1; + + // On entry to the loop, we have already skipped over a ':' from the input. + while (true) { + char c; + // Skip over any additional ':'s. We'll leave c holding the next character after the + // last ':', and input pointing past c. + while ((c = *(input++)) == ':'); + // Copy the character, converting to upper case if necessary. + // If the character we copy is '\0', then we're done! + if (!(*(output++) = toupper(c))) + goto done; + // Loop over characters other than ':'. + while ((c = *(input++)) != ':') { + // Copy the character. + // If the character we copy is '\0', then we're done! + if (!(*(output++) = c)) + goto done; + } + // If we get here, we've consumed a ':' - wash, rinse, repeat. + } +done: + NSString *result = [NSString stringWithUTF8String:buffer]; + free(buffer); + return result; +} + +static JSObjectRef makeWrapper(JSContextRef ctx, JSClassRef jsClass, id wrappedObject) +{ + JSC::ExecState* exec = toJS(ctx); + JSC::APIEntryShim entryShim(exec); + + ASSERT(jsClass); + JSC::JSCallbackObject* object = JSC::JSCallbackObject::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->objcWrapperObjectStructure(), jsClass, 0); + object->setWrappedObject(wrappedObject); + if (JSC::JSObject* prototype = jsClass->prototype(exec)) + object->setPrototype(exec->vm(), prototype); + + return toRef(object); +} + +// Make an object that is in all ways a completely vanilla JavaScript object, +// other than that it has a native brand set that will be displayed by the default +// Object.prototype.toString conversion. +static JSValue *objectWithCustomBrand(JSContext *context, NSString *brand, Class cls = 0) +{ + JSClassDefinition definition; + definition = kJSClassDefinitionEmpty; + definition.className = [brand UTF8String]; + JSClassRef classRef = JSClassCreate(&definition); + JSObjectRef result = makeWrapper([context JSGlobalContextRef], classRef, cls); + JSClassRelease(classRef); + return [JSValue valueWithJSValueRef:result inContext:context]; +} + +// Look for @optional properties in the prototype containing a selector to property +// name mapping, separated by a __JS_EXPORT_AS__ delimiter. +static NSMutableDictionary *createRenameMap(Protocol *protocol, BOOL isInstanceMethod) +{ + NSMutableDictionary *renameMap = [[NSMutableDictionary alloc] init]; + + forEachMethodInProtocol(protocol, NO, isInstanceMethod, ^(SEL sel, const char*){ + NSString *rename = @(sel_getName(sel)); + NSRange range = [rename rangeOfString:@"__JS_EXPORT_AS__"]; + if (range.location == NSNotFound) + return; + NSString *selector = [rename substringToIndex:range.location]; + NSUInteger begin = range.location + range.length; + NSUInteger length = [rename length] - begin - 1; + NSString *name = [rename substringWithRange:(NSRange){ begin, length }]; + renameMap[selector] = name; + }); + + return renameMap; +} + +inline void putNonEnumerable(JSValue *base, NSString *propertyName, JSValue *value) +{ + [base defineProperty:propertyName descriptor:@{ + JSPropertyDescriptorValueKey: value, + JSPropertyDescriptorWritableKey: @YES, + JSPropertyDescriptorEnumerableKey: @NO, + JSPropertyDescriptorConfigurableKey: @YES + }]; +} + +// This method will iterate over the set of required methods in the protocol, and: +// * Determine a property name (either via a renameMap or default conversion). +// * If an accessorMap is provided, and contains this name, store the method in the map. +// * Otherwise, if the object doesn't already contain a property with name, create it. +static void copyMethodsToObject(JSContext *context, Class objcClass, Protocol *protocol, BOOL isInstanceMethod, JSValue *object, NSMutableDictionary *accessorMethods = nil) +{ + NSMutableDictionary *renameMap = createRenameMap(protocol, isInstanceMethod); + + forEachMethodInProtocol(protocol, YES, isInstanceMethod, ^(SEL sel, const char* types){ + const char* nameCStr = sel_getName(sel); + NSString *name = @(nameCStr); + if (accessorMethods && accessorMethods[name]) { + JSObjectRef method = objCCallbackFunctionForMethod(context, objcClass, protocol, isInstanceMethod, sel, types); + if (!method) + return; + accessorMethods[name] = [JSValue valueWithJSValueRef:method inContext:context]; + } else { + name = renameMap[name]; + if (!name) + name = selectorToPropertyName(nameCStr); + if ([object hasProperty:name]) + return; + JSObjectRef method = objCCallbackFunctionForMethod(context, objcClass, protocol, isInstanceMethod, sel, types); + if (method) + putNonEnumerable(object, name, [JSValue valueWithJSValueRef:method inContext:context]); + } + }); + + [renameMap release]; +} + +static bool parsePropertyAttributes(objc_property_t property, char*& getterName, char*& setterName) +{ + bool readonly = false; + unsigned attributeCount; + objc_property_attribute_t* attributes = property_copyAttributeList(property, &attributeCount); + if (attributeCount) { + for (unsigned i = 0; i < attributeCount; ++i) { + switch (*(attributes[i].name)) { + case 'G': + getterName = strdup(attributes[i].value); + break; + case 'S': + setterName = strdup(attributes[i].value); + break; + case 'R': + readonly = true; + break; + default: + break; + } + } + free(attributes); + } + return readonly; +} + +static char* makeSetterName(const char* name) +{ + size_t nameLength = strlen(name); + char* setterName = (char*)malloc(nameLength + 5); // "set" Name ":\0" + setterName[0] = 's'; + setterName[1] = 'e'; + setterName[2] = 't'; + setterName[3] = toupper(*name); + memcpy(setterName + 4, name + 1, nameLength - 1); + setterName[nameLength + 3] = ':'; + setterName[nameLength + 4] = '\0'; + return setterName; +} + +static void copyPrototypeProperties(JSContext *context, Class objcClass, Protocol *protocol, JSValue *prototypeValue) +{ + // First gather propreties into this list, then handle the methods (capturing the accessor methods). + struct Property { + const char* name; + char* getterName; + char* setterName; + }; + __block Vector propertyList; + + // Map recording the methods used as getters/setters. + NSMutableDictionary *accessorMethods = [NSMutableDictionary dictionary]; + + // Useful value. + JSValue *undefined = [JSValue valueWithUndefinedInContext:context]; + + forEachPropertyInProtocol(protocol, ^(objc_property_t property){ + char* getterName = 0; + char* setterName = 0; + bool readonly = parsePropertyAttributes(property, getterName, setterName); + const char* name = property_getName(property); + + // Add the names of the getter & setter methods to + if (!getterName) + getterName = strdup(name); + accessorMethods[@(getterName)] = undefined; + if (!readonly) { + if (!setterName) + setterName = makeSetterName(name); + accessorMethods[@(setterName)] = undefined; + } + + // Add the properties to a list. + propertyList.append((Property){ name, getterName, setterName }); + }); + + // Copy methods to the prototype, capturing accessors in the accessorMethods map. + copyMethodsToObject(context, objcClass, protocol, YES, prototypeValue, accessorMethods); + + // Iterate the propertyList & generate accessor properties. + for (size_t i = 0; i < propertyList.size(); ++i) { + Property& property = propertyList[i]; + + JSValue *getter = accessorMethods[@(property.getterName)]; + free(property.getterName); + ASSERT(![getter isUndefined]); + + JSValue *setter = undefined; + if (property.setterName) { + setter = accessorMethods[@(property.setterName)]; + free(property.setterName); + ASSERT(![setter isUndefined]); + } + + [prototypeValue defineProperty:@(property.name) descriptor:@{ + JSPropertyDescriptorGetKey: getter, + JSPropertyDescriptorSetKey: setter, + JSPropertyDescriptorEnumerableKey: @NO, + JSPropertyDescriptorConfigurableKey: @YES + }]; + } +} + +@interface JSObjCClassInfo : NSObject { + JSContext *m_context; + Class m_class; + bool m_block; + JSClassRef m_classRef; + JSC::Weak m_prototype; + JSC::Weak m_constructor; +} + +- (id)initWithContext:(JSContext *)context forClass:(Class)cls superClassInfo:(JSObjCClassInfo*)superClassInfo; +- (JSValue *)wrapperForObject:(id)object; +- (JSValue *)constructor; + +@end + +@implementation JSObjCClassInfo + +- (id)initWithContext:(JSContext *)context forClass:(Class)cls superClassInfo:(JSObjCClassInfo*)superClassInfo +{ + self = [super init]; + if (!self) + return nil; + + const char* className = class_getName(cls); + m_context = context; + m_class = cls; + m_block = [cls isSubclassOfClass:getNSBlockClass()]; + JSClassDefinition definition; + definition = kJSClassDefinitionEmpty; + definition.className = className; + m_classRef = JSClassCreate(&definition); + + [self allocateConstructorAndPrototypeWithSuperClassInfo:superClassInfo]; + + return self; +} + +- (void)dealloc +{ + JSClassRelease(m_classRef); + [super dealloc]; +} + +- (void)allocateConstructorAndPrototypeWithSuperClassInfo:(JSObjCClassInfo*)superClassInfo +{ + ASSERT(!m_constructor || !m_prototype); + ASSERT((m_class == [NSObject class]) == !superClassInfo); + if (!superClassInfo) { + JSContextRef cContext = [m_context JSGlobalContextRef]; + JSValue *constructor = m_context[@"Object"]; + if (!m_constructor) + m_constructor = toJS(JSValueToObject(cContext, valueInternalValue(constructor), 0)); + + if (!m_prototype) { + JSValue *prototype = constructor[@"prototype"]; + m_prototype = toJS(JSValueToObject(cContext, valueInternalValue(prototype), 0)); + } + } else { + const char* className = class_getName(m_class); + + // Create or grab the prototype/constructor pair. + JSValue *prototype; + JSValue *constructor; + if (m_prototype) + prototype = [JSValue valueWithJSValueRef:toRef(m_prototype.get()) inContext:m_context]; + else + prototype = objectWithCustomBrand(m_context, [NSString stringWithFormat:@"%sPrototype", className]); + + if (m_constructor) + constructor = [JSValue valueWithJSValueRef:toRef(m_constructor.get()) inContext:m_context]; + else + constructor = objectWithCustomBrand(m_context, [NSString stringWithFormat:@"%sConstructor", className], m_class); + + JSContextRef cContext = [m_context JSGlobalContextRef]; + m_prototype = toJS(JSValueToObject(cContext, valueInternalValue(prototype), 0)); + m_constructor = toJS(JSValueToObject(cContext, valueInternalValue(constructor), 0)); + + putNonEnumerable(prototype, @"constructor", constructor); + putNonEnumerable(constructor, @"prototype", prototype); + + Protocol *exportProtocol = getJSExportProtocol(); + forEachProtocolImplementingProtocol(m_class, exportProtocol, ^(Protocol *protocol){ + copyPrototypeProperties(m_context, m_class, protocol, prototype); + copyMethodsToObject(m_context, m_class, protocol, NO, constructor); + }); + + // Set [Prototype]. + JSObjectSetPrototype([m_context JSGlobalContextRef], toRef(m_prototype.get()), toRef(superClassInfo->m_prototype.get())); + } +} + +- (void)reallocateConstructorAndOrPrototype +{ + [self allocateConstructorAndPrototypeWithSuperClassInfo:[m_context.wrapperMap classInfoForClass:class_getSuperclass(m_class)]]; +} + +- (JSValue *)wrapperForObject:(id)object +{ + ASSERT([object isKindOfClass:m_class]); + ASSERT(m_block == [object isKindOfClass:getNSBlockClass()]); + if (m_block) { + if (JSObjectRef method = objCCallbackFunctionForBlock(m_context, object)) + return [JSValue valueWithJSValueRef:method inContext:m_context]; + } + + if (!m_prototype) + [self reallocateConstructorAndOrPrototype]; + ASSERT(!!m_prototype); + + JSObjectRef wrapper = makeWrapper([m_context JSGlobalContextRef], m_classRef, object); + JSObjectSetPrototype([m_context JSGlobalContextRef], wrapper, toRef(m_prototype.get())); + return [JSValue valueWithJSValueRef:wrapper inContext:m_context]; +} + +- (JSValue *)constructor +{ + if (!m_constructor) + [self reallocateConstructorAndOrPrototype]; + ASSERT(!!m_constructor); + return [JSValue valueWithJSValueRef:toRef(m_constructor.get()) inContext:m_context]; +} + +@end + +@implementation JSWrapperMap { + JSContext *m_context; + NSMutableDictionary *m_classMap; + JSC::WeakGCMap m_cachedJSWrappers; + NSMapTable *m_cachedObjCWrappers; +} + +- (id)initWithContext:(JSContext *)context +{ + self = [super init]; + if (!self) + return nil; + + NSPointerFunctionsOptions keyOptions = NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality; + NSPointerFunctionsOptions valueOptions = NSPointerFunctionsWeakMemory | NSPointerFunctionsObjectPersonality; + m_cachedObjCWrappers = [[NSMapTable alloc] initWithKeyOptions:keyOptions valueOptions:valueOptions capacity:0]; + + m_context = context; + m_classMap = [[NSMutableDictionary alloc] init]; + return self; +} + +- (void)dealloc +{ + [m_cachedObjCWrappers release]; + [m_classMap release]; + [super dealloc]; +} + +- (JSObjCClassInfo*)classInfoForClass:(Class)cls +{ + if (!cls) + return nil; + + // Check if we've already created a JSObjCClassInfo for this Class. + if (JSObjCClassInfo* classInfo = (JSObjCClassInfo*)m_classMap[cls]) + return classInfo; + + // Skip internal classes beginning with '_' - just copy link to the parent class's info. + if ('_' == *class_getName(cls)) + return m_classMap[cls] = [self classInfoForClass:class_getSuperclass(cls)]; + + return m_classMap[cls] = [[[JSObjCClassInfo alloc] initWithContext:m_context forClass:cls superClassInfo:[self classInfoForClass:class_getSuperclass(cls)]] autorelease]; +} + +- (JSValue *)jsWrapperForObject:(id)object +{ + JSC::JSObject* jsWrapper = m_cachedJSWrappers.get(object); + if (jsWrapper) + return [JSValue valueWithJSValueRef:toRef(jsWrapper) inContext:m_context]; + + JSValue *wrapper; + if (class_isMetaClass(object_getClass(object))) + wrapper = [[self classInfoForClass:(Class)object] constructor]; + else { + JSObjCClassInfo* classInfo = [self classInfoForClass:[object class]]; + wrapper = [classInfo wrapperForObject:object]; + } + + // FIXME: https://bugs.webkit.org/show_bug.cgi?id=105891 + // This general approach to wrapper caching is pretty effective, but there are a couple of problems: + // (1) For immortal objects JSValues will effectively leak and this results in error output being logged - we should avoid adding associated objects to immortal objects. + // (2) A long lived object may rack up many JSValues. When the contexts are released these will unprotect the associated JavaScript objects, + // but still, would probably nicer if we made it so that only one associated object was required, broadcasting object dealloc. + JSC::ExecState* exec = toJS([m_context JSGlobalContextRef]); + jsWrapper = toJS(exec, valueInternalValue(wrapper)).toObject(exec); + m_cachedJSWrappers.set(object, jsWrapper); + return wrapper; +} + +- (JSValue *)objcWrapperForJSValueRef:(JSValueRef)value +{ + JSValue *wrapper = static_cast(NSMapGet(m_cachedObjCWrappers, value)); + if (!wrapper) { + wrapper = [[[JSValue alloc] initWithValue:value inContext:m_context] autorelease]; + NSMapInsert(m_cachedObjCWrappers, value, wrapper); + } + return wrapper; +} + +@end + +id tryUnwrapObjcObject(JSGlobalContextRef context, JSValueRef value) +{ + if (!JSValueIsObject(context, value)) + return nil; + JSValueRef exception = 0; + JSObjectRef object = JSValueToObject(context, value, &exception); + ASSERT(!exception); + if (toJS(object)->inherits(&JSC::JSCallbackObject::s_info)) + return (id)JSC::jsCast(toJS(object))->wrappedObject(); + if (id target = tryUnwrapBlock(object)) + return target; + return nil; +} + +Protocol *getJSExportProtocol() +{ + static Protocol *protocol = objc_getProtocol("JSExport"); + return protocol; +} + +Class getNSBlockClass() +{ + static Class cls = objc_getClass("NSBlock"); + return cls; +} + +#endif diff --git a/Source/JavaScriptCore/API/JavaScriptCore.h b/Source/JavaScriptCore/API/JavaScriptCore.h index 87d601851..40bea9c3d 100644 --- a/Source/JavaScriptCore/API/JavaScriptCore.h +++ b/Source/JavaScriptCore/API/JavaScriptCore.h @@ -29,4 +29,14 @@ #include #include +#if defined(__OBJC__) && JSC_OBJC_API_ENABLED + +#import "JSContext.h" +#import "JSValue.h" +#import "JSManagedValue.h" +#import "JSVirtualMachine.h" +#import "JSExport.h" + +#endif + #endif /* JavaScriptCore_h */ diff --git a/Source/JavaScriptCore/API/ObjCCallbackFunction.h b/Source/JavaScriptCore/API/ObjCCallbackFunction.h new file mode 100644 index 000000000..0218cd8b4 --- /dev/null +++ b/Source/JavaScriptCore/API/ObjCCallbackFunction.h @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef ObjCCallbackFunction_h +#define ObjCCallbackFunction_h + +#include + +#if JSC_OBJC_API_ENABLED + +#import + +#if defined(__OBJC__) +JSObjectRef objCCallbackFunctionForMethod(JSContext *, Class, Protocol *, BOOL isInstanceMethod, SEL, const char* types); +JSObjectRef objCCallbackFunctionForBlock(JSContext *, id); + +id tryUnwrapBlock(JSObjectRef); +#endif + +namespace JSC { + +class ObjCCallbackFunctionImpl; + +class ObjCCallbackFunction : public JSCallbackFunction { +public: + typedef JSCallbackFunction Base; + + static ObjCCallbackFunction* create(ExecState*, JSGlobalObject*, const String& name, PassOwnPtr); + static void destroy(JSCell*); + + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) + { + ASSERT(globalObject); + return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info); + } + + static JS_EXPORTDATA const ClassInfo s_info; + + ObjCCallbackFunctionImpl* impl() { return m_impl.get(); } + +protected: + ObjCCallbackFunction(JSGlobalObject*, JSObjectCallAsFunctionCallback, PassOwnPtr); + +private: + OwnPtr m_impl; +}; + +} // namespace JSC + +#endif + +#endif // ObjCCallbackFunction_h diff --git a/Source/JavaScriptCore/API/ObjCCallbackFunction.mm b/Source/JavaScriptCore/API/ObjCCallbackFunction.mm new file mode 100644 index 000000000..cc342f59e --- /dev/null +++ b/Source/JavaScriptCore/API/ObjCCallbackFunction.mm @@ -0,0 +1,615 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#import "JavaScriptCore.h" + +#if JSC_OBJC_API_ENABLED + +#import "APICast.h" +#import "APIShims.h" +#import "Error.h" +#import "JSCJSValueInlines.h" +#import "JSCell.h" +#import "JSCellInlines.h" +#import "JSContextInternal.h" +#import "JSWrapperMap.h" +#import "JSValueInternal.h" +#import "ObjCCallbackFunction.h" +#import "ObjcRuntimeExtras.h" +#import +#import + +class CallbackArgument { +public: + virtual ~CallbackArgument(); + virtual void set(NSInvocation *, NSInteger, JSContext *, JSValueRef, JSValueRef*) = 0; + + OwnPtr m_next; +}; + +CallbackArgument::~CallbackArgument() +{ +} + +class CallbackArgumentBoolean : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef*) override + { + bool value = JSValueToBoolean([context JSGlobalContextRef], argument); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +template +class CallbackArgumentInteger : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + T value = (T)JSC::toInt32(JSValueToNumber([context JSGlobalContextRef], argument, exception)); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +template +class CallbackArgumentDouble : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + T value = (T)JSValueToNumber([context JSGlobalContextRef], argument, exception); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentJSValue : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef*) override + { + JSValue *value = [JSValue valueWithJSValueRef:argument inContext:context]; + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentId : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef*) override + { + id value = valueToObject(context, argument); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentOfClass : public CallbackArgument { +public: + CallbackArgumentOfClass(Class cls) + : CallbackArgument() + , m_class(cls) + { + [m_class retain]; + } + +private: + virtual ~CallbackArgumentOfClass() + { + [m_class release]; + } + + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + JSGlobalContextRef contextRef = [context JSGlobalContextRef]; + + id object = tryUnwrapObjcObject(contextRef, argument); + if (object && [object isKindOfClass:m_class]) { + [invocation setArgument:&object atIndex:argumentNumber]; + return; + } + + if (JSValueIsNull(contextRef, argument) || JSValueIsUndefined(contextRef, argument)) { + object = nil; + [invocation setArgument:&object atIndex:argumentNumber]; + return; + } + + *exception = toRef(JSC::createTypeError(toJS(contextRef), "Argument does not match Objective-C Class")); + } + + Class m_class; +}; + +class CallbackArgumentNSNumber : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + id value = valueToNumber([context JSGlobalContextRef], argument, exception); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentNSString : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + id value = valueToString([context JSGlobalContextRef], argument, exception); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentNSDate : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + id value = valueToDate([context JSGlobalContextRef], argument, exception); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentNSArray : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + id value = valueToArray([context JSGlobalContextRef], argument, exception); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentNSDictionary : public CallbackArgument { + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef* exception) override + { + id value = valueToDictionary([context JSGlobalContextRef], argument, exception); + [invocation setArgument:&value atIndex:argumentNumber]; + } +}; + +class CallbackArgumentStruct : public CallbackArgument { +public: + CallbackArgumentStruct(NSInvocation *conversionInvocation, const char* encodedType) + : m_conversionInvocation(conversionInvocation) + , m_buffer(encodedType) + { + } + +private: + virtual void set(NSInvocation *invocation, NSInteger argumentNumber, JSContext *context, JSValueRef argument, JSValueRef*) override + { + JSValue *value = [JSValue valueWithJSValueRef:argument inContext:context]; + [m_conversionInvocation invokeWithTarget:value]; + [m_conversionInvocation getReturnValue:m_buffer]; + [invocation setArgument:m_buffer atIndex:argumentNumber]; + } + + RetainPtr m_conversionInvocation; + StructBuffer m_buffer; +}; + +class ArgumentTypeDelegate { +public: + typedef CallbackArgument* ResultType; + + template + static ResultType typeInteger() + { + return new CallbackArgumentInteger; + } + + template + static ResultType typeDouble() + { + return new CallbackArgumentDouble; + } + + static ResultType typeBool() + { + return new CallbackArgumentBoolean; + } + + static ResultType typeVoid() + { + RELEASE_ASSERT_NOT_REACHED(); + return 0; + } + + static ResultType typeId() + { + return new CallbackArgumentId; + } + + static ResultType typeOfClass(const char* begin, const char* end) + { + StringRange copy(begin, end); + Class cls = objc_getClass(copy); + if (!cls) + return 0; + + if (cls == [JSValue class]) + return new CallbackArgumentJSValue; + if (cls == [NSString class]) + return new CallbackArgumentNSString; + if (cls == [NSNumber class]) + return new CallbackArgumentNSNumber; + if (cls == [NSDate class]) + return new CallbackArgumentNSDate; + if (cls == [NSArray class]) + return new CallbackArgumentNSArray; + if (cls == [NSDictionary class]) + return new CallbackArgumentNSDictionary; + + return new CallbackArgumentOfClass(cls); + } + + static ResultType typeBlock(const char*, const char*) + { + return nil; + } + + static ResultType typeStruct(const char* begin, const char* end) + { + StringRange copy(begin, end); + if (NSInvocation *invocation = valueToTypeInvocationFor(copy)) + return new CallbackArgumentStruct(invocation, copy); + return 0; + } +}; + +class CallbackResult { +public: + virtual ~CallbackResult() + { + } + + virtual JSValueRef get(NSInvocation *, JSContext *, JSValueRef*) = 0; +}; + +class CallbackResultVoid : public CallbackResult { + virtual JSValueRef get(NSInvocation *, JSContext *context, JSValueRef*) override + { + return JSValueMakeUndefined([context JSGlobalContextRef]); + } +}; + +class CallbackResultId : public CallbackResult { + virtual JSValueRef get(NSInvocation *invocation, JSContext *context, JSValueRef*) override + { + id value; + [invocation getReturnValue:&value]; + return objectToValue(context, value); + } +}; + +template +class CallbackResultNumeric : public CallbackResult { + virtual JSValueRef get(NSInvocation *invocation, JSContext *context, JSValueRef*) override + { + T value; + [invocation getReturnValue:&value]; + return JSValueMakeNumber([context JSGlobalContextRef], value); + } +}; + +class CallbackResultBoolean : public CallbackResult { + virtual JSValueRef get(NSInvocation *invocation, JSContext *context, JSValueRef*) override + { + bool value; + [invocation getReturnValue:&value]; + return JSValueMakeBoolean([context JSGlobalContextRef], value); + } +}; + +class CallbackResultStruct : public CallbackResult { +public: + CallbackResultStruct(NSInvocation *conversionInvocation, const char* encodedType) + : m_conversionInvocation(conversionInvocation) + , m_buffer(encodedType) + { + } + +private: + virtual JSValueRef get(NSInvocation *invocation, JSContext *context, JSValueRef*) override + { + [invocation getReturnValue:m_buffer]; + + [m_conversionInvocation setArgument:m_buffer atIndex:2]; + [m_conversionInvocation setArgument:&context atIndex:3]; + [m_conversionInvocation invokeWithTarget:[JSValue class]]; + + JSValue *value; + [m_conversionInvocation getReturnValue:&value]; + return valueInternalValue(value); + } + + RetainPtr m_conversionInvocation; + StructBuffer m_buffer; +}; + +class ResultTypeDelegate { +public: + typedef CallbackResult* ResultType; + + template + static ResultType typeInteger() + { + return new CallbackResultNumeric; + } + + template + static ResultType typeDouble() + { + return new CallbackResultNumeric; + } + + static ResultType typeBool() + { + return new CallbackResultBoolean; + } + + static ResultType typeVoid() + { + return new CallbackResultVoid; + } + + static ResultType typeId() + { + return new CallbackResultId(); + } + + static ResultType typeOfClass(const char*, const char*) + { + return new CallbackResultId(); + } + + static ResultType typeBlock(const char*, const char*) + { + return new CallbackResultId(); + } + + static ResultType typeStruct(const char* begin, const char* end) + { + StringRange copy(begin, end); + if (NSInvocation *invocation = typeToValueInvocationFor(copy)) + return new CallbackResultStruct(invocation, copy); + return 0; + } +}; + +enum CallbackType { + CallbackInstanceMethod, + CallbackClassMethod, + CallbackBlock +}; + +namespace JSC { + +class ObjCCallbackFunctionImpl { +public: + ObjCCallbackFunctionImpl(JSContext *context, NSInvocation *invocation, CallbackType type, Class instanceClass, PassOwnPtr arguments, PassOwnPtr result) + : m_context(context) + , m_type(type) + , m_instanceClass([instanceClass retain]) + , m_invocation(invocation) + , m_arguments(arguments) + , m_result(result) + { + ASSERT(type != CallbackInstanceMethod || instanceClass); + } + + ~ObjCCallbackFunctionImpl() + { + if (m_type != CallbackInstanceMethod) + [[m_invocation.get() target] release]; + [m_instanceClass release]; + } + + JSValueRef call(JSContext *context, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + + JSContext *context() + { + return m_context.get(); + } + + void setContext(JSContext *context) + { + ASSERT(!m_context.get()); + m_context.set(context); + } + + id wrappedBlock() + { + return m_type == CallbackBlock ? [m_invocation target] : nil; + } + +private: + WeakContextRef m_context; + CallbackType m_type; + Class m_instanceClass; + RetainPtr m_invocation; + OwnPtr m_arguments; + OwnPtr m_result; +}; + +static JSValueRef objCCallbackFunctionCallAsFunction(JSContextRef callerContext, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + // Retake the API lock - we need this for a few reasons: + // (1) We don't want to support the C-API's confusing drops-locks-once policy - should only drop locks if we can do so recursively. + // (2) We're calling some JSC internals that require us to be on the 'inside' - e.g. createTypeError. + // (3) We need to be locked (per context would be fine) against conflicting usage of the ObjCCallbackFunction's NSInvocation. + JSC::APIEntryShim entryShim(toJS(callerContext)); + + ObjCCallbackFunction* callback = static_cast(toJS(function)); + ObjCCallbackFunctionImpl* impl = callback->impl(); + JSContext *context = impl->context(); + if (!context) { + context = [JSContext contextWithJSGlobalContextRef:toGlobalRef(toJS(callerContext)->lexicalGlobalObject()->globalExec())]; + impl->setContext(context); + } + + CallbackData callbackData; + JSValueRef result; + @autoreleasepool { + [context beginCallbackWithData:&callbackData thisValue:thisObject argumentCount:argumentCount arguments:arguments]; + result = impl->call(context, thisObject, argumentCount, arguments, exception); + if (context.exception) + *exception = valueInternalValue(context.exception); + [context endCallbackWithData:&callbackData]; + } + return result; +} + +const JSC::ClassInfo ObjCCallbackFunction::s_info = { "CallbackFunction", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(ObjCCallbackFunction) }; + +ObjCCallbackFunction::ObjCCallbackFunction(JSC::JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, PassOwnPtr impl) + : Base(globalObject, globalObject->objcCallbackFunctionStructure(), callback) + , m_impl(impl) +{ +} + +ObjCCallbackFunction* ObjCCallbackFunction::create(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject, const String& name, PassOwnPtr impl) +{ + ObjCCallbackFunction* function = new (NotNull, allocateCell(*exec->heap())) ObjCCallbackFunction(globalObject, objCCallbackFunctionCallAsFunction, impl); + function->finishCreation(exec->vm(), name); + return function; +} + +void ObjCCallbackFunction::destroy(JSCell* cell) +{ + static_cast(cell)->ObjCCallbackFunction::~ObjCCallbackFunction(); +} + +JSValueRef ObjCCallbackFunctionImpl::call(JSContext *context, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + JSGlobalContextRef contextRef = [context JSGlobalContextRef]; + + size_t firstArgument; + switch (m_type) { + case CallbackInstanceMethod: { + id target = tryUnwrapObjcObject(contextRef, thisObject); + if (!target || ![target isKindOfClass:m_instanceClass]) { + *exception = toRef(JSC::createTypeError(toJS(contextRef), "self type check failed for Objective-C instance method")); + return JSValueMakeUndefined(contextRef); + } + [m_invocation setTarget:target]; + } + // fallthrough - firstArgument for CallbackInstanceMethod is also 2! + case CallbackClassMethod: + firstArgument = 2; + break; + case CallbackBlock: + firstArgument = 1; + } + + size_t argumentNumber = 0; + for (CallbackArgument* argument = m_arguments.get(); argument; argument = argument->m_next.get()) { + JSValueRef value = argumentNumber < argumentCount ? arguments[argumentNumber] : JSValueMakeUndefined(contextRef); + argument->set(m_invocation.get(), argumentNumber + firstArgument, context, value, exception); + if (*exception) + return JSValueMakeUndefined(contextRef); + ++argumentNumber; + } + + [m_invocation invoke]; + + return m_result->get(m_invocation.get(), context, exception); +} + +} // namespace JSC + +static bool blockSignatureContainsClass() +{ + static bool containsClass = ^{ + id block = ^(NSString *string){ return string; }; + return _Block_has_signature(block) && strstr(_Block_signature(block), "NSString"); + }(); + return containsClass; +} + +inline bool skipNumber(const char*& position) +{ + if (!isASCIIDigit(*position)) + return false; + while (isASCIIDigit(*++position)) { } + return true; +} + +static JSObjectRef objCCallbackFunctionForInvocation(JSContext *context, NSInvocation *invocation, CallbackType type, Class instanceClass, const char* signatureWithObjcClasses) +{ + const char* position = signatureWithObjcClasses; + + OwnPtr result = adoptPtr(parseObjCType(position)); + if (!result || !skipNumber(position)) + return nil; + + switch (type) { + case CallbackInstanceMethod: + case CallbackClassMethod: + // Methods are passed two implicit arguments - (id)self, and the selector. + if ('@' != *position++ || !skipNumber(position) || ':' != *position++ || !skipNumber(position)) + return nil; + break; + case CallbackBlock: + // Blocks are passed one implicit argument - the block, of type "@?". + if (('@' != *position++) || ('?' != *position++) || !skipNumber(position)) + return nil; + // Only allow arguments of type 'id' if the block signature contains the NS type information. + if ((!blockSignatureContainsClass() && strchr(position, '@'))) + return nil; + break; + } + + OwnPtr arguments = 0; + OwnPtr* nextArgument = &arguments; + unsigned argumentCount = 0; + while (*position) { + OwnPtr argument = adoptPtr(parseObjCType(position)); + if (!argument || !skipNumber(position)) + return nil; + + *nextArgument = argument.release(); + nextArgument = &(*nextArgument)->m_next; + ++argumentCount; + } + + JSC::ExecState* exec = toJS([context JSGlobalContextRef]); + JSC::APIEntryShim shim(exec); + OwnPtr impl = adoptPtr(new JSC::ObjCCallbackFunctionImpl(context, invocation, type, instanceClass, arguments.release(), result.release())); + // FIXME: Maybe we could support having the selector as the name of the function to make it a bit more user-friendly from the JS side? + return toRef(JSC::ObjCCallbackFunction::create(exec, exec->lexicalGlobalObject(), "", impl.release())); +} + +JSObjectRef objCCallbackFunctionForMethod(JSContext *context, Class cls, Protocol *protocol, BOOL isInstanceMethod, SEL sel, const char* types) +{ + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[NSMethodSignature signatureWithObjCTypes:types]]; + [invocation setSelector:sel]; + if (!isInstanceMethod) + [invocation setTarget:cls]; + return objCCallbackFunctionForInvocation(context, invocation, isInstanceMethod ? CallbackInstanceMethod : CallbackClassMethod, isInstanceMethod ? cls : nil, _protocol_getMethodTypeEncoding(protocol, sel, YES, isInstanceMethod)); +} + +JSObjectRef objCCallbackFunctionForBlock(JSContext *context, id target) +{ + if (!_Block_has_signature(target)) + return 0; + const char* signature = _Block_signature(target); + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[NSMethodSignature signatureWithObjCTypes:signature]]; + [invocation setTarget:[target copy]]; + return objCCallbackFunctionForInvocation(context, invocation, CallbackBlock, nil, signature); +} + +id tryUnwrapBlock(JSObjectRef object) +{ + if (!toJS(object)->inherits(&JSC::ObjCCallbackFunction::s_info)) + return nil; + return static_cast(toJS(object))->impl()->wrappedBlock(); +} + +#endif diff --git a/Source/JavaScriptCore/API/ObjcRuntimeExtras.h b/Source/JavaScriptCore/API/ObjcRuntimeExtras.h new file mode 100644 index 000000000..48c112093 --- /dev/null +++ b/Source/JavaScriptCore/API/ObjcRuntimeExtras.h @@ -0,0 +1,231 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import +#import + +inline bool protocolImplementsProtocol(Protocol *candidate, Protocol *target) +{ + unsigned protocolProtocolsCount; + Protocol ** protocolProtocols = protocol_copyProtocolList(candidate, &protocolProtocolsCount); + for (unsigned i = 0; i < protocolProtocolsCount; ++i) { + if (protocol_isEqual(protocolProtocols[i], target)) { + free(protocolProtocols); + return true; + } + } + free(protocolProtocols); + return false; +} + +inline void forEachProtocolImplementingProtocol(Class cls, Protocol *target, void (^callback)(Protocol *)) +{ + ASSERT(cls); + ASSERT(target); + + Vector worklist; + HashSet visited; + + // Initially fill the worklist with the Class's protocols. + unsigned protocolsCount; + Protocol ** protocols = class_copyProtocolList(cls, &protocolsCount); + worklist.append(protocols, protocolsCount); + free(protocols); + + while (!worklist.isEmpty()) { + Protocol *protocol = worklist.last(); + worklist.removeLast(); + + // Are we encountering this Protocol for the first time? + if (!visited.add(protocol).isNewEntry) + continue; + + // If it implements the protocol, make the callback. + if (protocolImplementsProtocol(protocol, target)) + callback(protocol); + + // Add incorporated protocols to the worklist. + protocols = protocol_copyProtocolList(protocol, &protocolsCount); + worklist.append(protocols, protocolsCount); + free(protocols); + } +} + +inline void forEachMethodInClass(Class cls, void (^callback)(Method)) +{ + unsigned count; + Method* methods = class_copyMethodList(cls, &count); + for (unsigned i = 0; i < count; ++i) + callback(methods[i]); + free(methods); +} + +inline void forEachMethodInProtocol(Protocol *protocol, BOOL isRequiredMethod, BOOL isInstanceMethod, void (^callback)(SEL, const char*)) +{ + unsigned count; + struct objc_method_description* methods = protocol_copyMethodDescriptionList(protocol, isRequiredMethod, isInstanceMethod, &count); + for (unsigned i = 0; i < count; ++i) + callback(methods[i].name, methods[i].types); + free(methods); +} + +inline void forEachPropertyInProtocol(Protocol *protocol, void (^callback)(objc_property_t)) +{ + unsigned count; + objc_property_t* properties = protocol_copyPropertyList(protocol, &count); + for (unsigned i = 0; i < count; ++i) + callback(properties[i]); + free(properties); +} + +template +void skipPair(const char*& position) +{ + size_t count = 1; + do { + char c = *position++; + if (!c) + @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Malformed type encoding" userInfo:nil]; + if (c == open) + ++count; + else if (c == close) + --count; + } while (count); +} + +class StringRange { + WTF_MAKE_NONCOPYABLE(StringRange); +public: + StringRange(const char* begin, const char* end) : m_ptr(strndup(begin, end - begin)) { } + ~StringRange() { free(m_ptr); } + operator const char*() const { return m_ptr; } + const char* get() const { return m_ptr; } + +private: + char* m_ptr; +}; + +class StructBuffer { + WTF_MAKE_NONCOPYABLE(StructBuffer); +public: + StructBuffer(const char* encodedType) + { + NSUInteger size, alignment; + NSGetSizeAndAlignment(encodedType, &size, &alignment); + --alignment; + m_allocation = static_cast(malloc(size + alignment)); + m_buffer = reinterpret_cast((reinterpret_cast(m_allocation) + alignment) & ~alignment); + } + + ~StructBuffer() { free(m_allocation); } + operator void*() const { return m_buffer; } + +private: + void* m_allocation; + void* m_buffer; +}; + +template +typename DelegateType::ResultType parseObjCType(const char*& position) +{ + ASSERT(*position); + + switch (*position++) { + case 'c': + return DelegateType::template typeInteger(); + case 'i': + return DelegateType::template typeInteger(); + case 's': + return DelegateType::template typeInteger(); + case 'l': + return DelegateType::template typeInteger(); + case 'q': + return DelegateType::template typeDouble(); + case 'C': + return DelegateType::template typeInteger(); + case 'I': + return DelegateType::template typeInteger(); + case 'S': + return DelegateType::template typeInteger(); + case 'L': + return DelegateType::template typeInteger(); + case 'Q': + return DelegateType::template typeDouble(); + case 'f': + return DelegateType::template typeDouble(); + case 'd': + return DelegateType::template typeDouble(); + case 'B': + return DelegateType::typeBool(); + case 'v': + return DelegateType::typeVoid(); + + case '@': { // An object (whether statically typed or typed id) + if (position[0] == '?' && position[1] == '<') { + position += 2; + const char* begin = position; + skipPair<'<','>'>(position); + return DelegateType::typeBlock(begin, position - 1); + } + + if (*position == '"') { + const char* begin = ++position; + position = index(position, '"'); + return DelegateType::typeOfClass(begin, position++); + } + + return DelegateType::typeId(); + } + + case '{': { // {name=type...} A structure + const char* begin = position - 1; + skipPair<'{','}'>(position); + return DelegateType::typeStruct(begin, position); + } + + // NOT supporting C strings, arrays, pointers, unions, bitfields, function pointers. + case '*': // A character string (char *) + case '[': // [array type] An array + case '(': // (name=type...) A union + case 'b': // bnum A bit field of num bits + case '^': // ^type A pointer to type + case '?': // An unknown type (among other things, this code is used for function pointers) + // NOT supporting Objective-C Class, SEL + case '#': // A class object (Class) + case ':': // A method selector (SEL) + default: + return nil; + } +} + +extern "C" { + // Forward declare some Objective-C runtime internal methods that are not API. + const char *_protocol_getMethodTypeEncoding(Protocol *, SEL, BOOL isRequiredMethod, BOOL isInstanceMethod); + id objc_initWeak(id *, id); + void objc_destroyWeak(id *); + bool _Block_has_signature(void *); + const char * _Block_signature(void *); +} diff --git a/Source/JavaScriptCore/API/OpaqueJSString.cpp b/Source/JavaScriptCore/API/OpaqueJSString.cpp index 90bc1c095..a7cef8d9a 100644 --- a/Source/JavaScriptCore/API/OpaqueJSString.cpp +++ b/Source/JavaScriptCore/API/OpaqueJSString.cpp @@ -48,7 +48,7 @@ String OpaqueJSString::string() const return m_string.isolatedCopy(); } -Identifier OpaqueJSString::identifier(JSGlobalData* globalData) const +Identifier OpaqueJSString::identifier(VM* vm) const { if (!this || m_string.isNull()) return Identifier(); @@ -57,7 +57,7 @@ Identifier OpaqueJSString::identifier(JSGlobalData* globalData) const return Identifier(Identifier::EmptyIdentifier); if (m_string.is8Bit()) - return Identifier(globalData, m_string.characters8(), m_string.length()); + return Identifier(vm, m_string.characters8(), m_string.length()); - return Identifier(globalData, m_string.characters16(), m_string.length()); + return Identifier(vm, m_string.characters16(), m_string.length()); } diff --git a/Source/JavaScriptCore/API/OpaqueJSString.h b/Source/JavaScriptCore/API/OpaqueJSString.h index 0464e8813..c374b567a 100644 --- a/Source/JavaScriptCore/API/OpaqueJSString.h +++ b/Source/JavaScriptCore/API/OpaqueJSString.h @@ -31,7 +31,7 @@ namespace JSC { class Identifier; - class JSGlobalData; + class VM; } struct OpaqueJSString : public ThreadSafeRefCounted { @@ -57,7 +57,10 @@ struct OpaqueJSString : public ThreadSafeRefCounted { unsigned length() { return !!this ? m_string.length() : 0; } JS_EXPORT_PRIVATE String string() const; - JSC::Identifier identifier(JSC::JSGlobalData*) const; + JSC::Identifier identifier(JSC::VM*) const; +#if PLATFORM(QT) + QString qString() const { return m_string; } +#endif private: friend class WTF::ThreadSafeRefCounted; @@ -67,12 +70,8 @@ private: } OpaqueJSString(const String& string) + : m_string(string.isolatedCopy()) { - // Make a copy of the source string. - if (string.is8Bit()) - m_string = String(string.characters8(), string.length()); - else - m_string = String(string.characters16(), string.length()); } OpaqueJSString(const LChar* characters, unsigned length) diff --git a/Source/JavaScriptCore/API/tests/JSNode.c b/Source/JavaScriptCore/API/tests/JSNode.c index 052c88a02..d9a40bea6 100644 --- a/Source/JavaScriptCore/API/tests/JSNode.c +++ b/Source/JavaScriptCore/API/tests/JSNode.c @@ -30,7 +30,6 @@ #include "JSValueRef.h" #include "Node.h" #include "NodeList.h" -#include #include static JSValueRef JSNode_appendChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) diff --git a/Source/JavaScriptCore/API/tests/JSNodeList.c b/Source/JavaScriptCore/API/tests/JSNodeList.c index 0d194845e..61d7041a4 100644 --- a/Source/JavaScriptCore/API/tests/JSNodeList.c +++ b/Source/JavaScriptCore/API/tests/JSNodeList.c @@ -27,7 +27,6 @@ #include "JSNodeList.h" #include "JSObjectRef.h" #include "JSValueRef.h" -#include #include static JSValueRef JSNodeList_item(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) diff --git a/Source/JavaScriptCore/API/tests/minidom.c b/Source/JavaScriptCore/API/tests/minidom.c index 43ae2c1a8..8614e51e9 100644 --- a/Source/JavaScriptCore/API/tests/minidom.c +++ b/Source/JavaScriptCore/API/tests/minidom.c @@ -31,7 +31,6 @@ #include #include #include -#include static char* createStringWithContentsOfFile(const char* fileName); static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); diff --git a/Source/JavaScriptCore/API/tests/testapi.c b/Source/JavaScriptCore/API/tests/testapi.c index c2400f7ec..be18b2bf7 100644 --- a/Source/JavaScriptCore/API/tests/testapi.c +++ b/Source/JavaScriptCore/API/tests/testapi.c @@ -27,10 +27,17 @@ #include "JSBasePrivate.h" #include "JSContextRefPrivate.h" #include "JSObjectRefPrivate.h" +#include "JSScriptRefPrivate.h" +#include "JSStringRefPrivate.h" #include #define ASSERT_DISABLED 0 #include -#include + +#if PLATFORM(MAC) || PLATFORM(IOS) +#include +#include +#include +#endif #if OS(WINDOWS) #include @@ -45,10 +52,19 @@ static double nan(const char*) return std::numeric_limits::quiet_NaN(); } +using std::isinf; +using std::isnan; + #endif +#if JSC_OBJC_API_ENABLED +void testObjectiveCAPI(void); +#endif + +extern void JSSynchronousGarbageCollectForDebugging(JSContextRef); + static JSGlobalContextRef context; -static int failed; +int failed; static void assertEqualsAsBoolean(JSValueRef value, bool expectedValue) { if (JSValueToBoolean(context, value) != expectedValue) { @@ -481,6 +497,11 @@ static bool PropertyCatchalls_setProperty(JSContextRef context, JSObjectRef obje return true; } + if (JSStringIsEqualToUTF8CString(propertyName, "make_throw") || JSStringIsEqualToUTF8CString(propertyName, "0")) { + *exception = JSValueMakeNumber(context, 5); + return true; + } + return false; } @@ -1030,6 +1051,68 @@ static void checkConstnessInJSObjectNames() val.name = "something"; } +#if PLATFORM(MAC) || PLATFORM(IOS) +static double currentCPUTime() +{ + mach_msg_type_number_t infoCount = THREAD_BASIC_INFO_COUNT; + thread_basic_info_data_t info; + + /* Get thread information */ + mach_port_t threadPort = mach_thread_self(); + thread_info(threadPort, THREAD_BASIC_INFO, (thread_info_t)(&info), &infoCount); + mach_port_deallocate(mach_task_self(), threadPort); + + double time = info.user_time.seconds + info.user_time.microseconds / 1000000.; + time += info.system_time.seconds + info.system_time.microseconds / 1000000.; + + return time; +} + +static JSValueRef currentCPUTime_callAsFunction(JSContextRef ctx, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + UNUSED_PARAM(functionObject); + UNUSED_PARAM(thisObject); + UNUSED_PARAM(argumentCount); + UNUSED_PARAM(arguments); + UNUSED_PARAM(exception); + + ASSERT(JSContextGetGlobalContext(ctx) == context); + return JSValueMakeNumber(ctx, currentCPUTime()); +} + +bool shouldTerminateCallbackWasCalled = false; +static bool shouldTerminateCallback(JSContextRef ctx, void* context) +{ + UNUSED_PARAM(ctx); + UNUSED_PARAM(context); + shouldTerminateCallbackWasCalled = true; + return true; +} + +bool cancelTerminateCallbackWasCalled = false; +static bool cancelTerminateCallback(JSContextRef ctx, void* context) +{ + UNUSED_PARAM(ctx); + UNUSED_PARAM(context); + cancelTerminateCallbackWasCalled = true; + return false; +} + +int extendTerminateCallbackCalled = 0; +static bool extendTerminateCallback(JSContextRef ctx, void* context) +{ + UNUSED_PARAM(context); + extendTerminateCallbackCalled++; + if (extendTerminateCallbackCalled == 1) { + JSContextGroupRef contextGroup = JSContextGetGroup(ctx); + JSContextGroupSetExecutionTimeLimit(contextGroup, .200f, extendTerminateCallback, 0); + return false; + } + return true; +} +#endif /* PLATFORM(MAC) || PLATFORM(IOS) */ + + int main(int argc, char* argv[]) { #if OS(WINDOWS) @@ -1039,6 +1122,10 @@ int main(int argc, char* argv[]) ::SetErrorMode(0); #endif +#if JSC_OBJC_API_ENABLED + testObjectiveCAPI(); +#endif + const char *scriptPath = "testapi.js"; if (argc > 1) { scriptPath = argv[1]; @@ -1061,6 +1148,8 @@ int main(int argc, char* argv[]) JSClassRef globalObjectClass = JSClassCreate(&globalObjectClassDefinition); context = JSGlobalContextCreateInGroup(NULL, globalObjectClass); + JSContextGroupRef contextGroup = JSContextGetGroup(context); + JSGlobalContextRetain(context); JSGlobalContextRelease(context); ASSERT(JSContextGetGlobalContext(context) == context); @@ -1117,6 +1206,12 @@ int main(int argc, char* argv[]) free(buffer); JSValueRef jsCFEmptyStringWithCharacters = JSValueMakeString(context, jsCFEmptyIStringWithCharacters); + JSChar constantString[] = { 'H', 'e', 'l', 'l', 'o', }; + JSStringRef constantStringRef = JSStringCreateWithCharactersNoCopy(constantString, sizeof(constantString) / sizeof(constantString[0])); + ASSERT(JSStringGetCharactersPtr(constantStringRef) == constantString); + JSStringRelease(constantStringRef); + + ASSERT(JSValueGetType(context, NULL) == kJSTypeNull); ASSERT(JSValueGetType(context, jsUndefined) == kJSTypeUndefined); ASSERT(JSValueGetType(context, jsNull) == kJSTypeNull); ASSERT(JSValueGetType(context, jsTrue) == kJSTypeBoolean); @@ -1131,6 +1226,17 @@ int main(int argc, char* argv[]) ASSERT(JSValueGetType(context, jsCFEmptyString) == kJSTypeString); ASSERT(JSValueGetType(context, jsCFEmptyStringWithCharacters) == kJSTypeString); + ASSERT(!JSValueIsBoolean(context, NULL)); + ASSERT(!JSValueIsObject(context, NULL)); + ASSERT(!JSValueIsString(context, NULL)); + ASSERT(!JSValueIsNumber(context, NULL)); + ASSERT(!JSValueIsUndefined(context, NULL)); + ASSERT(JSValueIsNull(context, NULL)); + ASSERT(!JSObjectCallAsFunction(context, NULL, NULL, 0, NULL, NULL)); + ASSERT(!JSObjectCallAsConstructor(context, NULL, 0, NULL, NULL)); + ASSERT(!JSObjectIsConstructor(context, NULL)); + ASSERT(!JSObjectIsFunction(context, NULL)); + JSStringRef nullString = JSStringCreateWithUTF8CString(0); const JSChar* characters = JSStringGetCharactersPtr(nullString); if (characters) { @@ -1139,6 +1245,14 @@ int main(int argc, char* argv[]) } else printf("PASS: returned null when accessing character pointer of a null String.\n"); + JSStringRef emptyString = JSStringCreateWithCFString(CFSTR("")); + characters = JSStringGetCharactersPtr(emptyString); + if (!characters) { + printf("FAIL: Returned null when accessing character pointer of an empty String.\n"); + failed = 1; + } else + printf("PASS: returned empty when accessing character pointer of an empty String.\n"); + size_t length = JSStringGetLength(nullString); if (length) { printf("FAIL: Didn't return 0 length for null String.\n"); @@ -1147,6 +1261,14 @@ int main(int argc, char* argv[]) printf("PASS: returned 0 length for null String.\n"); JSStringRelease(nullString); + length = JSStringGetLength(emptyString); + if (length) { + printf("FAIL: Didn't return 0 length for empty String.\n"); + failed = 1; + } else + printf("PASS: returned 0 length for empty String.\n"); + JSStringRelease(emptyString); + JSObjectRef propertyCatchalls = JSObjectMake(context, PropertyCatchalls_class(context), NULL); JSStringRef propertyCatchallsString = JSStringCreateWithUTF8CString("PropertyCatchalls"); JSObjectSetProperty(context, globalObject, propertyCatchallsString, propertyCatchalls, kJSPropertyAttributeNone, NULL); @@ -1399,9 +1521,12 @@ int main(int argc, char* argv[]) JSValueUnprotect(context, jsNumberValue); JSStringRef goodSyntax = JSStringCreateWithUTF8CString("x = 1;"); - JSStringRef badSyntax = JSStringCreateWithUTF8CString("x := 1;"); + const char* badSyntaxConstant = "x := 1;"; + JSStringRef badSyntax = JSStringCreateWithUTF8CString(badSyntaxConstant); ASSERT(JSCheckScriptSyntax(context, goodSyntax, NULL, 0, NULL)); ASSERT(!JSCheckScriptSyntax(context, badSyntax, NULL, 0, NULL)); + ASSERT(!JSScriptCreateFromString(contextGroup, 0, 0, badSyntax, 0, 0)); + ASSERT(!JSScriptCreateReferencingImmortalASCIIText(contextGroup, 0, 0, badSyntaxConstant, strlen(badSyntaxConstant), 0, 0)); JSValueRef result; JSValueRef v; @@ -1590,13 +1715,21 @@ int main(int argc, char* argv[]) v = JSObjectCallAsFunction(context, function, o, 0, NULL, NULL); ASSERT(JSValueIsEqual(context, v, o, NULL)); - JSStringRef script = JSStringCreateWithUTF8CString("this;"); + const char* thisScript = "this;"; + JSStringRef script = JSStringCreateWithUTF8CString(thisScript); v = JSEvaluateScript(context, script, NULL, NULL, 1, NULL); ASSERT(JSValueIsEqual(context, v, globalObject, NULL)); v = JSEvaluateScript(context, script, o, NULL, 1, NULL); ASSERT(JSValueIsEqual(context, v, o, NULL)); JSStringRelease(script); + JSScriptRef scriptObject = JSScriptCreateReferencingImmortalASCIIText(contextGroup, 0, 0, thisScript, strlen(thisScript), 0, 0); + v = JSScriptEvaluate(context, scriptObject, NULL, NULL); + ASSERT(JSValueIsEqual(context, v, globalObject, NULL)); + v = JSScriptEvaluate(context, scriptObject, o, NULL); + ASSERT(JSValueIsEqual(context, v, o, NULL)); + JSScriptRelease(scriptObject); + script = JSStringCreateWithUTF8CString("eval(this);"); v = JSEvaluateScript(context, script, NULL, NULL, 1, NULL); ASSERT(JSValueIsEqual(context, v, globalObject, NULL)); @@ -1616,8 +1749,23 @@ int main(int argc, char* argv[]) printf("FAIL: Test script could not be loaded.\n"); failed = 1; } else { - script = JSStringCreateWithUTF8CString(scriptUTF8); - result = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); + JSStringRef url = JSStringCreateWithUTF8CString(scriptPath); + JSStringRef script = JSStringCreateWithUTF8CString(scriptUTF8); + JSStringRef errorMessage = 0; + int errorLine = 0; + JSScriptRef scriptObject = JSScriptCreateFromString(contextGroup, url, 1, script, &errorMessage, &errorLine); + ASSERT((!scriptObject) != (!errorMessage)); + if (!scriptObject) { + printf("FAIL: Test script did not parse\n\t%s:%d\n\t", scriptPath, errorLine); + CFStringRef errorCF = JSStringCopyCFString(kCFAllocatorDefault, errorMessage); + CFShow(errorCF); + CFRelease(errorCF); + JSStringRelease(errorMessage); + failed = 1; + } + + JSStringRelease(script); + result = scriptObject ? JSScriptEvaluate(context, scriptObject, 0, &exception) : 0; if (result && JSValueIsUndefined(context, result)) printf("PASS: Test script executed successfully.\n"); else { @@ -1629,10 +1777,163 @@ int main(int argc, char* argv[]) JSStringRelease(exceptionIString); failed = 1; } - JSStringRelease(script); + JSScriptRelease(scriptObject); free(scriptUTF8); } +#if PLATFORM(MAC) || PLATFORM(IOS) + JSStringRef currentCPUTimeStr = JSStringCreateWithUTF8CString("currentCPUTime"); + JSObjectRef currentCPUTimeFunction = JSObjectMakeFunctionWithCallback(context, currentCPUTimeStr, currentCPUTime_callAsFunction); + JSObjectSetProperty(context, globalObject, currentCPUTimeStr, currentCPUTimeFunction, kJSPropertyAttributeNone, NULL); + JSStringRelease(currentCPUTimeStr); + + /* Test script timeout: */ + JSContextGroupSetExecutionTimeLimit(contextGroup, .10f, shouldTerminateCallback, 0); + { + const char* loopForeverScript = "var startTime = currentCPUTime(); while (true) { if (currentCPUTime() - startTime > .150) break; } "; + JSStringRef script = JSStringCreateWithUTF8CString(loopForeverScript); + double startTime; + double endTime; + exception = NULL; + shouldTerminateCallbackWasCalled = false; + startTime = currentCPUTime(); + v = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); + endTime = currentCPUTime(); + + if (((endTime - startTime) < .150f) && shouldTerminateCallbackWasCalled) + printf("PASS: script timed out as expected.\n"); + else { + if (!((endTime - startTime) < .150f)) + printf("FAIL: script did not timed out as expected.\n"); + if (!shouldTerminateCallbackWasCalled) + printf("FAIL: script timeout callback was not called.\n"); + failed = true; + } + + if (!exception) { + printf("FAIL: TerminatedExecutionException was not thrown.\n"); + failed = true; + } + } + + /* Test the script timeout's TerminatedExecutionException should NOT be catchable: */ + JSContextGroupSetExecutionTimeLimit(contextGroup, 0.10f, shouldTerminateCallback, 0); + { + const char* loopForeverScript = "var startTime = currentCPUTime(); try { while (true) { if (currentCPUTime() - startTime > .150) break; } } catch(e) { }"; + JSStringRef script = JSStringCreateWithUTF8CString(loopForeverScript); + double startTime; + double endTime; + exception = NULL; + shouldTerminateCallbackWasCalled = false; + startTime = currentCPUTime(); + v = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); + endTime = currentCPUTime(); + + if (((endTime - startTime) >= .150f) || !shouldTerminateCallbackWasCalled) { + if (!((endTime - startTime) < .150f)) + printf("FAIL: script did not timed out as expected.\n"); + if (!shouldTerminateCallbackWasCalled) + printf("FAIL: script timeout callback was not called.\n"); + failed = true; + } + + if (exception) + printf("PASS: TerminatedExecutionException was not catchable as expected.\n"); + else { + printf("FAIL: TerminatedExecutionException was caught.\n"); + failed = true; + } + } + + /* Test script timeout with no callback: */ + JSContextGroupSetExecutionTimeLimit(contextGroup, .10f, 0, 0); + { + const char* loopForeverScript = "var startTime = currentCPUTime(); while (true) { if (currentCPUTime() - startTime > .150) break; } "; + JSStringRef script = JSStringCreateWithUTF8CString(loopForeverScript); + double startTime; + double endTime; + exception = NULL; + startTime = currentCPUTime(); + v = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); + endTime = currentCPUTime(); + + if (((endTime - startTime) < .150f) && shouldTerminateCallbackWasCalled) + printf("PASS: script timed out as expected when no callback is specified.\n"); + else { + if (!((endTime - startTime) < .150f)) + printf("FAIL: script did not timed out as expected when no callback is specified.\n"); + failed = true; + } + + if (!exception) { + printf("FAIL: TerminatedExecutionException was not thrown.\n"); + failed = true; + } + } + + /* Test script timeout cancellation: */ + JSContextGroupSetExecutionTimeLimit(contextGroup, 0.10f, cancelTerminateCallback, 0); + { + const char* loopForeverScript = "var startTime = currentCPUTime(); while (true) { if (currentCPUTime() - startTime > .150) break; } "; + JSStringRef script = JSStringCreateWithUTF8CString(loopForeverScript); + double startTime; + double endTime; + exception = NULL; + startTime = currentCPUTime(); + v = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); + endTime = currentCPUTime(); + + if (((endTime - startTime) >= .150f) && cancelTerminateCallbackWasCalled && !exception) + printf("PASS: script timeout was cancelled as expected.\n"); + else { + if (((endTime - startTime) < .150) || exception) + printf("FAIL: script timeout was not cancelled.\n"); + if (!cancelTerminateCallbackWasCalled) + printf("FAIL: script timeout callback was not called.\n"); + failed = true; + } + + if (exception) { + printf("FAIL: Unexpected TerminatedExecutionException thrown.\n"); + failed = true; + } + } + + /* Test script timeout extension: */ + JSContextGroupSetExecutionTimeLimit(contextGroup, 0.100f, extendTerminateCallback, 0); + { + const char* loopForeverScript = "var startTime = currentCPUTime(); while (true) { if (currentCPUTime() - startTime > .500) break; } "; + JSStringRef script = JSStringCreateWithUTF8CString(loopForeverScript); + double startTime; + double endTime; + double deltaTime; + exception = NULL; + startTime = currentCPUTime(); + v = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); + endTime = currentCPUTime(); + deltaTime = endTime - startTime; + + if ((deltaTime >= .300f) && (deltaTime < .500f) && (extendTerminateCallbackCalled == 2) && exception) + printf("PASS: script timeout was extended as expected.\n"); + else { + if (deltaTime < .200f) + printf("FAIL: script timeout was not extended as expected.\n"); + else if (deltaTime >= .500f) + printf("FAIL: script did not timeout.\n"); + + if (extendTerminateCallbackCalled < 1) + printf("FAIL: script timeout callback was not called.\n"); + if (extendTerminateCallbackCalled < 2) + printf("FAIL: script timeout callback was not called after timeout extension.\n"); + + if (!exception) + printf("FAIL: TerminatedExecutionException was not thrown during timeout extension test.\n"); + + failed = true; + } + } +#endif /* PLATFORM(MAC) || PLATFORM(IOS) */ + // Clear out local variables pointing at JSObjectRefs to allow their values to be collected function = NULL; v = NULL; diff --git a/Source/JavaScriptCore/API/tests/testapi.js b/Source/JavaScriptCore/API/tests/testapi.js index 28fa54433..47c20a830 100644 --- a/Source/JavaScriptCore/API/tests/testapi.js +++ b/Source/JavaScriptCore/API/tests/testapi.js @@ -262,6 +262,10 @@ shouldBe("PropertyCatchalls.x", 4); for (var i = 0; i < 6; ++i) var x = PropertyCatchalls.x; shouldBe("x", null); +var make_throw = 'make_throw'; +shouldThrow("PropertyCatchalls[make_throw]=1"); +make_throw = 0; +shouldThrow("PropertyCatchalls[make_throw]=1"); for (var i = 0; i < 10; ++i) { for (var p in PropertyCatchalls) { diff --git a/Source/JavaScriptCore/API/tests/testapi.mm b/Source/JavaScriptCore/API/tests/testapi.mm new file mode 100644 index 000000000..defb46e70 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/testapi.mm @@ -0,0 +1,841 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import + +extern "C" void JSSynchronousGarbageCollectForDebugging(JSContextRef); + +extern "C" bool _Block_has_signature(id); +extern "C" const char * _Block_signature(id); + +extern int failed; +extern "C" void testObjectiveCAPI(void); + +#if JSC_OBJC_API_ENABLED + +@protocol ParentObject +@end + +@interface ParentObject : NSObject ++ (NSString *)parentTest; +@end + +@implementation ParentObject ++ (NSString *)parentTest +{ + return [self description]; +} +@end + +@protocol TestObject +@property int variable; +@property (readonly) int six; +@property CGPoint point; ++ (NSString *)classTest; ++ (NSString *)parentTest; +- (NSString *)getString; +JSExportAs(testArgumentTypes, +- (NSString *)testArgumentTypesWithInt:(int)i double:(double)d boolean:(BOOL)b string:(NSString *)s number:(NSNumber *)n array:(NSArray *)a dictionary:(NSDictionary *)o +); +- (void)callback:(JSValue *)function; +- (void)bogusCallback:(void(^)(int))function; +@end + +@interface TestObject : ParentObject +@property int six; ++ (id)testObject; +@end + +@implementation TestObject +@synthesize variable; +@synthesize six; +@synthesize point; ++ (id)testObject +{ + return [[TestObject alloc] init]; +} ++ (NSString *)classTest +{ + return @"classTest - okay"; +} +- (NSString *)getString +{ + return @"42"; +} +- (NSString *)testArgumentTypesWithInt:(int)i double:(double)d boolean:(BOOL)b string:(NSString *)s number:(NSNumber *)n array:(NSArray *)a dictionary:(NSDictionary *)o +{ + return [NSString stringWithFormat:@"%d,%g,%d,%@,%d,%@,%@", i, d, b==YES?true:false,s,[n intValue],a[1],o[@"x"]]; +} +- (void)callback:(JSValue *)function +{ + [function callWithArguments:[NSArray arrayWithObject:[NSNumber numberWithInt:42]]]; +} +- (void)bogusCallback:(void(^)(int))function +{ + function(42); +} +@end + +bool testXYZTested = false; + +@protocol TextXYZ +@property int x; +@property (readonly) int y; +@property (assign) JSValue *onclick; +@property (assign) JSValue *weakOnclick; +- (void)test:(NSString *)message; +@end + +@interface TextXYZ : NSObject +@property int x; +@property int y; +@property int z; +- (void)click; +@end + +@implementation TextXYZ { + JSManagedValue *m_weakOnclickHandler; + JSManagedValue *m_onclickHandler; +} +@synthesize x; +@synthesize y; +@synthesize z; +- (void)test:(NSString *)message +{ + testXYZTested = [message isEqual:@"test"] && x == 13 & y == 4 && z == 5; +} +- (void)setWeakOnclick:(JSValue *)value +{ + m_weakOnclickHandler = [JSManagedValue managedValueWithValue:value]; +} + +- (void)setOnclick:(JSValue *)value +{ + m_onclickHandler = [JSManagedValue managedValueWithValue:value]; + [value.context.virtualMachine addManagedReference:m_onclickHandler withOwner:self]; +} +- (JSValue *)weakOnclick +{ + return [m_weakOnclickHandler value]; +} +- (JSValue *)onclick +{ + return [m_onclickHandler value]; +} +- (void)click +{ + if (!m_onclickHandler) + return; + + JSValue *function = [m_onclickHandler value]; + [function callWithArguments:[NSArray array]]; +} +- (void)dealloc +{ + [[m_onclickHandler value].context.virtualMachine removeManagedReference:m_onclickHandler withOwner:self]; +} +@end + +@class TinyDOMNode; + +@protocol TinyDOMNode +- (void)appendChild:(TinyDOMNode *)child; +- (NSUInteger)numberOfChildren; +- (TinyDOMNode *)childAtIndex:(NSUInteger)index; +- (void)removeChildAtIndex:(NSUInteger)index; +@end + +@interface TinyDOMNode : NSObject ++ (JSVirtualMachine *)sharedVirtualMachine; ++ (void)clearSharedVirtualMachine; +@end + +@implementation TinyDOMNode { + NSMutableArray *m_children; +} + +static JSVirtualMachine *sharedInstance = nil; + ++ (JSVirtualMachine *)sharedVirtualMachine +{ + if (!sharedInstance) + sharedInstance = [[JSVirtualMachine alloc] init]; + return sharedInstance; +} + ++ (void)clearSharedVirtualMachine +{ + sharedInstance = nil; +} + +- (id)init +{ + self = [super init]; + if (!self) + return nil; + + m_children = [[NSMutableArray alloc] initWithCapacity:0]; + + return self; +} + +- (void)dealloc +{ + NSEnumerator *enumerator = [m_children objectEnumerator]; + id nextChild; + while ((nextChild = [enumerator nextObject])) + [[TinyDOMNode sharedVirtualMachine] removeManagedReference:nextChild withOwner:self]; + +#if !__has_feature(objc_arc) + [super dealloc]; +#endif +} + +- (void)appendChild:(TinyDOMNode *)child +{ + [[TinyDOMNode sharedVirtualMachine] addManagedReference:child withOwner:self]; + [m_children addObject:child]; +} + +- (NSUInteger)numberOfChildren +{ + return [m_children count]; +} + +- (TinyDOMNode *)childAtIndex:(NSUInteger)index +{ + if (index >= [m_children count]) + return nil; + return [m_children objectAtIndex:index]; +} + +- (void)removeChildAtIndex:(NSUInteger)index +{ + if (index >= [m_children count]) + return; + [[TinyDOMNode sharedVirtualMachine] removeManagedReference:[m_children objectAtIndex:index] withOwner:self]; + [m_children removeObjectAtIndex:index]; +} + +@end + +static void checkResult(NSString *description, bool passed) +{ + NSLog(@"TEST: \"%@\": %@", description, passed ? @"PASSED" : @"FAILED"); + if (!passed) + failed = 1; +} + +static bool blockSignatureContainsClass() +{ + static bool containsClass = ^{ + id block = ^(NSString *string){ return string; }; + return _Block_has_signature(block) && strstr(_Block_signature(block), "NSString"); + }(); + return containsClass; +} + +void testObjectiveCAPI() +{ + NSLog(@"Testing Objective-C API"); + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + JSValue *result = [context evaluateScript:@"2 + 2"]; + checkResult(@"2 + 2", [result isNumber] && [result toInt32] == 4); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + NSString *result = [NSString stringWithFormat:@"Two plus two is %@", [context evaluateScript:@"2 + 2"]]; + checkResult(@"stringWithFormat", [result isEqual:@"Two plus two is 4"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"message"] = @"Hello"; + JSValue *result = [context evaluateScript:@"message + ', World!'"]; + checkResult(@"Hello, World!", [result isString] && [result isEqualToObject:@"Hello, World!"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + JSValue *result = [context evaluateScript:@"({ x:42 })"]; + checkResult(@"({ x:42 })", [result isObject] && [result[@"x"] isEqualToObject:@42]); + id obj = [result toObject]; + checkResult(@"Check dictionary literal", [obj isKindOfClass:[NSDictionary class]]); + id num = (NSDictionary *)obj[@"x"]; + checkResult(@"Check numeric literal", [num isKindOfClass:[NSNumber class]]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + __block int result; + context[@"blockCallback"] = ^(int value){ + result = value; + }; + [context evaluateScript:@"blockCallback(42)"]; + checkResult(@"blockCallback", result == 42); + } + + if (blockSignatureContainsClass()) { + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + __block bool result = false; + context[@"blockCallback"] = ^(NSString *value){ + result = [@"42" isEqualToString:value] == YES; + }; + [context evaluateScript:@"blockCallback(42)"]; + checkResult(@"blockCallback(NSString *)", result); + } + } else + NSLog(@"Skipping 'blockCallback(NSString *)' test case"); + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + checkResult(@"!context.exception", !context.exception); + [context evaluateScript:@"!@#$%^&*() THIS IS NOT VALID JAVASCRIPT SYNTAX !@#$%^&*()"]; + checkResult(@"context.exception", context.exception); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + __block bool caught = false; + context.exceptionHandler = ^(JSContext *context, JSValue *exception) { + (void)context; + (void)exception; + caught = true; + }; + [context evaluateScript:@"!@#$%^&*() THIS IS NOT VALID JAVASCRIPT SYNTAX !@#$%^&*()"]; + checkResult(@"JSContext.exceptionHandler", caught); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"callback"] = ^{ + JSContext *context = [JSContext currentContext]; + context.exception = [JSValue valueWithNewErrorFromMessage:@"Something went wrong." inContext:context]; + }; + JSValue *result = [context evaluateScript:@"var result; try { callback(); } catch (e) { result = 'Caught exception'; }"]; + checkResult(@"Explicit throw in callback - was caught by JavaScript", [result isEqualToObject:@"Caught exception"]); + checkResult(@"Explicit throw in callback - not thrown to Objective-C", !context.exception); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"callback"] = ^{ + JSContext *context = [JSContext currentContext]; + [context evaluateScript:@"!@#$%^&*() THIS IS NOT VALID JAVASCRIPT SYNTAX !@#$%^&*()"]; + }; + JSValue *result = [context evaluateScript:@"var result; try { callback(); } catch (e) { result = 'Caught exception'; }"]; + checkResult(@"Implicit throw in callback - was caught by JavaScript", [result isEqualToObject:@"Caught exception"]); + checkResult(@"Implicit throw in callback - not thrown to Objective-C", !context.exception); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + [context evaluateScript: + @"function sum(array) { \ + var result = 0; \ + for (var i in array) \ + result += array[i]; \ + return result; \ + }"]; + JSValue *array = [JSValue valueWithObject:@[@13, @2, @7] inContext:context]; + JSValue *sumFunction = context[@"sum"]; + JSValue *result = [sumFunction callWithArguments:@[ array ]]; + checkResult(@"sum([13, 2, 7])", [result toInt32] == 22); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + JSValue *mulAddFunction = [context evaluateScript: + @"(function(array, object) { \ + var result = []; \ + for (var i in array) \ + result.push(array[i] * object.x + object.y); \ + return result; \ + })"]; + JSValue *result = [mulAddFunction callWithArguments:@[ @[ @2, @4, @8 ], @{ @"x":@0.5, @"y":@42 } ]]; + checkResult(@"mulAddFunction", [result isObject] && [[result toString] isEqual:@"43,44,46"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + JSValue *array = [JSValue valueWithNewArrayInContext:context]; + checkResult(@"arrayLengthEmpty", [[array[@"length"] toNumber] unsignedIntegerValue] == 0); + JSValue *value1 = [JSValue valueWithInt32:42 inContext:context]; + JSValue *value2 = [JSValue valueWithInt32:24 inContext:context]; + NSUInteger lowIndex = 5; + NSUInteger maxLength = UINT_MAX; + + [array setValue:value1 atIndex:lowIndex]; + checkResult(@"array.length after put to low index", [[array[@"length"] toNumber] unsignedIntegerValue] == (lowIndex + 1)); + + [array setValue:value1 atIndex:(maxLength - 1)]; + checkResult(@"array.length after put to maxLength - 1", [[array[@"length"] toNumber] unsignedIntegerValue] == maxLength); + + [array setValue:value2 atIndex:maxLength]; + checkResult(@"array.length after put to maxLength", [[array[@"length"] toNumber] unsignedIntegerValue] == maxLength); + + [array setValue:value2 atIndex:(maxLength + 1)]; + checkResult(@"array.length after put to maxLength + 1", [[array[@"length"] toNumber] unsignedIntegerValue] == maxLength); + + checkResult(@"valueAtIndex:0 is undefined", [[array valueAtIndex:0] isUndefined]); + checkResult(@"valueAtIndex:lowIndex", [[array valueAtIndex:lowIndex] toInt32] == 42); + checkResult(@"valueAtIndex:maxLength - 1", [[array valueAtIndex:(maxLength - 1)] toInt32] == 42); + checkResult(@"valueAtIndex:maxLength", [[array valueAtIndex:maxLength] toInt32] == 24); + checkResult(@"valueAtIndex:maxLength + 1", [[array valueAtIndex:(maxLength + 1)] toInt32] == 24); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + JSValue *object = [JSValue valueWithNewObjectInContext:context]; + + object[@"point"] = @{ @"x":@1, @"y":@2 }; + object[@"point"][@"x"] = @3; + CGPoint point = [object[@"point"] toPoint]; + checkResult(@"toPoint", point.x == 3 && point.y == 2); + + object[@{ @"toString":^{ return @"foo"; } }] = @"bar"; + checkResult(@"toString in object literal used as subscript", [[object[@"foo"] toString] isEqual:@"bar"]); + + object[[@"foobar" substringToIndex:3]] = @"bar"; + checkResult(@"substring used as subscript", [[object[@"foo"] toString] isEqual:@"bar"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TextXYZ *testXYZ = [[TextXYZ alloc] init]; + context[@"testXYZ"] = testXYZ; + testXYZ.x = 3; + testXYZ.y = 4; + testXYZ.z = 5; + [context evaluateScript:@"testXYZ.x = 13; testXYZ.y = 14;"]; + [context evaluateScript:@"testXYZ.test('test')"]; + checkResult(@"TextXYZ - testXYZTested", testXYZTested); + JSValue *result = [context evaluateScript:@"testXYZ.x + ',' + testXYZ.y + ',' + testXYZ.z"]; + checkResult(@"TextXYZ - result", [result isEqualToObject:@"13,4,undefined"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + [context[@"Object"][@"prototype"] defineProperty:@"getterProperty" descriptor:@{ + JSPropertyDescriptorGetKey:^{ + return [JSContext currentThis][@"x"]; + } + }]; + JSValue *object = [JSValue valueWithObject:@{ @"x":@101 } inContext:context]; + int result = [object [@"getterProperty"] toInt32]; + checkResult(@"getterProperty", result == 101); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"concatenate"] = ^{ + NSArray *arguments = [JSContext currentArguments]; + if (![arguments count]) + return @""; + NSString *message = [arguments[0] description]; + for (NSUInteger index = 1; index < [arguments count]; ++index) + message = [NSString stringWithFormat:@"%@ %@", message, arguments[index]]; + return message; + }; + JSValue *result = [context evaluateScript:@"concatenate('Hello,', 'World!')"]; + checkResult(@"concatenate", [result isEqualToObject:@"Hello, World!"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"foo"] = @YES; + checkResult(@"@YES is boolean", [context[@"foo"] isBoolean]); + JSValue *result = [context evaluateScript:@"typeof foo"]; + checkResult(@"@YES is boolean", [result isEqualToObject:@"boolean"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + JSValue *result = [context evaluateScript:@"String(testObject)"]; + checkResult(@"String(testObject)", [result isEqualToObject:@"[object TestObject]"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + JSValue *result = [context evaluateScript:@"String(testObject.__proto__)"]; + checkResult(@"String(testObject.__proto__)", [result isEqualToObject:@"[object TestObjectPrototype]"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"TestObject"] = [TestObject class]; + JSValue *result = [context evaluateScript:@"String(TestObject)"]; + checkResult(@"String(TestObject)", [result isEqualToObject:@"[object TestObjectConstructor]"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + JSValue* value = [JSValue valueWithObject:[TestObject class] inContext:context]; + checkResult(@"[value toObject] == [TestObject class]", [value toObject] == [TestObject class]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"TestObject"] = [TestObject class]; + JSValue *result = [context evaluateScript:@"TestObject.parentTest()"]; + checkResult(@"TestObject.parentTest()", [result isEqualToObject:@"TestObject"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObjectA"] = testObject; + context[@"testObjectB"] = testObject; + JSValue *result = [context evaluateScript:@"testObjectA == testObjectB"]; + checkResult(@"testObjectA == testObjectB", [result isBoolean] && [result toBool]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + testObject.point = (CGPoint){3,4}; + JSValue *result = [context evaluateScript:@"var result = JSON.stringify(testObject.point); testObject.point = {x:12,y:14}; result"]; + checkResult(@"testObject.point - result", [result isEqualToObject:@"{\"x\":3,\"y\":4}"]); + checkResult(@"testObject.point - {x:12,y:14}", testObject.point.x == 12 && testObject.point.y == 14); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + testObject.six = 6; + context[@"testObject"] = testObject; + context[@"mul"] = ^(int x, int y){ return x * y; }; + JSValue *result = [context evaluateScript:@"mul(testObject.six, 7)"]; + checkResult(@"mul(testObject.six, 7)", [result isNumber] && [result toInt32] == 42); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + context[@"testObject"][@"variable"] = @4; + [context evaluateScript:@"++testObject.variable"]; + checkResult(@"++testObject.variable", testObject.variable == 5); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"point"] = @{ @"x":@6, @"y":@7 }; + JSValue *result = [context evaluateScript:@"point.x + ',' + point.y"]; + checkResult(@"point.x + ',' + point.y", [result isEqualToObject:@"6,7"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"point"] = @{ @"x":@6, @"y":@7 }; + JSValue *result = [context evaluateScript:@"point.x + ',' + point.y"]; + checkResult(@"point.x + ',' + point.y", [result isEqualToObject:@"6,7"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + JSValue *result = [context evaluateScript:@"testObject.getString()"]; + checkResult(@"testObject.getString()", [result isString] && [result toInt32] == 42); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + JSValue *result = [context evaluateScript:@"testObject.testArgumentTypes(101,0.5,true,'foo',666,[false,'bar',false],{x:'baz'})"]; + checkResult(@"testObject.testArgumentTypes", [result isEqualToObject:@"101,0.5,1,foo,666,bar,baz"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + JSValue *result = [context evaluateScript:@"testObject.getString.call(testObject)"]; + checkResult(@"testObject.getString.call(testObject)", [result isString] && [result toInt32] == 42); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + checkResult(@"testObject.getString.call({}) pre", !context.exception); + [context evaluateScript:@"testObject.getString.call({})"]; + checkResult(@"testObject.getString.call({}) post", context.exception); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject* testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + JSValue *result = [context evaluateScript:@"var result = 0; testObject.callback(function(x){ result = x; }); result"]; + checkResult(@"testObject.callback", [result isNumber] && [result toInt32] == 42); + result = [context evaluateScript:@"testObject.bogusCallback"]; + checkResult(@"testObject.bogusCallback == undefined", [result isUndefined]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject *testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + JSValue *result = [context evaluateScript:@"Function.prototype.toString.call(testObject.callback)"]; + checkResult(@"Function.prototype.toString", !context.exception && ![result isUndefined]); + } + + @autoreleasepool { + JSContext *context1 = [[JSContext alloc] init]; + JSContext *context2 = [[JSContext alloc] initWithVirtualMachine:context1.virtualMachine]; + JSValue *value = [JSValue valueWithDouble:42 inContext:context2]; + context1[@"passValueBetweenContexts"] = value; + JSValue *result = [context1 evaluateScript:@"passValueBetweenContexts"]; + checkResult(@"[value isEqualToObject:result]", [value isEqualToObject:result]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"handleTheDictionary"] = ^(NSDictionary *dict) { + NSDictionary *expectedDict = @{ + @"foo" : [NSNumber numberWithInt:1], + @"bar" : @{ + @"baz": [NSNumber numberWithInt:2] + } + }; + checkResult(@"recursively convert nested dictionaries", [dict isEqualToDictionary:expectedDict]); + }; + [context evaluateScript:@"var myDict = { \ + 'foo': 1, \ + 'bar': {'baz': 2} \ + }; \ + handleTheDictionary(myDict);"]; + + context[@"handleTheArray"] = ^(NSArray *array) { + NSArray *expectedArray = @[@"foo", @"bar", @[@"baz"]]; + checkResult(@"recursively convert nested arrays", [array isEqualToArray:expectedArray]); + }; + [context evaluateScript:@"var myArray = ['foo', 'bar', ['baz']]; handleTheArray(myArray);"]; + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject *testObject = [TestObject testObject]; + @autoreleasepool { + context[@"testObject"] = testObject; + [context evaluateScript:@"var constructor = Object.getPrototypeOf(testObject).constructor; constructor.prototype = undefined;"]; + [context evaluateScript:@"testObject = undefined"]; + } + + JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]); + + @autoreleasepool { + context[@"testObject"] = testObject; + } + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TextXYZ *testXYZ = [[TextXYZ alloc] init]; + + @autoreleasepool { + context[@"testXYZ"] = testXYZ; + + [context evaluateScript:@" \ + didClick = false; \ + testXYZ.onclick = function() { \ + didClick = true; \ + }; \ + \ + testXYZ.weakOnclick = function() { \ + return 'foo'; \ + }; \ + "]; + } + + @autoreleasepool { + [testXYZ click]; + JSValue *result = [context evaluateScript:@"didClick"]; + checkResult(@"Event handler onclick", [result toBool]); + } + + JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]); + + @autoreleasepool { + JSValue *result = [context evaluateScript:@"testXYZ.onclick"]; + checkResult(@"onclick still around after GC", !([result isNull] || [result isUndefined])); + } + + + @autoreleasepool { + JSValue *result = [context evaluateScript:@"testXYZ.weakOnclick"]; + checkResult(@"weakOnclick not around after GC", [result isNull] || [result isUndefined]); + } + + @autoreleasepool { + [context evaluateScript:@" \ + didClick = false; \ + testXYZ = null; \ + "]; + } + + JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]); + + @autoreleasepool { + [testXYZ click]; + JSValue *result = [context evaluateScript:@"didClick"]; + checkResult(@"Event handler onclick doesn't fire", ![result toBool]); + } + } + + @autoreleasepool { + JSVirtualMachine *vm = [[JSVirtualMachine alloc] init]; + TestObject *testObject = [TestObject testObject]; + JSManagedValue *weakValue; + @autoreleasepool { + JSContext *context = [[JSContext alloc] initWithVirtualMachine:vm]; + context[@"testObject"] = testObject; + weakValue = [[JSManagedValue alloc] initWithValue:context[@"testObject"]]; + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] initWithVirtualMachine:vm]; + context[@"testObject"] = testObject; + JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]); + checkResult(@"weak value == nil", ![weakValue value]); + checkResult(@"root is still alive", ![context[@"testObject"] isUndefined]); + } + } + + @autoreleasepool { + JSVirtualMachine *vm = [TinyDOMNode sharedVirtualMachine]; + JSContext *context = [[JSContext alloc] initWithVirtualMachine:vm]; + TinyDOMNode *root = [[TinyDOMNode alloc] init]; + TinyDOMNode *lastNode = root; + for (NSUInteger i = 0; i < 3; i++) { + TinyDOMNode *newNode = [[TinyDOMNode alloc] init]; + [lastNode appendChild:newNode]; + lastNode = newNode; + } + + @autoreleasepool { + context[@"root"] = root; + context[@"getLastNodeInChain"] = ^(TinyDOMNode *head){ + TinyDOMNode *lastNode = nil; + while (head) { + lastNode = head; + head = [lastNode childAtIndex:0]; + } + return lastNode; + }; + [context evaluateScript:@"getLastNodeInChain(root).myCustomProperty = 42;"]; + } + + JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]); + + JSValue *myCustomProperty = [context evaluateScript:@"getLastNodeInChain(root).myCustomProperty"]; + checkResult(@"My custom property == 42", [myCustomProperty isNumber] && [myCustomProperty toInt32] == 42); + + [TinyDOMNode clearSharedVirtualMachine]; + } + + @autoreleasepool { + JSVirtualMachine *vm = [TinyDOMNode sharedVirtualMachine]; + JSContext *context = [[JSContext alloc] initWithVirtualMachine:vm]; + TinyDOMNode *root = [[TinyDOMNode alloc] init]; + TinyDOMNode *lastNode = root; + for (NSUInteger i = 0; i < 3; i++) { + TinyDOMNode *newNode = [[TinyDOMNode alloc] init]; + [lastNode appendChild:newNode]; + lastNode = newNode; + } + + @autoreleasepool { + context[@"root"] = root; + context[@"getLastNodeInChain"] = ^(TinyDOMNode *head){ + TinyDOMNode *lastNode = nil; + while (head) { + lastNode = head; + head = [lastNode childAtIndex:0]; + } + return lastNode; + }; + [context evaluateScript:@"getLastNodeInChain(root).myCustomProperty = 42;"]; + + [root appendChild:[root childAtIndex:0]]; + [root removeChildAtIndex:0]; + } + + JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]); + + JSValue *myCustomProperty = [context evaluateScript:@"getLastNodeInChain(root).myCustomProperty"]; + checkResult(@"duplicate calls to addManagedReference don't cause things to die", [myCustomProperty isNumber] && [myCustomProperty toInt32] == 42); + + [TinyDOMNode clearSharedVirtualMachine]; + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + JSValue *o = [JSValue valueWithNewObjectInContext:context]; + o[@"foo"] = @"foo"; + JSSynchronousGarbageCollectForDebugging([context JSGlobalContextRef]); + + checkResult(@"JSValue correctly protected its internal value", [[o[@"foo"] toString] isEqualToString:@"foo"]); + } + + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + TestObject *testObject = [TestObject testObject]; + context[@"testObject"] = testObject; + [context evaluateScript:@"testObject.__lookupGetter__('variable').call({})"]; + checkResult(@"Make sure we throw an exception when calling getter on incorrect |this|", context.exception); + } + + @autoreleasepool { + TestObject *testObject = [TestObject testObject]; + JSManagedValue *managedTestObject; + @autoreleasepool { + JSContext *context = [[JSContext alloc] init]; + context[@"testObject"] = testObject; + managedTestObject = [JSManagedValue managedValueWithValue:context[@"testObject"]]; + [context.virtualMachine addManagedReference:managedTestObject withOwner:testObject]; + } + } +} + +#else + +void testObjectiveCAPI() +{ +} + +#endif diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt index 0a7a8bd3f..73917eb55 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(JavaScriptCore_INCLUDE_DIRECTORIES +set(JavaScriptCore_INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}" "${JAVASCRIPTCORE_DIR}" "${JAVASCRIPTCORE_DIR}/API" @@ -23,7 +23,7 @@ SET(JavaScriptCore_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/Source" ) -SET(JavaScriptCore_SOURCES +set(JavaScriptCore_SOURCES API/JSBase.cpp API/JSCallbackConstructor.cpp API/JSCallbackFunction.cpp @@ -32,11 +32,12 @@ SET(JavaScriptCore_SOURCES API/JSContextRef.cpp API/JSObjectRef.cpp API/JSProfilerPrivate.cpp + API/JSScriptRef.cpp API/JSStringRef.cpp API/JSValueRef.cpp API/JSWeakObjectMapRefPrivate.cpp API/OpaqueJSString.cpp - + assembler/MacroAssembler.cpp assembler/LinkBuffer.cpp @@ -50,14 +51,17 @@ SET(JavaScriptCore_SOURCES bytecode/CodeType.cpp bytecode/DFGExitProfile.cpp bytecode/ExecutionCounter.cpp + bytecode/ExitKind.cpp bytecode/GetByIdStatus.cpp bytecode/JumpTable.cpp bytecode/LazyOperandValueProfile.cpp bytecode/MethodOfGettingAValueProfile.cpp bytecode/Opcode.cpp bytecode/PolymorphicPutByIdList.cpp - bytecode/SpeculatedType.cpp + bytecode/PreciseJumpTargets.cpp bytecode/PutByIdStatus.cpp + bytecode/SpeculatedType.cpp + bytecode/ReduceWhitespace.cpp bytecode/ResolveGlobalStatus.cpp bytecode/SamplingTool.cpp bytecode/SpecialPointer.cpp @@ -73,42 +77,52 @@ SET(JavaScriptCore_SOURCES dfg/DFGArgumentsSimplificationPhase.cpp dfg/DFGArrayMode.cpp dfg/DFGAssemblyHelpers.cpp + dfg/DFGBackwardsPropagationPhase.cpp dfg/DFGByteCodeParser.cpp dfg/DFGCapabilities.cpp + dfg/DFGCommon.cpp dfg/DFGCFAPhase.cpp dfg/DFGCFGSimplificationPhase.cpp + dfg/DFGCPSRethreadingPhase.cpp dfg/DFGConstantFoldingPhase.cpp - dfg/DFGCorrectableJumpPoint.cpp dfg/DFGCSEPhase.cpp + dfg/DFGDCEPhase.cpp dfg/DFGDisassembler.cpp dfg/DFGDominators.cpp dfg/DFGDriver.cpp + dfg/DFGEdge.cpp dfg/DFGFixupPhase.cpp dfg/DFGGraph.cpp dfg/DFGJITCompiler.cpp + dfg/DFGLongLivedState.cpp dfg/DFGMinifiedNode.cpp + dfg/DFGNode.cpp dfg/DFGNodeFlags.cpp dfg/DFGOSREntry.cpp dfg/DFGOSRExit.cpp dfg/DFGOSRExitCompiler.cpp dfg/DFGOSRExitCompiler32_64.cpp dfg/DFGOSRExitCompiler64.cpp + dfg/DFGOSRExitJumpPlaceholder.cpp dfg/DFGOperations.cpp dfg/DFGPhase.cpp dfg/DFGPredictionPropagationPhase.cpp + dfg/DFGPredictionInjectionPhase.cpp dfg/DFGRepatch.cpp dfg/DFGSpeculativeJIT.cpp dfg/DFGSpeculativeJIT32_64.cpp dfg/DFGSpeculativeJIT64.cpp - dfg/DFGStructureCheckHoistingPhase.cpp + dfg/DFGTypeCheckHoistingPhase.cpp dfg/DFGThunks.cpp + dfg/DFGUnificationPhase.cpp + dfg/DFGUseKind.cpp dfg/DFGValueSource.cpp dfg/DFGVariableAccessDataDump.cpp dfg/DFGVariableEvent.cpp dfg/DFGVariableEventStream.cpp dfg/DFGValidate.cpp dfg/DFGVirtualRegisterAllocationPhase.cpp - + disassembler/Disassembler.cpp heap/BlockAllocator.cpp @@ -126,19 +140,22 @@ SET(JavaScriptCore_SOURCES heap/IncrementalSweeper.cpp heap/JITStubRoutineSet.cpp heap/MachineStackMarker.cpp + heap/MarkedAllocator.cpp heap/MarkedBlock.cpp heap/MarkedSpace.cpp heap/MarkStack.cpp heap/SlotVisitor.cpp - heap/WeakSet.cpp - heap/WeakHandleOwner.cpp + heap/SuperRegion.cpp + heap/Weak.cpp heap/WeakBlock.cpp + heap/WeakHandleOwner.cpp + heap/WeakSet.cpp debugger/Debugger.cpp debugger/DebuggerActivation.cpp debugger/DebuggerCallFrame.cpp - + interpreter/AbstractPC.cpp interpreter/CallFrame.cpp interpreter/Interpreter.cpp @@ -147,6 +164,7 @@ SET(JavaScriptCore_SOURCES jit/ClosureCallStubRoutine.cpp jit/ExecutableAllocator.cpp + jit/ExecutableAllocatorFixedVMPool.cpp jit/HostCallReturnValue.cpp jit/GCAwareJITStubRoutine.cpp jit/JITArithmetic32_64.cpp @@ -163,6 +181,7 @@ SET(JavaScriptCore_SOURCES jit/JITPropertyAccess.cpp jit/JITStubRoutine.cpp jit/JITStubs.cpp + jit/JITThunks.cpp jit/JumpReplacementWatchpoint.cpp jit/ThunkGenerators.cpp @@ -170,12 +189,25 @@ SET(JavaScriptCore_SOURCES parser/Nodes.cpp parser/Parser.cpp parser/ParserArena.cpp + parser/SourceProvider.cpp parser/SourceProviderCache.cpp + profiler/ProfilerBytecode.cpp + profiler/ProfilerBytecodeSequence.cpp + profiler/ProfilerBytecodes.cpp + profiler/ProfilerCompilation.cpp + profiler/ProfilerCompilationKind.cpp + profiler/ProfilerCompiledBytecode.cpp + profiler/ProfilerDatabase.cpp + profiler/ProfilerOrigin.cpp + profiler/ProfilerOriginStack.cpp + profiler/ProfilerOSRExit.cpp + profiler/ProfilerOSRExitSite.cpp + profiler/ProfilerProfiledBytecodes.cpp profiler/Profile.cpp profiler/ProfileGenerator.cpp profiler/ProfileNode.cpp - profiler/Profiler.cpp + profiler/LegacyProfiler.cpp runtime/ArgList.cpp runtime/Arguments.cpp @@ -201,6 +233,7 @@ SET(JavaScriptCore_SOURCES runtime/ExceptionHelpers.cpp runtime/Executable.cpp runtime/FunctionConstructor.cpp + runtime/FunctionExecutableDump.cpp runtime/FunctionPrototype.cpp runtime/GCActivityCallback.cpp runtime/GetterSetter.cpp @@ -215,7 +248,7 @@ SET(JavaScriptCore_SOURCES runtime/JSDateMath.cpp runtime/JSFunction.cpp runtime/JSBoundFunction.cpp - runtime/JSGlobalData.cpp + runtime/VM.cpp runtime/JSGlobalObject.cpp runtime/JSGlobalObjectFunctions.cpp runtime/JSProxy.cpp @@ -231,18 +264,16 @@ SET(JavaScriptCore_SOURCES runtime/JSString.cpp runtime/JSStringJoiner.cpp runtime/JSSymbolTableObject.cpp - runtime/JSValue.cpp + runtime/JSCJSValue.cpp runtime/JSVariableObject.cpp runtime/JSWrapperObject.cpp runtime/LiteralParser.cpp runtime/Lookup.cpp runtime/MathObject.cpp + runtime/MemoryStatistics.cpp runtime/NameConstructor.cpp - runtime/NameConstructor.h runtime/NameInstance.cpp - runtime/NameInstance.h runtime/NamePrototype.cpp - runtime/NamePrototype.h runtime/NativeErrorConstructor.cpp runtime/NativeErrorPrototype.cpp runtime/NumberConstructor.cpp @@ -255,6 +286,8 @@ SET(JavaScriptCore_SOURCES runtime/PropertyDescriptor.cpp runtime/PropertyNameArray.cpp runtime/PropertySlot.cpp + runtime/PropertyTable.cpp + runtime/PrototypeMap.cpp runtime/RegExp.cpp runtime/RegExpCache.cpp runtime/RegExpConstructor.cpp @@ -270,9 +303,11 @@ SET(JavaScriptCore_SOURCES runtime/StringPrototype.cpp runtime/StringRecursionChecker.cpp runtime/Structure.cpp + runtime/StructureRareData.cpp runtime/StructureChain.cpp runtime/SymbolTable.cpp - runtime/TimeoutChecker.cpp + runtime/Watchdog.cpp + runtime/WatchdogNone.cpp tools/CodeProfile.cpp tools/CodeProfiling.cpp @@ -284,7 +319,7 @@ SET(JavaScriptCore_SOURCES yarr/YarrSyntaxChecker.cpp ) -SET(JavaScriptCore_LUT_FILES +set(JavaScriptCore_LUT_FILES runtime/ArrayConstructor.cpp runtime/ArrayPrototype.cpp runtime/BooleanPrototype.cpp @@ -298,34 +333,41 @@ SET(JavaScriptCore_LUT_FILES runtime/NumberConstructor.cpp runtime/NumberPrototype.cpp runtime/ObjectConstructor.cpp - runtime/ObjectPrototype.cpp runtime/RegExpConstructor.cpp runtime/RegExpObject.cpp runtime/RegExpPrototype.cpp runtime/StringConstructor.cpp - runtime/StringPrototype.cpp ) -SET(JavaScriptCore_LIBRARIES - ${WTF_LIBRARY_NAME} +set(JavaScriptCore_LIBRARIES + WTF ) -IF (ENABLE_LLINT) +if (WTF_USE_ICU_UNICODE) + list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES + ${ICU_INCLUDE_DIRS} + ) + list(APPEND JavaScriptCore_LIBRARIES + ${ICU_I18N_LIBRARIES} + ) +endif () + +if (ENABLE_LLINT) # We cannot check for RUBY_FOUND because it is set only when the full package is installed and # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro # for finding the only Ruby interpreter. - IF (NOT RUBY_EXECUTABLE) - MESSAGE(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.") - ENDIF () + if (NOT RUBY_EXECUTABLE) + message(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.") + endif () - SET(LLINT_ASM + set(LLINT_ASM llint/LowLevelInterpreter.asm llint/LowLevelInterpreter32_64.asm llint/LowLevelInterpreter64.asm ) - SET(OFFLINE_ASM - offlineasm/armv7.rb + set(OFFLINE_ASM + offlineasm/arm.rb offlineasm/ast.rb offlineasm/backends.rb offlineasm/cloop.rb @@ -342,7 +384,7 @@ IF (ENABLE_LLINT) offlineasm/x86.rb ) - ADD_CUSTOM_COMMAND( + add_custom_command( OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} @@ -358,11 +400,11 @@ IF (ENABLE_LLINT) # Additionally, setting the OBJECT_DEPENDS property will make LLIntDesiredOffsets.h a Makefile # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will # actually be run twice! - ADD_EXECUTABLE(LLIntOffsetsExtractor + add_executable(LLIntOffsetsExtractor ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ) - TARGET_LINK_LIBRARIES(LLIntOffsetsExtractor ${WTF_LIBRARY_NAME}) + target_link_libraries(LLIntOffsetsExtractor WTF) # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization @@ -370,7 +412,7 @@ IF (ENABLE_LLINT) # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch) # after every asm.rb run. - ADD_CUSTOM_COMMAND( + add_custom_command( OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} @@ -381,11 +423,11 @@ IF (ENABLE_LLINT) # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of # the .cpp files below is similar to the one in the previous comment. However, since these .cpp # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS - # since it is used in the ADD_LIBRARY() call at the end of this file. - LIST(APPEND JavaScriptCore_HEADERS + # since it is used in the add_library() call at the end of this file. + list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h ) - LIST(APPEND JavaScriptCore_SOURCES + list(APPEND JavaScriptCore_SOURCES llint/LLIntCLoop.cpp llint/LLIntData.cpp llint/LLIntEntrypoints.cpp @@ -394,16 +436,25 @@ IF (ENABLE_LLINT) llint/LLIntThunks.cpp llint/LowLevelInterpreter.cpp ) -ENDIF () +endif () + +set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table) +macro(GENERATE_HASH_LUT _input _output) + add_custom_command( + OUTPUT ${_output} + DEPENDS ${HASH_LUT_GENERATOR} ${_input} + COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} -i > ${_output} + VERBATIM) + list(APPEND JavaScriptCore_HEADERS ${_output}) +endmacro() # GENERATOR 1-A: LUT creator -FOREACH (_file ${JavaScriptCore_LUT_FILES}) - GET_FILENAME_COMPONENT(_name ${_file} NAME_WE) - GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h) - LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h) -ENDFOREACH () +foreach (_file ${JavaScriptCore_LUT_FILES}) + get_filename_component(_name ${_file} NAME_WE) + GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h) +endforeach () -SET (JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES +set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES assembler bytecode collector/handles @@ -418,7 +469,7 @@ SET (JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES yarr ) -SET (JavaScriptCore_FORWARDING_HEADERS_FILES +set(JavaScriptCore_FORWARDING_HEADERS_FILES API/APICast.h API/APIShims.h API/JavaScript.h @@ -427,6 +478,7 @@ SET (JavaScriptCore_FORWARDING_HEADERS_FILES API/JSContextRefPrivate.h API/JSObjectRef.h API/JSObjectRefPrivate.h + API/JSScriptRefPrivate.h API/JSStringRef.h API/JSStringRefCF.h API/JSStringRefBSTR.h @@ -442,38 +494,62 @@ SET (JavaScriptCore_FORWARDING_HEADERS_FILES # GENERATOR 1-B: particular LUT creator (for 1 file only) -GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h MAIN_DEPENDENCY) -LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h) +GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h) #GENERATOR: "RegExpJitTables.h": tables used by Yarr -ADD_CUSTOM_COMMAND( +add_custom_command( OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h - MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables - COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h VERBATIM) -ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h) +ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h) #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer -ADD_CUSTOM_COMMAND( +add_custom_command( OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h - MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py - COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py ${JAVASCRIPTCORE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h VERBATIM) -ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h) +ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h) -IF (WTF_CPU_ARM) - LIST(APPEND JavaScriptCore_SOURCES +if (WTF_CPU_ARM) + list(APPEND JavaScriptCore_SOURCES assembler/ARMAssembler.cpp assembler/ARMv7Assembler.cpp assembler/MacroAssemblerARM.cpp ) -ELSEIF (WTF_CPU_MIPS) -ELSEIF (WTF_CPU_X86) -ELSEIF (WTF_CPU_X86_64) -ELSE () - MESSAGE(FATAL_ERROR "Unknown CPU") -ENDIF () + if (MSVC AND ENABLE_JIT) + add_custom_command( + OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm + MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_jit_stubs + DEPENDS ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp + COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_jit_stubs --prefix=MSVC ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp > ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm + VERBATIM) + + add_custom_command( + OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj + MAIN_DEPENDENCY ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm + COMMAND armasm -nologo ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj + VERBATIM) + + list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj) + endif () +elseif (WTF_CPU_MIPS) +elseif (WTF_CPU_X86) +elseif (WTF_CPU_X86_64) + if (MSVC AND ENABLE_JIT) + add_custom_command( + OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj + MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm + COMMAND ml64 -nologo -c -Fo ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm + VERBATIM) + + list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj) + endif () +else () + message(FATAL_ERROR "Unknown CPU") +endif () WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() @@ -481,17 +557,21 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES}) -ADD_SUBDIRECTORY(shell) +add_subdirectory(shell) WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES}) -INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES}) -ADD_DEFINITIONS(-DBUILDING_JavaScriptCore) -ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES}) -TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES}) -SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore") -SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "") - -IF (SHARED_CORE) - SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) - INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}") -ENDIF () +include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES}) +add_definitions(-DBUILDING_JavaScriptCore -DSTATICALLY_LINKED_WITH_WTF) +add_library(JavaScriptCore ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES}) +target_link_libraries(JavaScriptCore ${JavaScriptCore_LIBRARIES}) +set_target_properties(JavaScriptCore PROPERTIES FOLDER "JavaScriptCore") +set_target_properties(JavaScriptCore PROPERTIES LINK_INTERFACE_LIBRARIES "") + +if (JavaScriptCore_OUTPUT_NAME) + set_target_properties(JavaScriptCore PROPERTIES OUTPUT_NAME ${JavaScriptCore_OUTPUT_NAME}) +endif () + +if (SHARED_CORE) + set_target_properties(JavaScriptCore PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) + install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}") +endif () diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog deleted file mode 100644 index df3f15070..000000000 --- a/Source/JavaScriptCore/ChangeLog +++ /dev/null @@ -1,9281 +0,0 @@ -2013-04-09 Balazs Kilvady - - LLInt conditional branch compilation fault on MIPS. - https://bugs.webkit.org/show_bug.cgi?id=114264 - - Reviewed by Filip Pizlo. - - Fix conditional branch compilation in LLInt offlineasm. - - * offlineasm/mips.rb: - -2013-02-18 Balazs Kilvady - - MIPS DFG implementation. - https://bugs.webkit.org/show_bug.cgi?id=101328 - - Reviewed by Oliver Hunt. - - DFG implementation for MIPS. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::MIPSAssembler): - (JSC::MIPSAssembler::sllv): - (JSC::MIPSAssembler::movd): - (MIPSAssembler): - (JSC::MIPSAssembler::negd): - (JSC::MIPSAssembler::labelForWatchpoint): - (JSC::MIPSAssembler::label): - (JSC::MIPSAssembler::vmov): - (JSC::MIPSAssembler::linkDirectJump): - (JSC::MIPSAssembler::maxJumpReplacementSize): - (JSC::MIPSAssembler::revertJumpToMove): - (JSC::MIPSAssembler::replaceWithJump): - * assembler/MacroAssembler.h: - (MacroAssembler): - (JSC::MacroAssembler::poke): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::add32): - (MacroAssemblerMIPS): - (JSC::MacroAssemblerMIPS::and32): - (JSC::MacroAssemblerMIPS::lshift32): - (JSC::MacroAssemblerMIPS::mul32): - (JSC::MacroAssemblerMIPS::or32): - (JSC::MacroAssemblerMIPS::rshift32): - (JSC::MacroAssemblerMIPS::urshift32): - (JSC::MacroAssemblerMIPS::sub32): - (JSC::MacroAssemblerMIPS::xor32): - (JSC::MacroAssemblerMIPS::store32): - (JSC::MacroAssemblerMIPS::jump): - (JSC::MacroAssemblerMIPS::branchAdd32): - (JSC::MacroAssemblerMIPS::branchMul32): - (JSC::MacroAssemblerMIPS::branchSub32): - (JSC::MacroAssemblerMIPS::branchNeg32): - (JSC::MacroAssemblerMIPS::call): - (JSC::MacroAssemblerMIPS::loadDouble): - (JSC::MacroAssemblerMIPS::moveDouble): - (JSC::MacroAssemblerMIPS::swapDouble): - (JSC::MacroAssemblerMIPS::subDouble): - (JSC::MacroAssemblerMIPS::mulDouble): - (JSC::MacroAssemblerMIPS::divDouble): - (JSC::MacroAssemblerMIPS::negateDouble): - (JSC::MacroAssemblerMIPS::branchEqual): - (JSC::MacroAssemblerMIPS::branchNotEqual): - (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32): - (JSC::MacroAssemblerMIPS::branchTruncateDoubleToUint32): - (JSC::MacroAssemblerMIPS::truncateDoubleToInt32): - (JSC::MacroAssemblerMIPS::truncateDoubleToUint32): - (JSC::MacroAssemblerMIPS::branchDoubleNonZero): - (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN): - (JSC::MacroAssemblerMIPS::invert): - (JSC::MacroAssemblerMIPS::replaceWithJump): - (JSC::MacroAssemblerMIPS::maxJumpReplacementSize): - * dfg/DFGAssemblyHelpers.h: - (AssemblyHelpers): - (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall): - (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn): - (JSC::DFG::AssemblyHelpers::debugCall): - * dfg/DFGCCallHelpers.h: - (CCallHelpers): - (JSC::DFG::CCallHelpers::setupArguments): - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - * dfg/DFGFPRInfo.h: - (DFG): - (FPRInfo): - (JSC::DFG::FPRInfo::toRegister): - (JSC::DFG::FPRInfo::toIndex): - (JSC::DFG::FPRInfo::debugName): - * dfg/DFGGPRInfo.h: - (DFG): - (GPRInfo): - (JSC::DFG::GPRInfo::toRegister): - (JSC::DFG::GPRInfo::toIndex): - (JSC::DFG::GPRInfo::debugName): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - * jit/JSInterfaceJIT.h: - (JSInterfaceJIT): - * runtime/JSGlobalData.h: - (JSC::ScratchBuffer::allocationSize): - (ScratchBuffer): - -2013-02-01 Balazs Kilvady - - offlineasm BaseIndex handling is broken on ARM due to MIPS changes - https://bugs.webkit.org/show_bug.cgi?id=108261 - - Reviewed by Filip Pizlo. - - offlineasm BaseIndex handling fix on MIPS. - - * offlineasm/mips.rb: - * offlineasm/risc.rb: - -2013-01-07 Balazs Kilvady - - MIPS LLInt implementation. - https://bugs.webkit.org/show_bug.cgi?id=99706 - - Reviewed by Filip Pizlo. - - LLInt implementation for MIPS. - - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::jump): - * dfg/DFGOperations.cpp: - (JSC): - * jit/JITStubs.cpp: - (JSC): - * jit/JITStubs.h: - (JITStackFrame): - * llint/LLIntOfflineAsmConfig.h: - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * offlineasm/backends.rb: - * offlineasm/instructions.rb: - * offlineasm/mips.rb: Added. - -2013-02-27 Simon Hausmann - - [Qt][Mac] Fix massive parallel builds - - Reviewed by Tor Arne Vestbø. - - There exists a race condition that LLIntDesiredOffsets.h is written to - by two parllel instances of the ruby script. This patch ensures that similar to the output file, - the generated file is also prefixed according to the build configuration. - - * LLIntOffsetsExtractor.pro: - -2012-12-18 Mark Hahnenberg - - Restrictions on oversize CopiedBlock allocations should be relaxed - https://bugs.webkit.org/show_bug.cgi?id=105339 - - Reviewed by Filip Pizlo. - - Currently the DFG has a single branch in the inline allocation path for property/array storage where - it checks to see if the number of bytes requested will fit in the current block. This does not match - what the C++ allocation path does; it checks if the requested number of bytes is oversize, and then - if it's not, it tries to fit it in the current block. The garbage collector assumes that ALL allocations - that are greater than 16KB are in oversize blocks. Therefore, this mismatch can lead to crashes when - the collector tries to perform some operation on a CopiedBlock. - - To avoid adding an extra branch to the inline allocation path in the JIT, we should make it so that - oversize blocks are allocated on the same alignment boundaries so that there is a single mask to find - the block header of any CopiedBlock (rather than two, one for normal and one for oversize blocks), and - we should figure out if a block is oversize by some other method than just whatever the JSObject says - it is. One way we could record this info Region of the block, since we allocate a one-off Region for - oversize blocks. - - * heap/BlockAllocator.h: - (JSC::Region::isCustomSize): - (Region): - (JSC::Region::createCustomSize): - (JSC::Region::Region): - (JSC::BlockAllocator::deallocateCustomSize): - * heap/CopiedBlock.h: - (CopiedBlock): - (JSC::CopiedBlock::isOversize): - (JSC): - * heap/CopiedSpace.cpp: - (JSC::CopiedSpace::tryAllocateOversize): - (JSC::CopiedSpace::tryReallocate): - (JSC::CopiedSpace::tryReallocateOversize): - * heap/CopiedSpace.h: - (CopiedSpace): - * heap/CopiedSpaceInlines.h: - (JSC::CopiedSpace::contains): - (JSC::CopiedSpace::tryAllocate): - (JSC): - * heap/CopyVisitor.h: - (CopyVisitor): - * heap/CopyVisitorInlines.h: - (JSC::CopyVisitor::checkIfShouldCopy): - (JSC::CopyVisitor::didCopy): - * heap/SlotVisitorInlines.h: - (JSC::SlotVisitor::copyLater): - * runtime/JSObject.cpp: - (JSC::JSObject::copyButterfly): - -2012-12-17 Mark Hahnenberg - - Butterfly::growArrayRight shouldn't be called on null Butterfly objects - https://bugs.webkit.org/show_bug.cgi?id=105221 - - Reviewed by Filip Pizlo. - - Currently we depend upon the fact that Butterfly::growArrayRight works with null Butterfly - objects purely by coincidence. We should add a new static function that null checks the old - Butterfly object and creates a new one if it's null, or calls growArrayRight if it isn't for - use in the couple of places in JSObject that expect such behavior to work. - - * runtime/Butterfly.h: - (Butterfly): - * runtime/ButterflyInlines.h: - (JSC::Butterfly::createOrGrowArrayRight): - (JSC): - * runtime/JSObject.cpp: - (JSC::JSObject::createInitialIndexedStorage): - (JSC::JSObject::createArrayStorage): - -2013-01-02 Simon Hausmann - - [MinGW-w64] Centralize workaround for pow() implementation - https://bugs.webkit.org/show_bug.cgi?id=105925 - - Reviewed by Sam Weinig. - - As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h - away from the JSC usage. - - * runtime/MathObject.cpp: - (JSC::mathPow): - -2012-12-17 Jonathan Liu - - Fix Math.pow implementation with MinGW-w64 - https://bugs.webkit.org/show_bug.cgi?id=105087 - - Reviewed by Simon Hausmann. - - The MinGW-w64 runtime has different behaviour for pow() - compared to other C runtimes. This results in the following - test262 tests failing with the latest MinGW-w64 runtime: - - S15.8.2.13_A14 - - S15.8.2.13_A16 - - S15.8.2.13_A20 - - S15.8.2.13_A22 - - Handle the special cases that are different with MinGW-w64. - - * runtime/MathObject.cpp: - (JSC::mathPow): - -2012-12-07 Jonathan Liu - - Add missing forward declaration for JSC::ArrayAllocationProfile - https://bugs.webkit.org/show_bug.cgi?id=104425 - - Reviewed by Kentaro Hara. - - The header for the JSC::ArrayConstructor class is missing a forward - declaration for the JSC::ArrayAllocationProfile class which causes - compilation to fail when compiling with MinGW-w64. - - * runtime/ArrayConstructor.h: - (JSC): - -2012-12-07 Jonathan Liu - - Add missing const qualifier to JSC::CodeBlock::getJITType() - https://bugs.webkit.org/show_bug.cgi?id=104424 - - Reviewed by Laszlo Gombos. - - JSC::CodeBlock::getJITType() has the const qualifier when JIT is - enabled but is missing the const qualifier when JIT is disabled. - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getJITType): - -2012-11-30 Pierre Rossi - - [Qt] Unreviewed speculative Mac build fix after r136232 - - Update the include path so that LLIntAssembly.h is picked up. - The bot didn't break until later when a clean build was triggered. - - * JavaScriptCore.pri: - -2012-11-30 Allan Sandfeld Jensen - - Crash in conversion of empty OpaqueJSString to Identifier - https://bugs.webkit.org/show_bug.cgi?id=101867 - - Reviewed by NOBODY (OOPS!). - - The constructor call used for both null and empty OpaqueJSStrings results - in an assertion voilation and crash. This patch instead uses the Identifier - constructors which are specifically for null and empty Identifier. - - * API/OpaqueJSString.cpp: - (OpaqueJSString::identifier): - -2012-11-30 Tor Arne Vestbø - - [Qt] Place the LLIntOffsetsExtractor binaries in debug/release subdirs on Mac - - Otherwise we'll end up using the same LLIntAssembly.h for both build - configs of JavaScriptCore -- one of them which will be for the wrong - config. - - Reviewed by Simon Hausmann. - - * LLIntOffsetsExtractor.pro: - -2012-11-30 Julien BRIANCEAU - - [sh4] Fix compilation warnings in JavaScriptCore JIT for sh4 arch - https://bugs.webkit.org/show_bug.cgi?id=103378 - - Reviewed by Filip Pizlo. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::branchTest32): - (JSC::MacroAssemblerSH4::branchAdd32): - (JSC::MacroAssemblerSH4::branchMul32): - (JSC::MacroAssemblerSH4::branchSub32): - (JSC::MacroAssemblerSH4::branchOr32): - -2012-11-29 Rafael Weinstein - - [HTMLTemplateElement] Add feature flag - https://bugs.webkit.org/show_bug.cgi?id=103694 - - Reviewed by Adam Barth. - - This flag will guard the implementation of the HTMLTemplateElement. - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html - - * Configurations/FeatureDefines.xcconfig: - -2012-11-29 Filip Pizlo - - It should be easy to find code blocks in debug dumps - https://bugs.webkit.org/show_bug.cgi?id=103623 - - Reviewed by Goeffrey Garen. - - This gives CodeBlock a relatively strong, but also relatively compact, hash. We compute - it lazily so that it only impacts run-time when debug support is enabled. We stringify - it smartly so that it's short and easy to type. We base it on the source code so that - the optimization level is irrelevant. And, we use SHA1 since it's already in our code - base. Now, when a piece of code wants to print some debugging to say that it's operating - on some code block, it can use this CodeBlockHash instead of memory addresses. - - This also takes CodeBlock debugging into the new world of print() and dataLog(). In - particular, CodeBlock::dump() corresponds to the thing you want printed if you do: - - dataLog("I heart ", *myCodeBlock); - - Probably, you want to just print some identifying information at this point rather than - the full bytecode dump. So, the existing CodeBlock::dump() has been renamed to - CodeBlock::dumpBytecode(), and CodeBlock::dump() now prints the CodeBlockHash plus just - a few little tidbits. - - Here's an example of CodeBlock::dump() output: - - EkILzr:[0x103883a00, BaselineFunctionCall] - - EkILzr is the CodeBlockHash. 0x103883a00 is the CodeBlock's address in memory. The other - part is self-explanatory. - - Finally, this new notion of CodeBlockHash is available for other purposes like bisecting - breakage. As such CodeBlockHash has all of the comparison operator overloads. When - bisecting in DFGDriver.cpp, you can now say things like: - - if (codeBlock->hash() < CodeBlockHash("CAAAAA")) - return false; - - And yes, CAAAAA is near the median hash, and the largest one is smaller than E99999. Such - is life when you use base 62 to encode a 32-bit number. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * bytecode/CallLinkInfo.h: - (CallLinkInfo): - (JSC::CallLinkInfo::specializationKind): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::hash): - (JSC): - (JSC::CodeBlock::dumpAssumingJITType): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::dumpBytecode): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::resetStubInternal): - (JSC::CodeBlock::reoptimize): - (JSC::ProgramCodeBlock::jettison): - (JSC::EvalCodeBlock::jettison): - (JSC::FunctionCodeBlock::jettison): - (JSC::CodeBlock::shouldOptimizeNow): - (JSC::CodeBlock::tallyFrequentExitSites): - (JSC::CodeBlock::dumpValueProfiles): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::specializationKind): - (CodeBlock): - (JSC::CodeBlock::getJITType): - * bytecode/CodeBlockHash.cpp: Added. - (JSC): - (JSC::CodeBlockHash::CodeBlockHash): - (JSC::CodeBlockHash::dump): - * bytecode/CodeBlockHash.h: Added. - (JSC): - (CodeBlockHash): - (JSC::CodeBlockHash::CodeBlockHash): - (JSC::CodeBlockHash::hash): - (JSC::CodeBlockHash::operator==): - (JSC::CodeBlockHash::operator!=): - (JSC::CodeBlockHash::operator<): - (JSC::CodeBlockHash::operator>): - (JSC::CodeBlockHash::operator<=): - (JSC::CodeBlockHash::operator>=): - * bytecode/CodeBlockWithJITType.h: Added. - (JSC): - (CodeBlockWithJITType): - (JSC::CodeBlockWithJITType::CodeBlockWithJITType): - (JSC::CodeBlockWithJITType::dump): - * bytecode/CodeOrigin.cpp: Added. - (JSC): - (JSC::CodeOrigin::inlineDepthForCallFrame): - (JSC::CodeOrigin::inlineDepth): - (JSC::CodeOrigin::inlineStack): - (JSC::InlineCallFrame::hash): - * bytecode/CodeOrigin.h: - (InlineCallFrame): - (JSC::InlineCallFrame::specializationKind): - (JSC): - * bytecode/CodeType.cpp: Added. - (WTF): - (WTF::printInternal): - * bytecode/CodeType.h: - (WTF): - * bytecode/ExecutionCounter.cpp: - (JSC::ExecutionCounter::dump): - * bytecode/ExecutionCounter.h: - (ExecutionCounter): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseCodeBlock): - * dfg/DFGDisassembler.cpp: - (JSC::DFG::Disassembler::dump): - * dfg/DFGGraph.cpp: - (JSC::DFG::Graph::dumpCodeOrigin): - * dfg/DFGOSRExitCompiler.cpp: - * dfg/DFGOperations.cpp: - * dfg/DFGRepatch.cpp: - (JSC::DFG::generateProtoChainAccessStub): - (JSC::DFG::tryCacheGetByID): - (JSC::DFG::tryBuildGetByIDList): - (JSC::DFG::emitPutReplaceStub): - (JSC::DFG::emitPutTransitionStub): - (JSC::DFG::dfgLinkClosureCall): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpCallFrame): - * jit/JITCode.cpp: Added. - (WTF): - (WTF::printInternal): - * jit/JITCode.h: - (JSC::JITCode::jitType): - (WTF): - * jit/JITDisassembler.cpp: - (JSC::JITDisassembler::dump): - (JSC::JITDisassembler::dumpForInstructions): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::privateCompileGetByVal): - (JSC::JIT::privateCompilePutByVal): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdSelfList): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/CodeSpecializationKind.cpp: Added. - (WTF): - (WTF::printInternal): - * runtime/CodeSpecializationKind.h: - (JSC::specializationFromIsCall): - (JSC): - (JSC::specializationFromIsConstruct): - (WTF): - * runtime/Executable.cpp: - (JSC::ExecutableBase::hashFor): - (JSC): - (JSC::NativeExecutable::hashFor): - (JSC::ScriptExecutable::hashFor): - * runtime/Executable.h: - (ExecutableBase): - (NativeExecutable): - (ScriptExecutable): - (JSC::ScriptExecutable::source): - -2012-11-29 Michael Saboff - - Speculative Windows build fix after r136086. - - Unreviewed build fix. - - Suspect that ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z needs to be removed from Windows - export list since the symbol was removed in r136086. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-11-28 Filip Pizlo - - SpeculatedType dumping should not use the static char buffer[thingy] idiom - https://bugs.webkit.org/show_bug.cgi?id=103584 - - Reviewed by Michael Saboff. - - Changed SpeculatedType to be "dumpable" by saying things like: - - dataLog("thingy = ", SpeculationDump(thingy)) - - Removed the old stringification functions, and changed all code that referred to them - to use the new dataLog()/print() style. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * bytecode/SpeculatedType.cpp: - (JSC::dumpSpeculation): - (JSC::speculationToAbbreviatedString): - (JSC::dumpSpeculationAbbreviated): - * bytecode/SpeculatedType.h: - * bytecode/ValueProfile.h: - (JSC::ValueProfileBase::dump): - * bytecode/VirtualRegister.h: - (WTF::printInternal): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::dump): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation): - (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit): - * dfg/DFGGraph.cpp: - (JSC::DFG::Graph::dump): - (JSC::DFG::Graph::predictArgumentTypes): - * dfg/DFGGraph.h: - (Graph): - * dfg/DFGStructureAbstractValue.h: - * dfg/DFGVariableAccessDataDump.cpp: Added. - (JSC::DFG::VariableAccessDataDump::VariableAccessDataDump): - (JSC::DFG::VariableAccessDataDump::dump): - * dfg/DFGVariableAccessDataDump.h: Added. - (VariableAccessDataDump): - -2012-11-28 Michael Saboff - - Change Bytecompiler s_dumpsGeneratedCode to an Options value - https://bugs.webkit.org/show_bug.cgi?id=103588 - - Reviewed by Filip Pizlo. - - Moved the control of dumping bytecodes to Options::dumpGeneratedBytecodes. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecompiler/BytecodeGenerator.cpp: - * bytecompiler/BytecodeGenerator.h: - * jsc.cpp: - (runWithScripts): - * runtime/Options.h: - -2012-11-28 Mark Hahnenberg - - Copying phase should use work lists - https://bugs.webkit.org/show_bug.cgi?id=101390 - - Reviewed by Filip Pizlo. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * heap/BlockAllocator.cpp: - (JSC::BlockAllocator::BlockAllocator): - * heap/BlockAllocator.h: New RegionSet for CopyWorkListSegments. - (BlockAllocator): - (JSC::CopyWorkListSegment): - * heap/CopiedBlock.h: Added a per-block CopyWorkList to keep track of the JSCells that need to be revisited during the copying - phase to copy their backing stores. - (CopiedBlock): - (JSC::CopiedBlock::CopiedBlock): - (JSC::CopiedBlock::didSurviveGC): - (JSC::CopiedBlock::didEvacuateBytes): There is now a one-to-one relationship between GCThreads and the CopiedBlocks they're - responsible for evacuating, we no longer need any of that fancy compare and swap stuff. - (JSC::CopiedBlock::pin): - (JSC::CopiedBlock::hasWorkList): - (JSC::CopiedBlock::workList): - * heap/CopiedBlockInlines.h: Added. - (JSC::CopiedBlock::reportLiveBytes): Since we now have to grab a SpinLock to perform operations on the CopyWorkList during marking, - we don't need to do any of that fancy compare and swap stuff we were doing for tracking live bytes. - * heap/CopiedSpace.h: - (CopiedSpace): - * heap/CopiedSpaceInlines.h: - (JSC::CopiedSpace::pin): - * heap/CopyVisitor.cpp: - (JSC::CopyVisitor::copyFromShared): We now iterate over a range of CopiedBlocks rather than MarkedBlocks and revisit the cells in those - blocks' CopyWorkLists. - * heap/CopyVisitor.h: - (CopyVisitor): - * heap/CopyVisitorInlines.h: - (JSC::CopyVisitor::visitCell): The function responsible for calling the correct copyBackingStore() function for each JSCell from - a CopiedBlock's CopyWorkList. - (JSC::CopyVisitor::didCopy): We no longer need to check if the block is empty here because we know exactly when we're done - evacuating a CopiedBlock, which is when we've gone through all of the CopiedBlock's CopyWorkList. - * heap/CopyWorkList.h: Added. - (CopyWorkListSegment): Individual chunk of a CopyWorkList that is allocated from the BlockAllocator. - (JSC::CopyWorkListSegment::create): - (JSC::CopyWorkListSegment::size): - (JSC::CopyWorkListSegment::isFull): - (JSC::CopyWorkListSegment::get): - (JSC::CopyWorkListSegment::append): - (JSC::CopyWorkListSegment::CopyWorkListSegment): - (JSC::CopyWorkListSegment::data): - (JSC::CopyWorkListSegment::endOfBlock): - (CopyWorkListIterator): Responsible for giving CopyVisitors a contiguous notion of access across the separate CopyWorkListSegments - that make up each CopyWorkList. - (JSC::CopyWorkListIterator::get): - (JSC::CopyWorkListIterator::operator*): - (JSC::CopyWorkListIterator::operator->): - (JSC::CopyWorkListIterator::operator++): - (JSC::CopyWorkListIterator::operator==): - (JSC::CopyWorkListIterator::operator!=): - (JSC::CopyWorkListIterator::CopyWorkListIterator): - (CopyWorkList): Data structure that keeps track of the JSCells that need copying in a particular CopiedBlock. - (JSC::CopyWorkList::CopyWorkList): - (JSC::CopyWorkList::~CopyWorkList): - (JSC::CopyWorkList::append): - (JSC::CopyWorkList::begin): - (JSC::CopyWorkList::end): - * heap/GCThreadSharedData.cpp: - (JSC::GCThreadSharedData::GCThreadSharedData): We no longer use the m_blockSnapshot from the Heap during the copying phase. - (JSC::GCThreadSharedData::didStartCopying): We now copy the set of all blocks in the CopiedSpace to a separate vector for - iterating over during the copying phase since the set stored in the CopiedSpace will change as blocks are evacuated and - recycled throughout the copying phase. - * heap/GCThreadSharedData.h: - (GCThreadSharedData): - * heap/Heap.h: - (Heap): - * heap/SlotVisitor.h: We now need to know the object who is being marked that has a backing store so that we can store it - in a CopyWorkList to revisit later during the copying phase. - * heap/SlotVisitorInlines.h: - (JSC::SlotVisitor::copyLater): - * runtime/JSObject.cpp: - (JSC::JSObject::visitButterfly): - -2012-11-28 Filip Pizlo - - Disassembly methods should be able to disassemble to any PrintStream& rather than always using WTF::dataFile() - https://bugs.webkit.org/show_bug.cgi?id=103492 - - Reviewed by Mark Hahnenberg. - - Switched disassembly code to use PrintStream&, and to use print() rather than printf(). - - * dfg/DFGDisassembler.cpp: - (JSC::DFG::Disassembler::dump): - (DFG): - (JSC::DFG::Disassembler::dumpDisassembly): - * dfg/DFGDisassembler.h: - (Disassembler): - * dfg/DFGGraph.cpp: - (JSC::DFG::printWhiteSpace): - (JSC::DFG::Graph::dumpCodeOrigin): - (JSC::DFG::Graph::printNodeWhiteSpace): - (JSC::DFG::Graph::dump): - (DFG): - (JSC::DFG::Graph::dumpBlockHeader): - * dfg/DFGGraph.h: - (Graph): - * jit/JITDisassembler.cpp: - (JSC::JITDisassembler::dump): - (JSC::JITDisassembler::dumpForInstructions): - (JSC::JITDisassembler::dumpDisassembly): - * jit/JITDisassembler.h: - (JITDisassembler): - -2012-11-28 Filip Pizlo - - It should be possible to say dataLog("count = ", count, "\n") instead of dataLogF("count = %d\n", count) - https://bugs.webkit.org/show_bug.cgi?id=103009 - - Reviewed by Michael Saboff. - - Instead of converting all of JSC to use the new dataLog()/print() methods, I just changed - one place: dumping of abstract values. This is mainly just to ensure that the code I - added to WTF is actually doing things. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::dump): - (WTF): - (WTF::printInternal): - * dfg/DFGStructureAbstractValue.h: - (JSC::DFG::StructureAbstractValue::dump): - (WTF): - (WTF::printInternal): - -2012-11-28 Oliver Hunt - - Make source cache include more information about the function extent. - https://bugs.webkit.org/show_bug.cgi?id=103552 - - Reviewed by Gavin Barraclough. - - Add a bit more information to the source cache. - - * parser/Parser.cpp: - (JSC::::parseFunctionInfo): - Store the function start offset - * parser/SourceProviderCacheItem.h: - (JSC::SourceProviderCacheItem::SourceProviderCacheItem): - (SourceProviderCacheItem): - Add additional field for the start of the real function string, and re-arrange - fields to avoid growing the struct. - -2012-11-27 Filip Pizlo - - Convert some remaining uses of FILE* to PrintStream&. - - Rubber stamped by Mark Hahnenberg. - - * bytecode/ValueProfile.h: - (JSC::ValueProfileBase::dump): - * bytecode/ValueRecovery.h: - (JSC::ValueRecovery::dump): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseCodeBlock): - * dfg/DFGNode.h: - (JSC::DFG::Node::dumpChildren): - -2012-11-27 Filip Pizlo - - Fix indentation in JSValue.h - - Rubber stamped by Mark Hahnenberg. - - * runtime/JSValue.h: - -2012-11-26 Filip Pizlo - - DFG SetLocal should use forwardSpeculationCheck instead of its own half-baked version of same - https://bugs.webkit.org/show_bug.cgi?id=103353 - - Reviewed by Oliver Hunt and Gavin Barraclough. - - Made it possible to use forward speculations for most of the operand classes. Changed the conditional - direction parameter from being 'bool isForward' to an enum (SpeculationDirection). Changed SetLocal - to use forward speculations and got rid of its half-baked version of same. - - Also added the ability to force the DFG's disassembler to dump all nodes, even ones that are dead. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGDisassembler.cpp: - (JSC::DFG::Disassembler::dump): - * dfg/DFGDriver.cpp: - (JSC::DFG::compile): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::speculationCheck): - (DFG): - (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): - (JSC::DFG::SpeculativeJIT::speculationWatchpoint): - (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution): - (JSC::DFG::SpeculativeJIT::fillStorage): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand): - (JSC::DFG::SpeculateIntegerOperand::gpr): - (SpeculateIntegerOperand): - (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand): - (JSC::DFG::SpeculateDoubleOperand::fpr): - (SpeculateDoubleOperand): - (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand): - (JSC::DFG::SpeculateCellOperand::gpr): - (SpeculateCellOperand): - (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand): - (JSC::DFG::SpeculateBooleanOperand::gpr): - (SpeculateBooleanOperand): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): - (JSC::DFG::SpeculativeJIT::fillSpeculateInt): - (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): - (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): - (JSC::DFG::SpeculativeJIT::fillSpeculateCell): - (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): - (JSC::DFG::SpeculativeJIT::fillSpeculateInt): - (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): - (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): - (JSC::DFG::SpeculativeJIT::fillSpeculateCell): - (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): - (JSC::DFG::SpeculativeJIT::compile): - * runtime/Options.h: - (JSC): - -2012-11-26 Daniel Bates - - Substitute "allSeparators8Bit" for "allSeperators8Bit" in JSC::jsSpliceSubstringsWithSeparators() - - - Reviewed by Simon Fraser. - - Fix misspelled word, "Seperators" [sic], in a local variable name in JSC::jsSpliceSubstringsWithSeparators(). - - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstringsWithSeparators): - -2012-11-26 Daniel Bates - - JavaScript fails to handle String.replace() with large replacement string - https://bugs.webkit.org/show_bug.cgi?id=102956 - - - Reviewed by Oliver Hunt. - - Fix an issue where we didn't check for overflow when computing the length - of the result of String.replace() with a large replacement string. - - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstringsWithSeparators): - -2012-11-26 Zeno Albisser - - [Qt] Fix the LLInt build on Mac - https://bugs.webkit.org/show_bug.cgi?id=97587 - - Reviewed by Simon Hausmann. - - * DerivedSources.pri: - * JavaScriptCore.pro: - -2012-11-26 Oliver Hunt - - 32-bit build fix. Move the method decalration outside of the X86_64 only section. - - * assembler/MacroAssembler.h: - (MacroAssembler): - (JSC::MacroAssembler::shouldConsiderBlinding): - -2012-11-26 Oliver Hunt - - Don't blind all the things. - https://bugs.webkit.org/show_bug.cgi?id=102572 - - Reviewed by Gavin Barraclough. - - No longer blind all the constants in the instruction stream. We use a - simple non-deterministic filter to avoid blinding everything. Also modified - the basic integer blinding logic to avoid blinding small negative values. - - * assembler/MacroAssembler.h: - (MacroAssembler): - (JSC::MacroAssembler::shouldConsiderBlinding): - (JSC::MacroAssembler::shouldBlind): - -2012-11-26 Mark Hahnenberg - - JSObject::copyButterfly doesn't handle undecided indexing types correctly - https://bugs.webkit.org/show_bug.cgi?id=102573 - - Reviewed by Filip Pizlo. - - We don't do any copying into the newly allocated vector and we don't zero-initialize CopiedBlocks - during the copying phase, so we end up with uninitialized memory in arrays which have undecided indexing - types. We should just do the actual memcpy from the old block to the new one. - - * runtime/JSObject.cpp: - (JSC::JSObject::copyButterfly): Just do the same thing that we do for other contiguous indexing types. - -2012-11-26 Julien BRIANCEAU - - [sh4] JavaScriptCore JIT build is broken since r135330 - Add missing implementation for sh4 arch. - https://bugs.webkit.org/show_bug.cgi?id=103145 - - Reviewed by Oliver Hunt. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::canJumpReplacePatchableBranchPtrWithPatch): - (MacroAssemblerSH4): - (JSC::MacroAssemblerSH4::startOfBranchPtrWithPatchOnRegister): - (JSC::MacroAssemblerSH4::revertJumpReplacementToBranchPtrWithPatch): - (JSC::MacroAssemblerSH4::startOfPatchableBranchPtrWithPatchOnAddress): - (JSC::MacroAssemblerSH4::revertJumpReplacementToPatchableBranchPtrWithPatch): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::revertJump): - (SH4Assembler): - (JSC::SH4Assembler::printInstr): - -2012-11-26 Yuqiang Xian - - Use load64 instead of loadPtr to load a JSValue on JSVALUE64 platforms - https://bugs.webkit.org/show_bug.cgi?id=100909 - - Reviewed by Brent Fulgham. - - This is a (trivial) fix after r132701. - - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - -2012-11-26 Gabor Ballabas - - [Qt][ARM] REGRESSION(r130826): It made 33 JSC test and 466 layout tests crash - https://bugs.webkit.org/show_bug.cgi?id=98857 - - Reviewed by Zoltan Herczeg. - - Implement a new version of patchableBranch32 to fix crashing JSC - tests. - - * assembler/MacroAssembler.h: - (MacroAssembler): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::patchableBranch32): - (MacroAssemblerARM): - -2012-11-21 Filip Pizlo - - Any function that can log things should be able to easily log them to a memory buffer as well - https://bugs.webkit.org/show_bug.cgi?id=103000 - - Reviewed by Sam Weinig. - - Change all users of WTF::dataFile() to expect a PrintStream& rather than a FILE*. - - * bytecode/Operands.h: - (JSC::OperandValueTraits::dump): - (JSC::dumpOperands): - (JSC): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::dump): - * dfg/DFGAbstractState.h: - (AbstractState): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::dump): - * dfg/DFGCommon.h: - (JSC::DFG::NodeIndexTraits::dump): - * dfg/DFGStructureAbstractValue.h: - (JSC::DFG::StructureAbstractValue::dump): - * dfg/DFGVariableEvent.cpp: - (JSC::DFG::VariableEvent::dump): - (JSC::DFG::VariableEvent::dumpFillInfo): - (JSC::DFG::VariableEvent::dumpSpillInfo): - * dfg/DFGVariableEvent.h: - (VariableEvent): - * disassembler/Disassembler.h: - (JSC): - (JSC::tryToDisassemble): - * disassembler/UDis86Disassembler.cpp: - (JSC::tryToDisassemble): - -2012-11-23 Alexis Menard - - [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing. - https://bugs.webkit.org/show_bug.cgi?id=102104 - - Reviewed by Julien Chaffraix. - - Protect the new feature behind a feature flag. - - * Configurations/FeatureDefines.xcconfig: - -2012-11-23 Gabor Ballabas - - Fix the ARM traditional build after r135330 - https://bugs.webkit.org/show_bug.cgi?id=102871 - - Reviewed by Zoltan Herczeg. - - Added missing functionality to traditional ARM architecture. - - * assembler/ARMAssembler.h: - (JSC::ARMAssembler::revertJump): - (ARMAssembler): - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatchOnAddress): - (JSC::MacroAssemblerARM::startOfBranchPtrWithPatchOnRegister): - (MacroAssemblerARM): - (JSC::MacroAssemblerARM::revertJumpReplacementToBranchPtrWithPatch): - -2012-11-16 Yury Semikhatsky - - Memory instrumentation: extract MemoryObjectInfo declaration into a separate file - https://bugs.webkit.org/show_bug.cgi?id=102510 - - Reviewed by Pavel Feldman. - - Added new symbols for the methods that have moved into .../wtf/MemoryInstrumentation.cpp - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-11-23 Julien BRIANCEAU - - [sh4] JavaScriptCore JIT build is broken since r130839 - Add missing implementation for sh4 arch. - https://bugs.webkit.org/show_bug.cgi?id=101479 - - Reviewed by Filip Pizlo. - - * assembler/MacroAssemblerSH4.h: - (JSC::MacroAssemblerSH4::load8Signed): - (MacroAssemblerSH4): - (JSC::MacroAssemblerSH4::load16Signed): - (JSC::MacroAssemblerSH4::store8): - (JSC::MacroAssemblerSH4::store16): - (JSC::MacroAssemblerSH4::moveDoubleToInts): - (JSC::MacroAssemblerSH4::moveIntsToDouble): - (JSC::MacroAssemblerSH4::loadFloat): - (JSC::MacroAssemblerSH4::loadDouble): - (JSC::MacroAssemblerSH4::storeFloat): - (JSC::MacroAssemblerSH4::storeDouble): - (JSC::MacroAssemblerSH4::addDouble): - (JSC::MacroAssemblerSH4::convertFloatToDouble): - (JSC::MacroAssemblerSH4::convertDoubleToFloat): - (JSC::MacroAssemblerSH4::urshift32): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::sublRegReg): - (JSC::SH4Assembler::subvlRegReg): - (JSC::SH4Assembler::floatfpulfrn): - (JSC::SH4Assembler::fldsfpul): - (JSC::SH4Assembler::fstsfpul): - (JSC::SH4Assembler::dcnvsd): - (SH4Assembler): - (JSC::SH4Assembler::movbRegMem): - (JSC::SH4Assembler::sizeOfConstantPool): - (JSC::SH4Assembler::linkJump): - (JSC::SH4Assembler::printInstr): - (JSC::SH4Assembler::printBlockInstr): - -2012-11-22 Balazs Kilvady - - Fix the MIPS build after r135330 - https://bugs.webkit.org/show_bug.cgi?id=102872 - - Reviewed by Gavin Barraclough. - - Revert/replace functions added to MIPS port. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::revertJumpToMove): - (MIPSAssembler): - (JSC::MIPSAssembler::replaceWithJump): - * assembler/MacroAssemblerMIPS.h: - (MacroAssemblerMIPS): - (JSC::MacroAssemblerMIPS::startOfBranchPtrWithPatchOnRegister): - (JSC::MacroAssemblerMIPS::revertJumpReplacementToBranchPtrWithPatch): - (JSC::MacroAssemblerMIPS::startOfPatchableBranchPtrWithPatchOnAddress): - -2012-11-21 Filip Pizlo - - Rename dataLog() and dataLogV() to dataLogF() and dataLogFV() - https://bugs.webkit.org/show_bug.cgi?id=103001 - - Rubber stamped by Dan Bernstein. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * assembler/LinkBuffer.cpp: - (JSC::LinkBuffer::finalizeCodeWithDisassembly): - (JSC::LinkBuffer::dumpLinkStatistics): - (JSC::LinkBuffer::dumpCode): - * assembler/LinkBuffer.h: - (JSC): - * assembler/SH4Assembler.h: - (JSC::SH4Assembler::vprintfStdoutInstr): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dumpBytecodeCommentAndNewLine): - (JSC::CodeBlock::printUnaryOp): - (JSC::CodeBlock::printBinaryOp): - (JSC::CodeBlock::printConditionalJump): - (JSC::CodeBlock::printGetByIdOp): - (JSC::dumpStructure): - (JSC::dumpChain): - (JSC::CodeBlock::printGetByIdCacheStatus): - (JSC::CodeBlock::printCallOp): - (JSC::CodeBlock::printPutByIdOp): - (JSC::CodeBlock::printStructure): - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::dumpStatistics): - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::resetStubInternal): - (JSC::CodeBlock::reoptimize): - (JSC::ProgramCodeBlock::jettison): - (JSC::EvalCodeBlock::jettison): - (JSC::FunctionCodeBlock::jettison): - (JSC::CodeBlock::shouldOptimizeNow): - (JSC::CodeBlock::tallyFrequentExitSites): - (JSC::CodeBlock::dumpValueProfiles): - * bytecode/Opcode.cpp: - (JSC::OpcodeStats::~OpcodeStats): - * bytecode/SamplingTool.cpp: - (JSC::SamplingFlags::stop): - (JSC::SamplingRegion::dumpInternal): - (JSC::SamplingTool::dump): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::initialize): - (JSC::DFG::AbstractState::endBasicBlock): - (JSC::DFG::AbstractState::mergeStateAtTail): - (JSC::DFG::AbstractState::mergeToSuccessors): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::dump): - * dfg/DFGArgumentsSimplificationPhase.cpp: - (JSC::DFG::ArgumentsSimplificationPhase::run): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation): - (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit): - (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): - (JSC::DFG::ByteCodeParser::makeSafe): - (JSC::DFG::ByteCodeParser::makeDivSafe): - (JSC::DFG::ByteCodeParser::handleCall): - (JSC::DFG::ByteCodeParser::handleInlining): - (JSC::DFG::ByteCodeParser::parseBlock): - (JSC::DFG::ByteCodeParser::processPhiStack): - (JSC::DFG::ByteCodeParser::linkBlock): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - (JSC::DFG::ByteCodeParser::parseCodeBlock): - (JSC::DFG::ByteCodeParser::parse): - * dfg/DFGCFAPhase.cpp: - (JSC::DFG::CFAPhase::performBlockCFA): - (JSC::DFG::CFAPhase::performForwardCFA): - * dfg/DFGCFGSimplificationPhase.cpp: - (JSC::DFG::CFGSimplificationPhase::run): - (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal): - (JSC::DFG::CFGSimplificationPhase::fixPhis): - (JSC::DFG::CFGSimplificationPhase::fixJettisonedPredecessors): - (JSC::DFG::CFGSimplificationPhase::removePotentiallyDeadPhiReference): - (JSC::DFG::CFGSimplificationPhase::mergeBlocks): - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::endIndexForPureCSE): - (JSC::DFG::CSEPhase::setReplacement): - (JSC::DFG::CSEPhase::eliminate): - (JSC::DFG::CSEPhase::performNodeCSE): - * dfg/DFGCapabilities.cpp: - (JSC::DFG::debugFail): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode): - * dfg/DFGDisassembler.cpp: - (JSC::DFG::Disassembler::dump): - * dfg/DFGDriver.cpp: - (JSC::DFG::compile): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - (JSC::DFG::FixupPhase::fixDoubleEdge): - * dfg/DFGGraph.cpp: - (JSC::DFG::printWhiteSpace): - (JSC::DFG::Graph::dumpCodeOrigin): - (JSC::DFG::Graph::dump): - (JSC::DFG::Graph::dumpBlockHeader): - (JSC::DFG::Graph::predictArgumentTypes): - * dfg/DFGJITCompiler.cpp: - (JSC::DFG::JITCompiler::link): - * dfg/DFGOSREntry.cpp: - (JSC::DFG::prepareOSREntry): - * dfg/DFGOSRExitCompiler.cpp: - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOperations.cpp: - * dfg/DFGPhase.cpp: - (JSC::DFG::Phase::beginPhase): - * dfg/DFGPhase.h: - (JSC::DFG::runAndLog): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - (JSC::DFG::PredictionPropagationPhase::propagateForward): - (JSC::DFG::PredictionPropagationPhase::propagateBackward): - (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): - * dfg/DFGRegisterBank.h: - (JSC::DFG::RegisterBank::dump): - * dfg/DFGScoreBoard.h: - (JSC::DFG::ScoreBoard::use): - (JSC::DFG::ScoreBoard::dump): - * dfg/DFGSlowPathGenerator.h: - (JSC::DFG::SlowPathGenerator::generate): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution): - (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecutionWithConditionalDirection): - (JSC::DFG::SpeculativeJIT::runSlowPathGenerators): - (JSC::DFG::SpeculativeJIT::dump): - (JSC::DFG::SpeculativeJIT::checkConsistency): - (JSC::DFG::SpeculativeJIT::compile): - (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): - (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): - (JSC::DFG::SpeculativeJIT::fillSpeculateCell): - (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): - (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): - (JSC::DFG::SpeculativeJIT::fillSpeculateCell): - (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): - * dfg/DFGStructureCheckHoistingPhase.cpp: - (JSC::DFG::StructureCheckHoistingPhase::run): - * dfg/DFGValidate.cpp: - (Validate): - (JSC::DFG::Validate::reportValidationContext): - (JSC::DFG::Validate::dumpData): - (JSC::DFG::Validate::dumpGraphIfAppropriate): - * dfg/DFGVariableEventStream.cpp: - (JSC::DFG::VariableEventStream::logEvent): - (JSC::DFG::VariableEventStream::reconstruct): - * dfg/DFGVirtualRegisterAllocationPhase.cpp: - (JSC::DFG::VirtualRegisterAllocationPhase::run): - * heap/Heap.cpp: - * heap/HeapStatistics.cpp: - (JSC::HeapStatistics::logStatistics): - (JSC::HeapStatistics::showObjectStatistics): - * heap/MarkStack.h: - * heap/MarkedBlock.h: - * heap/SlotVisitor.cpp: - (JSC::SlotVisitor::validate): - * interpreter/CallFrame.cpp: - (JSC::CallFrame::dumpCaller): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JITDisassembler.cpp: - (JSC::JITDisassembler::dump): - (JSC::JITDisassembler::dumpForInstructions): - * jit/JITStubRoutine.h: - (JSC): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JumpReplacementWatchpoint.cpp: - (JSC::JumpReplacementWatchpoint::fireInternal): - * llint/LLIntExceptions.cpp: - (JSC::LLInt::interpreterThrowInCaller): - (JSC::LLInt::returnToThrow): - (JSC::LLInt::callToThrow): - * llint/LLIntSlowPaths.cpp: - (JSC::LLInt::llint_trace_operand): - (JSC::LLInt::llint_trace_value): - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - (JSC::LLInt::traceFunctionPrologue): - (JSC::LLInt::jitCompileAndSetHeuristics): - (JSC::LLInt::entryOSR): - (JSC::LLInt::handleHostCall): - (JSC::LLInt::setUpCall): - * profiler/Profile.cpp: - (JSC::Profile::debugPrintData): - (JSC::Profile::debugPrintDataSampleStyle): - * profiler/ProfileNode.cpp: - (JSC::ProfileNode::debugPrintData): - (JSC::ProfileNode::debugPrintDataSampleStyle): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::dumpRegExpTrace): - * runtime/RegExp.cpp: - (JSC::RegExp::matchCompareWithInterpreter): - * runtime/SamplingCounter.cpp: - (JSC::AbstractSamplingCounter::dump): - * runtime/Structure.cpp: - (JSC::Structure::dumpStatistics): - (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger): - * tools/CodeProfile.cpp: - (JSC::CodeProfile::report): - * tools/ProfileTreeNode.h: - (JSC::ProfileTreeNode::dumpInternal): - * yarr/YarrInterpreter.cpp: - (JSC::Yarr::ByteCompiler::dumpDisjunction): - -2012-11-21 Filip Pizlo - - It should be possible to say disassemble(stuff) instead of having to say if (!tryToDisassemble(stuff)) dataLog("I failed") - https://bugs.webkit.org/show_bug.cgi?id=103010 - - Reviewed by Anders Carlsson. - - You can still say tryToDisassemble(), which will tell you if it failed; you can then - decide what to do instead. But it's better to say disassemble(), which will just print - the instruction ranges if tryToDisassemble() failed. This is particularly appropriate - since that's what all previous users of tryToDisassemble() would have done in some - form or another. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * assembler/LinkBuffer.cpp: - (JSC::LinkBuffer::finalizeCodeWithDisassembly): - * dfg/DFGDisassembler.cpp: - (JSC::DFG::Disassembler::dumpDisassembly): - * disassembler/Disassembler.cpp: Added. - (JSC): - (JSC::disassemble): - * disassembler/Disassembler.h: - (JSC): - * jit/JITDisassembler.cpp: - (JSC::JITDisassembler::dumpDisassembly): - -2012-11-21 Filip Pizlo - - dumpOperands() claims that it needs a non-const Operands& when that is completely false - https://bugs.webkit.org/show_bug.cgi?id=103005 - - Reviewed by Eric Carlson. - - * bytecode/Operands.h: - (JSC::dumpOperands): - (JSC): - -2012-11-20 Filip Pizlo - - Baseline JIT's disassembly should be just as pretty as the DFG's - https://bugs.webkit.org/show_bug.cgi?id=102873 - - Reviewed by Sam Weinig. - - Integrated the CodeBlock's bytecode dumper with the JIT's disassembler. Also fixed - some type goof-ups (instructions are not in a Vector so using a Vector - iterator makes no sense) and stream-lined some things (you don't actually need a - full-fledged ExecState* to dump bytecode). - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::printUnaryOp): - (JSC::CodeBlock::printBinaryOp): - (JSC::CodeBlock::printConditionalJump): - (JSC::CodeBlock::printGetByIdOp): - (JSC::CodeBlock::printCallOp): - (JSC::CodeBlock::printPutByIdOp): - (JSC::CodeBlock::dump): - (JSC): - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (CodeBlock): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpCallFrame): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JIT): - * jit/JITDisassembler.cpp: Added. - (JSC): - (JSC::JITDisassembler::JITDisassembler): - (JSC::JITDisassembler::~JITDisassembler): - (JSC::JITDisassembler::dump): - (JSC::JITDisassembler::dumpForInstructions): - (JSC::JITDisassembler::dumpDisassembly): - * jit/JITDisassembler.h: Added. - (JSC): - (JITDisassembler): - (JSC::JITDisassembler::setStartOfCode): - (JSC::JITDisassembler::setForBytecodeMainPath): - (JSC::JITDisassembler::setForBytecodeSlowPath): - (JSC::JITDisassembler::setEndOfSlowPath): - (JSC::JITDisassembler::setEndOfCode): - -2012-11-21 Daniel Bates - - JavaScript fails to concatenate large strings - - - Reviewed by Michael Saboff. - - Fixes an issue where we inadvertently didn't check the length of - a JavaScript string for overflow. - - * runtime/Operations.h: - (JSC::jsString): - (JSC::jsStringFromArguments): - -2012-11-20 Filip Pizlo - - DFG should be able to cache closure calls (part 2/2) - https://bugs.webkit.org/show_bug.cgi?id=102662 - - Reviewed by Gavin Barraclough. - - Added caching of calls where the JSFunction* varies, but the Structure* and ExecutableBase* - stay the same. This is accomplished by replacing the branch that compares against a constant - JSFunction* with a jump to a closure call stub. The closure call stub contains a fast path, - and jumps slow directly to the virtual call thunk. - - Looks like a 1% win on V8v7. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * bytecode/CallLinkInfo.cpp: - (JSC::CallLinkInfo::unlink): - * bytecode/CallLinkInfo.h: - (CallLinkInfo): - (JSC::CallLinkInfo::isLinked): - (JSC::getCallLinkInfoBytecodeIndex): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::finalizeUnconditionally): - (JSC): - (JSC::CodeBlock::findClosureCallForReturnPC): - (JSC::CodeBlock::bytecodeOffset): - (JSC::CodeBlock::codeOriginForReturn): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getCallLinkInfo): - (CodeBlock): - (JSC::CodeBlock::isIncomingCallAlreadyLinked): - * dfg/DFGJITCompiler.cpp: - (JSC::DFG::JITCompiler::link): - * dfg/DFGJITCompiler.h: - (JSC::DFG::JITCompiler::addJSCall): - (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord): - (JSCallRecord): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGRepatch.cpp: - (JSC::DFG::linkSlowFor): - (DFG): - (JSC::DFG::dfgLinkFor): - (JSC::DFG::dfgLinkSlowFor): - (JSC::DFG::dfgLinkClosureCall): - * dfg/DFGRepatch.h: - (DFG): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::emitCall): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::emitCall): - * dfg/DFGThunks.cpp: - (DFG): - (JSC::DFG::linkClosureCallThunkGenerator): - * dfg/DFGThunks.h: - (DFG): - * heap/Heap.h: - (Heap): - (JSC::Heap::jitStubRoutines): - * heap/JITStubRoutineSet.h: - (JSC::JITStubRoutineSet::size): - (JSC::JITStubRoutineSet::at): - (JITStubRoutineSet): - * jit/ClosureCallStubRoutine.cpp: Added. - (JSC): - (JSC::ClosureCallStubRoutine::ClosureCallStubRoutine): - (JSC::ClosureCallStubRoutine::~ClosureCallStubRoutine): - (JSC::ClosureCallStubRoutine::markRequiredObjectsInternal): - * jit/ClosureCallStubRoutine.h: Added. - (JSC): - (ClosureCallStubRoutine): - (JSC::ClosureCallStubRoutine::structure): - (JSC::ClosureCallStubRoutine::executable): - (JSC::ClosureCallStubRoutine::codeOrigin): - * jit/GCAwareJITStubRoutine.cpp: - (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): - * jit/GCAwareJITStubRoutine.h: - (GCAwareJITStubRoutine): - (JSC::GCAwareJITStubRoutine::isClosureCall): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - -2012-11-20 Filip Pizlo - - DFG should be able to cache closure calls (part 1/2) - https://bugs.webkit.org/show_bug.cgi?id=102662 - - Reviewed by Gavin Barraclough. - - Add ability to revert a jump replacement back to - branchPtrWithPatch(Condition, RegisterID, TrustedImmPtr). This is meant to be - a mandatory piece of functionality for all assemblers. I also renamed some of - the functions for reverting jump replacements back to - patchableBranchPtrWithPatch(Condition, Address, TrustedImmPtr), so as to avoid - confusion. - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::BadReg): - (ARMv7Assembler): - (JSC::ARMv7Assembler::revertJumpTo_movT3): - * assembler/LinkBuffer.h: - (JSC): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::startOfBranchPtrWithPatchOnRegister): - (MacroAssemblerARMv7): - (JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch): - (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatchOnAddress): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::startOfBranchPtrWithPatchOnRegister): - (MacroAssemblerX86): - (JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatchOnAddress): - (JSC::MacroAssemblerX86::revertJumpReplacementToBranchPtrWithPatch): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::startOfBranchPtrWithPatchOnRegister): - (JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatchOnAddress): - (MacroAssemblerX86_64): - (JSC::MacroAssemblerX86_64::revertJumpReplacementToBranchPtrWithPatch): - * assembler/RepatchBuffer.h: - (JSC::RepatchBuffer::startOfBranchPtrWithPatchOnRegister): - (RepatchBuffer): - (JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatchOnAddress): - (JSC::RepatchBuffer::revertJumpReplacementToBranchPtrWithPatch): - * assembler/X86Assembler.h: - (JSC::X86Assembler::revertJumpTo_cmpl_ir_force32): - (X86Assembler): - * dfg/DFGRepatch.cpp: - (JSC::DFG::replaceWithJump): - (JSC::DFG::dfgResetGetByID): - (JSC::DFG::dfgResetPutByID): - -2012-11-20 Yong Li - - [ARMv7] Neither linkCall() nor linkPointer() should flush code. - https://bugs.webkit.org/show_bug.cgi?id=99213 - - Reviewed by George Staikos. - - LinkBuffer doesn't need to flush code during linking. It will - eventually flush the whole executable. Fixing this gives >%5 - sunspider boost (on QNX). - - Also make replaceWithLoad() and replaceWithAddressComputation() flush - only when necessary. - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::linkCall): - (JSC::ARMv7Assembler::linkPointer): - (JSC::ARMv7Assembler::relinkCall): - (JSC::ARMv7Assembler::repatchInt32): - (JSC::ARMv7Assembler::repatchPointer): - (JSC::ARMv7Assembler::replaceWithLoad): Flush only after it did write. - (JSC::ARMv7Assembler::replaceWithAddressComputation): Flush only after it did write. - (JSC::ARMv7Assembler::setInt32): - (JSC::ARMv7Assembler::setPointer): - -2012-11-19 Filip Pizlo - - Remove support for ARMv7 errata from the jump code - https://bugs.webkit.org/show_bug.cgi?id=102759 - - Reviewed by Oliver Hunt. - - The jump replacement code was wrong to begin with since it wasn't doing - a cache flush on the inserted padding. And, to my knowledge, we don't need - this anymore, so this patch removes all errata code from the ARMv7 port. - - * assembler/ARMv7Assembler.h: - (JSC::ARMv7Assembler::computeJumpType): - (JSC::ARMv7Assembler::replaceWithJump): - (JSC::ARMv7Assembler::maxJumpReplacementSize): - (JSC::ARMv7Assembler::canBeJumpT3): - (JSC::ARMv7Assembler::canBeJumpT4): - -2012-11-19 Patrick Gansterer - - [CMake] Create JavaScriptCore ForwardingHeaders - https://bugs.webkit.org/show_bug.cgi?id=92665 - - Reviewed by Brent Fulgham. - - When using CMake to build the Windows port, we need - to generate the forwarding headers with it too. - - * CMakeLists.txt: - -2012-11-19 Kihong Kwon - - Add PROXIMITY_EVENTS feature - https://bugs.webkit.org/show_bug.cgi?id=102658 - - Reviewed by Kentaro Hara. - - Add PROXIMITY_EVENTS feature to xcode project for JavaScriptCore. - - * Configurations/FeatureDefines.xcconfig: - -2012-11-18 Dan Bernstein - - Try to fix the DFG build after r135099. - - * dfg/DFGCommon.h: - (JSC::DFG::shouldShowDisassembly): - -2012-11-18 Filip Pizlo - - Unreviewed, build fix for !ENABLE(DFG_JIT). - - * dfg/DFGCommon.h: - (JSC::DFG::shouldShowDisassembly): - (DFG): - -2012-11-18 Filip Pizlo - - JSC should have more logging in structure-related code - https://bugs.webkit.org/show_bug.cgi?id=102630 - - Reviewed by Simon Fraser. - - - JSValue::description() now tells you if something is a structure, and if so, - what kind of structure it is. - - - Jettisoning logic now tells you why things are being jettisoned. - - - It's now possible to turn off GC-triggered jettisoning entirely. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::reoptimize): - (JSC::ProgramCodeBlock::jettison): - (JSC::EvalCodeBlock::jettison): - (JSC::FunctionCodeBlock::jettison): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan): - * runtime/JSValue.cpp: - (JSC::JSValue::description): - * runtime/Options.h: - (JSC): - -2012-11-18 Filip Pizlo - - DFG constant folding phase should say 'changed = true' whenever it changes the graph - https://bugs.webkit.org/show_bug.cgi?id=102550 - - Rubber stamped by Mark Hahnenberg. - - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - -2012-11-17 Elliott Sprehn - - Expose JSObject removeDirect and PrivateName to WebCore - https://bugs.webkit.org/show_bug.cgi?id=102546 - - Reviewed by Geoffrey Garen. - - Export removeDirect for use in WebCore so JSDependentRetained works. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-11-16 Filip Pizlo - - Given a PutById or GetById with a proven structure, the DFG should be able to emit a PutByOffset or GetByOffset instead - https://bugs.webkit.org/show_bug.cgi?id=102327 - - Reviewed by Mark Hahnenberg. - - If the profiler tells us that a GetById or PutById may be polymorphic but our - control flow analysis proves that it isn't, we should trust the control flow - analysis over the profiler. This arises in cases where GetById or PutById were - inlined: the inlined function may have been called from other places that led - to polymorphism, but in the current inlined context, there is no polymorphism. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/GetByIdStatus.cpp: - (JSC::GetByIdStatus::computeFor): - (JSC): - * bytecode/GetByIdStatus.h: - (JSC::GetByIdStatus::GetByIdStatus): - (GetByIdStatus): - * bytecode/PutByIdStatus.cpp: - (JSC::PutByIdStatus::computeFor): - (JSC): - * bytecode/PutByIdStatus.h: - (JSC): - (JSC::PutByIdStatus::PutByIdStatus): - (PutByIdStatus): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::bestProvenStructure): - (AbstractValue): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck): - (ConstantFoldingPhase): - * dfg/DFGNode.h: - (JSC::DFG::Node::convertToGetByOffset): - (Node): - (JSC::DFG::Node::convertToPutByOffset): - (JSC::DFG::Node::hasStorageResult): - * runtime/JSGlobalObject.h: - (JSC::Structure::prototypeChain): - (JSC): - (JSC::Structure::isValid): - * runtime/Operations.h: - (JSC::isPrototypeChainNormalized): - (JSC): - * runtime/Structure.h: - (Structure): - (JSC::Structure::transitionDidInvolveSpecificValue): - -2012-11-16 Tony Chang - - Remove ENABLE_CSS_HIERARCHIES since it's no longer in use - https://bugs.webkit.org/show_bug.cgi?id=102554 - - Reviewed by Andreas Kling. - - As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 , - we're going to revist this feature once additional vendor support is - achieved. - - * Configurations/FeatureDefines.xcconfig: - -2012-11-16 Patrick Gansterer - - Build fix for WinCE after r133688. - - Use numeric_limits::max() instead of UINT32_MAX. - - * runtime/CodeCache.h: - (JSC::CacheMap::CacheMap): - -2012-11-15 Filip Pizlo - - ClassInfo.h should have correct indentation. - - Rubber stamped by Mark Hahnenberg. - - ClassInfo.h had some true creativity in its use of whitespace. Some things within - the namespace were indented four spaces and others where not. One #define had its - contents indented four spaces, while another didn't. I applied the following rule: - - - Non-macro things in the namespace should not be indented (that's our current - accepted practice). - - - Macros should never be indented but if they are multi-line then their subsequent - bodies should be indented four spaces. I believe that is consistent with what we - do elsewhere. - - * runtime/ClassInfo.h: - (JSC): - (MethodTable): - (ClassInfo): - (JSC::ClassInfo::propHashTable): - (JSC::ClassInfo::isSubClassOf): - (JSC::ClassInfo::hasStaticProperties): - -2012-11-15 Filip Pizlo - - DFG should copy propagate trivially no-op ConvertThis - https://bugs.webkit.org/show_bug.cgi?id=102445 - - Reviewed by Oliver Hunt. - - Copy propagation is always a good thing, since it reveals must-alias relationships - to the CFA and CSE. This accomplishes copy propagation for ConvertThis by first - converting it to an Identity node (which is done by the constant folder since it - has access to CFA results) and then performing substitution of references to - Identity with references to Identity's child in the CSE. - - I'm not aiming for a big speed-up here; I just think that this will be useful for - the work on https://bugs.webkit.org/show_bug.cgi?id=102327. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::performNodeCSE): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-11-15 Filip Pizlo - - CallData.h should have correct indentation. - - Rubber stamped by Mark Hahneberg. - - * runtime/CallData.h: - (JSC): - -2012-11-15 Filip Pizlo - - Remove methodCallDummy since it is not used anymore. - - Rubber stamped by Mark Hahnenberg. - - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC): - (JSC::JSGlobalObject::visitChildren): - * runtime/JSGlobalObject.h: - (JSGlobalObject): - -2012-11-14 Filip Pizlo - - Structure should be able to easily tell if the prototype chain might intercept a store - https://bugs.webkit.org/show_bug.cgi?id=102326 - - Reviewed by Geoffrey Garen. - - This improves our ability to reason about the correctness of the more optimized - prototype chain walk in JSObject::put(), while also making it straight forward to - check if the prototype chain will do strange things to a property store by just - looking at the structure. - - * runtime/JSObject.cpp: - (JSC::JSObject::put): - * runtime/Structure.cpp: - (JSC::Structure::prototypeChainMayInterceptStoreTo): - (JSC): - * runtime/Structure.h: - (Structure): - -2012-11-15 Thiago Marcos P. Santos - - [CMake] Do not regenerate LLIntAssembly.h on every incremental build - https://bugs.webkit.org/show_bug.cgi?id=102248 - - Reviewed by Kenneth Rohde Christiansen. - - Update LLIntAssembly.h's mtime after running asm.rb to make the build - system dependency tracking consistent. - - * CMakeLists.txt: - -2012-11-15 Thiago Marcos P. Santos - - Fix compiler warnings about signed/unsigned comparison on i386 - https://bugs.webkit.org/show_bug.cgi?id=102249 - - Reviewed by Kenneth Rohde Christiansen. - - Add casting to unsigned to shut up gcc warnings. Build was broken on - JSVALUE32_64 ports compiling with -Werror. - - * llint/LLIntData.cpp: - (JSC::LLInt::Data::performAssertions): - -2012-11-14 Brent Fulgham - - [Windows, WinCairo] Unreviewed build fix. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - Missed one of the exports that was part of the WebKit2.def. - -2012-11-14 Brent Fulgham - - [Windows, WinCairo] Correct build failure. - https://bugs.webkit.org/show_bug.cgi?id=102302 - - WebCore symbols were mistakenly added to the JavaScriptCore - library definition file. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove - WebCore symbols that were incorrectly added to the export file. - -2012-11-14 Mark Lam - - Change JSEventListener::m_jsFunction to be a weak ref. - https://bugs.webkit.org/show_bug.cgi?id=101989. - - Reviewed by Geoffrey Garen. - - Added infrastructure for scanning weak ref slots. - - * heap/SlotVisitor.cpp: Added #include "SlotVisitorInlines.h". - * heap/SlotVisitor.h: - (SlotVisitor): Added SlotVisitor::appendUnbarrieredWeak(). - * heap/SlotVisitorInlines.h: Added #include "Weak.h". - (JSC::SlotVisitor::appendUnbarrieredWeak): Added. - * heap/Weak.h: - (JSC::operator==): Added operator==() for Weak. - * runtime/JSCell.h: Removed #include "SlotVisitorInlines.h". - * runtime/JSObject.h: Added #include "SlotVisitorInlines.h". - -2012-11-14 Filip Pizlo - - Read-only properties created with putDirect() should tell the structure that there are read-only properties - https://bugs.webkit.org/show_bug.cgi?id=102292 - - Reviewed by Gavin Barraclough. - - This mostly affects things like function.length. - - * runtime/JSObject.h: - (JSC::JSObject::putDirectInternal): - -2012-11-13 Filip Pizlo - - Don't access Node& after adding nodes to the graph. - https://bugs.webkit.org/show_bug.cgi?id=102005 - - Reviewed by Oliver Hunt. - - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - -2012-11-14 Valery Ignatyev - - Replace (typeof(x) != <"object", "undefined", ...>) with - !(typeof(x) == <"object",..>). Later is_object, is_<...> bytecode operation - will be used. - - https://bugs.webkit.org/show_bug.cgi?id=98893 - - Reviewed by Filip Pizlo. - - This eliminates expensive typeof implementation and - allows to use DFG optimizations, which doesn't support 'typeof'. - - * bytecompiler/NodesCodegen.cpp: - (JSC::BinaryOpNode::emitBytecode): - -2012-11-14 Peter Gal - - [Qt][ARM]REGRESSION(r133985): It broke the build - https://bugs.webkit.org/show_bug.cgi?id=101740 - - Reviewed by Csaba Osztrogonác. - - Changed the emitGenericContiguousPutByVal to accept the additional IndexingType argument. - This information was passed as a template parameter. - - * jit/JIT.h: - (JSC::JIT::emitInt32PutByVal): - (JSC::JIT::emitDoublePutByVal): - (JSC::JIT::emitContiguousPutByVal): - (JIT): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitGenericContiguousPutByVal): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emitGenericContiguousPutByVal): - -2012-11-14 Peter Gal - - Fix the MIPS build after r134332 - https://bugs.webkit.org/show_bug.cgi?id=102227 - - Reviewed by Csaba Osztrogonác. - - Added missing methods for the MacroAssemblerMIPS, based on the MacroAssemblerARMv7. - - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::canJumpReplacePatchableBranchPtrWithPatch): - (MacroAssemblerMIPS): - (JSC::MacroAssemblerMIPS::startOfPatchableBranchPtrWithPatch): - (JSC::MacroAssemblerMIPS::revertJumpReplacementToPatchableBranchPtrWithPatch): - -2012-11-14 Peter Gal - - Fix the [-Wreturn-type] warning in JavaScriptCore/assembler/MacroAssemblerARM.h - https://bugs.webkit.org/show_bug.cgi?id=102206 - - Reviewed by Csaba Osztrogonác. - - Add a return value for the function to suppress the warning. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatch): - -2012-11-14 Sheriff Bot - - Unreviewed, rolling out r134599. - http://trac.webkit.org/changeset/134599 - https://bugs.webkit.org/show_bug.cgi?id=102225 - - It broke the 32 bit EFL build (Requested by Ossy on #webkit). - - * jit/JITPropertyAccess.cpp: - * jit/JITPropertyAccess32_64.cpp: - (JSC): - (JSC::JIT::emitGenericContiguousPutByVal): - -2012-11-14 Balazs Kilvady - - [Qt][ARM]REGRESSION(r133985): It broke the build - https://bugs.webkit.org/show_bug.cgi?id=101740 - - Reviewed by Csaba Osztrogonác. - - Template function body moved to fix VALUE_PROFILER disabled case. - - * jit/JITPropertyAccess.cpp: - (JSC): - (JSC::JIT::emitGenericContiguousPutByVal): - * jit/JITPropertyAccess32_64.cpp: - -2012-11-13 Filip Pizlo - - DFG CreateThis should be able to statically account for the structure of the object it creates, if profiling indicates that this structure is always the same - https://bugs.webkit.org/show_bug.cgi?id=102017 - - Reviewed by Geoffrey Garen. - - This adds a watchpoint in JSFunction on the cached inheritor ID. It also changes - NewObject to take a structure as an operand (previously it implicitly used the owning - global object's empty object structure). Any GetCallee where the callee is predictable - is turned into a CheckFunction + WeakJSConstant, and any CreateThis on a WeakJSConstant - where the inheritor ID watchpoint is still valid is turned into an InheritorIDWatchpoint - followed by a NewObject. NewObject already accounts for the structure it uses for object - creation in the CFA. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::checkFunctionElimination): - * dfg/DFGGraph.cpp: - (JSC::DFG::Graph::dump): - * dfg/DFGNode.h: - (JSC::DFG::Node::hasFunction): - (JSC::DFG::Node::function): - (JSC::DFG::Node::hasStructure): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * runtime/Executable.h: - (JSC::JSFunction::JSFunction): - * runtime/JSBoundFunction.cpp: - (JSC): - * runtime/JSFunction.cpp: - (JSC::JSFunction::JSFunction): - (JSC::JSFunction::put): - (JSC::JSFunction::defineOwnProperty): - * runtime/JSFunction.h: - (JSC::JSFunction::tryGetKnownInheritorID): - (JSFunction): - (JSC::JSFunction::addInheritorIDWatchpoint): - -2012-11-13 Filip Pizlo - - JSFunction and its descendants should be destructible - https://bugs.webkit.org/show_bug.cgi?id=102062 - - Reviewed by Mark Hahnenberg. - - This will make it easy to place an InlineWatchpointSet inside JSFunction. In the - future, we could make JSFunction non-destructible again by making a version of - WatchpointSet that is entirely GC'd, but this seems like overkill for now. - - This is performance-neutral. - - * runtime/JSBoundFunction.cpp: - (JSC::JSBoundFunction::destroy): - (JSC): - * runtime/JSBoundFunction.h: - (JSBoundFunction): - * runtime/JSFunction.cpp: - (JSC): - (JSC::JSFunction::destroy): - * runtime/JSFunction.h: - (JSFunction): - -2012-11-13 Cosmin Truta - - Uninitialized fields in class JSLock - https://bugs.webkit.org/show_bug.cgi?id=101695 - - Reviewed by Mark Hahnenberg. - - Initialize JSLock::m_ownerThread and JSLock::m_lockDropDepth. - - * runtime/JSLock.cpp: - (JSC::JSLock::JSLock): - -2012-11-13 Peter Gal - - Fix the ARM traditional build after r134332 - https://bugs.webkit.org/show_bug.cgi?id=102044 - - Reviewed by Zoltan Herczeg. - - Added missing methods for the MacroAssemblerARM, based on the MacroAssemblerARMv7. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::canJumpReplacePatchableBranchPtrWithPatch): - (MacroAssemblerARM): - (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatch): - (JSC::MacroAssemblerARM::revertJumpReplacementToPatchableBranchPtrWithPatch): - -2012-11-12 Filip Pizlo - - op_get_callee should have value profiling - https://bugs.webkit.org/show_bug.cgi?id=102047 - - Reviewed by Sam Weinig. - - This will allow us to detect if the callee is always the same, which is probably - the common case for a lot of constructors. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_callee): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_get_callee): - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - -2012-11-12 Filip Pizlo - - The act of getting the callee during 'this' construction should be explicit in bytecode - https://bugs.webkit.org/show_bug.cgi?id=102016 - - Reviewed by Michael Saboff. - - This is mostly a rollout of http://trac.webkit.org/changeset/116673, but also includes - changes to have create_this use the result of get_callee. - - No performance or behavioral impact. This is just meant to allow us to profile - get_callee in the future. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileOpcode): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - (JIT): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_get_callee): - (JSC): - (JSC::JIT::emit_op_create_this): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_get_callee): - (JSC): - (JSC::JIT::emit_op_create_this): - * llint/LLIntSlowPaths.cpp: - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - -2012-11-12 Filip Pizlo - - Unreviewed, fix ARMv7 build. - - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch): - (JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch): - -2012-11-12 Filip Pizlo - - Patching of jumps to stubs should use jump replacement rather than branch destination overwrite - https://bugs.webkit.org/show_bug.cgi?id=101909 - - Reviewed by Geoffrey Garen. - - This saves a few instructions in inline cases, on those architectures where it is - easy to figure out where to put the jump replacement. Sub-1% speed-up across the - board. - - * assembler/MacroAssemblerARMv7.h: - (MacroAssemblerARMv7): - (JSC::MacroAssemblerARMv7::canJumpReplacePatchableBranchPtrWithPatch): - (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch): - (JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch): - * assembler/MacroAssemblerX86.h: - (JSC::MacroAssemblerX86::canJumpReplacePatchableBranchPtrWithPatch): - (MacroAssemblerX86): - (JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatch): - (JSC::MacroAssemblerX86::revertJumpReplacementToPatchableBranchPtrWithPatch): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::canJumpReplacePatchableBranchPtrWithPatch): - (MacroAssemblerX86_64): - (JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatch): - (JSC::MacroAssemblerX86_64::revertJumpReplacementToPatchableBranchPtrWithPatch): - * assembler/RepatchBuffer.h: - (JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatch): - (RepatchBuffer): - (JSC::RepatchBuffer::replaceWithJump): - (JSC::RepatchBuffer::revertJumpReplacementToPatchableBranchPtrWithPatch): - * assembler/X86Assembler.h: - (X86Assembler): - (JSC::X86Assembler::revertJumpTo_movq_i64r): - (JSC::X86Assembler::revertJumpTo_cmpl_im_force32): - (X86InstructionFormatter): - * bytecode/StructureStubInfo.h: - * dfg/DFGRepatch.cpp: - (JSC::DFG::replaceWithJump): - (DFG): - (JSC::DFG::tryCacheGetByID): - (JSC::DFG::tryBuildGetByIDList): - (JSC::DFG::tryBuildGetByIDProtoList): - (JSC::DFG::tryCachePutByID): - (JSC::DFG::dfgResetGetByID): - (JSC::DFG::dfgResetPutByID): - -2012-11-11 Filip Pizlo - - DFG ArithMul overflow check elimination is too aggressive - https://bugs.webkit.org/show_bug.cgi?id=101871 - - Reviewed by Oliver Hunt. - - The code was ignoring the fact that ((a * b) | 0) == (((a | 0) * (b | 0)) | 0) - only holds if a * b < 2^53. So, I changed it to only enable the optimization - when a < 2^22 and b is an int32 (and vice versa), using a super trivial peephole - analysis to prove the inequality. I considered writing an epic forward flow - formulation that tracks the ranges of integer values but then I thought better - of it. - - This also rewires the ArithMul integer speculation logic. Previously, we would - assume that an ArithMul was only UsedAsNumber if it escaped, and separately we - would decide whether to speculate integer based on a proof of the <2^22 - inequality. Now, we treat the double rounding behavior of ArithMul as if the - result was UsedAsNumber even if it did not escape. Then we try to prove that - double rounding cannot happen by attemping to prove that a < 2^22. This then - feeds back into the decision of whether or not to speculate integer (if we fail - to prove a < 2^22 then we're UsedAsNumber, and if we're also MayOverflow then - that forces double speculation). - - No performance impact. It just fixes a bug. - - * dfg/DFGGraph.h: - (JSC::DFG::Graph::mulShouldSpeculateInteger): - * dfg/DFGPredictionPropagationPhase.cpp: - (PredictionPropagationPhase): - (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant): - (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive): - (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo): - (JSC::DFG::PredictionPropagationPhase::propagate): - -2012-11-11 Filip Pizlo - - DFG should not emit function checks if we've already proved that the operand is that exact function - https://bugs.webkit.org/show_bug.cgi?id=101885 - - Reviewed by Oliver Hunt. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::filterByValue): - (AbstractValue): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - -2012-11-12 Kentaro Hara - - [V8][JSC] ScriptProfileNode::callUID needs not to be [Custom] - https://bugs.webkit.org/show_bug.cgi?id=101892 - - Reviewed by Adam Barth. - - Added callUID(), which enables us to kill custom bindings for ScriptProfileNode::callUID. - - * profiler/ProfileNode.h: - (JSC::ProfileNode::callUID): - -2012-11-12 Carlos Garcia Campos - - Unreviewed. Fix make distcheck. - - * GNUmakefile.list.am: Add missing header. - -2012-11-11 Michael Pruett - - Fix assertion failure in JSObject::tryGetIndexQuickly() - https://bugs.webkit.org/show_bug.cgi?id=101869 - - Reviewed by Filip Pizlo. - - Currently JSObject::tryGetIndexQuickly() triggers an assertion - failure when the object has an undecided indexing type. This - case should be treated the same as a blank indexing type. - - * runtime/JSObject.h: - (JSC::JSObject::tryGetIndexQuickly): - -2012-11-11 Filip Pizlo - - DFG register allocation should be greedy rather than round-robin - https://bugs.webkit.org/show_bug.cgi?id=101870 - - Reviewed by Geoffrey Garen. - - This simplifies the code, reduces some code duplication, and shows some slight - performance improvements in a few places, likely due to the fact that lower-numered - registers also typically have smaller encodings. - - * dfg/DFGRegisterBank.h: - (JSC::DFG::RegisterBank::RegisterBank): - (JSC::DFG::RegisterBank::tryAllocate): - (JSC::DFG::RegisterBank::allocate): - (JSC::DFG::RegisterBank::allocateInternal): - (RegisterBank): - -2012-11-11 Kenichi Ishibashi - - WTFString::utf8() should have a mode of conversion to use replacement character - https://bugs.webkit.org/show_bug.cgi?id=101678 - - Reviewed by Alexey Proskuryakov. - - Follow the change on String::utf8() - - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::encode): Pass String::StrictConversion instead of true to String::utf8(). - -2012-11-10 Filip Pizlo - - DFG should optimize out the NaN check on loads from double arrays if the array prototype chain is having a great time - https://bugs.webkit.org/show_bug.cgi?id=101718 - - Reviewed by Geoffrey Garen. - - If we're reading from a JSArray in double mode, where the array's structure is - primordial (all aspects of the structure are unchanged except for indexing type), - and the result of the load is used in arithmetic that is known to not distinguish - between NaN and undefined, then we should not emit a NaN check. Looks like a 5% - win on navier-stokes. - - Also fixed an OpInfo initialization goof for String ops that was revealed by this - change. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::arraySpeculationToString): - * dfg/DFGArrayMode.h: - (JSC::DFG::ArrayMode::isSaneChain): - (ArrayMode): - (JSC::DFG::ArrayMode::isInBounds): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::handleIntrinsic): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - * dfg/DFGNodeFlags.cpp: - (JSC::DFG::nodeFlagsAsString): - * dfg/DFGNodeFlags.h: - (DFG): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::arrayPrototypeChainIsSane): - (JSC): - * runtime/JSGlobalObject.h: - (JSGlobalObject): - -2012-11-10 Filip Pizlo - - DFG constant folding and CFG simplification should be smart enough to know that if a logical op's operand is proven to have a non-masquerading structure then it always evaluates to true - https://bugs.webkit.org/show_bug.cgi?id=101511 - - Reviewed by Geoffrey Garen. - - This is the second attempt at this patch, which fixes the !"" case. - - To make life easier, this moves BranchDirection into BasicBlock so that after - running the CFA, we always know, for each block, what direction the CFA - proved. CFG simplification now both uses and preserves cfaBranchDirection in - its transformations. - - Also made both LogicalNot and Branch check whether the operand is a known cell - with a known structure, and if so, made them do the appropriate folding. - - 5% speed-up on V8/raytrace because it makes raytrace's own null checks - evaporate (i.e. idioms like 'if (!x) throw "unhappiness"') thanks to the fact - that we were already doing structure check hoisting. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::endBasicBlock): - (JSC::DFG::AbstractState::execute): - (JSC::DFG::AbstractState::mergeToSuccessors): - * dfg/DFGAbstractState.h: - (AbstractState): - * dfg/DFGBasicBlock.h: - (JSC::DFG::BasicBlock::BasicBlock): - (BasicBlock): - * dfg/DFGBranchDirection.h: Added. - (DFG): - (JSC::DFG::branchDirectionToString): - (JSC::DFG::isKnownDirection): - (JSC::DFG::branchCondition): - * dfg/DFGCFGSimplificationPhase.cpp: - (JSC::DFG::CFGSimplificationPhase::run): - (JSC::DFG::CFGSimplificationPhase::mergeBlocks): - -2012-11-10 Sheriff Bot - - Unreviewed, rolling out r133971. - http://trac.webkit.org/changeset/133971 - https://bugs.webkit.org/show_bug.cgi?id=101839 - - Causes WebProcess to hang at 100% on www.apple.com (Requested - by kling on #webkit). - - * JavaScriptCore.xcodeproj/project.pbxproj: - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::endBasicBlock): - (JSC::DFG::AbstractState::execute): - (JSC::DFG::AbstractState::mergeToSuccessors): - * dfg/DFGAbstractState.h: - (JSC::DFG::AbstractState::branchDirectionToString): - (AbstractState): - * dfg/DFGBasicBlock.h: - (JSC::DFG::BasicBlock::BasicBlock): - (BasicBlock): - * dfg/DFGBranchDirection.h: Removed. - * dfg/DFGCFGSimplificationPhase.cpp: - (JSC::DFG::CFGSimplificationPhase::run): - (JSC::DFG::CFGSimplificationPhase::mergeBlocks): - -2012-11-09 Filip Pizlo - - If the DFG ArrayMode says that an access is on an OriginalArray, then the checks should always enforce this - https://bugs.webkit.org/show_bug.cgi?id=101720 - - Reviewed by Mark Hahnenberg. - - Previously, "original" arrays was just a hint that we could find the structure - of the array if we needed to even if the array profile didn't have it due to - polymorphism. Now, "original" arrays are a property that is actually checked: - if an array access has ArrayMode::arrayClass() == Array::OriginalArray, then we - can be sure that the code performing the access is dealing with not just a - JSArray, but a JSArray that has no named properties, no indexed accessors, and - the ArrayPrototype as its prototype. This will be useful for optimizations that - are being done as part of https://bugs.webkit.org/show_bug.cgi?id=101720. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::ArrayMode::originalArrayStructure): - (DFG): - (JSC::DFG::ArrayMode::alreadyChecked): - * dfg/DFGArrayMode.h: - (JSC): - (DFG): - (JSC::DFG::ArrayMode::withProfile): - (ArrayMode): - (JSC::DFG::ArrayMode::benefitsFromOriginalArray): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::checkArray): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): - (JSC::DFG::SpeculativeJIT::checkArray): - (JSC::DFG::SpeculativeJIT::compileGetByValOnString): - (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): - (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): - (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): - (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): - (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength): - -2012-11-09 Filip Pizlo - - Fix indentation of BooleanPrototype.h - - Rubber stamped by Mark Hahnenberg. - - * runtime/BooleanPrototype.h: - -2012-11-09 Filip Pizlo - - Fix indentation of BooleanObject.h - - Rubber stamped by Mark Hahnenberg. - - * runtime/BooleanObject.h: - -2012-11-09 Filip Pizlo - - Fix indentation of BooleanConstructor.h - - Rubber stamped by Mark Hahnenberg. - - * runtime/BooleanConstructor.h: - -2012-11-09 Filip Pizlo - - Fix indentation of BatchedTransitionOptimizer.h - - Rubber stamped by Mark Hahnenberg. - - * runtime/BatchedTransitionOptimizer.h: - -2012-11-09 Oliver Hunt - - So Thingy probably isn't the best name for a class, so - renamed to CacheMap. - - RS=Geoff - - * runtime/CodeCache.h: - (JSC::CacheMap::CacheMap): - -2012-11-09 Filip Pizlo - - ArrayPrototype should start out with a blank indexing type - https://bugs.webkit.org/show_bug.cgi?id=101719 - - Reviewed by Mark Hahnenberg. - - This allows us to track if the array prototype ever ends up with indexed - properties. - - * runtime/ArrayPrototype.cpp: - (JSC::ArrayPrototype::create): - (JSC::ArrayPrototype::ArrayPrototype): - * runtime/ArrayPrototype.h: - (ArrayPrototype): - (JSC::ArrayPrototype::createStructure): - -2012-11-08 Mark Hahnenberg - - MarkStackArray should use the BlockAllocator instead of the MarkStackSegmentAllocator - https://bugs.webkit.org/show_bug.cgi?id=101642 - - Reviewed by Filip Pizlo. - - MarkStackSegmentAllocator is like a miniature version of the BlockAllocator. Now that the BlockAllocator has support - for a variety of block sizes, we should get rid of the MarkStackSegmentAllocator in favor of the BlockAllocator. - - * heap/BlockAllocator.h: Add new specializations of regionSetFor for the new MarkStackSegments. - (JSC): - (JSC::MarkStackSegment): - * heap/GCThreadSharedData.cpp: - (JSC::GCThreadSharedData::GCThreadSharedData): - (JSC::GCThreadSharedData::reset): - * heap/GCThreadSharedData.h: - (GCThreadSharedData): - * heap/MarkStack.cpp: - (JSC::MarkStackArray::MarkStackArray): We now have a doubly linked list of MarkStackSegments, so we need to refactor - all the places that used the old custom tail/previous logic. - (JSC::MarkStackArray::~MarkStackArray): - (JSC::MarkStackArray::expand): - (JSC::MarkStackArray::refill): - (JSC::MarkStackArray::donateSomeCellsTo): Refactor to use the new linked list. - (JSC::MarkStackArray::stealSomeCellsFrom): Ditto. - * heap/MarkStack.h: - (JSC): - (MarkStackSegment): - (JSC::MarkStackSegment::MarkStackSegment): - (JSC::MarkStackSegment::sizeFromCapacity): - (MarkStackArray): - * heap/MarkStackInlines.h: - (JSC::MarkStackSegment::create): - (JSC): - (JSC::MarkStackArray::postIncTop): - (JSC::MarkStackArray::preDecTop): - (JSC::MarkStackArray::setTopForFullSegment): - (JSC::MarkStackArray::setTopForEmptySegment): - (JSC::MarkStackArray::top): - (JSC::MarkStackArray::validatePrevious): - (JSC::MarkStackArray::append): - (JSC::MarkStackArray::removeLast): - (JSC::MarkStackArray::isEmpty): - (JSC::MarkStackArray::size): - * heap/SlotVisitor.cpp: - (JSC::SlotVisitor::SlotVisitor): - -2012-11-09 Gabor Ballabas - - [Qt] r133953 broke the ARM_TRADITIONAL build - https://bugs.webkit.org/show_bug.cgi?id=101706 - - Reviewed by Csaba Osztrogonác. - - Fix for both hardfp and softfp. - - * dfg/DFGCCallHelpers.h: - (CCallHelpers): - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - -2012-11-09 Sheriff Bot - - Unreviewed, rolling out r134051. - http://trac.webkit.org/changeset/134051 - https://bugs.webkit.org/show_bug.cgi?id=101757 - - It didn't fix the build (Requested by Ossy on #webkit). - - * dfg/DFGCCallHelpers.h: - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - -2012-11-09 Gabor Ballabas - - [Qt] r133953 broke the ARM_TRADITIONAL build - https://bugs.webkit.org/show_bug.cgi?id=101706 - - Reviewed by Csaba Osztrogonác. - - Fix the ARM_TRADITIONAL build after r133953 - - * dfg/DFGCCallHelpers.h: - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - (CCallHelpers): - -2012-11-09 Csaba Osztrogonác - - [Qt] Fix the LLINT build from ARMv7 platform - https://bugs.webkit.org/show_bug.cgi?id=101712 - - Reviewed by Simon Hausmann. - - Enable generating of LLIntAssembly.h on ARM platforms. - - * DerivedSources.pri: - * JavaScriptCore.pro: - -2012-11-08 Filip Pizlo - - ArrayPrototype.h should have correct indentation - - Rubber stamped by Sam Weinig. - - * runtime/ArrayPrototype.h: - -2012-11-08 Mark Lam - - Renamed ...InlineMethods.h files to ...Inlines.h. - https://bugs.webkit.org/show_bug.cgi?id=101145. - - Reviewed by Geoffrey Garen. - - This is only a refactoring effort to rename the files. There are no - functionality changes. - - * API/JSObjectRef.cpp: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - * dfg/DFGOperations.cpp: - * heap/ConservativeRoots.cpp: - * heap/CopiedBlock.h: - * heap/CopiedSpace.cpp: - * heap/CopiedSpaceInlineMethods.h: Removed. - * heap/CopiedSpaceInlines.h: Copied from Source/JavaScriptCore/heap/CopiedSpaceInlineMethods.h. - * heap/CopyVisitor.cpp: - * heap/CopyVisitorInlineMethods.h: Removed. - * heap/CopyVisitorInlines.h: Copied from Source/JavaScriptCore/heap/CopyVisitorInlineMethods.h. - * heap/GCThread.cpp: - * heap/GCThreadSharedData.cpp: - * heap/HandleStack.cpp: - * heap/Heap.cpp: - * heap/HeapRootVisitor.h: - * heap/MarkStack.cpp: - * heap/MarkStackInlineMethods.h: Removed. - * heap/MarkStackInlines.h: Copied from Source/JavaScriptCore/heap/MarkStackInlineMethods.h. - * heap/SlotVisitor.cpp: - * heap/SlotVisitor.h: - * heap/SlotVisitorInlineMethods.h: Removed. - * heap/SlotVisitorInlines.h: Copied from Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h. - * jit/HostCallReturnValue.cpp: - * jit/JIT.cpp: - * jit/JITArithmetic.cpp: - * jit/JITArithmetic32_64.cpp: - * jit/JITCall.cpp: - * jit/JITCall32_64.cpp: - * jit/JITInlineMethods.h: Removed. - * jit/JITInlines.h: Copied from Source/JavaScriptCore/jit/JITInlineMethods.h. - * jit/JITOpcodes.cpp: - * jit/JITOpcodes32_64.cpp: - * jit/JITPropertyAccess.cpp: - * jit/JITPropertyAccess32_64.cpp: - * jsc.cpp: - * runtime/ArrayConstructor.cpp: - * runtime/ArrayPrototype.cpp: - * runtime/ButterflyInlineMethods.h: Removed. - * runtime/ButterflyInlines.h: Copied from Source/JavaScriptCore/runtime/ButterflyInlineMethods.h. - * runtime/IndexingHeaderInlineMethods.h: Removed. - * runtime/IndexingHeaderInlines.h: Copied from Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h. - * runtime/JSActivation.h: - * runtime/JSArray.cpp: - * runtime/JSArray.h: - * runtime/JSCell.h: - * runtime/JSObject.cpp: - * runtime/JSValueInlineMethods.h: Removed. - * runtime/JSValueInlines.h: Copied from Source/JavaScriptCore/runtime/JSValueInlineMethods.h. - * runtime/LiteralParser.cpp: - * runtime/ObjectConstructor.cpp: - * runtime/Operations.h: - * runtime/RegExpMatchesArray.cpp: - * runtime/RegExpObject.cpp: - * runtime/StringPrototype.cpp: - -2012-11-08 Filip Pizlo - - ArrayConstructor.h should have correct indentation - - Rubber stamped by Sam Weinig. - - * runtime/ArrayConstructor.h: - -2012-11-08 Filip Pizlo - - DFG should know that int == null is always false - https://bugs.webkit.org/show_bug.cgi?id=101665 - - Reviewed by Oliver Hunt. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - -2012-11-08 Filip Pizlo - - Arguments.h should have correct indentation - - Rubber stamped by Sam Weinig. - - * runtime/Arguments.h: - -2012-11-08 Filip Pizlo - - It should be possible to JIT compile get_by_vals and put_by_vals even if the DFG is disabled. - - Reviewed by Oliver Hunt. - - * jit/JITInlineMethods.h: - (JSC::JIT::chooseArrayMode): - -2012-11-08 Filip Pizlo - - op_call should have LLInt call link info even if the DFG is disabled - https://bugs.webkit.org/show_bug.cgi?id=101672 - - Reviewed by Oliver Hunt. - - Get rid of the evil uses of fall-through. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - -2012-11-08 Oliver Hunt - - Improve effectiveness of function-level caching - https://bugs.webkit.org/show_bug.cgi?id=101667 - - Reviewed by Filip Pizlo. - - Added a random-eviction based cache for unlinked functions, and switch - UnlinkedFunctionExecutable's code references to Weak<>, thereby letting - us remove the explicit UnlinkedFunctionExecutable::clearCode() calls that - were being triggered by GC. - - Refactored the random eviction part of the CodeCache into a separate data - structure so that I didn't have to duplicate the code again, and then used - that for the new function cache. - - * bytecode/UnlinkedCodeBlock.cpp: - (JSC::UnlinkedFunctionExecutable::visitChildren): - (JSC::UnlinkedFunctionExecutable::codeBlockFor): - * bytecode/UnlinkedCodeBlock.h: - (JSC::UnlinkedFunctionExecutable::clearCodeForRecompilation): - (UnlinkedFunctionExecutable): - * debugger/Debugger.cpp: - * runtime/CodeCache.cpp: - (JSC::CodeCache::getCodeBlock): - (JSC::CodeCache::generateFunctionCodeBlock): - (JSC::CodeCache::getFunctionExecutableFromGlobalCode): - (JSC::CodeCache::usedFunctionCode): - (JSC): - * runtime/Executable.cpp: - (JSC::FunctionExecutable::clearUnlinkedCodeForRecompilationIfNotCompiling): - (JSC::FunctionExecutable::clearCode): - * runtime/Executable.h: - (FunctionExecutable): - -2012-11-07 Filip Pizlo - - DFG constant folding and CFG simplification should be smart enough to know that if a logical op's operand is proven to have a non-masquerading structure then it always evaluates to true - https://bugs.webkit.org/show_bug.cgi?id=101511 - - Reviewed by Oliver Hunt. - - To make life easier, this moves BranchDirection into BasicBlock so that after - running the CFA, we always know, for each block, what direction the CFA - proved. CFG simplification now both uses and preserves cfaBranchDirection in - its transformations. - - Also made both LogicalNot and Branch check whether the operand is a known cell - with a known structure, and if so, made them do the appropriate folding. - - 5% speed-up on V8/raytrace because it makes raytrace's own null checks - evaporate (i.e. idioms like 'if (!x) throw "unhappiness"') thanks to the fact - that we were already doing structure check hoisting. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::endBasicBlock): - (JSC::DFG::AbstractState::execute): - (JSC::DFG::AbstractState::mergeToSuccessors): - * dfg/DFGAbstractState.h: - (AbstractState): - * dfg/DFGBasicBlock.h: - (JSC::DFG::BasicBlock::BasicBlock): - (BasicBlock): - * dfg/DFGBranchDirection.h: Added. - (DFG): - (JSC::DFG::branchDirectionToString): - (JSC::DFG::isKnownDirection): - (JSC::DFG::branchCondition): - * dfg/DFGCFGSimplificationPhase.cpp: - (JSC::DFG::CFGSimplificationPhase::run): - (JSC::DFG::CFGSimplificationPhase::mergeBlocks): - -2012-11-08 Christophe Dumez - - [JSC] HTML extensions to String.prototype should escape " as " in argument values - https://bugs.webkit.org/show_bug.cgi?id=90667 - - Reviewed by Benjamin Poulain. - - Escape quotation mark as " in argument values to: - - String.prototype.anchor(name) - - String.prototype.fontcolor(color) - - String.prototype.fontsize(size) - - String.prototype.link(href) - - This behavior matches Chromium/V8 and Firefox/Spidermonkey - implementations and is requited by: - http://mathias.html5.org/specs/javascript/#escapeattributevalue - - This also fixes a potential security risk (XSS vector). - - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncFontcolor): - (JSC::stringProtoFuncFontsize): - (JSC::stringProtoFuncAnchor): - (JSC::stringProtoFuncLink): - -2012-11-08 Anders Carlsson - - HeapStatistics::s_pauseTimeStarts and s_pauseTimeEnds should be Vectors - https://bugs.webkit.org/show_bug.cgi?id=101651 - - Reviewed by Andreas Kling. - - HeapStatistics uses Deques when Vectors would work just as good. - - * heap/HeapStatistics.cpp: - * heap/HeapStatistics.h: - (HeapStatistics): - -2012-11-07 Filip Pizlo - - DFG should not assume that something is a double just because it might be undefined - https://bugs.webkit.org/show_bug.cgi?id=101438 - - Reviewed by Oliver Hunt. - - This changes all non-bitop arithmetic to (a) statically expect that variables are - defined prior to use in arithmetic and (b) not fall off into double paths just - because a value may not be a number. This is accomplished with two new notions of - speculation: - - shouldSpeculateIntegerExpectingDefined: Should we speculate that the value is an - integer if we ignore undefined (i.e. SpecOther) predictions? - - shouldSpeculateIntegerForArithmetic: Should we speculate that the value is an - integer if we ignore non-numeric predictions? - - This is a ~2x speed-up on programs that seem to our prediction propagator to have - paths in which otherwise numeric variables are undefined. - - * bytecode/SpeculatedType.h: - (JSC::isInt32SpeculationForArithmetic): - (JSC): - (JSC::isInt32SpeculationExpectingDefined): - (JSC::isDoubleSpeculationForArithmetic): - (JSC::isNumberSpeculationExpectingDefined): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - * dfg/DFGGraph.h: - (JSC::DFG::Graph::addShouldSpeculateInteger): - (JSC::DFG::Graph::mulShouldSpeculateInteger): - (JSC::DFG::Graph::negateShouldSpeculateInteger): - (JSC::DFG::Graph::addImmediateShouldSpeculateInteger): - (JSC::DFG::Graph::mulImmediateShouldSpeculateInteger): - * dfg/DFGNode.h: - (JSC::DFG::Node::shouldSpeculateIntegerForArithmetic): - (Node): - (JSC::DFG::Node::shouldSpeculateIntegerExpectingDefined): - (JSC::DFG::Node::shouldSpeculateDoubleForArithmetic): - (JSC::DFG::Node::shouldSpeculateNumberExpectingDefined): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileAdd): - (JSC::DFG::SpeculativeJIT::compileArithMod): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_div): - -2012-11-06 Filip Pizlo - - JSC should infer when indexed storage contains only integers or doubles - https://bugs.webkit.org/show_bug.cgi?id=98606 - - Reviewed by Oliver Hunt. - - This adds two new indexing types: int32 and double. It also adds array allocation profiling, - which allows array allocations to converge to allocating arrays using those types to which - those arrays would have been converted. - - 20% speed-up on navier-stokes. 40% speed-up on various Kraken DSP tests. Some slow-downs too, - but a performance win overall on all benchmarks we track. - - * API/JSObjectRef.cpp: - (JSObjectMakeArray): - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * assembler/AbstractMacroAssembler.h: - (JumpList): - (JSC::AbstractMacroAssembler::JumpList::JumpList): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::branchDouble): - * assembler/X86Assembler.h: - (JSC::X86Assembler::jnp): - (X86Assembler): - (JSC::X86Assembler::X86InstructionFormatter::emitRex): - * bytecode/ArrayAllocationProfile.cpp: Added. - (JSC): - (JSC::ArrayAllocationProfile::updateIndexingType): - * bytecode/ArrayAllocationProfile.h: Added. - (JSC): - (ArrayAllocationProfile): - (JSC::ArrayAllocationProfile::ArrayAllocationProfile): - (JSC::ArrayAllocationProfile::selectIndexingType): - (JSC::ArrayAllocationProfile::updateLastAllocation): - (JSC::ArrayAllocationProfile::selectIndexingTypeFor): - (JSC::ArrayAllocationProfile::updateLastAllocationFor): - * bytecode/ArrayProfile.cpp: - (JSC::ArrayProfile::updatedObservedArrayModes): - (JSC): - * bytecode/ArrayProfile.h: - (JSC): - (JSC::arrayModesInclude): - (JSC::shouldUseSlowPutArrayStorage): - (JSC::shouldUseFastArrayStorage): - (JSC::shouldUseContiguous): - (JSC::shouldUseDouble): - (JSC::shouldUseInt32): - (ArrayProfile): - * bytecode/ByValInfo.h: - (JSC::isOptimizableIndexingType): - (JSC::jitArrayModeForIndexingType): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::updateAllPredictionsAndCountLiveness): - (JSC): - (JSC::CodeBlock::updateAllValueProfilePredictions): - (JSC::CodeBlock::updateAllArrayPredictions): - (JSC::CodeBlock::updateAllPredictions): - (JSC::CodeBlock::shouldOptimizeNow): - * bytecode/CodeBlock.h: - (CodeBlock): - (JSC::CodeBlock::numberOfArrayAllocationProfiles): - (JSC::CodeBlock::addArrayAllocationProfile): - (JSC::CodeBlock::updateAllValueProfilePredictions): - (JSC::CodeBlock::updateAllArrayPredictions): - * bytecode/DFGExitProfile.h: - (JSC::DFG::exitKindToString): - * bytecode/Instruction.h: - (JSC): - (JSC::Instruction::Instruction): - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecode/SpeculatedType.h: - (JSC): - (JSC::isRealNumberSpeculation): - * bytecode/UnlinkedCodeBlock.cpp: - (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): - * bytecode/UnlinkedCodeBlock.h: - (JSC): - (JSC::UnlinkedCodeBlock::addArrayAllocationProfile): - (JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): - (UnlinkedCodeBlock): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::newArrayAllocationProfile): - (JSC): - (JSC::BytecodeGenerator::emitNewArray): - (JSC::BytecodeGenerator::emitExpectedFunctionSnippet): - * bytecompiler/BytecodeGenerator.h: - (BytecodeGenerator): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::ArrayMode::fromObserved): - (JSC::DFG::ArrayMode::refine): - (DFG): - (JSC::DFG::ArrayMode::alreadyChecked): - (JSC::DFG::arrayTypeToString): - * dfg/DFGArrayMode.h: - (JSC::DFG::ArrayMode::withType): - (ArrayMode): - (JSC::DFG::ArrayMode::withTypeAndConversion): - (JSC::DFG::ArrayMode::usesButterfly): - (JSC::DFG::ArrayMode::isSpecific): - (JSC::DFG::ArrayMode::supportsLength): - (JSC::DFG::ArrayMode::arrayModesThatPassFiltering): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::getArrayMode): - (ByteCodeParser): - (JSC::DFG::ByteCodeParser::handleIntrinsic): - (JSC::DFG::ByteCodeParser::handleConstantInternalFunction): - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCCallHelpers.h: - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - (CCallHelpers): - * dfg/DFGCallArrayAllocatorSlowPathGenerator.h: - (JSC::DFG::CallArrayAllocatorSlowPathGenerator::generateInternal): - (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::generateInternal): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - (JSC::DFG::FixupPhase::checkArray): - * dfg/DFGGraph.cpp: - (JSC::DFG::Graph::dump): - * dfg/DFGGraph.h: - (JSC::DFG::Graph::byValIsPure): - * dfg/DFGNode.h: - (NewArrayBufferData): - (JSC::DFG::Node::hasIndexingType): - (Node): - (JSC::DFG::Node::indexingType): - (JSC::DFG::Node::setIndexingType): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): - (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): - (DFG): - (JSC::DFG::SpeculativeJIT::checkArray): - (JSC::DFG::SpeculativeJIT::arrayify): - (JSC::DFG::SpeculativeJIT::compileDoublePutByVal): - (JSC::DFG::SpeculativeJIT::compileGetArrayLength): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): - (SpeculativeJIT): - (SpeculateIntegerOperand): - (JSC::DFG::SpeculateIntegerOperand::use): - (SpeculateDoubleOperand): - (JSC::DFG::SpeculateDoubleOperand::use): - * dfg/DFGSpeculativeJIT32_64.cpp: - (DFG): - (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * jit/JIT.h: - (JSC::JIT::emitInt32GetByVal): - (JIT): - (JSC::JIT::emitInt32PutByVal): - (JSC::JIT::emitDoublePutByVal): - (JSC::JIT::emitContiguousPutByVal): - * jit/JITExceptions.cpp: - (JSC::genericThrow): - * jit/JITInlineMethods.h: - (JSC::arrayProfileSaw): - (JSC::JIT::chooseArrayMode): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_array): - (JSC::JIT::emit_op_new_array_with_size): - (JSC::JIT::emit_op_new_array_buffer): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitDoubleGetByVal): - (JSC): - (JSC::JIT::emitContiguousGetByVal): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitGenericContiguousPutByVal): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::privateCompileGetByVal): - (JSC::JIT::privateCompilePutByVal): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitContiguousGetByVal): - (JSC::JIT::emitDoubleGetByVal): - (JSC): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitGenericContiguousPutByVal): - (JSC::JIT::emitSlow_op_put_by_val): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC): - * jsc.cpp: - (GlobalObject::finishCreation): - * llint/LLIntSlowPaths.cpp: - (JSC::LLInt::jitCompileAndSetHeuristics): - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * offlineasm/x86.rb: - * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): - * runtime/ArrayConstructor.h: - (JSC): - * runtime/ArrayPrototype.cpp: - (JSC::arrayProtoFuncConcat): - (JSC::arrayProtoFuncSlice): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncFilter): - (JSC::arrayProtoFuncMap): - * runtime/Butterfly.h: - (JSC::Butterfly::contiguousInt32): - (JSC::Butterfly::contiguousDouble): - (JSC::Butterfly::fromContiguous): - * runtime/ButterflyInlineMethods.h: - (JSC::Butterfly::createUninitializedDuringCollection): - * runtime/FunctionPrototype.cpp: - (JSC::functionProtoFuncBind): - * runtime/IndexingHeaderInlineMethods.h: - (JSC::IndexingHeader::indexingPayloadSizeInBytes): - * runtime/IndexingType.cpp: - (JSC::leastUpperBoundOfIndexingTypes): - (JSC): - (JSC::leastUpperBoundOfIndexingTypeAndType): - (JSC::leastUpperBoundOfIndexingTypeAndValue): - (JSC::indexingTypeToString): - * runtime/IndexingType.h: - (JSC): - (JSC::hasUndecided): - (JSC::hasInt32): - (JSC::hasDouble): - * runtime/JSArray.cpp: - (JSC::JSArray::setLength): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::shiftCountWithAnyIndexingType): - (JSC::JSArray::unshiftCountWithAnyIndexingType): - (JSC::compareNumbersForQSortWithInt32): - (JSC): - (JSC::compareNumbersForQSortWithDouble): - (JSC::JSArray::sortNumericVector): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sortCompactedVector): - (JSC::JSArray::sort): - (JSC::JSArray::sortVector): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToArguments): - (JSC::JSArray::compactForSorting): - * runtime/JSArray.h: - (JSArray): - (JSC::createContiguousArrayButterfly): - (JSC::JSArray::create): - (JSC::JSArray::tryCreateUninitialized): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC): - (JSC::JSGlobalObject::haveABadTime): - (JSC::JSGlobalObject::visitChildren): - * runtime/JSGlobalObject.h: - (JSGlobalObject): - (JSC::JSGlobalObject::originalArrayStructureForIndexingType): - (JSC::JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation): - (JSC::JSGlobalObject::arrayStructureForProfileDuringAllocation): - (JSC::JSGlobalObject::isOriginalArrayStructure): - (JSC::constructEmptyArray): - (JSC::constructArray): - * runtime/JSObject.cpp: - (JSC::JSObject::copyButterfly): - (JSC::JSObject::getOwnPropertySlotByIndex): - (JSC::JSObject::putByIndex): - (JSC::JSObject::enterDictionaryIndexingMode): - (JSC::JSObject::createInitialIndexedStorage): - (JSC): - (JSC::JSObject::createInitialUndecided): - (JSC::JSObject::createInitialInt32): - (JSC::JSObject::createInitialDouble): - (JSC::JSObject::createInitialContiguous): - (JSC::JSObject::convertUndecidedToInt32): - (JSC::JSObject::convertUndecidedToDouble): - (JSC::JSObject::convertUndecidedToContiguous): - (JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements): - (JSC::JSObject::convertUndecidedToArrayStorage): - (JSC::JSObject::convertInt32ToDouble): - (JSC::JSObject::convertInt32ToContiguous): - (JSC::JSObject::convertInt32ToArrayStorage): - (JSC::JSObject::convertDoubleToContiguous): - (JSC::JSObject::convertDoubleToArrayStorage): - (JSC::JSObject::convertContiguousToArrayStorage): - (JSC::JSObject::convertUndecidedForValue): - (JSC::JSObject::convertInt32ForValue): - (JSC::JSObject::setIndexQuicklyToUndecided): - (JSC::JSObject::convertInt32ToDoubleOrContiguousWhilePerformingSetIndex): - (JSC::JSObject::convertDoubleToContiguousWhilePerformingSetIndex): - (JSC::JSObject::ensureInt32Slow): - (JSC::JSObject::ensureDoubleSlow): - (JSC::JSObject::ensureContiguousSlow): - (JSC::JSObject::ensureArrayStorageSlow): - (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode): - (JSC::JSObject::switchToSlowPutArrayStorage): - (JSC::JSObject::deletePropertyByIndex): - (JSC::JSObject::getOwnPropertyNames): - (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes): - (JSC::JSObject::putByIndexBeyondVectorLength): - (JSC::JSObject::putDirectIndexBeyondVectorLength): - (JSC::JSObject::getNewVectorLength): - (JSC::JSObject::countElements): - (JSC::JSObject::ensureLengthSlow): - (JSC::JSObject::getOwnPropertyDescriptor): - * runtime/JSObject.h: - (JSC::JSObject::getArrayLength): - (JSC::JSObject::getVectorLength): - (JSC::JSObject::canGetIndexQuickly): - (JSC::JSObject::getIndexQuickly): - (JSC::JSObject::tryGetIndexQuickly): - (JSC::JSObject::canSetIndexQuickly): - (JSC::JSObject::canSetIndexQuicklyForPutDirect): - (JSC::JSObject::setIndexQuickly): - (JSC::JSObject::initializeIndex): - (JSC::JSObject::hasSparseMap): - (JSC::JSObject::inSparseIndexingMode): - (JSObject): - (JSC::JSObject::ensureInt32): - (JSC::JSObject::ensureDouble): - (JSC::JSObject::ensureLength): - (JSC::JSObject::indexingData): - (JSC::JSObject::currentIndexingData): - (JSC::JSObject::getHolyIndexQuickly): - (JSC::JSObject::relevantLength): - (JSC::JSObject::currentRelevantLength): - * runtime/JSValue.cpp: - (JSC::JSValue::description): - * runtime/LiteralParser.cpp: - (JSC::::parse): - * runtime/ObjectConstructor.cpp: - (JSC::objectConstructorGetOwnPropertyNames): - (JSC::objectConstructorKeys): - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncMatch): - (JSC::stringProtoFuncSplit): - * runtime/Structure.cpp: - (JSC::Structure::nonPropertyTransition): - * runtime/StructureTransitionTable.h: - (JSC::newIndexingType): - -2012-11-08 Balazs Kilvady - - ASSERT problem on MIPS - https://bugs.webkit.org/show_bug.cgi?id=100589 - - Reviewed by Oliver Hunt. - - ASSERT fix for MIPS arch. - - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_resolve_operations): - -2012-11-08 Michael Saboff - - OpaqueJSClassContextData() should use StringImpl::isolatedCopy() to make string copies - https://bugs.webkit.org/show_bug.cgi?id=101507 - - Reviewed by Andreas Kling. - - Changed to use isolatedCopy() for key Strings. - - * API/JSClassRef.cpp: - (OpaqueJSClassContextData::OpaqueJSClassContextData): - -2012-11-07 Mark Hahnenberg - - WeakBlocks should be HeapBlocks - https://bugs.webkit.org/show_bug.cgi?id=101411 - - Reviewed by Oliver Hunt. - - Currently WeakBlocks use fastMalloc memory. They are very similar to the other HeapBlocks, however, - so we should change them to being allocated with the BlockAllocator. - - * heap/BlockAllocator.cpp: - (JSC::BlockAllocator::BlockAllocator): - * heap/BlockAllocator.h: Added a new RegionSet for WeakBlocks. - (JSC): - (BlockAllocator): - (JSC::WeakBlock): - * heap/Heap.h: Friended WeakSet to allow access to the BlockAllocator. - (Heap): - * heap/WeakBlock.cpp: - (JSC::WeakBlock::create): Refactored to use HeapBlocks rather than fastMalloc. - (JSC::WeakBlock::WeakBlock): - * heap/WeakBlock.h: Changed the WeakBlock size to 4 KB so that it divides evenly into the Region size. - (JSC): - (WeakBlock): - * heap/WeakSet.cpp: - (JSC::WeakSet::~WeakSet): - (JSC::WeakSet::addAllocator): - -2012-11-07 Filip Pizlo - - Indentation of ArgList.h is wrong - https://bugs.webkit.org/show_bug.cgi?id=101441 - - Reviewed by Andreas Kling. - - Just unindented by 4 spaces. - - * runtime/ArgList.h: - -2012-11-07 Gabor Ballabas - - [Qt][ARM] REGRESSION(r133688): It made all JSC and layout tests crash on ARM traditional platform - https://bugs.webkit.org/show_bug.cgi?id=101465 - - Reviewed by Oliver Hunt. - - Fix failing javascriptcore tests on ARM after r133688 - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - -2012-11-06 Oliver Hunt - - Reduce parser overhead in JSC - https://bugs.webkit.org/show_bug.cgi?id=101127 - - Reviewed by Filip Pizlo. - - An exciting journey into the world of architecture in which our hero - adds yet another layer to JSC codegeneration. - - This patch adds a marginally more compact form of bytecode that is - free from any data specific to a given execution context, and that - does store any data structures necessary for execution. To actually - execute this UnlinkedBytecode we still need to instantiate a real - CodeBlock, but this is a much faster linear time operation than any - of the earlier parsing or code generation passes. - - As the unlinked code is context free we can then simply use a cache - from source to unlinked code mapping to completely avoid all of the - old parser overhead. The cache is currently very simple and memory - heavy, using the complete source text as a key (rather than SourceCode - or equivalent), and a random eviction policy. - - This seems to produce a substantial win when loading identical content - in different contexts. - - * API/tests/testapi.c: - (main): - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - * bytecode/CodeBlock.h: - Moved a number of fields, and a bunch of logic to UnlinkedCodeBlock.h/cpp - * bytecode/Opcode.h: - Added a global const init no op instruction needed to get correct - behaviour without any associated semantics. - * bytecode/UnlinkedCodeBlock.cpp: Added. - * bytecode/UnlinkedCodeBlock.h: Added. - A fairly shallow, GC allocated version of the old CodeBlock - classes with a 32bit instruction size, and just metadata - size tracking. - * bytecompiler/BytecodeGenerator.cpp: - * bytecompiler/BytecodeGenerator.h: - Replace direct access to m_symbolTable with access through - symbolTable(). ProgramCode no longer has a symbol table at - all so some previously unconditional (and pointless) uses - of symbolTable get null checks. - A few other changes to deal with type changes due to us generating - unlinked code (eg. pointer free, so profile indices rather than - pointers). - * dfg/DFGByteCodeParser.cpp: - * dfg/DFGCapabilities.h: - Support global_init_nop - * interpreter/Interpreter.cpp: - Now get the ProgramExecutable to initialise new global properties - before starting execution. - * jit/JIT.cpp: - * jit/JITDriver.h: - * jit/JITStubs.cpp: - * llint/LLIntData.cpp: - * llint/LLIntSlowPaths.cpp: - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - Adding init_global_const_nop everywhere else - * parser/Parser.h: - * parser/ParserModes.h: Added. - * parser/ParserTokens.h: - Parser no longer needs a global object or callframe to function - * runtime/CodeCache.cpp: Added. - * runtime/CodeCache.h: Added. - A simple, random eviction, Source->UnlinkedCode cache - * runtime/Executable.cpp: - * runtime/Executable.h: - Executables now reference their unlinked counterparts, and - request code specifically for the target global object. - * runtime/JSGlobalData.cpp: - * runtime/JSGlobalData.h: - GlobalData now owns a CodeCache and a set of new structures - for the unlinked code types. - * runtime/JSGlobalObject.cpp: - * runtime/JSGlobalObject.h: - Utility functions used by executables to perform compilation - - * runtime/JSType.h: - Add new JSTypes for unlinked code - -2012-11-06 Michael Saboff - - JSStringCreateWithCFString() Should create an 8 bit String if possible - https://bugs.webkit.org/show_bug.cgi?id=101104 - - Reviewed by Darin Adler. - - Try converting the CFString to an 8 bit string using CFStringGetBytes(..., - kCFStringEncodingISOLatin1, ...) and return the 8 bit string if successful. - If not proceed with 16 bit conversion. - - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - -2012-11-06 Oliver Hunt - - Reduce direct m_symbolTable usage in CodeBlock - https://bugs.webkit.org/show_bug.cgi?id=101391 - - Reviewed by Sam Weinig. - - Simple refactoring. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::CodeBlock::dumpStatistics): - (JSC::CodeBlock::nameForRegister): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::isCaptured): - -2012-11-06 Michael Saboff - - Lexer::scanRegExp, create 8 bit pattern and flag Identifiers from 16 bit source when possible - https://bugs.webkit.org/show_bug.cgi?id=101013 - - Reviewed by Darin Adler. - - Changed scanRegExp so that it will create 8 bit identifiers from 8 bit sources and from 16 bit sources - whan all the characters are 8 bit. Using two templated helpers, the "is all 8 bit" check is only performed - on 16 bit sources. The first helper is orCharacter() that will accumulate the or value of all characters - only for 16 bit sources. Replaced the helper Lexer::makeIdentifierSameType() with Lexer::makeRightSizedIdentifier(). - - * parser/Lexer.cpp: - (JSC::orCharacter): Explicit template that serves as a placeholder. - (JSC::orCharacter): Explicit template that actually or accumulates characters. - (JSC::Lexer::scanRegExp): - * parser/Lexer.h: - (Lexer): - (JSC::Lexer::makeRightSizedIdentifier): New template that always creates an 8 bit Identifier. - (JSC::Lexer::makeRightSizedIdentifier): New template that creates an 8 bit Identifier for 8 bit - data in a 16 bit source. - -2012-11-06 Filip Pizlo - - Indentation of JSCell.h is wrong - https://bugs.webkit.org/show_bug.cgi?id=101379 - - Rubber stamped by Alexey Proskuryakov. - - Just removed four spaces on a bunch of lines. - - * runtime/JSCell.h: - -2012-11-05 Filip Pizlo - - Indentation of JSObject.h is wrong - https://bugs.webkit.org/show_bug.cgi?id=101313 - - Rubber stamped by Alexey Proskuryakov. - - Just unindented code, since namespace bodies shouldn't be indented. - - * runtime/JSObject.h: - -2012-11-05 Filip Pizlo - - Indentation of JSArray.h is wrong - https://bugs.webkit.org/show_bug.cgi?id=101314 - - Rubber stamped by Alexey Proskuryakov. - - Just removing the indentation inside the namespace body. - - * runtime/JSArray.h: - -2012-11-05 Filip Pizlo - - DFG should not fall down to patchable GetById just because a prototype had things added to it - https://bugs.webkit.org/show_bug.cgi?id=101299 - - Reviewed by Geoffrey Garen. - - This looks like a slight win on V8v7 and SunSpider. - - * bytecode/DFGExitProfile.h: - (JSC::DFG::exitKindToString): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-11-05 Filip Pizlo - - Get rid of method_check - https://bugs.webkit.org/show_bug.cgi?id=101147 - - Reviewed by Geoffrey Garen. - - op_method_check no longer buys us anything, since get_by_id proto caching - gives just as much profiling information and the DFG inlines monomorphic - proto accesses anyway. - - This also has the potential for a speed-up since it makes parsing of - profiling data easier. No longer do we have to deal with the confusion of - the get_by_id portion of a method_check appearing monomorphic even though - we're really dealing with a bimorphic access (method_check specializes for - one case and get_by_id for another). - - This looks like a 1% speed-up on both SunSpider and V8v7. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::printGetByIdCacheStatus): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::shrinkToFit): - (JSC::CodeBlock::unlinkCalls): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::getCallLinkInfo): - (JSC::CodeBlock::callLinkInfo): - (CodeBlock): - * bytecode/GetByIdStatus.cpp: - (JSC::GetByIdStatus::computeFromLLInt): - * bytecode/MethodCallLinkInfo.cpp: Removed. - * bytecode/MethodCallLinkInfo.h: Removed. - * bytecode/MethodCallLinkStatus.cpp: Removed. - * bytecode/MethodCallLinkStatus.h: Removed. - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecompiler/BytecodeGenerator.cpp: - (JSC): - * bytecompiler/BytecodeGenerator.h: - (BytecodeGenerator): - * bytecompiler/NodesCodegen.cpp: - (JSC::FunctionCallDotNode::emitBytecode): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileOpcode): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - (JSC::PropertyStubCompilationInfo::copyToStubInfo): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::PropertyStubCompilationInfo::slowCaseInfo): - (PropertyStubCompilationInfo): - (JSC): - (JIT): - * jit/JITPropertyAccess.cpp: - (JSC): - (JSC::JIT::emitSlow_op_get_by_id): - (JSC::JIT::compileGetByIdSlowCase): - * jit/JITPropertyAccess32_64.cpp: - (JSC): - (JSC::JIT::compileGetByIdSlowCase): - * jit/JITStubs.cpp: - (JSC): - * jit/JITStubs.h: - * llint/LowLevelInterpreter.asm: - -2012-11-05 Yuqiang Xian - - Refactor LLInt64 to distinguish the pointer operations from the 64-bit integer operations - https://bugs.webkit.org/show_bug.cgi?id=100321 - - Reviewed by Filip Pizlo. - - We have refactored the MacroAssembler and JIT compilers to distinguish - the pointer operations from the 64-bit integer operations (see bug #99154). - Now we want to do the similar work for LLInt, and the goal is same as - the one mentioned in 99154. - - This is the second part of the modification: in the low level interpreter, - changing the operations on 64-bit integers to use the "q" instructions. - This also removes some unused/meaningless "p" instructions. - - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter.cpp: - (JSC::CLoop::execute): - * llint/LowLevelInterpreter64.asm: - * offlineasm/armv7.rb: - * offlineasm/cloop.rb: - * offlineasm/instructions.rb: - * offlineasm/x86.rb: - -2012-11-05 Filip Pizlo - - Prototype chain caching should check that the path from the base object to the slot base involves prototype hops only - https://bugs.webkit.org/show_bug.cgi?id=101276 - - Reviewed by Gavin Barraclough. - - Changed normalizePrototypeChain() to report an invalid prototype chain if any object is a proxy. - This catches cases where our prototype chain checks would have been insufficient to guard against - newly introduced properties, despecialized properties, or deleted properties in the chain of - objects involved in the access. - - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryCacheGetByID): - (JSC::DFG::tryBuildGetByIDProtoList): - (JSC::DFG::tryCachePutByID): - (JSC::DFG::tryBuildPutByIdList): - * jit/JITStubs.cpp: - (JSC::JITThunks::tryCachePutByID): - (JSC::JITThunks::tryCacheGetByID): - (JSC::DEFINE_STUB_FUNCTION): - * llint/LLIntSlowPaths.cpp: - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * runtime/Operations.h: - (JSC): - (JSC::normalizePrototypeChain): - -2012-11-05 Dima Gorbik - - Back out controversial changes from Bug 98665. - https://bugs.webkit.org/show_bug.cgi?id=101244 - - Reviewed by David Kilzer. - - Backing out changes from Bug 98665 until further discussions take place on rules for including Platform.h in Assertions.h. - - * API/tests/minidom.c: - * API/tests/testapi.c: - -2012-11-04 Filip Pizlo - - Reduce the verbosity of referring to QNaN in JavaScriptCore - https://bugs.webkit.org/show_bug.cgi?id=101174 - - Reviewed by Geoffrey Garen. - - Introduces a #define QNaN in JSValue.h, and replaces all previous uses of - std::numeric_limits::quiet_NaN() with QNaN. - - * API/JSValueRef.cpp: - (JSValueMakeNumber): - (JSValueToNumber): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitFloatTypedArrayGetByVal): - * runtime/CachedTranscendentalFunction.h: - (JSC::CachedTranscendentalFunction::initialize): - * runtime/DateConstructor.cpp: - (JSC::constructDate): - * runtime/DateInstanceCache.h: - (JSC::DateInstanceData::DateInstanceData): - (JSC::DateInstanceCache::reset): - * runtime/ExceptionHelpers.cpp: - (JSC::InterruptedExecutionError::defaultValue): - (JSC::TerminatedExecutionError::defaultValue): - * runtime/JSCell.h: - (JSC::JSValue::getPrimitiveNumber): - * runtime/JSDateMath.cpp: - (JSC::parseDateFromNullTerminatedCharacters): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::resetDateCache): - * runtime/JSGlobalObjectFunctions.cpp: - (JSC::parseInt): - (JSC::jsStrDecimalLiteral): - (JSC::toDouble): - (JSC::jsToNumber): - (JSC::parseFloat): - * runtime/JSValue.cpp: - (JSC::JSValue::toNumberSlowCase): - * runtime/JSValue.h: - (JSC): - * runtime/JSValueInlineMethods.h: - (JSC::jsNaN): - * runtime/MathObject.cpp: - (JSC::mathProtoFuncMax): - (JSC::mathProtoFuncMin): - -2012-11-03 Filip Pizlo - - Baseline JIT should use structure watchpoints whenever possible - https://bugs.webkit.org/show_bug.cgi?id=101146 - - Reviewed by Sam Weinig. - - No speed-up yet except on toy programs. I think that it will start to show - speed-ups with https://bugs.webkit.org/show_bug.cgi?id=101147, which this is - a step towards. - - * jit/JIT.h: - (JIT): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - (JSC::JIT::addStructureTransitionCheck): - (JSC): - (JSC::JIT::testPrototype): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::privateCompilePutByIdTransition): - (JSC::JIT::privateCompileGetByIdProto): - (JSC::JIT::privateCompileGetByIdProtoList): - (JSC::JIT::privateCompileGetByIdChainList): - (JSC::JIT::privateCompileGetByIdChain): - -2012-11-04 Csaba Osztrogonác - - [Qt] udis86_itab.c is always regenerated - https://bugs.webkit.org/show_bug.cgi?id=100756 - - Reviewed by Simon Hausmann. - - * DerivedSources.pri: Generate sources to the generated directory. - * disassembler/udis86/differences.txt: - * disassembler/udis86/itab.py: Add --outputDir option. - (UdItabGenerator.__init__): - (genItabH): - (genItabC): - (main): - -2012-11-02 Filip Pizlo - - LLInt 32-bit put_by_val ArrayStorage case should use the right register (t3, not t2) for the index in the publicLength updating path - https://bugs.webkit.org/show_bug.cgi?id=101118 - - Reviewed by Gavin Barraclough. - - * llint/LowLevelInterpreter32_64.asm: - -2012-11-02 Filip Pizlo - - DFG::Node::converToStructureTransitionWatchpoint should take kindly to ArrayifyToStructure - https://bugs.webkit.org/show_bug.cgi?id=101117 - - Reviewed by Gavin Barraclough. - - We have logic to convert ArrayifyToStructure to StructureTransitionWatchpoint, which is awesome, except - that previously convertToStructureTransitionWatchpoint was (a) asserting that it never saw an - ArrayifyToStructure and (b) would incorrectly create a ForwardStructureTransitionWatchpoint if it did. - - * dfg/DFGNode.h: - (JSC::DFG::Node::convertToStructureTransitionWatchpoint): - -2012-11-02 Filip Pizlo - - DFG::SpeculativeJIT::typedArrayDescriptor should use the Float64Array descriptor for Float64Arrays - https://bugs.webkit.org/show_bug.cgi?id=101114 - - Reviewed by Gavin Barraclough. - - As in https://bugs.webkit.org/show_bug.cgi?id=101112, this was only wrong when Float64Array descriptors - hadn't been initialized yet. That happens rarely, but when it does happen, we would crash. - - This would also become much more wrong if we ever put type size info (num bytes, etc) in the descriptor - and used that directly. So it's good to fix it. - - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::typedArrayDescriptor): - -2012-11-02 Filip Pizlo - - JIT::privateCompileGetByVal should use the uint8ClampedArrayDescriptor for compiling accesses to Uint8ClampedArrays - https://bugs.webkit.org/show_bug.cgi?id=101112 - - Reviewed by Gavin Barraclough. - - The only reason why the code was wrong to use uint8ArrayDescriptor instead is that if we're just using - Uint8ClampedArrays then the descriptor for Uint8Array may not have been initialized. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByVal): - -2012-11-02 Mark Hahnenberg - - MarkedBlocks should use something other than the mark bits to indicate liveness for newly allocated objects - https://bugs.webkit.org/show_bug.cgi?id=100877 - - Reviewed by Filip Pizlo. - - Currently when we canonicalize cell liveness data in MarkedBlocks, we set the mark bit for every cell in the - block except for those in the free list. This allows us to consider objects that were allocated since the - previous collection to be considered live until they have a chance to be properly marked by the collector. - - If we want to use the mark bits to signify other types of information, e.g. using sticky mark bits for generational - collection, we will have to keep track of newly allocated objects in a different fashion when we canonicalize cell liveness. - - One method would be to allocate a separate set of bits while canonicalizing liveness data. These bits would - track the newly allocated objects in the block separately from those objects who had already been marked. We would - then check these bits, along with the mark bits, when determining liveness. - - * heap/Heap.h: - (Heap): - (JSC::Heap::isLive): We now check for the presence of the newlyAllocated Bitmap. - (JSC): - * heap/MarkedBlock.cpp: - (JSC::MarkedBlock::specializedSweep): We clear the newlyAllocated Bitmap if we're creating a free list. This - will happen if we canonicalize liveness data for some other reason than collection (e.g. forEachCell) and - then start allocating again. - (JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor): - (SetNewlyAllocatedFunctor): - (JSC::SetNewlyAllocatedFunctor::operator()): We set the newlyAllocated bits for all the objects - that aren't already marked. We undo the bits for the objects in the free list later in canonicalizeCellLivenessData. - (JSC::MarkedBlock::canonicalizeCellLivenessData): We should never have a FreeListed block with a newlyAllocated Bitmap. - We allocate the new Bitmap, set the bits for all the objects that aren't already marked, and then unset all of the - bits for the items currently in the FreeList. - * heap/MarkedBlock.h: - (JSC::MarkedBlock::clearMarks): We clear the newlyAllocated bitmap if it exists because at this point we don't need it - any more. - (JSC::MarkedBlock::isEmpty): If we have some objects that are newlyAllocated, we are not empty. - (JSC::MarkedBlock::isNewlyAllocated): - (JSC): - (JSC::MarkedBlock::setNewlyAllocated): - (JSC::MarkedBlock::clearNewlyAllocated): - (JSC::MarkedBlock::isLive): We now check the newlyAllocated Bitmap, if it exists, when determining liveness of a cell in - a block that is Marked. - * heap/WeakBlock.cpp: - (JSC::WeakBlock::visit): We need to make sure we don't finalize objects that are in the newlyAllocated Bitmap. - (JSC::WeakBlock::reap): Ditto. - -2012-11-02 Filip Pizlo - - JIT::privateCompileGetByVal should use MacroAssemblerCodePtr::createFromExecutableAddress like JIT::privateCompilePutByVal - https://bugs.webkit.org/show_bug.cgi?id=101109 - - Reviewed by Gavin Barraclough. - - This fixes crashes on ARMv7 resulting from the return address already being tagged with the THUMB2 bit. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::privateCompileGetByVal): - -2012-11-02 Simon Fraser - - Enable SUBPIXEL_LAYOUT on Mac - https://bugs.webkit.org/show_bug.cgi?id=101076 - - Reviewed by Dave Hyatt. - - Define ENABLE_SUBPIXEL_LAYOUT and include it in FEATURE_DEFINES. - - * Configurations/FeatureDefines.xcconfig: - -2012-11-02 Michael Saboff - - RegExp.prototype.toString Should Produce an 8 bit JSString if possible. - https://bugs.webkit.org/show_bug.cgi?id=101003 - - Reviewed by Geoffrey Garen. - - Took the logic of regExpObjectSource() and created two templated helpers that uses the - source character type when appending to the StringBuilder. - - * runtime/RegExpObject.cpp: - (JSC::appendLineTerminatorEscape): Checks line terminate type to come up with escaped version. - (JSC::regExpObjectSourceInternal): Templated version of original. - (JSC::regExpObjectSource): Wrapper function. - -2012-11-02 Adam Barth - - ENABLE(UNDO_MANAGER) is disabled everywhere and is not under active development - https://bugs.webkit.org/show_bug.cgi?id=100711 - - Reviewed by Eric Seidel. - - * Configurations/FeatureDefines.xcconfig: - -2012-11-02 Simon Hausmann - - [Qt] Fix build on Windows when Qt is configured with -release - https://bugs.webkit.org/show_bug.cgi?id=101041 - - Reviewed by Jocelyn Turcotte. - - When Qt is configured with -debug or -release, the release/debug build of for example - QtCore is not available by default. For LLIntExtractor we always need to build debug - _and_ release versions, but we do not actually need any Qt libraries nor qtmain(d).lib. - Therefore we can disable all these features but need to keep $$QT.core.includes in the - INCLUDEPATH for some defines from qglobal.h. - - * LLIntOffsetsExtractor.pro: - -2012-11-01 Mark Lam - - A llint workaround for a toolchain issue. - https://bugs.webkit.org/show_bug.cgi?id=101012. - - Reviewed by Michael Saboff. - - * llint/LowLevelInterpreter.asm: - - use a local label to workaround the toolchain issue with undeclared - global labels. - -2012-11-01 Oliver Hunt - - Remove GlobalObject constant register that is typically unused - https://bugs.webkit.org/show_bug.cgi?id=101005 - - Reviewed by Geoffrey Garen. - - The GlobalObject constant register is frequently allocated even when it - is not used, it is also getting in the way of some other optimisations. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::CodeBlock): - * bytecode/CodeBlock.h: - (CodeBlock): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::BytecodeGenerator): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseResolveOperations): - -2012-10-31 Filip Pizlo - - DFG optimized string access code should be enabled - https://bugs.webkit.org/show_bug.cgi?id=100825 - - Reviewed by Oliver Hunt. - - - Removes prediction checks from the parser. - - - Fixes the handling of array mode refinement for strings. I.e. we don't do - any refinement - we already know it's going to be a string. We could - revisit this in the future, but for now the DFG lacks the ability to - handle any array modes other than Array::String for string intrinsics, so - this is as good as it gets. - - - Removes uses of isBlahSpeculation for checking if a mode is already - checked. isBlahSpeculation implicitly checks if the SpeculatedType is not - BOTTOM ("empty"), which breaks for checking if a mode is already checked - since a mode may already be "checked" in the sense that we've proven that - the code is unreachable. - - ~1% speed-up on V8v7, mostly from a speed-up on crypto, which uses string - intrinsics in one of the hot functions. - - * bytecode/SpeculatedType.h: - (JSC::speculationChecked): - (JSC): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::ArrayMode::alreadyChecked): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::handleIntrinsic): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt): - -2012-10-31 Filip Pizlo - - Sparse array size threshold should be increased to 100000 - https://bugs.webkit.org/show_bug.cgi?id=100827 - - Reviewed by Oliver Hunt. - - This enables the use of contiguous arrays in programs that previously - couldn't use them. And I so far can't see any examples of this being - a downside. To the extent that there is a downside, it ought to be - addressed by GC: https://bugs.webkit.org/show_bug.cgi?id=100828 - - * runtime/ArrayConventions.h: - (JSC): - -2012-10-31 Mark Lam - - C++ llint 64-bit backend needs to zero extend results of int32 operations. - https://bugs.webkit.org/show_bug.cgi?id=100899. - - Reviewed by Filip Pizlo. - - llint asm instructions ending in "i" for a 64-bit machine expects the - high 32-bit of registers to be zero'ed out when a 32-bit instruction - writes into a register. Fixed the C++ llint to honor this. - - Fixed the index register used in BaseIndex addressing to be of size - intptr_t as expected. - - Updated CLoopRegister to handle different endiannesss configurations. - - * llint/LowLevelInterpreter.cpp: - (JSC::CLoopRegister::clearHighWord): - - new method to clear the high 32-bit of a 64-bit register. - It's a no-op for the 32-bit build. - (CLoopRegister): - - CLoopRegister now takes care of packing and byte endianness order. - (JSC::CLoop::execute): - Added an assert. - * offlineasm/cloop.rb: - - Add calls to clearHighWord() wherever needed. - -2012-10-31 Mark Lam - - A JSC printf (support for %J+s and %b). - https://bugs.webkit.org/show_bug.cgi?id=100566. - - Reviewed by Michael Saboff. - - Added VMInspector::printf(), fprintf(), sprintf(), and snprintf(). - - %b prints ints as boolean TRUE (non-zero) or FALSE (zero). - - %Js prints a WTF::String* like a %s prints a char*. - Also works for 16bit WTF::Strings (prints wchar_t* using %S). - - '+' is a modifier meaning 'use verbose mode', and %J+s is an example - of its use. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * interpreter/VMInspector.cpp: - (FormatPrinter): - (JSC::FormatPrinter::~FormatPrinter): - (JSC::FormatPrinter::print): - (JSC::FormatPrinter::printArg): - (JSC::FormatPrinter::printWTFString): - (JSC::FileFormatPrinter::FileFormatPrinter): - (JSC::FileFormatPrinter::printArg): - (JSC::StringFormatPrinter::StringFormatPrinter): - (JSC::StringFormatPrinter::printArg): - (JSC::StringNFormatPrinter::StringNFormatPrinter): - (JSC::StringNFormatPrinter::printArg): - (JSC::VMInspector::fprintf): - (JSC::VMInspector::printf): - (JSC::VMInspector::sprintf): - (JSC::VMInspector::snprintf): - * interpreter/VMInspector.h: - (VMInspector): - -2012-10-31 Mark Lam - - 64-bit llint PC offset can be negative: using an unsigned shift is a bug. - https://bugs.webkit.org/show_bug.cgi?id=100896. - - Reviewed by Filip Pizlo. - - Fixed the PC offset divisions in the 64-bit llint asm to use rshift instead of urshift. - - * llint/LowLevelInterpreter64.asm: - -2012-10-30 Yuqiang Xian - - glsl-function-atan.html WebGL conformance test fails after https://bugs.webkit.org/show_bug.cgi?id=99154 - https://bugs.webkit.org/show_bug.cgi?id=100789 - - Reviewed by Filip Pizlo. - - We accidently missed a bitwise double to int64 conversion. - - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::silentFill): - -2012-10-30 Joseph Pecoraro - - [Mac] Sync up FeatureDefine Configuration Files - https://bugs.webkit.org/show_bug.cgi?id=100171 - - Reviewed by David Kilzer. - - Follow up to better coordinate with iOS feature defines. Make: - - - ENABLE_FILTERS always on - - ENABLE_INPUT_* iphonesimulator values point to the iphoneos values - - * Configurations/FeatureDefines.xcconfig: - -2012-10-30 Joseph Pecoraro - - [Mac] Sync up FeatureDefine Configuration Files - https://bugs.webkit.org/show_bug.cgi?id=100171 - - Reviewed by David Kilzer. - - Ensure an identical FeatureDefine files across all projects. Changes: - - - ENABLE_CSS_BOX_DECORATION_BREAK should be in all - - ENABLE_PDFKIT_PLUGIN should be in all - - ENABLE_RESOLUTION_MEDIA_QUERY should be in all - - ENABLE_ENCRYPTED_MEDIA should be in all - - ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING with corrected value - - Some alphabetical ordering cleanup - - * Configurations/FeatureDefines.xcconfig: - -2012-10-30 Mark Hahnenberg - - Arrays can change IndexingType in the middle of sorting - https://bugs.webkit.org/show_bug.cgi?id=100773 - - Reviewed by Filip Pizlo. - - Instead of giving up, we just fetch the appropriate vector based on the current - IndexingType of the array. - - * runtime/JSArray.cpp: - (JSC::JSArray::sortVector): - * runtime/JSObject.h: - (JSObject): - (JSC::JSObject::currentIndexingData): - (JSC::JSObject::currentRelevantLength): - -2012-10-29 Anders Carlsson - - Build WebKit as C++11 on Mac - https://bugs.webkit.org/show_bug.cgi?id=100720 - - Reviewed by Daniel Bates. - - * Configurations/Base.xcconfig: - Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x. - - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::generate): - (JSC::BytecodeGenerator::pushFinallyContext): - (JSC::BytecodeGenerator::beginSwitch): - * llint/LLIntOffsetsExtractor.cpp: - * runtime/Identifier.cpp: - (JSC::Identifier::add8): - * runtime/Identifier.h: - (JSC::Identifier::add): - * runtime/JSONObject.cpp: - (JSC::appendStringToStringBuilder): - * runtime/StringPrototype.cpp: - (JSC::replaceUsingStringSearch): - Add static_casts to prevent implicit type conversions in non-constant initializer lists. - -2012-10-28 Mark Rowe - - Simplify Xcode configuration settings that used to vary between OS versions. - - Reviewed by Dan Bernstein. - - * Configurations/Base.xcconfig: - * Configurations/DebugRelease.xcconfig: - * Configurations/JavaScriptCore.xcconfig: - -2012-10-28 Mark Rowe - - Remove references to unsupported OS and Xcode versions. - - Reviewed by Anders Carlsson. - - * Configurations/Base.xcconfig: - * Configurations/CompilerVersion.xcconfig: Removed. - * Configurations/DebugRelease.xcconfig: - * Configurations/Version.xcconfig: - * JavaScriptCore.xcodeproj/project.pbxproj: - -2012-10-29 Michael Saboff - - Non-special escape character sequences cause JSC::Lexer::parseString to create 16 bit strings - https://bugs.webkit.org/show_bug.cgi?id=100576 - - Reviewed by Darin Adler. - - Changed singleEscape() processing to be based on a lookup of a static table. The table - covers ASCII characters SPACE through DEL. If a character can be a single character escape, - then the table provides the non-zero result of that escape. Updated the result of - singleEscape to be an LChar to make the table as small as possible. - Added a new test fast/js/normal-character-escapes-in-string-literals.html to validated - the behavior. - - * parser/Lexer.cpp: - (JSC::singleEscape): - (JSC::Lexer::parseString): - (JSC::Lexer::parseStringSlowCase): - -2012-10-29 Enrica Casucci - - Add ENABLE_USERSELECT_ALL feature flag. - https://bugs.webkit.org/show_bug.cgi?id=100559 - - Reviewed by Eric Seidel. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-28 Filip Pizlo - - DFG should be able to emit effectful structure checks - https://bugs.webkit.org/show_bug.cgi?id=99260 - - Reviewed by Oliver Hunt. - - This change allows us to find out if an array access that has gone polymorphic - is operating over known structures - i.e. the primordial array structures of the - global object that the code block containing the array access belongs to. We - term this state "OriginalArray" for short. The fact that the access has gone - polymorphic means that the array profile will not be able to report the set of - structures it had seen - but if it can tell us that all of the structures were - primordial then it just so happens that we can deduce what the structure set - would have been by just querying the code block's global object. This allows us - to emit an ArrayifyToStructure instead of an Arrayify if we find that we need to - do conversions. The fast path of an ArrayifyToStructure is exactly like the fast - path of a CheckStructure and is mostly subject to the same optimizations. It - also burns one fewer registers. - - Essentially the notion of OriginalArray is a super cheap way of getting the - array profile to tell us a structure set instead of a singleton structure. - Currently, the array profile can only tell us the structure seen at an array - access if there was exactly one structure. If there were multiple structures, it - won't tell us anything other than the array modes and other auxiliary profiling - data (whether there were stores to holes, for example). With OriginalArray, we - cheaply get a structure set if all of the structures were primordial for the - code block's global object, since in that case the array mode set (ArrayModes) - can directly tell us the structure set. In the future, we might consider adding - complete structure sets to the array profiles, but I suspect that we would hit - diminishing returns if we did so - it would only help if we have array accesses - that are both polymorphic and are cross-global-object accesses (rare) or if the - arrays had named properties or other structure transitions that are unrelated to - indexing type (also rare). - - This also does away with Arrayify (and the new ArrayifyToStructure) returning - the butterfly pointer. This turns out to be faster and easier to CSE. - - And, this also changes constant folding to be able to eliminate CheckStructure, - ForwardCheckStructure, and ArrayifyToStructure in addition to being able to - transform them into structure transition watchpoints. This is great for - ArrayifyToStructure because then CSE and CFA know that there is no side effect. - Converting CheckStructure and ForwardCheckStructure to also behave this way is - just a matter of elegance. - - This has no performance impact right now. It's intended to alleviate some of the - regressions seen in the early implementation of - https://bugs.webkit.org/show_bug.cgi?id=98606. - - * bytecode/ArrayProfile.cpp: - (JSC::ArrayProfile::computeUpdatedPrediction): - * bytecode/ArrayProfile.h: - (JSC): - (JSC::ArrayProfile::ArrayProfile): - (ArrayProfile): - (JSC::ArrayProfile::usesOriginalArrayStructures): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::updateAllPredictionsAndCountLiveness): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::ArrayMode::fromObserved): - (JSC::DFG::ArrayMode::alreadyChecked): - (JSC::DFG::arrayClassToString): - * dfg/DFGArrayMode.h: - (JSC::DFG::ArrayMode::withProfile): - (JSC::DFG::ArrayMode::isJSArray): - (ArrayMode): - (JSC::DFG::ArrayMode::isJSArrayWithOriginalStructure): - (JSC::DFG::ArrayMode::supportsLength): - (JSC::DFG::ArrayMode::arrayModesWithIndexingShape): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::getArrayMode): - (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): - (JSC::DFG::ByteCodeParser::handleGetByOffset): - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::checkStructureElimination): - (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination): - (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination): - (JSC::DFG::CSEPhase::checkArrayElimination): - (JSC::DFG::CSEPhase::getScopeRegistersLoadElimination): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - (JSC::DFG::FixupPhase::checkArray): - * dfg/DFGNode.h: - (JSC::DFG::Node::hasStructure): - (JSC::DFG::Node::hasArrayMode): - (JSC::DFG::Node::arrayMode): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): - (JSC::DFG::SpeculativeJIT::arrayify): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * runtime/JSGlobalObject.h: - (JSC::JSGlobalObject::isOriginalArrayStructure): - * runtime/Structure.cpp: - (JSC::Structure::nonPropertyTransition): - -2012-10-28 Filip Pizlo - - There should not be blind spots in array length array profiling - https://bugs.webkit.org/show_bug.cgi?id=100620 - - Reviewed by Oliver Hunt. - - I don't think this has any performance impact. But it's good to not have random - programs occasionally emit a GetById for array length accesses. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::privateCompilePatchGetArrayLength): - -2012-10-28 Filip Pizlo - - Unreviewed, make always-true enum-to-int comparisons use casts. - - * dfg/DFGFPRInfo.h: - (JSC::DFG::FPRInfo::debugName): - * dfg/DFGGPRInfo.h: - (JSC::DFG::JSValueSource::tagGPR): - (JSC::DFG::GPRInfo::toIndex): - (JSC::DFG::GPRInfo::debugName): - * runtime/JSTypeInfo.h: - (JSC::TypeInfo::TypeInfo): - -2012-10-27 Filip Pizlo - - OSR exit compilation should defend against argument recoveries from code blocks that are no longer on the inline stack - https://bugs.webkit.org/show_bug.cgi?id=100601 - - Reviewed by Oliver Hunt. - - This happened to me while I was fixing bugs for https://bugs.webkit.org/show_bug.cgi?id=100599. - I'm not sure how to reproduce this. - - * dfg/DFGAssemblyHelpers.h: - (JSC::DFG::AssemblyHelpers::baselineCodeBlockFor): - (AssemblyHelpers): - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - -2012-10-27 Filip Pizlo - - DFG::Array::Mode needs to be cleaned up - https://bugs.webkit.org/show_bug.cgi?id=100599 - - Reviewed by Oliver Hunt. - - Turn the previous massive Array::Mode enum into a class that contains four - fields, the type, whether it's a JSArray, the level of speculation, and the - kind of conversion to perform. - - No performance or behavioral change. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArgumentsSimplificationPhase.cpp: - (JSC::DFG::ArgumentsSimplificationPhase::run): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::ArrayMode::fromObserved): - (JSC::DFG::ArrayMode::refine): - (JSC::DFG::ArrayMode::alreadyChecked): - (JSC::DFG::arrayTypeToString): - (JSC::DFG::arrayClassToString): - (DFG): - (JSC::DFG::arraySpeculationToString): - (JSC::DFG::arrayConversionToString): - (JSC::DFG::ArrayMode::toString): - * dfg/DFGArrayMode.h: - (DFG): - (ArrayMode): - (JSC::DFG::ArrayMode::ArrayMode): - (JSC::DFG::ArrayMode::type): - (JSC::DFG::ArrayMode::arrayClass): - (JSC::DFG::ArrayMode::speculation): - (JSC::DFG::ArrayMode::conversion): - (JSC::DFG::ArrayMode::asWord): - (JSC::DFG::ArrayMode::fromWord): - (JSC::DFG::ArrayMode::withSpeculation): - (JSC::DFG::ArrayMode::usesButterfly): - (JSC::DFG::ArrayMode::isJSArray): - (JSC::DFG::ArrayMode::isInBounds): - (JSC::DFG::ArrayMode::mayStoreToHole): - (JSC::DFG::ArrayMode::isOutOfBounds): - (JSC::DFG::ArrayMode::isSlowPut): - (JSC::DFG::ArrayMode::canCSEStorage): - (JSC::DFG::ArrayMode::lengthNeedsStorage): - (JSC::DFG::ArrayMode::modeForPut): - (JSC::DFG::ArrayMode::isSpecific): - (JSC::DFG::ArrayMode::supportsLength): - (JSC::DFG::ArrayMode::benefitsFromStructureCheck): - (JSC::DFG::ArrayMode::doesConversion): - (JSC::DFG::ArrayMode::arrayModesThatPassFiltering): - (JSC::DFG::ArrayMode::operator==): - (JSC::DFG::ArrayMode::operator!=): - (JSC::DFG::ArrayMode::arrayModesWithIndexingShape): - (JSC::DFG::canCSEStorage): - (JSC::DFG::lengthNeedsStorage): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::getArrayMode): - (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): - (JSC::DFG::ByteCodeParser::handleIntrinsic): - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::getArrayLengthElimination): - (JSC::DFG::CSEPhase::checkArrayElimination): - (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination): - (JSC::DFG::CSEPhase::performNodeCSE): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - (JSC::DFG::FixupPhase::checkArray): - (JSC::DFG::FixupPhase::blessArrayOperation): - * dfg/DFGGraph.cpp: - (JSC::DFG::Graph::dump): - * dfg/DFGGraph.h: - (JSC::DFG::Graph::byValIsPure): - * dfg/DFGNode.h: - (JSC::DFG::Node::arrayMode): - (JSC::DFG::Node::setArrayMode): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::typedArrayDescriptor): - (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): - (JSC::DFG::SpeculativeJIT::checkArray): - (JSC::DFG::SpeculativeJIT::arrayify): - (JSC::DFG::SpeculativeJIT::compileGetByValOnString): - (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): - (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): - (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): - (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage): - (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): - (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength): - (JSC::DFG::SpeculativeJIT::compileGetArrayLength): - (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister): - (SpeculativeJIT): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-27 Dan Bernstein - - REAL_PLATFORM_NAME build setting is no longer needed - https://bugs.webkit.org/show_bug.cgi?id=100587 - - Reviewed by Mark Rowe. - - Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references - to PLATFORM_NAME. - - * Configurations/Base.xcconfig: - * Configurations/CompilerVersion.xcconfig: - * Configurations/DebugRelease.xcconfig: - * Configurations/FeatureDefines.xcconfig: - * Configurations/JSC.xcconfig: - * Configurations/JavaScriptCore.xcconfig: - * Configurations/ToolExecutable.xcconfig: - -2012-10-25 Filip Pizlo - - Forward OSR calculation is wrong in the presence of multiple SetLocals, or a mix of SetLocals and Phantoms - https://bugs.webkit.org/show_bug.cgi?id=100461 - - Reviewed by Oliver Hunt and Gavin Barraclough. - - This does a couple of things. First, it removes the part of the change in r131822 that made the forward - OSR exit calculator capable of handling multiple SetLocals. That change was wrong, because it would - blindly assume that all SetLocals had the same ValueRecovery, and would ignore the possibility that if - there is no value recovery then a ForwardCheckStructure on the first SetLocal would not know how to - recover the state associated with the second SetLocal. Then, it introduces the invariant that any bytecode - op that decomposes into multiple SetLocals must first emit dead SetLocals as hints and then emit a second - set of SetLocals to actually do the setting of the locals. This means that if a ForwardCheckStructure (or - any other hoisted forward speculation) is inserted, it will always be inserted on the second set of - SetLocals (since hoisting only touches the live ones), at which point OSR will already know about the - mov hints implied by the first set of (dead) SetLocals. This gives us the behavior we wanted, namely, that - a ForwardCheckStructure applied to a variant set by a resolve_with_base-like operation can correctly do a - forward exit while also ensuring that prior to exiting we set the appropriate locals. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGOSRExit.cpp: - (JSC::DFG::OSRExit::OSRExit): - * dfg/DFGOSRExit.h: - (OSRExit): - * dfg/DFGOSRExitCompiler.cpp: - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): - -2012-10-26 Simon Hausmann - - [Qt] Fix the LLInt build on Windows - https://bugs.webkit.org/show_bug.cgi?id=97648 - - Reviewed by Tor Arne Vestbø. - - The main change for the port on Windows is changing the way offsets are extracted - and the LLIntAssembly.h is generated to accomodate release and debug configurations. - - Firstly the LLIntOffsetsExtractor binary is now built as-is (no DESTDIR set) and - placed into debug\LLIntOffsetsExtractor.exe and release\LLIntOffsetsExtractor.exe - on Windows debug_and_release builds. On other patforms it remainds in the regular - out directory. - - Secondly the LLIntAssembly.h files must be different for different build types, - so the LLIntAssembly.h generator in DerivedSources.pri operates no on the extractor - binary files as input. Using a simple exists() check we verify the presence of either - a regular, a debug\LLIntOffsetsExtractor and a release\LLIntOffsetsExtractor binary - and process all of them. The resulting assembly files consequently end up in - generated\debug\LLIntAssembly.h and generated\release\LLIntAssembly.h. - - In Target.pri we have to also make sure that those directories are in the include - path according to the release or debug configuration. - - Lastly a small tweak - swapping WTF.pri and JSC.pri inclusions - in the - LLIntOffsetsExtractor build was needed to make sure that we include - JavaScriptCore/config.h instead of WTF/config.h, required to fix the - build issues originally pasted in bug #97648. - - * DerivedSources.pri: - * JavaScriptCore.pro: - * LLIntOffsetsExtractor.pro: - * Target.pri: - -2012-10-26 Gabor Ballabas - - [Qt] Enable JSC's disassembler on x86, x86_64 Linux - https://bugs.webkit.org/show_bug.cgi?id=100386 - - Reviewed by Simon Hausmann. - - It works fine on Linux x86, x86_64 just needs to be enabled in the - QtWebKit build system. - - * DerivedSources.pri: - * JavaScriptCore.pri: - * Target.pri: - -2012-10-26 Thiago Marcos P. Santos - - Add feature flags for CSS Device Adaptation - https://bugs.webkit.org/show_bug.cgi?id=95960 - - Reviewed by Kenneth Rohde Christiansen. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-26 Simon Hausmann - - [WIN] Make LLInt offsets extractor work on Windows - https://bugs.webkit.org/show_bug.cgi?id=100369 - - Reviewed by Kenneth Rohde Christiansen. - - Open the input file explicitly in binary mode to prevent ruby/Windows from thinking that - it's a text mode file that needs even new line conversions. The binary mode parameter is - ignored on other platforms. - - * offlineasm/offsets.rb: - -2012-10-25 Michael Saboff - - SymbolTableIndexHashTraits::needsDestruction should be set to true - https://bugs.webkit.org/show_bug.cgi?id=100437 - - Reviewed by Mark Hahnenberg. - - For correctness, set SymbolTableIndexHashTraits::needsDestruction to true since SymbolTableEntry's do - need to have their destructor called due to the possibility of rare data. - - * runtime/SymbolTable.h: - (SymbolTableIndexHashTraits): - -2012-10-25 Filip Pizlo - - DFG Arrayify elimination should replace it with GetButterfly rather than Phantom - https://bugs.webkit.org/show_bug.cgi?id=100441 - - Reviewed by Oliver Hunt and Gavin Barraclough. - - Made array profiler's to-string helper behave correctly. - - Made Arrayify elimination do the right thing (convert to GetButterfly). - - Made CFA's interference analysis track clobbered array modes correctly, mostly by - simplifying the machinery. - - * bytecode/ArrayProfile.cpp: - (JSC::arrayModesToString): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::clobberArrayModes): - (AbstractValue): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - -2012-10-25 Filip Pizlo - - REGRESSION (r131793-r131826): Crash going to wikifonia.org - https://bugs.webkit.org/show_bug.cgi?id=100281 - - Reviewed by Oliver Hunt. - - Restore something that got lost in the resolve refactoring: the ability to give up on life if - we see a resolve of 'arguments'. - - * runtime/JSScope.cpp: - (JSC::JSScope::resolveContainingScopeInternal): - -2012-10-25 Dominik Röttsches - - Conditionalize XHR timeout support - https://bugs.webkit.org/show_bug.cgi?id=100356 - - Reviewed by Adam Barth. - - Adding XHR_TIMEOUT feature to conditionalize this on ports without network backend support. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-25 Michael Saboff - - REGRESSION (r131836): failures in list styles tests on EFL, GTK - https://bugs.webkit.org/show_bug.cgi?id=99824 - - Reviewed by Oliver Hunt. - - Saved start of string since it is modified by call convertUTF8ToUTF16(). - - * API/JSStringRef.cpp: - (JSStringCreateWithUTF8CString): - -2012-10-24 Filip Pizlo - - DFG NewArrayBuffer node should keep its data in a structure on the side to free up one of the opInfos - https://bugs.webkit.org/show_bug.cgi?id=100328 - - Reviewed by Oliver Hunt. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGGraph.h: - (Graph): - * dfg/DFGNode.h: - (NewArrayBufferData): - (DFG): - (JSC::DFG::Node::newArrayBufferData): - (Node): - (JSC::DFG::Node::startConstant): - (JSC::DFG::Node::numConstants): - -2012-10-25 Mark Lam - - Update the C++ llint to work with the latest op_resolve... changes. - https://bugs.webkit.org/show_bug.cgi?id=100345. - - Reviewed by Oliver Hunt. - - * llint/LowLevelInterpreter.cpp: - (JSC::CLoop::execute): - - emit opcode name as label when not using COMPUTED_GOTOs. The new op_resolve - opcodes have jumps to these labels. - - declare all opcode labels as UNUSED_LABEL()s to keep the compiler happy - for opcodes that are not referenced by anyone. - * offlineasm/asm.rb: - - strip llint_ prefix from opcode names used as labels. - -2012-10-24 Yuqiang Xian - - Refactor LLInt64 to distinguish the pointer operations from the 64-bit integer operations - https://bugs.webkit.org/show_bug.cgi?id=100321 - - Reviewed by Filip Pizlo. - - We have refactored the MacroAssembler and JIT compilers to distinguish - the pointer operations from the 64-bit integer operations (see bug #99154). - Now we want to do the similar work for LLInt, and the goal is same as - the one mentioned in 99154. - - This is the first part of the modification: in the offline assembler, - adding the support of the "q" instructions which will be used for - 64-bit integer operations. - - * llint/LowLevelInterpreter.cpp: - (JSC::CLoop::execute): - * offlineasm/cloop.rb: - * offlineasm/instructions.rb: - * offlineasm/x86.rb: - -2012-10-24 Filip Pizlo - - DFG compileBlahBlahByVal methods for Contiguous and ArrayStorage have only one caller and should be removed - https://bugs.webkit.org/show_bug.cgi?id=100311 - - Reviewed by Mark Hahnenberg. - - Just trying to simplify things before I make them more complicated again. - - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): - * dfg/DFGSpeculativeJIT32_64.cpp: - (DFG): - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (DFG): - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-23 Andreas Kling - - CodeBlock: Give m_putToBaseOperations an inline capacity. - - - - Reviewed by Oliver Hunt. - - Since the CodeBlock constructor always inserts a single PutToBaseOperation, but there's no - guarantee that more will follow, give the m_putToBaseOperations vector an inline capacity of 1. - There are 4009 of these Vectors on Membuster3, and only 126 of them have more than a single entry. - - This change yields a 1.90MB reduction in memory usage. - - * bytecode/CodeBlock.h: - (CodeBlock): - -2012-10-23 Christophe Dumez - - Regression(r132143): Assertion hit in JSC::Interpreter::StackPolicy::StackPolicy(JSC::Interpreter&, const WTF::StackBounds&) - https://bugs.webkit.org/show_bug.cgi?id=100109 - - Reviewed by Oliver Hunt. - - Fix possible integer overflow in StackPolicy constructor by - using size_t type instead of int for stack sizes. The value - returned by StackBounds::size() is of type size_t but was - assigned to an int, which may overflow. - - * interpreter/Interpreter.cpp: - (JSC): - (JSC::Interpreter::StackPolicy::StackPolicy): - -2012-10-23 Carlos Garcia Campos - - Unreviewed. Fix make distcheck. - - * GNUmakefile.list.am: Add missing header file. - -2012-10-23 Mark Lam - - Make topCallFrame reliable. - https://bugs.webkit.org/show_bug.cgi?id=98928. - - Reviewed by Geoffrey Garen. - - - VM entry points and the GC now uses topCallFrame. - - The callerFrame value in CallFrames are now always the previous - frame on the stack, except for the first frame which has a - callerFrame of 0 (not counting the HostCallFrameFlag). - Hence, we can now traverse every frame on the stack all the way - back to the first frame. - - GlobalExec's will no longer be used as the callerFrame values in - call frames. - - Added fences and traps for debugging the JSStack in debug builds. - - * bytecode/SamplingTool.h: - (SamplingTool): - (JSC::SamplingTool::CallRecord::CallRecord): - * dfg/DFGOperations.cpp: - - Fixed 2 DFG helper functions to flush topCallFrame as expected. - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::prepareForExternalCall): - * interpreter/CallFrame.h: - (JSC::ExecState::callerFrameNoFlags): - (ExecState): - (JSC::ExecState::argIndexForRegister): - (JSC::ExecState::getArgumentUnsafe): - * interpreter/CallFrameClosure.h: - (CallFrameClosure): - * interpreter/Interpreter.cpp: - (JSC): - (JSC::eval): - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::endRepeatCall): - * interpreter/Interpreter.h: - (JSC): - (Interpreter): - * interpreter/JSStack.cpp: - (JSC::JSStack::JSStack): - (JSC::JSStack::gatherConservativeRoots): - (JSC::JSStack::disableErrorStackReserve): - * interpreter/JSStack.h: - (JSC): - (JSStack): - (JSC::JSStack::installFence): - (JSC::JSStack::validateFence): - (JSC::JSStack::installTrapsAfterFrame): - * interpreter/JSStackInlines.h: Added. - (JSC): - (JSC::JSStack::getTopOfFrame): - (JSC::JSStack::getTopOfStack): - (JSC::JSStack::getStartOfFrame): - (JSC::JSStack::pushFrame): - (JSC::JSStack::popFrame): - (JSC::JSStack::generateFenceValue): - (JSC::JSStack::installFence): - (JSC::JSStack::validateFence): - (JSC::JSStack::installTrapsAfterFrame): - * jit/JITStubs.cpp: - (JSC::jitCompileFor): - (JSC::lazyLinkFor): - - Set frame->codeBlock to 0 for both the above because they are called - with partially intitialized frames (cb uninitialized), but may - trigger a GC. - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - -2012-10-22 Filip Pizlo - - DFG::Array::Undecided should be called DFG::Array::SelectUsingPredictions - https://bugs.webkit.org/show_bug.cgi?id=100052 - - Reviewed by Oliver Hunt. - - No functional change, just renaming. It's a clearer name that more accurately - reflects the meaning, and it eliminates the namespace confusion that will happen - with the Undecided indexing type in https://bugs.webkit.org/show_bug.cgi?id=98606 - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::fromObserved): - (JSC::DFG::refineArrayMode): - (JSC::DFG::modeAlreadyChecked): - (JSC::DFG::modeToString): - * dfg/DFGArrayMode.h: - (JSC::DFG::canCSEStorage): - (JSC::DFG::modeIsSpecific): - (JSC::DFG::modeSupportsLength): - (JSC::DFG::benefitsFromStructureCheck): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - (JSC::DFG::FixupPhase::blessArrayOperation): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::arrayify): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-22 Mark Lam - - Change stack recursion checks to be based on stack availability. - https://bugs.webkit.org/show_bug.cgi?id=99872. - - Reviewed by Filip Pizlo and Geoffrey Garen. - - - Remove m_reentryDepth, ThreadStackType which are now obsolete. - - Replaced the reentryDepth checks with a StackBounds check. - - Added the Interpreter::StackPolicy class to compute a reasonable - stack capacity requirement given the native stack that the - interpreter is executing on at that time. - - Reserved an amount of JSStack space for the use of error handling - and enable its use (using Interpreter::ErrorHandlingMode) when - we're about to throw or report an exception. - - Interpreter::StackPolicy also allows more native stack space - to be used when in ErrorHandlingMode. This is needed in the case - of native stack overflows. - - Fixed the parser so that it throws a StackOverflowError instead of - a SyntaxError when it encounters a stack overflow. - - * API/JSContextRef.cpp: - (JSContextGroupCreate): - (JSGlobalContextCreateInGroup): - * JavaScriptCore.order: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - * interpreter/Interpreter.cpp: - (JSC::Interpreter::ErrorHandlingMode::ErrorHandlingMode): - (JSC): - (JSC::Interpreter::ErrorHandlingMode::~ErrorHandlingMode): - (JSC::Interpreter::StackPolicy::StackPolicy): - (JSC::Interpreter::Interpreter): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - * interpreter/Interpreter.h: - (JSC): - (Interpreter): - (ErrorHandlingMode): - (StackPolicy): - (JSC::Interpreter::StackPolicy::requiredCapacity): - * interpreter/JSStack.cpp: - (JSC): - (JSC::JSStack::JSStack): - (JSC::JSStack::growSlowCase): - (JSC::JSStack::enableErrorStackReserve): - (JSC::JSStack::disableErrorStackReserve): - * interpreter/JSStack.h: - (JSStack): - (JSC::JSStack::reservationEnd): - (JSC): - * jsc.cpp: - (jscmain): - * parser/Parser.cpp: - (JSC::::Parser): - * parser/Parser.h: - (Parser): - (JSC::::parse): - * runtime/ExceptionHelpers.cpp: - (JSC::throwStackOverflowError): - * runtime/JSGlobalData.cpp: - (JSC::JSGlobalData::JSGlobalData): - (JSC::JSGlobalData::createContextGroup): - (JSC::JSGlobalData::create): - (JSC::JSGlobalData::createLeaked): - (JSC::JSGlobalData::sharedInstance): - * runtime/JSGlobalData.h: - (JSC): - (JSGlobalData): - * runtime/StringRecursionChecker.h: - (JSC::StringRecursionChecker::performCheck): - * testRegExp.cpp: - (realMain): - -2012-10-20 Martin Robinson - - Fix 'make dist' for the GTK+ port - - * GNUmakefile.list.am: Add missing files to the source list. - -2012-10-21 Raphael Kubo da Costa - - [CMake][JSC] Depend on risc.rb to decide when to run the LLInt scripts. - https://bugs.webkit.org/show_bug.cgi?id=99917 - - Reviewed by Geoffrey Garen. - - Depend on the newly-added risc.rb to make sure we always run the - LLInt scripts when one of them changes. - - * CMakeLists.txt: - -2012-10-20 Filip Pizlo - - LLInt backends of non-ARM RISC platforms should be able to share code with the existing ARMv7 backend - https://bugs.webkit.org/show_bug.cgi?id=99745 - - Reviewed by Geoffrey Garen. - - This moves all of the things in armv7.rb that I thought are generally useful out - into risc.rb. It also separates some phases (branch ops is separated into one - phase that does sensible things, and another that does things that are painfully - ARM-specific), and removes ARM assumptions from others by using a callback to - drive exactly what lowering must happen. The goal here is to minimize the future - maintenance burden of LLInt by ensuring that the various platforms share as much - lowering code as possible. - - * offlineasm/armv7.rb: - * offlineasm/risc.rb: Added. - -2012-10-19 Filip Pizlo - - DFG should have some facility for recognizing redundant CheckArrays and Arrayifies - https://bugs.webkit.org/show_bug.cgi?id=99287 - - Reviewed by Mark Hahnenberg. - - Adds reasoning about indexing type sets (i.e. ArrayModes) to AbstractValue, which - then enables us to fold away CheckArray's and Arrayify's that are redundant. - - * bytecode/ArrayProfile.cpp: - (JSC::arrayModesToString): - (JSC): - * bytecode/ArrayProfile.h: - (JSC): - (JSC::mergeArrayModes): - (JSC::arrayModesAlreadyChecked): - * bytecode/StructureSet.h: - (JSC::StructureSet::arrayModesFromStructures): - (StructureSet): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGAbstractValue.h: - (JSC::DFG::AbstractValue::AbstractValue): - (JSC::DFG::AbstractValue::clear): - (JSC::DFG::AbstractValue::isClear): - (JSC::DFG::AbstractValue::makeTop): - (JSC::DFG::AbstractValue::clobberStructures): - (AbstractValue): - (JSC::DFG::AbstractValue::setMostSpecific): - (JSC::DFG::AbstractValue::set): - (JSC::DFG::AbstractValue::operator==): - (JSC::DFG::AbstractValue::merge): - (JSC::DFG::AbstractValue::filter): - (JSC::DFG::AbstractValue::filterArrayModes): - (JSC::DFG::AbstractValue::validate): - (JSC::DFG::AbstractValue::checkConsistency): - (JSC::DFG::AbstractValue::dump): - (JSC::DFG::AbstractValue::clobberArrayModes): - (JSC::DFG::AbstractValue::clobberArrayModesSlow): - (JSC::DFG::AbstractValue::setFuturePossibleStructure): - (JSC::DFG::AbstractValue::filterFuturePossibleStructure): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::modeAlreadyChecked): - * dfg/DFGArrayMode.h: - (JSC::DFG::arrayModesFor): - (DFG): - * dfg/DFGConstantFoldingPhase.cpp: - (JSC::DFG::ConstantFoldingPhase::foldConstants): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::arrayify): - -2012-10-19 Filip Pizlo - - Baseline JIT should not inline array allocations, to make them easier to instrument - https://bugs.webkit.org/show_bug.cgi?id=99905 - - Reviewed by Mark Hahnenberg. - - This will make it easier to instrument array allocations for the purposes of profiling. - It also allows us to kill off a bunch of code. And, this doesn't appear to hurt - performance at all. That's expected because these days any hot allocation will end up - in the DFG JIT, which does inline these allocations. - - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - (JIT): - * jit/JITInlineMethods.h: - (JSC): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_array): - -2012-10-19 Oliver Hunt - - Fix some of the regression cause by the non-local variable reworking - https://bugs.webkit.org/show_bug.cgi?id=99896 - - Reviewed by Filip Pizlo. - - The non0local variable reworking led to some of the optimisations performed by - the bytecode generator being dropped. This in turn put more pressure on the DFG - optimisations. This exposed a short coming in our double speculation propogation. - Now we try to distinguish between places where we should SpecDoubleReal vs generic - SpecDouble. - - * dfg/DFGPredictionPropagationPhase.cpp: - (PredictionPropagationPhase): - (JSC::DFG::PredictionPropagationPhase::speculatedDoubleTypeForPrediction): - (JSC::DFG::PredictionPropagationPhase::speculatedDoubleTypeForPredictions): - (JSC::DFG::PredictionPropagationPhase::propagate): - -2012-10-19 Michael Saboff - - Lexer should create 8 bit Identifiers for RegularExpressions and ASCII identifiers - https://bugs.webkit.org/show_bug.cgi?id=99855 - - Reviewed by Filip Pizlo. - - Added makeIdentifier helpers that will always make an 8 bit Identifier or make an - Identifier that is the same size as the template parameter. Used the first in the fast - path when looking for a JS identifier and the second when scanning regular expressions. - - * parser/Lexer.cpp: - (JSC::::scanRegExp): - * parser/Lexer.h: - (Lexer): - (JSC::::makeIdentifierSameType): - (JSC::::makeLCharIdentifier): - (JSC::::lexExpectIdentifier): - -2012-10-19 Mark Lam - - Added WTF::StackStats mechanism. - https://bugs.webkit.org/show_bug.cgi?id=99805. - - Reviewed by Geoffrey Garen. - - Added StackStats checkpoints and probes. - - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::emitNode): - (JSC::BytecodeGenerator::emitNodeInConditionContext): - * heap/SlotVisitor.cpp: - (JSC::SlotVisitor::append): - (JSC::visitChildren): - (JSC::SlotVisitor::donateKnownParallel): - (JSC::SlotVisitor::drain): - (JSC::SlotVisitor::drainFromShared): - (JSC::SlotVisitor::mergeOpaqueRoots): - (JSC::SlotVisitor::internalAppend): - (JSC::SlotVisitor::harvestWeakReferences): - (JSC::SlotVisitor::finalizeUnconditionalFinalizers): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - * parser/Parser.h: - (JSC::Parser::canRecurse): - * runtime/StringRecursionChecker.h: - (StringRecursionChecker): - -2012-10-19 Oliver Hunt - - REGRESSION(r131822): It made 500+ tests crash on 32 bit platforms - https://bugs.webkit.org/show_bug.cgi?id=99814 - - Reviewed by Filip Pizlo. - - Call the correct macro in 32bit. - - * llint/LowLevelInterpreter.asm: - -2012-10-19 Dongwoo Joshua Im - - Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT - https://bugs.webkit.org/show_bug.cgi?id=99804 - - Reviewed by Julien Chaffraix. - - CSS3 text related properties will be implemented under this flag, - including text decoration, text-align-last, and text-justify. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-18 Anders Carlsson - - Clean up RegExpKey - https://bugs.webkit.org/show_bug.cgi?id=99798 - - Reviewed by Darin Adler. - - RegExpHash doesn't need to be a class template specialization when the class template is specialized - for JSC::RegExpKey only. Make it a nested class of RegExp instead. Also, make operator== a friend function - so Hash::equal can see it. - - * runtime/RegExpKey.h: - (JSC::RegExpKey::RegExpKey): - (JSC::RegExpKey::operator==): - (RegExpKey): - (JSC::RegExpKey::Hash::hash): - (JSC::RegExpKey::Hash::equal): - (Hash): - -2012-10-19 Mark Lam - - Bot greening: Follow up to r131877 to fix the Windows build. - https://bugs.webkit.org/show_bug.cgi?id=99739. - - Not reviewed. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-10-19 Mark Lam - - Bot greening: Attempt to fix broken Window build after r131836. - https://bugs.webkit.org/show_bug.cgi?id=99739. - - Not reviewed. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-10-19 Yuqiang Xian - - Unreviewed fix after r131868. - - On JSVALUE64 platforms, JSValue constants can be Imm64 instead of ImmPtr for JIT compilers. - - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - -2012-10-18 Filip Pizlo - - Baseline array profiling should be less accurate, and DFG OSR exit should update array profiles on CheckArray and CheckStructure failure - https://bugs.webkit.org/show_bug.cgi?id=99261 - - Reviewed by Oliver Hunt. - - This makes array profiling stochastic, like value profiling. The point is to avoid - noticing one-off indexing types that we'll never see again, but instead to: - - Notice the big ones: We want the DFG to compile based on the things that happen with - high probability. So, this change makes array profiling do like value profiling and - only notice a random subsampling of indexing types that flowed through an array - access. Prior to this patch array profiles noticed all indexing types and weighted - them identically. - - Bias the recent: Often an array access will see awkward indexing types during the - first handful of executions because of artifacts of program startup. So, we want to - bias towards the indexing types that we saw most recently. With this change, array - profiling does like value profiling and usually tells use a random sampling that - is biased to what happened recently. - - Have a backup plan: The above two things don't work by themselves because our - randomness is not that random (nor do we care enough to make it more random), and - because some procedures will have a <1/10 probability event that we must handle - without bailing because it dominates a hot loop. So, like value profiling, this - patch makes array profiling use OSR exits to tell us why we are bailing out, so - that we don't make the same mistake again in the future. - - This change also makes the way that the 32-bit OSR exit compiler snatches scratch - registers more uniform. We don't need a scratch buffer when we can push and pop. - - * bytecode/DFGExitProfile.h: - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::checkArray): - (JSC::DFG::SpeculativeJIT::arrayify): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * jit/JITInlineMethods.h: - (JSC::JIT::emitArrayProfilingSite): - * llint/LowLevelInterpreter.asm: - -2012-10-18 Yuqiang Xian - - [Qt] REGRESSION(r131858): It broke the ARM build - https://bugs.webkit.org/show_bug.cgi?id=99809 - - Reviewed by Csaba Osztrogonác. - - * dfg/DFGCCallHelpers.h: - (CCallHelpers): - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - -2012-10-18 Yuqiang Xian - - Refactor MacroAssembler interfaces to differentiate the pointer operands from the 64-bit integer operands - https://bugs.webkit.org/show_bug.cgi?id=99154 - - Reviewed by Gavin Barraclough. - - In current JavaScriptCore implementation for JSVALUE64 platform (i.e., - the X64 platform), we assume that the JSValue size is same to the - pointer size, and thus EncodedJSValue is simply type defined as a - "void*". In the JIT compiler, we also take this assumption and invoke - the same macro assembler interfaces for both JSValue and pointer - operands. We need to differentiate the operations on pointers from the - operations on JSValues, and let them invoking different macro - assembler interfaces. For example, we now use the interface of - "loadPtr" to load either a pointer or a JSValue, and we need to switch - to using "loadPtr" to load a pointer and some new "load64" interface - to load a JSValue. This would help us supporting other JSVALUE64 - platforms where pointer size is not necessarily 64-bits, for example - x32 (bug #99153). - - The major modification I made is to introduce the "*64" interfaces in - the MacroAssembler for those operations on JSValues, keep the "*Ptr" - interfaces for those operations on real pointers, and go through all - the JIT compiler code to correct the usage. - - This is the second part of the work, i.e, to correct the usage of the - new MacroAssembler interfaces in the JIT compilers, which also means - that now EncodedJSValue is defined as a 64-bit integer, and the "*64" - interfaces are used for it. - - * assembler/MacroAssembler.h: JSValue immediates should be in Imm64 instead of ImmPtr. - (MacroAssembler): - (JSC::MacroAssembler::shouldBlind): - * dfg/DFGAssemblyHelpers.cpp: Correct the JIT compilers usage of the new interfaces. - (JSC::DFG::AssemblyHelpers::jitAssertIsInt32): - (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32): - (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber): - (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble): - (JSC::DFG::AssemblyHelpers::jitAssertIsCell): - * dfg/DFGAssemblyHelpers.h: - (JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader): - (JSC::DFG::AssemblyHelpers::branchIfNotCell): - (JSC::DFG::AssemblyHelpers::debugCall): - (JSC::DFG::AssemblyHelpers::boxDouble): - (JSC::DFG::AssemblyHelpers::unboxDouble): - (JSC::DFG::AssemblyHelpers::emitExceptionCheck): - * dfg/DFGCCallHelpers.h: - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - (CCallHelpers): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGRepatch.cpp: - (JSC::DFG::generateProtoChainAccessStub): - (JSC::DFG::tryCacheGetByID): - (JSC::DFG::tryBuildGetByIDList): - (JSC::DFG::emitPutReplaceStub): - (JSC::DFG::emitPutTransitionStub): - * dfg/DFGScratchRegisterAllocator.h: - (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer): - (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer): - * dfg/DFGSilentRegisterSavePlan.h: - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::checkArgumentTypes): - (JSC::DFG::SpeculativeJIT::compileValueToInt32): - (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): - (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject): - (JSC::DFG::SpeculativeJIT::compileInstanceOf): - (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant): - (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR): - (JSC::DFG::SpeculativeJIT::silentSpill): - (JSC::DFG::SpeculativeJIT::silentFill): - (JSC::DFG::SpeculativeJIT::spill): - (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImm64): - (JSC::DFG::SpeculativeJIT::callOperation): - (JSC::DFG::SpeculativeJIT::branch64): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::fillInteger): - (JSC::DFG::SpeculativeJIT::fillDouble): - (JSC::DFG::SpeculativeJIT::fillJSValue): - (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber): - (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32): - (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber): - (JSC::DFG::SpeculativeJIT::cachedGetById): - (JSC::DFG::SpeculativeJIT::cachedPutById): - (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): - (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): - (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch): - (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare): - (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq): - (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq): - (JSC::DFG::SpeculativeJIT::emitCall): - (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): - (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): - (JSC::DFG::SpeculativeJIT::fillSpeculateCell): - (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): - (JSC::DFG::SpeculativeJIT::convertToDouble): - (JSC::DFG::SpeculativeJIT::compileObjectEquality): - (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): - (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): - (JSC::DFG::SpeculativeJIT::compileDoubleCompare): - (JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot): - (JSC::DFG::SpeculativeJIT::compileLogicalNot): - (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch): - (JSC::DFG::SpeculativeJIT::emitBranch): - (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal): - (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal): - (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): - (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal): - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGThunks.cpp: - (JSC::DFG::osrExitGenerationThunkGenerator): - (JSC::DFG::throwExceptionFromCallSlowPathGenerator): - (JSC::DFG::slowPathFor): - (JSC::DFG::virtualForThunkGenerator): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::dumpRegisters): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JIT): - * jit/JITArithmetic.cpp: - (JSC::JIT::emit_op_negate): - (JSC::JIT::emitSlow_op_negate): - (JSC::JIT::emit_op_rshift): - (JSC::JIT::emitSlow_op_urshift): - (JSC::JIT::emit_compareAndJumpSlow): - (JSC::JIT::emit_op_bitand): - (JSC::JIT::compileBinaryArithOpSlowCase): - (JSC::JIT::emit_op_div): - * jit/JITCall.cpp: - (JSC::JIT::compileLoadVarargs): - (JSC::JIT::compileCallEval): - (JSC::JIT::compileCallEvalSlowCase): - (JSC::JIT::compileOpCall): - * jit/JITInlineMethods.h: Have some clean-up work as well. - (JSC): - (JSC::JIT::emitPutCellToCallFrameHeader): - (JSC::JIT::emitPutIntToCallFrameHeader): - (JSC::JIT::emitPutToCallFrameHeader): - (JSC::JIT::emitGetFromCallFrameHeader32): - (JSC::JIT::emitGetFromCallFrameHeader64): - (JSC::JIT::emitAllocateJSArray): - (JSC::JIT::emitValueProfilingSite): - (JSC::JIT::emitGetJITStubArg): - (JSC::JIT::emitGetVirtualRegister): - (JSC::JIT::emitPutVirtualRegister): - (JSC::JIT::emitInitRegister): - (JSC::JIT::emitJumpIfJSCell): - (JSC::JIT::emitJumpIfBothJSCells): - (JSC::JIT::emitJumpIfNotJSCell): - (JSC::JIT::emitLoadInt32ToDouble): - (JSC::JIT::emitJumpIfImmediateInteger): - (JSC::JIT::emitJumpIfNotImmediateInteger): - (JSC::JIT::emitJumpIfNotImmediateIntegers): - (JSC::JIT::emitFastArithReTagImmediate): - (JSC::JIT::emitFastArithIntToImmNoCheck): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTINativeCall): - (JSC::JIT::emit_op_mov): - (JSC::JIT::emit_op_instanceof): - (JSC::JIT::emit_op_is_undefined): - (JSC::JIT::emit_op_is_boolean): - (JSC::JIT::emit_op_is_number): - (JSC::JIT::emit_op_tear_off_activation): - (JSC::JIT::emit_op_not): - (JSC::JIT::emit_op_jfalse): - (JSC::JIT::emit_op_jeq_null): - (JSC::JIT::emit_op_jneq_null): - (JSC::JIT::emit_op_jtrue): - (JSC::JIT::emit_op_bitxor): - (JSC::JIT::emit_op_bitor): - (JSC::JIT::emit_op_get_pnames): - (JSC::JIT::emit_op_next_pname): - (JSC::JIT::compileOpStrictEq): - (JSC::JIT::emit_op_catch): - (JSC::JIT::emit_op_throw_static_error): - (JSC::JIT::emit_op_eq_null): - (JSC::JIT::emit_op_neq_null): - (JSC::JIT::emit_op_create_activation): - (JSC::JIT::emit_op_create_arguments): - (JSC::JIT::emit_op_init_lazy_reg): - (JSC::JIT::emitSlow_op_convert_this): - (JSC::JIT::emitSlow_op_not): - (JSC::JIT::emit_op_get_argument_by_val): - (JSC::JIT::emit_op_put_to_base): - (JSC::JIT::emit_resolve_operations): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitContiguousGetByVal): - (JSC::JIT::emitArrayStorageGetByVal): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::compileGetDirectOffset): - (JSC::JIT::emit_op_get_by_pname): - (JSC::JIT::emitContiguousPutByVal): - (JSC::JIT::emitArrayStoragePutByVal): - (JSC::JIT::compileGetByIdHotPath): - (JSC::JIT::emit_op_put_by_id): - (JSC::JIT::compilePutDirectOffset): - (JSC::JIT::emit_op_init_global_const): - (JSC::JIT::emit_op_init_global_const_check): - (JSC::JIT::emitIntTypedArrayGetByVal): - (JSC::JIT::emitFloatTypedArrayGetByVal): - (JSC::JIT::emitFloatTypedArrayPutByVal): - * jit/JITStubCall.h: - (JITStubCall): - (JSC::JITStubCall::JITStubCall): - (JSC::JITStubCall::addArgument): - (JSC::JITStubCall::call): - (JSC::JITStubCall::callWithValueProfiling): - * jit/JSInterfaceJIT.h: - (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber): - (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber): - (JSC::JSInterfaceJIT::emitLoadJSCell): - (JSC::JSInterfaceJIT::emitLoadInt32): - (JSC::JSInterfaceJIT::emitLoadDouble): - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::returnDouble): - (JSC::SpecializedThunkJIT::tagReturnAsInt32): - * runtime/JSValue.cpp: - (JSC::JSValue::description): - * runtime/JSValue.h: Define JSVALUE64 EncodedJSValue as int64_t, which is also unified with JSVALUE32_64. - (JSC): - * runtime/JSValueInlineMethods.h: New implementation of some JSValue methods to make them more conformant - with the new rule that "JSValue is a 64-bit integer rather than a pointer" for JSVALUE64 platforms. - (JSC): - (JSC::JSValue::JSValue): - (JSC::JSValue::operator bool): - (JSC::JSValue::operator==): - (JSC::JSValue::operator!=): - (JSC::reinterpretDoubleToInt64): - (JSC::reinterpretInt64ToDouble): - (JSC::JSValue::asDouble): - -2012-10-18 Michael Saboff - - convertUTF8ToUTF16() Should Check for ASCII Input - ihttps://bugs.webkit.org/show_bug.cgi?id=99739 - - Reviewed by Geoffrey Garen. - - Using the updated convertUTF8ToUTF16() , we can determine if is makes more sense to - create a string using the 8 bit source. Added a new OpaqueJSString::create(LChar*, unsigned). - Had to add a cast n JSStringCreateWithCFString to differentiate which create() to call. - - * API/JSStringRef.cpp: - (JSStringCreateWithUTF8CString): - * API/JSStringRefCF.cpp: - (JSStringCreateWithCFString): - * API/OpaqueJSString.h: - (OpaqueJSString::create): - (OpaqueJSString): - (OpaqueJSString::OpaqueJSString): - -2012-10-18 Oliver Hunt - - Unbreak jsc tests. Last minute "clever"-ness is clearly just not - a good plan. - - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - -2012-10-18 Oliver Hunt - - Bytecode should not have responsibility for determining how to perform non-local resolves - https://bugs.webkit.org/show_bug.cgi?id=99349 - - Reviewed by Gavin Barraclough. - - This patch removes lexical analysis from the bytecode generation. This allows - us to delay lookup of a non-local variables until the lookup is actually necessary, - and simplifies a lot of the resolve logic in BytecodeGenerator. - - Once a lookup is performed we cache the lookup information in a set of out-of-line - buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing, - etc, and allows the respective JITs to recreated optimal lookup code. - - This is currently still a performance regression in LLInt, but most of the remaining - regression is caused by a lot of indirection that I'll remove in future work, as well - as some work necessary to allow LLInt to perform in line instruction repatching. - We will also want to improve the behaviour of the baseline JIT for some of the lookup - operations, however this patch was getting quite large already so I'm landing it now - that we've reached the bar of "performance-neutral". - - Basic browsing seems to work. - - * GNUmakefile.list.am: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::visitStructures): - (JSC): - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addResolve): - (JSC::CodeBlock::addPutToBase): - (CodeBlock): - (JSC::CodeBlock::resolveOperations): - (JSC::CodeBlock::putToBaseOperation): - (JSC::CodeBlock::numberOfResolveOperations): - (JSC::CodeBlock::numberOfPutToBaseOperations): - (JSC::CodeBlock::addPropertyAccessInstruction): - (JSC::CodeBlock::globalObjectConstant): - (JSC::CodeBlock::setGlobalObjectConstant): - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecode/ResolveGlobalStatus.cpp: - (JSC::computeForStructure): - (JSC::ResolveGlobalStatus::computeFor): - * bytecode/ResolveGlobalStatus.h: - (JSC): - (ResolveGlobalStatus): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::ResolveResult::checkValidity): - (JSC): - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::resolve): - (JSC::BytecodeGenerator::resolveConstDecl): - (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveBaseForPut): - (JSC::BytecodeGenerator::emitResolveWithBaseForPut): - (JSC::BytecodeGenerator::emitResolveWithThis): - (JSC::BytecodeGenerator::emitGetLocalVar): - (JSC::BytecodeGenerator::emitInitGlobalConst): - (JSC::BytecodeGenerator::emitPutToBase): - * bytecompiler/BytecodeGenerator.h: - (JSC::ResolveResult::registerResolve): - (JSC::ResolveResult::dynamicResolve): - (ResolveResult): - (JSC::ResolveResult::ResolveResult): - (JSC): - (NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::~NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::resolved): - (JSC::NonlocalResolveInfo::put): - (BytecodeGenerator): - (JSC::BytecodeGenerator::getResolveOperations): - (JSC::BytecodeGenerator::getResolveWithThisOperations): - (JSC::BytecodeGenerator::getResolveBaseOperations): - (JSC::BytecodeGenerator::getResolveBaseForPutOperations): - (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations): - (JSC::BytecodeGenerator::getPutToBaseOperation): - * bytecompiler/NodesCodegen.cpp: - (JSC::ResolveNode::isPure): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::PostfixNode::emitResolve): - (JSC::PrefixNode::emitResolve): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::ConstDeclNode::emitCodeSingle): - (JSC::ForInNode::emitBytecode): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGByteCodeParser.cpp: - (ByteCodeParser): - (InlineStackEntry): - (JSC::DFG::ByteCodeParser::handleGetByOffset): - (DFG): - (JSC::DFG::ByteCodeParser::parseResolveOperations): - (JSC::DFG::ByteCodeParser::parseBlock): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - * dfg/DFGCapabilities.h: - (JSC::DFG::canInlineResolveOperations): - (DFG): - (JSC::DFG::canCompileOpcode): - (JSC::DFG::canInlineOpcode): - * dfg/DFGGraph.h: - (ResolveGlobalData): - (ResolveOperationData): - (DFG): - (PutToBaseOperationData): - (Graph): - * dfg/DFGNode.h: - (JSC::DFG::Node::hasIdentifier): - (JSC::DFG::Node::resolveOperationsDataIndex): - (Node): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGOSRExit.cpp: - (JSC::DFG::OSRExit::OSRExit): - * dfg/DFGOSRExit.h: - (OSRExit): - * dfg/DFGOSRExitCompiler.cpp: - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryCacheGetByID): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::resolveOperations): - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::putToBaseOperation): - (JSC::DFG::SpeculativeJIT::callOperation): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGStructureCheckHoistingPhase.cpp: - (JSC::DFG::StructureCheckHoistingPhase::run): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - (JIT): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_put_to_base): - (JSC): - (JSC::JIT::emit_resolve_operations): - (JSC::JIT::emitSlow_link_resolve_operations): - (JSC::JIT::emit_op_resolve): - (JSC::JIT::emitSlow_op_resolve): - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emitSlow_op_resolve_base): - (JSC::JIT::emit_op_resolve_with_base): - (JSC::JIT::emitSlow_op_resolve_with_base): - (JSC::JIT::emit_op_resolve_with_this): - (JSC::JIT::emitSlow_op_resolve_with_this): - (JSC::JIT::emitSlow_op_put_to_base): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_put_to_base): - (JSC): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_init_global_const): - (JSC::JIT::emit_op_init_global_const_check): - (JSC::JIT::emitSlow_op_init_global_const_check): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_init_global_const): - (JSC::JIT::emit_op_init_global_const_check): - (JSC::JIT::emitSlow_op_init_global_const_check): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC): - * jit/JITStubs.h: - * llint/LLIntSlowPaths.cpp: - (LLInt): - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * llint/LLIntSlowPaths.h: - (LLInt): - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * runtime/JSScope.cpp: - (JSC::LookupResult::base): - (JSC::LookupResult::value): - (JSC::LookupResult::setBase): - (JSC::LookupResult::setValue): - (LookupResult): - (JSC): - (JSC::setPutPropertyAccessOffset): - (JSC::executeResolveOperations): - (JSC::JSScope::resolveContainingScopeInternal): - (JSC::JSScope::resolveContainingScope): - (JSC::JSScope::resolve): - (JSC::JSScope::resolveBase): - (JSC::JSScope::resolveWithBase): - (JSC::JSScope::resolveWithThis): - (JSC::JSScope::resolvePut): - (JSC::JSScope::resolveGlobal): - * runtime/JSScope.h: - (JSScope): - * runtime/JSVariableObject.cpp: - (JSC): - * runtime/JSVariableObject.h: - (JSVariableObject): - * runtime/Structure.h: - (JSC::Structure::propertyAccessesAreCacheable): - (Structure): - -2012-10-18 Mark Hahnenberg - - Live oversize copied blocks should count toward overall heap fragmentation - https://bugs.webkit.org/show_bug.cgi?id=99548 - - Reviewed by Filip Pizlo. - - The CopiedSpace uses overall heap fragmentation to determine whether or not it should do any copying. - Currently it doesn't include live oversize CopiedBlocks in the calculation, but it should. We should - treat them as 100% utilized, since running a copying phase won't be able to free/compact any of their - memory. We can also free any dead oversize CopiedBlocks while we're iterating over them, rather than - iterating over them again at the end of the copying phase. - - * heap/CopiedSpace.cpp: - (JSC::CopiedSpace::doneFillingBlock): - (JSC::CopiedSpace::startedCopying): - (JSC::CopiedSpace::doneCopying): Also removed a branch when iterating over from-space at the end of - copying. Since we eagerly recycle blocks as soon as they're fully evacuated, we should see no - unpinned blocks in from-space at the end of copying. - * heap/CopiedSpaceInlineMethods.h: - (JSC::CopiedSpace::recycleBorrowedBlock): - * heap/CopyVisitorInlineMethods.h: - (JSC::CopyVisitor::checkIfShouldCopy): - -2012-10-18 Roger Fong - - Unreviewed. Build fix after r131701 and r131777. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-10-18 Mark Hahnenberg - - Race condition between GCThread and main thread during copying phase - https://bugs.webkit.org/show_bug.cgi?id=99641 - - Reviewed by Filip Pizlo. - - When a GCThread returns from copyFromShared(), it then calls doneCopying(), which returns - its borrowed CopiedBlock to the CopiedSpace. This final block allows the CopiedSpace to - continue and finish the cleanup of the copying phase. However, the GCThread can loop back - around, see that m_currentPhase is still "Copy", and try to go through the copying phase again. - This can cause all sorts of issues. To fix this, we should add a cyclic barrier to GCThread::waitForNextPhase(). - - * heap/GCThread.cpp: - (JSC::GCThread::waitForNextPhase): All GCThreads will wait when they finish one iteration until the main thread - notifies them to move down to the second while loop, where they wait for the next GCPhase to start. They also - decrement the m_numberOfActiveGCThreads counter as they begin to wait for the next phase and increment it as - they enter the next phase. This allows the main thread to wait in endCurrentPhase() until all the threads have - finished the current phase and are waiting on the next phase to begin. Without the counter, there would be - no way to ensure that every thread was available for each GCPhase. - (JSC::GCThread::gcThreadMain): We now use the m_phaseLock to synchronize with the main thread when we're being created. - * heap/GCThreadSharedData.cpp: - (JSC::GCThreadSharedData::GCThreadSharedData): As we create each GCThread, we increment the m_numberOfActiveGCThreads - counter. When we are done creating the threads, we wait until they're all waiting for the next GCPhase. This prevents - us from leaving some GCThreads behind during the first GCPhase, which could hurt us on our very short-running - benchmarks (e.g. SunSpider). - (JSC::GCThreadSharedData::~GCThreadSharedData): - (JSC::GCThreadSharedData::startNextPhase): We atomically swap the two flags, m_gcThreadsShouldWait and m_currentPhase, - so that if the threads finish very quickly, they will wait until the main thread is ready to end the current phase. - (JSC::GCThreadSharedData::endCurrentPhase): Here atomically we swap the two flags again to allow the threads to - advance to waiting on the next GCPhase. We wait until all of the GCThreads have settled into the second wait loop - before allowing the main thread to continue. This prevents us from leaving one of the GCThreads stuck in the first - wait loop if we were to call startNextPhase() before it had time to wake up and move on to the second wait loop. - (JSC): - (JSC::GCThreadSharedData::didStartMarking): We now use startNextPhase() to properly swap the flags. - (JSC::GCThreadSharedData::didFinishMarking): Ditto for endCurrentPhase(). - (JSC::GCThreadSharedData::didStartCopying): Ditto. - (JSC::GCThreadSharedData::didFinishCopying): Ditto. - * heap/GCThreadSharedData.h: - (GCThreadSharedData): - * heap/Heap.cpp: - (JSC::Heap::copyBackingStores): No reason to use the extra reference. - -2012-10-18 Pablo Flouret - - Implement css3-conditional's @supports rule - https://bugs.webkit.org/show_bug.cgi?id=86146 - - Reviewed by Antti Koivisto. - - * Configurations/FeatureDefines.xcconfig: - Add an ENABLE_CSS3_CONDITIONAL_RULES flag. - -2012-10-18 Michael Saboff - - Make conversion between JSStringRef and WKStringRef work without character size conversions - https://bugs.webkit.org/show_bug.cgi?id=99727 - - Reviewed by Anders Carlsson. - - Export the string() method for use in WebKit. - - * API/OpaqueJSString.h: - (OpaqueJSString::string): - -2012-10-18 Raphael Kubo da Costa - - [CMake] Avoid unnecessarily running the LLInt generation commands. - https://bugs.webkit.org/show_bug.cgi?id=99708 - - Reviewed by Rob Buis. - - As described in the comments in the change itself, in some cases - the Ruby generation scripts used when LLInt is on would each be - run twice in every build even if nothing had changed. - - Fix that by not setting the OBJECT_DEPENDS property of some source - files to depend on the generated headers; instead, they are now - just part of the final binaries/libraries which use them. - - * CMakeLists.txt: - -2012-10-17 Zoltan Horvath - - Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas - https://bugs.webkit.org/show_bug.cgi?id=99609 - - Reviewed by Ryosuke Niwa. - - Remove the implementation since it creates bogus JSGlobalDatas in the layout tests. - - * heap/HeapStatistics.cpp: - (JSC): - * heap/HeapStatistics.h: - (HeapStatistics): - -2012-10-17 Sam Weinig - - Attempt to fix the build. - - * bytecode/GlobalResolveInfo.h: Copied from bytecode/GlobalResolveInfo.h. - -2012-10-17 Filip Pizlo - - REGRESSION (r130826 or r130828): Twitter top bar is dysfunctional - https://bugs.webkit.org/show_bug.cgi?id=99577 - - - Reviewed by Mark Hahnenberg. - - It turns out that it's a good idea to maintain the invariants of your object model, such as that - elements past publicLength should have the hole value. - - * dfg/DFGGraph.cpp: - (JSC::DFG::Graph::dump): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-17 Anders Carlsson - - Clean up Vector.h - https://bugs.webkit.org/show_bug.cgi?id=99622 - - Reviewed by Benjamin Poulain. - - Fix fallout from removing std::max and std::min using declarations. - - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstrings): - (JSC::jsSpliceSubstringsWithSeparators): - (JSC::stringProtoFuncIndexOf): - * yarr/YarrPattern.cpp: - (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets): - -2012-10-17 Oliver Hunt - - Committing new files is so overrated. - - * bytecode/ResolveOperation.h: Added. - (JSC): - (JSC::ResolveOperation::getAndReturnScopedVar): - (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope): - (ResolveOperation): - (JSC::ResolveOperation::getAndReturnGlobalVar): - (JSC::ResolveOperation::getAndReturnGlobalProperty): - (JSC::ResolveOperation::resolveFail): - (JSC::ResolveOperation::skipTopScopeNode): - (JSC::ResolveOperation::skipScopes): - (JSC::ResolveOperation::returnGlobalObjectAsBase): - (JSC::ResolveOperation::setBaseToGlobal): - (JSC::ResolveOperation::setBaseToUndefined): - (JSC::ResolveOperation::setBaseToScope): - (JSC::ResolveOperation::returnScopeAsBase): - (JSC::PutToBaseOperation::PutToBaseOperation): - -2012-10-17 Michael Saboff - - StringPrototype::jsSpliceSubstringsWithSeparators() doesn't optimally handle 8 bit strings - https://bugs.webkit.org/show_bug.cgi?id=99230 - - Reviewed by Geoffrey Garen. - - Added code to select characters8() or characters16() on the not all 8 bit path for both the - processing of the source and the separators. - - * runtime/StringPrototype.cpp: - (JSC::jsSpliceSubstringsWithSeparators): - -2012-10-17 Filip Pizlo - - Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling - https://bugs.webkit.org/show_bug.cgi?id=99557 - - Reviewed by Geoffrey Garen. - - Removed an inaccurate and misleading comment as per Geoff's review. (I forgot - to make this change as part of http://trac.webkit.org/changeset/131644). - - * bytecompiler/NodesCodegen.cpp: - (JSC::FunctionCallResolveNode::emitBytecode): - -2012-10-17 Oliver Hunt - - Bytecode should not have responsibility for determining how to perform non-local resolves - https://bugs.webkit.org/show_bug.cgi?id=99349 - - Reviewed by Gavin Barraclough. - - This patch removes lexical analysis from the bytecode generation. This allows - us to delay lookup of a non-local variables until the lookup is actually necessary, - and simplifies a lot of the resolve logic in BytecodeGenerator. - - Once a lookup is performed we cache the lookup information in a set of out-of-line - buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing, - etc, and allows the respective JITs to recreated optimal lookup code. - - This is currently still a performance regression in LLInt, but most of the remaining - regression is caused by a lot of indirection that I'll remove in future work, as well - as some work necessary to allow LLInt to perform in line instruction repatching. - We will also want to improve the behaviour of the baseline JIT for some of the lookup - operations, however this patch was getting quite large already so I'm landing it now - that we've reached the bar of "performance-neutral". - - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::visitStructures): - (JSC): - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addResolve): - (JSC::CodeBlock::addPutToBase): - (CodeBlock): - (JSC::CodeBlock::resolveOperations): - (JSC::CodeBlock::putToBaseOperation): - (JSC::CodeBlock::numberOfResolveOperations): - (JSC::CodeBlock::numberOfPutToBaseOperations): - (JSC::CodeBlock::addPropertyAccessInstruction): - (JSC::CodeBlock::globalObjectConstant): - (JSC::CodeBlock::setGlobalObjectConstant): - * bytecode/GlobalResolveInfo.h: Removed. - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecode/ResolveGlobalStatus.cpp: - (JSC::computeForStructure): - (JSC::ResolveGlobalStatus::computeFor): - * bytecode/ResolveGlobalStatus.h: - (JSC): - (ResolveGlobalStatus): - * bytecode/ResolveOperation.h: Added. - The new types and logic we use to perform the cached lookups. - (JSC): - (ResolveOperation): - (JSC::ResolveOperation::getAndReturnScopedVar): - (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope): - (JSC::ResolveOperation::getAndReturnGlobalVar): - (JSC::ResolveOperation::getAndReturnGlobalProperty): - (JSC::ResolveOperation::resolveFail): - (JSC::ResolveOperation::skipTopScopeNode): - (JSC::ResolveOperation::skipScopes): - (JSC::ResolveOperation::returnGlobalObjectAsBase): - (JSC::ResolveOperation::setBaseToGlobal): - (JSC::ResolveOperation::setBaseToUndefined): - (JSC::ResolveOperation::setBaseToScope): - (JSC::ResolveOperation::returnScopeAsBase): - (JSC::PutToBaseOperation::PutToBaseOperation): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::ResolveResult::checkValidity): - (JSC): - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::resolve): - (JSC::BytecodeGenerator::resolveConstDecl): - (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveBaseForPut): - (JSC::BytecodeGenerator::emitResolveWithBaseForPut): - (JSC::BytecodeGenerator::emitResolveWithThis): - (JSC::BytecodeGenerator::emitGetLocalVar): - (JSC::BytecodeGenerator::emitInitGlobalConst): - (JSC::BytecodeGenerator::emitPutToBase): - * bytecompiler/BytecodeGenerator.h: - (JSC::ResolveResult::registerResolve): - (JSC::ResolveResult::dynamicResolve): - (ResolveResult): - (JSC::ResolveResult::ResolveResult): - (JSC): - (NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::~NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::resolved): - (JSC::NonlocalResolveInfo::put): - (BytecodeGenerator): - (JSC::BytecodeGenerator::getResolveOperations): - (JSC::BytecodeGenerator::getResolveWithThisOperations): - (JSC::BytecodeGenerator::getResolveBaseOperations): - (JSC::BytecodeGenerator::getResolveBaseForPutOperations): - (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations): - (JSC::BytecodeGenerator::getPutToBaseOperation): - * bytecompiler/NodesCodegen.cpp: - (JSC::ResolveNode::isPure): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::PostfixNode::emitResolve): - (JSC::PrefixNode::emitResolve): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::ConstDeclNode::emitCodeSingle): - (JSC::ForInNode::emitBytecode): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGByteCodeParser.cpp: - (ByteCodeParser): - (InlineStackEntry): - (JSC::DFG::ByteCodeParser::handleGetByOffset): - (DFG): - (JSC::DFG::ByteCodeParser::parseResolveOperations): - (JSC::DFG::ByteCodeParser::parseBlock): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileResolveOperations): - (DFG): - (JSC::DFG::canCompilePutToBaseOperation): - (JSC::DFG::canCompileOpcode): - (JSC::DFG::canInlineOpcode): - * dfg/DFGGraph.h: - (ResolveGlobalData): - (ResolveOperationData): - (DFG): - (PutToBaseOperationData): - (Graph): - * dfg/DFGNode.h: - (JSC::DFG::Node::hasIdentifier): - (JSC::DFG::Node::resolveOperationsDataIndex): - (Node): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGOSRExit.cpp: - (JSC::DFG::OSRExit::OSRExit): - * dfg/DFGOSRExit.h: - (OSRExit): - * dfg/DFGOSRExitCompiler.cpp: - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryCacheGetByID): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::resolveOperations): - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::putToBaseOperation): - (JSC::DFG::SpeculativeJIT::callOperation): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGStructureCheckHoistingPhase.cpp: - (JSC::DFG::StructureCheckHoistingPhase::run): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - (JIT): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_put_to_base): - (JSC): - (JSC::JIT::emit_resolve_operations): - (JSC::JIT::emitSlow_link_resolve_operations): - (JSC::JIT::emit_op_resolve): - (JSC::JIT::emitSlow_op_resolve): - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emitSlow_op_resolve_base): - (JSC::JIT::emit_op_resolve_with_base): - (JSC::JIT::emitSlow_op_resolve_with_base): - (JSC::JIT::emit_op_resolve_with_this): - (JSC::JIT::emitSlow_op_resolve_with_this): - (JSC::JIT::emitSlow_op_put_to_base): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_put_to_base): - (JSC): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_init_global_const): - (JSC::JIT::emit_op_init_global_const_check): - (JSC::JIT::emitSlow_op_init_global_const_check): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_init_global_const): - (JSC::JIT::emit_op_init_global_const_check): - (JSC::JIT::emitSlow_op_init_global_const_check): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC): - * jit/JITStubs.h: - * llint/LLIntSlowPaths.cpp: - (LLInt): - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * llint/LLIntSlowPaths.h: - (LLInt): - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * runtime/JSScope.cpp: - (JSC::LookupResult::base): - (JSC::LookupResult::value): - (JSC::LookupResult::setBase): - (JSC::LookupResult::setValue): - (LookupResult): - (JSC): - (JSC::setPutPropertyAccessOffset): - (JSC::executeResolveOperations): - (JSC::JSScope::resolveContainingScopeInternal): - (JSC::JSScope::resolveContainingScope): - (JSC::JSScope::resolve): - (JSC::JSScope::resolveBase): - (JSC::JSScope::resolveWithBase): - (JSC::JSScope::resolveWithThis): - (JSC::JSScope::resolvePut): - (JSC::JSScope::resolveGlobal): - * runtime/JSScope.h: - (JSScope): - * runtime/JSVariableObject.cpp: - (JSC): - * runtime/JSVariableObject.h: - (JSVariableObject): - * runtime/Structure.h: - (JSC::Structure::propertyAccessesAreCacheable): - (Structure): - -2012-10-17 Filip Pizlo - - Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling - https://bugs.webkit.org/show_bug.cgi?id=99557 - - Reviewed by Geoffrey Garen. - - This uses the old jneq_ptr trick to allow for the bytecode to "see" that the - operation in question is what we almost certainly know it to be. - - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecode/SpecialPointer.h: - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitCallEval): - (JSC::BytecodeGenerator::expectedFunctionForIdentifier): - (JSC): - (JSC::BytecodeGenerator::emitExpectedFunctionSnippet): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (BytecodeGenerator): - * bytecompiler/NodesCodegen.cpp: - (JSC::NewExprNode::emitBytecode): - (JSC::FunctionCallValueNode::emitBytecode): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::FunctionCallBracketNode::emitBytecode): - (JSC::FunctionCallDotNode::emitBytecode): - (JSC::CallFunctionCallDotNode::emitBytecode): - (JSC::ApplyFunctionCallDotNode::emitBytecode): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::parseBlock): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileOpcode): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - * jit/JIT.h: - (JIT): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_new_array_with_size): - (JSC): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC): - * jit/JITStubs.h: - * llint/LLIntSlowPaths.cpp: - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - (LLInt): - * llint/LLIntSlowPaths.h: - (LLInt): - * llint/LowLevelInterpreter.asm: - * runtime/ArrayConstructor.cpp: - (JSC::constructArrayWithSizeQuirk): - (JSC): - * runtime/ArrayConstructor.h: - (JSC): - * runtime/CommonIdentifiers.h: - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC): - -2012-10-17 Filip Pizlo - - JIT op_get_by_pname should call cti_get_by_val_generic and not cti_get_by_val - https://bugs.webkit.org/show_bug.cgi?id=99631 - - - Reviewed by Mark Hahnenberg. - - cti_get_by_val assumes that the return address has patching metadata associated with it, which won't - be true for op_get_by_pname. cti_get_by_val_generic makes no such assumptions. - - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emitSlow_op_get_by_pname): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emitSlow_op_get_by_pname): - -2012-10-17 Mark Hahnenberg - - Block freeing thread should sleep indefinitely when there's no work to do - https://bugs.webkit.org/show_bug.cgi?id=98084 - - Reviewed by Geoffrey Garen. - - r130212 didn't fully fix the problem. - - * heap/BlockAllocator.cpp: - (JSC::BlockAllocator::blockFreeingThreadMain): We would just continue to the next iteration if - we found that we had zero blocks to copy. We should move the indefinite wait up to where that - check is done so that we properly detect the "no more blocks to copy, wait for more" condition. - -2012-10-16 Csaba Osztrogonác - - Unreviewed, rolling out r131516 and r131550. - http://trac.webkit.org/changeset/131516 - http://trac.webkit.org/changeset/131550 - https://bugs.webkit.org/show_bug.cgi?id=99349 - - It caused zillion different problem on different platforms - - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC): - (JSC::isGlobalResolve): - (JSC::instructionOffsetForNth): - (JSC::printGlobalResolveInfo): - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::visitStructures): - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): - (JSC::CodeBlock::globalResolveInfoForBytecodeOffset): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (CodeBlock): - (JSC::CodeBlock::addGlobalResolveInstruction): - (JSC::CodeBlock::addGlobalResolveInfo): - (JSC::CodeBlock::globalResolveInfo): - (JSC::CodeBlock::numberOfGlobalResolveInfos): - (JSC::CodeBlock::globalResolveInfoCount): - * bytecode/GlobalResolveInfo.h: Copied from Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp. - (JSC): - (JSC::GlobalResolveInfo::GlobalResolveInfo): - (GlobalResolveInfo): - (JSC::getGlobalResolveInfoBytecodeOffset): - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecode/ResolveGlobalStatus.cpp: - (JSC): - (JSC::computeForStructure): - (JSC::computeForLLInt): - (JSC::ResolveGlobalStatus::computeFor): - * bytecode/ResolveGlobalStatus.h: - (JSC): - (ResolveGlobalStatus): - * bytecode/ResolveOperation.h: Removed. - * bytecompiler/BytecodeGenerator.cpp: - (JSC::ResolveResult::checkValidity): - (JSC::ResolveResult::registerPointer): - (JSC): - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::resolve): - (JSC::BytecodeGenerator::resolveConstDecl): - (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveBaseForPut): - (JSC::BytecodeGenerator::emitResolveWithBase): - (JSC::BytecodeGenerator::emitResolveWithThis): - (JSC::BytecodeGenerator::emitGetStaticVar): - (JSC::BytecodeGenerator::emitInitGlobalConst): - (JSC::BytecodeGenerator::emitPutStaticVar): - * bytecompiler/BytecodeGenerator.h: - (JSC::ResolveResult::registerResolve): - (JSC::ResolveResult::dynamicResolve): - (JSC::ResolveResult::lexicalResolve): - (JSC::ResolveResult::indexedGlobalResolve): - (JSC::ResolveResult::dynamicIndexedGlobalResolve): - (JSC::ResolveResult::globalResolve): - (JSC::ResolveResult::dynamicGlobalResolve): - (JSC::ResolveResult::type): - (JSC::ResolveResult::index): - (JSC::ResolveResult::depth): - (JSC::ResolveResult::globalObject): - (ResolveResult): - (JSC::ResolveResult::isStatic): - (JSC::ResolveResult::isIndexed): - (JSC::ResolveResult::isScoped): - (JSC::ResolveResult::isGlobal): - (JSC::ResolveResult::ResolveResult): - (BytecodeGenerator): - * bytecompiler/NodesCodegen.cpp: - (JSC::ResolveNode::isPure): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::PostfixNode::emitResolve): - (JSC::PrefixNode::emitResolve): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::ConstDeclNode::emitCodeSingle): - (JSC::ForInNode::emitBytecode): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGByteCodeParser.cpp: - (ByteCodeParser): - (InlineStackEntry): - (JSC::DFG::ByteCodeParser::handleGetByOffset): - (JSC::DFG::ByteCodeParser::parseBlock): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileOpcode): - (JSC::DFG::canInlineOpcode): - * dfg/DFGGraph.h: - (ResolveGlobalData): - (DFG): - (Graph): - * dfg/DFGNode.h: - (JSC::DFG::Node::hasIdentifier): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGOSRExit.cpp: - (JSC::DFG::OSRExit::OSRExit): - * dfg/DFGOSRExit.h: - (OSRExit): - * dfg/DFGOSRExitCompiler.cpp: - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - (JSC): - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryCacheGetByID): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGStructureCheckHoistingPhase.cpp: - (JSC::DFG::StructureCheckHoistingPhase::run): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - (JIT): - (JSC::JIT::emit_op_get_global_var_watchable): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_resolve): - (JSC): - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emit_op_resolve_skip): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_resolve_with_base): - (JSC::JIT::emit_op_resolve_with_this): - (JSC::JIT::emit_op_resolve_global_dynamic): - (JSC::JIT::emitSlow_op_resolve_global_dynamic): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_resolve): - (JSC): - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emit_op_resolve_skip): - (JSC::JIT::emit_op_resolve_global): - (JSC::JIT::emitSlow_op_resolve_global): - (JSC::JIT::emit_op_resolve_with_base): - (JSC::JIT::emit_op_resolve_with_this): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_put_global_var_check): - (JSC::JIT::emitSlow_op_put_global_var_check): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC): - (JSC::JIT::emit_op_put_scoped_var): - (JSC::JIT::emit_op_get_global_var): - (JSC::JIT::emit_op_put_global_var): - (JSC::JIT::emit_op_put_global_var_check): - (JSC::JIT::emitSlow_op_put_global_var_check): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC): - * jit/JITStubs.h: - * llint/LLIntSlowPaths.cpp: - (LLInt): - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * llint/LLIntSlowPaths.h: - (LLInt): - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * runtime/JSScope.cpp: - (JSC::JSScope::resolve): - (JSC::JSScope::resolveSkip): - (JSC::JSScope::resolveGlobal): - (JSC::JSScope::resolveGlobalDynamic): - (JSC::JSScope::resolveBase): - (JSC::JSScope::resolveWithBase): - (JSC::JSScope::resolveWithThis): - * runtime/JSScope.h: - (JSScope): - * runtime/JSVariableObject.cpp: - * runtime/JSVariableObject.h: - * runtime/Structure.h: - -2012-10-16 Dongwoo Joshua Im - - [GTK] Fix build break - ResolveOperations.h is not in WebKit. - https://bugs.webkit.org/show_bug.cgi?id=99538 - - Unreviewed build fix. - - There are some files including ResolveOperations.h which is not exist at all. - - * GNUmakefile.list.am: s/ResolveOperations.h/ResolveOperation.h/ - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: s/ResolveOperations.h/ResolveOperation.h/ - -2012-10-16 Jian Li - - Rename feature define ENABLE_WIDGET_REGION to ENABLE_DRAGGBALE_REGION - https://bugs.webkit.org/show_bug.cgi?id=98975 - - Reviewed by Adam Barth. - - Renaming is needed to better match with the draggable region code. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-15 Oliver Hunt - - Bytecode should not have responsibility for determining how to perform non-local resolves - https://bugs.webkit.org/show_bug.cgi?id=99349 - - Reviewed by Gavin Barraclough. - - This patch removes lexical analysis from the bytecode generation. This allows - us to delay lookup of a non-local variables until the lookup is actually necessary, - and simplifies a lot of the resolve logic in BytecodeGenerator. - - Once a lookup is performed we cache the lookup information in a set of out-of-line - buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing, - etc, and allows the respective JITs to recreated optimal lookup code. - - This is currently still a performance regression in LLInt, but most of the remaining - regression is caused by a lot of indirection that I'll remove in future work, as well - as some work necessary to allow LLInt to perform in line instruction repatching. - We will also want to improve the behaviour of the baseline JIT for some of the lookup - operations, however this patch was getting quite large already so I'm landing it now - that we've reached the bar of "performance-neutral". - - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::printStructures): - (JSC::CodeBlock::dump): - (JSC::CodeBlock::CodeBlock): - (JSC::CodeBlock::visitStructures): - (JSC): - (JSC::CodeBlock::finalizeUnconditionally): - (JSC::CodeBlock::shrinkToFit): - * bytecode/CodeBlock.h: - (JSC::CodeBlock::addResolve): - (JSC::CodeBlock::addPutToBase): - (CodeBlock): - (JSC::CodeBlock::resolveOperations): - (JSC::CodeBlock::putToBaseOperation): - (JSC::CodeBlock::numberOfResolveOperations): - (JSC::CodeBlock::numberOfPutToBaseOperations): - (JSC::CodeBlock::addPropertyAccessInstruction): - (JSC::CodeBlock::globalObjectConstant): - (JSC::CodeBlock::setGlobalObjectConstant): - * bytecode/GlobalResolveInfo.h: Removed. - * bytecode/Opcode.h: - (JSC): - (JSC::padOpcodeName): - * bytecode/ResolveGlobalStatus.cpp: - (JSC::computeForStructure): - (JSC::ResolveGlobalStatus::computeFor): - * bytecode/ResolveGlobalStatus.h: - (JSC): - (ResolveGlobalStatus): - * bytecode/ResolveOperation.h: Added. - The new types and logic we use to perform the cached lookups. - (JSC): - (ResolveOperation): - (JSC::ResolveOperation::getAndReturnScopedVar): - (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope): - (JSC::ResolveOperation::getAndReturnGlobalVar): - (JSC::ResolveOperation::getAndReturnGlobalProperty): - (JSC::ResolveOperation::resolveFail): - (JSC::ResolveOperation::skipTopScopeNode): - (JSC::ResolveOperation::skipScopes): - (JSC::ResolveOperation::returnGlobalObjectAsBase): - (JSC::ResolveOperation::setBaseToGlobal): - (JSC::ResolveOperation::setBaseToUndefined): - (JSC::ResolveOperation::setBaseToScope): - (JSC::ResolveOperation::returnScopeAsBase): - (JSC::PutToBaseOperation::PutToBaseOperation): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::ResolveResult::checkValidity): - (JSC): - (JSC::BytecodeGenerator::BytecodeGenerator): - (JSC::BytecodeGenerator::resolve): - (JSC::BytecodeGenerator::resolveConstDecl): - (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): - (JSC::BytecodeGenerator::emitResolve): - (JSC::BytecodeGenerator::emitResolveBase): - (JSC::BytecodeGenerator::emitResolveBaseForPut): - (JSC::BytecodeGenerator::emitResolveWithBaseForPut): - (JSC::BytecodeGenerator::emitResolveWithThis): - (JSC::BytecodeGenerator::emitGetLocalVar): - (JSC::BytecodeGenerator::emitInitGlobalConst): - (JSC::BytecodeGenerator::emitPutToBase): - * bytecompiler/BytecodeGenerator.h: - (JSC::ResolveResult::registerResolve): - (JSC::ResolveResult::dynamicResolve): - (ResolveResult): - (JSC::ResolveResult::ResolveResult): - (JSC): - (NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::~NonlocalResolveInfo): - (JSC::NonlocalResolveInfo::resolved): - (JSC::NonlocalResolveInfo::put): - (BytecodeGenerator): - (JSC::BytecodeGenerator::getResolveOperations): - (JSC::BytecodeGenerator::getResolveWithThisOperations): - (JSC::BytecodeGenerator::getResolveBaseOperations): - (JSC::BytecodeGenerator::getResolveBaseForPutOperations): - (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations): - (JSC::BytecodeGenerator::getPutToBaseOperation): - * bytecompiler/NodesCodegen.cpp: - (JSC::ResolveNode::isPure): - (JSC::FunctionCallResolveNode::emitBytecode): - (JSC::PostfixNode::emitResolve): - (JSC::PrefixNode::emitResolve): - (JSC::ReadModifyResolveNode::emitBytecode): - (JSC::AssignResolveNode::emitBytecode): - (JSC::ConstDeclNode::emitCodeSingle): - (JSC::ForInNode::emitBytecode): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGByteCodeParser.cpp: - (ByteCodeParser): - (InlineStackEntry): - (JSC::DFG::ByteCodeParser::handleGetByOffset): - (DFG): - (JSC::DFG::ByteCodeParser::parseResolveOperations): - (JSC::DFG::ByteCodeParser::parseBlock): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - * dfg/DFGCapabilities.h: - (JSC::DFG::canCompileResolveOperations): - (DFG): - (JSC::DFG::canCompilePutToBaseOperation): - (JSC::DFG::canCompileOpcode): - (JSC::DFG::canInlineOpcode): - * dfg/DFGGraph.h: - (ResolveGlobalData): - (ResolveOperationData): - (DFG): - (PutToBaseOperationData): - (Graph): - * dfg/DFGNode.h: - (JSC::DFG::Node::hasIdentifier): - (JSC::DFG::Node::resolveOperationsDataIndex): - (Node): - * dfg/DFGNodeType.h: - (DFG): - * dfg/DFGOSRExit.cpp: - (JSC::DFG::OSRExit::OSRExit): - * dfg/DFGOSRExit.h: - (OSRExit): - * dfg/DFGOSRExitCompiler.cpp: - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGPredictionPropagationPhase.cpp: - (JSC::DFG::PredictionPropagationPhase::propagate): - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryCacheGetByID): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::resolveOperations): - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::putToBaseOperation): - (JSC::DFG::SpeculativeJIT::callOperation): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGStructureCheckHoistingPhase.cpp: - (JSC::DFG::StructureCheckHoistingPhase::run): - * jit/JIT.cpp: - (JSC::JIT::privateCompileMainPass): - (JSC::JIT::privateCompileSlowCases): - * jit/JIT.h: - (JIT): - * jit/JITOpcodes.cpp: - (JSC::JIT::emit_op_put_to_base): - (JSC): - (JSC::JIT::emit_resolve_operations): - (JSC::JIT::emitSlow_link_resolve_operations): - (JSC::JIT::emit_op_resolve): - (JSC::JIT::emitSlow_op_resolve): - (JSC::JIT::emit_op_resolve_base): - (JSC::JIT::emitSlow_op_resolve_base): - (JSC::JIT::emit_op_resolve_with_base): - (JSC::JIT::emitSlow_op_resolve_with_base): - (JSC::JIT::emit_op_resolve_with_this): - (JSC::JIT::emitSlow_op_resolve_with_this): - (JSC::JIT::emitSlow_op_put_to_base): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emit_op_put_to_base): - (JSC): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_init_global_const): - (JSC::JIT::emit_op_init_global_const_check): - (JSC::JIT::emitSlow_op_init_global_const_check): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_init_global_const): - (JSC::JIT::emit_op_init_global_const_check): - (JSC::JIT::emitSlow_op_init_global_const_check): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - (JSC): - * jit/JITStubs.h: - * llint/LLIntSlowPaths.cpp: - (LLInt): - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - * llint/LLIntSlowPaths.h: - (LLInt): - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * runtime/JSScope.cpp: - (JSC::LookupResult::base): - (JSC::LookupResult::value): - (JSC::LookupResult::setBase): - (JSC::LookupResult::setValue): - (LookupResult): - (JSC): - (JSC::setPutPropertyAccessOffset): - (JSC::executeResolveOperations): - (JSC::JSScope::resolveContainingScopeInternal): - (JSC::JSScope::resolveContainingScope): - (JSC::JSScope::resolve): - (JSC::JSScope::resolveBase): - (JSC::JSScope::resolveWithBase): - (JSC::JSScope::resolveWithThis): - (JSC::JSScope::resolvePut): - (JSC::JSScope::resolveGlobal): - * runtime/JSScope.h: - (JSScope): - * runtime/JSVariableObject.cpp: - (JSC): - * runtime/JSVariableObject.h: - (JSVariableObject): - * runtime/Structure.h: - (JSC::Structure::propertyAccessesAreCacheable): - (Structure): - -2012-10-16 Filip Pizlo - - Accidental switch fall-through in DFG::FixupPhase - https://bugs.webkit.org/show_bug.cgi?id=96956 - - - Reviewed by Mark Hahnenberg. - - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - -2012-10-16 Filip Pizlo - - GetScopedVar CSE matches dead GetScopedVar's leading to IR corruption - https://bugs.webkit.org/show_bug.cgi?id=99470 - - - Reviewed by Mark Hahnenberg. - - All it takes is to follow the "if (!shouldGenerate) continue" idiom and everything will be OK. - - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::globalVarLoadElimination): - (JSC::DFG::CSEPhase::scopedVarLoadElimination): - (JSC::DFG::CSEPhase::globalVarWatchpointElimination): - (JSC::DFG::CSEPhase::getByValLoadElimination): - (JSC::DFG::CSEPhase::checkStructureElimination): - (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination): - (JSC::DFG::CSEPhase::getByOffsetLoadElimination): - -2012-10-16 Dima Gorbik - - Remove Platform.h include from the header files. - https://bugs.webkit.org/show_bug.cgi?id=98665 - - Reviewed by Eric Seidel. - - We don't want other clients that include WebKit headers to know about Platform.h. - - * API/tests/minidom.c: - * API/tests/testapi.c: - -2012-10-16 Balazs Kilvady - - Add missing MIPS functions to assembler. - https://bugs.webkit.org/show_bug.cgi?id=98856 - - Reviewed by Oliver Hunt. - - Implement missing functions in MacroAssemblerMIPS and MIPSAssembler. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::lb): - (MIPSAssembler): - (JSC::MIPSAssembler::lh): - (JSC::MIPSAssembler::cvtds): - (JSC::MIPSAssembler::cvtsd): - (JSC::MIPSAssembler::vmov): - * assembler/MacroAssemblerMIPS.h: - (MacroAssemblerMIPS): - (JSC::MacroAssemblerMIPS::load8Signed): - (JSC::MacroAssemblerMIPS::load16Signed): - (JSC::MacroAssemblerMIPS::moveDoubleToInts): - (JSC::MacroAssemblerMIPS::moveIntsToDouble): - (JSC::MacroAssemblerMIPS::loadFloat): - (JSC::MacroAssemblerMIPS::loadDouble): - (JSC::MacroAssemblerMIPS::storeFloat): - (JSC::MacroAssemblerMIPS::storeDouble): - (JSC::MacroAssemblerMIPS::addDouble): - (JSC::MacroAssemblerMIPS::convertFloatToDouble): - (JSC::MacroAssemblerMIPS::convertDoubleToFloat): - -2012-10-16 Balazs Kilvady - - MIPS assembler coding-style fix. - https://bugs.webkit.org/show_bug.cgi?id=99359 - - Reviewed by Oliver Hunt. - - Coding style fix of existing MIPS assembler header files. - - * assembler/MIPSAssembler.h: - (JSC::MIPSAssembler::addiu): - (JSC::MIPSAssembler::addu): - (JSC::MIPSAssembler::subu): - (JSC::MIPSAssembler::mul): - (JSC::MIPSAssembler::andInsn): - (JSC::MIPSAssembler::andi): - (JSC::MIPSAssembler::nor): - (JSC::MIPSAssembler::orInsn): - (JSC::MIPSAssembler::ori): - (JSC::MIPSAssembler::xorInsn): - (JSC::MIPSAssembler::xori): - (JSC::MIPSAssembler::slt): - (JSC::MIPSAssembler::sltu): - (JSC::MIPSAssembler::sltiu): - (JSC::MIPSAssembler::sll): - (JSC::MIPSAssembler::sllv): - (JSC::MIPSAssembler::sra): - (JSC::MIPSAssembler::srav): - (JSC::MIPSAssembler::srl): - (JSC::MIPSAssembler::srlv): - (JSC::MIPSAssembler::lbu): - (JSC::MIPSAssembler::lw): - (JSC::MIPSAssembler::lwl): - (JSC::MIPSAssembler::lwr): - (JSC::MIPSAssembler::lhu): - (JSC::MIPSAssembler::sb): - (JSC::MIPSAssembler::sh): - (JSC::MIPSAssembler::sw): - (JSC::MIPSAssembler::addd): - (JSC::MIPSAssembler::subd): - (JSC::MIPSAssembler::muld): - (JSC::MIPSAssembler::divd): - (JSC::MIPSAssembler::lwc1): - (JSC::MIPSAssembler::ldc1): - (JSC::MIPSAssembler::swc1): - (JSC::MIPSAssembler::sdc1): - (MIPSAssembler): - (JSC::MIPSAssembler::relocateJumps): - (JSC::MIPSAssembler::linkWithOffset): - * assembler/MacroAssemblerMIPS.h: - (JSC::MacroAssemblerMIPS::add32): - (JSC::MacroAssemblerMIPS::and32): - (JSC::MacroAssemblerMIPS::sub32): - (MacroAssemblerMIPS): - (JSC::MacroAssemblerMIPS::load8): - (JSC::MacroAssemblerMIPS::load32): - (JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords): - (JSC::MacroAssemblerMIPS::load16): - (JSC::MacroAssemblerMIPS::store8): - (JSC::MacroAssemblerMIPS::store16): - (JSC::MacroAssemblerMIPS::store32): - (JSC::MacroAssemblerMIPS::nearCall): - (JSC::MacroAssemblerMIPS::test8): - (JSC::MacroAssemblerMIPS::test32): - -2012-10-16 Yuqiang Xian - - Refactor MacroAssembler interfaces to differentiate the pointer operands from the 64-bit integer operands - https://bugs.webkit.org/show_bug.cgi?id=99154 - - Reviewed by Gavin Barraclough. - - In current JavaScriptCore implementation for JSVALUE64 platform (i.e., - the X64 platform), we assume that the JSValue size is same to the - pointer size, and thus EncodedJSValue is simply type defined as a - "void*". In the JIT compiler, we also take this assumption and invoke - the same macro assembler interfaces for both JSValue and pointer - operands. We need to differentiate the operations on pointers from the - operations on JSValues, and let them invoking different macro - assembler interfaces. For example, we now use the interface of - "loadPtr" to load either a pointer or a JSValue, and we need to switch - to using "loadPtr" to load a pointer and some new "load64" interface - to load a JSValue. This would help us supporting other JSVALUE64 - platforms where pointer size is not necessarily 64-bits, for example - x32 (bug #99153). - - The major modification I made is to introduce the "*64" interfaces in - the MacroAssembler for those operations on JSValues, keep the "*Ptr" - interfaces for those operations on real pointers, and go through all - the JIT compiler code to correct the usage. - - This is the first part of the work, i.e, to add the *64 interfaces to - the MacroAssembler. - - * assembler/AbstractMacroAssembler.h: Add the Imm64 interfaces. - (AbstractMacroAssembler): - (JSC::AbstractMacroAssembler::TrustedImm64::TrustedImm64): - (TrustedImm64): - (JSC::AbstractMacroAssembler::Imm64::Imm64): - (Imm64): - (JSC::AbstractMacroAssembler::Imm64::asTrustedImm64): - * assembler/MacroAssembler.h: map Ptr methods to 64 for X86_64. - (MacroAssembler): - (JSC::MacroAssembler::peek64): - (JSC::MacroAssembler::poke): - (JSC::MacroAssembler::poke64): - (JSC::MacroAssembler::addPtr): - (JSC::MacroAssembler::andPtr): - (JSC::MacroAssembler::negPtr): - (JSC::MacroAssembler::orPtr): - (JSC::MacroAssembler::rotateRightPtr): - (JSC::MacroAssembler::subPtr): - (JSC::MacroAssembler::xorPtr): - (JSC::MacroAssembler::loadPtr): - (JSC::MacroAssembler::loadPtrWithAddressOffsetPatch): - (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch): - (JSC::MacroAssembler::storePtr): - (JSC::MacroAssembler::storePtrWithAddressOffsetPatch): - (JSC::MacroAssembler::movePtrToDouble): - (JSC::MacroAssembler::moveDoubleToPtr): - (JSC::MacroAssembler::comparePtr): - (JSC::MacroAssembler::testPtr): - (JSC::MacroAssembler::branchPtr): - (JSC::MacroAssembler::branchTestPtr): - (JSC::MacroAssembler::branchAddPtr): - (JSC::MacroAssembler::branchSubPtr): - (JSC::MacroAssembler::shouldBlindDouble): - (JSC::MacroAssembler::shouldBlind): - (JSC::MacroAssembler::RotatedImm64::RotatedImm64): - (RotatedImm64): - (JSC::MacroAssembler::rotationBlindConstant): - (JSC::MacroAssembler::loadRotationBlindedConstant): - (JSC::MacroAssembler::move): - (JSC::MacroAssembler::and64): - (JSC::MacroAssembler::store64): - * assembler/MacroAssemblerX86Common.h: - (JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch): - (MacroAssemblerX86Common): - (JSC::MacroAssemblerX86Common::move): - * assembler/MacroAssemblerX86_64.h: Add the 64 methods for X86_64. - (JSC::MacroAssemblerX86_64::branchAdd32): - (JSC::MacroAssemblerX86_64::add64): - (MacroAssemblerX86_64): - (JSC::MacroAssemblerX86_64::and64): - (JSC::MacroAssemblerX86_64::neg64): - (JSC::MacroAssemblerX86_64::or64): - (JSC::MacroAssemblerX86_64::rotateRight64): - (JSC::MacroAssemblerX86_64::sub64): - (JSC::MacroAssemblerX86_64::xor64): - (JSC::MacroAssemblerX86_64::load64): - (JSC::MacroAssemblerX86_64::load64WithAddressOffsetPatch): - (JSC::MacroAssemblerX86_64::load64WithCompactAddressOffsetPatch): - (JSC::MacroAssemblerX86_64::store64): - (JSC::MacroAssemblerX86_64::store64WithAddressOffsetPatch): - (JSC::MacroAssemblerX86_64::move64ToDouble): - (JSC::MacroAssemblerX86_64::moveDoubleTo64): - (JSC::MacroAssemblerX86_64::compare64): - (JSC::MacroAssemblerX86_64::branch64): - (JSC::MacroAssemblerX86_64::branchTest64): - (JSC::MacroAssemblerX86_64::test64): - (JSC::MacroAssemblerX86_64::branchAdd64): - (JSC::MacroAssemblerX86_64::branchSub64): - (JSC::MacroAssemblerX86_64::branchPtrWithPatch): - (JSC::MacroAssemblerX86_64::storePtrWithPatch): - -2012-10-15 Mark Hahnenberg - - Make CopiedSpace and MarkedSpace regions independent - https://bugs.webkit.org/show_bug.cgi?id=99222 - - Reviewed by Filip Pizlo. - - Right now CopiedSpace and MarkedSpace have the same block size and share the same regions, - but there's no reason that they can't have different block sizes while still sharing the - same underlying regions. We should factor the two "used" lists of regions apart so that - MarkedBlocks and CopiedBlocks can be different sizes. Regions will still be a uniform size - so that when they become empty they may be shared between the CopiedSpace and the MarkedSpace, - since benchmarks indicate that sharing is a boon for performance. - - * heap/BlockAllocator.cpp: - (JSC::BlockAllocator::BlockAllocator): - * heap/BlockAllocator.h: - (JSC): - (Region): - (JSC::Region::create): We now have a fixed size for Regions so that empty regions can continue to - be shared between the MarkedSpace and CopiedSpace. Once they are used for a specific type of block, - however, they can only be used for that type of block until they become empty again. - (JSC::Region::createCustomSize): - (JSC::Region::Region): - (JSC::Region::~Region): - (JSC::Region::reset): - (BlockAllocator): - (JSC::BlockAllocator::RegionSet::RegionSet): - (RegionSet): - (JSC::BlockAllocator::tryAllocateFromRegion): We change this function so that it correctly - moves blocks between empty, partial, and full lists. - (JSC::BlockAllocator::allocate): - (JSC::BlockAllocator::allocateCustomSize): - (JSC::BlockAllocator::deallocate): Ditto. - (JSC::CopiedBlock): - (JSC::MarkedBlock): - (JSC::BlockAllocator::regionSetFor): We use this so that we can use the same allocate/deallocate - functions with different RegionSets. We specialize the function for each type of block that we - want to allocate. - * heap/CopiedBlock.h: - (CopiedBlock): - * heap/CopiedSpace.h: - (CopiedSpace): - * heap/HeapBlock.h: - (HeapBlock): - * heap/MarkedBlock.cpp: - (JSC::MarkedBlock::MarkedBlock): For oversize MarkedBlocks, if the block size gets too big we can - underflow the endAtom, which will cause us to segfault when we try to sweep a block. If we're a - custom size MarkedBlock we need to calculate endAtom so it doesn't underflow. - -2012-10-14 Filip Pizlo - - JIT::JIT fails to initialize all of its fields - https://bugs.webkit.org/show_bug.cgi?id=99283 - - Reviewed by Andreas Kling. - - There were two groups of such fields, all of which are eventually initialized - prior to use inside of privateCompile(). But it's safer to make sure that they - are initialized in the constructor as well, since we may use the JIT to do a - stub compile without calling into privateCompile(). - - Unsigned index fields for dynamic repatching meta-data: this change - initializes them to UINT_MAX, so we should crash if we try to use those - indices without initializing them. - - Boolean flags for value profiling: this change initializes them to false, so - we at worst turn off value profiling. - - * jit/JIT.cpp: - (JSC::JIT::JIT): - -2012-10-15 Mark Hahnenberg - - We should avoid weakCompareAndSwap when parallel GC is disabled - https://bugs.webkit.org/show_bug.cgi?id=99331 - - Reviewed by Filip Pizlo. - - CopiedBlock::reportLiveBytes and didEvacuateBytes uses weakCompareAndSwap, which some platforms - don't support. For platforms that don't have parallel GC enabled, we should just use a normal store. - - * heap/CopiedBlock.h: - (JSC::CopiedBlock::reportLiveBytes): - (JSC::CopiedBlock::didEvacuateBytes): - -2012-10-15 Carlos Garcia Campos - - Unreviewed. Fix make distcheck. - - * GNUmakefile.list.am: Add missing header file. - -2012-10-14 Filip Pizlo - - DFG should handle polymorphic array modes by eagerly transforming arrays into the most general applicable form - https://bugs.webkit.org/show_bug.cgi?id=99269 - - Reviewed by Geoffrey Garen. - - This kills off a bunch of code for "polymorphic" array modes in the DFG. It should - also be a performance win for code that uses a lot of array storage arrays. - - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::fromObserved): - (JSC::DFG::modeAlreadyChecked): - (JSC::DFG::modeToString): - * dfg/DFGArrayMode.h: - (DFG): - (JSC::DFG::modeUsesButterfly): - (JSC::DFG::modeIsJSArray): - (JSC::DFG::mayStoreToTail): - (JSC::DFG::mayStoreToHole): - (JSC::DFG::canCSEStorage): - (JSC::DFG::modeSupportsLength): - (JSC::DFG::benefitsFromStructureCheck): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::checkArray): - (JSC::DFG::FixupPhase::blessArrayOperation): - * dfg/DFGGraph.h: - (JSC::DFG::Graph::byValIsPure): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): - (JSC::DFG::SpeculativeJIT::checkArray): - (JSC::DFG::SpeculativeJIT::arrayify): - (DFG): - (JSC::DFG::SpeculativeJIT::compileGetArrayLength): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister): - (SpeculativeJIT): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-14 Filip Pizlo - - REGRESSION(126886): Fat binary builds don't know how to handle architecture variants to which the LLInt is agnostic - https://bugs.webkit.org/show_bug.cgi?id=99270 - - Reviewed by Geoffrey Garen. - - The fix is to hash cons the offsets based on configuration index, not the offsets - themselves. - - * offlineasm/offsets.rb: - -2012-10-13 Filip Pizlo - - IndexingType should not have a bit for each type - https://bugs.webkit.org/show_bug.cgi?id=98997 - - Reviewed by Oliver Hunt. - - Somewhat incidentally, the introduction of butterflies led to each indexing - type being represented by a unique bit. This is superficially nice since it - allows you to test if a structure corresponds to a particular indexing type - by saying !!(structure->indexingType() & TheType). But the downside is that - given the 8 bits we have for the m_indexingType field, that leaves only a - small number of possible indexing types if we have one per bit. - - This changeset changes the indexing type to be: - - Bit #1: Tells you if you're an array. - - Bits #2 - #5: 16 possible indexing types, including the blank type for - objects that don't have indexed properties. - - Bits #6-8: Auxiliary bits that we could use for other things. Currently we - just use one of those bits, for MayHaveIndexedAccessors. - - This is performance-neutral, and is primarily intended to give us more - breathing room for introducing new inferred array modes. - - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::JumpList::jumps): - * assembler/MacroAssembler.h: - (MacroAssembler): - (JSC::MacroAssembler::patchableBranch32): - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::patchableBranch32): - (MacroAssemblerARMv7): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::modeAlreadyChecked): - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryCacheGetByID): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::speculationCheck): - (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck): - (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): - (DFG): - (JSC::DFG::SpeculativeJIT::checkArray): - (JSC::DFG::SpeculativeJIT::arrayify): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * jit/JITInlineMethods.h: - (JSC::JIT::emitAllocateJSArray): - (JSC::JIT::chooseArrayMode): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitContiguousGetByVal): - (JSC::JIT::emitArrayStorageGetByVal): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitContiguousPutByVal): - (JSC::JIT::emitArrayStoragePutByVal): - (JSC::JIT::privateCompilePatchGetArrayLength): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emitContiguousGetByVal): - (JSC::JIT::emitArrayStorageGetByVal): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitContiguousPutByVal): - (JSC::JIT::emitArrayStoragePutByVal): - (JSC::JIT::privateCompilePatchGetArrayLength): - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * runtime/IndexingType.h: - (JSC): - (JSC::hasIndexedProperties): - (JSC::hasContiguous): - (JSC::hasFastArrayStorage): - (JSC::hasArrayStorage): - (JSC::shouldUseSlowPut): - * runtime/JSGlobalObject.cpp: - (JSC): - * runtime/StructureTransitionTable.h: - (JSC::newIndexingType): - -2012-10-14 Filip Pizlo - - DFG structure check hoisting should attempt to ignore side effects and make transformations that are sound even in their presence - https://bugs.webkit.org/show_bug.cgi?id=99262 - - Reviewed by Oliver Hunt. - - This hugely simplifies the structure check hoisting phase. It will no longer be necessary - to modify it when the effectfulness of operations changes. This also enables the hoister - to hoist effectful things in the future. - - The downside is that the hoister may end up adding strictly more checks than were present - in the original code, if the code truly has a lot of side-effects. I don't see evidence - of this happening. This patch does have some speed-ups and some slow-downs, but is - neutral in the average, and the slow-downs do not appear to have more structure checks - than ToT. - - * dfg/DFGStructureCheckHoistingPhase.cpp: - (JSC::DFG::StructureCheckHoistingPhase::run): - (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck): - (StructureCheckHoistingPhase): - (CheckData): - (JSC::DFG::StructureCheckHoistingPhase::CheckData::CheckData): - -2012-10-14 Filip Pizlo - - Fix the build of universal binary with ARMv7s of JavaScriptCore - - * llint/LLIntOfflineAsmConfig.h: - * llint/LowLevelInterpreter.asm: - -2012-10-13 Filip Pizlo - - Array length array profiling is broken in the baseline JIT - https://bugs.webkit.org/show_bug.cgi?id=99258 - - Reviewed by Oliver Hunt. - - The code generator for array length stubs calls into - emitArrayProfilingSiteForBytecodeIndex(), which emits profiling only if - canBeOptimized() returns true. But m_canBeOptimized is only initialized during - full method compiles, so in a stub compile it may (or may not) be false, meaning - that we may, or may not, get meaningful profiling info. - - This appeared to not affect too many programs since the LLInt has good array - length array profiling. - - * jit/JIT.h: - (JSC::JIT::compilePatchGetArrayLength): - -2012-10-14 Patrick Gansterer - - Build fix for WinCE after r131089. - - WinCE does not support getenv(). - - * runtime/Options.cpp: - (JSC::overrideOptionWithHeuristic): - -2012-10-12 Kangil Han - - Fix build error on DFGSpeculativeJIT32_64.cpp - https://bugs.webkit.org/show_bug.cgi?id=99234 - - Reviewed by Anders Carlsson. - - Seems BUG 98608 causes build error on 32bit machine so fix it. - - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-12 Filip Pizlo - - Contiguous array allocation should always be inlined - https://bugs.webkit.org/show_bug.cgi?id=98608 - - Reviewed by Oliver Hunt and Mark Hahnenberg. - - This inlines contiguous array allocation in the most obvious way possible. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * assembler/MacroAssembler.h: - (JSC::MacroAssembler::branchSubPtr): - (MacroAssembler): - * assembler/MacroAssemblerX86_64.h: - (JSC::MacroAssemblerX86_64::branchSubPtr): - (MacroAssemblerX86_64): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGCCallHelpers.h: - (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): - (CCallHelpers): - * dfg/DFGCallArrayAllocatorSlowPathGenerator.h: Added. - (DFG): - (CallArrayAllocatorSlowPathGenerator): - (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator): - (JSC::DFG::CallArrayAllocatorSlowPathGenerator::generateInternal): - (CallArrayAllocatorWithVariableSizeSlowPathGenerator): - (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator): - (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::generateInternal): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): - (DFG): - (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): - (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage): - (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): - (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-12 Mark Hahnenberg - - Race condition during CopyingPhase can lead to deadlock - https://bugs.webkit.org/show_bug.cgi?id=99226 - - Reviewed by Filip Pizlo. - - The main thread calls startCopying() for each of the GCThreads at the beginning of the copy phase. - It then proceeds to start copying. If copying completes before one of the GCThreads wakes up, the - main thread will set m_currentPhase back to NoPhase, the GCThread will wake up, see that there's - nothing to do, and then it will go back to sleep without ever calling CopyVisitor::doneCopying() - to return its borrowed block to the CopiedSpace. CopiedSpace::doneCopying() will then sleep forever - waiting on the block. - - The fix for this is to make sure we call CopiedSpace::doneCopying() on the main thread before we - call GCThreadSharedData::didFinishCopying(), which sets the m_currentPhase flag to NoPhase. This - way we will wait until all threads have woken up and given back their borrowed blocks before - clearing the flag. - - * heap/Heap.cpp: - (JSC::Heap::copyBackingStores): - -2012-10-12 Anders Carlsson - - Move macros from Parser.h to Parser.cpp - https://bugs.webkit.org/show_bug.cgi?id=99217 - - Reviewed by Andreas Kling. - - There are a bunch of macros in Parser.h that are only used in Parser.cpp. Move them to Parser.cpp - so they won't pollute the global namespace. - * parser/Parser.cpp: - * parser/Parser.h: - (JSC): - -2012-10-12 Mark Hahnenberg - - Another build fix after r131213 - - Added some symbol magic to placate the linker on some platforms. - - * JavaScriptCore.order: - -2012-10-12 Mark Hahnenberg - - Build fix after r131213 - - Removed an unused variable that was making compilers unhappy. - - * heap/GCThread.cpp: - (JSC::GCThread::GCThread): - * heap/GCThread.h: - (GCThread): - * heap/GCThreadSharedData.cpp: - (JSC::GCThreadSharedData::GCThreadSharedData): - -2012-10-09 Mark Hahnenberg - - Copying collection shouldn't require O(live bytes) memory overhead - https://bugs.webkit.org/show_bug.cgi?id=98792 - - Reviewed by Filip Pizlo. - - Currently our copying collection occurs simultaneously with the marking phase. We'd like - to be able to reuse CopiedBlocks as soon as they become fully evacuated, but this is not - currently possible because we don't know the liveness statistics of each old CopiedBlock - until marking/copying has already finished. Instead, we have to allocate additional memory - from the OS to use as our working set of CopiedBlocks while copying. We then return the - fully evacuated old CopiedBlocks back to the block allocator, thus giving our copying phase - an O(live bytes) overhead. - - To fix this, we should instead split the copying phase apart from the marking phase. This - way we have full liveness data for each CopiedBlock during the copying phase so that we - can reuse them the instant they become fully evacuated. With the additional liveness data - that each CopiedBlock accumulates, we can add some additional heuristics to the collector. - For example, we can calculate our global Heap fragmentation and only choose to do a copying - phase if that fragmentation exceeds some limit. As another example, we can skip copying - blocks that are already above a particular fragmentation limit, which allows older objects - to coalesce into blocks that are rarely copied. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * heap/CopiedBlock.h: - (CopiedBlock): - (JSC::CopiedBlock::CopiedBlock): Added support for tracking live bytes in a CopiedBlock in a - thread-safe fashion. - (JSC::CopiedBlock::reportLiveBytes): Adds a number of live bytes to the block in a thread-safe - fashion using compare and swap. - (JSC): - (JSC::CopiedBlock::didSurviveGC): Called when a block survives a single GC without being - evacuated. This could be called for a couple reasons: (a) the block was pinned or (b) we - decided not to do any copying. A block can become pinned for a few reasons: (1) a pointer into - the block was found during the conservative scan. (2) the block was deemed full enough to - not warrant any copying. (3) The block is oversize and was found to be live. - (JSC::CopiedBlock::didEvacuateBytes): Called when some number of bytes are copied from this - block. If the number of live bytes ever hits zero, the block will return itself to the - BlockAllocator to be recycled. - (JSC::CopiedBlock::canBeRecycled): Indicates that a block has no live bytes and can be - immediately recycled. This is used for blocks that are found to have zero live bytes at the - beginning of the copying phase. - (JSC::CopiedBlock::shouldEvacuate): This function returns true if the current fragmentation - of the block is above our fragmentation threshold, and false otherwise. - (JSC::CopiedBlock::isPinned): Added an accessor for the pinned flag - (JSC::CopiedBlock::liveBytes): - * heap/CopiedSpace.cpp: - (JSC::CopiedSpace::CopiedSpace): - (JSC::CopiedSpace::doneFillingBlock): Changed so that we can exchange our filled block for a - fresh block. This avoids the situation where a thread returns its borrowed block, it's the last - borrowed block, so CopiedSpace thinks that copying has completed, and it starts doing all of the - copying phase cleanup. In actuality, the thread wanted another block after returning the current - block. So we allow the thread to atomically exchange its block for another block. - (JSC::CopiedSpace::startedCopying): Added the calculation of global Heap fragmentation to - determine if the copying phase should commence. We include the MarkedSpace in our fragmentation - calculation by assuming that the MarkedSpace is 0% fragmented since we can reuse any currently - free memory in it (i.e. we ignore any internal fragmentation in the MarkedSpace). While we're - calculating the fragmentation of CopiedSpace, we also return any free blocks we find along the - way (meaning liveBytes() == 0). - (JSC): - (JSC::CopiedSpace::doneCopying): We still have to iterate over all the blocks, regardless of - whether the copying phase took place or not so that we can reset all of the live bytes counters - and un-pin any pinned blocks. - * heap/CopiedSpace.h: - (CopiedSpace): - (JSC::CopiedSpace::shouldDoCopyPhase): - * heap/CopiedSpaceInlineMethods.h: - (JSC::CopiedSpace::recycleEvacuatedBlock): This function is distinct from recycling a borrowed block - because a borrowed block hasn't been added to the CopiedSpace yet, but an evacuated block is still - currently in CopiedSpace, so we have to make sure we properly remove all traces of the block from - CopiedSpace before returning it to BlockAllocator. - (JSC::CopiedSpace::recycleBorrowedBlock): Renamed to indicate the distinction mentioned above. - * heap/CopyVisitor.cpp: Added. - (JSC): - (JSC::CopyVisitor::CopyVisitor): - (JSC::CopyVisitor::copyFromShared): Main function for any thread participating in the copying phase. - Grabs chunks of MarkedBlocks from the shared list and copies the backing store of anybody who needs - it until there are no more chunks to copy. - * heap/CopyVisitor.h: Added. - (JSC): - (CopyVisitor): - * heap/CopyVisitorInlineMethods.h: Added. - (JSC): - (GCCopyPhaseFunctor): - (JSC::GCCopyPhaseFunctor::GCCopyPhaseFunctor): - (JSC::GCCopyPhaseFunctor::operator()): - (JSC::CopyVisitor::checkIfShouldCopy): We don't have to check shouldEvacuate() because all of those - checks are done during the marking phase. - (JSC::CopyVisitor::allocateNewSpace): - (JSC::CopyVisitor::allocateNewSpaceSlow): - (JSC::CopyVisitor::startCopying): Initialization function for a thread that is about to start copying. - (JSC::CopyVisitor::doneCopying): - (JSC::CopyVisitor::didCopy): This callback is called by an object that has just successfully copied its - backing store. It indicates to the CopiedBlock that somebody has just finished evacuating some number of - bytes from it, and, if the CopiedBlock now has no more live bytes, can be recycled immediately. - * heap/GCThread.cpp: Added. - (JSC): - (JSC::GCThread::GCThread): This is a new class that encapsulates a single thread responsible for participating - in a specific set of GC phases. Currently, that set of phases includes Mark, Copy, and Exit. Each thread - monitors a shared variable in its associated GCThreadSharedData. The main thread updates this m_currentPhase - variable as collection progresses through the various phases. Parallel marking still works exactly like it - has. In other words, the "run loop" for each of the GC threads sits above any individual phase, thus keeping - the separate phases of the collector orthogonal. - (JSC::GCThread::threadID): - (JSC::GCThread::initializeThreadID): - (JSC::GCThread::slotVisitor): - (JSC::GCThread::copyVisitor): - (JSC::GCThread::waitForNextPhase): - (JSC::GCThread::gcThreadMain): - (JSC::GCThread::gcThreadStartFunc): - * heap/GCThread.h: Added. - (JSC): - (GCThread): - * heap/GCThreadSharedData.cpp: The GCThreadSharedData now has a list of GCThread objects rather than raw - ThreadIdentifiers. - (JSC::GCThreadSharedData::resetChildren): - (JSC::GCThreadSharedData::childVisitCount): - (JSC::GCThreadSharedData::GCThreadSharedData): - (JSC::GCThreadSharedData::~GCThreadSharedData): - (JSC::GCThreadSharedData::reset): - (JSC::GCThreadSharedData::didStartMarking): Callback to let the GCThreadSharedData know that marking has - started and updates the m_currentPhase variable and notifies the GCThreads accordingly. - (JSC::GCThreadSharedData::didFinishMarking): Ditto for finishing marking. - (JSC::GCThreadSharedData::didStartCopying): Ditto for starting the copying phase. - (JSC::GCThreadSharedData::didFinishCopying): Ditto for finishing copying. - * heap/GCThreadSharedData.h: - (JSC): - (GCThreadSharedData): - (JSC::GCThreadSharedData::getNextBlocksToCopy): Atomically gets the next chunk of work for a copying thread. - * heap/Heap.cpp: - (JSC::Heap::Heap): - (JSC::Heap::markRoots): - (JSC): - (JSC::Heap::copyBackingStores): Responsible for setting up the copying phase, notifying the copying threads, - and doing any copying work if necessary. - (JSC::Heap::collect): - * heap/Heap.h: - (Heap): - (JSC): - (JSC::CopyFunctor::CopyFunctor): - (CopyFunctor): - (JSC::CopyFunctor::operator()): - * heap/IncrementalSweeper.cpp: Changed the incremental sweeper to have a reference to the list of MarkedBlocks - that need sweeping, since this now resides in the Heap so that it can be easily shared by the GCThreads. - (JSC::IncrementalSweeper::IncrementalSweeper): - (JSC::IncrementalSweeper::startSweeping): - * heap/IncrementalSweeper.h: - (JSC): - (IncrementalSweeper): - * heap/SlotVisitor.cpp: - (JSC::SlotVisitor::setup): - (JSC::SlotVisitor::drainFromShared): We no longer do any copying-related work here. - (JSC): - * heap/SlotVisitor.h: - (SlotVisitor): - * heap/SlotVisitorInlineMethods.h: - (JSC): - (JSC::SlotVisitor::copyLater): Notifies the CopiedBlock that there are some live bytes that may need - to be copied. - * runtime/Butterfly.h: - (JSC): - (Butterfly): - * runtime/ButterflyInlineMethods.h: - (JSC::Butterfly::createUninitializedDuringCollection): Uses the new CopyVisitor. - * runtime/ClassInfo.h: - (MethodTable): Added new "virtual" function copyBackingStore to method table. - (JSC): - * runtime/JSCell.cpp: - (JSC::JSCell::copyBackingStore): Default implementation that does nothing. - (JSC): - * runtime/JSCell.h: - (JSC): - (JSCell): - * runtime/JSObject.cpp: - (JSC::JSObject::copyButterfly): Does the actual copying of the butterfly. - (JSC): - (JSC::JSObject::visitButterfly): Calls copyLater for the butterfly. - (JSC::JSObject::copyBackingStore): - * runtime/JSObject.h: - (JSObject): - (JSC::JSCell::methodTable): - (JSC::JSCell::inherits): - * runtime/Options.h: Added two new constants, minHeapUtilization and minCopiedBlockUtilization, - to govern the amount of fragmentation we allow before doing copying. - (JSC): - -2012-10-12 Filip Pizlo - - DFG array allocation calls should not return an encoded JSValue - https://bugs.webkit.org/show_bug.cgi?id=99196 - - Reviewed by Mark Hahnenberg. - - The array allocation operations now return a pointer instead. This makes it - easier to share code between 32-bit and 64-bit. - - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-01 Jer Noble - - Enable ENCRYPTED_MEDIA support on Mac. - https://bugs.webkit.org/show_bug.cgi?id=98044 - - Reviewed by Anders Carlsson. - - Enable the ENCRYPTED_MEDIA flag. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-12 Filip Pizlo - - Unreviewed. It should be possible to build JSC on ARMv7. - - * assembler/MacroAssemblerARMv7.h: - (JSC::MacroAssemblerARMv7::patchableBranchPtr): - -2012-10-11 Mark Hahnenberg - - BlockAllocator should use regions as its VM allocation abstraction - https://bugs.webkit.org/show_bug.cgi?id=99107 - - Reviewed by Geoffrey Garen. - - Currently the BlockAllocator allocates a single block at a time directly from the OS. Our block - allocations are on the large-ish side (64 KB) to amortize across many allocations the expense of - mapping new virtual memory from the OS. These large blocks are then shared between the MarkedSpace - and the CopiedSpace. This design makes it difficult to vary the size of the blocks in different - parts of the Heap while still allowing us to amortize the VM allocation costs. - - We should redesign the BlockAllocator so that it has a layer of indirection between blocks that are - used by the allocator/collector and our primary unit of VM allocation from the OS. In particular, - the BlockAllocator should allocate Regions of virtual memory from the OS, which are then subdivided - into one or more Blocks to be used in our custom allocators. This design has the following nice properties: - - 1) We can remove the knowledge of PageAllocationAligned from HeapBlocks. Each HeapBlock will now - only know what Region it belongs to. The Region maintains all the metadata for how to allocate - and deallocate virtual memory from the OS. - - 2) We can easily allocate in larger chunks than we need to satisfy a particular request for a Block. - We can then continue to amortize our VM allocation costs while allowing for smaller block sizes, - which should increase locality in the mutator when allocating, lazy sweeping, etc. - - 3) By encapsulating the logic of where our memory comes from inside of the Region class, we can more - easily transition over to allocating VM from a specific range of pre-reserved address space. This - will be a necessary step along the way to 32-bit pointers. - - This particular patch will not change the size of MarkedBlocks or CopiedBlocks, nor will it change how - much VM we allocate per failed Block request. It only sets up the data structures that we need to make - these changes in future patches. - - Most of the changes in this patch relate to the addition of the Region class to be used by the - BlockAllocator and the threading of changes made to BlockAllocator's interface through to the call sites. - - * heap/BlockAllocator.cpp: The BlockAllocator now has three lists that track the three disjoint sets of - Regions that it cares about: empty regions, partially full regions, and completely full regions. - Empty regions have no blocks currently in use and can be freed immediately if the freeing thread - determines they should be. Partial regions have some blocks used, but aren't completely in use yet. - These regions are preferred for recycling before empty regions to mitigate fragmentation within regions. - Completely full regions are no longer able to be used for allocations. Regions move between these - three lists as they are created and their constituent blocks are allocated and deallocated. - (JSC::BlockAllocator::BlockAllocator): - (JSC::BlockAllocator::~BlockAllocator): - (JSC::BlockAllocator::releaseFreeRegions): - (JSC::BlockAllocator::waitForRelativeTimeWhileHoldingLock): - (JSC::BlockAllocator::waitForRelativeTime): - (JSC::BlockAllocator::blockFreeingThreadMain): - * heap/BlockAllocator.h: - (JSC): - (DeadBlock): - (JSC::DeadBlock::DeadBlock): - (Region): - (JSC::Region::blockSize): - (JSC::Region::isFull): - (JSC::Region::isEmpty): - (JSC::Region::create): This function is responsible for doing the actual VM allocation. This should be the - only function in the entire JSC object runtime that calls out the OS for virtual memory allocation. - (JSC::Region::Region): - (JSC::Region::~Region): - (JSC::Region::allocate): - (JSC::Region::deallocate): - (BlockAllocator): - (JSC::BlockAllocator::tryAllocateFromRegion): Helper function that encapsulates checking a particular list - of regions for a free block. - (JSC::BlockAllocator::allocate): - (JSC::BlockAllocator::allocateCustomSize): This function is responsible for allocating one-off custom size - regions for use in oversize allocations in both the MarkedSpace and the CopiedSpace. These regions are not - tracked by the BlockAllocator. The only pointer to them is in the HeapBlock that is returned. These regions - contain exactly one block. - (JSC::BlockAllocator::deallocate): - (JSC::BlockAllocator::deallocateCustomSize): This function is responsible for deallocating one-off custom size - regions. The regions are deallocated back to the OS eagerly. - * heap/CopiedBlock.h: Re-worked CopiedBlocks to use Regions instead of PageAllocationAligned. - (CopiedBlock): - (JSC::CopiedBlock::createNoZeroFill): - (JSC::CopiedBlock::create): - (JSC::CopiedBlock::CopiedBlock): - (JSC::CopiedBlock::payloadEnd): - (JSC::CopiedBlock::capacity): - * heap/CopiedSpace.cpp: - (JSC::CopiedSpace::~CopiedSpace): - (JSC::CopiedSpace::tryAllocateOversize): - (JSC::CopiedSpace::tryReallocateOversize): - (JSC::CopiedSpace::doneCopying): - * heap/CopiedSpaceInlineMethods.h: - (JSC::CopiedSpace::allocateBlockForCopyingPhase): - (JSC::CopiedSpace::allocateBlock): - * heap/HeapBlock.h: - (JSC::HeapBlock::destroy): - (JSC::HeapBlock::HeapBlock): - (JSC::HeapBlock::region): - (HeapBlock): - * heap/MarkedAllocator.cpp: - (JSC::MarkedAllocator::allocateBlock): - * heap/MarkedBlock.cpp: - (JSC::MarkedBlock::create): - (JSC::MarkedBlock::MarkedBlock): - * heap/MarkedBlock.h: - (JSC::MarkedBlock::capacity): - * heap/MarkedSpace.cpp: - (JSC::MarkedSpace::freeBlock): - -2012-10-11 Filip Pizlo - - UInt32ToNumber and OSR exit should be aware of copy propagation and correctly recover both versions of a variable that was subject to a UInt32ToNumber cast - https://bugs.webkit.org/show_bug.cgi?id=99100 - - - Reviewed by Michael Saboff and Mark Hahnenberg. - - Fixed by forcing UInt32ToNumber to use a different register. This "undoes" the copy propagation that we - would have been doing, since it has no performance effect in this case and has the benefit of making the - OSR exit compiler a lot simpler. - - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber): - -2012-10-11 Geoffrey Garen - - Removed some more static assumptions about inline object capacity - https://bugs.webkit.org/show_bug.cgi?id=98603 - - Reviewed by Filip Pizlo. - - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): Use JSObject::allocationSize() - for a little more flexibility. We still pass it a constant inline capacity - because the JIT doesn't have a strategy for selecting a size class based - on non-constant capacity yet. "INLINE_STORAGE_CAPACITY" is a marker for - code that makes static assumptions about object size. - - * jit/JITInlineMethods.h: - (JSC::JIT::emitAllocateBasicJSObject): - * llint/LLIntData.cpp: - (JSC::LLInt::Data::performAssertions): - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: Ditto for the rest of our many execution engines. - - * runtime/JSObject.h: - (JSC::JSObject::allocationSize): - (JSC::JSFinalObject::finishCreation): - (JSC::JSFinalObject::create): New helper function for computing object - size dynamically, since we plan to have objects of different sizes. - - (JSC::JSFinalObject::JSFinalObject): Note that our m_inlineStorage used - to auto-generate an implicit C++ constructor with default null initialization. - This memory is not observed in its uninitialized state, and our LLInt and - JIT allocators do not initialize it, so I did not add any explicit code - to do so, now that the implicit code is gone. - - (JSC::JSObject::offsetOfInlineStorage): Changed the math here to match - inlineStorageUnsafe(), since we can rely on an explicit data member anymore. - -2012-10-11 Geoffrey Garen - - Enable RUNTIME_HEURISTICS all the time, for easier testing - https://bugs.webkit.org/show_bug.cgi?id=99090 - - Reviewed by Filip Pizlo. - - I find myself using this a lot, and there doesn't seem to be an obvious - reason to compile it out, since it only runs once at startup. - - * runtime/Options.cpp: - (JSC::overrideOptionWithHeuristic): - (JSC::Options::initialize): - * runtime/Options.h: Removed the #ifdef. - -2012-10-11 Geoffrey Garen - - Removed ASSERT_CLASS_FITS_IN_CELL - https://bugs.webkit.org/show_bug.cgi?id=97634 - - Reviewed by Mark Hahnenberg. - - Our collector now supports arbitrarily sized objects, so the ASSERT is not needed. - - * API/JSCallbackFunction.cpp: - * API/JSCallbackObject.cpp: - * heap/MarkedSpace.h: - * jsc.cpp: - * runtime/Arguments.cpp: - * runtime/ArrayConstructor.cpp: - * runtime/ArrayPrototype.cpp: - * runtime/BooleanConstructor.cpp: - * runtime/BooleanObject.cpp: - * runtime/BooleanPrototype.cpp: - * runtime/DateConstructor.cpp: - * runtime/DatePrototype.cpp: - * runtime/Error.cpp: - * runtime/ErrorConstructor.cpp: - * runtime/ErrorPrototype.cpp: - * runtime/FunctionConstructor.cpp: - * runtime/FunctionPrototype.cpp: - * runtime/InternalFunction.cpp: - * runtime/JSActivation.cpp: - * runtime/JSArray.cpp: - * runtime/JSBoundFunction.cpp: - * runtime/JSFunction.cpp: - * runtime/JSGlobalObject.cpp: - * runtime/JSGlobalThis.cpp: - * runtime/JSNameScope.cpp: - * runtime/JSNotAnObject.cpp: - * runtime/JSONObject.cpp: - * runtime/JSObject.cpp: - * runtime/JSPropertyNameIterator.cpp: - * runtime/JSScope.cpp: - * runtime/JSWithScope.cpp: - * runtime/JSWrapperObject.cpp: - * runtime/MathObject.cpp: - * runtime/NameConstructor.cpp: - * runtime/NamePrototype.cpp: - * runtime/NativeErrorConstructor.cpp: - * runtime/NativeErrorPrototype.cpp: - * runtime/NumberConstructor.cpp: - * runtime/NumberObject.cpp: - * runtime/NumberPrototype.cpp: - * runtime/ObjectConstructor.cpp: - * runtime/ObjectPrototype.cpp: - * runtime/RegExpConstructor.cpp: - * runtime/RegExpMatchesArray.cpp: - * runtime/RegExpObject.cpp: - * runtime/RegExpPrototype.cpp: - * runtime/StringConstructor.cpp: - * runtime/StringObject.cpp: - * runtime/StringPrototype.cpp: - * testRegExp.cpp: Removed the ASSERT. - -2012-10-11 Filip Pizlo - - DFG should inline code blocks that use new_array_buffer - https://bugs.webkit.org/show_bug.cgi?id=98996 - - Reviewed by Geoffrey Garen. - - This adds plumbing to drop in constant buffers from the inlinees to the inliner. - It's smart about not duplicating buffers needlessly but doesn't try to completely - hash-cons them, either. - - * bytecode/CodeBlock.h: - (JSC::CodeBlock::numberOfConstantBuffers): - (JSC::CodeBlock::addConstantBuffer): - (JSC::CodeBlock::constantBufferAsVector): - (JSC::CodeBlock::constantBuffer): - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGByteCodeParser.cpp: - (ConstantBufferKey): - (JSC::DFG::ConstantBufferKey::ConstantBufferKey): - (JSC::DFG::ConstantBufferKey::operator==): - (JSC::DFG::ConstantBufferKey::hash): - (JSC::DFG::ConstantBufferKey::isHashTableDeletedValue): - (JSC::DFG::ConstantBufferKey::codeBlock): - (JSC::DFG::ConstantBufferKey::index): - (DFG): - (JSC::DFG::ConstantBufferKeyHash::hash): - (JSC::DFG::ConstantBufferKeyHash::equal): - (ConstantBufferKeyHash): - (WTF): - (ByteCodeParser): - (InlineStackEntry): - (JSC::DFG::ByteCodeParser::parseBlock): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - * dfg/DFGCapabilities.h: - (JSC::DFG::canInlineOpcode): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGSpeculativeJIT.h: - (JSC::DFG::SpeculativeJIT::callOperation): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - -2012-10-10 Zoltan Horvath - - Pageload tests should measure memory usage - https://bugs.webkit.org/show_bug.cgi?id=93958 - - Reviewed by Ryosuke Niwa. - - Add JS Heap and Heap memory measurement to PageLoad tests. - - * heap/HeapStatistics.cpp: - (JSC::HeapStatistics::usedJSHeap): Add new private function to expose the used JS Heap size. - (JSC): - * heap/HeapStatistics.h: - (HeapStatistics): Add new private function to expose the used JS Heap size. - -2012-10-10 Balazs Kilvady - - RegisterFile to JSStack rename fix for a struct member. - - Compilation problem in debug build on MIPS - https://bugs.webkit.org/show_bug.cgi?id=98808 - - Reviewed by Alexey Proskuryakov. - - In ASSERT conditions structure field name "registerFile" was replaced - with type name "JSStack" and it should be "stack". - - * jit/JITStubs.cpp: - (JSC::JITThunks::JITThunks): structure member name fix. - -2012-10-10 Michael Saboff - - After r130344, OpaqueJSString::string() shouldn't directly return the wrapped String - https://bugs.webkit.org/show_bug.cgi?id=98801 - - Reviewed by Geoffrey Garen. - - Return a copy of the wrapped String so that the wrapped string cannot be turned into - an Identifier. - - * API/OpaqueJSString.cpp: - (OpaqueJSString::string): - * API/OpaqueJSString.h: - (OpaqueJSString): - -2012-10-10 Peter Gal - - Add moveDoubleToInts and moveIntsToDouble to MacroAssemblerARM - https://bugs.webkit.org/show_bug.cgi?id=98855 - - Reviewed by Filip Pizlo. - - Implement the missing moveDoubleToInts and moveIntsToDouble - methods in the MacroAssemblerARM after r130839. - - * assembler/MacroAssemblerARM.h: - (JSC::MacroAssemblerARM::moveDoubleToInts): - (MacroAssemblerARM): - (JSC::MacroAssemblerARM::moveIntsToDouble): - -2012-10-09 Filip Pizlo - - Typed arrays should not be 20x slower in the baseline JIT than in the DFG JIT - https://bugs.webkit.org/show_bug.cgi?id=98605 - - Reviewed by Oliver Hunt and Gavin Barraclough. - - This adds typed array get_by_val/put_by_val patching to the baseline JIT. It's - a big (~40%) win on benchmarks that have trouble staying in the DFG JIT. Even - if we fix those benchmarks, this functionality gives us the insurance that we - typically desire with all speculative optimizations: even if we bail to - baseline, we're still reasonably performant. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * assembler/MacroAssembler.cpp: Added. - (JSC): - * assembler/MacroAssembler.h: - (MacroAssembler): - (JSC::MacroAssembler::patchableBranchPtr): - * assembler/MacroAssemblerARMv7.h: - (MacroAssemblerARMv7): - (JSC::MacroAssemblerARMv7::moveDoubleToInts): - (JSC::MacroAssemblerARMv7::moveIntsToDouble): - (JSC::MacroAssemblerARMv7::patchableBranchPtr): - * assembler/MacroAssemblerX86.h: - (MacroAssemblerX86): - (JSC::MacroAssemblerX86::moveDoubleToInts): - (JSC::MacroAssemblerX86::moveIntsToDouble): - * bytecode/ByValInfo.h: - (JSC::hasOptimizableIndexingForClassInfo): - (JSC): - (JSC::hasOptimizableIndexing): - (JSC::jitArrayModeForClassInfo): - (JSC::jitArrayModeForStructure): - (JSC::ByValInfo::ByValInfo): - (ByValInfo): - * dfg/DFGAssemblyHelpers.cpp: - (DFG): - * dfg/DFGAssemblyHelpers.h: - (AssemblyHelpers): - (JSC::DFG::AssemblyHelpers::boxDouble): - (JSC::DFG::AssemblyHelpers::unboxDouble): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): - (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - * jit/JIT.h: - (JIT): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::privateCompileGetByVal): - (JSC::JIT::privateCompilePutByVal): - (JSC::JIT::emitIntTypedArrayGetByVal): - (JSC): - (JSC::JIT::emitFloatTypedArrayGetByVal): - (JSC::JIT::emitIntTypedArrayPutByVal): - (JSC::JIT::emitFloatTypedArrayPutByVal): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - * jit/JITStubs.cpp: - (JSC::DEFINE_STUB_FUNCTION): - * runtime/JSCell.h: - * runtime/JSGlobalData.h: - (JSGlobalData): - (JSC::JSGlobalData::typedArrayDescriptor): - * runtime/TypedArrayDescriptor.h: Added. - (JSC): - (JSC::TypedArrayDescriptor::TypedArrayDescriptor): - (TypedArrayDescriptor): - -2012-10-09 Michael Saboff - - Add tests to testapi for null OpaqueJSStrings - https://bugs.webkit.org/show_bug.cgi?id=98805 - - Reviewed by Geoffrey Garen. - - Added tests that check that OpaqueJSString, which is wrapped via JSStringRef, properly returns - null strings and that a null string in a JSStringRef will return a NULL JSChar* and 0 length - via the JSStringGetCharactersPtr() and JSStringGetLength() APIs respectively. Added a check that - JSValueMakeFromJSONString() properly handles a null string as well. - - * API/tests/testapi.c: - (main): - -2012-10-09 Jian Li - - Update the CSS property used to support draggable regions. - https://bugs.webkit.org/show_bug.cgi?id=97156 - - Reviewed by Adam Barth. - - The CSS property to support draggable regions, guarded under - WIDGET_REGION is now disabled from Mac WebKit, in order not to cause - confusion with DASHBOARD_SUPPORT feature. - - * Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature. - -2012-10-09 Filip Pizlo - - Unreviewed, adding forgotten files. - - * bytecode/ByValInfo.h: Added. - (JSC): - (JSC::isOptimizableIndexingType): - (JSC::jitArrayModeForIndexingType): - (JSC::ByValInfo::ByValInfo): - (ByValInfo): - (JSC::getByValInfoBytecodeIndex): - * runtime/IndexingType.cpp: Added. - (JSC): - (JSC::indexingTypeToString): - -2012-10-08 Filip Pizlo - - JSC should infer when indexed storage is contiguous, and optimize for it - https://bugs.webkit.org/show_bug.cgi?id=97288 - - Reviewed by Mark Hahnenberg. - - This introduces a new kind of indexed property storage called Contiguous, - which has the following properties: - - - No header bits beyond IndexedHeader. This results in a 16 byte reduction - in memory usage per array versus an ArrayStorage array. It also means - that the total memory usage for an empty array is now just 3 * 8 on both - 32-bit and 64-bit. Of that, only 8 bytes are array-specific; the rest is - our standard object header overhead. - - - No need for hole checks on store. This results in a ~4% speed-up on - Kraken and a ~1% speed-up on V8v7. - - - publicLength <= vectorLength. This means that doing new Array(blah) - immediately allocates room for blah elements. - - - No sparse map or index bias. - - If you ever do things to an array that would require publicLength > - vectorLength, a sparse map, or index bias, then we switch to ArrayStorage - mode. This seems to never happen in any benchmark we track, and is unlikely - to happen very frequently on any website. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * assembler/AbstractMacroAssembler.h: - (JSC::AbstractMacroAssembler::JumpList::append): - * assembler/MacroAssembler.h: - (MacroAssembler): - (JSC::MacroAssembler::patchableBranchTest32): - * bytecode/ByValInfo.h: Added. - (JSC): - (JSC::isOptimizableIndexingType): - (JSC::jitArrayModeForIndexingType): - (JSC::ByValInfo::ByValInfo): - (ByValInfo): - (JSC::getByValInfoBytecodeIndex): - * bytecode/CodeBlock.h: - (CodeBlock): - (JSC::CodeBlock::getByValInfo): - (JSC::CodeBlock::setNumberOfByValInfos): - (JSC::CodeBlock::numberOfByValInfos): - (JSC::CodeBlock::byValInfo): - * bytecode/SamplingTool.h: - * dfg/DFGAbstractState.cpp: - (JSC::DFG::AbstractState::execute): - * dfg/DFGArrayMode.cpp: - (JSC::DFG::fromObserved): - (JSC::DFG::modeAlreadyChecked): - (JSC::DFG::modeToString): - * dfg/DFGArrayMode.h: - (DFG): - (JSC::DFG::modeUsesButterfly): - (JSC::DFG::modeIsJSArray): - (JSC::DFG::isInBoundsAccess): - (JSC::DFG::mayStoreToTail): - (JSC::DFG::mayStoreToHole): - (JSC::DFG::modeIsPolymorphic): - (JSC::DFG::polymorphicIncludesContiguous): - (JSC::DFG::polymorphicIncludesArrayStorage): - (JSC::DFG::canCSEStorage): - (JSC::DFG::modeSupportsLength): - (JSC::DFG::benefitsFromStructureCheck): - (JSC::DFG::isEffectful): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::handleIntrinsic): - * dfg/DFGCSEPhase.cpp: - (JSC::DFG::CSEPhase::getArrayLengthElimination): - (JSC::DFG::CSEPhase::getByValLoadElimination): - (JSC::DFG::CSEPhase::performNodeCSE): - * dfg/DFGFixupPhase.cpp: - (JSC::DFG::FixupPhase::fixupNode): - (JSC::DFG::FixupPhase::checkArray): - (JSC::DFG::FixupPhase::blessArrayOperation): - * dfg/DFGGraph.h: - (JSC::DFG::Graph::byValIsPure): - * dfg/DFGOperations.cpp: - * dfg/DFGOperations.h: - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryCacheGetByID): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::checkArray): - (JSC::DFG::SpeculativeJIT::arrayify): - (JSC::DFG::SpeculativeJIT::compileGetArrayLength): - (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): - (DFG): - * dfg/DFGSpeculativeJIT.h: - (DFG): - (JSC::DFG::SpeculativeJIT::callOperation): - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister): - (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal): - (DFG): - (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal): - (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): - (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal): - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal): - (DFG): - (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal): - (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): - (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal): - (JSC::DFG::SpeculativeJIT::compile): - * interpreter/Interpreter.cpp: - (SamplingScope): - (JSC::SamplingScope::SamplingScope): - (JSC::SamplingScope::~SamplingScope): - (JSC): - (JSC::Interpreter::execute): - * jit/JIT.cpp: - (JSC::JIT::privateCompileSlowCases): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC::ByValCompilationInfo::ByValCompilationInfo): - (ByValCompilationInfo): - (JSC): - (JIT): - (JSC::JIT::compileGetByVal): - (JSC::JIT::compilePutByVal): - * jit/JITInlineMethods.h: - (JSC::JIT::emitAllocateJSArray): - (JSC::JIT::emitArrayProfileStoreToHoleSpecialCase): - (JSC): - (JSC::arrayProfileSaw): - (JSC::JIT::chooseArrayMode): - * jit/JITOpcodes.cpp: - (JSC::JIT::emitSlow_op_get_argument_by_val): - (JSC::JIT::emit_op_new_array): - (JSC::JIT::emitSlow_op_new_array): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::emitSlow_op_get_argument_by_val): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC): - (JSC::JIT::emitContiguousGetByVal): - (JSC::JIT::emitArrayStorageGetByVal): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitContiguousPutByVal): - (JSC::JIT::emitArrayStoragePutByVal): - (JSC::JIT::emitSlow_op_put_by_val): - (JSC::JIT::privateCompilePatchGetArrayLength): - (JSC::JIT::privateCompileGetByVal): - (JSC::JIT::privateCompilePutByVal): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_by_val): - (JSC): - (JSC::JIT::emitContiguousGetByVal): - (JSC::JIT::emitArrayStorageGetByVal): - (JSC::JIT::emitSlow_op_get_by_val): - (JSC::JIT::emit_op_put_by_val): - (JSC::JIT::emitContiguousPutByVal): - (JSC::JIT::emitArrayStoragePutByVal): - (JSC::JIT::emitSlow_op_put_by_val): - * jit/JITStubs.cpp: - (JSC::getByVal): - (JSC): - (JSC::DEFINE_STUB_FUNCTION): - (JSC::putByVal): - * jit/JITStubs.h: - * llint/LowLevelInterpreter.asm: - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: - * runtime/ArrayConventions.h: - (JSC::isDenseEnoughForVector): - * runtime/ArrayPrototype.cpp: - (JSC): - (JSC::shift): - (JSC::unshift): - (JSC::arrayProtoFuncPush): - (JSC::arrayProtoFuncShift): - (JSC::arrayProtoFuncSplice): - (JSC::arrayProtoFuncUnShift): - * runtime/Butterfly.h: - (Butterfly): - (JSC::Butterfly::fromPointer): - (JSC::Butterfly::pointer): - (JSC::Butterfly::publicLength): - (JSC::Butterfly::vectorLength): - (JSC::Butterfly::setPublicLength): - (JSC::Butterfly::setVectorLength): - (JSC::Butterfly::contiguous): - (JSC::Butterfly::fromContiguous): - * runtime/ButterflyInlineMethods.h: - (JSC::Butterfly::unshift): - (JSC::Butterfly::shift): - * runtime/IndexingHeaderInlineMethods.h: - (JSC::IndexingHeader::indexingPayloadSizeInBytes): - * runtime/IndexingType.cpp: Added. - (JSC): - (JSC::indexingTypeToString): - * runtime/IndexingType.h: - (JSC): - (JSC::hasContiguous): - * runtime/JSArray.cpp: - (JSC::JSArray::setLengthWithArrayStorage): - (JSC::JSArray::setLength): - (JSC): - (JSC::JSArray::pop): - (JSC::JSArray::push): - (JSC::JSArray::shiftCountWithArrayStorage): - (JSC::JSArray::shiftCountWithAnyIndexingType): - (JSC::JSArray::unshiftCountWithArrayStorage): - (JSC::JSArray::unshiftCountWithAnyIndexingType): - (JSC::JSArray::sortNumericVector): - (JSC::JSArray::sortNumeric): - (JSC::JSArray::sortCompactedVector): - (JSC::JSArray::sort): - (JSC::JSArray::sortVector): - (JSC::JSArray::fillArgList): - (JSC::JSArray::copyToArguments): - (JSC::JSArray::compactForSorting): - * runtime/JSArray.h: - (JSC::JSArray::shiftCountForShift): - (JSC::JSArray::shiftCountForSplice): - (JSArray): - (JSC::JSArray::shiftCount): - (JSC::JSArray::unshiftCountForShift): - (JSC::JSArray::unshiftCountForSplice): - (JSC::JSArray::unshiftCount): - (JSC::JSArray::isLengthWritable): - (JSC::createContiguousArrayButterfly): - (JSC): - (JSC::JSArray::create): - (JSC::JSArray::tryCreateUninitialized): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::reset): - (JSC): - (JSC::JSGlobalObject::haveABadTime): - (JSC::JSGlobalObject::visitChildren): - * runtime/JSGlobalObject.h: - (JSGlobalObject): - (JSC::JSGlobalObject::arrayStructureWithArrayStorage): - (JSC::JSGlobalObject::addressOfArrayStructureWithArrayStorage): - (JSC::constructEmptyArray): - * runtime/JSObject.cpp: - (JSC::JSObject::visitButterfly): - (JSC::JSObject::getOwnPropertySlotByIndex): - (JSC::JSObject::putByIndex): - (JSC::JSObject::enterDictionaryIndexingMode): - (JSC::JSObject::createInitialContiguous): - (JSC): - (JSC::JSObject::createArrayStorage): - (JSC::JSObject::convertContiguousToArrayStorage): - (JSC::JSObject::ensureContiguousSlow): - (JSC::JSObject::ensureArrayStorageSlow): - (JSC::JSObject::ensureIndexedStorageSlow): - (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode): - (JSC::JSObject::switchToSlowPutArrayStorage): - (JSC::JSObject::setPrototype): - (JSC::JSObject::deletePropertyByIndex): - (JSC::JSObject::getOwnPropertyNames): - (JSC::JSObject::defineOwnIndexedProperty): - (JSC::JSObject::putByIndexBeyondVectorLengthContiguousWithoutAttributes): - (JSC::JSObject::putByIndexBeyondVectorLength): - (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage): - (JSC::JSObject::putDirectIndexBeyondVectorLength): - (JSC::JSObject::getNewVectorLength): - (JSC::JSObject::countElementsInContiguous): - (JSC::JSObject::increaseVectorLength): - (JSC::JSObject::ensureContiguousLengthSlow): - (JSC::JSObject::getOwnPropertyDescriptor): - * runtime/JSObject.h: - (JSC::JSObject::getArrayLength): - (JSC::JSObject::getVectorLength): - (JSC::JSObject::canGetIndexQuickly): - (JSC::JSObject::getIndexQuickly): - (JSC::JSObject::tryGetIndexQuickly): - (JSC::JSObject::canSetIndexQuickly): - (JSC::JSObject::canSetIndexQuicklyForPutDirect): - (JSC::JSObject::setIndexQuickly): - (JSC::JSObject::initializeIndex): - (JSC::JSObject::hasSparseMap): - (JSC::JSObject::inSparseIndexingMode): - (JSObject): - (JSC::JSObject::ensureContiguous): - (JSC::JSObject::ensureIndexedStorage): - (JSC::JSObject::ensureContiguousLength): - (JSC::JSObject::indexingData): - (JSC::JSObject::relevantLength): - * runtime/JSValue.cpp: - (JSC::JSValue::description): - * runtime/Options.cpp: - (JSC::Options::initialize): - * runtime/Structure.cpp: - (JSC::Structure::needsSlowPutIndexing): - (JSC): - (JSC::Structure::suggestedArrayStorageTransition): - * runtime/Structure.h: - (Structure): - * runtime/StructureTransitionTable.h: - (JSC::newIndexingType): - -2012-10-09 Michael Saboff - - After r130344, OpaqueJSString::identifier() adds wrapped String to identifier table - https://bugs.webkit.org/show_bug.cgi?id=98693 - REGRESSION (r130344): Install failed in Install Environment - - - Reviewed by Mark Rowe. - - Use Identifier(LChar*, length) or Identifier(UChar*, length) constructors so that we don't - add the String instance in the OpaqueJSString to any identifier tables. - - * API/OpaqueJSString.cpp: - (OpaqueJSString::identifier): - -2012-10-08 Mark Lam - - Renamed RegisterFile to JSStack, and removed prototype of the - previously deleted Interpreter::privateExecute(). - https://bugs.webkit.org/show_bug.cgi?id=98717. - - Reviewed by Filip Pizlo. - - * CMakeLists.txt: - * GNUmakefile.list.am: - * JavaScriptCore.order: - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: - * JavaScriptCore.xcodeproj/project.pbxproj: - * Target.pri: - * bytecode/BytecodeConventions.h: - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::nameForRegister): - * bytecode/CodeBlock.h: - (CodeBlock): - * bytecode/ValueRecovery.h: - (JSC::ValueRecovery::alreadyInJSStack): - (JSC::ValueRecovery::alreadyInJSStackAsUnboxedInt32): - (JSC::ValueRecovery::alreadyInJSStackAsUnboxedCell): - (JSC::ValueRecovery::alreadyInJSStackAsUnboxedBoolean): - (JSC::ValueRecovery::alreadyInJSStackAsUnboxedDouble): - (JSC::ValueRecovery::displacedInJSStack): - (JSC::ValueRecovery::isAlreadyInJSStack): - (JSC::ValueRecovery::virtualRegister): - (JSC::ValueRecovery::dump): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::resolveCallee): - (JSC::BytecodeGenerator::emitCall): - (JSC::BytecodeGenerator::emitConstruct): - * bytecompiler/BytecodeGenerator.h: - (JSC::BytecodeGenerator::registerFor): - * dfg/DFGAbstractState.h: - (AbstractState): - * dfg/DFGAssemblyHelpers.h: - (JSC::DFG::AssemblyHelpers::emitGetFromCallFrameHeaderPtr): - (JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader): - (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::getDirect): - (JSC::DFG::ByteCodeParser::findArgumentPositionForLocal): - (JSC::DFG::ByteCodeParser::addCall): - (JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand): - (JSC::DFG::ByteCodeParser::handleInlining): - (JSC::DFG::ByteCodeParser::parseBlock): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - * dfg/DFGGenerationInfo.h: - (GenerationInfo): - (JSC::DFG::GenerationInfo::needsSpill): - * dfg/DFGGraph.h: - * dfg/DFGJITCompiler.cpp: - (JSC::DFG::JITCompiler::compileEntry): - (JSC::DFG::JITCompiler::compileFunction): - * dfg/DFGJITCompiler.h: - (JSC::DFG::JITCompiler::beginCall): - * dfg/DFGOSREntry.cpp: - (JSC::DFG::prepareOSREntry): - * dfg/DFGOSRExitCompiler32_64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGOSRExitCompiler64.cpp: - (JSC::DFG::OSRExitCompiler::compileExit): - * dfg/DFGRepatch.cpp: - (JSC::DFG::tryBuildGetByIDList): - * dfg/DFGSpeculativeJIT.cpp: - (JSC::DFG::SpeculativeJIT::compile): - (JSC::DFG::SpeculativeJIT::checkArgumentTypes): - (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor): - * dfg/DFGSpeculativeJIT.h: - (SpeculativeJIT): - (JSC::DFG::SpeculativeJIT::spill): - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::emitCall): - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::fillInteger): - (JSC::DFG::SpeculativeJIT::emitCall): - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGThunks.cpp: - (JSC::DFG::throwExceptionFromCallSlowPathGenerator): - (JSC::DFG::slowPathFor): - (JSC::DFG::virtualForThunkGenerator): - * dfg/DFGValueSource.cpp: - (JSC::DFG::ValueSource::dump): - * dfg/DFGValueSource.h: - (JSC::DFG::dataFormatToValueSourceKind): - (JSC::DFG::valueSourceKindToDataFormat): - (JSC::DFG::isInJSStack): - (JSC::DFG::ValueSource::forSpeculation): - (JSC::DFG::ValueSource::isInJSStack): - (JSC::DFG::ValueSource::valueRecovery): - * dfg/DFGVariableEventStream.cpp: - (JSC::DFG::VariableEventStream::reconstruct): - * heap/Heap.cpp: - (JSC::Heap::stack): - (JSC::Heap::getConservativeRegisterRoots): - (JSC::Heap::markRoots): - * heap/Heap.h: - (JSC): - (Heap): - * interpreter/CallFrame.cpp: - (JSC::CallFrame::stack): - * interpreter/CallFrame.h: - (JSC::ExecState::calleeAsValue): - (JSC::ExecState::callee): - (JSC::ExecState::codeBlock): - (JSC::ExecState::scope): - (JSC::ExecState::callerFrame): - (JSC::ExecState::returnPC): - (JSC::ExecState::hasReturnPC): - (JSC::ExecState::clearReturnPC): - (JSC::ExecState::bytecodeOffsetForNonDFGCode): - (JSC::ExecState::setBytecodeOffsetForNonDFGCode): - (JSC::ExecState::inlineCallFrame): - (JSC::ExecState::codeOriginIndexForDFG): - (JSC::ExecState::currentVPC): - (JSC::ExecState::setCurrentVPC): - (JSC::ExecState::setCallerFrame): - (JSC::ExecState::setScope): - (JSC::ExecState::init): - (JSC::ExecState::argumentCountIncludingThis): - (JSC::ExecState::offsetFor): - (JSC::ExecState::setArgumentCountIncludingThis): - (JSC::ExecState::setCallee): - (JSC::ExecState::setCodeBlock): - (JSC::ExecState::setReturnPC): - (JSC::ExecState::setInlineCallFrame): - (ExecState): - * interpreter/Interpreter.cpp: - (JSC::Interpreter::slideRegisterWindowForCall): - (JSC::eval): - (JSC::loadVarargs): - (JSC::Interpreter::dumpRegisters): - (JSC::Interpreter::throwException): - (JSC::Interpreter::execute): - (JSC::Interpreter::executeCall): - (JSC::Interpreter::executeConstruct): - (JSC::Interpreter::prepareForRepeatCall): - (JSC::Interpreter::endRepeatCall): - * interpreter/Interpreter.h: - (JSC::Interpreter::stack): - (Interpreter): - (JSC::Interpreter::execute): - (JSC): - * interpreter/JSStack.cpp: Copied from Source/JavaScriptCore/interpreter/RegisterFile.cpp. - (JSC::stackStatisticsMutex): - (JSC::JSStack::~JSStack): - (JSC::JSStack::growSlowCase): - (JSC::JSStack::gatherConservativeRoots): - (JSC::JSStack::releaseExcessCapacity): - (JSC::JSStack::initializeThreading): - (JSC::JSStack::committedByteCount): - (JSC::JSStack::addToCommittedByteCount): - * interpreter/JSStack.h: Copied from Source/JavaScriptCore/interpreter/RegisterFile.h. - (JSStack): - (JSC::JSStack::JSStack): - (JSC::JSStack::shrink): - (JSC::JSStack::grow): - * interpreter/RegisterFile.cpp: Removed. - * interpreter/RegisterFile.h: Removed. - * interpreter/VMInspector.cpp: - (JSC::VMInspector::dumpFrame): - * jit/JIT.cpp: - (JSC::JIT::JIT): - (JSC::JIT::privateCompile): - * jit/JIT.h: - (JSC): - (JIT): - * jit/JITCall.cpp: - (JSC::JIT::compileLoadVarargs): - (JSC::JIT::compileCallEval): - (JSC::JIT::compileCallEvalSlowCase): - (JSC::JIT::compileOpCall): - * jit/JITCall32_64.cpp: - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_ret_object_or_this): - (JSC::JIT::compileLoadVarargs): - (JSC::JIT::compileCallEval): - (JSC::JIT::compileCallEvalSlowCase): - (JSC::JIT::compileOpCall): - * jit/JITCode.h: - (JSC): - (JSC::JITCode::execute): - * jit/JITInlineMethods.h: - (JSC::JIT::emitPutToCallFrameHeader): - (JSC::JIT::emitPutCellToCallFrameHeader): - (JSC::JIT::emitPutIntToCallFrameHeader): - (JSC::JIT::emitPutImmediateToCallFrameHeader): - (JSC::JIT::emitGetFromCallFrameHeaderPtr): - (JSC::JIT::emitGetFromCallFrameHeader32): - (JSC::JIT::updateTopCallFrame): - (JSC::JIT::unmap): - * jit/JITOpcodes.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_ret): - (JSC::JIT::emit_op_ret_object_or_this): - (JSC::JIT::emit_op_create_this): - (JSC::JIT::emit_op_get_arguments_length): - (JSC::JIT::emit_op_get_argument_by_val): - (JSC::JIT::emit_op_resolve_global_dynamic): - * jit/JITOpcodes32_64.cpp: - (JSC::JIT::privateCompileCTIMachineTrampolines): - (JSC::JIT::privateCompileCTINativeCall): - (JSC::JIT::emit_op_end): - (JSC::JIT::emit_op_create_this): - (JSC::JIT::emit_op_get_arguments_length): - (JSC::JIT::emit_op_get_argument_by_val): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - * jit/JITPropertyAccess32_64.cpp: - (JSC::JIT::emit_op_get_scoped_var): - (JSC::JIT::emit_op_put_scoped_var): - * jit/JITStubs.cpp: - (JSC::ctiTrampoline): - (JSC::JITThunks::JITThunks): - (JSC): - (JSC::DEFINE_STUB_FUNCTION): - * jit/JITStubs.h: - (JSC): - (JITStackFrame): - * jit/JSInterfaceJIT.h: - * jit/SpecializedThunkJIT.h: - (JSC::SpecializedThunkJIT::SpecializedThunkJIT): - (JSC::SpecializedThunkJIT::returnJSValue): - (JSC::SpecializedThunkJIT::returnDouble): - (JSC::SpecializedThunkJIT::returnInt32): - (JSC::SpecializedThunkJIT::returnJSCell): - * llint/LLIntData.cpp: - (JSC::LLInt::Data::performAssertions): - * llint/LLIntOffsetsExtractor.cpp: - * llint/LLIntSlowPaths.cpp: - (JSC::LLInt::LLINT_SLOW_PATH_DECL): - (JSC::LLInt::genericCall): - * llint/LLIntSlowPaths.h: - (LLInt): - * llint/LowLevelInterpreter.asm: - * runtime/Arguments.cpp: - (JSC::Arguments::tearOffForInlineCallFrame): - * runtime/CommonSlowPaths.h: - (JSC::CommonSlowPaths::arityCheckFor): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): - * runtime/JSActivation.cpp: - (JSC::JSActivation::visitChildren): - * runtime/JSGlobalObject.cpp: - (JSC::JSGlobalObject::globalExec): - * runtime/JSGlobalObject.h: - (JSC): - (JSGlobalObject): - * runtime/JSLock.cpp: - (JSC): - * runtime/JSVariableObject.h: - (JSVariableObject): - * runtime/MemoryStatistics.cpp: - (JSC::globalMemoryStatistics): - -2012-10-08 Kiran Muppala - - Throttle DOM timers on hidden pages. - https://bugs.webkit.org/show_bug.cgi?id=98474 - - Reviewed by Maciej Stachowiak. - - Add HIDDEN_PAGE_DOM_TIMER_THROTTLING feature define. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-08 Michael Saboff - - After r130344, OpaqueJSString() creates an empty string which should be a null string - https://bugs.webkit.org/show_bug.cgi?id=98417 - - Reviewed by Sam Weinig. - - Changed create() of a null string to return 0. This is the same behavior as before r130344. - - * API/OpaqueJSString.cpp: - (OpaqueJSString::create): - -2012-10-07 Caio Marcelo de Oliveira Filho - - Rename first/second to key/value in HashMap iterators - https://bugs.webkit.org/show_bug.cgi?id=82784 - - Reviewed by Eric Seidel. - - * API/JSCallbackObject.h: - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): - (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren): - * API/JSCallbackObjectFunctions.h: - (JSC::::getOwnNonIndexPropertyNames): - * API/JSClassRef.cpp: - (OpaqueJSClass::~OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): - (OpaqueJSClass::contextData): - * bytecode/CodeBlock.cpp: - (JSC::CodeBlock::dump): - (JSC::EvalCodeCache::visitAggregate): - (JSC::CodeBlock::nameForRegister): - * bytecode/JumpTable.h: - (JSC::StringJumpTable::offsetForValue): - (JSC::StringJumpTable::ctiForValue): - * bytecode/LazyOperandValueProfile.cpp: - (JSC::LazyOperandValueProfileParser::getIfPresent): - * bytecode/SamplingTool.cpp: - (JSC::SamplingTool::dump): - * bytecompiler/BytecodeGenerator.cpp: - (JSC::BytecodeGenerator::addVar): - (JSC::BytecodeGenerator::addGlobalVar): - (JSC::BytecodeGenerator::addConstant): - (JSC::BytecodeGenerator::addConstantValue): - (JSC::BytecodeGenerator::emitLoad): - (JSC::BytecodeGenerator::addStringConstant): - (JSC::BytecodeGenerator::emitLazyNewFunction): - * bytecompiler/NodesCodegen.cpp: - (JSC::PropertyListNode::emitBytecode): - * debugger/Debugger.cpp: - * dfg/DFGArgumentsSimplificationPhase.cpp: - (JSC::DFG::ArgumentsSimplificationPhase::run): - (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse): - (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse): - (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize): - (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild): - * dfg/DFGAssemblyHelpers.cpp: - (JSC::DFG::AssemblyHelpers::decodedCodeMapFor): - * dfg/DFGByteCodeCache.h: - (JSC::DFG::ByteCodeCache::~ByteCodeCache): - (JSC::DFG::ByteCodeCache::get): - * dfg/DFGByteCodeParser.cpp: - (JSC::DFG::ByteCodeParser::cellConstant): - (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): - * dfg/DFGStructureCheckHoistingPhase.cpp: - (JSC::DFG::StructureCheckHoistingPhase::run): - (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck): - (JSC::DFG::StructureCheckHoistingPhase::noticeClobber): - * heap/Heap.cpp: - (JSC::Heap::markProtectedObjects): - * heap/Heap.h: - (JSC::Heap::forEachProtectedCell): - * heap/JITStubRoutineSet.cpp: - (JSC::JITStubRoutineSet::markSlow): - (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines): - * heap/SlotVisitor.cpp: - (JSC::SlotVisitor::internalAppend): - * heap/Weak.h: - (JSC::weakRemove): - * jit/JIT.cpp: - (JSC::JIT::privateCompile): - * jit/JITStubs.cpp: - (JSC::JITThunks::ctiStub): - * parser/Parser.cpp: - (JSC::::parseStrictObjectLiteral): - * profiler/Profile.cpp: - (JSC::functionNameCountPairComparator): - (JSC::Profile::debugPrintDataSampleStyle): - * runtime/Identifier.cpp: - (JSC::Identifier::add): - * runtime/JSActivation.cpp: - (JSC::JSActivation::getOwnNonIndexPropertyNames): - (JSC::JSActivation::symbolTablePutWithAttributes): - * runtime/JSArray.cpp: - (JSC::JSArray::setLength): - * runtime/JSObject.cpp: - (JSC::JSObject::getOwnPropertySlotByIndex): - (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists): - (JSC::JSObject::deletePropertyByIndex): - (JSC::JSObject::getOwnPropertyNames): - (JSC::JSObject::defineOwnIndexedProperty): - (JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype): - (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage): - (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage): - (JSC::JSObject::getOwnPropertyDescriptor): - * runtime/JSSymbolTableObject.cpp: - (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames): - * runtime/JSSymbolTableObject.h: - (JSC::symbolTableGet): - (JSC::symbolTablePut): - (JSC::symbolTablePutWithAttributes): - * runtime/RegExpCache.cpp: - (JSC::RegExpCache::invalidateCode): - * runtime/SparseArrayValueMap.cpp: - (JSC::SparseArrayValueMap::putEntry): - (JSC::SparseArrayValueMap::putDirect): - (JSC::SparseArrayValueMap::visitChildren): - * runtime/WeakGCMap.h: - (JSC::WeakGCMap::clear): - (JSC::WeakGCMap::set): - * tools/ProfileTreeNode.h: - (JSC::ProfileTreeNode::sampleChild): - (JSC::ProfileTreeNode::childCount): - (JSC::ProfileTreeNode::dumpInternal): - (JSC::ProfileTreeNode::compareEntries): - -2012-10-05 Mark Hahnenberg - - JSC should have a way to gather and log Heap memory use and pause times - https://bugs.webkit.org/show_bug.cgi?id=98431 - - Reviewed by Geoffrey Garen. - - In order to improve our infrastructure for benchmark-driven development, we should - have a centralized method of gathering and logging various statistics about the state - of the JS heap. This would allow us to create and to use other tools to analyze the - output of the VM after running various workloads. - - The first two statistics that might be interesting is memory use by JSC and GC pause - times. We can control whether this recording happens through the use of the Options - class, allowing us to either use environment variables or command line flags. - - * JavaScriptCore.xcodeproj/project.pbxproj: - * heap/Heap.cpp: - (JSC::Heap::collect): If we finish a collection and are still over our set GC heap size, - we end the program immediately and report an error. Also added recording of pause times. - * heap/Heap.h: - (Heap): - (JSC::Heap::shouldCollect): When we set a specific GC heap size through Options, we - ignore all other heuristics on when we should collect and instead only ask if we're - greater than the amount specified in the Option value. This allows us to view time/memory - tradeoffs more clearly. - * heap/HeapStatistics.cpp: Added. - (JSC): - (JSC::HeapStatistics::initialize): - (JSC::HeapStatistics::recordGCPauseTime): - (JSC::HeapStatistics::logStatistics): - (JSC::HeapStatistics::exitWithFailure): - (JSC::HeapStatistics::reportSuccess): - (JSC::HeapStatistics::parseMemoryAmount): - (StorageStatistics): - (JSC::StorageStatistics::StorageStatistics): - (JSC::StorageStatistics::operator()): - (JSC::StorageStatistics::objectWithOutOfLineStorageCount): - (JSC::StorageStatistics::objectCount): - (JSC::StorageStatistics::storageSize): - (JSC::StorageStatistics::storageCapacity): - (JSC::HeapStatistics::showObjectStatistics): Moved the old showHeapStatistics (renamed to showObjectStatistics) - to try to start collecting our various memory statistics gathering/reporting mechanisms scattered throughout the - codebase into one place. - * heap/HeapStatistics.h: Added. - (JSC): - (HeapStatistics): - * jsc.cpp: - (main): - * runtime/InitializeThreading.cpp: - (JSC::initializeThreadingOnce): We need to initialize our data structures for recording - statistics if necessary. - * runtime/Options.cpp: Add new Options for the various types of statistics we'll be gathering. - (JSC::parse): - (JSC): - (JSC::Options::initialize): Initialize the various new options using environment variables. - (JSC::Options::dumpOption): - * runtime/Options.h: - (JSC): - -2012-10-04 Rik Cabanier - - Turn Compositing on by default in WebKit build - https://bugs.webkit.org/show_bug.cgi?id=98315 - - Reviewed by Simon Fraser. - - enable -webkit-blend-mode on trunk. - - * Configurations/FeatureDefines.xcconfig: - -2012-10-04 Michael Saboff - - Crash in Safari at com.apple.JavaScriptCore: WTF::StringImpl::is8Bit const + 12 - https://bugs.webkit.org/show_bug.cgi?id=98433 - - Reviewed by Jessie Berlin. - - The problem is due to a String with a null StringImpl (i.e. a null string). - Added a length check before the is8Bit() check since length() checks for a null StringImpl. Changed the - characters16() call to characters() since it can handle a null StringImpl as well. - - * API/JSValueRef.cpp: - (JSValueMakeFromJSONString): - -2012-10-04 Benjamin Poulain - - Use copyLCharsFromUCharSource() for IdentifierLCharFromUCharTranslator translation - https://bugs.webkit.org/show_bug.cgi?id=98335 - - Reviewed by Michael Saboff. - - Michael Saboff added an optimized version of UChar->LChar conversion in r125846. - Use this function in JSC::Identifier. - - * runtime/Identifier.cpp: - (JSC::IdentifierLCharFromUCharTranslator::translate): - -2012-10-04 Michael Saboff - - After r130344, OpaqueJSString() creates a empty string which should be a null string - https://bugs.webkit.org/show_bug.cgi?id=98417 - - Reviewed by Alexey Proskuryakov. - - Removed the setting of enclosed string to an empty string from default constructor. - Before changeset r130344, the semantic was the default constructor produced a null - string. - - * API/OpaqueJSString.h: - (OpaqueJSString::OpaqueJSString): - -2012-10-04 Csaba Osztrogonác - - [Qt] Add missing LLInt dependencies to the build system - https://bugs.webkit.org/show_bug.cgi?id=98394 - - Reviewed by Geoffrey Garen. - - * DerivedSources.pri: - * LLIntOffsetsExtractor.pro: - -2012-10-03 Geoffrey Garen - - Next step toward fixing Windows: add new symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-10-03 Geoffrey Garen - - First step toward fixing Windows: remove old symbol. - - * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: - -2012-10-03 Geoffrey Garen - - Removed the assumption that "final" objects have a fixed number of inline slots - https://bugs.webkit.org/show_bug.cgi?id=98332 - - Reviewed by Filip Pizlo. - - This is a step toward object size inference. - - I replaced the inline storage capacity constant with a data member per - structure, set the the maximum supported value for the constant to 100, - then fixed what broke. (Note that even though this patch increases the - theoretical maximum inline capacity, it doesn't change any actual inline - capacity.) - - * dfg/DFGSpeculativeJIT32_64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * dfg/DFGSpeculativeJIT64.cpp: - (JSC::DFG::SpeculativeJIT::compile): - * jit/JITPropertyAccess.cpp: - (JSC::JIT::compileGetDirectOffset): These functions just get a rename: - the constant they need is the first out of line offset along the offset - number line, which is not necessarily the same thing (and is, in this - patch, never the same thing) as the inline capacity of any given object. - - (JSC::JIT::emit_op_get_by_pname): - * jit/JITPropertyAccess32_64.cpp: This function changes functionality, - since it needs to convert from the abstract offset number line to an - actual offset in memory, and it can't assume that inline and out-of-line - offsets are contiguous on the number line. - - (JSC::JIT::compileGetDirectOffset): Updated for rename. - - (JSC::JIT::emit_op_get_by_pname): Same as emit_op_get_by_pname above. - - * llint/LowLevelInterpreter.asm: Updated to mirror changes in PropertyOffset.h, - since we duplicate values from there. - - * llint/LowLevelInterpreter32_64.asm: - * llint/LowLevelInterpreter64.asm: Just like the JIT, most things are just - renames, and get_by_pname changes to do more math. I also standardized - offset calculations to use a hard-coded "-2", to match the JIT. This - isn't really better, but it makes global search and replace easier, - should we choose to refactor this code not to hard-code constants. - - I also renamed loadPropertyAtVariableOffsetKnownNotFinal to - loadPropertyAtVariableOffsetKnownNotInline in order to sever the assumption - that inline capacity is tied to object type, and I changed the 64bit LLInt - to use this -- not using this previously seems to have been an oversight. - - * runtime/JSObject.cpp: - (JSC::JSObject::visitChildren): - (JSC::JSFinalObject::visitChildren): - * runtime/JSObject.h: - (JSC::JSObject::offsetForLocation): - (JSNonFinalObject): - (JSC::JSFinalObject::createStructure): - (JSFinalObject): - (JSC::JSFinalObject::finishCreation): Updated for above changes. - - * runtime/JSPropertyNameIterator.h: - (JSPropertyNameIterator): - (JSC::JSPropertyNameIterator::finishCreation): Store the inline capacity - of our object, since it's not a constant. - - (JSC::JSPropertyNameIterator::getOffset): Removed. This function was - wrong. Luckily, it was also unused, since the C++ interpreter is gone. - - * runtime/PropertyMapHashTable.h: - (PropertyTable): Use a helper function instead of hard-coding assumptions - about object types. - - (JSC::PropertyTable::nextOffset): - * runtime/PropertyOffset.h: - (JSC): - (JSC::checkOffset): - (JSC::validateOffset): - (JSC::isInlineOffset): - (JSC::numberOfSlotsForLastOffset): - (JSC::propertyOffsetFor): Refactored these functions to take inline capacity - as an argument, since it's not fixed at compile time anymore. - - * runtime/Structure.cpp: - (JSC::Structure::Structure): - (JSC::Structure::flattenDictionaryStructure): - (JSC::Structure::putSpecificValue): - * runtime/Structure.h: - (Structure): - (JSC::Structure::outOfLineCapacity): - (JSC::Structure::hasInlineStorage): - (JSC::Structure::inlineCapacity): - (JSC::Structure::inlineSize): - (JSC::Structure::firstValidOffset): - (JSC::Structure::lastValidOffset): - (JSC::Structure::create): Removed some hard-coded assumptions about inline - capacity and object type, and replaced with more liberal use of helper functions. - -2012-10-03 Michael Saboff - - OpaqueJSString doesn't optimally handle 8 bit strings - https://bugs.webkit.org/show_bug.cgi?id=98300 - - Reviewed by Geoffrey Garen. - - Change OpaqueJSString to store and manage a String instead of a UChar buffer. - The member string is a copy of any string used during creation. - - * API/OpaqueJSString.cpp: - (OpaqueJSString::create): - (OpaqueJSString::identifier): - * API/OpaqueJSString.h: - (OpaqueJSString::characters): - (OpaqueJSString::length): - (OpaqueJSString::string): - (OpaqueJSString::OpaqueJSString): - (OpaqueJSString): - -2012-10-03 Filip Pizlo - - Array.splice should be fast when it is used to remove elements other than the very first - https://bugs.webkit.org/show_bug.cgi?id=98236 - - Reviewed by Michael Saboff. - - Applied the same technique that was used to optimize the unshift case of splice in - http://trac.webkit.org/changeset/129676. This is a >20x speed-up on programs that - use splice for element removal. - - * runtime/ArrayPrototype.cpp: - (JSC::shift): - * runtime/JSArray.cpp: - (JSC::JSArray::shiftCount): - * runtime/JSArray.h: - (JSArray): - -2012-09-16 Mark Hahnenberg - - Delayed structure sweep can leak structures without bound - https://bugs.webkit.org/show_bug.cgi?id=96546 - - Reviewed by Geoffrey Garen. - - This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only - allocators. We now have separate allocators for our three types of objects: those objects with no destructors, - those objects with destructors and with immortal structures, and those objects with destructors that don't have - immortal structures. All of the objects of the third type (destructors without immortal structures) now - inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores - the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction. - - * API/JSCallbackConstructor.cpp: Use JSDestructibleObject for JSCallbackConstructor. - (JSC): - (JSC::JSCallbackConstructor::JSCallbackConstructor): - * API/JSCallbackConstructor.h: - (JSCallbackConstructor): - * API/JSCallbackObject.cpp: Inherit from JSDestructibleObject for normal JSCallbackObjects and use a finalizer for - JSCallbackObject, since JSGlobalObject also uses a finalizer. - (JSC): - (JSC::::create): We need to move the create function for JSCallbackObject out of line so we can add - the finalizer for it. We don't want to add the finalizer is something like finishCreation in case somebody decides - to subclass this. We use this same technique for many other subclasses of JSGlobalObject. - (JSC::::createStructure): - * API/JSCallbackObject.h: - (JSCallbackObject): - (JSC): - * API/JSClassRef.cpp: Change all the JSCallbackObject to use JSDestructibleObject instead. - (OpaqueJSClass::prototype): - * API/JSObjectRef.cpp: Ditto. - (JSObjectMake): - (JSObjectGetPrivate): - (JSObjectSetPrivate): - (JSObjectGetPrivateProperty): - (JSObjectSetPrivateProperty): - (JSObjectDeletePrivateProperty): - * API/JSValueRef.cpp: Ditto. - (JSValueIsObjectOfClass): - * API/JSWeakObjectMapRefPrivate.cpp: Ditto. - * JSCTypedArrayStubs.h: - (JSC): - * JavaScriptCore.xcodeproj/project.pbxproj: - * dfg/DFGSpeculativeJIT.h: Use the proper allocator type when doing inline allocation in the DFG. - (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): - (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject): - * heap/Heap.cpp: - (JSC): - * heap/Heap.h: Add accessors for the various types of allocators now. Also remove the isSafeToSweepStructures function - since it's always safe to sweep Structures now. - (JSC::Heap::allocatorForObjectWithNormalDestructor): - (JSC::Heap::allocatorForObjectWithImmortalStructureDestructor): - (Heap): - (JSC::Heap::allocateWithNormalDestructor): - (JSC): - (JSC::Heap::allocateWithImmortalStructureDestructor): - * heap/IncrementalSweeper.cpp: Remove all the logic to detect when it's safe to sweep Structures from the - IncrementalSweeper since it's always safe to sweep Structures now. - (JSC::IncrementalSweeper::IncrementalSweeper): - (JSC::IncrementalSweeper::sweepNextBlock): - (JSC::IncrementalSweeper::startSweeping): - (JSC::IncrementalSweeper::willFinishSweeping): - (JSC): - * heap/IncrementalSweeper.h: - (IncrementalSweeper): - * heap/MarkedAllocator.cpp: Remove the logic that was preventing us from sweeping Structures if it wasn't safe. Add - tracking of the specific destructor type of allocator. - (JSC::MarkedAllocator::tryAllocateHelper): - (JSC::MarkedAllocator::allocateBlock): - * heap/MarkedAllocator.h: - (JSC::MarkedAllocator::destructorType): - (MarkedAllocator): - (JSC::MarkedAllocator::MarkedAllocator): - (JSC::MarkedAllocator::init): - * heap/MarkedBlock.cpp: Add all the destructor type stuff to MarkedBlocks so that we do the right thing when sweeping. - We also use the stored destructor type to determine the right thing to do in all JSCell::classInfo() calls. - (JSC::MarkedBlock::create): - (JSC::MarkedBlock::MarkedBlock): - (JSC): - (JSC::MarkedBlock::specializedSweep): - (JSC::MarkedBlock::sweep): - (JSC::MarkedBlock::sweepHelper): - * heap/MarkedBlock.h: - (JSC): - (JSC::MarkedBlock::allocator): - (JSC::MarkedBlock::destructorType): - * heap/MarkedSpace.cpp: Add the new destructor allocators to MarkedSpace. - (JSC::MarkedSpace::MarkedSpace): - (JSC::MarkedSpace::resetAllocators): - (JSC::MarkedSpace::canonicalizeCellLivenessData): - (JSC::MarkedSpace::isPagedOut): - (JSC::MarkedSpace::freeBlock): - * heap/MarkedSpace.h: - (MarkedSpace): - (JSC::MarkedSpace::immortalStructureDestructorAllocatorFor): - (JSC::MarkedSpace::normalDestructorAllocatorFor): - (JSC::MarkedSpace::allocateWithImmortalStructureDestructor): - (JSC::MarkedSpace::allocateWithNormalDestructor): - (JSC::MarkedSpace::forEachBlock): - * heap/SlotVisitor.cpp: Add include because the symbol was needed in an inlined function. - * jit/JIT.h: Make sure we use the correct allocator when doing inline allocations in the baseline JIT. - * jit/JITInlineMethods.h: - (JSC::JIT::emitAllocateBasicJSObject): - (JSC::JIT::emitAllocateJSFinalObject): - (JSC::JIT::emitAllocateJSArray): - * jsc.cpp: - (GlobalObject::create): Add finalizer here since JSGlobalObject needs to use a finalizer instead of inheriting from - JSDestructibleObject. - * runtime/Arguments.cpp: Inherit from JSDestructibleObject. - (JSC): - * runtime/Arguments.h: - (Arguments): - (JSC::Arguments::Arguments): - * runtime/ErrorPrototype.cpp: Added an assert to make sure we have a trivial destructor. - (JSC): - * runtime/Executable.h: Indicate that all of the Executable* classes have immortal Structures. - (JSC): - * runtime/InternalFunction.cpp: Inherit from JSDestructibleObject. - (JSC): - (JSC::InternalFunction::InternalFunction): - * runtime/InternalFunction.h: - (InternalFunction): - * runtime/JSCell.h: Added two static bools, needsDestruction and hasImmortalStructure, that classes can override - to indicate at compile time which part of the heap they should be allocated in. - (JSC::allocateCell): Use the appropriate allocator depending on the destructor type. - * runtime/JSDestructibleObject.h: Added. New class that stores the ClassInfo of any subclass so that it can be - accessed safely when the object is being destroyed. - (JSC): - (JSDestructibleObject): - (JSC::JSDestructibleObject::classInfo): - (JSC::JSDestructibleObject::JSDestructibleObject): - (JSC::JSCell::classInfo): Checks the current MarkedBlock to see where it should get the ClassInfo from so that it's always safe. - * runtime/JSGlobalObject.cpp: JSGlobalObject now uses a finalizer instead of a destructor so that it can avoid forcing all - of its relatives in the inheritance hierarchy (e.g. JSScope) to use destructors as well. - (JSC::JSGlobalObject::reset): - * runtime/JSGlobalObject.h: - (JSGlobalObject): - (JSC::JSGlobalObject::createRareDataIfNeeded): Since we always create a finalizer now, we don't have to worry about adding one - for the m_rareData field when it's created. - (JSC::JSGlobalObject::create): - (JSC): - * runtime/JSGlobalThis.h: Inherit from JSDestructibleObject. - (JSGlobalThis): - (JSC::JSGlobalThis::JSGlobalThis): - * runtime/JSPropertyNameIterator.h: Has an immortal Structure. - (JSC): - * runtime/JSScope.cpp: - (JSC): - * runtime/JSString.h: Has an immortal Structure. - (JSC): - * runtime/JSWrapperObject.h: Inherit from JSDestructibleObject. - (JSWrapperObject): - (JSC::JSWrapperObject::JSWrapperObject): - * runtime/MathObject.cpp: Cleaning up some of the inheritance stuff. - (JSC): - * runtime/NameInstance.h: Inherit from JSDestructibleObject. - (NameInstance): - * runtime/RegExp.h: Has immortal Structure. - (JSC): - * runtime/RegExpObject.cpp: Inheritance cleanup. - (JSC): - * runtime/SparseArrayValueMap.h: Has immortal Structure. - (JSC): - * runtime/Structure.h: Has immortal Structure. - (JSC): - * runtime/StructureChain.h: Ditto. - (JSC): - * runtime/SymbolTable.h: Ditto. - (SharedSymbolTable): - (JSC): - -== Rolled over to ChangeLog-2012-10-02 == diff --git a/Source/JavaScriptCore/ChangeLog-2013-04-24 b/Source/JavaScriptCore/ChangeLog-2013-04-24 new file mode 100644 index 000000000..d3b5d15cd --- /dev/null +++ b/Source/JavaScriptCore/ChangeLog-2013-04-24 @@ -0,0 +1,29044 @@ +2013-04-23 Filip Pizlo + + DFG CFA filters CheckFunction in a really weird way, and assumes that the function's structure won't change + https://bugs.webkit.org/show_bug.cgi?id=115077 + + Reviewed by Oliver Hunt. + + The filtering did three things that are unusual: + + 1) AbstractValue::filterByValue() assumed that the passed value's structure wouldn't change, in + the sense that at it assumed it could use that value's *current* structure to do structure + filtering. Filtering by structure only makes sense if you can prove that the given value will + always have that structure (for example by either using a watchpoing or emitting code that + checks that structure at run-time). + + 2) AbstractValue::filterByValue() and the CheckFunction case in AbstractState::executeEffects() + tried to invalidate the CFA based on whether the filtration led to an empty value. This is + well-intentioned, but it's not how the CFA currently works. It's inconsistent with other + parts of the CFA. We shouldn't introduce this feature into just one kind of filtration and + not have it elsewhere. + + 3) The attempt to detect when the value was empty was actually implemented incorrectly. It + relied on AbstractValue::validate(). That method says that a concrete value does not belong + to the abstract value if it has a different structure. This makes sense for the other place + where AbstractValue::validate() is called: during OSR entry, where we are talking about a + JSValue that we see *right now*. It doesn't make sense in the CFA, since in the CFA any + value we observe in the code is a value whose structure may change when the code starts + running, and so we cannot use the value's current structure to infer things about the code + when it starts running. + + I fixed the above problems by (1) changing filterByValue() to not filter the structure, (2) + changing filterByValue() and the CheckFunction case to not invalidate the CFA, and (3) + making sure that nobody else was misusing AbstractValue::validate() (they weren't). + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::filterByValue): + +2013-04-23 Oliver Hunt + + Default ParserError() initialiser doesn't initialise all fields + https://bugs.webkit.org/show_bug.cgi?id=115074 + + Reviewed by Joseph Pecoraro. + + Only the jsc command prompt depended on this, but we'll fix it to + be on the safe side. + + * parser/ParserError.h: + (JSC::ParserError::ParserError): + +2013-04-23 Christophe Dumez + + Global constructors should be configurable and not enumerable + https://bugs.webkit.org/show_bug.cgi?id=110573 + + Reviewed by Geoffrey Garen. + + Update JSObject::deleteProperty() so that mark to set the property + value to undefined if it is in static hashtable of properties. The + previous code was not doing anything in this case and this meant + we could not remove builtin DOMWindow properties such as + "ProgressEvent" even if marked as Deletable. + + * runtime/JSObject.cpp: + (JSC::JSObject::deleteProperty): + * runtime/Lookup.h: + (JSC): + (JSC::putEntry): + (JSC::lookupPut): + +2013-04-23 Geoffrey Garen + + Filled out more cases of branch folding in bytecode when emitting + expressions into a branching context + https://bugs.webkit.org/show_bug.cgi?id=115057 + + Reviewed by Filip Pizlo. + + This covers a few cases like: + + - while (true) { } + - while (1) { } + - if (x) break; + - if (x) continue; + - if (boolean_expr == boolean_const) { } + - if (boolean_expr == 1_or_0) { } + - if (bitop == 1_or_0) { } + + This also works, but will bring shame on your family: + + - while ("hello world") { } + + No change on the benchmarks we track, but a 2.5X speedup on a microbenchmark + that uses these techniques. + + * JavaScriptCore.order: Order! + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitNewArray): + (JSC::BytecodeGenerator::emitThrowReferenceError): + (JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::shouldEmitDebugHooks): Updated ancillary code + for interface simplifications. + + * bytecompiler/NodesCodegen.cpp: + (JSC::ConstantNode::emitBytecodeInConditionContext): Constants can + jump unconditionally when used within a condition context. + + (JSC::ConstantNode::emitBytecode): + (JSC::StringNode::jsValue): Gave constants a common base class so I + could implement their codegen just once. + + (JSC::BinaryOpNode::emitBytecodeInConditionContext): + (JSC::canFoldToBranch): + (JSC::BinaryOpNode::tryFoldToBranch): Fold (!/=)= and (!/=)== where + appropriate. A lot of cases are not appropriate because of the surprising + type conversion semantics of ==. For example, if (number == true) { } is + not the same as if (number) { } because the former will up-convert true + to number and then do numeric comparison. + + (JSC::singleStatement): + (JSC::IfElseNode::tryFoldBreakAndContinue): + (JSC::IfElseNode::emitBytecode): + (JSC::ContinueNode::trivialTarget): + (JSC::BreakNode::trivialTarget): Fold "if (expression) break" and + "if (expression) continue" into direct jumps from expression. + + * parser/ASTBuilder.h: + (ASTBuilder): + (JSC::ASTBuilder::createIfStatement): + * parser/NodeConstructors.h: + (JSC::ConstantNode::ConstantNode): + (JSC): + (JSC::NullNode::NullNode): + (JSC::BooleanNode::BooleanNode): + (JSC::NumberNode::NumberNode): + (JSC::StringNode::StringNode): + (JSC::IfElseNode::IfElseNode): + * parser/Nodes.h: + (JSC::ExpressionNode::isConstant): + (JSC::ExpressionNode::isBoolean): + (JSC::StatementNode::isBreak): + (JSC::StatementNode::isContinue): + (ConstantNode): + (JSC::ConstantNode::isPure): + (JSC::ConstantNode::isConstant): + (NullNode): + (JSC::NullNode::jsValue): + (JSC::BooleanNode::value): + (JSC::BooleanNode::isBoolean): + (JSC::BooleanNode::jsValue): + (JSC::NumberNode::value): + (NumberNode): + (JSC::NumberNode::jsValue): + (StringNode): + (BinaryOpNode): + (IfElseNode): + (ContinueNode): + (JSC::ContinueNode::isContinue): + (BreakNode): + (JSC::BreakNode::isBreak): + * parser/Parser.cpp: + (JSC::::parseIfStatement): + * parser/ResultType.h: + (JSC::ResultType::definitelyIsBoolean): + (ResultType): + * runtime/JSCJSValueInlines.h: + (JSC::JSValue::pureToBoolean): + * runtime/JSCell.h: + * runtime/JSCellInlines.h: + (JSC::JSCell::pureToBoolean): Updated for interface changes above. + +2013-04-23 Mark Lam + + Simplify the baseline JIT loop hint call site. + https://bugs.webkit.org/show_bug.cgi?id=115052. + + Reviewed by Geoffrey Garen. + + Moved the watchdog timer check after the JIT optimization check. This + ensures that the JIT opimization counter is incremented on every loop + hint even if the watchdog timer fires. + + Removed the code that allows the JIT OSR to happen if the watchdog + timer fires but does not result in a termination. It is extremely rare + that the JIT optimization counter would trigger an OSR on the same pass + as when the watchdog timer fire. If it does happen, we'll simply hold + off on servicing the watchdog timer until the next pass (because it's + not time critical). + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_hint): + (JSC::JIT::emitSlow_op_loop_hint): + +2013-04-23 Roger Fong + + AppleWin build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2013-04-18 Mark Hahnenberg + + Objective-C API: Update public header documentation + https://bugs.webkit.org/show_bug.cgi?id=114841 + + Reviewed by Geoffrey Garen. + + Added documentation for the newly added object lifetime-related stuff. + + * API/JSManagedValue.h: + * API/JSVirtualMachine.h: + +2013-04-22 Mark Lam + + Fix a typo in MacroAssemblerARMv7.h. + https://bugs.webkit.org/show_bug.cgi?id=115011. + + Reviewed by Geoffrey Garen. + + * assembler/ARMAssembler.h: Fix a comment. + * assembler/ARMv7Assembler.h: Added some comments. + * assembler/MacroAssemblerARMv7.h: + - ARMAssembler::PL should be ARMv7Assembler::ConditionPL. + +2013-04-22 Julien Brianceau + + Add branchAdd32 missing implementation in SH4 base JIT. + This should fix SH4 build, broken since r148893. + https://bugs.webkit.org/show_bug.cgi?id=114993. + + Reviewed by Oliver Hunt. + + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::branchAdd32): + (MacroAssemblerSH4): + +2013-04-22 Benjamin Poulain + + Windows build fix after r148921 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-22 Benjamin Poulain + + Remove the memory instrumentation code + https://bugs.webkit.org/show_bug.cgi?id=114931 + + Reviewed by Andreas Kling. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-22 Mark Lam + + Fix broken 32-bit build to green the bots. + https://bugs.webkit.org/show_bug.cgi?id=114968. + + Unreviewed. + + Basically, I moved a JIT::emit_op_loop_hint() and JIT::emitSlow_op_loop_hint() + into common code where they belong, instead of the 64-bit specific section. + + Also fixed some SH4 assertions failures which were also caused by + https://bugs.webkit.org/show_bug.cgi?id=114963. Thanks to Julien Brianceau + for pointing this out. + + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::branchAdd32): + * jit/JITOpcodes.cpp: + (JSC): + (JSC::JIT::emit_op_loop_hint): + (JSC::JIT::emitSlow_op_loop_hint): + +2013-04-22 Oliver Hunt + + Perform null check before trying to use the result of readline() + + RS=Gavin + + * jsc.cpp: + (runInteractive): + +2013-04-22 Oliver Hunt + + Fix assertions to account for new Vector layout + + RS=Gavin + + * llint/LLIntData.cpp: + (JSC::LLInt::Data::performAssertions): + +2013-04-22 Mark Lam + + Change baseline JIT watchdog timer check to use the proper fast slow path + infrastructure. + https://bugs.webkit.org/show_bug.cgi?id=114963. + + Reviewed by Oliver Hunt. + + Edit: The PositiveOrZero condition is added because it is needed for + the JIT optimization check. Previously, the JIT check branches around + the slow path if the test result is 'Signed' i.e. negative. Since we + now need to test for a condition that branches to the slow path (not + around it), we need the complement of 'Signed / Negative' i.e. Positive + or zero. + + SH4 parts contributed by Julien Brianceau. + + * assembler/ARMAssembler.h: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerARMv7.h: + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::branchAdd32): + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::branchAdd32): + * assembler/MacroAssemblerX86Common.h: + * assembler/SH4Assembler.h: + * jit/JIT.cpp: + (JSC::JIT::emitEnterOptimizationCheck): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + (JSC::JIT::emitEnterOptimizationCheck): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_hint): + (JSC::JIT::emitSlow_op_loop_hint): + (JSC::JIT::emit_op_enter): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_enter): + +2013-04-22 Andreas Kling + + Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size. + + + + Reviewed by Sam Weinig. + + Update LLInt WTF::Vector offset constants to match the new memory layout. + + * llint/LowLevelInterpreter.asm: + +2013-04-21 Oliver Hunt + + JS Lexer and Parser should be more informative when they encounter errors + https://bugs.webkit.org/show_bug.cgi?id=114924 + + Reviewed by Filip Pizlo. + + Add new tokens to represent the various ways that parsing and lexing have failed. + This gives us the ability to produce better error messages in some cases, + and to indicate whether or not the failure was due to invalid source, or simply + early termination. + + The jsc prompt now makes use of this so that you can write functions that + are more than one line long. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + * jsc.cpp: + (stringFromUTF): + (jscSource): + (runInteractive): + * parser/Lexer.cpp: + (JSC::::parseFourDigitUnicodeHex): + (JSC::::parseIdentifierSlowCase): + (JSC::::parseString): + (JSC::::parseStringSlowCase): + (JSC::::lex): + * parser/Lexer.h: + (UnicodeHexValue): + (JSC::Lexer::UnicodeHexValue::UnicodeHexValue): + (JSC::Lexer::UnicodeHexValue::valueType): + (JSC::Lexer::UnicodeHexValue::isValid): + (JSC::Lexer::UnicodeHexValue::value): + (Lexer): + * parser/Parser.h: + (JSC::Parser::getTokenName): + (JSC::Parser::updateErrorMessageSpecialCase): + (JSC::::parse): + * parser/ParserError.h: + (ParserError): + (JSC::ParserError::ParserError): + * parser/ParserTokens.h: + * runtime/Completion.cpp: + (JSC): + (JSC::checkSyntax): + * runtime/Completion.h: + (JSC): + +2013-04-21 Mark Lam + + Refactor identical inline functions in JSVALUE64 and JSVALUE32_64 sections + out into the common section. + https://bugs.webkit.org/show_bug.cgi?id=114910. + + Reviewed by Filip Pizlo. + + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::callOperation): + +2013-04-20 Allan Sandfeld Jensen + + LLint should be able to use x87 instead of SSE for floating pointer + https://bugs.webkit.org/show_bug.cgi?id=112239 + + Reviewed by Filip Pizlo. + + Implements LLInt floating point operations in x87, to ensure we support + x86 without SSE2. + + X86 (except 64bit) now defaults to using x87 instructions in order to + support all 32bit x86 back to i686. The implementation uses the fucomi + instruction from i686 which sets the new minimum. + + The FPU registers must always be empty on entering or exiting a function. + We make sure to only use two X87 registers, and they are always emptied + before calling deeper functions or returning from the LLInt. + + * jit/JITStubs.cpp: + (JSC): Empty FPU registers before exiting. + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * offlineasm/instructions.rb: + * offlineasm/x86.rb: + +2013-04-19 Roger Fong + + Remove uses of WebKit_Source from AppleWin build in JavaScriptCore. + + * JavaScriptCore.vcxproj/JavaScriptCore.make: + * JavaScriptCore.vcxproj/build-generated-files.sh: + * JavaScriptCore.vcxproj/copy-files.cmd: + * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: + +2013-04-19 Benjamin Poulain + + Rename JSStringJoiner::build() to join() + https://bugs.webkit.org/show_bug.cgi?id=114845 + + Reviewed by Geoffrey Garen. + + The method name build() came from StringBuilder history. It does not make much + sense on the StringJoiner. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + * runtime/JSStringJoiner.cpp: + (JSC::JSStringJoiner::join): + * runtime/JSStringJoiner.h: + (JSStringJoiner): + +2013-04-19 Roger Fong + + Unreviewed. WebKit_Source is incorrectly set. + + * JavaScriptCore.vcxproj/JavaScriptCore.make: + +2013-04-19 Martin Robinson + + [GTK] JSCore.gir.in has a few problems + https://bugs.webkit.org/show_bug.cgi?id=114710 + + Reviewed by Philippe Normand. + + * GNUmakefile.am: Add the gobject introspection steps for JavaScriptCore here, + because they are shared between WebKit1 and WebKit2. + * JavaScriptCore.gir.in: Added. Moved from the WebKit1 directory. Now written + as foreign interfaces and referencing the javascriptcoregtk library. + +2013-04-18 Benjamin Poulain + + Use StringJoiner to create the JSString of arrayProtoFuncToString + https://bugs.webkit.org/show_bug.cgi?id=114779 + + Reviewed by Geoffrey Garen. + + The function arrayProtoFuncToString was just a glorified JSStringJoiner. + This patch replaces it by JSStringJoiner to simplify the code and enjoy any optimization + made on JSStringJoiner. + + For some reason, this makes the execution 3.4% faster, despite having almost identical code. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + +2013-04-18 Oliver Hunt + + StackFrame::column() returning bogus value + https://bugs.webkit.org/show_bug.cgi?id=114840 + + Reviewed by Gavin Barraclough. + + Don't add one part of the expression offset to the other part of the expression. + Make StackFrame::toString() include the column info. + + * interpreter/Interpreter.cpp: + (JSC::StackFrame::expressionInfo): + (JSC::StackFrame::toString): + +2013-04-18 Mark Hahnenberg + + Crash beneath JSC::JIT::privateCompileSlowCases @ stephenrdonaldson.com + https://bugs.webkit.org/show_bug.cgi?id=114774 + + Reviewed by Geoffrey Garen. + + We're not linking up all of the slow cases in the baseline JIT when compiling put_to_base. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_put_to_base): + +2013-04-18 Mark Lam + + Interpreter entry points should throw the TerminatedExecutionException from the caller frame. + https://bugs.webkit.org/show_bug.cgi?id=114816. + + Reviewed by Oliver Hunt. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + +2013-04-18 Gabor Rapcsanyi + + LLInt ARM backend should not use the d8 register as scratch register + https://bugs.webkit.org/show_bug.cgi?id=114811 + + Reviewed by Filip Pizlo. + + The d8 register must preserved across function calls and should + not used as scratch register. Changing it to d6. + + * offlineasm/arm.rb: + +2013-04-18 Geoffrey Garen + + Removed HeapTimer::synchronize + https://bugs.webkit.org/show_bug.cgi?id=114832 + + Reviewed by Mark Hahnenberg. + + HeapTimer::synchronize was a flawed attempt to make HeapTimer thread-safe. + Instead, we use proper locking now. + + This is a slight API change, since the GC timer will now only fire in the + run loop that created the JS VM, even if another run loop later executes + some JS. + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + * heap/HeapTimer.cpp: + (JSC): + * heap/HeapTimer.h: + (HeapTimer): + +2013-04-17 Geoffrey Garen + + Renamed JSGlobalData to VM + https://bugs.webkit.org/show_bug.cgi?id=114777 + + Reviewed by Phil Pizlo. + + * API/APICast.h: + (JSC): + (toJS): + (toRef): + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (APIEntryShimWithoutLock): + (JSC::APIEntryShim::APIEntryShim): + (APIEntryShim): + (JSC::APIEntryShim::~APIEntryShim): + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): + (APICallbackShim): + * API/JSAPIWrapperObject.h: + (JSAPIWrapperObject): + * API/JSAPIWrapperObject.mm: + (JSC::::createStructure): + (JSC::JSAPIWrapperObject::JSAPIWrapperObject): + (JSC::JSAPIWrapperObject::finishCreation): + (JSC::JSAPIWrapperObject::visitChildren): + * API/JSBase.cpp: + (JSGarbageCollect): + (JSReportExtraMemoryCost): + (JSSynchronousGarbageCollectForDebugging): + * API/JSCallbackConstructor.cpp: + (JSC::JSCallbackConstructor::JSCallbackConstructor): + (JSC::JSCallbackConstructor::finishCreation): + * API/JSCallbackConstructor.h: + (JSC::JSCallbackConstructor::createStructure): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::finishCreation): + (JSC::JSCallbackFunction::create): + * API/JSCallbackFunction.h: + (JSCallbackFunction): + (JSC::JSCallbackFunction::createStructure): + * API/JSCallbackObject.cpp: + (JSC::::create): + (JSC::::createStructure): + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSCallbackObject): + (JSC::JSCallbackObject::setPrivateProperty): + * API/JSCallbackObjectFunctions.h: + (JSC::::JSCallbackObject): + (JSC::::finishCreation): + (JSC::::put): + (JSC::::staticFunctionGetter): + * API/JSClassRef.cpp: + (OpaqueJSClassContextData::OpaqueJSClassContextData): + (OpaqueJSClass::contextData): + (OpaqueJSClass::prototype): + * API/JSClassRef.h: + (OpaqueJSClassContextData): + * API/JSContext.mm: + (-[JSContext setException:]): + (-[JSContext initWithGlobalContextRef:]): + (+[JSContext contextWithGlobalContextRef:]): + * API/JSContextRef.cpp: + (JSContextGroupCreate): + (JSContextGroupRelease): + (JSGlobalContextCreate): + (JSGlobalContextCreateInGroup): + (JSGlobalContextRetain): + (JSGlobalContextRelease): + (JSContextGetGroup): + (JSContextCreateBacktrace): + * API/JSObjectRef.cpp: + (JSObjectMake): + (JSObjectMakeConstructor): + (JSObjectMakeFunction): + (JSObjectSetPrototype): + (JSObjectHasProperty): + (JSObjectGetProperty): + (JSObjectSetProperty): + (JSObjectDeleteProperty): + (JSObjectGetPrivateProperty): + (JSObjectSetPrivateProperty): + (JSObjectDeletePrivateProperty): + (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray): + (OpaqueJSPropertyNameArray): + (JSObjectCopyPropertyNames): + (JSPropertyNameArrayRelease): + (JSPropertyNameAccumulatorAddName): + * API/JSScriptRef.cpp: + (OpaqueJSScript::create): + (OpaqueJSScript::vm): + (OpaqueJSScript::OpaqueJSScript): + (OpaqueJSScript): + (parseScript): + * API/JSVirtualMachine.mm: + (scanExternalObjectGraph): + * API/JSVirtualMachineInternal.h: + (JSC): + * API/JSWrapperMap.mm: + (makeWrapper): + * API/ObjCCallbackFunction.h: + (JSC::ObjCCallbackFunction::createStructure): + * API/ObjCCallbackFunction.mm: + (JSC::ObjCCallbackFunction::create): + * API/OpaqueJSString.cpp: + (OpaqueJSString::identifier): + * API/OpaqueJSString.h: + (JSC): + (OpaqueJSString): + * GNUmakefile.list.am: + * JSCTypedArrayStubs.h: + (JSC): + * JavaScriptCore.order: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + * JavaScriptCore.xcodeproj/project.pbxproj: + * KeywordLookupGenerator.py: + (Trie.printSubTreeAsC): + * Target.pri: + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * assembler/ARMAssembler.h: + (ARMAssembler): + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::executableCopy): + * assembler/AssemblerBufferWithConstantPool.h: + (JSC::AssemblerBufferWithConstantPool::executableCopy): + * assembler/LinkBuffer.cpp: + (JSC::LinkBuffer::linkCode): + * assembler/LinkBuffer.h: + (JSC): + (JSC::LinkBuffer::LinkBuffer): + (LinkBuffer): + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::executableCopy): + * assembler/SH4Assembler.h: + (JSC::SH4Assembler::executableCopy): + * assembler/X86Assembler.h: + (JSC::X86Assembler::executableCopy): + (JSC::X86Assembler::X86InstructionFormatter::executableCopy): + * bytecode/CallLinkInfo.cpp: + (JSC::CallLinkInfo::unlink): + * bytecode/CallLinkInfo.h: + (CallLinkInfo): + * bytecode/CodeBlock.cpp: + (JSC::dumpStructure): + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::~CodeBlock): + (JSC::CodeBlock::visitStructures): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::createActivation): + (JSC::CodeBlock::unlinkCalls): + (JSC::CodeBlock::unlinkIncomingCalls): + (JSC::CodeBlock::findClosureCallForReturnPC): + (JSC::ProgramCodeBlock::jettisonImpl): + (JSC::EvalCodeBlock::jettisonImpl): + (JSC::FunctionCodeBlock::jettisonImpl): + (JSC::CodeBlock::predictedMachineCodeSize): + (JSC::CodeBlock::usesOpcode): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::appendWeakReference): + (JSC::CodeBlock::appendWeakReferenceTransition): + (JSC::CodeBlock::setJITCode): + (JSC::CodeBlock::setGlobalData): + (JSC::CodeBlock::vm): + (JSC::CodeBlock::valueProfileForBytecodeOffset): + (JSC::CodeBlock::addConstant): + (JSC::CodeBlock::setConstantRegisters): + (CodeBlock): + (JSC::CodeBlock::WeakReferenceTransition::WeakReferenceTransition): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::getSlow): + * bytecode/GetByIdStatus.cpp: + (JSC::GetByIdStatus::computeFromLLInt): + (JSC::GetByIdStatus::computeForChain): + (JSC::GetByIdStatus::computeFor): + * bytecode/GetByIdStatus.h: + (GetByIdStatus): + * bytecode/Instruction.h: + (JSC::Instruction::Instruction): + * bytecode/ObjectAllocationProfile.h: + (JSC::ObjectAllocationProfile::initialize): + (JSC::ObjectAllocationProfile::possibleDefaultPropertyCount): + * bytecode/PolymorphicAccessStructureList.h: + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): + (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): + * bytecode/PolymorphicPutByIdList.h: + (JSC::PutByIdAccess::transition): + (JSC::PutByIdAccess::replace): + * bytecode/PreciseJumpTargets.cpp: + (JSC::computePreciseJumpTargets): + * bytecode/PutByIdStatus.cpp: + (JSC::PutByIdStatus::computeFromLLInt): + (JSC::PutByIdStatus::computeFor): + * bytecode/PutByIdStatus.h: + (JSC): + (PutByIdStatus): + * bytecode/ResolveGlobalStatus.cpp: + (JSC::computeForStructure): + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::notifyOfScope): + * bytecode/SamplingTool.h: + (JSC::ScriptSampleRecord::ScriptSampleRecord): + (SamplingTool): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdSelf): + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initPutByIdTransition): + (JSC::StructureStubInfo::initPutByIdReplace): + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::generateFunctionCodeBlock): + (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): + (JSC::UnlinkedFunctionExecutable::link): + (JSC::UnlinkedFunctionExecutable::fromGlobalCode): + (JSC::UnlinkedFunctionExecutable::codeBlockFor): + (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): + * bytecode/UnlinkedCodeBlock.h: + (JSC::UnlinkedFunctionExecutable::create): + (UnlinkedFunctionExecutable): + (JSC::UnlinkedFunctionExecutable::finishCreation): + (JSC::UnlinkedFunctionExecutable::createStructure): + (JSC::UnlinkedCodeBlock::addRegExp): + (JSC::UnlinkedCodeBlock::addConstant): + (JSC::UnlinkedCodeBlock::addFunctionDecl): + (JSC::UnlinkedCodeBlock::addFunctionExpr): + (JSC::UnlinkedCodeBlock::vm): + (UnlinkedCodeBlock): + (JSC::UnlinkedCodeBlock::finishCreation): + (JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): + (JSC::UnlinkedProgramCodeBlock::create): + (JSC::UnlinkedProgramCodeBlock::addFunctionDeclaration): + (JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock): + (JSC::UnlinkedProgramCodeBlock::createStructure): + (JSC::UnlinkedEvalCodeBlock::create): + (JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock): + (JSC::UnlinkedEvalCodeBlock::createStructure): + (JSC::UnlinkedFunctionCodeBlock::create): + (JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock): + (JSC::UnlinkedFunctionCodeBlock::createStructure): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::addConstant): + (JSC::BytecodeGenerator::emitLoad): + (JSC::BytecodeGenerator::emitDirectPutById): + (JSC::BytecodeGenerator::addStringConstant): + (JSC::BytecodeGenerator::expectedFunctionForIdentifier): + (JSC::BytecodeGenerator::emitThrowReferenceError): + (JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded): + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): + (JSC::BytecodeGenerator::vm): + (JSC::BytecodeGenerator::propertyNames): + (JSC::BytecodeGenerator::makeFunction): + * bytecompiler/NodesCodegen.cpp: + (JSC::RegExpNode::emitBytecode): + (JSC::ArrayNode::toArgumentList): + (JSC::ApplyFunctionCallDotNode::emitBytecode): + (JSC::InstanceOfNode::emitBytecode): + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + (JSC::evaluateInGlobalCallFrame): + * debugger/Debugger.h: + (JSC): + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + (JSC::DebuggerActivation::finishCreation): + * debugger/DebuggerActivation.h: + (JSC::DebuggerActivation::create): + (JSC::DebuggerActivation::createStructure): + (DebuggerActivation): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + * dfg/DFGAssemblyHelpers.h: + (JSC::DFG::AssemblyHelpers::AssemblyHelpers): + (JSC::DFG::AssemblyHelpers::vm): + (JSC::DFG::AssemblyHelpers::debugCall): + (JSC::DFG::AssemblyHelpers::emitExceptionCheck): + (AssemblyHelpers): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::ByteCodeParser): + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::handleConstantInternalFunction): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * dfg/DFGByteCodeParser.h: + (JSC): + * dfg/DFGCCallHelpers.h: + (JSC::DFG::CCallHelpers::CCallHelpers): + * dfg/DFGCapabilities.cpp: + (JSC::DFG::canHandleOpcodes): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::reportToProfiler): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGDriver.h: + (JSC): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::isStringPrototypeMethodSane): + (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::Graph): + * dfg/DFGGraph.h: + (Graph): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::JITCompiler): + (JSC::DFG::JITCompiler::linkOSRExits): + (JSC::DFG::JITCompiler::link): + (JSC::DFG::JITCompiler::compile): + (JSC::DFG::JITCompiler::compileFunction): + * dfg/DFGJITCompiler.h: + (JSC): + * dfg/DFGOSREntry.cpp: + (JSC::DFG::prepareOSREntry): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + (JSC::DFG::putByVal): + (JSC::DFG::operationPutByValInternal): + (JSC::getHostCallReturnValueWithExecState): + * dfg/DFGPhase.h: + (JSC::DFG::Phase::vm): + * dfg/DFGRepatch.cpp: + (JSC::DFG::generateProtoChainAccessStub): + (JSC::DFG::tryCacheGetByID): + (JSC::DFG::tryBuildGetByIDList): + (JSC::DFG::tryBuildGetByIDProtoList): + (JSC::DFG::emitPutReplaceStub): + (JSC::DFG::emitPutTransitionStub): + (JSC::DFG::tryCachePutByID): + (JSC::DFG::tryBuildPutByIdList): + (JSC::DFG::linkSlowFor): + (JSC::DFG::dfgLinkFor): + (JSC::DFG::dfgLinkSlowFor): + (JSC::DFG::dfgLinkClosureCall): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::typedArrayDescriptor): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality): + (JSC::DFG::SpeculativeJIT::compileGetByValOnString): + (JSC::DFG::SpeculativeJIT::compileFromCharCode): + (JSC::DFG::SpeculativeJIT::compileMakeRope): + (JSC::DFG::SpeculativeJIT::compileStringEquality): + (JSC::DFG::SpeculativeJIT::compileToStringOnCell): + (JSC::DFG::SpeculativeJIT::speculateObject): + (JSC::DFG::SpeculativeJIT::speculateObjectOrOther): + (JSC::DFG::SpeculativeJIT::speculateString): + (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::prepareForExternalCall): + (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage): + (JSC::DFG::SpeculativeJIT::emitAllocateJSObject): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGThunks.cpp: + (JSC::DFG::osrExitGenerationThunkGenerator): + (JSC::DFG::throwExceptionFromCallSlowPathGenerator): + (JSC::DFG::slowPathFor): + (JSC::DFG::linkForThunkGenerator): + (JSC::DFG::linkCallThunkGenerator): + (JSC::DFG::linkConstructThunkGenerator): + (JSC::DFG::linkClosureCallThunkGenerator): + (JSC::DFG::virtualForThunkGenerator): + (JSC::DFG::virtualCallThunkGenerator): + (JSC::DFG::virtualConstructThunkGenerator): + * dfg/DFGThunks.h: + (JSC): + (DFG): + * heap/BlockAllocator.h: + (JSC): + * heap/CopiedSpace.cpp: + (JSC::CopiedSpace::tryAllocateSlowCase): + (JSC::CopiedSpace::tryReallocate): + * heap/CopiedSpaceInlines.h: + (JSC::CopiedSpace::tryAllocate): + * heap/GCThreadSharedData.cpp: + (JSC::GCThreadSharedData::GCThreadSharedData): + (JSC::GCThreadSharedData::reset): + * heap/GCThreadSharedData.h: + (JSC): + (GCThreadSharedData): + * heap/HandleSet.cpp: + (JSC::HandleSet::HandleSet): + (JSC::HandleSet::~HandleSet): + (JSC::HandleSet::grow): + * heap/HandleSet.h: + (JSC): + (HandleSet): + (JSC::HandleSet::vm): + * heap/Heap.cpp: + (JSC::Heap::Heap): + (JSC): + (JSC::Heap::lastChanceToFinalize): + (JSC::Heap::protect): + (JSC::Heap::unprotect): + (JSC::Heap::stack): + (JSC::Heap::getConservativeRegisterRoots): + (JSC::Heap::markRoots): + (JSC::Heap::deleteAllCompiledCode): + (JSC::Heap::collect): + (JSC::Heap::isValidAllocation): + * heap/Heap.h: + (JSC): + (Heap): + (JSC::Heap::vm): + * heap/HeapTimer.cpp: + (JSC::HeapTimer::HeapTimer): + (JSC::HeapTimer::timerDidFire): + (JSC::HeapTimer::timerEvent): + * heap/HeapTimer.h: + (JSC): + (HeapTimer): + * heap/IncrementalSweeper.cpp: + (JSC::IncrementalSweeper::IncrementalSweeper): + (JSC::IncrementalSweeper::sweepNextBlock): + (JSC::IncrementalSweeper::willFinishSweeping): + (JSC::IncrementalSweeper::create): + * heap/IncrementalSweeper.h: + (IncrementalSweeper): + * heap/Local.h: + (Local): + (JSC::::Local): + (JSC::LocalStack::LocalStack): + (JSC::LocalStack::push): + (LocalStack): + * heap/LocalScope.h: + (JSC): + (LocalScope): + (JSC::LocalScope::LocalScope): + * heap/MachineStackMarker.cpp: + (JSC::MachineThreads::addCurrentThread): + * heap/MarkedAllocator.cpp: + (JSC::MarkedAllocator::allocateSlowCase): + * heap/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): + * heap/MarkedBlock.h: + (JSC::MarkedBlock::vm): + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::SlotVisitor): + (JSC::SlotVisitor::setup): + * heap/Strong.h: + (JSC): + (Strong): + (JSC::Strong::operator=): + * heap/StrongInlines.h: + (JSC::::Strong): + (JSC::::set): + * heap/SuperRegion.h: + (JSC): + * heap/WeakSet.cpp: + * heap/WeakSet.h: + (WeakSet): + (JSC::WeakSet::WeakSet): + (JSC::WeakSet::vm): + * interpreter/AbstractPC.cpp: + (JSC::AbstractPC::AbstractPC): + * interpreter/AbstractPC.h: + (JSC): + (AbstractPC): + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + * interpreter/CallFrame.h: + (ExecState): + (JSC::ExecState::clearException): + (JSC::ExecState::clearSupplementaryExceptionInfo): + (JSC::ExecState::exception): + (JSC::ExecState::hadException): + (JSC::ExecState::propertyNames): + (JSC::ExecState::emptyList): + (JSC::ExecState::interpreter): + (JSC::ExecState::heap): + (JSC::ExecState::arrayConstructorTable): + (JSC::ExecState::arrayPrototypeTable): + (JSC::ExecState::booleanPrototypeTable): + (JSC::ExecState::dateTable): + (JSC::ExecState::dateConstructorTable): + (JSC::ExecState::errorPrototypeTable): + (JSC::ExecState::globalObjectTable): + (JSC::ExecState::jsonTable): + (JSC::ExecState::mathTable): + (JSC::ExecState::numberConstructorTable): + (JSC::ExecState::numberPrototypeTable): + (JSC::ExecState::objectConstructorTable): + (JSC::ExecState::privateNamePrototypeTable): + (JSC::ExecState::regExpTable): + (JSC::ExecState::regExpConstructorTable): + (JSC::ExecState::regExpPrototypeTable): + (JSC::ExecState::stringConstructorTable): + (JSC::ExecState::abstractReturnPC): + * interpreter/CallFrameClosure.h: + (CallFrameClosure): + * interpreter/Interpreter.cpp: + (JSC): + (JSC::eval): + (JSC::loadVarargs): + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::unwindCallFrame): + (JSC::appendSourceToError): + (JSC::getCallerInfo): + (JSC::Interpreter::getStackTrace): + (JSC::Interpreter::addStackTraceIfNecessary): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::retrieveArgumentsFromVMCode): + (JSC::Interpreter::retrieveCallerFromVMCode): + * interpreter/Interpreter.h: + (JSC): + (JSC::TopCallFrameSetter::TopCallFrameSetter): + (JSC::TopCallFrameSetter::~TopCallFrameSetter): + (TopCallFrameSetter): + (JSC::NativeCallFrameTracer::NativeCallFrameTracer): + (Interpreter): + * interpreter/JSStack.cpp: + (JSC::JSStack::JSStack): + * interpreter/JSStack.h: + (JSC): + * jit/ClosureCallStubRoutine.cpp: + (JSC::ClosureCallStubRoutine::ClosureCallStubRoutine): + * jit/ClosureCallStubRoutine.h: + (ClosureCallStubRoutine): + * jit/ExecutableAllocator.cpp: + (JSC::ExecutableAllocator::ExecutableAllocator): + (JSC::ExecutableAllocator::allocate): + * jit/ExecutableAllocator.h: + (JSC): + (ExecutableAllocator): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::ExecutableAllocator::ExecutableAllocator): + (JSC::ExecutableAllocator::allocate): + * jit/GCAwareJITStubRoutine.cpp: + (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): + (JSC::MarkingGCAwareJITStubRoutineWithOneObject::MarkingGCAwareJITStubRoutineWithOneObject): + (JSC::createJITStubRoutine): + * jit/GCAwareJITStubRoutine.h: + (GCAwareJITStubRoutine): + (MarkingGCAwareJITStubRoutineWithOneObject): + (JSC): + * jit/JIT.cpp: + (JSC::JIT::JIT): + (JSC::JIT::privateCompile): + (JSC::JIT::linkFor): + (JSC::JIT::linkSlowCall): + * jit/JIT.h: + (JSC::JIT::compile): + (JSC::JIT::compileClosureCall): + (JSC::JIT::compileGetByIdProto): + (JSC::JIT::compileGetByIdSelfList): + (JSC::JIT::compileGetByIdProtoList): + (JSC::JIT::compileGetByIdChainList): + (JSC::JIT::compileGetByIdChain): + (JSC::JIT::compilePutByIdTransition): + (JSC::JIT::compileGetByVal): + (JSC::JIT::compilePutByVal): + (JSC::JIT::compileCTINativeCall): + (JSC::JIT::compilePatchGetArrayLength): + (JIT): + * jit/JITCall.cpp: + (JSC::JIT::compileLoadVarargs): + (JSC::JIT::compileCallEvalSlowCase): + (JSC::JIT::compileOpCallSlowCase): + (JSC::JIT::privateCompileClosureCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileLoadVarargs): + (JSC::JIT::compileCallEvalSlowCase): + (JSC::JIT::compileOpCallSlowCase): + (JSC::JIT::privateCompileClosureCall): + * jit/JITCode.h: + (JSC): + (JSC::JITCode::execute): + * jit/JITDriver.h: + (JSC::jitCompileIfAppropriate): + (JSC::jitCompileFunctionIfAppropriate): + * jit/JITExceptions.cpp: + (JSC::genericThrow): + (JSC::jitThrow): + * jit/JITExceptions.h: + (JSC): + * jit/JITInlines.h: + (JSC::JIT::emitLoadCharacterString): + (JSC::JIT::updateTopCallFrame): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_new_object): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emitSlow_op_convert_this): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_new_object): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emitSlow_op_neq): + (JSC::JIT::compileOpStrictEq): + (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emitSlow_op_convert_this): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::privateCompileGetByVal): + (JSC::JIT::privateCompilePutByVal): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC): + (JSC::performPlatformSpecificJITAssertions): + (JSC::tryCachePutByID): + (JSC::tryCacheGetByID): + (JSC::returnToThrowTrampoline): + (JSC::throwExceptionFromOpCall): + (JSC::DEFINE_STUB_FUNCTION): + (JSC::getPolymorphicAccessStructureListSlot): + (JSC::jitCompileFor): + (JSC::lazyLinkFor): + (JSC::putByVal): + * jit/JITStubs.h: + (JSC): + (JITStackFrame): + * jit/JITThunks.cpp: + (JSC::JITThunks::ctiNativeCall): + (JSC::JITThunks::ctiNativeConstruct): + (JSC::JITThunks::ctiStub): + (JSC::JITThunks::hostFunctionStub): + * jit/JITThunks.h: + (JSC): + (JITThunks): + * jit/JITWriteBarrier.h: + (JSC): + (JSC::JITWriteBarrierBase::set): + (JSC::JITWriteBarrier::set): + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::loadJSStringArgument): + (JSC::SpecializedThunkJIT::finalize): + * jit/ThunkGenerator.h: + (JSC): + * jit/ThunkGenerators.cpp: + (JSC::generateSlowCaseFor): + (JSC::linkForGenerator): + (JSC::linkCallGenerator): + (JSC::linkConstructGenerator): + (JSC::linkClosureCallGenerator): + (JSC::virtualForGenerator): + (JSC::virtualCallGenerator): + (JSC::virtualConstructGenerator): + (JSC::stringLengthTrampolineGenerator): + (JSC::nativeForGenerator): + (JSC::nativeCallGenerator): + (JSC::nativeConstructGenerator): + (JSC::stringCharLoad): + (JSC::charToString): + (JSC::charCodeAtThunkGenerator): + (JSC::charAtThunkGenerator): + (JSC::fromCharCodeThunkGenerator): + (JSC::sqrtThunkGenerator): + (JSC::floorThunkGenerator): + (JSC::ceilThunkGenerator): + (JSC::roundThunkGenerator): + (JSC::expThunkGenerator): + (JSC::logThunkGenerator): + (JSC::absThunkGenerator): + (JSC::powThunkGenerator): + * jit/ThunkGenerators.h: + (JSC): + * jsc.cpp: + (GlobalObject): + (GlobalObject::create): + (GlobalObject::createStructure): + (GlobalObject::finishCreation): + (GlobalObject::addFunction): + (GlobalObject::addConstructableFunction): + (functionDumpCallFrame): + (functionJSCStack): + (functionReleaseExecutableMemory): + (functionRun): + (main): + (runWithScripts): + (jscmain): + * llint/LLIntData.cpp: + (JSC::LLInt::Data::performAssertions): + * llint/LLIntData.h: + (JSC): + (Data): + (JSC::LLInt::Data::performAssertions): + * llint/LLIntEntrypoints.cpp: + (JSC::LLInt::getFunctionEntrypoint): + (JSC::LLInt::getEvalEntrypoint): + (JSC::LLInt::getProgramEntrypoint): + * llint/LLIntEntrypoints.h: + (JSC): + (LLInt): + (JSC::LLInt::getEntrypoint): + * llint/LLIntExceptions.cpp: + (JSC::LLInt::interpreterThrowInCaller): + (JSC::LLInt::returnToThrow): + (JSC::LLInt::callToThrow): + * llint/LLIntOffsetsExtractor.cpp: + * llint/LLIntSlowPaths.cpp: + (LLInt): + (JSC::LLInt::llint_trace_operand): + (JSC::LLInt::llint_trace_value): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + (JSC::LLInt::shouldJIT): + (JSC::LLInt::handleHostCall): + (JSC::LLInt::setUpCall): + * llint/LLIntThunks.cpp: + (JSC::LLInt::generateThunkWithJumpTo): + (JSC::LLInt::functionForCallEntryThunkGenerator): + (JSC::LLInt::functionForConstructEntryThunkGenerator): + (JSC::LLInt::functionForCallArityCheckThunkGenerator): + (JSC::LLInt::functionForConstructArityCheckThunkGenerator): + (JSC::LLInt::evalEntryThunkGenerator): + (JSC::LLInt::programEntryThunkGenerator): + * llint/LLIntThunks.h: + (JSC): + (LLInt): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter.cpp: + (JSC::CLoop::execute): + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * offlineasm/cloop.rb: + * parser/ASTBuilder.h: + (JSC::ASTBuilder::ASTBuilder): + (JSC::ASTBuilder::createSourceElements): + (JSC::ASTBuilder::createCommaExpr): + (JSC::ASTBuilder::createLogicalNot): + (JSC::ASTBuilder::createUnaryPlus): + (JSC::ASTBuilder::createVoid): + (JSC::ASTBuilder::thisExpr): + (JSC::ASTBuilder::createResolve): + (JSC::ASTBuilder::createObjectLiteral): + (JSC::ASTBuilder::createArray): + (JSC::ASTBuilder::createNumberExpr): + (JSC::ASTBuilder::createString): + (JSC::ASTBuilder::createBoolean): + (JSC::ASTBuilder::createNull): + (JSC::ASTBuilder::createBracketAccess): + (JSC::ASTBuilder::createDotAccess): + (JSC::ASTBuilder::createRegExp): + (JSC::ASTBuilder::createNewExpr): + (JSC::ASTBuilder::createConditionalExpr): + (JSC::ASTBuilder::createAssignResolve): + (JSC::ASTBuilder::createFunctionExpr): + (JSC::ASTBuilder::createFunctionBody): + (JSC::ASTBuilder::createGetterOrSetterProperty): + (JSC::ASTBuilder::createArguments): + (JSC::ASTBuilder::createArgumentsList): + (JSC::ASTBuilder::createProperty): + (JSC::ASTBuilder::createPropertyList): + (JSC::ASTBuilder::createElementList): + (JSC::ASTBuilder::createFormalParameterList): + (JSC::ASTBuilder::createClause): + (JSC::ASTBuilder::createClauseList): + (JSC::ASTBuilder::createFuncDeclStatement): + (JSC::ASTBuilder::createBlockStatement): + (JSC::ASTBuilder::createExprStatement): + (JSC::ASTBuilder::createIfStatement): + (JSC::ASTBuilder::createForLoop): + (JSC::ASTBuilder::createForInLoop): + (JSC::ASTBuilder::createEmptyStatement): + (JSC::ASTBuilder::createVarStatement): + (JSC::ASTBuilder::createReturnStatement): + (JSC::ASTBuilder::createBreakStatement): + (JSC::ASTBuilder::createContinueStatement): + (JSC::ASTBuilder::createTryStatement): + (JSC::ASTBuilder::createSwitchStatement): + (JSC::ASTBuilder::createWhileStatement): + (JSC::ASTBuilder::createDoWhileStatement): + (JSC::ASTBuilder::createLabelStatement): + (JSC::ASTBuilder::createWithStatement): + (JSC::ASTBuilder::createThrowStatement): + (JSC::ASTBuilder::createDebugger): + (JSC::ASTBuilder::createConstStatement): + (JSC::ASTBuilder::appendConstDecl): + (JSC::ASTBuilder::addVar): + (JSC::ASTBuilder::combineCommaNodes): + (JSC::ASTBuilder::Scope::Scope): + (JSC::ASTBuilder::createNumber): + (ASTBuilder): + (JSC::ASTBuilder::makeTypeOfNode): + (JSC::ASTBuilder::makeDeleteNode): + (JSC::ASTBuilder::makeNegateNode): + (JSC::ASTBuilder::makeBitwiseNotNode): + (JSC::ASTBuilder::makeMultNode): + (JSC::ASTBuilder::makeDivNode): + (JSC::ASTBuilder::makeModNode): + (JSC::ASTBuilder::makeAddNode): + (JSC::ASTBuilder::makeSubNode): + (JSC::ASTBuilder::makeLeftShiftNode): + (JSC::ASTBuilder::makeRightShiftNode): + (JSC::ASTBuilder::makeURightShiftNode): + (JSC::ASTBuilder::makeBitOrNode): + (JSC::ASTBuilder::makeBitAndNode): + (JSC::ASTBuilder::makeBitXOrNode): + (JSC::ASTBuilder::makeFunctionCallNode): + (JSC::ASTBuilder::makeBinaryNode): + (JSC::ASTBuilder::makeAssignNode): + (JSC::ASTBuilder::makePrefixNode): + (JSC::ASTBuilder::makePostfixNode): + * parser/Lexer.cpp: + (JSC::Keywords::Keywords): + (JSC::::Lexer): + (JSC::::parseIdentifier): + (JSC::::parseIdentifierSlowCase): + * parser/Lexer.h: + (JSC::Keywords::isKeyword): + (JSC::Keywords::getKeyword): + (Keywords): + (Lexer): + (JSC::::makeIdentifier): + (JSC::::makeRightSizedIdentifier): + (JSC::::makeIdentifierLCharFromUChar): + (JSC::::makeLCharIdentifier): + * parser/NodeConstructors.h: + (JSC::ParserArenaFreeable::operator new): + (JSC::ParserArenaDeletable::operator new): + (JSC::ParserArenaRefCounted::ParserArenaRefCounted): + (JSC::PropertyNode::PropertyNode): + (JSC::ContinueNode::ContinueNode): + (JSC::BreakNode::BreakNode): + (JSC::ForInNode::ForInNode): + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): + (JSC::ProgramNode::ProgramNode): + (JSC::ProgramNode::create): + (JSC::EvalNode::EvalNode): + (JSC::EvalNode::create): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (ParserArenaFreeable): + (ParserArenaDeletable): + (ParserArenaRefCounted): + (ArrayNode): + (ForInNode): + (ContinueNode): + (BreakNode): + (ScopeNode): + (ProgramNode): + (EvalNode): + (FunctionBodyNode): + * parser/Parser.cpp: + (JSC::::Parser): + (JSC::::parseInner): + (JSC::::parseSourceElements): + (JSC::::parseTryStatement): + (JSC::::parseFunctionBody): + (JSC::::parseFunctionInfo): + (JSC::::parseAssignmentExpression): + (JSC::::parseProperty): + (JSC::::parsePrimaryExpression): + (JSC::::parseMemberExpression): + (JSC::::parseUnaryExpression): + * parser/Parser.h: + (JSC): + (JSC::Scope::Scope): + (JSC::Scope::declareVariable): + (JSC::Scope::declareParameter): + (Scope): + (Parser): + (JSC::Parser::pushScope): + (JSC::::parse): + (JSC::parse): + * parser/ParserArena.h: + (IdentifierArena): + (JSC::IdentifierArena::makeIdentifier): + (JSC::IdentifierArena::makeIdentifierLCharFromUChar): + (JSC::IdentifierArena::makeNumericIdentifier): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::createProperty): + (JSC::SyntaxChecker::createGetterOrSetterProperty): + * profiler/LegacyProfiler.cpp: + (JSC::LegacyProfiler::startProfiling): + (JSC::LegacyProfiler::stopProfiling): + * profiler/LegacyProfiler.h: + (JSC): + * profiler/ProfilerBytecode.cpp: + (JSC::Profiler::Bytecode::toJS): + * profiler/ProfilerBytecodeSequence.cpp: + (JSC::Profiler::BytecodeSequence::BytecodeSequence): + (JSC::Profiler::BytecodeSequence::addSequenceProperties): + * profiler/ProfilerBytecodes.cpp: + (JSC::Profiler::Bytecodes::toJS): + * profiler/ProfilerCompilation.cpp: + (JSC::Profiler::Compilation::toJS): + * profiler/ProfilerCompiledBytecode.cpp: + (JSC::Profiler::CompiledBytecode::toJS): + * profiler/ProfilerDatabase.cpp: + (JSC::Profiler::Database::Database): + (JSC::Profiler::Database::toJS): + (JSC::Profiler::Database::toJSON): + * profiler/ProfilerDatabase.h: + (Database): + * profiler/ProfilerOSRExit.cpp: + (JSC::Profiler::OSRExit::toJS): + * profiler/ProfilerOrigin.cpp: + (JSC::Profiler::Origin::toJS): + * profiler/ProfilerProfiledBytecodes.cpp: + (JSC::Profiler::ProfiledBytecodes::toJS): + * runtime/ArgList.h: + (MarkedArgumentBuffer): + * runtime/Arguments.cpp: + (JSC::Arguments::putByIndex): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + (JSC::Arguments::defineOwnProperty): + (JSC::Arguments::tearOff): + (JSC::Arguments::didTearOffActivation): + (JSC::Arguments::tearOffForInlineCallFrame): + * runtime/Arguments.h: + (JSC::Arguments::create): + (JSC::Arguments::createStructure): + (Arguments): + (JSC::Arguments::Arguments): + (JSC::Arguments::trySetArgument): + (JSC::Arguments::finishCreation): + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::finishCreation): + * runtime/ArrayConstructor.h: + (JSC::ArrayConstructor::createStructure): + * runtime/ArrayPrototype.cpp: + (JSC::ArrayPrototype::ArrayPrototype): + (JSC::ArrayPrototype::finishCreation): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + * runtime/ArrayPrototype.h: + (JSC::ArrayPrototype::createStructure): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): + (BatchedTransitionOptimizer): + * runtime/BooleanConstructor.cpp: + (JSC::BooleanConstructor::finishCreation): + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanConstructor.h: + (JSC::BooleanConstructor::createStructure): + * runtime/BooleanObject.cpp: + (JSC::BooleanObject::BooleanObject): + (JSC::BooleanObject::finishCreation): + * runtime/BooleanObject.h: + (BooleanObject): + (JSC::BooleanObject::create): + (JSC::BooleanObject::createStructure): + * runtime/BooleanPrototype.cpp: + (JSC::BooleanPrototype::BooleanPrototype): + (JSC::BooleanPrototype::finishCreation): + (JSC::booleanProtoFuncToString): + * runtime/BooleanPrototype.h: + (JSC::BooleanPrototype::createStructure): + * runtime/Butterfly.h: + (JSC): + (Butterfly): + * runtime/ButterflyInlines.h: + (JSC::Butterfly::createUninitialized): + (JSC::Butterfly::create): + (JSC::Butterfly::growPropertyStorage): + (JSC::Butterfly::createOrGrowArrayRight): + (JSC::Butterfly::growArrayRight): + (JSC::Butterfly::resizeArray): + * runtime/CodeCache.cpp: + (JSC::CodeCache::getCodeBlock): + (JSC::CodeCache::getProgramCodeBlock): + (JSC::CodeCache::getEvalCodeBlock): + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + * runtime/CodeCache.h: + (JSC): + (JSC::SourceCodeValue::SourceCodeValue): + (CodeCache): + * runtime/CommonIdentifiers.cpp: + (JSC): + (JSC::CommonIdentifiers::CommonIdentifiers): + * runtime/CommonIdentifiers.h: + (CommonIdentifiers): + * runtime/CommonSlowPaths.h: + (JSC::CommonSlowPaths::opIn): + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/DateConstructor.cpp: + (JSC::DateConstructor::finishCreation): + * runtime/DateConstructor.h: + (JSC::DateConstructor::createStructure): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + (JSC::DateInstance::finishCreation): + (JSC::DateInstance::calculateGregorianDateTime): + (JSC::DateInstance::calculateGregorianDateTimeUTC): + * runtime/DateInstance.h: + (DateInstance): + (JSC::DateInstance::create): + (JSC::DateInstance::createStructure): + * runtime/DatePrototype.cpp: + (JSC::DatePrototype::finishCreation): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncToJSON): + * runtime/DatePrototype.h: + (JSC::DatePrototype::createStructure): + * runtime/Error.cpp: + (JSC::createError): + (JSC::createEvalError): + (JSC::createRangeError): + (JSC::createReferenceError): + (JSC::createSyntaxError): + (JSC::createTypeError): + (JSC::createURIError): + (JSC::addErrorInfo): + (JSC::throwError): + * runtime/Error.h: + (JSC): + (JSC::StrictModeTypeErrorFunction::create): + (JSC::StrictModeTypeErrorFunction::createStructure): + * runtime/ErrorConstructor.cpp: + (JSC::ErrorConstructor::finishCreation): + * runtime/ErrorConstructor.h: + (JSC::ErrorConstructor::createStructure): + * runtime/ErrorInstance.cpp: + (JSC::ErrorInstance::ErrorInstance): + * runtime/ErrorInstance.h: + (JSC::ErrorInstance::createStructure): + (JSC::ErrorInstance::create): + (ErrorInstance): + (JSC::ErrorInstance::finishCreation): + * runtime/ErrorPrototype.cpp: + (JSC::ErrorPrototype::ErrorPrototype): + (JSC::ErrorPrototype::finishCreation): + * runtime/ErrorPrototype.h: + (JSC::ErrorPrototype::createStructure): + * runtime/ExceptionHelpers.cpp: + (JSC::createInterruptedExecutionException): + (JSC::createTerminatedExecutionException): + * runtime/ExceptionHelpers.h: + (JSC): + (JSC::InterruptedExecutionError::InterruptedExecutionError): + (JSC::InterruptedExecutionError::create): + (JSC::InterruptedExecutionError::createStructure): + (JSC::TerminatedExecutionError::TerminatedExecutionError): + (JSC::TerminatedExecutionError::create): + (JSC::TerminatedExecutionError::createStructure): + * runtime/Executable.cpp: + (JSC::jettisonCodeBlock): + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::EvalExecutable::compileOptimized): + (JSC::EvalExecutable::compileInternal): + (JSC::EvalExecutable::jettisonOptimizedCode): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileOptimized): + (JSC::ProgramExecutable::jettisonOptimizedCode): + (JSC::ProgramExecutable::initializeGlobalProperties): + (JSC::FunctionExecutable::compileOptimizedForCall): + (JSC::FunctionExecutable::compileOptimizedForConstruct): + (JSC::FunctionExecutable::produceCodeBlockFor): + (JSC::FunctionExecutable::jettisonOptimizedCodeForCall): + (JSC::FunctionExecutable::jettisonOptimizedCodeForConstruct): + (JSC::FunctionExecutable::fromGlobalCode): + * runtime/Executable.h: + (JSC::ExecutableBase::ExecutableBase): + (JSC::ExecutableBase::finishCreation): + (JSC::ExecutableBase::createStructure): + (JSC::NativeExecutable::create): + (JSC::NativeExecutable::createStructure): + (JSC::NativeExecutable::finishCreation): + (JSC::NativeExecutable::NativeExecutable): + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::ScriptExecutable::finishCreation): + (JSC::EvalExecutable::compile): + (EvalExecutable): + (JSC::EvalExecutable::create): + (JSC::EvalExecutable::createStructure): + (JSC::ProgramExecutable::create): + (ProgramExecutable): + (JSC::ProgramExecutable::compile): + (JSC::ProgramExecutable::createStructure): + (JSC::FunctionExecutable::create): + (JSC::FunctionExecutable::compileForCall): + (FunctionExecutable): + (JSC::FunctionExecutable::compileForConstruct): + (JSC::FunctionExecutable::jettisonOptimizedCodeFor): + (JSC::FunctionExecutable::createStructure): + (JSC::JSFunction::JSFunction): + * runtime/ExecutionHarness.h: + (JSC::prepareForExecution): + (JSC::prepareFunctionForExecution): + * runtime/FunctionConstructor.cpp: + (JSC::FunctionConstructor::finishCreation): + * runtime/FunctionConstructor.h: + (JSC::FunctionConstructor::createStructure): + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::finishCreation): + (JSC::FunctionPrototype::addFunctionProperties): + (JSC::functionProtoFuncBind): + * runtime/FunctionPrototype.h: + (JSC::FunctionPrototype::createStructure): + * runtime/GCActivityCallback.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::doWork): + (JSC::DefaultGCActivityCallback::didAllocate): + * runtime/GCActivityCallback.h: + (JSC::GCActivityCallback::GCActivityCallback): + * runtime/GCActivityCallbackBlackBerry.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::doWork): + (JSC::DefaultGCActivityCallback::didAllocate): + * runtime/GetterSetter.h: + (JSC::GetterSetter::GetterSetter): + (JSC::GetterSetter::create): + (JSC::GetterSetter::setGetter): + (JSC::GetterSetter::setSetter): + (JSC::GetterSetter::createStructure): + * runtime/Identifier.cpp: + (JSC::Identifier::add): + (JSC::Identifier::add8): + (JSC::Identifier::addSlowCase): + (JSC::Identifier::from): + (JSC::Identifier::checkCurrentIdentifierTable): + * runtime/Identifier.h: + (JSC::Identifier::Identifier): + (JSC::Identifier::createLCharFromUChar): + (Identifier): + (JSC::Identifier::add): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::InternalFunction): + (JSC::InternalFunction::finishCreation): + (JSC::InternalFunction::name): + (JSC::InternalFunction::displayName): + * runtime/InternalFunction.h: + (JSC::InternalFunction::createStructure): + (InternalFunction): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::createStructure): + (JSC::JSAPIValueWrapper::finishCreation): + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + * runtime/JSActivation.cpp: + (JSC::JSActivation::symbolTablePut): + (JSC::JSActivation::symbolTablePutWithAttributes): + (JSC::JSActivation::getOwnPropertySlot): + (JSC::JSActivation::put): + (JSC::JSActivation::putDirectVirtual): + (JSC::JSActivation::argumentsGetter): + * runtime/JSActivation.h: + (JSActivation): + (JSC::JSActivation::create): + (JSC::JSActivation::createStructure): + (JSC::JSActivation::JSActivation): + (JSC::JSActivation::tearOff): + * runtime/JSArray.cpp: + (JSC::createArrayButterflyInDictionaryIndexingMode): + (JSC::JSArray::setLengthWritable): + (JSC::JSArray::unshiftCountSlowCase): + (JSC::JSArray::setLength): + (JSC::JSArray::push): + (JSC::JSArray::shiftCountWithAnyIndexingType): + (JSC::JSArray::unshiftCountWithArrayStorage): + (JSC::JSArray::unshiftCountWithAnyIndexingType): + (JSC::ContiguousTypeAccessor::setWithValue): + (JSC::JSArray::sortCompactedVector): + (JSC::JSArray::sortVector): + * runtime/JSArray.h: + (JSC::JSArray::JSArray): + (JSArray): + (JSC::JSArray::shiftCountForShift): + (JSC::JSArray::unshiftCountForShift): + (JSC::JSArray::createStructure): + (JSC::createContiguousArrayButterfly): + (JSC::createArrayButterfly): + (JSC): + (JSC::JSArray::create): + (JSC::JSArray::tryCreateUninitialized): + (JSC::constructArray): + * runtime/JSBoundFunction.cpp: + (JSC::JSBoundFunction::create): + (JSC::JSBoundFunction::JSBoundFunction): + * runtime/JSBoundFunction.h: + (JSC::JSBoundFunction::createStructure): + * runtime/JSCJSValue.cpp: + (JSC::JSValue::putToPrimitive): + (JSC::JSValue::toStringSlowCase): + * runtime/JSCJSValue.h: + (JSC): + * runtime/JSCell.h: + (JSCell): + * runtime/JSCellInlines.h: + (JSC::JSCell::JSCell): + (JSC::JSCell::finishCreation): + (JSC::allocateCell): + (JSC::JSCell::setStructure): + (JSC::JSCell::fastGetOwnProperty): + * runtime/JSDateMath.cpp: + (JSC::getDSTOffset): + (JSC::getUTCOffset): + (JSC::parseDate): + * runtime/JSDestructibleObject.h: + (JSC::JSDestructibleObject::JSDestructibleObject): + * runtime/JSFunction.cpp: + (JSC::JSFunction::create): + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::finishCreation): + (JSC::JSFunction::createAllocationProfile): + (JSC::JSFunction::name): + (JSC::JSFunction::displayName): + (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSFunction::deleteProperty): + * runtime/JSFunction.h: + (JSFunction): + (JSC::JSFunction::create): + (JSC::JSFunction::setScope): + (JSC::JSFunction::createStructure): + * runtime/JSGlobalData.cpp: Removed. + * runtime/JSGlobalData.h: Removed. + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::JSGlobalObject): + (JSC::JSGlobalObject::~JSGlobalObject): + (JSC::JSGlobalObject::setGlobalThis): + (JSC::JSGlobalObject::init): + (JSC::JSGlobalObject::putDirectVirtual): + (JSC::JSGlobalObject::reset): + (JSC): + (JSC::JSGlobalObject::haveABadTime): + (JSC::JSGlobalObject::createThrowTypeError): + (JSC::JSGlobalObject::resetPrototype): + (JSC::JSGlobalObject::addStaticGlobals): + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): + (JSC::JSGlobalObject::createProgramCodeBlock): + (JSC::JSGlobalObject::createEvalCodeBlock): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::create): + (JSGlobalObject): + (JSC::JSGlobalObject::finishCreation): + (JSC::JSGlobalObject::vm): + (JSC::JSGlobalObject::createStructure): + (JSC::ExecState::dynamicGlobalObject): + (JSC::constructEmptyArray): + (DynamicGlobalObjectScope): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncProtoSetter): + * runtime/JSLock.cpp: + (JSC::JSLockHolder::JSLockHolder): + (JSC::JSLockHolder::init): + (JSC::JSLockHolder::~JSLockHolder): + (JSC::JSLock::JSLock): + (JSC::JSLock::willDestroyGlobalData): + (JSC::JSLock::lock): + (JSC::JSLock::unlock): + (JSC::JSLock::DropAllLocks::DropAllLocks): + (JSC::JSLock::DropAllLocks::~DropAllLocks): + * runtime/JSLock.h: + (JSC): + (JSLockHolder): + (JSLock): + (JSC::JSLock::vm): + (DropAllLocks): + * runtime/JSNameScope.h: + (JSC::JSNameScope::createStructure): + (JSC::JSNameScope::finishCreation): + (JSC::JSNameScope::JSNameScope): + * runtime/JSNotAnObject.h: + (JSC::JSNotAnObject::JSNotAnObject): + (JSC::JSNotAnObject::create): + (JSC::JSNotAnObject::createStructure): + * runtime/JSONObject.cpp: + (JSC::JSONObject::JSONObject): + (JSC::JSONObject::finishCreation): + (Holder): + (JSC::Stringifier::Stringifier): + (JSC::Stringifier::stringify): + (JSC::Stringifier::toJSON): + (JSC::Stringifier::appendStringifiedValue): + (JSC::Stringifier::Holder::Holder): + (JSC::Stringifier::Holder::appendNextProperty): + (JSC::Walker::Walker): + (JSC::Walker::walk): + (JSC::JSONProtoFuncParse): + (JSC::JSONProtoFuncStringify): + (JSC::JSONStringify): + * runtime/JSONObject.h: + (JSC::JSONObject::createStructure): + * runtime/JSObject.cpp: + (JSC::JSObject::put): + (JSC::JSObject::putByIndex): + (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists): + (JSC::JSObject::enterDictionaryIndexingMode): + (JSC::JSObject::notifyPresenceOfIndexedAccessors): + (JSC::JSObject::createInitialIndexedStorage): + (JSC::JSObject::createInitialUndecided): + (JSC::JSObject::createInitialInt32): + (JSC::JSObject::createInitialDouble): + (JSC::JSObject::createInitialContiguous): + (JSC::JSObject::createArrayStorage): + (JSC::JSObject::createInitialArrayStorage): + (JSC::JSObject::convertUndecidedToInt32): + (JSC::JSObject::convertUndecidedToDouble): + (JSC::JSObject::convertUndecidedToContiguous): + (JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements): + (JSC::JSObject::convertUndecidedToArrayStorage): + (JSC::JSObject::convertInt32ToDouble): + (JSC::JSObject::convertInt32ToContiguous): + (JSC::JSObject::convertInt32ToArrayStorage): + (JSC::JSObject::genericConvertDoubleToContiguous): + (JSC::JSObject::convertDoubleToContiguous): + (JSC::JSObject::rageConvertDoubleToContiguous): + (JSC::JSObject::convertDoubleToArrayStorage): + (JSC::JSObject::convertContiguousToArrayStorage): + (JSC::JSObject::convertUndecidedForValue): + (JSC::JSObject::convertInt32ForValue): + (JSC::JSObject::setIndexQuicklyToUndecided): + (JSC::JSObject::convertInt32ToDoubleOrContiguousWhilePerformingSetIndex): + (JSC::JSObject::convertDoubleToContiguousWhilePerformingSetIndex): + (JSC::JSObject::ensureInt32Slow): + (JSC::JSObject::ensureDoubleSlow): + (JSC::JSObject::ensureContiguousSlow): + (JSC::JSObject::rageEnsureContiguousSlow): + (JSC::JSObject::ensureArrayStorageSlow): + (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode): + (JSC::JSObject::switchToSlowPutArrayStorage): + (JSC::JSObject::putDirectVirtual): + (JSC::JSObject::setPrototype): + (JSC::JSObject::setPrototypeWithCycleCheck): + (JSC::JSObject::putDirectAccessor): + (JSC::JSObject::deleteProperty): + (JSC::JSObject::getPropertySpecificValue): + (JSC::JSObject::getOwnNonIndexPropertyNames): + (JSC::JSObject::seal): + (JSC::JSObject::freeze): + (JSC::JSObject::preventExtensions): + (JSC::JSObject::reifyStaticFunctionsForDelete): + (JSC::JSObject::removeDirect): + (JSC::JSObject::putIndexedDescriptor): + (JSC::JSObject::defineOwnIndexedProperty): + (JSC::JSObject::allocateSparseIndexMap): + (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes): + (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage): + (JSC::JSObject::putByIndexBeyondVectorLength): + (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage): + (JSC::JSObject::putDirectIndexBeyondVectorLength): + (JSC::JSObject::putDirectNativeFunction): + (JSC::JSObject::increaseVectorLength): + (JSC::JSObject::ensureLengthSlow): + (JSC::JSObject::growOutOfLineStorage): + (JSC::JSObject::getOwnPropertyDescriptor): + (JSC::putDescriptor): + (JSC::JSObject::putDirectMayBeIndex): + (JSC::DefineOwnPropertyScope::DefineOwnPropertyScope): + (JSC::DefineOwnPropertyScope::~DefineOwnPropertyScope): + (DefineOwnPropertyScope): + (JSC::JSObject::defineOwnNonIndexProperty): + * runtime/JSObject.h: + (JSObject): + (JSC::JSObject::putByIndexInline): + (JSC::JSObject::putDirectIndex): + (JSC::JSObject::setIndexQuickly): + (JSC::JSObject::initializeIndex): + (JSC::JSObject::getDirect): + (JSC::JSObject::getDirectOffset): + (JSC::JSObject::putDirect): + (JSC::JSObject::isSealed): + (JSC::JSObject::isFrozen): + (JSC::JSObject::flattenDictionaryObject): + (JSC::JSObject::ensureInt32): + (JSC::JSObject::ensureDouble): + (JSC::JSObject::ensureContiguous): + (JSC::JSObject::rageEnsureContiguous): + (JSC::JSObject::ensureArrayStorage): + (JSC::JSObject::finishCreation): + (JSC::JSObject::createStructure): + (JSC::JSObject::ensureLength): + (JSC::JSNonFinalObject::createStructure): + (JSC::JSNonFinalObject::JSNonFinalObject): + (JSC::JSNonFinalObject::finishCreation): + (JSC::JSFinalObject::createStructure): + (JSC::JSFinalObject::finishCreation): + (JSC::JSFinalObject::JSFinalObject): + (JSC::JSFinalObject::create): + (JSC::JSObject::setButterfly): + (JSC::JSObject::JSObject): + (JSC::JSObject::inlineGetOwnPropertySlot): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::setStructureAndReallocateStorageIfNecessary): + (JSC::JSObject::putOwnDataProperty): + (JSC::JSObject::putDirectWithoutTransition): + (JSC): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): + (JSC::JSPropertyNameIterator::create): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::createStructure): + (JSC::JSPropertyNameIterator::setCachedStructure): + (JSC::JSPropertyNameIterator::setCachedPrototypeChain): + (JSC::JSPropertyNameIterator::finishCreation): + (JSC::StructureRareData::setEnumerationCache): + * runtime/JSProxy.cpp: + (JSC::JSProxy::setTarget): + * runtime/JSProxy.h: + (JSC::JSProxy::create): + (JSC::JSProxy::createStructure): + (JSC::JSProxy::JSProxy): + (JSC::JSProxy::finishCreation): + (JSProxy): + * runtime/JSScope.cpp: + (JSC::executeResolveOperations): + (JSC::JSScope::resolveContainingScopeInternal): + (JSC::JSScope::resolveWithBase): + (JSC::JSScope::resolveWithThis): + (JSC::JSScope::resolvePut): + * runtime/JSScope.h: + (JSScope): + (JSC::JSScope::JSScope): + (JSC::JSScope::vm): + (JSC::ExecState::vm): + * runtime/JSSegmentedVariableObject.h: + (JSC::JSSegmentedVariableObject::JSSegmentedVariableObject): + (JSC::JSSegmentedVariableObject::finishCreation): + * runtime/JSString.cpp: + (JSC::JSRopeString::RopeBuilder::expand): + (JSC::StringObject::create): + * runtime/JSString.h: + (JSC): + (JSString): + (JSC::JSString::JSString): + (JSC::JSString::finishCreation): + (JSC::JSString::create): + (JSC::JSString::createHasOtherOwner): + (JSC::JSString::createStructure): + (JSRopeString): + (JSC::JSRopeString::RopeBuilder::RopeBuilder): + (JSC::JSRopeString::RopeBuilder::append): + (RopeBuilder): + (JSC::JSRopeString::JSRopeString): + (JSC::JSRopeString::finishCreation): + (JSC::JSRopeString::append): + (JSC::JSRopeString::createNull): + (JSC::JSRopeString::create): + (JSC::jsEmptyString): + (JSC::jsSingleCharacterString): + (JSC::jsSingleCharacterSubstring): + (JSC::jsNontrivialString): + (JSC::jsString): + (JSC::jsSubstring): + (JSC::jsSubstring8): + (JSC::jsOwnedString): + (JSC::jsStringBuilder): + (JSC::inlineJSValueNotStringtoString): + * runtime/JSStringJoiner.cpp: + (JSC::JSStringJoiner::build): + * runtime/JSSymbolTableObject.h: + (JSC::JSSymbolTableObject::JSSymbolTableObject): + (JSC::JSSymbolTableObject::finishCreation): + (JSC::symbolTablePut): + (JSC::symbolTablePutWithAttributes): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::JSVariableObject): + * runtime/JSWithScope.h: + (JSC::JSWithScope::create): + (JSC::JSWithScope::createStructure): + (JSC::JSWithScope::JSWithScope): + * runtime/JSWrapperObject.h: + (JSWrapperObject): + (JSC::JSWrapperObject::createStructure): + (JSC::JSWrapperObject::JSWrapperObject): + (JSC::JSWrapperObject::setInternalValue): + * runtime/LiteralParser.cpp: + (JSC::::tryJSONPParse): + (JSC::::makeIdentifier): + (JSC::::parse): + * runtime/Lookup.cpp: + (JSC::HashTable::createTable): + (JSC::setUpStaticFunctionSlot): + * runtime/Lookup.h: + (JSC::HashTable::initializeIfNeeded): + (JSC::HashTable::entry): + (JSC::HashTable::begin): + (JSC::HashTable::end): + (HashTable): + (JSC::lookupPut): + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + (JSC::MathObject::finishCreation): + (JSC::mathProtoFuncSin): + * runtime/MathObject.h: + (JSC::MathObject::createStructure): + * runtime/MemoryStatistics.cpp: + * runtime/MemoryStatistics.h: + * runtime/NameConstructor.cpp: + (JSC::NameConstructor::finishCreation): + (JSC::constructPrivateName): + * runtime/NameConstructor.h: + (JSC::NameConstructor::createStructure): + * runtime/NameInstance.cpp: + (JSC::NameInstance::NameInstance): + * runtime/NameInstance.h: + (JSC::NameInstance::createStructure): + (JSC::NameInstance::create): + (NameInstance): + (JSC::NameInstance::finishCreation): + * runtime/NamePrototype.cpp: + (JSC::NamePrototype::NamePrototype): + (JSC::NamePrototype::finishCreation): + * runtime/NamePrototype.h: + (JSC::NamePrototype::createStructure): + * runtime/NativeErrorConstructor.h: + (JSC::NativeErrorConstructor::createStructure): + (JSC::NativeErrorConstructor::finishCreation): + * runtime/NativeErrorPrototype.cpp: + (JSC::NativeErrorPrototype::finishCreation): + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::finishCreation): + (JSC::constructWithNumberConstructor): + * runtime/NumberConstructor.h: + (JSC::NumberConstructor::createStructure): + * runtime/NumberObject.cpp: + (JSC::NumberObject::NumberObject): + (JSC::NumberObject::finishCreation): + (JSC::constructNumber): + * runtime/NumberObject.h: + (NumberObject): + (JSC::NumberObject::create): + (JSC::NumberObject::createStructure): + * runtime/NumberPrototype.cpp: + (JSC::NumberPrototype::NumberPrototype): + (JSC::NumberPrototype::finishCreation): + (JSC::integerValueToString): + (JSC::numberProtoFuncToString): + * runtime/NumberPrototype.h: + (JSC::NumberPrototype::createStructure): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::finishCreation): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::objectConstructorSeal): + (JSC::objectConstructorFreeze): + (JSC::objectConstructorPreventExtensions): + (JSC::objectConstructorIsSealed): + (JSC::objectConstructorIsFrozen): + * runtime/ObjectConstructor.h: + (JSC::ObjectConstructor::createStructure): + (JSC::constructEmptyObject): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::ObjectPrototype): + (JSC::ObjectPrototype::finishCreation): + (JSC::objectProtoFuncToString): + * runtime/ObjectPrototype.h: + (JSC::ObjectPrototype::createStructure): + * runtime/Operations.cpp: + (JSC::jsTypeStringForValue): + * runtime/Operations.h: + (JSC): + (JSC::jsString): + (JSC::jsStringFromArguments): + (JSC::normalizePrototypeChainForChainAccess): + (JSC::normalizePrototypeChain): + * runtime/PropertyMapHashTable.h: + (JSC::PropertyMapEntry::PropertyMapEntry): + (JSC::PropertyTable::createStructure): + (PropertyTable): + (JSC::PropertyTable::copy): + * runtime/PropertyNameArray.h: + (JSC::PropertyNameArray::PropertyNameArray): + (JSC::PropertyNameArray::vm): + (JSC::PropertyNameArray::addKnownUnique): + (PropertyNameArray): + * runtime/PropertyTable.cpp: + (JSC::PropertyTable::create): + (JSC::PropertyTable::clone): + (JSC::PropertyTable::PropertyTable): + * runtime/PrototypeMap.cpp: + (JSC::PrototypeMap::emptyObjectStructureForPrototype): + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + (JSC::RegExp::finishCreation): + (JSC::RegExp::createWithoutCaching): + (JSC::RegExp::create): + (JSC::RegExp::compile): + (JSC::RegExp::compileIfNecessary): + (JSC::RegExp::match): + (JSC::RegExp::compileMatchOnly): + (JSC::RegExp::compileIfNecessaryMatchOnly): + * runtime/RegExp.h: + (JSC): + (RegExp): + (JSC::RegExp::createStructure): + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::RegExpCache): + (JSC::RegExpCache::addToStrongCache): + * runtime/RegExpCache.h: + (RegExpCache): + * runtime/RegExpCachedResult.cpp: + (JSC::RegExpCachedResult::lastResult): + (JSC::RegExpCachedResult::setInput): + * runtime/RegExpCachedResult.h: + (JSC::RegExpCachedResult::RegExpCachedResult): + (JSC::RegExpCachedResult::record): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::RegExpConstructor): + (JSC::RegExpConstructor::finishCreation): + (JSC::constructRegExp): + * runtime/RegExpConstructor.h: + (JSC::RegExpConstructor::createStructure): + (RegExpConstructor): + (JSC::RegExpConstructor::performMatch): + * runtime/RegExpMatchesArray.cpp: + (JSC::RegExpMatchesArray::RegExpMatchesArray): + (JSC::RegExpMatchesArray::create): + (JSC::RegExpMatchesArray::finishCreation): + (JSC::RegExpMatchesArray::reifyAllProperties): + * runtime/RegExpMatchesArray.h: + (RegExpMatchesArray): + (JSC::RegExpMatchesArray::createStructure): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::RegExpObject): + (JSC::RegExpObject::finishCreation): + (JSC::RegExpObject::match): + * runtime/RegExpObject.h: + (JSC::RegExpObject::create): + (JSC::RegExpObject::setRegExp): + (JSC::RegExpObject::setLastIndex): + (JSC::RegExpObject::createStructure): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncCompile): + * runtime/RegExpPrototype.h: + (JSC::RegExpPrototype::createStructure): + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::initializeCommonStrings): + (JSC::SmallStrings::createEmptyString): + (JSC::SmallStrings::createSingleCharacterString): + (JSC::SmallStrings::initialize): + * runtime/SmallStrings.h: + (JSC): + (JSC::SmallStrings::singleCharacterString): + (SmallStrings): + * runtime/SparseArrayValueMap.cpp: + (JSC::SparseArrayValueMap::SparseArrayValueMap): + (JSC::SparseArrayValueMap::finishCreation): + (JSC::SparseArrayValueMap::create): + (JSC::SparseArrayValueMap::createStructure): + (JSC::SparseArrayValueMap::putDirect): + (JSC::SparseArrayEntry::put): + * runtime/SparseArrayValueMap.h: + * runtime/StrictEvalActivation.cpp: + (JSC::StrictEvalActivation::StrictEvalActivation): + * runtime/StrictEvalActivation.h: + (JSC::StrictEvalActivation::create): + (JSC::StrictEvalActivation::createStructure): + * runtime/StringConstructor.cpp: + (JSC::StringConstructor::finishCreation): + * runtime/StringConstructor.h: + (JSC::StringConstructor::createStructure): + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): + (JSC::StringObject::finishCreation): + (JSC::constructString): + * runtime/StringObject.h: + (JSC::StringObject::create): + (JSC::StringObject::createStructure): + (StringObject): + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::StringPrototype): + (JSC::StringPrototype::finishCreation): + (JSC::removeUsingRegExpSearch): + (JSC::replaceUsingRegExpSearch): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSplit): + * runtime/StringPrototype.h: + (JSC::StringPrototype::createStructure): + * runtime/StringRecursionChecker.h: + (JSC::StringRecursionChecker::performCheck): + (JSC::StringRecursionChecker::~StringRecursionChecker): + * runtime/Structure.cpp: + (JSC::StructureTransitionTable::add): + (JSC::Structure::Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::removePropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::toCacheableDictionaryTransition): + (JSC::Structure::toUncacheableDictionaryTransition): + (JSC::Structure::sealTransition): + (JSC::Structure::freezeTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::takePropertyTableOrCloneIfPinned): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::isSealed): + (JSC::Structure::isFrozen): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::addPropertyWithoutTransition): + (JSC::Structure::removePropertyWithoutTransition): + (JSC::Structure::allocateRareData): + (JSC::Structure::cloneRareDataFrom): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::despecifyAllFunctions): + (JSC::Structure::putSpecificValue): + (JSC::Structure::createPropertyMap): + (JSC::Structure::getPropertyNamesFromStructure): + (JSC::Structure::prototypeChainMayInterceptStoreTo): + * runtime/Structure.h: + (Structure): + (JSC::Structure::finishCreation): + (JSC::Structure::setPrototypeWithoutTransition): + (JSC::Structure::setGlobalObject): + (JSC::Structure::setObjectToStringValue): + (JSC::Structure::materializePropertyMapIfNecessary): + (JSC::Structure::materializePropertyMapIfNecessaryForPinning): + (JSC::Structure::setPreviousID): + * runtime/StructureChain.cpp: + (JSC::StructureChain::StructureChain): + * runtime/StructureChain.h: + (JSC::StructureChain::create): + (JSC::StructureChain::createStructure): + (JSC::StructureChain::finishCreation): + (StructureChain): + * runtime/StructureInlines.h: + (JSC::Structure::create): + (JSC::Structure::createStructure): + (JSC::Structure::get): + (JSC::Structure::setEnumerationCache): + (JSC::Structure::prototypeChain): + (JSC::Structure::propertyTable): + * runtime/StructureRareData.cpp: + (JSC::StructureRareData::createStructure): + (JSC::StructureRareData::create): + (JSC::StructureRareData::clone): + (JSC::StructureRareData::StructureRareData): + * runtime/StructureRareData.h: + (StructureRareData): + * runtime/StructureRareDataInlines.h: + (JSC::StructureRareData::setPreviousID): + (JSC::StructureRareData::setObjectToStringValue): + * runtime/StructureTransitionTable.h: + (StructureTransitionTable): + (JSC::StructureTransitionTable::setSingleTransition): + * runtime/SymbolTable.h: + (JSC::SharedSymbolTable::create): + (JSC::SharedSymbolTable::createStructure): + (JSC::SharedSymbolTable::SharedSymbolTable): + * runtime/VM.cpp: Copied from Source/JavaScriptCore/runtime/JSGlobalData.cpp. + (JSC::VM::VM): + (JSC::VM::~VM): + (JSC::VM::createContextGroup): + (JSC::VM::create): + (JSC::VM::createLeaked): + (JSC::VM::sharedInstanceExists): + (JSC::VM::sharedInstance): + (JSC::VM::sharedInstanceInternal): + (JSC::VM::getHostFunction): + (JSC::VM::ClientData::~ClientData): + (JSC::VM::resetDateCache): + (JSC::VM::startSampling): + (JSC::VM::stopSampling): + (JSC::VM::discardAllCode): + (JSC::VM::dumpSampleData): + (JSC::VM::addSourceProviderCache): + (JSC::VM::clearSourceProviderCaches): + (JSC::VM::releaseExecutableMemory): + (JSC::releaseExecutableMemory): + (JSC::VM::gatherConservativeRoots): + (JSC::VM::addRegExpToTrace): + (JSC::VM::dumpRegExpTrace): + * runtime/VM.h: Copied from Source/JavaScriptCore/runtime/JSGlobalData.h. + (VM): + (JSC::VM::isSharedInstance): + (JSC::VM::usingAPI): + (JSC::VM::isInitializingObject): + (JSC::VM::setInitializingObjectClass): + (JSC::WeakSet::heap): + * runtime/WriteBarrier.h: + (JSC): + (JSC::WriteBarrierBase::set): + (JSC::WriteBarrierBase::setMayBeNull): + (JSC::WriteBarrierBase::setEarlyValue): + (JSC::WriteBarrier::WriteBarrier): + * testRegExp.cpp: + (GlobalObject): + (GlobalObject::create): + (GlobalObject::createStructure): + (GlobalObject::finishCreation): + (main): + (testOneRegExp): + (parseRegExpLine): + (runFromFiles): + (realMain): + * yarr/YarrInterpreter.h: + (BytecodePattern): + * yarr/YarrJIT.cpp: + (YarrGenerator): + (JSC::Yarr::YarrGenerator::compile): + (JSC::Yarr::jitCompile): + * yarr/YarrJIT.h: + (JSC): + +2013-04-18 Xuefei Ren + + remove build warning(unused parameter) + https://bugs.webkit.org/show_bug.cgi?id=114670 + + Reviewed by Rob Buis. + + remove warning in Source/JavaScriptCore/runtime/GCActivityCallbackBlackBerry.cpp + + * runtime/GCActivityCallbackBlackBerry.cpp: + (JSC::DefaultGCActivityCallback::didAllocate): + +2013-04-18 Jonathan Liu + + Implement JIT for MinGW-w64 64-bit + https://bugs.webkit.org/show_bug.cgi?id=114580 + + Reviewed by Jocelyn Turcotte. + + * jit/JITStubs.cpp: + (JSC): + +2013-04-17 Mark Lam + + Avoid using a branch range that is too far for some CPU architectures. + https://bugs.webkit.org/show_bug.cgi?id=114782. + + Reviewed by David Kilzer. + + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + +2013-04-17 Julien Brianceau + + Fix SH4 build (broken since r148639). + https://bugs.webkit.org/show_bug.cgi?id=114773. + + Allow longer displacements for specific branches in SH4 LLINT. + + Reviewed by Oliver Hunt. + + * offlineasm/sh4.rb: + +2013-04-14 Roger Fong + + Unreviewed. More Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-14 Roger Fong + + Unreviewed. Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-17 Mark Lam + + Fix broken build. Replaced a static const with a #define. + https://bugs.webkit.org/show_bug.cgi?id=114577. + + Unreviewed. + + * runtime/Watchdog.cpp: + (JSC::Watchdog::Watchdog): + (JSC::Watchdog::isEnabled): + +2013-04-17 Mark Lam + + Add LLINT and baseline JIT support for timing out scripts. + https://bugs.webkit.org/show_bug.cgi?id=114577. + + Reviewed by Geoffrey Garen. + + Introduces the new Watchdog class which is used to track script + execution time, and initiate script termination if needed. + + * API/JSContextRef.cpp: + (internalScriptTimeoutCallback): + (JSContextGroupSetExecutionTimeLimit): + (JSContextGroupClearExecutionTimeLimit): + * API/JSContextRefPrivate.h: + - Added new script execution time limit APIs. + * API/tests/testapi.c: + (currentCPUTime): + (shouldTerminateCallback): + (cancelTerminateCallback): + (extendTerminateCallback): + (main): + - Added new API tests for script execution time limit. + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoopHint): + - loop hints are needed for the llint as well. Hence, it will be + emitted unconditionally. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::addStackTraceIfNecessary): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + - Added checks for script termination before entering script code. + * jit/JIT.cpp: + (JSC::JIT::emitWatchdogTimerCheck): + * jit/JIT.h: + (JSC::JIT::emit_op_loop_hint): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION(void, handle_watchdog_timer)): + * jit/JITStubs.h: + * llint/LLIntExceptions.cpp: + (JSC::LLInt::doThrow): + - Factored out some common code from returnToThrow() and callToThrow(). + (JSC::LLInt::returnToThrow): + (JSC::LLInt::callToThrow): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL(slow_path_handle_watchdog_timer)): + * llint/LLIntSlowPaths.h: + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/ExceptionHelpers.cpp: + (JSC::throwTerminatedExecutionException): + - Also removed the now unused InterruptedExecutionException. + * runtime/ExceptionHelpers.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + - Added watchdog, and removed the now obsolete Terminator. + * runtime/Terminator.h: Removed. + * runtime/Watchdog.cpp: Added. + (JSC::Watchdog::Watchdog): + (JSC::Watchdog::~Watchdog): + (JSC::Watchdog::setTimeLimit): + (JSC::Watchdog::didFire): + (JSC::Watchdog::isEnabled): + (JSC::Watchdog::fire): + (JSC::Watchdog::arm): + (JSC::Watchdog::disarm): + (JSC::Watchdog::startCountdownIfNeeded): + (JSC::Watchdog::startCountdown): + (JSC::Watchdog::stopCountdown): + (JSC::Watchdog::Scope::Scope): + (JSC::Watchdog::Scope::~Scope): + * runtime/Watchdog.h: Added. + (Watchdog): + (JSC::Watchdog::didFire): + (JSC::Watchdog::timerDidFireAddress): + (JSC::Watchdog::isArmed): + (Watchdog::Scope): + * runtime/WatchdogMac.cpp: Added. + (JSC::Watchdog::initTimer): + (JSC::Watchdog::destroyTimer): + (JSC::Watchdog::startTimer): + (JSC::Watchdog::stopTimer): + * runtime/WatchdogNone.cpp: Added. + (JSC::Watchdog::initTimer): + (JSC::Watchdog::destroyTimer): + (JSC::Watchdog::startTimer): + (JSC::Watchdog::stopTimer): + +2013-04-14 Roger Fong + + Unreviewed. VS2010 Windows build fix. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: + +2013-04-14 Roger Fong + + Copy make-file-export-generator script to the the Source folders of the projects that use it. + + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorBuildCmd.cmd: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/make-export-file-generator: Copied from Source/WebCore/make-export-file-generator. + +2013-04-17 Brent Fulgham + + [Windows, WinCairo] Stop individually building WTF files in JSC. + https://bugs.webkit.org/show_bug.cgi?id=114705 + + Reviewed by Anders Carlsson. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + Export additional String/fastMalloc symbols needed by JSC program. + * JavaScriptCore.vcproj/jsc/jsc.vcproj: Don't manually build + WTF implementation files (a second time!) in this project. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + Export additional String/fastMalloc symbols needed by JSC program. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Don't manually + build WTF implementation files (a second time!) in this project. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Ditto. + +2013-04-17 Mark Lam + + releaseExecutableMemory() should canonicalize cell liveness data before + it scans the GC roots. + https://bugs.webkit.org/show_bug.cgi?id=114733. + + Reviewed by Mark Hahnenberg. + + * heap/Heap.cpp: + (JSC::Heap::canonicalizeCellLivenessData): + * heap/Heap.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::releaseExecutableMemory): + +2013-04-16 Commit Queue + + Unreviewed, rolling out r148576. + http://trac.webkit.org/changeset/148576 + https://bugs.webkit.org/show_bug.cgi?id=114714 + + WebCore is building some of these same files (Requested by + bfulgham on #webkit). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: + +2013-04-16 Brent Fulgham + + [Windows, WinCairo] Stop individually building WTF files in JSC. + https://bugs.webkit.org/show_bug.cgi?id=114705 + + Reviewed by Anders Carlsson. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + Export additional String/fastMalloc symbols needed by JSC program. + * JavaScriptCore.vcproj/jsc/jsc.vcproj: Don't manually build + WTF implementation files (a second time!) in this project. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + Export additional String/fastMalloc symbols needed by JSC program. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Don't manually + build WTF implementation files (a second time!) in this project. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Ditto. + +2013-04-16 Patrick Gansterer + + [CMake] Do not use JAVASCRIPTCORE_DIR in add_custom_command() of JavaScriptCore project + https://bugs.webkit.org/show_bug.cgi?id=114265 + + Reviewed by Brent Fulgham. + + Use CMAKE_CURRENT_SOURCE_DIR instead, since it provides the same value and is more + understandable. Also move the GENERATE_HASH_LUT macro into the CMakeLists.txt + of JavaScriptCore to avoid the usage of JAVASCRIPTCORE_DIR there too. + + * CMakeLists.txt: + +2013-04-16 Anders Carlsson + + Another Windows build fix attempt. + + * runtime/JSGlobalData.h: + (JSGlobalData): + +2013-04-16 Anders Carlsson + + Try to fix the Windows build. + + * runtime/JSGlobalData.h: + +2013-04-16 Brent Fulgham + + [Windows] Unreviewed VS2010 build correction. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: + Specify proper link library to avoid mixture of ICU 4.0 and 4.6 + symbols during link. + +2013-04-15 Ryosuke Niwa + + Windows clean build fix after r148479. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-15 Anders Carlsson + + ScriptWrappable subclasses shouldn't have to include WeakInlines.h + https://bugs.webkit.org/show_bug.cgi?id=114641 + + Reviewed by Alexey Proskuryakov. + + Move back the Weak constructor, destructor and clear() to Weak.h. Add a new weakClearSlowCase function + and put it in Weak.cpp. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * heap/Weak.cpp: Added. + * heap/Weak.h: + * heap/WeakInlines.h: + * heap/WeakSetInlines.h: + +2013-04-15 Mark Hahnenberg + + HeapTimer lifetime should be less complicated + https://bugs.webkit.org/show_bug.cgi?id=114529 + + Reviewed by Oliver Hunt. + + Right now our HeapTimer lifetime is rather complicated. HeapTimers are "owned" by the JSGlobalData, + but there's an issue in that there can be races between a thread that is trying to tear down a JSGlobalData + and the HeapTimer's fire function. Our current code for tearing down HeapTimers is an intricate and delicate + dance which probably contains subtle bugs. + + We can make our lives easier by changing things around a bit. + + 1) We should free the API lock from being solely owned by the JSGlobalData so we don't have to worry about + grabbing the lock out of invalid memory when our HeapTimer callback fires. + + 2) We should also make it so that we deref the JSGlobalData first, then unlock the API lock so that when we + have the lock, the JSGlobalData is in one of two states: fully valid or completely destroyed, and we know exactly which one. + + 3) The JSLock can tell us this information by keeping a back pointer to the JSGlobalData. When the JSGlobalData's + destructor is called, it clears this pointer in the JSLock. Other clients of the API lock can then check + this pointer to determine whether or not the JSGlobalData is still around. + + 4) The CFRunLoopTimer will use the API lock as its context rather than the HeapTimer itself. The only way + the HeapTimer's callback can get to the HeapTimer is through the API lock's JSGlobalData pointer. + + 5) The CFRunLoopTimerContext struct has two fields for retain and release callbacks for the context's info field. + We'll provide these callbacks to ref() and deref() the JSLock as necessary. Thus, the timer becomes the other + owner of the JSLock apart from the JSGlobalData. + + * API/APIShims.h: Remove the cruft that was required by the previous design, such as RefGlobalDataTag. + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): + (APIEntryShimWithoutLock): + (JSC::APIEntryShim::APIEntryShim): + (JSC::APIEntryShim::~APIEntryShim): Protect the API lock with a RefPtr, deref the JSGlobalData, which could destroy it, + then unlock the API lock. This ordering prevents others from obtaining the API lock while the JSGlobalData is in the + middle of being torn down. + (JSC::APIEntryShim::init): We now take the lock, then ref the JSGlobalData, which is the opposite order of when we + tear down the shim. + * heap/Heap.cpp: + (JSC::Heap::setActivityCallback): Use PassOwnPtr now. + (JSC::Heap::activityCallback): Ditto. + (JSC::Heap::sweeper): Ditto. + (JSC): + * heap/Heap.h: + (Heap): + * heap/HeapTimer.cpp: + (JSC::retainAPILock): Retain callback for CFRunLoopTimerContext struct. + (JSC::releaseAPILock): Release callback for the CFRunLoopTimerContext struct. + (JSC::HeapTimer::HeapTimer): Use the API lock as the context's info field rather than the HeapTimer. + (JSC::HeapTimer::timerDidFire): Grab the API lock. Return early if the JSGlobalData has already been destroyed. + Otherwise, figure out which kind of HeapTimer we are based on the CFRunLoopTimerRef passed to the callback and + call the HeapTimer's callback. + * heap/HeapTimer.h: + (HeapTimer): + * heap/IncrementalSweeper.cpp: + (JSC::IncrementalSweeper::create): PassOwnPtr all the things. + * heap/IncrementalSweeper.h: + (IncrementalSweeper): + * jsc.cpp: + (jscmain): We use an APIEntryShim instead of a RefPtr for the JSGlobalData because we need to + tear down the JSGlobalData while we still hold the lock, which the APIEntryShim handles correctly. + * runtime/GCActivityCallback.h: + (DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::create): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): Notify the API lock that the JSGlobalData is being torn down. + * runtime/JSGlobalData.h: + (JSGlobalData): + (JSC::JSGlobalData::apiLock): + * runtime/JSLock.cpp: + (JSC::JSLockHolder::JSLockHolder): Ref, then lock (just like the API shim). + (JSC): + (JSC::JSLock::willDestroyGlobalData): + (JSC::JSLockHolder::init): + (JSC::JSLockHolder::~JSLockHolder): Protect, deref, then unlock (just like the API shim). + (JSC::JSLock::JSLock): + * runtime/JSLock.h: Add back pointer to the JSGlobalData and a callback for when the JSGlobalData is being + torn down that clears this pointer to notify other clients (i.e. timer callbacks) that the JSGlobalData is no + longer valid. + (JSLockHolder): + (JSLock): + (JSC::JSLock::globalData): + * testRegExp.cpp: + (realMain): We use an APIEntryShim instead of a RefPtr for the JSGlobalData because we need to + tear down the JSGlobalData while we still hold the lock, which the APIEntryShim handles correctly. + +2013-04-15 Julien Brianceau + + LLInt SH4 backend implementation + https://bugs.webkit.org/show_bug.cgi?id=112886 + + Reviewed by Oliver Hunt. + + * dfg/DFGOperations.cpp: + (JSC): + * jit/JITStubs.cpp: + * llint/LLIntOfflineAsmConfig.h: + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * offlineasm/arm.rb: + * offlineasm/ast.rb: + * offlineasm/backends.rb: + * offlineasm/instructions.rb: + * offlineasm/mips.rb: + * offlineasm/risc.rb: + * offlineasm/sh4.rb: Added. + +2013-04-15 Patrick Gansterer + + [CMake] Add WTF_USE_*_UNICODE variables + https://bugs.webkit.org/show_bug.cgi?id=114556 + + Reviewed by Brent Fulgham. + + WTF_USE_ICU_UNICODE and WTF_USE_WCHAR_UNICODE are used to + reduce duplication in the platform specific CMake files. + + * CMakeLists.txt: + * PlatformEfl.cmake: + +2013-04-13 Patrick Gansterer + + Add missing export macro to SymbolTableEntry::freeFatEntrySlow() + + * runtime/SymbolTable.h: + (SymbolTableEntry): + +2013-04-12 Mark Hahnenberg + + Block freeing thread should call Region::destroy instead of delete + https://bugs.webkit.org/show_bug.cgi?id=114544 + + Reviewed by Oliver Hunt. + + Since Region doesn't have a virtual destructor, calling delete will not properly clean up all of + the state of the Region. We should call destroy() instead. + + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::releaseFreeRegions): + (JSC::BlockAllocator::blockFreeingThreadMain): + +2013-04-11 Benjamin Poulain + + Merge CharacterClassTable into CharacterClass + https://bugs.webkit.org/show_bug.cgi?id=114409 + + Reviewed by Darin Adler. + + CharacterClassTable is only a pointer and a boolean. + It is a little overkill to make a separate allocation + for that. + + * create_regex_tables: + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::matchCharacterClass): + * yarr/YarrPattern.cpp: + (JSC::Yarr::CharacterClassConstructor::charClass): + * yarr/YarrPattern.h: + (CharacterClass): + (JSC::Yarr::CharacterClass::CharacterClass): + +2013-04-11 Michael Saboff + + Added UNLIKELY() suggested in https://bugs.webkit.org/show_bug.cgi?id=114366 + after checking in the original change. + + Rubber-stamped by Jessie Berlin. + + * dfg/DFGOperations.cpp: + +2013-04-10 Benjamin Poulain + + Unify JSC Parser's error and error message + https://bugs.webkit.org/show_bug.cgi?id=114363 + + Reviewed by Geoffrey Garen. + + The parser kept the error state over two attributes: + error and errorMessage. They were changed in sync, + but had some discrepancy (for example, the error message + was always defined to something). + + This patch unifies the two. There is an error if + if the error message is non-null or if the parsing finished + before the end. + + This also gets rid of the allocation of the error message + when instantiating a parser. + + * parser/Parser.cpp: + (JSC::::Parser): + (JSC::::parseInner): + (JSC::::parseSourceElements): + (JSC::::parseVarDeclaration): + (JSC::::parseConstDeclaration): + (JSC::::parseForStatement): + (JSC::::parseSwitchStatement): + (JSC::::parsePrimaryExpression): + * parser/Parser.h: + (JSC::Parser::updateErrorMessage): + (JSC::Parser::updateErrorWithNameAndMessage): + (JSC::Parser::hasError): + (Parser): + +2013-04-10 Oliver Hunt + + Set trap is not being called for API objects + https://bugs.webkit.org/show_bug.cgi?id=114403 + + Reviewed by Anders Carlsson. + + Intercept putByIndex on the callback object and add tests + to make sure we don't regress in future. + + * API/JSCallbackObject.h: + (JSCallbackObject): + * API/JSCallbackObjectFunctions.h: + (JSC::::putByIndex): + (JSC): + * API/tests/testapi.c: + (PropertyCatchalls_setProperty): + * API/tests/testapi.js: + +2013-04-10 Benjamin Poulain + + Mass remove all the empty directories + + Rubberstamped by Ryosuke Niwa. + + * qt/api: Removed. + * qt/benchmarks/qscriptengine: Removed. + * qt/benchmarks/qscriptvalue: Removed. + * qt/tests/qscriptengine: Removed. + * qt/tests/qscriptstring: Removed. + * qt/tests/qscriptvalue: Removed. + * qt/tests/qscriptvalueiterator: Removed. + +2013-04-10 Mark Hahnenberg + + JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots incorrectly + https://bugs.webkit.org/show_bug.cgi?id=114235 + + Reviewed by Filip Pizlo. + + If the object doesn't have any properties but the prototype does, we'll assume those prototype properties are + accessible in the base object's backing store, which is bad. + + * runtime/JSObject.cpp: + (JSC::JSObject::getPropertyNames): + (JSC::JSObject::getOwnNonIndexPropertyNames): + * runtime/PropertyNameArray.h: + (JSC::PropertyNameArray::PropertyNameArray): + (JSC::PropertyNameArray::setNumCacheableSlotsForObject): + (JSC::PropertyNameArray::setBaseObject): + (PropertyNameArray): + +2013-04-10 Patrick Gansterer + + Remove code duplicates from MacroAssemblerARM + https://bugs.webkit.org/show_bug.cgi?id=104457 + + Reviewed by Oliver Hunt. + + Reuse some existing methods to avoid duplicated code. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::store8): + (JSC::MacroAssemblerARM::store32): + (JSC::MacroAssemblerARM::swap): + (JSC::MacroAssemblerARM::add32): + (JSC::MacroAssemblerARM::sub32): + +2013-04-10 Michael Saboff + + DFG: Negative size for new Array() interpreted as large unsigned int + https://bugs.webkit.org/show_bug.cgi?id=114366 + + Reviewed by Oliver Hunt. + + Added new check in operationNewArrayWithSize() for a negative + size. If size is negative throw a "RangeError: Array size is not a + small enough positive integer" exception. + + * dfg/DFGOperations.cpp: + +2013-04-10 peavo@outlook.com + + WinCairo build fails to link. + https://bugs.webkit.org/show_bug.cgi?id=114358 + + Reviewed by Brent Fulgham. + + Export the symbol WTF::MD5::checksum(). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-08 Anders Carlsson + + Remove unneeded headers from FrameLoader.h + https://bugs.webkit.org/show_bug.cgi?id=114223 + + Reviewed by Geoffrey Garen. + + Update for WTF changes. + + * bytecode/SpeculatedType.h: + * runtime/JSCJSValue.h: + +2013-04-09 Geoffrey Garen + + Removed bitrotted TimeoutChecker code + https://bugs.webkit.org/show_bug.cgi?id=114336 + + Reviewed by Alexey Proskuryakov. + + This mechanism hasn't worked for a while. + + MarkL is working on a new version of this feature with a distinct + implementation. + + * API/APIShims.h: + (JSC::APIEntryShim::~APIEntryShim): + (JSC::APIEntryShim::init): + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGGPRInfo.h: + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITStubs.cpp: + * jit/JITStubs.h: + * jit/JSInterfaceJIT.h: + (JSInterfaceJIT): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendStringifiedValue): + (JSC::Walker::walk): + * runtime/TimeoutChecker.cpp: Removed. + * runtime/TimeoutChecker.h: Removed. + +2013-04-10 Oliver Hunt + + REGRESSION (r148073): WebKit Nightly r148082 crashes on launch in JSObjectSetPrivate + https://bugs.webkit.org/show_bug.cgi?id=114341 + + Reviewed by Alexey Proskuryakov. + + Make JSObjectSetPrivate use uncheckedToJS as some clients + clear their private data during finalization for some reason. + + * API/JSObjectRef.cpp: + (JSObjectSetPrivate): + +2013-04-09 Oliver Hunt + + Add liveness tests to JSC API entry points + https://bugs.webkit.org/show_bug.cgi?id=114318 + + Reviewed by Geoffrey Garen. + + Add simple checks for the existence of a method table on any + JSCells passed across the API. This in turn forces a structure + validity test. + + * API/APICast.h: + (toJS): + (toJSForGC): + (unsafeToJS): + * API/JSObjectRef.cpp: + (JSObjectGetPrivate): + +2013-04-09 Oliver Hunt + + Rollout last patch as it destroyed everything + + * API/APICast.h: + (toJS): + (toJSForGC): + +2013-04-09 Oliver Hunt + + Add liveness tests to JSC API entry points + https://bugs.webkit.org/show_bug.cgi?id=114318 + + Reviewed by Filip Pizlo. + + Add simple checks for the existence of a method table on any + JSCells passed across the API. This in turn forces a structure + validity test. + + * API/APICast.h: + (toJS): + (toJSForGC): + +2013-04-09 Balazs Kilvady + + LLInt conditional branch compilation fault on MIPS. + https://bugs.webkit.org/show_bug.cgi?id=114264 + + Reviewed by Filip Pizlo. + + Fix conditional branch compilation in LLInt offlineasm. + + * offlineasm/mips.rb: + +2013-04-08 Mark Hahnenberg + + JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots incorrectly + https://bugs.webkit.org/show_bug.cgi?id=114235 + + Reviewed by Geoffrey Garen. + + Due to the way that numCacheableSlots is currently calculated, checking an object's prototype for enumerable + properties causes us not to cache any properties at all. We should only cache properties on the object itself + since we currently don't take advantage of any sort of name caching for properties in the prototype chain. + This fix undoes a ~2% SunSpider regression caused by http://trac.webkit.org/changeset/147570. + + * runtime/JSObject.cpp: + (JSC::JSObject::getOwnNonIndexPropertyNames): + +2013-04-09 Ryosuke Niwa + + Remove yarr.gyp + https://bugs.webkit.org/show_bug.cgi?id=114247 + + Reviewed by Benjamin Poulain. + + * yarr/yarr.gyp: Removed. + +2013-04-08 Ryosuke Niwa + + Remove JavaScriptCore.gyp/gypi + https://bugs.webkit.org/show_bug.cgi?id=114238 + + Reviewed by Benjamin Poulain. + + * JavaScriptCore.gyp: Removed. + * JavaScriptCore.gyp/.gitignore: Removed. + * JavaScriptCore.gypi: Removed. + +2013-04-08 Vahag Vardanyan + + Adds fromCharCode intrinsic support. + https://bugs.webkit.org/show_bug.cgi?id=104807 + + Reviewed by Oliver Hunt. + + Switch to using fromCharCode intrinsic instead of call operation in some cases. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleIntrinsic): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileFromCharCode): + (DFG): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCode): + (JSC): + * runtime/StringConstructor.h: + (JSC): + +2013-04-08 Benjamin Poulain + + Remove HTML Notification + https://bugs.webkit.org/show_bug.cgi?id=114231 + + Reviewed by Ryosuke Niwa. + + * Configurations/FeatureDefines.xcconfig: + +2013-04-05 Roger Fong + + Build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-08 Filip Pizlo + + DFG should be able to inline string equality comparisons + https://bugs.webkit.org/show_bug.cgi?id=114224 + + Reviewed by Oliver Hunt. + + Inline 8-bit string equality, go to slow path for 16-bit strings. 2x speed-up for string equality + comparisons on 8-bit strings. 20-50% speed-up on JSRegress/HashMap tests. 30% speed-up on + string-fasta. 2% speed-up on SunSpider overall. Some small speed-ups elsewhere. + + This is a gnarly change but we have loads of test coverage already between the HashMap tests and + preexisting DFG string equality tests (which appear to have been designed to test OSR exits, but + also give us good overall coverage on string equality behavior). + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch): + (JSC::DFG::SpeculativeJIT::compare): + (JSC::DFG::SpeculativeJIT::compileStrictEq): + (JSC::DFG::SpeculativeJIT::compileStringEquality): + (DFG): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + +2013-04-08 Geoffrey Garen + + Stop #include-ing all of JavaScriptCore in every DOM-related file + https://bugs.webkit.org/show_bug.cgi?id=114220 + + Reviewed by Sam Weinig. + + I separated WeakInlines.h from Weak.h so WebCore data types that need + to declare a Weak data member don't have to #include all of the + infrastructure for accessing that data member. + + This also required separating Weak from PassWeak by removing the + WeakImplAccessor class template and pushing code down into its subclasses. + + * API/JSWeakObjectMapRefPrivate.cpp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/UnlinkedCodeBlock.h: + * heap/PassWeak.h: + (JSC): + (PassWeak): + (JSC::::PassWeak): + (JSC::::operator): + (JSC::::get): + * heap/SlotVisitorInlines.h: + * heap/Weak.h: + (JSC): + (Weak): + * heap/WeakInlines.h: Copied from Source/JavaScriptCore/heap/Weak.h. + (JSC): + (JSC::::Weak): + (JSC::::operator): + (JSC::::get): + (JSC::::was): + (JSC::weakClear): + * jit/JITThunks.h: + * runtime/RegExpCache.h: + * runtime/Structure.h: + * runtime/WeakGCMap.h: + +2013-04-05 Roger Fong + + Windows build fix fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-04-05 Roger Fong + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-08 Oliver Hunt + + Make resolve more robust in the face of lookup misses + https://bugs.webkit.org/show_bug.cgi?id=114211 + + Reviewed by Filip Pizlo. + + This simply short circuits the resolve operations in the + event that we don't find a path to a property. There's no + repro case for this happening unfortunately. + + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + +2013-04-08 Oliver Hunt + + Build fix. + + * assembler/ARMv7Assembler.h: + (ARMv7Assembler): + +2013-04-08 Justin Haygood + + Allow KeywordLookupGenerator.py to work on Windows with Windows style line endings + https://bugs.webkit.org/show_bug.cgi?id=63234 + + Reviewed by Oliver Hunt. + + * KeywordLookupGenerator.py: + (parseKeywords): + +2013-04-08 Filip Pizlo + + REGRESSION(r146669): Assertion hit in JSC::DFG::SpeculativeJIT::fillSpeculateCell() running webgl tests + https://bugs.webkit.org/show_bug.cgi?id=114129 + + + Reviewed by Darin Adler. + + The check to see if we need a cell check when simplifying a GetById or PutById needs to be hoisted to + above where we abstractly execute the instruction, since after we abstracting execute it, it will + seem like it no longer needs the cell check. + + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + +2013-04-07 Oliver Hunt + + Add bounds checking for WTF::Vector::operator[] + https://bugs.webkit.org/show_bug.cgi?id=89600 + + Reviewed by Filip Pizlo. + + Make a few JSC classes opt-out of release mode bounds checking. + + * assembler/AssemblerBuffer.h: + (AssemblerBuffer): + * assembler/AssemblerBufferWithConstantPool.h: + (AssemblerBufferWithConstantPool): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::bytecodeOffset): + (JSC): + (JSC::replaceExistingEntries): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffsetForCallAtIndex): + (JSC::CodeBlock::callReturnIndexVector): + (JSC::CodeBlock::codeOrigins): + (RareData): + * bytecode/UnlinkedCodeBlock.h: + (JSC::UnlinkedEvalCodeBlock::adoptVariables): + (UnlinkedEvalCodeBlock): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitNewArray): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (CallArguments): + (JSC::BytecodeGenerator::instructions): + (BytecodeGenerator): + * bytecompiler/StaticPropertyAnalysis.h: + (JSC::StaticPropertyAnalysis::create): + (JSC::StaticPropertyAnalysis::StaticPropertyAnalysis): + (StaticPropertyAnalysis): + * bytecompiler/StaticPropertyAnalyzer.h: + (StaticPropertyAnalyzer): + (JSC::StaticPropertyAnalyzer::StaticPropertyAnalyzer): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::link): + * parser/ASTBuilder.h: + (ASTBuilder): + * runtime/ArgList.h: + (MarkedArgumentBuffer): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSort): + +2013-04-07 Benjamin Poulain + + Use Vector::reserveInitialCapacity() when possible in JavaScriptCore runtime + https://bugs.webkit.org/show_bug.cgi?id=114111 + + Reviewed by Andreas Kling. + + Almost all the code was already using Vector::reserveInitialCapacity() + and Vector::uncheckedAppend(). Fix the remaining parts. + + * runtime/ArgList.h: + (MarkedArgumentBuffer): The type VectorType is unused. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncSort): + Move the variable closer to where it is needed. + + * runtime/JSArray.cpp: + (JSC::JSArray::setLengthWithArrayStorage): + * runtime/JSObject.cpp: + (JSC::JSObject::getOwnPropertyNames): + +2013-04-07 Patrick Gansterer + + Remove references to Skia and V8 from CMake files + https://bugs.webkit.org/show_bug.cgi?id=114130 + + Reviewed by Geoffrey Garen. + + * shell/PlatformBlackBerry.cmake: + +2013-04-07 David Kilzer + + Remove the rest of SVG_DOM_OBJC_BINDINGS + + + Reviewed by Geoffrey Garen. + + * Configurations/FeatureDefines.xcconfig: + - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro. + +2013-04-07 Oliver Hunt + + Inspector should display information about non-object exceptions + https://bugs.webkit.org/show_bug.cgi?id=114123 + + Reviewed by Adele Peterson. + + Make sure we store the right stack information, even when throwing + a primitive. + + * interpreter/CallFrame.h: + (JSC::ExecState::clearSupplementaryExceptionInfo): + (ExecState): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::addStackTraceIfNecessary): + (JSC::Interpreter::throwException): + +2013-04-06 Oliver Hunt + + Unify the many and varied stack trace mechanisms, and make the result sane. + https://bugs.webkit.org/show_bug.cgi?id=114072 + + Reviewed by Filip Pizlo. + + Makes JSC::StackFrame record the bytecode offset and other necessary data + rather than requiring us to perform eager evaluation of the line number, etc. + Then remove most of the users of retrieveLastCaller, as most of them were + using it to create a stack trace in a fairly incomplete and inefficient way. + + StackFrame now also has a couple of helpers to get the line and column info. + + * API/JSContextRef.cpp: + (JSContextCreateBacktrace): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitDebugHook): + * interpreter/Interpreter.cpp: + (JSC): + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::unwindCallFrame): + (JSC::getBytecodeOffsetForCallFrame): + (JSC::getCallerInfo): + (JSC::StackFrame::line): + (JSC::StackFrame::column): + (JSC::StackFrame::expressionInfo): + (JSC::StackFrame::toString): + (JSC::Interpreter::getStackTrace): + (JSC::Interpreter::addStackTraceIfNecessary): + (JSC::Interpreter::retrieveCallerFromVMCode): + * interpreter/Interpreter.h: + (StackFrame): + (Interpreter): + * runtime/Error.cpp: + (JSC::throwError): + * runtime/JSGlobalData.h: + (JSC): + (JSGlobalData): + * runtime/JSGlobalObject.cpp: + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): + +2013-04-06 Geoffrey Garen + + Removed v8 bindings hooks from IDL files + https://bugs.webkit.org/show_bug.cgi?id=114091 + + Reviewed by Anders Carlsson and Sam Weinig. + + * heap/HeapStatistics.h: + +2013-04-03 Roger Fong + + Windows VS2010 build fix. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-06 Zan Dobersek + + Remove the remaining PLATFORM(CHROMIUM) guard in JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=114082 + + Reviewed by Ryosuke Niwa. + + * runtime/JSExportMacros.h: Remove the remaining PLATFORM(CHROMIUM) guard. + +2013-04-06 Ed Bartosh + + --minimal build fails with error: control reaches end of non-void function + https://bugs.webkit.org/show_bug.cgi?id=114085 + + Reviewed by Oliver Hunt. + + * interpreter/Interpreter.cpp: return 0 if JIT is not enabled + (JSC::getBytecodeOffsetForCallFrame): + +2013-04-06 Geoffrey Garen + + Try to fix the Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + Added back a symbol that is exported. + +2013-04-06 Geoffrey Garen + + Try to fix the Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + Removed symbols that aren't exported. + +2013-04-06 Geoffrey Garen + + Rolled out 147820 and 147818 because they caused plugins tests to ASSERT + https://bugs.webkit.org/show_bug.cgi?id=114094 + + Reviewed by Anders Carlsson. + + * API/JSContextRef.cpp: + (JSContextCreateBacktrace): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitDebugHook): + * interpreter/Interpreter.cpp: + (JSC): + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::unwindCallFrame): + (JSC::getLineNumberForCallFrame): + (JSC::getCallerInfo): + (JSC::Interpreter::getStackTrace): + (JSC::Interpreter::addStackTraceIfNecessary): + (JSC::Interpreter::retrieveCallerFromVMCode): + * interpreter/Interpreter.h: + (StackFrame): + (JSC::StackFrame::toString): + (JSC::StackFrame::friendlyLineNumber): + (Interpreter): + * runtime/Error.cpp: + (JSC::throwError): + * runtime/JSGlobalData.h: + (JSC): + (JSGlobalData): + * runtime/JSGlobalObject.cpp: + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): + +2013-04-06 Patrick Gansterer + + Unreviewed build fix after r146932. + + * profiler/ProfilerDatabase.cpp: + (Profiler): + +2013-04-06 Patrick Gansterer + + Do not call getenv() on Windows CE where it does not exist. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + +2013-04-05 Benjamin Poulain + + Second attempt to fix the Windows bot + + Unreviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-05 Benjamin Poulain + + Attempt to fix the Windows bot + + Unreviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + r147825 removed the symbol for nullptr_t. Add it back. + +2013-04-02 Roger Fong + + Build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-05 Oliver Hunt + + Build fix. + + * interpreter/Interpreter.cpp: + (JSC::getBytecodeOffsetForCallFrame): + +2013-04-05 Oliver Hunt + + Unify the many and varied stack trace mechanisms, and make the result sane. + https://bugs.webkit.org/show_bug.cgi?id=114072 + + Reviewed by Filip Pizlo. + + Makes JSC::StackFrame record the bytecode offset and other necessary data + rather than requiring us to perform eager evaluation of the line number, etc. + Then remove most of the users of retrieveLastCaller, as most of them were + using it to create a stack trace in a fairly incomplete and inefficient way. + + StackFrame now also has a couple of helpers to get the line and column info. + + * API/JSContextRef.cpp: + (JSContextCreateBacktrace): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitDebugHook): + * interpreter/Interpreter.cpp: + (JSC): + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::unwindCallFrame): + (JSC::getBytecodeOffsetForCallFrame): + (JSC::getCallerInfo): + (JSC::StackFrame::line): + (JSC::StackFrame::column): + (JSC::StackFrame::expressionInfo): + (JSC::StackFrame::toString): + (JSC::Interpreter::getStackTrace): + (JSC::Interpreter::addStackTraceIfNecessary): + (JSC::Interpreter::retrieveCallerFromVMCode): + * interpreter/Interpreter.h: + (StackFrame): + (Interpreter): + * runtime/Error.cpp: + (JSC::throwError): + * runtime/JSGlobalData.h: + (JSC): + (JSGlobalData): + * runtime/JSGlobalObject.cpp: + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): + +2013-04-05 Mark Hahnenberg + + tryCacheGetByID sets StructureStubInfo accessType to an incorrect value + https://bugs.webkit.org/show_bug.cgi?id=114068 + + Reviewed by Geoffrey Garen. + + In the case where we have a non-Value cacheable property, we set the StructureStubInfo accessType to + get_by_id_self, but then we don't patch self and instead patch in a get_by_id_self_fail. This leads to + incorrect profiling data so when the DFG compiles the function, it uses a GetByOffset rather than a GetById, + which leads to loading a GetterSetter directly out of an object. + + * jit/JITStubs.cpp: + (JSC::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + +2013-04-05 Filip Pizlo + + If CallFrame::trueCallFrame() knows that it's about to read garbage instead of a valid CodeOrigin/InlineCallFrame, then it should give up and return 0 and all callers should be robust against this + https://bugs.webkit.org/show_bug.cgi?id=114062 + + Reviewed by Oliver Hunt. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::canGetCodeOrigin): + (CodeBlock): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::trueCallFrame): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::getStackTrace): + +2013-04-05 Geoffrey Garen + + Made USE(JSC) unconditional + https://bugs.webkit.org/show_bug.cgi?id=114058 + + Reviewed by Anders Carlsson. + + * config.h: + +2013-04-05 Filip Pizlo + + Unreviewed, rolling out http://trac.webkit.org/changeset/147729 + + It's causing a bunch of breakage on some more strict compilers: + :1267:2: error: ambiguous instructions require an explicit suffix (could be 'ficomps', or 'ficompl') + + * offlineasm/x86.rb: + +2013-04-05 Roger Fong + + More VS2010 solution makefile fixes. + + + * JavaScriptCore.vcxproj/JavaScriptCore.make: + +2013-04-05 Allan Sandfeld Jensen + + LLint should be able to use x87 instead of SSE for floating pointer + + https://bugs.webkit.org/show_bug.cgi?id=112239 + + Reviewed by Filip Pizlo. + + Implements LLInt floating point operations in x87, to ensure we support + x86 without SSE2. + + X86 (except 64bit) now defaults to using x87 instructions in order to + support all 32bit x86 back to i686. The implementation uses the fucomi + instruction from i686 which sets the new minimum. + + * offlineasm/x86.rb: + +2013-04-04 Christophe Dumez + + Unreviewed EFL build fix. + + We had undefined reference to `JSC::CodeOrigin::maximumBytecodeIndex'. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::findClosureCallForReturnPC): + (JSC::CodeBlock::bytecodeOffset): + +2013-04-04 Geoffrey Garen + + Stop pretending that statements return a value + https://bugs.webkit.org/show_bug.cgi?id=113969 + + Reviewed by Oliver Hunt. + + Expressions have an intrinsic value, which they return to their parent + in the AST. + + Statements just execute for effect in sequence. + + This patch moves emitBytecode into the ExpressionNode and StatementNode + subclasses, and changes the SatementNode subclass to return void. This + eliminates some cruft where we used to return 0, or try to save a bogus + register and return it, as if a statement had a consuming parent in the + AST. + + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + (BytecodeGenerator): + (JSC::BytecodeGenerator::emitNodeInConditionContext): + * bytecompiler/NodesCodegen.cpp: + (JSC::ConstStatementNode::emitBytecode): + (JSC::BlockNode::emitBytecode): + (JSC::EmptyStatementNode::emitBytecode): + (JSC::DebuggerStatementNode::emitBytecode): + (JSC::ExprStatementNode::emitBytecode): + (JSC::VarStatementNode::emitBytecode): + (JSC::IfNode::emitBytecode): + (JSC::IfElseNode::emitBytecode): + (JSC::DoWhileNode::emitBytecode): + (JSC::WhileNode::emitBytecode): + (JSC::ForNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + (JSC::WithNode::emitBytecode): + (JSC::CaseClauseNode::emitBytecode): + (JSC::CaseBlockNode::emitBytecodeForBlock): + (JSC::SwitchNode::emitBytecode): + (JSC::LabelNode::emitBytecode): + (JSC::ThrowNode::emitBytecode): + (JSC::TryNode::emitBytecode): + (JSC::ScopeNode::emitStatementsBytecode): + (JSC::ProgramNode::emitBytecode): + (JSC::EvalNode::emitBytecode): + (JSC::FunctionBodyNode::emitBytecode): + (JSC::FuncDeclNode::emitBytecode): + * parser/NodeConstructors.h: + (JSC::PropertyListNode::PropertyListNode): + (JSC::ArgumentListNode::ArgumentListNode): + * parser/Nodes.h: + (Node): + (ExpressionNode): + (StatementNode): + (ConstStatementNode): + (BlockNode): + (EmptyStatementNode): + (DebuggerStatementNode): + (ExprStatementNode): + (VarStatementNode): + (IfNode): + (IfElseNode): + (DoWhileNode): + (WhileNode): + (ForNode): + (ForInNode): + (ContinueNode): + (BreakNode): + (ReturnNode): + (WithNode): + (LabelNode): + (ThrowNode): + (TryNode): + (ProgramNode): + (EvalNode): + (FunctionBodyNode): + (FuncDeclNode): + (CaseBlockNode): + (SwitchNode): + +2013-04-04 Oliver Hunt + + Exception stack unwinding doesn't handle inline callframes correctly + https://bugs.webkit.org/show_bug.cgi?id=113952 + + Reviewed by Geoffrey Garen. + + The basic problem here is that the exception stack unwinding was + attempting to be "clever" and avoid doing a correct stack walk + as it "knew" inline callframes couldn't have exception handlers. + + This used to be safe as the exception handling machinery was + designed to fail gently and just claim that no handler existed. + This was "safe" and even "correct" inasmuch as we currently + don't run any code with exception handlers through the dfg. + + This patch fixes the logic by simply making everything uniformly + use the safe stack walking machinery, and making the correct + boundary checks occur everywhere that they should. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::findClosureCallForReturnPC): + (JSC::CodeBlock::bytecodeOffset): + * interpreter/Interpreter.cpp: + (JSC): + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::unwindCallFrame): + (JSC::getCallerInfo): + (JSC::Interpreter::getStackTrace): + (JSC::Interpreter::retrieveCallerFromVMCode): + +2013-04-04 Geoffrey Garen + + Removed a defunct comment + https://bugs.webkit.org/show_bug.cgi?id=113948 + + Reviewed by Oliver Hunt. + + This is also a convenient way to test the EWS. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC): + +2013-04-04 Martin Robinson + + [GTK] Remove the gyp build + https://bugs.webkit.org/show_bug.cgi?id=113942 + + Reviewed by Gustavo Noronha Silva. + + * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Removed. + * JavaScriptCore.gyp/redirect-stdout.sh: Removed. + +2013-04-04 Geoffrey Garen + + Simplified bytecode generation by merging prefix and postfix nodes + https://bugs.webkit.org/show_bug.cgi?id=113925 + + Reviewed by Filip Pizlo. + + PostfixNode now inherits from PrefixNode, so when we detect that we're + in a context where postifx and prefix are equivalent, PostFixNode can + just call through to PrefixNode codegen, instead of duplicating the + logic. + + * bytecompiler/NodesCodegen.cpp: + (JSC::PostfixNode::emitResolve): + (JSC::PostfixNode::emitBracket): + (JSC::PostfixNode::emitDot): + * parser/NodeConstructors.h: + (JSC::PostfixNode::PostfixNode): + * parser/Nodes.h: + (JSC): + (PrefixNode): + (PostfixNode): + +2013-04-04 Andras Becsi + + Fix the build with GCC 4.8 + https://bugs.webkit.org/show_bug.cgi?id=113147 + + Reviewed by Allan Sandfeld Jensen. + + Initialize JSObject* exception to suppress warnings that make + the build fail because of -Werror=maybe-uninitialized. + + * runtime/Executable.cpp: + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + +2013-04-02 Mark Hahnenberg + + get_by_pname can become confused when iterating over objects with static properties + https://bugs.webkit.org/show_bug.cgi?id=113831 + + Reviewed by Geoffrey Garen. + + get_by_pname doesn't take static properties into account when using a JSPropertyNameIterator to directly + access an object's backing store. One way to fix this is to not cache any properties when iterating over + objects with static properties. This patch fixes the bug that was originally reported on swisscom.ch. + + * runtime/JSObject.cpp: + (JSC::JSObject::getOwnNonIndexPropertyNames): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::create): + * runtime/PropertyNameArray.h: + (JSC::PropertyNameArray::PropertyNameArray): + (JSC::PropertyNameArray::numCacheableSlots): + (JSC::PropertyNameArray::setNumCacheableSlots): + (PropertyNameArray): + +2013-04-02 Geoffrey Garen + + DFG should compile a little sooner + https://bugs.webkit.org/show_bug.cgi?id=113835 + + Unreviewed. + + Rolled out r147511 because it was based on incorrect performance + measurement. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::optimizationThresholdScalingFactor): + +2013-04-02 Geoffrey Garen + + DFG should compile a little sooner + https://bugs.webkit.org/show_bug.cgi?id=113835 + + Reviewed by Michael Saboff. + + 2% speedup on SunSpider. + + 2% speedup on JSRegress. + + Neutral on Octane, v8, and Kraken. + + The worst-hit single sub-test is kraken-stanford-crypto-ccm.js, which gets + 18% slower. Since Kraken is neutral overall in its preferred mean, I + think that's OK for now. + + (Our array indexing speculation fails pathologically on + kraken-stanford-crypto-ccm.js. Compiling sooner is a regression because + it triggers those failures sooner. I'm going to file some follow-up bugs + explaining how to fix our speculations on this sub-test, at which point + compiling earlier should become a slight speedup on Kraken overall.) + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::optimizationThresholdScalingFactor): I experimented + with a few different options, including reducing the coefficient 'a'. + A simple linear reduction on instruction count worked best. + +2013-04-01 Benjamin Poulain + + Use Vector::reserveInitialCapacity and Vector::uncheckedAppend for JSC's APIs + https://bugs.webkit.org/show_bug.cgi?id=113651 + + Reviewed by Andreas Kling. + + This removes a bunch of branches on initialization and when + filling the vector. + + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackObjectFunctions.h: + (JSC::::construct): + (JSC::::call): + * API/JSObjectRef.cpp: + (JSObjectCopyPropertyNames): + +2013-04-01 Mark Hahnenberg + + Fixing borked VS 2010 project file + + Unreviewed bot greening. + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + +2013-04-01 Mark Hahnenberg + + One more Windows build fix + + Unreviewed. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-04-01 Mark Hahnenberg + + More build fallout fixes. + + Unreviewed build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Add new export symbols. + * heap/SuperRegion.cpp: Windows didn't like "LLU". + +2013-04-01 Mark Hahnenberg + + r147324 broke the world + https://bugs.webkit.org/show_bug.cgi?id=113704 + + Unreviewed build fix. + + Remove a bunch of unused variables and use the correctly sized types for 32-bit platforms. + + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::BlockAllocator): + * heap/BlockAllocator.h: + (BlockAllocator): + * heap/Heap.cpp: + (JSC::Heap::Heap): + * heap/SuperRegion.cpp: + (JSC::SuperRegion::SuperRegion): + * heap/SuperRegion.h: + (SuperRegion): + +2013-04-01 Mark Hahnenberg + + 32-bit Windows build fix + + Unreviewed build fix. + + * heap/SuperRegion.cpp: + * heap/SuperRegion.h: Use uint64_t instead of size_t. + (SuperRegion): + +2013-04-01 Mark Hahnenberg + + EFL build fix + + Unreviewed build fix. + + * CMakeLists.txt: + +2013-03-31 Mark Hahnenberg + + Regions should be allocated from the same contiguous segment of virtual memory + https://bugs.webkit.org/show_bug.cgi?id=113662 + + Reviewed by Filip Pizlo. + + Instead of letting the OS spread our Regions all over the place, we should allocate them all within + some range of each other. This change will open the door to some other optimizations, e.g. doing simple + range checks for our write barriers and compressing JSCell pointers to 32-bits. + + Added new SuperRegion class that encapsulates allocating Regions from a contiguous reserved chunk of + virtual address space. It functions very similarly to the FixedVMPoolExecutableAllocator class used by the JIT. + + Also added two new subclasses of Region, NormalRegion and ExcessRegion. + + NormalRegion is the type of Region that is normally allocated when there is available space remaining + in the SuperRegion. If we ever run out of space in the SuperRegion, we fall back to allocating + ExcessRegions, which are identical to how Regions have behaved up until now, i.e. they contain a + PageAllocationAligned. + + We only use the SuperRegion (and NormalRegions) on 64-bit systems, since it doesn't make sense to reserve the + entire 4 GB address space on 32-bit systems just for the JS heap. + + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::BlockAllocator): + * heap/BlockAllocator.h: + (JSC): + (BlockAllocator): + (JSC::BlockAllocator::allocate): + (JSC::BlockAllocator::allocateCustomSize): + (JSC::BlockAllocator::deallocateCustomSize): + * heap/Heap.cpp: + (JSC::Heap::Heap): + (JSC): + (JSC::Heap::didExceedFixedHeapSizeLimit): + * heap/Heap.h: + (Heap): + * heap/MarkedBlock.cpp: + (JSC::MarkedBlock::create): + * heap/Region.h: + (Region): + (JSC): + (NormalRegion): + (JSC::NormalRegion::base): + (JSC::NormalRegion::size): + (ExcessRegion): + (JSC::ExcessRegion::base): + (JSC::ExcessRegion::size): + (JSC::NormalRegion::NormalRegion): + (JSC::NormalRegion::tryCreate): + (JSC::NormalRegion::tryCreateCustomSize): + (JSC::NormalRegion::reset): + (JSC::ExcessRegion::ExcessRegion): + (JSC::ExcessRegion::~ExcessRegion): + (JSC::ExcessRegion::create): + (JSC::ExcessRegion::createCustomSize): + (JSC::ExcessRegion::reset): + (JSC::Region::Region): + (JSC::Region::initializeBlockList): + (JSC::Region::create): + (JSC::Region::createCustomSize): + (JSC::Region::~Region): + (JSC::Region::destroy): + (JSC::Region::reset): + (JSC::Region::deallocate): + (JSC::Region::base): + (JSC::Region::size): + * heap/SuperRegion.cpp: Added. + (JSC): + (JSC::SuperRegion::SuperRegion): + (JSC::SuperRegion::getAlignedBase): + (JSC::SuperRegion::allocateNewSpace): + (JSC::SuperRegion::notifyNeedPage): + (JSC::SuperRegion::notifyPageIsFree): + * heap/SuperRegion.h: Added. + (JSC): + (SuperRegion): + +2013-04-01 Benjamin Poulain + + Remove an unused variable from the ARMv7 Assembler + https://bugs.webkit.org/show_bug.cgi?id=113653 + + Reviewed by Andreas Kling. + + * assembler/ARMv7Assembler.h: + (ARMv7Assembler): + +2013-03-31 Adam Barth + + [Chromium] Yarr should build using a separate GYP file from JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=113652 + + Reviewed by Nico Weber. + + This patch moves JavaScriptCore.gyp to yarr.gyp because Chromium only + uses this GYP file to build yarr. + + * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: + * JavaScriptCore.gypi: + * yarr/yarr.gyp: Renamed from Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp. + +2013-03-31 Filip Pizlo + + Unreviewed, fix a comment. While thinking about TBAA for array accesses, + I realized that we have to be super careful about aliasing of typed arrays. + + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::getByValLoadElimination): + +2013-03-30 Mark Hahnenberg + + Move Region into its own header + https://bugs.webkit.org/show_bug.cgi?id=113617 + + Reviewed by Geoffrey Garen. + + BlockAllocator.h is getting a little crowded. We should move the Region class into its own + header, since it's pretty independent from the BlockAllocator. + + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.xcodeproj/project.pbxproj: + * heap/BlockAllocator.h: + (JSC): + * heap/Region.h: Added. + (JSC): + (DeadBlock): + (JSC::DeadBlock::DeadBlock): + (Region): + (JSC::Region::blockSize): + (JSC::Region::isFull): + (JSC::Region::isEmpty): + (JSC::Region::isCustomSize): + (JSC::Region::create): + (JSC::Region::createCustomSize): + (JSC::Region::Region): + (JSC::Region::~Region): + (JSC::Region::reset): + (JSC::Region::allocate): + (JSC::Region::deallocate): + +2013-03-29 Mark Hahnenberg + + Objective-C API: Remove -[JSManagedValue managedValueWithValue:owner:] + https://bugs.webkit.org/show_bug.cgi?id=113602 + + Reviewed by Geoffrey Garen. + + Since we put the primary way of keeping track of external object graphs (i.e. "managed" references) + in JSVirtualMachine, there is some overlap in the functionality of that interface and JSManagedValue. + Specifically, we no longer need the methods that include an owner, since ownership is now tracked + by JSVirtualMachine. These JSManagedValues will become weak pointers unless they are used + with [JSVirtualMachine addManagedReference:withOwner:], in which case their lifetime is tied to that + of their owner. + + * API/JSManagedValue.h: + * API/JSManagedValue.mm: + (-[JSManagedValue init]): + (-[JSManagedValue initWithValue:]): + (JSManagedValueHandleOwner::isReachableFromOpaqueRoots): + * API/JSVirtualMachine.mm: + (getInternalObjcObject): + * API/tests/testapi.mm: + (-[TextXYZ setOnclick:]): + (-[TextXYZ dealloc]): + +2013-03-29 Geoffrey Garen + + Simplified bytecode generation by unforking "condition context" codegen + https://bugs.webkit.org/show_bug.cgi?id=113554 + + Reviewed by Mark Hahnenberg. + + Now, a node that establishes a condition context can always ask its child + nodes to generate into that context. + + This has a few advantages: + + (*) Removes a bunch of code; + + (*) Optimizes a few missed cases like "if (!(x < 2))", "if (!!x)", and + "if (!x || !y)"; + + (*) Paves the way to removing more opcodes. + + * bytecode/Opcode.h: + (JSC): Separated out the branching opcodes for clarity. + * bytecompiler/NodesCodegen.cpp: + (JSC::ExpressionNode::emitBytecodeInConditionContext): All expressions + can be emitted in a condition context now -- the default behavior is + to branch based on the expression's value. + + (JSC::LogicalNotNode::emitBytecodeInConditionContext): + (JSC::LogicalOpNode::emitBytecodeInConditionContext): + (JSC::ConditionalNode::emitBytecode): + (JSC::IfNode::emitBytecode): + (JSC::IfElseNode::emitBytecode): + (JSC::DoWhileNode::emitBytecode): + (JSC::WhileNode::emitBytecode): + (JSC::ForNode::emitBytecode): + * parser/Nodes.h: + (JSC::ExpressionNode::isSubtract): + (ExpressionNode): + (LogicalNotNode): + (LogicalOpNode): Removed lots of code for handling expressions + that couldn't generate into a condition context because all expressions + can now. + +2013-03-28 Geoffrey Garen + + Simplified the bytecode by removing op_loop and op_loop_if_* + https://bugs.webkit.org/show_bug.cgi?id=113548 + + Reviewed by Filip Pizlo. + + Regular jumps will suffice. + + These opcodes are identical to branches, except they also do timeout + checking. That style of timeout checking has been broken for a long + time, and when we add back timeout checking, it won't use these opcodes. + + * JavaScriptCore.order: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/PreciseJumpTargets.cpp: + (JSC::computePreciseJumpTargets): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJump): + (JSC::BytecodeGenerator::emitJumpIfTrue): + (JSC::BytecodeGenerator::emitJumpIfFalse): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + (JIT): + (JSC): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + +2013-03-28 Geoffrey Garen + + Simplified the bytecode by removing op_jmp_scopes + https://bugs.webkit.org/show_bug.cgi?id=113545 + + Reviewed by Filip Pizlo. + + We already have op_pop_scope and op_jmp, so we don't need op_jmp_scopes. + Using op_jmp_scopes was also adding a "jump to self" to codegen for + return statements, which was pretty silly. + + * JavaScriptCore.order: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + * bytecode/Opcode.h: + (JSC::padOpcodeName): + * bytecode/PreciseJumpTargets.cpp: + (JSC::computePreciseJumpTargets): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitComplexPopScopes): + (JSC::BytecodeGenerator::emitPopScopes): + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): + * bytecompiler/NodesCodegen.cpp: + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + * jit/JITOpcodes32_64.cpp: + * jit/JITStubs.cpp: + * jit/JITStubs.h: + * llint/LLIntSlowPaths.cpp: + * llint/LLIntSlowPaths.h: + * llint/LowLevelInterpreter.asm: + +2013-03-28 Mark Hahnenberg + + Safari hangs during test262 run in CodeCache::pruneSlowCase + https://bugs.webkit.org/show_bug.cgi?id=113469 + + Reviewed by Geoffrey Garen. + + We can end up hanging for quite some time if we add a lot of small keys to the CodeCache. + By the time we get around to pruning the cache, we have a potentially tens or hundreds of + thousands of small entries, which can cause a noticeable hang when pruning them. + + To fix this issue we added a hard cap to the number of entries in the cache because we + could potentially have to remove every element in the map. + + * runtime/CodeCache.cpp: + (JSC::CodeCacheMap::pruneSlowCase): We need to prune until we're both under the hard cap and the + capacity in bytes. + * runtime/CodeCache.h: + (CodeCacheMap): + (JSC::CodeCacheMap::numberOfEntries): Convenience accessor function to the number of entries in + the map that does the cast to size_t of m_map.size() for us. + (JSC::CodeCacheMap::canPruneQuickly): Checks that the total number is under the hard cap. We put this + check inside a function to more accurately describe why we're doing the check and to abstract out + the actual calculation in case we want to coalesce calls to pruneSlowCase in the future. + (JSC::CodeCacheMap::prune): Check the number of entries against our hard cap. If it's greater than + the cap then we need to drop down to pruneSlowCase. + +2013-03-28 Zan Dobersek + + Unreviewed build fix for the EFL and GTK ports. + + * runtime/CodeCache.cpp: + (JSC::CodeCacheMap::pruneSlowCase): Pass a 0 casted to the int64_t type instead of 0LL + to the std::max call so the arguments' types match. + +2013-03-27 Geoffrey Garen + + Unreviewed build fix: Removed a dead field. + + Pointed out by Mark Lam. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::ByteCodeParser): + (ByteCodeParser): + +2013-03-27 Geoffrey Garen + + Unreviewed build fix: Removed a dead field. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::ByteCodeParser): + (ByteCodeParser): + +2013-03-27 Geoffrey Garen + + Removed some dead code in the DFG bytecode parser + https://bugs.webkit.org/show_bug.cgi?id=113472 + + Reviewed by Sam Weinig. + + Now that Phi creation and liveness analysis are separate passes, we can + remove the vestiges of code that used to do that in the bytecode + parser. + + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::addToGraph): + (JSC::DFG::ByteCodeParser::parse): + +2013-03-27 Filip Pizlo + + JIT and DFG should NaN-check loads from Float32 arrays + https://bugs.webkit.org/show_bug.cgi?id=113462 + + + Reviewed by Mark Hahnenberg. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitFloatTypedArrayGetByVal): + +2013-03-27 Mark Hahnenberg + + CodeCache::m_capacity can becoming negative, producing undefined results in pruneSlowCase + https://bugs.webkit.org/show_bug.cgi?id=113453 + + Reviewed by Geoffrey Garen. + + * runtime/CodeCache.cpp: + (JSC::CodeCacheMap::pruneSlowCase): We make sure that m_minCapacity doesn't drop below zero now. + This prevents m_capacity from doing the same. + +2013-03-27 Filip Pizlo + + DFG should use CheckStructure for typed array checks whenever possible + https://bugs.webkit.org/show_bug.cgi?id=113374 + + Reviewed by Geoffrey Garen. + + We used to do the right thing, but it appears that this regressed at some point. Since the + FixupPhase now has the ability to outright remove spurious CheckStructures on array + operations, it is profitable for the ByteCodeParser to insert CheckStructures whenver there + is a chance that it might be profitable, and when the profiling tells us what structure to + check. + + Also added some code for doing ArrayProfile debugging. + + This is a slightly speed-up. Maybe 3% on Mandreel. + + * bytecode/ArrayProfile.cpp: + (JSC::ArrayProfile::computeUpdatedPrediction): + * dfg/DFGArrayMode.h: + (JSC::DFG::ArrayMode::benefitsFromStructureCheck): + +2013-03-27 Zeno Albisser + + [Qt] Remove Qt specific WorkQueueItem definitions. + https://bugs.webkit.org/show_bug.cgi?id=112891 + + This patch is preparation work for removing + WorkQueue related code from TestRunnerQt and + replacing it with generic TestRunner code. + + Reviewed by Benjamin Poulain. + + * API/JSStringRefQt.cpp: + (JSStringCreateWithQString): + Adding a convenience function to create a + JSStringRef from a QString. + * API/JSStringRefQt.h: + +2013-03-26 Filip Pizlo + + REGRESSION: Sometimes, operations on proven strings ignore changes to the string prototype + https://bugs.webkit.org/show_bug.cgi?id=113353 + + + Reviewed by Mark Hahnenberg and Geoffrey Garen. + + ToString should call speculateStringObject() even if you know that it's a string object, since + it calls it to also get the watchpoint. Note that even with this change, if you do + Phantom(Check:StringObject:@a), it might get eliminated just because we proved that @a is a + string object (thereby eliminating the prototype watchpoint); that's fine since ToString is + MustGenerate and never decays to Phantom. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileToStringOnCell): + (JSC::DFG::SpeculativeJIT::speculateStringObject): + (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure): + +2013-03-26 Mark Hahnenberg + + REGRESSION(r144131): It made fast/js/regress/string-repeat-arith.html assert on 32 bit + https://bugs.webkit.org/show_bug.cgi?id=112106 + + Rubber stamped by Filip Pizlo. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32): Get rid of the case for constants because + we would have done constant folding anyways on a ValueToInt32. + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): Fixed a random compile error with this flag enabled. + +2013-03-26 Filip Pizlo + + JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere + https://bugs.webkit.org/show_bug.cgi?id=113144 + + Reviewed by Geoffrey Garen. + + Forgot to include Geoff's requested change in the original commit. + + * profiler/ProfilerDatabase.cpp: + (Profiler): + +2013-03-25 Filip Pizlo + + JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere + https://bugs.webkit.org/show_bug.cgi?id=113144 + + Reviewed by Geoffrey Garen. + + Added the ability to save profiler output with JSC_enableProfiler=true. It will save it + to the current directory, or JSC_PROFILER_PATH if the latter was specified. + + This works by saving the Profiler::Database either when it is destroyed or atexit(), + whichever happens first. + + This allows use of the profiler from any WebKit client. + + * jsc.cpp: + (jscmain): + * profiler/ProfilerDatabase.cpp: + (Profiler): + (JSC::Profiler::Database::Database): + (JSC::Profiler::Database::~Database): + (JSC::Profiler::Database::registerToSaveAtExit): + (JSC::Profiler::Database::addDatabaseToAtExit): + (JSC::Profiler::Database::removeDatabaseFromAtExit): + (JSC::Profiler::Database::performAtExitSave): + (JSC::Profiler::Database::removeFirstAtExitDatabase): + (JSC::Profiler::Database::atExitCallback): + * profiler/ProfilerDatabase.h: + (JSC::Profiler::Database::databaseID): + (Database): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + +2013-03-25 Filip Pizlo + + ArrayMode should not consider SpecOther when refining the base + https://bugs.webkit.org/show_bug.cgi?id=113271 + + Reviewed by Geoffrey Garen. + + 9% speed-up on Octane/pdfjs. + + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::refine): + +2013-03-26 Csaba Osztrogonác + + Fix unused parameter warnings in JITInlines.h + https://bugs.webkit.org/show_bug.cgi?id=112560 + + Reviewed by Zoltan Herczeg. + + * jit/JITInlines.h: + (JSC::JIT::beginUninterruptedSequence): + (JSC::JIT::endUninterruptedSequence): + (JSC): + +2013-03-25 Kent Tamura + + Rename ENABLE_INPUT_TYPE_DATETIME + https://bugs.webkit.org/show_bug.cgi?id=113254 + + Reviewed by Kentaro Hara. + + Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE. + Actually I'd like to remove the code, but we shouldn't remove it yet + because we shipped products with it on some platforms. + + * Configurations/FeatureDefines.xcconfig: + +2013-03-25 Mark Lam + + Offlineasm cloop backend compiles op+branch incorrectly. + https://bugs.webkit.org/show_bug.cgi?id=113146. + + Reviewed by Geoffrey Garen. + + * dfg/DFGRepatch.h: + (JSC::DFG::dfgResetGetByID): + (JSC::DFG::dfgResetPutByID): + - These functions never return when the DFG is dsiabled, not just when + asserts are enabled. Changing the attribute from NO_RETURN_DUE_TO_ASSERT + to NO_RETURN. + * llint/LLIntOfflineAsmConfig.h: + - Added some #defines needed to get the cloop building again. + * offlineasm/cloop.rb: + - Fix cloopEmitOpAndBranchIfOverflow() and cloopEmitOpAndBranch() to + emit code that unconditionally executes the specified operation before + doing the conditional branch. + +2013-03-25 Mark Hahnenberg + + JSObject::enterDictionaryIndexingMode doesn't have a case for ALL_BLANK_INDEXING_TYPES + https://bugs.webkit.org/show_bug.cgi?id=113236 + + Reviewed by Geoffrey Garen. + + * runtime/JSObject.cpp: + (JSC::JSObject::enterDictionaryIndexingMode): We forgot blank indexing types. + +2013-03-23 Mark Hahnenberg + + HandleSet should use HeapBlocks for storing handles + https://bugs.webkit.org/show_bug.cgi?id=113145 + + Reviewed by Geoffrey Garen. + + * GNUmakefile.list.am: Build project changes. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Ditto. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * heap/BlockAllocator.cpp: Rename the RegionSet to m_fourKBBlockRegionSet because there are + too many block types to include them all in the name now. + (JSC::BlockAllocator::BlockAllocator): + * heap/BlockAllocator.h: + (BlockAllocator): Add the appropriate override for regionSetFor. + (JSC::WeakBlock): + (JSC::MarkStackSegment): + (JSC::HandleBlock): + * heap/HandleBlock.h: Added. + (HandleBlock): New class for HandleBlocks. + (JSC::HandleBlock::blockFor): Static method to get the block of the given HandleNode pointer. Allows + us to quickly figure out which HandleSet the HandleNode belongs to without storing the pointer to it + in the HandleNode. + (JSC::HandleBlock::handleSet): Getter. + * heap/HandleBlockInlines.h: Added. + (JSC::HandleBlock::create): + (JSC::HandleBlock::HandleBlock): + (JSC::HandleBlock::payloadEnd): + (JSC::HandleBlock::payload): + (JSC::HandleBlock::nodes): + (JSC::HandleBlock::nodeAtIndex): + (JSC::HandleBlock::nodeCapacity): + * heap/HandleSet.cpp: + (JSC::HandleSet::~HandleSet): + (JSC::HandleSet::grow): + * heap/HandleSet.h: + (HandleNode): Move the internal Node class from HandleSet to be its own public class so it can be + used by HandleBlock. + (HandleSet): Add a typedef so that Node refers to the new HandleNode class. + (JSC::HandleSet::toHandle): + (JSC::HandleSet::toNode): + (JSC::HandleSet::allocate): + (JSC::HandleSet::deallocate): + (JSC::HandleNode::HandleNode): + (JSC::HandleNode::slot): + (JSC::HandleNode::handleSet): Use the new blockFor static function to get the right HandleBlock and lookup + the HandleSet. + (JSC::HandleNode::setPrev): + (JSC::HandleNode::prev): + (JSC::HandleNode::setNext): + (JSC::HandleNode::next): + (JSC::HandleSet::forEachStrongHandle): + * heap/Heap.h: Friend HandleSet so that it can access the BlockAllocator when allocating HandleBlocks. + +2013-03-22 David Kilzer + + BUILD FIX (r145119): Make JSValue* properties default to (assign) + + + Reviewed by Mark Hahnenberg. + + Fixes the following build failures: + + Source/JavaScriptCore/API/tests/testapi.mm:106:1: error: no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed [-Werror,-Wobjc-property-no-attribute] + @property JSValue *onclick; + ^ + Source/JavaScriptCore/API/tests/testapi.mm:106:1: error: default property attrib ute 'assign' not appropriate for non-GC object [-Werror,-Wobjc-property-no-attribute] + Source/JavaScriptCore/API/tests/testapi.mm:107:1: error: no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed [-Werror,-Wobjc-property-no-attribute] + @property JSValue *weakOnclick; + ^ + Source/JavaScriptCore/API/tests/testapi.mm:107:1: error: default property attribute 'assign' not appropriate for non-GC object [-Werror,-Wobjc-property-no-attribute] + 4 errors generated. + + * API/tests/testapi.mm: Default to (assign) for JSValue* + properties. + +2013-03-22 Ryosuke Niwa + + testLeakingPrototypesAcrossContexts added in r146682 doesn't compile on Win and fails on Mac + https://bugs.webkit.org/show_bug.cgi?id=113125 + + Reviewed by Mark Hahnenberg + + Remove the test added in r146682 as it's now failing on Mac. + This is the test that was causing a compilation failure on Windows. + + * API/tests/testapi.c: + (main): + +2013-03-22 Ryosuke Niwa + + Fix the typo: WIN -> WINDOWS. + + * API/tests/testapi.c: + (main): + +2013-03-22 Ryosuke Niwa + + I really can't figure out what's wrong with this one. + Temporarily disable the test added by r146682 on Windows since it doesn't compile. + + * API/tests/testapi.c: + (main): + +2013-03-22 Ryosuke Niwa + + Another build fix (after r146693) for r146682. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-03-22 Roger Fong + + Unreviewed. AppleWin build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: + * JavaScriptCore.vcxproj/copy-files.cmd: + +2013-03-22 Mark Hahnenberg + + -[TinyDOMNode dealloc] should call [super dealloc] when ARC is not enabled + https://bugs.webkit.org/show_bug.cgi?id=113054 + + Reviewed by Geoffrey Garen. + + * API/tests/testapi.mm: + (-[TinyDOMNode dealloc]): + +2013-03-22 Mark Hahnenberg + + opaqueJSClassData should be cached on JSGlobalObject, not the JSGlobalData + https://bugs.webkit.org/show_bug.cgi?id=113086 + + Reviewed by Geoffrey Garen. + + opaqueJSClassData stores cached prototypes for JSClassRefs in the C API. It doesn't make sense to + share these prototypes within a JSGlobalData across JSGlobalObjects, and in fact doing so will cause + a leak of the original JSGlobalObject that these prototypes were created in. Therefore we should move + this cache to JSGlobalObject where it belongs and where it won't cause memory leaks. + + * API/JSBase.cpp: Needed to add an extern "C" so that testapi.c can use the super secret GC function. + * API/JSClassRef.cpp: We now grab the cached context data from the global object rather than the global data. + (OpaqueJSClass::contextData): + * API/JSClassRef.h: Remove this header because it's unnecessary and causes circular dependencies. + * API/tests/testapi.c: Added a new test that makes sure that using the same JSClassRef in two different contexts + doesn't cause leaks of the original global object. + (leakFinalize): + (nestedAllocateObject): This is a hack to bypass the conservative scan of the GC, which was unnecessarily marking + objects and keeping them alive, ruining the test result. + (testLeakingPrototypesAcrossContexts): + (main): + * API/tests/testapi.mm: extern "C" this so we can continue using it here. + * runtime/JSGlobalData.cpp: Remove JSClassRef related stuff. + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/JSGlobalObject.h: Add the stuff that JSGlobalData had. We add it to JSGlobalObjectRareData so that + clients who don't use the C API don't have to pay the memory cost of this extra HashMap. + (JSGlobalObject): + (JSGlobalObjectRareData): + (JSC::JSGlobalObject::opaqueJSClassData): + +2013-03-19 Martin Robinson + + [GTK] Add support for building the WebCore bindings to the gyp build + https://bugs.webkit.org/show_bug.cgi?id=112638 + + Reviewed by Nico Weber. + + * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Export all include directories to direct + dependents and fix the indentation of the libjavascriptcore target. + +2013-03-21 Filip Pizlo + + Fix some minor issues in the DFG's profiling of heap accesses + https://bugs.webkit.org/show_bug.cgi?id=113010 + + Reviewed by Goeffrey Garen. + + 1) If a CodeBlock gets jettisoned by GC, we should count the exit sites. + + 2) If a CodeBlock clears a structure stub during GC, it should record this, and + the DFG should prefer to not inline that access (i.e. treat it as if it had an + exit site). + + 3) If a PutById was seen by the baseline JIT, and the JIT attempted to cache it, + but it chose not to, then assume that it will take slow path. + + 4) If we frequently exited because of a structure check on a weak constant, + don't try to inline that access in the future. + + 5) Treat all exits that were counted as being frequent. + + 81% speed-up on Octane/gbemu. Small speed-ups elsewhere, and no regressions. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::finalizeUnconditionally): + (JSC): + (JSC::CodeBlock::resetStubDuringGCInternal): + (JSC::CodeBlock::reoptimize): + (JSC::CodeBlock::jettison): + (JSC::ProgramCodeBlock::jettisonImpl): + (JSC::EvalCodeBlock::jettisonImpl): + (JSC::FunctionCodeBlock::jettisonImpl): + (JSC::CodeBlock::tallyFrequentExitSites): + * bytecode/CodeBlock.h: + (CodeBlock): + (JSC::CodeBlock::tallyFrequentExitSites): + (ProgramCodeBlock): + (EvalCodeBlock): + (FunctionCodeBlock): + * bytecode/GetByIdStatus.cpp: + (JSC::GetByIdStatus::computeFor): + * bytecode/PutByIdStatus.cpp: + (JSC::PutByIdStatus::computeFor): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::StructureStubInfo): + (StructureStubInfo): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleGetById): + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::considerAddingAsFrequentExitSiteSlow): + * dfg/DFGOSRExit.h: + (JSC::DFG::OSRExit::considerAddingAsFrequentExitSite): + (OSRExit): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Options.h: + (JSC): + +2013-03-22 Filip Pizlo + + DFG folding of PutById to SimpleReplace should consider the specialized function case + https://bugs.webkit.org/show_bug.cgi?id=113093 + + Reviewed by Geoffrey Garen and Mark Hahnenberg. + + * bytecode/PutByIdStatus.cpp: + (JSC::PutByIdStatus::computeFor): + +2013-03-22 David Kilzer + + BUILD FIX (r146558): Build testapi.mm with ARC enabled for armv7s + + + Fixes the following build failure: + + Source/JavaScriptCore/API/tests/testapi.mm:205:1: error: method possibly missing a [super dealloc] call [-Werror,-Wobjc-missing-super-calls] + } + ^ + 1 error generated. + + * Configurations/ToolExecutable.xcconfig: Enable ARC for armv7s + architecture. + +2013-03-22 David Kilzer + + Revert "BUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc]" + + This fixes a build failure introduced by this change: + + Source/JavaScriptCore/API/tests/testapi.mm:206:6: error: ARC forbids explicit message send of 'dealloc' + [super dealloc]; + ^ ~~~~~~~ + 1 error generated. + + Not sure why this didn't fail locally on my Mac Pro. + + * API/tests/testapi.mm: + (-[TinyDOMNode dealloc]): Remove call to [super dealloc]. + +2013-03-22 David Kilzer + + BUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc] + + + Fixes the following build failure: + + Source/JavaScriptCore/API/tests/testapi.mm:205:1: error: method possibly missing a [super dealloc] call [-Werror,-Wobjc-missing-super-calls] + } + ^ + 1 error generated. + + * API/tests/testapi.mm: + (-[TinyDOMNode dealloc]): Call [super dealloc]. + +2013-03-22 Ryosuke Niwa + + Leak bots erroneously report JSC::WatchpointSet as leaking + https://bugs.webkit.org/show_bug.cgi?id=107781 + + Reviewed by Filip Pizlo. + + Since leaks doesn't support tagged pointers, avoid using it by flipping the bit flag to indicate + the entry is "fat". We set the flag when the entry is NOT fat; i.e. slim. + + Replaced FatFlag by SlimFlag and initialized m_bits with this flag to indicate that the entry is + initially "slim". + + * runtime/SymbolTable.cpp: + (JSC::SymbolTableEntry::copySlow): Don't set FatFlag since it has been replaced by SlimFlag. + (JSC::SymbolTableEntry::inflateSlow): Ditto. + + * runtime/SymbolTable.h: + (JSC::SymbolTableEntry::Fast::Fast): Set SlimFlag by default. + (JSC::SymbolTableEntry::Fast::isNull): Ignore SlimFlag. + (JSC::SymbolTableEntry::Fast::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag + is not set. + + (JSC::SymbolTableEntry::SymbolTableEntry): Set SlimFlag by default. + (JSC::SymbolTableEntry::SymbolTableEntry::getFast): Set SlimFlag when creating Fast from a fat entry. + (JSC::SymbolTableEntry::isNull): Ignore SlimFlag. + (JSC::SymbolTableEntry::FatEntry::FatEntry): Strip SlimFlag. + (JSC::SymbolTableEntry::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag is unset. + (JSC::SymbolTableEntry::fatEntry): Don't strip FatFlag as this flag doesn't exist anymore. + (JSC::SymbolTableEntry::pack): Preserve SlimFlag. + + (JSC::SymbolTableIndexHashTraits): empty value is no longer zero so don't set emptyValueIsZero true. + +2013-03-21 Mark Hahnenberg + + Objective-C API: Need a good way to preserve custom properties on JS wrappers + https://bugs.webkit.org/show_bug.cgi?id=112608 + + Reviewed by Geoffrey Garen. + + Currently, we just use a weak map, which means that garbage collection can cause a wrapper to + disappear if it isn't directly exported to JavaScript. + + The most straightforward and safe way (with respect to garbage collection and concurrency) is to have + clients add and remove their external references along with their owners. Effectively, the client is + recording the structure of the external object graph so that the garbage collector can make sure to + mark any wrappers that are reachable through either the JS object graph of the external Obj-C object + graph. By keeping these wrappers alive, this has the effect that custom properties on these wrappers + will also remain alive. + + The rule for if an object needs to be tracked by the runtime (and therefore whether the client should report it) is as follows: + For a particular object, its references to its children should be added if: + 1. The child is referenced from JavaScript. + 2. The child contains references to other objects for which (1) or (2) are true. + + * API/JSAPIWrapperObject.mm: + (JSAPIWrapperObjectHandleOwner::finalize): + (JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots): A wrapper object is kept alive only if its JSGlobalObject + is marked and its corresponding Objective-C object was added to the set of opaque roots. + (JSC::JSAPIWrapperObject::visitChildren): We now call out to scanExternalObjectGraph, which handles adding all Objective-C + objects to the set of opaque roots. + * API/JSAPIWrapperObject.h: + (JSAPIWrapperObject): + * API/JSContext.mm: Moved dealloc to its proper place in the main implementation. + (-[JSContext dealloc]): + * API/JSVirtualMachine.h: + * API/JSVirtualMachine.mm: + (-[JSVirtualMachine initWithContextGroupRef:]): + (-[JSVirtualMachine dealloc]): + (getInternalObjcObject): Helper funciton to get the Objective-C object out of JSManagedValues or JSValues if there is one. + (-[JSVirtualMachine addManagedReference:withOwner:]): Adds the Objective-C object to the set of objects + owned by the owner object in that particular virtual machine. + (-[JSVirtualMachine removeManagedReference:withOwner:]): Removes the relationship between the two objects. + (-[JSVirtualMachine externalObjectGraph]): + (scanExternalObjectGraph): Does a depth-first search of the external object graph in a particular virtual machine starting at + the specified root. Each new object it encounters it adds to the set of opaque roots. These opaque roots will keep their + corresponding wrapper objects alive if they have them. + * API/JSManagedReferenceInternal.h: Added. + * API/JSVirtualMachine.mm: Added the per-JSVirtualMachine map between objects and the objects they own, which is more formally + known as that virtual machine's external object graph. + * API/JSWrapperMap.mm: + (-[JSWrapperMap dealloc]): We were leaking this before :-( + (-[JSVirtualMachine initWithContextGroupRef:]): + (-[JSVirtualMachine dealloc]): + (-[JSVirtualMachine externalObjectGraph]): + * API/JSVirtualMachineInternal.h: + * API/tests/testapi.mm: Added two new tests using the TinyDOMNode class. The first tests that a custom property added to a wrapper + doesn't vanish after GC, even though that wrapper isn't directly accessible to the JS garbage collector but is accessible through + the external Objective-C object graph. The second test makes sure that adding an object to the external object graph with the same + owner doesn't cause any sort of problems. + (+[TinyDOMNode sharedVirtualMachine]): + (-[TinyDOMNode init]): + (-[TinyDOMNode dealloc]): + (-[TinyDOMNode appendChild:]): + (-[TinyDOMNode numberOfChildren]): + (-[TinyDOMNode childAtIndex:]): + (-[TinyDOMNode removeChildAtIndex:]): + * JavaScriptCore.xcodeproj/project.pbxproj: + * heap/SlotVisitor.h: + (SlotVisitor): + * heap/SlotVisitorInlines.h: + (JSC::SlotVisitor::containsOpaqueRootTriState): Added a new method to SlotVisitor to allow scanExternalObjectGraph to have a + thread-safe view of opaque roots during parallel marking. The set of opaque roots available to any one SlotVisitor isn't guaranteed + to be 100% correct, but that just results in a small duplication of work in scanExternalObjectGraph. To indicate this change for + false negatives we return a TriState that's either true or mixed, but never false. + +2013-03-21 Mark Lam + + Fix O(n^2) op_debug bytecode charPosition to column computation. + https://bugs.webkit.org/show_bug.cgi?id=112957. + + Reviewed by Geoffrey Garen. + + The previous algorithm does a linear reverse scan of the source string + to find the line start for any given char position. This results in a + O(n^2) algortithm when the source string has no line breaks. + + The new algorithm computes a line start column table for a + SourceProvider on first use. This line start table is used to fix up + op_debug's charPosition operand into a column operand when an + UnlinkedCodeBlock is linked into a CodeBlock. The initialization of + the line start table is O(n), and the CodeBlock column fix up is + O(log(n)). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::CodeBlock): - do column fix up. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::debug): - no need to do column fixup anymore. + * interpreter/Interpreter.h: + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * parser/SourceProvider.cpp: + (JSC::SourceProvider::lineStarts): + (JSC::charPositionExtractor): + (JSC::SourceProvider::charPositionToColumnNumber): + - initialize line start column table if needed. + - look up line start for the given char position. + * parser/SourceProvider.h: + +2013-03-21 Filip Pizlo + + JSC profiler should have an at-a-glance report of the success of DFG optimization + https://bugs.webkit.org/show_bug.cgi?id=112988 + + Reviewed by Geoffrey Garen. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleCall): + (JSC::DFG::ByteCodeParser::handleGetById): + (JSC::DFG::ByteCodeParser::parseBlock): + * profiler/ProfilerCompilation.cpp: + (JSC::Profiler::Compilation::Compilation): + (JSC::Profiler::Compilation::toJS): + * profiler/ProfilerCompilation.h: + (JSC::Profiler::Compilation::noticeInlinedGetById): + (JSC::Profiler::Compilation::noticeInlinedPutById): + (JSC::Profiler::Compilation::noticeInlinedCall): + (Compilation): + * runtime/CommonIdentifiers.h: + +2013-03-21 Mark Lam + + Fix lexer charPosition computation when "rewind"ing the lexer. + https://bugs.webkit.org/show_bug.cgi?id=112952. + + Reviewed by Michael Saboff. + + Changed the Lexer to no longer keep a m_charPosition. Instead, we compute + currentCharPosition() from m_code and m_codeStartPlusOffset, where + m_codeStartPlusOffset is the SourceProvider m_codeStart + the SourceCode + start offset. This ensures that the charPosition is always in sync with + m_code. + + * parser/Lexer.cpp: + (JSC::::setCode): + (JSC::::internalShift): + (JSC::::shift): + (JSC::::lex): + * parser/Lexer.h: + (JSC::Lexer::currentCharPosition): + (JSC::::lexExpectIdentifier): + +2013-03-21 Alberto Garcia + + [BlackBerry] GCActivityCallback: replace JSLock with JSLockHolder + https://bugs.webkit.org/show_bug.cgi?id=112448 + + Reviewed by Xan Lopez. + + This changed in r121381. + + * runtime/GCActivityCallbackBlackBerry.cpp: + (JSC::DefaultGCActivityCallback::doWork): + +2013-03-21 Mark Hahnenberg + + Objective-C API: wrapperClass holds a static JSClassRef, which causes JSGlobalObjects to leak + https://bugs.webkit.org/show_bug.cgi?id=112856 + + Reviewed by Geoffrey Garen. + + Through a very convoluted path that involves the caching of prototypes on the JSClassRef, we can leak + JSGlobalObjects when inserting an Objective-C object into multiple independent JSContexts. + + * API/JSAPIWrapperObject.cpp: Removed. + * API/JSAPIWrapperObject.h: + (JSAPIWrapperObject): + * API/JSAPIWrapperObject.mm: Copied from Source/JavaScriptCore/API/JSAPIWrapperObject.cpp. Made this an + Objective-C++ file so that we can call release on the wrappedObject. Also added a WeakHandleOwner for + JSAPIWrapperObjects. This will also be used in a future patch for https://bugs.webkit.org/show_bug.cgi?id=112608. + (JSAPIWrapperObjectHandleOwner): + (jsAPIWrapperObjectHandleOwner): + (JSAPIWrapperObjectHandleOwner::finalize): This finalize replaces the old finalize that was done through + the C API. + (JSC::JSAPIWrapperObject::finishCreation): Allocate the WeakImpl. Balanced in finalize. + (JSC::JSAPIWrapperObject::setWrappedObject): We now do the retain of the wrappedObject here rather than in random + places scattered around JSWrapperMap.mm + * API/JSObjectRef.cpp: Added some ifdefs for platforms that don't support the Obj-C API. + (JSObjectGetPrivate): Ditto. + (JSObjectSetPrivate): Ditto. + (JSObjectGetPrivateProperty): Ditto. + (JSObjectSetPrivateProperty): Ditto. + (JSObjectDeletePrivateProperty): Ditto. + * API/JSValueRef.cpp: Ditto. + (JSValueIsObjectOfClass): Ditto. + * API/JSWrapperMap.mm: Remove wrapperClass(). + (objectWithCustomBrand): Change to no longer use a parent class, which was only used to give the ability to + finalize wrapper objects. + (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]): Change to no longer use wrapperClass(). + (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): Ditto. + (tryUnwrapObjcObject): We now check if the object inherits from JSAPIWrapperObject. + * API/tests/testapi.mm: Added a test that exports an Objective-C object to two different JSContexts and makes + sure that the first one is collected properly by using a weak JSManagedValue for the wrapper in the first JSContext. + * CMakeLists.txt: Build file modifications. + * GNUmakefile.list.am: Ditto. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Ditto. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * runtime/JSGlobalObject.cpp: More ifdefs for unsupported platforms. + (JSC::JSGlobalObject::reset): Ditto. + (JSC::JSGlobalObject::visitChildren): Ditto. + * runtime/JSGlobalObject.h: Ditto. + (JSGlobalObject): Ditto. + (JSC::JSGlobalObject::objcCallbackFunctionStructure): Ditto. + +2013-03-21 Anton Muhin + + Unreviewed, rolling out r146483. + http://trac.webkit.org/changeset/146483 + https://bugs.webkit.org/show_bug.cgi?id=111695 + + Breaks debug builds. + + * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo. + +2013-03-21 Gabor Rapcsanyi + + Implement LLInt for CPU(ARM_TRADITIONAL) + https://bugs.webkit.org/show_bug.cgi?id=97589 + + Reviewed by Zoltan Herczeg. + + Enable LLInt for ARMv5 and ARMv7 traditional as well. + + * llint/LLIntOfflineAsmConfig.h: + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * offlineasm/arm.rb: + * offlineasm/backends.rb: + * offlineasm/instructions.rb: + +2013-03-20 Cosmin Truta + + [QNX][ARM] REGRESSION(r135330): Various failures in Octane + https://bugs.webkit.org/show_bug.cgi?id=112863 + + Reviewed by Yong Li. + + This was fixed in http://trac.webkit.org/changeset/146396 on Linux only. + Enable this fix on QNX. + + * assembler/ARMv7Assembler.h: + (ARMv7Assembler): + (JSC::ARMv7Assembler::replaceWithJump): + (JSC::ARMv7Assembler::maxJumpReplacementSize): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch): + +2013-03-20 Filip Pizlo + + Fix indentation of JSString.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/JSString.h: + +2013-03-20 Filip Pizlo + + "" + x where x is not a string should be optimized by the DFG to some manner of ToString conversion + https://bugs.webkit.org/show_bug.cgi?id=112845 + + Reviewed by Mark Hahnenberg. + + I like to do "" + x. So I decided to make DFG recognize it, and related idioms. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::fixupToPrimitive): + (FixupPhase): + (JSC::DFG::FixupPhase::fixupToString): + (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::resultOfToPrimitive): + (DFG): + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGPredictionPropagationPhase.h: + (DFG): + +2013-03-20 Zoltan Herczeg + + ARMv7 replaceWithJump ASSERT failure after r135330. + https://bugs.webkit.org/show_bug.cgi?id=103146 + + Reviewed by Filip Pizlo. + + On Linux, the 24 bit distance range of jumps sometimes does not + enough to cover all targets addresses. This patch supports jumps + outside of this range using a mov/movt/bx 10 byte long sequence. + + * assembler/ARMv7Assembler.h: + (ARMv7Assembler): + (JSC::ARMv7Assembler::revertJumpTo_movT3movtcmpT2): + (JSC::ARMv7Assembler::nopw): + (JSC::ARMv7Assembler::label): + (JSC::ARMv7Assembler::replaceWithJump): + (JSC::ARMv7Assembler::maxJumpReplacementSize): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch): + +2013-03-20 Mark Hahnenberg + + Objective-C API: Fix over-releasing in allocateConstructorAndPrototypeWithSuperClassInfo: + https://bugs.webkit.org/show_bug.cgi?id=112832 + + Reviewed by Geoffrey Garen. + + If either the m_constructor or m_prototype (but not both) is collected, we will call + allocateConstructorAndPrototypeWithSuperClassInfo, which will create a new object to replace the one + that was collected, but at the end of the method we call release on both of them. + This is incorrect since we autorelease the JSValue in the case that the object doesn't need to be + reallocated. Thus we'll end up overreleasing later during the drain of the autorelease pool. + + * API/JSWrapperMap.mm: + (objectWithCustomBrand): We no longer alloc here. We instead call the JSValue valueWithValue class method, + which autoreleases for us. + (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): We no longer call release on the + constructor or prototype JSValues. + * API/tests/testapi.mm: Added a new test that crashes on ToT due to over-releasing. + +2013-03-19 Filip Pizlo + + It's called "Hash Consing" not "Hash Consting" + https://bugs.webkit.org/show_bug.cgi?id=112768 + + Rubber stamped by Mark Hahnenberg. + + See http://en.wikipedia.org/wiki/Hash_consing + + * heap/GCThreadSharedData.cpp: + (JSC::GCThreadSharedData::GCThreadSharedData): + (JSC::GCThreadSharedData::reset): + * heap/GCThreadSharedData.h: + (GCThreadSharedData): + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::SlotVisitor): + (JSC::SlotVisitor::setup): + (JSC::SlotVisitor::reset): + (JSC::JSString::tryHashConsLock): + (JSC::JSString::releaseHashConsLock): + (JSC::JSString::shouldTryHashCons): + (JSC::SlotVisitor::internalAppend): + * heap/SlotVisitor.h: + (SlotVisitor): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + (JSC::JSGlobalData::haveEnoughNewStringsToHashCons): + (JSC::JSGlobalData::resetNewStringsSinceLastHashCons): + * runtime/JSString.h: + (JSC::JSString::finishCreation): + (JSString): + (JSC::JSString::isHashConsSingleton): + (JSC::JSString::clearHashConsSingleton): + (JSC::JSString::setHashConsSingleton): + +2013-03-20 Filip Pizlo + + DFG implementation of op_strcat should inline rope allocations + https://bugs.webkit.org/show_bug.cgi?id=112780 + + Reviewed by Oliver Hunt. + + This gets rid of the StrCat node and adds a MakeRope node. The MakeRope node can + take either two or three operands, and allocates a rope string with either two or + three fibers. (The magic choice of three children for non-VarArg nodes happens to + match exactly with the magic choice of three fibers for rope strings.) + + ValueAdd on KnownString is replaced with MakeRope with two children. + + StrCat gets replaced by an appropriate sequence of MakeRope's. + + MakeRope does not do the dynamic check to see if its children are empty strings. + This is replaced by a static check, instead. The downside is that we may use more + memory if the strings passed to MakeRope turn out to dynamically be empty. The + upside is that we do fewer checks in the cases where either the strings are not + empty, or where the strings are statically known to be empty. I suspect both of + those cases are more common, than the case where the string is dynamically empty. + + This also results in some badness for X86. MakeRope needs six registers if it is + allocating a three-rope. We don't have six registers to spare on X86. Currently, + the code side-steps this problem by just never usign three-ropes in optimized + code on X86. All other architectures, including X86_64, don't have this problem. + + This is a shocking speed-up. 9% progressions on both V8/splay and + SunSpider/date-format-xparb. 1% progression on V8v7 overall, and ~0.5% progression + on SunSpider. 2x speed-up on microbenchmarks that test op_strcat. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + * dfg/DFGAdjacencyList.h: + (AdjacencyList): + (JSC::DFG::AdjacencyList::removeEdge): + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild): + * dfg/DFGBackwardsPropagationPhase.cpp: + (JSC::DFG::BackwardsPropagationPhase::propagate): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::putStructureStoreElimination): + (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGDCEPhase.cpp: + (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::createToString): + (JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion): + (JSC::DFG::FixupPhase::convertStringAddUse): + (FixupPhase): + (JSC::DFG::FixupPhase::convertToMakeRope): + (JSC::DFG::FixupPhase::fixupMakeRope): + (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileAdd): + (JSC::DFG::SpeculativeJIT::compileMakeRope): + (DFG): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + (SpeculativeJIT): + (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand): + (JSC::DFG::SpeculateCellOperand::~SpeculateCellOperand): + (JSC::DFG::SpeculateCellOperand::gpr): + (JSC::DFG::SpeculateCellOperand::use): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * runtime/JSString.h: + (JSRopeString): + +2013-03-20 Peter Gal + + Implement and32 on MIPS platform + https://bugs.webkit.org/show_bug.cgi?id=112665 + + Reviewed by Zoltan Herczeg. + + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::and32): Added missing method. + (MacroAssemblerMIPS): + +2013-03-20 Mark Lam + + Fix incorrect debugger column number value. + https://bugs.webkit.org/show_bug.cgi?id=112741. + + Reviewed by Oliver Hunt. + + 1. In lexer, parser, and debugger code, renamed column to charPosition. + 2. Convert the charPosition to the equivalent column number before + passing it to the debugger. + 3. Changed ScopeNodes to take both a startLocation and an endLocation. + This allows FunctionBodyNodes, ProgramNodes, and EvalNodess to emit + correct debug hooks with correct starting line and column numbers. + 4. Fixed the Lexer to not reset the charPosition (previously + columnNumber) in Lexer::lex(). + + * JavaScriptCore.order: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitDebugHook): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitExpressionInfo): + * bytecompiler/NodesCodegen.cpp: + (JSC::ArrayNode::toArgumentList): + (JSC::ConstStatementNode::emitBytecode): + (JSC::EmptyStatementNode::emitBytecode): + (JSC::DebuggerStatementNode::emitBytecode): + (JSC::ExprStatementNode::emitBytecode): + (JSC::VarStatementNode::emitBytecode): + (JSC::IfNode::emitBytecode): + (JSC::IfElseNode::emitBytecode): + (JSC::DoWhileNode::emitBytecode): + (JSC::WhileNode::emitBytecode): + (JSC::ForNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + (JSC::ContinueNode::emitBytecode): + (JSC::BreakNode::emitBytecode): + (JSC::ReturnNode::emitBytecode): + (JSC::WithNode::emitBytecode): + (JSC::SwitchNode::emitBytecode): + (JSC::LabelNode::emitBytecode): + (JSC::ThrowNode::emitBytecode): + (JSC::TryNode::emitBytecode): + (JSC::ProgramNode::emitBytecode): + (JSC::EvalNode::emitBytecode): + (JSC::FunctionBodyNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::debug): + - convert charPosition to column for the debugger. + * interpreter/Interpreter.h: + * jit/JITStubs.cpp: + (DEFINE_STUB_FUNCTION(void, op_debug)): + * llint/LLIntSlowPaths.cpp: + (LLINT_SLOW_PATH_DECL(slow_op_debug)): + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createFunctionExpr): + (JSC::ASTBuilder::createFunctionBody): + (JSC::ASTBuilder::createGetterOrSetterProperty): + (JSC::ASTBuilder::createFuncDeclStatement): + (JSC::ASTBuilder::createBlockStatement): + (JSC::ASTBuilder::createExprStatement): + (JSC::ASTBuilder::createIfStatement): + (JSC::ASTBuilder::createForLoop): + (JSC::ASTBuilder::createForInLoop): + (JSC::ASTBuilder::createVarStatement): + (JSC::ASTBuilder::createReturnStatement): + (JSC::ASTBuilder::createBreakStatement): + (JSC::ASTBuilder::createContinueStatement): + (JSC::ASTBuilder::createTryStatement): + (JSC::ASTBuilder::createSwitchStatement): + (JSC::ASTBuilder::createWhileStatement): + (JSC::ASTBuilder::createDoWhileStatement): + (JSC::ASTBuilder::createWithStatement): + (JSC::ASTBuilder::createThrowStatement): + (JSC::ASTBuilder::createDebugger): + (JSC::ASTBuilder::createConstStatement): + * parser/Lexer.cpp: + (JSC::::setCode): + (JSC::::internalShift): + (JSC::::shift): + (JSC::::lex): + * parser/Lexer.h: + (JSC::Lexer::currentCharPosition): + (Lexer): + (JSC::::lexExpectIdentifier): + * parser/NodeConstructors.h: + (JSC::Node::Node): + * parser/Nodes.cpp: + (JSC::StatementNode::setLoc): + (JSC::ScopeNode::ScopeNode): + (JSC::ProgramNode::ProgramNode): + (JSC::ProgramNode::create): + (JSC::EvalNode::EvalNode): + (JSC::EvalNode::create): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (JSC::Node::charPosition): + (Node): + (StatementNode): + (JSC::StatementNode::lastLine): + (ScopeNode): + (JSC::ScopeNode::startLine): + (JSC::ScopeNode::startCharPosition): + (ProgramNode): + (EvalNode): + (FunctionBodyNode): + * parser/Parser.cpp: + (JSC::::Parser): + (JSC::::parseFunctionBody): + (JSC::::parseFunctionInfo): + * parser/Parser.h: + (JSC::::parse): + * parser/ParserTokens.h: + (JSC::JSTokenLocation::JSTokenLocation): + (JSTokenLocation): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::createFunctionBody): + +2013-03-20 Csaba Osztrogonác + + REGRESSION(r146089): It broke 20 sputnik tests on ARM traditional and Thumb2 + https://bugs.webkit.org/show_bug.cgi?id=112676 + + Rubber-stamped by Filip Pizlo. + + Add one more EABI_32BIT_DUMMY_ARG to make DFG JIT ARM EABI compatible + again after r146089 similar to https://bugs.webkit.org/show_bug.cgi?id=84449 + + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + +2013-03-19 Michael Saboff + + Crash when loading http://www.jqchart.com/jquery/gauges/RadialGauge/LiveData + https://bugs.webkit.org/show_bug.cgi?id=112694 + + Reviewed by Filip Pizlo. + + We were trying to convert an NewArray to a Phantom, but convertToPhantom doesn't handle + nodes with variable arguments. Added code to insert a Phantom node in front of all the + live children of a var args node. Added ASSERT not var args for convertToPhantom to + catch any other similar cases. Added a new convertToPhantomUnchecked() for converting + var arg nodes. + + * dfg/DFGDCEPhase.cpp: + (JSC::DFG::DCEPhase::run): + * dfg/DFGNode.h: + (Node): + (JSC::DFG::Node::setOpAndDefaultNonExitFlags): Added ASSERT(!(m_flags & NodeHasVarArgs)) + (JSC::DFG::Node::setOpAndDefaultNonExitFlagsUnchecked): + (JSC::DFG::Node::convertToPhantomUnchecked): + +2013-03-19 Mark Hahnenberg + + Crash in SpeculativeJIT::fillSpeculateIntInternal on http://bellard.org/jslinux + https://bugs.webkit.org/show_bug.cgi?id=112738 + + Reviewed by Filip Pizlo. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixIntEdge): We shouldn't be killing this node because it could be + referenced by other people. + +2013-03-19 Oliver Hunt + + RELEASE_ASSERT fires in exception handler lookup + + RS=Geoff Garen. + + Temporarily switch this RELEASE_ASSERT into a regular ASSERT + as currently this is producing fairly bad crashiness. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::handlerForBytecodeOffset): + +2013-03-18 Filip Pizlo + + DFG should optimize StringObject.length and StringOrStringObject.length + https://bugs.webkit.org/show_bug.cgi?id=112658 + + Reviewed by Mark Hahnenberg. + + Implemented by injecting a ToString(StringObject:@a) or ToString(StringOrStringObject:@a) prior + to GetArrayLength with ArrayMode(Array::String) if @a is predicted StringObject or + StringOrStringObject. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::createToString): + (FixupPhase): + (JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion): + (JSC::DFG::FixupPhase::convertStringAddUse): + +2013-03-19 Gabor Rapcsanyi + + Implement and32 on ARMv7 and ARM traditional platforms + https://bugs.webkit.org/show_bug.cgi?id=112663 + + Reviewed by Zoltan Herczeg. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::and32): Add missing method. + (MacroAssemblerARM): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::and32): Add missing method. + (MacroAssemblerARMv7): + +2013-03-18 Filip Pizlo + + DFG ToString generic cases should work correctly + https://bugs.webkit.org/show_bug.cgi?id=112654 + + + Reviewed by Geoffrey Garen. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileToStringOnCell): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-03-18 Michael Saboff + + Unreviewed build fix for 32 bit builds. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-03-18 Michael Saboff + + EFL: Unsafe branch detected in compilePutByValForFloatTypedArray() + https://bugs.webkit.org/show_bug.cgi?id=112609 + + Reviewed by Geoffrey Garen. + + Created local valueFPR and scratchFPR and filled them with valueOp.fpr() and scratch.fpr() + respectively so that if valueOp.fpr() causes a spill during allocation, it occurs before the + branch and also to follow convention. Added register allocation checks to FPRTemporary. + Cleaned up a couple of other places to follow the "AllocatVirtualRegType foo, get machine + reg from foo" pattern. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::fprAllocate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::convertToDouble): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-03-18 Filip Pizlo + + DFG should inline binary string concatenations (i.e. ValueAdd with string children) + https://bugs.webkit.org/show_bug.cgi?id=112599 + + Reviewed by Oliver Hunt. + + This does as advertised: if you do x + y where x and y are strings, you'll get + a fast inlined JSRopeString allocation (along with whatever checks are necessary). + It also does good things if either x or y (or both) are StringObjects, or some + other thing like StringOrStringObject. It also lays the groundwork for making this + fast if either x or y are numbers, or some other reasonably-cheap-to-convert + value. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (FixupPhase): + (JSC::DFG::FixupPhase::isStringObjectUse): + (JSC::DFG::FixupPhase::convertStringAddUse): + (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileAdd): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::emitAllocateJSCell): + (JSC::DFG::SpeculativeJIT::emitAllocateJSObject): + * runtime/JSString.h: + (JSC::JSString::offsetOfFlags): + (JSString): + (JSRopeString): + (JSC::JSRopeString::offsetOfFibers): + +2013-03-18 Filip Pizlo + + JSC_NATIVE_FUNCTION() takes an identifier for the name and then uses #name, which is unsafe if name was already #define'd to something else + https://bugs.webkit.org/show_bug.cgi?id=112639 + + Reviewed by Michael Saboff. + + Change it to take a string instead. + + * runtime/JSObject.h: + (JSC): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::finishCreation): + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::finishCreation): + +2013-03-18 Brent Fulgham + + [WinCairo] Get build working under VS2010. + https://bugs.webkit.org/show_bug.cgi?id=112604 + + Reviewed by Tim Horton. + + * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Use CFLite-specific + build target (standard version links against CoreFoundation.lib + instead of CFLite.lib). + * JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: Added. + * JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: Added. + * JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: Added. + +2013-03-18 Roger Fong + + AppleWin VS2010 Debug configuration build fix.. + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + +2013-03-18 Brent Fulgham + + [WinCairo] Get build working under VS2010. + https://bugs.webkit.org/show_bug.cgi?id=112604 + + Reviewed by Tim Horton. + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add build targets for + Debug_WinCairo and Release_WinCairo using CFLite. + * JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: + Add Debug_WinCairo and Release_WinCairo build targets to + make sure headers are copied to proper build folder. + * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Ditto. + * JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props: Added. + * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: + Add Debug_WinCairo and Release_WinCairo build targets to + make sure headers are copied to proper build folder. + * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: + Ditto. + * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: + Ditto. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Ditto. + * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto. + * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto. + +2013-03-18 Michael Saboff + + Potentially unsafe register allocations in DFG code generation + https://bugs.webkit.org/show_bug.cgi?id=112477 + + Reviewed by Geoffrey Garen. + + Moved allocation of temporary GPRs to be before any generated branches in the functions below. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + +2013-03-15 Filip Pizlo + + DFG string conversions and allocations should be inlined + https://bugs.webkit.org/show_bug.cgi?id=112376 + + Reviewed by Geoffrey Garen. + + This turns new String(), String(), String.prototype.valueOf(), and + String.prototype.toString() into intrinsics. It gives the DFG the ability to handle + conversions from StringObject to JSString and vice-versa, and also gives it the + ability to handle cases where a variable may be either a StringObject or a JSString. + To do this, I added StringObject to value profiling (and removed the stale + distinction between Myarguments and Foreignarguments). I also cleaned up ToPrimitive + handling, using some of the new functionality but also taking advantage of the + existence of Identity(String:@a). + + This is a 2% SunSpider speed-up. Also there are some speed-ups on V8v7 and Kraken. + On microbenchmarks that stress new String() this is a 14x speed-up. + + * CMakeLists.txt: + * DerivedSources.make: + * DerivedSources.pri: + * GNUmakefile.list.am: + * bytecode/CodeBlock.h: + (CodeBlock): + (JSC::CodeBlock::hasExitSite): + (JSC): + * bytecode/DFGExitProfile.cpp: + (JSC::DFG::ExitProfile::hasExitSite): + (DFG): + * bytecode/DFGExitProfile.h: + (ExitProfile): + (JSC::DFG::ExitProfile::hasExitSite): + * bytecode/ExitKind.cpp: + (JSC::exitKindToString): + * bytecode/ExitKind.h: + * bytecode/SpeculatedType.cpp: + (JSC::dumpSpeculation): + (JSC::speculationToAbbreviatedString): + (JSC::speculationFromClassInfo): + * bytecode/SpeculatedType.h: + (JSC): + (JSC::isStringObjectSpeculation): + (JSC::isStringOrStringObjectSpeculation): + * create_hash_table: + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + * dfg/DFGAbstractState.h: + (JSC::DFG::AbstractState::filterEdgeByUse): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::handleCall): + (JSC::DFG::ByteCodeParser::emitArgumentPhantoms): + (DFG): + (JSC::DFG::ByteCodeParser::handleConstantInternalFunction): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::putStructureStoreElimination): + * dfg/DFGEdge.h: + (JSC::DFG::Edge::shift): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::isStringPrototypeMethodSane): + (FixupPhase): + (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess): + (JSC::DFG::FixupPhase::observeUseKindOnNode): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::hasGlobalExitSite): + (Graph): + (JSC::DFG::Graph::hasExitSite): + (JSC::DFG::Graph::clobbersWorld): + * dfg/DFGNode.h: + (JSC::DFG::Node::convertToToString): + (Node): + (JSC::DFG::Node::hasStructure): + (JSC::DFG::Node::shouldSpeculateStringObject): + (JSC::DFG::Node::shouldSpeculateStringOrStringObject): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileToStringOnCell): + (DFG): + (JSC::DFG::SpeculativeJIT::compileNewStringObject): + (JSC::DFG::SpeculativeJIT::speculateObject): + (JSC::DFG::SpeculativeJIT::speculateObjectOrOther): + (JSC::DFG::SpeculativeJIT::speculateString): + (JSC::DFG::SpeculativeJIT::speculateStringObject): + (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject): + (JSC::DFG::SpeculativeJIT::speculate): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + (SpeculativeJIT): + (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand): + (DFG): + (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGUseKind.cpp: + (WTF::printInternal): + * dfg/DFGUseKind.h: + (JSC::DFG::typeFilterFor): + * interpreter/CallFrame.h: + (JSC::ExecState::regExpPrototypeTable): + * runtime/CommonIdentifiers.h: + * runtime/Intrinsic.h: + * runtime/JSDestructibleObject.h: + (JSDestructibleObject): + (JSC::JSDestructibleObject::classInfoOffset): + * runtime/JSGlobalData.cpp: + (JSC): + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/JSObject.cpp: + * runtime/JSObject.h: + (JSC): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::allocationSize): + (JSWrapperObject): + (JSC::JSWrapperObject::internalValueOffset): + (JSC::JSWrapperObject::internalValueCellOffset): + * runtime/StringPrototype.cpp: + (JSC): + (JSC::StringPrototype::finishCreation): + (JSC::StringPrototype::create): + * runtime/StringPrototype.h: + (StringPrototype): + +2013-03-18 Filip Pizlo + + ObjectPrototype properties should be eagerly created rather than lazily via static tables + https://bugs.webkit.org/show_bug.cgi?id=112539 + + Reviewed by Oliver Hunt. + + This is the first part of https://bugs.webkit.org/show_bug.cgi?id=112233. Rolling this + in first since it's the less-likely-to-be-broken part. + + * CMakeLists.txt: + * DerivedSources.make: + * DerivedSources.pri: + * GNUmakefile.list.am: + * interpreter/CallFrame.h: + (JSC::ExecState::objectConstructorTable): + * runtime/CommonIdentifiers.h: + * runtime/JSGlobalData.cpp: + (JSC): + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/JSObject.cpp: + (JSC::JSObject::putDirectNativeFunction): + (JSC): + * runtime/JSObject.h: + (JSObject): + (JSC): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/ObjectPrototype.cpp: + (JSC): + (JSC::ObjectPrototype::finishCreation): + (JSC::ObjectPrototype::create): + * runtime/ObjectPrototype.h: + (ObjectPrototype): + +2013-03-16 Pratik Solanki + + Disable High DPI Canvas on iOS + https://bugs.webkit.org/show_bug.cgi?id=112511 + + Reviewed by Joseph Pecoraro. + + * Configurations/FeatureDefines.xcconfig: + +2013-03-15 Andreas Kling + + Don't also clone StructureRareData when cloning Structure. + + + Reviewed by Mark Hahnenberg. + + We were cloning a lot of StructureRareData with only the previousID pointer set since + the enumerationCache is not shared between clones. + + Let the Structure copy constructor decide whether it wants to clone the rare data. + The decision is made by StructureRareData::needsCloning() and will currently always + return false, since StructureRareData only holds on to caches at present. + This may change in the future as more members are added to StructureRareData. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::cloneRareDataFrom): + * runtime/StructureInlines.h: + (JSC::Structure::create): + +2013-03-15 Mark Hahnenberg + + Roll out r145838 + https://bugs.webkit.org/show_bug.cgi?id=112458 + + Unreviewed. Requested by Filip Pizlo. + + * CMakeLists.txt: + * DerivedSources.make: + * DerivedSources.pri: + * GNUmakefile.list.am: + * dfg/DFGOperations.cpp: + * interpreter/CallFrame.h: + (JSC::ExecState::objectPrototypeTable): + * jit/JITStubs.cpp: + (JSC::getByVal): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::getByVal): + * runtime/CommonIdentifiers.h: + * runtime/JSCell.cpp: + (JSC): + * runtime/JSCell.h: + (JSCell): + * runtime/JSCellInlines.h: + (JSC): + (JSC::JSCell::fastGetOwnProperty): + * runtime/JSGlobalData.cpp: + (JSC): + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/JSObject.cpp: + (JSC): + * runtime/JSObject.h: + (JSObject): + (JSC): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/ObjectPrototype.cpp: + (JSC): + (JSC::ObjectPrototype::finishCreation): + (JSC::ObjectPrototype::getOwnPropertySlot): + (JSC::ObjectPrototype::getOwnPropertyDescriptor): + * runtime/ObjectPrototype.h: + (JSC::ObjectPrototype::create): + (ObjectPrototype): + * runtime/PropertyMapHashTable.h: + (JSC::PropertyTable::findWithString): + * runtime/Structure.h: + (Structure): + * runtime/StructureInlines.h: + (JSC::Structure::get): + +2013-03-15 Michael Saboff + + Cleanup of DFG and Baseline JIT debugging code + https://bugs.webkit.org/show_bug.cgi?id=111871 + + Reviewed by Geoffrey Garen. + + Fixed various debug related issue in baseline and DFG JITs. See below. + + * dfg/DFGRepatch.cpp: + (JSC::DFG::dfgLinkClosureCall): Used pointerDump() to handle when calleeCodeBlock is NULL. + * dfg/DFGScratchRegisterAllocator.h: Now use ScratchBuffer::activeLengthPtr() to get + pointer to scratch register length. + (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer): + (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::checkConsistency): Added missing case labels for DataFormatOSRMarker, + DataFormatDead, and DataFormatArguments and made them RELEASE_ASSERT_NOT_REACHED(); + * jit/JITCall.cpp: + (JSC::JIT::privateCompileClosureCall): Used pointerDump() to handle when calleeCodeBlock is NULL. + * jit/JITCall32_64.cpp: + (JSC::JIT::privateCompileClosureCall): Used pointerDump() to handle when calleeCodeBlock is NULL. + * runtime/JSGlobalData.h: + (JSC::ScratchBuffer::ScratchBuffer): Fixed buffer allocation alignment to + be on a double boundary. + (JSC::ScratchBuffer::setActiveLength): + (JSC::ScratchBuffer::activeLength): + (JSC::ScratchBuffer::activeLengthPtr): + +2013-03-15 Michael Saboff + + Add runtime check for improper register allocations in DFG + https://bugs.webkit.org/show_bug.cgi?id=112380 + + Reviewed by Geoffrey Garen. + + Added framework to check for register allocation within a branch source - target range. All register allocations + are saved using the offset in the code stream where the allocation occurred. Later when a jump is linked, the + currently saved register allocations are checked to make sure that they didn't occur in the range of code that was + jumped over. This protects against the case where an allocation could have spilled register contents to free up + a register and that spill only occurs on one path of a many through the code. A subsequent fill of the spilled + register may load garbage. See https://bugs.webkit.org/show_bug.cgi?id=111777 for one such bug. + This code is protected by the compile time check of #if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION). + The check is only done during the processing of SpeculativeJIT::compile(Node* node) and its callees. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Jump::link): Invoke register allocation checks using source and target of link. + (JSC::AbstractMacroAssembler::Jump::linkTo): Invoke register allocation checks using source and target of link. + (AbstractMacroAssembler): + (RegisterAllocationOffset): New helper class to store the instruction stream offset and compare against a + jump range. + (JSC::AbstractMacroAssembler::RegisterAllocationOffset::RegisterAllocationOffset): + (JSC::AbstractMacroAssembler::RegisterAllocationOffset::check): + (JSC::AbstractMacroAssembler::addRegisterAllocationAtOffset): + (JSC::AbstractMacroAssembler::clearRegisterAllocationOffsets): + (JSC::AbstractMacroAssembler::checkRegisterAllocationAgainstBranchRange): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::allocate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-03-14 Oliver Hunt + + REGRESSION(r145000): Crash loading arstechnica.com when Safari Web Inspector is open + https://bugs.webkit.org/show_bug.cgi?id=111868 + + Reviewed by Antti Koivisto. + + Don't allow non-local property lookup when the debugger is enabled. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::resolve): + +2013-03-11 Mark Hahnenberg + + Objective-C API: Objective-C functions exposed to JavaScript have the wrong type (object instead of function) + https://bugs.webkit.org/show_bug.cgi?id=105892 + + Reviewed by Geoffrey Garen. + + Changed ObjCCallbackFunction to subclass JSCallbackFunction which already has all of the machinery to call + functions using the C API. Since ObjCCallbackFunction is now a JSCell, we changed the old implementation of + ObjCCallbackFunction to be the internal implementation and keep track of all the proper data so that we + don't have to put all of that in the header, which will now be included from C++ files (e.g. JSGlobalObject.cpp). + + * API/JSCallbackFunction.cpp: Change JSCallbackFunction to allow subclassing. Originally it was internally + passing its own Structure up the chain of constructors, but we now want to be able to pass other Structures as well. + (JSC::JSCallbackFunction::JSCallbackFunction): + (JSC::JSCallbackFunction::create): + * API/JSCallbackFunction.h: + (JSCallbackFunction): + * API/JSWrapperMap.mm: Changed interface to tryUnwrapBlock. + (tryUnwrapObjcObject): + * API/ObjCCallbackFunction.h: + (ObjCCallbackFunction): Moved into the JSC namespace, just like JSCallbackFunction. + (JSC::ObjCCallbackFunction::createStructure): Overridden so that the correct ClassInfo gets used since we have + a destructor. + (JSC::ObjCCallbackFunction::impl): Getter for the internal impl. + * API/ObjCCallbackFunction.mm: + (JSC::ObjCCallbackFunctionImpl::ObjCCallbackFunctionImpl): What used to be ObjCCallbackFunction is now + ObjCCallbackFunctionImpl. It handles the Objective-C specific parts of managing callback functions. + (JSC::ObjCCallbackFunctionImpl::~ObjCCallbackFunctionImpl): + (JSC::objCCallbackFunctionCallAsFunction): Same as the old one, but now it casts to ObjCCallbackFunction and grabs the impl + rather than using JSObjectGetPrivate. + (JSC::ObjCCallbackFunction::ObjCCallbackFunction): New bits to allow being part of the JSCell hierarchy. + (JSC::ObjCCallbackFunction::create): + (JSC::ObjCCallbackFunction::destroy): + (JSC::ObjCCallbackFunctionImpl::call): Handles the actual invocation, just like it used to. + (objCCallbackFunctionForInvocation): + (tryUnwrapBlock): Changed to check the ClassInfo for inheritance directly, rather than going through the C API call. + * API/tests/testapi.mm: Added new test to make sure that doing Function.prototype.toString.call(f) won't result in + an error when f is an Objective-C method or block underneath the covers. + * runtime/JSGlobalObject.cpp: Added new Structure for ObjCCallbackFunction. + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::visitChildren): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + (JSC::JSGlobalObject::objcCallbackFunctionStructure): + +2013-03-14 Mark Hahnenberg + + Objective-C API: Nested dictionaries are not converted properly in the Objective-C binding + https://bugs.webkit.org/show_bug.cgi?id=112377 + + Reviewed by Oliver Hunt. + + Accidental reassignment of the root task in the container conversion logic was causing the last + array or dictionary processed to be returned in the case of nested containers. + + * API/JSValue.mm: + (containerValueToObject): + * API/tests/testapi.mm: + +2013-03-13 Filip Pizlo + + JSObject fast by-string access optimizations should work even on the prototype chain, and even when the result is undefined + https://bugs.webkit.org/show_bug.cgi?id=112233 + + Reviewed by Oliver Hunt. + + Extended the existing fast access path for String keys to work over the entire prototype chain, + not just the self access case. This will fail as soon as it sees an object that intercepts + getOwnPropertySlot, so this patch also ensures that ObjectPrototype does not fall into that + category. This is accomplished by making ObjectPrototype eagerly reify all of its properties. + This is safe for ObjectPrototype because it's so common and we expect all of its properties to + be reified for any interesting programs anyway. A new idiom for adding native functions to + prototypes is introduced, which ought to work well for any other prototypes that we wish to do + this conversion for. + + This is a >60% speed-up in the case that you frequently do by-string lookups that "miss", i.e. + they don't turn up anything. + + * CMakeLists.txt: + * DerivedSources.make: + * DerivedSources.pri: + * GNUmakefile.list.am: + * dfg/DFGOperations.cpp: + * interpreter/CallFrame.h: + (JSC::ExecState::objectConstructorTable): + * jit/JITStubs.cpp: + (JSC::getByVal): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::getByVal): + * runtime/CommonIdentifiers.h: + * runtime/JSCell.cpp: + (JSC::JSCell::getByStringSlow): + (JSC): + * runtime/JSCell.h: + (JSCell): + * runtime/JSCellInlines.h: + (JSC): + (JSC::JSCell::getByStringAndKey): + (JSC::JSCell::getByString): + * runtime/JSGlobalData.cpp: + (JSC): + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/JSObject.cpp: + (JSC::JSObject::putDirectNativeFunction): + (JSC): + * runtime/JSObject.h: + (JSObject): + (JSC): + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): + * runtime/ObjectPrototype.cpp: + (JSC): + (JSC::ObjectPrototype::finishCreation): + (JSC::ObjectPrototype::create): + * runtime/ObjectPrototype.h: + (ObjectPrototype): + * runtime/PropertyMapHashTable.h: + (JSC::PropertyTable::findWithString): + * runtime/Structure.h: + (Structure): + * runtime/StructureInlines.h: + (JSC::Structure::get): + (JSC): + +2013-03-13 Filip Pizlo + + DFG bytecode parser is too aggressive about getting rid of GetLocals on captured variables + https://bugs.webkit.org/show_bug.cgi?id=112287 + + + Reviewed by Oliver Hunt. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::finalizeUnconditionally): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getLocal): + +2013-03-13 Ryosuke Niwa + + Threaded HTML Parser is missing feature define flags in all but Chromium port's build files + https://bugs.webkit.org/show_bug.cgi?id=112277 + + Reviewed by Adam Barth. + + * Configurations/FeatureDefines.xcconfig: + +2013-03-13 Csaba Osztrogonác + + LLINT C loop warning fix for GCC + https://bugs.webkit.org/show_bug.cgi?id=112145 + + Reviewed by Filip Pizlo. + + * llint/LowLevelInterpreter.cpp: + (JSC::CLoop::execute): + +2013-02-13 Simon Hausmann + + Add support for convenient conversion from JSStringRef to QString + https://bugs.webkit.org/show_bug.cgi?id=109694 + + Reviewed by Allan Sandfeld Jensen. + + Add JSStringCopyQString helper function that allows for the convenient + extraction of a QString out of a JSStringRef. + + * API/JSStringRefQt.cpp: Added. + (JSStringCopyQString): + * API/JSStringRefQt.h: Added. + * API/OpaqueJSString.h: + (OpaqueJSString): + (OpaqueJSString::qString): + (OpaqueJSString::OpaqueJSString): + * Target.pri: + +2013-03-13 Peter Gal + + Token 'not' is ignored in the offlineasm. + https://bugs.webkit.org/show_bug.cgi?id=111568 + + Reviewed by Filip Pizlo. + + * offlineasm/parser.rb: Build the Not AST node if the 'not' token is found. + +2013-03-12 Tim Horton + + WTF uses macros for exports. Try to fix the Windows build. Unreviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-03-12 Filip Pizlo + + Array.prototype.sort should at least try to be PTIME even when the array is in some bizarre mode + https://bugs.webkit.org/show_bug.cgi?id=112187 + + + Reviewed by Michael Saboff and Gavin Barraclough. + + If we have an array-like object in crazy mode passed into Array.prototype.sort, and its length is large, + then first copy all elements into a separate, compact, un-holy array and sort that. Then copy back. + This means that sorting will be at worst O(n^2) in the actual number of things in the array, rather than + O(n^2) in the array's length. + + * runtime/ArrayPrototype.cpp: + (JSC::attemptFastSort): + (JSC::performSlowSort): + (JSC): + (JSC::arrayProtoFuncSort): + +2013-03-12 Tim Horton + + Try to fix the Windows build. + + Not reviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-03-12 Geoffrey Garen + + Try to fix the Windows build. + + Not reviewed. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + Export a thing. + +2013-03-11 Oliver Hunt + + Harden JSStringJoiner + https://bugs.webkit.org/show_bug.cgi?id=112093 + + Reviewed by Filip Pizlo. + + Harden JSStringJoiner, make it use our CheckedArithmetic + class to simplify everything. + + * runtime/JSStringJoiner.cpp: + (JSC::JSStringJoiner::build): + * runtime/JSStringJoiner.h: + (JSStringJoiner): + (JSC::JSStringJoiner::JSStringJoiner): + (JSC::JSStringJoiner::append): + +2013-03-12 Filip Pizlo + + DFG generic array access cases should not be guarded by CheckStructure even of the profiling tells us that it could be + https://bugs.webkit.org/show_bug.cgi?id=112183 + + Reviewed by Oliver Hunt. + + Slight speed-up on string-unpack-code. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::findAndRemoveUnnecessaryStructureCheck): + (FixupPhase): + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + +2013-03-12 Gabor Rapcsanyi + + https://bugs.webkit.org/show_bug.cgi?id=112141 + LLInt CLoop backend misses Double2Ints() on 32bit architectures + + Reviewed by Filip Pizlo. + + Implement Double2Ints() in CLoop backend of LLInt on 32bit architectures. + + * llint/LowLevelInterpreter.cpp: + (LLInt): + (JSC::LLInt::Double2Ints): + * offlineasm/cloop.rb: + +2013-03-12 Gabor Rapcsanyi + + Making more sophisticated cache flush on ARM Linux platform + https://bugs.webkit.org/show_bug.cgi?id=111854 + + Reviewed by Zoltan Herczeg. + + The cache flush on ARM Linux invalidates whole pages + instead of just the required area. + + * assembler/ARMAssembler.h: + (ARMAssembler): + (JSC::ARMAssembler::linuxPageFlush): + (JSC::ARMAssembler::cacheFlush): + * assembler/ARMv7Assembler.h: + (ARMv7Assembler): + (JSC::ARMv7Assembler::linuxPageFlush): + (JSC::ARMv7Assembler::cacheFlush): + +2013-03-12 Gabor Rapcsanyi + + Renaming the armv7.rb LLINT backend to arm.rb + https://bugs.webkit.org/show_bug.cgi?id=110565 + + Reviewed by Zoltan Herczeg. + + This is the first step of a unified ARM backend for + all ARM 32 bit architectures in LLInt. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * LLIntOffsetsExtractor.pro: + * offlineasm/arm.rb: Copied from Source/JavaScriptCore/offlineasm/armv7.rb. + * offlineasm/armv7.rb: Removed. + * offlineasm/backends.rb: + * offlineasm/risc.rb: + +2013-03-12 Csaba Osztrogonác + + REGRESSION(r145482): It broke 33 jsc tests and zillion layout tests on all platform + https://bugs.webkit.org/show_bug.cgi?id=112112 + + Reviewed by Oliver Hunt. + + Rolling out https://trac.webkit.org/changeset/145482 to unbreak the bots. + + * runtime/JSStringJoiner.cpp: + (JSC::JSStringJoiner::build): + * runtime/JSStringJoiner.h: + (JSStringJoiner): + (JSC::JSStringJoiner::JSStringJoiner): + (JSC::JSStringJoiner::append): + +2013-03-12 Filip Pizlo + + DFG prediction propagation phase should not rerun forward propagation if double voting has already converged + https://bugs.webkit.org/show_bug.cgi?id=111920 + + Reviewed by Oliver Hunt. + + I don't know why we weren't exiting early after double voting if !m_changed. + + This change also removes backwards propagation from the voting fixpoint, since at that + point short-circuiting loops is probably not particularly profitable. Profiling shows + that this reduces the time spent in prediction propagation even further. + + This change appears to be a 1% SunSpider speed-up. + + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::run): + +2013-03-11 Filip Pizlo + + DFG overflow check elimination is too smart for its own good + https://bugs.webkit.org/show_bug.cgi?id=111832 + + Reviewed by Oliver Hunt and Gavin Barraclough. + + Rolling this back in after fixing accidental misuse of JSValue. The code was doing value < someInt + rather than value.asInt32() < someInt. This "worked" when isWithinPowerOfTwo wasn't templatized. + It worked by always being false and always disabling the relvant optimization. + + This improves overflow check elimination in three ways: + + 1) It reduces the amount of time the compiler will spend doing it. + + 2) It fixes bugs where overflow check elimination was overzealous. Precisely, for a binary operation + over @a and @b where both @a and @b will type check that their inputs (@a->children, @b->children) + are int32's and then perform a possibly-overflowing operation, we must be careful not to assume + that @a's non-int32 parts don't matter if at the point that @a runs we have as yet not proved that + @b->children are int32's and that hence @b might produce a large enough result that doubles would + start chopping low bits. The specific implication of this is that for a binary operation to not + propagate that it cares about non-int32 parts (NodeUsedAsNumber), we must prove that at least one + of the inputs is guaranteed to produce a result within 2^32 and that there won't be a tower of such + operations large enough to ultimately produce a double greater than 2^52 (roughly). We achieve the + latter by disabling this optimization for very large basic blocks. It's noteworthy that blocks that + large won't even make it into the DFG currently. + + 3) It makes the overflow check elimination more precise for cases where the inputs to an Add or Sub + are the outputs of a bit-op. For example in (@a + (@b | 0)) | 0, we don't need to propagate + NodeUsedAsNumber to either @a or @b. + + This is neutral on V8v7 and a slight speed-up on compile time benchmarks. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::refine): + * dfg/DFGBackwardsPropagationPhase.cpp: Added. + (DFG): + (BackwardsPropagationPhase): + (JSC::DFG::BackwardsPropagationPhase::BackwardsPropagationPhase): + (JSC::DFG::BackwardsPropagationPhase::run): + (JSC::DFG::BackwardsPropagationPhase::isNotNegZero): + (JSC::DFG::BackwardsPropagationPhase::isNotZero): + (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoForConstant): + (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoNonRecursive): + (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo): + (JSC::DFG::BackwardsPropagationPhase::mergeDefaultFlags): + (JSC::DFG::BackwardsPropagationPhase::propagate): + (JSC::DFG::performBackwardsPropagation): + * dfg/DFGBackwardsPropagationPhase.h: Added. + (DFG): + * dfg/DFGCPSRethreadingPhase.cpp: + (JSC::DFG::CPSRethreadingPhase::run): + (JSC::DFG::CPSRethreadingPhase::clearIsLoadedFrom): + (CPSRethreadingPhase): + (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor): + (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGNodeFlags.cpp: + (JSC::DFG::dumpNodeFlags): + (DFG): + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (PredictionPropagationPhase): + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGUnificationPhase.cpp: + (JSC::DFG::UnificationPhase::run): + * dfg/DFGVariableAccessData.h: + (JSC::DFG::VariableAccessData::VariableAccessData): + (JSC::DFG::VariableAccessData::mergeIsLoadedFrom): + (VariableAccessData): + (JSC::DFG::VariableAccessData::setIsLoadedFrom): + (JSC::DFG::VariableAccessData::isLoadedFrom): + +2013-03-11 Oliver Hunt + + Harden JSStringJoiner + https://bugs.webkit.org/show_bug.cgi?id=112093 + + Reviewed by Filip Pizlo. + + Harden JSStringJoiner, make it use our CheckedArithmetic + class to simplify everything. + + * runtime/JSStringJoiner.cpp: + (JSC::JSStringJoiner::build): + * runtime/JSStringJoiner.h: + (JSStringJoiner): + (JSC::JSStringJoiner::JSStringJoiner): + (JSC::JSStringJoiner::append): + +2013-03-11 Michael Saboff + + Crash beneath operationCreateInlinedArguments running fast/js/dfg-create-inlined-arguments-in-closure-inline.html (32-bit only) + https://bugs.webkit.org/show_bug.cgi?id=112067 + + Reviewed by Geoffrey Garen. + + We weren't setting the tag in SetCallee. Therefore set it to CellTag. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-03-11 Oliver Hunt + + Make SegmentedVector Noncopyable + https://bugs.webkit.org/show_bug.cgi?id=112059 + + Reviewed by Geoffrey Garen. + + Copying a SegmentedVector is very expensive, and really shouldn't + be necessary. So I've taken the one place where we currently copy + and replaced it with a regular Vector, and replaced the address + dependent logic with a indexing ref instead. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::newLabelScope): + (JSC::BytecodeGenerator::emitComplexJumpScopes): + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): + * bytecompiler/LabelScope.h: + (JSC): + (JSC::LabelScopePtr::LabelScopePtr): + (LabelScopePtr): + (JSC::LabelScopePtr::operator=): + (JSC::LabelScopePtr::~LabelScopePtr): + (JSC::LabelScopePtr::operator*): + (JSC::LabelScopePtr::operator->): + * bytecompiler/NodesCodegen.cpp: + (JSC::DoWhileNode::emitBytecode): + (JSC::WhileNode::emitBytecode): + (JSC::ForNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + (JSC::SwitchNode::emitBytecode): + (JSC::LabelNode::emitBytecode): + +2013-03-10 Andreas Kling + + SpeculativeJIT should use OwnPtr. + + + Reviewed by Anders Carlsson. + + There's no need to include DFGSlowPathGenerator.h from the header as long as the destructor is out-of-line, + so let's use OwnPtr instead of raw pointers + deleteAllValues(). + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::~SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::addSlowPathGenerator): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + +2013-03-09 Sheriff Bot + + Unreviewed, rolling out r145299. + http://trac.webkit.org/changeset/145299 + https://bugs.webkit.org/show_bug.cgi?id=111928 + + compilation failure with recent clang + (DFGBackwardsPropagationPhase.cpp:132:35: error: comparison of + constant 10 with expression of type 'bool' is always false) + (Requested by thorton on #webkit). + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::refine): + * dfg/DFGBackwardsPropagationPhase.cpp: Removed. + * dfg/DFGBackwardsPropagationPhase.h: Removed. + * dfg/DFGCPSRethreadingPhase.cpp: + (JSC::DFG::CPSRethreadingPhase::run): + (CPSRethreadingPhase): + (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor): + (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGNodeFlags.cpp: + (JSC::DFG::nodeFlagsAsString): + (DFG): + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::isNotNegZero): + (PredictionPropagationPhase): + (JSC::DFG::PredictionPropagationPhase::isNotZero): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo): + (JSC::DFG::PredictionPropagationPhase::propagate): + (JSC::DFG::PredictionPropagationPhase::mergeDefaultFlags): + * dfg/DFGUnificationPhase.cpp: + (JSC::DFG::UnificationPhase::run): + * dfg/DFGVariableAccessData.h: + (JSC::DFG::VariableAccessData::VariableAccessData): + (VariableAccessData): + +2013-03-08 Filip Pizlo + + DFG overflow check elimination is too smart for its own good + https://bugs.webkit.org/show_bug.cgi?id=111832 + + Reviewed by Oliver Hunt and Gavin Barraclough. + + This improves overflow check elimination in three ways: + + 1) It reduces the amount of time the compiler will spend doing it. + + 2) It fixes bugs where overflow check elimination was overzealous. Precisely, for a binary operation + over @a and @b where both @a and @b will type check that their inputs (@a->children, @b->children) + are int32's and then perform a possibly-overflowing operation, we must be careful not to assume + that @a's non-int32 parts don't matter if at the point that @a runs we have as yet not proved that + @b->children are int32's and that hence @b might produce a large enough result that doubles would + start chopping low bits. The specific implication of this is that for a binary operation to not + propagate that it cares about non-int32 parts (NodeUsedAsNumber), we must prove that at least one + of the inputs is guaranteed to produce a result within 2^32 and that there won't be a tower of such + operations large enough to ultimately produce a double greater than 2^52 (roughly). We achieve the + latter by disabling this optimization for very large basic blocks. It's noteworthy that blocks that + large won't even make it into the DFG currently. + + 3) It makes the overflow check elimination more precise for cases where the inputs to an Add or Sub + are the outputs of a bit-op. For example in (@a + (@b | 0)) | 0, we don't need to propagate + NodeUsedAsNumber to either @a or @b. + + This is neutral on V8v7 and a slight speed-up on compile time benchmarks. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::refine): + * dfg/DFGBackwardsPropagationPhase.cpp: Added. + (DFG): + (BackwardsPropagationPhase): + (JSC::DFG::BackwardsPropagationPhase::BackwardsPropagationPhase): + (JSC::DFG::BackwardsPropagationPhase::run): + (JSC::DFG::BackwardsPropagationPhase::isNotNegZero): + (JSC::DFG::BackwardsPropagationPhase::isNotZero): + (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoForConstant): + (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwoNonRecursive): + (JSC::DFG::BackwardsPropagationPhase::isWithinPowerOfTwo): + (JSC::DFG::BackwardsPropagationPhase::mergeDefaultFlags): + (JSC::DFG::BackwardsPropagationPhase::propagate): + (JSC::DFG::performBackwardsPropagation): + * dfg/DFGBackwardsPropagationPhase.h: Added. + (DFG): + * dfg/DFGCPSRethreadingPhase.cpp: + (JSC::DFG::CPSRethreadingPhase::run): + (JSC::DFG::CPSRethreadingPhase::clearIsLoadedFrom): + (CPSRethreadingPhase): + (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor): + (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGNodeFlags.cpp: + (JSC::DFG::dumpNodeFlags): + (DFG): + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (PredictionPropagationPhase): + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGUnificationPhase.cpp: + (JSC::DFG::UnificationPhase::run): + * dfg/DFGVariableAccessData.h: + (JSC::DFG::VariableAccessData::VariableAccessData): + (JSC::DFG::VariableAccessData::mergeIsLoadedFrom): + (VariableAccessData): + (JSC::DFG::VariableAccessData::setIsLoadedFrom): + (JSC::DFG::VariableAccessData::isLoadedFrom): + +2013-03-08 Roger Fong + + Makefile fixes. + + * JavaScriptCore.vcxproj/JavaScriptCore.make: + +2013-03-08 Gabor Rapcsanyi + + Cache flush problem on ARMv7 JSC + https://bugs.webkit.org/show_bug.cgi?id=111441 + + Reviewed by Zoltan Herczeg. + + Not proper cache flush causing random crashes on ARMv7 Linux with V8 tests. + The problem is similar to https://bugs.webkit.org/show_bug.cgi?id=77712. + Change the cache fulsh mechanism similar to ARM traditinal and revert the + temporary fix. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::cacheFlush): + +2013-03-07 Geoffrey Garen + + REGRESSION (r143759): 40% JSBench regression, 20% Octane/closure regression, 40% Octane/jquery regression, 2% Octane regression + https://bugs.webkit.org/show_bug.cgi?id=111797 + + Reviewed by Oliver Hunt. + + The bot's testing configuration stresses the cache's starting guess + of 1MB. + + This patch removes any starting guess, and just uses wall clock time + to discover the initial working set size of an app, in code size. + + * runtime/CodeCache.cpp: + (JSC::CodeCacheMap::pruneSlowCase): Update our timer as we go. + + Also fixed a bug where pruning from 0 to 0 would hang -- that case is + a possibility now that we start with a capacity of 0. + + * runtime/CodeCache.h: + (CodeCacheMap): + (JSC::CodeCacheMap::CodeCacheMap): + (JSC::CodeCacheMap::add): + (JSC::CodeCacheMap::prune): Don't prune if we're in the middle of + discovering the working set size of an app, in code size. + +2013-03-07 Michael Saboff + + Crash when updating predictions below JSC::arrayProtoFuncForEach on tuaw.com article + https://bugs.webkit.org/show_bug.cgi?id=111777 + + Reviewed by Filip Pizlo. + + Moved register allocations to be above any generated control flow so that any + resulting spill would be visible to all subsequently generated code. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): + (JSC::DFG::SpeculativeJIT::compile): + +2013-03-07 Filip Pizlo + + DFG should not get corrupted IR in the case of code that is dead, unreachable, and contains a chain of nodes that use each other in an untyped way + https://bugs.webkit.org/show_bug.cgi?id=111783 + + Reviewed by Mark Hahnenberg. + + Unreachable code is not touched by CFA and so thinks that even untyped uses are checked. + But dead untyped uses don't need checks and hence don't need to be Phantom'd. The DCE knew + this in findTypeCheckRoot() but not in eliminateIrrelevantPhantomChildren(), leading to a + Phantom node that had another Phantom node as one of its kids. + + * dfg/DFGDCEPhase.cpp: + (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): + +2013-03-07 Filip Pizlo + + The DFG fixpoint is not strictly profitable, and should be straight-lined + https://bugs.webkit.org/show_bug.cgi?id=111764 + + Reviewed by Oliver Hunt and Geoffrey Garen. + + The DFG previously ran optimizations to fixpoint because there exists a circular dependency: + + CSE depends on CFG simplification: CFG simplification merges blocks, and CSE is block-local. + + CFG simplification depends on CFA and constant folding: constant folding reveals branches on + constants. + + CFA depends on CSE: CSE reveals must-alias relationships by proving that two operations + always produce identical values. + + Arguments simplification also depends on CSE, but it ought not depend on anything else. + + Hence we get a cycle like: CFA -> folding -> CFG -> CSE -> CFA. + + Note that before we had sparse conditional CFA, we also had CFA depending on CFG. This ought + not be the case anymore: CFG simplification should not by itself lead to better CFA results. + + My guess is that the weakest link in this cycle is CFG -> CSE. CSE cuts both ways: if you + CSE too much then you increase register pressure. Hence it's not clear that you always want + to CSE after simplifying control flow. This leads to an order of optimization as follows: + + CSE -> arguments -> CFA -> folding -> CFG + + This is a 2.5% speed-up on SunSpider, a 4% speed-up on V8Spider, a possible 0.3% slow-down + on V8v7, nothing on Kraken, and 1.2% speed-up in the JSRegress geomean. I'll take a 2.5% + speed-up over a 0.3% V8v7 speed-up. + + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + +2013-03-07 Roger Fong + + Build fix for AppleWin VS2010. + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + +2013-03-05 Mark Hahnenberg + + Objective-C API: Need a good way to reference event handlers without causing cycles + https://bugs.webkit.org/show_bug.cgi?id=111088 + + Reviewed by Geoffrey Garen. + + JSManagedValue is like a special kind of weak value. When you create a JSManagedValue, you can + supply an Objective-C object as its "owner". As long as the Objective-C owner object remains + alive and its wrapper remains accessible to the JSC garbage collector (e.g. by being marked by + the global object), the reference to the JavaScript value is strong. As soon as the Objective-C + owner is deallocated or its wrapper becomes inaccessible to the garbage collector, the reference + becomes weak. + + If you do not supply an owner or you use the weakValueWithValue: convenience class method, the + returned JSManagedValue behaves as a normal weak reference. + + This new class allows clients to maintain references to JavaScript values in the Objective-C + heap without creating reference cycles/leaking memory. + + * API/JSAPIWrapperObject.cpp: Added. + (JSC): + (JSC::::createStructure): + (JSC::JSAPIWrapperObject::JSAPIWrapperObject): This is a special JSObject for the Objective-C API that knows + for the purposes of garbage collection/marking that it wraps an opaque Objective-C object. + (JSC::JSAPIWrapperObject::visitChildren): We add the pointer to the wrapped Objective-C object to the set of + opaque roots so that the weak handle owner for JSManagedValues can find it later. + * API/JSAPIWrapperObject.h: Added. + (JSC): + (JSAPIWrapperObject): + (JSC::JSAPIWrapperObject::wrappedObject): + (JSC::JSAPIWrapperObject::setWrappedObject): + * API/JSBase.cpp: + (JSSynchronousGarbageCollect): + * API/JSBasePrivate.h: + * API/JSCallbackObject.cpp: + (JSC): + * API/JSCallbackObject.h: + (JSC::JSCallbackObject::destroy): Moved this to the header so that we don't get link errors with JSAPIWrapperObject. + * API/JSContext.mm: + (-[JSContext initWithVirtualMachine:]): We weren't adding manually allocated/initialized JSVirtualMachine objects to + the global cache of virtual machines. The init methods handle this now rather than contextWithGlobalContextRef, since + not everyone is guaranteed to use the latter. + (-[JSContext initWithGlobalContextRef:]): + (+[JSContext contextWithGlobalContextRef:]): + * API/JSManagedValue.h: Added. + * API/JSManagedValue.mm: Added. + (JSManagedValueHandleOwner): + (managedValueHandleOwner): + (+[JSManagedValue weakValueWithValue:]): + (+[JSManagedValue managedValueWithValue:owner:]): + (-[JSManagedValue init]): We explicitly call the ARC entrypoints to initialize/get the weak owner field since we don't + use ARC when building our framework. + (-[JSManagedValue initWithValue:]): + (-[JSManagedValue initWithValue:owner:]): + (-[JSManagedValue dealloc]): + (-[JSManagedValue value]): + (-[JSManagedValue weakOwner]): + (JSManagedValueHandleOwner::isReachableFromOpaqueRoots): If the Objective-C owner is still alive (i.e. loading the weak field + returns non-nil) and that value was added to the set of opaque roots by the wrapper for that Objective-C owner, then the the + JSObject to which the JSManagedObject refers is still alive. + * API/JSObjectRef.cpp: We have to add explicit checks for the JSAPIWrapperObject, just like the other types of JSCallbackObjects. + (JSObjectGetPrivate): + (JSObjectSetPrivate): + (JSObjectGetPrivateProperty): + (JSObjectSetPrivateProperty): + (JSObjectDeletePrivateProperty): + * API/JSValue.mm: + (objectToValueWithoutCopy): + * API/JSValueRef.cpp: + (JSValueIsObjectOfClass): + * API/JSVirtualMachine.mm: + (-[JSVirtualMachine initWithContextGroupRef:]): + (+[JSVirtualMachine virtualMachineWithContextGroupRef:]): + * API/JSWrapperMap.mm: + (wrapperFinalize): + (makeWrapper): This is our own internal version of JSObjectMake which creates JSAPIWrapperObjects, the Obj-C API + version of JSCallbackObjects. + (createObjectWithCustomBrand): + (-[JSObjCClassInfo wrapperForObject:]): + (tryUnwrapObjcObject): + * API/JavaScriptCore.h: + * API/tests/testapi.mm: Added new tests for the strong and weak uses of JSManagedValue in the context of an + onclick handler for an Objective-C object inserted into a JSContext. + (-[TextXYZ setWeakOnclick:]): + (-[TextXYZ setOnclick:]): + (-[TextXYZ weakOnclick]): + (-[TextXYZ onclick]): + (-[TextXYZ click]): + * CMakeLists.txt: Various build system additions. + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSGlobalObject.cpp: Added the new canonical Structure for the JSAPIWrapperObject class. + (JSC::JSGlobalObject::reset): + (JSC): + (JSC::JSGlobalObject::visitChildren): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + (JSC::JSGlobalObject::objcWrapperObjectStructure): + +2013-03-06 Filip Pizlo + + ConvertThis should be turned into Identity based on predictions in Fixup, rather than based on proofs in ConstantFolding + https://bugs.webkit.org/show_bug.cgi?id=111674 + + Reviewed by Oliver Hunt. + + This gets rid of the speculated forms of ConvertThis in the backend, and has Fixup + convert them to either Identity(Object:@child) if the child is predicted object, or + Phantom(Other:@child) ; WeakJSConstant(global this object) if it's predicted Other. + + The goal of this is to ensure that the optimization fixpoint doesn't create + Identity's, since doing so requires a rerun of CSE. So far this isn't a speed-up + but I'm hoping this will be a step towards reducing the need to rerun the fixpoint + so as to ultimately reduce compile times. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + * dfg/DFGAssemblyHelpers.h: + (AssemblyHelpers): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (FixupPhase): + (JSC::DFG::FixupPhase::observeUseKindOnNode): + (JSC::DFG::FixupPhase::setUseKindAndUnboxIfProfitable): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::globalThisObjectFor): + (Graph): + * dfg/DFGNode.h: + (Node): + (JSC::DFG::Node::convertToIdentity): + (JSC::DFG::Node::convertToWeakConstant): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-03-07 Peter Gal + + Children method in LLINT AST Not class should return [@child] + https://bugs.webkit.org/show_bug.cgi?id=90740 + + Reviewed by Filip Pizlo. + + * offlineasm/ast.rb: Fixed the return value of the children method in the Not AST class. + +2013-03-05 Oliver Hunt + + Bring back eager resolution of function scoped variables + https://bugs.webkit.org/show_bug.cgi?id=111497 + + Reviewed by Geoffrey Garen. + + This reverts the get/put_scoped_var part of the great non-local + variable resolution refactoring. This still leaves all the lazy + variable resolution logic as it's necessary for global property + resolution, and i don't want to make the patch bigger than it + already is. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (CodeBlock): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::generateFunctionCodeBlock): + (JSC::UnlinkedFunctionExecutable::codeBlockFor): + (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): + * bytecode/UnlinkedCodeBlock.h: + (JSC): + (UnlinkedFunctionExecutable): + (UnlinkedCodeBlock): + (JSC::UnlinkedCodeBlock::usesGlobalObject): + (JSC::UnlinkedCodeBlock::setGlobalObjectRegister): + (JSC::UnlinkedCodeBlock::globalObjectRegister): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::ResolveResult::checkValidity): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitLoadGlobalObject): + (JSC): + (JSC::BytecodeGenerator::resolve): + (JSC::BytecodeGenerator::resolveConstDecl): + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithThis): + (JSC::BytecodeGenerator::emitGetStaticVar): + (JSC::BytecodeGenerator::emitPutStaticVar): + * bytecompiler/BytecodeGenerator.h: + (JSC::ResolveResult::lexicalResolve): + (JSC::ResolveResult::isStatic): + (JSC::ResolveResult::depth): + (JSC::ResolveResult::index): + (ResolveResult): + (JSC::ResolveResult::ResolveResult): + (BytecodeGenerator): + * bytecompiler/NodesCodegen.cpp: + (JSC::ResolveNode::isPure): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::PostfixNode::emitResolve): + (JSC::TypeOfResolveNode::emitBytecode): + (JSC::PrefixNode::emitResolve): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::AssignResolveNode::emitBytecode): + (JSC::ConstDeclNode::emitCodeSingle): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCapabilities.cpp: + (JSC::DFG::debugFail): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + (JSC::DFG::canInlineOpcode): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + (JIT): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC): + (JSC::JIT::emit_op_put_scoped_var): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC): + (JSC::JIT::emit_op_put_scoped_var): + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/CodeCache.cpp: + (JSC::CodeCache::getCodeBlock): + (JSC::CodeCache::getProgramCodeBlock): + (JSC::CodeCache::getEvalCodeBlock): + * runtime/CodeCache.h: + (JSC): + (CodeCache): + * runtime/Executable.cpp: + (JSC::EvalExecutable::compileInternal): + (JSC::FunctionExecutable::produceCodeBlockFor): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::createEvalCodeBlock): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + * runtime/Options.cpp: + (JSC::Options::initialize): + +2013-03-06 Filip Pizlo + + Unreviewed, roll out http://trac.webkit.org/changeset/144989 + + I think we want the assertion that I removed. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::merge): + (JSC::DFG::AbstractState::mergeVariableBetweenBlocks): + * dfg/DFGAbstractState.h: + (AbstractState): + +2013-03-06 Filip Pizlo + + DFG::AbstractState::merge() is still more complicated than it needs to be + https://bugs.webkit.org/show_bug.cgi?id=111619 + + Reviewed by Mark Hahnenberg. + + This method is the one place where we still do some minimal amount of liveness pruning, but the style with + which it is written is awkward, and it makes an assertion about variablesAtTail that will be invalidated + by https://bugs.webkit.org/show_bug.cgi?id=111539. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::merge): + (JSC::DFG::AbstractState::mergeVariableBetweenBlocks): + * dfg/DFGAbstractState.h: + (AbstractState): + +2013-03-06 Filip Pizlo + + DFG should not run full CSE after the optimization fixpoint, since it really just wants store elimination + https://bugs.webkit.org/show_bug.cgi?id=111536 + + Reviewed by Oliver Hunt and Mark Hahnenberg. + + The fixpoint will do aggressive load elimination and pure CSE. There's no need to do it after the fixpoint. + On the other hand, the fixpoint does not profit from doing store elimination (except for SetLocal/Flush). + Previously we had CSE do both, and had it avoid doing some store elimination during the fixpoint by querying + the fixpoint state. This changes CSE to be templated on mode - either NormalCSE or StoreElimination - so + that we explicitly put it into one of those modes depending on where we call it from. The goal is to reduce + time spent doing load elimination after the fixpoint, since that is just wasted cycles. + + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::CSEPhase): + (JSC::DFG::CSEPhase::run): + (JSC::DFG::CSEPhase::performNodeCSE): + (JSC::DFG::CSEPhase::performBlockCSE): + (JSC::DFG::performCSE): + (DFG): + (JSC::DFG::performStoreElimination): + * dfg/DFGCSEPhase.h: + (DFG): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + +2013-03-06 Andreas Kling + + Pack Structure members better. + + + + Reviewed by Mark Hahnenberg. + + Shrink Structure by 8 bytes (now at 104 bytes) on 64-bit by packing the members better. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + * runtime/Structure.h: + (Structure): + +2013-03-06 Andreas Kling + + Unreviewed, fix Windows build after r144910. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2013-03-05 Filip Pizlo + + DFG should not check if nodes are shouldGenerate prior to DCE + https://bugs.webkit.org/show_bug.cgi?id=111520 + + Reviewed by Geoffrey Garen. + + All nodes are live before DCE. We don't need to check that they aren't, because they + definitely will be. + + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + * dfg/DFGCFAPhase.cpp: + (JSC::DFG::CFAPhase::performBlockCFA): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::keepOperandAlive): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::pureCSE): + (JSC::DFG::CSEPhase::int32ToDoubleCSE): + (JSC::DFG::CSEPhase::constantCSE): + (JSC::DFG::CSEPhase::weakConstantCSE): + (JSC::DFG::CSEPhase::getCalleeLoadElimination): + (JSC::DFG::CSEPhase::getArrayLengthElimination): + (JSC::DFG::CSEPhase::globalVarLoadElimination): + (JSC::DFG::CSEPhase::scopedVarLoadElimination): + (JSC::DFG::CSEPhase::globalVarWatchpointElimination): + (JSC::DFG::CSEPhase::globalVarStoreElimination): + (JSC::DFG::CSEPhase::scopedVarStoreElimination): + (JSC::DFG::CSEPhase::getByValLoadElimination): + (JSC::DFG::CSEPhase::checkStructureElimination): + (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination): + (JSC::DFG::CSEPhase::putStructureStoreElimination): + (JSC::DFG::CSEPhase::getByOffsetLoadElimination): + (JSC::DFG::CSEPhase::putByOffsetStoreElimination): + (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination): + (JSC::DFG::CSEPhase::checkArrayElimination): + (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination): + (JSC::DFG::CSEPhase::getMyScopeLoadElimination): + (JSC::DFG::CSEPhase::getLocalLoadElimination): + (JSC::DFG::CSEPhase::setLocalStoreElimination): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::fixupSetLocalsInBlock): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + +2013-03-06 Csaba Osztrogonác + + Fix unused parameter warnings in ARM assembler + https://bugs.webkit.org/show_bug.cgi?id=111433 + + Reviewed by Kentaro Hara. + + * assembler/ARMAssembler.h: Remove unreachable revertJump() after r143346. + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::moveIntsToDouble): Remove unused scratch parameter instead of UNUSED_PARAM. + (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): Remove unused fpTemp parameter. + (JSC::MacroAssemblerARM::revertJumpReplacementToPatchableBranchPtrWithPatch): Remove unused parameters. + +2013-03-06 Andreas Kling + + Unused Structure property tables waste 14MB on Membuster. + + + + Reviewed by Geoffrey Garen. + + Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking. + 14 MB progression on Membuster3. + + This time it should stick; I've been through all the tests with COLLECT_ON_EVERY_ALLOCATION. + The issue with the last version was that Structure::m_offset could be used uninitialized + when re-materializing a previously GC'd property table, causing some sanity checks to fail. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + + Added PropertyTable.cpp. + + * runtime/PropertyTable.cpp: Added. + (JSC::PropertyTable::create): + (JSC::PropertyTable::clone): + (JSC::PropertyTable::PropertyTable): + (JSC::PropertyTable::destroy): + (JSC::PropertyTable::~PropertyTable): + (JSC::PropertyTable::visitChildren): + + Moved marking of property table values here from Structure::visitChildren(). + + * runtime/WriteBarrier.h: + (JSC::WriteBarrierBase::get): + + Move m_cell to a local before using it multiple times. This avoids a multiple-access race when + Structure::checkOffsetConsistency() is used in assertions on the main thread while a marking thread + zaps the property table. + + * runtime/Structure.h: + (JSC::Structure::materializePropertyMapIfNecessary): + (JSC::Structure::materializePropertyMapIfNecessaryForPinning): + * runtime/StructureInlines.h: + (JSC::Structure::propertyTable): + + Added a getter for the Structure's PropertyTable that ASSERTs GC currently isn't active. + Because GC can zap an unpinned property table at any time, it's not entirely safe to access it. + Renamed the variable itself to m_propertyTableUnsafe to force call sites into explaining themselves. + + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::checkOffsetConsistency): + + Moved these out of Structure.h to break header dependency cycle between Structure/PropertyTable. + + * runtime/Structure.cpp: + (JSC::Structure::visitChildren): + + Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd. + + (JSC::Structure::takePropertyTableOrCloneIfPinned): + + Added for setting up the property table in a new transition, this code is now shared between + addPropertyTransition() and nonPropertyTransition(). + + * runtime/JSGlobalData.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + + Add a global propertyTableStructure. + + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::createStructure): + (JSC::PropertyTable::copy): + + Make PropertyTable a GC object. + + * runtime/Structure.cpp: + (JSC::Structure::dumpStatistics): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::sealTransition): + (JSC::Structure::freezeTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::isSealed): + (JSC::Structure::isFrozen): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::pin): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::despecifyAllFunctions): + (JSC::Structure::putSpecificValue): + (JSC::Structure::remove): + (JSC::Structure::createPropertyMap): + (JSC::Structure::getPropertyNamesFromStructure): + (JSC::Structure::checkConsistency): + +2013-03-05 Filip Pizlo + + Get rid of the invert argument to SpeculativeJIT::jumpSlowForUnwantedArrayMode + https://bugs.webkit.org/show_bug.cgi?id=105624 + + Reviewed by Oliver Hunt. + + All callers pass invert = false, which is the default value of the argument. So, get + rid of the argument and fold away all code that checks it. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + +2013-03-05 Filip Pizlo + + Unreviewed, fix an incorrect comment. The comment was a holdover from a work-in-progress version of this code. + + * dfg/DFGDCEPhase.cpp: + (JSC::DFG::DCEPhase::run): + +2013-03-04 Filip Pizlo + + DFG DCE might eliminate checks unsoundly + https://bugs.webkit.org/show_bug.cgi?id=109389 + + Reviewed by Oliver Hunt. + + This gets rid of all eager reference counting, and does all dead code elimination + in one phase - the DCEPhase. This phase also sets up the node reference counts, + which are then used not just for DCE but also register allocation and stack slot + allocation. + + Doing this required a number of surgical changes in places that previously relied + on always having liveness information. For example, the structure check hoisting + phase must now consult whether a VariableAccessData is profitable for unboxing to + make sure that it doesn't try to do hoisting on set SetLocals. The arguments + simplification phase employs its own light-weight liveness analysis. Both phases + previously just used reference counts. + + The largest change is that now, dead nodes get turned into Phantoms. Those + Phantoms will retain those child edges that are not proven. This ensures that any + type checks performed by a dead node remain even after the node is killed. On the + other hand, this Phantom conversion means that we need special handling for + SetLocal. I decided to make the four forms of SetLocal explicit: + + MovHint(@a, rK): Just indicates that node @a contains the value that would have + now been placed into virtual register rK. Does not actually cause @a to be + stored into rK. This would have previously been a dead SetLocal with @a + being live. MovHints are always dead. + + ZombieHint(rK): Indicates that at this point, register rK will contain a dead + value and OSR should put Undefined into it. This would have previously been + a dead SetLocal with @a being dead also. ZombieHints are always dead. + + MovHintAndCheck(@a, rK): Identical to MovHint except @a is also type checked, + according to whatever UseKind the edge to @a has. The type check is always a + forward exit. MovHintAndChecks are always live, since they are + NodeMustGenerate. Previously this would have been a dead SetLocal with a + live @a, and the check would have disappeared. This is one of the bugs that + this patch solves. + + SetLocal(@a, rK): This still does exactly what it does now, if the SetLocal is + live. + + Basically this patch makes it so that dead SetLocals eventually decay to MovHint, + ZombieHint, or MovHintAndCheck depending on the situation. If the child @a is + also dead, then you get a ZombieHint. If the child @a is live but the SetLocal + has a type check and @a's type hasn't been proven to have that type then you get + a MovHintAndCheck. Otherwise you get a MovHint. + + This is performance neutral. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::executeEffects): + (JSC::DFG::AbstractState::mergeStateAtTail): + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + (ArgumentsSimplificationPhase): + (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild): + * dfg/DFGBasicBlock.h: + (BasicBlock): + * dfg/DFGBasicBlockInlines.h: + (DFG): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::addToGraph): + (JSC::DFG::ByteCodeParser::insertPhiNode): + (JSC::DFG::ByteCodeParser::emitFunctionChecks): + * dfg/DFGCFAPhase.cpp: + (JSC::DFG::CFAPhase::run): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::keepOperandAlive): + * dfg/DFGCPSRethreadingPhase.cpp: + (JSC::DFG::CPSRethreadingPhase::run): + (JSC::DFG::CPSRethreadingPhase::addPhiSilently): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren): + (JSC::DFG::CSEPhase::setReplacement): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGCommon.cpp: + (WTF::printInternal): + (WTF): + * dfg/DFGCommon.h: + (WTF): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck): + (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode): + * dfg/DFGDCEPhase.cpp: Added. + (DFG): + (DCEPhase): + (JSC::DFG::DCEPhase::DCEPhase): + (JSC::DFG::DCEPhase::run): + (JSC::DFG::DCEPhase::findTypeCheckRoot): + (JSC::DFG::DCEPhase::countEdge): + (JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren): + (JSC::DFG::performDCE): + * dfg/DFGDCEPhase.h: Added. + (DFG): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + (JSC::DFG::FixupPhase::fixIntEdge): + (JSC::DFG::FixupPhase::injectInt32ToDoubleNode): + (JSC::DFG::FixupPhase::truncateConstantToInt32): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::Graph): + (JSC::DFG::Graph::dump): + (DFG): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::changeChild): + (JSC::DFG::Graph::changeEdge): + (JSC::DFG::Graph::compareAndSwap): + (JSC::DFG::Graph::clearAndDerefChild): + (JSC::DFG::Graph::performSubstitution): + (JSC::DFG::Graph::performSubstitutionForEdge): + (Graph): + (JSC::DFG::Graph::substitute): + * dfg/DFGInsertionSet.h: + (InsertionSet): + * dfg/DFGNode.h: + (JSC::DFG::Node::Node): + (JSC::DFG::Node::convertToConstant): + (JSC::DFG::Node::convertToGetLocalUnlinked): + (JSC::DFG::Node::containsMovHint): + (Node): + (JSC::DFG::Node::hasVariableAccessData): + (JSC::DFG::Node::willHaveCodeGenOrOSR): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + (JSC::DFG::SpeculativeJIT::compileMovHint): + (JSC::DFG::SpeculativeJIT::compileMovHintAndCheck): + (DFG): + (JSC::DFG::SpeculativeJIT::compileInlineStart): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + (JSC::DFG::StructureCheckHoistingPhase::shouldConsiderForHoisting): + (StructureCheckHoistingPhase): + * dfg/DFGValidate.cpp: + (JSC::DFG::Validate::validate): + +2013-03-05 Mark Hahnenberg + + Objective-C API: JSValue should implement init and return nil in exceptional cases + https://bugs.webkit.org/show_bug.cgi?id=111487 + + Reviewed by Darin Adler. + + * API/JSValue.mm: + (-[JSValue init]): We return nil here because there is no way to get the instance into a coherent state + without a JSContext. + (-[JSValue initWithValue:inContext:]): Similarly, we should also return nil here if either of the arguments is 0. + +2013-03-05 Sheriff Bot + + Unreviewed, rolling out r144708. + http://trac.webkit.org/changeset/144708 + https://bugs.webkit.org/show_bug.cgi?id=111447 + + random assertion crashes in inspector tests on qt+mac bots + (Requested by kling on #webkit). + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::PropertyTable): + (JSC): + (JSC::PropertyTable::~PropertyTable): + (JSC::PropertyTable::copy): + * runtime/PropertyTable.cpp: Removed. + * runtime/Structure.cpp: + (JSC::Structure::dumpStatistics): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::sealTransition): + (JSC::Structure::freezeTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::isSealed): + (JSC::Structure::isFrozen): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::pin): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::despecifyAllFunctions): + (JSC::Structure::putSpecificValue): + (JSC::Structure::remove): + (JSC::Structure::createPropertyMap): + (JSC::Structure::getPropertyNamesFromStructure): + (JSC::Structure::visitChildren): + (JSC::Structure::checkConsistency): + * runtime/Structure.h: + (JSC): + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::materializePropertyMapIfNecessary): + (JSC::Structure::materializePropertyMapIfNecessaryForPinning): + (JSC::Structure::checkOffsetConsistency): + (Structure): + * runtime/StructureInlines.h: + (JSC::Structure::get): + * runtime/WriteBarrier.h: + (JSC::WriteBarrierBase::get): + +2013-03-05 David Kilzer + + BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac + + + Fixes the following build failures: + + Undefined symbols for architecture i386: + "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from: + __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o + NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. + "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from: + __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o + ld: symbol(s) not found for architecture i386 + + * Configurations/FeatureDefines.xcconfig: + - Fix definition of ENABLE_ENCRYPTED_MEDIA_V2_macosx to match + other FeatureDefines.xcconfig files. + - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform. + +2013-03-04 Andreas Kling + + Unused Structure property tables waste 14MB on Membuster. + + + + Reviewed by Geoffrey Garen. + + Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking. + 14 MB progression on Membuster3. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + + Added PropertyTable.cpp. + + * runtime/PropertyTable.cpp: Added. + (JSC::PropertyTable::create): + (JSC::PropertyTable::clone): + (JSC::PropertyTable::PropertyTable): + (JSC::PropertyTable::destroy): + (JSC::PropertyTable::~PropertyTable): + (JSC::PropertyTable::visitChildren): + + Moved marking of property table values here from Structure::visitChildren(). + + * runtime/WriteBarrier.h: + (JSC::WriteBarrierBase::get): + + Move m_cell to a local before using it multiple times. This avoids a multiple-access race when + Structure::checkOffsetConsistency() is used in assertions on the main thread while a marking thread + zaps the property table. + + * runtime/Structure.h: + (JSC::Structure::materializePropertyMapIfNecessary): + (JSC::Structure::materializePropertyMapIfNecessaryForPinning): + * runtime/StructureInlines.h: + (JSC::Structure::propertyTable): + + Added a getter for the Structure's PropertyTable that ASSERTs GC currently isn't active. + Because GC can zap an unpinned property table at any time, it's not entirely safe to access it. + Renamed the variable itself to m_propertyTableUnsafe to force call sites into explaining themselves. + + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::checkOffsetConsistency): + + Moved these out of Structure.h to break header dependency cycle between Structure/PropertyTable. + + * runtime/Structure.cpp: + (JSC::Structure::visitChildren): + + Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd. + + * runtime/JSGlobalData.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + + Add a global propertyTableStructure. + + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::createStructure): + (JSC::PropertyTable::copy): + + Make PropertyTable a GC object. + + * runtime/Structure.cpp: + (JSC::Structure::dumpStatistics): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::sealTransition): + (JSC::Structure::freezeTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::isSealed): + (JSC::Structure::isFrozen): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::pin): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::despecifyAllFunctions): + (JSC::Structure::putSpecificValue): + (JSC::Structure::remove): + (JSC::Structure::createPropertyMap): + (JSC::Structure::getPropertyNamesFromStructure): + (JSC::Structure::checkConsistency): + +2013-03-04 Chris Fleizach + + Support WebSpeech - Speech Synthesis + https://bugs.webkit.org/show_bug.cgi?id=106742 + + Reviewed by Simon Fraser. + + Enable speech synthesis for the Mac. + + * Configurations/FeatureDefines.xcconfig: + +2013-03-04 Mark Hahnenberg + + Remove contextInternalContext from JSContextInternal.h + https://bugs.webkit.org/show_bug.cgi?id=111356 + + Reviewed by Geoffrey Garen. + + We don't need it any more since we have globalContextRef in JSContext. + + * API/JSContext.mm: + * API/JSContextInternal.h: + * API/JSValue.mm: + (+[JSValue valueWithBool:inContext:]): + (+[JSValue valueWithDouble:inContext:]): + (+[JSValue valueWithInt32:inContext:]): + (+[JSValue valueWithUInt32:inContext:]): + (+[JSValue valueWithNewObjectInContext:]): + (+[JSValue valueWithNewArrayInContext:]): + (+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]): + (+[JSValue valueWithNewErrorFromMessage:inContext:]): + (+[JSValue valueWithNullInContext:]): + (+[JSValue valueWithUndefinedInContext:]): + (-[JSValue toBool]): + (-[JSValue toDouble]): + (-[JSValue toNumber]): + (-[JSValue toString]): + (-[JSValue toDate]): + (-[JSValue toArray]): + (-[JSValue toDictionary]): + (-[JSValue valueForProperty:]): + (-[JSValue setValue:forProperty:]): + (-[JSValue deleteProperty:]): + (-[JSValue hasProperty:]): + (-[JSValue valueAtIndex:]): + (-[JSValue setValue:atIndex:]): + (-[JSValue isUndefined]): + (-[JSValue isNull]): + (-[JSValue isBoolean]): + (-[JSValue isNumber]): + (-[JSValue isString]): + (-[JSValue isObject]): + (-[JSValue isEqualToObject:]): + (-[JSValue isEqualWithTypeCoercionToObject:]): + (-[JSValue isInstanceOf:]): + (-[JSValue callWithArguments:]): + (-[JSValue constructWithArguments:]): + (-[JSValue invokeMethod:withArguments:]): + (valueToObject): + (objectToValueWithoutCopy): + (objectToValue): + (-[JSValue initWithValue:inContext:]): + (-[JSValue dealloc]): + (-[JSValue description]): + * API/JSWrapperMap.mm: + (createObjectWithCustomBrand): + (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): + (-[JSObjCClassInfo wrapperForObject:]): + (-[JSWrapperMap jsWrapperForObject:]): + * API/ObjCCallbackFunction.mm: + (ObjCCallbackFunction::call): + (objCCallbackFunctionForInvocation): + +2013-03-04 Andreas Kling + + Add simple vector traits for JSC::Identifier. + + + Reviewed by Geoffrey Garen. + + Identifiers are really just Strings, giving them simple vector traits makes + Vector move them with memcpy() instead of churning the refcounts. + + * runtime/Identifier.h: + (WTF): + +2013-03-04 Kunihiko Sakamoto + + Add build flag for FontLoader + https://bugs.webkit.org/show_bug.cgi?id=111289 + + Reviewed by Benjamin Poulain. + + Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default). + + * Configurations/FeatureDefines.xcconfig: + +2013-03-03 Andreas Kling + + Shrink JSC::HashTable entries. + + + + Reviewed by Anders Carlsson. + + Move the Intrinsic value out of the function-specific part of the union, + and store it next to m_attributes. Reduces the size of HashEntry by 8 bytes. + + 990 kB progression on Membuster3. (PTUS: 797 kB) + + * runtime/Lookup.h: + (JSC::HashEntry::initialize): + (JSC::HashEntry::intrinsic): + (HashEntry): + +2013-03-01 David Kilzer + + BUILD FIX: testapi should link to Foundation, not CoreFoundation + + * JavaScriptCore.xcodeproj/project.pbxproj: Change testapi to + link to Foundation.framework instead of CoreFoundation.framework + since it uses NS types. + +2013-03-01 Mark Hahnenberg + + Objective-C API: Passing JS functions to Objective-C callbacks causes JSValue to leak + https://bugs.webkit.org/show_bug.cgi?id=107836 + + Reviewed by Oliver Hunt. + + We've decided to remove support for this feature from the API because there's no way to automatically manage + the memory for clients in a satisfactory manner. Clients can still pass JS functions to Objective-C methods, + but the methods must accept plain JSValues instead of Objective-C blocks. + + We now ignore functions that are part of a protocol that inherits from JSExport that accept blocks as arguments. + + * API/JSBlockAdaptor.h: Removed. + * API/JSBlockAdaptor.mm: Removed. + * API/ObjCCallbackFunction.mm: + (ArgumentTypeDelegate::typeBlock): Return nil to signal that we want to ignore this function when copying it + to the object from the protocol. + * API/tests/testapi.mm: Added a test to make sure that we ignore methods declared as part of a JSExport-ed protocol + that have block arguments. + (-[TestObject bogusCallback:]): + * JavaScriptCore.gypi: Updated build files. + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-03-01 Filip Pizlo + + DFG Branch(LogicalNot) peephole should not try to optimize and work-around the case where LogicalNot may be otherwise live + https://bugs.webkit.org/show_bug.cgi?id=111209 + + Reviewed by Oliver Hunt. + + Even if it is then everything will work just fine. It's not necessary to check the ref count here. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + +2013-03-01 Filip Pizlo + + DFG CSE phase shouldn't rely on ref count of nodes, since it doesn't have to + https://bugs.webkit.org/show_bug.cgi?id=111205 + + Reviewed by Oliver Hunt. + + I don't understand the intuition behind setLocalStoreElimination() validating that the SetLocal's ref count + is 1. I believe this is a hold-over from when setLocalStoreElimination() would match one SetLocal to another, + and then try to eliminate the first SetLocal. But that's not how it works now. Now, setLocalStoreElimination() + is actually Flush elimination: it eliminates any Flush that anchors a SetLocal if it proves that every path + from the SetLocal to the Flush is devoid of operations that may observe the local. It doesn't actually kill + the SetLocal itself: if the SetLocal is live because of other things (other Flushes or GetLocals in other + basic blocks), then the SetLocal will naturally still be alive because th Flush was only keeping the SetLocal + alive by one count rather than being solely responsible for its liveness. + + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::setLocalStoreElimination): + (JSC::DFG::CSEPhase::eliminate): + (JSC::DFG::CSEPhase::performNodeCSE): + +2013-03-01 Filip Pizlo + + Rename MovHint to MovHintEvent so I can create a NodeType called MovHint + + Rubber stamped by Mark Hahnenberg. + + This is similar to the SetLocal/SetLocalEvent naming scheme, where SetLocal is the + NodeType and SetLocalEvent is the VariableEventKind. + + * dfg/DFGVariableEvent.cpp: + (JSC::DFG::VariableEvent::dump): + * dfg/DFGVariableEvent.h: + (JSC::DFG::VariableEvent::movHint): + (JSC::DFG::VariableEvent::id): + (JSC::DFG::VariableEvent::operand): + (VariableEvent): + * dfg/DFGVariableEventStream.cpp: + (JSC::DFG::VariableEventStream::reconstruct): + +2013-03-01 Raphael Kubo da Costa + + [JSC] Fix sign comparison warning/error after r144340. + https://bugs.webkit.org/show_bug.cgi?id=111164 + + Reviewed by Mark Hahnenberg. + + gcc (both 4.2.1 and 4.7.2) complain about comparing signed and + unsigned terms (clang accepts it just fine). + + Work around that by casting the 1 to an uintptr_t as well. + + * dfg/DFGEdge.h: + (JSC::DFG::Edge::makeWord): + +2013-02-28 Filip Pizlo + + DFG CFA should not do liveness pruning + https://bugs.webkit.org/show_bug.cgi?id=111119 + + Reviewed by Mark Hahnenberg. + + It adds complexity and probably buys nothing. Moreover, I'm transitioning to having + liveness only available at the bitter end of compilation, so this will stop working + after https://bugs.webkit.org/show_bug.cgi?id=109389 anyway. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::initialize): + (JSC::DFG::AbstractState::mergeStateAtTail): + +2013-02-28 Filip Pizlo + + Don't try to emit profiling if you don't have the DFG JIT. + + Rubber stamped by Mark Hahnenberg. + + * jit/JIT.h: + (JSC::JIT::shouldEmitProfiling): + +2013-02-28 Filip Pizlo + + DFG Phantom node should be honest about the fact that it can exit + https://bugs.webkit.org/show_bug.cgi?id=111115 + + Reviewed by Mark Hahnenberg. + + The chances of this having cause serious issues are low, since most clients of the + NodeDoesNotExit flag run after CFA and CFA updates this properly. But one possible + case of badness is if the ByteCodeParser inserted a Phantom with a type check in + between a LogicalNot and a Branch; then that peephole optimization in Fixup might + go slightly wrong. + + * dfg/DFGNodeType.h: + (DFG): + +2013-02-28 Mark Hahnenberg + + Add casts in DFGGPRInfo.h to suppress warnings + https://bugs.webkit.org/show_bug.cgi?id=111104 + + Reviewed by Filip Pizlo. + + With certain flags on, we get compiler warnings on ARM. We should do the proper casts to make these warnings go away. + + * dfg/DFGGPRInfo.h: + (JSC::DFG::GPRInfo::toIndex): + (JSC::DFG::GPRInfo::debugName): + +2013-02-28 Filip Pizlo + + It should be easy to determine if a DFG node exits forward or backward when doing type checks + https://bugs.webkit.org/show_bug.cgi?id=111102 + + Reviewed by Mark Hahnenberg. + + This adds a NodeExitsForward flag, which tells you the exit directionality of + type checks performed by the node. Even if you convert the node to a Phantom + and use the Edge UseKind for type checks, you'll still get the same exit + directionality that the original node would have wanted. + + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + * dfg/DFGArrayifySlowPathGenerator.h: + (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + * dfg/DFGCPSRethreadingPhase.cpp: + (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::setReplacement): + (JSC::DFG::CSEPhase::eliminate): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::checkArray): + * dfg/DFGNode.h: + (Node): + (JSC::DFG::Node::setOpAndDefaultNonExitFlags): + (JSC::DFG::Node::convertToPhantom): + * dfg/DFGNodeFlags.cpp: + (JSC::DFG::nodeFlagsAsString): + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::backwardSpeculationCheck): + (DFG): + (JSC::DFG::SpeculativeJIT::speculationCheck): + (JSC::DFG::SpeculativeJIT::speculationWatchpoint): + (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck): + (JSC::DFG::SpeculativeJIT::backwardTypeCheck): + (JSC::DFG::SpeculativeJIT::typeCheck): + (JSC::DFG::SpeculativeJIT::forwardTypeCheck): + (JSC::DFG::SpeculativeJIT::fillStorage): + (JSC::DFG::SpeculativeJIT::compile): + (JSC::DFG::SpeculativeJIT::checkArgumentTypes): + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand): + (JSC::DFG::SpeculateIntegerOperand::gpr): + (SpeculateIntegerOperand): + (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand): + (JSC::DFG::SpeculateDoubleOperand::fpr): + (SpeculateDoubleOperand): + (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand): + (JSC::DFG::SpeculateCellOperand::gpr): + (SpeculateCellOperand): + (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand): + (JSC::DFG::SpeculateBooleanOperand::gpr): + (SpeculateBooleanOperand): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-28 Filip Pizlo + + CodeBlock::valueProfile() has a bogus assertion + https://bugs.webkit.org/show_bug.cgi?id=111106 + + + Reviewed by Mark Hahnenberg. + + This was just a bad assertion: m_bytecodeOffset == -1 means that the value profile is constructed but not initialized. + ValueProfile constructs itself in a safe way; you can call any method you want on a constructed but not initialized + ValueProfile. CodeBlock first constructs all ValueProfiles (by growing the ValueProfile vector) and then initializes + their m_bytecodeOffset later. This is necessary because the initialization is linking bytecode instructions to their + ValueProfiles, so at that point we don't want the ValueProfile vector to resize, which implies that we want all of + them to already be constructed. A GC can happen during this phase, and the GC may want to walk all ValueProfiles. + This is safe, but one of the ValueProfile getters (CodeBlock::valueProfile()) was asserting that any value profile + you get has had its m_bytecodeOffset initialized. This need not be the case and nothing will go wrong if it isn't. + + The solution is to remove the assertion, which I believe was put there to ensure that my m_valueProfiles refactoring + a long time ago was sound: it used to be that a ValueProfile with m_bytecodeOffset == -1 was an argument profile; now + all argument profiles are in m_argumentValueProfiles instead. I think it's safe to say that this refactoring was done + soundly since it was a long time ago. So we should kill the assertion - I don't see an easy way to make the assertion + sound with respect to the GC-during-CodeBlock-construction issue, and I don't believe that the assertion is buying us + anything at this point. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::valueProfile): + +2013-02-27 Filip Pizlo + + DFG CFA should leave behind information in Edge that says if the Edge's type check is proven to succeed + https://bugs.webkit.org/show_bug.cgi?id=110840 + + Reviewed by Mark Hahnenberg. + + This doesn't add any observable functionality to the compiler, yet. But it does give + every phase that runs after CFA the ability to know, in O(1) time, whether an edge + will need to execute a type check. + + * dfg/DFGAbstractState.h: + (JSC::DFG::AbstractState::filterEdgeByUse): + (JSC::DFG::AbstractState::filterByType): + * dfg/DFGCommon.cpp: + (WTF): + (WTF::printInternal): + * dfg/DFGCommon.h: + (JSC::DFG::isProved): + (DFG): + (JSC::DFG::proofStatusForIsProved): + (WTF): + * dfg/DFGEdge.cpp: + (JSC::DFG::Edge::dump): + * dfg/DFGEdge.h: + (JSC::DFG::Edge::Edge): + (JSC::DFG::Edge::setNode): + (JSC::DFG::Edge::useKindUnchecked): + (JSC::DFG::Edge::setUseKind): + (Edge): + (JSC::DFG::Edge::proofStatusUnchecked): + (JSC::DFG::Edge::proofStatus): + (JSC::DFG::Edge::setProofStatus): + (JSC::DFG::Edge::isProved): + (JSC::DFG::Edge::needsCheck): + (JSC::DFG::Edge::shift): + (JSC::DFG::Edge::makeWord): + +2013-02-28 Simon Hausmann + + [Qt][Mac] Fix massive parallel builds + + Reviewed by Tor Arne Vestbø. + + There exists a race condition that LLIntDesiredOffsets.h is written to + by two parllel instances of the ruby script. This patch ensures that similar to the output file, + the generated file is also prefixed according to the build configuration. + + * LLIntOffsetsExtractor.pro: + +2013-02-27 Sheriff Bot + + Unreviewed, rolling out r144168. + http://trac.webkit.org/changeset/144168 + https://bugs.webkit.org/show_bug.cgi?id=111019 + + It broke the build and tronical is unavailable (Requested by + Ossy_night on #webkit). + + * LLIntOffsetsExtractor.pro: + +2013-02-26 Filip Pizlo + + Disable some unsound DFG DCE + https://bugs.webkit.org/show_bug.cgi?id=110948 + + Reviewed by Michael Saboff. + + DCE of bitops is not sound since the bitops might call some variant of valueOf. + + This used to work right because ValueToInt32 was MustGenerate. From the DFG IR + standpoint it feels weird to make ValueToInt32 be MustGenerate since that node is + implemented entirely as a pure conversion. If we ever gave the DFG the ability to + do effectful bitops, we would most likely implement them as special nodes not + related to the ValueToInt32 and bitop nodes we have now. + + This change is performance neutral. + + * dfg/DFGNodeType.h: + (DFG): + +2013-02-27 Glenn Adams + + Add ENABLE_CSS3_TEXT_LINE_BREAK flag. + https://bugs.webkit.org/show_bug.cgi?id=110944 + + Reviewed by Dean Jackson. + + * Configurations/FeatureDefines.xcconfig: + +2013-02-27 Julien Brianceau + + Fix build when DFG_JIT is not enabled + https://bugs.webkit.org/show_bug.cgi?id=110991 + + Reviewed by Csaba Osztrogonác. + + * jit/JIT.h: + (JSC::JIT::canBeOptimizedOrInlined): + +2013-02-27 Simon Hausmann + + [Qt][Mac] Fix massive parallel builds + + Reviewed by Tor Arne Vestbø. + + There exists a race condition that LLIntDesiredOffsets.h is written to + by two parllel instances of the ruby script. This patch ensures that similar to the output file, + the generated file is also prefixed according to the build configuration. + + * LLIntOffsetsExtractor.pro: + +2013-02-26 Filip Pizlo + + DFG OSR exit doesn't know which virtual register to use for the last result register for post_inc and post_dec + https://bugs.webkit.org/show_bug.cgi?id=109036 + + + Reviewed by Gavin Barraclough. + + This was a two-fold problem: + + 1) post_inc/dec has two results - the new value of the variable, and the old value of the variable. DFG OSR exit + assumed that the "last result" used for the Baseline JIT's register allocation would be the new value. It was + wrong in this assumption. + + 2) The Baseline JIT knew to disable its last result optimization in cases where it might confuse the DFG. But it + was doing this only for code blocks that could be totally optimized, but not code blocks that could only be + optimized when inlined. + + This patch introduces a more rigorous notion of when the Baseline JIT emits profiling, when it does extra work + to account for the possibility of OSR exit, and when it does extra work to account for the possibility of OSR + entry. These notions are called shouldEmitProfiling(), canBeOptimizedOrInlined(), and canBeOptimized(), + respectively. + + This is performance-neutral and fixes the reported bug. It probably fixes other bugs as well, since previously + we for example weren't doing the more conservative implementation of op_mov in the Baseline JIT for code blocks + that could be inlined but not optimized. So, if such a code block OSR exited at just the right point, you'd get + symptoms similar to this bug. + + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + * dfg/DFGCommon.h: + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::JIT::compilePatchGetArrayLength): + (JSC::JIT::canBeOptimizedOrInlined): + (JIT): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + * jit/JITCall.cpp: + (JSC::JIT::emit_op_call_put_result): + (JSC::JIT::compileOpCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCall): + * jit/JITInlines.h: + (JSC::JIT::emitArrayProfilingSite): + (JSC::JIT::map): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_mov): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::privateCompilePutByIdTransition): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::privateCompilePutByIdTransition): + +2013-02-26 Roger Fong + + Unreviewed. AppleWin VS2010 build fix. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-02-25 Filip Pizlo + + The DFG backend's and OSR's decision to unbox a variable should be based on whether it's used in a typed context + https://bugs.webkit.org/show_bug.cgi?id=110433 + + Reviewed by Oliver Hunt and Mark Hahnenberg. + + This introduces the equivalent of a liveness analysis, except for type checking. + A variable is said to be "profitable for unboxing" (i.e. live at a type check) + if there exists a type check on a GetLocal of that variable, and the type check + is consistent with the variable's prediction. Variables that are not profitable + for unboxing aren't unboxed. Previously they would have been. + + This is a slight speed-up on some things but mostly neutral. + + * dfg/DFGArgumentPosition.h: + (JSC::DFG::ArgumentPosition::ArgumentPosition): + (JSC::DFG::ArgumentPosition::mergeShouldNeverUnbox): + (JSC::DFG::ArgumentPosition::mergeArgumentPredictionAwareness): + (JSC::DFG::ArgumentPosition::mergeArgumentUnboxingAwareness): + (ArgumentPosition): + (JSC::DFG::ArgumentPosition::isProfitableToUnbox): + (JSC::DFG::ArgumentPosition::shouldUseDoubleFormat): + * dfg/DFGCommon.h: + (JSC::DFG::checkAndSet): + (DFG): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::run): + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::fixupSetLocalsInBlock): + (FixupPhase): + (JSC::DFG::FixupPhase::alwaysUnboxSimplePrimitives): + (JSC::DFG::FixupPhase::setUseKindAndUnboxIfProfitable): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::checkArgumentTypes): + * dfg/DFGVariableAccessData.h: + (JSC::DFG::VariableAccessData::VariableAccessData): + (JSC::DFG::VariableAccessData::mergeIsCaptured): + (JSC::DFG::VariableAccessData::mergeIsProfitableToUnbox): + (VariableAccessData): + (JSC::DFG::VariableAccessData::isProfitableToUnbox): + (JSC::DFG::VariableAccessData::shouldUnboxIfPossible): + (JSC::DFG::VariableAccessData::mergeStructureCheckHoistingFailed): + (JSC::DFG::VariableAccessData::mergeIsArgumentsAlias): + (JSC::DFG::VariableAccessData::shouldUseDoubleFormat): + (JSC::DFG::VariableAccessData::mergeFlags): + +2013-02-26 Oliver Hunt + + Fix windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-02-26 Oliver Hunt + + Web Inspector: REGRESSION: [JSC] SourceProvider reuses IDs + https://bugs.webkit.org/show_bug.cgi?id=99674 + + Reviewed by Gavin Barraclough. + + Simple incrementing counter for SourceProvider IDs. Uses a + lock to incrementing the counter so we don't increment reuse + counter values or reassign the ID for a given SourceProvider. + + * parser/SourceProvider.cpp: + (JSC::SourceProvider::SourceProvider): + (JSC): + (JSC::SourceProvider::getID): + * parser/SourceProvider.h: + (JSC::SourceProvider::asID): + (SourceProvider): + +2013-02-26 Sheriff Bot + + Unreviewed, rolling out r144074. + http://trac.webkit.org/changeset/144074 + https://bugs.webkit.org/show_bug.cgi?id=110897 + + Causing 20+ crashes on Mac (Requested by bradee-oh on + #webkit). + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::PropertyTable): + (JSC): + (JSC::PropertyTable::~PropertyTable): + (JSC::PropertyTable::copy): + * runtime/PropertyTable.cpp: Removed. + * runtime/Structure.cpp: + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::putSpecificValue): + (JSC::Structure::createPropertyMap): + (JSC::Structure::visitChildren): + * runtime/Structure.h: + (JSC): + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::checkOffsetConsistency): + (Structure): + * runtime/StructureInlines.h: + +2013-02-26 Roger Fong + + Unreviewed. AppleWin VS2010 build fix. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: + +2013-02-26 Jer Noble + + Unreviewed build fix; use correct macro for platform name in FeatureDefines.xcconfig. + + * Configurations/FeatureDefines.xcconfig: + +2013-02-26 Michael Saboff + + Potential crash in YARR JIT generated code when building 64 bit + https://bugs.webkit.org/show_bug.cgi?id=110893 + + Reviewed by Gavin Barraclough. + + The ABI doesn't define the behavior for the upper bits of a value that takes less than 64 bits. + Therefore, we zero extend both the count and length registers to assure that these unsigned values + don't have garbage upper bits. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::generateEnter): + +2013-02-26 Andreas Kling + + Unused Structure property tables waste 14MB on Membuster. + + + + Reviewed by Filip Pizlo. + + Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking. + 14 MB progression on Membuster3. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + + Added PropertyTable.cpp. + + * runtime/PropertyTable.cpp: Added. + (JSC::PropertyTable::create): + (JSC::PropertyTable::clone): + (JSC::PropertyTable::PropertyTable): + (JSC::PropertyTable::destroy): + (JSC::PropertyTable::~PropertyTable): + (JSC::PropertyTable::visitChildren): + + Moved marking of property table values here from Structure::visitChildren(). + + * runtime/StructureInlines.h: + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::checkOffsetConsistency): + + Moved these to StructureInlines.h to break header dependency cycle between Structure/PropertyTable. + + * runtime/Structure.cpp: + (JSC::Structure::visitChildren): + + Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd. + + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::putSpecificValue): + (JSC::Structure::createPropertyMap): + * runtime/Structure.h: + (Structure): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::createStructure): + (JSC::PropertyTable::copy): + +2013-02-26 Andreas Kling + + Unreviewed, rolling out r144054. + http://trac.webkit.org/changeset/144054 + https://bugs.webkit.org/show_bug.cgi?id=110854 + + broke builds + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::PropertyTable): + (JSC): + (JSC::PropertyTable::~PropertyTable): + (JSC::PropertyTable::copy): + * runtime/PropertyTable.cpp: Removed. + * runtime/Structure.cpp: + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::putSpecificValue): + (JSC::Structure::createPropertyMap): + (JSC::Structure::visitChildren): + * runtime/Structure.h: + (JSC): + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::checkOffsetConsistency): + (Structure): + * runtime/StructureInlines.h: + +2013-02-26 Andreas Kling + + Unused Structure property tables waste 14MB on Membuster. + + + + Reviewed by Filip Pizlo. + + Turn PropertyTable into a GC object and have Structure drop unpinned tables when marking. + 14 MB progression on Membuster3. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + + Added PropertyTable.cpp. + + * runtime/PropertyTable.cpp: Added. + (JSC::PropertyTable::create): + (JSC::PropertyTable::clone): + (JSC::PropertyTable::PropertyTable): + (JSC::PropertyTable::destroy): + (JSC::PropertyTable::~PropertyTable): + (JSC::PropertyTable::visitChildren): + + Moved marking of property table values here from Structure::visitChildren(). + + * runtime/StructureInlines.h: + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::checkOffsetConsistency): + + Moved these to StructureInlines.h to break header dependency cycle between Structure/PropertyTable. + + * runtime/Structure.cpp: + (JSC::Structure::visitChildren): + + Null out m_propertyTable if the table is unpinned. This'll cause the table to get GC'd. + + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::copyPropertyTableForPinning): + (JSC::Structure::putSpecificValue): + (JSC::Structure::createPropertyMap): + * runtime/Structure.h: + (Structure): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::createStructure): + (JSC::PropertyTable::copy): + +2013-02-26 Jocelyn Turcotte + + Implement JIT on Windows 64 bits + https://bugs.webkit.org/show_bug.cgi?id=107965 + + Reviewed by Simon Hausmann. + + 1. MSVC doesn't support inline assembly for 64 bits, implements the trampoline in a separate ASM file. + + 2. Windows 64 bits has a different calling convention than other OSes following the AMD64 ABI. + Differences that we have to handle here: + - Registers passed parameters are RCX, RDX, R8 and R9 instead of RDI, RSI, RDX, RCX, R8 and R9 + - RDI and RSI must be preserved by callee + - Only return values <= 8 bytes can be returned by register (RDX can't be used to return a second word) + - There is no red-zone after RIP on the stack, but instead 4 reserved words before it + + * Target.pri: + * jit/JITStubs.cpp: + * jit/JITStubs.h: + (JSC): + (JITStackFrame): + (JSC::JITStackFrame::returnAddressSlot): + * jit/JITStubsMSVC64.asm: Added. + * jit/JSInterfaceJIT.h: + (JSInterfaceJIT): + * jit/ThunkGenerators.cpp: + (JSC::nativeForGenerator): + * yarr/YarrJIT.cpp: + (YarrGenerator): + (JSC::Yarr::YarrGenerator::generateEnter): + (JSC::Yarr::YarrGenerator::generateReturn): + +2013-02-26 Oliver Hunt + + Kill another analyzer warning in javascriptcore + https://bugs.webkit.org/show_bug.cgi?id=110802 + + Reviewed by Benjamin Poulain. + + Add null checks. + + * profiler/LegacyProfiler.cpp: + (JSC::LegacyProfiler::startProfiling): + (JSC::LegacyProfiler::stopProfiling): + +2013-02-26 Sheriff Bot + + Unreviewed, rolling out r144004. + http://trac.webkit.org/changeset/144004 + https://bugs.webkit.org/show_bug.cgi?id=110858 + + This iOS change is outdated (Requested by notbenjamin on + #webkit). + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + (JSC::BytecodeGenerator::emitNodeInConditionContext): + (BytecodeGenerator): + * parser/Parser.cpp: + (JSC::::Parser): + * parser/Parser.h: + (JSC::Parser::canRecurse): + (Parser): + +2013-02-25 Filip Pizlo + + REGRESSION(r143654): some jquery test asserts on 32 bit debug build + https://bugs.webkit.org/show_bug.cgi?id=110756 + + Reviewed by Geoffrey Garen. + + TypeOf does speculations manually, so it should mark its JSValueOperand as doing ManualOperandSpeculation. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-25 Benjamin Poulain + + [JSC] Upstream iOS Stack bound checking + https://bugs.webkit.org/show_bug.cgi?id=110813 + + Reviewed by Filip Pizlo. + + On iOS, the StackBounds cannot be cached because the stack + can be in one of two threads (the web thread or the UI thread). + + We simply always consider the current stack bound when testing + stack boundaries. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + (JSC::BytecodeGenerator::emitNodeInConditionContext): + (BytecodeGenerator): + * parser/Parser.cpp: + (JSC::::Parser): + * parser/Parser.h: + (JSC::Parser::canRecurse): + (Parser): + +2013-02-25 Michael Saboff + + For JSVALUE32_64, maxOffsetRelativeToPatchedStorage() doesn't compute the maximum negative offset + https://bugs.webkit.org/show_bug.cgi?id=110828 + + Reviewed by Oliver Hunt. + + * runtime/JSObject.h: + (JSC::maxOffsetRelativeToPatchedStorage): Only add the OBJECT_OFFSETOF(tag) for positive offsets. + That way this function will return the offset farthest from 0 needed to access either the payload + or tag. + +2013-02-25 Jeffrey Pfau + + Optionally partition cache to prevent using cache for tracking + https://bugs.webkit.org/show_bug.cgi?id=110269 + + Reviewed by Maciej Stachowiak. + + * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage + +2013-02-25 Roger Fong + + Unreviewed. VS2010 solution build fix. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: + +2013-02-24 Filip Pizlo + + DFG::Edge should have more bits for UseKind, and DFG::Allocator should be simpler + https://bugs.webkit.org/show_bug.cgi?id=110722 + + Reviewed by Oliver Hunt. + + This rolls out the DFG::Allocator part of http://trac.webkit.org/changeset/143654, + and changes Edge to have more room for UseKinds and possibly other things. + + This is performance-neutral on both 32-bit and 64-bit. It reduces the size of + DFG::Node on 64-bit (by virtue of getting rid of the 16-byte alignment of Node) + and increases it slightly on 32-bit (by 4 bytes total - 16-byte alignment led to + 80 bytes, but the base size of Node plus the 12 bytes of new m_encodedWords in + Edge gets 84 bytes). But, it will mean that we don't have to increase Node by + another 16 bytes if we ever want to add more UseKinds or other things to Edge. + + * dfg/DFGAllocator.h: + (DFG): + (Allocator): + (JSC::DFG::Allocator::Region::headerSize): + (JSC::DFG::Allocator::Region::numberOfThingsPerRegion): + (JSC::DFG::Allocator::Region::data): + (JSC::DFG::Allocator::Region::isInThisRegion): + (JSC::DFG::::Allocator): + (JSC::DFG::::~Allocator): + (JSC::DFG::::allocate): + (JSC::DFG::::free): + (JSC::DFG::::freeAll): + (JSC::DFG::::reset): + (JSC::DFG::::indexOf): + (JSC::DFG::::allocatorOf): + (JSC::DFG::::bumpAllocate): + (JSC::DFG::::freeListAllocate): + (JSC::DFG::::allocateSlow): + (JSC::DFG::::freeRegionsStartingAt): + (JSC::DFG::::startBumpingIn): + * dfg/DFGEdge.h: + (JSC::DFG::Edge::Edge): + (Edge): + (JSC::DFG::Edge::node): + (JSC::DFG::Edge::setNode): + (JSC::DFG::Edge::useKindUnchecked): + (JSC::DFG::Edge::setUseKind): + (JSC::DFG::Edge::operator==): + (JSC::DFG::Edge::operator!=): + (JSC::DFG::Edge::makeWord): + * dfg/DFGNodeAllocator.h: + (DFG): + +2013-02-22 Filip Pizlo + + The DFG special case checks for isCreatedThisArgument are fragile + https://bugs.webkit.org/show_bug.cgi?id=110535 + + Reviewed by Oliver Hunt. + + There may be many situations in which we want to force a variable to never be + unboxed. Capturing is one such case, and the created this argument is another. + Previously all code that dealt with this issue had to query both scenarios. + + Now DFG::VariableAccessData knows these things. You just have to ask + VariableAccessData for whether a variable should be unboxed. Anyone wishing to + force a variable to never be unboxed just tells VariableAccessData. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::initialize): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + (DFG): + * dfg/DFGCFGSimplificationPhase.cpp: + (CFGSimplificationPhase): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGGraph.h: + (Graph): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGUnificationPhase.cpp: + (JSC::DFG::UnificationPhase::run): + * dfg/DFGVariableAccessData.h: + (JSC::DFG::VariableAccessData::VariableAccessData): + (JSC::DFG::VariableAccessData::mergeIsCaptured): + (JSC::DFG::VariableAccessData::mergeShouldNeverUnbox): + (VariableAccessData): + (JSC::DFG::VariableAccessData::shouldNeverUnbox): + (JSC::DFG::VariableAccessData::shouldUnboxIfPossible): + (JSC::DFG::VariableAccessData::shouldUseDoubleFormat): + (JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat): + +2013-02-25 Geoffrey Garen + + Do one lookup per code cache insertion instead of two + https://bugs.webkit.org/show_bug.cgi?id=110674 + + Reviewed by Sam Weinig. + + Deployed the idiomatic "add null value" trick to avoid a second hash + lookup when inserting an item. + + * runtime/CodeCache.cpp: + (JSC::CodeCacheMap::pruneSlowCase): Factored this into a helper function + to improve clarity and get some code off the hot path. + + (JSC::CodeCache::getCodeBlock): + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): Use the add() API + to avoid two hash lookups. Be sure to remove items if parsing fails, + otherwise we'll leave nulls in the table. (I'm guessing that caching parse + errors is not a win.) + + * runtime/CodeCache.h: + (JSC::SourceCodeValue::SourceCodeValue): + (CodeCacheMap): + (JSC::CodeCacheMap::add): Combined find() and set() into add(). + + (JSC::CodeCacheMap::remove): + (JSC::CodeCacheMap::age): + (JSC::CodeCacheMap::prune): Refactored to support above changes. + +2013-02-25 Carlos Garcia Campos + + [BlackBerry][ARM] Fix cast-align warnings in JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=110738 + + Reviewed by Rob Buis. + + Use reinterpret_cast_ptr instead of reinterpret_cast for + pointers. + + * dfg/DFGOperations.cpp: + * heap/CopiedBlock.h: + (JSC::CopiedBlock::zeroFillWilderness): + * heap/WeakBlock.h: + (JSC::WeakBlock::asWeakImpl): + (JSC::WeakBlock::asFreeCell): + (JSC::WeakBlock::weakImpls): + * heap/WeakImpl.h: + (JSC::WeakImpl::asWeakImpl): + * interpreter/JSStack.cpp: + (JSC::JSStack::disableErrorStackReserve): + * interpreter/JSStack.h: + (JSC::JSStack::reservationEnd): + * runtime/ArrayStorage.h: + (JSC::ArrayStorage::from): + * runtime/Butterfly.h: + (JSC::Butterfly::indexingPayload): + * runtime/IndexingHeader.h: + (JSC::IndexingHeader::propertyStorage): + * runtime/JSActivation.h: + (JSC::JSActivation::tearOff): + (JSC::JSActivation::isTornOff): + (JSC::JSActivation::storage): + +2013-02-22 Filip Pizlo + + DFG::SpeculativeJIT::speculateNumber() should just use SpeculateDoubleOperand instead of doing its own thing + https://bugs.webkit.org/show_bug.cgi?id=110659 + + Reviewed by Oliver Hunt and Mark Hahnenberg. + + This simplifies the code, and also has the effect that if speculateNumber() is called + prior to someone actually using the number in a double context, then the number will + already be up-converted to double and ready to go. + + Previously if this ever came up, the subsequent use would have to again branch to see + if the value is tagged as int or tagged as double. + + On the other hand, if you ever did speculateNumber() and then used the value as a + JSValue, this will be a slow down now. + + I suspect that the former (speculateNumber() and then use as number) is more likely + than the latter (speculateNumber() and then use as JSValue). + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::speculateNumber): + +2013-02-22 Filip Pizlo + + DFG FixupPhase should have one common hook for knowing if a node is ever being speculated a certain way + https://bugs.webkit.org/show_bug.cgi?id=110650 + + Reviewed by Mark Hahnenberg. + + Changes almost all calls to edge.setUseKind(kind) to be + setUseKindAndUnboxIfProfitable(edge). This will allow us to use the latter + as a hook for deciding which locals to unbox (webkit.org/b/110433). + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (FixupPhase): + (JSC::DFG::FixupPhase::setUseKindAndUnboxIfProfitable): + (JSC::DFG::FixupPhase::fixIntEdge): + (JSC::DFG::FixupPhase::fixDoubleEdge): + (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd): + +2013-02-22 Filip Pizlo + + REGRESSION(r143654): some fast/js test crashes on 32 bit build + https://bugs.webkit.org/show_bug.cgi?id=110590 + + Reviewed by Mark Hahnenberg. + + In compileValueToInt32, the refactoring in r143654 undid one of the fixes from + r143314 due to a merge goof. + + In speculateNumber, we were simply forgetting to indicate that we need a + ManualOperandSpeculation on a JSValueOperand. ManualOperandSpeculation should + be passed whenever you will be performing the type checks yourself rather than + using the operand class to do it for you. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + (JSC::DFG::SpeculativeJIT::speculateNumber): + +2013-02-22 Geoffrey Garen + + Not reviewed. + + Fix the 32-bit build by using the right data type in more places. + + * runtime/CodeCache.h: + (CodeCacheMap): + +2013-02-22 Geoffrey Garen + + Not reviewed. + + Fix the 32-bit build by using the right data type. + + * runtime/CodeCache.h: + (JSC::CodeCacheMap::find): + +2013-02-21 Geoffrey Garen + + Code cache size should adapt to workload + https://bugs.webkit.org/show_bug.cgi?id=110560 + + Reviewed by Antti Koivisto. + + (*) 5% PLT arithmetic mean speedup + (*) 10% PLT geometric mean speedup + (*) 3.4X microbenchmark speedup + (*) Reduces initial cache capacity by 16X + + * runtime/CodeCache.cpp: + (JSC::CodeCache::CodeCache): Updated for interface change. + + * runtime/CodeCache.h: + (JSC::SourceCodeValue::SourceCodeValue): + (SourceCodeValue): Turned the cache value into a struct so it can track its age. + + (CodeCacheMap): + (JSC::CodeCacheMap::CodeCacheMap): + (JSC::CodeCacheMap::find): + (JSC::CodeCacheMap::set): + (JSC::CodeCacheMap::clear): + (JSC::CodeCacheMap::pruneIfNeeded): + (CodeCache): Grow and shrink in response to usage. + +2013-02-21 Jessie Berlin + + Fix a typo that broke the 32 bit build. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-21 Michael Saboff + + 25-30% regression in V8 RayTrace test in 32 bit builds with JIT disabled + https://bugs.webkit.org/show_bug.cgi?id=110539 + + Reviewed by Filip Pizlo. + + Change the scale used to lookup pointers in JSGlobalObject::m_specialPointers to be 4 bytes for + the 32 bit version of the interpreter. + + * llint/LowLevelInterpreter32_64.asm: + +2013-02-21 Roger Fong + + Unreviewed. Add executable property to cmd file. + Required for executable files to maintain their executable permissions over svn. + + * JavaScriptCore.vcxproj/copy-files.cmd: Added property svn:executable. + +2013-02-21 Filip Pizlo + + Object allocation profiling will refuse to create objects with more than JSFinalObject::maxInlineCapacity() inline slots, but JSFunction::allocationProfile() asserts that the number of inline slots is always what it asked for + https://bugs.webkit.org/show_bug.cgi?id=110519 + + + Reviewed by Geoffrey Garen. + + * runtime/JSFunction.h: + (JSC::JSFunction::allocationProfile): + +2013-02-21 Roger Fong + + Unreviewed. Build fix for VS2010 WebKit solution. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-02-20 Filip Pizlo + + DFG should not change its mind about what type speculations a node does, by encoding the checks in the NodeType, UseKind, and ArrayMode + https://bugs.webkit.org/show_bug.cgi?id=109371 + + Reviewed by Oliver Hunt. + + FixupPhase now locks in the speculations that each node will do. The DFG then + remembers those speculations, and doesn't change its mind about them even if the + graph is transformed - for example if a node's child is repointed to a different + node as part of CSE, CFG simplification, or folding. Each node ensures that it + executes the speculations promised by its edges. This is true even for Phantom + nodes. + + This still leaves some craziness on the table for future work, like the + elimination of speculating SetLocal's due to CFG simplification + (webkit.org/b/109388) and elimination of nodes via DCE (webkit.org/b/109389). + + In all, this allows for a huge simplification of the DFG. Instead of having to + execute the right speculation heuristic each time you want to decide what a node + does (for example Node::shouldSpeculateInteger(child1, child2) && + node->canSpeculateInteger()), you just ask for the use kinds of its children + (typically node->binaryUseKind() == Int32Use). Because the use kinds are + discrete, you can often just switch over them. This makes many parts of the code + more clear than they were before. + + Having UseKinds describe the speculations being performed also makes it far + easier to perform analyses that need to know what speculations are done. This is + so far only used to simplify large parts of the CFA. + + To have a larger vocabulary of UseKinds, this also changes the node allocator to + be able to round up Node sizes to the nearest multiple of 16. + + This appears to be neutral on benchmarks, except for some goofy speed-ups, like + 8% on Octane/box2d. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::startExecuting): + (DFG): + (JSC::DFG::AbstractState::executeEdges): + (JSC::DFG::AbstractState::verifyEdge): + (JSC::DFG::AbstractState::verifyEdges): + (JSC::DFG::AbstractState::executeEffects): + (JSC::DFG::AbstractState::execute): + * dfg/DFGAbstractState.h: + (AbstractState): + (JSC::DFG::AbstractState::filterEdgeByUse): + (JSC::DFG::AbstractState::filterByType): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::filter): + * dfg/DFGAdjacencyList.h: + (JSC::DFG::AdjacencyList::AdjacencyList): + (JSC::DFG::AdjacencyList::child): + (JSC::DFG::AdjacencyList::setChild): + (JSC::DFG::AdjacencyList::reset): + (JSC::DFG::AdjacencyList::firstChild): + (JSC::DFG::AdjacencyList::setFirstChild): + (JSC::DFG::AdjacencyList::numChildren): + (JSC::DFG::AdjacencyList::setNumChildren): + (AdjacencyList): + * dfg/DFGAllocator.h: + (DFG): + (Allocator): + (JSC::DFG::Allocator::cellSize): + (JSC::DFG::Allocator::Region::headerSize): + (JSC::DFG::Allocator::Region::numberOfThingsPerRegion): + (JSC::DFG::Allocator::Region::payloadSize): + (JSC::DFG::Allocator::Region::payloadBegin): + (JSC::DFG::Allocator::Region::payloadEnd): + (JSC::DFG::Allocator::Region::isInThisRegion): + (JSC::DFG::::Allocator): + (JSC::DFG::::~Allocator): + (JSC::DFG::::allocate): + (JSC::DFG::::free): + (JSC::DFG::::freeAll): + (JSC::DFG::::reset): + (JSC::DFG::::indexOf): + (JSC::DFG::::allocatorOf): + (JSC::DFG::::bumpAllocate): + (JSC::DFG::::freeListAllocate): + (JSC::DFG::::allocateSlow): + (JSC::DFG::::freeRegionsStartingAt): + (JSC::DFG::::startBumpingIn): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::addToGraph): + (JSC::DFG::ByteCodeParser::handleMinMax): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::setLocalStoreElimination): + (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren): + (JSC::DFG::CSEPhase::setReplacement): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGCommon.h: + (DFG): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGEdge.cpp: + (JSC::DFG::Edge::dump): + * dfg/DFGEdge.h: + (JSC::DFG::Edge::useKindUnchecked): + (JSC::DFG::Edge::useKind): + (JSC::DFG::Edge::shift): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::run): + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + (JSC::DFG::FixupPhase::fixIntEdge): + (JSC::DFG::FixupPhase::fixDoubleEdge): + (JSC::DFG::FixupPhase::injectInt32ToDoubleNode): + (FixupPhase): + (JSC::DFG::FixupPhase::truncateConstantToInt32): + (JSC::DFG::FixupPhase::truncateConstantsIfNecessary): + (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd): + * dfg/DFGGraph.cpp: + (DFG): + (JSC::DFG::Graph::refChildren): + (JSC::DFG::Graph::derefChildren): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::ref): + (JSC::DFG::Graph::deref): + (JSC::DFG::Graph::performSubstitution): + (JSC::DFG::Graph::isPredictedNumerical): + (JSC::DFG::Graph::addImmediateShouldSpeculateInteger): + (DFG): + * dfg/DFGNode.h: + (JSC::DFG::Node::Node): + (JSC::DFG::Node::convertToGetByOffset): + (JSC::DFG::Node::convertToPutByOffset): + (JSC::DFG::Node::willHaveCodeGenOrOSR): + (JSC::DFG::Node::child1): + (JSC::DFG::Node::child2): + (JSC::DFG::Node::child3): + (JSC::DFG::Node::binaryUseKind): + (Node): + (JSC::DFG::Node::isBinaryUseKind): + * dfg/DFGNodeAllocator.h: + (DFG): + * dfg/DFGNodeFlags.cpp: + (JSC::DFG::nodeFlagsAsString): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::speculationCheck): + (DFG): + (JSC::DFG::SpeculativeJIT::speculationWatchpoint): + (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck): + (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution): + (JSC::DFG::SpeculativeJIT::typeCheck): + (JSC::DFG::SpeculativeJIT::forwardTypeCheck): + (JSC::DFG::SpeculativeJIT::fillStorage): + (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch): + (JSC::DFG::SpeculativeJIT::compile): + (JSC::DFG::SpeculativeJIT::compileDoublePutByVal): + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): + (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray): + (JSC::DFG::SpeculativeJIT::compileInstanceOf): + (JSC::DFG::SpeculativeJIT::compileAdd): + (JSC::DFG::SpeculativeJIT::compileArithSub): + (JSC::DFG::SpeculativeJIT::compileArithNegate): + (JSC::DFG::SpeculativeJIT::compileArithMul): + (JSC::DFG::SpeculativeJIT::compileArithMod): + (JSC::DFG::SpeculativeJIT::compare): + (JSC::DFG::SpeculativeJIT::compileStrictEq): + (JSC::DFG::SpeculativeJIT::speculateInt32): + (JSC::DFG::SpeculativeJIT::speculateNumber): + (JSC::DFG::SpeculativeJIT::speculateRealNumber): + (JSC::DFG::SpeculativeJIT::speculateBoolean): + (JSC::DFG::SpeculativeJIT::speculateCell): + (JSC::DFG::SpeculativeJIT::speculateObject): + (JSC::DFG::SpeculativeJIT::speculateObjectOrOther): + (JSC::DFG::SpeculativeJIT::speculateString): + (JSC::DFG::SpeculativeJIT::speculateNotCell): + (JSC::DFG::SpeculativeJIT::speculateOther): + (JSC::DFG::SpeculativeJIT::speculate): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::valueOfNumberConstant): + (JSC::DFG::SpeculativeJIT::needsTypeCheck): + (JSC::DFG::IntegerOperand::IntegerOperand): + (JSC::DFG::IntegerOperand::edge): + (IntegerOperand): + (JSC::DFG::IntegerOperand::node): + (JSC::DFG::IntegerOperand::gpr): + (JSC::DFG::IntegerOperand::use): + (JSC::DFG::JSValueOperand::JSValueOperand): + (JSValueOperand): + (JSC::DFG::JSValueOperand::edge): + (JSC::DFG::JSValueOperand::node): + (JSC::DFG::JSValueOperand::gpr): + (JSC::DFG::JSValueOperand::fill): + (JSC::DFG::JSValueOperand::use): + (JSC::DFG::StorageOperand::StorageOperand): + (JSC::DFG::StorageOperand::edge): + (StorageOperand): + (JSC::DFG::StorageOperand::node): + (JSC::DFG::StorageOperand::gpr): + (JSC::DFG::StorageOperand::use): + (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand): + (SpeculateIntegerOperand): + (JSC::DFG::SpeculateIntegerOperand::edge): + (JSC::DFG::SpeculateIntegerOperand::node): + (JSC::DFG::SpeculateIntegerOperand::gpr): + (JSC::DFG::SpeculateIntegerOperand::use): + (JSC::DFG::SpeculateStrictInt32Operand::SpeculateStrictInt32Operand): + (SpeculateStrictInt32Operand): + (JSC::DFG::SpeculateStrictInt32Operand::edge): + (JSC::DFG::SpeculateStrictInt32Operand::node): + (JSC::DFG::SpeculateStrictInt32Operand::gpr): + (JSC::DFG::SpeculateStrictInt32Operand::use): + (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand): + (SpeculateDoubleOperand): + (JSC::DFG::SpeculateDoubleOperand::edge): + (JSC::DFG::SpeculateDoubleOperand::node): + (JSC::DFG::SpeculateDoubleOperand::fpr): + (JSC::DFG::SpeculateDoubleOperand::use): + (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand): + (SpeculateCellOperand): + (JSC::DFG::SpeculateCellOperand::edge): + (JSC::DFG::SpeculateCellOperand::node): + (JSC::DFG::SpeculateCellOperand::gpr): + (JSC::DFG::SpeculateCellOperand::use): + (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand): + (JSC::DFG::SpeculateBooleanOperand::edge): + (SpeculateBooleanOperand): + (JSC::DFG::SpeculateBooleanOperand::node): + (JSC::DFG::SpeculateBooleanOperand::gpr): + (JSC::DFG::SpeculateBooleanOperand::use): + (DFG): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * dfg/DFGUseKind.cpp: Added. + (WTF): + (WTF::printInternal): + * dfg/DFGUseKind.h: Added. + (DFG): + (JSC::DFG::typeFilterFor): + (JSC::DFG::isNumerical): + (WTF): + * dfg/DFGValidate.cpp: + (JSC::DFG::Validate::reportValidationContext): + +2013-02-20 Mark Hahnenberg + + Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit + https://bugs.webkit.org/show_bug.cgi?id=106059 + + Reviewed by Geoffrey Garen. + + * API/JSBase.h: Renamed enable flag for API. + * API/JSBlockAdaptor.h: Using new flag. + * API/JSBlockAdaptor.mm: Ditto. + * API/JSContext.h: Add convenience C API conversion function for JSGlobalContextRef. + * API/JSContext.mm: + (-[JSContext JSGlobalContextRef]): Implementation of C API convenience function. + (-[JSContext initWithVirtualMachine:]): We don't use the m_apiData field any more. + (-[JSContext initWithGlobalContextRef:]): init method for allocating new JSContexts given a JSGlobalContextRef. + (-[JSContext dealloc]): No more m_apiData. + (-[JSContext wrapperForObjCObject:]): Renamed wrapperForObject. + (-[JSContext wrapperForJSObject:]): Fetches or allocates the JSValue for the specified JSValueRef in this JSContext. + (+[JSContext contextWithGlobalContextRef:]): Helper function to grab the lightweight JSContext wrapper for a given + JSGlobalContextRef from the global wrapper cache or allocate a new one if there isn't already one. + * API/JSContextInternal.h: New flag, new method declaration for initWithGlobalContextRef. + * API/JSExport.h: New flag. + * API/JSValue.h: New flag and new C API convenience method. + * API/JSValue.mm: + (-[JSValue JSValueRef]): Implementation of the C API convenience method. + (objectToValueWithoutCopy): + (+[JSValue valueWithValue:inContext:]): We now ask the JSContext for an Objective-C JSValue wrapper, which it can cache + in its internal JSWrapperMap. + * API/JSValueInternal.h: + * API/JSVirtualMachine.h: + * API/JSVirtualMachine.mm: Added global cache that maps JSContextGroupRef -> JSVirtualMachine lightweight wrappers. + (wrapperCacheLock): + (initWrapperCache): + (+[JSVMWrapperCache addWrapper:forJSContextGroupRef:]): + (+[JSVMWrapperCache wrapperForJSContextGroupRef:]): + (-[JSVirtualMachine init]): + (-[JSVirtualMachine initWithContextGroupRef:]): + (-[JSVirtualMachine dealloc]): + (+[JSVirtualMachine virtualMachineWithContextGroupRef:]): + (-[JSVirtualMachine contextForGlobalContextRef:]): + (-[JSVirtualMachine addContext:forGlobalContextRef:]): + * API/JSVirtualMachineInternal.h: + * API/JSWrapperMap.h: + * API/JSWrapperMap.mm: + (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): We use the JSObjectSetPrototype C API call because + setting the __proto__ property causes all sorts of bad things to happen behind the scenes, which can cause crashes based on + when it gets called. + (-[JSWrapperMap initWithContext:]): + (-[JSWrapperMap jsWrapperForObject:]): + (-[JSWrapperMap objcWrapperForJSValueRef:]): + * API/JavaScriptCore.h: + * API/ObjCCallbackFunction.h: + * API/ObjCCallbackFunction.mm: + (ObjCCallbackFunction::ObjCCallbackFunction): We never actually should have retained the target in the case that we had a + block as a callback. Blocks are initially allocated on the stack and are only moved to the heap if we call their copy method. + Retaining the block on the stack was a bad idea because if that stack frame ever went away and we called the block later, + we'd crash and burn. + (ObjCCallbackFunction::setContext): We need a new setter for when the weak reference to a JSContext inside an ObjCCallbackFunction + disappears, we can allocate a new one in its place. + (ObjCCallbackFunction): + (objCCallbackFunctionCallAsFunction): Reset the callback's context if it's ever destroyed. + (objCCallbackFunctionForInvocation): Again, don't set the __proto__ property because it uses black magic that can cause us to crash + depending on when this is called. + (objCCallbackFunctionForBlock): Here is where we copy the block to the heap when we're first creating the callback object for it. + * API/tests/testapi.c: + (main): + * API/tests/testapi.mm: We're going to get rid of the automatic block conversion, since that is causing leaks. I changed it + here in this test just so that it wouldn't mask any other potential leaks. Also modified some of the tests since JSContexts are + just lightweight wrappers now, we're not guaranteed to get the same pointer back from the call to [JSValue context] as the one + that the value was created in. + (-[TestObject callback:]): + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): No more m_apiData. + * runtime/JSGlobalData.h: Ditto. + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::JSGlobalObject): Ditto. + * runtime/JSGlobalObject.h: + +2013-02-19 Filip Pizlo + + DFG::SpeculativeJIT::compileInt32ToDouble() has an unnecessary case for constant operands + https://bugs.webkit.org/show_bug.cgi?id=110309 + + Reviewed by Sam Weinig. + + It used to be necessary, back when we didn't have constant folding. Now we have + constant folding. So we don't need it. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): + +2013-02-20 Filip Pizlo + + DFG inlines Resolves that it doesn't know how to handle correctly + https://bugs.webkit.org/show_bug.cgi?id=110405 + + Reviewed by Geoffrey Garen. + + Don't try to be clever: if there's a failing resolve, we can't inline it, period. + + * dfg/DFGCapabilities.h: + (JSC::DFG::canInlineResolveOperations): + (JSC::DFG::canInlineOpcode): + +2013-02-20 Roger Fong + + Get VS2010 Solution B&I ready. + + + Rubberstamped by Timothy Horton. + + Add Production configuration. + Add a JavaScriptCore submit solution with a DebugSuffix configuration. + Modify JavaScriptCore.make as necessary. + + * JavaScriptCore.vcxproj/JavaScriptCore.make: Added. + * JavaScriptCore.vcxproj/JavaScriptCore.sln: Removed. + * JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: Copied from Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.sln. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPreBuild.cmd: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorProduction.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props: + * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters: + * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: + * JavaScriptCore.vcxproj/JavaScriptCoreProduction.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: + * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: + * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: + * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: + * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: + * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: + * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: Added. + * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: + * JavaScriptCore.vcxproj/jsc/jscCommon.props: + * JavaScriptCore.vcxproj/jsc/jscProduction.props: Added. + * JavaScriptCore.vcxproj/jsc/jscRelease.props: + * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: + * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: + * JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: + * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: + * JavaScriptCore.vcxproj/testapi/testapiCommon.props: + * JavaScriptCore.vcxproj/testapi/testapiProduction.props: Added. + * JavaScriptCore.vcxproj/testapi/testapiRelease.props: + +2013-02-19 Jer Noble + + EME: Enable both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 until clients transition to the new API. + https://bugs.webkit.org/show_bug.cgi?id=110284 + + Reviewed by Eric Carlson. + + Re-enable the ENCRYPTED_MEDIA flag. + + * Configurations/FeatureDefines.xcconfig: + +2013-02-20 Dirk Schulze + + Enable CANVAS_PATH flag + https://bugs.webkit.org/show_bug.cgi?id=108508 + + Reviewed by Simon Fraser. + + Enable CANVAS_PATH flag on trunk. + + Existing tests cover the feature. + + * Configurations/FeatureDefines.xcconfig: + +2013-02-19 Mark Rowe + + Unreviewed, uninteresting change to test a theory about bad dependency handling. + + * API/JSStringRefCF.cpp: + (JSStringCreateWithCFString): Remove an unnecessary else clause. + +2013-02-19 Oliver Hunt + + Silence some analyzer warnings + https://bugs.webkit.org/show_bug.cgi?id=110281 + + Reviewed by Mark Hahnenberg. + + The static analyzer believes that callerCodeBlock can be null, + based on other code performing null tests. This should not + ever be the case, but we'll add RELEASE_ASSERTs to make it + obvious if we're ever wrong. + + * interpreter/Interpreter.cpp: + (JSC::getCallerInfo): + +2013-02-19 Oliver Hunt + + Don't force everything to be blinded in debug builds + https://bugs.webkit.org/show_bug.cgi?id=110279 + + Reviewed by Mark Hahnenberg. + + Switch to an explicit flag for indicating that we want + every constant to be blinded. + + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::shouldBlind): + +2013-02-19 Filip Pizlo + + Fix indentation of Opcode.h + + Rubber stamped by Mark Hahnenberg. + + * bytecode/Opcode.h: + +2013-02-19 Filip Pizlo + + Moved PolymorphicAccessStructureList into its own file. + + Rubber stamped by Mark Hahnenberg. + + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/Instruction.h: + (JSC): + * bytecode/PolymorphicAccessStructureList.h: Added. + (JSC): + (PolymorphicAccessStructureList): + (PolymorphicStubInfo): + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::PolymorphicStubInfo): + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): + (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): + (JSC::PolymorphicAccessStructureList::visitWeak): + * bytecode/StructureStubInfo.h: + +2013-02-19 Filip Pizlo + + Fix indentation of Instruction.h + + Rubber stamped by Mark Hahnenberg. + + * bytecode/Instruction.h: + +2013-02-18 Geoffrey Garen + + Unreviewed, rolling in r143348. + http://trac.webkit.org/changeset/143348 + https://bugs.webkit.org/show_bug.cgi?id=110242 + + The bug was that isEmptyValue() was returning true for the deleted value. + Fixed this and simplified things further by delegating to m_sourceCode + for both isNull() and isHashTableDeletedValue(), so they can't be out of + sync. + + * runtime/CodeCache.cpp: + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + * runtime/CodeCache.h: + (JSC::SourceCodeKey::SourceCodeKey): + (JSC::SourceCodeKey::isHashTableDeletedValue): + (JSC::SourceCodeKey::hash): + (JSC::SourceCodeKey::length): + (JSC::SourceCodeKey::isNull): + (JSC::SourceCodeKey::operator==): + (SourceCodeKey): + +2013-02-15 Martin Robinson + + [GTK] Improve gyp build JavaScriptCore code generation + https://bugs.webkit.org/show_bug.cgi?id=109969 + + Reviewed by Dirk Pranke. + + Switch away from using DerivedSources.make when building JavaScriptCore generated + sources. This bring a couple advantages, such as building the sources in parallel, + but requires us to list the generated sources more than once. + + * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Add rules for generating JavaScriptCore sources. + * JavaScriptCore.gyp/generate-derived-sources.sh: Added. + * JavaScriptCore.gyp/redirect-stdout.sh: Added. + +2013-02-19 Sheriff Bot + + Unreviewed, rolling out r143348. + http://trac.webkit.org/changeset/143348 + https://bugs.webkit.org/show_bug.cgi?id=110242 + + "Caused a deleted value sentinel crash on the layout tests" + (Requested by ggaren on #webkit). + + * runtime/CodeCache.cpp: + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + * runtime/CodeCache.h: + (JSC::SourceCodeKey::SourceCodeKey): + (JSC::SourceCodeKey::isHashTableDeletedValue): + (JSC::SourceCodeKey::hash): + (JSC::SourceCodeKey::length): + (JSC::SourceCodeKey::isNull): + (JSC::SourceCodeKey::operator==): + (SourceCodeKey): + +2013-02-19 Mark Hahnenberg + + HeapBlock::destroy should issue warning if result is unused + https://bugs.webkit.org/show_bug.cgi?id=110233 + + Reviewed by Oliver Hunt. + + To enforce the fact that we need to return blocks to the BlockAllocator after calling destroy, + we should add WARN_UNUSED_RETURN to HeapBlock::destroy and any other destroy functions in its subclasses. + + * heap/HeapBlock.h: + +2013-02-19 Mark Hahnenberg + + WeakSet::removeAllocator leaks WeakBlocks + https://bugs.webkit.org/show_bug.cgi?id=110228 + + Reviewed by Geoffrey Garen. + + We need to return the WeakBlock to the BlockAllocator after the call to WeakBlock::destroy. + + * heap/WeakSet.cpp: + (JSC::WeakSet::removeAllocator): + +2013-02-18 Geoffrey Garen + + Save space on keys in the CodeCache + https://bugs.webkit.org/show_bug.cgi?id=110179 + + Reviewed by Oliver Hunt. + + Share the SourceProvider's string instead of making our own copy. This + chops off 16MB - 32MB from the CodeCache's memory footprint when full. + (It's 16MB when the strings are LChar, and 32MB when they're UChar.) + + * runtime/CodeCache.cpp: + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + * runtime/CodeCache.h: Removed a defunct enum value. + + (JSC::SourceCodeKey::SourceCodeKey): + (JSC::SourceCodeKey::isHashTableDeletedValue): + (SourceCodeKey): + (JSC::SourceCodeKey::hash): + (JSC::SourceCodeKey::length): + (JSC::SourceCodeKey::isNull): + (JSC::SourceCodeKey::string): + (JSC::SourceCodeKey::operator==): Store a SourceCode instead of a String + so we can share our string with our SourceProvider. Cache our hash so + we don't have to re-decode our string just to re-hash the table. + +2013-02-19 Zoltan Herczeg + + revertBranchPtrWithPatch is incorrect on ARM traditional + https://bugs.webkit.org/show_bug.cgi?id=110201 + + Reviewed by Oliver Hunt. + + Revert two instructions back to their original value. + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::revertBranchPtrWithPatch): + (ARMAssembler): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::branchPtrWithPatch): + (JSC::MacroAssemblerARM::revertJumpReplacementToBranchPtrWithPatch): + +2013-02-19 Filip Pizlo + + REGRESSION(r143241): It made 27 layout tests crash on 32 bit platforms + https://bugs.webkit.org/show_bug.cgi?id=110184 + + Reviewed by Zoltan Herczeg. + + 32-bit backend was making all sorts of crazy assumptions, which happened to mostly + not break things prior to http://trac.webkit.org/changeset/143241. This brings the + 32-bit backend's type speculation fully into compliance with what the 64-bit + backend does. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32): + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + +2013-02-18 Ilya Tikhonovsky + + Unreviewed build fix for Apple Windows. Second stage. + Add missed export statement. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-02-18 Roger Fong + + Unreviewed Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-02-18 Darin Adler + + Remove unneeded explicit function template arguments. + https://bugs.webkit.org/show_bug.cgi?id=110043 + + Reviewed by Ryosuke Niwa. + + * runtime/Identifier.cpp: + (JSC::IdentifierASCIIStringTranslator::hash): Let the compiler deduce the type + when calling computeHashAndMaskTop8Bits. + (JSC::IdentifierLCharFromUCharTranslator::hash): Ditto. + * runtime/Identifier.h: + (JSC::IdentifierCharBufferTranslator::hash): Ditto. +2013-02-18 Geoffrey Garen + + Shrank the SourceProvider cache + https://bugs.webkit.org/show_bug.cgi?id=110158 + + Reviewed by Oliver Hunt. + + CodeCache is now our primary source cache, so a long-lived SourceProvider + cache is a waste. I measured this as a 10MB Membuster win; with more + precise instrumentation, Andreas estimated it as up to 30MB. + + I didn't eliminate the SourceProvider cache because it's still useful + in speeding up uncached parsing of scripts with large nested functions + (i.e., all scripts). + + * heap/Heap.cpp: + (JSC::Heap::collect): Discard all source provider caches after GC. This + is a convenient place to do so because it's reasonably soon after initial + parsing without being immediate. + + * parser/Parser.cpp: + (JSC::::Parser): Updated for interface change: The heap now owns the + source provider cache, since most SourceProviders are not expected to + have one by default, and the heap is responsible for throwing them away. + + (JSC::::parseInner): No need to update statistics on cache size, since + we're going to throw it away no matter what. + + (JSC::::parseFunctionInfo): Reduced the minimum function size to 16. This + is a 27% win on a new parsing micro-benchmark I've added. Now that the + cache is temporary, we don't have to worry so much about its memory + footprint. + + * parser/Parser.h: + (Parser): Updated for interface changes. + + * parser/SourceProvider.cpp: + (JSC::SourceProvider::SourceProvider): + (JSC::SourceProvider::~SourceProvider): + * parser/SourceProvider.h: + (JSC): + (SourceProvider): SourceProvider doesn't own its cache anymore because + the cache is temporary. + + * parser/SourceProviderCache.cpp: + (JSC::SourceProviderCache::clear): + (JSC::SourceProviderCache::add): + * parser/SourceProviderCache.h: + (JSC::SourceProviderCache::SourceProviderCache): + (SourceProviderCache): + * parser/SourceProviderCacheItem.h: + (SourceProviderCacheItem): No need to update statistics on cache size, + since we're going to throw it away no matter what. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::addSourceProviderCache): + (JSC): + (JSC::JSGlobalData::clearSourceProviderCaches): + * runtime/JSGlobalData.h: + (JSC): + (JSGlobalData): Moved the cache here so it's easier to throw away. + +2013-02-18 Filip Pizlo + + DFG backend Branch handling has duplicate code and dead code + https://bugs.webkit.org/show_bug.cgi?id=110162 + + Reviewed by Mark Hahnenberg. + + Streamline the code, and make the 64 backend's optimizations make more sense + (i.e. not be dead code). + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-18 Brent Fulgham + + [Windows] Unreviewed VS2010 build correction after r143273. + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing source + file SourceProvider.cpp. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Add missing exports. + +2013-02-18 Filip Pizlo + + Structure::flattenDictionaryStructure should compute max offset in a manner that soundly handles the case where the property list becomes empty + https://bugs.webkit.org/show_bug.cgi?id=110155 + + + Reviewed by Mark Rowe. + + This was a rookie mistake. It was doing: + + for (blah) { + m_offset = foo // foo's monotonically increase in the loop + } + + as a way of computing max offset for all of the properties. Except what if the loop doesn't + execute because there are no properties? Well, then, you're going to have a bogus m_offset. + + The solution is to initialize m_offset at the top of the loop. + + * runtime/Structure.cpp: + (JSC::Structure::flattenDictionaryStructure): + +2013-02-18 Balazs Kilvady + + MIPS DFG implementation. + https://bugs.webkit.org/show_bug.cgi?id=101328 + + Reviewed by Oliver Hunt. + + DFG implementation for MIPS. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::MIPSAssembler): + (JSC::MIPSAssembler::sllv): + (JSC::MIPSAssembler::movd): + (MIPSAssembler): + (JSC::MIPSAssembler::negd): + (JSC::MIPSAssembler::labelForWatchpoint): + (JSC::MIPSAssembler::label): + (JSC::MIPSAssembler::vmov): + (JSC::MIPSAssembler::linkDirectJump): + (JSC::MIPSAssembler::maxJumpReplacementSize): + (JSC::MIPSAssembler::revertJumpToMove): + (JSC::MIPSAssembler::replaceWithJump): + * assembler/MacroAssembler.h: + (MacroAssembler): + (JSC::MacroAssembler::poke): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::add32): + (MacroAssemblerMIPS): + (JSC::MacroAssemblerMIPS::and32): + (JSC::MacroAssemblerMIPS::lshift32): + (JSC::MacroAssemblerMIPS::mul32): + (JSC::MacroAssemblerMIPS::or32): + (JSC::MacroAssemblerMIPS::rshift32): + (JSC::MacroAssemblerMIPS::urshift32): + (JSC::MacroAssemblerMIPS::sub32): + (JSC::MacroAssemblerMIPS::xor32): + (JSC::MacroAssemblerMIPS::store32): + (JSC::MacroAssemblerMIPS::jump): + (JSC::MacroAssemblerMIPS::branchAdd32): + (JSC::MacroAssemblerMIPS::branchMul32): + (JSC::MacroAssemblerMIPS::branchSub32): + (JSC::MacroAssemblerMIPS::branchNeg32): + (JSC::MacroAssemblerMIPS::call): + (JSC::MacroAssemblerMIPS::loadDouble): + (JSC::MacroAssemblerMIPS::moveDouble): + (JSC::MacroAssemblerMIPS::swapDouble): + (JSC::MacroAssemblerMIPS::subDouble): + (JSC::MacroAssemblerMIPS::mulDouble): + (JSC::MacroAssemblerMIPS::divDouble): + (JSC::MacroAssemblerMIPS::negateDouble): + (JSC::MacroAssemblerMIPS::branchEqual): + (JSC::MacroAssemblerMIPS::branchNotEqual): + (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerMIPS::branchTruncateDoubleToUint32): + (JSC::MacroAssemblerMIPS::truncateDoubleToInt32): + (JSC::MacroAssemblerMIPS::truncateDoubleToUint32): + (JSC::MacroAssemblerMIPS::branchDoubleNonZero): + (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN): + (JSC::MacroAssemblerMIPS::invert): + (JSC::MacroAssemblerMIPS::replaceWithJump): + (JSC::MacroAssemblerMIPS::maxJumpReplacementSize): + * dfg/DFGAssemblyHelpers.h: + (AssemblyHelpers): + (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall): + (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn): + (JSC::DFG::AssemblyHelpers::debugCall): + * dfg/DFGCCallHelpers.h: + (CCallHelpers): + (JSC::DFG::CCallHelpers::setupArguments): + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + * dfg/DFGFPRInfo.h: + (DFG): + (FPRInfo): + (JSC::DFG::FPRInfo::toRegister): + (JSC::DFG::FPRInfo::toIndex): + (JSC::DFG::FPRInfo::debugName): + * dfg/DFGGPRInfo.h: + (DFG): + (GPRInfo): + (JSC::DFG::GPRInfo::toRegister): + (JSC::DFG::GPRInfo::toIndex): + (JSC::DFG::GPRInfo::debugName): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * jit/JSInterfaceJIT.h: + (JSInterfaceJIT): + * runtime/JSGlobalData.h: + (JSC::ScratchBuffer::allocationSize): + (ScratchBuffer): + +2013-02-18 Filip Pizlo + + DFG::SpeculativeJIT::isKnownXYZ methods should use CFA rather than other things + https://bugs.webkit.org/show_bug.cgi?id=110092 + + Reviewed by Geoffrey Garen. + + These methods were previously using GenerationInfo and other things to try to + gain information that the CFA could give away for free, if you asked kindly + enough. + + Also fixed CallLinkStatus's dump() method since it was making an invalid + assertion: we most certainly can have a status where the structure is non-null + and the executable is null, like if we're dealing with an InternalFunction. + + Also removed calls to isKnownNotXYZ from fillSpeculateABC methods in 32_64. I + don't know why that was there. But it was causing asserts if the value was + empty - i.e. we had already exited unconditionally but we didn't know it. I + could have fixed this by introducing another form of isKnownNotXYZ which was + tolerant of empty values, but I didn't feel like fixing code that I knew to be + unnecessary. (More deeply, isKnownNotCell, for example, really asks: "do you + know that this value can never be a cell?" while some of the previous uses + wanted to ask: "do you know that this is a value that is not a cell?". The + former is "true" if the value is a contradiction [i.e. BOTTOM], while the + latter is "false" for contradictions, since contradictions are not values.) + + * bytecode/CallLinkStatus.cpp: + (JSC::CallLinkStatus::dump): + * bytecode/CallLinkStatus.h: + (JSC::CallLinkStatus::CallLinkStatus): + * dfg/DFGSpeculativeJIT.cpp: + (DFG): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::isKnownInteger): + (JSC::DFG::SpeculativeJIT::isKnownCell): + (JSC::DFG::SpeculativeJIT::isKnownNotInteger): + (JSC::DFG::SpeculativeJIT::isKnownNotNumber): + (JSC::DFG::SpeculativeJIT::isKnownNotCell): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + * dfg/DFGStructureAbstractValue.h: + (JSC::DFG::StructureAbstractValue::dump): + +2013-02-17 Filip Pizlo + + Get rid of DFG::DoubleOperand and simplify ValueToInt32 + https://bugs.webkit.org/show_bug.cgi?id=110072 + + Reviewed by Geoffrey Garen. + + ValueToInt32 had a side-effecting path, which was not OSR-friendly: an OSR after + the side-effect would lead to the side-effect re-executing. I got rid of that path + and replaced it with an optimization for the case where the input is speculated + number-or-other. This makes idioms like null|0 and true|0 work as expected, and + get optimized appropriately. + + Also got rid of DoubleOperand. Replaced all remaining uses of it with + SpeculateDoubleOperand. Because the latter asserts that the Edge is a DoubleUse + edge and the remaining uses of DoubleOperand are all for untyped uses, I worked + around the assertion by setting the UseKind to DoubleUse by force. This is sound, + since all existing assertions for DoubleUse are actually asserting that we're not + converting a value to double unexpectedly. But all of these calls to + SpeculateDoubleOperand are when the operand is already known to be represented as + double, so there is no conversion. + + This is neutral on benchmarks, except stanford-crypto-ccm, which speeds up a + little. Mostly, this is intended to delete a bunch of code. DoubleOperand was + equivalent to the replace-edge-with-DoubleUse trick that I'm using now, except it + involved a _lot_ more code. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGSpeculativeJIT.cpp: + (DFG): + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (DFG): + (FPRTemporary): + * dfg/DFGSpeculativeJIT32_64.cpp: + (DFG): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (DFG): + +2013-02-18 Ádám Kallai + + [Qt] Mountain Lion buildfix after r143147. + + Reviewed by Csaba Osztrogonác. + + * runtime/DateConstructor.cpp: + +2013-02-18 Zan Dobersek + + Stop placing std::isfinite and std::signbit inside the global scope + https://bugs.webkit.org/show_bug.cgi?id=109817 + + Reviewed by Darin Adler. + + Prefix calls to the isfinite and signbit methods with std:: as the two + methods are no longer being imported into the global scope. + + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::shouldBlindDouble): + * offlineasm/cloop.rb: + * runtime/BigInteger.h: + (JSC::BigInteger::BigInteger): + * runtime/DateConstructor.cpp: + (JSC::constructDate): + * runtime/DatePrototype.cpp: + (JSC::fillStructuresUsingTimeArgs): + (JSC::fillStructuresUsingDateArgs): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncSetYear): + * runtime/JSCJSValueInlines.h: + (JSC::JSValue::JSValue): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncIsFinite): + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendStringifiedValue): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncMax): Also include an opportunistic style fix. + (JSC::mathProtoFuncMin): Ditto. + * runtime/NumberPrototype.cpp: + (JSC::toStringWithRadix): + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + (JSC::numberProtoFuncToString): + * runtime/Uint16WithFraction.h: + (JSC::Uint16WithFraction::Uint16WithFraction): + +2013-02-18 Ádám Kallai + + [Qt] Mountain Lion buildfix after r143147. + + Reviewed by Csaba Osztrogonác. + + * runtime/DateInstance.cpp: + +2013-02-18 Ilya Tikhonovsky + + Unreviewed speculative build fix for Apple Win bots. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-02-18 Filip Pizlo + + Fix indentation of StructureStubInfo.h + + Rubber stamped by Mark Hahnenberg. + + * bytecode/StructureStubInfo.h: + +2013-02-18 Filip Pizlo + + Fix indentation of JSGlobalObject.h and JSGlobalObjectFunctions.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/JSGlobalObject.h: + * runtime/JSGlobalObjectFunctions.h: + +2013-02-18 Filip Pizlo + + Fix indention of Operations.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/Operations.h: + +2013-02-18 Filip Pizlo + + Remove DFG::SpeculativeJIT::isKnownNumeric(), since it's not called from anywhere. + + Rubber stamped by Andy Estes. + + * dfg/DFGSpeculativeJIT.cpp: + (DFG): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + +2013-02-18 Filip Pizlo + + Remove DFG::SpeculativeJIT::isStrictInt32(), since it's not called from anywhere. + + Rubber stampted by Andy Estes. + + * dfg/DFGSpeculativeJIT.cpp: + (DFG): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + +2013-02-18 Filip Pizlo + + Remove dead code for ValueToNumber from the DFG. + + Rubber stamped by Andy Estes. + + We killed ValueToNumber at some point, but forgot to kill all of the backend support + for it. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleMinMax): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + * dfg/DFGSpeculativeJIT64.cpp: + +2013-02-17 Csaba Osztrogonác + + Unreviewed buildfix for JSVALUE32_64 builds after r143147. + + * jit/JIT.h: + +2013-02-17 Filip Pizlo + + Move all Structure out-of-line inline methods to StructureInlines.h + https://bugs.webkit.org/show_bug.cgi?id=110024 + + Rubber stamped by Mark Hahnenberg and Sam Weinig. + + This was supposed to be easy. + + But, initially, there was a Structure inline method in CodeBlock.h, and moving that + into StructureInlines.h meant that Operations.h included CodeBlock.h. This would + cause WebCore build failures, because CodeBlock.h transitively included the JSC + parser (via many, many paths), and the JSC parser defines tokens using enumeration + elements that CSSGrammar.cpp (generated by bison) would #define. For example, + bison would give CSSGrammar.cpp a #define FUNCTION 123, and would do so before + including anything interesting. The JSC parser would have an enum that included + FUNCTION as an element. Hence the JSC parser included into CSSGrammar.cpp would have + a token element called FUNCTION declared in an enumeration, but FUNCTION was + #define'd to 123, leading to a parser error. + + Wow. + + So I removed all transitive include paths from CodeBlock.h to the JSC Parser. I + believe I was able to do so without out-of-lining anything interesting or performance + critical. This is probably a purely good thing to have done: it will be nice to be + able to make changes to the parser without having to compile the universe. + + Of course, doing this caused a bunch of other things to not compile, since a bunch of + headers relied on things being implicitly included for them when they transitively + included the parser. I fixed a lot of that. + + Finally, I ended up removing the method that depended on CodeBlock.h from + StructureInlines.h, and putting it in Structure.cpp. That might seem like all of this + was a waste of time, except that I suspect it was a worthwhile forcing function for + cleaning up a bunch of cruft. + + * API/JSCallbackFunction.cpp: + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CodeBlock.h: + (JSC): + * bytecode/EvalCodeCache.h: + * bytecode/SamplingTool.h: + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedFunctionExecutable::parameterCount): + (JSC): + * bytecode/UnlinkedCodeBlock.h: + (UnlinkedFunctionExecutable): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/Label.h: + (JSC): + * dfg/DFGByteCodeParser.cpp: + * dfg/DFGByteCodeParser.h: + * dfg/DFGFPRInfo.h: + * dfg/DFGRegisterBank.h: + * heap/HandleStack.cpp: + * jit/JITWriteBarrier.h: + * parser/Nodes.h: + (JSC): + * parser/Parser.h: + * parser/ParserError.h: Added. + (JSC): + (JSC::ParserError::ParserError): + (ParserError): + (JSC::ParserError::toErrorObject): + * parser/ParserModes.h: + * parser/SourceProvider.cpp: Added. + (JSC): + (JSC::SourceProvider::SourceProvider): + (JSC::SourceProvider::~SourceProvider): + * parser/SourceProvider.h: + (JSC): + (SourceProvider): + * runtime/ArrayPrototype.cpp: + * runtime/DatePrototype.cpp: + * runtime/Executable.h: + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalObject.h: + (JSC): + * runtime/Operations.h: + * runtime/Structure.cpp: + (JSC::Structure::prototypeForLookup): + (JSC): + * runtime/Structure.h: + (JSC): + * runtime/StructureInlines.h: Added. + (JSC): + (JSC::Structure::create): + (JSC::Structure::createStructure): + (JSC::Structure::get): + (JSC::Structure::masqueradesAsUndefined): + (JSC::SlotVisitor::internalAppend): + (JSC::Structure::transitivelyTransitionedFrom): + (JSC::Structure::setEnumerationCache): + (JSC::Structure::enumerationCache): + (JSC::Structure::prototypeForLookup): + (JSC::Structure::prototypeChain): + (JSC::Structure::isValid): + * runtime/StructureRareData.cpp: + +2013-02-17 Roger Fong + + Unreviewed. Windows build fix. + + * runtime/CodeCache.h: + (CodeCacheMap): + +2013-02-16 Geoffrey Garen + + Code cache should be explicit about what it caches + https://bugs.webkit.org/show_bug.cgi?id=110039 + + Reviewed by Oliver Hunt. + + This patch makes the code cache more explicit in two ways: + + (1) The cache caches top-level scripts. Any sub-functions executed as a + part of a script are cached with it and evicted with it. + + This simplifies things by eliminating out-of-band sub-function tracking, + and fixes pathological cases where functions for live scripts would be + evicted in favor of functions for dead scripts, and/or high probability + functions executed early in script lifetime would be evicted in favor of + low probability functions executed late in script lifetime, due to LRU. + + Statistical data from general browsing and PLT confirms that caching + functions independently of scripts is not profitable. + + (2) The cache tracks script size, not script count. + + This reduces the worst-case cache size by a factor of infinity. + + Script size is a reasonable first-order estimate of in-memory footprint + for a cached script because there are no syntactic constructs that have + super-linear memory footprint. + + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::generateFunctionCodeBlock): Moved this function out of the cache + because it does not consult the cache, and is not managed by it. + + (JSC::UnlinkedFunctionExecutable::visitChildren): Visit our code blocks + because they are strong references now, rather than weak, a la (1). + + (JSC::UnlinkedFunctionExecutable::codeBlockFor): Updated for interface changes. + + * bytecode/UnlinkedCodeBlock.h: + (UnlinkedFunctionExecutable): + (UnlinkedFunctionCodeBlock): Strong now, not weak, a la (1). + + * runtime/CodeCache.cpp: + (JSC::CodeCache::CodeCache): + * runtime/CodeCache.h: + (JSC::SourceCodeKey::length): + (SourceCodeKey): + (CodeCacheMap): + (JSC::CodeCacheMap::CodeCacheMap): + (JSC::CodeCacheMap::find): + (JSC::CodeCacheMap::set): + (JSC::CodeCacheMap::clear): + (CodeCache): + (JSC::CodeCache::clear): Removed individual function tracking, due to (1). + Added explicit character counting, for (2). + + You might think 16000000 characters is a lot. It is. But this patch + didn't establish that limit -- it just took the existing limit and + made it more visible. I intend to reduce the size of the cache in a + future patch. + +2013-02-16 Filip Pizlo + + Remove support for bytecode comments, since it doesn't build, and hasn't been used in a while. + https://bugs.webkit.org/show_bug.cgi?id=110035 + + Rubber stamped by Andreas Kling. + + There are other ways of achieving the same effect, like adding print statements to the bytecode generator. + The fact that this feature doesn't build and nobody noticed implies that it's probably not a popular + feature. As well, the amount of wiring that was required for it was quite big considering its relatively + modest utility. + + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC): + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (CodeBlock): + * bytecode/Comment.h: Removed. + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitOpcode): + (JSC): + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): + (JSC::BytecodeGenerator::symbolTable): + +2013-02-16 Brent Fulgham + + [Windows] Unreviewed Visual Studio 2010 build fix after r143117 + + * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Reference new path to property sheets. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + Build correction after new operator == added. + +2013-02-16 Filip Pizlo + + Fix indentation of Structure.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/Structure.h: + +2013-02-16 Christophe Dumez + + Unreviewed build fix. + + Export symbol for new CString operator== operator to fix Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-02-15 Filip Pizlo + + Structure should be more methodical about the relationship between m_offset and m_propertyTable + https://bugs.webkit.org/show_bug.cgi?id=109978 + + Reviewed by Mark Hahnenberg. + + Allegedly, the previous relationship was that either m_propertyTable or m_offset + would be set, and if m_propertyTable was not set you could rebuild it. In reality, + we would sometimes "reset" both: some transitions wouldn't set m_offset, and other + transitions would clear the previous structure's m_propertyTable. So, in a + structure transition chain of A->B->C you could have: + + A transitions to B: B doesn't copy m_offset but does copy m_propertyTable, because + that seemed like a good idea at the time (this was a common idiom in the code). + B transitions to C: C steals B's m_propertyTable, leaving B with neither a + m_propertyTable nor a m_offset. + + Then we would ask for the size of the property storage of B and get the answer + "none". That's not good. + + Now, there is a new relationship, which, hopefully, should fix things: m_offset is + always set and always refers to the maximum offset ever used by the property table. + From this, you can infer both the inline and out-of-line property size, and + capacity. This is accomplished by having PropertyTable::add() take a + PropertyOffset reference, which must be Structure::m_offset. It will update this + offset. As well, all transitions now copy m_offset. And we frequently assert + (using RELEASE_ASSERT) that the m_offset matches what m_propertyTable would tell + you. Hence if you ever modify the m_propertyTable, you'll also update the offset. + If you ever copy the property table, you'll also copy the offset. Life should be + good, I think. + + * runtime/PropertyMapHashTable.h: + (JSC::PropertyTable::add): + * runtime/Structure.cpp: + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::removePropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::attributeChangeTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::sealTransition): + (JSC::Structure::freezeTransition): + (JSC::Structure::preventExtensionsTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::checkConsistency): + (JSC::Structure::putSpecificValue): + (JSC::Structure::createPropertyMap): + (JSC::PropertyTable::checkConsistency): + * runtime/Structure.h: + (JSC): + (JSC::Structure::putWillGrowOutOfLineStorage): + (JSC::Structure::outOfLineCapacity): + (JSC::Structure::outOfLineSize): + (JSC::Structure::isEmpty): + (JSC::Structure::materializePropertyMapIfNecessary): + (JSC::Structure::materializePropertyMapIfNecessaryForPinning): + (Structure): + (JSC::Structure::checkOffsetConsistency): + +2013-02-15 Martin Robinson + + [GTK] Spread the gyp build files throughout the tree + https://bugs.webkit.org/show_bug.cgi?id=109960 + + Reviewed by Dirk Pranke. + + * JavaScriptCore.gyp/JavaScriptCoreGTK.gyp: Renamed from Source/WebKit/gtk/gyp/JavaScriptCore.gyp. + * JavaScriptCore.gyp/generate-derived-sources.sh: Renamed from Source/WebKit/gtk/gyp/generate-derived-sources.sh. + +2013-02-15 Filip Pizlo + + DFG SpeculativeJIT64 should be more precise about when it's dealing with a cell (even though it probably doesn't matter) + https://bugs.webkit.org/show_bug.cgi?id=109625 + + Reviewed by Mark Hahnenberg. + + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-15 Geoffrey Garen + + Merged the global function cache into the source code cache + https://bugs.webkit.org/show_bug.cgi?id=108660 + + Reviewed by Sam Weinig. + + Responding to review comments by Darin Adler. + + * runtime/CodeCache.h: + (JSC::SourceCodeKey::SourceCodeKey): Don't initialize m_name and m_flags + in the hash table deleted value because they're meaningless. + +2013-02-14 Filip Pizlo + + DFG AbstractState should filter operands to NewArray more precisely + https://bugs.webkit.org/show_bug.cgi?id=109900 + + Reviewed by Mark Hahnenberg. + + NewArray for primitive indexing types speculates that the inputs are the appropriate + primitives. Now, the CFA filters the abstract state accordingly, as well. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + +2013-02-15 Andreas Kling + + Yarr: Use OwnPtr to make pattern/disjunction/character-class ownership clearer. + + + Reviewed by Benjamin Poulain. + + - Let classes that manage lifetime of other objects hold on to them with OwnPtr instead of raw pointers. + - Placed some strategic Vector::shrinkToFit(), ::reserveInitialCapacity() and ::swap(). + + 668 kB progression on Membuster3. + + * yarr/YarrInterpreter.cpp: + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd): + (JSC::Yarr::ByteCompiler::emitDisjunction): + (ByteCompiler): + * yarr/YarrInterpreter.h: + (JSC::Yarr::BytecodePattern::BytecodePattern): + (BytecodePattern): + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern): + (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion): + (JSC::Yarr::YarrGenerator::opCompileBody): + * yarr/YarrPattern.cpp: + (JSC::Yarr::CharacterClassConstructor::charClass): + (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor): + (JSC::Yarr::YarrPatternConstructor::reset): + (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter): + (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd): + (JSC::Yarr::YarrPatternConstructor::copyDisjunction): + (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets): + (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses): + (JSC::Yarr::YarrPatternConstructor::optimizeBOL): + (JSC::Yarr::YarrPatternConstructor::containsCapturingTerms): + (JSC::Yarr::YarrPatternConstructor::optimizeDotStarWrappedExpressions): + * yarr/YarrPattern.h: + (JSC::Yarr::PatternDisjunction::addNewAlternative): + (PatternDisjunction): + (YarrPattern): + (JSC::Yarr::YarrPattern::reset): + (JSC::Yarr::YarrPattern::newlineCharacterClass): + (JSC::Yarr::YarrPattern::digitsCharacterClass): + (JSC::Yarr::YarrPattern::spacesCharacterClass): + (JSC::Yarr::YarrPattern::wordcharCharacterClass): + (JSC::Yarr::YarrPattern::nondigitsCharacterClass): + (JSC::Yarr::YarrPattern::nonspacesCharacterClass): + (JSC::Yarr::YarrPattern::nonwordcharCharacterClass): + +2013-02-14 Geoffrey Garen + + Merged the global function cache into the source code cache + https://bugs.webkit.org/show_bug.cgi?id=108660 + + Reviewed by Sam Weinig. + + This has a few benefits: + + (*) Saves a few kB by removing a second cache data structure. + + (*) Reduces the worst case memory usage of the cache by 1.75X. (Heavy + use of 'new Function' and other techniques could cause us to fill + both root caches, and they didn't trade off against each other.) + + (*) Paves the way for future improvements based on a non-trivial + cache key (for example, shrinkable pointer to the key string, and + more precise cache size accounting). + + Also cleaned up the cache implementation and simplified it a bit. + + * heap/Handle.h: + (HandleBase): + * heap/Strong.h: + (Strong): Build! + + * runtime/CodeCache.cpp: + (JSC): + (JSC::CodeCache::getCodeBlock): + (JSC::CodeCache::generateFunctionCodeBlock): + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + (JSC::CodeCache::usedFunctionCode): Updated for three interface changes: + + (*) SourceCodeKey is a class, not a pair. + + (*) Table values are abstract pointers, since they can be executables + or code blocks. (In a future patch, I'd like to change this so we + always store only code blocks. But that's too much for one patch.) + + (*) The cache function is named "set" because it always overwrites + unconditionally. + + * runtime/CodeCache.h: + (CacheMap): + (JSC::CacheMap::find): + (JSC::CacheMap::set): + (JSC::CacheMap::clear): Added support for specifying hash traits, so we + can use a SourceCodeKey. + + Removed side table and random number generator to save space and reduce + complexity. Hash tables are already random, so we don't need another source + of randomness. + + (SourceCodeKey): + (JSC::SourceCodeKey::SourceCodeKey): + (JSC::SourceCodeKey::isHashTableDeletedValue): + (JSC::SourceCodeKey::hash): + (JSC::SourceCodeKey::isNull): + (JSC::SourceCodeKey::operator==): + (JSC::SourceCodeKeyHash::hash): + (JSC::SourceCodeKeyHash::equal): + (SourceCodeKeyHash): + (SourceCodeKeyHashTraits): + (JSC::SourceCodeKeyHashTraits::isEmptyValue): A SourceCodeKey is just a + fancy triplet: source code string; function name (or null, for non-functions); + and flags. Flags and function name distinguish between functions and programs + with identical code, so they can live in the same cache. + + I chose to use the source code string as the primary hashing reference + because it's likely to be unique. We can use profiling to choose another + technique in future, if collisions between functions and programs prove + to be hot. I suspect they won't. + + (JSC::CodeCache::clear): + (CodeCache): Removed the second cache. + + * heap/Handle.h: + (HandleBase): + * heap/Strong.h: + (Strong): + * runtime/CodeCache.cpp: + (JSC): + (JSC::CodeCache::getCodeBlock): + (JSC::CodeCache::generateFunctionCodeBlock): + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + (JSC::CodeCache::usedFunctionCode): + * runtime/CodeCache.h: + (JSC): + (CacheMap): + (JSC::CacheMap::find): + (JSC::CacheMap::set): + (JSC::CacheMap::clear): + (SourceCodeKey): + (JSC::SourceCodeKey::SourceCodeKey): + (JSC::SourceCodeKey::isHashTableDeletedValue): + (JSC::SourceCodeKey::hash): + (JSC::SourceCodeKey::isNull): + (JSC::SourceCodeKey::operator==): + (JSC::SourceCodeKeyHash::hash): + (JSC::SourceCodeKeyHash::equal): + (SourceCodeKeyHash): + (SourceCodeKeyHashTraits): + (JSC::SourceCodeKeyHashTraits::isEmptyValue): + (JSC::CodeCache::clear): + (CodeCache): + +2013-02-14 Tony Chang + + Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files. + https://bugs.webkit.org/show_bug.cgi?id=96934 + + * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops: Added property svn:eol-style. + * JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops: Added property svn:eol-style. + +2013-02-14 Tony Chang + + Unreviewed, set svn:eol-style CRLF for .sln files. + + * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style. + +2013-02-14 David Kilzer + + [Mac] Clean up WARNING_CFLAGS + + + + Reviewed by Mark Rowe. + + * Configurations/Base.xcconfig: Use + GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable + -Wshorten-64-to-32 rather than WARNING_CFLAGS. + + * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style. + +2013-02-13 Anders Carlsson + + Better build fix. + + * API/tests/testapi.c: + (assertEqualsAsNumber): + (main): + +2013-02-13 Roger Fong + + Unreviewed. Build fix. + + * API/tests/testapi.c: + (assertEqualsAsNumber): + (main): + +2013-02-13 Oliver Hunt + + Yet another build fix + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + +2013-02-13 Zan Dobersek + + The 'global isinf/isnan' compiler quirk required when using clang with libstdc++ + https://bugs.webkit.org/show_bug.cgi?id=109325 + + Reviewed by Anders Carlsson. + + Prefix calls to the isinf and isnan methods with std::, declaring we want to use the + two methods as they're provided by the C++ standard library being used. + + * API/JSValueRef.cpp: + (JSValueMakeNumber): + * JSCTypedArrayStubs.h: + (JSC): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoad): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::constantNaN): + * offlineasm/cloop.rb: + * runtime/DateConstructor.cpp: + (JSC::dateUTC): Also include an opportunistic style fix. + * runtime/DateInstance.cpp: + (JSC::DateInstance::calculateGregorianDateTime): + (JSC::DateInstance::calculateGregorianDateTimeUTC): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/JSCJSValue.cpp: + (JSC::JSValue::toInteger): + * runtime/JSDateMath.cpp: + (JSC::getUTCOffset): + (JSC::parseDateFromNullTerminatedCharacters): + (JSC::parseDate): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncIsNaN): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + (JSC::mathProtoFuncPow): + * runtime/PropertyDescriptor.cpp: + (JSC::sameValue): + +2013-02-13 Filip Pizlo + + Change another use of (SpecCell & ~SpecString) to SpecObject. + + Reviewed by Mark Hahnenberg. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + +2013-02-13 Filip Pizlo + + ForwardInt32ToDouble is not in DFG::MinifiedNode's list of relevant node types + https://bugs.webkit.org/show_bug.cgi?id=109726 + + Reviewed by Mark Hahnenberg. + + If you add it to the list of relevant node types, you also need to make sure + it's listed as either hasChild or one of the other kinds. Otherwise you get + an assertion. This is causing test failures in run-javascriptcore-tests. + + * dfg/DFGMinifiedNode.h: + (JSC::DFG::MinifiedNode::hasChild): + +2013-02-13 Oliver Hunt + + Build fix. + + Rearranged the code somewhat to reduce the number of + DFG related ifdefs. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + +2013-02-13 Filip Pizlo + + ForwardInt32ToDouble is not in DFG::MinifiedNode's list of relevant node types + https://bugs.webkit.org/show_bug.cgi?id=109726 + + Reviewed by Gavin Barraclough. + + This is asymptomatic because ForwardInt32ToDouble is only used in SetLocals, in + which case the value is already stored to the stack. Still, we should fix this. + + * dfg/DFGMinifiedNode.h: + (JSC::DFG::belongsInMinifiedGraph): + +2013-02-12 Filip Pizlo + + DFG LogicalNot/Branch peephole removal and inversion ignores the possibility of things exiting + https://bugs.webkit.org/show_bug.cgi?id=109489 + + Reviewed by Mark Hahnenberg. + + If things can exit between the LogicalNot and the Branch then don't peephole. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + +2013-02-13 Oliver Hunt + + Remove unnecessary indirection to non-local variable access operations + https://bugs.webkit.org/show_bug.cgi?id=109724 + + Reviewed by Filip Pizlo. + + Linked bytecode now stores a direct pointer to the resolve operation + vectors, so the interpreter no longer needs a bunch of indirection to + to perform non-local lookup. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (CodeBlock): + * bytecode/Instruction.h: + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGCapabilities.h: + (JSC::DFG::canInlineOpcode): + * dfg/DFGGraph.h: + (ResolveGlobalData): + (ResolveOperationData): + (PutToBaseOperationData): + * dfg/DFGSpeculativeJIT.h: + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_put_to_base): + (JSC::JIT::emit_op_resolve): + (JSC::JIT::emitSlow_op_resolve): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emitSlow_op_resolve_base): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emitSlow_op_resolve_with_base): + (JSC::JIT::emit_op_resolve_with_this): + (JSC::JIT::emitSlow_op_resolve_with_this): + (JSC::JIT::emitSlow_op_put_to_base): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_put_to_base): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LowLevelInterpreter.asm: + +2013-02-13 Zoltan Herczeg + + replaceWithJump should not decrease the offset by 1 on ARM traditional. + https://bugs.webkit.org/show_bug.cgi?id=109689 + + Reviewed by Oliver Hunt. + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::replaceWithJump): + +2013-02-12 Joseph Pecoraro + + [iOS] Enable PAGE_VISIBILITY_API + https://bugs.webkit.org/show_bug.cgi?id=109399 + + Reviewed by David Kilzer. + + * Configurations/FeatureDefines.xcconfig: + +2013-02-12 Filip Pizlo + + Renamed SpecObjectMask to SpecObject. + + Rubber stamped by Mark Hahnenberg. + + "SpecObjectMask" is a weird name considering that a bunch of the other speculated + types are also masks, but don't have "Mask" in the name. + + * bytecode/SpeculatedType.h: + (JSC): + (JSC::isObjectSpeculation): + (JSC::isObjectOrOtherSpeculation): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + +2013-02-12 Filip Pizlo + + DFG CFA doesn't filter precisely enough for CompareStrictEq + https://bugs.webkit.org/show_bug.cgi?id=109618 + + Reviewed by Mark Hahnenberg. + + The backend speculates object for this case, but the CFA was filtering on + (SpecCell & ~SpecString) | SpecOther. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + +2013-02-12 Martin Robinson + + Fix the gyp build of JavaScriptCore. + + * JavaScriptCore.gypi: Added some missing DFG files to the source list. + +2013-02-12 Sheriff Bot + + Unreviewed, rolling out r142387. + http://trac.webkit.org/changeset/142387 + https://bugs.webkit.org/show_bug.cgi?id=109601 + + caused all layout and jscore tests on windows to fail + (Requested by kling on #webkit). + + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): + * bytecode/UnlinkedCodeBlock.h: + (UnlinkedCodeBlock): + +2013-02-11 Filip Pizlo + + DFG CompareEq optimization should be retuned + https://bugs.webkit.org/show_bug.cgi?id=109545 + + Reviewed by Mark Hahnenberg. + + - Made the object-to-object equality case work again by hoisting the if statement + for it. Previously, object-to-object equality would be compiled as + object-to-object-or-other. + + - Added AbstractState guards for most of the type checks that the object equality + code uses. + + Looks like a hint of a speed-up on all of the things. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch): + (JSC::DFG::SpeculativeJIT::compare): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + +2013-02-12 Gabor Rapcsanyi + + JSC asserting with long parameter list functions in debug mode on ARM traditional + https://bugs.webkit.org/show_bug.cgi?id=109565 + + Reviewed by Zoltan Herczeg. + + Increase the value of sequenceGetByIdSlowCaseInstructionSpace to 80. + + * jit/JIT.h: + +2013-02-11 Oliver Hunt + + Make JSC API more NULL tolerant + https://bugs.webkit.org/show_bug.cgi?id=109515 + + Reviewed by Mark Hahnenberg. + + We do so much marshalling for the C API these days anyway that a single null + check isn't a performance issue. Yet the existing "null is unsafe" behaviour + leads to crashes in embedding applications whenever there's an untested code + path, so it seems having defined behaviour is superior. + + * API/APICast.h: + (toJS): + (toJSForGC): + * API/JSObjectRef.cpp: + (JSObjectIsFunction): + (JSObjectCallAsFunction): + (JSObjectIsConstructor): + (JSObjectCallAsConstructor): + * API/tests/testapi.c: + (main): + +2013-02-11 Filip Pizlo + + Unreviewed, adding a FIXME to remind ourselves of a bug. + https://bugs.webkit.org/show_bug.cgi?id=109487 + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant): + +2013-02-11 Filip Pizlo + + Strange bug in DFG OSR in JSC + https://bugs.webkit.org/show_bug.cgi?id=109491 + + Reviewed by Mark Hahnenberg. + + Int32ToDouble was being injected after a side-effecting operation and before a SetLocal. Anytime we + inject something just before a SetLocal we should be aware that the previous operation may have been + a side-effect associated with the current code origin. Hence, we should use a forward exit. + Int32ToDouble does not do forward exits by default. + + This patch adds a forward-exiting form of Int32ToDouble, for use in SetLocal Int32ToDouble injections. + Changed the CSE and other things to treat these nodes identically, but for the exit strategy to be + distinct (Int32ToDouble -> backward, ForwardInt32ToDouble -> forward). The use of the NodeType for + signaling exit direction is not "great" but it's what we use in other places already (like + ForwardCheckStructure). + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::int32ToDoubleCSE): + (CSEPhase): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGCommon.h: + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::fixDoubleEdge): + (JSC::DFG::FixupPhase::injectInt32ToDoubleNode): + * dfg/DFGNode.h: + (JSC::DFG::Node::willHaveCodeGenOrOSR): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): + * dfg/DFGSpeculativeJIT.h: + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGVariableEventStream.cpp: + (JSC::DFG::VariableEventStream::reconstruct): + +2013-02-11 Filip Pizlo + + NonStringCell and Object are practically the same thing for the purpose of speculation + https://bugs.webkit.org/show_bug.cgi?id=109492 + + Reviewed by Mark Hahnenberg. + + Removed isNonStringCellSpeculation, and made all callers use isObjectSpeculation. + + Changed isNonStringCellOrOtherSpeculation to be isObjectOrOtherSpeculation. + + I believe this is correct because even weird object types like JSNotAnObject end up + being "objects" from the standpoint of our typesystem. Anyway, the assumption that + "is cell but not a string" equates to "object" is an assumption that is already made + in other places in the system so there's little value in being paranoid about it. + + * bytecode/SpeculatedType.h: + (JSC::isObjectSpeculation): + (JSC::isObjectOrOtherSpeculation): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGNode.h: + (Node): + (JSC::DFG::Node::shouldSpeculateObjectOrOther): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch): + (JSC::DFG::SpeculativeJIT::compare): + (JSC::DFG::SpeculativeJIT::compileStrictEq): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-10 Filip Pizlo + + DFG CompareEq(a, null) and CompareStrictEq(a, const) are unsound with respect to constant folding + https://bugs.webkit.org/show_bug.cgi?id=109387 + + Reviewed by Oliver Hunt and Mark Hahnenberg. + + Lock in the decision to use a non-speculative constant comparison as early as possible + and don't let the CFA change it by folding constants. This might be a performance + penalty on some really weird code (FWIW, I haven't seen this on benchmarks), but on + the other hand it completely side-steps the unsoundness that the bug speaks of. + + Rolling back in after adding 32-bit path. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::isConstantForCompareStrictEq): + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileStrictEq): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-10 Filip Pizlo + + DFG TypeOf implementation should have its backend code aligned to what the CFA does + https://bugs.webkit.org/show_bug.cgi?id=109385 + + Reviewed by Sam Weinig. + + The problem was that if we ended up trying to constant fold, but didn't succeed + because of prediction mismatches, then we would also fail to do filtration. + + Rearranged the control flow in the CFA to fix that. + + As far as I know, this is asymptomatic - it's sort of OK for the CFA to prove less + things, which is what the bug was. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + +2013-02-11 Sheriff Bot + + Unreviewed, rolling out r142491. + http://trac.webkit.org/changeset/142491 + https://bugs.webkit.org/show_bug.cgi?id=109470 + + broke the 32 bit build (Requested by jessieberlin on #webkit). + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileStrictEq): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-10 Filip Pizlo + + DFG CompareEq(a, null) and CompareStrictEq(a, const) are unsound with respect to constant folding + https://bugs.webkit.org/show_bug.cgi?id=109387 + + Reviewed by Oliver Hunt. + + Lock in the decision to use a non-speculative constant comparison as early as possible + and don't let the CFA change it by folding constants. This might be a performance + penalty on some really weird code (FWIW, I haven't seen this on benchmarks), but on + the other hand it completely side-steps the unsoundness that the bug speaks of. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::isConstantForCompareStrictEq): + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileStrictEq): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-11 Csaba Osztrogonác + + Unreviewed fix after r13954 for !ENABLE(JIT) builds. + + * llint/LowLevelInterpreter.cpp: + +2013-02-11 Gabor Rapcsanyi + + JSC build failing with verbose debug mode + https://bugs.webkit.org/show_bug.cgi?id=109441 + + Reviewed by Darin Adler. + + Fixing some verbose messages which caused build errors. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::mergeToSuccessors): + * dfg/DFGCFAPhase.cpp: + (JSC::DFG::CFAPhase::performBlockCFA): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::setReplacement): + (JSC::DFG::CSEPhase::eliminate): + * dfg/DFGPredictionInjectionPhase.cpp: + (JSC::DFG::PredictionInjectionPhase::run): + +2013-02-10 Martin Robinson + + Fix the GTK+ gyp build + + * JavaScriptCore.gypi: Update the source list to accurately + reflect what's in the repository and remove the offsets extractor + from the list of JavaScriptCore files. It's only used to build + the extractor binary. + +2013-02-09 Andreas Kling + + Shrink-wrap UnlinkedCodeBlock members. + + + Reviewed by Oliver Hunt. + + Rearrange the members of UnlinkedCodeBlock to avoid unnecessary padding on 64-bit. + Knocks ~600 KB off of the Membuster3 peak. + + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): + * bytecode/UnlinkedCodeBlock.h: + (UnlinkedCodeBlock): + +2013-02-08 Filip Pizlo + + DFG should allow phases to break Phi's and then have one phase to rebuild them + https://bugs.webkit.org/show_bug.cgi?id=108414 + + Reviewed by Mark Hahnenberg. + + Introduces two new DFG forms: LoadStore and ThreadedCPS. These are described in + detail in DFGCommon.h. + + Consequently, DFG phases no longer have to worry about preserving data flow + links between basic blocks. It is generally always safe to request that the + graph be dethreaded (Graph::dethread), which brings it into LoadStore form, where + the data flow is implicit. In this form, only liveness-at-head needs to be + preserved. + + All of the machinery for "threading" the graph to introduce data flow between + blocks is now moved out of the bytecode parser and into the CPSRethreadingPhase. + All phases that previously did this maintenance themselves now just rely on + being able to dethread the graph. The one exception is the structure check + hoising phase, which operates over a threaded graph and preserves it, for the + sake of performance. + + Also moved two other things into their own phases: unification (previously found + in the parser) and prediction injection (previously found in various places). + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/Operands.h: + (Operands): + (JSC::Operands::sizeFor): + (JSC::Operands::atFor): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + (JSC::DFG::AbstractState::mergeStateAtTail): + * dfg/DFGAllocator.h: + (JSC::DFG::::allocateSlow): + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + * dfg/DFGBasicBlockInlines.h: + (DFG): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getLocal): + (JSC::DFG::ByteCodeParser::getArgument): + (JSC::DFG::ByteCodeParser::flushDirect): + (JSC::DFG::ByteCodeParser::parseBlock): + (DFG): + (JSC::DFG::ByteCodeParser::parse): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::killUnreachable): + (JSC::DFG::CFGSimplificationPhase::keepOperandAlive): + (CFGSimplificationPhase): + (JSC::DFG::CFGSimplificationPhase::fixJettisonedPredecessors): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + * dfg/DFGCPSRethreadingPhase.cpp: Added. + (DFG): + (CPSRethreadingPhase): + (JSC::DFG::CPSRethreadingPhase::CPSRethreadingPhase): + (JSC::DFG::CPSRethreadingPhase::run): + (JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes): + (JSC::DFG::CPSRethreadingPhase::clearVariablesAtHeadAndTail): + (JSC::DFG::CPSRethreadingPhase::addPhiSilently): + (JSC::DFG::CPSRethreadingPhase::addPhi): + (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor): + (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocal): + (JSC::DFG::CPSRethreadingPhase::canonicalizeSetLocal): + (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor): + (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocal): + (JSC::DFG::CPSRethreadingPhase::canonicalizeSetArgument): + (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock): + (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlocks): + (JSC::DFG::CPSRethreadingPhase::propagatePhis): + (JSC::DFG::CPSRethreadingPhase::PhiStackEntry::PhiStackEntry): + (PhiStackEntry): + (JSC::DFG::CPSRethreadingPhase::phiStackFor): + (JSC::DFG::performCPSRethreading): + * dfg/DFGCPSRethreadingPhase.h: Added. + (DFG): + * dfg/DFGCSEPhase.cpp: + (CSEPhase): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGCommon.cpp: + (WTF): + (WTF::printInternal): + * dfg/DFGCommon.h: + (JSC::DFG::logCompilationChanges): + (DFG): + (WTF): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::Graph): + (JSC::DFG::Graph::dump): + (JSC::DFG::Graph::dethread): + (JSC::DFG::Graph::collectGarbage): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::performSubstitution): + (Graph): + (JSC::DFG::Graph::performSubstitutionForEdge): + (JSC::DFG::Graph::convertToConstant): + * dfg/DFGNode.h: + (JSC::DFG::Node::convertToPhantomLocal): + (Node): + (JSC::DFG::Node::convertToGetLocal): + (JSC::DFG::Node::hasVariableAccessData): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPhase.cpp: + (JSC::DFG::Phase::beginPhase): + * dfg/DFGPhase.h: + (JSC::DFG::runAndLog): + * dfg/DFGPredictionInjectionPhase.cpp: Added. + (DFG): + (PredictionInjectionPhase): + (JSC::DFG::PredictionInjectionPhase::PredictionInjectionPhase): + (JSC::DFG::PredictionInjectionPhase::run): + (JSC::DFG::performPredictionInjection): + * dfg/DFGPredictionInjectionPhase.h: Added. + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::run): + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * dfg/DFGUnificationPhase.cpp: Added. + (DFG): + (UnificationPhase): + (JSC::DFG::UnificationPhase::UnificationPhase): + (JSC::DFG::UnificationPhase::run): + (JSC::DFG::performUnification): + * dfg/DFGUnificationPhase.h: Added. + (DFG): + * dfg/DFGValidate.cpp: + (JSC::DFG::Validate::validate): + (JSC::DFG::Validate::dumpGraphIfAppropriate): + * dfg/DFGVirtualRegisterAllocationPhase.cpp: + (JSC::DFG::VirtualRegisterAllocationPhase::run): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::setUpCall): + * runtime/JSCJSValue.cpp: + (JSC::JSValue::dump): + * runtime/JSString.h: + (JSString): + * runtime/Options.h: + (JSC): + +2013-02-08 Jer Noble + + Bring WebKit up to speed with latest Encrypted Media spec. + https://bugs.webkit.org/show_bug.cgi?id=97037 + + Reviewed by Eric Carlson. + + Define the ENABLE_ENCRYPTED_MEDIA_V2 setting. + + * Configurations/FeatureDefines.xcconfig: + +2013-02-08 Gavin Barraclough + + Objective-C API for JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=105889 + + Reviewed by Joseph Pecoraro + + Following up on review comments, mostly typos. + + * API/JSBlockAdaptor.h: + * API/JSBlockAdaptor.mm: + (-[JSBlockAdaptor blockFromValue:inContext:withException:]): + * API/JSContext.h: + * API/JSExport.h: + * API/JSValue.h: + * API/JSValue.mm: + * API/JSWrapperMap.mm: + (selectorToPropertyName): + (-[JSWrapperMap classInfoForClass:]): + (-[JSWrapperMap wrapperForObject:]): + +2013-02-08 Martin Robinson + + [GTK] Add an experimental gyp build + https://bugs.webkit.org/show_bug.cgi?id=109003 + + Reviewed by Gustavo Noronha Silva. + + * JavaScriptCore.gypi: Update the list of source files to include those + necessary for the GTK+ build. + +2013-02-08 Andreas Kling + + JSC: Lower minimum PropertyTable size. + + + Reviewed by Darin Adler. + + Lower the minimum table size for PropertyTable from 16 to 8. + 3.32 MB progression on Membuster3 (a ~13% reduction in memory used by PropertyTables.) + + * runtime/PropertyMapHashTable.h: + (PropertyTable): + (JSC::PropertyTable::sizeForCapacity): + +2013-02-07 Roger Fong + + Unreviewed. More VS2010 WebKit solution touchups. + Make JavaScriptCoreExports.def.in be treated as a custom build file so that changes to it cause the exports to be rebuilt. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: + +2013-02-07 Mark Hahnenberg + + Objective-C API: testapi.mm should use ARC + https://bugs.webkit.org/show_bug.cgi?id=107838 + + Reviewed by Mark Rowe. + + Removing the changes to the Xcode project file and moving the equivalent flags into + the ToolExecutable xcconfig file. + + * Configurations/ToolExecutable.xcconfig: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-02-07 Brent Fulgham + + [Windows] Unreviewed Visual Studio 2010 build fixes after r142179. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Correct changed symbols + * JavaScriptCore.vcxproj/JavaScriptCoreExports.def: Removed autogenerated file. + +2013-02-05 Filip Pizlo + + DFG::ByteCodeParser should do surgical constant folding to reduce load on the optimization fixpoint + https://bugs.webkit.org/show_bug.cgi?id=109000 + + Reviewed by Oliver Hunt. + + Previously our source parser's ASTBuilder did some surgical constant folding, but it + didn't cover some cases. It was particularly incapable of doing constant folding for + cases where we do some minimal loop peeling in the bytecode generator - since it + didn't "see" those constants prior to the peeling. Example: + + for (var i = 0; i < 4; ++i) + things; + + This will get peeled just a bit by the bytecode generator, so that the "i < 4" is + duplicated both at the top of the loop and the bottom. This means that we have a + constant comparison: "0 < 4", which the bytecode generator emits without any further + thought. + + The DFG optimization fixpoint of course folds this and simplifies the CFG + accordingly, but this incurs a compile-time cost. The purpose of this change is to + do some surgical constant folding in the DFG's bytecode parser, so that such + constructs reduce load on the CFG simplifier and the optimization fixpoint. The goal + is not to cover all cases, since the DFG CFA and CFG simplifier have a powerful + sparse conditional constant propagation that we can always fall back on. Instead the + goal is to cover enough cases that for common small functions we don't have to + perform such transformations, thereby reducing compile times. + + This also refactors m_inlineStackEntry->m_inlineCallFrame to be a handy method call + and also adds the notion of a TriState-based JSValue::pureToBoolean(). Both of these + things are used by the folder. + + As well, care has been taken to make sure that the bytecode parser only does folding + that is statically provable, and that doesn't arise out of speculation. This means + we cannot fold on data flow that crosses inlining boundaries. On the other hand, the + folding that the bytecode parser uses doesn't require phantoming anything. Such is + the trade-off: for anything that we do need phantoming, we defer it to the + optimization fixpoint. + + Slight SunSpider speed-up. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::get): + (JSC::DFG::ByteCodeParser::getLocal): + (JSC::DFG::ByteCodeParser::setLocal): + (JSC::DFG::ByteCodeParser::flushDirect): + (JSC::DFG::ByteCodeParser::flushArgumentsAndCapturedVariables): + (JSC::DFG::ByteCodeParser::toInt32): + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::inlineCallFrame): + (JSC::DFG::ByteCodeParser::currentCodeOrigin): + (JSC::DFG::ByteCodeParser::canFold): + (JSC::DFG::ByteCodeParser::handleInlining): + (JSC::DFG::ByteCodeParser::getScope): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * dfg/DFGNode.h: + (JSC::DFG::Node::isStronglyProvedConstantIn): + (Node): + * runtime/JSCJSValue.h: + * runtime/JSCJSValueInlines.h: + (JSC::JSValue::pureToBoolean): + (JSC): + +2013-02-07 Zoltan Herczeg + + Invalid code is generated for storing constants with baseindex addressing modes on ARM traditional. + https://bugs.webkit.org/show_bug.cgi?id=109050 + + Reviewed by Oliver Hunt. + + The S! scratch register is reused, but it should contain the constant value. + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::baseIndexTransfer32): + (JSC::ARMAssembler::baseIndexTransfer16): + +2013-02-07 Andras Becsi + + [Qt] Use GNU ar's thin archive format for intermediate static libs + https://bugs.webkit.org/show_bug.cgi?id=109052 + + Reviewed by Jocelyn Turcotte. + + Adjust project files that used activeBuildConfig() + to use targetSubDir(). + + * JavaScriptCore.pri: + * LLIntOffsetsExtractor.pro: + * Target.pri: + +2013-02-06 Roger Fong + + Unreviewed. Touchups to VS2010 WebKit solution. + Fix an export generator script, modify some property sheets, add resouce file. + + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorDebug.props: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props: + * JavaScriptCore.vcxproj/resource.h: Added. + +2013-02-06 Ilya Tikhonovsky + + Web Inspector: Native Memory Instrumentation: assign class name to the heap graph node automatically + https://bugs.webkit.org/show_bug.cgi?id=107262 + + Reviewed by Yury Semikhatsky. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-02-06 Mike West + + Add an ENABLE_NOSNIFF feature flag. + https://bugs.webkit.org/show_bug.cgi?id=109029 + + Reviewed by Jochen Eisinger. + + This new flag will control the behavior of 'X-Content-Type-Options: nosniff' + when processing script and other resource types. + + * Configurations/FeatureDefines.xcconfig: + +2013-02-05 Mark Hahnenberg + + put_to_base should emit a Phantom for "value" across the ForceOSRExit + https://bugs.webkit.org/show_bug.cgi?id=108998 + + Reviewed by Oliver Hunt. + + Otherwise, the OSR exit compiler could clobber it, which would lead to badness. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::tallyFrequentExitSites): Build fixes for when DFG debug logging is enabled. + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): Added extra Phantoms for the "value" field where needed. + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compile): Ditto. + +2013-02-05 Michael Saboff + + Crash at JSC::call when loading www.gap.com with JSVALUE32_64 Enabled + https://bugs.webkit.org/show_bug.cgi?id=108991 + + Reviewed by Oliver Hunt. + + Changed the restoration from calleeGPR to nonArgGPR0 because the restoration of the return location + may step on calleeGPR is it happen to be nonArgGPR2. + + * dfg/DFGRepatch.cpp: + (JSC::DFG::dfgLinkClosureCall): + +2013-02-05 Roger Fong + + Add a JavaScriptCore Export Generator project. + https://bugs.webkit.org/show_bug.cgi?id=108971. + + Reviewed by Brent Fulgham. + + * JavaScriptCore.vcxproj/JavaScriptCore.sln: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.user: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorBuildCmd.cmd: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorDebug.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPreBuild.cmd: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Added. + +2013-02-04 Filip Pizlo + + DFG should have a precise view of jump targets + https://bugs.webkit.org/show_bug.cgi?id=108868 + + Reviewed by Oliver Hunt. + + Previously, the DFG relied entirely on the CodeBlock's jump targets list for + determining when to break basic blocks. This worked great, except sometimes it + would be too conservative since the CodeBlock just says where the bytecode + generator inserted labels. + + This change keeps the old jump target list in CodeBlock since it is still + valuable to the baseline JIT, but switches the DFG to use its own jump target + calculator. This ought to reduce pressure on the DFG simplifier, which would + previously do a lot of work to try to merge redundantly created basic blocks. + It appears to be a 1% progression on SunSpider. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/PreciseJumpTargets.cpp: Added. + (JSC): + (JSC::addSimpleSwitchTargets): + (JSC::computePreciseJumpTargets): + * bytecode/PreciseJumpTargets.h: Added. + (JSC): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseCodeBlock): + +2013-02-01 Roger Fong + + Make ConfigurationBuildDir include directories precede WebKitLibraries in JSC. + https://bugs.webkit.org/show_bug.cgi?id=108693. + + Rubberstamped by Timothy Horton. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + +2013-02-04 Mark Hahnenberg + + Structure::m_outOfLineCapacity is unnecessary + https://bugs.webkit.org/show_bug.cgi?id=108206 + + Reviewed by Darin Adler. + + Simplifying the utility functions that we use since we don't need a + bunch of fancy templates for this one specific call site. + + * runtime/Structure.h: + (JSC::Structure::outOfLineCapacity): + +2013-02-05 Mark Hahnenberg + + Objective-C API: testapi.mm should use ARC + https://bugs.webkit.org/show_bug.cgi?id=107838 + + Reviewed by Oliver Hunt. + + In ToT testapi.mm uses the Obj-C garbage collector, which hides a lot of our object lifetime bugs. + We should enable ARC, since that is what most of our clients will be using. We use Xcode project + settings to make sure we don't try to compile ARC on 32-bit. + + * API/tests/testapi.mm: + (+[TestObject testObject]): + (testObjectiveCAPI): + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-02-05 Brent Fulgham + + [Windows] Unreviewed VS2010 Build Correction after r141651 + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing + StructureRareData.h and StructureRareData.cpp files. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto. + +2013-02-05 Michael Saboff + + r141788 won't build due to not having all changes needed by Node* change + https://bugs.webkit.org/show_bug.cgi?id=108944 + + Reviewed by David Kilzer. + + Fixed three instances of integerResult(..., m_compileIndex) to be integerResult(..., node). + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileSoftModulo): + (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARMv7s): + +2013-02-04 Sheriff Bot + + Unreviewed, rolling out r141809. + http://trac.webkit.org/changeset/141809 + https://bugs.webkit.org/show_bug.cgi?id=108860 + + ARC isn't supported on 32-bit. (Requested by mhahnenberg on + #webkit). + + * API/tests/testapi.mm: + (+[TestObject testObject]): + (testObjectiveCAPI): + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-02-04 Mark Hahnenberg + + Objective-C API: testapi.mm should use ARC + https://bugs.webkit.org/show_bug.cgi?id=107838 + + Reviewed by Oliver Hunt. + + In ToT testapi.mm uses the Obj-C garbage collector, which hides a lot of our object lifetime bugs. + We should enable ARC, since that is what most of our clients will be using. + + * API/tests/testapi.mm: + (-[TestObject init]): + (-[TestObject dealloc]): + (+[TestObject testObject]): + (testObjectiveCAPI): + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-02-04 Mark Hahnenberg + + Objective-C API: ObjCCallbackFunction should retain the target of its NSInvocation + https://bugs.webkit.org/show_bug.cgi?id=108843 + + Reviewed by Darin Adler. + + Currently, ObjCCallbackFunction doesn't retain the target of its NSInvocation. It needs to do + this to prevent crashes when trying to invoke a callback later on. + + * API/ObjCCallbackFunction.mm: + (ObjCCallbackFunction::ObjCCallbackFunction): + (ObjCCallbackFunction::~ObjCCallbackFunction): + +2013-02-04 Martin Robinson + + Fix GTK+ 'make dist' in preparation for the 1.11.5 release. + + * GNUmakefile.list.am: Update the source lists. + +2013-02-04 Michael Saboff + + For ARMv7s use integer divide instruction for divide and modulo when possible + https://bugs.webkit.org/show_bug.cgi?id=108840 + + Reviewed in person by Filip Pizlo. + + Added ARMv7s integer divide path for ArithDiv and ArithMod where operands and results are integer. + This is patterned after the similar code for X86. Also added modulo power of 2 optimization + that uses logical and. Added sdiv and udiv to the ARMv7 disassembler. Put all the changes + behind #if CPU(APPLE_ARMV7S). + + * assembler/ARMv7Assembler.h: + (ARMv7Assembler): + (JSC::ARMv7Assembler::sdiv): + (JSC::ARMv7Assembler::udiv): + * dfg/DFGCommon.h: + (JSC::DFG::isARMv7s): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileSoftModulo): + (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARMv7s): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-02-04 David Kilzer + + Check PrivateHeaders/JSBasePrivate.h for inappropriate macros + + + Reviewed by Joseph Pecoraro. + + * JavaScriptCore.xcodeproj/project.pbxproj: Add + PrivateHeaders/JSBasePrivate.h to list of headers to check in + "Check for Inappropriate Macros in External Headers" build phase + script. + +2013-02-04 David Kilzer + + Remove duplicate entries from JavaScriptCore Xcode project + + $ uniq Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj | diff -u - Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj | patch -p0 -R + patching file Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj + + * JavaScriptCore.xcodeproj/project.pbxproj: Remove duplicates. + +2013-02-04 David Kilzer + + Sort JavaScriptCore Xcode project file + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-02-03 David Kilzer + + Upstream ENABLE_PDFKIT_PLUGIN settting + + + Reviewed by Tim Horton. + + * Configurations/FeatureDefines.xcconfig: Disable PDFKIT_PLUGIN + on iOS since PDFKit is a Mac-only framework. + +2013-02-02 Andreas Kling + + Vector should consult allocator about ideal size when choosing capacity. + + + + Reviewed by Benjamin Poulain. + + Remove assertion about Vector capacity that won't hold anymore since capacity() + may not be what you passed to reserveCapacity(). + Also export WTF::fastMallocGoodSize() for Windows builds. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + +2013-02-02 Patrick Gansterer + + [CMake] Adopt the WinCE port to new CMake + https://bugs.webkit.org/show_bug.cgi?id=108754 + + Reviewed by Laszlo Gombos. + + * os-win32/WinMain.cpp: Removed. + * shell/PlatformWinCE.cmake: Removed. + +2013-02-02 Mark Rowe + + WTF shouldn't use a script build phase to detect the presence of headers when the compiler can do it for us + + Reviewed by Sam Weinig. + + * DerivedSources.make: Remove an obsolete Makefile rule. This should have been removed when the use + of the generated file moved to WTF. + +2013-02-02 David Kilzer + + Upstream iOS FeatureDefines + + + Reviewed by Anders Carlsson. + + * Configurations/FeatureDefines.xcconfig: + - ENABLE_DEVICE_ORIENTATION: Add iOS configurations. + - ENABLE_PLUGIN_PROXY_FOR_VIDEO: Ditto. + - FEATURE_DEFINES: Add ENABLE_PLUGIN_PROXY_FOR_VIDEO. Add + PLATFORM_NAME variant to reduce future merge conflicts. + +2013-02-01 Mark Hahnenberg + + Structure::m_enumerationCache should be moved to StructureRareData + https://bugs.webkit.org/show_bug.cgi?id=108723 + + Reviewed by Oliver Hunt. + + m_enumerationCache is only used by objects whose properties are iterated over, so not every Structure needs this + field and it can therefore be moved safely to StructureRareData to help with memory savings. + + * runtime/JSPropertyNameIterator.h: + (JSPropertyNameIterator): + (JSC::Register::propertyNameIterator): + (JSC::StructureRareData::enumerationCache): Add to JSPropertyNameIterator.h so that it can see the correct type. + (JSC::StructureRareData::setEnumerationCache): Ditto. + * runtime/Structure.cpp: + (JSC::Structure::addPropertyWithoutTransition): Use the enumerationCache() getter rather than accessing the field. + (JSC::Structure::removePropertyWithoutTransition): Ditto. + (JSC::Structure::visitChildren): We no longer have to worry about marking the m_enumerationCache field. + * runtime/Structure.h: + (JSC::Structure::setEnumerationCache): Move the old accessors back since we don't have to have any knowledge of + the JSPropertyNameIterator type. + (JSC::Structure::enumerationCache): Ditto. + * runtime/StructureRareData.cpp: + (JSC::StructureRareData::visitChildren): Mark the new m_enumerationCache field. + * runtime/StructureRareData.h: Add new functions/fields. + (StructureRareData): + +2013-02-01 Roger Fong + + Unreviewed. JavaScriptCore VS2010 project cleanup. + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: + * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: + +2013-02-01 Sheriff Bot + + Unreviewed, rolling out r141662. + http://trac.webkit.org/changeset/141662 + https://bugs.webkit.org/show_bug.cgi?id=108738 + + it's an incorrect change since processPhiStack will + dereference dangling BasicBlock pointers (Requested by pizlo + on #webkit). + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parse): + +2013-02-01 Filip Pizlo + + Eliminate dead blocks sooner in the DFG::ByteCodeParser to make clear that you don't need to hold onto them during Phi construction + https://bugs.webkit.org/show_bug.cgi?id=108717 + + Reviewed by Mark Hahnenberg. + + I think this makes the code clearer. It doesn't change behavior. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parse): + +2013-02-01 Mark Hahnenberg + + Structure should have a StructureRareData field to save space + https://bugs.webkit.org/show_bug.cgi?id=108659 + + Reviewed by Oliver Hunt. + + Many of the fields in Structure are used in a subset of all total Structures; however, all Structures must + pay the memory cost of those fields, regardless of whether they use them or not. Since we can have potentially + many Structures on a single page (e.g. bing.com creates ~1500 Structures), it would be profitable to + refactor Structure so that not every Structure has to pay the memory costs for these infrequently used fields. + + To accomplish this, we can create a new StructureRareData class to house these seldom used fields which we + can allocate on demand whenever a Structure requires it. This StructureRareData can itself be a JSCell, and + can do all the marking of the fields for the Structure. The StructureRareData field will be part of a union + with m_previous to minimize overhead. We'll add a new field to JSTypeInfo to indicate that the Structure has + a StructureRareData field. During transitions, a Structure will clone its previous Structure's StructureRareData + if it has one. There could be some potential for optimizing this process, but the initial implementation will + be dumb since we'd be paying these overhead costs for each Structure anyways. + + Initially we'll only put two fields in the StructureRareData to avoid a memory regression. Over time we'll + continue to move fields from Structure to StructureRareData. Optimistically, this could potentially reduce our + Structure memory footprint by up to around 75%. It could also clear the way for removing destructors from + Structures (and into StructureRareData). + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGRepatch.cpp: Includes for linking purposes. + * jit/JITStubs.cpp: + * jsc.cpp: + * llint/LLIntSlowPaths.cpp: + * runtime/JSCellInlines.h: Added ifdef guards. + * runtime/JSGlobalData.cpp: New Structure for StructureRareData class. + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/JSGlobalObject.h: + * runtime/JSTypeInfo.h: New flag to indicate whether or not a Structure has a StructureRareData field. + (JSC::TypeInfo::flags): + (JSC::TypeInfo::structureHasRareData): + * runtime/ObjectPrototype.cpp: + * runtime/Structure.cpp: We use a combined WriteBarrier field m_previousOrRareData to avoid compiler issues. + (JSC::Structure::dumpStatistics): + (JSC::Structure::Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::pin): + (JSC::Structure::allocateRareData): Handles allocating a brand new StructureRareData field. + (JSC::Structure::cloneRareDataFrom): Handles cloning a StructureRareData field from another. Used during Structure + transitions. + (JSC::Structure::visitChildren): We no longer have to worry about marking m_objectToStringValue. + * runtime/Structure.h: + (JSC::Structure::previousID): Checks the structureHasRareData flag to see where it should get the previous Structure. + (JSC::Structure::objectToStringValue): Reads the value from the StructureRareData. If it doesn't exist, returns 0. + (JSC::Structure::setObjectToStringValue): Ensures that we have a StructureRareData field, then forwards the function + call to it. + (JSC::Structure::materializePropertyMapIfNecessary): + (JSC::Structure::setPreviousID): Checks for StructureRareData and forwards if necessary. + (Structure): + (JSC::Structure::clearPreviousID): Ditto. + (JSC::Structure::create): + * runtime/StructureRareData.cpp: Added. All of the basic functionality of a JSCell with the fields that we've moved + from Structure and the functions required to access/modify those fields as Structure would have done. + (JSC): + (JSC::StructureRareData::createStructure): + (JSC::StructureRareData::create): + (JSC::StructureRareData::clone): + (JSC::StructureRareData::StructureRareData): + (JSC::StructureRareData::visitChildren): + * runtime/StructureRareData.h: Added. + (JSC): + (StructureRareData): + * runtime/StructureRareDataInlines.h: Added. + (JSC): + (JSC::StructureRareData::previousID): + (JSC::StructureRareData::setPreviousID): + (JSC::StructureRareData::clearPreviousID): + (JSC::Structure::previous): Handles the ugly casting to get the value of the right type of m_previousOrRareData. + (JSC::Structure::rareData): Ditto. + (JSC::StructureRareData::objectToStringValue): + (JSC::StructureRareData::setObjectToStringValue): + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGRepatch.cpp: + * jit/JITStubs.cpp: + * jsc.cpp: + * llint/LLIntSlowPaths.cpp: + * runtime/JSCellInlines.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/JSGlobalObject.h: + * runtime/JSTypeInfo.h: + (JSC): + (JSC::TypeInfo::flags): + (JSC::TypeInfo::structureHasRareData): + * runtime/ObjectPrototype.cpp: + * runtime/Structure.cpp: + (JSC::Structure::dumpStatistics): + (JSC::Structure::Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::pin): + (JSC::Structure::allocateRareData): + (JSC): + (JSC::Structure::cloneRareDataFrom): + (JSC::Structure::visitChildren): + * runtime/Structure.h: + (JSC::Structure::previousID): + (JSC::Structure::objectToStringValue): + (JSC::Structure::setObjectToStringValue): + (JSC::Structure::materializePropertyMapIfNecessary): + (JSC::Structure::setPreviousID): + (Structure): + (JSC::Structure::clearPreviousID): + (JSC::Structure::previous): + (JSC::Structure::rareData): + (JSC::Structure::create): + * runtime/StructureRareData.cpp: Added. + (JSC): + (JSC::StructureRareData::createStructure): + (JSC::StructureRareData::create): + (JSC::StructureRareData::clone): + (JSC::StructureRareData::StructureRareData): + (JSC::StructureRareData::visitChildren): + * runtime/StructureRareData.h: Added. + (JSC): + (StructureRareData): + * runtime/StructureRareDataInlines.h: Added. + (JSC): + (JSC::StructureRareData::previousID): + (JSC::StructureRareData::setPreviousID): + (JSC::StructureRareData::clearPreviousID): + (JSC::StructureRareData::objectToStringValue): + (JSC::StructureRareData::setObjectToStringValue): + +2013-02-01 Balazs Kilvady + + offlineasm BaseIndex handling is broken on ARM due to MIPS changes + https://bugs.webkit.org/show_bug.cgi?id=108261 + + Reviewed by Filip Pizlo. + + offlineasm BaseIndex handling fix on MIPS. + + * offlineasm/mips.rb: + * offlineasm/risc.rb: + +2013-02-01 Geoffrey Garen + + Removed an unused function: JSGlobalObject::createFunctionExecutableFromGlobalCode + https://bugs.webkit.org/show_bug.cgi?id=108657 + + Reviewed by Anders Carlsson. + + * runtime/JSGlobalObject.cpp: + (JSC): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + +2013-02-01 Geoffrey Garen + + Added TriState to WTF and started using it in one place + https://bugs.webkit.org/show_bug.cgi?id=108628 + + Reviewed by Beth Dakin. + + * runtime/PrototypeMap.h: + (JSC::PrototypeMap::isPrototype): Use TriState instead of boolean. In + response to review feedback, this is an attempt to clarify that our + 'true' condition is actually just a 'maybe'. + + * runtime/PrototypeMap.h: + (PrototypeMap): + (JSC::PrototypeMap::isPrototype): + +2013-02-01 Alexis Menard + + Enable unprefixed CSS transitions by default. + https://bugs.webkit.org/show_bug.cgi?id=108216 + + Reviewed by Dean Jackson. + + Rename the flag CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED + to CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED which will be used later to + guard the unprefixing work for CSS Transforms and animations. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-31 Filip Pizlo + + DFG::CFGSimplificationPhase::keepOperandAlive() conflates liveness and availability + https://bugs.webkit.org/show_bug.cgi?id=108580 + + Reviewed by Oliver Hunt. + + This is a harmless bug in that it only results in us keeping a bit too many things + for OSR. But it's worth fixing so that the code is consistent. + + keepOperandAlive() is called when block A has a branch to blocks B and C, but the + A->B edge is proven to never be taken and we want to optimize the code to have A + unconditionally jump to C. In that case, for the purposes of OSR, we need to + preserve the knowledge that the state that B expected to be live incoming from A + ought still to be live up to the point of where the A->B,C branch used to be. The + way we keep things alive is by using the variablesAtTail of A (i.e., we use the + knowledge of in what manner A made state available to B and C). The way we choose + which state should be kept alive ought to be chosen by the variablesAtHead of B + (i.e. the things B says it needs from its predecessors, including A), except that + keepOperandAlive() was previously just using variablesAtTail of A for this + purpose. + + The fix is to have keepOperandAlive() use both liveness and availability in its + logic. It should use liveness (i.e. B->variablesAtHead) to decide what to keep + alive, and it should use availability (i.e. A->variablesAtTail) to decide how to + keep it alive. + + This might be a microscopic win on some programs, but it's mainly intended to be + a code clean-up so that I don't end up scratching my head in confusion the next + time I look at this code. + + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::keepOperandAlive): + (JSC::DFG::CFGSimplificationPhase::jettisonBlock): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + +2013-01-31 Geoffrey Garen + + REGRESSION (r141192): Crash beneath cti_op_get_by_id_generic @ discussions.apple.com + https://bugs.webkit.org/show_bug.cgi?id=108576 + + Reviewed by Filip Pizlo. + + This was a long-standing bug. The DFG would destructively reuse a register + in op_convert_this, but: + + * The bug only presented during speculation failure for type Other + + * The bug presented by removing the low bits of a pointer, which + used to be harmless, since all objects were so aligned anyway. + + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): Don't reuse our this register as + our scratch register. The whole point of our scratch register is to + avoid destructively modifying our this register. I'm pretty sure this + was a copy-paste error. + +2013-01-31 Roger Fong + + Unreviewed. Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-01-31 Jessie Berlin + + Rolling out r141407 because it is causing crashes under + WTF::TCMalloc_Central_FreeList::FetchFromSpans() in Release builds. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + +2013-01-31 Mark Hahnenberg + + Objective-C API: JSContext exception property causes reference cycle + https://bugs.webkit.org/show_bug.cgi?id=107778 + + Reviewed by Darin Adler. + + JSContext has a (retain) JSValue * exception property which, when non-null, creates a + reference cycle (since the JSValue * holds a strong reference back to the JSContext *). + + * API/JSContext.mm: Instead of JSValue *, we now use a plain JSValueRef, which eliminates the reference cycle. + (-[JSContext initWithVirtualMachine:]): + (-[JSContext setException:]): + (-[JSContext exception]): + +2013-01-31 Roger Fong + + Unreviewed build fix. Win7 port. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-01-31 Joseph Pecoraro + + Disable ENABLE_FULLSCREEN_API on iOS + https://bugs.webkit.org/show_bug.cgi?id=108250 + + Reviewed by Benjamin Poulain. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-31 Mark Hahnenberg + + Objective-C API: Fix insertion of values greater than the max index allowed by the spec + https://bugs.webkit.org/show_bug.cgi?id=108264 + + Reviewed by Oliver Hunt. + + Fixed a bug, added a test to the API tests, cleaned up some code. + + * API/JSValue.h: Changed some of the documentation on setValue:atIndex: to indicate that + setting values at indices greater than UINT_MAX - 1 wont' affect the length of JS arrays. + * API/JSValue.mm: + (-[JSValue valueAtIndex:]): We weren't returning when we should have been. + (-[JSValue setValue:atIndex:]): Added a comment about why we do the early check for being larger than UINT_MAX. + (objectToValueWithoutCopy): Removed two redundant cases that were already checked previously. + * API/tests/testapi.mm: + +2013-01-30 Andreas Kling + + Vector should consult allocator about ideal size when choosing capacity. + + + + Reviewed by Benjamin Poulain. + + Remove assertion about Vector capacity that won't hold anymore since capacity() + may not be what you passed to reserveCapacity(). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + +2013-01-30 Filip Pizlo + + DFG bytecode parser should have more assertions about the status of local accesses + https://bugs.webkit.org/show_bug.cgi?id=108417 + + Reviewed by Mark Hahnenberg. + + Assert some things that we already know to be true, just to reassure ourselves that they are true. + This is meant as a prerequisite for https://bugs.webkit.org/show_bug.cgi?id=108414, which will + make these rules even stricter. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getLocal): + (JSC::DFG::ByteCodeParser::getArgument): + +2013-01-30 Mark Hahnenberg + + Objective-C API: JSContext's dealloc causes ASSERT due to ordering of releases + https://bugs.webkit.org/show_bug.cgi?id=107978 + + Reviewed by Filip Pizlo. + + We need to add the Identifier table save/restore in JSContextGroupRelease so that we + have the correct table if we end up destroying the JSGlobalData/Heap. + + * API/JSContextRef.cpp: + (JSContextGroupRelease): + +2013-01-30 Mark Hahnenberg + + Objective-C API: exceptionHandler needs to be released in JSContext dealloc + https://bugs.webkit.org/show_bug.cgi?id=108378 + + Reviewed by Filip Pizlo. + + JSContext has a (copy) exceptionHandler property that it doesn't release in dealloc. + That sounds like the potential for a leak. It should be released. + + * API/JSContext.mm: + (-[JSContext dealloc]): + +2013-01-30 Filip Pizlo + + REGRESSION(140504): pure CSE no longer matches things, 10% regression on Kraken + https://bugs.webkit.org/show_bug.cgi?id=108366 + + Reviewed by Geoffrey Garen and Mark Hahnenberg. + + This was a longstanding bug that was revealed by http://trac.webkit.org/changeset/140504. + Pure CSE requires that the Node::flags() that may affect the behavior of a node match, + when comparing a possibly redundant node to its possible replacement. It was doing this + by comparing Node::arithNodeFlags(), which as the name might appear to suggest, returns + just those flag bits that correspond to actual node behavior and not auxiliary things. + Unfortunately, Node::arithNodeFlags() wasn't actually masking off the irrelevant bits. + This worked prior to r140504 because CSE itself didn't mutate the flags, so there was a + very high probability that matching nodes would also have completely identical flag bits + (even the ones that aren't relevant to arithmetic behavior, like NodeDoesNotExit). But + r140504 moved one of CSE's side-tables (m_relevantToOSR) into a flag bit for quicker + access. These bits would be mutated as the CSE ran over a basic block, in such a way that + there was a very high probability that the possible replacement would already have the + bit set, while the redundant node did not have the bit set. Since Node::arithNodeFlags() + returned all of the bits, this would cause CSEPhase::pureCSE() to reject the match + almost every time. + + The solution is to make Node::arithNodeFlags() do as its name suggests: only return those + flags that are relevant to arithmetic behavior. This patch introduces a new mask that + represents those bits, and includes NodeBehaviorMask and NodeBackPropMask, which are both + used for queries on Node::arithNodeFlags(), and both affect arithmetic code gen. None of + the other flags are relevant to Node::arithNodeFlags() since they either correspond to + information already conveyed by the opcode (like NodeResultMask, NodeMustGenerate, + NodeHasVarArgs, NodeClobbersWorld, NodeMightClobber) or information that doesn't affect + the result that the node will produce or any of the queries performed on the result of + Node::arithNodeFlags (NodeDoesNotExit and of course NodeRelevantToOSR). + + This is a 10% speed-up on Kraken, undoing the regression from r140504. + + * dfg/DFGNode.h: + (JSC::DFG::Node::arithNodeFlags): + * dfg/DFGNodeFlags.h: + (DFG): + +2013-01-29 Mark Hahnenberg + + Structure::m_outOfLineCapacity is unnecessary + https://bugs.webkit.org/show_bug.cgi?id=108206 + + Reviewed by Geoffrey Garen. + + We can calculate our out of line capacity by using the outOfLineSize and our knowledge about our resize policy. + According to GDB, this knocks Structures down from 136 bytes to 128 bytes (I'm guessing the extra bytes are from + better alignment of object fields), which puts Structures in a smaller size class. Woohoo! Looks neutral on our + benchmarks. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC): + (JSC::Structure::suggestedNewOutOfLineStorageCapacity): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::addPropertyWithoutTransition): + * runtime/Structure.h: + (Structure): + (JSC::Structure::outOfLineCapacity): + (JSC::Structure::totalStorageCapacity): + +2013-01-29 Geoffrey Garen + + Be a little more conservative about emitting table-based switches + https://bugs.webkit.org/show_bug.cgi?id=108292 + + Reviewed by Filip Pizlo. + + Profiling shows we're using op_switch in cases where it's a regression. + + * bytecompiler/NodesCodegen.cpp: + (JSC): + (JSC::length): + (JSC::CaseBlockNode::tryTableSwitch): + (JSC::CaseBlockNode::emitBytecodeForBlock): + * parser/Nodes.h: + (CaseBlockNode): + +2013-01-29 Sheriff Bot + + Unreviewed, rolling out r140983. + http://trac.webkit.org/changeset/140983 + https://bugs.webkit.org/show_bug.cgi?id=108277 + + Unfortunately, this API has one last client (Requested by + abarth on #webkit). + + * Configurations/FeatureDefines.xcconfig: + +2013-01-29 Mark Hahnenberg + + Objective-C API: JSObjCClassInfo creates reference cycle with JSContext + https://bugs.webkit.org/show_bug.cgi?id=107839 + + Reviewed by Geoffrey Garen. + + Fixing several ASSERTs that were incorrect along with some of the reallocation of m_prototype and + m_constructor that they were based on. + + * API/JSWrapperMap.mm: + (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): We now only allocate those + fields that are null (i.e. have been collected or have never been allocated to begin with). + (-[JSObjCClassInfo reallocateConstructorAndOrPrototype]): Renamed to better indicate that we're + reallocating one or both of the prototype/constructor combo. + (-[JSObjCClassInfo wrapperForObject:]): Call new reallocate function. + (-[JSObjCClassInfo constructor]): Ditto. + +2013-01-29 Geoffrey Garen + + Make precise size classes more precise + https://bugs.webkit.org/show_bug.cgi?id=108270 + + Reviewed by Mark Hahnenberg. + + Size inference makes this profitable. + + I chose 8 byte increments because JSString is 24 bytes. Otherwise, 16 + byte increments might be better. + + * heap/Heap.h: + (Heap): Removed firstAllocatorWithoutDestructors because it's unused now. + + * heap/MarkedBlock.h: + (MarkedBlock): Updated constants. + + * heap/MarkedSpace.h: + (MarkedSpace): + (JSC): Also reduced the maximum precise size class because my testing + has shown that the smaller size classes are much more common. This + offsets some of the size class explosion caused by reducing the precise + increment. + + * llint/LLIntData.cpp: + (JSC::LLInt::Data::performAssertions): No need for this ASSERT anymore + because we don't rely on firstAllocatorWithoutDestructors anymore, since + we pick size classes dynamically now. + +2013-01-29 Oliver Hunt + + Add some hardening to methodTable() + https://bugs.webkit.org/show_bug.cgi?id=108253 + + Reviewed by Mark Hahnenberg. + + When accessing methodTable() we now always make sure that our + structure _could_ be valid. Added a separate method to get a + classes methodTable during destruction as it's not possible to + validate the structure at that point. This separation might + also make it possible to improve the performance of methodTable + access more generally in future. + + * heap/MarkedBlock.cpp: + (JSC::MarkedBlock::callDestructor): + * runtime/JSCell.h: + (JSCell): + * runtime/JSCellInlines.h: + (JSC::JSCell::methodTableForDestruction): + (JSC): + (JSC::JSCell::methodTable): + +2013-01-29 Filip Pizlo + + offlineasm BaseIndex handling is broken on ARM due to MIPS changes + https://bugs.webkit.org/show_bug.cgi?id=108261 + + Reviewed by Oliver Hunt. + + Backends shouldn't override each other's methods. That's not cool. + + * offlineasm/mips.rb: + +2013-01-29 Filip Pizlo + + cloop.rb shouldn't use a method called 'dump' for code generation + https://bugs.webkit.org/show_bug.cgi?id=108251 + + Reviewed by Mark Hahnenberg. + + Revert http://trac.webkit.org/changeset/141178 and rename 'dump' to 'clDump'. + + Also made trivial build fixes for !ENABLE(JIT). + + * offlineasm/cloop.rb: + * runtime/Executable.h: + (ExecutableBase): + (JSC::ExecutableBase::intrinsicFor): + * runtime/JSGlobalData.h: + +2013-01-29 Geoffrey Garen + + Removed GGC because it has been disabled for a long time + https://bugs.webkit.org/show_bug.cgi?id=108245 + + Reviewed by Filip Pizlo. + + * GNUmakefile.list.am: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGRepatch.cpp: + (JSC::DFG::emitPutReplaceStub): + (JSC::DFG::emitPutTransitionStub): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::writeBarrier): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * heap/CardSet.h: Removed. + * heap/Heap.cpp: + (JSC::Heap::markRoots): + (JSC::Heap::collect): + * heap/Heap.h: + (Heap): + (JSC::Heap::shouldCollect): + (JSC::Heap::isWriteBarrierEnabled): + (JSC): + (JSC::Heap::writeBarrier): + * heap/MarkedBlock.h: + (MarkedBlock): + (JSC): + * heap/MarkedSpace.cpp: + (JSC): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitWriteBarrier): + +2013-01-29 Filip Pizlo + + Remove redundant AST dump method from cloop.rb, since they are already defined in ast.rb + https://bugs.webkit.org/show_bug.cgi?id=108247 + + Reviewed by Oliver Hunt. + + Makes offlineasm dumping easier to read and less likely to cause assertion failures. + Also fixes the strange situation where cloop.rb and ast.rb both defined dump methods, + but cloop.rb was winning. + + * offlineasm/cloop.rb: + +2013-01-29 Mark Hahnenberg + + Objective-C API: JSObjCClassInfo creates reference cycle with JSContext + https://bugs.webkit.org/show_bug.cgi?id=107839 + + Reviewed by Oliver Hunt. + + JSContext has a JSWrapperMap, which has an NSMutableDictionary m_classMap, which has values that + are JSObjCClassInfo objects, which have strong references to two JSValue *'s, m_prototype and + m_constructor, which in turn have strong references to the JSContext, creating a reference cycle. + We should make m_prototype and m_constructor Weak. This gets rid of the strong reference + to the JSContext and also prevents clients from accidentally creating reference cycles by assigning + to the prototype of the constructor. If Weak fields are ever garbage collected, we will + reallocate them. + + * API/JSContext.mm: + (-[JSContext wrapperMap]): + * API/JSContextInternal.h: + * API/JSWrapperMap.mm: + (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]): + (-[JSObjCClassInfo dealloc]): + (-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): + (-[JSObjCClassInfo allocateConstructorAndPrototype]): + (-[JSObjCClassInfo wrapperForObject:]): + (-[JSObjCClassInfo constructor]): + +2013-01-29 Oliver Hunt + + REGRESSION (r140594): RELEASE_ASSERT_NOT_REACHED in JSC::Interpreter::execute + https://bugs.webkit.org/show_bug.cgi?id=108097 + + Reviewed by Geoffrey Garen. + + LiteralParser was accepting a bogus 'var a.b = c' statement + + * runtime/LiteralParser.cpp: + (JSC::::tryJSONPParse): + +2013-01-29 Oliver Hunt + + Force debug builds to do bounds checks on contiguous property storage + https://bugs.webkit.org/show_bug.cgi?id=108212 + + Reviewed by Mark Hahnenberg. + + Add a ContiguousData type that we use to represent contiguous property + storage. In release builds it is simply a pointer to the correct type, + but in debug builds it also carries the data length and performs bounds + checks. This means we don't have to add as many manual bounds assertions + when performing operations over contiguous data. + + * dfg/DFGOperations.cpp: + * runtime/ArrayStorage.h: + (ArrayStorage): + (JSC::ArrayStorage::vector): + * runtime/Butterfly.h: + (JSC::ContiguousData::ContiguousData): + (ContiguousData): + (JSC::ContiguousData::operator[]): + (JSC::ContiguousData::data): + (JSC::ContiguousData::length): + (JSC): + (JSC::Butterfly::contiguousInt32): + (Butterfly): + (JSC::Butterfly::contiguousDouble): + (JSC::Butterfly::contiguous): + * runtime/JSArray.cpp: + (JSC::JSArray::sortNumericVector): + (ContiguousTypeAccessor): + (JSC::ContiguousTypeAccessor::getAsValue): + (JSC::ContiguousTypeAccessor::setWithValue): + (JSC::ContiguousTypeAccessor::replaceDataReference): + (JSC): + (JSC::JSArray::sortCompactedVector): + (JSC::JSArray::sort): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToArguments): + * runtime/JSArray.h: + (JSArray): + * runtime/JSObject.cpp: + (JSC::JSObject::copyButterfly): + (JSC::JSObject::visitButterfly): + (JSC::JSObject::createInitialInt32): + (JSC::JSObject::createInitialDouble): + (JSC::JSObject::createInitialContiguous): + (JSC::JSObject::convertUndecidedToInt32): + (JSC::JSObject::convertUndecidedToDouble): + (JSC::JSObject::convertUndecidedToContiguous): + (JSC::JSObject::convertInt32ToDouble): + (JSC::JSObject::convertInt32ToContiguous): + (JSC::JSObject::genericConvertDoubleToContiguous): + (JSC::JSObject::convertDoubleToContiguous): + (JSC::JSObject::rageConvertDoubleToContiguous): + (JSC::JSObject::ensureInt32Slow): + (JSC::JSObject::ensureDoubleSlow): + (JSC::JSObject::ensureContiguousSlow): + (JSC::JSObject::rageEnsureContiguousSlow): + (JSC::JSObject::ensureLengthSlow): + * runtime/JSObject.h: + (JSC::JSObject::ensureInt32): + (JSC::JSObject::ensureDouble): + (JSC::JSObject::ensureContiguous): + (JSC::JSObject::rageEnsureContiguous): + (JSObject): + (JSC::JSObject::indexingData): + (JSC::JSObject::currentIndexingData): + +2013-01-29 Brent Fulgham + + [Windows, WinCairo] Unreviewed build fix after r141050 + + * JavaScriptCore.vcxproj/JavaScriptCoreExports.def: Update symbols + to match JavaScriptCore.vcproj version. + +2013-01-29 Allan Sandfeld Jensen + + [Qt] Implement GCActivityCallback + https://bugs.webkit.org/show_bug.cgi?id=103998 + + Reviewed by Simon Hausmann. + + Implements the activity triggered garbage collector. + + * runtime/GCActivityCallback.cpp: + (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): + (JSC::DefaultGCActivityCallback::scheduleTimer): + (JSC::DefaultGCActivityCallback::cancelTimer): + * runtime/GCActivityCallback.h: + (GCActivityCallback): + (DefaultGCActivityCallback): + +2013-01-29 Mikhail Pozdnyakov + + Compilation warning in JSC + https://bugs.webkit.org/show_bug.cgi?id=108178 + + Reviewed by Kentaro Hara. + + Fixed 'comparison between signed and unsigned integer' warning in JSC::Structure constructor. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + +2013-01-29 Jocelyn Turcotte + + [Qt] Fix the JSC build on Mac + + Unreviewed, build fix. + + * heap/HeapTimer.h: + Qt on Mac has USE(CF) true, and should use the CF HeapTimer in that case. + +2013-01-29 Allan Sandfeld Jensen + + [Qt] Implement IncrementalSweeper and HeapTimer + https://bugs.webkit.org/show_bug.cgi?id=103996 + + Reviewed by Simon Hausmann. + + Implements the incremental sweeping garbage collection for the Qt platform. + + * heap/HeapTimer.cpp: + (JSC::HeapTimer::HeapTimer): + (JSC::HeapTimer::~HeapTimer): + (JSC::HeapTimer::timerEvent): + (JSC::HeapTimer::synchronize): + (JSC::HeapTimer::invalidate): + (JSC::HeapTimer::didStartVMShutdown): + * heap/HeapTimer.h: + (HeapTimer): + * heap/IncrementalSweeper.cpp: + (JSC::IncrementalSweeper::IncrementalSweeper): + (JSC::IncrementalSweeper::scheduleTimer): + * heap/IncrementalSweeper.h: + (IncrementalSweeper): + +2013-01-28 Filip Pizlo + + DFG should not use a graph that is a vector, Nodes shouldn't move after allocation, and we should always refer to nodes by Node* + https://bugs.webkit.org/show_bug.cgi?id=106868 + + Reviewed by Oliver Hunt. + + This adds a pool allocator for Nodes, and uses that instead of a Vector. Changes all + uses of Node& and NodeIndex to be simply Node*. Nodes no longer have an index except + for debugging (Node::index(), which is not guaranteed to be O(1)). + + 1% speed-up on SunSpider, presumably because this improves compile times. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/DataFormat.h: + (JSC::dataFormatToString): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::initialize): + (JSC::DFG::AbstractState::booleanResult): + (JSC::DFG::AbstractState::execute): + (JSC::DFG::AbstractState::mergeStateAtTail): + (JSC::DFG::AbstractState::mergeToSuccessors): + (JSC::DFG::AbstractState::mergeVariableBetweenBlocks): + (JSC::DFG::AbstractState::dump): + * dfg/DFGAbstractState.h: + (DFG): + (JSC::DFG::AbstractState::forNode): + (AbstractState): + (JSC::DFG::AbstractState::speculateInt32Unary): + (JSC::DFG::AbstractState::speculateNumberUnary): + (JSC::DFG::AbstractState::speculateBooleanUnary): + (JSC::DFG::AbstractState::speculateInt32Binary): + (JSC::DFG::AbstractState::speculateNumberBinary): + (JSC::DFG::AbstractState::trySetConstant): + * dfg/DFGAbstractValue.h: + (AbstractValue): + * dfg/DFGAdjacencyList.h: + (JSC::DFG::AdjacencyList::AdjacencyList): + (JSC::DFG::AdjacencyList::initialize): + * dfg/DFGAllocator.h: Added. + (DFG): + (Allocator): + (JSC::DFG::Allocator::Region::size): + (JSC::DFG::Allocator::Region::headerSize): + (JSC::DFG::Allocator::Region::numberOfThingsPerRegion): + (JSC::DFG::Allocator::Region::data): + (JSC::DFG::Allocator::Region::isInThisRegion): + (JSC::DFG::Allocator::Region::regionFor): + (Region): + (JSC::DFG::::Allocator): + (JSC::DFG::::~Allocator): + (JSC::DFG::::allocate): + (JSC::DFG::::free): + (JSC::DFG::::freeAll): + (JSC::DFG::::reset): + (JSC::DFG::::indexOf): + (JSC::DFG::::allocatorOf): + (JSC::DFG::::bumpAllocate): + (JSC::DFG::::freeListAllocate): + (JSC::DFG::::allocateSlow): + (JSC::DFG::::freeRegionsStartingAt): + (JSC::DFG::::startBumpingIn): + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse): + (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUses): + (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse): + (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize): + (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::originalArrayStructure): + (JSC::DFG::ArrayMode::alreadyChecked): + * dfg/DFGArrayMode.h: + (ArrayMode): + * dfg/DFGArrayifySlowPathGenerator.h: + (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator): + * dfg/DFGBasicBlock.h: + (JSC::DFG::BasicBlock::node): + (JSC::DFG::BasicBlock::isInPhis): + (JSC::DFG::BasicBlock::isInBlock): + (BasicBlock): + * dfg/DFGBasicBlockInlines.h: + (DFG): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::getDirect): + (JSC::DFG::ByteCodeParser::get): + (JSC::DFG::ByteCodeParser::setDirect): + (JSC::DFG::ByteCodeParser::set): + (JSC::DFG::ByteCodeParser::setPair): + (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation): + (JSC::DFG::ByteCodeParser::getLocal): + (JSC::DFG::ByteCodeParser::setLocal): + (JSC::DFG::ByteCodeParser::getArgument): + (JSC::DFG::ByteCodeParser::setArgument): + (JSC::DFG::ByteCodeParser::flushDirect): + (JSC::DFG::ByteCodeParser::getToInt32): + (JSC::DFG::ByteCodeParser::toInt32): + (JSC::DFG::ByteCodeParser::getJSConstantForValue): + (JSC::DFG::ByteCodeParser::getJSConstant): + (JSC::DFG::ByteCodeParser::getCallee): + (JSC::DFG::ByteCodeParser::getThis): + (JSC::DFG::ByteCodeParser::setThis): + (JSC::DFG::ByteCodeParser::isJSConstant): + (JSC::DFG::ByteCodeParser::isInt32Constant): + (JSC::DFG::ByteCodeParser::valueOfJSConstant): + (JSC::DFG::ByteCodeParser::valueOfInt32Constant): + (JSC::DFG::ByteCodeParser::constantUndefined): + (JSC::DFG::ByteCodeParser::constantNull): + (JSC::DFG::ByteCodeParser::one): + (JSC::DFG::ByteCodeParser::constantNaN): + (JSC::DFG::ByteCodeParser::cellConstant): + (JSC::DFG::ByteCodeParser::addToGraph): + (JSC::DFG::ByteCodeParser::insertPhiNode): + (JSC::DFG::ByteCodeParser::addVarArgChild): + (JSC::DFG::ByteCodeParser::addCall): + (JSC::DFG::ByteCodeParser::addStructureTransitionCheck): + (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit): + (JSC::DFG::ByteCodeParser::getPrediction): + (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): + (JSC::DFG::ByteCodeParser::makeSafe): + (JSC::DFG::ByteCodeParser::makeDivSafe): + (JSC::DFG::ByteCodeParser::ConstantRecord::ConstantRecord): + (ConstantRecord): + (JSC::DFG::ByteCodeParser::PhiStackEntry::PhiStackEntry): + (PhiStackEntry): + (JSC::DFG::ByteCodeParser::handleCall): + (JSC::DFG::ByteCodeParser::emitFunctionChecks): + (JSC::DFG::ByteCodeParser::handleInlining): + (JSC::DFG::ByteCodeParser::setIntrinsicResult): + (JSC::DFG::ByteCodeParser::handleMinMax): + (JSC::DFG::ByteCodeParser::handleIntrinsic): + (JSC::DFG::ByteCodeParser::handleGetByOffset): + (JSC::DFG::ByteCodeParser::handleGetById): + (JSC::DFG::ByteCodeParser::getScope): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::processPhiStack): + (JSC::DFG::ByteCodeParser::linkBlock): + (JSC::DFG::ByteCodeParser::parseCodeBlock): + (JSC::DFG::ByteCodeParser::parse): + * dfg/DFGCFAPhase.cpp: + (JSC::DFG::CFAPhase::performBlockCFA): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::keepOperandAlive): + (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal): + (JSC::DFG::CFGSimplificationPhase::fixPhis): + (JSC::DFG::CFGSimplificationPhase::removePotentiallyDeadPhiReference): + (JSC::DFG::CFGSimplificationPhase::OperandSubstitution::OperandSubstitution): + (JSC::DFG::CFGSimplificationPhase::OperandSubstitution::dump): + (OperandSubstitution): + (JSC::DFG::CFGSimplificationPhase::skipGetLocal): + (JSC::DFG::CFGSimplificationPhase::recordNewTarget): + (JSC::DFG::CFGSimplificationPhase::fixTailOperand): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::canonicalize): + (JSC::DFG::CSEPhase::endIndexForPureCSE): + (JSC::DFG::CSEPhase::pureCSE): + (JSC::DFG::CSEPhase::constantCSE): + (JSC::DFG::CSEPhase::weakConstantCSE): + (JSC::DFG::CSEPhase::getCalleeLoadElimination): + (JSC::DFG::CSEPhase::getArrayLengthElimination): + (JSC::DFG::CSEPhase::globalVarLoadElimination): + (JSC::DFG::CSEPhase::scopedVarLoadElimination): + (JSC::DFG::CSEPhase::globalVarWatchpointElimination): + (JSC::DFG::CSEPhase::globalVarStoreElimination): + (JSC::DFG::CSEPhase::scopedVarStoreElimination): + (JSC::DFG::CSEPhase::getByValLoadElimination): + (JSC::DFG::CSEPhase::checkFunctionElimination): + (JSC::DFG::CSEPhase::checkExecutableElimination): + (JSC::DFG::CSEPhase::checkStructureElimination): + (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination): + (JSC::DFG::CSEPhase::putStructureStoreElimination): + (JSC::DFG::CSEPhase::getByOffsetLoadElimination): + (JSC::DFG::CSEPhase::putByOffsetStoreElimination): + (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination): + (JSC::DFG::CSEPhase::checkArrayElimination): + (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination): + (JSC::DFG::CSEPhase::getMyScopeLoadElimination): + (JSC::DFG::CSEPhase::getLocalLoadElimination): + (JSC::DFG::CSEPhase::setLocalStoreElimination): + (JSC::DFG::CSEPhase::performSubstitution): + (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren): + (JSC::DFG::CSEPhase::setReplacement): + (JSC::DFG::CSEPhase::eliminate): + (JSC::DFG::CSEPhase::performNodeCSE): + (JSC::DFG::CSEPhase::performBlockCSE): + (CSEPhase): + * dfg/DFGCommon.cpp: Added. + (DFG): + (JSC::DFG::NodePointerTraits::dump): + * dfg/DFGCommon.h: + (DFG): + (JSC::DFG::NodePointerTraits::defaultValue): + (NodePointerTraits): + (JSC::DFG::verboseCompilationEnabled): + (JSC::DFG::shouldDumpGraphAtEachPhase): + (JSC::DFG::validationEnabled): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): + (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck): + (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::Disassembler): + (JSC::DFG::Disassembler::createDumpList): + (JSC::DFG::Disassembler::dumpDisassembly): + * dfg/DFGDisassembler.h: + (JSC::DFG::Disassembler::setForNode): + (Disassembler): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGEdge.cpp: Added. + (DFG): + (JSC::DFG::Edge::dump): + * dfg/DFGEdge.h: + (JSC::DFG::Edge::Edge): + (JSC::DFG::Edge::node): + (JSC::DFG::Edge::operator*): + (JSC::DFG::Edge::operator->): + (Edge): + (JSC::DFG::Edge::setNode): + (JSC::DFG::Edge::useKind): + (JSC::DFG::Edge::setUseKind): + (JSC::DFG::Edge::isSet): + (JSC::DFG::Edge::shift): + (JSC::DFG::Edge::makeWord): + (JSC::DFG::operator==): + (JSC::DFG::operator!=): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupBlock): + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + (JSC::DFG::FixupPhase::fixIntEdge): + (JSC::DFG::FixupPhase::fixDoubleEdge): + (JSC::DFG::FixupPhase::injectInt32ToDoubleNode): + (FixupPhase): + * dfg/DFGGenerationInfo.h: + (JSC::DFG::GenerationInfo::GenerationInfo): + (JSC::DFG::GenerationInfo::initConstant): + (JSC::DFG::GenerationInfo::initInteger): + (JSC::DFG::GenerationInfo::initJSValue): + (JSC::DFG::GenerationInfo::initCell): + (JSC::DFG::GenerationInfo::initBoolean): + (JSC::DFG::GenerationInfo::initDouble): + (JSC::DFG::GenerationInfo::initStorage): + (GenerationInfo): + (JSC::DFG::GenerationInfo::node): + (JSC::DFG::GenerationInfo::noticeOSRBirth): + (JSC::DFG::GenerationInfo::use): + (JSC::DFG::GenerationInfo::appendFill): + (JSC::DFG::GenerationInfo::appendSpill): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::Graph): + (JSC::DFG::Graph::~Graph): + (DFG): + (JSC::DFG::Graph::dumpCodeOrigin): + (JSC::DFG::Graph::amountOfNodeWhiteSpace): + (JSC::DFG::Graph::printNodeWhiteSpace): + (JSC::DFG::Graph::dump): + (JSC::DFG::Graph::dumpBlockHeader): + (JSC::DFG::Graph::refChildren): + (JSC::DFG::Graph::derefChildren): + (JSC::DFG::Graph::predictArgumentTypes): + (JSC::DFG::Graph::collectGarbage): + (JSC::DFG::Graph::determineReachability): + (JSC::DFG::Graph::resetExitStates): + * dfg/DFGGraph.h: + (Graph): + (JSC::DFG::Graph::ref): + (JSC::DFG::Graph::deref): + (JSC::DFG::Graph::changeChild): + (JSC::DFG::Graph::compareAndSwap): + (JSC::DFG::Graph::clearAndDerefChild): + (JSC::DFG::Graph::clearAndDerefChild1): + (JSC::DFG::Graph::clearAndDerefChild2): + (JSC::DFG::Graph::clearAndDerefChild3): + (JSC::DFG::Graph::convertToConstant): + (JSC::DFG::Graph::getJSConstantSpeculation): + (JSC::DFG::Graph::addSpeculationMode): + (JSC::DFG::Graph::valueAddSpeculationMode): + (JSC::DFG::Graph::arithAddSpeculationMode): + (JSC::DFG::Graph::addShouldSpeculateInteger): + (JSC::DFG::Graph::mulShouldSpeculateInteger): + (JSC::DFG::Graph::negateShouldSpeculateInteger): + (JSC::DFG::Graph::isConstant): + (JSC::DFG::Graph::isJSConstant): + (JSC::DFG::Graph::isInt32Constant): + (JSC::DFG::Graph::isDoubleConstant): + (JSC::DFG::Graph::isNumberConstant): + (JSC::DFG::Graph::isBooleanConstant): + (JSC::DFG::Graph::isCellConstant): + (JSC::DFG::Graph::isFunctionConstant): + (JSC::DFG::Graph::isInternalFunctionConstant): + (JSC::DFG::Graph::valueOfJSConstant): + (JSC::DFG::Graph::valueOfInt32Constant): + (JSC::DFG::Graph::valueOfNumberConstant): + (JSC::DFG::Graph::valueOfBooleanConstant): + (JSC::DFG::Graph::valueOfFunctionConstant): + (JSC::DFG::Graph::valueProfileFor): + (JSC::DFG::Graph::methodOfGettingAValueProfileFor): + (JSC::DFG::Graph::numSuccessors): + (JSC::DFG::Graph::successor): + (JSC::DFG::Graph::successorForCondition): + (JSC::DFG::Graph::isPredictedNumerical): + (JSC::DFG::Graph::byValIsPure): + (JSC::DFG::Graph::clobbersWorld): + (JSC::DFG::Graph::varArgNumChildren): + (JSC::DFG::Graph::numChildren): + (JSC::DFG::Graph::varArgChild): + (JSC::DFG::Graph::child): + (JSC::DFG::Graph::voteNode): + (JSC::DFG::Graph::voteChildren): + (JSC::DFG::Graph::substitute): + (JSC::DFG::Graph::substituteGetLocal): + (JSC::DFG::Graph::addImmediateShouldSpeculateInteger): + (JSC::DFG::Graph::mulImmediateShouldSpeculateInteger): + * dfg/DFGInsertionSet.h: + (JSC::DFG::Insertion::Insertion): + (JSC::DFG::Insertion::element): + (Insertion): + (JSC::DFG::InsertionSet::insert): + (InsertionSet): + * dfg/DFGJITCompiler.cpp: + * dfg/DFGJITCompiler.h: + (JSC::DFG::JITCompiler::setForNode): + (JSC::DFG::JITCompiler::addressOfDoubleConstant): + (JSC::DFG::JITCompiler::noticeOSREntry): + * dfg/DFGLongLivedState.cpp: Added. + (DFG): + (JSC::DFG::LongLivedState::LongLivedState): + (JSC::DFG::LongLivedState::~LongLivedState): + (JSC::DFG::LongLivedState::shrinkToFit): + * dfg/DFGLongLivedState.h: Added. + (DFG): + (LongLivedState): + * dfg/DFGMinifiedID.h: + (JSC::DFG::MinifiedID::MinifiedID): + (JSC::DFG::MinifiedID::node): + * dfg/DFGMinifiedNode.cpp: + (JSC::DFG::MinifiedNode::fromNode): + * dfg/DFGMinifiedNode.h: + (MinifiedNode): + * dfg/DFGNode.cpp: Added. + (DFG): + (JSC::DFG::Node::index): + (WTF): + (WTF::printInternal): + * dfg/DFGNode.h: + (DFG): + (JSC::DFG::Node::Node): + (Node): + (JSC::DFG::Node::convertToGetByOffset): + (JSC::DFG::Node::convertToPutByOffset): + (JSC::DFG::Node::ref): + (JSC::DFG::Node::shouldSpeculateInteger): + (JSC::DFG::Node::shouldSpeculateIntegerForArithmetic): + (JSC::DFG::Node::shouldSpeculateIntegerExpectingDefined): + (JSC::DFG::Node::shouldSpeculateDoubleForArithmetic): + (JSC::DFG::Node::shouldSpeculateNumber): + (JSC::DFG::Node::shouldSpeculateNumberExpectingDefined): + (JSC::DFG::Node::shouldSpeculateFinalObject): + (JSC::DFG::Node::shouldSpeculateArray): + (JSC::DFG::Node::dumpChildren): + (WTF): + * dfg/DFGNodeAllocator.h: Added. + (DFG): + (operator new ): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::OSRExit): + * dfg/DFGOSRExit.h: + (OSRExit): + (SpeculationFailureDebugInfo): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + * dfg/DFGPhase.cpp: + (DFG): + (JSC::DFG::Phase::beginPhase): + (JSC::DFG::Phase::endPhase): + * dfg/DFGPhase.h: + (Phase): + (JSC::DFG::runAndLog): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::setPrediction): + (JSC::DFG::PredictionPropagationPhase::mergePrediction): + (JSC::DFG::PredictionPropagationPhase::isNotNegZero): + (JSC::DFG::PredictionPropagationPhase::isNotZero): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo): + (JSC::DFG::PredictionPropagationPhase::propagate): + (JSC::DFG::PredictionPropagationPhase::mergeDefaultFlags): + (JSC::DFG::PredictionPropagationPhase::propagateForward): + (JSC::DFG::PredictionPropagationPhase::propagateBackward): + (JSC::DFG::PredictionPropagationPhase::doDoubleVoting): + (PredictionPropagationPhase): + (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): + * dfg/DFGScoreBoard.h: + (JSC::DFG::ScoreBoard::ScoreBoard): + (JSC::DFG::ScoreBoard::use): + (JSC::DFG::ScoreBoard::useIfHasResult): + (ScoreBoard): + * dfg/DFGSilentRegisterSavePlan.h: + (JSC::DFG::SilentRegisterSavePlan::SilentRegisterSavePlan): + (JSC::DFG::SilentRegisterSavePlan::node): + (SilentRegisterSavePlan): + * dfg/DFGSlowPathGenerator.h: + (JSC::DFG::SlowPathGenerator::SlowPathGenerator): + (JSC::DFG::SlowPathGenerator::generate): + (SlowPathGenerator): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::speculationCheck): + (JSC::DFG::SpeculativeJIT::speculationWatchpoint): + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck): + (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution): + (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR): + (JSC::DFG::SpeculativeJIT::silentSavePlanForFPR): + (JSC::DFG::SpeculativeJIT::silentSpill): + (JSC::DFG::SpeculativeJIT::silentFill): + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::arrayify): + (JSC::DFG::SpeculativeJIT::fillStorage): + (JSC::DFG::SpeculativeJIT::useChildren): + (JSC::DFG::SpeculativeJIT::isStrictInt32): + (JSC::DFG::SpeculativeJIT::isKnownInteger): + (JSC::DFG::SpeculativeJIT::isKnownNumeric): + (JSC::DFG::SpeculativeJIT::isKnownCell): + (JSC::DFG::SpeculativeJIT::isKnownNotCell): + (JSC::DFG::SpeculativeJIT::isKnownNotInteger): + (JSC::DFG::SpeculativeJIT::isKnownNotNumber): + (JSC::DFG::SpeculativeJIT::writeBarrier): + (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare): + (JSC::DFG::SpeculativeJIT::nonSpeculativeStrictEq): + (JSC::DFG::GPRTemporary::GPRTemporary): + (JSC::DFG::FPRTemporary::FPRTemporary): + (JSC::DFG::SpeculativeJIT::compilePeepHoleDoubleBranch): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch): + (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch): + (JSC::DFG::SpeculativeJIT::noticeOSRBirth): + (JSC::DFG::SpeculativeJIT::compileMovHint): + (JSC::DFG::SpeculativeJIT::compile): + (JSC::DFG::SpeculativeJIT::checkArgumentTypes): + (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor): + (JSC::DFG::SpeculativeJIT::compileDoublePutByVal): + (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt): + (JSC::DFG::SpeculativeJIT::compileGetByValOnString): + (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32): + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber): + (JSC::DFG::SpeculativeJIT::compileDoubleAsInt32): + (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): + (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): + (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray): + (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): + (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): + (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject): + (JSC::DFG::SpeculativeJIT::compileInstanceOf): + (JSC::DFG::SpeculativeJIT::compileSoftModulo): + (JSC::DFG::SpeculativeJIT::compileAdd): + (JSC::DFG::SpeculativeJIT::compileArithSub): + (JSC::DFG::SpeculativeJIT::compileArithNegate): + (JSC::DFG::SpeculativeJIT::compileArithMul): + (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForX86): + (JSC::DFG::SpeculativeJIT::compileArithMod): + (JSC::DFG::SpeculativeJIT::compare): + (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant): + (JSC::DFG::SpeculativeJIT::compileStrictEq): + (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage): + (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): + (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength): + (JSC::DFG::SpeculativeJIT::compileGetArrayLength): + (JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck): + (JSC::DFG::SpeculativeJIT::compileNewFunctionExpression): + (JSC::DFG::SpeculativeJIT::compileRegExpExec): + (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): + (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::canReuse): + (JSC::DFG::SpeculativeJIT::isFilled): + (JSC::DFG::SpeculativeJIT::isFilledDouble): + (JSC::DFG::SpeculativeJIT::use): + (JSC::DFG::SpeculativeJIT::isConstant): + (JSC::DFG::SpeculativeJIT::isJSConstant): + (JSC::DFG::SpeculativeJIT::isInt32Constant): + (JSC::DFG::SpeculativeJIT::isDoubleConstant): + (JSC::DFG::SpeculativeJIT::isNumberConstant): + (JSC::DFG::SpeculativeJIT::isBooleanConstant): + (JSC::DFG::SpeculativeJIT::isFunctionConstant): + (JSC::DFG::SpeculativeJIT::valueOfInt32Constant): + (JSC::DFG::SpeculativeJIT::valueOfNumberConstant): + (JSC::DFG::SpeculativeJIT::valueOfNumberConstantAsInt32): + (JSC::DFG::SpeculativeJIT::addressOfDoubleConstant): + (JSC::DFG::SpeculativeJIT::valueOfJSConstant): + (JSC::DFG::SpeculativeJIT::valueOfBooleanConstant): + (JSC::DFG::SpeculativeJIT::valueOfFunctionConstant): + (JSC::DFG::SpeculativeJIT::isNullConstant): + (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImm64): + (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch): + (JSC::DFG::SpeculativeJIT::integerResult): + (JSC::DFG::SpeculativeJIT::noResult): + (JSC::DFG::SpeculativeJIT::cellResult): + (JSC::DFG::SpeculativeJIT::booleanResult): + (JSC::DFG::SpeculativeJIT::jsValueResult): + (JSC::DFG::SpeculativeJIT::storageResult): + (JSC::DFG::SpeculativeJIT::doubleResult): + (JSC::DFG::SpeculativeJIT::initConstantInfo): + (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck): + (JSC::DFG::SpeculativeJIT::isInteger): + (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): + (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage): + (JSC::DFG::SpeculativeJIT::setNodeForOperand): + (JSC::DFG::IntegerOperand::IntegerOperand): + (JSC::DFG::IntegerOperand::node): + (JSC::DFG::IntegerOperand::gpr): + (JSC::DFG::IntegerOperand::use): + (IntegerOperand): + (JSC::DFG::DoubleOperand::DoubleOperand): + (JSC::DFG::DoubleOperand::node): + (JSC::DFG::DoubleOperand::fpr): + (JSC::DFG::DoubleOperand::use): + (DoubleOperand): + (JSC::DFG::JSValueOperand::JSValueOperand): + (JSC::DFG::JSValueOperand::node): + (JSC::DFG::JSValueOperand::gpr): + (JSC::DFG::JSValueOperand::fill): + (JSC::DFG::JSValueOperand::use): + (JSValueOperand): + (JSC::DFG::StorageOperand::StorageOperand): + (JSC::DFG::StorageOperand::node): + (JSC::DFG::StorageOperand::gpr): + (JSC::DFG::StorageOperand::use): + (StorageOperand): + (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand): + (JSC::DFG::SpeculateIntegerOperand::node): + (JSC::DFG::SpeculateIntegerOperand::gpr): + (JSC::DFG::SpeculateIntegerOperand::use): + (SpeculateIntegerOperand): + (JSC::DFG::SpeculateStrictInt32Operand::SpeculateStrictInt32Operand): + (JSC::DFG::SpeculateStrictInt32Operand::node): + (JSC::DFG::SpeculateStrictInt32Operand::gpr): + (JSC::DFG::SpeculateStrictInt32Operand::use): + (SpeculateStrictInt32Operand): + (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand): + (JSC::DFG::SpeculateDoubleOperand::node): + (JSC::DFG::SpeculateDoubleOperand::fpr): + (JSC::DFG::SpeculateDoubleOperand::use): + (SpeculateDoubleOperand): + (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand): + (JSC::DFG::SpeculateCellOperand::node): + (JSC::DFG::SpeculateCellOperand::gpr): + (JSC::DFG::SpeculateCellOperand::use): + (SpeculateCellOperand): + (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand): + (JSC::DFG::SpeculateBooleanOperand::node): + (JSC::DFG::SpeculateBooleanOperand::gpr): + (JSC::DFG::SpeculateBooleanOperand::use): + (SpeculateBooleanOperand): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillDouble): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber): + (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32): + (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber): + (JSC::DFG::SpeculativeJIT::cachedPutById): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq): + (JSC::DFG::SpeculativeJIT::emitCall): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileIntegerCompare): + (JSC::DFG::SpeculativeJIT::compileDoubleCompare): + (JSC::DFG::SpeculativeJIT::compileValueAdd): + (JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch): + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillDouble): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber): + (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32): + (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber): + (JSC::DFG::SpeculativeJIT::cachedPutById): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq): + (JSC::DFG::SpeculativeJIT::emitCall): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileIntegerCompare): + (JSC::DFG::SpeculativeJIT::compileDoubleCompare): + (JSC::DFG::SpeculativeJIT::compileValueAdd): + (JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch): + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureAbstractValue.h: + (StructureAbstractValue): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * dfg/DFGValidate.cpp: + (DFG): + (Validate): + (JSC::DFG::Validate::validate): + (JSC::DFG::Validate::reportValidationContext): + * dfg/DFGValidate.h: + * dfg/DFGValueSource.cpp: + (JSC::DFG::ValueSource::dump): + * dfg/DFGValueSource.h: + (JSC::DFG::ValueSource::ValueSource): + * dfg/DFGVirtualRegisterAllocationPhase.cpp: + (JSC::DFG::VirtualRegisterAllocationPhase::run): + * runtime/FunctionExecutableDump.cpp: Added. + (JSC): + (JSC::FunctionExecutableDump::dump): + * runtime/FunctionExecutableDump.h: Added. + (JSC): + (FunctionExecutableDump): + (JSC::FunctionExecutableDump::FunctionExecutableDump): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC): + (DFG): + (JSGlobalData): + * runtime/Options.h: + (JSC): + +2013-01-28 Laszlo Gombos + + Collapse testing for a list of PLATFORM() into OS() and USE() tests + https://bugs.webkit.org/show_bug.cgi?id=108018 + + Reviewed by Eric Seidel. + + No functional change as "OS(DARWIN) && USE(CF)" equals to the + following platforms: MAC, WX, QT and CHROMIUM. CHROMIUM + is not using JavaScriptCore. + + * runtime/DatePrototype.cpp: + (JSC): + +2013-01-28 Geoffrey Garen + + Static size inference for JavaScript objects + https://bugs.webkit.org/show_bug.cgi?id=108093 + + Reviewed by Phil Pizlo. + + * API/JSObjectRef.cpp: + * JavaScriptCore.order: + * JavaScriptCore.xcodeproj/project.pbxproj: Pay the tax man. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): op_new_object and op_create_this now + have an extra inferredInlineCapacity argument. This is the statically + inferred inline capacity, just from analyzing source text. op_new_object + also gets a pointer to an allocation profile. (For op_create_this, the + profile is in the construtor function.) + + (JSC::CodeBlock::CodeBlock): Link op_new_object. + + (JSC::CodeBlock::stronglyVisitStrongReferences): Mark our profiles. + + * bytecode/CodeBlock.h: + (CodeBlock): Removed some dead code. Added object allocation profiles. + + * bytecode/Instruction.h: + (JSC): New union type, since an instruction operand may point to an + object allocation profile now. + + * bytecode/ObjectAllocationProfile.h: Added. + (JSC): + (ObjectAllocationProfile): + (JSC::ObjectAllocationProfile::offsetOfAllocator): + (JSC::ObjectAllocationProfile::offsetOfStructure): + (JSC::ObjectAllocationProfile::ObjectAllocationProfile): + (JSC::ObjectAllocationProfile::isNull): + (JSC::ObjectAllocationProfile::initialize): + (JSC::ObjectAllocationProfile::structure): + (JSC::ObjectAllocationProfile::inlineCapacity): + (JSC::ObjectAllocationProfile::clear): + (JSC::ObjectAllocationProfile::visitAggregate): + (JSC::ObjectAllocationProfile::possibleDefaultPropertyCount): New class + for tracking a prediction about object allocation: structure, inline + capacity, allocator to use. + + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): Updated instruction sizes. + + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): + * bytecode/UnlinkedCodeBlock.h: + (JSC): + (JSC::UnlinkedCodeBlock::addObjectAllocationProfile): + (JSC::UnlinkedCodeBlock::numberOfObjectAllocationProfiles): + (UnlinkedCodeBlock): Unlinked support for allocation profiles. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): Kill all remaining analyses at the + end of codegen, since this is our last opportunity. + + (JSC::BytecodeGenerator::BytecodeGenerator): Added a static property + analyzer to bytecode generation. It tracks initializing assignments and + makes a guess about how many will happen. + + (JSC::BytecodeGenerator::newObjectAllocationProfile): + (JSC): + (JSC::BytecodeGenerator::emitProfiledOpcode): + (JSC::BytecodeGenerator::emitMove): + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithThis): + (JSC::BytecodeGenerator::emitGetById): + (JSC::BytecodeGenerator::emitPutById): + (JSC::BytecodeGenerator::emitDirectPutById): + (JSC::BytecodeGenerator::emitPutGetterSetter): + (JSC::BytecodeGenerator::emitGetArgumentByVal): + (JSC::BytecodeGenerator::emitGetByVal): Added hooks to the static property + analyzer, so it can observe allocations and stores. + + (JSC::BytecodeGenerator::emitCreateThis): Factored this into a helper + function because it was a significant amount of logic, and I wanted to + add to it. + + (JSC::BytecodeGenerator::emitNewObject): + (JSC::BytecodeGenerator::emitExpectedFunctionSnippet): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallVarargs): + (JSC::BytecodeGenerator::emitConstruct): Added a hook to profiled opcodes + to track their stores, in case a store kills a profiled allocation. Since + profiled opcodes are basically the only interesting stores we do, this + is a convenient place to notice any store that might kill an allocation. + + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): As above. + + * bytecompiler/StaticPropertyAnalysis.h: Added. + (JSC): + (StaticPropertyAnalysis): + (JSC::StaticPropertyAnalysis::create): + (JSC::StaticPropertyAnalysis::addPropertyIndex): + (JSC::StaticPropertyAnalysis::record): + (JSC::StaticPropertyAnalysis::propertyIndexCount): + (JSC::StaticPropertyAnalysis::StaticPropertyAnalysis): Simple helper + class for tracking allocations and stores. + + * bytecompiler/StaticPropertyAnalyzer.h: Added. + (StaticPropertyAnalyzer): + (JSC::StaticPropertyAnalyzer::StaticPropertyAnalyzer): + (JSC::StaticPropertyAnalyzer::createThis): + (JSC::StaticPropertyAnalyzer::newObject): + (JSC::StaticPropertyAnalyzer::putById): + (JSC::StaticPropertyAnalyzer::mov): + (JSC::StaticPropertyAnalyzer::kill): Helper class for observing allocations + and stores and making an inline capacity guess. The heuristics here are + intentionally minimal because we don't want this one class to try to + re-create something like a DFG or a runtime analysis. If we discover that + we need those kinds of analyses, we should just replace this class with + something else. + + This class tracks multiple registers that alias the same object -- that + happens a lot, when moving locals into temporary registers -- but it + doesn't track control flow or multiple objects that alias the same register. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): Updated for rename. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): Updated for inline capacity and + allocation profile. + + * dfg/DFGNode.h: + (JSC::DFG::Node::hasInlineCapacity): + (Node): + (JSC::DFG::Node::inlineCapacity): + (JSC::DFG::Node::hasFunction): Give the graph a good way to represent + inline capacity for an allocation. + + * dfg/DFGNodeType.h: + (DFG): Updated for rename. + + * dfg/DFGOperations.cpp: Updated for interface change. + + * dfg/DFGOperations.h: We pass the inline capacity to the slow case as + an argument. This is the simplest way, since it's stored as a bytecode operand. + + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): Updated for rename. + + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): Fixed a horrible off-by-one-half bug that only + appears when doing an inline cached load for property number 64 on a 32-bit + system. In JSVALUE32_64 land, "offsetRelativeToPatchedStorage" is the + offset of the 64bit JSValue -- but we'll actually issue two loads, one for + the payload at that offset, and one for the tag at that offset + 4. We need + to ensure that both loads have a compact representation, or we'll corrupt + the instruction stream. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage): + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::emitAllocateJSObject): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): Lots of refactoring to support + passing an allocator to our allocation function, and/or passing a Structure + as a register instead of an immediate. + + * heap/MarkedAllocator.h: + (DFG): + (MarkedAllocator): + (JSC::MarkedAllocator::offsetOfFreeListHead): Added an accessor to simplify + JIT code generation of allocation from an arbitrary allocator. + + * jit/JIT.h: + (JSC): + * jit/JITInlines.h: + (JSC): + (JSC::JIT::emitAllocateJSObject): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_object): + (JSC::JIT::emitSlow_op_new_object): + (JSC::JIT::emit_op_create_this): + (JSC::JIT::emitSlow_op_create_this): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_new_object): + (JSC::JIT::emitSlow_op_new_object): + (JSC::JIT::emit_op_create_this): + (JSC::JIT::emitSlow_op_create_this): Same refactoring as done for the DFG. + + * jit/JITStubs.cpp: + (JSC::tryCacheGetByID): Fixed the same bug mentioned above. + + (JSC::DEFINE_STUB_FUNCTION): Updated for interface changes. + + * llint/LLIntData.cpp: + (JSC::LLInt::Data::performAssertions): Updated for interface changes. + + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: Same refactoring as for the JITs. + + * profiler/ProfilerBytecode.cpp: + * profiler/ProfilerBytecodes.cpp: + * profiler/ProfilerCompilation.cpp: + * profiler/ProfilerCompiledBytecode.cpp: + * profiler/ProfilerDatabase.cpp: + * profiler/ProfilerOSRExit.cpp: + * profiler/ProfilerOrigin.cpp: + * profiler/ProfilerProfiledBytecodes.cpp: Include ObjectConstructor.h + because that's where createEmptyObject() lives now. + + * runtime/Executable.h: + (JSC::JSFunction::JSFunction): Updated for rename. + + * runtime/JSCellInlines.h: + (JSC::allocateCell): Updated to match the allocator selection code in + the JIT, so it's clearer that both are correct. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::createAllocationProfile): + (JSC::JSFunction::visitChildren): + (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSFunction::put): + (JSC::JSFunction::defineOwnProperty): + (JSC::JSFunction::getConstructData): + * runtime/JSFunction.h: + (JSC::JSFunction::offsetOfScopeChain): + (JSC::JSFunction::offsetOfExecutable): + (JSC::JSFunction::offsetOfAllocationProfile): + (JSC::JSFunction::allocationProfile): + (JSFunction): + (JSC::JSFunction::tryGetAllocationProfile): + (JSC::JSFunction::addAllocationProfileWatchpoint): Changed inheritorID + data member to be an ObjectAllocationProfile, which includes a pointer + to the desired allocator. This simplifies JIT code, since we don't have + to compute the allocator on the fly. I verified by code inspection that + JSFunction is still only 64 bytes. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::visitChildren): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + (JSC::JSGlobalObject::dateStructure): No direct pointer to the empty + object structure anymore, because now clients need to specify how much + inline capacity they want. + + * runtime/JSONObject.cpp: + * runtime/JSObject.h: + (JSC): + (JSFinalObject): + (JSC::JSFinalObject::defaultInlineCapacity): + (JSC::JSFinalObject::maxInlineCapacity): + (JSC::JSFinalObject::createStructure): A little refactoring to try to + clarify where some of these constants derive from. + + (JSC::maxOffsetRelativeToPatchedStorage): Used for bug fix, above. + + * runtime/JSProxy.cpp: + (JSC::JSProxy::setTarget): Ugly, but effective. + + * runtime/LiteralParser.cpp: + * runtime/ObjectConstructor.cpp: + (JSC::constructObject): + (JSC::constructWithObjectConstructor): + (JSC::callObjectConstructor): + (JSC::objectConstructorCreate): Updated for interface changes. + + * runtime/ObjectConstructor.h: + (JSC::constructEmptyObject): Clarified your options for how to allocate + an empty object, to emphasize what things can actually vary. + + * runtime/PropertyOffset.h: These constants have moved because they're + really higher level concepts to do with the layout of objects and the + collector. PropertyOffset is just an abstract number line, independent + of those things. + + * runtime/PrototypeMap.cpp: + (JSC::PrototypeMap::emptyObjectStructureForPrototype): + (JSC::PrototypeMap::clearEmptyObjectStructureForPrototype): + * runtime/PrototypeMap.h: + (PrototypeMap): The map key is now a pair of prototype and inline capacity, + since Structure encodes inline capacity. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::nonPropertyTransition): + (JSC::Structure::copyPropertyTableForPinning): + * runtime/Structure.h: + (Structure): + (JSC::Structure::totalStorageSize): + (JSC::Structure::transitionCount): + (JSC::Structure::create): Fixed a nasty refactoring bug that only shows + up after enabling variable-sized inline capacities: we were passing our + type info where our inline capacity was expected. The compiler didn't + notice because both have type int :(. + +2013-01-28 Oliver Hunt + + Add more assertions to the property storage use in arrays + https://bugs.webkit.org/show_bug.cgi?id=107728 + + Reviewed by Filip Pizlo. + + Add a bunch of assertions to array and object butterfly + usage. This should make debugging somewhat easier. + + I also converted a couple of assertions to release asserts + as they were so low cost it seemed a sensible thing to do. + + * runtime/JSArray.cpp: + (JSC::JSArray::sortVector): + (JSC::JSArray::compactForSorting): + * runtime/JSObject.h: + (JSC::JSObject::getHolyIndexQuickly): + +2013-01-28 Adam Barth + + Remove webkitNotifications.createHTMLNotification + https://bugs.webkit.org/show_bug.cgi?id=107598 + + Reviewed by Benjamin Poulain. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-28 Michael Saboff + + Cleanup ARM version of debugName() in DFGFPRInfo.h + https://bugs.webkit.org/show_bug.cgi?id=108090 + + Reviewed by David Kilzer. + + Fixed debugName() so it will compile by adding static_cast and missing commas. + + * dfg/DFGFPRInfo.h: + (JSC::DFG::FPRInfo::debugName): + +2013-01-27 Andreas Kling + + JSC: FunctionParameters are memory hungry. + + + + Reviewed by Sam Weinig. + + Instead of inheriting from Vector, make FunctionParameters a simple fixed-size array + with a custom-allocating create() function. Removes one step of indirection and cuts memory usage + roughly in half. + + 2.73 MB progression on Membuster3. + + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedFunctionExecutable::paramString): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * parser/Nodes.cpp: + (JSC::FunctionParameters::create): + (JSC::FunctionParameters::FunctionParameters): + (JSC::FunctionParameters::~FunctionParameters): + * parser/Nodes.h: + (FunctionParameters): + (JSC::FunctionParameters::size): + (JSC::FunctionParameters::at): + (JSC::FunctionParameters::identifiers): + +2013-01-27 Andreas Kling + + JSC: SourceProviderCache is memory hungry. + + + + Reviewed by Sam Weinig. + + Use fixed-size arrays for SourceProviderCacheItem's lists of captured variables. + Since the lists never change after the object is created, there's no need to keep them in Vectors + and we can instead create the whole cache item in a single allocation. + + 13.37 MB progression on Membuster3. + + * parser/Parser.cpp: + (JSC::::parseFunctionInfo): + * parser/Parser.h: + (JSC::Scope::copyCapturedVariablesToVector): + (JSC::Scope::fillParametersForSourceProviderCache): + (JSC::Scope::restoreFromSourceProviderCache): + * parser/SourceProviderCacheItem.h: + (SourceProviderCacheItemCreationParameters): + (SourceProviderCacheItem): + (JSC::SourceProviderCacheItem::approximateByteSize): + (JSC::SourceProviderCacheItem::usedVariables): + (JSC::SourceProviderCacheItem::writtenVariables): + (JSC::SourceProviderCacheItem::~SourceProviderCacheItem): + (JSC::SourceProviderCacheItem::create): + (JSC::SourceProviderCacheItem::SourceProviderCacheItem): + +2013-01-27 Zoltan Arvai + + Fixing atomicIncrement implementation for Windows by dropping support before XP SP2. + https://bugs.webkit.org/show_bug.cgi?id=106740 + + Reviewed by Benjamin Poulain. + + * config.h: + +2013-01-25 Filip Pizlo + + DFG variable event stream shouldn't use NodeIndex + https://bugs.webkit.org/show_bug.cgi?id=107996 + + Reviewed by Oliver Hunt. + + Introduce the notion of a DFG::MinifiedID, which is just a unique ID of a DFG Node. + Internally it currently uses a NodeIndex, but we could change this without having + to recode all of the users of MinifiedID. This effectively decouples the OSR exit + compiler's way of identifying nodes from the speculative JIT's way of identifying + nodes, and should make it easier to make changes to the speculative JIT's internals + in the future. + + Also changed variable event stream logging to exclude information about births and + deaths of constants, since the OSR exit compiler never cares about which register + holds a constant; if a value is constant then the OSR exit compiler can reify it. + + Also changed the variable event stream's value recovery computation to use a + HashMap keyed by MinifiedID rather than a Vector indexed by NodeIndex. + + This appears to be performance-neutral. It's primarily meant as a small step + towards https://bugs.webkit.org/show_bug.cgi?id=106868. + + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGGenerationInfo.h: + (JSC::DFG::GenerationInfo::GenerationInfo): + (JSC::DFG::GenerationInfo::initConstant): + (JSC::DFG::GenerationInfo::initInteger): + (JSC::DFG::GenerationInfo::initJSValue): + (JSC::DFG::GenerationInfo::initCell): + (JSC::DFG::GenerationInfo::initBoolean): + (JSC::DFG::GenerationInfo::initDouble): + (JSC::DFG::GenerationInfo::initStorage): + (JSC::DFG::GenerationInfo::noticeOSRBirth): + (JSC::DFG::GenerationInfo::use): + (JSC::DFG::GenerationInfo::appendFill): + (JSC::DFG::GenerationInfo::appendSpill): + (GenerationInfo): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::link): + * dfg/DFGMinifiedGraph.h: + (JSC::DFG::MinifiedGraph::at): + (MinifiedGraph): + * dfg/DFGMinifiedID.h: Added. + (DFG): + (MinifiedID): + (JSC::DFG::MinifiedID::MinifiedID): + (JSC::DFG::MinifiedID::operator!): + (JSC::DFG::MinifiedID::nodeIndex): + (JSC::DFG::MinifiedID::operator==): + (JSC::DFG::MinifiedID::operator!=): + (JSC::DFG::MinifiedID::operator<): + (JSC::DFG::MinifiedID::operator>): + (JSC::DFG::MinifiedID::operator<=): + (JSC::DFG::MinifiedID::operator>=): + (JSC::DFG::MinifiedID::hash): + (JSC::DFG::MinifiedID::dump): + (JSC::DFG::MinifiedID::isHashTableDeletedValue): + (JSC::DFG::MinifiedID::invalidID): + (JSC::DFG::MinifiedID::otherInvalidID): + (JSC::DFG::MinifiedID::fromBits): + (JSC::DFG::MinifiedIDHash::hash): + (JSC::DFG::MinifiedIDHash::equal): + (MinifiedIDHash): + (WTF): + * dfg/DFGMinifiedNode.cpp: + (JSC::DFG::MinifiedNode::fromNode): + * dfg/DFGMinifiedNode.h: + (JSC::DFG::MinifiedNode::id): + (JSC::DFG::MinifiedNode::child1): + (JSC::DFG::MinifiedNode::getID): + (JSC::DFG::MinifiedNode::compareByNodeIndex): + (MinifiedNode): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileMovHint): + (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::setNodeIndexForOperand): + * dfg/DFGValueSource.cpp: + (JSC::DFG::ValueSource::dump): + * dfg/DFGValueSource.h: + (JSC::DFG::ValueSource::ValueSource): + (JSC::DFG::ValueSource::isSet): + (JSC::DFG::ValueSource::kind): + (JSC::DFG::ValueSource::id): + (ValueSource): + (JSC::DFG::ValueSource::idFromKind): + (JSC::DFG::ValueSource::kindFromID): + * dfg/DFGVariableEvent.cpp: + (JSC::DFG::VariableEvent::dump): + (JSC::DFG::VariableEvent::dumpFillInfo): + (JSC::DFG::VariableEvent::dumpSpillInfo): + * dfg/DFGVariableEvent.h: + (JSC::DFG::VariableEvent::fillGPR): + (JSC::DFG::VariableEvent::fillPair): + (JSC::DFG::VariableEvent::fillFPR): + (JSC::DFG::VariableEvent::spill): + (JSC::DFG::VariableEvent::death): + (JSC::DFG::VariableEvent::movHint): + (JSC::DFG::VariableEvent::id): + (VariableEvent): + * dfg/DFGVariableEventStream.cpp: + (DFG): + (JSC::DFG::VariableEventStream::tryToSetConstantRecovery): + (JSC::DFG::VariableEventStream::reconstruct): + * dfg/DFGVariableEventStream.h: + (VariableEventStream): + +2013-01-25 Roger Fong + + Unreviewed. Rename LLInt projects folder and make appropriate changes to solutions. + + * JavaScriptCore.vcxproj/JavaScriptCore.sln: + * JavaScriptCore.vcxproj/LLInt: Copied from JavaScriptCore.vcxproj/LLInt.vcproj. + * JavaScriptCore.vcxproj/LLInt.vcproj: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.make: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj.user: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/build-LLIntAssembly.sh: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj.user: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj.user: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Removed. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Removed. + +2013-01-24 Roger Fong + + VS2010 JavascriptCore: Clean up property sheets, add a JSC solution, add testRegExp and testAPI projects. + https://bugs.webkit.org/show_bug.cgi?id=106987 + + Reviewed by Brent Fulgham. + + * JavaScriptCore.vcxproj/JavaScriptCore.sln: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreCF.props: + * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: + * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: + * JavaScriptCore.vcxproj/jsc/jscCommon.props: + * JavaScriptCore.vcxproj/jsc/jscDebug.props: + * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: + * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: + * JavaScriptCore.vcxproj/testRegExp: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.user: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: Added. + * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: Added. + * JavaScriptCore.vcxproj/testapi: Added. + * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Added. + * JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters: Added. + * JavaScriptCore.vcxproj/testapi/testapi.vcxproj.user: Added. + * JavaScriptCore.vcxproj/testapi/testapiCommon.props: Added. + * JavaScriptCore.vcxproj/testapi/testapiDebug.props: Added. + * JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd: Added. + * JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd: Added. + * JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: Added. + * JavaScriptCore.vcxproj/testapi/testapiRelease.props: Added. + +2013-01-24 Roger Fong + + Unreviewed. Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + +2013-01-24 Filip Pizlo + + DFG::JITCompiler::getSpeculation() methods are badly named and superfluous + https://bugs.webkit.org/show_bug.cgi?id=107860 + + Reviewed by Mark Hahnenberg. + + * dfg/DFGJITCompiler.h: + (JITCompiler): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitBranch): + +2013-01-24 Mark Hahnenberg + + Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h + https://bugs.webkit.org/show_bug.cgi?id=107327 + + Reviewed by Filip Pizlo. + + We're renaming these two files, so we have to replace the names everywhere. + + * API/APICast.h: + * API/APIJSValue.h: Removed. + * API/JSBlockAdaptor.mm: + * API/JSStringRefCF.cpp: + * API/JSValue.h: Copied from Source/JavaScriptCore/API/APIJSValue.h. + * API/JSValue.mm: + * API/JSValueInternal.h: + * API/JSValueRef.cpp: + * API/JSWeakObjectMapRefPrivate.cpp: + * API/JavaScriptCore.h: + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CallLinkStatus.h: + * bytecode/CodeBlock.cpp: + * bytecode/MethodOfGettingAValueProfile.h: + * bytecode/ResolveGlobalStatus.cpp: + * bytecode/ResolveGlobalStatus.h: + * bytecode/SpeculatedType.h: + * bytecode/ValueRecovery.h: + * dfg/DFGByteCodeParser.cpp: + * dfg/DFGJITCompiler.cpp: + * dfg/DFGNode.h: + * dfg/DFGSpeculativeJIT.cpp: + * dfg/DFGSpeculativeJIT64.cpp: + * heap/CopiedBlock.h: + * heap/HandleStack.cpp: + * heap/HandleTypes.h: + * heap/WeakImpl.h: + * interpreter/Interpreter.h: + * interpreter/Register.h: + * interpreter/VMInspector.h: + * jit/HostCallReturnValue.cpp: + * jit/HostCallReturnValue.h: + * jit/JITCode.h: + * jit/JITExceptions.cpp: + * jit/JITExceptions.h: + * jit/JSInterfaceJIT.h: + * llint/LLIntCLoop.h: + * llint/LLIntData.h: + * llint/LLIntSlowPaths.cpp: + * profiler/ProfilerBytecode.h: + * profiler/ProfilerBytecodeSequence.h: + * profiler/ProfilerBytecodes.h: + * profiler/ProfilerCompilation.h: + * profiler/ProfilerCompiledBytecode.h: + * profiler/ProfilerDatabase.h: + * profiler/ProfilerOSRExit.h: + * profiler/ProfilerOSRExitSite.h: + * profiler/ProfilerOrigin.h: + * profiler/ProfilerOriginStack.h: + * runtime/ArgList.cpp: + * runtime/CachedTranscendentalFunction.h: + * runtime/CallData.h: + * runtime/Completion.h: + * runtime/ConstructData.h: + * runtime/DateConstructor.cpp: + * runtime/DateInstance.cpp: + * runtime/DatePrototype.cpp: + * runtime/JSAPIValueWrapper.h: + * runtime/JSCJSValue.cpp: Copied from Source/JavaScriptCore/runtime/JSValue.cpp. + * runtime/JSCJSValue.h: Copied from Source/JavaScriptCore/runtime/JSValue.h. + (JSValue): + * runtime/JSCJSValueInlines.h: Copied from Source/JavaScriptCore/runtime/JSValueInlines.h. + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalObjectFunctions.h: + * runtime/JSStringJoiner.h: + * runtime/JSValue.cpp: Removed. + * runtime/JSValue.h: Removed. + * runtime/JSValueInlines.h: Removed. + * runtime/LiteralParser.h: + * runtime/Operations.h: + * runtime/PropertyDescriptor.h: + * runtime/PropertySlot.h: + * runtime/Protect.h: + * runtime/RegExpPrototype.cpp: + * runtime/Structure.h: + +2013-01-23 Oliver Hunt + + Harden JSC a bit with RELEASE_ASSERT + https://bugs.webkit.org/show_bug.cgi?id=107766 + + Reviewed by Mark Hahnenberg. + + Went through and replaced a pile of ASSERTs that were covering + significantly important details (bounds checks, etc) where + having the checks did not impact release performance in any + measurable way. + + * API/JSContextRef.cpp: + (JSContextCreateBacktrace): + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::branchAdd32): + (JSC::MacroAssembler::branchMul32): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::handlerForBytecodeOffset): + (JSC::CodeBlock::lineNumberForBytecodeOffset): + (JSC::CodeBlock::bytecodeOffset): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::bytecodeOffsetForCallAtIndex): + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::exceptionHandler): + (JSC::CodeBlock::codeOrigin): + (JSC::CodeBlock::immediateSwitchJumpTable): + (JSC::CodeBlock::characterSwitchJumpTable): + (JSC::CodeBlock::stringSwitchJumpTable): + (JSC::CodeBlock::setIdentifiers): + (JSC::baselineCodeBlockForInlineCallFrame): + (JSC::ExecState::uncheckedR): + * bytecode/CodeOrigin.cpp: + (JSC::CodeOrigin::inlineStack): + * bytecode/CodeOrigin.h: + (JSC::CodeOrigin::CodeOrigin): + * dfg/DFGCSEPhase.cpp: + * dfg/DFGOSRExit.cpp: + * dfg/DFGScratchRegisterAllocator.h: + (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer): + (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::allocate): + (JSC::DFG::SpeculativeJIT::spill): + (JSC::DFG::SpeculativeJIT::integerResult): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillDouble): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull): + (JSC::DFG::SpeculativeJIT::emitCall): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGValueSource.h: + (JSC::DFG::dataFormatToValueSourceKind): + (JSC::DFG::ValueSource::ValueSource): + * dfg/DFGVirtualRegisterAllocationPhase.cpp: + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::BlockAllocator): + (JSC::BlockAllocator::releaseFreeRegions): + (JSC::BlockAllocator::blockFreeingThreadMain): + * heap/Heap.cpp: + (JSC::Heap::lastChanceToFinalize): + (JSC::Heap::collect): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + * jit/GCAwareJITStubRoutine.cpp: + (JSC::GCAwareJITStubRoutine::observeZeroRefCount): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JITExceptions.cpp: + (JSC::genericThrow): + * jit/JITInlines.h: + (JSC::JIT::emitLoad): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_resolve_operations): + * jit/JITStubRoutine.cpp: + (JSC::JITStubRoutine::observeZeroRefCount): + * jit/JITStubs.cpp: + (JSC::returnToThrowTrampoline): + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::deleteProperty): + (JSC::Arguments::defineOwnProperty): + (JSC::Arguments::didTearOffActivation): + * runtime/ArrayPrototype.cpp: + (JSC::shift): + (JSC::unshift): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/ButterflyInlines.h: + (JSC::Butterfly::growPropertyStorage): + * runtime/CodeCache.cpp: + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + * runtime/CodeCache.h: + (JSC::CacheMap::add): + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::EvalExecutable::unlinkCalls): + (JSC::ProgramExecutable::compileOptimized): + (JSC::ProgramExecutable::unlinkCalls): + (JSC::ProgramExecutable::initializeGlobalProperties): + (JSC::FunctionExecutable::baselineCodeBlockFor): + (JSC::FunctionExecutable::compileOptimizedForCall): + (JSC::FunctionExecutable::compileOptimizedForConstruct): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::unlinkCalls): + (JSC::NativeExecutable::hashFor): + * runtime/Executable.h: + (JSC::EvalExecutable::compile): + (JSC::ProgramExecutable::compile): + (JSC::FunctionExecutable::compileForCall): + (JSC::FunctionExecutable::compileForConstruct): + * runtime/IndexingHeader.h: + (JSC::IndexingHeader::setVectorLength): + * runtime/JSArray.cpp: + (JSC::JSArray::pop): + (JSC::JSArray::shiftCountWithArrayStorage): + (JSC::JSArray::shiftCountWithAnyIndexingType): + (JSC::JSArray::unshiftCountWithArrayStorage): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::jsStrDecimalLiteral): + * runtime/JSObject.cpp: + (JSC::JSObject::copyButterfly): + (JSC::JSObject::defineOwnIndexedProperty): + (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes): + * runtime/JSString.cpp: + (JSC::JSRopeString::getIndexSlowCase): + * yarr/YarrInterpreter.cpp: + (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext): + +2013-01-23 Filip Pizlo + + Constant folding an access to an uncaptured variable that is captured later in the same basic block shouldn't lead to assertion failures + https://bugs.webkit.org/show_bug.cgi?id=107750 + + + Reviewed by Mark Hahnenberg. + + The point of this assertion was that if there is no variable capturing going on, then there should only be one GetLocal + for the variable anywhere in the basic block. But if there is some capturing, then we'll have an unbounded number of + GetLocals. The assertion was too imprecise for the latter case. I want to keep this assertion, so I introduced a + checker that verifies this precisely: if there are any captured accesses to the variable anywhere at or after the + GetLocal we are eliminating, then we allow redundant GetLocals. + + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + (ConstantFoldingPhase): + (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter): + +2013-01-23 Oliver Hunt + + Replace ASSERT_NOT_REACHED with RELEASE_ASSERT_NOT_REACHED in JSC + https://bugs.webkit.org/show_bug.cgi?id=107736 + + Reviewed by Mark Hahnenberg. + + Mechanical change with no performance impact. + + * API/JSBlockAdaptor.mm: + (BlockArgumentTypeDelegate::typeVoid): + * API/JSCallbackObjectFunctions.h: + (JSC::::construct): + (JSC::::call): + * API/JSScriptRef.cpp: + * API/ObjCCallbackFunction.mm: + (ArgumentTypeDelegate::typeVoid): + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::replaceWithLoad): + (JSC::ARMv7Assembler::replaceWithAddressComputation): + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::invert): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::countLeadingZeros32): + (JSC::MacroAssemblerARM::divDouble): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::absDouble): + (JSC::MacroAssemblerMIPS::replaceWithJump): + (JSC::MacroAssemblerMIPS::maxJumpReplacementSize): + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::absDouble): + (JSC::MacroAssemblerSH4::replaceWithJump): + (JSC::MacroAssemblerSH4::maxJumpReplacementSize): + * assembler/SH4Assembler.h: + (JSC::SH4Assembler::shllImm8r): + (JSC::SH4Assembler::shlrImm8r): + (JSC::SH4Assembler::cmplRegReg): + (JSC::SH4Assembler::branch): + * assembler/X86Assembler.h: + (JSC::X86Assembler::replaceWithLoad): + (JSC::X86Assembler::replaceWithAddressComputation): + * bytecode/CallLinkInfo.cpp: + (JSC::CallLinkInfo::unlink): + * bytecode/CodeBlock.cpp: + (JSC::debugHookName): + (JSC::CodeBlock::printGetByIdOp): + (JSC::CodeBlock::printGetByIdCacheStatus): + (JSC::CodeBlock::visitAggregate): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::usesOpcode): + * bytecode/DataFormat.h: + (JSC::needDataFormatConversion): + * bytecode/ExitKind.cpp: + (JSC::exitKindToString): + (JSC::exitKindIsCountable): + * bytecode/MethodOfGettingAValueProfile.cpp: + (JSC::MethodOfGettingAValueProfile::getSpecFailBucket): + * bytecode/Opcode.h: + (JSC::opcodeLength): + * bytecode/PolymorphicPutByIdList.cpp: + (JSC::PutByIdAccess::fromStructureStubInfo): + (JSC::PutByIdAccess::visitWeak): + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::deref): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::ResolveResult::checkValidity): + (JSC::BytecodeGenerator::emitGetLocalVar): + (JSC::BytecodeGenerator::beginSwitch): + * bytecompiler/NodesCodegen.cpp: + (JSC::BinaryOpNode::emitBytecode): + (JSC::emitReadModifyAssignment): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + (JSC::DFG::AbstractState::mergeStateAtTail): + (JSC::DFG::AbstractState::mergeToSuccessors): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::makeSafe): + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal): + (JSC::DFG::CFGSimplificationPhase::fixTailOperand): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::setLocalStoreElimination): + * dfg/DFGCapabilities.cpp: + (JSC::DFG::canHandleOpcodes): + * dfg/DFGCommon.h: + (JSC::DFG::useKindToString): + * dfg/DFGDoubleFormatState.h: + (JSC::DFG::mergeDoubleFormatStates): + (JSC::DFG::doubleFormatStateToString): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::blessArrayOperation): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::clobbersWorld): + * dfg/DFGNode.h: + (JSC::DFG::Node::valueOfJSConstant): + (JSC::DFG::Node::successor): + * dfg/DFGNodeFlags.cpp: + (JSC::DFG::nodeFlagsAsString): + * dfg/DFGNodeType.h: + (JSC::DFG::defaultFlags): + * dfg/DFGRepatch.h: + (JSC::DFG::dfgResetGetByID): + (JSC::DFG::dfgResetPutByID): + * dfg/DFGSlowPathGenerator.h: + (JSC::DFG::SlowPathGenerator::call): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR): + (JSC::DFG::SpeculativeJIT::silentSpill): + (JSC::DFG::SpeculativeJIT::silentFill): + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32): + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): + (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::bitOp): + (JSC::DFG::SpeculativeJIT::shiftOp): + (JSC::DFG::SpeculativeJIT::integerResult): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillDouble): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillDouble): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * dfg/DFGValueSource.h: + (JSC::DFG::ValueSource::valueRecovery): + * dfg/DFGVariableEvent.cpp: + (JSC::DFG::VariableEvent::dump): + * dfg/DFGVariableEventStream.cpp: + (JSC::DFG::VariableEventStream::reconstruct): + * heap/BlockAllocator.h: + (JSC::BlockAllocator::regionSetFor): + * heap/GCThread.cpp: + (JSC::GCThread::gcThreadMain): + * heap/MarkedBlock.cpp: + (JSC::MarkedBlock::sweepHelper): + * heap/MarkedBlock.h: + (JSC::MarkedBlock::isLive): + * interpreter/CallFrame.h: + (JSC::ExecState::inlineCallFrame): + * interpreter/Interpreter.cpp: + (JSC::getCallerInfo): + (JSC::getStackFrameCodeType): + (JSC::Interpreter::execute): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + (JSC::JIT::privateCompile): + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emitSlow_op_mod): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::isDirectPutById): + * jit/JITStubs.cpp: + (JSC::getPolymorphicAccessStructureListSlot): + (JSC::DEFINE_STUB_FUNCTION): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::jitCompileAndSetHeuristics): + * parser/Lexer.cpp: + (JSC::::lex): + * parser/Nodes.h: + (JSC::ExpressionNode::emitBytecodeInConditionContext): + * parser/Parser.h: + (JSC::Parser::getTokenName): + (JSC::Parser::updateErrorMessageSpecialCase): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::operatorStackPop): + * runtime/Arguments.cpp: + (JSC::Arguments::tearOffForInlineCallFrame): + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + * runtime/Executable.cpp: + (JSC::samplingDescription): + * runtime/Executable.h: + (JSC::ScriptExecutable::unlinkCalls): + * runtime/Identifier.cpp: + (JSC): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::getCallData): + * runtime/JSArray.cpp: + (JSC::JSArray::push): + (JSC::JSArray::sort): + * runtime/JSCell.cpp: + (JSC::JSCell::defaultValue): + (JSC::JSCell::getOwnPropertyNames): + (JSC::JSCell::getOwnNonIndexPropertyNames): + (JSC::JSCell::className): + (JSC::JSCell::getPropertyNames): + (JSC::JSCell::customHasInstance): + (JSC::JSCell::putDirectVirtual): + (JSC::JSCell::defineOwnProperty): + (JSC::JSCell::getOwnPropertyDescriptor): + * runtime/JSCell.h: + (JSCell): + * runtime/JSNameScope.cpp: + (JSC::JSNameScope::put): + * runtime/JSObject.cpp: + (JSC::JSObject::getOwnPropertySlotByIndex): + (JSC::JSObject::putByIndex): + (JSC::JSObject::ensureArrayStorageSlow): + (JSC::JSObject::deletePropertyByIndex): + (JSC::JSObject::getOwnPropertyNames): + (JSC::JSObject::putByIndexBeyondVectorLength): + (JSC::JSObject::putDirectIndexBeyondVectorLength): + (JSC::JSObject::getOwnPropertyDescriptor): + * runtime/JSObject.h: + (JSC::JSObject::canGetIndexQuickly): + (JSC::JSObject::getIndexQuickly): + (JSC::JSObject::tryGetIndexQuickly): + (JSC::JSObject::canSetIndexQuickly): + (JSC::JSObject::canSetIndexQuicklyForPutDirect): + (JSC::JSObject::setIndexQuickly): + (JSC::JSObject::initializeIndex): + (JSC::JSObject::hasSparseMap): + (JSC::JSObject::inSparseIndexingMode): + * runtime/JSScope.cpp: + (JSC::JSScope::isDynamicScope): + * runtime/JSSymbolTableObject.cpp: + (JSC::JSSymbolTableObject::putDirectVirtual): + * runtime/JSSymbolTableObject.h: + (JSSymbolTableObject): + * runtime/LiteralParser.cpp: + (JSC::::parse): + * runtime/RegExp.cpp: + (JSC::RegExp::compile): + (JSC::RegExp::compileMatchOnly): + * runtime/StructureTransitionTable.h: + (JSC::newIndexingType): + * tools/CodeProfile.cpp: + (JSC::CodeProfile::sample): + * yarr/YarrCanonicalizeUCS2.h: + (JSC::Yarr::getCanonicalPair): + (JSC::Yarr::areCanonicallyEquivalent): + * yarr/YarrInterpreter.cpp: + (JSC::Yarr::Interpreter::matchCharacterClass): + (JSC::Yarr::Interpreter::matchBackReference): + (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd): + (JSC::Yarr::Interpreter::matchParentheses): + (JSC::Yarr::Interpreter::backtrackParentheses): + (JSC::Yarr::Interpreter::matchDisjunction): + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::generateTerm): + (JSC::Yarr::YarrGenerator::backtrackTerm): + * yarr/YarrParser.h: + (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary): + (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference): + * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn): + +2013-01-23 Tony Chang + + Unreviewed, set svn:eol-style to CRLF on Windows .sln files. + + * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style. + +2013-01-23 Oliver Hunt + + Replace numerous manual CRASH's in JSC with RELEASE_ASSERT + https://bugs.webkit.org/show_bug.cgi?id=107726 + + Reviewed by Filip Pizlo. + + Fairly manual change from if (foo) CRASH(); to RELEASE_ASSERT(!foo); + + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::branchAdd32): + (JSC::MacroAssembler::branchMul32): + * bytecode/CodeBlockHash.cpp: + (JSC::CodeBlockHash::CodeBlockHash): + * heap/BlockAllocator.h: + (JSC::Region::create): + (JSC::Region::createCustomSize): + * heap/GCAssertions.h: + * heap/HandleSet.cpp: + (JSC::HandleSet::visitStrongHandles): + (JSC::HandleSet::writeBarrier): + * heap/HandleSet.h: + (JSC::HandleSet::allocate): + * heap/Heap.cpp: + (JSC::Heap::collect): + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::validate): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + * jit/ExecutableAllocator.cpp: + (JSC::DemandExecutableAllocator::allocateNewSpace): + (JSC::ExecutableAllocator::allocate): + * jit/ExecutableAllocator.h: + (JSC::roundUpAllocationSize): + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator): + (JSC::ExecutableAllocator::allocate): + * runtime/ButterflyInlines.h: + (JSC::Butterfly::createUninitialized): + * runtime/Completion.cpp: + (JSC::evaluate): + * runtime/JSArray.h: + (JSC::constructArray): + * runtime/JSGlobalObject.cpp: + (JSC::slowValidateCell): + * runtime/JSObject.cpp: + (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists): + (JSC::JSObject::createArrayStorage): + * tools/TieredMMapArray.h: + (JSC::TieredMMapArray::append): + * yarr/YarrInterpreter.cpp: + (JSC::Yarr::Interpreter::allocDisjunctionContext): + (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::InputStream::readChecked): + (JSC::Yarr::Interpreter::InputStream::uncheckInput): + (JSC::Yarr::Interpreter::InputStream::atEnd): + (JSC::Yarr::Interpreter::interpret): + +2013-01-22 Filip Pizlo + + Convert CSE phase to not rely too much on NodeIndex + https://bugs.webkit.org/show_bug.cgi?id=107616 + + Reviewed by Geoffrey Garen. + + - Instead of looping over the graph (which assumes that you can simply loop over all + nodes without considering blocks first) to reset node.replacement, do that in the + loop that sets up relevantToOSR, just before running CSE on the block. + + - Instead of having a relevantToOSR bitvector indexed by NodeIndex, made + NodeRelevantToOSR be a NodeFlag. We had exactly one bit left in NodeFlags, so I did + some reshuffling to fit it in. + + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::CSEPhase): + (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren): + (JSC::DFG::CSEPhase::performNodeCSE): + (JSC::DFG::CSEPhase::performBlockCSE): + (CSEPhase): + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGNodeType.h: + (DFG): + +2013-01-21 Kentaro Hara + + Implement UIEvent constructor + https://bugs.webkit.org/show_bug.cgi?id=107430 + + Reviewed by Adam Barth. + + Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm + + UIEvent constructor is implemented under a DOM4_EVENTS_CONSTRUCTOR flag, + which is enabled on Safari and Chromium for now. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-22 Roger Fong + + Unreviewed VS2010 build fix following r140259. + + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: + +2013-01-22 Roger Fong + + JavaScriptCore property sheets, project files and modified build scripts. + https://bugs.webkit.org/show_bug.cgi?id=106987 + + Reviewed by Brent Fulgham. + + * JavaScriptCore.vcxproj: Added. + * JavaScriptCore.vcxproj/JavaScriptCore.resources: Added. + * JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist: Added. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Added. + * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.user: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreCF.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreExports.def: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.user: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: Added. + * JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: Added. + * JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd: Added. + * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: Added. + * JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.make: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj.user: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/build-LLIntAssembly.sh: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj.user: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj.user: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Added. + * JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Added. + * JavaScriptCore.vcxproj/build-generated-files.sh: Added. + * JavaScriptCore.vcxproj/copy-files.cmd: Added. + * JavaScriptCore.vcxproj/jsc: Added. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Added. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Added. + * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.user: Added. + * JavaScriptCore.vcxproj/jsc/jscCommon.props: Added. + * JavaScriptCore.vcxproj/jsc/jscDebug.props: Added. + * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: Added. + * JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd: Added. + * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: Added. + * JavaScriptCore.vcxproj/jsc/jscRelease.props: Added. + * config.h: + +2013-01-22 Joseph Pecoraro + + [Mac] Enable Page Visibility (PAGE_VISIBILITY_API) + https://bugs.webkit.org/show_bug.cgi?id=107230 + + Reviewed by David Kilzer. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-22 Tobias Netzel + + Yarr JIT isn't big endian compatible + https://bugs.webkit.org/show_bug.cgi?id=102897 + + Reviewed by Oliver Hunt. + + This patch was tested in the current mozilla codebase only and has passed the regexp tests there. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce): + +2013-01-22 David Kilzer + + Fix DateMath.cpp to compile with -Wshorten-64-to-32 + + + Reviewed by Darin Adler. + + * runtime/JSDateMath.cpp: + (JSC::parseDateFromNullTerminatedCharacters): Remove unneeded + static_cast(). + +2013-01-22 Tim Horton + + PDFPlugin: Build PDFPlugin everywhere, enable at runtime + https://bugs.webkit.org/show_bug.cgi?id=107117 + + Reviewed by Alexey Proskuryakov. + + Since PDFLayerController SPI is all forward-declared, the plugin should build + on all Mac platforms, and can be enabled at runtime. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-21 Justin Schuh + + [CHROMIUM] Suppress c4267 build warnings for Win64 targets + https://bugs.webkit.org/show_bug.cgi?id=107499 + + Reviewed by Abhishek Arya. + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2013-01-21 Dirk Schulze + + Add build flag for Canvas's Path object (disabled by default) + https://bugs.webkit.org/show_bug.cgi?id=107473 + + Reviewed by Dean Jackson. + + Add CANVAS_PATH build flag to build systems. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-20 Geoffrey Garen + + Weak GC maps should be easier to use + https://bugs.webkit.org/show_bug.cgi?id=107312 + + Reviewed by Sam Weinig. + + Follow-up fix. + + * runtime/PrototypeMap.cpp: + (JSC::PrototypeMap::emptyObjectStructureForPrototype): Restored this + ASSERT, which was disabled because of a bug in WeakGCMap. + + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::add): We can't pass our passed-in value to add() because + a PassWeak() clears itself when passed to another function. So, we pass + nullptr instead, and fix things up afterwards. + +2013-01-20 Geoffrey Garen + + Unreviewed. + + Temporarily disabling this ASSERT to get the bots green + while I investigate a fix. + + * runtime/PrototypeMap.cpp: + (JSC::PrototypeMap::emptyObjectStructureForPrototype): + +2013-01-20 Filip Pizlo + + Inserting a node into the DFG graph should not require five lines of code + https://bugs.webkit.org/show_bug.cgi?id=107381 + + Reviewed by Sam Weinig. + + This adds fairly comprehensive support for inserting a node into a DFG graph in one + method call. A common example of this is: + + m_insertionSet.insertNode(indexInBlock, DontRefChildren, DontRefNode, SpecNone, ForceOSRExit, codeOrigin); + + The arguments to insert() specify what reference counting you need to have happen + (RefChildren => recursively refs all children, RefNode => non-recursively refs the node + that was created), the prediction to set (SpecNone is a common default), followed by + the arguments to the Node() constructor. InsertionSet::insertNode() and similar methods + (Graph::addNode() and BasicBlock::appendNode()) all use a common variadic template + function macro from DFGVariadicFunction.h. Also, all of these methods will automatically + non-recursively ref() the node being created if the flags say NodeMustGenerate. + + In all, this new mechanism retains the flexibility of the old approach (you get to + manage ref counts yourself, albeit in less code) while ensuring that most code that adds + nodes to the graph now needs less code to do it. + + In the future, we should revisit the reference counting methodology in the DFG: we could + do like most compilers and get rid of it entirely, or we could make it automatic. This + patch doesn't attempt to make any such major changes, and only seeks to simplify the + technique we were already using (manual ref counting). + + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/Operands.h: + (JSC::dumpOperands): + * dfg/DFGAdjacencyList.h: + (AdjacencyList): + (JSC::DFG::AdjacencyList::kind): + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + * dfg/DFGBasicBlock.h: + (DFG): + (BasicBlock): + * dfg/DFGBasicBlockInlines.h: Added. + (DFG): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::keepOperandAlive): + * dfg/DFGCommon.h: + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::ConstantFoldingPhase): + (JSC::DFG::ConstantFoldingPhase::foldConstants): + (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck): + (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode): + (ConstantFoldingPhase): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::FixupPhase): + (JSC::DFG::FixupPhase::fixupBlock): + (JSC::DFG::FixupPhase::fixupNode): + (FixupPhase): + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + (JSC::DFG::FixupPhase::injectInt32ToDoubleNode): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::ref): + (Graph): + * dfg/DFGInsertionSet.h: + (DFG): + (JSC::DFG::Insertion::Insertion): + (JSC::DFG::Insertion::element): + (Insertion): + (JSC::DFG::InsertionSet::InsertionSet): + (JSC::DFG::InsertionSet::insert): + (InsertionSet): + (JSC::DFG::InsertionSet::execute): + * dfg/DFGNode.h: + (JSC::DFG::Node::Node): + (Node): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * dfg/DFGVariadicFunction.h: Added. + +2013-01-19 Geoffrey Garen + + Track inheritance structures in a side table, instead of using a private + name in each prototype + https://bugs.webkit.org/show_bug.cgi?id=107378 + + Reviewed by Sam Weinig and Phil Pizlo. + + This is a step toward object size inference. + + Using a side table frees us to use a more complex key (a pair of + prototype and expected inline capacity). + + It also avoids ruining inline caches for prototypes. (Adding a new private + name for a new inline capacity would change the prototype's structure, + possibly firing watchpoints, making inline caches go polymorphic, and + generally causing us to have a bad time.) + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: Buildage. + + * runtime/ArrayPrototype.cpp: + (JSC::ArrayPrototype::finishCreation): Updated to use new side table API. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::cacheInheritorID): Updated to use new side table API. + + (JSC::JSFunction::visitChildren): Fixed a long-standing bug where JSFunction + forgot to visit one of its data members (m_cachedInheritorID). This + wasn't a user-visible problem before because JSFunction would always + visit its .prototype property, which visited its m_cachedInheritorID. + But now, function.prototype only weakly owns function.m_cachedInheritorID. + + * runtime/JSGlobalData.h: + (JSGlobalData): Added the map, taking care to make sure that its + destructor would run after the heap destructor. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): Updated to use new side table API. + + * runtime/JSObject.cpp: + (JSC::JSObject::notifyPresenceOfIndexedAccessors): + (JSC::JSObject::setPrototype): + * runtime/JSObject.h: + (JSObject): Updated to use new side table API, and removed lots of code + that used to manage the per-object private name. + + * runtime/JSProxy.cpp: + (JSC::JSProxy::setTarget): + * runtime/ObjectConstructor.cpp: + (JSC::objectConstructorCreate): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::finishCreation): Updated to use new side table API. + + * runtime/PrototypeMap.cpp: Added. + (JSC): + (JSC::PrototypeMap::addPrototype): + (JSC::PrototypeMap::emptyObjectStructureForPrototype): + * runtime/PrototypeMap.h: Added. + (PrototypeMap): + (JSC::PrototypeMap::isPrototype): + (JSC::PrototypeMap::clearEmptyObjectStructureForPrototype): New side table. + This is a simple weak map, mapping an object to the structure you should + use when inheriting from that object. (In future, inline capacity will + be a part of the mapping.) + + I used two maps to preserve existing behavior that allowed us to speculate + about an object becoming a prototype, even if it wasn't one at the moment. + However, I suspect that behavior can be removed without harm. + + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::contains): + (WeakGCMap): I would rate myself a 6 / 10 in C++. + +2013-01-18 Dan Bernstein + + Removed duplicate references to two headers in the project files. + + Rubber-stamped by Mark Rowe. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-01-18 Michael Saboff + + Unreviewed build fix for building JSC with DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE enabled in DFGCommon.h. + Fixes the case where the argument node in fixupNode is freed due to the Vector storage being reallocated. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + +2013-01-18 Michael Saboff + + Unreviewed build fix for release builds when DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE is set to 1 in DFGCommon.h. + + * dfg/DFGCFAPhase.cpp: Added #include "Operations.h" + +2013-01-18 Michael Saboff + + Change set r140201 broke editing/selection/move-by-word-visually-multi-line.html + https://bugs.webkit.org/show_bug.cgi?id=107340 + + Reviewed by Filip Pizlo. + + Due to the change landed in r140201, more nodes might end up + generating Int32ToDouble nodes. Therefore, changed the JSVALUE64 + constant path of compileInt32ToDouble() to use the more + restrictive isInt32Constant() check on the input. This check was + the same as the existing ASSERT() so the ASSERT was eliminated. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): + +2013-01-18 Viatcheslav Ostapenko + + Weak GC maps should be easier to use + https://bugs.webkit.org/show_bug.cgi?id=107312 + + Reviewed by Ryosuke Niwa. + + Build fix for linux platforms after r140194. + + * runtime/WeakGCMap.h: + (WeakGCMap): + +2013-01-18 Michael Saboff + + Harden ArithDiv of integers fix-up by inserting Int32ToDouble node directly + https://bugs.webkit.org/show_bug.cgi?id=107321 + + Reviewed by Filip Pizlo. + + Split out the Int32ToDouble node insertion from fixDoubleEdge() and used it directly when we're fixing up + an ArithDiv node with integer inputs and output for platforms that don't have integer division. + Since we are checking that our inputs should be ints, we can just insert the Int32ToDouble node + without any further checks. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::fixDoubleEdge): + (FixupPhase): + (JSC::DFG::FixupPhase::injectInt32ToDoubleNode): + +2013-01-18 Michael Saboff + + Fix up of ArithDiv nodes for non-x86 CPUs is broken + https://bugs.webkit.org/show_bug.cgi?id=107309 + + Reviewed by Filip Pizlo. + + Changed the logic so that we insert an Int32ToDouble node when the existing edge is not SpecDouble. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixDoubleEdge): + +2013-01-18 Dan Bernstein + + Tried to fix the build after r140194. + + * API/JSWrapperMap.mm: + (-[JSWrapperMap wrapperForObject:]): + +2013-01-18 Mark Hahnenberg + + Objective-C API: Update documentation for JSValue and JSContext + https://bugs.webkit.org/show_bug.cgi?id=107313 + + Reviewed by Geoffrey Garen. + + After changing the semantics of object lifetime we need to update the API documentation to reflect the new semantics. + + * API/APIJSValue.h: + * API/JSContext.h: + +2013-01-18 Balazs Kilvady + + r134080 causes heap problem on linux systems where PAGESIZE != 4096 + https://bugs.webkit.org/show_bug.cgi?id=102828 + + Reviewed by Mark Hahnenberg. + + Make MarkStackSegment::blockSize as the capacity of segments of a MarkStackArray. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: + * heap/MarkStack.cpp: + (JSC): + (JSC::MarkStackArray::MarkStackArray): + (JSC::MarkStackArray::expand): + (JSC::MarkStackArray::donateSomeCellsTo): + (JSC::MarkStackArray::stealSomeCellsFrom): + * heap/MarkStack.h: + (JSC::MarkStackSegment::data): + (CapacityFromSize): + (MarkStackArray): + * heap/MarkStackInlines.h: + (JSC::MarkStackArray::setTopForFullSegment): + (JSC::MarkStackArray::append): + (JSC::MarkStackArray::isEmpty): + (JSC::MarkStackArray::size): + * runtime/Options.h: + (JSC): + +2013-01-18 Geoffrey Garen + + Weak GC maps should be easier to use + https://bugs.webkit.org/show_bug.cgi?id=107312 + + Reviewed by Sam Weinig. + + This patch changes WeakGCMap to not use a WeakImpl finalizer to remove + items from the map, and to instead have the map automatically remove + stale items itself upon insertion. This has a few advantages: + + (1) WeakGCMap is now compatible with all the specializations you would + use for HashMap. + + (2) There's no need for clients to write special finalization munging + functions. + + (3) Clients can specify custom value finalizers if they like. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Def! + + * API/JSWeakObjectMapRefPrivate.cpp: Setter no longer requires a global + data, since we've reduced interdependency. + + * heap/Handle.h: No more need to forward declare, since we've reduced + interdependency. + + * heap/Weak.h: + (Weak): Use explicit so we can assign directly to a weak map iterator + without ambiguity between Weak and PassWeak. + + * runtime/Structure.cpp: + (JSC::StructureTransitionTable::add): See above. + + * runtime/Structure.h: + (JSC): + * runtime/StructureTransitionTable.h: + (StructureTransitionTable): Bad code goes away, programmer happy. + + * runtime/WeakGCMap.h: + (JSC): + (WeakGCMap): + (JSC::WeakGCMap::WeakGCMap): + (JSC::WeakGCMap::set): + (JSC::WeakGCMap::add): + (JSC::WeakGCMap::find): + (JSC::WeakGCMap::contains): + (JSC::WeakGCMap::gcMap): + (JSC::WeakGCMap::gcMapIfNeeded): Inherit from HashMap and override any + function that might observe a Weak that has died, just enough to + make such items appear as if they are not in the table. + +2013-01-18 Michael Saboff + + Refactor isPowerOf2() and add getLSBSet() + https://bugs.webkit.org/show_bug.cgi?id=107306 + + Reviewed by Filip Pizlo. + + Moved implementation of isPowerOf2() to new hasOneBitSet() in wtf/MathExtras.h. + + * runtime/PropertyMapHashTable.h: + (JSC::isPowerOf2): + +2013-01-17 Mark Hahnenberg + + Objective-C API: Clean up JSValue.mm + https://bugs.webkit.org/show_bug.cgi?id=107163 + + Reviewed by Darin Adler. + + m_context is no longer weak, so there is now a lot of dead code in in JSValue.mm, and a wasted message send + on every API call. In the head of just about every method in JSValue.mm we're doing: + + JSContext *context = [self context]; + if (!context) + return nil; + + This is getting a retained copy of the context, which is no longer necessary now m_context is no longer weak. + We can just delete all these lines from all functions doing this, and where they were referring to the local + variable 'context', instead we can just access m_context directly. + + Since we're already going to be modifying most of JSValue.mm, we'll also do the following: + + 1) context @property is no longer weak – the context property is declared as: + + @property(readonly, weak) JSContext *context; + + This is really only informative (since we're not presently synthesizing the ivar), but it is now misleading. + We should change it to: + + @property(readonly, retain) JSContext *context; + + 2) the JSContext ivar and accessor can be automatically generated. Since we're no longer doing anything + special with m_context, we can just let the compiler handle the ivar for us. We'll delete: + + JSContext *m_context; + + and: + + - (JSContext *)context + { + return m_context; + + } + + and find&replace "m_context" to "_context" in JSValue.mm. + + * API/APIJSValue.h: + * API/JSValue.mm: + (-[JSValue toObject]): + (-[JSValue toBool]): + (-[JSValue toDouble]): + (-[JSValue toNumber]): + (-[JSValue toString]): + (-[JSValue toDate]): + (-[JSValue toArray]): + (-[JSValue toDictionary]): + (-[JSValue valueForProperty:]): + (-[JSValue setValue:forProperty:]): + (-[JSValue deleteProperty:]): + (-[JSValue hasProperty:]): + (-[JSValue defineProperty:descriptor:]): + (-[JSValue valueAtIndex:]): + (-[JSValue setValue:atIndex:]): + (-[JSValue isUndefined]): + (-[JSValue isNull]): + (-[JSValue isBoolean]): + (-[JSValue isNumber]): + (-[JSValue isString]): + (-[JSValue isObject]): + (-[JSValue isEqualToObject:]): + (-[JSValue isEqualWithTypeCoercionToObject:]): + (-[JSValue isInstanceOf:]): + (-[JSValue callWithArguments:]): + (-[JSValue constructWithArguments:]): + (-[JSValue invokeMethod:withArguments:]): + (-[JSValue objectForKeyedSubscript:]): + (-[JSValue setObject:forKeyedSubscript:]): + (-[JSValue initWithValue:inContext:]): + (-[JSValue dealloc]): + (-[JSValue description]): + +2013-01-17 Mark Hahnenberg + + Objective-C API: Clean up JSValue + https://bugs.webkit.org/show_bug.cgi?id=107156 + + Reviewed by Oliver Hunt. + + JSContext m_protectCounts, protect, unprotect are all now unnecessary overhead, and should all be removed. + These exist to handle the context going away before the value does; the context needs to be able to unprotect + values early. Since the value is now keeping the context alive there is no longer any danger of this happening; + instead we should just protect/unprotect the value in JSValue's init/dealloc methods. + + * API/JSContext.mm: + (-[JSContext dealloc]): + * API/JSContextInternal.h: + * API/JSValue.mm: + (-[JSValue initWithValue:inContext:]): + (-[JSValue dealloc]): + +2013-01-17 Filip Pizlo + + DFG Node::ref() and Node::deref() should not return bool, and should have postfixRef variants + https://bugs.webkit.org/show_bug.cgi?id=107147 + + Reviewed by Mark Hahnenberg. + + This small refactoring will enable a world where ref() returns Node*, which is useful for + https://bugs.webkit.org/show_bug.cgi?id=106868. Also, while this refactoring does lead to + slightly less terse code, it's also slightly more self-explanatory. I could never quite + remember what the meaning of the bool return from ref() and deref() was. + + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::collectGarbage): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::ref): + (JSC::DFG::Graph::deref): + * dfg/DFGNode.h: + (JSC::DFG::Node::ref): + (Node): + (JSC::DFG::Node::postfixRef): + (JSC::DFG::Node::deref): + (JSC::DFG::Node::postfixDeref): + +2013-01-17 Alexey Proskuryakov + + Added svn:ignore=*.pyc, so that ud_opcode.pyc and ud_optable.pyc don't show up + in svn stat. + + * disassembler/udis86: Added property svn:ignore. + +2013-01-16 Filip Pizlo + + DFG 32_64 backend doesn't check for hasArrayStorage() in NewArrayWithSize + https://bugs.webkit.org/show_bug.cgi?id=107081 + + Reviewed by Michael Saboff. + + This bug led to the 32_64 backend emitting contiguous allocation code to allocate + ArrayStorage arrays. This then led to all manner of heap corruption, since + subsequent array accesses would be accessing the contiguous array "as if" it was + an arraystorage array. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-01-16 Jonathan Liu + + Add missing sys/mman.h include on Mac + https://bugs.webkit.org/show_bug.cgi?id=98089 + + Reviewed by Darin Adler. + + The madvise function and MADV_FREE constant require sys/mman.h. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + +2013-01-15 Michael Saboff + + DFG X86: division in the used-as-int case doesn't correctly check for -2^31/-1 + https://bugs.webkit.org/show_bug.cgi?id=106978 + + Reviewed by Filip Pizlo. + + Changed the numerator equal to -2^31 check to just return if we expect an integer + result, since the check is after we have determined that the denominator is -1. + The int result of -2^31 / -1 is -2^31, so just return the numerator as the result. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForX86): + +2013-01-15 Levi Weintraub + + Unreviewed, rolling out r139792. + http://trac.webkit.org/changeset/139792 + https://bugs.webkit.org/show_bug.cgi?id=106970 + + Broke the windows build. + + * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo. + +2013-01-15 Pratik Solanki + + Use MADV_FREE_REUSABLE to return JIT memory to OS + https://bugs.webkit.org/show_bug.cgi?id=106830 + + + Reviewed by Geoffrey Garen. + + Use MADV_FREE_REUSABLE to return JIT memory on OSes that have the underlying madvise bug + fixed. + + * jit/ExecutableAllocatorFixedVMPool.cpp: + (JSC::FixedVMPoolExecutableAllocator::notifyPageIsFree): + +2013-01-15 Levi Weintraub + + Unreviewed, rolling out r139790. + http://trac.webkit.org/changeset/139790 + https://bugs.webkit.org/show_bug.cgi?id=106948 + + The patch is failing its own test. + + * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo. + +2013-01-15 Zan Dobersek + + [Autotools] Unify JavaScriptCore sources list, regardless of target OS + https://bugs.webkit.org/show_bug.cgi?id=106007 + + Reviewed by Gustavo Noronha Silva. + + Include the Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp target + in the general sources list as it is guarded by the ENABLE_EXECUTABLE_ALLOCATOR_FIXED + feature define. This define is only used on 64-bit architecture and indirectly depends + on enabling either JIT or YARR JIT feature. Both of these defines are disabled on + Windows OS when using 64-bit architecture so there's no need to add this target to + sources only when the target OS is Windows. + + * GNUmakefile.list.am: + +2013-01-11 Filip Pizlo + + DFG should not forget that it had proved something to be a constant during a merge just because it's merging against the empty value + https://bugs.webkit.org/show_bug.cgi?id=106727 + + Reviewed by Oliver Hunt. + + The problem was this statement: + + if (m_value != other.m_value) + m_value = JSValue(); + + This is well-intentioned, in the sense that if we want our abstract value (i.e. this) to become the superset of the other + abstract value, and the two abstract values have proven different constants, then our abstract value should rescind its + claim that it has been proven to be constant. But this misses the special case that if the other abstract value is + completely clear (meaning that it wishes to contribute zero information and so the superset operation shouldn't change + this), it will have a clear m_value. So, the code prior to this patch would rescind the constant proof even though it + didn't have to. + + This comes up rarely and I don't believe it will be a performance win, but it is good to have the CFA been consistently + precise as often as possible. + + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::merge): + +2013-01-11 Filip Pizlo + + Python implementation reports "MemoryError" instead of doing things + https://bugs.webkit.org/show_bug.cgi?id=106690 + + Reviewed by Oliver Hunt. + + The bug was that the CFA was assuming that a variable is dead at the end of a basic block and hence doesn't need to + be merged to the next block if the last mention of the variable was dead. This is almost correct, except that it + doesn't work if the last mention is a GetLocal - the GetLocal itself may be dead, but that doesn't mean that the + variable is dead - it may still be live. The appropriate thing to do is to look at the GetLocal's Phi. If the + variable is used in the next block then the next block will have a reference to the last mention in our block unless + that last mention is a GetLocal, in which case it will link to the Phi. Doing it this way captures everything that + the CFA wants: if the last use is a live GetLocal then the CFA needs to consider the GetLocal itself for possible + refinements to the proof of the value in the variable, but if the GetLocal is dead, then this must mean that the + variable is not mentioned in the block but may still be "passed through" it, which is what the Phi will tell us. + Note that it is not possible for the GetLocal to refer to anything other than a Phi, and it is also not possible + for the last mention of a variable to be a dead GetLocal while there are other mentions that aren't dead - if + there had been SetLocals or GetLocals prior to the dead one then the dead one wouldn't have been emitted by the + parser. + + This also fixes a similar bug in the handling of captured variables. If a variable is captured, then it doesn't + matter if the last mention is dead, or not. Either way, we already know that a captured variable will be live in + the next block, so we must merge it no matter what. + + Finally, this change makes the output of Operands dumping a bit more verbose: it now prints the variable name next + to each variable's dump. I've often found the lack of this information confusing particularly for operand dumps + that involve a lot of variables. + + * bytecode/Operands.h: + (JSC::dumpOperands): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::mergeStateAtTail): + +2013-01-14 Roger Fong + + Unreviewed. Fix vcproj file. Missing file tag after http://trac.webkit.org/changeset/139541. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2013-01-13 Filip Pizlo + + DFG phases that store per-node information should store it in Node itself rather than using a secondary vector + https://bugs.webkit.org/show_bug.cgi?id=106753 + + Reviewed by Geoffrey Garen. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::AbstractState): + (JSC::DFG::AbstractState::beginBasicBlock): + (JSC::DFG::AbstractState::dump): + * dfg/DFGAbstractState.h: + (JSC::DFG::AbstractState::forNode): + (AbstractState): + * dfg/DFGCFGSimplificationPhase.cpp: + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::CSEPhase): + (JSC::DFG::CSEPhase::performSubstitution): + (JSC::DFG::CSEPhase::setReplacement): + (CSEPhase): + * dfg/DFGNode.h: + (Node): + +2013-01-12 Tim Horton + + Unreviewed build fix. + + * API/JSBlockAdaptor.mm: + * API/JSContext.mm: + * API/JSValue.mm: + +2013-01-12 Csaba Osztrogonác + + Unreviewed 64 bit buildfix after r139496. + + * dfg/DFGOperations.cpp: + +2013-01-11 Filip Pizlo + + Unreviewed, speculative build fix. + + * API/JSWrapperMap.mm: + +2013-01-10 Filip Pizlo + + JITThunks should not compile only because of luck + https://bugs.webkit.org/show_bug.cgi?id=105696 + + Rubber stamped by Sam Weinig and Geoffrey Garen. + + This patch was supposed to just move JITThunks into its own file. But then I + realized that there is a horrible circular dependency chain between JSCell, + JSGlobalData, CallFrame, and Weak, which only works because of magical include + order in JITStubs.h, and the fact that JSGlobalData.h includes JITStubs.h + before it includes JSCell or JSValue. + + I first tried to just get JITThunks.h to just magically do the same pointless + includes that JITStubs.h had, but then I decided to actually fix the underflying + problem, which was that JSCell needed CallFrame, CallFrame needed JSGlobalData, + JSGlobalData needed JITThunks, JITThunks needed Weak, and Weak needed JSCell. + Now, all of JSCell's outgoing dependencies are placed in JSCellInlines.h. This + also gave me an opportunity to move JSValue inline methods from JSCell.h into + JSValueInlines.h. But to make this really work, I needed to remove includes of + *Inlines.h from other headers (CodeBlock.h for example included JSValueInlines.h, + which defeats the whole entire purpose of having an Inlines.h file), and I needed + to add includes of *Inlines.h into a bunch of .cpp files. I did this mostly by + having .cpp files include Operations.h. In future, if you're adding a .cpp file + to JSC, you'll almost certainly have to include Operations.h unless you enjoy + link errors. + + * API/JSBase.cpp: + * API/JSCallbackConstructor.cpp: + * API/JSCallbackFunction.cpp: + * API/JSCallbackObject.cpp: + * API/JSClassRef.cpp: + * API/JSContextRef.cpp: + * API/JSObjectRef.cpp: + * API/JSScriptRef.cpp: + * API/JSWeakObjectMapRefPrivate.cpp: + * JSCTypedArrayStubs.h: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/ArrayAllocationProfile.cpp: + * bytecode/CodeBlock.cpp: + * bytecode/GetByIdStatus.cpp: + * bytecode/LazyOperandValueProfile.cpp: + * bytecode/ResolveGlobalStatus.cpp: + * bytecode/SpeculatedType.cpp: + * bytecode/UnlinkedCodeBlock.cpp: + * bytecompiler/BytecodeGenerator.cpp: + * debugger/Debugger.cpp: + * debugger/DebuggerActivation.cpp: + * debugger/DebuggerCallFrame.cpp: + * dfg/DFGArgumentsSimplificationPhase.cpp: + * dfg/DFGArrayMode.cpp: + * dfg/DFGByteCodeParser.cpp: + * dfg/DFGConstantFoldingPhase.cpp: + * dfg/DFGDriver.cpp: + * dfg/DFGFixupPhase.cpp: + * dfg/DFGGraph.cpp: + * dfg/DFGJITCompiler.cpp: + * dfg/DFGOSREntry.cpp: + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + * dfg/DFGOSRExitCompiler64.cpp: + * dfg/DFGPredictionPropagationPhase.cpp: + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR): + (DFG): + (JSC::DFG::SpeculativeJIT::silentSavePlanForFPR): + (JSC::DFG::SpeculativeJIT::silentSpill): + (JSC::DFG::SpeculativeJIT::silentFill): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + * dfg/DFGSpeculativeJIT64.cpp: + * dfg/DFGStructureCheckHoistingPhase.cpp: + * dfg/DFGVariableEventStream.cpp: + * heap/CopiedBlock.h: + * heap/CopiedSpace.cpp: + * heap/HandleSet.cpp: + * heap/Heap.cpp: + * heap/HeapStatistics.cpp: + * heap/SlotVisitor.cpp: + * heap/WeakBlock.cpp: + * interpreter/CallFrame.cpp: + * interpreter/CallFrame.h: + * jit/ClosureCallStubRoutine.cpp: + * jit/GCAwareJITStubRoutine.cpp: + * jit/JIT.cpp: + * jit/JITArithmetic.cpp: + * jit/JITArithmetic32_64.cpp: + * jit/JITCall.cpp: + * jit/JITCall32_64.cpp: + * jit/JITCode.h: + * jit/JITExceptions.cpp: + * jit/JITStubs.h: + * jit/JITThunks.h: + * jsc.cpp: + * llint/LLIntExceptions.cpp: + * profiler/LegacyProfiler.cpp: + * profiler/ProfileGenerator.cpp: + * profiler/ProfilerBytecode.cpp: + * profiler/ProfilerBytecodeSequence.cpp: + * profiler/ProfilerBytecodes.cpp: + * profiler/ProfilerCompilation.cpp: + * profiler/ProfilerCompiledBytecode.cpp: + * profiler/ProfilerDatabase.cpp: + * profiler/ProfilerOSRExit.cpp: + * profiler/ProfilerOSRExitSite.cpp: + * profiler/ProfilerOrigin.cpp: + * profiler/ProfilerOriginStack.cpp: + * profiler/ProfilerProfiledBytecodes.cpp: + * runtime/ArgList.cpp: + * runtime/Arguments.cpp: + * runtime/ArrayConstructor.cpp: + * runtime/BooleanConstructor.cpp: + * runtime/BooleanObject.cpp: + * runtime/BooleanPrototype.cpp: + * runtime/CallData.cpp: + * runtime/CodeCache.cpp: + * runtime/Completion.cpp: + * runtime/ConstructData.cpp: + * runtime/DateConstructor.cpp: + * runtime/DateInstance.cpp: + * runtime/DatePrototype.cpp: + * runtime/Error.cpp: + * runtime/ErrorConstructor.cpp: + * runtime/ErrorInstance.cpp: + * runtime/ErrorPrototype.cpp: + * runtime/ExceptionHelpers.cpp: + * runtime/Executable.cpp: + * runtime/FunctionConstructor.cpp: + * runtime/FunctionPrototype.cpp: + * runtime/GetterSetter.cpp: + * runtime/Identifier.cpp: + * runtime/InternalFunction.cpp: + * runtime/JSActivation.cpp: + * runtime/JSBoundFunction.cpp: + * runtime/JSCell.cpp: + * runtime/JSCell.h: + (JSC): + * runtime/JSCellInlines.h: Added. + (JSC): + (JSC::JSCell::JSCell): + (JSC::JSCell::finishCreation): + (JSC::JSCell::structure): + (JSC::JSCell::visitChildren): + (JSC::allocateCell): + (JSC::isZapped): + (JSC::JSCell::isObject): + (JSC::JSCell::isString): + (JSC::JSCell::isGetterSetter): + (JSC::JSCell::isProxy): + (JSC::JSCell::isAPIValueWrapper): + (JSC::JSCell::setStructure): + (JSC::JSCell::methodTable): + (JSC::JSCell::inherits): + (JSC::JSCell::fastGetOwnPropertySlot): + (JSC::JSCell::fastGetOwnProperty): + (JSC::JSCell::toBoolean): + * runtime/JSDateMath.cpp: + * runtime/JSFunction.cpp: + * runtime/JSFunction.h: + (JSC): + * runtime/JSGlobalData.h: + (JSC): + (JSGlobalData): + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalObjectFunctions.cpp: + * runtime/JSLock.cpp: + * runtime/JSNameScope.cpp: + * runtime/JSNotAnObject.cpp: + * runtime/JSONObject.cpp: + * runtime/JSObject.h: + (JSC): + * runtime/JSProxy.cpp: + * runtime/JSScope.cpp: + * runtime/JSSegmentedVariableObject.cpp: + * runtime/JSString.h: + (JSC): + * runtime/JSStringJoiner.cpp: + * runtime/JSSymbolTableObject.cpp: + * runtime/JSValue.cpp: + * runtime/JSValueInlines.h: + (JSC::JSValue::toInt32): + (JSC::JSValue::toUInt32): + (JSC): + (JSC::JSValue::isUInt32): + (JSC::JSValue::asUInt32): + (JSC::JSValue::asNumber): + (JSC::jsNaN): + (JSC::JSValue::JSValue): + (JSC::JSValue::encode): + (JSC::JSValue::decode): + (JSC::JSValue::operator bool): + (JSC::JSValue::operator==): + (JSC::JSValue::operator!=): + (JSC::JSValue::isEmpty): + (JSC::JSValue::isUndefined): + (JSC::JSValue::isNull): + (JSC::JSValue::isUndefinedOrNull): + (JSC::JSValue::isCell): + (JSC::JSValue::isInt32): + (JSC::JSValue::isDouble): + (JSC::JSValue::isTrue): + (JSC::JSValue::isFalse): + (JSC::JSValue::tag): + (JSC::JSValue::payload): + (JSC::JSValue::asInt32): + (JSC::JSValue::asDouble): + (JSC::JSValue::asCell): + (JSC::JSValue::isNumber): + (JSC::JSValue::isBoolean): + (JSC::JSValue::asBoolean): + (JSC::reinterpretDoubleToInt64): + (JSC::reinterpretInt64ToDouble): + (JSC::JSValue::isString): + (JSC::JSValue::isPrimitive): + (JSC::JSValue::isGetterSetter): + (JSC::JSValue::isObject): + (JSC::JSValue::getString): + (JSC::::getString): + (JSC::JSValue::getObject): + (JSC::JSValue::getUInt32): + (JSC::JSValue::toPrimitive): + (JSC::JSValue::getPrimitiveNumber): + (JSC::JSValue::toNumber): + (JSC::JSValue::toObject): + (JSC::JSValue::isFunction): + (JSC::JSValue::inherits): + (JSC::JSValue::toThisObject): + (JSC::JSValue::get): + (JSC::JSValue::put): + (JSC::JSValue::putByIndex): + (JSC::JSValue::structureOrUndefined): + (JSC::JSValue::equal): + (JSC::JSValue::equalSlowCaseInline): + (JSC::JSValue::strictEqualSlowCaseInline): + (JSC::JSValue::strictEqual): + * runtime/JSVariableObject.cpp: + * runtime/JSWithScope.cpp: + * runtime/JSWrapperObject.cpp: + * runtime/LiteralParser.cpp: + * runtime/Lookup.cpp: + * runtime/NameConstructor.cpp: + * runtime/NameInstance.cpp: + * runtime/NamePrototype.cpp: + * runtime/NativeErrorConstructor.cpp: + * runtime/NativeErrorPrototype.cpp: + * runtime/NumberConstructor.cpp: + * runtime/NumberObject.cpp: + * runtime/ObjectConstructor.cpp: + * runtime/ObjectPrototype.cpp: + * runtime/Operations.h: + (JSC): + * runtime/PropertySlot.cpp: + * runtime/RegExp.cpp: + * runtime/RegExpCache.cpp: + * runtime/RegExpCachedResult.cpp: + * runtime/RegExpConstructor.cpp: + * runtime/RegExpMatchesArray.cpp: + * runtime/RegExpObject.cpp: + * runtime/RegExpPrototype.cpp: + * runtime/SmallStrings.cpp: + * runtime/SparseArrayValueMap.cpp: + * runtime/StrictEvalActivation.cpp: + * runtime/StringConstructor.cpp: + * runtime/StringObject.cpp: + * runtime/StringRecursionChecker.cpp: + * runtime/Structure.h: + (JSC): + * runtime/StructureChain.cpp: + * runtime/TimeoutChecker.cpp: + * testRegExp.cpp: + +2013-01-11 Filip Pizlo + + If you use Phantom to force something to be live across an OSR exit, you should put it after the OSR exit + https://bugs.webkit.org/show_bug.cgi?id=106724 + + Reviewed by Oliver Hunt. + + In cases where we were getting it wrong, I think it was benign because we would either already have an + OSR exit prior to there, or the operand would be a constant. But still, it's good to get this right. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + +2013-01-11 Filip Pizlo + + Phantom(GetLocal) should be treated as relevant to OSR + https://bugs.webkit.org/show_bug.cgi?id=106715 + + Reviewed by Mark Hahnenberg. + + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performBlockCSE): + +2013-01-11 Pratik Solanki + + Fix function name typo ProgramExecutable::initalizeGlobalProperties() + https://bugs.webkit.org/show_bug.cgi?id=106701 + + Reviewed by Geoffrey Garen. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + * runtime/Executable.cpp: + (JSC::ProgramExecutable::initializeGlobalProperties): + * runtime/Executable.h: + +2013-01-11 Mark Hahnenberg + + testapi is failing with a block-related error in the Objc API + https://bugs.webkit.org/show_bug.cgi?id=106055 + + Reviewed by Filip Pizlo. + + Same bug as in testapi.mm. We need to actually call the static block, rather than casting the block to a bool. + + * API/ObjCCallbackFunction.mm: + (blockSignatureContainsClass): + +2013-01-11 Filip Pizlo + + Add a run-time option to print bytecode at DFG compile time + https://bugs.webkit.org/show_bug.cgi?id=106704 + + Reviewed by Mark Hahnenberg. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * runtime/Options.h: + (JSC): + +2013-01-11 Filip Pizlo + + It should be possible to enable verbose printing of each OSR exit at run-time (rather than compile-time) and it should print register state + https://bugs.webkit.org/show_bug.cgi?id=106700 + + Reviewed by Mark Hahnenberg. + + * dfg/DFGAssemblyHelpers.h: + (DFG): + (JSC::DFG::AssemblyHelpers::debugCall): + * dfg/DFGCommon.h: + * dfg/DFGOSRExit.h: + (DFG): + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * runtime/Options.h: + (JSC): + +2013-01-11 Geoffrey Garen + + Removed getDirectLocation and offsetForLocation and all their uses + https://bugs.webkit.org/show_bug.cgi?id=106692 + + Reviewed by Filip Pizlo. + + getDirectLocation() and its associated offsetForLocation() relied on + detailed knowledge of the rules of PropertyOffset, JSObject, and + Structure, which is a hard thing to reverse-engineer reliably. Luckily, + it wasn't needed, and all clients either wanted a true value or a + PropertyOffset. So, I refactored accordingly. + + * dfg/DFGOperations.cpp: Renamed putDirectOffset to putDirect, to clarify + that we are not putting an offset. + + * runtime/JSActivation.cpp: + (JSC::JSActivation::getOwnPropertySlot): Get a value instead of a value + pointer, since we never wanted a pointer to begin with. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertySlot): Use a PropertyOffset instead of a pointer, + so we don't have to reverse-engineer the offset from the pointer. + + * runtime/JSObject.cpp: + (JSC::JSObject::put): + (JSC::JSObject::resetInheritorID): + (JSC::JSObject::inheritorID): + (JSC::JSObject::removeDirect): + (JSC::JSObject::fillGetterPropertySlot): + (JSC::JSObject::getOwnPropertyDescriptor): Renamed getDirectOffset and + putDirectOffset, as explaind above. We want to use the name "getDirectOffset" + for when the thing you're getting is the offset. + + * runtime/JSObject.h: + (JSC::JSObject::getDirect): + (JSC::JSObject::getDirectOffset): Changed getDirectLocation to getDirectOffset, + since clients really wants PropertyOffsets and not locations. + + (JSObject::offsetForLocation): Removed this function because it was hard + to get right. + + (JSC::JSObject::putDirect): + (JSC::JSObject::putDirectUndefined): + (JSC::JSObject::inlineGetOwnPropertySlot): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirectWithoutTransition): + * runtime/JSScope.cpp: + (JSC::executeResolveOperations): + (JSC::JSScope::resolvePut): + * runtime/JSValue.cpp: + (JSC::JSValue::putToPrimitive): Updated for renames. + + * runtime/Lookup.cpp: + (JSC::setUpStaticFunctionSlot): Use a PropertyOffset instead of a pointer, + so we don't have to reverse-engineer the offset from the pointer. + + * runtime/Structure.cpp: + (JSC::Structure::flattenDictionaryStructure): Updated for renames. + +2013-01-11 Geoffrey Garen + + Removed an unused version of getDirectLocation + https://bugs.webkit.org/show_bug.cgi?id=106691 + + Reviewed by Gavin Barraclough. + + getDirectLocation is a weird operation. Removing the unused version is + the easy part. + + * runtime/JSObject.h: + (JSObject): + +2013-01-11 Mark Hahnenberg + + Objective-C objects that are passed to JavaScript leak (until the JSContext is destroyed) + https://bugs.webkit.org/show_bug.cgi?id=106056 + + Reviewed by Darin Adler. + + * API/APIJSValue.h: + * API/JSValue.mm: Make the reference to the JSContext strong. + (-[JSValue context]): + (-[JSValue initWithValue:inContext:]): + (-[JSValue dealloc]): + * API/JSWrapperMap.mm: Make the reference back from wrappers to Obj-C objects weak instead of strong. + Also add an explicit WeakGCMap in the JSWrapperMap rather than using Obj-C associated object API which + was causing memory leaks. + (wrapperClass): + (-[JSObjCClassInfo wrapperForObject:]): + (-[JSWrapperMap initWithContext:]): + (-[JSWrapperMap dealloc]): + (-[JSWrapperMap wrapperForObject:]): + +2013-01-11 Geoffrey Garen + + Fixed some bogus PropertyOffset ASSERTs + https://bugs.webkit.org/show_bug.cgi?id=106686 + + Reviewed by Gavin Barraclough. + + The ASSERTs were passing a JSType instead of an inlineCapacity, due to + an incomplete refactoring. + + The compiler didn't catch this because both types are int underneath. + + * runtime/JSObject.h: + (JSC::JSObject::getDirect): + (JSC::JSObject::getDirectLocation): + (JSC::JSObject::offsetForLocation): + * runtime/Structure.cpp: + (JSC::Structure::addPropertyTransitionToExistingStructure): Validate against + our inline capacity, as we intended. + +2013-01-11 Geoffrey Garen + + Rename propertyOffsetFor => offsetForPropertyNumber + https://bugs.webkit.org/show_bug.cgi?id=106685 + + Reviewed by Gavin Barraclough. + + Since the argument is just a typedef and not an object, I wanted to clarify the meaning. + + * runtime/PropertyMapHashTable.h: + (JSC::PropertyTable::nextOffset): Updated for rename. + + * runtime/PropertyOffset.h: + (JSC::offsetForPropertyNumber): Renamed. Also changed some PropertyOffset variables + to plain ints, because they're not actually on the PropertyOffsets number line. + + * runtime/Structure.cpp: + (JSC::Structure::flattenDictionaryStructure): + * runtime/Structure.h: + (JSC::Structure::lastValidOffset): Updated for rename. + +2013-01-10 Zan Dobersek + + Remove the ENABLE_ANIMATION_API feature define occurences + https://bugs.webkit.org/show_bug.cgi?id=106544 + + Reviewed by Simon Fraser. + + The Animation API code was removed in r137243. The ENABLE_ANIMATION_API + feature define handling still lingers in various build systems and configurations + but is of no use, so it should be removed. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-09 Roger Fong + + Unreviewed. Just move the JavaScriptCore exports file around in the vcproj to make things clearer. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2013-01-09 Filip Pizlo + + Dont use a node reference after appending to the graph. + https://bugs.webkit.org/show_bug.cgi?id=103305 + + + Reviewed by Mark Hahnenberg. + + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + +2013-01-09 Roger Fong + + Rename export files to make them more easily findable. + https://bugs.webkit.org/show_bug.cgi?id=98695. + + Reviewed by Timothy Horton. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def. + +2013-01-09 Carlos Garcia Campos + + Unreviewed. Fix make distcheck. + + * GNUmakefile.list.am: Add mips.rb to offlineasm_nosources. + +2013-01-08 Oliver Hunt + + Support op_typeof in the DFG + https://bugs.webkit.org/show_bug.cgi?id=98898 + + Reviewed by Filip Pizlo. + + Adds a TypeOf node to the DFG to support op_typeof. + + To avoid adding too much GC horror, this also makes the + common strings portion of the SmallString cache strongly + referenced. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + We try to determine the result early here, and substitute in a constant. + Otherwise we leave the node intact, and set the result type to SpecString. + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + Parse op_typeof + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performNodeCSE): + TypeOf nodes can be subjected to pure CSE + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + We can handle typeof. + * dfg/DFGNodeType.h: + (DFG): + Define the node. + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + Add operationTypeOf to support the non-trivial cases. + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + Actual codegen + * runtime/Operations.cpp: + (JSC::jsTypeStringForValue): + (JSC): + * runtime/Operations.h: + (JSC): + Some refactoring to allow us to get the type string for an + object without needing a callframe. + + +2013-01-08 Filip Pizlo + + DFG shouldn't treat the 'this' argument as being captured if a code block uses arguments + https://bugs.webkit.org/show_bug.cgi?id=106398 + + + Reviewed by Mark Hahnenberg. + + This is a possible optimization for inlined calls, and fixes crashes for inlined constructors, in the case + that the inlined code used arguments. The problem was that assuming that 'this' was captured implies the + assumption that it was initialized by the caller, which is wrong for constructors and this. + + Also added a pretty essential DFG IR validation rule: we shouldn't have any live locals at the top of the + root block. This helps to catch this bug: our assumption that 'this' was captured in an inlined constructor + that used arguments led to liveness for the temporary that would have held 'this' in the caller being + propagated all the way up to the entrypoint of the function. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isCaptured): + * dfg/DFGValidate.cpp: + (JSC::DFG::Validate::validate): + (JSC::DFG::Validate::reportValidationContext): + (Validate): + (JSC::DFG::Validate::dumpGraphIfAppropriate): + +2013-01-08 Filip Pizlo + + REGRESSION (r138921): Crash in JSC::Arguments::create + https://bugs.webkit.org/show_bug.cgi?id=106329 + + + Reviewed by Mark Hahnenberg. + + Arguments::finishCreation() that takes an InlineCallFrame* needs to understand that the callee can + be unset, indicating that the callee needs to be loaded from the true call frame. This adds a + method to InlineCallFrame to do just that. + + * bytecode/CodeOrigin.cpp: + (JSC::InlineCallFrame::calleeForCallFrame): + * bytecode/CodeOrigin.h: + (InlineCallFrame): + * runtime/Arguments.h: + (JSC::Arguments::finishCreation): + +2013-01-08 Filip Pizlo + + DFG initrinsic handling should ensure that we backwards propagate the fact that all operands may escape + https://bugs.webkit.org/show_bug.cgi?id=106365 + + Reviewed by Mark Hahnenberg. + + Use the fact that Phantom means that things escaped, and just insert Phantoms for all + of the operands. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleCall): + +2013-01-08 Filip Pizlo + + If array allocation profiling causes a new_array to allocate double arrays, then the holes should end up being correctly initialized + https://bugs.webkit.org/show_bug.cgi?id=106363 + + Reviewed by Mark Hahnenberg. + + * runtime/JSArray.h: + (JSC::JSArray::tryCreateUninitialized): + +2013-01-07 Filip Pizlo + + DFG should backwards-propagate NodeUsedAsValue for Phantom + https://bugs.webkit.org/show_bug.cgi?id=106299 + + Reviewed by Mark Hahnenberg. + + This is currently benign because Phantom is only inserted by the bytecode parser for + things that already happen to be used in contexts that backwards propagate + NodeUsedAsValue. But that doesn't change the fact that the semantics of Phantom are + that the value can be arbitrarily used by the baseline JIT. + + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + +2013-01-07 Filip Pizlo + + Rationalize closure call heuristics and profiling + https://bugs.webkit.org/show_bug.cgi?id=106270 + + Reviewed by Oliver Hunt. + + Did a number of things: + + - CallLinkInfo now remembers if it was ever a closure call, and CallLinkStatus uses + this. Reduces the likelihood that we will inline a closure call as if it was a + normal call. + + - Made InlineCallFrame print inferred function names, and refactored + CodeBlock::inferredName() to better use FunctionExecutable's API. + + - Made bytecode dumping print frequent exit sites that led to recompilation. + + - Made bytecode dumping for op_call and op_construct print what the CallLinkStatus + saw. + + * bytecode/CallLinkInfo.h: + (JSC::CallLinkInfo::CallLinkInfo): + (CallLinkInfo): + * bytecode/CallLinkStatus.cpp: + (JSC::CallLinkStatus::computeFor): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::inferredName): + (JSC::CodeBlock::dumpBytecodeCommentAndNewLine): + (JSC::CodeBlock::printCallOp): + * bytecode/CodeOrigin.cpp: + (JSC::CodeOrigin::dump): + (JSC::InlineCallFrame::inferredName): + (JSC): + (JSC::InlineCallFrame::dumpBriefFunctionInformation): + (JSC::InlineCallFrame::dump): + * bytecode/CodeOrigin.h: + (InlineCallFrame): + * bytecode/DFGExitProfile.cpp: + (JSC::DFG::ExitProfile::exitSitesFor): + (DFG): + * bytecode/DFGExitProfile.h: + (ExitProfile): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2013-01-07 Ryosuke Niwa + + Sorted the xcodeproj file. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-01-07 Filip Pizlo + + Unreviewed, it should be possible to build JSC on ARM. + + * API/JSBase.h: + * jit/JITStubs.cpp: + (JSC::performPlatformSpecificJITAssertions): + (JSC): + * jit/JITStubs.h: + (JSC): + * jit/JITThunks.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITThunks.h: + (JITThunks): + * offlineasm/armv7.rb: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + +2013-01-07 Balazs Kilvady + + MIPS LLInt implementation. + https://bugs.webkit.org/show_bug.cgi?id=99706 + + Reviewed by Filip Pizlo. + + LLInt implementation for MIPS. + + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::jump): + * dfg/DFGOperations.cpp: + (JSC): + * jit/JITStubs.cpp: + (JSC): + * jit/JITStubs.h: + (JITStackFrame): + * llint/LLIntOfflineAsmConfig.h: + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * offlineasm/backends.rb: + * offlineasm/instructions.rb: + * offlineasm/mips.rb: Added. + +2013-01-07 Mark Hahnenberg + + testapi is failing with a block-related error in the Objc API + https://bugs.webkit.org/show_bug.cgi?id=106055 + + Reviewed by Geoffrey Garen. + + Casting a block to a bool will always return true, which isn't the behavior that is intended here. + Instead we need to call the block, but C semantics don't allow this, so we need to change + testapi.m to be Objective-C++ and therefore testapi.mm. + + * API/tests/testapi.m: Removed. + * API/tests/testapi.mm: Copied from Source/JavaScriptCore/API/tests/testapi.m. + (blockSignatureContainsClass): + * JavaScriptCore.xcodeproj/project.pbxproj: + +2013-01-06 Filip Pizlo + + Simplify slow case profiling + https://bugs.webkit.org/show_bug.cgi?id=106208 + + Reviewed by Mark Rowe. + + Removing the minimum execution ratio portion of slow case profiling, which allows + the removal of a field from CodeBlock. This appears to be performance neutral, + implying that the complexity incurred by the previous heuristic was purely + harmful: it made the code more complicated, and it made CodeBlock larger, without + resulting in any measurable benefits. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::likelyToTakeSlowCase): + (JSC::CodeBlock::couldTakeSlowCase): + (JSC::CodeBlock::likelyToTakeSpecialFastCase): + (JSC::CodeBlock::couldTakeSpecialFastCase): + (JSC::CodeBlock::likelyToTakeDeepestSlowCase): + (JSC::CodeBlock::likelyToTakeAnySlowCase): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * runtime/Options.h: + +2013-01-05 Filip Pizlo + + DFG should inline closure calls + https://bugs.webkit.org/show_bug.cgi?id=106067 + + Reviewed by Gavin Barraclough. + + This adds initial support for inlining closure calls to the DFG. A call is considered + to be a closure call when the JSFunction* varies, but always has the same executable. + We already have closure call inline caching in both JITs, which works by checking that + the callee has an expected structure (as a cheap way of detecting that it is in fact + a JSFunction) and an expected executable. Closure call inlining uses profiling data + aggregated by CallLinkStatus to decide when to specialize the call to the particular + structure/executable, and inline the call rather than emitting a call sequence. When + we choose to do a closure inline rather than an ordinary inline, a number of things + change about how inlining is performed: + + - The inline is guarded by a CheckStructure/CheckExecutable rather than a + CheckFunction. + + - Instead of propagating a constant value for the scope, we emit GetMyScope every time + that the scope is needed, which loads the scope from a local variable. We do similar + things for the callee. + + - The prologue of the inlined code includes SetMyScope and SetCallee nodes to eagerly + plant the scope and callee into the "true call frame", i.e. the place on the stack + where the call frame would have been if the call had been actually performed. This + allows GetMyScope/GetCallee to work as they would if the code wasn't inlined. It + also allows for trivial handling of scope and callee for call frame reconstruction + upon stack introspection and during OSR. + + - A new node called GetScope is introduced, which just gets the scope of a function. + This node has the expected CSE support. This allows for the + SetMyScope(GetScope(@function)) sequence to set up the scope in the true call frame. + + - GetMyScope/GetCallee CSE can match against SetMyScope/SetCallee, which means that + the GetMyScope/GetCallee nodes emitted during parsing are often removed during CSE, + if we can prove that it is safe to do so. + + - Inlining heuristics are adjusted to grok the cost of inlining a closure. We are + less likely to inline a closure call than we are to inline a normal call, since we + end up emitting more code for closures due to CheckStructure, CheckExecutable, + GetScope, SetMyScope, and SetCallee. + + Additionally, I've fixed the VariableEventStream to ensure that we don't attempt to + plant Undefined into the true call frames. This was previously a harmless oversight, + but it becomes quite bad if OSR is relying on the scope/callee already having been + set and not subsequently clobbered by the OSR itself. + + This is a ~60% speed-up on programs that frequently make calls to closures. It's + neutral on V8v7 and other major benchmark suites. + + The lack of a definite speed-up is likely due the fact that closure inlining currently + does not do any cardinality [1] optimizations. We don't observe when a closure was + constructed within its caller, and so used the scope from its caller; and furthermore + we have no facility to detect when the scope is single. All scoped variable accesses + are assumed to be multiple instead. A subsequent step will be to ensure that closure + call inlining will be single and loving it. + + [1] Single and loving it: Must-alias analysis for higher-order languages. Suresh + Jagannathan, Peter Thiemann, Stephen Weeks, and Andrew Wright. In POPL '98. + + * bytecode/CallLinkStatus.cpp: + (JSC::CallLinkStatus::dump): + * bytecode/CallLinkStatus.h: + (JSC::CallLinkStatus::isClosureCall): + (CallLinkStatus): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::globalObjectFor): + (JSC): + * bytecode/CodeBlock.h: + (CodeBlock): + * bytecode/CodeOrigin.cpp: + (JSC::InlineCallFrame::dump): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::handleCall): + (JSC::DFG::ByteCodeParser::emitFunctionChecks): + (JSC::DFG::ByteCodeParser::handleInlining): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::pureCSE): + (CSEPhase): + (JSC::DFG::CSEPhase::getCalleeLoadElimination): + (JSC::DFG::CSEPhase::checkExecutableElimination): + (JSC::DFG::CSEPhase::getMyScopeLoadElimination): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGCapabilities.cpp: + (JSC::DFG::mightInlineFunctionForClosureCall): + * dfg/DFGCapabilities.h: + (DFG): + (JSC::DFG::mightInlineFunctionForClosureCall): + (JSC::DFG::canInlineFunctionForClosureCall): + (JSC::DFG::canInlineFunctionFor): + * dfg/DFGNode.h: + (Node): + (JSC::DFG::Node::hasExecutable): + (JSC::DFG::Node::executable): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGVariableEventStream.cpp: + (JSC::DFG::VariableEventStream::reconstruct): + * runtime/Options.h: + (JSC): + +2013-01-05 Filip Pizlo + + Data flow paths that carry non-numbers, non-undefined, non-null values should not cause subtractions and arithmetic additions (i.e. ++) to speculate double + https://bugs.webkit.org/show_bug.cgi?id=106190 + + Reviewed by Sam Weinig. + + The problem is that the DFG logic for deciding when to speculate integer was + confusing the special case of ValueAdd (where non-numeric values should cause us + to not speculate integer, because we want to fall off into the generic case) with + the more normal case of ArithAdd and ArithSub (where we want to speculate integer + unless we have evidence that the operands are doubles, since the DFG doesn't have + generic handling of non-numeric arithmetic). Prior to this change doing a - b where + either a or b were possibly non-numeric would always force the subtraction to be + done using doubles. + + * dfg/DFGGraph.h: + (JSC::DFG::Graph::addSpeculationMode): + (Graph): + (JSC::DFG::Graph::valueAddSpeculationMode): + (JSC::DFG::Graph::arithAddSpeculationMode): + (JSC::DFG::Graph::addImmediateShouldSpeculateInteger): + +2013-01-04 Filip Pizlo + + DFG should trust array profiling over value profiling + https://bugs.webkit.org/show_bug.cgi?id=106155 + + Reviewed by Gavin Barraclough. + + The real problem is that prediction propagation is not flow-sensitive. We had code + like: + + var a = (some load from memory); // returns either an array or false + if (a) + a[i] = v; + + Because 'a' could be 'false', we were emitting a fully generic unoptimized PutByVal. + This patch changes ArrayMode to ignore the type of the base of an array access, if + array profiling tells us that the array access can be optimized. + + In the future, we could probably make this work even better with some flow + sensitivity in the prediction propagator, but I also tend to think that this is a + more robust overall solution. If we ever did want to support array accesses on + array-or-false then we should change the array profiler to be able to tell us that + this is what is going on. + + 3.7% speed-up on V8/earley. + + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::refine): + +2013-01-04 Filip Pizlo + + Rationalize exit site profiling for calls + https://bugs.webkit.org/show_bug.cgi?id=106150 + + Reviewed by Sam Weinig. + + This adds two new exit kinds for calls: BadFunction and BadExecutable. The latter is not used + yet, but is already integrated with profiling. CheckFunction uses a BadFunction speculation + instead of BadCache, now. This allows CallLinkStatus to turn itself into a closure call status + if we had a BadFunction exit site but the CallLinkInfo told us to use a non-closure call. This + might happen if we had call unlinking that led to information loss along the way. + + No performance impact. This is meant as another step towards inlining closure calls. + + * bytecode/CallLinkStatus.cpp: + * bytecode/CallLinkStatus.h: + (JSC::CallLinkStatus::setIsProved): + (JSC::CallLinkStatus::setHasBadFunctionExitSite): + (CallLinkStatus): + (JSC::CallLinkStatus::setHasBadCacheExitSite): + (JSC::CallLinkStatus::setHasBadExecutableExitSite): + * bytecode/ExitKind.cpp: + (JSC::exitKindToString): + * bytecode/ExitKind.h: + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleCall): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2013-01-03 Filip Pizlo + + DFG should not elide CheckStructure if it's needed to perform a cell check + https://bugs.webkit.org/show_bug.cgi?id=106074 + + Reviewed by Ryosuke Niwa. + + The problem here was that the constant folding phase was misinterpreting the meaning of the sets + in DFG::AbstractValue. AbstractValue describes a constraint on the values that a variable (i.e. + a DFG Node, or a virtual register, i.e. local or argument) may have. It does so by containing + four sets: the set of JSValues (either empty, the singleton set containing one JSValue, or the + set of all JSValues); the set of "current known" structures, i.e. the set of structures that you + already know that this value may have right now (also either empty, the singleton set, or the set + of all structures); the set of "future possible" structures, i.e. the set of structures that this + value could have in the future if none of the structure transition watchpoints for those + structures had fired (also empty, singleton, or all); and the set of types, which is a + SpeculatedType bitmask. The correct way to interpret the sets is to think of the AbstractValue as + the intersection of these three sets of values: + + - The set of JSValues that have a type that belongs to the m_type set. + - If m_value is not the empty value then: the set of all JSValues that are == m_value; + else: the set of all JSValues. + where '==' is as defined by JSValue::operator==. + - Union of { the set of all cells that have a structure that belongs to m_currentKnownStructure } + and { the set of all JSValues that are not cells }. + + You can then further intersect this set with the following set, if you guard the code with + watchpoints on all structures in the m_futurePossibleStructure: + + - Union of { the set of all cells that have a structure that belongs to m_futurePossibleStructure } + and { the set of all JSValues that are not cells }. + + One way to think of this is that m_currentKnownStructure is filtered by m_futurePossibleStructure + (i.e. is set to the intersection of m_currentKnownStructure and m_futurePossibleStructure), if the + code for which you're doing this is always preceded by watchpoints on all structures in + m_futurePossibleStructure, and is always before any side-effects that could change the structures + of objects. + + The incorrect optimization related to CheckStructure. CheckStructure checks that the value is a + cell, and that it has a particular structure. It was incorrectly assuming that you could eliminate + the CheckStructure, if m_currentKnownStructure contained the structure that CheckStructure was + checking. But this is not the case, since m_currentKnownStructure does not prove that the value is + a cell with a particular structure; it only proves that if the value was a cell then it would have + a particular structure. Hence, to eliminate CheckStructure, it is also necessary to check that + AbstractValue::m_type contains only cells (i.e. isCellSpeculation(m_type) == true). + + It wasn't doing that, and this changes makes sure that it does do that. + + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + +2013-01-04 Adam Klein + + Remove ENABLE_MUTATION_OBSERVERS #define + https://bugs.webkit.org/show_bug.cgi?id=105459 + + Reviewed by Ryosuke Niwa. + + * Configurations/FeatureDefines.xcconfig: + +2013-01-03 Filip Pizlo + + DFG::ByteCodeCache serves little or no purpose ever since we decided to keep bytecode around permanently + https://bugs.webkit.org/show_bug.cgi?id=106058 + + Reviewed by Michael Saboff. + + All baseline code blocks now always have bytecode, so the bytecode cache's ability to minimize the + number of times that the DFG produces bytecode sequences for code blocks is superfluous. + + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGByteCodeCache.h: Removed. + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::handleInlining): + * runtime/Executable.cpp: + (JSC): + * runtime/Executable.h: + (FunctionExecutable): + +2013-01-03 Filip Pizlo + + Unreviewed, fix build for DFG JIT disabled. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpValueProfiling): + (JSC::CodeBlock::dumpArrayProfiling): + * runtime/Executable.cpp: + (JSC): + (JSC::ExecutableBase::intrinsic): + +2013-01-03 Filip Pizlo + + CallLinkStatus should be aware of closure calls, and the DFG bytecode parser should use that as its sole internal notion of how to optimize calls + https://bugs.webkit.org/show_bug.cgi?id=106027 + + Reviewed by Mark Hahnenberg. + + Previously, the DFG bytecode parser had its own internal notion of exactly what CallLinkStatus was + meant to do, in the form of a CallType, expectedFunction, intrinsic, etc. This change makes CallLinkStatus + smart enough to do all of that, and also gives it the ability to understand closure calls. + + * bytecode/CallLinkStatus.cpp: + (JSC::CallLinkStatus::CallLinkStatus): + (JSC): + (JSC::CallLinkStatus::function): + (JSC::CallLinkStatus::internalFunction): + (JSC::CallLinkStatus::intrinsicFor): + (JSC::CallLinkStatus::setIsProved): + (JSC::CallLinkStatus::computeFromLLInt): + (JSC::CallLinkStatus::computeFor): + (JSC::CallLinkStatus::dump): + * bytecode/CallLinkStatus.h: + (JSC): + (JSC::CallLinkStatus::CallLinkStatus): + (CallLinkStatus): + (JSC::CallLinkStatus::takesSlowPath): + (JSC::CallLinkStatus::isSet): + (JSC::CallLinkStatus::isClosureCall): + (JSC::CallLinkStatus::callTarget): + (JSC::CallLinkStatus::executable): + (JSC::CallLinkStatus::structure): + (JSC::CallLinkStatus::isProved): + (JSC::CallLinkStatus::canOptimize): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleCall): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::valueOfFunctionConstant): + +2013-01-02 Simon Hausmann + + [MinGW-w64] Centralize workaround for pow() implementation + https://bugs.webkit.org/show_bug.cgi?id=105925 + + Reviewed by Sam Weinig. + + As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h + away from the JSC usage. + + * runtime/MathObject.cpp: + (JSC::mathPow): + +2013-01-02 Gavin Barraclough + + Objective-C API for JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=105889 + + Reviewed by Geoff Garen. + + Fixes for more issues raised by Darin. + + * API/JSBlockAdaptor.mm: + (BlockArgument): + (BlockArgumentStruct::BlockArgumentStruct): + (BlockArgumentTypeDelegate::typeStruct): + (BlockResult): + (BlockResultStruct::BlockResultStruct): + (buildBlockSignature): + (-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]): + (-[JSBlockAdaptor blockFromValue:inContext:withException:]): + - fix * position for Objective-C types + * API/JSContext.h: + - fix * position for Objective-C types + * API/JSContext.mm: + (-[JSContext initWithVirtualMachine:]): + (-[JSContext virtualMachine]): + (contextInternalContext): + - fix * position for Objective-C types + (-[JSContext dealloc]): + (-[JSContext protect:]): + (-[JSContext unprotect:]): + - HashMap -> HashCountedSet + * API/JSContextInternal.h: + (WeakContextRef): + - fix * position for Objective-C types + * API/JSValue.mm: + (valueToString): + - fix * position for Objective-C types + (isNSBoolean): + - Added helper to check for booleans. + (objectToValueWithoutCopy): + - Added contextRef + - fix * position for Objective-C types + - Remove @YES, @NO literal usage, use isNSBoolean instead + (objectToValue): + - Added contextRef + (+[JSValue valueWithValue:inContext:]): + (-[JSValue initWithValue:inContext:]): + - fix * position for Objective-C types + (createStructHandlerMap): + (handerForStructTag): + - getStructTagHandler -> handerForStructTag + - Split out createStructHandlerMap + - strncmp -> memcmp + - String(type).impl() -> StringImpl::create(type) + (+[JSValue selectorForStructToValue:]): + (+[JSValue selectorForValueToStruct:]): + - getStructTagHandler -> handerForStructTag + (typeToValueInvocationFor): + (valueToTypeInvocationFor): + - fix * position for Objective-C types + * API/JSValueInternal.h: + - fix * position for Objective-C types + * API/JSVirtualMachineInternal.h: + - fix * position for Objective-C types + * API/JSWrapperMap.h: + - fix * position for Objective-C types + * API/JSWrapperMap.mm: + (selectorToPropertyName): + (createObjectWithCustomBrand): + (createRenameMap): + (putNonEnumerable): + (copyMethodsToObject): + (copyPrototypeProperties): + (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]): + (-[JSWrapperMap initWithContext:]): + (-[JSWrapperMap wrapperForObject:]): + (getJSExportProtocol): + - fix * position for Objective-C types + * API/ObjCCallbackFunction.h: + - fix * position for Objective-C types + * API/ObjCCallbackFunction.mm: + (CallbackArgument): + (CallbackArgumentStruct::CallbackArgumentStruct): + - fix * position for Objective-C types + (CallbackArgumentBlockCallback::createAdoptingJSBlockAdaptor): + - Added to make adopt explicit + (CallbackArgumentBlockCallback): + (CallbackArgumentBlockCallback::CallbackArgumentBlockCallback): + (ArgumentTypeDelegate::typeBlock): + - Call createAdoptingJSBlockAdaptor + (ArgumentTypeDelegate::typeStruct): + (CallbackResult): + (CallbackResultStruct::CallbackResultStruct): + (ResultTypeDelegate::typeStruct): + (ObjCCallbackFunction::ObjCCallbackFunction): + (ObjCCallbackFunction::context): + (objCCallbackFunctionForInvocation): + (objCCallbackFunctionForMethod): + (objCCallbackFunctionForBlock): + - fix * position for Objective-C types + * API/ObjcRuntimeExtras.h: + (protocolImplementsProtocol): + (forEachProtocolImplementingProtocol): + (forEachMethodInProtocol): + (forEachPropertyInProtocol): + - fix * position for Objective-C types + * API/tests/testapi.m: + (-[TestObject testArgumentTypesWithInt:double:boolean:string:number:array:dictionary:]): + (testObjectiveCAPI): + - fix * position for Objective-C types + +2013-01-02 Geoffrey Garen + + Some renaming in the CodeCache + https://bugs.webkit.org/show_bug.cgi?id=105966 + + Reviewed by Gavin Barraclough. + + CodeBlockKey => SourceCodeKey because the key is not a CodeBlock. + + m_recentlyUsedFunctionCode => m_recentlyUsedFunctions to match other names. + + GlobalFunctionKey => FunctionKey because the key is not unique to globalness. + + m_cachedGlobalFunctions => m_globalFunctions because "cached" is redundant + for data members in an object called "CodeCache". + + kMaxRootCodeBlockEntries => kMaxRootEntries because there are no non-CodeBlock + entries in a CodeBlock cache. + + kMaxFunctionCodeBlocks => kMaxChildFunctionEntries to clarify that this + number models a parent-child relationship. + + Also removed the initial "k" from enum constants. That's an interesting + style for calling out constants, but it's not the WebKit style. + + Finally, a behavior change: Use MaxRootEntries for the limit on global + functions, and not MaxChildFunctionEntries. Previously, there was an + unused constant that seemed to have been intended for this purpose. + + * runtime/CodeCache.cpp: + (JSC::CodeCache::makeSourceCodeKey): + (JSC::CodeCache::getCodeBlock): + (JSC::CodeCache::generateFunctionCodeBlock): + (JSC::CodeCache::makeFunctionKey): + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + (JSC::CodeCache::usedFunctionCode): + * runtime/CodeCache.h: + (JSC::CodeCache::clear): + +2013-01-02 Filip Pizlo + + DFG inlining machinery should be robust against the inline callee varying while the executable stays the same + https://bugs.webkit.org/show_bug.cgi?id=105953 + + Reviewed by Mark Hahnenberg. + + This institutes the policy that if InlineCallFrame::callee is null, then the callee and scope have already + been stored into the true call frame (i.e. the place where the call frame of the inlined call would have + been) and so any attempt to access the callee or scope should do a load instead of assuming that the value + is constant. This wires the changes through the bytecode parser, the stack scanning logic, and the compiler + optimization phases and backends. + + * bytecode/CodeOrigin.cpp: + (JSC::InlineCallFrame::dump): + * bytecode/CodeOrigin.h: + (CodeOrigin): + (InlineCallFrame): + (JSC::InlineCallFrame::isClosureCall): + (JSC::CodeOrigin::stackOffset): + (JSC): + * dfg/DFGAssemblyHelpers.h: + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::get): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::getScope): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGCSEPhase.cpp: + (CSEPhase): + (JSC::DFG::CSEPhase::genericPureCSE): + (JSC::DFG::CSEPhase::pureCSE): + (JSC::DFG::CSEPhase::pureCSERequiringSameInlineCallFrame): + (JSC::DFG::CSEPhase::getMyScopeLoadElimination): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::trueCallFrame): + +2013-01-02 Gavin Barraclough + + Objective-C API for JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=105889 + + Reviewed by Geoff Garen. + + Fixes for a number of issues raised by Darin. + + * API/APIJSValue.h: + - Fix typos in comment + - Add newline before NS_CLASS_AVAILABLE(10_9, NA) + - cls -> expectedClass + - key type for -setObject:forKeyedSubscript: is now NSObject * + * API/JSBase.h: + - JS_OBJC_API_ENABLED no longer implies __OBJC__ + * API/JSBlockAdaptor.mm: + (BlockArgumentStruct::BlockArgumentStruct): + (BlockArgumentStruct): + - mark virtual functions as virtual, override, and private + - refactor out buffer allocation for struct types + (BlockArgumentTypeDelegate::typeVoid): + (BlockArgumentTypeDelegate::typeBlock): + (BlockArgumentTypeDelegate::typeStruct): + - return nil -> return 0 + (BlockResultStruct::BlockResultStruct): + (BlockResultStruct): + - mark virtual functions as virtual, override, and private + - refactor out buffer allocation for struct types + (buildBlockSignature): + - %lu is not an appropriate format specifier for NSInteger + (-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]): + - nil check [super init] + (-[JSBlockAdaptor blockMatchesSignature:]): + (-[JSBlockAdaptor blockFromValue:inContext:withException:]): + - ctx -> contextRef + * API/JSContext.h: + - Fix typos in comment + - Add newline before NS_CLASS_AVAILABLE(10_9, NA) + - key type for -setObject:forKeyedSubscript: is now NSObject * + * API/JSContext.mm: + (-[JSContext initWithVirtualMachine:]): + - nil check [super init] + (+[JSContext currentArguments]): + - args -> argumentArray + (-[JSContext setObject:forKeyedSubscript:]): + - key type for -setObject:forKeyedSubscript: is now NSObject * + (-[JSContext dealloc]): + (-[JSContext protect:]): + (-[JSContext unprotect:]): + - m_protected -> m_protectCounts + * API/JSValue.mm: + (-[JSValue toObjectOfClass:]): + - cls -> expectedClass + (-[JSValue toBool]): + (-[JSValue deleteProperty:]): + (-[JSValue hasProperty:]): + (-[JSValue isUndefined]): + (-[JSValue isNull]): + (-[JSValue isBoolean]): + (-[JSValue isNumber]): + (-[JSValue isString]): + (-[JSValue isObject]): + (-[JSValue isEqualToObject:]): + (-[JSValue isEqualWithTypeCoercionToObject:]): + (-[JSValue isInstanceOf:]): + - removed ? YES : NO + (-[JSValue callWithArguments:]): + (-[JSValue constructWithArguments:]): + (-[JSValue invokeMethod:withArguments:]): + - args -> argumentArray + (+[JSValue valueWithPoint:inContext:]): + (+[JSValue valueWithRange:inContext:]): + (+[JSValue valueWithRect:inContext:]): + (+[JSValue valueWithSize:inContext:]): + - [NSNumber numberWithFloat:] -> @() + (-[JSValue objectForKeyedSubscript:]): + (-[JSValue setObject:forKeyedSubscript:]): + - key type for -setObject:forKeyedSubscript: is now NSObject * + (JSContainerConvertor): + (JSContainerConvertor::isWorkListEmpty): + (JSContainerConvertor::convert): + (ObjcContainerConvertor): + (ObjcContainerConvertor::isWorkListEmpty): + - remove WTF:: + - isWorkListEmpty is const + (objectToValue): + - use fast enumeration + (-[JSValue initWithValue:inContext:]): + - nil check [super init] + (getStructTagHandler): + - m_structHandlers -> structHandlers + * API/JSVirtualMachine.h: + - Add newline before NS_CLASS_AVAILABLE(10_9, NA) + * API/JSVirtualMachine.mm: + (-[JSVirtualMachine init]): + - nil check [super init] + * API/JSWrapperMap.mm: + (selectorToPropertyName): + (copyPrototypeProperties): + - remove WTF:: + - use static_cast + (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]): + (-[JSWrapperMap initWithContext:]): + - nil check [super init] + (-[JSWrapperMap wrapperForObject:]): + (tryUnwrapObjcObject): + - enable ASSERT + (getJSExportProtocol): + (getNSBlockClass): + - remove if check on initializing static + * API/JavaScriptCore.h: + - JS_OBJC_API_ENABLED no longer implies __OBJC__ + * API/ObjCCallbackFunction.mm: + (CallbackArgumentOfClass): + (CallbackArgumentOfClass::~CallbackArgumentOfClass): + (CallbackArgumentStruct::CallbackArgumentStruct): + (CallbackArgumentStruct): + (CallbackArgumentBlockCallback): + - mark virtual functions as virtual, override, and private + - refactor out buffer allocation for struct types + (ArgumentTypeDelegate::typeVoid): + (ArgumentTypeDelegate::typeOfClass): + (ArgumentTypeDelegate::typeStruct): + - return nil -> return 0 + (CallbackResultStruct::CallbackResultStruct): + (CallbackResultStruct): + - mark virtual functions as virtual, override, and private + - refactor out buffer allocation for struct types + (ResultTypeDelegate::typeStruct): + - return nil -> return 0 + (ObjCCallbackFunction): + - remove WTF:: + (objCCallbackFunctionFinalize): + - use static_cast + (objCCallbackFunctionCallAsFunction): + - Fix typos in comment + (createObjCCallbackFunctionClass): + (objCCallbackFunctionClass): + - Split out createObjCCallbackFunctionClass from objCCallbackFunctionClass + (ObjCCallbackFunction::call): + - ctx -> contextRef + (blockSignatureContainsClass): + - Remove tri-state enum. + (skipNumber): + - isdigit -> isASCIIDigit + (objCCallbackFunctionForInvocation): + - clean up & comment blockSignatureContainsClass() usage + (tryUnwrapBlock): + - use static_cast + * API/ObjcRuntimeExtras.h: + (forEachProtocolImplementingProtocol): + (forEachMethodInClass): + (forEachMethodInProtocol): + (forEachPropertyInProtocol): + - Remove WTF:: + - Remove if (count) checks + (skipPair): + - NSUInteger -> size_t + (StringRange): + (StringRange::operator const char*): + (StringRange::get): + (StructBuffer): + (StructBuffer::StructBuffer): + (StructBuffer::~StructBuffer): + (StructBuffer::operator void*): + - Added helper for creating an aligned buffer, used by struct conversion invocations. + (parseObjCType): + - *(position++) -> *position++ + * API/tests/testapi.c: + - PLATFORM(MAC) -> JS_OBJC_API_ENABLED + * API/tests/testapi.m: + (blockSignatureContainsClass): + - Remove tri-state enum. + (testObjectiveCAPI): + - Added more result type checks. + +2013-01-02 Filip Pizlo + + DFG should not use the InlineCallFrame's callee when it could have used the executable istead + https://bugs.webkit.org/show_bug.cgi?id=105947 + + Reviewed by Mark Hahnenberg. + + We shouldn't use the callee to get the executable when we have the executable already. Not only + does this make the logic more clear, but it also allows for a world where the executable is known + but the callee isn't. + + * dfg/DFGAssemblyHelpers.h: + (JSC::DFG::AssemblyHelpers::strictModeFor): + +2013-01-02 Filip Pizlo + + DFG inliner should not use the callee's bytecode variable for resolving references to the callee in inlined code + https://bugs.webkit.org/show_bug.cgi?id=105938 + + Reviewed by Mark Hahnenberg. + + This simplifies a bunch of code for referring to the callee. It also ought to simplify how we do + closure call inlining: for inlined closure call frames we will simply require that the callee is + already stashed on the stack in the Callee slot in the inline call frame header. + + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::getDirect): + (JSC::DFG::ByteCodeParser::get): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand): + (JSC::DFG::ByteCodeParser::handleCall): + (JSC::DFG::ByteCodeParser::handleInlining): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + (JSC::DFG::ByteCodeParser::parse): + +2013-01-02 Ryosuke Niwa + + Another Windows port build fix attempt. Try not exporting this symbol from JSC + since it's also compiled in WebCore. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2013-01-02 Csaba Osztrogonác + + One more unreviewed buildfix after r138609. + + * jit/JITCall.cpp: Add a missing include. + +2013-01-02 Csaba Osztrogonác + + Unreviewed buildfix after r138609. + + * jit/JITCall32_64.cpp: Add a missing include. + +2013-01-01 Filip Pizlo + + Baseline JIT should have closure call caching + https://bugs.webkit.org/show_bug.cgi?id=105900 + + Reviewed by Gavin Barraclough. + + This is not a speed-up by itself, but is meant to allow the DFG inliner to + accurately discern between closure calls and non-closure calls, so that it can + do closure call inlining in the future. + + * bytecode/CallLinkStatus.cpp: + (JSC::CallLinkStatus::computeFromLLInt): + (JSC::CallLinkStatus::computeFor): + * bytecode/CallLinkStatus.h: + (JSC::CallLinkStatus::CallLinkStatus): + (JSC::CallLinkStatus::isClosureCall): + (CallLinkStatus): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleCall): + * jit/JIT.cpp: + (JSC::JIT::linkFor): + (JSC::JIT::linkSlowCall): + * jit/JIT.h: + (JSC::JIT::compileClosureCall): + * jit/JITCall.cpp: + (JSC::JIT::privateCompileClosureCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::privateCompileClosureCall): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * jit/ThunkGenerators.cpp: + (JSC::linkClosureCallGenerator): + * jit/ThunkGenerators.h: + +2013-01-01 Dan Bernstein + + Update copyright strings + + Reviewed by Sam Weinig. + + * Info.plist: + +2012-12-31 Gavin Barraclough + + Objective-C API for JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=105889 + + Reviewed by Filip Pizlo. + + For a detailed description of the API implemented here, see: + JSContext.h + APIJSValue.h + JSVirtualMachine.h + JSExport.h + Still to do - + (1) Shoud rename APIJSValue.h -> JSValue.h (but we'll have to rename JSValue.h first). + (2) Numerous FIXMEs, all with separate bugs filed. + + * API/APIJSValue.h: Added. + - this Objective-C class is used to reference a JavaScript object. + * API/JSBase.h: + - added JS_OBJC_API_ENABLED macro to control ObjC API support. + * API/JSBlockAdaptor.h: Added. + - this Objective-C class is used in creating a special NSBlock proxying a JavaScript function. + * API/JSBlockAdaptor.mm: Added. + (BlockArgument): + (BlockArgument::~BlockArgument): + (BlockArgumentBoolean): + (BlockArgumentBoolean::get): + (BlockArgumentNumeric): + (BlockArgumentNumeric::get): + (BlockArgumentId): + (BlockArgumentId::get): + (BlockArgumentStruct): + (BlockArgumentStruct::BlockArgumentStruct): + (BlockArgumentStruct::~BlockArgumentStruct): + (BlockArgumentStruct::get): + - decoded arguent type information of a JSBlockAdaptor. + (BlockArgumentTypeDelegate): + (BlockArgumentTypeDelegate::typeInteger): + (BlockArgumentTypeDelegate::typeDouble): + (BlockArgumentTypeDelegate::typeBool): + (BlockArgumentTypeDelegate::typeVoid): + (BlockArgumentTypeDelegate::typeId): + (BlockArgumentTypeDelegate::typeOfClass): + (BlockArgumentTypeDelegate::typeBlock): + (BlockArgumentTypeDelegate::typeStruct): + - delegate for use in conjunction with parseObjCType. + (BlockResult): + (BlockResult::~BlockResult): + (BlockResultVoid): + (BlockResultVoid::set): + (BlockResultInteger): + (BlockResultInteger::set): + (BlockResultDouble): + (BlockResultDouble::set): + (BlockResultBoolean): + (BlockResultBoolean::set): + (BlockResultStruct): + (BlockResultStruct::BlockResultStruct): + (BlockResultStruct::~BlockResultStruct): + (BlockResultStruct::set): + - decoded result type information of a JSBlockAdaptor. + (buildBlockSignature): + - partial step in constructing a signature with stack offset information from one without. + (-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]): + - constructor. + (-[JSBlockAdaptor blockMatchesSignature:]): + - check whether signature strings match, where only one contains stack frame offsets. + (-[JSBlockAdaptor blockFromValue:inContext:withException:]): + - use the adaptor to create a special forwarding block. + * API/JSCallbackObjectFunctions.h: + (JSC::::inherits): + - add missing braces to multiline for statement. + * API/JSContext.h: Added. + - this Objective-C class is used to reference a JavaScript context. + * API/JSContext.mm: Added. + (-[JSContext init]): + - constructor. + (-[JSContext initWithVirtualMachine:]): + - construct in a given VM (JSGlobalData). + (-[JSContext evaluateScript:]): + (-[JSContext globalObject]): + - evaluate a script, global object accessor. + (+[JSContext currentContext]): + (+[JSContext currentThis]): + (+[JSContext currentArguments]): + - These methods obtain context, this, arguments from within a callback. + (-[JSContext virtualMachine]): + - implementation for .virtualMachine property. + (-[JSContext objectForKeyedSubscript:]): + (-[JSContext setObject:forKeyedSubscript:]): + - support for subscript property access. + (contextInternalContext): + - internal accessor to m_context. + (-[JSContext dealloc]): + - desctructor. + (-[JSContext notifyException:]): + (-[JSContext valueFromNotifyException:]): + (-[JSContext boolFromNotifyException:]): + - internal method to record an exception was thrown. + (-[JSContext beginCallbackWithData:thisValue:argumentCount:arguments:]): + (-[JSContext endCallbackWithData:]): + - internal methods to push/pop a callback record. + (-[JSContext protect:]): + (-[JSContext unprotect:]): + - internal methods to add a value to a protect set (used to protect the internal property of JSValue). + (-[JSContext wrapperForObject:]): + - internal method to create a wrapper object. + (WeakContextRef::WeakContextRef): + (WeakContextRef::~WeakContextRef): + (WeakContextRef::get): + (WeakContextRef::set): + - Helper class to implement a weak reference to a JSContext. + * API/JSContextInternal.h: Added. + (CallbackData): + (WeakContextRef): + - see API/JSContext.mm for description of internal methods. + * API/JSExport.h: Added. + - Provides JSExport protocol & JSExportAs macro. + * API/JSValue.mm: Added. + (+[JSValue valueWithObject:inContext:]): + (+[JSValue valueWithBool:inContext:]): + (+[JSValue valueWithDouble:inContext:]): + (+[JSValue valueWithInt32:inContext:]): + (+[JSValue valueWithUInt32:inContext:]): + (+[JSValue valueWithNewObjectInContext:]): + (+[JSValue valueWithNewArrayInContext:]): + (+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]): + (+[JSValue valueWithNewErrorFromMessage:inContext:]): + (+[JSValue valueWithNullInContext:]): + (+[JSValue valueWithUndefinedInContext:]): + - Constructors. + (-[JSValue toObject]): + (-[JSValue toObjectOfClass:]): + (-[JSValue toBool]): + (-[JSValue toDouble]): + (-[JSValue toInt32]): + (-[JSValue toUInt32]): + (-[JSValue toNumber]): + (-[JSValue toString]): + (-[JSValue toDate]): + (-[JSValue toArray]): + (-[JSValue toDictionary]): + - Conversion to Objective-C types. + (-[JSValue valueForProperty:]): + (-[JSValue setValue:forProperty:]): + (-[JSValue deleteProperty:]): + (-[JSValue hasProperty:]): + (-[JSValue defineProperty:descriptor:]): + - Property access by property name. + (-[JSValue valueAtIndex:]): + (-[JSValue setValue:atIndex:]): + - Property access by index. + (-[JSValue isUndefined]): + (-[JSValue isNull]): + (-[JSValue isBoolean]): + (-[JSValue isNumber]): + (-[JSValue isString]): + (-[JSValue isObject]): + - Test JavaScript type. + (-[JSValue isEqualToObject:]): + (-[JSValue isEqualWithTypeCoercionToObject:]): + (-[JSValue isInstanceOf:]): + - ===, ==, instanceof operators. + (-[JSValue callWithArguments:]): + (-[JSValue constructWithArguments:]): + (-[JSValue invokeMethod:withArguments:]): + - Call & construct. + (-[JSValue context]): + - implementation for .context property. + (-[JSValue toPoint]): + (-[JSValue toRange]): + (-[JSValue toRect]): + (-[JSValue toSize]): + (+[JSValue valueWithPoint:inContext:]): + (+[JSValue valueWithRange:inContext:]): + (+[JSValue valueWithRect:inContext:]): + (+[JSValue valueWithSize:inContext:]): + - Support for NS struct types. + (-[JSValue objectForKeyedSubscript:]): + (-[JSValue objectAtIndexedSubscript:]): + (-[JSValue setObject:forKeyedSubscript:]): + (-[JSValue setObject:atIndexedSubscript:]): + - support for subscript property access. + (isDate): + (isArray): + - internal helper functions to check for instances of JS Date, Array types. + (JSContainerConvertor): + (Task): + (JSContainerConvertor::JSContainerConvertor): + (JSContainerConvertor::isWorkListEmpty): + (JSContainerConvertor::convert): + (JSContainerConvertor::add): + (JSContainerConvertor::take): + - helper class for tracking state while converting to Array/Dictionary objects. + (valueToObjectWithoutCopy): + (containerValueToObject): + (valueToObject): + (valueToNumber): + (valueToString): + (valueToDate): + (valueToArray): + (valueToDictionary): + - function for converting JavaScript values to Objective-C objects. + (ObjcContainerConvertor): + (ObjcContainerConvertor::ObjcContainerConvertor): + (ObjcContainerConvertor::isWorkListEmpty): + (ObjcContainerConvertor::convert): + (ObjcContainerConvertor::add): + (ObjcContainerConvertor::take): + - helper class for tracking state while converting to Array/Dictionary values. + (objectToValueWithoutCopy): + (objectToValue): + (valueInternalValue): + - function for converting Objective-C objects to JavaScript values. + (+[JSValue valueWithValue:inContext:]): + (-[JSValue initWithValue:inContext:]): + - internal constructors. + (StructTagHandler): + (getStructTagHandler): + (+[JSValue selectorForStructToValue:]): + (+[JSValue selectorForValueToStruct:]): + - methods to tracking struct types that support conversion to/from JSValue. + (-[JSValue dealloc]): + - destructor. + (-[JSValue description]): + - Objective-C to-NSString conversion. + (typeToValueInvocationFor): + (valueToTypeInvocationFor): + - create invocation objects for conversion to/from JSValue. + * API/JSValueInternal.h: Added. + - see API/JSValue.mm for description of internal methods. + * API/JSVirtualMachine.h: Added. + - this Objective-C class is used to reference a JavaScript virtual machine (JSGlobalData). + * API/JSVirtualMachine.mm: Added. + (-[JSVirtualMachine init]): + (-[JSVirtualMachine dealloc]): + - constructor & destructor. + (getGroupFromVirtualMachine): + - internal accessor for m_group property. + * API/JSVirtualMachineInternal.h: Added. + - see API/JSVirtualMachine.mm for description of internal methods. + * API/JSWrapperMap.h: Added. + * API/JSWrapperMap.mm: Added. + (wrapperClass): + - singleton root for detction (& unwrapping) of wrapper objects. + (selectorToPropertyName): + - default selector to property name conversion. + (createObjectWithCustomBrand): + - creates a JSObject with a custom NativeBrand (class name). + (createRenameMap): + - parse @optional properties of a JSExport protocol. + (putNonEnumerable): + - property put with enumerable=false. + (copyMethodsToObject): + - iterate methods in a protocol; add functions to a JSObject. + (parsePropertyAttributes): + - examine protocol property metadata. + (makeSetterName): + - "foo" -> "setFoo" + (copyPrototypeProperties): + - create properties on a Protocol object reflecting the instance methods & properties of a protocol. + (-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]): + (-[JSObjCClassInfo dealloc]): + (-[JSObjCClassInfo wrapperForObject:]): + (-[JSObjCClassInfo constructor]): + - cache the Protocol/Constructor objects for an Objective-C type. + (-[JSWrapperMap initWithContext:]): + (-[JSWrapperMap dealloc]): + - constructor & desctructor. + (-[JSWrapperMap classInfoForClass:]): + - maps Class -> JSObjCClassInfo. + (-[JSWrapperMap wrapperForObject:]): + - cretae or retrieve a cached wrapper value for an object. + (tryUnwrapObjcObject): + - check whether a value is a wrapper object; unwrap if so. + * API/JavaScriptCore.h: + - Added includes for new API headers. + * API/ObjCCallbackFunction.h: Added. + - this class is used to wrap Objective-C instance methods, class methods & blocks as JSFunction objects. + * API/ObjCCallbackFunction.mm: Added. + (CallbackArgument): + (CallbackArgument::~CallbackArgument): + (CallbackArgumentBoolean): + (CallbackArgumentBoolean::set): + (CallbackArgumentInteger): + (CallbackArgumentInteger::set): + (CallbackArgumentDouble): + (CallbackArgumentDouble::set): + (CallbackArgumentJSValue): + (CallbackArgumentJSValue::set): + (CallbackArgumentId): + (CallbackArgumentId::set): + (CallbackArgumentOfClass): + (CallbackArgumentOfClass::CallbackArgumentOfClass): + (CallbackArgumentOfClass::~CallbackArgumentOfClass): + (CallbackArgumentOfClass::set): + (CallbackArgumentNSNumber): + (CallbackArgumentNSNumber::set): + (CallbackArgumentNSString): + (CallbackArgumentNSString::set): + (CallbackArgumentNSDate): + (CallbackArgumentNSDate::set): + (CallbackArgumentNSArray): + (CallbackArgumentNSArray::set): + (CallbackArgumentNSDictionary): + (CallbackArgumentNSDictionary::set): + (CallbackArgumentStruct): + (CallbackArgumentStruct::CallbackArgumentStruct): + (CallbackArgumentStruct::~CallbackArgumentStruct): + (CallbackArgumentStruct::set): + (CallbackArgumentBlockCallback): + (CallbackArgumentBlockCallback::CallbackArgumentBlockCallback): + (CallbackArgumentBlockCallback::~CallbackArgumentBlockCallback): + (CallbackArgumentBlockCallback::set): + - decoded arguent type information of a ObjCCallbackFunction. + (ArgumentTypeDelegate): + (ArgumentTypeDelegate::typeInteger): + (ArgumentTypeDelegate::typeDouble): + (ArgumentTypeDelegate::typeBool): + (ArgumentTypeDelegate::typeVoid): + (ArgumentTypeDelegate::typeId): + (ArgumentTypeDelegate::typeOfClass): + (ArgumentTypeDelegate::typeBlock): + (ArgumentTypeDelegate::typeStruct): + - delegate for use in conjunction with parseObjCType. + (CallbackResult): + (CallbackResult::~CallbackResult): + (CallbackResultVoid): + (CallbackResultVoid::get): + (CallbackResultId): + (CallbackResultId::get): + (CallbackResultNumeric): + (CallbackResultNumeric::get): + (CallbackResultBoolean): + (CallbackResultBoolean::get): + (CallbackResultStruct): + (CallbackResultStruct::CallbackResultStruct): + (CallbackResultStruct::~CallbackResultStruct): + (CallbackResultStruct::get): + - decoded result type information of a ObjCCallbackFunction. + (ResultTypeDelegate): + (ResultTypeDelegate::typeInteger): + (ResultTypeDelegate::typeDouble): + (ResultTypeDelegate::typeBool): + (ResultTypeDelegate::typeVoid): + (ResultTypeDelegate::typeId): + (ResultTypeDelegate::typeOfClass): + (ResultTypeDelegate::typeBlock): + (ResultTypeDelegate::typeStruct): + - delegate for use in conjunction with parseObjCType. + (ObjCCallbackFunction): + (ObjCCallbackFunction::ObjCCallbackFunction): + (ObjCCallbackFunction::~ObjCCallbackFunction): + - constructor & destructor. + (ObjCCallbackFunction::context): + - accessor. + (ObjCCallbackFunction::wrappedBlock): + - attemmpt to unwrap a block object. + (objCCallbackFunctionFinalize): + (objCCallbackFunctionCallAsFunction): + (objCCallbackFunctionClass): + - JSClassRef used to represent ObjCCallbackFunction objects. + (ObjCCallbackFunction::call): + (blockSignatureContainsClass): + - helper function to determine if we're running on a recent Clang. + (skipNumber): + - helper used in parsing signature strings. + (objCCallbackFunctionForInvocation): + (objCCallbackFunctionForMethod): + (objCCallbackFunctionForBlock): + - functions to try to create ObjCCallbackFunction instances for methods/blocks. + (tryUnwrapBlock): + - attemmpt to unwrap a block object. + * API/ObjcRuntimeExtras.h: Added. + (protocolImplementsProtocol): + (forEachProtocolImplementingProtocol): + (forEachMethodInClass): + (forEachMethodInProtocol): + (forEachPropertyInProtocol): + - functions used in reflecting on Objective-C types. + (skipPair): + - parsing helper used by parseObjCType, scans for matching parentheses. + (StringRange): + (StringRange::StringRange): + (StringRange::~StringRange): + (StringRange::operator const char*): + (StringRange::get): + - Helper class - create a c string copy of a range of an existing string. + (parseObjCType): + - function to parse Objective-C type strings, makes callbacks to a deleagte. + * API/tests/testapi.c: + (main): + - added call to testObjectiveCAPI (in testapi.m). + * API/tests/testapi.m: Added. + (+[ParentObject parentTest]): + (+[TestObject testObject]): + (+[TestObject classTest]): + (-[TestObject getString]): + (-[TestObject testArgumentTypesWithInt:double:boolean:string:number:array:dictionary:]): + (-[TestObject callback:]): + (-[TextXYZ test:]): + - test object, used in various test vases. + (checkResult): + - helper function. + (blockSignatureContainsClass): + - helper function to determine if we're running on a recent Clang. + (testObjectiveCAPI): + - new test cases. + * JavaScriptCore.xcodeproj/project.pbxproj: + - added new files. + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + - added m_apiData - provide convenient storage for use by the API. + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::JSGlobalObject): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + - added m_apiData - provide convenient storage for use by the API. + +2012-12-27 Csaba Osztrogonác + + One more unreviwed holiday MIPS and SH4 buildfixes after r138516. + + * jit/ThunkGenerators.cpp: + +2012-12-27 Csaba Osztrogonác + + Unreviwed holiday ARM and SH4 buildfixes after r138516. + + * jit/ThunkGenerators.cpp: + (JSC::nativeForGenerator): + +2012-12-26 Filip Pizlo + + All JIT stubs should go through the getCTIStub API + https://bugs.webkit.org/show_bug.cgi?id=105750 + + Reviewed by Sam Weinig. + + Previously JITThunks had two sets of thunks: one static set stored in a struct, + which was filled by JIT::privateCompileCTITrampolines, and another set stored in + a HashMap. Moreover, the code to generate the code for the CTI trampoline struct + had loads of copy-paste between JSVALUE32_64 and JSVALUE64, and was total + unmodular with respect to calls versus constructors, among other things. + + This changeset removes this struct and rationalizes the code that generates those + thunks. All of thunks are now generated through the getCTIStub HashMap API. All + thunks for the baseline JIT now use the JSInterfaceJIT and have their codegen + located in ThunkGenerators.cpp. All thunks now share as much code as possible - + it turns out that they are almost 100% identical between 32_64 and 64, so that + works out great. A bunch of call vs. construct duplication was eliminated. And, + most of the call link versus virtual call duplication was also eliminated. + + This does not change behavior but it does make it easier to add more thunks in + the future. + + * bytecode/CallLinkInfo.cpp: + (JSC::CallLinkInfo::unlink): + * jit/JIT.cpp: + (JSC::JIT::linkFor): + * jit/JIT.h: + (JIT): + * jit/JITCall.cpp: + (JSC::JIT::compileCallEvalSlowCase): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileCallEvalSlowCase): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlines.h: + (JSC): + * jit/JITOpcodes.cpp: + (JSC): + (JSC::JIT::privateCompileCTINativeCall): + * jit/JITOpcodes32_64.cpp: + (JSC): + * jit/JITStubs.cpp: + (JSC::tryCacheGetByID): + * jit/JITThunks.cpp: + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::ctiNativeCall): + (JSC::JITThunks::ctiNativeConstruct): + (JSC): + (JSC::JITThunks::hostFunctionStub): + * jit/JITThunks.h: + (JSC): + (JITThunks): + * jit/JSInterfaceJIT.h: + (JSInterfaceJIT): + (JSC::JSInterfaceJIT::emitJumpIfNotJSCell): + (JSC): + (JSC::JSInterfaceJIT::emitFastArithIntToImmNoCheck): + (JSC::JSInterfaceJIT::emitJumpIfNotType): + (JSC::JSInterfaceJIT::emitGetFromCallFrameHeaderPtr): + (JSC::JSInterfaceJIT::emitPutToCallFrameHeader): + (JSC::JSInterfaceJIT::emitPutImmediateToCallFrameHeader): + (JSC::JSInterfaceJIT::emitPutCellToCallFrameHeader): + (JSC::JSInterfaceJIT::preserveReturnAddressAfterCall): + (JSC::JSInterfaceJIT::restoreReturnAddressBeforeReturn): + (JSC::JSInterfaceJIT::restoreArgumentReference): + * jit/ThunkGenerators.cpp: + (JSC::generateSlowCaseFor): + (JSC): + (JSC::linkForGenerator): + (JSC::linkCallGenerator): + (JSC::linkConstructGenerator): + (JSC::virtualForGenerator): + (JSC::virtualCallGenerator): + (JSC::virtualConstructGenerator): + (JSC::stringLengthTrampolineGenerator): + (JSC::nativeForGenerator): + (JSC::nativeCallGenerator): + (JSC::nativeConstructGenerator): + (JSC::charCodeAtThunkGenerator): + (JSC::charAtThunkGenerator): + (JSC::fromCharCodeThunkGenerator): + (JSC::sqrtThunkGenerator): + (JSC::floorThunkGenerator): + (JSC::ceilThunkGenerator): + (JSC::roundThunkGenerator): + (JSC::expThunkGenerator): + (JSC::logThunkGenerator): + (JSC::absThunkGenerator): + (JSC::powThunkGenerator): + * jit/ThunkGenerators.h: + (JSC): + * runtime/Executable.h: + (NativeExecutable): + (JSC::NativeExecutable::nativeFunctionFor): + (JSC::NativeExecutable::offsetOfNativeFunctionFor): + +2012-12-25 Gyuyoung Kim + + [CMAKE] Remove header files in JavaScriptCore/CMakeLists.txt + https://bugs.webkit.org/show_bug.cgi?id=105753 + + Reviewed by Laszlo Gombos. + + * CMakeLists.txt: Remove header files in source list. + +2012-12-25 Filip Pizlo + + JITThunks should be in its own file + https://bugs.webkit.org/show_bug.cgi?id=105744 + + Rubber stamped by Sam Weinig. + + Moved JITThunks into its own file and removed some static methods from it + that were not related to what JITThunks currently does. Performed various + pagan rituals to get it to build - apparently there is a circular dependency + between JSCell, Weak, and JITThunks, which magically resolves itself if you + make sure to first include Register.h. Making it so that fewer pagan rituals + need to be performed if this code changes in the future is covered by + https://bugs.webkit.org/show_bug.cgi?id=105696. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * jit/JITStubs.cpp: + (JSC::tryCachePutByID): + (JSC::tryCacheGetByID): + * jit/JITStubs.h: + (JSC::JITStackFrame::returnAddressSlot): + (JSC::returnAddressIsInCtiTrampoline): + * jit/JITThunks.cpp: Added. + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::~JITThunks): + (JSC::JITThunks::ctiStub): + (JSC::JITThunks::hostFunctionStub): + (JSC::JITThunks::clearHostFunctionStubs): + * jit/JITThunks.h: Added. + (JSC::JITThunks::ctiStringLengthTrampoline): + (JSC::JITThunks::ctiVirtualCallLink): + (JSC::JITThunks::ctiVirtualConstructLink): + (JSC::JITThunks::ctiVirtualCall): + (JSC::JITThunks::ctiVirtualConstruct): + (JSC::JITThunks::ctiNativeCall): + (JSC::JITThunks::ctiNativeConstruct): + * jit/ThunkGenerator.h: Added. + * jit/ThunkGenerators.cpp: + * jit/ThunkGenerators.h: + * runtime/JSGlobalData.h: + +2012-12-25 Ilya Tikhonovsky + + Unreviewed follow-up for r138455. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-12-24 Ilya Tikhonovsky + + Unreviewed compilation fix for r138452. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-12-24 Laszlo Gombos + + Remove wtf/Platform.h includes from {c|cpp} files + https://bugs.webkit.org/show_bug.cgi?id=105678 + + Reviewed by Kentaro Hara. + + Remove wtf/Platform.h from the include list as it is already + included in config.h. + + * disassembler/udis86/udis86.c: + * disassembler/udis86/udis86_decode.c: + * disassembler/udis86/udis86_input.c: + * disassembler/udis86/udis86_itab_holder.c: + * disassembler/udis86/udis86_syn-att.c: + * disassembler/udis86/udis86_syn-intel.c: + * disassembler/udis86/udis86_syn.c: + * heap/VTableSpectrum.cpp: + +2012-12-21 Filip Pizlo + + DFG Arrayify slow path should be out-of-line + https://bugs.webkit.org/show_bug.cgi?id=105400 + + Reviewed by Gavin Barraclough. + + The interesting bit of this change is allowing out-of-line slow path generators + to emit speculation checks. This is accomplished by having a version of + speculationCheck() that returns a jump placeholder instead of taking a jump (or + jump list) as an argument. You can then fill in that jump placeholder at a + later time, so long as you do it before OSR exit linking. Slow path generators + run before linking, so that just naturally ends up working. + + This isn't really a big win, but we know that out-of-lining slow paths is + generally a good thing to do, so it's fair to assume that this is a move in the + right direction. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * dfg/DFGArrayifySlowPathGenerator.h: Added. + (DFG): + (ArrayifySlowPathGenerator): + (JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator): + (JSC::DFG::ArrayifySlowPathGenerator::generateInternal): + * dfg/DFGOSRExitJumpPlaceholder.cpp: Added. + (DFG): + (JSC::DFG::OSRExitJumpPlaceholder::fill): + * dfg/DFGOSRExitJumpPlaceholder.h: Added. + (DFG): + (OSRExitJumpPlaceholder): + (JSC::DFG::OSRExitJumpPlaceholder::OSRExitJumpPlaceholder): + (JSC::DFG::OSRExitJumpPlaceholder::operator!): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::speculationCheck): + (DFG): + (JSC::DFG::SpeculativeJIT::arrayify): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + +2012-12-20 Oliver Hunt + + Finally found the problem. Using the wrong JSContextGroup. + + * API/tests/testapi.c: + (main): + +2012-12-20 Oliver Hunt + + Try to convince bots to be happy with testapi. + + * API/JSScriptRefPrivate.h: + +2012-12-20 Michael Saboff + + JIT: Change uninitialized pointer value -1 to constant + https://bugs.webkit.org/show_bug.cgi?id=105576 + + Rubber stamped by Gavin Barraclough. + + Changed the use of -1 as a pointer value in the JITs to be the constant unusedPointer defined in the + new file jit/UnusedPointer.h. Made it's value 0xd1e7beef, which is a bad pointer on most architectures + because it is odd, and to distinguish it from other common values. + + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGRepatch.cpp: + (JSC::DFG::dfgResetGetByID): + (JSC::DFG::dfgResetPutByID): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::cachedGetById): + (JSC::DFG::SpeculativeJIT::cachedPutById): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::cachedGetById): + (JSC::DFG::SpeculativeJIT::cachedPutById): + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::resetPatchGetById): + (JSC::JIT::resetPatchPutById): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::resetPatchGetById): + (JSC::JIT::resetPatchPutById): + * jit/JITWriteBarrier.h: + (JSC::JITWriteBarrierBase::clearToUnusedPointer): + (JSC::JITWriteBarrierBase::get): + * jit/UnusedPointer.h: Added. + +2012-12-20 Filip Pizlo + + DFG shouldn't emit CheckStructure on array accesses if exit profiling tells it not to + https://bugs.webkit.org/show_bug.cgi?id=105577 + + Reviewed by Mark Hahnenberg. + + I don't know why this wasn't there from the beginning. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): + +2012-12-19 Filip Pizlo + + DFG speculation checks that take JumpList should consolidate OSRExits + https://bugs.webkit.org/show_bug.cgi?id=105401 + + Reviewed by Oliver Hunt. + + Change OSRExitCompilationInfo to always contain a JumpList, and change JumpList + to be more compact. This way, a speculationCheck that takes a JumpList only has + to emit one OSRExit structure, and one OSRExit landing pad. + + The downside is that we get less precise information about *where* we exited + from. So, this also includes changes to the profiler to be more relaxed about + what an ExitSite is. + + * assembler/AbstractMacroAssembler.h: + (JumpList): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::linkOSRExits): + (JSC::DFG::JITCompiler::link): + * dfg/DFGJITCompiler.h: + (DFG): + (JSC::DFG::JITCompiler::appendExitInfo): + (JITCompiler): + * dfg/DFGOSRExitCompilationInfo.h: + (OSRExitCompilationInfo): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::speculationCheck): + (JSC::DFG::SpeculativeJIT::speculationWatchpoint): + (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck): + * profiler/ProfilerCompilation.cpp: + (JSC::Profiler::Compilation::addOSRExitSite): + * profiler/ProfilerCompilation.h: + (Compilation): + * profiler/ProfilerOSRExitSite.cpp: + (JSC::Profiler::OSRExitSite::toJS): + * profiler/ProfilerOSRExitSite.h: + (JSC::Profiler::OSRExitSite::OSRExitSite): + (JSC::Profiler::OSRExitSite::codeAddress): + (OSRExitSite): + +2012-12-19 Oliver Hunt + + Fix some incorrect tests in testapi.c + + Reviewed by Simon Fraser. + + * API/tests/testapi.c: + (main): + +2012-12-19 Filip Pizlo + + JSObject::ensure should gracefully handle InterceptsGetOwn..., and should never be called when the 'this' is not an object + https://bugs.webkit.org/show_bug.cgi?id=105468 + + Reviewed by Mark Hahnenberg, Oliver Hunt, and Gavin Barraclough. + + Changed JSObject::ensure methods to gracefully handle + InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero. Most of them handle it by returning + null as a result of indexingShouldBeSparse() returning true, while ensureArrayStorage handles it + by entering dictionary indexing mode, which forces the object to behave correctly even if there + is proxying or weird prototype stuff going on. + + Changed DFGOperations entrypoints to reject non-objects, so that JSObject doesn't have to deal + with pretending to be JSString. In particular, this would go wrong in the ArrayStorage case + since we'd try to resize a butterfly on a JSString, but JSString has something other than + m_butterfly at that offset. + + Finally, removed all InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero from JIT code + since those are now redundant. + + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::arrayify): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + * runtime/JSObject.cpp: + (JSC::JSObject::enterDictionaryIndexingMode): + (JSC::JSObject::ensureInt32Slow): + (JSC::JSObject::ensureDoubleSlow): + (JSC::JSObject::ensureContiguousSlow): + (JSC::JSObject::ensureArrayStorageSlow): + (JSC): + (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes): + * runtime/JSObject.h: + (JSObject): + +2012-12-19 Oliver Hunt + + Tidy up JSScriptRef API + https://bugs.webkit.org/show_bug.cgi?id=105470 + + Reviewed by Anders Carlsson. + + People found the API's use of a context confusing, so we'll switch to a JSContextGroup based + API, and drop a number of the unnecessary uses of contexts. + + * API/JSScriptRef.cpp: + (OpaqueJSScript::globalData): + (parseScript): + * API/JSScriptRefPrivate.h: + * API/tests/testapi.c: + (main): + +2012-12-19 Alexis Menard + + Implement CSS parsing for CSS transitions unprefixed. + https://bugs.webkit.org/show_bug.cgi?id=104804 + + Reviewed by Dean Jackson. + + Add a new flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED + to cover the work of unprefixing Transforms, Animations and + Transitions. It will let the possibility of each ports to turn it off + in their release branches until we're confident that these CSS + properties are ready to be unprefixed. + + * Configurations/FeatureDefines.xcconfig: + +2012-12-18 Filip Pizlo + + Proxies should set InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero + https://bugs.webkit.org/show_bug.cgi?id=105379 + + Reviewed by Gavin Barraclough. + + Forgetting to set this flag led to the DFG trying to ensure array storage on a proxy. I've + now hardened the code with a release assertion as well as fixing the bug. A release assertion + is appropriate here since this is slow-path code. + + * runtime/JSObject.cpp: + (JSC::JSObject::enterDictionaryIndexingMode): + (JSC::JSObject::ensureInt32Slow): + (JSC::JSObject::ensureDoubleSlow): + (JSC::JSObject::ensureContiguousSlow): + (JSC::JSObject::ensureArrayStorageSlowNoCheck): + (JSC::JSObject::ensureArrayStorageSlow): + (JSC): + (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes): + * runtime/JSObject.h: + (JSObject): + * runtime/JSProxy.h: + (JSProxy): + +2012-12-18 Oliver Hunt + + Add a JSScriptRef API to JSC so that we can allow API users to avoid the full cost of reparsing everytime the execute a script. + https://bugs.webkit.org/show_bug.cgi?id=105340 + + Reviewed by Gavin Barraclough. + + This patch adds a (currently private) API to allow users of the JSC API to create a JSScript object + that references a reusable version of the script that they wish to evaluate. This can help us avoid + numeorus copies that are otherwise induced by our existing API and gives us an opaque object that we + can hang various caches off. Currently this is simply a simple SourceProvider, but in future we may + be able to add more caching without requiring new/replacement APIs. + + * API/JSScriptRef.cpp: Added. + * API/JSScriptRefPrivate.h: Added. + * API/tests/testapi.c: + Add tests for new APIs. + * JavaScriptCore.xcodeproj/project.pbxproj: + +2012-12-18 Filip Pizlo + + DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode incorrectly checks for non-array array storage when it should be checking for array array storage + https://bugs.webkit.org/show_bug.cgi?id=105365 + + Reviewed by Mark Hahnenberg. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + +2012-12-18 Filip Pizlo + + SunSpider/date-format-tofte shouldn't compile each of the tiny worthless eval's only to OSR exit in the prologue every time + https://bugs.webkit.org/show_bug.cgi?id=105335 + + Reviewed by Geoffrey Garen. + + The first thing I did was restructure the logic of canInlineResolveOperations(), + because I didn't understand it. This was relevant because the OSR exits are + caused by a resolve that the DFG cannot handle. + + I was then going to make it so that we didn't compile the resolve at all, but + realized that this would not be the best fix: it didn't seem sensible to me to + be optimizing these evals after only 60 invocations. Evals should have a higher + threshold, since they often contain code for which the baseline JIT does a + pretty good job already (if all you've got is a single heap access or a single + hard-to-inline call, then the baseline JIT has got you covered), and typically + if we see one eval code block we expect to see more (from the same eval site): + so our typical low threshold could lead to a *lot* of compilation. As such, the + main effect of this patch is to introduce an evalThresholdMultiplier, which is + now set to 10. + + This is a ~5% speed-up on data-format-tofte. No regressions anywhere as far as + I can see. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::codeTypeThresholdMultiplier): + (JSC): + (JSC::CodeBlock::optimizationThresholdScalingFactor): + (JSC::CodeBlock::exitCountThresholdForReoptimization): + (JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop): + * bytecode/CodeBlock.h: + (CodeBlock): + * dfg/DFGCapabilities.h: + (JSC::DFG::canInlineResolveOperations): + * dfg/DFGOSRExitCompiler.cpp: + * runtime/Options.h: + (JSC): + +2012-12-18 Filip Pizlo + + Convert indexingTypeToString to IndexingTypeDump + https://bugs.webkit.org/show_bug.cgi?id=105351 + + Reviewed by Mark Hahnenberg. + + This gets rid of another case of static char buffer[thingy]. + + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * runtime/IndexingType.cpp: + (JSC::dumpIndexingType): + * runtime/IndexingType.h: + (JSC): + * runtime/JSValue.cpp: + (JSC::JSValue::dump): + +2012-12-18 Beth Dakin + + https://bugs.webkit.org/show_bug.cgi?id=102579 + [mac] Enable scaled cursors + + Reviewed by Dean Jackson. + + * Configurations/FeatureDefines.xcconfig: + +2012-12-18 Mark Hahnenberg + + Restrictions on oversize CopiedBlock allocations should be relaxed + https://bugs.webkit.org/show_bug.cgi?id=105339 + + Reviewed by Filip Pizlo. + + Currently the DFG has a single branch in the inline allocation path for property/array storage where + it checks to see if the number of bytes requested will fit in the current block. This does not match + what the C++ allocation path does; it checks if the requested number of bytes is oversize, and then + if it's not, it tries to fit it in the current block. The garbage collector assumes that ALL allocations + that are greater than 16KB are in oversize blocks. Therefore, this mismatch can lead to crashes when + the collector tries to perform some operation on a CopiedBlock. + + To avoid adding an extra branch to the inline allocation path in the JIT, we should make it so that + oversize blocks are allocated on the same alignment boundaries so that there is a single mask to find + the block header of any CopiedBlock (rather than two, one for normal and one for oversize blocks), and + we should figure out if a block is oversize by some other method than just whatever the JSObject says + it is. One way we could record this info Region of the block, since we allocate a one-off Region for + oversize blocks. + + * heap/BlockAllocator.h: + (JSC::Region::isCustomSize): + (Region): + (JSC::Region::createCustomSize): + (JSC::Region::Region): + (JSC::BlockAllocator::deallocateCustomSize): + * heap/CopiedBlock.h: + (CopiedBlock): + (JSC::CopiedBlock::isOversize): + (JSC): + * heap/CopiedSpace.cpp: + (JSC::CopiedSpace::tryAllocateOversize): + (JSC::CopiedSpace::tryReallocate): + (JSC::CopiedSpace::tryReallocateOversize): + * heap/CopiedSpace.h: + (CopiedSpace): + * heap/CopiedSpaceInlines.h: + (JSC::CopiedSpace::contains): + (JSC::CopiedSpace::tryAllocate): + (JSC): + * heap/CopyVisitor.h: + (CopyVisitor): + * heap/CopyVisitorInlines.h: + (JSC::CopyVisitor::checkIfShouldCopy): + (JSC::CopyVisitor::didCopy): + * heap/SlotVisitorInlines.h: + (JSC::SlotVisitor::copyLater): + * runtime/JSObject.cpp: + (JSC::JSObject::copyButterfly): + +2012-12-18 Joseph Pecoraro + + [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros) + https://bugs.webkit.org/show_bug.cgi?id=104279 + + Reviewed by David Kilzer. + + Add a build phase to check the public JavaScriptCore headers for + inappropriate macros. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2012-12-18 Michael Saboff + + [Qt] Fix the ARMv7 build after r137976 + https://bugs.webkit.org/show_bug.cgi?id=105270 + + Reviewed by Csaba Osztrogonác. + + Add default value for Jump parameter to fix build. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Jump::Jump): + +2012-12-17 Geoffrey Garen + + Constant fold !{number} in the parser + https://bugs.webkit.org/show_bug.cgi?id=105232 + + Reviewed by Filip Pizlo. + + Typically, we wait for hot execution and constant fold in the DFG. + However, !0 and !1 are common enough in minifiers that it can be good + to get them out of the way early, for faster/smaller parsing and startup. + + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createLogicalNot): !{literal} is super simple, especially + since there's no literal form of NaN or Inf. + +2012-12-17 Filip Pizlo + + DFG is too aggressive eliding overflow checks for additions involving large constants + https://bugs.webkit.org/show_bug.cgi?id=105239 + + Reviewed by Gavin Barraclough. + + If we elide overflow checks on an addition (or subtraction) involving a larger-than-2^32 immediate, + then make sure that the non-constant child of the addition knows that he's got to do an overflow + check, by flowing the UsedAsNumber property at him. + + * dfg/DFGGraph.h: + (JSC::DFG::Graph::addSpeculationMode): + (Graph): + (JSC::DFG::Graph::addShouldSpeculateInteger): + (JSC::DFG::Graph::addImmediateShouldSpeculateInteger): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + +2012-12-17 Michael Saboff + + DFG: Refactor DFGCorrectableJumpPoint to reduce size of OSRExit data + https://bugs.webkit.org/show_bug.cgi?id=105237 + + Reviewed by Filip Pizlo. + + Replaced DFGCorrectableJumpPoint with OSRExitCompilationInfo which is used and kept alive only while we are + compiling in the DFG. Moved the patchable branch offset directly into OSRExit. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * assembler/AbstractMacroAssembler.h: + * dfg/DFGCorrectableJumpPoint.cpp: Removed. + * dfg/DFGCorrectableJumpPoint.h: Removed. + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::linkOSRExits): + (JSC::DFG::JITCompiler::link): + * dfg/DFGJITCompiler.h: + (JSC::DFG::JITCompiler::appendExitJump): + (JITCompiler): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::OSRExit): + (JSC::DFG::OSRExit::setPatchableCodeOffset): + (JSC::DFG::OSRExit::getPatchableCodeOffsetAsJump): + (JSC::DFG::OSRExit::codeLocationForRepatch): + (JSC::DFG::OSRExit::correctJump): + * dfg/DFGOSRExit.h: + (OSRExit): + * dfg/DFGOSRExitCompilationInfo.h: Added. + (OSRExitCompilationInfo): + (JSC::DFG::OSRExitCompilationInfo::OSRExitCompilationInfo): + (JSC::DFG::OSRExitCompilationInfo::failureJump): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::speculationCheck): + (JSC::DFG::SpeculativeJIT::speculationWatchpoint): + +2012-12-17 Filip Pizlo + + DFG is too aggressive with eliding overflow checks in loops + https://bugs.webkit.org/show_bug.cgi?id=105226 + + Reviewed by Mark Hahnenberg and Oliver Hunt. + + If we see a variable's live range cross basic block boundaries, conservatively assume that it may + be part of a data-flow back-edge, and as a result, we may have entirely integer operations that + could lead to the creation of an integer that is out of range of 2^52 (the significand of a double + float). This does not seem to regress any of the benchmarks we care about, and it fixes the bug. + + In future we may want to actually look at whether or not there was a data-flow back-edge instead + of being super conservative about it. But we have no evidence, yet, that this would help us on + real code. + + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + +2012-12-17 Mark Hahnenberg + + Butterfly::growArrayRight shouldn't be called on null Butterfly objects + https://bugs.webkit.org/show_bug.cgi?id=105221 + + Reviewed by Filip Pizlo. + + Currently we depend upon the fact that Butterfly::growArrayRight works with null Butterfly + objects purely by coincidence. We should add a new static function that null checks the old + Butterfly object and creates a new one if it's null, or calls growArrayRight if it isn't for + use in the couple of places in JSObject that expect such behavior to work. + + * runtime/Butterfly.h: + (Butterfly): + * runtime/ButterflyInlines.h: + (JSC::Butterfly::createOrGrowArrayRight): + (JSC): + * runtime/JSObject.cpp: + (JSC::JSObject::createInitialIndexedStorage): + (JSC::JSObject::createArrayStorage): + +2012-12-17 Filip Pizlo + + javascript integer overflow + https://bugs.webkit.org/show_bug.cgi?id=104967 + + Reviewed by Mark Hahnenberg. + + Fix PutScopedVar backward flow. + + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + +2012-12-16 Filip Pizlo + + Rationalize array profiling for out-of-bounds and hole cases + https://bugs.webkit.org/show_bug.cgi?id=105139 + + Reviewed by Geoffrey Garen. + + This makes ArrayProfile track whether or not we had out-of-bounds, which allows + for more precise decision-making in the DFG. + + Also cleaned up ExitKinds for out-of-bounds and hole cases to make it easier to + look at them in the profiler. + + Slight speed-up (5-8%) on SunSpider/crypto-md5. + + * bytecode/ArrayProfile.cpp: + (JSC::ArrayProfile::computeUpdatedPrediction): + (JSC::ArrayProfile::briefDescription): + * bytecode/ArrayProfile.h: + (JSC::ArrayProfile::ArrayProfile): + (JSC::ArrayProfile::addressOfOutOfBounds): + (JSC::ArrayProfile::expectedStructure): + (JSC::ArrayProfile::structureIsPolymorphic): + (JSC::ArrayProfile::outOfBounds): + (JSC::ArrayProfile::polymorphicStructure): + * bytecode/CodeBlock.cpp: + (JSC::dumpChain): + * bytecode/ExitKind.cpp: + (JSC::exitKindToString): + (JSC::exitKindIsCountable): + * bytecode/ExitKind.h: + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileDoublePutByVal): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JIT.h: + * jit/JITInlines.h: + (JSC::JIT::emitArrayProfileOutOfBoundsSpecialCase): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emitSlow_op_put_by_val): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emitSlow_op_put_by_val): + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + +2012-12-17 Balazs Kilvady + + Implement add64 for MIPS assembler after r136601 + https://bugs.webkit.org/show_bug.cgi?id=104106 + + Reviewed by Zoltan Herczeg. + + Added add64 function to MacroAssebler of MIPS. + + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::add32): + (JSC::MacroAssemblerMIPS::add64): + (MacroAssemblerMIPS): + +2012-12-17 Jonathan Liu + + Fix Math.pow implementation with MinGW-w64 + https://bugs.webkit.org/show_bug.cgi?id=105087 + + Reviewed by Simon Hausmann. + + The MinGW-w64 runtime has different behaviour for pow() + compared to other C runtimes. This results in the following + test262 tests failing with the latest MinGW-w64 runtime: + - S15.8.2.13_A14 + - S15.8.2.13_A16 + - S15.8.2.13_A20 + - S15.8.2.13_A22 + + Handle the special cases that are different with MinGW-w64. + + * runtime/MathObject.cpp: + (JSC::mathPow): + +2012-12-16 Filip Pizlo + + Bytecode dumping should show rare case profiles + https://bugs.webkit.org/show_bug.cgi?id=105133 + + Reviewed by Geoffrey Garen. + + Refactored the dumper to call dumpBytecodeCommandAndNewLine in just one place, + rather than in all of the places. Changed the rare case profile getters to use + tryBinarySearch rather than binarySearch, so that they can be used speculatively + even if you don't know that the bytecode has rare case profiles. This actually + increases our assertion level, since it means that in release builds we will get + null and crash rather than getting some random adjacent profile. And then this + adds some printing of the rare case profiles. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printUnaryOp): + (JSC::CodeBlock::printBinaryOp): + (JSC::CodeBlock::printConditionalJump): + (JSC::CodeBlock::printCallOp): + (JSC::CodeBlock::printPutByIdOp): + (JSC::CodeBlock::beginDumpProfiling): + (JSC): + (JSC::CodeBlock::dumpValueProfiling): + (JSC::CodeBlock::dumpArrayProfiling): + (JSC::CodeBlock::dumpRareCaseProfile): + (JSC::CodeBlock::dumpBytecode): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::rareCaseProfileForBytecodeOffset): + (JSC::CodeBlock::specialFastCaseProfileForBytecodeOffset): + +2012-12-13 Filip Pizlo + + Attempt to rationalize and simplify WTF::binarySearch + https://bugs.webkit.org/show_bug.cgi?id=104890 + + Reviewed by Maciej Stachowiak. + + Switch to using the new binarySearch() API. No change in behavior. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::codeOriginForReturn): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getStubInfo): + (JSC::CodeBlock::getByValInfo): + (JSC::CodeBlock::getCallLinkInfo): + (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex): + (JSC::CodeBlock::valueProfileForBytecodeOffset): + (JSC::CodeBlock::rareCaseProfileForBytecodeOffset): + (JSC::CodeBlock::specialFastCaseProfileForBytecodeOffset): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::blockIndexForBytecodeOffset): + * dfg/DFGMinifiedGraph.h: + (JSC::DFG::MinifiedGraph::at): + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * profiler/ProfilerBytecodeSequence.cpp: + (JSC::Profiler::BytecodeSequence::indexForBytecodeIndex): + +2012-12-13 Filip Pizlo + + Don't assert that flags <= 0x3ff in JSTypeInfo + https://bugs.webkit.org/show_bug.cgi?id=104988 + + Reviewed by Sam Weinig. + + This assertion doesn't accomplish anything other than crashes. + + * runtime/JSTypeInfo.h: + (JSC::TypeInfo::TypeInfo): + +2012-12-13 Filip Pizlo + + Named lookups on HTML documents produce inconsistent results in JavaScriptCore bindings + https://bugs.webkit.org/show_bug.cgi?id=104623 + + Reviewed by Geoffrey Garen. + + Add the notion of objects that HasImpureGetOwnPropertySlot, and use that to inhibit prototype chain caching + in some cases. This appears to be perf-neutral on benchmarks that we track. + + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + (JSC::DFG::tryBuildGetByIDProtoList): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSTypeInfo.h: + (JSC): + (JSC::TypeInfo::hasImpureGetOwnPropertySlot): + * runtime/Operations.h: + (JSC::normalizePrototypeChainForChainAccess): + +2012-12-13 Filip Pizlo + + Unreviewed, roll out http://trac.webkit.org/changeset/137683. + It broke gmail. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::putStructureStoreElimination): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * runtime/Operations.cpp: + (JSC::jsTypeStringForValue): + (JSC): + * runtime/Operations.h: + (JSC): + +2012-13-11 Oliver Hunt + + Support op_typeof in the DFG + https://bugs.webkit.org/show_bug.cgi?id=98898 + + Reviewed by Filip Pizlo. + + Adds a TypeOf node to the DFG to support op_typeof. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + We try to determine the result early here, and substitute in a constant. + Otherwise we leave the node intact, and set the result type to SpecString. + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + Parse op_typeof + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performNodeCSE): + TypeOf nodes can be subjected to pure CSE + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + We can handle typeof. + * dfg/DFGNodeType.h: + (DFG): + Define the node. + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + Add operationTypeOf to support the non-trivial cases. + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + Actual codegen + * runtime/Operations.cpp: + (JSC::jsTypeStringForValue): + (JSC): + * runtime/Operations.h: + (JSC): + Some refactoring to allow us to get the type string for an + object without needing a callframe. + +2012-12-12 Filip Pizlo + + OSR exit compiler should emit code for resetting the execution counter that matches the logic of ExecutionCounter.cpp + https://bugs.webkit.org/show_bug.cgi?id=104791 + + Reviewed by Oliver Hunt. + + The OSR exit compiler wants to make it so that every OSR exit does the equivalent + of: + + codeBlock->m_jitExecuteCounter.setNewThreshold( + codeBlock->counterValueForOptimizeAfterLongWarmUp()); + + This logically involves: + + - Resetting the counter to zero. + - Setting m_activeThreshold to counterValueForOptimizeAfterLongWarmUp(). + - Figuring out the scaled threshold, subtracting the count so far (which is zero, + so this part is a no-op), and clipping (ExecuteCounter::clippedThreshold()). + - Setting m_counter to the negated clipped threshold. + - Setting m_totalCount to the previous count so far (which is zero) plus the + clipped threshold. + + Because of the reset, which sets the count-so-far to zero, this amounts to: + + - Setting m_activeThreshold to counterValueForOptimizeAfterLongWarmUp(). + - Figuring out the clipped scaled threshold. + - Setting m_counter to the negated clipped scaled threshold. + - Setting m_totalCount to the (positive) clipped scaled threshold. + + The code was previously not doing this, but now is. This is performance neutral. + The only change in behavior over what the code was previously doing (setting the + m_counter to the negated scaled threshold, without clipping, and then setting + the m_totalCount to the clipped scaled threshold) is that this will respond more + gracefully under memory pressure and will ensure that we get more value profile + LUBing before triggering recompilation. More LUBing is almost always a good + thing. + + * dfg/DFGOSRExitCompiler.cpp: + (JSC::DFG::OSRExitCompiler::handleExitCounts): + +2012-12-12 Ilya Tikhonovsky + + Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo. + https://bugs.webkit.org/show_bug.cgi?id=104796 + + Reviewed by Yury Semikhatsky. + + It was not a good idea to introduce a fake root MemoryObjectInfo. + It makes a problem when we visit an object without its own MemoryObjectType. + + Example: RenderBox has a global pointer to a hash map. + HashMap doesn't have its own object type because it is a generic container. + It will inherit object type from the fake root memory object info. + The same could happen for another container in another class with other MemoryObjectType. + + This fact forces me to create custom process method for root objects + because they need to have their own MemoryObjectInfo with customisable memory object type. + + Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using + for instrumented and not instrumented object classes. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-12-11 Gabor Ballabas + + Implement add64 for ARM traditional assembler after r136601 + https://bugs.webkit.org/show_bug.cgi?id=104103 + + Reviewed by Zoltan Herczeg. + + Implement add64 function for ARM traditional macroassembler. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::add64): + (MacroAssemblerARM): + +2012-12-11 Filip Pizlo + + Unreviewed. Fix build with DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::tallyFrequentExitSites): + +2012-12-11 Filip Pizlo + + Profiler should show bytecode dumps as they would have been visible to the JITs, including the profiling data that the JITs would see + https://bugs.webkit.org/show_bug.cgi?id=104647 + + Reviewed by Oliver Hunt. + + Adds more profiling data to bytecode dumps, and adds the ability to do a secondary + bytecode dump for each JIT compilation of a code block. This is relevant because both + the bytecodes, and the profiling data, may change after some number of executions. + + Also fixes some random dumping code to use PrintStream& rather than + static const char[thingy]. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/ArrayProfile.cpp: + (JSC::dumpArrayModes): + (JSC::ArrayProfile::briefDescription): + * bytecode/ArrayProfile.h: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printGetByIdOp): + (JSC::CodeBlock::printGetByIdCacheStatus): + (JSC::CodeBlock::printCallOp): + (JSC::CodeBlock::dumpValueProfiling): + (JSC::CodeBlock::dumpArrayProfiling): + (JSC::CodeBlock::dumpBytecode): + * bytecode/CodeBlock.h: + * bytecode/ValueProfile.h: + (JSC::ValueProfileBase::briefDescription): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::dump): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * profiler/ProfilerBytecodeSequence.cpp: Added. + (JSC::Profiler::BytecodeSequence::BytecodeSequence): + (JSC::Profiler::BytecodeSequence::~BytecodeSequence): + (JSC::Profiler::BytecodeSequence::indexForBytecodeIndex): + (JSC::Profiler::BytecodeSequence::forBytecodeIndex): + (JSC::Profiler::BytecodeSequence::addSequenceProperties): + * profiler/ProfilerBytecodeSequence.h: Added. + (JSC::Profiler::BytecodeSequence::size): + (JSC::Profiler::BytecodeSequence::at): + * profiler/ProfilerBytecodes.cpp: + (JSC::Profiler::Bytecodes::Bytecodes): + (JSC::Profiler::Bytecodes::toJS): + * profiler/ProfilerBytecodes.h: + (JSC::Profiler::Bytecodes::instructionCount): + * profiler/ProfilerCompilation.cpp: + (JSC::Profiler::Compilation::addProfiledBytecodes): + (JSC::Profiler::Compilation::toJS): + * profiler/ProfilerCompilation.h: + (JSC::Profiler::Compilation::profiledBytecodesSize): + (JSC::Profiler::Compilation::profiledBytecodesAt): + * profiler/ProfilerDatabase.cpp: + (JSC::Profiler::Database::ensureBytecodesFor): + * profiler/ProfilerDatabase.h: + * profiler/ProfilerProfiledBytecodes.cpp: Added. + (JSC::Profiler::ProfiledBytecodes::ProfiledBytecodes): + (JSC::Profiler::ProfiledBytecodes::~ProfiledBytecodes): + (JSC::Profiler::ProfiledBytecodes::toJS): + * profiler/ProfilerProfiledBytecodes.h: Added. + (JSC::Profiler::ProfiledBytecodes::bytecodes): + * runtime/CommonIdentifiers.h: + +2012-12-11 Oswald Buddenhagen + + [Qt] delete dead include paths + + Reviewed by Simon Hausmann. + + followup to https://bugs.webkit.org/show_bug.cgi?id=93446 + + * JavaScriptCore.pri: + +2012-12-11 Julien BRIANCEAU + + Implement add64 for SH4 assembler to fix build after r136601 + https://bugs.webkit.org/show_bug.cgi?id=104377 + + Reviewed by Zoltan Herczeg. + + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::add64): + (MacroAssemblerSH4): + +2012-12-10 Yury Semikhatsky + + Memory instrumentation: make sure each edge is reported only once + https://bugs.webkit.org/show_bug.cgi?id=104630 + + Reviewed by Pavel Feldman. + + Changed exported symbols for MemoryInstrumentation. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-12-10 Filip Pizlo + + Don't OSR exit just because a string is a rope + https://bugs.webkit.org/show_bug.cgi?id=104621 + + Reviewed by Michael Saboff. + + Slight SunSpider speed-up at around the 0.7% level. This patch does the obvious + thing of calling a slow path to resolve ropes rather than OSR exiting if the + string is a rope. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.h: + (JSC::DFG::ArrayMode::getIndexedPropertyStorageMayTriggerGC): + (ArrayMode): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::putStructureStoreElimination): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + +2012-12-10 Gustavo Noronha Silva + + Unreviewed distcheck fix. + + * GNUmakefile.list.am: + +2012-12-10 Filip Pizlo + + JSC profiling and debug dump code should use inferred names when possible + https://bugs.webkit.org/show_bug.cgi?id=104519 + + Reviewed by Oliver Hunt. + + This does as advertised: the profiler now knows the inferred name of all code blocks, + and all uses of CodeBlock::dump() dump it along with the hash. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::inferredName): + (JSC::CodeBlock::dumpAssumingJITType): + * bytecode/CodeBlock.h: + * profiler/ProfilerBytecodes.cpp: + (JSC::Profiler::Bytecodes::Bytecodes): + (JSC::Profiler::Bytecodes::toJS): + * profiler/ProfilerBytecodes.h: + (JSC::Profiler::Bytecodes::inferredName): + * profiler/ProfilerDatabase.cpp: + (JSC::Profiler::Database::addBytecodes): + (JSC::Profiler::Database::ensureBytecodesFor): + * profiler/ProfilerDatabase.h: + * runtime/CommonIdentifiers.h: + +2012-12-09 Filip Pizlo + + Profiler should say things about OSR exits + https://bugs.webkit.org/show_bug.cgi?id=104497 + + Reviewed by Oliver Hunt. + + This adds support for profiling OSR exits. For each exit that is taken, the profiler + records the machine code address that the exit occurred on, the exit kind, the origin + stack, and the number of times that it happened. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * assembler/AbstractMacroAssembler.h: + (Jump): + (JSC::AbstractMacroAssembler::Jump::label): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::saveCompilation): + (CodeBlock): + (JSC::CodeBlock::compilation): + (DFGData): + * bytecode/DFGExitProfile.h: + (DFG): + * bytecode/ExitKind.cpp: Added. + (JSC): + (JSC::exitKindToString): + (JSC::exitKindIsCountable): + (WTF): + (WTF::printInternal): + * bytecode/ExitKind.h: Added. + (JSC): + (WTF): + * dfg/DFGGraph.h: + (Graph): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::linkOSRExits): + (JSC::DFG::JITCompiler::link): + (JSC::DFG::JITCompiler::compile): + (JSC::DFG::JITCompiler::compileFunction): + * dfg/DFGJITCompiler.h: + (JITCompiler): + * dfg/DFGOSRExitCompiler.cpp: + * jit/JIT.cpp: + (JSC::JIT::JIT): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JIT): + * jit/JumpReplacementWatchpoint.h: + (JSC::JumpReplacementWatchpoint::sourceLabel): + (JumpReplacementWatchpoint): + * profiler/ProfilerCompilation.cpp: + (JSC::Profiler::Compilation::addOSRExitSite): + (Profiler): + (JSC::Profiler::Compilation::addOSRExit): + (JSC::Profiler::Compilation::toJS): + * profiler/ProfilerCompilation.h: + (Compilation): + * profiler/ProfilerDatabase.cpp: + (JSC::Profiler::Database::newCompilation): + * profiler/ProfilerDatabase.h: + (Database): + * profiler/ProfilerOSRExit.cpp: Added. + (Profiler): + (JSC::Profiler::OSRExit::OSRExit): + (JSC::Profiler::OSRExit::~OSRExit): + (JSC::Profiler::OSRExit::toJS): + * profiler/ProfilerOSRExit.h: Added. + (Profiler): + (OSRExit): + (JSC::Profiler::OSRExit::id): + (JSC::Profiler::OSRExit::origin): + (JSC::Profiler::OSRExit::exitKind): + (JSC::Profiler::OSRExit::isWatchpoint): + (JSC::Profiler::OSRExit::counterAddress): + (JSC::Profiler::OSRExit::count): + * profiler/ProfilerOSRExitSite.cpp: Added. + (Profiler): + (JSC::Profiler::OSRExitSite::toJS): + * profiler/ProfilerOSRExitSite.h: Added. + (Profiler): + (OSRExitSite): + (JSC::Profiler::OSRExitSite::OSRExitSite): + (JSC::Profiler::OSRExitSite::codeAddress): + * runtime/CommonIdentifiers.h: + +2012-12-10 Alexis Menard + + [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag. + https://bugs.webkit.org/show_bug.cgi?id=104539 + + Reviewed by Antonio Gomes. + + As discussed on webkit-dev it is not needed to keep this feature flag + as support for type is a small feature that is already + implemented by three other UAs. It was useful while landing this + feature as partial bits were landed one after one. + + * Configurations/FeatureDefines.xcconfig: + +2012-12-09 Filip Pizlo + + DFG ArrayPush/Pop should not pass their second child as the index for blessArrayOperation() + https://bugs.webkit.org/show_bug.cgi?id=104500 + + Reviewed by Oliver Hunt. + + Slight across-the-board speed-up. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + +2012-12-08 Filip Pizlo + + JSC should scale the optimization threshold for a code block according to the cost of compiling it + https://bugs.webkit.org/show_bug.cgi?id=104406 + + Reviewed by Oliver Hunt. + + We've long known that we want to scale the execution count threshold needed for the DFG + to kick in to scale according to some estimate of the cost of compiling that code block. + This institutes a relationship like this: + + threshold = thresholdSetting * (a * sqrt(instructionCount + b) + abs(c * instructionCount) + d + + Where a, b, c, d are coefficients derived from fitting the above expression to various + data points, which I chose based on looking at one benchmark (3d-cube) and from my + own intuitions. + + Making this work well also required changing the thresholdForOptimizeAfterLongWarmUp + from 5000 to 1000. + + This is a >1% speed-up on SunSpider, a >3% speed-up on V8Spider, ~1% speed-up on V8v7, + neutral on Octane, and neutral on Kraken. + + I also out-of-lined a bunch of methods related to these heuristics, because I couldn't + stand having them defined in the header anymore. I also made improvements to debugging + code because I needed it for tuning this change. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::sourceCodeForTools): + (JSC::CodeBlock::sourceCodeOnOneLine): + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::reoptimizationRetryCounter): + (JSC::CodeBlock::countReoptimization): + (JSC::CodeBlock::optimizationThresholdScalingFactor): + (JSC::clipThreshold): + (JSC::CodeBlock::counterValueForOptimizeAfterWarmUp): + (JSC::CodeBlock::counterValueForOptimizeAfterLongWarmUp): + (JSC::CodeBlock::counterValueForOptimizeSoon): + (JSC::CodeBlock::checkIfOptimizationThresholdReached): + (JSC::CodeBlock::optimizeNextInvocation): + (JSC::CodeBlock::dontOptimizeAnytimeSoon): + (JSC::CodeBlock::optimizeAfterWarmUp): + (JSC::CodeBlock::optimizeAfterLongWarmUp): + (JSC::CodeBlock::optimizeSoon): + (JSC::CodeBlock::adjustedExitCountThreshold): + (JSC::CodeBlock::exitCountThresholdForReoptimization): + (JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop): + (JSC::CodeBlock::shouldReoptimizeNow): + (JSC::CodeBlock::shouldReoptimizeFromLoopNow): + * bytecode/CodeBlock.h: + * bytecode/ExecutionCounter.cpp: + (JSC::ExecutionCounter::hasCrossedThreshold): + * bytecode/ReduceWhitespace.cpp: Added. + (JSC::reduceWhitespace): + * bytecode/ReduceWhitespace.h: Added. + * dfg/DFGCapabilities.cpp: + (JSC::DFG::mightCompileEval): + (JSC::DFG::mightCompileProgram): + (JSC::DFG::mightCompileFunctionForCall): + (JSC::DFG::mightCompileFunctionForConstruct): + (JSC::DFG::mightInlineFunctionForCall): + (JSC::DFG::mightInlineFunctionForConstruct): + * dfg/DFGCapabilities.h: + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dumpHeader): + * dfg/DFGOSREntry.cpp: + (JSC::DFG::prepareOSREntry): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dumpHeader): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::entryOSR): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * profiler/ProfilerDatabase.cpp: + (JSC::Profiler::Database::ensureBytecodesFor): + * runtime/Options.h: + +2012-12-07 Jonathan Liu + + Add missing forward declaration for JSC::ArrayAllocationProfile + https://bugs.webkit.org/show_bug.cgi?id=104425 + + Reviewed by Kentaro Hara. + + The header for the JSC::ArrayConstructor class is missing a forward + declaration for the JSC::ArrayAllocationProfile class which causes + compilation to fail when compiling with MinGW-w64. + + * runtime/ArrayConstructor.h: + (JSC): + +2012-12-07 Jonathan Liu + + Add missing const qualifier to JSC::CodeBlock::getJITType() + https://bugs.webkit.org/show_bug.cgi?id=104424 + + Reviewed by Laszlo Gombos. + + JSC::CodeBlock::getJITType() has the const qualifier when JIT is + enabled but is missing the const qualifier when JIT is disabled. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getJITType): + +2012-12-07 Oliver Hunt + + Make function code cache proportional to main codeblock cache + https://bugs.webkit.org/show_bug.cgi?id=104420 + + Reviewed by Geoffrey Garen. + + Makes the constants determining the recently used function cache proportional + to the number of root codeblocks in the cache. Also renames the constants to + make them more clear. + + * runtime/CodeCache.h: + +2012-12-06 Filip Pizlo + + Strange results calculating a square root in a loop + https://bugs.webkit.org/show_bug.cgi?id=104247 + + + Reviewed by Oliver Hunt. + + Fixed the CFG simplification phase to ignore dead GetLocals in the first of the blocks + under the merge. This fixes the assertion, and is also cleaner: our general rule is + to not "revive" things that we've already proved to be dead. + + Also fixed some rotted debug code. + + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + +2012-12-07 Geoffrey Garen + + Crash in JSC::Bindings::RootObject::globalObject() sync'ing notes in Evernote + https://bugs.webkit.org/show_bug.cgi?id=104321 + + + Reviewed by Sam Weinig. + + Work around a JSValueUnprotect(NULL) in Evernote. + + * API/JSValueRef.cpp: + (evernoteHackNeeded): + (JSValueUnprotect): + +2012-12-06 Filip Pizlo + + Incorrect inequality for checking whether a statement is within bounds of a handler + https://bugs.webkit.org/show_bug.cgi?id=104313 + + + Reviewed by Geoffrey Garen. + + The most relevant change is in handlerForBytecodeOffset(), which fixes the inequality + used for checking whether a handler is pertinent to the current instruction. '<' is + correct, but '<=' isn't, since the 'end' is not inclusive. + + Also found, and addressed, a benign goof in how the finally inliner works: sometimes + we will have end > start. This falls out naturally from how the inliner works and how + we pop scopes in the bytecompiler, but it's sufficiently surprising that, to avoid any + future confusion, I added a comment and some code to prune those handlers out. Because + of how the handler resolution works, these handlers would have been skipped anyway. + + Also made various fixes to debugging code, which was necessary for tracking this down. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::handlerForBytecodeOffset): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + * bytecompiler/Label.h: + (JSC::Label::bind): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + * llint/LLIntExceptions.cpp: + (JSC::LLInt::interpreterThrowInCaller): + (JSC::LLInt::returnToThrow): + (JSC::LLInt::callToThrow): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + (JSC::LLInt::handleHostCall): + +2012-12-06 Rick Byers + + CSS cursor property should support webkit-image-set + https://bugs.webkit.org/show_bug.cgi?id=99493 + + Reviewed by Beth Dakin. + + Add ENABLE_MOUSE_CURSOR_SCALE (disabled by default) + + * Configurations/FeatureDefines.xcconfig: + +2012-12-06 Laszlo Gombos + + [CMake] Consolidate list of files to build for JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=104287 + + Reviewed by Gyuyoung Kim. + + Add MemoryStatistics.cpp and ExecutableAllocator.cpp to the common + list of files and remove them from the port specific lists. + + * CMakeLists.txt: + * PlatformBlackBerry.cmake: + * PlatformEfl.cmake: + * PlatformWinCE.cmake: + +2012-12-06 Oliver Hunt + + Tell heap that we've released all the compiled code. + + Reviewed by Geoff Garen. + + When we discard compiled code, inform the heap that we've + released an entire object graph. This informs the heap that + it might want to perform a GC soon. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::discardAllCode): + +2012-12-06 Laszlo Gombos + + [EFL] Remove ENABLE_GLIB_SUPPORT CMake variable + https://bugs.webkit.org/show_bug.cgi?id=104278 + + Reviewed by Brent Fulgham. + + The conditional is not required as it is always set for EFL. + + * PlatformEfl.cmake: + +2012-12-06 Oliver Hunt + + Build fix, last patch rolled out logic that is now needed on ToT. + + * parser/ASTBuilder.h: + (ASTBuilder): + (JSC::ASTBuilder::setFunctionStart): + * parser/Nodes.h: + (JSC::FunctionBodyNode::setFunctionStart): + (JSC::FunctionBodyNode::functionStart): + (FunctionBodyNode): + * parser/Parser.cpp: + (JSC::::parseFunctionInfo): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::setFunctionStart): + +2012-12-05 Oliver Hunt + + Remove harmful string->function cache + https://bugs.webkit.org/show_bug.cgi?id=104193 + + Reviewed by Alexey Proskuryakov. + + Remove the string->function code cache that turned out to actually + be quite harmful. + + * runtime/CodeCache.cpp: + (JSC::CodeCache::getFunctionCodeBlock): + * runtime/CodeCache.h: + (JSC::CodeCache::clear): + +2012-12-05 Halton Huo + + [CMake] Unify coding style for CMake files + https://bugs.webkit.org/show_bug.cgi?id=103605 + + Reviewed by Laszlo Gombos. + + Update cmake files(.cmake, CMakeLists.txt) with following style rules: + 1. Indentation + 1.1 Use spaces, not tabs. + 1.2 Four spaces as indent. + 2. Spacing + 2.1 Place one space between control statements and their parentheses. + For eg, if (), else (), elseif (), endif (), foreach (), + endforeach (), while (), endwhile (), break (). + 2.2 Do not place spaces between function and macro statements and + their parentheses. For eg, macro(), endmacro(), function(), + endfunction(). + 2.3 Do not place spaces between a command or function or macro and its + parentheses, or between a parenthesis and its content. For eg, + message("testing") not message( "testing") or message ("testing" ) + 2.4 No space at line ending. + 3. Lowercase when call commands macros and functions. For eg, + add_executable() not ADD_EXECUTABLE(), set() not SET(). + + * CMakeLists.txt: + * PlatformBlackBerry.cmake: + * PlatformEfl.cmake: + * PlatformWinCE.cmake: + * shell/CMakeLists.txt: + * shell/PlatformBlackBerry.cmake: + * shell/PlatformEfl.cmake: + * shell/PlatformWinCE.cmake: + +2012-12-05 Oliver Hunt + + Empty parse cache when receiving a low memory warning + https://bugs.webkit.org/show_bug.cgi?id=104161 + + Reviewed by Filip Pizlo. + + This adds a function to the globaldata to empty all code related data + structures (code in the heap and the code cache). + It also adds a function to allow the CodeCache to actually be cleared + at all. + + * runtime/CodeCache.h: + (CacheMap): + (JSC::CacheMap::clear): + (JSC::CodeCache::clear): + (CodeCache): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::discardAllCode): + (JSC): + * runtime/JSGlobalData.h: + (JSGlobalData): + +2012-12-05 Filip Pizlo + + JSC profiler should not count executions of op_call_put_result because doing so changes DFG codegen + https://bugs.webkit.org/show_bug.cgi?id=104102 + + Reviewed by Oliver Hunt. + + This removes op_call_put_result from profiling, since profiling it has an effect on + codegen. This fix enables all of SunSpider, V8, and Kraken to be profiled with the + new profiler. + + To make this all fit together, the profiler now also reports in its output the exact + bytecode opcode name for each instruction (in addition to the stringified dump of that + bytecode), so that tools that grok the output can take note of op_call_put_result and + work around the fact that it has no counts. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * profiler/ProfilerBytecode.cpp: + (JSC::Profiler::Bytecode::toJS): + * profiler/ProfilerBytecode.h: + (JSC::Profiler::Bytecode::Bytecode): + (JSC::Profiler::Bytecode::opcodeID): + (Bytecode): + * profiler/ProfilerDatabase.cpp: + (JSC::Profiler::Database::ensureBytecodesFor): + * runtime/CommonIdentifiers.h: + +2012-12-04 Filip Pizlo + + display-profiler-output should be able to show source code + https://bugs.webkit.org/show_bug.cgi?id=104073 + + Reviewed by Oliver Hunt. + + Modify the profiler database to store source code. For functions, we store the + function including the function signature. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::unlinkedCodeBlock): + (CodeBlock): + * profiler/ProfilerBytecodes.cpp: + (JSC::Profiler::Bytecodes::Bytecodes): + (JSC::Profiler::Bytecodes::toJS): + * profiler/ProfilerBytecodes.h: + (Bytecodes): + (JSC::Profiler::Bytecodes::sourceCode): + * profiler/ProfilerDatabase.cpp: + (JSC::Profiler::Database::addBytecodes): + (JSC::Profiler::Database::ensureBytecodesFor): + * profiler/ProfilerDatabase.h: + (Database): + * runtime/CommonIdentifiers.h: + * runtime/Executable.h: + (FunctionExecutable): + (JSC::FunctionExecutable::unlinkedExecutable): + +2012-12-02 Filip Pizlo + + JSC should be able to report profiling data associated with the IR dumps and disassembly + https://bugs.webkit.org/show_bug.cgi?id=102999 + + Reviewed by Gavin Barraclough. + + Added a new profiler to JSC. It's simply called "Profiler" in anticipation of it + ultimately replacing the previous profiling infrastructure. This profiler counts the + number of times that a bytecode executes in various engines, and will record both the + counts and all disassembly and bytecode dumps, into a database that can be at any + time turned into either a JS object using any global object or global data of your + choice, or can be turned into a JSON string, or saved to a file. + + Currently the only use of this is the new '-p ' flag to the jsc command-line. + + The profiler is always compiled in and normally incurs no execution time cost, but is + only activated when you create a Profiler::Database and install it in + JSGlobalData::m_perBytecodeProfiler. From that point on, all code blocks will be + compiled along with disassembly and bytecode dumps stored into the Profiler::Database, + and all code blocks will have execution counts, which are also stored in the database. + The database will continue to keep information about code blocks alive even after they + are otherwise GC'd. + + This currently still has some glitches, like the fact that it only counts executions + in the JITs. Doing execution counting in the LLInt might require a bit of a rethink + about how the counting is expressed - currently it is implicit in bytecode, so there + is no easy way to "turn it on" in the LLInt. Also, right now there is no information + recorded about OSR exits or out-of-line stubs. But, even so, it's quite cool, and + gives you a peek into what JSC is doing that would otherwise not be possible. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + * bytecode/CodeBlock.h: + (CodeBlock): + (JSC::CodeBlock::baselineVersion): + * bytecode/CodeOrigin.cpp: + (JSC::InlineCallFrame::baselineCodeBlock): + (JSC): + * bytecode/CodeOrigin.h: + (InlineCallFrame): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dump): + (DFG): + (JSC::DFG::Disassembler::reportToProfiler): + (JSC::DFG::Disassembler::dumpHeader): + (JSC::DFG::Disassembler::append): + (JSC::DFG::Disassembler::createDumpList): + * dfg/DFGDisassembler.h: + (Disassembler): + (JSC::DFG::Disassembler::DumpedOp::DumpedOp): + (DumpedOp): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::Graph): + (JSC::DFG::Graph::dumpCodeOrigin): + (JSC::DFG::Graph::dump): + * dfg/DFGGraph.h: + (Graph): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::JITCompiler): + (JSC::DFG::JITCompiler::compile): + (JSC::DFG::JITCompiler::compileFunction): + * dfg/DFGNode.h: + (Node): + (JSC::DFG::Node::hasExecutionCounter): + (JSC::DFG::Node::executionCounter): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JIT.cpp: + (JSC::JIT::JIT): + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JIT): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dump): + (JSC::JITDisassembler::reportToProfiler): + (JSC): + (JSC::JITDisassembler::dumpHeader): + (JSC::JITDisassembler::firstSlowLabel): + (JSC::JITDisassembler::dumpVectorForInstructions): + (JSC::JITDisassembler::dumpForInstructions): + (JSC::JITDisassembler::reportInstructions): + * jit/JITDisassembler.h: + (JITDisassembler): + (DumpedOp): + * jsc.cpp: + (CommandLine::CommandLine): + (CommandLine): + (printUsageStatement): + (CommandLine::parseArguments): + (jscmain): + * profiler/ProfilerBytecode.cpp: Added. + (Profiler): + (JSC::Profiler::Bytecode::toJS): + * profiler/ProfilerBytecode.h: Added. + (Profiler): + (Bytecode): + (JSC::Profiler::Bytecode::Bytecode): + (JSC::Profiler::Bytecode::bytecodeIndex): + (JSC::Profiler::Bytecode::description): + (JSC::Profiler::getBytecodeIndexForBytecode): + * profiler/ProfilerBytecodes.cpp: Added. + (Profiler): + (JSC::Profiler::Bytecodes::Bytecodes): + (JSC::Profiler::Bytecodes::~Bytecodes): + (JSC::Profiler::Bytecodes::indexForBytecodeIndex): + (JSC::Profiler::Bytecodes::forBytecodeIndex): + (JSC::Profiler::Bytecodes::dump): + (JSC::Profiler::Bytecodes::toJS): + * profiler/ProfilerBytecodes.h: Added. + (Profiler): + (Bytecodes): + (JSC::Profiler::Bytecodes::append): + (JSC::Profiler::Bytecodes::id): + (JSC::Profiler::Bytecodes::hash): + (JSC::Profiler::Bytecodes::size): + (JSC::Profiler::Bytecodes::at): + * profiler/ProfilerCompilation.cpp: Added. + (Profiler): + (JSC::Profiler::Compilation::Compilation): + (JSC::Profiler::Compilation::~Compilation): + (JSC::Profiler::Compilation::addDescription): + (JSC::Profiler::Compilation::executionCounterFor): + (JSC::Profiler::Compilation::toJS): + * profiler/ProfilerCompilation.h: Added. + (Profiler): + (Compilation): + (JSC::Profiler::Compilation::bytecodes): + (JSC::Profiler::Compilation::kind): + * profiler/ProfilerCompilationKind.cpp: Added. + (WTF): + (WTF::printInternal): + * profiler/ProfilerCompilationKind.h: Added. + (Profiler): + (WTF): + * profiler/ProfilerCompiledBytecode.cpp: Added. + (Profiler): + (JSC::Profiler::CompiledBytecode::CompiledBytecode): + (JSC::Profiler::CompiledBytecode::~CompiledBytecode): + (JSC::Profiler::CompiledBytecode::toJS): + * profiler/ProfilerCompiledBytecode.h: Added. + (Profiler): + (CompiledBytecode): + (JSC::Profiler::CompiledBytecode::originStack): + (JSC::Profiler::CompiledBytecode::description): + * profiler/ProfilerDatabase.cpp: Added. + (Profiler): + (JSC::Profiler::Database::Database): + (JSC::Profiler::Database::~Database): + (JSC::Profiler::Database::addBytecodes): + (JSC::Profiler::Database::ensureBytecodesFor): + (JSC::Profiler::Database::notifyDestruction): + (JSC::Profiler::Database::newCompilation): + (JSC::Profiler::Database::toJS): + (JSC::Profiler::Database::toJSON): + (JSC::Profiler::Database::save): + * profiler/ProfilerDatabase.h: Added. + (Profiler): + (Database): + * profiler/ProfilerExecutionCounter.h: Added. + (Profiler): + (ExecutionCounter): + (JSC::Profiler::ExecutionCounter::ExecutionCounter): + (JSC::Profiler::ExecutionCounter::address): + (JSC::Profiler::ExecutionCounter::count): + * profiler/ProfilerOrigin.cpp: Added. + (Profiler): + (JSC::Profiler::Origin::Origin): + (JSC::Profiler::Origin::dump): + (JSC::Profiler::Origin::toJS): + * profiler/ProfilerOrigin.h: Added. + (JSC): + (Profiler): + (Origin): + (JSC::Profiler::Origin::Origin): + (JSC::Profiler::Origin::operator!): + (JSC::Profiler::Origin::bytecodes): + (JSC::Profiler::Origin::bytecodeIndex): + (JSC::Profiler::Origin::operator!=): + (JSC::Profiler::Origin::operator==): + (JSC::Profiler::Origin::hash): + (JSC::Profiler::Origin::isHashTableDeletedValue): + (JSC::Profiler::OriginHash::hash): + (JSC::Profiler::OriginHash::equal): + (OriginHash): + (WTF): + * profiler/ProfilerOriginStack.cpp: Added. + (Profiler): + (JSC::Profiler::OriginStack::OriginStack): + (JSC::Profiler::OriginStack::~OriginStack): + (JSC::Profiler::OriginStack::append): + (JSC::Profiler::OriginStack::operator==): + (JSC::Profiler::OriginStack::hash): + (JSC::Profiler::OriginStack::dump): + (JSC::Profiler::OriginStack::toJS): + * profiler/ProfilerOriginStack.h: Added. + (JSC): + (Profiler): + (OriginStack): + (JSC::Profiler::OriginStack::OriginStack): + (JSC::Profiler::OriginStack::operator!): + (JSC::Profiler::OriginStack::size): + (JSC::Profiler::OriginStack::fromBottom): + (JSC::Profiler::OriginStack::fromTop): + (JSC::Profiler::OriginStack::isHashTableDeletedValue): + (JSC::Profiler::OriginStackHash::hash): + (JSC::Profiler::OriginStackHash::equal): + (OriginStackHash): + (WTF): + * runtime/CommonIdentifiers.h: + * runtime/ExecutionHarness.h: + (JSC::prepareForExecution): + (JSC::prepareFunctionForExecution): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::~JSGlobalData): + * runtime/JSGlobalData.h: + (JSGlobalData): + * runtime/Options.h: + (JSC): + +2012-12-04 Filip Pizlo + + Rename Profiler to LegacyProfiler + https://bugs.webkit.org/show_bug.cgi?id=104031 + + Rubber stamped by Mark Hahnenberg + + Make room in the namespace for https://bugs.webkit.org/show_bug.cgi?id=102999. + + * API/JSProfilerPrivate.cpp: + (JSStartProfiling): + (JSEndProfiling): + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + * jit/JIT.h: + * jit/JITCode.h: + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * profiler/LegacyProfiler.cpp: Added. + (JSC): + (JSC::LegacyProfiler::profiler): + (JSC::LegacyProfiler::startProfiling): + (JSC::LegacyProfiler::stopProfiling): + (JSC::dispatchFunctionToProfiles): + (JSC::LegacyProfiler::willExecute): + (JSC::LegacyProfiler::didExecute): + (JSC::LegacyProfiler::exceptionUnwind): + (JSC::LegacyProfiler::createCallIdentifier): + (JSC::createCallIdentifierFromFunctionImp): + * profiler/LegacyProfiler.h: Added. + (JSC): + (LegacyProfiler): + (JSC::LegacyProfiler::currentProfiles): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + * profiler/ProfileNode.cpp: + * profiler/Profiler.cpp: Removed. + * profiler/Profiler.h: Removed. + * runtime/JSGlobalData.h: + (JSC): + (JSC::JSGlobalData::enabledProfiler): + (JSGlobalData): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + +2012-12-03 Filip Pizlo + + DFG should inline code blocks that use scoped variable access + https://bugs.webkit.org/show_bug.cgi?id=103974 + + Reviewed by Oliver Hunt. + + This mostly just turns on something we could have done all along, but also adds a few key + necessities to make this right: + + 1) Constant folding of SkipScope, since if we inline with a known JSFunction* then the + scope is constant. + + 2) Interference analysis for GetLocal<->PutScopedVar and SetLocal<->GetScopedVar. + + This is not meant to be a speed-up on major benchmarks since we don't yet inline most + closure calls for entirely unrelated reasons. But on toy programs it can be >2x faster. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getScope): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::scopedVarLoadElimination): + (JSC::DFG::CSEPhase::scopedVarStoreElimination): + (JSC::DFG::CSEPhase::getLocalLoadElimination): + (JSC::DFG::CSEPhase::setLocalStoreElimination): + * dfg/DFGCapabilities.h: + (JSC::DFG::canInlineResolveOperations): + +2012-12-03 Filip Pizlo + + Replace JSValue::description() with JSValue::dump(PrintStream&) + https://bugs.webkit.org/show_bug.cgi?id=103866 + + Reviewed by Darin Adler. + + JSValue now has a dump() method. Anywhere that you would have wanted to use + description(), you can either do toCString(value).data(), or if the callee + is a print()/dataLog() method then you just pass the value directly. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * bytecode/CodeBlock.cpp: + (JSC::valueToSourceString): + (JSC::CodeBlock::finalizeUnconditionally): + * bytecode/ValueProfile.h: + (JSC::ValueProfileBase::dump): + * bytecode/ValueRecovery.h: + (JSC::ValueRecovery::dump): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::dump): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + * jsc.cpp: + (functionDescribe): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::llint_trace_value): + * runtime/JSValue.cpp: + (JSC::JSValue::dump): + * runtime/JSValue.h: + +2012-12-04 Filip Pizlo + + jsc command line tool's support for typed arrays should be robust against array buffer allocation errors + https://bugs.webkit.org/show_bug.cgi?id=104020 + + + Reviewed by Mark Hahnenberg. + + Check for null buffers, since that's what typed array allocators are supposed to do. WebCore does it, + and that is indeed the contract of ArrayBuffer and TypedArrayBase. + + * JSCTypedArrayStubs.h: + (JSC): + +2012-12-03 Peter Rybin + + Web Inspector: make ASSERTION FAILED: foundPropertiesCount == object->size() more useful + https://bugs.webkit.org/show_bug.cgi?id=103254 + + Reviewed by Pavel Feldman. + + Missing symbol WTFReportFatalError is added to the linker list. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-12-03 Alexis Menard + + [Mac] Enable CSS3 background-position offset by default. + https://bugs.webkit.org/show_bug.cgi?id=103905 + + Reviewed by Simon Fraser. + + Turn the flag on by default. + + * Configurations/FeatureDefines.xcconfig: + +2012-12-02 Filip Pizlo + + DFG should trigger rage conversion from double to contiguous if it sees a GetByVal on Double being used in an integer context + https://bugs.webkit.org/show_bug.cgi?id=103858 + + Reviewed by Gavin Barraclough. + + A rage conversion from double to contiguous is one where you try to convert each + double to an int32. + + This is probably not the last we'll hear of rage conversion from double to contiguous. + It may be better to do this right during parsing, which will result in fewer cases of + Arrayification. But even so, this looks like a straight win already - 1% speed-up on + Kraken, no major regression anywhere else. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::refine): + (JSC::DFG::arrayConversionToString): + (JSC::DFG::ArrayMode::dump): + (WTF): + (WTF::printInternal): + * dfg/DFGArrayMode.h: + (JSC::DFG::ArrayMode::withConversion): + (ArrayMode): + (JSC::DFG::ArrayMode::doesConversion): + (WTF): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupBlock): + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + (FixupPhase): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::arrayify): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * runtime/JSObject.cpp: + (JSC): + (JSC::JSObject::genericConvertDoubleToContiguous): + (JSC::JSObject::convertDoubleToContiguous): + (JSC::JSObject::rageConvertDoubleToContiguous): + (JSC::JSObject::ensureContiguousSlow): + (JSC::JSObject::rageEnsureContiguousSlow): + * runtime/JSObject.h: + (JSObject): + (JSC::JSObject::rageEnsureContiguous): + +2012-12-02 Filip Pizlo + + DFG CSE should not keep alive things that aren't relevant to OSR + https://bugs.webkit.org/show_bug.cgi?id=103849 + + Reviewed by Oliver Hunt. + + Most Phantom nodes are inserted by CSE, and by default have the same children as the + node that CSE had eliminated. This change makes CSE inspect all Phantom nodes (both + those it creates and those that were created by other phases) to see if they have + children that are redundant - i.e. children that are not interesting to OSR, which + is the only reason why Phantoms exist in the first place. Being relevant to OSR is + defined as one of: (1) you're a Phi, (2) you're a SetLocal, (3) somewhere between + your definition and the Phantom there was a SetLocal that referred to you. + + This is a slight speed-up in a few places. + + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::CSEPhase): + (JSC::DFG::CSEPhase::run): + (JSC::DFG::CSEPhase::performSubstitution): + (CSEPhase): + (JSC::DFG::CSEPhase::eliminateIrrelevantPhantomChildren): + (JSC::DFG::CSEPhase::setReplacement): + (JSC::DFG::CSEPhase::eliminate): + (JSC::DFG::CSEPhase::performNodeCSE): + (JSC::DFG::CSEPhase::performBlockCSE): + +2012-12-02 Filip Pizlo + + It should be possible to build and run with DFG_ENABLE(PROPAGATION_VERBOSE) + https://bugs.webkit.org/show_bug.cgi?id=103848 + + Reviewed by Sam Weinig. + + Fix random dataLog() and print() statements. + + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dumpBlockHeader): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + +2012-12-01 Filip Pizlo + + CodeBlock should be able to dump bytecode to something other than WTF::dataFile() + https://bugs.webkit.org/show_bug.cgi?id=103832 + + Reviewed by Oliver Hunt. + + Add a PrintStream& argument to all of the CodeBlock bytecode dumping methods. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecodeCommentAndNewLine): + (JSC::CodeBlock::printUnaryOp): + (JSC::CodeBlock::printBinaryOp): + (JSC::CodeBlock::printConditionalJump): + (JSC::CodeBlock::printGetByIdOp): + (JSC::dumpStructure): + (JSC::dumpChain): + (JSC::CodeBlock::printGetByIdCacheStatus): + (JSC::CodeBlock::printCallOp): + (JSC::CodeBlock::printPutByIdOp): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::dumpBytecode): + * bytecode/CodeBlock.h: + (CodeBlock): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dumpForInstructions): + +2012-11-30 Pierre Rossi + + [Qt] Unreviewed speculative Mac build fix after r136232 + + Update the include path so that LLIntAssembly.h is picked up. + The bot didn't break until later when a clean build was triggered. + + * JavaScriptCore.pri: + +2012-11-30 Oliver Hunt + + Optimise more cases of op_typeof + https://bugs.webkit.org/show_bug.cgi?id=103783 + + Reviewed by Mark Hahnenberg. + + Increase our coverage of typeof based typechecks by + making sure that the codegenerators always uses + consistent operand ordering when feeding typeof operations + into equality operations. + + * bytecompiler/NodesCodegen.cpp: + (JSC::BinaryOpNode::emitBytecode): + (JSC::EqualNode::emitBytecode): + (JSC::StrictEqualNode::emitBytecode): + +2012-11-30 Filip Pizlo + + Rationalize and clean up DFG handling of scoped accesses + https://bugs.webkit.org/show_bug.cgi?id=103715 + + Reviewed by Oliver Hunt. + + Previously, we had a GetScope node that specified the depth to which you wanted + to travel to get a JSScope, and the backend implementation of the node would + perform all of the necessary footwork, including potentially skipping the top + scope if necessary, and doing however many loads were needed. But there were + strange things. First, if you had accesses at different scope depths, then the + loads to get to the common depth could not be CSE'd - CSE would match only + GetScope's that had identical depth. Second, GetScope would be emitted even if + we already had the scope, for example in put_to_base. And finally, even though + the ResolveOperations could tell us whether or not we had to skip the top scope, + the backend would recompute this information itself, often pessimistically. + + This eliminates GetScope and replaces it with the following: + + GetMyScope: just get the JSScope from the call frame header. This will forever + mean getting the JSScope associated with the machine call frame; it will not + mean getting the scope of an inlined function. Or at least that's the intent. + + SkipTopScope: check if there is an activation, and if so, skip a scope. This + takes a scope as a child and returns a scope. + + SkipScope: skip one scope level. + + The bytecode parser now emits the right combination of the above, and + potentially emits multiple SkipScope's, based on the ResolveOperations. + + This change also includes some fixups to debug logging. We now always print + the ExecutableBase* in addition to the CodeBlock* in the CodeBlock's dump, + and we are now more verbose when dumping CodeOrigins and InlineCallFrames. + + This is performance-neutral. It's just meant to be a clean-up. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpAssumingJITType): + * bytecode/CodeOrigin.cpp: + (JSC::CodeOrigin::inlineStack): + (JSC::CodeOrigin::dump): + (JSC): + (JSC::InlineCallFrame::dump): + * bytecode/CodeOrigin.h: + (CodeOrigin): + (InlineCallFrame): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::getScope): + (DFG): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::scopedVarLoadElimination): + (JSC::DFG::CSEPhase::scopedVarStoreElimination): + (JSC::DFG::CSEPhase::getMyScopeLoadElimination): + (JSC::DFG::CSEPhase::setLocalStoreElimination): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dump): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dumpCodeOrigin): + (JSC::DFG::Graph::dumpBlockHeader): + * dfg/DFGNode.h: + (Node): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dump): + +2012-11-30 Oliver Hunt + + Add direct string->function code cache + https://bugs.webkit.org/show_bug.cgi?id=103764 + + Reviewed by Michael Saboff. + + A fairly logically simple patch. We now track the start of the + unique portion of a functions body, and use that as our key for + unlinked function code. This allows us to cache identical code + in different contexts, leading to a small but consistent improvement + on the benchmarks we track. + + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): + * bytecode/UnlinkedCodeBlock.h: + (JSC::UnlinkedFunctionExecutable::functionStartOffset): + (UnlinkedFunctionExecutable): + * parser/ASTBuilder.h: + (ASTBuilder): + (JSC::ASTBuilder::setFunctionStart): + * parser/Nodes.cpp: + * parser/Nodes.h: + (JSC::FunctionBodyNode::setFunctionStart): + (JSC::FunctionBodyNode::functionStart): + (FunctionBodyNode): + * parser/Parser.cpp: + (JSC::::parseFunctionInfo): + * parser/Parser.h: + (JSC::Parser::findCachedFunctionInfo): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::setFunctionStart): + * runtime/CodeCache.cpp: + (JSC::CodeCache::generateFunctionCodeBlock): + (JSC::CodeCache::getFunctionCodeBlock): + (JSC::CodeCache::usedFunctionCode): + * runtime/CodeCache.h: + +2012-11-30 Allan Sandfeld Jensen + + Crash in conversion of empty OpaqueJSString to Identifier + https://bugs.webkit.org/show_bug.cgi?id=101867 + + Reviewed by Michael Saboff. + + The constructor call used for both null and empty OpaqueJSStrings results + in an assertion voilation and crash. This patch instead uses the Identifier + constructors which are specifically for null and empty Identifier. + + * API/OpaqueJSString.cpp: + (OpaqueJSString::identifier): + +2012-11-30 Tor Arne Vestbø + + [Qt] Place the LLIntOffsetsExtractor binaries in debug/release subdirs on Mac + + Otherwise we'll end up using the same LLIntAssembly.h for both build + configs of JavaScriptCore -- one of them which will be for the wrong + config. + + Reviewed by Simon Hausmann. + + * LLIntOffsetsExtractor.pro: + +2012-11-30 Julien BRIANCEAU + + [sh4] Fix compilation warnings in JavaScriptCore JIT for sh4 arch + https://bugs.webkit.org/show_bug.cgi?id=103378 + + Reviewed by Filip Pizlo. + + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::branchTest32): + (JSC::MacroAssemblerSH4::branchAdd32): + (JSC::MacroAssemblerSH4::branchMul32): + (JSC::MacroAssemblerSH4::branchSub32): + (JSC::MacroAssemblerSH4::branchOr32): + +2012-11-29 Rafael Weinstein + + [HTMLTemplateElement] Add feature flag + https://bugs.webkit.org/show_bug.cgi?id=103694 + + Reviewed by Adam Barth. + + This flag will guard the implementation of the HTMLTemplateElement. + http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html + + * Configurations/FeatureDefines.xcconfig: + +2012-11-29 Filip Pizlo + + It should be easy to find code blocks in debug dumps + https://bugs.webkit.org/show_bug.cgi?id=103623 + + Reviewed by Goeffrey Garen. + + This gives CodeBlock a relatively strong, but also relatively compact, hash. We compute + it lazily so that it only impacts run-time when debug support is enabled. We stringify + it smartly so that it's short and easy to type. We base it on the source code so that + the optimization level is irrelevant. And, we use SHA1 since it's already in our code + base. Now, when a piece of code wants to print some debugging to say that it's operating + on some code block, it can use this CodeBlockHash instead of memory addresses. + + This also takes CodeBlock debugging into the new world of print() and dataLog(). In + particular, CodeBlock::dump() corresponds to the thing you want printed if you do: + + dataLog("I heart ", *myCodeBlock); + + Probably, you want to just print some identifying information at this point rather than + the full bytecode dump. So, the existing CodeBlock::dump() has been renamed to + CodeBlock::dumpBytecode(), and CodeBlock::dump() now prints the CodeBlockHash plus just + a few little tidbits. + + Here's an example of CodeBlock::dump() output: + + EkILzr:[0x103883a00, BaselineFunctionCall] + + EkILzr is the CodeBlockHash. 0x103883a00 is the CodeBlock's address in memory. The other + part is self-explanatory. + + Finally, this new notion of CodeBlockHash is available for other purposes like bisecting + breakage. As such CodeBlockHash has all of the comparison operator overloads. When + bisecting in DFGDriver.cpp, you can now say things like: + + if (codeBlock->hash() < CodeBlockHash("CAAAAA")) + return false; + + And yes, CAAAAA is near the median hash, and the largest one is smaller than E99999. Such + is life when you use base 62 to encode a 32-bit number. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CallLinkInfo.h: + (CallLinkInfo): + (JSC::CallLinkInfo::specializationKind): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::hash): + (JSC): + (JSC::CodeBlock::dumpAssumingJITType): + (JSC::CodeBlock::dump): + (JSC::CodeBlock::dumpBytecode): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::resetStubInternal): + (JSC::CodeBlock::reoptimize): + (JSC::ProgramCodeBlock::jettison): + (JSC::EvalCodeBlock::jettison): + (JSC::FunctionCodeBlock::jettison): + (JSC::CodeBlock::shouldOptimizeNow): + (JSC::CodeBlock::tallyFrequentExitSites): + (JSC::CodeBlock::dumpValueProfiles): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::specializationKind): + (CodeBlock): + (JSC::CodeBlock::getJITType): + * bytecode/CodeBlockHash.cpp: Added. + (JSC): + (JSC::CodeBlockHash::CodeBlockHash): + (JSC::CodeBlockHash::dump): + * bytecode/CodeBlockHash.h: Added. + (JSC): + (CodeBlockHash): + (JSC::CodeBlockHash::CodeBlockHash): + (JSC::CodeBlockHash::hash): + (JSC::CodeBlockHash::operator==): + (JSC::CodeBlockHash::operator!=): + (JSC::CodeBlockHash::operator<): + (JSC::CodeBlockHash::operator>): + (JSC::CodeBlockHash::operator<=): + (JSC::CodeBlockHash::operator>=): + * bytecode/CodeBlockWithJITType.h: Added. + (JSC): + (CodeBlockWithJITType): + (JSC::CodeBlockWithJITType::CodeBlockWithJITType): + (JSC::CodeBlockWithJITType::dump): + * bytecode/CodeOrigin.cpp: Added. + (JSC): + (JSC::CodeOrigin::inlineDepthForCallFrame): + (JSC::CodeOrigin::inlineDepth): + (JSC::CodeOrigin::inlineStack): + (JSC::InlineCallFrame::hash): + * bytecode/CodeOrigin.h: + (InlineCallFrame): + (JSC::InlineCallFrame::specializationKind): + (JSC): + * bytecode/CodeType.cpp: Added. + (WTF): + (WTF::printInternal): + * bytecode/CodeType.h: + (WTF): + * bytecode/ExecutionCounter.cpp: + (JSC::ExecutionCounter::dump): + * bytecode/ExecutionCounter.h: + (ExecutionCounter): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dump): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dumpCodeOrigin): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOperations.cpp: + * dfg/DFGRepatch.cpp: + (JSC::DFG::generateProtoChainAccessStub): + (JSC::DFG::tryCacheGetByID): + (JSC::DFG::tryBuildGetByIDList): + (JSC::DFG::emitPutReplaceStub): + (JSC::DFG::emitPutTransitionStub): + (JSC::DFG::dfgLinkClosureCall): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpCallFrame): + * jit/JITCode.cpp: Added. + (WTF): + (WTF::printInternal): + * jit/JITCode.h: + (JSC::JITCode::jitType): + (WTF): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dump): + (JSC::JITDisassembler::dumpForInstructions): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::privateCompileGetByVal): + (JSC::JIT::privateCompilePutByVal): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/CodeSpecializationKind.cpp: Added. + (WTF): + (WTF::printInternal): + * runtime/CodeSpecializationKind.h: + (JSC::specializationFromIsCall): + (JSC): + (JSC::specializationFromIsConstruct): + (WTF): + * runtime/Executable.cpp: + (JSC::ExecutableBase::hashFor): + (JSC): + (JSC::NativeExecutable::hashFor): + (JSC::ScriptExecutable::hashFor): + * runtime/Executable.h: + (ExecutableBase): + (NativeExecutable): + (ScriptExecutable): + (JSC::ScriptExecutable::source): + +2012-11-29 Michael Saboff + + Speculative Windows build fix after r136086. + + Unreviewed build fix. + + Suspect that ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z needs to be removed from Windows + export list since the symbol was removed in r136086. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-11-28 Filip Pizlo + + SpeculatedType dumping should not use the static char buffer[thingy] idiom + https://bugs.webkit.org/show_bug.cgi?id=103584 + + Reviewed by Michael Saboff. + + Changed SpeculatedType to be "dumpable" by saying things like: + + dataLog("thingy = ", SpeculationDump(thingy)) + + Removed the old stringification functions, and changed all code that referred to them + to use the new dataLog()/print() style. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/SpeculatedType.cpp: + (JSC::dumpSpeculation): + (JSC::speculationToAbbreviatedString): + (JSC::dumpSpeculationAbbreviated): + * bytecode/SpeculatedType.h: + * bytecode/ValueProfile.h: + (JSC::ValueProfileBase::dump): + * bytecode/VirtualRegister.h: + (WTF::printInternal): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::dump): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation): + (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + (JSC::DFG::Graph::predictArgumentTypes): + * dfg/DFGGraph.h: + (Graph): + * dfg/DFGStructureAbstractValue.h: + * dfg/DFGVariableAccessDataDump.cpp: Added. + (JSC::DFG::VariableAccessDataDump::VariableAccessDataDump): + (JSC::DFG::VariableAccessDataDump::dump): + * dfg/DFGVariableAccessDataDump.h: Added. + (VariableAccessDataDump): + +2012-11-28 Michael Saboff + + Change Bytecompiler s_dumpsGeneratedCode to an Options value + https://bugs.webkit.org/show_bug.cgi?id=103588 + + Reviewed by Filip Pizlo. + + Moved the control of dumping bytecodes to Options::dumpGeneratedBytecodes. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecompiler/BytecodeGenerator.cpp: + * bytecompiler/BytecodeGenerator.h: + * jsc.cpp: + (runWithScripts): + * runtime/Options.h: + +2012-11-28 Mark Hahnenberg + + Copying phase should use work lists + https://bugs.webkit.org/show_bug.cgi?id=101390 + + Reviewed by Filip Pizlo. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::BlockAllocator): + * heap/BlockAllocator.h: New RegionSet for CopyWorkListSegments. + (BlockAllocator): + (JSC::CopyWorkListSegment): + * heap/CopiedBlock.h: Added a per-block CopyWorkList to keep track of the JSCells that need to be revisited during the copying + phase to copy their backing stores. + (CopiedBlock): + (JSC::CopiedBlock::CopiedBlock): + (JSC::CopiedBlock::didSurviveGC): + (JSC::CopiedBlock::didEvacuateBytes): There is now a one-to-one relationship between GCThreads and the CopiedBlocks they're + responsible for evacuating, we no longer need any of that fancy compare and swap stuff. + (JSC::CopiedBlock::pin): + (JSC::CopiedBlock::hasWorkList): + (JSC::CopiedBlock::workList): + * heap/CopiedBlockInlines.h: Added. + (JSC::CopiedBlock::reportLiveBytes): Since we now have to grab a SpinLock to perform operations on the CopyWorkList during marking, + we don't need to do any of that fancy compare and swap stuff we were doing for tracking live bytes. + * heap/CopiedSpace.h: + (CopiedSpace): + * heap/CopiedSpaceInlines.h: + (JSC::CopiedSpace::pin): + * heap/CopyVisitor.cpp: + (JSC::CopyVisitor::copyFromShared): We now iterate over a range of CopiedBlocks rather than MarkedBlocks and revisit the cells in those + blocks' CopyWorkLists. + * heap/CopyVisitor.h: + (CopyVisitor): + * heap/CopyVisitorInlines.h: + (JSC::CopyVisitor::visitCell): The function responsible for calling the correct copyBackingStore() function for each JSCell from + a CopiedBlock's CopyWorkList. + (JSC::CopyVisitor::didCopy): We no longer need to check if the block is empty here because we know exactly when we're done + evacuating a CopiedBlock, which is when we've gone through all of the CopiedBlock's CopyWorkList. + * heap/CopyWorkList.h: Added. + (CopyWorkListSegment): Individual chunk of a CopyWorkList that is allocated from the BlockAllocator. + (JSC::CopyWorkListSegment::create): + (JSC::CopyWorkListSegment::size): + (JSC::CopyWorkListSegment::isFull): + (JSC::CopyWorkListSegment::get): + (JSC::CopyWorkListSegment::append): + (JSC::CopyWorkListSegment::CopyWorkListSegment): + (JSC::CopyWorkListSegment::data): + (JSC::CopyWorkListSegment::endOfBlock): + (CopyWorkListIterator): Responsible for giving CopyVisitors a contiguous notion of access across the separate CopyWorkListSegments + that make up each CopyWorkList. + (JSC::CopyWorkListIterator::get): + (JSC::CopyWorkListIterator::operator*): + (JSC::CopyWorkListIterator::operator->): + (JSC::CopyWorkListIterator::operator++): + (JSC::CopyWorkListIterator::operator==): + (JSC::CopyWorkListIterator::operator!=): + (JSC::CopyWorkListIterator::CopyWorkListIterator): + (CopyWorkList): Data structure that keeps track of the JSCells that need copying in a particular CopiedBlock. + (JSC::CopyWorkList::CopyWorkList): + (JSC::CopyWorkList::~CopyWorkList): + (JSC::CopyWorkList::append): + (JSC::CopyWorkList::begin): + (JSC::CopyWorkList::end): + * heap/GCThreadSharedData.cpp: + (JSC::GCThreadSharedData::GCThreadSharedData): We no longer use the m_blockSnapshot from the Heap during the copying phase. + (JSC::GCThreadSharedData::didStartCopying): We now copy the set of all blocks in the CopiedSpace to a separate vector for + iterating over during the copying phase since the set stored in the CopiedSpace will change as blocks are evacuated and + recycled throughout the copying phase. + * heap/GCThreadSharedData.h: + (GCThreadSharedData): + * heap/Heap.h: + (Heap): + * heap/SlotVisitor.h: We now need to know the object who is being marked that has a backing store so that we can store it + in a CopyWorkList to revisit later during the copying phase. + * heap/SlotVisitorInlines.h: + (JSC::SlotVisitor::copyLater): + * runtime/JSObject.cpp: + (JSC::JSObject::visitButterfly): + +2012-11-28 Filip Pizlo + + Disassembly methods should be able to disassemble to any PrintStream& rather than always using WTF::dataFile() + https://bugs.webkit.org/show_bug.cgi?id=103492 + + Reviewed by Mark Hahnenberg. + + Switched disassembly code to use PrintStream&, and to use print() rather than printf(). + + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dump): + (DFG): + (JSC::DFG::Disassembler::dumpDisassembly): + * dfg/DFGDisassembler.h: + (Disassembler): + * dfg/DFGGraph.cpp: + (JSC::DFG::printWhiteSpace): + (JSC::DFG::Graph::dumpCodeOrigin): + (JSC::DFG::Graph::printNodeWhiteSpace): + (JSC::DFG::Graph::dump): + (DFG): + (JSC::DFG::Graph::dumpBlockHeader): + * dfg/DFGGraph.h: + (Graph): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dump): + (JSC::JITDisassembler::dumpForInstructions): + (JSC::JITDisassembler::dumpDisassembly): + * jit/JITDisassembler.h: + (JITDisassembler): + +2012-11-28 Filip Pizlo + + It should be possible to say dataLog("count = ", count, "\n") instead of dataLogF("count = %d\n", count) + https://bugs.webkit.org/show_bug.cgi?id=103009 + + Reviewed by Michael Saboff. + + Instead of converting all of JSC to use the new dataLog()/print() methods, I just changed + one place: dumping of abstract values. This is mainly just to ensure that the code I + added to WTF is actually doing things. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::dump): + (WTF): + (WTF::printInternal): + * dfg/DFGStructureAbstractValue.h: + (JSC::DFG::StructureAbstractValue::dump): + (WTF): + (WTF::printInternal): + +2012-11-28 Oliver Hunt + + Make source cache include more information about the function extent. + https://bugs.webkit.org/show_bug.cgi?id=103552 + + Reviewed by Gavin Barraclough. + + Add a bit more information to the source cache. + + * parser/Parser.cpp: + (JSC::::parseFunctionInfo): + Store the function start offset + * parser/SourceProviderCacheItem.h: + (JSC::SourceProviderCacheItem::SourceProviderCacheItem): + (SourceProviderCacheItem): + Add additional field for the start of the real function string, and re-arrange + fields to avoid growing the struct. + +2012-11-27 Filip Pizlo + + Convert some remaining uses of FILE* to PrintStream&. + + Rubber stamped by Mark Hahnenberg. + + * bytecode/ValueProfile.h: + (JSC::ValueProfileBase::dump): + * bytecode/ValueRecovery.h: + (JSC::ValueRecovery::dump): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseCodeBlock): + * dfg/DFGNode.h: + (JSC::DFG::Node::dumpChildren): + +2012-11-27 Filip Pizlo + + Fix indentation in JSValue.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/JSValue.h: + +2012-11-26 Filip Pizlo + + DFG SetLocal should use forwardSpeculationCheck instead of its own half-baked version of same + https://bugs.webkit.org/show_bug.cgi?id=103353 + + Reviewed by Oliver Hunt and Gavin Barraclough. + + Made it possible to use forward speculations for most of the operand classes. Changed the conditional + direction parameter from being 'bool isForward' to an enum (SpeculationDirection). Changed SetLocal + to use forward speculations and got rid of its half-baked version of same. + + Also added the ability to force the DFG's disassembler to dump all nodes, even ones that are dead. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dump): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::speculationCheck): + (DFG): + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + (JSC::DFG::SpeculativeJIT::speculationWatchpoint): + (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution): + (JSC::DFG::SpeculativeJIT::fillStorage): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculateIntegerOperand::SpeculateIntegerOperand): + (JSC::DFG::SpeculateIntegerOperand::gpr): + (SpeculateIntegerOperand): + (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand): + (JSC::DFG::SpeculateDoubleOperand::fpr): + (SpeculateDoubleOperand): + (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand): + (JSC::DFG::SpeculateCellOperand::gpr): + (SpeculateCellOperand): + (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand): + (JSC::DFG::SpeculateBooleanOperand::gpr): + (SpeculateBooleanOperand): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateInt): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::compile): + * runtime/Options.h: + (JSC): + +2012-11-26 Daniel Bates + + Substitute "allSeparators8Bit" for "allSeperators8Bit" in JSC::jsSpliceSubstringsWithSeparators() + + + Reviewed by Simon Fraser. + + Fix misspelled word, "Seperators" [sic], in a local variable name in JSC::jsSpliceSubstringsWithSeparators(). + + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + +2012-11-26 Daniel Bates + + JavaScript fails to handle String.replace() with large replacement string + https://bugs.webkit.org/show_bug.cgi?id=102956 + + + Reviewed by Oliver Hunt. + + Fix an issue where we didn't check for overflow when computing the length + of the result of String.replace() with a large replacement string. + + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + +2012-11-26 Zeno Albisser + + [Qt] Fix the LLInt build on Mac + https://bugs.webkit.org/show_bug.cgi?id=97587 + + Reviewed by Simon Hausmann. + + * DerivedSources.pri: + * JavaScriptCore.pro: + +2012-11-26 Oliver Hunt + + 32-bit build fix. Move the method decalration outside of the X86_64 only section. + + * assembler/MacroAssembler.h: + (MacroAssembler): + (JSC::MacroAssembler::shouldConsiderBlinding): + +2012-11-26 Oliver Hunt + + Don't blind all the things. + https://bugs.webkit.org/show_bug.cgi?id=102572 + + Reviewed by Gavin Barraclough. + + No longer blind all the constants in the instruction stream. We use a + simple non-deterministic filter to avoid blinding everything. Also modified + the basic integer blinding logic to avoid blinding small negative values. + + * assembler/MacroAssembler.h: + (MacroAssembler): + (JSC::MacroAssembler::shouldConsiderBlinding): + (JSC::MacroAssembler::shouldBlind): + +2012-11-26 Mark Hahnenberg + + JSObject::copyButterfly doesn't handle undecided indexing types correctly + https://bugs.webkit.org/show_bug.cgi?id=102573 + + Reviewed by Filip Pizlo. + + We don't do any copying into the newly allocated vector and we don't zero-initialize CopiedBlocks + during the copying phase, so we end up with uninitialized memory in arrays which have undecided indexing + types. We should just do the actual memcpy from the old block to the new one. + + * runtime/JSObject.cpp: + (JSC::JSObject::copyButterfly): Just do the same thing that we do for other contiguous indexing types. + +2012-11-26 Julien BRIANCEAU + + [sh4] JavaScriptCore JIT build is broken since r135330 + Add missing implementation for sh4 arch. + https://bugs.webkit.org/show_bug.cgi?id=103145 + + Reviewed by Oliver Hunt. + + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::canJumpReplacePatchableBranchPtrWithPatch): + (MacroAssemblerSH4): + (JSC::MacroAssemblerSH4::startOfBranchPtrWithPatchOnRegister): + (JSC::MacroAssemblerSH4::revertJumpReplacementToBranchPtrWithPatch): + (JSC::MacroAssemblerSH4::startOfPatchableBranchPtrWithPatchOnAddress): + (JSC::MacroAssemblerSH4::revertJumpReplacementToPatchableBranchPtrWithPatch): + * assembler/SH4Assembler.h: + (JSC::SH4Assembler::revertJump): + (SH4Assembler): + (JSC::SH4Assembler::printInstr): + +2012-11-26 Yuqiang Xian + + Use load64 instead of loadPtr to load a JSValue on JSVALUE64 platforms + https://bugs.webkit.org/show_bug.cgi?id=100909 + + Reviewed by Brent Fulgham. + + This is a (trivial) fix after r132701. + + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + +2012-11-26 Gabor Ballabas + + [Qt][ARM] REGRESSION(r130826): It made 33 JSC test and 466 layout tests crash + https://bugs.webkit.org/show_bug.cgi?id=98857 + + Reviewed by Zoltan Herczeg. + + Implement a new version of patchableBranch32 to fix crashing JSC + tests. + + * assembler/MacroAssembler.h: + (MacroAssembler): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::patchableBranch32): + (MacroAssemblerARM): + +2012-11-21 Filip Pizlo + + Any function that can log things should be able to easily log them to a memory buffer as well + https://bugs.webkit.org/show_bug.cgi?id=103000 + + Reviewed by Sam Weinig. + + Change all users of WTF::dataFile() to expect a PrintStream& rather than a FILE*. + + * bytecode/Operands.h: + (JSC::OperandValueTraits::dump): + (JSC::dumpOperands): + (JSC): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::dump): + * dfg/DFGAbstractState.h: + (AbstractState): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::dump): + * dfg/DFGCommon.h: + (JSC::DFG::NodeIndexTraits::dump): + * dfg/DFGStructureAbstractValue.h: + (JSC::DFG::StructureAbstractValue::dump): + * dfg/DFGVariableEvent.cpp: + (JSC::DFG::VariableEvent::dump): + (JSC::DFG::VariableEvent::dumpFillInfo): + (JSC::DFG::VariableEvent::dumpSpillInfo): + * dfg/DFGVariableEvent.h: + (VariableEvent): + * disassembler/Disassembler.h: + (JSC): + (JSC::tryToDisassemble): + * disassembler/UDis86Disassembler.cpp: + (JSC::tryToDisassemble): + +2012-11-23 Alexis Menard + + [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing. + https://bugs.webkit.org/show_bug.cgi?id=102104 + + Reviewed by Julien Chaffraix. + + Protect the new feature behind a feature flag. + + * Configurations/FeatureDefines.xcconfig: + +2012-11-23 Gabor Ballabas + + Fix the ARM traditional build after r135330 + https://bugs.webkit.org/show_bug.cgi?id=102871 + + Reviewed by Zoltan Herczeg. + + Added missing functionality to traditional ARM architecture. + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::revertJump): + (ARMAssembler): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatchOnAddress): + (JSC::MacroAssemblerARM::startOfBranchPtrWithPatchOnRegister): + (MacroAssemblerARM): + (JSC::MacroAssemblerARM::revertJumpReplacementToBranchPtrWithPatch): + +2012-11-16 Yury Semikhatsky + + Memory instrumentation: extract MemoryObjectInfo declaration into a separate file + https://bugs.webkit.org/show_bug.cgi?id=102510 + + Reviewed by Pavel Feldman. + + Added new symbols for the methods that have moved into .../wtf/MemoryInstrumentation.cpp + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-11-23 Julien BRIANCEAU + + [sh4] JavaScriptCore JIT build is broken since r130839 + Add missing implementation for sh4 arch. + https://bugs.webkit.org/show_bug.cgi?id=101479 + + Reviewed by Filip Pizlo. + + * assembler/MacroAssemblerSH4.h: + (JSC::MacroAssemblerSH4::load8Signed): + (MacroAssemblerSH4): + (JSC::MacroAssemblerSH4::load16Signed): + (JSC::MacroAssemblerSH4::store8): + (JSC::MacroAssemblerSH4::store16): + (JSC::MacroAssemblerSH4::moveDoubleToInts): + (JSC::MacroAssemblerSH4::moveIntsToDouble): + (JSC::MacroAssemblerSH4::loadFloat): + (JSC::MacroAssemblerSH4::loadDouble): + (JSC::MacroAssemblerSH4::storeFloat): + (JSC::MacroAssemblerSH4::storeDouble): + (JSC::MacroAssemblerSH4::addDouble): + (JSC::MacroAssemblerSH4::convertFloatToDouble): + (JSC::MacroAssemblerSH4::convertDoubleToFloat): + (JSC::MacroAssemblerSH4::urshift32): + * assembler/SH4Assembler.h: + (JSC::SH4Assembler::sublRegReg): + (JSC::SH4Assembler::subvlRegReg): + (JSC::SH4Assembler::floatfpulfrn): + (JSC::SH4Assembler::fldsfpul): + (JSC::SH4Assembler::fstsfpul): + (JSC::SH4Assembler::dcnvsd): + (SH4Assembler): + (JSC::SH4Assembler::movbRegMem): + (JSC::SH4Assembler::sizeOfConstantPool): + (JSC::SH4Assembler::linkJump): + (JSC::SH4Assembler::printInstr): + (JSC::SH4Assembler::printBlockInstr): + +2012-11-22 Balazs Kilvady + + Fix the MIPS build after r135330 + https://bugs.webkit.org/show_bug.cgi?id=102872 + + Reviewed by Gavin Barraclough. + + Revert/replace functions added to MIPS port. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::revertJumpToMove): + (MIPSAssembler): + (JSC::MIPSAssembler::replaceWithJump): + * assembler/MacroAssemblerMIPS.h: + (MacroAssemblerMIPS): + (JSC::MacroAssemblerMIPS::startOfBranchPtrWithPatchOnRegister): + (JSC::MacroAssemblerMIPS::revertJumpReplacementToBranchPtrWithPatch): + (JSC::MacroAssemblerMIPS::startOfPatchableBranchPtrWithPatchOnAddress): + +2012-11-21 Filip Pizlo + + Rename dataLog() and dataLogV() to dataLogF() and dataLogFV() + https://bugs.webkit.org/show_bug.cgi?id=103001 + + Rubber stamped by Dan Bernstein. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * assembler/LinkBuffer.cpp: + (JSC::LinkBuffer::finalizeCodeWithDisassembly): + (JSC::LinkBuffer::dumpLinkStatistics): + (JSC::LinkBuffer::dumpCode): + * assembler/LinkBuffer.h: + (JSC): + * assembler/SH4Assembler.h: + (JSC::SH4Assembler::vprintfStdoutInstr): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dumpBytecodeCommentAndNewLine): + (JSC::CodeBlock::printUnaryOp): + (JSC::CodeBlock::printBinaryOp): + (JSC::CodeBlock::printConditionalJump): + (JSC::CodeBlock::printGetByIdOp): + (JSC::dumpStructure): + (JSC::dumpChain): + (JSC::CodeBlock::printGetByIdCacheStatus): + (JSC::CodeBlock::printCallOp): + (JSC::CodeBlock::printPutByIdOp): + (JSC::CodeBlock::printStructure): + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::dump): + (JSC::CodeBlock::dumpStatistics): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::resetStubInternal): + (JSC::CodeBlock::reoptimize): + (JSC::ProgramCodeBlock::jettison): + (JSC::EvalCodeBlock::jettison): + (JSC::FunctionCodeBlock::jettison): + (JSC::CodeBlock::shouldOptimizeNow): + (JSC::CodeBlock::tallyFrequentExitSites): + (JSC::CodeBlock::dumpValueProfiles): + * bytecode/Opcode.cpp: + (JSC::OpcodeStats::~OpcodeStats): + * bytecode/SamplingTool.cpp: + (JSC::SamplingFlags::stop): + (JSC::SamplingRegion::dumpInternal): + (JSC::SamplingTool::dump): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::initialize): + (JSC::DFG::AbstractState::endBasicBlock): + (JSC::DFG::AbstractState::mergeStateAtTail): + (JSC::DFG::AbstractState::mergeToSuccessors): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::dump): + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation): + (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit): + (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): + (JSC::DFG::ByteCodeParser::makeSafe): + (JSC::DFG::ByteCodeParser::makeDivSafe): + (JSC::DFG::ByteCodeParser::handleCall): + (JSC::DFG::ByteCodeParser::handleInlining): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::processPhiStack): + (JSC::DFG::ByteCodeParser::linkBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + (JSC::DFG::ByteCodeParser::parseCodeBlock): + (JSC::DFG::ByteCodeParser::parse): + * dfg/DFGCFAPhase.cpp: + (JSC::DFG::CFAPhase::performBlockCFA): + (JSC::DFG::CFAPhase::performForwardCFA): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::fixPossibleGetLocal): + (JSC::DFG::CFGSimplificationPhase::fixPhis): + (JSC::DFG::CFGSimplificationPhase::fixJettisonedPredecessors): + (JSC::DFG::CFGSimplificationPhase::removePotentiallyDeadPhiReference): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::endIndexForPureCSE): + (JSC::DFG::CSEPhase::setReplacement): + (JSC::DFG::CSEPhase::eliminate): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGCapabilities.cpp: + (JSC::DFG::debugFail): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + (JSC::DFG::ConstantFoldingPhase::paintUnreachableCode): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dump): + * dfg/DFGDriver.cpp: + (JSC::DFG::compile): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::fixDoubleEdge): + * dfg/DFGGraph.cpp: + (JSC::DFG::printWhiteSpace): + (JSC::DFG::Graph::dumpCodeOrigin): + (JSC::DFG::Graph::dump): + (JSC::DFG::Graph::dumpBlockHeader): + (JSC::DFG::Graph::predictArgumentTypes): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::link): + * dfg/DFGOSREntry.cpp: + (JSC::DFG::prepareOSREntry): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + * dfg/DFGPhase.cpp: + (JSC::DFG::Phase::beginPhase): + * dfg/DFGPhase.h: + (JSC::DFG::runAndLog): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + (JSC::DFG::PredictionPropagationPhase::propagateForward): + (JSC::DFG::PredictionPropagationPhase::propagateBackward): + (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): + * dfg/DFGRegisterBank.h: + (JSC::DFG::RegisterBank::dump): + * dfg/DFGScoreBoard.h: + (JSC::DFG::ScoreBoard::use): + (JSC::DFG::ScoreBoard::dump): + * dfg/DFGSlowPathGenerator.h: + (JSC::DFG::SlowPathGenerator::generate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution): + (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecutionWithConditionalDirection): + (JSC::DFG::SpeculativeJIT::runSlowPathGenerators): + (JSC::DFG::SpeculativeJIT::dump): + (JSC::DFG::SpeculativeJIT::checkConsistency): + (JSC::DFG::SpeculativeJIT::compile): + (JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * dfg/DFGValidate.cpp: + (Validate): + (JSC::DFG::Validate::reportValidationContext): + (JSC::DFG::Validate::dumpData): + (JSC::DFG::Validate::dumpGraphIfAppropriate): + * dfg/DFGVariableEventStream.cpp: + (JSC::DFG::VariableEventStream::logEvent): + (JSC::DFG::VariableEventStream::reconstruct): + * dfg/DFGVirtualRegisterAllocationPhase.cpp: + (JSC::DFG::VirtualRegisterAllocationPhase::run): + * heap/Heap.cpp: + * heap/HeapStatistics.cpp: + (JSC::HeapStatistics::logStatistics): + (JSC::HeapStatistics::showObjectStatistics): + * heap/MarkStack.h: + * heap/MarkedBlock.h: + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::validate): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::dumpCaller): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + (JSC::JIT::privateCompile): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dump): + (JSC::JITDisassembler::dumpForInstructions): + * jit/JITStubRoutine.h: + (JSC): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JumpReplacementWatchpoint.cpp: + (JSC::JumpReplacementWatchpoint::fireInternal): + * llint/LLIntExceptions.cpp: + (JSC::LLInt::interpreterThrowInCaller): + (JSC::LLInt::returnToThrow): + (JSC::LLInt::callToThrow): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::llint_trace_operand): + (JSC::LLInt::llint_trace_value): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + (JSC::LLInt::traceFunctionPrologue): + (JSC::LLInt::jitCompileAndSetHeuristics): + (JSC::LLInt::entryOSR): + (JSC::LLInt::handleHostCall): + (JSC::LLInt::setUpCall): + * profiler/Profile.cpp: + (JSC::Profile::debugPrintData): + (JSC::Profile::debugPrintDataSampleStyle): + * profiler/ProfileNode.cpp: + (JSC::ProfileNode::debugPrintData): + (JSC::ProfileNode::debugPrintDataSampleStyle): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::dumpRegExpTrace): + * runtime/RegExp.cpp: + (JSC::RegExp::matchCompareWithInterpreter): + * runtime/SamplingCounter.cpp: + (JSC::AbstractSamplingCounter::dump): + * runtime/Structure.cpp: + (JSC::Structure::dumpStatistics): + (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger): + * tools/CodeProfile.cpp: + (JSC::CodeProfile::report): + * tools/ProfileTreeNode.h: + (JSC::ProfileTreeNode::dumpInternal): + * yarr/YarrInterpreter.cpp: + (JSC::Yarr::ByteCompiler::dumpDisjunction): + +2012-11-21 Filip Pizlo + + It should be possible to say disassemble(stuff) instead of having to say if (!tryToDisassemble(stuff)) dataLog("I failed") + https://bugs.webkit.org/show_bug.cgi?id=103010 + + Reviewed by Anders Carlsson. + + You can still say tryToDisassemble(), which will tell you if it failed; you can then + decide what to do instead. But it's better to say disassemble(), which will just print + the instruction ranges if tryToDisassemble() failed. This is particularly appropriate + since that's what all previous users of tryToDisassemble() would have done in some + form or another. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * assembler/LinkBuffer.cpp: + (JSC::LinkBuffer::finalizeCodeWithDisassembly): + * dfg/DFGDisassembler.cpp: + (JSC::DFG::Disassembler::dumpDisassembly): + * disassembler/Disassembler.cpp: Added. + (JSC): + (JSC::disassemble): + * disassembler/Disassembler.h: + (JSC): + * jit/JITDisassembler.cpp: + (JSC::JITDisassembler::dumpDisassembly): + +2012-11-21 Filip Pizlo + + dumpOperands() claims that it needs a non-const Operands& when that is completely false + https://bugs.webkit.org/show_bug.cgi?id=103005 + + Reviewed by Eric Carlson. + + * bytecode/Operands.h: + (JSC::dumpOperands): + (JSC): + +2012-11-20 Filip Pizlo + + Baseline JIT's disassembly should be just as pretty as the DFG's + https://bugs.webkit.org/show_bug.cgi?id=102873 + + Reviewed by Sam Weinig. + + Integrated the CodeBlock's bytecode dumper with the JIT's disassembler. Also fixed + some type goof-ups (instructions are not in a Vector so using a Vector + iterator makes no sense) and stream-lined some things (you don't actually need a + full-fledged ExecState* to dump bytecode). + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printUnaryOp): + (JSC::CodeBlock::printBinaryOp): + (JSC::CodeBlock::printConditionalJump): + (JSC::CodeBlock::printGetByIdOp): + (JSC::CodeBlock::printCallOp): + (JSC::CodeBlock::printPutByIdOp): + (JSC::CodeBlock::dump): + (JSC): + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (CodeBlock): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpCallFrame): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JIT): + * jit/JITDisassembler.cpp: Added. + (JSC): + (JSC::JITDisassembler::JITDisassembler): + (JSC::JITDisassembler::~JITDisassembler): + (JSC::JITDisassembler::dump): + (JSC::JITDisassembler::dumpForInstructions): + (JSC::JITDisassembler::dumpDisassembly): + * jit/JITDisassembler.h: Added. + (JSC): + (JITDisassembler): + (JSC::JITDisassembler::setStartOfCode): + (JSC::JITDisassembler::setForBytecodeMainPath): + (JSC::JITDisassembler::setForBytecodeSlowPath): + (JSC::JITDisassembler::setEndOfSlowPath): + (JSC::JITDisassembler::setEndOfCode): + +2012-11-21 Daniel Bates + + JavaScript fails to concatenate large strings + + + Reviewed by Michael Saboff. + + Fixes an issue where we inadvertently didn't check the length of + a JavaScript string for overflow. + + * runtime/Operations.h: + (JSC::jsString): + (JSC::jsStringFromArguments): + +2012-11-20 Filip Pizlo + + DFG should be able to cache closure calls (part 2/2) + https://bugs.webkit.org/show_bug.cgi?id=102662 + + Reviewed by Gavin Barraclough. + + Added caching of calls where the JSFunction* varies, but the Structure* and ExecutableBase* + stay the same. This is accomplished by replacing the branch that compares against a constant + JSFunction* with a jump to a closure call stub. The closure call stub contains a fast path, + and jumps slow directly to the virtual call thunk. + + Looks like a 1% win on V8v7. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CallLinkInfo.cpp: + (JSC::CallLinkInfo::unlink): + * bytecode/CallLinkInfo.h: + (CallLinkInfo): + (JSC::CallLinkInfo::isLinked): + (JSC::getCallLinkInfoBytecodeIndex): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::finalizeUnconditionally): + (JSC): + (JSC::CodeBlock::findClosureCallForReturnPC): + (JSC::CodeBlock::bytecodeOffset): + (JSC::CodeBlock::codeOriginForReturn): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getCallLinkInfo): + (CodeBlock): + (JSC::CodeBlock::isIncomingCallAlreadyLinked): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::link): + * dfg/DFGJITCompiler.h: + (JSC::DFG::JITCompiler::addJSCall): + (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord): + (JSCallRecord): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGRepatch.cpp: + (JSC::DFG::linkSlowFor): + (DFG): + (JSC::DFG::dfgLinkFor): + (JSC::DFG::dfgLinkSlowFor): + (JSC::DFG::dfgLinkClosureCall): + * dfg/DFGRepatch.h: + (DFG): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::emitCall): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::emitCall): + * dfg/DFGThunks.cpp: + (DFG): + (JSC::DFG::linkClosureCallThunkGenerator): + * dfg/DFGThunks.h: + (DFG): + * heap/Heap.h: + (Heap): + (JSC::Heap::jitStubRoutines): + * heap/JITStubRoutineSet.h: + (JSC::JITStubRoutineSet::size): + (JSC::JITStubRoutineSet::at): + (JITStubRoutineSet): + * jit/ClosureCallStubRoutine.cpp: Added. + (JSC): + (JSC::ClosureCallStubRoutine::ClosureCallStubRoutine): + (JSC::ClosureCallStubRoutine::~ClosureCallStubRoutine): + (JSC::ClosureCallStubRoutine::markRequiredObjectsInternal): + * jit/ClosureCallStubRoutine.h: Added. + (JSC): + (ClosureCallStubRoutine): + (JSC::ClosureCallStubRoutine::structure): + (JSC::ClosureCallStubRoutine::executable): + (JSC::ClosureCallStubRoutine::codeOrigin): + * jit/GCAwareJITStubRoutine.cpp: + (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine): + * jit/GCAwareJITStubRoutine.h: + (GCAwareJITStubRoutine): + (JSC::GCAwareJITStubRoutine::isClosureCall): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + +2012-11-20 Filip Pizlo + + DFG should be able to cache closure calls (part 1/2) + https://bugs.webkit.org/show_bug.cgi?id=102662 + + Reviewed by Gavin Barraclough. + + Add ability to revert a jump replacement back to + branchPtrWithPatch(Condition, RegisterID, TrustedImmPtr). This is meant to be + a mandatory piece of functionality for all assemblers. I also renamed some of + the functions for reverting jump replacements back to + patchableBranchPtrWithPatch(Condition, Address, TrustedImmPtr), so as to avoid + confusion. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::BadReg): + (ARMv7Assembler): + (JSC::ARMv7Assembler::revertJumpTo_movT3): + * assembler/LinkBuffer.h: + (JSC): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::startOfBranchPtrWithPatchOnRegister): + (MacroAssemblerARMv7): + (JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch): + (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatchOnAddress): + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::startOfBranchPtrWithPatchOnRegister): + (MacroAssemblerX86): + (JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatchOnAddress): + (JSC::MacroAssemblerX86::revertJumpReplacementToBranchPtrWithPatch): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::startOfBranchPtrWithPatchOnRegister): + (JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatchOnAddress): + (MacroAssemblerX86_64): + (JSC::MacroAssemblerX86_64::revertJumpReplacementToBranchPtrWithPatch): + * assembler/RepatchBuffer.h: + (JSC::RepatchBuffer::startOfBranchPtrWithPatchOnRegister): + (RepatchBuffer): + (JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatchOnAddress): + (JSC::RepatchBuffer::revertJumpReplacementToBranchPtrWithPatch): + * assembler/X86Assembler.h: + (JSC::X86Assembler::revertJumpTo_cmpl_ir_force32): + (X86Assembler): + * dfg/DFGRepatch.cpp: + (JSC::DFG::replaceWithJump): + (JSC::DFG::dfgResetGetByID): + (JSC::DFG::dfgResetPutByID): + +2012-11-20 Yong Li + + [ARMv7] Neither linkCall() nor linkPointer() should flush code. + https://bugs.webkit.org/show_bug.cgi?id=99213 + + Reviewed by George Staikos. + + LinkBuffer doesn't need to flush code during linking. It will + eventually flush the whole executable. Fixing this gives >%5 + sunspider boost (on QNX). + + Also make replaceWithLoad() and replaceWithAddressComputation() flush + only when necessary. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::linkCall): + (JSC::ARMv7Assembler::linkPointer): + (JSC::ARMv7Assembler::relinkCall): + (JSC::ARMv7Assembler::repatchInt32): + (JSC::ARMv7Assembler::repatchPointer): + (JSC::ARMv7Assembler::replaceWithLoad): Flush only after it did write. + (JSC::ARMv7Assembler::replaceWithAddressComputation): Flush only after it did write. + (JSC::ARMv7Assembler::setInt32): + (JSC::ARMv7Assembler::setPointer): + +2012-11-19 Filip Pizlo + + Remove support for ARMv7 errata from the jump code + https://bugs.webkit.org/show_bug.cgi?id=102759 + + Reviewed by Oliver Hunt. + + The jump replacement code was wrong to begin with since it wasn't doing + a cache flush on the inserted padding. And, to my knowledge, we don't need + this anymore, so this patch removes all errata code from the ARMv7 port. + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::replaceWithJump): + (JSC::ARMv7Assembler::maxJumpReplacementSize): + (JSC::ARMv7Assembler::canBeJumpT3): + (JSC::ARMv7Assembler::canBeJumpT4): + +2012-11-19 Patrick Gansterer + + [CMake] Create JavaScriptCore ForwardingHeaders + https://bugs.webkit.org/show_bug.cgi?id=92665 + + Reviewed by Brent Fulgham. + + When using CMake to build the Windows port, we need + to generate the forwarding headers with it too. + + * CMakeLists.txt: + +2012-11-19 Kihong Kwon + + Add PROXIMITY_EVENTS feature + https://bugs.webkit.org/show_bug.cgi?id=102658 + + Reviewed by Kentaro Hara. + + Add PROXIMITY_EVENTS feature to xcode project for JavaScriptCore. + + * Configurations/FeatureDefines.xcconfig: + +2012-11-18 Dan Bernstein + + Try to fix the DFG build after r135099. + + * dfg/DFGCommon.h: + (JSC::DFG::shouldShowDisassembly): + +2012-11-18 Filip Pizlo + + Unreviewed, build fix for !ENABLE(DFG_JIT). + + * dfg/DFGCommon.h: + (JSC::DFG::shouldShowDisassembly): + (DFG): + +2012-11-18 Filip Pizlo + + JSC should have more logging in structure-related code + https://bugs.webkit.org/show_bug.cgi?id=102630 + + Reviewed by Simon Fraser. + + - JSValue::description() now tells you if something is a structure, and if so, + what kind of structure it is. + + - Jettisoning logic now tells you why things are being jettisoned. + + - It's now possible to turn off GC-triggered jettisoning entirely. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::reoptimize): + (JSC::ProgramCodeBlock::jettison): + (JSC::EvalCodeBlock::jettison): + (JSC::FunctionCodeBlock::jettison): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan): + * runtime/JSValue.cpp: + (JSC::JSValue::description): + * runtime/Options.h: + (JSC): + +2012-11-18 Filip Pizlo + + DFG constant folding phase should say 'changed = true' whenever it changes the graph + https://bugs.webkit.org/show_bug.cgi?id=102550 + + Rubber stamped by Mark Hahnenberg. + + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + +2012-11-17 Elliott Sprehn + + Expose JSObject removeDirect and PrivateName to WebCore + https://bugs.webkit.org/show_bug.cgi?id=102546 + + Reviewed by Geoffrey Garen. + + Export removeDirect for use in WebCore so JSDependentRetained works. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-11-16 Filip Pizlo + + Given a PutById or GetById with a proven structure, the DFG should be able to emit a PutByOffset or GetByOffset instead + https://bugs.webkit.org/show_bug.cgi?id=102327 + + Reviewed by Mark Hahnenberg. + + If the profiler tells us that a GetById or PutById may be polymorphic but our + control flow analysis proves that it isn't, we should trust the control flow + analysis over the profiler. This arises in cases where GetById or PutById were + inlined: the inlined function may have been called from other places that led + to polymorphism, but in the current inlined context, there is no polymorphism. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/GetByIdStatus.cpp: + (JSC::GetByIdStatus::computeFor): + (JSC): + * bytecode/GetByIdStatus.h: + (JSC::GetByIdStatus::GetByIdStatus): + (GetByIdStatus): + * bytecode/PutByIdStatus.cpp: + (JSC::PutByIdStatus::computeFor): + (JSC): + * bytecode/PutByIdStatus.h: + (JSC): + (JSC::PutByIdStatus::PutByIdStatus): + (PutByIdStatus): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::bestProvenStructure): + (AbstractValue): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + (JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck): + (ConstantFoldingPhase): + * dfg/DFGNode.h: + (JSC::DFG::Node::convertToGetByOffset): + (Node): + (JSC::DFG::Node::convertToPutByOffset): + (JSC::DFG::Node::hasStorageResult): + * runtime/JSGlobalObject.h: + (JSC::Structure::prototypeChain): + (JSC): + (JSC::Structure::isValid): + * runtime/Operations.h: + (JSC::isPrototypeChainNormalized): + (JSC): + * runtime/Structure.h: + (Structure): + (JSC::Structure::transitionDidInvolveSpecificValue): + +2012-11-16 Tony Chang + + Remove ENABLE_CSS_HIERARCHIES since it's no longer in use + https://bugs.webkit.org/show_bug.cgi?id=102554 + + Reviewed by Andreas Kling. + + As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 , + we're going to revist this feature once additional vendor support is + achieved. + + * Configurations/FeatureDefines.xcconfig: + +2012-11-16 Patrick Gansterer + + Build fix for WinCE after r133688. + + Use numeric_limits::max() instead of UINT32_MAX. + + * runtime/CodeCache.h: + (JSC::CacheMap::CacheMap): + +2012-11-15 Filip Pizlo + + ClassInfo.h should have correct indentation. + + Rubber stamped by Mark Hahnenberg. + + ClassInfo.h had some true creativity in its use of whitespace. Some things within + the namespace were indented four spaces and others where not. One #define had its + contents indented four spaces, while another didn't. I applied the following rule: + + - Non-macro things in the namespace should not be indented (that's our current + accepted practice). + + - Macros should never be indented but if they are multi-line then their subsequent + bodies should be indented four spaces. I believe that is consistent with what we + do elsewhere. + + * runtime/ClassInfo.h: + (JSC): + (MethodTable): + (ClassInfo): + (JSC::ClassInfo::propHashTable): + (JSC::ClassInfo::isSubClassOf): + (JSC::ClassInfo::hasStaticProperties): + +2012-11-15 Filip Pizlo + + DFG should copy propagate trivially no-op ConvertThis + https://bugs.webkit.org/show_bug.cgi?id=102445 + + Reviewed by Oliver Hunt. + + Copy propagation is always a good thing, since it reveals must-alias relationships + to the CFA and CSE. This accomplishes copy propagation for ConvertThis by first + converting it to an Identity node (which is done by the constant folder since it + has access to CFA results) and then performing substitution of references to + Identity with references to Identity's child in the CSE. + + I'm not aiming for a big speed-up here; I just think that this will be useful for + the work on https://bugs.webkit.org/show_bug.cgi?id=102327. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-11-15 Filip Pizlo + + CallData.h should have correct indentation. + + Rubber stamped by Mark Hahneberg. + + * runtime/CallData.h: + (JSC): + +2012-11-15 Filip Pizlo + + Remove methodCallDummy since it is not used anymore. + + Rubber stamped by Mark Hahnenberg. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC): + (JSC::JSGlobalObject::visitChildren): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + +2012-11-14 Filip Pizlo + + Structure should be able to easily tell if the prototype chain might intercept a store + https://bugs.webkit.org/show_bug.cgi?id=102326 + + Reviewed by Geoffrey Garen. + + This improves our ability to reason about the correctness of the more optimized + prototype chain walk in JSObject::put(), while also making it straight forward to + check if the prototype chain will do strange things to a property store by just + looking at the structure. + + * runtime/JSObject.cpp: + (JSC::JSObject::put): + * runtime/Structure.cpp: + (JSC::Structure::prototypeChainMayInterceptStoreTo): + (JSC): + * runtime/Structure.h: + (Structure): + +2012-11-15 Thiago Marcos P. Santos + + [CMake] Do not regenerate LLIntAssembly.h on every incremental build + https://bugs.webkit.org/show_bug.cgi?id=102248 + + Reviewed by Kenneth Rohde Christiansen. + + Update LLIntAssembly.h's mtime after running asm.rb to make the build + system dependency tracking consistent. + + * CMakeLists.txt: + +2012-11-15 Thiago Marcos P. Santos + + Fix compiler warnings about signed/unsigned comparison on i386 + https://bugs.webkit.org/show_bug.cgi?id=102249 + + Reviewed by Kenneth Rohde Christiansen. + + Add casting to unsigned to shut up gcc warnings. Build was broken on + JSVALUE32_64 ports compiling with -Werror. + + * llint/LLIntData.cpp: + (JSC::LLInt::Data::performAssertions): + +2012-11-14 Brent Fulgham + + [Windows, WinCairo] Unreviewed build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + Missed one of the exports that was part of the WebKit2.def. + +2012-11-14 Brent Fulgham + + [Windows, WinCairo] Correct build failure. + https://bugs.webkit.org/show_bug.cgi?id=102302 + + WebCore symbols were mistakenly added to the JavaScriptCore + library definition file. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove + WebCore symbols that were incorrectly added to the export file. + +2012-11-14 Mark Lam + + Change JSEventListener::m_jsFunction to be a weak ref. + https://bugs.webkit.org/show_bug.cgi?id=101989. + + Reviewed by Geoffrey Garen. + + Added infrastructure for scanning weak ref slots. + + * heap/SlotVisitor.cpp: Added #include "SlotVisitorInlines.h". + * heap/SlotVisitor.h: + (SlotVisitor): Added SlotVisitor::appendUnbarrieredWeak(). + * heap/SlotVisitorInlines.h: Added #include "Weak.h". + (JSC::SlotVisitor::appendUnbarrieredWeak): Added. + * heap/Weak.h: + (JSC::operator==): Added operator==() for Weak. + * runtime/JSCell.h: Removed #include "SlotVisitorInlines.h". + * runtime/JSObject.h: Added #include "SlotVisitorInlines.h". + +2012-11-14 Filip Pizlo + + Read-only properties created with putDirect() should tell the structure that there are read-only properties + https://bugs.webkit.org/show_bug.cgi?id=102292 + + Reviewed by Gavin Barraclough. + + This mostly affects things like function.length. + + * runtime/JSObject.h: + (JSC::JSObject::putDirectInternal): + +2012-11-13 Filip Pizlo + + Don't access Node& after adding nodes to the graph. + https://bugs.webkit.org/show_bug.cgi?id=102005 + + Reviewed by Oliver Hunt. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + +2012-11-14 Valery Ignatyev + + Replace (typeof(x) != <"object", "undefined", ...>) with + !(typeof(x) == <"object",..>). Later is_object, is_<...> bytecode operation + will be used. + + https://bugs.webkit.org/show_bug.cgi?id=98893 + + Reviewed by Filip Pizlo. + + This eliminates expensive typeof implementation and + allows to use DFG optimizations, which doesn't support 'typeof'. + + * bytecompiler/NodesCodegen.cpp: + (JSC::BinaryOpNode::emitBytecode): + +2012-11-14 Peter Gal + + [Qt][ARM]REGRESSION(r133985): It broke the build + https://bugs.webkit.org/show_bug.cgi?id=101740 + + Reviewed by Csaba Osztrogonác. + + Changed the emitGenericContiguousPutByVal to accept the additional IndexingType argument. + This information was passed as a template parameter. + + * jit/JIT.h: + (JSC::JIT::emitInt32PutByVal): + (JSC::JIT::emitDoublePutByVal): + (JSC::JIT::emitContiguousPutByVal): + (JIT): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitGenericContiguousPutByVal): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emitGenericContiguousPutByVal): + +2012-11-14 Peter Gal + + Fix the MIPS build after r134332 + https://bugs.webkit.org/show_bug.cgi?id=102227 + + Reviewed by Csaba Osztrogonác. + + Added missing methods for the MacroAssemblerMIPS, based on the MacroAssemblerARMv7. + + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::canJumpReplacePatchableBranchPtrWithPatch): + (MacroAssemblerMIPS): + (JSC::MacroAssemblerMIPS::startOfPatchableBranchPtrWithPatch): + (JSC::MacroAssemblerMIPS::revertJumpReplacementToPatchableBranchPtrWithPatch): + +2012-11-14 Peter Gal + + Fix the [-Wreturn-type] warning in JavaScriptCore/assembler/MacroAssemblerARM.h + https://bugs.webkit.org/show_bug.cgi?id=102206 + + Reviewed by Csaba Osztrogonác. + + Add a return value for the function to suppress the warning. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatch): + +2012-11-14 Sheriff Bot + + Unreviewed, rolling out r134599. + http://trac.webkit.org/changeset/134599 + https://bugs.webkit.org/show_bug.cgi?id=102225 + + It broke the 32 bit EFL build (Requested by Ossy on #webkit). + + * jit/JITPropertyAccess.cpp: + * jit/JITPropertyAccess32_64.cpp: + (JSC): + (JSC::JIT::emitGenericContiguousPutByVal): + +2012-11-14 Balazs Kilvady + + [Qt][ARM]REGRESSION(r133985): It broke the build + https://bugs.webkit.org/show_bug.cgi?id=101740 + + Reviewed by Csaba Osztrogonác. + + Template function body moved to fix VALUE_PROFILER disabled case. + + * jit/JITPropertyAccess.cpp: + (JSC): + (JSC::JIT::emitGenericContiguousPutByVal): + * jit/JITPropertyAccess32_64.cpp: + +2012-11-13 Filip Pizlo + + DFG CreateThis should be able to statically account for the structure of the object it creates, if profiling indicates that this structure is always the same + https://bugs.webkit.org/show_bug.cgi?id=102017 + + Reviewed by Geoffrey Garen. + + This adds a watchpoint in JSFunction on the cached inheritor ID. It also changes + NewObject to take a structure as an operand (previously it implicitly used the owning + global object's empty object structure). Any GetCallee where the callee is predictable + is turned into a CheckFunction + WeakJSConstant, and any CreateThis on a WeakJSConstant + where the inheritor ID watchpoint is still valid is turned into an InheritorIDWatchpoint + followed by a NewObject. NewObject already accounts for the structure it uses for object + creation in the CFA. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::checkFunctionElimination): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGNode.h: + (JSC::DFG::Node::hasFunction): + (JSC::DFG::Node::function): + (JSC::DFG::Node::hasStructure): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * runtime/Executable.h: + (JSC::JSFunction::JSFunction): + * runtime/JSBoundFunction.cpp: + (JSC): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::put): + (JSC::JSFunction::defineOwnProperty): + * runtime/JSFunction.h: + (JSC::JSFunction::tryGetKnownInheritorID): + (JSFunction): + (JSC::JSFunction::addInheritorIDWatchpoint): + +2012-11-13 Filip Pizlo + + JSFunction and its descendants should be destructible + https://bugs.webkit.org/show_bug.cgi?id=102062 + + Reviewed by Mark Hahnenberg. + + This will make it easy to place an InlineWatchpointSet inside JSFunction. In the + future, we could make JSFunction non-destructible again by making a version of + WatchpointSet that is entirely GC'd, but this seems like overkill for now. + + This is performance-neutral. + + * runtime/JSBoundFunction.cpp: + (JSC::JSBoundFunction::destroy): + (JSC): + * runtime/JSBoundFunction.h: + (JSBoundFunction): + * runtime/JSFunction.cpp: + (JSC): + (JSC::JSFunction::destroy): + * runtime/JSFunction.h: + (JSFunction): + +2012-11-13 Cosmin Truta + + Uninitialized fields in class JSLock + https://bugs.webkit.org/show_bug.cgi?id=101695 + + Reviewed by Mark Hahnenberg. + + Initialize JSLock::m_ownerThread and JSLock::m_lockDropDepth. + + * runtime/JSLock.cpp: + (JSC::JSLock::JSLock): + +2012-11-13 Peter Gal + + Fix the ARM traditional build after r134332 + https://bugs.webkit.org/show_bug.cgi?id=102044 + + Reviewed by Zoltan Herczeg. + + Added missing methods for the MacroAssemblerARM, based on the MacroAssemblerARMv7. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::canJumpReplacePatchableBranchPtrWithPatch): + (MacroAssemblerARM): + (JSC::MacroAssemblerARM::startOfPatchableBranchPtrWithPatch): + (JSC::MacroAssemblerARM::revertJumpReplacementToPatchableBranchPtrWithPatch): + +2012-11-12 Filip Pizlo + + op_get_callee should have value profiling + https://bugs.webkit.org/show_bug.cgi?id=102047 + + Reviewed by Sam Weinig. + + This will allow us to detect if the callee is always the same, which is probably + the common case for a lot of constructors. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_callee): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_callee): + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + +2012-11-12 Filip Pizlo + + The act of getting the callee during 'this' construction should be explicit in bytecode + https://bugs.webkit.org/show_bug.cgi?id=102016 + + Reviewed by Michael Saboff. + + This is mostly a rollout of http://trac.webkit.org/changeset/116673, but also includes + changes to have create_this use the result of get_callee. + + No performance or behavioral impact. This is just meant to allow us to profile + get_callee in the future. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + (JIT): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_callee): + (JSC): + (JSC::JIT::emit_op_create_this): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_callee): + (JSC): + (JSC::JIT::emit_op_create_this): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + +2012-11-12 Filip Pizlo + + Unreviewed, fix ARMv7 build. + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch): + (JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch): + +2012-11-12 Filip Pizlo + + Patching of jumps to stubs should use jump replacement rather than branch destination overwrite + https://bugs.webkit.org/show_bug.cgi?id=101909 + + Reviewed by Geoffrey Garen. + + This saves a few instructions in inline cases, on those architectures where it is + easy to figure out where to put the jump replacement. Sub-1% speed-up across the + board. + + * assembler/MacroAssemblerARMv7.h: + (MacroAssemblerARMv7): + (JSC::MacroAssemblerARMv7::canJumpReplacePatchableBranchPtrWithPatch): + (JSC::MacroAssemblerARMv7::startOfPatchableBranchPtrWithPatch): + (JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranchPtrWithPatch): + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::canJumpReplacePatchableBranchPtrWithPatch): + (MacroAssemblerX86): + (JSC::MacroAssemblerX86::startOfPatchableBranchPtrWithPatch): + (JSC::MacroAssemblerX86::revertJumpReplacementToPatchableBranchPtrWithPatch): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::canJumpReplacePatchableBranchPtrWithPatch): + (MacroAssemblerX86_64): + (JSC::MacroAssemblerX86_64::startOfPatchableBranchPtrWithPatch): + (JSC::MacroAssemblerX86_64::revertJumpReplacementToPatchableBranchPtrWithPatch): + * assembler/RepatchBuffer.h: + (JSC::RepatchBuffer::startOfPatchableBranchPtrWithPatch): + (RepatchBuffer): + (JSC::RepatchBuffer::replaceWithJump): + (JSC::RepatchBuffer::revertJumpReplacementToPatchableBranchPtrWithPatch): + * assembler/X86Assembler.h: + (X86Assembler): + (JSC::X86Assembler::revertJumpTo_movq_i64r): + (JSC::X86Assembler::revertJumpTo_cmpl_im_force32): + (X86InstructionFormatter): + * bytecode/StructureStubInfo.h: + * dfg/DFGRepatch.cpp: + (JSC::DFG::replaceWithJump): + (DFG): + (JSC::DFG::tryCacheGetByID): + (JSC::DFG::tryBuildGetByIDList): + (JSC::DFG::tryBuildGetByIDProtoList): + (JSC::DFG::tryCachePutByID): + (JSC::DFG::dfgResetGetByID): + (JSC::DFG::dfgResetPutByID): + +2012-11-11 Filip Pizlo + + DFG ArithMul overflow check elimination is too aggressive + https://bugs.webkit.org/show_bug.cgi?id=101871 + + Reviewed by Oliver Hunt. + + The code was ignoring the fact that ((a * b) | 0) == (((a | 0) * (b | 0)) | 0) + only holds if a * b < 2^53. So, I changed it to only enable the optimization + when a < 2^22 and b is an int32 (and vice versa), using a super trivial peephole + analysis to prove the inequality. I considered writing an epic forward flow + formulation that tracks the ranges of integer values but then I thought better + of it. + + This also rewires the ArithMul integer speculation logic. Previously, we would + assume that an ArithMul was only UsedAsNumber if it escaped, and separately we + would decide whether to speculate integer based on a proof of the <2^22 + inequality. Now, we treat the double rounding behavior of ArithMul as if the + result was UsedAsNumber even if it did not escape. Then we try to prove that + double rounding cannot happen by attemping to prove that a < 2^22. This then + feeds back into the decision of whether or not to speculate integer (if we fail + to prove a < 2^22 then we're UsedAsNumber, and if we're also MayOverflow then + that forces double speculation). + + No performance impact. It just fixes a bug. + + * dfg/DFGGraph.h: + (JSC::DFG::Graph::mulShouldSpeculateInteger): + * dfg/DFGPredictionPropagationPhase.cpp: + (PredictionPropagationPhase): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoForConstant): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwoNonRecursive): + (JSC::DFG::PredictionPropagationPhase::isWithinPowerOfTwo): + (JSC::DFG::PredictionPropagationPhase::propagate): + +2012-11-11 Filip Pizlo + + DFG should not emit function checks if we've already proved that the operand is that exact function + https://bugs.webkit.org/show_bug.cgi?id=101885 + + Reviewed by Oliver Hunt. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::filterByValue): + (AbstractValue): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + +2012-11-12 Kentaro Hara + + [V8][JSC] ScriptProfileNode::callUID needs not to be [Custom] + https://bugs.webkit.org/show_bug.cgi?id=101892 + + Reviewed by Adam Barth. + + Added callUID(), which enables us to kill custom bindings for ScriptProfileNode::callUID. + + * profiler/ProfileNode.h: + (JSC::ProfileNode::callUID): + +2012-11-12 Carlos Garcia Campos + + Unreviewed. Fix make distcheck. + + * GNUmakefile.list.am: Add missing header. + +2012-11-11 Michael Pruett + + Fix assertion failure in JSObject::tryGetIndexQuickly() + https://bugs.webkit.org/show_bug.cgi?id=101869 + + Reviewed by Filip Pizlo. + + Currently JSObject::tryGetIndexQuickly() triggers an assertion + failure when the object has an undecided indexing type. This + case should be treated the same as a blank indexing type. + + * runtime/JSObject.h: + (JSC::JSObject::tryGetIndexQuickly): + +2012-11-11 Filip Pizlo + + DFG register allocation should be greedy rather than round-robin + https://bugs.webkit.org/show_bug.cgi?id=101870 + + Reviewed by Geoffrey Garen. + + This simplifies the code, reduces some code duplication, and shows some slight + performance improvements in a few places, likely due to the fact that lower-numered + registers also typically have smaller encodings. + + * dfg/DFGRegisterBank.h: + (JSC::DFG::RegisterBank::RegisterBank): + (JSC::DFG::RegisterBank::tryAllocate): + (JSC::DFG::RegisterBank::allocate): + (JSC::DFG::RegisterBank::allocateInternal): + (RegisterBank): + +2012-11-11 Kenichi Ishibashi + + WTFString::utf8() should have a mode of conversion to use replacement character + https://bugs.webkit.org/show_bug.cgi?id=101678 + + Reviewed by Alexey Proskuryakov. + + Follow the change on String::utf8() + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): Pass String::StrictConversion instead of true to String::utf8(). + +2012-11-10 Filip Pizlo + + DFG should optimize out the NaN check on loads from double arrays if the array prototype chain is having a great time + https://bugs.webkit.org/show_bug.cgi?id=101718 + + Reviewed by Geoffrey Garen. + + If we're reading from a JSArray in double mode, where the array's structure is + primordial (all aspects of the structure are unchanged except for indexing type), + and the result of the load is used in arithmetic that is known to not distinguish + between NaN and undefined, then we should not emit a NaN check. Looks like a 5% + win on navier-stokes. + + Also fixed an OpInfo initialization goof for String ops that was revealed by this + change. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::arraySpeculationToString): + * dfg/DFGArrayMode.h: + (JSC::DFG::ArrayMode::isSaneChain): + (ArrayMode): + (JSC::DFG::ArrayMode::isInBounds): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleIntrinsic): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGNodeFlags.cpp: + (JSC::DFG::nodeFlagsAsString): + * dfg/DFGNodeFlags.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::arrayPrototypeChainIsSane): + (JSC): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + +2012-11-10 Filip Pizlo + + DFG constant folding and CFG simplification should be smart enough to know that if a logical op's operand is proven to have a non-masquerading structure then it always evaluates to true + https://bugs.webkit.org/show_bug.cgi?id=101511 + + Reviewed by Geoffrey Garen. + + This is the second attempt at this patch, which fixes the !"" case. + + To make life easier, this moves BranchDirection into BasicBlock so that after + running the CFA, we always know, for each block, what direction the CFA + proved. CFG simplification now both uses and preserves cfaBranchDirection in + its transformations. + + Also made both LogicalNot and Branch check whether the operand is a known cell + with a known structure, and if so, made them do the appropriate folding. + + 5% speed-up on V8/raytrace because it makes raytrace's own null checks + evaporate (i.e. idioms like 'if (!x) throw "unhappiness"') thanks to the fact + that we were already doing structure check hoisting. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::endBasicBlock): + (JSC::DFG::AbstractState::execute): + (JSC::DFG::AbstractState::mergeToSuccessors): + * dfg/DFGAbstractState.h: + (AbstractState): + * dfg/DFGBasicBlock.h: + (JSC::DFG::BasicBlock::BasicBlock): + (BasicBlock): + * dfg/DFGBranchDirection.h: Added. + (DFG): + (JSC::DFG::branchDirectionToString): + (JSC::DFG::isKnownDirection): + (JSC::DFG::branchCondition): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + +2012-11-10 Sheriff Bot + + Unreviewed, rolling out r133971. + http://trac.webkit.org/changeset/133971 + https://bugs.webkit.org/show_bug.cgi?id=101839 + + Causes WebProcess to hang at 100% on www.apple.com (Requested + by kling on #webkit). + + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::endBasicBlock): + (JSC::DFG::AbstractState::execute): + (JSC::DFG::AbstractState::mergeToSuccessors): + * dfg/DFGAbstractState.h: + (JSC::DFG::AbstractState::branchDirectionToString): + (AbstractState): + * dfg/DFGBasicBlock.h: + (JSC::DFG::BasicBlock::BasicBlock): + (BasicBlock): + * dfg/DFGBranchDirection.h: Removed. + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + +2012-11-09 Filip Pizlo + + If the DFG ArrayMode says that an access is on an OriginalArray, then the checks should always enforce this + https://bugs.webkit.org/show_bug.cgi?id=101720 + + Reviewed by Mark Hahnenberg. + + Previously, "original" arrays was just a hint that we could find the structure + of the array if we needed to even if the array profile didn't have it due to + polymorphism. Now, "original" arrays are a property that is actually checked: + if an array access has ArrayMode::arrayClass() == Array::OriginalArray, then we + can be sure that the code performing the access is dealing with not just a + JSArray, but a JSArray that has no named properties, no indexed accessors, and + the ArrayPrototype as its prototype. This will be useful for optimizations that + are being done as part of https://bugs.webkit.org/show_bug.cgi?id=101720. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::originalArrayStructure): + (DFG): + (JSC::DFG::ArrayMode::alreadyChecked): + * dfg/DFGArrayMode.h: + (JSC): + (DFG): + (JSC::DFG::ArrayMode::withProfile): + (ArrayMode): + (JSC::DFG::ArrayMode::benefitsFromOriginalArray): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::checkArray): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::compileGetByValOnString): + (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): + (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): + (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): + (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): + (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength): + +2012-11-09 Filip Pizlo + + Fix indentation of BooleanPrototype.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/BooleanPrototype.h: + +2012-11-09 Filip Pizlo + + Fix indentation of BooleanObject.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/BooleanObject.h: + +2012-11-09 Filip Pizlo + + Fix indentation of BooleanConstructor.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/BooleanConstructor.h: + +2012-11-09 Filip Pizlo + + Fix indentation of BatchedTransitionOptimizer.h + + Rubber stamped by Mark Hahnenberg. + + * runtime/BatchedTransitionOptimizer.h: + +2012-11-09 Oliver Hunt + + So Thingy probably isn't the best name for a class, so + renamed to CacheMap. + + RS=Geoff + + * runtime/CodeCache.h: + (JSC::CacheMap::CacheMap): + +2012-11-09 Filip Pizlo + + ArrayPrototype should start out with a blank indexing type + https://bugs.webkit.org/show_bug.cgi?id=101719 + + Reviewed by Mark Hahnenberg. + + This allows us to track if the array prototype ever ends up with indexed + properties. + + * runtime/ArrayPrototype.cpp: + (JSC::ArrayPrototype::create): + (JSC::ArrayPrototype::ArrayPrototype): + * runtime/ArrayPrototype.h: + (ArrayPrototype): + (JSC::ArrayPrototype::createStructure): + +2012-11-08 Mark Hahnenberg + + MarkStackArray should use the BlockAllocator instead of the MarkStackSegmentAllocator + https://bugs.webkit.org/show_bug.cgi?id=101642 + + Reviewed by Filip Pizlo. + + MarkStackSegmentAllocator is like a miniature version of the BlockAllocator. Now that the BlockAllocator has support + for a variety of block sizes, we should get rid of the MarkStackSegmentAllocator in favor of the BlockAllocator. + + * heap/BlockAllocator.h: Add new specializations of regionSetFor for the new MarkStackSegments. + (JSC): + (JSC::MarkStackSegment): + * heap/GCThreadSharedData.cpp: + (JSC::GCThreadSharedData::GCThreadSharedData): + (JSC::GCThreadSharedData::reset): + * heap/GCThreadSharedData.h: + (GCThreadSharedData): + * heap/MarkStack.cpp: + (JSC::MarkStackArray::MarkStackArray): We now have a doubly linked list of MarkStackSegments, so we need to refactor + all the places that used the old custom tail/previous logic. + (JSC::MarkStackArray::~MarkStackArray): + (JSC::MarkStackArray::expand): + (JSC::MarkStackArray::refill): + (JSC::MarkStackArray::donateSomeCellsTo): Refactor to use the new linked list. + (JSC::MarkStackArray::stealSomeCellsFrom): Ditto. + * heap/MarkStack.h: + (JSC): + (MarkStackSegment): + (JSC::MarkStackSegment::MarkStackSegment): + (JSC::MarkStackSegment::sizeFromCapacity): + (MarkStackArray): + * heap/MarkStackInlines.h: + (JSC::MarkStackSegment::create): + (JSC): + (JSC::MarkStackArray::postIncTop): + (JSC::MarkStackArray::preDecTop): + (JSC::MarkStackArray::setTopForFullSegment): + (JSC::MarkStackArray::setTopForEmptySegment): + (JSC::MarkStackArray::top): + (JSC::MarkStackArray::validatePrevious): + (JSC::MarkStackArray::append): + (JSC::MarkStackArray::removeLast): + (JSC::MarkStackArray::isEmpty): + (JSC::MarkStackArray::size): + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::SlotVisitor): + +2012-11-09 Gabor Ballabas + + [Qt] r133953 broke the ARM_TRADITIONAL build + https://bugs.webkit.org/show_bug.cgi?id=101706 + + Reviewed by Csaba Osztrogonác. + + Fix for both hardfp and softfp. + + * dfg/DFGCCallHelpers.h: + (CCallHelpers): + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + +2012-11-09 Sheriff Bot + + Unreviewed, rolling out r134051. + http://trac.webkit.org/changeset/134051 + https://bugs.webkit.org/show_bug.cgi?id=101757 + + It didn't fix the build (Requested by Ossy on #webkit). + + * dfg/DFGCCallHelpers.h: + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + +2012-11-09 Gabor Ballabas + + [Qt] r133953 broke the ARM_TRADITIONAL build + https://bugs.webkit.org/show_bug.cgi?id=101706 + + Reviewed by Csaba Osztrogonác. + + Fix the ARM_TRADITIONAL build after r133953 + + * dfg/DFGCCallHelpers.h: + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + (CCallHelpers): + +2012-11-09 Csaba Osztrogonác + + [Qt] Fix the LLINT build from ARMv7 platform + https://bugs.webkit.org/show_bug.cgi?id=101712 + + Reviewed by Simon Hausmann. + + Enable generating of LLIntAssembly.h on ARM platforms. + + * DerivedSources.pri: + * JavaScriptCore.pro: + +2012-11-08 Filip Pizlo + + ArrayPrototype.h should have correct indentation + + Rubber stamped by Sam Weinig. + + * runtime/ArrayPrototype.h: + +2012-11-08 Mark Lam + + Renamed ...InlineMethods.h files to ...Inlines.h. + https://bugs.webkit.org/show_bug.cgi?id=101145. + + Reviewed by Geoffrey Garen. + + This is only a refactoring effort to rename the files. There are no + functionality changes. + + * API/JSObjectRef.cpp: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + * dfg/DFGOperations.cpp: + * heap/ConservativeRoots.cpp: + * heap/CopiedBlock.h: + * heap/CopiedSpace.cpp: + * heap/CopiedSpaceInlineMethods.h: Removed. + * heap/CopiedSpaceInlines.h: Copied from Source/JavaScriptCore/heap/CopiedSpaceInlineMethods.h. + * heap/CopyVisitor.cpp: + * heap/CopyVisitorInlineMethods.h: Removed. + * heap/CopyVisitorInlines.h: Copied from Source/JavaScriptCore/heap/CopyVisitorInlineMethods.h. + * heap/GCThread.cpp: + * heap/GCThreadSharedData.cpp: + * heap/HandleStack.cpp: + * heap/Heap.cpp: + * heap/HeapRootVisitor.h: + * heap/MarkStack.cpp: + * heap/MarkStackInlineMethods.h: Removed. + * heap/MarkStackInlines.h: Copied from Source/JavaScriptCore/heap/MarkStackInlineMethods.h. + * heap/SlotVisitor.cpp: + * heap/SlotVisitor.h: + * heap/SlotVisitorInlineMethods.h: Removed. + * heap/SlotVisitorInlines.h: Copied from Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h. + * jit/HostCallReturnValue.cpp: + * jit/JIT.cpp: + * jit/JITArithmetic.cpp: + * jit/JITArithmetic32_64.cpp: + * jit/JITCall.cpp: + * jit/JITCall32_64.cpp: + * jit/JITInlineMethods.h: Removed. + * jit/JITInlines.h: Copied from Source/JavaScriptCore/jit/JITInlineMethods.h. + * jit/JITOpcodes.cpp: + * jit/JITOpcodes32_64.cpp: + * jit/JITPropertyAccess.cpp: + * jit/JITPropertyAccess32_64.cpp: + * jsc.cpp: + * runtime/ArrayConstructor.cpp: + * runtime/ArrayPrototype.cpp: + * runtime/ButterflyInlineMethods.h: Removed. + * runtime/ButterflyInlines.h: Copied from Source/JavaScriptCore/runtime/ButterflyInlineMethods.h. + * runtime/IndexingHeaderInlineMethods.h: Removed. + * runtime/IndexingHeaderInlines.h: Copied from Source/JavaScriptCore/runtime/IndexingHeaderInlineMethods.h. + * runtime/JSActivation.h: + * runtime/JSArray.cpp: + * runtime/JSArray.h: + * runtime/JSCell.h: + * runtime/JSObject.cpp: + * runtime/JSValueInlineMethods.h: Removed. + * runtime/JSValueInlines.h: Copied from Source/JavaScriptCore/runtime/JSValueInlineMethods.h. + * runtime/LiteralParser.cpp: + * runtime/ObjectConstructor.cpp: + * runtime/Operations.h: + * runtime/RegExpMatchesArray.cpp: + * runtime/RegExpObject.cpp: + * runtime/StringPrototype.cpp: + +2012-11-08 Filip Pizlo + + ArrayConstructor.h should have correct indentation + + Rubber stamped by Sam Weinig. + + * runtime/ArrayConstructor.h: + +2012-11-08 Filip Pizlo + + DFG should know that int == null is always false + https://bugs.webkit.org/show_bug.cgi?id=101665 + + Reviewed by Oliver Hunt. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + +2012-11-08 Filip Pizlo + + Arguments.h should have correct indentation + + Rubber stamped by Sam Weinig. + + * runtime/Arguments.h: + +2012-11-08 Filip Pizlo + + It should be possible to JIT compile get_by_vals and put_by_vals even if the DFG is disabled. + + Reviewed by Oliver Hunt. + + * jit/JITInlineMethods.h: + (JSC::JIT::chooseArrayMode): + +2012-11-08 Filip Pizlo + + op_call should have LLInt call link info even if the DFG is disabled + https://bugs.webkit.org/show_bug.cgi?id=101672 + + Reviewed by Oliver Hunt. + + Get rid of the evil uses of fall-through. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + +2012-11-08 Oliver Hunt + + Improve effectiveness of function-level caching + https://bugs.webkit.org/show_bug.cgi?id=101667 + + Reviewed by Filip Pizlo. + + Added a random-eviction based cache for unlinked functions, and switch + UnlinkedFunctionExecutable's code references to Weak<>, thereby letting + us remove the explicit UnlinkedFunctionExecutable::clearCode() calls that + were being triggered by GC. + + Refactored the random eviction part of the CodeCache into a separate data + structure so that I didn't have to duplicate the code again, and then used + that for the new function cache. + + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedFunctionExecutable::visitChildren): + (JSC::UnlinkedFunctionExecutable::codeBlockFor): + * bytecode/UnlinkedCodeBlock.h: + (JSC::UnlinkedFunctionExecutable::clearCodeForRecompilation): + (UnlinkedFunctionExecutable): + * debugger/Debugger.cpp: + * runtime/CodeCache.cpp: + (JSC::CodeCache::getCodeBlock): + (JSC::CodeCache::generateFunctionCodeBlock): + (JSC::CodeCache::getFunctionExecutableFromGlobalCode): + (JSC::CodeCache::usedFunctionCode): + (JSC): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::clearUnlinkedCodeForRecompilationIfNotCompiling): + (JSC::FunctionExecutable::clearCode): + * runtime/Executable.h: + (FunctionExecutable): + +2012-11-07 Filip Pizlo + + DFG constant folding and CFG simplification should be smart enough to know that if a logical op's operand is proven to have a non-masquerading structure then it always evaluates to true + https://bugs.webkit.org/show_bug.cgi?id=101511 + + Reviewed by Oliver Hunt. + + To make life easier, this moves BranchDirection into BasicBlock so that after + running the CFA, we always know, for each block, what direction the CFA + proved. CFG simplification now both uses and preserves cfaBranchDirection in + its transformations. + + Also made both LogicalNot and Branch check whether the operand is a known cell + with a known structure, and if so, made them do the appropriate folding. + + 5% speed-up on V8/raytrace because it makes raytrace's own null checks + evaporate (i.e. idioms like 'if (!x) throw "unhappiness"') thanks to the fact + that we were already doing structure check hoisting. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::endBasicBlock): + (JSC::DFG::AbstractState::execute): + (JSC::DFG::AbstractState::mergeToSuccessors): + * dfg/DFGAbstractState.h: + (AbstractState): + * dfg/DFGBasicBlock.h: + (JSC::DFG::BasicBlock::BasicBlock): + (BasicBlock): + * dfg/DFGBranchDirection.h: Added. + (DFG): + (JSC::DFG::branchDirectionToString): + (JSC::DFG::isKnownDirection): + (JSC::DFG::branchCondition): + * dfg/DFGCFGSimplificationPhase.cpp: + (JSC::DFG::CFGSimplificationPhase::run): + (JSC::DFG::CFGSimplificationPhase::mergeBlocks): + +2012-11-08 Christophe Dumez + + [JSC] HTML extensions to String.prototype should escape " as " in argument values + https://bugs.webkit.org/show_bug.cgi?id=90667 + + Reviewed by Benjamin Poulain. + + Escape quotation mark as " in argument values to: + - String.prototype.anchor(name) + - String.prototype.fontcolor(color) + - String.prototype.fontsize(size) + - String.prototype.link(href) + + This behavior matches Chromium/V8 and Firefox/Spidermonkey + implementations and is requited by: + http://mathias.html5.org/specs/javascript/#escapeattributevalue + + This also fixes a potential security risk (XSS vector). + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + (JSC::stringProtoFuncLink): + +2012-11-08 Anders Carlsson + + HeapStatistics::s_pauseTimeStarts and s_pauseTimeEnds should be Vectors + https://bugs.webkit.org/show_bug.cgi?id=101651 + + Reviewed by Andreas Kling. + + HeapStatistics uses Deques when Vectors would work just as good. + + * heap/HeapStatistics.cpp: + * heap/HeapStatistics.h: + (HeapStatistics): + +2012-11-07 Filip Pizlo + + DFG should not assume that something is a double just because it might be undefined + https://bugs.webkit.org/show_bug.cgi?id=101438 + + Reviewed by Oliver Hunt. + + This changes all non-bitop arithmetic to (a) statically expect that variables are + defined prior to use in arithmetic and (b) not fall off into double paths just + because a value may not be a number. This is accomplished with two new notions of + speculation: + + shouldSpeculateIntegerExpectingDefined: Should we speculate that the value is an + integer if we ignore undefined (i.e. SpecOther) predictions? + + shouldSpeculateIntegerForArithmetic: Should we speculate that the value is an + integer if we ignore non-numeric predictions? + + This is a ~2x speed-up on programs that seem to our prediction propagator to have + paths in which otherwise numeric variables are undefined. + + * bytecode/SpeculatedType.h: + (JSC::isInt32SpeculationForArithmetic): + (JSC): + (JSC::isInt32SpeculationExpectingDefined): + (JSC::isDoubleSpeculationForArithmetic): + (JSC::isNumberSpeculationExpectingDefined): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::addShouldSpeculateInteger): + (JSC::DFG::Graph::mulShouldSpeculateInteger): + (JSC::DFG::Graph::negateShouldSpeculateInteger): + (JSC::DFG::Graph::addImmediateShouldSpeculateInteger): + (JSC::DFG::Graph::mulImmediateShouldSpeculateInteger): + * dfg/DFGNode.h: + (JSC::DFG::Node::shouldSpeculateIntegerForArithmetic): + (Node): + (JSC::DFG::Node::shouldSpeculateIntegerExpectingDefined): + (JSC::DFG::Node::shouldSpeculateDoubleForArithmetic): + (JSC::DFG::Node::shouldSpeculateNumberExpectingDefined): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileAdd): + (JSC::DFG::SpeculativeJIT::compileArithMod): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_div): + +2012-11-06 Filip Pizlo + + JSC should infer when indexed storage contains only integers or doubles + https://bugs.webkit.org/show_bug.cgi?id=98606 + + Reviewed by Oliver Hunt. + + This adds two new indexing types: int32 and double. It also adds array allocation profiling, + which allows array allocations to converge to allocating arrays using those types to which + those arrays would have been converted. + + 20% speed-up on navier-stokes. 40% speed-up on various Kraken DSP tests. Some slow-downs too, + but a performance win overall on all benchmarks we track. + + * API/JSObjectRef.cpp: + (JSObjectMakeArray): + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * assembler/AbstractMacroAssembler.h: + (JumpList): + (JSC::AbstractMacroAssembler::JumpList::JumpList): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::branchDouble): + * assembler/X86Assembler.h: + (JSC::X86Assembler::jnp): + (X86Assembler): + (JSC::X86Assembler::X86InstructionFormatter::emitRex): + * bytecode/ArrayAllocationProfile.cpp: Added. + (JSC): + (JSC::ArrayAllocationProfile::updateIndexingType): + * bytecode/ArrayAllocationProfile.h: Added. + (JSC): + (ArrayAllocationProfile): + (JSC::ArrayAllocationProfile::ArrayAllocationProfile): + (JSC::ArrayAllocationProfile::selectIndexingType): + (JSC::ArrayAllocationProfile::updateLastAllocation): + (JSC::ArrayAllocationProfile::selectIndexingTypeFor): + (JSC::ArrayAllocationProfile::updateLastAllocationFor): + * bytecode/ArrayProfile.cpp: + (JSC::ArrayProfile::updatedObservedArrayModes): + (JSC): + * bytecode/ArrayProfile.h: + (JSC): + (JSC::arrayModesInclude): + (JSC::shouldUseSlowPutArrayStorage): + (JSC::shouldUseFastArrayStorage): + (JSC::shouldUseContiguous): + (JSC::shouldUseDouble): + (JSC::shouldUseInt32): + (ArrayProfile): + * bytecode/ByValInfo.h: + (JSC::isOptimizableIndexingType): + (JSC::jitArrayModeForIndexingType): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::updateAllPredictionsAndCountLiveness): + (JSC): + (JSC::CodeBlock::updateAllValueProfilePredictions): + (JSC::CodeBlock::updateAllArrayPredictions): + (JSC::CodeBlock::updateAllPredictions): + (JSC::CodeBlock::shouldOptimizeNow): + * bytecode/CodeBlock.h: + (CodeBlock): + (JSC::CodeBlock::numberOfArrayAllocationProfiles): + (JSC::CodeBlock::addArrayAllocationProfile): + (JSC::CodeBlock::updateAllValueProfilePredictions): + (JSC::CodeBlock::updateAllArrayPredictions): + * bytecode/DFGExitProfile.h: + (JSC::DFG::exitKindToString): + * bytecode/Instruction.h: + (JSC): + (JSC::Instruction::Instruction): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/SpeculatedType.h: + (JSC): + (JSC::isRealNumberSpeculation): + * bytecode/UnlinkedCodeBlock.cpp: + (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): + * bytecode/UnlinkedCodeBlock.h: + (JSC): + (JSC::UnlinkedCodeBlock::addArrayAllocationProfile): + (JSC::UnlinkedCodeBlock::numberOfArrayAllocationProfiles): + (UnlinkedCodeBlock): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::newArrayAllocationProfile): + (JSC): + (JSC::BytecodeGenerator::emitNewArray): + (JSC::BytecodeGenerator::emitExpectedFunctionSnippet): + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::fromObserved): + (JSC::DFG::ArrayMode::refine): + (DFG): + (JSC::DFG::ArrayMode::alreadyChecked): + (JSC::DFG::arrayTypeToString): + * dfg/DFGArrayMode.h: + (JSC::DFG::ArrayMode::withType): + (ArrayMode): + (JSC::DFG::ArrayMode::withTypeAndConversion): + (JSC::DFG::ArrayMode::usesButterfly): + (JSC::DFG::ArrayMode::isSpecific): + (JSC::DFG::ArrayMode::supportsLength): + (JSC::DFG::ArrayMode::arrayModesThatPassFiltering): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getArrayMode): + (ByteCodeParser): + (JSC::DFG::ByteCodeParser::handleIntrinsic): + (JSC::DFG::ByteCodeParser::handleConstantInternalFunction): + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCCallHelpers.h: + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + (CCallHelpers): + * dfg/DFGCallArrayAllocatorSlowPathGenerator.h: + (JSC::DFG::CallArrayAllocatorSlowPathGenerator::generateInternal): + (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::generateInternal): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::byValIsPure): + * dfg/DFGNode.h: + (NewArrayBufferData): + (JSC::DFG::Node::hasIndexingType): + (Node): + (JSC::DFG::Node::indexingType): + (JSC::DFG::Node::setIndexingType): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + (DFG): + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::arrayify): + (JSC::DFG::SpeculativeJIT::compileDoublePutByVal): + (JSC::DFG::SpeculativeJIT::compileGetArrayLength): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + (SpeculativeJIT): + (SpeculateIntegerOperand): + (JSC::DFG::SpeculateIntegerOperand::use): + (SpeculateDoubleOperand): + (JSC::DFG::SpeculateDoubleOperand::use): + * dfg/DFGSpeculativeJIT32_64.cpp: + (DFG): + (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JIT.h: + (JSC::JIT::emitInt32GetByVal): + (JIT): + (JSC::JIT::emitInt32PutByVal): + (JSC::JIT::emitDoublePutByVal): + (JSC::JIT::emitContiguousPutByVal): + * jit/JITExceptions.cpp: + (JSC::genericThrow): + * jit/JITInlineMethods.h: + (JSC::arrayProfileSaw): + (JSC::JIT::chooseArrayMode): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_array): + (JSC::JIT::emit_op_new_array_with_size): + (JSC::JIT::emit_op_new_array_buffer): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitDoubleGetByVal): + (JSC): + (JSC::JIT::emitContiguousGetByVal): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitGenericContiguousPutByVal): + (JSC::JIT::emitSlow_op_put_by_val): + (JSC::JIT::privateCompileGetByVal): + (JSC::JIT::privateCompilePutByVal): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitContiguousGetByVal): + (JSC::JIT::emitDoubleGetByVal): + (JSC): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitGenericContiguousPutByVal): + (JSC::JIT::emitSlow_op_put_by_val): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC): + * jsc.cpp: + (GlobalObject::finishCreation): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::jitCompileAndSetHeuristics): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * offlineasm/x86.rb: + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): + * runtime/ArrayConstructor.h: + (JSC): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncConcat): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + * runtime/Butterfly.h: + (JSC::Butterfly::contiguousInt32): + (JSC::Butterfly::contiguousDouble): + (JSC::Butterfly::fromContiguous): + * runtime/ButterflyInlineMethods.h: + (JSC::Butterfly::createUninitializedDuringCollection): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncBind): + * runtime/IndexingHeaderInlineMethods.h: + (JSC::IndexingHeader::indexingPayloadSizeInBytes): + * runtime/IndexingType.cpp: + (JSC::leastUpperBoundOfIndexingTypes): + (JSC): + (JSC::leastUpperBoundOfIndexingTypeAndType): + (JSC::leastUpperBoundOfIndexingTypeAndValue): + (JSC::indexingTypeToString): + * runtime/IndexingType.h: + (JSC): + (JSC::hasUndecided): + (JSC::hasInt32): + (JSC::hasDouble): + * runtime/JSArray.cpp: + (JSC::JSArray::setLength): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCountWithAnyIndexingType): + (JSC::JSArray::unshiftCountWithAnyIndexingType): + (JSC::compareNumbersForQSortWithInt32): + (JSC): + (JSC::compareNumbersForQSortWithDouble): + (JSC::JSArray::sortNumericVector): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sortCompactedVector): + (JSC::JSArray::sort): + (JSC::JSArray::sortVector): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToArguments): + (JSC::JSArray::compactForSorting): + * runtime/JSArray.h: + (JSArray): + (JSC::createContiguousArrayButterfly): + (JSC::JSArray::create): + (JSC::JSArray::tryCreateUninitialized): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC): + (JSC::JSGlobalObject::haveABadTime): + (JSC::JSGlobalObject::visitChildren): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + (JSC::JSGlobalObject::originalArrayStructureForIndexingType): + (JSC::JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation): + (JSC::JSGlobalObject::arrayStructureForProfileDuringAllocation): + (JSC::JSGlobalObject::isOriginalArrayStructure): + (JSC::constructEmptyArray): + (JSC::constructArray): + * runtime/JSObject.cpp: + (JSC::JSObject::copyButterfly): + (JSC::JSObject::getOwnPropertySlotByIndex): + (JSC::JSObject::putByIndex): + (JSC::JSObject::enterDictionaryIndexingMode): + (JSC::JSObject::createInitialIndexedStorage): + (JSC): + (JSC::JSObject::createInitialUndecided): + (JSC::JSObject::createInitialInt32): + (JSC::JSObject::createInitialDouble): + (JSC::JSObject::createInitialContiguous): + (JSC::JSObject::convertUndecidedToInt32): + (JSC::JSObject::convertUndecidedToDouble): + (JSC::JSObject::convertUndecidedToContiguous): + (JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements): + (JSC::JSObject::convertUndecidedToArrayStorage): + (JSC::JSObject::convertInt32ToDouble): + (JSC::JSObject::convertInt32ToContiguous): + (JSC::JSObject::convertInt32ToArrayStorage): + (JSC::JSObject::convertDoubleToContiguous): + (JSC::JSObject::convertDoubleToArrayStorage): + (JSC::JSObject::convertContiguousToArrayStorage): + (JSC::JSObject::convertUndecidedForValue): + (JSC::JSObject::convertInt32ForValue): + (JSC::JSObject::setIndexQuicklyToUndecided): + (JSC::JSObject::convertInt32ToDoubleOrContiguousWhilePerformingSetIndex): + (JSC::JSObject::convertDoubleToContiguousWhilePerformingSetIndex): + (JSC::JSObject::ensureInt32Slow): + (JSC::JSObject::ensureDoubleSlow): + (JSC::JSObject::ensureContiguousSlow): + (JSC::JSObject::ensureArrayStorageSlow): + (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode): + (JSC::JSObject::switchToSlowPutArrayStorage): + (JSC::JSObject::deletePropertyByIndex): + (JSC::JSObject::getOwnPropertyNames): + (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes): + (JSC::JSObject::putByIndexBeyondVectorLength): + (JSC::JSObject::putDirectIndexBeyondVectorLength): + (JSC::JSObject::getNewVectorLength): + (JSC::JSObject::countElements): + (JSC::JSObject::ensureLengthSlow): + (JSC::JSObject::getOwnPropertyDescriptor): + * runtime/JSObject.h: + (JSC::JSObject::getArrayLength): + (JSC::JSObject::getVectorLength): + (JSC::JSObject::canGetIndexQuickly): + (JSC::JSObject::getIndexQuickly): + (JSC::JSObject::tryGetIndexQuickly): + (JSC::JSObject::canSetIndexQuickly): + (JSC::JSObject::canSetIndexQuicklyForPutDirect): + (JSC::JSObject::setIndexQuickly): + (JSC::JSObject::initializeIndex): + (JSC::JSObject::hasSparseMap): + (JSC::JSObject::inSparseIndexingMode): + (JSObject): + (JSC::JSObject::ensureInt32): + (JSC::JSObject::ensureDouble): + (JSC::JSObject::ensureLength): + (JSC::JSObject::indexingData): + (JSC::JSObject::currentIndexingData): + (JSC::JSObject::getHolyIndexQuickly): + (JSC::JSObject::relevantLength): + (JSC::JSObject::currentRelevantLength): + * runtime/JSValue.cpp: + (JSC::JSValue::description): + * runtime/LiteralParser.cpp: + (JSC::::parse): + * runtime/ObjectConstructor.cpp: + (JSC::objectConstructorGetOwnPropertyNames): + (JSC::objectConstructorKeys): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSplit): + * runtime/Structure.cpp: + (JSC::Structure::nonPropertyTransition): + * runtime/StructureTransitionTable.h: + (JSC::newIndexingType): + +2012-11-08 Balazs Kilvady + + ASSERT problem on MIPS + https://bugs.webkit.org/show_bug.cgi?id=100589 + + Reviewed by Oliver Hunt. + + ASSERT fix for MIPS arch. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_resolve_operations): + +2012-11-08 Michael Saboff + + OpaqueJSClassContextData() should use StringImpl::isolatedCopy() to make string copies + https://bugs.webkit.org/show_bug.cgi?id=101507 + + Reviewed by Andreas Kling. + + Changed to use isolatedCopy() for key Strings. + + * API/JSClassRef.cpp: + (OpaqueJSClassContextData::OpaqueJSClassContextData): + +2012-11-07 Mark Hahnenberg + + WeakBlocks should be HeapBlocks + https://bugs.webkit.org/show_bug.cgi?id=101411 + + Reviewed by Oliver Hunt. + + Currently WeakBlocks use fastMalloc memory. They are very similar to the other HeapBlocks, however, + so we should change them to being allocated with the BlockAllocator. + + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::BlockAllocator): + * heap/BlockAllocator.h: Added a new RegionSet for WeakBlocks. + (JSC): + (BlockAllocator): + (JSC::WeakBlock): + * heap/Heap.h: Friended WeakSet to allow access to the BlockAllocator. + (Heap): + * heap/WeakBlock.cpp: + (JSC::WeakBlock::create): Refactored to use HeapBlocks rather than fastMalloc. + (JSC::WeakBlock::WeakBlock): + * heap/WeakBlock.h: Changed the WeakBlock size to 4 KB so that it divides evenly into the Region size. + (JSC): + (WeakBlock): + * heap/WeakSet.cpp: + (JSC::WeakSet::~WeakSet): + (JSC::WeakSet::addAllocator): + +2012-11-07 Filip Pizlo + + Indentation of ArgList.h is wrong + https://bugs.webkit.org/show_bug.cgi?id=101441 + + Reviewed by Andreas Kling. + + Just unindented by 4 spaces. + + * runtime/ArgList.h: + +2012-11-07 Gabor Ballabas + + [Qt][ARM] REGRESSION(r133688): It made all JSC and layout tests crash on ARM traditional platform + https://bugs.webkit.org/show_bug.cgi?id=101465 + + Reviewed by Oliver Hunt. + + Fix failing javascriptcore tests on ARM after r133688 + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + +2012-11-06 Oliver Hunt + + Reduce parser overhead in JSC + https://bugs.webkit.org/show_bug.cgi?id=101127 + + Reviewed by Filip Pizlo. + + An exciting journey into the world of architecture in which our hero + adds yet another layer to JSC codegeneration. + + This patch adds a marginally more compact form of bytecode that is + free from any data specific to a given execution context, and that + does store any data structures necessary for execution. To actually + execute this UnlinkedBytecode we still need to instantiate a real + CodeBlock, but this is a much faster linear time operation than any + of the earlier parsing or code generation passes. + + As the unlinked code is context free we can then simply use a cache + from source to unlinked code mapping to completely avoid all of the + old parser overhead. The cache is currently very simple and memory + heavy, using the complete source text as a key (rather than SourceCode + or equivalent), and a random eviction policy. + + This seems to produce a substantial win when loading identical content + in different contexts. + + * API/tests/testapi.c: + (main): + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + * bytecode/CodeBlock.h: + Moved a number of fields, and a bunch of logic to UnlinkedCodeBlock.h/cpp + * bytecode/Opcode.h: + Added a global const init no op instruction needed to get correct + behaviour without any associated semantics. + * bytecode/UnlinkedCodeBlock.cpp: Added. + * bytecode/UnlinkedCodeBlock.h: Added. + A fairly shallow, GC allocated version of the old CodeBlock + classes with a 32bit instruction size, and just metadata + size tracking. + * bytecompiler/BytecodeGenerator.cpp: + * bytecompiler/BytecodeGenerator.h: + Replace direct access to m_symbolTable with access through + symbolTable(). ProgramCode no longer has a symbol table at + all so some previously unconditional (and pointless) uses + of symbolTable get null checks. + A few other changes to deal with type changes due to us generating + unlinked code (eg. pointer free, so profile indices rather than + pointers). + * dfg/DFGByteCodeParser.cpp: + * dfg/DFGCapabilities.h: + Support global_init_nop + * interpreter/Interpreter.cpp: + Now get the ProgramExecutable to initialise new global properties + before starting execution. + * jit/JIT.cpp: + * jit/JITDriver.h: + * jit/JITStubs.cpp: + * llint/LLIntData.cpp: + * llint/LLIntSlowPaths.cpp: + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + Adding init_global_const_nop everywhere else + * parser/Parser.h: + * parser/ParserModes.h: Added. + * parser/ParserTokens.h: + Parser no longer needs a global object or callframe to function + * runtime/CodeCache.cpp: Added. + * runtime/CodeCache.h: Added. + A simple, random eviction, Source->UnlinkedCode cache + * runtime/Executable.cpp: + * runtime/Executable.h: + Executables now reference their unlinked counterparts, and + request code specifically for the target global object. + * runtime/JSGlobalData.cpp: + * runtime/JSGlobalData.h: + GlobalData now owns a CodeCache and a set of new structures + for the unlinked code types. + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalObject.h: + Utility functions used by executables to perform compilation + + * runtime/JSType.h: + Add new JSTypes for unlinked code + +2012-11-06 Michael Saboff + + JSStringCreateWithCFString() Should create an 8 bit String if possible + https://bugs.webkit.org/show_bug.cgi?id=101104 + + Reviewed by Darin Adler. + + Try converting the CFString to an 8 bit string using CFStringGetBytes(..., + kCFStringEncodingISOLatin1, ...) and return the 8 bit string if successful. + If not proceed with 16 bit conversion. + + * API/JSStringRefCF.cpp: + (JSStringCreateWithCFString): + +2012-11-06 Oliver Hunt + + Reduce direct m_symbolTable usage in CodeBlock + https://bugs.webkit.org/show_bug.cgi?id=101391 + + Reviewed by Sam Weinig. + + Simple refactoring. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::dumpStatistics): + (JSC::CodeBlock::nameForRegister): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isCaptured): + +2012-11-06 Michael Saboff + + Lexer::scanRegExp, create 8 bit pattern and flag Identifiers from 16 bit source when possible + https://bugs.webkit.org/show_bug.cgi?id=101013 + + Reviewed by Darin Adler. + + Changed scanRegExp so that it will create 8 bit identifiers from 8 bit sources and from 16 bit sources + whan all the characters are 8 bit. Using two templated helpers, the "is all 8 bit" check is only performed + on 16 bit sources. The first helper is orCharacter() that will accumulate the or value of all characters + only for 16 bit sources. Replaced the helper Lexer::makeIdentifierSameType() with Lexer::makeRightSizedIdentifier(). + + * parser/Lexer.cpp: + (JSC::orCharacter): Explicit template that serves as a placeholder. + (JSC::orCharacter): Explicit template that actually or accumulates characters. + (JSC::Lexer::scanRegExp): + * parser/Lexer.h: + (Lexer): + (JSC::Lexer::makeRightSizedIdentifier): New template that always creates an 8 bit Identifier. + (JSC::Lexer::makeRightSizedIdentifier): New template that creates an 8 bit Identifier for 8 bit + data in a 16 bit source. + +2012-11-06 Filip Pizlo + + Indentation of JSCell.h is wrong + https://bugs.webkit.org/show_bug.cgi?id=101379 + + Rubber stamped by Alexey Proskuryakov. + + Just removed four spaces on a bunch of lines. + + * runtime/JSCell.h: + +2012-11-05 Filip Pizlo + + Indentation of JSObject.h is wrong + https://bugs.webkit.org/show_bug.cgi?id=101313 + + Rubber stamped by Alexey Proskuryakov. + + Just unindented code, since namespace bodies shouldn't be indented. + + * runtime/JSObject.h: + +2012-11-05 Filip Pizlo + + Indentation of JSArray.h is wrong + https://bugs.webkit.org/show_bug.cgi?id=101314 + + Rubber stamped by Alexey Proskuryakov. + + Just removing the indentation inside the namespace body. + + * runtime/JSArray.h: + +2012-11-05 Filip Pizlo + + DFG should not fall down to patchable GetById just because a prototype had things added to it + https://bugs.webkit.org/show_bug.cgi?id=101299 + + Reviewed by Geoffrey Garen. + + This looks like a slight win on V8v7 and SunSpider. + + * bytecode/DFGExitProfile.h: + (JSC::DFG::exitKindToString): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-11-05 Filip Pizlo + + Get rid of method_check + https://bugs.webkit.org/show_bug.cgi?id=101147 + + Reviewed by Geoffrey Garen. + + op_method_check no longer buys us anything, since get_by_id proto caching + gives just as much profiling information and the DFG inlines monomorphic + proto accesses anyway. + + This also has the potential for a speed-up since it makes parsing of + profiling data easier. No longer do we have to deal with the confusion of + the get_by_id portion of a method_check appearing monomorphic even though + we're really dealing with a bimorphic access (method_check specializes for + one case and get_by_id for another). + + This looks like a 1% speed-up on both SunSpider and V8v7. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printGetByIdCacheStatus): + (JSC::CodeBlock::dump): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::shrinkToFit): + (JSC::CodeBlock::unlinkCalls): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getCallLinkInfo): + (JSC::CodeBlock::callLinkInfo): + (CodeBlock): + * bytecode/GetByIdStatus.cpp: + (JSC::GetByIdStatus::computeFromLLInt): + * bytecode/MethodCallLinkInfo.cpp: Removed. + * bytecode/MethodCallLinkInfo.h: Removed. + * bytecode/MethodCallLinkStatus.cpp: Removed. + * bytecode/MethodCallLinkStatus.h: Removed. + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecompiler/BytecodeGenerator.cpp: + (JSC): + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): + * bytecompiler/NodesCodegen.cpp: + (JSC::FunctionCallDotNode::emitBytecode): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + (JSC::PropertyStubCompilationInfo::copyToStubInfo): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::PropertyStubCompilationInfo::slowCaseInfo): + (PropertyStubCompilationInfo): + (JSC): + (JIT): + * jit/JITPropertyAccess.cpp: + (JSC): + (JSC::JIT::emitSlow_op_get_by_id): + (JSC::JIT::compileGetByIdSlowCase): + * jit/JITPropertyAccess32_64.cpp: + (JSC): + (JSC::JIT::compileGetByIdSlowCase): + * jit/JITStubs.cpp: + (JSC): + * jit/JITStubs.h: + * llint/LowLevelInterpreter.asm: + +2012-11-05 Yuqiang Xian + + Refactor LLInt64 to distinguish the pointer operations from the 64-bit integer operations + https://bugs.webkit.org/show_bug.cgi?id=100321 + + Reviewed by Filip Pizlo. + + We have refactored the MacroAssembler and JIT compilers to distinguish + the pointer operations from the 64-bit integer operations (see bug #99154). + Now we want to do the similar work for LLInt, and the goal is same as + the one mentioned in 99154. + + This is the second part of the modification: in the low level interpreter, + changing the operations on 64-bit integers to use the "q" instructions. + This also removes some unused/meaningless "p" instructions. + + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter.cpp: + (JSC::CLoop::execute): + * llint/LowLevelInterpreter64.asm: + * offlineasm/armv7.rb: + * offlineasm/cloop.rb: + * offlineasm/instructions.rb: + * offlineasm/x86.rb: + +2012-11-05 Filip Pizlo + + Prototype chain caching should check that the path from the base object to the slot base involves prototype hops only + https://bugs.webkit.org/show_bug.cgi?id=101276 + + Reviewed by Gavin Barraclough. + + Changed normalizePrototypeChain() to report an invalid prototype chain if any object is a proxy. + This catches cases where our prototype chain checks would have been insufficient to guard against + newly introduced properties, despecialized properties, or deleted properties in the chain of + objects involved in the access. + + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + (JSC::DFG::tryBuildGetByIDProtoList): + (JSC::DFG::tryCachePutByID): + (JSC::DFG::tryBuildPutByIdList): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * runtime/Operations.h: + (JSC): + (JSC::normalizePrototypeChain): + +2012-11-05 Dima Gorbik + + Back out controversial changes from Bug 98665. + https://bugs.webkit.org/show_bug.cgi?id=101244 + + Reviewed by David Kilzer. + + Backing out changes from Bug 98665 until further discussions take place on rules for including Platform.h in Assertions.h. + + * API/tests/minidom.c: + * API/tests/testapi.c: + +2012-11-04 Filip Pizlo + + Reduce the verbosity of referring to QNaN in JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=101174 + + Reviewed by Geoffrey Garen. + + Introduces a #define QNaN in JSValue.h, and replaces all previous uses of + std::numeric_limits::quiet_NaN() with QNaN. + + * API/JSValueRef.cpp: + (JSValueMakeNumber): + (JSValueToNumber): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitFloatTypedArrayGetByVal): + * runtime/CachedTranscendentalFunction.h: + (JSC::CachedTranscendentalFunction::initialize): + * runtime/DateConstructor.cpp: + (JSC::constructDate): + * runtime/DateInstanceCache.h: + (JSC::DateInstanceData::DateInstanceData): + (JSC::DateInstanceCache::reset): + * runtime/ExceptionHelpers.cpp: + (JSC::InterruptedExecutionError::defaultValue): + (JSC::TerminatedExecutionError::defaultValue): + * runtime/JSCell.h: + (JSC::JSValue::getPrimitiveNumber): + * runtime/JSDateMath.cpp: + (JSC::parseDateFromNullTerminatedCharacters): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::resetDateCache): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::parseInt): + (JSC::jsStrDecimalLiteral): + (JSC::toDouble): + (JSC::jsToNumber): + (JSC::parseFloat): + * runtime/JSValue.cpp: + (JSC::JSValue::toNumberSlowCase): + * runtime/JSValue.h: + (JSC): + * runtime/JSValueInlineMethods.h: + (JSC::jsNaN): + * runtime/MathObject.cpp: + (JSC::mathProtoFuncMax): + (JSC::mathProtoFuncMin): + +2012-11-03 Filip Pizlo + + Baseline JIT should use structure watchpoints whenever possible + https://bugs.webkit.org/show_bug.cgi?id=101146 + + Reviewed by Sam Weinig. + + No speed-up yet except on toy programs. I think that it will start to show + speed-ups with https://bugs.webkit.org/show_bug.cgi?id=101147, which this is + a step towards. + + * jit/JIT.h: + (JIT): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::addStructureTransitionCheck): + (JSC): + (JSC::JIT::testPrototype): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + +2012-11-04 Csaba Osztrogonác + + [Qt] udis86_itab.c is always regenerated + https://bugs.webkit.org/show_bug.cgi?id=100756 + + Reviewed by Simon Hausmann. + + * DerivedSources.pri: Generate sources to the generated directory. + * disassembler/udis86/differences.txt: + * disassembler/udis86/itab.py: Add --outputDir option. + (UdItabGenerator.__init__): + (genItabH): + (genItabC): + (main): + +2012-11-02 Filip Pizlo + + LLInt 32-bit put_by_val ArrayStorage case should use the right register (t3, not t2) for the index in the publicLength updating path + https://bugs.webkit.org/show_bug.cgi?id=101118 + + Reviewed by Gavin Barraclough. + + * llint/LowLevelInterpreter32_64.asm: + +2012-11-02 Filip Pizlo + + DFG::Node::converToStructureTransitionWatchpoint should take kindly to ArrayifyToStructure + https://bugs.webkit.org/show_bug.cgi?id=101117 + + Reviewed by Gavin Barraclough. + + We have logic to convert ArrayifyToStructure to StructureTransitionWatchpoint, which is awesome, except + that previously convertToStructureTransitionWatchpoint was (a) asserting that it never saw an + ArrayifyToStructure and (b) would incorrectly create a ForwardStructureTransitionWatchpoint if it did. + + * dfg/DFGNode.h: + (JSC::DFG::Node::convertToStructureTransitionWatchpoint): + +2012-11-02 Filip Pizlo + + DFG::SpeculativeJIT::typedArrayDescriptor should use the Float64Array descriptor for Float64Arrays + https://bugs.webkit.org/show_bug.cgi?id=101114 + + Reviewed by Gavin Barraclough. + + As in https://bugs.webkit.org/show_bug.cgi?id=101112, this was only wrong when Float64Array descriptors + hadn't been initialized yet. That happens rarely, but when it does happen, we would crash. + + This would also become much more wrong if we ever put type size info (num bytes, etc) in the descriptor + and used that directly. So it's good to fix it. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::typedArrayDescriptor): + +2012-11-02 Filip Pizlo + + JIT::privateCompileGetByVal should use the uint8ClampedArrayDescriptor for compiling accesses to Uint8ClampedArrays + https://bugs.webkit.org/show_bug.cgi?id=101112 + + Reviewed by Gavin Barraclough. + + The only reason why the code was wrong to use uint8ArrayDescriptor instead is that if we're just using + Uint8ClampedArrays then the descriptor for Uint8Array may not have been initialized. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByVal): + +2012-11-02 Mark Hahnenberg + + MarkedBlocks should use something other than the mark bits to indicate liveness for newly allocated objects + https://bugs.webkit.org/show_bug.cgi?id=100877 + + Reviewed by Filip Pizlo. + + Currently when we canonicalize cell liveness data in MarkedBlocks, we set the mark bit for every cell in the + block except for those in the free list. This allows us to consider objects that were allocated since the + previous collection to be considered live until they have a chance to be properly marked by the collector. + + If we want to use the mark bits to signify other types of information, e.g. using sticky mark bits for generational + collection, we will have to keep track of newly allocated objects in a different fashion when we canonicalize cell liveness. + + One method would be to allocate a separate set of bits while canonicalizing liveness data. These bits would + track the newly allocated objects in the block separately from those objects who had already been marked. We would + then check these bits, along with the mark bits, when determining liveness. + + * heap/Heap.h: + (Heap): + (JSC::Heap::isLive): We now check for the presence of the newlyAllocated Bitmap. + (JSC): + * heap/MarkedBlock.cpp: + (JSC::MarkedBlock::specializedSweep): We clear the newlyAllocated Bitmap if we're creating a free list. This + will happen if we canonicalize liveness data for some other reason than collection (e.g. forEachCell) and + then start allocating again. + (JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor): + (SetNewlyAllocatedFunctor): + (JSC::SetNewlyAllocatedFunctor::operator()): We set the newlyAllocated bits for all the objects + that aren't already marked. We undo the bits for the objects in the free list later in canonicalizeCellLivenessData. + (JSC::MarkedBlock::canonicalizeCellLivenessData): We should never have a FreeListed block with a newlyAllocated Bitmap. + We allocate the new Bitmap, set the bits for all the objects that aren't already marked, and then unset all of the + bits for the items currently in the FreeList. + * heap/MarkedBlock.h: + (JSC::MarkedBlock::clearMarks): We clear the newlyAllocated bitmap if it exists because at this point we don't need it + any more. + (JSC::MarkedBlock::isEmpty): If we have some objects that are newlyAllocated, we are not empty. + (JSC::MarkedBlock::isNewlyAllocated): + (JSC): + (JSC::MarkedBlock::setNewlyAllocated): + (JSC::MarkedBlock::clearNewlyAllocated): + (JSC::MarkedBlock::isLive): We now check the newlyAllocated Bitmap, if it exists, when determining liveness of a cell in + a block that is Marked. + * heap/WeakBlock.cpp: + (JSC::WeakBlock::visit): We need to make sure we don't finalize objects that are in the newlyAllocated Bitmap. + (JSC::WeakBlock::reap): Ditto. + +2012-11-02 Filip Pizlo + + JIT::privateCompileGetByVal should use MacroAssemblerCodePtr::createFromExecutableAddress like JIT::privateCompilePutByVal + https://bugs.webkit.org/show_bug.cgi?id=101109 + + Reviewed by Gavin Barraclough. + + This fixes crashes on ARMv7 resulting from the return address already being tagged with the THUMB2 bit. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByVal): + +2012-11-02 Simon Fraser + + Enable SUBPIXEL_LAYOUT on Mac + https://bugs.webkit.org/show_bug.cgi?id=101076 + + Reviewed by Dave Hyatt. + + Define ENABLE_SUBPIXEL_LAYOUT and include it in FEATURE_DEFINES. + + * Configurations/FeatureDefines.xcconfig: + +2012-11-02 Michael Saboff + + RegExp.prototype.toString Should Produce an 8 bit JSString if possible. + https://bugs.webkit.org/show_bug.cgi?id=101003 + + Reviewed by Geoffrey Garen. + + Took the logic of regExpObjectSource() and created two templated helpers that uses the + source character type when appending to the StringBuilder. + + * runtime/RegExpObject.cpp: + (JSC::appendLineTerminatorEscape): Checks line terminate type to come up with escaped version. + (JSC::regExpObjectSourceInternal): Templated version of original. + (JSC::regExpObjectSource): Wrapper function. + +2012-11-02 Adam Barth + + ENABLE(UNDO_MANAGER) is disabled everywhere and is not under active development + https://bugs.webkit.org/show_bug.cgi?id=100711 + + Reviewed by Eric Seidel. + + * Configurations/FeatureDefines.xcconfig: + +2012-11-02 Simon Hausmann + + [Qt] Fix build on Windows when Qt is configured with -release + https://bugs.webkit.org/show_bug.cgi?id=101041 + + Reviewed by Jocelyn Turcotte. + + When Qt is configured with -debug or -release, the release/debug build of for example + QtCore is not available by default. For LLIntExtractor we always need to build debug + _and_ release versions, but we do not actually need any Qt libraries nor qtmain(d).lib. + Therefore we can disable all these features but need to keep $$QT.core.includes in the + INCLUDEPATH for some defines from qglobal.h. + + * LLIntOffsetsExtractor.pro: + +2012-11-01 Mark Lam + + A llint workaround for a toolchain issue. + https://bugs.webkit.org/show_bug.cgi?id=101012. + + Reviewed by Michael Saboff. + + * llint/LowLevelInterpreter.asm: + - use a local label to workaround the toolchain issue with undeclared + global labels. + +2012-11-01 Oliver Hunt + + Remove GlobalObject constant register that is typically unused + https://bugs.webkit.org/show_bug.cgi?id=101005 + + Reviewed by Geoffrey Garen. + + The GlobalObject constant register is frequently allocated even when it + is not used, it is also getting in the way of some other optimisations. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (CodeBlock): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseResolveOperations): + +2012-10-31 Filip Pizlo + + DFG optimized string access code should be enabled + https://bugs.webkit.org/show_bug.cgi?id=100825 + + Reviewed by Oliver Hunt. + + - Removes prediction checks from the parser. + + - Fixes the handling of array mode refinement for strings. I.e. we don't do + any refinement - we already know it's going to be a string. We could + revisit this in the future, but for now the DFG lacks the ability to + handle any array modes other than Array::String for string intrinsics, so + this is as good as it gets. + + - Removes uses of isBlahSpeculation for checking if a mode is already + checked. isBlahSpeculation implicitly checks if the SpeculatedType is not + BOTTOM ("empty"), which breaks for checking if a mode is already checked + since a mode may already be "checked" in the sense that we've proven that + the code is unreachable. + + ~1% speed-up on V8v7, mostly from a speed-up on crypto, which uses string + intrinsics in one of the hot functions. + + * bytecode/SpeculatedType.h: + (JSC::speculationChecked): + (JSC): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::alreadyChecked): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleIntrinsic): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt): + +2012-10-31 Filip Pizlo + + Sparse array size threshold should be increased to 100000 + https://bugs.webkit.org/show_bug.cgi?id=100827 + + Reviewed by Oliver Hunt. + + This enables the use of contiguous arrays in programs that previously + couldn't use them. And I so far can't see any examples of this being + a downside. To the extent that there is a downside, it ought to be + addressed by GC: https://bugs.webkit.org/show_bug.cgi?id=100828 + + * runtime/ArrayConventions.h: + (JSC): + +2012-10-31 Mark Lam + + C++ llint 64-bit backend needs to zero extend results of int32 operations. + https://bugs.webkit.org/show_bug.cgi?id=100899. + + Reviewed by Filip Pizlo. + + llint asm instructions ending in "i" for a 64-bit machine expects the + high 32-bit of registers to be zero'ed out when a 32-bit instruction + writes into a register. Fixed the C++ llint to honor this. + + Fixed the index register used in BaseIndex addressing to be of size + intptr_t as expected. + + Updated CLoopRegister to handle different endiannesss configurations. + + * llint/LowLevelInterpreter.cpp: + (JSC::CLoopRegister::clearHighWord): + - new method to clear the high 32-bit of a 64-bit register. + It's a no-op for the 32-bit build. + (CLoopRegister): + - CLoopRegister now takes care of packing and byte endianness order. + (JSC::CLoop::execute): - Added an assert. + * offlineasm/cloop.rb: + - Add calls to clearHighWord() wherever needed. + +2012-10-31 Mark Lam + + A JSC printf (support for %J+s and %b). + https://bugs.webkit.org/show_bug.cgi?id=100566. + + Reviewed by Michael Saboff. + + Added VMInspector::printf(), fprintf(), sprintf(), and snprintf(). + - %b prints ints as boolean TRUE (non-zero) or FALSE (zero). + - %Js prints a WTF::String* like a %s prints a char*. + Also works for 16bit WTF::Strings (prints wchar_t* using %S). + - '+' is a modifier meaning 'use verbose mode', and %J+s is an example + of its use. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/VMInspector.cpp: + (FormatPrinter): + (JSC::FormatPrinter::~FormatPrinter): + (JSC::FormatPrinter::print): + (JSC::FormatPrinter::printArg): + (JSC::FormatPrinter::printWTFString): + (JSC::FileFormatPrinter::FileFormatPrinter): + (JSC::FileFormatPrinter::printArg): + (JSC::StringFormatPrinter::StringFormatPrinter): + (JSC::StringFormatPrinter::printArg): + (JSC::StringNFormatPrinter::StringNFormatPrinter): + (JSC::StringNFormatPrinter::printArg): + (JSC::VMInspector::fprintf): + (JSC::VMInspector::printf): + (JSC::VMInspector::sprintf): + (JSC::VMInspector::snprintf): + * interpreter/VMInspector.h: + (VMInspector): + +2012-10-31 Mark Lam + + 64-bit llint PC offset can be negative: using an unsigned shift is a bug. + https://bugs.webkit.org/show_bug.cgi?id=100896. + + Reviewed by Filip Pizlo. + + Fixed the PC offset divisions in the 64-bit llint asm to use rshift instead of urshift. + + * llint/LowLevelInterpreter64.asm: + +2012-10-30 Yuqiang Xian + + glsl-function-atan.html WebGL conformance test fails after https://bugs.webkit.org/show_bug.cgi?id=99154 + https://bugs.webkit.org/show_bug.cgi?id=100789 + + Reviewed by Filip Pizlo. + + We accidently missed a bitwise double to int64 conversion. + + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::silentFill): + +2012-10-30 Joseph Pecoraro + + [Mac] Sync up FeatureDefine Configuration Files + https://bugs.webkit.org/show_bug.cgi?id=100171 + + Reviewed by David Kilzer. + + Follow up to better coordinate with iOS feature defines. Make: + + - ENABLE_FILTERS always on + - ENABLE_INPUT_* iphonesimulator values point to the iphoneos values + + * Configurations/FeatureDefines.xcconfig: + +2012-10-30 Joseph Pecoraro + + [Mac] Sync up FeatureDefine Configuration Files + https://bugs.webkit.org/show_bug.cgi?id=100171 + + Reviewed by David Kilzer. + + Ensure an identical FeatureDefine files across all projects. Changes: + + - ENABLE_CSS_BOX_DECORATION_BREAK should be in all + - ENABLE_PDFKIT_PLUGIN should be in all + - ENABLE_RESOLUTION_MEDIA_QUERY should be in all + - ENABLE_ENCRYPTED_MEDIA should be in all + - ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING with corrected value + - Some alphabetical ordering cleanup + + * Configurations/FeatureDefines.xcconfig: + +2012-10-30 Mark Hahnenberg + + Arrays can change IndexingType in the middle of sorting + https://bugs.webkit.org/show_bug.cgi?id=100773 + + Reviewed by Filip Pizlo. + + Instead of giving up, we just fetch the appropriate vector based on the current + IndexingType of the array. + + * runtime/JSArray.cpp: + (JSC::JSArray::sortVector): + * runtime/JSObject.h: + (JSObject): + (JSC::JSObject::currentIndexingData): + (JSC::JSObject::currentRelevantLength): + +2012-10-29 Anders Carlsson + + Build WebKit as C++11 on Mac + https://bugs.webkit.org/show_bug.cgi?id=100720 + + Reviewed by Daniel Bates. + + * Configurations/Base.xcconfig: + Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::generate): + (JSC::BytecodeGenerator::pushFinallyContext): + (JSC::BytecodeGenerator::beginSwitch): + * llint/LLIntOffsetsExtractor.cpp: + * runtime/Identifier.cpp: + (JSC::Identifier::add8): + * runtime/Identifier.h: + (JSC::Identifier::add): + * runtime/JSONObject.cpp: + (JSC::appendStringToStringBuilder): + * runtime/StringPrototype.cpp: + (JSC::replaceUsingStringSearch): + Add static_casts to prevent implicit type conversions in non-constant initializer lists. + +2012-10-28 Mark Rowe + + Simplify Xcode configuration settings that used to vary between OS versions. + + Reviewed by Dan Bernstein. + + * Configurations/Base.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/JavaScriptCore.xcconfig: + +2012-10-28 Mark Rowe + + Remove references to unsupported OS and Xcode versions. + + Reviewed by Anders Carlsson. + + * Configurations/Base.xcconfig: + * Configurations/CompilerVersion.xcconfig: Removed. + * Configurations/DebugRelease.xcconfig: + * Configurations/Version.xcconfig: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2012-10-29 Michael Saboff + + Non-special escape character sequences cause JSC::Lexer::parseString to create 16 bit strings + https://bugs.webkit.org/show_bug.cgi?id=100576 + + Reviewed by Darin Adler. + + Changed singleEscape() processing to be based on a lookup of a static table. The table + covers ASCII characters SPACE through DEL. If a character can be a single character escape, + then the table provides the non-zero result of that escape. Updated the result of + singleEscape to be an LChar to make the table as small as possible. + Added a new test fast/js/normal-character-escapes-in-string-literals.html to validated + the behavior. + + * parser/Lexer.cpp: + (JSC::singleEscape): + (JSC::Lexer::parseString): + (JSC::Lexer::parseStringSlowCase): + +2012-10-29 Enrica Casucci + + Add ENABLE_USERSELECT_ALL feature flag. + https://bugs.webkit.org/show_bug.cgi?id=100559 + + Reviewed by Eric Seidel. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-28 Filip Pizlo + + DFG should be able to emit effectful structure checks + https://bugs.webkit.org/show_bug.cgi?id=99260 + + Reviewed by Oliver Hunt. + + This change allows us to find out if an array access that has gone polymorphic + is operating over known structures - i.e. the primordial array structures of the + global object that the code block containing the array access belongs to. We + term this state "OriginalArray" for short. The fact that the access has gone + polymorphic means that the array profile will not be able to report the set of + structures it had seen - but if it can tell us that all of the structures were + primordial then it just so happens that we can deduce what the structure set + would have been by just querying the code block's global object. This allows us + to emit an ArrayifyToStructure instead of an Arrayify if we find that we need to + do conversions. The fast path of an ArrayifyToStructure is exactly like the fast + path of a CheckStructure and is mostly subject to the same optimizations. It + also burns one fewer registers. + + Essentially the notion of OriginalArray is a super cheap way of getting the + array profile to tell us a structure set instead of a singleton structure. + Currently, the array profile can only tell us the structure seen at an array + access if there was exactly one structure. If there were multiple structures, it + won't tell us anything other than the array modes and other auxiliary profiling + data (whether there were stores to holes, for example). With OriginalArray, we + cheaply get a structure set if all of the structures were primordial for the + code block's global object, since in that case the array mode set (ArrayModes) + can directly tell us the structure set. In the future, we might consider adding + complete structure sets to the array profiles, but I suspect that we would hit + diminishing returns if we did so - it would only help if we have array accesses + that are both polymorphic and are cross-global-object accesses (rare) or if the + arrays had named properties or other structure transitions that are unrelated to + indexing type (also rare). + + This also does away with Arrayify (and the new ArrayifyToStructure) returning + the butterfly pointer. This turns out to be faster and easier to CSE. + + And, this also changes constant folding to be able to eliminate CheckStructure, + ForwardCheckStructure, and ArrayifyToStructure in addition to being able to + transform them into structure transition watchpoints. This is great for + ArrayifyToStructure because then CSE and CFA know that there is no side effect. + Converting CheckStructure and ForwardCheckStructure to also behave this way is + just a matter of elegance. + + This has no performance impact right now. It's intended to alleviate some of the + regressions seen in the early implementation of + https://bugs.webkit.org/show_bug.cgi?id=98606. + + * bytecode/ArrayProfile.cpp: + (JSC::ArrayProfile::computeUpdatedPrediction): + * bytecode/ArrayProfile.h: + (JSC): + (JSC::ArrayProfile::ArrayProfile): + (ArrayProfile): + (JSC::ArrayProfile::usesOriginalArrayStructures): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::updateAllPredictionsAndCountLiveness): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::fromObserved): + (JSC::DFG::ArrayMode::alreadyChecked): + (JSC::DFG::arrayClassToString): + * dfg/DFGArrayMode.h: + (JSC::DFG::ArrayMode::withProfile): + (JSC::DFG::ArrayMode::isJSArray): + (ArrayMode): + (JSC::DFG::ArrayMode::isJSArrayWithOriginalStructure): + (JSC::DFG::ArrayMode::supportsLength): + (JSC::DFG::ArrayMode::arrayModesWithIndexingShape): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getArrayMode): + (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): + (JSC::DFG::ByteCodeParser::handleGetByOffset): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::checkStructureElimination): + (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination): + (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination): + (JSC::DFG::CSEPhase::checkArrayElimination): + (JSC::DFG::CSEPhase::getScopeRegistersLoadElimination): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + * dfg/DFGNode.h: + (JSC::DFG::Node::hasStructure): + (JSC::DFG::Node::hasArrayMode): + (JSC::DFG::Node::arrayMode): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + (JSC::DFG::SpeculativeJIT::arrayify): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::isOriginalArrayStructure): + * runtime/Structure.cpp: + (JSC::Structure::nonPropertyTransition): + +2012-10-28 Filip Pizlo + + There should not be blind spots in array length array profiling + https://bugs.webkit.org/show_bug.cgi?id=100620 + + Reviewed by Oliver Hunt. + + I don't think this has any performance impact. But it's good to not have random + programs occasionally emit a GetById for array length accesses. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::privateCompilePatchGetArrayLength): + +2012-10-28 Filip Pizlo + + Unreviewed, make always-true enum-to-int comparisons use casts. + + * dfg/DFGFPRInfo.h: + (JSC::DFG::FPRInfo::debugName): + * dfg/DFGGPRInfo.h: + (JSC::DFG::JSValueSource::tagGPR): + (JSC::DFG::GPRInfo::toIndex): + (JSC::DFG::GPRInfo::debugName): + * runtime/JSTypeInfo.h: + (JSC::TypeInfo::TypeInfo): + +2012-10-27 Filip Pizlo + + OSR exit compilation should defend against argument recoveries from code blocks that are no longer on the inline stack + https://bugs.webkit.org/show_bug.cgi?id=100601 + + Reviewed by Oliver Hunt. + + This happened to me while I was fixing bugs for https://bugs.webkit.org/show_bug.cgi?id=100599. + I'm not sure how to reproduce this. + + * dfg/DFGAssemblyHelpers.h: + (JSC::DFG::AssemblyHelpers::baselineCodeBlockFor): + (AssemblyHelpers): + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + +2012-10-27 Filip Pizlo + + DFG::Array::Mode needs to be cleaned up + https://bugs.webkit.org/show_bug.cgi?id=100599 + + Reviewed by Oliver Hunt. + + Turn the previous massive Array::Mode enum into a class that contains four + fields, the type, whether it's a JSArray, the level of speculation, and the + kind of conversion to perform. + + No performance or behavioral change. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::ArrayMode::fromObserved): + (JSC::DFG::ArrayMode::refine): + (JSC::DFG::ArrayMode::alreadyChecked): + (JSC::DFG::arrayTypeToString): + (JSC::DFG::arrayClassToString): + (DFG): + (JSC::DFG::arraySpeculationToString): + (JSC::DFG::arrayConversionToString): + (JSC::DFG::ArrayMode::toString): + * dfg/DFGArrayMode.h: + (DFG): + (ArrayMode): + (JSC::DFG::ArrayMode::ArrayMode): + (JSC::DFG::ArrayMode::type): + (JSC::DFG::ArrayMode::arrayClass): + (JSC::DFG::ArrayMode::speculation): + (JSC::DFG::ArrayMode::conversion): + (JSC::DFG::ArrayMode::asWord): + (JSC::DFG::ArrayMode::fromWord): + (JSC::DFG::ArrayMode::withSpeculation): + (JSC::DFG::ArrayMode::usesButterfly): + (JSC::DFG::ArrayMode::isJSArray): + (JSC::DFG::ArrayMode::isInBounds): + (JSC::DFG::ArrayMode::mayStoreToHole): + (JSC::DFG::ArrayMode::isOutOfBounds): + (JSC::DFG::ArrayMode::isSlowPut): + (JSC::DFG::ArrayMode::canCSEStorage): + (JSC::DFG::ArrayMode::lengthNeedsStorage): + (JSC::DFG::ArrayMode::modeForPut): + (JSC::DFG::ArrayMode::isSpecific): + (JSC::DFG::ArrayMode::supportsLength): + (JSC::DFG::ArrayMode::benefitsFromStructureCheck): + (JSC::DFG::ArrayMode::doesConversion): + (JSC::DFG::ArrayMode::arrayModesThatPassFiltering): + (JSC::DFG::ArrayMode::operator==): + (JSC::DFG::ArrayMode::operator!=): + (JSC::DFG::ArrayMode::arrayModesWithIndexingShape): + (JSC::DFG::canCSEStorage): + (JSC::DFG::lengthNeedsStorage): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getArrayMode): + (JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks): + (JSC::DFG::ByteCodeParser::handleIntrinsic): + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::getArrayLengthElimination): + (JSC::DFG::CSEPhase::checkArrayElimination): + (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::byValIsPure): + * dfg/DFGNode.h: + (JSC::DFG::Node::arrayMode): + (JSC::DFG::Node::setArrayMode): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::typedArrayDescriptor): + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::arrayify): + (JSC::DFG::SpeculativeJIT::compileGetByValOnString): + (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): + (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray): + (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray): + (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage): + (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): + (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength): + (JSC::DFG::SpeculativeJIT::compileGetArrayLength): + (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister): + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-27 Dan Bernstein + + REAL_PLATFORM_NAME build setting is no longer needed + https://bugs.webkit.org/show_bug.cgi?id=100587 + + Reviewed by Mark Rowe. + + Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references + to PLATFORM_NAME. + + * Configurations/Base.xcconfig: + * Configurations/CompilerVersion.xcconfig: + * Configurations/DebugRelease.xcconfig: + * Configurations/FeatureDefines.xcconfig: + * Configurations/JSC.xcconfig: + * Configurations/JavaScriptCore.xcconfig: + * Configurations/ToolExecutable.xcconfig: + +2012-10-25 Filip Pizlo + + Forward OSR calculation is wrong in the presence of multiple SetLocals, or a mix of SetLocals and Phantoms + https://bugs.webkit.org/show_bug.cgi?id=100461 + + Reviewed by Oliver Hunt and Gavin Barraclough. + + This does a couple of things. First, it removes the part of the change in r131822 that made the forward + OSR exit calculator capable of handling multiple SetLocals. That change was wrong, because it would + blindly assume that all SetLocals had the same ValueRecovery, and would ignore the possibility that if + there is no value recovery then a ForwardCheckStructure on the first SetLocal would not know how to + recover the state associated with the second SetLocal. Then, it introduces the invariant that any bytecode + op that decomposes into multiple SetLocals must first emit dead SetLocals as hints and then emit a second + set of SetLocals to actually do the setting of the locals. This means that if a ForwardCheckStructure (or + any other hoisted forward speculation) is inserted, it will always be inserted on the second set of + SetLocals (since hoisting only touches the live ones), at which point OSR will already know about the + mov hints implied by the first set of (dead) SetLocals. This gives us the behavior we wanted, namely, that + a ForwardCheckStructure applied to a variant set by a resolve_with_base-like operation can correctly do a + forward exit while also ensuring that prior to exiting we set the appropriate locals. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::OSRExit): + * dfg/DFGOSRExit.h: + (OSRExit): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + +2012-10-26 Simon Hausmann + + [Qt] Fix the LLInt build on Windows + https://bugs.webkit.org/show_bug.cgi?id=97648 + + Reviewed by Tor Arne Vestbø. + + The main change for the port on Windows is changing the way offsets are extracted + and the LLIntAssembly.h is generated to accomodate release and debug configurations. + + Firstly the LLIntOffsetsExtractor binary is now built as-is (no DESTDIR set) and + placed into debug\LLIntOffsetsExtractor.exe and release\LLIntOffsetsExtractor.exe + on Windows debug_and_release builds. On other patforms it remainds in the regular + out directory. + + Secondly the LLIntAssembly.h files must be different for different build types, + so the LLIntAssembly.h generator in DerivedSources.pri operates no on the extractor + binary files as input. Using a simple exists() check we verify the presence of either + a regular, a debug\LLIntOffsetsExtractor and a release\LLIntOffsetsExtractor binary + and process all of them. The resulting assembly files consequently end up in + generated\debug\LLIntAssembly.h and generated\release\LLIntAssembly.h. + + In Target.pri we have to also make sure that those directories are in the include + path according to the release or debug configuration. + + Lastly a small tweak - swapping WTF.pri and JSC.pri inclusions - in the + LLIntOffsetsExtractor build was needed to make sure that we include + JavaScriptCore/config.h instead of WTF/config.h, required to fix the + build issues originally pasted in bug #97648. + + * DerivedSources.pri: + * JavaScriptCore.pro: + * LLIntOffsetsExtractor.pro: + * Target.pri: + +2012-10-26 Gabor Ballabas + + [Qt] Enable JSC's disassembler on x86, x86_64 Linux + https://bugs.webkit.org/show_bug.cgi?id=100386 + + Reviewed by Simon Hausmann. + + It works fine on Linux x86, x86_64 just needs to be enabled in the + QtWebKit build system. + + * DerivedSources.pri: + * JavaScriptCore.pri: + * Target.pri: + +2012-10-26 Thiago Marcos P. Santos + + Add feature flags for CSS Device Adaptation + https://bugs.webkit.org/show_bug.cgi?id=95960 + + Reviewed by Kenneth Rohde Christiansen. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-26 Simon Hausmann + + [WIN] Make LLInt offsets extractor work on Windows + https://bugs.webkit.org/show_bug.cgi?id=100369 + + Reviewed by Kenneth Rohde Christiansen. + + Open the input file explicitly in binary mode to prevent ruby/Windows from thinking that + it's a text mode file that needs even new line conversions. The binary mode parameter is + ignored on other platforms. + + * offlineasm/offsets.rb: + +2012-10-25 Michael Saboff + + SymbolTableIndexHashTraits::needsDestruction should be set to true + https://bugs.webkit.org/show_bug.cgi?id=100437 + + Reviewed by Mark Hahnenberg. + + For correctness, set SymbolTableIndexHashTraits::needsDestruction to true since SymbolTableEntry's do + need to have their destructor called due to the possibility of rare data. + + * runtime/SymbolTable.h: + (SymbolTableIndexHashTraits): + +2012-10-25 Filip Pizlo + + DFG Arrayify elimination should replace it with GetButterfly rather than Phantom + https://bugs.webkit.org/show_bug.cgi?id=100441 + + Reviewed by Oliver Hunt and Gavin Barraclough. + + Made array profiler's to-string helper behave correctly. + + Made Arrayify elimination do the right thing (convert to GetButterfly). + + Made CFA's interference analysis track clobbered array modes correctly, mostly by + simplifying the machinery. + + * bytecode/ArrayProfile.cpp: + (JSC::arrayModesToString): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::clobberArrayModes): + (AbstractValue): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + +2012-10-25 Filip Pizlo + + REGRESSION (r131793-r131826): Crash going to wikifonia.org + https://bugs.webkit.org/show_bug.cgi?id=100281 + + Reviewed by Oliver Hunt. + + Restore something that got lost in the resolve refactoring: the ability to give up on life if + we see a resolve of 'arguments'. + + * runtime/JSScope.cpp: + (JSC::JSScope::resolveContainingScopeInternal): + +2012-10-25 Dominik Röttsches + + Conditionalize XHR timeout support + https://bugs.webkit.org/show_bug.cgi?id=100356 + + Reviewed by Adam Barth. + + Adding XHR_TIMEOUT feature to conditionalize this on ports without network backend support. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-25 Michael Saboff + + REGRESSION (r131836): failures in list styles tests on EFL, GTK + https://bugs.webkit.org/show_bug.cgi?id=99824 + + Reviewed by Oliver Hunt. + + Saved start of string since it is modified by call convertUTF8ToUTF16(). + + * API/JSStringRef.cpp: + (JSStringCreateWithUTF8CString): + +2012-10-24 Filip Pizlo + + DFG NewArrayBuffer node should keep its data in a structure on the side to free up one of the opInfos + https://bugs.webkit.org/show_bug.cgi?id=100328 + + Reviewed by Oliver Hunt. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGGraph.h: + (Graph): + * dfg/DFGNode.h: + (NewArrayBufferData): + (DFG): + (JSC::DFG::Node::newArrayBufferData): + (Node): + (JSC::DFG::Node::startConstant): + (JSC::DFG::Node::numConstants): + +2012-10-25 Mark Lam + + Update the C++ llint to work with the latest op_resolve... changes. + https://bugs.webkit.org/show_bug.cgi?id=100345. + + Reviewed by Oliver Hunt. + + * llint/LowLevelInterpreter.cpp: + (JSC::CLoop::execute): + - emit opcode name as label when not using COMPUTED_GOTOs. The new op_resolve + opcodes have jumps to these labels. + - declare all opcode labels as UNUSED_LABEL()s to keep the compiler happy + for opcodes that are not referenced by anyone. + * offlineasm/asm.rb: + - strip llint_ prefix from opcode names used as labels. + +2012-10-24 Yuqiang Xian + + Refactor LLInt64 to distinguish the pointer operations from the 64-bit integer operations + https://bugs.webkit.org/show_bug.cgi?id=100321 + + Reviewed by Filip Pizlo. + + We have refactored the MacroAssembler and JIT compilers to distinguish + the pointer operations from the 64-bit integer operations (see bug #99154). + Now we want to do the similar work for LLInt, and the goal is same as + the one mentioned in 99154. + + This is the first part of the modification: in the offline assembler, + adding the support of the "q" instructions which will be used for + 64-bit integer operations. + + * llint/LowLevelInterpreter.cpp: + (JSC::CLoop::execute): + * offlineasm/cloop.rb: + * offlineasm/instructions.rb: + * offlineasm/x86.rb: + +2012-10-24 Filip Pizlo + + DFG compileBlahBlahByVal methods for Contiguous and ArrayStorage have only one caller and should be removed + https://bugs.webkit.org/show_bug.cgi?id=100311 + + Reviewed by Mark Hahnenberg. + + Just trying to simplify things before I make them more complicated again. + + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): + * dfg/DFGSpeculativeJIT32_64.cpp: + (DFG): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (DFG): + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-23 Andreas Kling + + CodeBlock: Give m_putToBaseOperations an inline capacity. + + + + Reviewed by Oliver Hunt. + + Since the CodeBlock constructor always inserts a single PutToBaseOperation, but there's no + guarantee that more will follow, give the m_putToBaseOperations vector an inline capacity of 1. + There are 4009 of these Vectors on Membuster3, and only 126 of them have more than a single entry. + + This change yields a 1.90MB reduction in memory usage. + + * bytecode/CodeBlock.h: + (CodeBlock): + +2012-10-23 Christophe Dumez + + Regression(r132143): Assertion hit in JSC::Interpreter::StackPolicy::StackPolicy(JSC::Interpreter&, const WTF::StackBounds&) + https://bugs.webkit.org/show_bug.cgi?id=100109 + + Reviewed by Oliver Hunt. + + Fix possible integer overflow in StackPolicy constructor by + using size_t type instead of int for stack sizes. The value + returned by StackBounds::size() is of type size_t but was + assigned to an int, which may overflow. + + * interpreter/Interpreter.cpp: + (JSC): + (JSC::Interpreter::StackPolicy::StackPolicy): + +2012-10-23 Carlos Garcia Campos + + Unreviewed. Fix make distcheck. + + * GNUmakefile.list.am: Add missing header file. + +2012-10-23 Mark Lam + + Make topCallFrame reliable. + https://bugs.webkit.org/show_bug.cgi?id=98928. + + Reviewed by Geoffrey Garen. + + - VM entry points and the GC now uses topCallFrame. + - The callerFrame value in CallFrames are now always the previous + frame on the stack, except for the first frame which has a + callerFrame of 0 (not counting the HostCallFrameFlag). + Hence, we can now traverse every frame on the stack all the way + back to the first frame. + - GlobalExec's will no longer be used as the callerFrame values in + call frames. + - Added fences and traps for debugging the JSStack in debug builds. + + * bytecode/SamplingTool.h: + (SamplingTool): + (JSC::SamplingTool::CallRecord::CallRecord): + * dfg/DFGOperations.cpp: + - Fixed 2 DFG helper functions to flush topCallFrame as expected. + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::prepareForExternalCall): + * interpreter/CallFrame.h: + (JSC::ExecState::callerFrameNoFlags): + (ExecState): + (JSC::ExecState::argIndexForRegister): + (JSC::ExecState::getArgumentUnsafe): + * interpreter/CallFrameClosure.h: + (CallFrameClosure): + * interpreter/Interpreter.cpp: + (JSC): + (JSC::eval): + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::endRepeatCall): + * interpreter/Interpreter.h: + (JSC): + (Interpreter): + * interpreter/JSStack.cpp: + (JSC::JSStack::JSStack): + (JSC::JSStack::gatherConservativeRoots): + (JSC::JSStack::disableErrorStackReserve): + * interpreter/JSStack.h: + (JSC): + (JSStack): + (JSC::JSStack::installFence): + (JSC::JSStack::validateFence): + (JSC::JSStack::installTrapsAfterFrame): + * interpreter/JSStackInlines.h: Added. + (JSC): + (JSC::JSStack::getTopOfFrame): + (JSC::JSStack::getTopOfStack): + (JSC::JSStack::getStartOfFrame): + (JSC::JSStack::pushFrame): + (JSC::JSStack::popFrame): + (JSC::JSStack::generateFenceValue): + (JSC::JSStack::installFence): + (JSC::JSStack::validateFence): + (JSC::JSStack::installTrapsAfterFrame): + * jit/JITStubs.cpp: + (JSC::jitCompileFor): + (JSC::lazyLinkFor): + - Set frame->codeBlock to 0 for both the above because they are called + with partially intitialized frames (cb uninitialized), but may + trigger a GC. + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + +2012-10-22 Filip Pizlo + + DFG::Array::Undecided should be called DFG::Array::SelectUsingPredictions + https://bugs.webkit.org/show_bug.cgi?id=100052 + + Reviewed by Oliver Hunt. + + No functional change, just renaming. It's a clearer name that more accurately + reflects the meaning, and it eliminates the namespace confusion that will happen + with the Undecided indexing type in https://bugs.webkit.org/show_bug.cgi?id=98606 + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::fromObserved): + (JSC::DFG::refineArrayMode): + (JSC::DFG::modeAlreadyChecked): + (JSC::DFG::modeToString): + * dfg/DFGArrayMode.h: + (JSC::DFG::canCSEStorage): + (JSC::DFG::modeIsSpecific): + (JSC::DFG::modeSupportsLength): + (JSC::DFG::benefitsFromStructureCheck): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::blessArrayOperation): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::arrayify): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-22 Mark Lam + + Change stack recursion checks to be based on stack availability. + https://bugs.webkit.org/show_bug.cgi?id=99872. + + Reviewed by Filip Pizlo and Geoffrey Garen. + + - Remove m_reentryDepth, ThreadStackType which are now obsolete. + - Replaced the reentryDepth checks with a StackBounds check. + - Added the Interpreter::StackPolicy class to compute a reasonable + stack capacity requirement given the native stack that the + interpreter is executing on at that time. + - Reserved an amount of JSStack space for the use of error handling + and enable its use (using Interpreter::ErrorHandlingMode) when + we're about to throw or report an exception. + - Interpreter::StackPolicy also allows more native stack space + to be used when in ErrorHandlingMode. This is needed in the case + of native stack overflows. + - Fixed the parser so that it throws a StackOverflowError instead of + a SyntaxError when it encounters a stack overflow. + + * API/JSContextRef.cpp: + (JSContextGroupCreate): + (JSGlobalContextCreateInGroup): + * JavaScriptCore.order: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::ErrorHandlingMode::ErrorHandlingMode): + (JSC): + (JSC::Interpreter::ErrorHandlingMode::~ErrorHandlingMode): + (JSC::Interpreter::StackPolicy::StackPolicy): + (JSC::Interpreter::Interpreter): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + * interpreter/Interpreter.h: + (JSC): + (Interpreter): + (ErrorHandlingMode): + (StackPolicy): + (JSC::Interpreter::StackPolicy::requiredCapacity): + * interpreter/JSStack.cpp: + (JSC): + (JSC::JSStack::JSStack): + (JSC::JSStack::growSlowCase): + (JSC::JSStack::enableErrorStackReserve): + (JSC::JSStack::disableErrorStackReserve): + * interpreter/JSStack.h: + (JSStack): + (JSC::JSStack::reservationEnd): + (JSC): + * jsc.cpp: + (jscmain): + * parser/Parser.cpp: + (JSC::::Parser): + * parser/Parser.h: + (Parser): + (JSC::::parse): + * runtime/ExceptionHelpers.cpp: + (JSC::throwStackOverflowError): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::createContextGroup): + (JSC::JSGlobalData::create): + (JSC::JSGlobalData::createLeaked): + (JSC::JSGlobalData::sharedInstance): + * runtime/JSGlobalData.h: + (JSC): + (JSGlobalData): + * runtime/StringRecursionChecker.h: + (JSC::StringRecursionChecker::performCheck): + * testRegExp.cpp: + (realMain): + +2012-10-20 Martin Robinson + + Fix 'make dist' for the GTK+ port + + * GNUmakefile.list.am: Add missing files to the source list. + +2012-10-21 Raphael Kubo da Costa + + [CMake][JSC] Depend on risc.rb to decide when to run the LLInt scripts. + https://bugs.webkit.org/show_bug.cgi?id=99917 + + Reviewed by Geoffrey Garen. + + Depend on the newly-added risc.rb to make sure we always run the + LLInt scripts when one of them changes. + + * CMakeLists.txt: + +2012-10-20 Filip Pizlo + + LLInt backends of non-ARM RISC platforms should be able to share code with the existing ARMv7 backend + https://bugs.webkit.org/show_bug.cgi?id=99745 + + Reviewed by Geoffrey Garen. + + This moves all of the things in armv7.rb that I thought are generally useful out + into risc.rb. It also separates some phases (branch ops is separated into one + phase that does sensible things, and another that does things that are painfully + ARM-specific), and removes ARM assumptions from others by using a callback to + drive exactly what lowering must happen. The goal here is to minimize the future + maintenance burden of LLInt by ensuring that the various platforms share as much + lowering code as possible. + + * offlineasm/armv7.rb: + * offlineasm/risc.rb: Added. + +2012-10-19 Filip Pizlo + + DFG should have some facility for recognizing redundant CheckArrays and Arrayifies + https://bugs.webkit.org/show_bug.cgi?id=99287 + + Reviewed by Mark Hahnenberg. + + Adds reasoning about indexing type sets (i.e. ArrayModes) to AbstractValue, which + then enables us to fold away CheckArray's and Arrayify's that are redundant. + + * bytecode/ArrayProfile.cpp: + (JSC::arrayModesToString): + (JSC): + * bytecode/ArrayProfile.h: + (JSC): + (JSC::mergeArrayModes): + (JSC::arrayModesAlreadyChecked): + * bytecode/StructureSet.h: + (JSC::StructureSet::arrayModesFromStructures): + (StructureSet): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGAbstractValue.h: + (JSC::DFG::AbstractValue::AbstractValue): + (JSC::DFG::AbstractValue::clear): + (JSC::DFG::AbstractValue::isClear): + (JSC::DFG::AbstractValue::makeTop): + (JSC::DFG::AbstractValue::clobberStructures): + (AbstractValue): + (JSC::DFG::AbstractValue::setMostSpecific): + (JSC::DFG::AbstractValue::set): + (JSC::DFG::AbstractValue::operator==): + (JSC::DFG::AbstractValue::merge): + (JSC::DFG::AbstractValue::filter): + (JSC::DFG::AbstractValue::filterArrayModes): + (JSC::DFG::AbstractValue::validate): + (JSC::DFG::AbstractValue::checkConsistency): + (JSC::DFG::AbstractValue::dump): + (JSC::DFG::AbstractValue::clobberArrayModes): + (JSC::DFG::AbstractValue::clobberArrayModesSlow): + (JSC::DFG::AbstractValue::setFuturePossibleStructure): + (JSC::DFG::AbstractValue::filterFuturePossibleStructure): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::modeAlreadyChecked): + * dfg/DFGArrayMode.h: + (JSC::DFG::arrayModesFor): + (DFG): + * dfg/DFGConstantFoldingPhase.cpp: + (JSC::DFG::ConstantFoldingPhase::foldConstants): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::arrayify): + +2012-10-19 Filip Pizlo + + Baseline JIT should not inline array allocations, to make them easier to instrument + https://bugs.webkit.org/show_bug.cgi?id=99905 + + Reviewed by Mark Hahnenberg. + + This will make it easier to instrument array allocations for the purposes of profiling. + It also allows us to kill off a bunch of code. And, this doesn't appear to hurt + performance at all. That's expected because these days any hot allocation will end up + in the DFG JIT, which does inline these allocations. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + (JIT): + * jit/JITInlineMethods.h: + (JSC): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_array): + +2012-10-19 Oliver Hunt + + Fix some of the regression cause by the non-local variable reworking + https://bugs.webkit.org/show_bug.cgi?id=99896 + + Reviewed by Filip Pizlo. + + The non0local variable reworking led to some of the optimisations performed by + the bytecode generator being dropped. This in turn put more pressure on the DFG + optimisations. This exposed a short coming in our double speculation propogation. + Now we try to distinguish between places where we should SpecDoubleReal vs generic + SpecDouble. + + * dfg/DFGPredictionPropagationPhase.cpp: + (PredictionPropagationPhase): + (JSC::DFG::PredictionPropagationPhase::speculatedDoubleTypeForPrediction): + (JSC::DFG::PredictionPropagationPhase::speculatedDoubleTypeForPredictions): + (JSC::DFG::PredictionPropagationPhase::propagate): + +2012-10-19 Michael Saboff + + Lexer should create 8 bit Identifiers for RegularExpressions and ASCII identifiers + https://bugs.webkit.org/show_bug.cgi?id=99855 + + Reviewed by Filip Pizlo. + + Added makeIdentifier helpers that will always make an 8 bit Identifier or make an + Identifier that is the same size as the template parameter. Used the first in the fast + path when looking for a JS identifier and the second when scanning regular expressions. + + * parser/Lexer.cpp: + (JSC::::scanRegExp): + * parser/Lexer.h: + (Lexer): + (JSC::::makeIdentifierSameType): + (JSC::::makeLCharIdentifier): + (JSC::::lexExpectIdentifier): + +2012-10-19 Mark Lam + + Added WTF::StackStats mechanism. + https://bugs.webkit.org/show_bug.cgi?id=99805. + + Reviewed by Geoffrey Garen. + + Added StackStats checkpoints and probes. + + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + (JSC::BytecodeGenerator::emitNodeInConditionContext): + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::append): + (JSC::visitChildren): + (JSC::SlotVisitor::donateKnownParallel): + (JSC::SlotVisitor::drain): + (JSC::SlotVisitor::drainFromShared): + (JSC::SlotVisitor::mergeOpaqueRoots): + (JSC::SlotVisitor::internalAppend): + (JSC::SlotVisitor::harvestWeakReferences): + (JSC::SlotVisitor::finalizeUnconditionalFinalizers): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + * parser/Parser.h: + (JSC::Parser::canRecurse): + * runtime/StringRecursionChecker.h: + (StringRecursionChecker): + +2012-10-19 Oliver Hunt + + REGRESSION(r131822): It made 500+ tests crash on 32 bit platforms + https://bugs.webkit.org/show_bug.cgi?id=99814 + + Reviewed by Filip Pizlo. + + Call the correct macro in 32bit. + + * llint/LowLevelInterpreter.asm: + +2012-10-19 Dongwoo Joshua Im + + Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT + https://bugs.webkit.org/show_bug.cgi?id=99804 + + Reviewed by Julien Chaffraix. + + CSS3 text related properties will be implemented under this flag, + including text decoration, text-align-last, and text-justify. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-18 Anders Carlsson + + Clean up RegExpKey + https://bugs.webkit.org/show_bug.cgi?id=99798 + + Reviewed by Darin Adler. + + RegExpHash doesn't need to be a class template specialization when the class template is specialized + for JSC::RegExpKey only. Make it a nested class of RegExp instead. Also, make operator== a friend function + so Hash::equal can see it. + + * runtime/RegExpKey.h: + (JSC::RegExpKey::RegExpKey): + (JSC::RegExpKey::operator==): + (RegExpKey): + (JSC::RegExpKey::Hash::hash): + (JSC::RegExpKey::Hash::equal): + (Hash): + +2012-10-19 Mark Lam + + Bot greening: Follow up to r131877 to fix the Windows build. + https://bugs.webkit.org/show_bug.cgi?id=99739. + + Not reviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-10-19 Mark Lam + + Bot greening: Attempt to fix broken Window build after r131836. + https://bugs.webkit.org/show_bug.cgi?id=99739. + + Not reviewed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-10-19 Yuqiang Xian + + Unreviewed fix after r131868. + + On JSVALUE64 platforms, JSValue constants can be Imm64 instead of ImmPtr for JIT compilers. + + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + +2012-10-18 Filip Pizlo + + Baseline array profiling should be less accurate, and DFG OSR exit should update array profiles on CheckArray and CheckStructure failure + https://bugs.webkit.org/show_bug.cgi?id=99261 + + Reviewed by Oliver Hunt. + + This makes array profiling stochastic, like value profiling. The point is to avoid + noticing one-off indexing types that we'll never see again, but instead to: + + Notice the big ones: We want the DFG to compile based on the things that happen with + high probability. So, this change makes array profiling do like value profiling and + only notice a random subsampling of indexing types that flowed through an array + access. Prior to this patch array profiles noticed all indexing types and weighted + them identically. + + Bias the recent: Often an array access will see awkward indexing types during the + first handful of executions because of artifacts of program startup. So, we want to + bias towards the indexing types that we saw most recently. With this change, array + profiling does like value profiling and usually tells use a random sampling that + is biased to what happened recently. + + Have a backup plan: The above two things don't work by themselves because our + randomness is not that random (nor do we care enough to make it more random), and + because some procedures will have a <1/10 probability event that we must handle + without bailing because it dominates a hot loop. So, like value profiling, this + patch makes array profiling use OSR exits to tell us why we are bailing out, so + that we don't make the same mistake again in the future. + + This change also makes the way that the 32-bit OSR exit compiler snatches scratch + registers more uniform. We don't need a scratch buffer when we can push and pop. + + * bytecode/DFGExitProfile.h: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::arrayify): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JITInlineMethods.h: + (JSC::JIT::emitArrayProfilingSite): + * llint/LowLevelInterpreter.asm: + +2012-10-18 Yuqiang Xian + + [Qt] REGRESSION(r131858): It broke the ARM build + https://bugs.webkit.org/show_bug.cgi?id=99809 + + Reviewed by Csaba Osztrogonác. + + * dfg/DFGCCallHelpers.h: + (CCallHelpers): + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + +2012-10-18 Yuqiang Xian + + Refactor MacroAssembler interfaces to differentiate the pointer operands from the 64-bit integer operands + https://bugs.webkit.org/show_bug.cgi?id=99154 + + Reviewed by Gavin Barraclough. + + In current JavaScriptCore implementation for JSVALUE64 platform (i.e., + the X64 platform), we assume that the JSValue size is same to the + pointer size, and thus EncodedJSValue is simply type defined as a + "void*". In the JIT compiler, we also take this assumption and invoke + the same macro assembler interfaces for both JSValue and pointer + operands. We need to differentiate the operations on pointers from the + operations on JSValues, and let them invoking different macro + assembler interfaces. For example, we now use the interface of + "loadPtr" to load either a pointer or a JSValue, and we need to switch + to using "loadPtr" to load a pointer and some new "load64" interface + to load a JSValue. This would help us supporting other JSVALUE64 + platforms where pointer size is not necessarily 64-bits, for example + x32 (bug #99153). + + The major modification I made is to introduce the "*64" interfaces in + the MacroAssembler for those operations on JSValues, keep the "*Ptr" + interfaces for those operations on real pointers, and go through all + the JIT compiler code to correct the usage. + + This is the second part of the work, i.e, to correct the usage of the + new MacroAssembler interfaces in the JIT compilers, which also means + that now EncodedJSValue is defined as a 64-bit integer, and the "*64" + interfaces are used for it. + + * assembler/MacroAssembler.h: JSValue immediates should be in Imm64 instead of ImmPtr. + (MacroAssembler): + (JSC::MacroAssembler::shouldBlind): + * dfg/DFGAssemblyHelpers.cpp: Correct the JIT compilers usage of the new interfaces. + (JSC::DFG::AssemblyHelpers::jitAssertIsInt32): + (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32): + (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber): + (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble): + (JSC::DFG::AssemblyHelpers::jitAssertIsCell): + * dfg/DFGAssemblyHelpers.h: + (JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader): + (JSC::DFG::AssemblyHelpers::branchIfNotCell): + (JSC::DFG::AssemblyHelpers::debugCall): + (JSC::DFG::AssemblyHelpers::boxDouble): + (JSC::DFG::AssemblyHelpers::unboxDouble): + (JSC::DFG::AssemblyHelpers::emitExceptionCheck): + * dfg/DFGCCallHelpers.h: + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + (CCallHelpers): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGRepatch.cpp: + (JSC::DFG::generateProtoChainAccessStub): + (JSC::DFG::tryCacheGetByID): + (JSC::DFG::tryBuildGetByIDList): + (JSC::DFG::emitPutReplaceStub): + (JSC::DFG::emitPutTransitionStub): + * dfg/DFGScratchRegisterAllocator.h: + (JSC::DFG::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer): + (JSC::DFG::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer): + * dfg/DFGSilentRegisterSavePlan.h: + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::checkArgumentTypes): + (JSC::DFG::SpeculativeJIT::compileValueToInt32): + (JSC::DFG::SpeculativeJIT::compileInt32ToDouble): + (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject): + (JSC::DFG::SpeculativeJIT::compileInstanceOf): + (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant): + (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::silentSavePlanForGPR): + (JSC::DFG::SpeculativeJIT::silentSpill): + (JSC::DFG::SpeculativeJIT::silentFill): + (JSC::DFG::SpeculativeJIT::spill): + (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImm64): + (JSC::DFG::SpeculativeJIT::callOperation): + (JSC::DFG::SpeculativeJIT::branch64): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::fillDouble): + (JSC::DFG::SpeculativeJIT::fillJSValue): + (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber): + (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32): + (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber): + (JSC::DFG::SpeculativeJIT::cachedGetById): + (JSC::DFG::SpeculativeJIT::cachedPutById): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare): + (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq): + (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq): + (JSC::DFG::SpeculativeJIT::emitCall): + (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal): + (JSC::DFG::SpeculativeJIT::fillSpeculateDouble): + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean): + (JSC::DFG::SpeculativeJIT::convertToDouble): + (JSC::DFG::SpeculativeJIT::compileObjectEquality): + (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality): + (JSC::DFG::SpeculativeJIT::compileDoubleCompare): + (JSC::DFG::SpeculativeJIT::compileNonStringCellOrOtherLogicalNot): + (JSC::DFG::SpeculativeJIT::compileLogicalNot): + (JSC::DFG::SpeculativeJIT::emitNonStringCellOrOtherBranch): + (JSC::DFG::SpeculativeJIT::emitBranch): + (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal): + (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal): + (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): + (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGThunks.cpp: + (JSC::DFG::osrExitGenerationThunkGenerator): + (JSC::DFG::throwExceptionFromCallSlowPathGenerator): + (JSC::DFG::slowPathFor): + (JSC::DFG::virtualForThunkGenerator): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JIT): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): + (JSC::JIT::emitSlow_op_negate): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_urshift): + (JSC::JIT::emit_compareAndJumpSlow): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::compileBinaryArithOpSlowCase): + (JSC::JIT::emit_op_div): + * jit/JITCall.cpp: + (JSC::JIT::compileLoadVarargs): + (JSC::JIT::compileCallEval): + (JSC::JIT::compileCallEvalSlowCase): + (JSC::JIT::compileOpCall): + * jit/JITInlineMethods.h: Have some clean-up work as well. + (JSC): + (JSC::JIT::emitPutCellToCallFrameHeader): + (JSC::JIT::emitPutIntToCallFrameHeader): + (JSC::JIT::emitPutToCallFrameHeader): + (JSC::JIT::emitGetFromCallFrameHeader32): + (JSC::JIT::emitGetFromCallFrameHeader64): + (JSC::JIT::emitAllocateJSArray): + (JSC::JIT::emitValueProfilingSite): + (JSC::JIT::emitGetJITStubArg): + (JSC::JIT::emitGetVirtualRegister): + (JSC::JIT::emitPutVirtualRegister): + (JSC::JIT::emitInitRegister): + (JSC::JIT::emitJumpIfJSCell): + (JSC::JIT::emitJumpIfBothJSCells): + (JSC::JIT::emitJumpIfNotJSCell): + (JSC::JIT::emitLoadInt32ToDouble): + (JSC::JIT::emitJumpIfImmediateInteger): + (JSC::JIT::emitJumpIfNotImmediateInteger): + (JSC::JIT::emitJumpIfNotImmediateIntegers): + (JSC::JIT::emitFastArithReTagImmediate): + (JSC::JIT::emitFastArithIntToImmNoCheck): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_mov): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_is_undefined): + (JSC::JIT::emit_op_is_boolean): + (JSC::JIT::emit_op_is_number): + (JSC::JIT::emit_op_tear_off_activation): + (JSC::JIT::emit_op_not): + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + (JSC::JIT::emit_op_jtrue): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::compileOpStrictEq): + (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_throw_static_error): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + (JSC::JIT::emit_op_create_activation): + (JSC::JIT::emit_op_create_arguments): + (JSC::JIT::emit_op_init_lazy_reg): + (JSC::JIT::emitSlow_op_convert_this): + (JSC::JIT::emitSlow_op_not): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::emit_op_put_to_base): + (JSC::JIT::emit_resolve_operations): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitContiguousGetByVal): + (JSC::JIT::emitArrayStorageGetByVal): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::emit_op_get_by_pname): + (JSC::JIT::emitContiguousPutByVal): + (JSC::JIT::emitArrayStoragePutByVal): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::compilePutDirectOffset): + (JSC::JIT::emit_op_init_global_const): + (JSC::JIT::emit_op_init_global_const_check): + (JSC::JIT::emitIntTypedArrayGetByVal): + (JSC::JIT::emitFloatTypedArrayGetByVal): + (JSC::JIT::emitFloatTypedArrayPutByVal): + * jit/JITStubCall.h: + (JITStubCall): + (JSC::JITStubCall::JITStubCall): + (JSC::JITStubCall::addArgument): + (JSC::JITStubCall::call): + (JSC::JITStubCall::callWithValueProfiling): + * jit/JSInterfaceJIT.h: + (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber): + (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber): + (JSC::JSInterfaceJIT::emitLoadJSCell): + (JSC::JSInterfaceJIT::emitLoadInt32): + (JSC::JSInterfaceJIT::emitLoadDouble): + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::tagReturnAsInt32): + * runtime/JSValue.cpp: + (JSC::JSValue::description): + * runtime/JSValue.h: Define JSVALUE64 EncodedJSValue as int64_t, which is also unified with JSVALUE32_64. + (JSC): + * runtime/JSValueInlineMethods.h: New implementation of some JSValue methods to make them more conformant + with the new rule that "JSValue is a 64-bit integer rather than a pointer" for JSVALUE64 platforms. + (JSC): + (JSC::JSValue::JSValue): + (JSC::JSValue::operator bool): + (JSC::JSValue::operator==): + (JSC::JSValue::operator!=): + (JSC::reinterpretDoubleToInt64): + (JSC::reinterpretInt64ToDouble): + (JSC::JSValue::asDouble): + +2012-10-18 Michael Saboff + + convertUTF8ToUTF16() Should Check for ASCII Input + ihttps://bugs.webkit.org/show_bug.cgi?id=99739 + + Reviewed by Geoffrey Garen. + + Using the updated convertUTF8ToUTF16() , we can determine if is makes more sense to + create a string using the 8 bit source. Added a new OpaqueJSString::create(LChar*, unsigned). + Had to add a cast n JSStringCreateWithCFString to differentiate which create() to call. + + * API/JSStringRef.cpp: + (JSStringCreateWithUTF8CString): + * API/JSStringRefCF.cpp: + (JSStringCreateWithCFString): + * API/OpaqueJSString.h: + (OpaqueJSString::create): + (OpaqueJSString): + (OpaqueJSString::OpaqueJSString): + +2012-10-18 Oliver Hunt + + Unbreak jsc tests. Last minute "clever"-ness is clearly just not + a good plan. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + +2012-10-18 Oliver Hunt + + Bytecode should not have responsibility for determining how to perform non-local resolves + https://bugs.webkit.org/show_bug.cgi?id=99349 + + Reviewed by Gavin Barraclough. + + This patch removes lexical analysis from the bytecode generation. This allows + us to delay lookup of a non-local variables until the lookup is actually necessary, + and simplifies a lot of the resolve logic in BytecodeGenerator. + + Once a lookup is performed we cache the lookup information in a set of out-of-line + buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing, + etc, and allows the respective JITs to recreated optimal lookup code. + + This is currently still a performance regression in LLInt, but most of the remaining + regression is caused by a lot of indirection that I'll remove in future work, as well + as some work necessary to allow LLInt to perform in line instruction repatching. + We will also want to improve the behaviour of the baseline JIT for some of the lookup + operations, however this patch was getting quite large already so I'm landing it now + that we've reached the bar of "performance-neutral". + + Basic browsing seems to work. + + * GNUmakefile.list.am: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::visitStructures): + (JSC): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addResolve): + (JSC::CodeBlock::addPutToBase): + (CodeBlock): + (JSC::CodeBlock::resolveOperations): + (JSC::CodeBlock::putToBaseOperation): + (JSC::CodeBlock::numberOfResolveOperations): + (JSC::CodeBlock::numberOfPutToBaseOperations): + (JSC::CodeBlock::addPropertyAccessInstruction): + (JSC::CodeBlock::globalObjectConstant): + (JSC::CodeBlock::setGlobalObjectConstant): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/ResolveGlobalStatus.cpp: + (JSC::computeForStructure): + (JSC::ResolveGlobalStatus::computeFor): + * bytecode/ResolveGlobalStatus.h: + (JSC): + (ResolveGlobalStatus): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::ResolveResult::checkValidity): + (JSC): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::resolve): + (JSC::BytecodeGenerator::resolveConstDecl): + (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithThis): + (JSC::BytecodeGenerator::emitGetLocalVar): + (JSC::BytecodeGenerator::emitInitGlobalConst): + (JSC::BytecodeGenerator::emitPutToBase): + * bytecompiler/BytecodeGenerator.h: + (JSC::ResolveResult::registerResolve): + (JSC::ResolveResult::dynamicResolve): + (ResolveResult): + (JSC::ResolveResult::ResolveResult): + (JSC): + (NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::~NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::resolved): + (JSC::NonlocalResolveInfo::put): + (BytecodeGenerator): + (JSC::BytecodeGenerator::getResolveOperations): + (JSC::BytecodeGenerator::getResolveWithThisOperations): + (JSC::BytecodeGenerator::getResolveBaseOperations): + (JSC::BytecodeGenerator::getResolveBaseForPutOperations): + (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations): + (JSC::BytecodeGenerator::getPutToBaseOperation): + * bytecompiler/NodesCodegen.cpp: + (JSC::ResolveNode::isPure): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::PostfixNode::emitResolve): + (JSC::PrefixNode::emitResolve): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::AssignResolveNode::emitBytecode): + (JSC::ConstDeclNode::emitCodeSingle): + (JSC::ForInNode::emitBytecode): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::handleGetByOffset): + (DFG): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGCapabilities.h: + (JSC::DFG::canInlineResolveOperations): + (DFG): + (JSC::DFG::canCompileOpcode): + (JSC::DFG::canInlineOpcode): + * dfg/DFGGraph.h: + (ResolveGlobalData): + (ResolveOperationData): + (DFG): + (PutToBaseOperationData): + (Graph): + * dfg/DFGNode.h: + (JSC::DFG::Node::hasIdentifier): + (JSC::DFG::Node::resolveOperationsDataIndex): + (Node): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::OSRExit): + * dfg/DFGOSRExit.h: + (OSRExit): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::resolveOperations): + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::putToBaseOperation): + (JSC::DFG::SpeculativeJIT::callOperation): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + (JIT): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_put_to_base): + (JSC): + (JSC::JIT::emit_resolve_operations): + (JSC::JIT::emitSlow_link_resolve_operations): + (JSC::JIT::emit_op_resolve): + (JSC::JIT::emitSlow_op_resolve): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emitSlow_op_resolve_base): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emitSlow_op_resolve_with_base): + (JSC::JIT::emit_op_resolve_with_this): + (JSC::JIT::emitSlow_op_resolve_with_this): + (JSC::JIT::emitSlow_op_put_to_base): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_put_to_base): + (JSC): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_init_global_const): + (JSC::JIT::emit_op_init_global_const_check): + (JSC::JIT::emitSlow_op_init_global_const_check): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_init_global_const): + (JSC::JIT::emit_op_init_global_const_check): + (JSC::JIT::emitSlow_op_init_global_const_check): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC): + * jit/JITStubs.h: + * llint/LLIntSlowPaths.cpp: + (LLInt): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LLIntSlowPaths.h: + (LLInt): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/JSScope.cpp: + (JSC::LookupResult::base): + (JSC::LookupResult::value): + (JSC::LookupResult::setBase): + (JSC::LookupResult::setValue): + (LookupResult): + (JSC): + (JSC::setPutPropertyAccessOffset): + (JSC::executeResolveOperations): + (JSC::JSScope::resolveContainingScopeInternal): + (JSC::JSScope::resolveContainingScope): + (JSC::JSScope::resolve): + (JSC::JSScope::resolveBase): + (JSC::JSScope::resolveWithBase): + (JSC::JSScope::resolveWithThis): + (JSC::JSScope::resolvePut): + (JSC::JSScope::resolveGlobal): + * runtime/JSScope.h: + (JSScope): + * runtime/JSVariableObject.cpp: + (JSC): + * runtime/JSVariableObject.h: + (JSVariableObject): + * runtime/Structure.h: + (JSC::Structure::propertyAccessesAreCacheable): + (Structure): + +2012-10-18 Mark Hahnenberg + + Live oversize copied blocks should count toward overall heap fragmentation + https://bugs.webkit.org/show_bug.cgi?id=99548 + + Reviewed by Filip Pizlo. + + The CopiedSpace uses overall heap fragmentation to determine whether or not it should do any copying. + Currently it doesn't include live oversize CopiedBlocks in the calculation, but it should. We should + treat them as 100% utilized, since running a copying phase won't be able to free/compact any of their + memory. We can also free any dead oversize CopiedBlocks while we're iterating over them, rather than + iterating over them again at the end of the copying phase. + + * heap/CopiedSpace.cpp: + (JSC::CopiedSpace::doneFillingBlock): + (JSC::CopiedSpace::startedCopying): + (JSC::CopiedSpace::doneCopying): Also removed a branch when iterating over from-space at the end of + copying. Since we eagerly recycle blocks as soon as they're fully evacuated, we should see no + unpinned blocks in from-space at the end of copying. + * heap/CopiedSpaceInlineMethods.h: + (JSC::CopiedSpace::recycleBorrowedBlock): + * heap/CopyVisitorInlineMethods.h: + (JSC::CopyVisitor::checkIfShouldCopy): + +2012-10-18 Roger Fong + + Unreviewed. Build fix after r131701 and r131777. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-10-18 Mark Hahnenberg + + Race condition between GCThread and main thread during copying phase + https://bugs.webkit.org/show_bug.cgi?id=99641 + + Reviewed by Filip Pizlo. + + When a GCThread returns from copyFromShared(), it then calls doneCopying(), which returns + its borrowed CopiedBlock to the CopiedSpace. This final block allows the CopiedSpace to + continue and finish the cleanup of the copying phase. However, the GCThread can loop back + around, see that m_currentPhase is still "Copy", and try to go through the copying phase again. + This can cause all sorts of issues. To fix this, we should add a cyclic barrier to GCThread::waitForNextPhase(). + + * heap/GCThread.cpp: + (JSC::GCThread::waitForNextPhase): All GCThreads will wait when they finish one iteration until the main thread + notifies them to move down to the second while loop, where they wait for the next GCPhase to start. They also + decrement the m_numberOfActiveGCThreads counter as they begin to wait for the next phase and increment it as + they enter the next phase. This allows the main thread to wait in endCurrentPhase() until all the threads have + finished the current phase and are waiting on the next phase to begin. Without the counter, there would be + no way to ensure that every thread was available for each GCPhase. + (JSC::GCThread::gcThreadMain): We now use the m_phaseLock to synchronize with the main thread when we're being created. + * heap/GCThreadSharedData.cpp: + (JSC::GCThreadSharedData::GCThreadSharedData): As we create each GCThread, we increment the m_numberOfActiveGCThreads + counter. When we are done creating the threads, we wait until they're all waiting for the next GCPhase. This prevents + us from leaving some GCThreads behind during the first GCPhase, which could hurt us on our very short-running + benchmarks (e.g. SunSpider). + (JSC::GCThreadSharedData::~GCThreadSharedData): + (JSC::GCThreadSharedData::startNextPhase): We atomically swap the two flags, m_gcThreadsShouldWait and m_currentPhase, + so that if the threads finish very quickly, they will wait until the main thread is ready to end the current phase. + (JSC::GCThreadSharedData::endCurrentPhase): Here atomically we swap the two flags again to allow the threads to + advance to waiting on the next GCPhase. We wait until all of the GCThreads have settled into the second wait loop + before allowing the main thread to continue. This prevents us from leaving one of the GCThreads stuck in the first + wait loop if we were to call startNextPhase() before it had time to wake up and move on to the second wait loop. + (JSC): + (JSC::GCThreadSharedData::didStartMarking): We now use startNextPhase() to properly swap the flags. + (JSC::GCThreadSharedData::didFinishMarking): Ditto for endCurrentPhase(). + (JSC::GCThreadSharedData::didStartCopying): Ditto. + (JSC::GCThreadSharedData::didFinishCopying): Ditto. + * heap/GCThreadSharedData.h: + (GCThreadSharedData): + * heap/Heap.cpp: + (JSC::Heap::copyBackingStores): No reason to use the extra reference. + +2012-10-18 Pablo Flouret + + Implement css3-conditional's @supports rule + https://bugs.webkit.org/show_bug.cgi?id=86146 + + Reviewed by Antti Koivisto. + + * Configurations/FeatureDefines.xcconfig: + Add an ENABLE_CSS3_CONDITIONAL_RULES flag. + +2012-10-18 Michael Saboff + + Make conversion between JSStringRef and WKStringRef work without character size conversions + https://bugs.webkit.org/show_bug.cgi?id=99727 + + Reviewed by Anders Carlsson. + + Export the string() method for use in WebKit. + + * API/OpaqueJSString.h: + (OpaqueJSString::string): + +2012-10-18 Raphael Kubo da Costa + + [CMake] Avoid unnecessarily running the LLInt generation commands. + https://bugs.webkit.org/show_bug.cgi?id=99708 + + Reviewed by Rob Buis. + + As described in the comments in the change itself, in some cases + the Ruby generation scripts used when LLInt is on would each be + run twice in every build even if nothing had changed. + + Fix that by not setting the OBJECT_DEPENDS property of some source + files to depend on the generated headers; instead, they are now + just part of the final binaries/libraries which use them. + + * CMakeLists.txt: + +2012-10-17 Zoltan Horvath + + Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas + https://bugs.webkit.org/show_bug.cgi?id=99609 + + Reviewed by Ryosuke Niwa. + + Remove the implementation since it creates bogus JSGlobalDatas in the layout tests. + + * heap/HeapStatistics.cpp: + (JSC): + * heap/HeapStatistics.h: + (HeapStatistics): + +2012-10-17 Sam Weinig + + Attempt to fix the build. + + * bytecode/GlobalResolveInfo.h: Copied from bytecode/GlobalResolveInfo.h. + +2012-10-17 Filip Pizlo + + REGRESSION (r130826 or r130828): Twitter top bar is dysfunctional + https://bugs.webkit.org/show_bug.cgi?id=99577 + + + Reviewed by Mark Hahnenberg. + + It turns out that it's a good idea to maintain the invariants of your object model, such as that + elements past publicLength should have the hole value. + + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-17 Anders Carlsson + + Clean up Vector.h + https://bugs.webkit.org/show_bug.cgi?id=99622 + + Reviewed by Benjamin Poulain. + + Fix fallout from removing std::max and std::min using declarations. + + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstrings): + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncIndexOf): + * yarr/YarrPattern.cpp: + (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets): + +2012-10-17 Oliver Hunt + + Committing new files is so overrated. + + * bytecode/ResolveOperation.h: Added. + (JSC): + (JSC::ResolveOperation::getAndReturnScopedVar): + (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope): + (ResolveOperation): + (JSC::ResolveOperation::getAndReturnGlobalVar): + (JSC::ResolveOperation::getAndReturnGlobalProperty): + (JSC::ResolveOperation::resolveFail): + (JSC::ResolveOperation::skipTopScopeNode): + (JSC::ResolveOperation::skipScopes): + (JSC::ResolveOperation::returnGlobalObjectAsBase): + (JSC::ResolveOperation::setBaseToGlobal): + (JSC::ResolveOperation::setBaseToUndefined): + (JSC::ResolveOperation::setBaseToScope): + (JSC::ResolveOperation::returnScopeAsBase): + (JSC::PutToBaseOperation::PutToBaseOperation): + +2012-10-17 Michael Saboff + + StringPrototype::jsSpliceSubstringsWithSeparators() doesn't optimally handle 8 bit strings + https://bugs.webkit.org/show_bug.cgi?id=99230 + + Reviewed by Geoffrey Garen. + + Added code to select characters8() or characters16() on the not all 8 bit path for both the + processing of the source and the separators. + + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + +2012-10-17 Filip Pizlo + + Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling + https://bugs.webkit.org/show_bug.cgi?id=99557 + + Reviewed by Geoffrey Garen. + + Removed an inaccurate and misleading comment as per Geoff's review. (I forgot + to make this change as part of http://trac.webkit.org/changeset/131644). + + * bytecompiler/NodesCodegen.cpp: + (JSC::FunctionCallResolveNode::emitBytecode): + +2012-10-17 Oliver Hunt + + Bytecode should not have responsibility for determining how to perform non-local resolves + https://bugs.webkit.org/show_bug.cgi?id=99349 + + Reviewed by Gavin Barraclough. + + This patch removes lexical analysis from the bytecode generation. This allows + us to delay lookup of a non-local variables until the lookup is actually necessary, + and simplifies a lot of the resolve logic in BytecodeGenerator. + + Once a lookup is performed we cache the lookup information in a set of out-of-line + buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing, + etc, and allows the respective JITs to recreated optimal lookup code. + + This is currently still a performance regression in LLInt, but most of the remaining + regression is caused by a lot of indirection that I'll remove in future work, as well + as some work necessary to allow LLInt to perform in line instruction repatching. + We will also want to improve the behaviour of the baseline JIT for some of the lookup + operations, however this patch was getting quite large already so I'm landing it now + that we've reached the bar of "performance-neutral". + + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::visitStructures): + (JSC): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addResolve): + (JSC::CodeBlock::addPutToBase): + (CodeBlock): + (JSC::CodeBlock::resolveOperations): + (JSC::CodeBlock::putToBaseOperation): + (JSC::CodeBlock::numberOfResolveOperations): + (JSC::CodeBlock::numberOfPutToBaseOperations): + (JSC::CodeBlock::addPropertyAccessInstruction): + (JSC::CodeBlock::globalObjectConstant): + (JSC::CodeBlock::setGlobalObjectConstant): + * bytecode/GlobalResolveInfo.h: Removed. + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/ResolveGlobalStatus.cpp: + (JSC::computeForStructure): + (JSC::ResolveGlobalStatus::computeFor): + * bytecode/ResolveGlobalStatus.h: + (JSC): + (ResolveGlobalStatus): + * bytecode/ResolveOperation.h: Added. + The new types and logic we use to perform the cached lookups. + (JSC): + (ResolveOperation): + (JSC::ResolveOperation::getAndReturnScopedVar): + (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope): + (JSC::ResolveOperation::getAndReturnGlobalVar): + (JSC::ResolveOperation::getAndReturnGlobalProperty): + (JSC::ResolveOperation::resolveFail): + (JSC::ResolveOperation::skipTopScopeNode): + (JSC::ResolveOperation::skipScopes): + (JSC::ResolveOperation::returnGlobalObjectAsBase): + (JSC::ResolveOperation::setBaseToGlobal): + (JSC::ResolveOperation::setBaseToUndefined): + (JSC::ResolveOperation::setBaseToScope): + (JSC::ResolveOperation::returnScopeAsBase): + (JSC::PutToBaseOperation::PutToBaseOperation): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::ResolveResult::checkValidity): + (JSC): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::resolve): + (JSC::BytecodeGenerator::resolveConstDecl): + (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithThis): + (JSC::BytecodeGenerator::emitGetLocalVar): + (JSC::BytecodeGenerator::emitInitGlobalConst): + (JSC::BytecodeGenerator::emitPutToBase): + * bytecompiler/BytecodeGenerator.h: + (JSC::ResolveResult::registerResolve): + (JSC::ResolveResult::dynamicResolve): + (ResolveResult): + (JSC::ResolveResult::ResolveResult): + (JSC): + (NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::~NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::resolved): + (JSC::NonlocalResolveInfo::put): + (BytecodeGenerator): + (JSC::BytecodeGenerator::getResolveOperations): + (JSC::BytecodeGenerator::getResolveWithThisOperations): + (JSC::BytecodeGenerator::getResolveBaseOperations): + (JSC::BytecodeGenerator::getResolveBaseForPutOperations): + (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations): + (JSC::BytecodeGenerator::getPutToBaseOperation): + * bytecompiler/NodesCodegen.cpp: + (JSC::ResolveNode::isPure): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::PostfixNode::emitResolve): + (JSC::PrefixNode::emitResolve): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::AssignResolveNode::emitBytecode): + (JSC::ConstDeclNode::emitCodeSingle): + (JSC::ForInNode::emitBytecode): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::handleGetByOffset): + (DFG): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileResolveOperations): + (DFG): + (JSC::DFG::canCompilePutToBaseOperation): + (JSC::DFG::canCompileOpcode): + (JSC::DFG::canInlineOpcode): + * dfg/DFGGraph.h: + (ResolveGlobalData): + (ResolveOperationData): + (DFG): + (PutToBaseOperationData): + (Graph): + * dfg/DFGNode.h: + (JSC::DFG::Node::hasIdentifier): + (JSC::DFG::Node::resolveOperationsDataIndex): + (Node): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::OSRExit): + * dfg/DFGOSRExit.h: + (OSRExit): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::resolveOperations): + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::putToBaseOperation): + (JSC::DFG::SpeculativeJIT::callOperation): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + (JIT): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_put_to_base): + (JSC): + (JSC::JIT::emit_resolve_operations): + (JSC::JIT::emitSlow_link_resolve_operations): + (JSC::JIT::emit_op_resolve): + (JSC::JIT::emitSlow_op_resolve): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emitSlow_op_resolve_base): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emitSlow_op_resolve_with_base): + (JSC::JIT::emit_op_resolve_with_this): + (JSC::JIT::emitSlow_op_resolve_with_this): + (JSC::JIT::emitSlow_op_put_to_base): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_put_to_base): + (JSC): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_init_global_const): + (JSC::JIT::emit_op_init_global_const_check): + (JSC::JIT::emitSlow_op_init_global_const_check): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_init_global_const): + (JSC::JIT::emit_op_init_global_const_check): + (JSC::JIT::emitSlow_op_init_global_const_check): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC): + * jit/JITStubs.h: + * llint/LLIntSlowPaths.cpp: + (LLInt): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LLIntSlowPaths.h: + (LLInt): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/JSScope.cpp: + (JSC::LookupResult::base): + (JSC::LookupResult::value): + (JSC::LookupResult::setBase): + (JSC::LookupResult::setValue): + (LookupResult): + (JSC): + (JSC::setPutPropertyAccessOffset): + (JSC::executeResolveOperations): + (JSC::JSScope::resolveContainingScopeInternal): + (JSC::JSScope::resolveContainingScope): + (JSC::JSScope::resolve): + (JSC::JSScope::resolveBase): + (JSC::JSScope::resolveWithBase): + (JSC::JSScope::resolveWithThis): + (JSC::JSScope::resolvePut): + (JSC::JSScope::resolveGlobal): + * runtime/JSScope.h: + (JSScope): + * runtime/JSVariableObject.cpp: + (JSC): + * runtime/JSVariableObject.h: + (JSVariableObject): + * runtime/Structure.h: + (JSC::Structure::propertyAccessesAreCacheable): + (Structure): + +2012-10-17 Filip Pizlo + + Array and object allocations via 'new Object' or 'new Array' should be inlined in bytecode to allow allocation site profiling + https://bugs.webkit.org/show_bug.cgi?id=99557 + + Reviewed by Geoffrey Garen. + + This uses the old jneq_ptr trick to allow for the bytecode to "see" that the + operation in question is what we almost certainly know it to be. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/SpecialPointer.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitCallEval): + (JSC::BytecodeGenerator::expectedFunctionForIdentifier): + (JSC): + (JSC::BytecodeGenerator::emitExpectedFunctionSnippet): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (BytecodeGenerator): + * bytecompiler/NodesCodegen.cpp: + (JSC::NewExprNode::emitBytecode): + (JSC::FunctionCallValueNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::FunctionCallBracketNode::emitBytecode): + (JSC::FunctionCallDotNode::emitBytecode): + (JSC::CallFunctionCallDotNode::emitBytecode): + (JSC::ApplyFunctionCallDotNode::emitBytecode): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parseBlock): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + (JIT): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_array_with_size): + (JSC): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC): + * jit/JITStubs.h: + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + (LLInt): + * llint/LLIntSlowPaths.h: + (LLInt): + * llint/LowLevelInterpreter.asm: + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): + (JSC): + * runtime/ArrayConstructor.h: + (JSC): + * runtime/CommonIdentifiers.h: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC): + +2012-10-17 Filip Pizlo + + JIT op_get_by_pname should call cti_get_by_val_generic and not cti_get_by_val + https://bugs.webkit.org/show_bug.cgi?id=99631 + + + Reviewed by Mark Hahnenberg. + + cti_get_by_val assumes that the return address has patching metadata associated with it, which won't + be true for op_get_by_pname. cti_get_by_val_generic makes no such assumptions. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitSlow_op_get_by_pname): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emitSlow_op_get_by_pname): + +2012-10-17 Mark Hahnenberg + + Block freeing thread should sleep indefinitely when there's no work to do + https://bugs.webkit.org/show_bug.cgi?id=98084 + + Reviewed by Geoffrey Garen. + + r130212 didn't fully fix the problem. + + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::blockFreeingThreadMain): We would just continue to the next iteration if + we found that we had zero blocks to copy. We should move the indefinite wait up to where that + check is done so that we properly detect the "no more blocks to copy, wait for more" condition. + +2012-10-16 Csaba Osztrogonác + + Unreviewed, rolling out r131516 and r131550. + http://trac.webkit.org/changeset/131516 + http://trac.webkit.org/changeset/131550 + https://bugs.webkit.org/show_bug.cgi?id=99349 + + It caused zillion different problem on different platforms + + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC): + (JSC::isGlobalResolve): + (JSC::instructionOffsetForNth): + (JSC::printGlobalResolveInfo): + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::visitStructures): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): + (JSC::CodeBlock::globalResolveInfoForBytecodeOffset): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (CodeBlock): + (JSC::CodeBlock::addGlobalResolveInstruction): + (JSC::CodeBlock::addGlobalResolveInfo): + (JSC::CodeBlock::globalResolveInfo): + (JSC::CodeBlock::numberOfGlobalResolveInfos): + (JSC::CodeBlock::globalResolveInfoCount): + * bytecode/GlobalResolveInfo.h: Copied from Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp. + (JSC): + (JSC::GlobalResolveInfo::GlobalResolveInfo): + (GlobalResolveInfo): + (JSC::getGlobalResolveInfoBytecodeOffset): + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/ResolveGlobalStatus.cpp: + (JSC): + (JSC::computeForStructure): + (JSC::computeForLLInt): + (JSC::ResolveGlobalStatus::computeFor): + * bytecode/ResolveGlobalStatus.h: + (JSC): + (ResolveGlobalStatus): + * bytecode/ResolveOperation.h: Removed. + * bytecompiler/BytecodeGenerator.cpp: + (JSC::ResolveResult::checkValidity): + (JSC::ResolveResult::registerPointer): + (JSC): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::resolve): + (JSC::BytecodeGenerator::resolveConstDecl): + (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithBase): + (JSC::BytecodeGenerator::emitResolveWithThis): + (JSC::BytecodeGenerator::emitGetStaticVar): + (JSC::BytecodeGenerator::emitInitGlobalConst): + (JSC::BytecodeGenerator::emitPutStaticVar): + * bytecompiler/BytecodeGenerator.h: + (JSC::ResolveResult::registerResolve): + (JSC::ResolveResult::dynamicResolve): + (JSC::ResolveResult::lexicalResolve): + (JSC::ResolveResult::indexedGlobalResolve): + (JSC::ResolveResult::dynamicIndexedGlobalResolve): + (JSC::ResolveResult::globalResolve): + (JSC::ResolveResult::dynamicGlobalResolve): + (JSC::ResolveResult::type): + (JSC::ResolveResult::index): + (JSC::ResolveResult::depth): + (JSC::ResolveResult::globalObject): + (ResolveResult): + (JSC::ResolveResult::isStatic): + (JSC::ResolveResult::isIndexed): + (JSC::ResolveResult::isScoped): + (JSC::ResolveResult::isGlobal): + (JSC::ResolveResult::ResolveResult): + (BytecodeGenerator): + * bytecompiler/NodesCodegen.cpp: + (JSC::ResolveNode::isPure): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::PostfixNode::emitResolve): + (JSC::PrefixNode::emitResolve): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::AssignResolveNode::emitBytecode): + (JSC::ConstDeclNode::emitCodeSingle): + (JSC::ForInNode::emitBytecode): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::handleGetByOffset): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileOpcode): + (JSC::DFG::canInlineOpcode): + * dfg/DFGGraph.h: + (ResolveGlobalData): + (DFG): + (Graph): + * dfg/DFGNode.h: + (JSC::DFG::Node::hasIdentifier): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::OSRExit): + * dfg/DFGOSRExit.h: + (OSRExit): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + (JSC): + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + (JIT): + (JSC::JIT::emit_op_get_global_var_watchable): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_resolve): + (JSC): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_resolve_skip): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emit_op_resolve_with_this): + (JSC::JIT::emit_op_resolve_global_dynamic): + (JSC::JIT::emitSlow_op_resolve_global_dynamic): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_resolve): + (JSC): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_resolve_skip): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emit_op_resolve_with_this): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_put_global_var_check): + (JSC::JIT::emitSlow_op_put_global_var_check): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_put_global_var_check): + (JSC::JIT::emitSlow_op_put_global_var_check): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC): + * jit/JITStubs.h: + * llint/LLIntSlowPaths.cpp: + (LLInt): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LLIntSlowPaths.h: + (LLInt): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/JSScope.cpp: + (JSC::JSScope::resolve): + (JSC::JSScope::resolveSkip): + (JSC::JSScope::resolveGlobal): + (JSC::JSScope::resolveGlobalDynamic): + (JSC::JSScope::resolveBase): + (JSC::JSScope::resolveWithBase): + (JSC::JSScope::resolveWithThis): + * runtime/JSScope.h: + (JSScope): + * runtime/JSVariableObject.cpp: + * runtime/JSVariableObject.h: + * runtime/Structure.h: + +2012-10-16 Dongwoo Joshua Im + + [GTK] Fix build break - ResolveOperations.h is not in WebKit. + https://bugs.webkit.org/show_bug.cgi?id=99538 + + Unreviewed build fix. + + There are some files including ResolveOperations.h which is not exist at all. + + * GNUmakefile.list.am: s/ResolveOperations.h/ResolveOperation.h/ + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: s/ResolveOperations.h/ResolveOperation.h/ + +2012-10-16 Jian Li + + Rename feature define ENABLE_WIDGET_REGION to ENABLE_DRAGGBALE_REGION + https://bugs.webkit.org/show_bug.cgi?id=98975 + + Reviewed by Adam Barth. + + Renaming is needed to better match with the draggable region code. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-15 Oliver Hunt + + Bytecode should not have responsibility for determining how to perform non-local resolves + https://bugs.webkit.org/show_bug.cgi?id=99349 + + Reviewed by Gavin Barraclough. + + This patch removes lexical analysis from the bytecode generation. This allows + us to delay lookup of a non-local variables until the lookup is actually necessary, + and simplifies a lot of the resolve logic in BytecodeGenerator. + + Once a lookup is performed we cache the lookup information in a set of out-of-line + buffers in CodeBlock. This allows subsequent lookups to avoid unnecessary hashing, + etc, and allows the respective JITs to recreated optimal lookup code. + + This is currently still a performance regression in LLInt, but most of the remaining + regression is caused by a lot of indirection that I'll remove in future work, as well + as some work necessary to allow LLInt to perform in line instruction repatching. + We will also want to improve the behaviour of the baseline JIT for some of the lookup + operations, however this patch was getting quite large already so I'm landing it now + that we've reached the bar of "performance-neutral". + + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::printStructures): + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::visitStructures): + (JSC): + (JSC::CodeBlock::finalizeUnconditionally): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addResolve): + (JSC::CodeBlock::addPutToBase): + (CodeBlock): + (JSC::CodeBlock::resolveOperations): + (JSC::CodeBlock::putToBaseOperation): + (JSC::CodeBlock::numberOfResolveOperations): + (JSC::CodeBlock::numberOfPutToBaseOperations): + (JSC::CodeBlock::addPropertyAccessInstruction): + (JSC::CodeBlock::globalObjectConstant): + (JSC::CodeBlock::setGlobalObjectConstant): + * bytecode/GlobalResolveInfo.h: Removed. + * bytecode/Opcode.h: + (JSC): + (JSC::padOpcodeName): + * bytecode/ResolveGlobalStatus.cpp: + (JSC::computeForStructure): + (JSC::ResolveGlobalStatus::computeFor): + * bytecode/ResolveGlobalStatus.h: + (JSC): + (ResolveGlobalStatus): + * bytecode/ResolveOperation.h: Added. + The new types and logic we use to perform the cached lookups. + (JSC): + (ResolveOperation): + (JSC::ResolveOperation::getAndReturnScopedVar): + (JSC::ResolveOperation::checkForDynamicEntriesBeforeGlobalScope): + (JSC::ResolveOperation::getAndReturnGlobalVar): + (JSC::ResolveOperation::getAndReturnGlobalProperty): + (JSC::ResolveOperation::resolveFail): + (JSC::ResolveOperation::skipTopScopeNode): + (JSC::ResolveOperation::skipScopes): + (JSC::ResolveOperation::returnGlobalObjectAsBase): + (JSC::ResolveOperation::setBaseToGlobal): + (JSC::ResolveOperation::setBaseToUndefined): + (JSC::ResolveOperation::setBaseToScope): + (JSC::ResolveOperation::returnScopeAsBase): + (JSC::PutToBaseOperation::PutToBaseOperation): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::ResolveResult::checkValidity): + (JSC): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::resolve): + (JSC::BytecodeGenerator::resolveConstDecl): + (JSC::BytecodeGenerator::shouldAvoidResolveGlobal): + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithBaseForPut): + (JSC::BytecodeGenerator::emitResolveWithThis): + (JSC::BytecodeGenerator::emitGetLocalVar): + (JSC::BytecodeGenerator::emitInitGlobalConst): + (JSC::BytecodeGenerator::emitPutToBase): + * bytecompiler/BytecodeGenerator.h: + (JSC::ResolveResult::registerResolve): + (JSC::ResolveResult::dynamicResolve): + (ResolveResult): + (JSC::ResolveResult::ResolveResult): + (JSC): + (NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::~NonlocalResolveInfo): + (JSC::NonlocalResolveInfo::resolved): + (JSC::NonlocalResolveInfo::put): + (BytecodeGenerator): + (JSC::BytecodeGenerator::getResolveOperations): + (JSC::BytecodeGenerator::getResolveWithThisOperations): + (JSC::BytecodeGenerator::getResolveBaseOperations): + (JSC::BytecodeGenerator::getResolveBaseForPutOperations): + (JSC::BytecodeGenerator::getResolveWithBaseForPutOperations): + (JSC::BytecodeGenerator::getPutToBaseOperation): + * bytecompiler/NodesCodegen.cpp: + (JSC::ResolveNode::isPure): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::PostfixNode::emitResolve): + (JSC::PrefixNode::emitResolve): + (JSC::ReadModifyResolveNode::emitBytecode): + (JSC::AssignResolveNode::emitBytecode): + (JSC::ConstDeclNode::emitCodeSingle): + (JSC::ForInNode::emitBytecode): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (ByteCodeParser): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::handleGetByOffset): + (DFG): + (JSC::DFG::ByteCodeParser::parseResolveOperations): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGCapabilities.h: + (JSC::DFG::canCompileResolveOperations): + (DFG): + (JSC::DFG::canCompilePutToBaseOperation): + (JSC::DFG::canCompileOpcode): + (JSC::DFG::canInlineOpcode): + * dfg/DFGGraph.h: + (ResolveGlobalData): + (ResolveOperationData): + (DFG): + (PutToBaseOperationData): + (Graph): + * dfg/DFGNode.h: + (JSC::DFG::Node::hasIdentifier): + (JSC::DFG::Node::resolveOperationsDataIndex): + (Node): + * dfg/DFGNodeType.h: + (DFG): + * dfg/DFGOSRExit.cpp: + (JSC::DFG::OSRExit::OSRExit): + * dfg/DFGOSRExit.h: + (OSRExit): + * dfg/DFGOSRExitCompiler.cpp: + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGPredictionPropagationPhase.cpp: + (JSC::DFG::PredictionPropagationPhase::propagate): + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::resolveOperations): + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::putToBaseOperation): + (JSC::DFG::SpeculativeJIT::callOperation): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + (JIT): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_put_to_base): + (JSC): + (JSC::JIT::emit_resolve_operations): + (JSC::JIT::emitSlow_link_resolve_operations): + (JSC::JIT::emit_op_resolve): + (JSC::JIT::emitSlow_op_resolve): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emitSlow_op_resolve_base): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emitSlow_op_resolve_with_base): + (JSC::JIT::emit_op_resolve_with_this): + (JSC::JIT::emitSlow_op_resolve_with_this): + (JSC::JIT::emitSlow_op_put_to_base): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_put_to_base): + (JSC): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_init_global_const): + (JSC::JIT::emit_op_init_global_const_check): + (JSC::JIT::emitSlow_op_init_global_const_check): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_init_global_const): + (JSC::JIT::emit_op_init_global_const_check): + (JSC::JIT::emitSlow_op_init_global_const_check): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + (JSC): + * jit/JITStubs.h: + * llint/LLIntSlowPaths.cpp: + (LLInt): + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + * llint/LLIntSlowPaths.h: + (LLInt): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/JSScope.cpp: + (JSC::LookupResult::base): + (JSC::LookupResult::value): + (JSC::LookupResult::setBase): + (JSC::LookupResult::setValue): + (LookupResult): + (JSC): + (JSC::setPutPropertyAccessOffset): + (JSC::executeResolveOperations): + (JSC::JSScope::resolveContainingScopeInternal): + (JSC::JSScope::resolveContainingScope): + (JSC::JSScope::resolve): + (JSC::JSScope::resolveBase): + (JSC::JSScope::resolveWithBase): + (JSC::JSScope::resolveWithThis): + (JSC::JSScope::resolvePut): + (JSC::JSScope::resolveGlobal): + * runtime/JSScope.h: + (JSScope): + * runtime/JSVariableObject.cpp: + (JSC): + * runtime/JSVariableObject.h: + (JSVariableObject): + * runtime/Structure.h: + (JSC::Structure::propertyAccessesAreCacheable): + (Structure): + +2012-10-16 Filip Pizlo + + Accidental switch fall-through in DFG::FixupPhase + https://bugs.webkit.org/show_bug.cgi?id=96956 + + + Reviewed by Mark Hahnenberg. + + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + +2012-10-16 Filip Pizlo + + GetScopedVar CSE matches dead GetScopedVar's leading to IR corruption + https://bugs.webkit.org/show_bug.cgi?id=99470 + + + Reviewed by Mark Hahnenberg. + + All it takes is to follow the "if (!shouldGenerate) continue" idiom and everything will be OK. + + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::globalVarLoadElimination): + (JSC::DFG::CSEPhase::scopedVarLoadElimination): + (JSC::DFG::CSEPhase::globalVarWatchpointElimination): + (JSC::DFG::CSEPhase::getByValLoadElimination): + (JSC::DFG::CSEPhase::checkStructureElimination): + (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination): + (JSC::DFG::CSEPhase::getByOffsetLoadElimination): + +2012-10-16 Dima Gorbik + + Remove Platform.h include from the header files. + https://bugs.webkit.org/show_bug.cgi?id=98665 + + Reviewed by Eric Seidel. + + We don't want other clients that include WebKit headers to know about Platform.h. + + * API/tests/minidom.c: + * API/tests/testapi.c: + +2012-10-16 Balazs Kilvady + + Add missing MIPS functions to assembler. + https://bugs.webkit.org/show_bug.cgi?id=98856 + + Reviewed by Oliver Hunt. + + Implement missing functions in MacroAssemblerMIPS and MIPSAssembler. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::lb): + (MIPSAssembler): + (JSC::MIPSAssembler::lh): + (JSC::MIPSAssembler::cvtds): + (JSC::MIPSAssembler::cvtsd): + (JSC::MIPSAssembler::vmov): + * assembler/MacroAssemblerMIPS.h: + (MacroAssemblerMIPS): + (JSC::MacroAssemblerMIPS::load8Signed): + (JSC::MacroAssemblerMIPS::load16Signed): + (JSC::MacroAssemblerMIPS::moveDoubleToInts): + (JSC::MacroAssemblerMIPS::moveIntsToDouble): + (JSC::MacroAssemblerMIPS::loadFloat): + (JSC::MacroAssemblerMIPS::loadDouble): + (JSC::MacroAssemblerMIPS::storeFloat): + (JSC::MacroAssemblerMIPS::storeDouble): + (JSC::MacroAssemblerMIPS::addDouble): + (JSC::MacroAssemblerMIPS::convertFloatToDouble): + (JSC::MacroAssemblerMIPS::convertDoubleToFloat): + +2012-10-16 Balazs Kilvady + + MIPS assembler coding-style fix. + https://bugs.webkit.org/show_bug.cgi?id=99359 + + Reviewed by Oliver Hunt. + + Coding style fix of existing MIPS assembler header files. + + * assembler/MIPSAssembler.h: + (JSC::MIPSAssembler::addiu): + (JSC::MIPSAssembler::addu): + (JSC::MIPSAssembler::subu): + (JSC::MIPSAssembler::mul): + (JSC::MIPSAssembler::andInsn): + (JSC::MIPSAssembler::andi): + (JSC::MIPSAssembler::nor): + (JSC::MIPSAssembler::orInsn): + (JSC::MIPSAssembler::ori): + (JSC::MIPSAssembler::xorInsn): + (JSC::MIPSAssembler::xori): + (JSC::MIPSAssembler::slt): + (JSC::MIPSAssembler::sltu): + (JSC::MIPSAssembler::sltiu): + (JSC::MIPSAssembler::sll): + (JSC::MIPSAssembler::sllv): + (JSC::MIPSAssembler::sra): + (JSC::MIPSAssembler::srav): + (JSC::MIPSAssembler::srl): + (JSC::MIPSAssembler::srlv): + (JSC::MIPSAssembler::lbu): + (JSC::MIPSAssembler::lw): + (JSC::MIPSAssembler::lwl): + (JSC::MIPSAssembler::lwr): + (JSC::MIPSAssembler::lhu): + (JSC::MIPSAssembler::sb): + (JSC::MIPSAssembler::sh): + (JSC::MIPSAssembler::sw): + (JSC::MIPSAssembler::addd): + (JSC::MIPSAssembler::subd): + (JSC::MIPSAssembler::muld): + (JSC::MIPSAssembler::divd): + (JSC::MIPSAssembler::lwc1): + (JSC::MIPSAssembler::ldc1): + (JSC::MIPSAssembler::swc1): + (JSC::MIPSAssembler::sdc1): + (MIPSAssembler): + (JSC::MIPSAssembler::relocateJumps): + (JSC::MIPSAssembler::linkWithOffset): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::add32): + (JSC::MacroAssemblerMIPS::and32): + (JSC::MacroAssemblerMIPS::sub32): + (MacroAssemblerMIPS): + (JSC::MacroAssemblerMIPS::load8): + (JSC::MacroAssemblerMIPS::load32): + (JSC::MacroAssemblerMIPS::load32WithUnalignedHalfWords): + (JSC::MacroAssemblerMIPS::load16): + (JSC::MacroAssemblerMIPS::store8): + (JSC::MacroAssemblerMIPS::store16): + (JSC::MacroAssemblerMIPS::store32): + (JSC::MacroAssemblerMIPS::nearCall): + (JSC::MacroAssemblerMIPS::test8): + (JSC::MacroAssemblerMIPS::test32): + +2012-10-16 Yuqiang Xian + + Refactor MacroAssembler interfaces to differentiate the pointer operands from the 64-bit integer operands + https://bugs.webkit.org/show_bug.cgi?id=99154 + + Reviewed by Gavin Barraclough. + + In current JavaScriptCore implementation for JSVALUE64 platform (i.e., + the X64 platform), we assume that the JSValue size is same to the + pointer size, and thus EncodedJSValue is simply type defined as a + "void*". In the JIT compiler, we also take this assumption and invoke + the same macro assembler interfaces for both JSValue and pointer + operands. We need to differentiate the operations on pointers from the + operations on JSValues, and let them invoking different macro + assembler interfaces. For example, we now use the interface of + "loadPtr" to load either a pointer or a JSValue, and we need to switch + to using "loadPtr" to load a pointer and some new "load64" interface + to load a JSValue. This would help us supporting other JSVALUE64 + platforms where pointer size is not necessarily 64-bits, for example + x32 (bug #99153). + + The major modification I made is to introduce the "*64" interfaces in + the MacroAssembler for those operations on JSValues, keep the "*Ptr" + interfaces for those operations on real pointers, and go through all + the JIT compiler code to correct the usage. + + This is the first part of the work, i.e, to add the *64 interfaces to + the MacroAssembler. + + * assembler/AbstractMacroAssembler.h: Add the Imm64 interfaces. + (AbstractMacroAssembler): + (JSC::AbstractMacroAssembler::TrustedImm64::TrustedImm64): + (TrustedImm64): + (JSC::AbstractMacroAssembler::Imm64::Imm64): + (Imm64): + (JSC::AbstractMacroAssembler::Imm64::asTrustedImm64): + * assembler/MacroAssembler.h: map Ptr methods to 64 for X86_64. + (MacroAssembler): + (JSC::MacroAssembler::peek64): + (JSC::MacroAssembler::poke): + (JSC::MacroAssembler::poke64): + (JSC::MacroAssembler::addPtr): + (JSC::MacroAssembler::andPtr): + (JSC::MacroAssembler::negPtr): + (JSC::MacroAssembler::orPtr): + (JSC::MacroAssembler::rotateRightPtr): + (JSC::MacroAssembler::subPtr): + (JSC::MacroAssembler::xorPtr): + (JSC::MacroAssembler::loadPtr): + (JSC::MacroAssembler::loadPtrWithAddressOffsetPatch): + (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch): + (JSC::MacroAssembler::storePtr): + (JSC::MacroAssembler::storePtrWithAddressOffsetPatch): + (JSC::MacroAssembler::movePtrToDouble): + (JSC::MacroAssembler::moveDoubleToPtr): + (JSC::MacroAssembler::comparePtr): + (JSC::MacroAssembler::testPtr): + (JSC::MacroAssembler::branchPtr): + (JSC::MacroAssembler::branchTestPtr): + (JSC::MacroAssembler::branchAddPtr): + (JSC::MacroAssembler::branchSubPtr): + (JSC::MacroAssembler::shouldBlindDouble): + (JSC::MacroAssembler::shouldBlind): + (JSC::MacroAssembler::RotatedImm64::RotatedImm64): + (RotatedImm64): + (JSC::MacroAssembler::rotationBlindConstant): + (JSC::MacroAssembler::loadRotationBlindedConstant): + (JSC::MacroAssembler::move): + (JSC::MacroAssembler::and64): + (JSC::MacroAssembler::store64): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch): + (MacroAssemblerX86Common): + (JSC::MacroAssemblerX86Common::move): + * assembler/MacroAssemblerX86_64.h: Add the 64 methods for X86_64. + (JSC::MacroAssemblerX86_64::branchAdd32): + (JSC::MacroAssemblerX86_64::add64): + (MacroAssemblerX86_64): + (JSC::MacroAssemblerX86_64::and64): + (JSC::MacroAssemblerX86_64::neg64): + (JSC::MacroAssemblerX86_64::or64): + (JSC::MacroAssemblerX86_64::rotateRight64): + (JSC::MacroAssemblerX86_64::sub64): + (JSC::MacroAssemblerX86_64::xor64): + (JSC::MacroAssemblerX86_64::load64): + (JSC::MacroAssemblerX86_64::load64WithAddressOffsetPatch): + (JSC::MacroAssemblerX86_64::load64WithCompactAddressOffsetPatch): + (JSC::MacroAssemblerX86_64::store64): + (JSC::MacroAssemblerX86_64::store64WithAddressOffsetPatch): + (JSC::MacroAssemblerX86_64::move64ToDouble): + (JSC::MacroAssemblerX86_64::moveDoubleTo64): + (JSC::MacroAssemblerX86_64::compare64): + (JSC::MacroAssemblerX86_64::branch64): + (JSC::MacroAssemblerX86_64::branchTest64): + (JSC::MacroAssemblerX86_64::test64): + (JSC::MacroAssemblerX86_64::branchAdd64): + (JSC::MacroAssemblerX86_64::branchSub64): + (JSC::MacroAssemblerX86_64::branchPtrWithPatch): + (JSC::MacroAssemblerX86_64::storePtrWithPatch): + +2012-10-15 Mark Hahnenberg + + Make CopiedSpace and MarkedSpace regions independent + https://bugs.webkit.org/show_bug.cgi?id=99222 + + Reviewed by Filip Pizlo. + + Right now CopiedSpace and MarkedSpace have the same block size and share the same regions, + but there's no reason that they can't have different block sizes while still sharing the + same underlying regions. We should factor the two "used" lists of regions apart so that + MarkedBlocks and CopiedBlocks can be different sizes. Regions will still be a uniform size + so that when they become empty they may be shared between the CopiedSpace and the MarkedSpace, + since benchmarks indicate that sharing is a boon for performance. + + * heap/BlockAllocator.cpp: + (JSC::BlockAllocator::BlockAllocator): + * heap/BlockAllocator.h: + (JSC): + (Region): + (JSC::Region::create): We now have a fixed size for Regions so that empty regions can continue to + be shared between the MarkedSpace and CopiedSpace. Once they are used for a specific type of block, + however, they can only be used for that type of block until they become empty again. + (JSC::Region::createCustomSize): + (JSC::Region::Region): + (JSC::Region::~Region): + (JSC::Region::reset): + (BlockAllocator): + (JSC::BlockAllocator::RegionSet::RegionSet): + (RegionSet): + (JSC::BlockAllocator::tryAllocateFromRegion): We change this function so that it correctly + moves blocks between empty, partial, and full lists. + (JSC::BlockAllocator::allocate): + (JSC::BlockAllocator::allocateCustomSize): + (JSC::BlockAllocator::deallocate): Ditto. + (JSC::CopiedBlock): + (JSC::MarkedBlock): + (JSC::BlockAllocator::regionSetFor): We use this so that we can use the same allocate/deallocate + functions with different RegionSets. We specialize the function for each type of block that we + want to allocate. + * heap/CopiedBlock.h: + (CopiedBlock): + * heap/CopiedSpace.h: + (CopiedSpace): + * heap/HeapBlock.h: + (HeapBlock): + * heap/MarkedBlock.cpp: + (JSC::MarkedBlock::MarkedBlock): For oversize MarkedBlocks, if the block size gets too big we can + underflow the endAtom, which will cause us to segfault when we try to sweep a block. If we're a + custom size MarkedBlock we need to calculate endAtom so it doesn't underflow. + +2012-10-14 Filip Pizlo + + JIT::JIT fails to initialize all of its fields + https://bugs.webkit.org/show_bug.cgi?id=99283 + + Reviewed by Andreas Kling. + + There were two groups of such fields, all of which are eventually initialized + prior to use inside of privateCompile(). But it's safer to make sure that they + are initialized in the constructor as well, since we may use the JIT to do a + stub compile without calling into privateCompile(). + + Unsigned index fields for dynamic repatching meta-data: this change + initializes them to UINT_MAX, so we should crash if we try to use those + indices without initializing them. + + Boolean flags for value profiling: this change initializes them to false, so + we at worst turn off value profiling. + + * jit/JIT.cpp: + (JSC::JIT::JIT): + +2012-10-15 Mark Hahnenberg + + We should avoid weakCompareAndSwap when parallel GC is disabled + https://bugs.webkit.org/show_bug.cgi?id=99331 + + Reviewed by Filip Pizlo. + + CopiedBlock::reportLiveBytes and didEvacuateBytes uses weakCompareAndSwap, which some platforms + don't support. For platforms that don't have parallel GC enabled, we should just use a normal store. + + * heap/CopiedBlock.h: + (JSC::CopiedBlock::reportLiveBytes): + (JSC::CopiedBlock::didEvacuateBytes): + +2012-10-15 Carlos Garcia Campos + + Unreviewed. Fix make distcheck. + + * GNUmakefile.list.am: Add missing header file. + +2012-10-14 Filip Pizlo + + DFG should handle polymorphic array modes by eagerly transforming arrays into the most general applicable form + https://bugs.webkit.org/show_bug.cgi?id=99269 + + Reviewed by Geoffrey Garen. + + This kills off a bunch of code for "polymorphic" array modes in the DFG. It should + also be a performance win for code that uses a lot of array storage arrays. + + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::fromObserved): + (JSC::DFG::modeAlreadyChecked): + (JSC::DFG::modeToString): + * dfg/DFGArrayMode.h: + (DFG): + (JSC::DFG::modeUsesButterfly): + (JSC::DFG::modeIsJSArray): + (JSC::DFG::mayStoreToTail): + (JSC::DFG::mayStoreToHole): + (JSC::DFG::canCSEStorage): + (JSC::DFG::modeSupportsLength): + (JSC::DFG::benefitsFromStructureCheck): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::byValIsPure): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::arrayify): + (DFG): + (JSC::DFG::SpeculativeJIT::compileGetArrayLength): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister): + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-14 Filip Pizlo + + REGRESSION(126886): Fat binary builds don't know how to handle architecture variants to which the LLInt is agnostic + https://bugs.webkit.org/show_bug.cgi?id=99270 + + Reviewed by Geoffrey Garen. + + The fix is to hash cons the offsets based on configuration index, not the offsets + themselves. + + * offlineasm/offsets.rb: + +2012-10-13 Filip Pizlo + + IndexingType should not have a bit for each type + https://bugs.webkit.org/show_bug.cgi?id=98997 + + Reviewed by Oliver Hunt. + + Somewhat incidentally, the introduction of butterflies led to each indexing + type being represented by a unique bit. This is superficially nice since it + allows you to test if a structure corresponds to a particular indexing type + by saying !!(structure->indexingType() & TheType). But the downside is that + given the 8 bits we have for the m_indexingType field, that leaves only a + small number of possible indexing types if we have one per bit. + + This changeset changes the indexing type to be: + + Bit #1: Tells you if you're an array. + + Bits #2 - #5: 16 possible indexing types, including the blank type for + objects that don't have indexed properties. + + Bits #6-8: Auxiliary bits that we could use for other things. Currently we + just use one of those bits, for MayHaveIndexedAccessors. + + This is performance-neutral, and is primarily intended to give us more + breathing room for introducing new inferred array modes. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::JumpList::jumps): + * assembler/MacroAssembler.h: + (MacroAssembler): + (JSC::MacroAssembler::patchableBranch32): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::patchableBranch32): + (MacroAssemblerARMv7): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::modeAlreadyChecked): + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::speculationCheck): + (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck): + (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode): + (DFG): + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::arrayify): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JITInlineMethods.h: + (JSC::JIT::emitAllocateJSArray): + (JSC::JIT::chooseArrayMode): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitContiguousGetByVal): + (JSC::JIT::emitArrayStorageGetByVal): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitContiguousPutByVal): + (JSC::JIT::emitArrayStoragePutByVal): + (JSC::JIT::privateCompilePatchGetArrayLength): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitContiguousGetByVal): + (JSC::JIT::emitArrayStorageGetByVal): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitContiguousPutByVal): + (JSC::JIT::emitArrayStoragePutByVal): + (JSC::JIT::privateCompilePatchGetArrayLength): + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/IndexingType.h: + (JSC): + (JSC::hasIndexedProperties): + (JSC::hasContiguous): + (JSC::hasFastArrayStorage): + (JSC::hasArrayStorage): + (JSC::shouldUseSlowPut): + * runtime/JSGlobalObject.cpp: + (JSC): + * runtime/StructureTransitionTable.h: + (JSC::newIndexingType): + +2012-10-14 Filip Pizlo + + DFG structure check hoisting should attempt to ignore side effects and make transformations that are sound even in their presence + https://bugs.webkit.org/show_bug.cgi?id=99262 + + Reviewed by Oliver Hunt. + + This hugely simplifies the structure check hoisting phase. It will no longer be necessary + to modify it when the effectfulness of operations changes. This also enables the hoister + to hoist effectful things in the future. + + The downside is that the hoister may end up adding strictly more checks than were present + in the original code, if the code truly has a lot of side-effects. I don't see evidence + of this happening. This patch does have some speed-ups and some slow-downs, but is + neutral in the average, and the slow-downs do not appear to have more structure checks + than ToT. + + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck): + (StructureCheckHoistingPhase): + (CheckData): + (JSC::DFG::StructureCheckHoistingPhase::CheckData::CheckData): + +2012-10-14 Filip Pizlo + + Fix the build of universal binary with ARMv7s of JavaScriptCore + + * llint/LLIntOfflineAsmConfig.h: + * llint/LowLevelInterpreter.asm: + +2012-10-13 Filip Pizlo + + Array length array profiling is broken in the baseline JIT + https://bugs.webkit.org/show_bug.cgi?id=99258 + + Reviewed by Oliver Hunt. + + The code generator for array length stubs calls into + emitArrayProfilingSiteForBytecodeIndex(), which emits profiling only if + canBeOptimized() returns true. But m_canBeOptimized is only initialized during + full method compiles, so in a stub compile it may (or may not) be false, meaning + that we may, or may not, get meaningful profiling info. + + This appeared to not affect too many programs since the LLInt has good array + length array profiling. + + * jit/JIT.h: + (JSC::JIT::compilePatchGetArrayLength): + +2012-10-14 Patrick Gansterer + + Build fix for WinCE after r131089. + + WinCE does not support getenv(). + + * runtime/Options.cpp: + (JSC::overrideOptionWithHeuristic): + +2012-10-12 Kangil Han + + Fix build error on DFGSpeculativeJIT32_64.cpp + https://bugs.webkit.org/show_bug.cgi?id=99234 + + Reviewed by Anders Carlsson. + + Seems BUG 98608 causes build error on 32bit machine so fix it. + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-12 Filip Pizlo + + Contiguous array allocation should always be inlined + https://bugs.webkit.org/show_bug.cgi?id=98608 + + Reviewed by Oliver Hunt and Mark Hahnenberg. + + This inlines contiguous array allocation in the most obvious way possible. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::branchSubPtr): + (MacroAssembler): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::branchSubPtr): + (MacroAssemblerX86_64): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGCCallHelpers.h: + (JSC::DFG::CCallHelpers::setupArgumentsWithExecState): + (CCallHelpers): + * dfg/DFGCallArrayAllocatorSlowPathGenerator.h: Added. + (DFG): + (CallArrayAllocatorSlowPathGenerator): + (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator): + (JSC::DFG::CallArrayAllocatorSlowPathGenerator::generateInternal): + (CallArrayAllocatorWithVariableSizeSlowPathGenerator): + (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator): + (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::generateInternal): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::emitAllocateJSArray): + (DFG): + (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage): + (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage): + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::emitAllocateBasicStorage): + (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): + (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-12 Mark Hahnenberg + + Race condition during CopyingPhase can lead to deadlock + https://bugs.webkit.org/show_bug.cgi?id=99226 + + Reviewed by Filip Pizlo. + + The main thread calls startCopying() for each of the GCThreads at the beginning of the copy phase. + It then proceeds to start copying. If copying completes before one of the GCThreads wakes up, the + main thread will set m_currentPhase back to NoPhase, the GCThread will wake up, see that there's + nothing to do, and then it will go back to sleep without ever calling CopyVisitor::doneCopying() + to return its borrowed block to the CopiedSpace. CopiedSpace::doneCopying() will then sleep forever + waiting on the block. + + The fix for this is to make sure we call CopiedSpace::doneCopying() on the main thread before we + call GCThreadSharedData::didFinishCopying(), which sets the m_currentPhase flag to NoPhase. This + way we will wait until all threads have woken up and given back their borrowed blocks before + clearing the flag. + + * heap/Heap.cpp: + (JSC::Heap::copyBackingStores): + +2012-10-12 Anders Carlsson + + Move macros from Parser.h to Parser.cpp + https://bugs.webkit.org/show_bug.cgi?id=99217 + + Reviewed by Andreas Kling. + + There are a bunch of macros in Parser.h that are only used in Parser.cpp. Move them to Parser.cpp + so they won't pollute the global namespace. + * parser/Parser.cpp: + * parser/Parser.h: + (JSC): + +2012-10-12 Mark Hahnenberg + + Another build fix after r131213 + + Added some symbol magic to placate the linker on some platforms. + + * JavaScriptCore.order: + +2012-10-12 Mark Hahnenberg + + Build fix after r131213 + + Removed an unused variable that was making compilers unhappy. + + * heap/GCThread.cpp: + (JSC::GCThread::GCThread): + * heap/GCThread.h: + (GCThread): + * heap/GCThreadSharedData.cpp: + (JSC::GCThreadSharedData::GCThreadSharedData): + +2012-10-09 Mark Hahnenberg + + Copying collection shouldn't require O(live bytes) memory overhead + https://bugs.webkit.org/show_bug.cgi?id=98792 + + Reviewed by Filip Pizlo. + + Currently our copying collection occurs simultaneously with the marking phase. We'd like + to be able to reuse CopiedBlocks as soon as they become fully evacuated, but this is not + currently possible because we don't know the liveness statistics of each old CopiedBlock + until marking/copying has already finished. Instead, we have to allocate additional memory + from the OS to use as our working set of CopiedBlocks while copying. We then return the + fully evacuated old CopiedBlocks back to the block allocator, thus giving our copying phase + an O(live bytes) overhead. + + To fix this, we should instead split the copying phase apart from the marking phase. This + way we have full liveness data for each CopiedBlock during the copying phase so that we + can reuse them the instant they become fully evacuated. With the additional liveness data + that each CopiedBlock accumulates, we can add some additional heuristics to the collector. + For example, we can calculate our global Heap fragmentation and only choose to do a copying + phase if that fragmentation exceeds some limit. As another example, we can skip copying + blocks that are already above a particular fragmentation limit, which allows older objects + to coalesce into blocks that are rarely copied. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * heap/CopiedBlock.h: + (CopiedBlock): + (JSC::CopiedBlock::CopiedBlock): Added support for tracking live bytes in a CopiedBlock in a + thread-safe fashion. + (JSC::CopiedBlock::reportLiveBytes): Adds a number of live bytes to the block in a thread-safe + fashion using compare and swap. + (JSC): + (JSC::CopiedBlock::didSurviveGC): Called when a block survives a single GC without being + evacuated. This could be called for a couple reasons: (a) the block was pinned or (b) we + decided not to do any copying. A block can become pinned for a few reasons: (1) a pointer into + the block was found during the conservative scan. (2) the block was deemed full enough to + not warrant any copying. (3) The block is oversize and was found to be live. + (JSC::CopiedBlock::didEvacuateBytes): Called when some number of bytes are copied from this + block. If the number of live bytes ever hits zero, the block will return itself to the + BlockAllocator to be recycled. + (JSC::CopiedBlock::canBeRecycled): Indicates that a block has no live bytes and can be + immediately recycled. This is used for blocks that are found to have zero live bytes at the + beginning of the copying phase. + (JSC::CopiedBlock::shouldEvacuate): This function returns true if the current fragmentation + of the block is above our fragmentation threshold, and false otherwise. + (JSC::CopiedBlock::isPinned): Added an accessor for the pinned flag + (JSC::CopiedBlock::liveBytes): + * heap/CopiedSpace.cpp: + (JSC::CopiedSpace::CopiedSpace): + (JSC::CopiedSpace::doneFillingBlock): Changed so that we can exchange our filled block for a + fresh block. This avoids the situation where a thread returns its borrowed block, it's the last + borrowed block, so CopiedSpace thinks that copying has completed, and it starts doing all of the + copying phase cleanup. In actuality, the thread wanted another block after returning the current + block. So we allow the thread to atomically exchange its block for another block. + (JSC::CopiedSpace::startedCopying): Added the calculation of global Heap fragmentation to + determine if the copying phase should commence. We include the MarkedSpace in our fragmentation + calculation by assuming that the MarkedSpace is 0% fragmented since we can reuse any currently + free memory in it (i.e. we ignore any internal fragmentation in the MarkedSpace). While we're + calculating the fragmentation of CopiedSpace, we also return any free blocks we find along the + way (meaning liveBytes() == 0). + (JSC): + (JSC::CopiedSpace::doneCopying): We still have to iterate over all the blocks, regardless of + whether the copying phase took place or not so that we can reset all of the live bytes counters + and un-pin any pinned blocks. + * heap/CopiedSpace.h: + (CopiedSpace): + (JSC::CopiedSpace::shouldDoCopyPhase): + * heap/CopiedSpaceInlineMethods.h: + (JSC::CopiedSpace::recycleEvacuatedBlock): This function is distinct from recycling a borrowed block + because a borrowed block hasn't been added to the CopiedSpace yet, but an evacuated block is still + currently in CopiedSpace, so we have to make sure we properly remove all traces of the block from + CopiedSpace before returning it to BlockAllocator. + (JSC::CopiedSpace::recycleBorrowedBlock): Renamed to indicate the distinction mentioned above. + * heap/CopyVisitor.cpp: Added. + (JSC): + (JSC::CopyVisitor::CopyVisitor): + (JSC::CopyVisitor::copyFromShared): Main function for any thread participating in the copying phase. + Grabs chunks of MarkedBlocks from the shared list and copies the backing store of anybody who needs + it until there are no more chunks to copy. + * heap/CopyVisitor.h: Added. + (JSC): + (CopyVisitor): + * heap/CopyVisitorInlineMethods.h: Added. + (JSC): + (GCCopyPhaseFunctor): + (JSC::GCCopyPhaseFunctor::GCCopyPhaseFunctor): + (JSC::GCCopyPhaseFunctor::operator()): + (JSC::CopyVisitor::checkIfShouldCopy): We don't have to check shouldEvacuate() because all of those + checks are done during the marking phase. + (JSC::CopyVisitor::allocateNewSpace): + (JSC::CopyVisitor::allocateNewSpaceSlow): + (JSC::CopyVisitor::startCopying): Initialization function for a thread that is about to start copying. + (JSC::CopyVisitor::doneCopying): + (JSC::CopyVisitor::didCopy): This callback is called by an object that has just successfully copied its + backing store. It indicates to the CopiedBlock that somebody has just finished evacuating some number of + bytes from it, and, if the CopiedBlock now has no more live bytes, can be recycled immediately. + * heap/GCThread.cpp: Added. + (JSC): + (JSC::GCThread::GCThread): This is a new class that encapsulates a single thread responsible for participating + in a specific set of GC phases. Currently, that set of phases includes Mark, Copy, and Exit. Each thread + monitors a shared variable in its associated GCThreadSharedData. The main thread updates this m_currentPhase + variable as collection progresses through the various phases. Parallel marking still works exactly like it + has. In other words, the "run loop" for each of the GC threads sits above any individual phase, thus keeping + the separate phases of the collector orthogonal. + (JSC::GCThread::threadID): + (JSC::GCThread::initializeThreadID): + (JSC::GCThread::slotVisitor): + (JSC::GCThread::copyVisitor): + (JSC::GCThread::waitForNextPhase): + (JSC::GCThread::gcThreadMain): + (JSC::GCThread::gcThreadStartFunc): + * heap/GCThread.h: Added. + (JSC): + (GCThread): + * heap/GCThreadSharedData.cpp: The GCThreadSharedData now has a list of GCThread objects rather than raw + ThreadIdentifiers. + (JSC::GCThreadSharedData::resetChildren): + (JSC::GCThreadSharedData::childVisitCount): + (JSC::GCThreadSharedData::GCThreadSharedData): + (JSC::GCThreadSharedData::~GCThreadSharedData): + (JSC::GCThreadSharedData::reset): + (JSC::GCThreadSharedData::didStartMarking): Callback to let the GCThreadSharedData know that marking has + started and updates the m_currentPhase variable and notifies the GCThreads accordingly. + (JSC::GCThreadSharedData::didFinishMarking): Ditto for finishing marking. + (JSC::GCThreadSharedData::didStartCopying): Ditto for starting the copying phase. + (JSC::GCThreadSharedData::didFinishCopying): Ditto for finishing copying. + * heap/GCThreadSharedData.h: + (JSC): + (GCThreadSharedData): + (JSC::GCThreadSharedData::getNextBlocksToCopy): Atomically gets the next chunk of work for a copying thread. + * heap/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::markRoots): + (JSC): + (JSC::Heap::copyBackingStores): Responsible for setting up the copying phase, notifying the copying threads, + and doing any copying work if necessary. + (JSC::Heap::collect): + * heap/Heap.h: + (Heap): + (JSC): + (JSC::CopyFunctor::CopyFunctor): + (CopyFunctor): + (JSC::CopyFunctor::operator()): + * heap/IncrementalSweeper.cpp: Changed the incremental sweeper to have a reference to the list of MarkedBlocks + that need sweeping, since this now resides in the Heap so that it can be easily shared by the GCThreads. + (JSC::IncrementalSweeper::IncrementalSweeper): + (JSC::IncrementalSweeper::startSweeping): + * heap/IncrementalSweeper.h: + (JSC): + (IncrementalSweeper): + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::setup): + (JSC::SlotVisitor::drainFromShared): We no longer do any copying-related work here. + (JSC): + * heap/SlotVisitor.h: + (SlotVisitor): + * heap/SlotVisitorInlineMethods.h: + (JSC): + (JSC::SlotVisitor::copyLater): Notifies the CopiedBlock that there are some live bytes that may need + to be copied. + * runtime/Butterfly.h: + (JSC): + (Butterfly): + * runtime/ButterflyInlineMethods.h: + (JSC::Butterfly::createUninitializedDuringCollection): Uses the new CopyVisitor. + * runtime/ClassInfo.h: + (MethodTable): Added new "virtual" function copyBackingStore to method table. + (JSC): + * runtime/JSCell.cpp: + (JSC::JSCell::copyBackingStore): Default implementation that does nothing. + (JSC): + * runtime/JSCell.h: + (JSC): + (JSCell): + * runtime/JSObject.cpp: + (JSC::JSObject::copyButterfly): Does the actual copying of the butterfly. + (JSC): + (JSC::JSObject::visitButterfly): Calls copyLater for the butterfly. + (JSC::JSObject::copyBackingStore): + * runtime/JSObject.h: + (JSObject): + (JSC::JSCell::methodTable): + (JSC::JSCell::inherits): + * runtime/Options.h: Added two new constants, minHeapUtilization and minCopiedBlockUtilization, + to govern the amount of fragmentation we allow before doing copying. + (JSC): + +2012-10-12 Filip Pizlo + + DFG array allocation calls should not return an encoded JSValue + https://bugs.webkit.org/show_bug.cgi?id=99196 + + Reviewed by Mark Hahnenberg. + + The array allocation operations now return a pointer instead. This makes it + easier to share code between 32-bit and 64-bit. + + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-01 Jer Noble + + Enable ENCRYPTED_MEDIA support on Mac. + https://bugs.webkit.org/show_bug.cgi?id=98044 + + Reviewed by Anders Carlsson. + + Enable the ENCRYPTED_MEDIA flag. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-12 Filip Pizlo + + Unreviewed. It should be possible to build JSC on ARMv7. + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::patchableBranchPtr): + +2012-10-11 Mark Hahnenberg + + BlockAllocator should use regions as its VM allocation abstraction + https://bugs.webkit.org/show_bug.cgi?id=99107 + + Reviewed by Geoffrey Garen. + + Currently the BlockAllocator allocates a single block at a time directly from the OS. Our block + allocations are on the large-ish side (64 KB) to amortize across many allocations the expense of + mapping new virtual memory from the OS. These large blocks are then shared between the MarkedSpace + and the CopiedSpace. This design makes it difficult to vary the size of the blocks in different + parts of the Heap while still allowing us to amortize the VM allocation costs. + + We should redesign the BlockAllocator so that it has a layer of indirection between blocks that are + used by the allocator/collector and our primary unit of VM allocation from the OS. In particular, + the BlockAllocator should allocate Regions of virtual memory from the OS, which are then subdivided + into one or more Blocks to be used in our custom allocators. This design has the following nice properties: + + 1) We can remove the knowledge of PageAllocationAligned from HeapBlocks. Each HeapBlock will now + only know what Region it belongs to. The Region maintains all the metadata for how to allocate + and deallocate virtual memory from the OS. + + 2) We can easily allocate in larger chunks than we need to satisfy a particular request for a Block. + We can then continue to amortize our VM allocation costs while allowing for smaller block sizes, + which should increase locality in the mutator when allocating, lazy sweeping, etc. + + 3) By encapsulating the logic of where our memory comes from inside of the Region class, we can more + easily transition over to allocating VM from a specific range of pre-reserved address space. This + will be a necessary step along the way to 32-bit pointers. + + This particular patch will not change the size of MarkedBlocks or CopiedBlocks, nor will it change how + much VM we allocate per failed Block request. It only sets up the data structures that we need to make + these changes in future patches. + + Most of the changes in this patch relate to the addition of the Region class to be used by the + BlockAllocator and the threading of changes made to BlockAllocator's interface through to the call sites. + + * heap/BlockAllocator.cpp: The BlockAllocator now has three lists that track the three disjoint sets of + Regions that it cares about: empty regions, partially full regions, and completely full regions. + Empty regions have no blocks currently in use and can be freed immediately if the freeing thread + determines they should be. Partial regions have some blocks used, but aren't completely in use yet. + These regions are preferred for recycling before empty regions to mitigate fragmentation within regions. + Completely full regions are no longer able to be used for allocations. Regions move between these + three lists as they are created and their constituent blocks are allocated and deallocated. + (JSC::BlockAllocator::BlockAllocator): + (JSC::BlockAllocator::~BlockAllocator): + (JSC::BlockAllocator::releaseFreeRegions): + (JSC::BlockAllocator::waitForRelativeTimeWhileHoldingLock): + (JSC::BlockAllocator::waitForRelativeTime): + (JSC::BlockAllocator::blockFreeingThreadMain): + * heap/BlockAllocator.h: + (JSC): + (DeadBlock): + (JSC::DeadBlock::DeadBlock): + (Region): + (JSC::Region::blockSize): + (JSC::Region::isFull): + (JSC::Region::isEmpty): + (JSC::Region::create): This function is responsible for doing the actual VM allocation. This should be the + only function in the entire JSC object runtime that calls out the OS for virtual memory allocation. + (JSC::Region::Region): + (JSC::Region::~Region): + (JSC::Region::allocate): + (JSC::Region::deallocate): + (BlockAllocator): + (JSC::BlockAllocator::tryAllocateFromRegion): Helper function that encapsulates checking a particular list + of regions for a free block. + (JSC::BlockAllocator::allocate): + (JSC::BlockAllocator::allocateCustomSize): This function is responsible for allocating one-off custom size + regions for use in oversize allocations in both the MarkedSpace and the CopiedSpace. These regions are not + tracked by the BlockAllocator. The only pointer to them is in the HeapBlock that is returned. These regions + contain exactly one block. + (JSC::BlockAllocator::deallocate): + (JSC::BlockAllocator::deallocateCustomSize): This function is responsible for deallocating one-off custom size + regions. The regions are deallocated back to the OS eagerly. + * heap/CopiedBlock.h: Re-worked CopiedBlocks to use Regions instead of PageAllocationAligned. + (CopiedBlock): + (JSC::CopiedBlock::createNoZeroFill): + (JSC::CopiedBlock::create): + (JSC::CopiedBlock::CopiedBlock): + (JSC::CopiedBlock::payloadEnd): + (JSC::CopiedBlock::capacity): + * heap/CopiedSpace.cpp: + (JSC::CopiedSpace::~CopiedSpace): + (JSC::CopiedSpace::tryAllocateOversize): + (JSC::CopiedSpace::tryReallocateOversize): + (JSC::CopiedSpace::doneCopying): + * heap/CopiedSpaceInlineMethods.h: + (JSC::CopiedSpace::allocateBlockForCopyingPhase): + (JSC::CopiedSpace::allocateBlock): + * heap/HeapBlock.h: + (JSC::HeapBlock::destroy): + (JSC::HeapBlock::HeapBlock): + (JSC::HeapBlock::region): + (HeapBlock): + * heap/MarkedAllocator.cpp: + (JSC::MarkedAllocator::allocateBlock): + * heap/MarkedBlock.cpp: + (JSC::MarkedBlock::create): + (JSC::MarkedBlock::MarkedBlock): + * heap/MarkedBlock.h: + (JSC::MarkedBlock::capacity): + * heap/MarkedSpace.cpp: + (JSC::MarkedSpace::freeBlock): + +2012-10-11 Filip Pizlo + + UInt32ToNumber and OSR exit should be aware of copy propagation and correctly recover both versions of a variable that was subject to a UInt32ToNumber cast + https://bugs.webkit.org/show_bug.cgi?id=99100 + + + Reviewed by Michael Saboff and Mark Hahnenberg. + + Fixed by forcing UInt32ToNumber to use a different register. This "undoes" the copy propagation that we + would have been doing, since it has no performance effect in this case and has the benefit of making the + OSR exit compiler a lot simpler. + + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber): + +2012-10-11 Geoffrey Garen + + Removed some more static assumptions about inline object capacity + https://bugs.webkit.org/show_bug.cgi?id=98603 + + Reviewed by Filip Pizlo. + + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): Use JSObject::allocationSize() + for a little more flexibility. We still pass it a constant inline capacity + because the JIT doesn't have a strategy for selecting a size class based + on non-constant capacity yet. "INLINE_STORAGE_CAPACITY" is a marker for + code that makes static assumptions about object size. + + * jit/JITInlineMethods.h: + (JSC::JIT::emitAllocateBasicJSObject): + * llint/LLIntData.cpp: + (JSC::LLInt::Data::performAssertions): + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: Ditto for the rest of our many execution engines. + + * runtime/JSObject.h: + (JSC::JSObject::allocationSize): + (JSC::JSFinalObject::finishCreation): + (JSC::JSFinalObject::create): New helper function for computing object + size dynamically, since we plan to have objects of different sizes. + + (JSC::JSFinalObject::JSFinalObject): Note that our m_inlineStorage used + to auto-generate an implicit C++ constructor with default null initialization. + This memory is not observed in its uninitialized state, and our LLInt and + JIT allocators do not initialize it, so I did not add any explicit code + to do so, now that the implicit code is gone. + + (JSC::JSObject::offsetOfInlineStorage): Changed the math here to match + inlineStorageUnsafe(), since we can rely on an explicit data member anymore. + +2012-10-11 Geoffrey Garen + + Enable RUNTIME_HEURISTICS all the time, for easier testing + https://bugs.webkit.org/show_bug.cgi?id=99090 + + Reviewed by Filip Pizlo. + + I find myself using this a lot, and there doesn't seem to be an obvious + reason to compile it out, since it only runs once at startup. + + * runtime/Options.cpp: + (JSC::overrideOptionWithHeuristic): + (JSC::Options::initialize): + * runtime/Options.h: Removed the #ifdef. + +2012-10-11 Geoffrey Garen + + Removed ASSERT_CLASS_FITS_IN_CELL + https://bugs.webkit.org/show_bug.cgi?id=97634 + + Reviewed by Mark Hahnenberg. + + Our collector now supports arbitrarily sized objects, so the ASSERT is not needed. + + * API/JSCallbackFunction.cpp: + * API/JSCallbackObject.cpp: + * heap/MarkedSpace.h: + * jsc.cpp: + * runtime/Arguments.cpp: + * runtime/ArrayConstructor.cpp: + * runtime/ArrayPrototype.cpp: + * runtime/BooleanConstructor.cpp: + * runtime/BooleanObject.cpp: + * runtime/BooleanPrototype.cpp: + * runtime/DateConstructor.cpp: + * runtime/DatePrototype.cpp: + * runtime/Error.cpp: + * runtime/ErrorConstructor.cpp: + * runtime/ErrorPrototype.cpp: + * runtime/FunctionConstructor.cpp: + * runtime/FunctionPrototype.cpp: + * runtime/InternalFunction.cpp: + * runtime/JSActivation.cpp: + * runtime/JSArray.cpp: + * runtime/JSBoundFunction.cpp: + * runtime/JSFunction.cpp: + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalThis.cpp: + * runtime/JSNameScope.cpp: + * runtime/JSNotAnObject.cpp: + * runtime/JSONObject.cpp: + * runtime/JSObject.cpp: + * runtime/JSPropertyNameIterator.cpp: + * runtime/JSScope.cpp: + * runtime/JSWithScope.cpp: + * runtime/JSWrapperObject.cpp: + * runtime/MathObject.cpp: + * runtime/NameConstructor.cpp: + * runtime/NamePrototype.cpp: + * runtime/NativeErrorConstructor.cpp: + * runtime/NativeErrorPrototype.cpp: + * runtime/NumberConstructor.cpp: + * runtime/NumberObject.cpp: + * runtime/NumberPrototype.cpp: + * runtime/ObjectConstructor.cpp: + * runtime/ObjectPrototype.cpp: + * runtime/RegExpConstructor.cpp: + * runtime/RegExpMatchesArray.cpp: + * runtime/RegExpObject.cpp: + * runtime/RegExpPrototype.cpp: + * runtime/StringConstructor.cpp: + * runtime/StringObject.cpp: + * runtime/StringPrototype.cpp: + * testRegExp.cpp: Removed the ASSERT. + +2012-10-11 Filip Pizlo + + DFG should inline code blocks that use new_array_buffer + https://bugs.webkit.org/show_bug.cgi?id=98996 + + Reviewed by Geoffrey Garen. + + This adds plumbing to drop in constant buffers from the inlinees to the inliner. + It's smart about not duplicating buffers needlessly but doesn't try to completely + hash-cons them, either. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::numberOfConstantBuffers): + (JSC::CodeBlock::addConstantBuffer): + (JSC::CodeBlock::constantBufferAsVector): + (JSC::CodeBlock::constantBuffer): + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGByteCodeParser.cpp: + (ConstantBufferKey): + (JSC::DFG::ConstantBufferKey::ConstantBufferKey): + (JSC::DFG::ConstantBufferKey::operator==): + (JSC::DFG::ConstantBufferKey::hash): + (JSC::DFG::ConstantBufferKey::isHashTableDeletedValue): + (JSC::DFG::ConstantBufferKey::codeBlock): + (JSC::DFG::ConstantBufferKey::index): + (DFG): + (JSC::DFG::ConstantBufferKeyHash::hash): + (JSC::DFG::ConstantBufferKeyHash::equal): + (ConstantBufferKeyHash): + (WTF): + (ByteCodeParser): + (InlineStackEntry): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGCapabilities.h: + (JSC::DFG::canInlineOpcode): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGSpeculativeJIT.h: + (JSC::DFG::SpeculativeJIT::callOperation): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + +2012-10-10 Zoltan Horvath + + Pageload tests should measure memory usage + https://bugs.webkit.org/show_bug.cgi?id=93958 + + Reviewed by Ryosuke Niwa. + + Add JS Heap and Heap memory measurement to PageLoad tests. + + * heap/HeapStatistics.cpp: + (JSC::HeapStatistics::usedJSHeap): Add new private function to expose the used JS Heap size. + (JSC): + * heap/HeapStatistics.h: + (HeapStatistics): Add new private function to expose the used JS Heap size. + +2012-10-10 Balazs Kilvady + + RegisterFile to JSStack rename fix for a struct member. + + Compilation problem in debug build on MIPS + https://bugs.webkit.org/show_bug.cgi?id=98808 + + Reviewed by Alexey Proskuryakov. + + In ASSERT conditions structure field name "registerFile" was replaced + with type name "JSStack" and it should be "stack". + + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): structure member name fix. + +2012-10-10 Michael Saboff + + After r130344, OpaqueJSString::string() shouldn't directly return the wrapped String + https://bugs.webkit.org/show_bug.cgi?id=98801 + + Reviewed by Geoffrey Garen. + + Return a copy of the wrapped String so that the wrapped string cannot be turned into + an Identifier. + + * API/OpaqueJSString.cpp: + (OpaqueJSString::string): + * API/OpaqueJSString.h: + (OpaqueJSString): + +2012-10-10 Peter Gal + + Add moveDoubleToInts and moveIntsToDouble to MacroAssemblerARM + https://bugs.webkit.org/show_bug.cgi?id=98855 + + Reviewed by Filip Pizlo. + + Implement the missing moveDoubleToInts and moveIntsToDouble + methods in the MacroAssemblerARM after r130839. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::moveDoubleToInts): + (MacroAssemblerARM): + (JSC::MacroAssemblerARM::moveIntsToDouble): + +2012-10-09 Filip Pizlo + + Typed arrays should not be 20x slower in the baseline JIT than in the DFG JIT + https://bugs.webkit.org/show_bug.cgi?id=98605 + + Reviewed by Oliver Hunt and Gavin Barraclough. + + This adds typed array get_by_val/put_by_val patching to the baseline JIT. It's + a big (~40%) win on benchmarks that have trouble staying in the DFG JIT. Even + if we fix those benchmarks, this functionality gives us the insurance that we + typically desire with all speculative optimizations: even if we bail to + baseline, we're still reasonably performant. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * assembler/MacroAssembler.cpp: Added. + (JSC): + * assembler/MacroAssembler.h: + (MacroAssembler): + (JSC::MacroAssembler::patchableBranchPtr): + * assembler/MacroAssemblerARMv7.h: + (MacroAssemblerARMv7): + (JSC::MacroAssemblerARMv7::moveDoubleToInts): + (JSC::MacroAssemblerARMv7::moveIntsToDouble): + (JSC::MacroAssemblerARMv7::patchableBranchPtr): + * assembler/MacroAssemblerX86.h: + (MacroAssemblerX86): + (JSC::MacroAssemblerX86::moveDoubleToInts): + (JSC::MacroAssemblerX86::moveIntsToDouble): + * bytecode/ByValInfo.h: + (JSC::hasOptimizableIndexingForClassInfo): + (JSC): + (JSC::hasOptimizableIndexing): + (JSC::jitArrayModeForClassInfo): + (JSC::jitArrayModeForStructure): + (JSC::ByValInfo::ByValInfo): + (ByValInfo): + * dfg/DFGAssemblyHelpers.cpp: + (DFG): + * dfg/DFGAssemblyHelpers.h: + (AssemblyHelpers): + (JSC::DFG::AssemblyHelpers::boxDouble): + (JSC::DFG::AssemblyHelpers::unboxDouble): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray): + (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + * jit/JIT.h: + (JIT): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::privateCompileGetByVal): + (JSC::JIT::privateCompilePutByVal): + (JSC::JIT::emitIntTypedArrayGetByVal): + (JSC): + (JSC::JIT::emitFloatTypedArrayGetByVal): + (JSC::JIT::emitIntTypedArrayPutByVal): + (JSC::JIT::emitFloatTypedArrayPutByVal): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSCell.h: + * runtime/JSGlobalData.h: + (JSGlobalData): + (JSC::JSGlobalData::typedArrayDescriptor): + * runtime/TypedArrayDescriptor.h: Added. + (JSC): + (JSC::TypedArrayDescriptor::TypedArrayDescriptor): + (TypedArrayDescriptor): + +2012-10-09 Michael Saboff + + Add tests to testapi for null OpaqueJSStrings + https://bugs.webkit.org/show_bug.cgi?id=98805 + + Reviewed by Geoffrey Garen. + + Added tests that check that OpaqueJSString, which is wrapped via JSStringRef, properly returns + null strings and that a null string in a JSStringRef will return a NULL JSChar* and 0 length + via the JSStringGetCharactersPtr() and JSStringGetLength() APIs respectively. Added a check that + JSValueMakeFromJSONString() properly handles a null string as well. + + * API/tests/testapi.c: + (main): + +2012-10-09 Jian Li + + Update the CSS property used to support draggable regions. + https://bugs.webkit.org/show_bug.cgi?id=97156 + + Reviewed by Adam Barth. + + The CSS property to support draggable regions, guarded under + WIDGET_REGION is now disabled from Mac WebKit, in order not to cause + confusion with DASHBOARD_SUPPORT feature. + + * Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature. + +2012-10-09 Filip Pizlo + + Unreviewed, adding forgotten files. + + * bytecode/ByValInfo.h: Added. + (JSC): + (JSC::isOptimizableIndexingType): + (JSC::jitArrayModeForIndexingType): + (JSC::ByValInfo::ByValInfo): + (ByValInfo): + (JSC::getByValInfoBytecodeIndex): + * runtime/IndexingType.cpp: Added. + (JSC): + (JSC::indexingTypeToString): + +2012-10-08 Filip Pizlo + + JSC should infer when indexed storage is contiguous, and optimize for it + https://bugs.webkit.org/show_bug.cgi?id=97288 + + Reviewed by Mark Hahnenberg. + + This introduces a new kind of indexed property storage called Contiguous, + which has the following properties: + + - No header bits beyond IndexedHeader. This results in a 16 byte reduction + in memory usage per array versus an ArrayStorage array. It also means + that the total memory usage for an empty array is now just 3 * 8 on both + 32-bit and 64-bit. Of that, only 8 bytes are array-specific; the rest is + our standard object header overhead. + + - No need for hole checks on store. This results in a ~4% speed-up on + Kraken and a ~1% speed-up on V8v7. + + - publicLength <= vectorLength. This means that doing new Array(blah) + immediately allocates room for blah elements. + + - No sparse map or index bias. + + If you ever do things to an array that would require publicLength > + vectorLength, a sparse map, or index bias, then we switch to ArrayStorage + mode. This seems to never happen in any benchmark we track, and is unlikely + to happen very frequently on any website. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::JumpList::append): + * assembler/MacroAssembler.h: + (MacroAssembler): + (JSC::MacroAssembler::patchableBranchTest32): + * bytecode/ByValInfo.h: Added. + (JSC): + (JSC::isOptimizableIndexingType): + (JSC::jitArrayModeForIndexingType): + (JSC::ByValInfo::ByValInfo): + (ByValInfo): + (JSC::getByValInfoBytecodeIndex): + * bytecode/CodeBlock.h: + (CodeBlock): + (JSC::CodeBlock::getByValInfo): + (JSC::CodeBlock::setNumberOfByValInfos): + (JSC::CodeBlock::numberOfByValInfos): + (JSC::CodeBlock::byValInfo): + * bytecode/SamplingTool.h: + * dfg/DFGAbstractState.cpp: + (JSC::DFG::AbstractState::execute): + * dfg/DFGArrayMode.cpp: + (JSC::DFG::fromObserved): + (JSC::DFG::modeAlreadyChecked): + (JSC::DFG::modeToString): + * dfg/DFGArrayMode.h: + (DFG): + (JSC::DFG::modeUsesButterfly): + (JSC::DFG::modeIsJSArray): + (JSC::DFG::isInBoundsAccess): + (JSC::DFG::mayStoreToTail): + (JSC::DFG::mayStoreToHole): + (JSC::DFG::modeIsPolymorphic): + (JSC::DFG::polymorphicIncludesContiguous): + (JSC::DFG::polymorphicIncludesArrayStorage): + (JSC::DFG::canCSEStorage): + (JSC::DFG::modeSupportsLength): + (JSC::DFG::benefitsFromStructureCheck): + (JSC::DFG::isEffectful): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::handleIntrinsic): + * dfg/DFGCSEPhase.cpp: + (JSC::DFG::CSEPhase::getArrayLengthElimination): + (JSC::DFG::CSEPhase::getByValLoadElimination): + (JSC::DFG::CSEPhase::performNodeCSE): + * dfg/DFGFixupPhase.cpp: + (JSC::DFG::FixupPhase::fixupNode): + (JSC::DFG::FixupPhase::checkArray): + (JSC::DFG::FixupPhase::blessArrayOperation): + * dfg/DFGGraph.h: + (JSC::DFG::Graph::byValIsPure): + * dfg/DFGOperations.cpp: + * dfg/DFGOperations.h: + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryCacheGetByID): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::checkArray): + (JSC::DFG::SpeculativeJIT::arrayify): + (JSC::DFG::SpeculativeJIT::compileGetArrayLength): + (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): + (DFG): + * dfg/DFGSpeculativeJIT.h: + (DFG): + (JSC::DFG::SpeculativeJIT::callOperation): + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister): + (JSC::DFG::SpeculativeJIT::temporaryRegisterForPutByVal): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal): + (DFG): + (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal): + (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): + (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compileContiguousGetByVal): + (DFG): + (JSC::DFG::SpeculativeJIT::compileArrayStorageGetByVal): + (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal): + (JSC::DFG::SpeculativeJIT::compileArrayStoragePutByVal): + (JSC::DFG::SpeculativeJIT::compile): + * interpreter/Interpreter.cpp: + (SamplingScope): + (JSC::SamplingScope::SamplingScope): + (JSC::SamplingScope::~SamplingScope): + (JSC): + (JSC::Interpreter::execute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileSlowCases): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::ByValCompilationInfo::ByValCompilationInfo): + (ByValCompilationInfo): + (JSC): + (JIT): + (JSC::JIT::compileGetByVal): + (JSC::JIT::compilePutByVal): + * jit/JITInlineMethods.h: + (JSC::JIT::emitAllocateJSArray): + (JSC::JIT::emitArrayProfileStoreToHoleSpecialCase): + (JSC): + (JSC::arrayProfileSaw): + (JSC::JIT::chooseArrayMode): + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_get_argument_by_val): + (JSC::JIT::emit_op_new_array): + (JSC::JIT::emitSlow_op_new_array): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emitSlow_op_get_argument_by_val): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC): + (JSC::JIT::emitContiguousGetByVal): + (JSC::JIT::emitArrayStorageGetByVal): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitContiguousPutByVal): + (JSC::JIT::emitArrayStoragePutByVal): + (JSC::JIT::emitSlow_op_put_by_val): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByVal): + (JSC::JIT::privateCompilePutByVal): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC): + (JSC::JIT::emitContiguousGetByVal): + (JSC::JIT::emitArrayStorageGetByVal): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitContiguousPutByVal): + (JSC::JIT::emitArrayStoragePutByVal): + (JSC::JIT::emitSlow_op_put_by_val): + * jit/JITStubs.cpp: + (JSC::getByVal): + (JSC): + (JSC::DEFINE_STUB_FUNCTION): + (JSC::putByVal): + * jit/JITStubs.h: + * llint/LowLevelInterpreter.asm: + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: + * runtime/ArrayConventions.h: + (JSC::isDenseEnoughForVector): + * runtime/ArrayPrototype.cpp: + (JSC): + (JSC::shift): + (JSC::unshift): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + * runtime/Butterfly.h: + (Butterfly): + (JSC::Butterfly::fromPointer): + (JSC::Butterfly::pointer): + (JSC::Butterfly::publicLength): + (JSC::Butterfly::vectorLength): + (JSC::Butterfly::setPublicLength): + (JSC::Butterfly::setVectorLength): + (JSC::Butterfly::contiguous): + (JSC::Butterfly::fromContiguous): + * runtime/ButterflyInlineMethods.h: + (JSC::Butterfly::unshift): + (JSC::Butterfly::shift): + * runtime/IndexingHeaderInlineMethods.h: + (JSC::IndexingHeader::indexingPayloadSizeInBytes): + * runtime/IndexingType.cpp: Added. + (JSC): + (JSC::indexingTypeToString): + * runtime/IndexingType.h: + (JSC): + (JSC::hasContiguous): + * runtime/JSArray.cpp: + (JSC::JSArray::setLengthWithArrayStorage): + (JSC::JSArray::setLength): + (JSC): + (JSC::JSArray::pop): + (JSC::JSArray::push): + (JSC::JSArray::shiftCountWithArrayStorage): + (JSC::JSArray::shiftCountWithAnyIndexingType): + (JSC::JSArray::unshiftCountWithArrayStorage): + (JSC::JSArray::unshiftCountWithAnyIndexingType): + (JSC::JSArray::sortNumericVector): + (JSC::JSArray::sortNumeric): + (JSC::JSArray::sortCompactedVector): + (JSC::JSArray::sort): + (JSC::JSArray::sortVector): + (JSC::JSArray::fillArgList): + (JSC::JSArray::copyToArguments): + (JSC::JSArray::compactForSorting): + * runtime/JSArray.h: + (JSC::JSArray::shiftCountForShift): + (JSC::JSArray::shiftCountForSplice): + (JSArray): + (JSC::JSArray::shiftCount): + (JSC::JSArray::unshiftCountForShift): + (JSC::JSArray::unshiftCountForSplice): + (JSC::JSArray::unshiftCount): + (JSC::JSArray::isLengthWritable): + (JSC::createContiguousArrayButterfly): + (JSC): + (JSC::JSArray::create): + (JSC::JSArray::tryCreateUninitialized): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC): + (JSC::JSGlobalObject::haveABadTime): + (JSC::JSGlobalObject::visitChildren): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + (JSC::JSGlobalObject::arrayStructureWithArrayStorage): + (JSC::JSGlobalObject::addressOfArrayStructureWithArrayStorage): + (JSC::constructEmptyArray): + * runtime/JSObject.cpp: + (JSC::JSObject::visitButterfly): + (JSC::JSObject::getOwnPropertySlotByIndex): + (JSC::JSObject::putByIndex): + (JSC::JSObject::enterDictionaryIndexingMode): + (JSC::JSObject::createInitialContiguous): + (JSC): + (JSC::JSObject::createArrayStorage): + (JSC::JSObject::convertContiguousToArrayStorage): + (JSC::JSObject::ensureContiguousSlow): + (JSC::JSObject::ensureArrayStorageSlow): + (JSC::JSObject::ensureIndexedStorageSlow): + (JSC::JSObject::ensureArrayStorageExistsAndEnterDictionaryIndexingMode): + (JSC::JSObject::switchToSlowPutArrayStorage): + (JSC::JSObject::setPrototype): + (JSC::JSObject::deletePropertyByIndex): + (JSC::JSObject::getOwnPropertyNames): + (JSC::JSObject::defineOwnIndexedProperty): + (JSC::JSObject::putByIndexBeyondVectorLengthContiguousWithoutAttributes): + (JSC::JSObject::putByIndexBeyondVectorLength): + (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage): + (JSC::JSObject::putDirectIndexBeyondVectorLength): + (JSC::JSObject::getNewVectorLength): + (JSC::JSObject::countElementsInContiguous): + (JSC::JSObject::increaseVectorLength): + (JSC::JSObject::ensureContiguousLengthSlow): + (JSC::JSObject::getOwnPropertyDescriptor): + * runtime/JSObject.h: + (JSC::JSObject::getArrayLength): + (JSC::JSObject::getVectorLength): + (JSC::JSObject::canGetIndexQuickly): + (JSC::JSObject::getIndexQuickly): + (JSC::JSObject::tryGetIndexQuickly): + (JSC::JSObject::canSetIndexQuickly): + (JSC::JSObject::canSetIndexQuicklyForPutDirect): + (JSC::JSObject::setIndexQuickly): + (JSC::JSObject::initializeIndex): + (JSC::JSObject::hasSparseMap): + (JSC::JSObject::inSparseIndexingMode): + (JSObject): + (JSC::JSObject::ensureContiguous): + (JSC::JSObject::ensureIndexedStorage): + (JSC::JSObject::ensureContiguousLength): + (JSC::JSObject::indexingData): + (JSC::JSObject::relevantLength): + * runtime/JSValue.cpp: + (JSC::JSValue::description): + * runtime/Options.cpp: + (JSC::Options::initialize): + * runtime/Structure.cpp: + (JSC::Structure::needsSlowPutIndexing): + (JSC): + (JSC::Structure::suggestedArrayStorageTransition): + * runtime/Structure.h: + (Structure): + * runtime/StructureTransitionTable.h: + (JSC::newIndexingType): + +2012-10-09 Michael Saboff + + After r130344, OpaqueJSString::identifier() adds wrapped String to identifier table + https://bugs.webkit.org/show_bug.cgi?id=98693 + REGRESSION (r130344): Install failed in Install Environment + + + Reviewed by Mark Rowe. + + Use Identifier(LChar*, length) or Identifier(UChar*, length) constructors so that we don't + add the String instance in the OpaqueJSString to any identifier tables. + + * API/OpaqueJSString.cpp: + (OpaqueJSString::identifier): + +2012-10-08 Mark Lam + + Renamed RegisterFile to JSStack, and removed prototype of the + previously deleted Interpreter::privateExecute(). + https://bugs.webkit.org/show_bug.cgi?id=98717. + + Reviewed by Filip Pizlo. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * JavaScriptCore.order: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * Target.pri: + * bytecode/BytecodeConventions.h: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::nameForRegister): + * bytecode/CodeBlock.h: + (CodeBlock): + * bytecode/ValueRecovery.h: + (JSC::ValueRecovery::alreadyInJSStack): + (JSC::ValueRecovery::alreadyInJSStackAsUnboxedInt32): + (JSC::ValueRecovery::alreadyInJSStackAsUnboxedCell): + (JSC::ValueRecovery::alreadyInJSStackAsUnboxedBoolean): + (JSC::ValueRecovery::alreadyInJSStackAsUnboxedDouble): + (JSC::ValueRecovery::displacedInJSStack): + (JSC::ValueRecovery::isAlreadyInJSStack): + (JSC::ValueRecovery::virtualRegister): + (JSC::ValueRecovery::dump): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::resolveCallee): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitConstruct): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::registerFor): + * dfg/DFGAbstractState.h: + (AbstractState): + * dfg/DFGAssemblyHelpers.h: + (JSC::DFG::AssemblyHelpers::emitGetFromCallFrameHeaderPtr): + (JSC::DFG::AssemblyHelpers::emitPutToCallFrameHeader): + (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::getDirect): + (JSC::DFG::ByteCodeParser::findArgumentPositionForLocal): + (JSC::DFG::ByteCodeParser::addCall): + (JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand): + (JSC::DFG::ByteCodeParser::handleInlining): + (JSC::DFG::ByteCodeParser::parseBlock): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGGenerationInfo.h: + (GenerationInfo): + (JSC::DFG::GenerationInfo::needsSpill): + * dfg/DFGGraph.h: + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::compileEntry): + (JSC::DFG::JITCompiler::compileFunction): + * dfg/DFGJITCompiler.h: + (JSC::DFG::JITCompiler::beginCall): + * dfg/DFGOSREntry.cpp: + (JSC::DFG::prepareOSREntry): + * dfg/DFGOSRExitCompiler32_64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGOSRExitCompiler64.cpp: + (JSC::DFG::OSRExitCompiler::compileExit): + * dfg/DFGRepatch.cpp: + (JSC::DFG::tryBuildGetByIDList): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compile): + (JSC::DFG::SpeculativeJIT::checkArgumentTypes): + (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor): + * dfg/DFGSpeculativeJIT.h: + (SpeculativeJIT): + (JSC::DFG::SpeculativeJIT::spill): + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::emitCall): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::fillInteger): + (JSC::DFG::SpeculativeJIT::emitCall): + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGThunks.cpp: + (JSC::DFG::throwExceptionFromCallSlowPathGenerator): + (JSC::DFG::slowPathFor): + (JSC::DFG::virtualForThunkGenerator): + * dfg/DFGValueSource.cpp: + (JSC::DFG::ValueSource::dump): + * dfg/DFGValueSource.h: + (JSC::DFG::dataFormatToValueSourceKind): + (JSC::DFG::valueSourceKindToDataFormat): + (JSC::DFG::isInJSStack): + (JSC::DFG::ValueSource::forSpeculation): + (JSC::DFG::ValueSource::isInJSStack): + (JSC::DFG::ValueSource::valueRecovery): + * dfg/DFGVariableEventStream.cpp: + (JSC::DFG::VariableEventStream::reconstruct): + * heap/Heap.cpp: + (JSC::Heap::stack): + (JSC::Heap::getConservativeRegisterRoots): + (JSC::Heap::markRoots): + * heap/Heap.h: + (JSC): + (Heap): + * interpreter/CallFrame.cpp: + (JSC::CallFrame::stack): + * interpreter/CallFrame.h: + (JSC::ExecState::calleeAsValue): + (JSC::ExecState::callee): + (JSC::ExecState::codeBlock): + (JSC::ExecState::scope): + (JSC::ExecState::callerFrame): + (JSC::ExecState::returnPC): + (JSC::ExecState::hasReturnPC): + (JSC::ExecState::clearReturnPC): + (JSC::ExecState::bytecodeOffsetForNonDFGCode): + (JSC::ExecState::setBytecodeOffsetForNonDFGCode): + (JSC::ExecState::inlineCallFrame): + (JSC::ExecState::codeOriginIndexForDFG): + (JSC::ExecState::currentVPC): + (JSC::ExecState::setCurrentVPC): + (JSC::ExecState::setCallerFrame): + (JSC::ExecState::setScope): + (JSC::ExecState::init): + (JSC::ExecState::argumentCountIncludingThis): + (JSC::ExecState::offsetFor): + (JSC::ExecState::setArgumentCountIncludingThis): + (JSC::ExecState::setCallee): + (JSC::ExecState::setCodeBlock): + (JSC::ExecState::setReturnPC): + (JSC::ExecState::setInlineCallFrame): + (ExecState): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::slideRegisterWindowForCall): + (JSC::eval): + (JSC::loadVarargs): + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::endRepeatCall): + * interpreter/Interpreter.h: + (JSC::Interpreter::stack): + (Interpreter): + (JSC::Interpreter::execute): + (JSC): + * interpreter/JSStack.cpp: Copied from Source/JavaScriptCore/interpreter/RegisterFile.cpp. + (JSC::stackStatisticsMutex): + (JSC::JSStack::~JSStack): + (JSC::JSStack::growSlowCase): + (JSC::JSStack::gatherConservativeRoots): + (JSC::JSStack::releaseExcessCapacity): + (JSC::JSStack::initializeThreading): + (JSC::JSStack::committedByteCount): + (JSC::JSStack::addToCommittedByteCount): + * interpreter/JSStack.h: Copied from Source/JavaScriptCore/interpreter/RegisterFile.h. + (JSStack): + (JSC::JSStack::JSStack): + (JSC::JSStack::shrink): + (JSC::JSStack::grow): + * interpreter/RegisterFile.cpp: Removed. + * interpreter/RegisterFile.h: Removed. + * interpreter/VMInspector.cpp: + (JSC::VMInspector::dumpFrame): + * jit/JIT.cpp: + (JSC::JIT::JIT): + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC): + (JIT): + * jit/JITCall.cpp: + (JSC::JIT::compileLoadVarargs): + (JSC::JIT::compileCallEval): + (JSC::JIT::compileCallEvalSlowCase): + (JSC::JIT::compileOpCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::compileLoadVarargs): + (JSC::JIT::compileCallEval): + (JSC::JIT::compileCallEvalSlowCase): + (JSC::JIT::compileOpCall): + * jit/JITCode.h: + (JSC): + (JSC::JITCode::execute): + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutToCallFrameHeader): + (JSC::JIT::emitPutCellToCallFrameHeader): + (JSC::JIT::emitPutIntToCallFrameHeader): + (JSC::JIT::emitPutImmediateToCallFrameHeader): + (JSC::JIT::emitGetFromCallFrameHeaderPtr): + (JSC::JIT::emitGetFromCallFrameHeader32): + (JSC::JIT::updateTopCallFrame): + (JSC::JIT::unmap): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::emit_op_create_this): + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::emit_op_resolve_global_dynamic): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_create_this): + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC::JITThunks::JITThunks): + (JSC): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC): + (JITStackFrame): + * jit/JSInterfaceJIT.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::SpecializedThunkJIT): + (JSC::SpecializedThunkJIT::returnJSValue): + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::returnInt32): + (JSC::SpecializedThunkJIT::returnJSCell): + * llint/LLIntData.cpp: + (JSC::LLInt::Data::performAssertions): + * llint/LLIntOffsetsExtractor.cpp: + * llint/LLIntSlowPaths.cpp: + (JSC::LLInt::LLINT_SLOW_PATH_DECL): + (JSC::LLInt::genericCall): + * llint/LLIntSlowPaths.h: + (LLInt): + * llint/LowLevelInterpreter.asm: + * runtime/Arguments.cpp: + (JSC::Arguments::tearOffForInlineCallFrame): + * runtime/CommonSlowPaths.h: + (JSC::CommonSlowPaths::arityCheckFor): + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/JSActivation.cpp: + (JSC::JSActivation::visitChildren): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::globalExec): + * runtime/JSGlobalObject.h: + (JSC): + (JSGlobalObject): + * runtime/JSLock.cpp: + (JSC): + * runtime/JSVariableObject.h: + (JSVariableObject): + * runtime/MemoryStatistics.cpp: + (JSC::globalMemoryStatistics): + +2012-10-08 Kiran Muppala + + Throttle DOM timers on hidden pages. + https://bugs.webkit.org/show_bug.cgi?id=98474 + + Reviewed by Maciej Stachowiak. + + Add HIDDEN_PAGE_DOM_TIMER_THROTTLING feature define. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-08 Michael Saboff + + After r130344, OpaqueJSString() creates an empty string which should be a null string + https://bugs.webkit.org/show_bug.cgi?id=98417 + + Reviewed by Sam Weinig. + + Changed create() of a null string to return 0. This is the same behavior as before r130344. + + * API/OpaqueJSString.cpp: + (OpaqueJSString::create): + +2012-10-07 Caio Marcelo de Oliveira Filho + + Rename first/second to key/value in HashMap iterators + https://bugs.webkit.org/show_bug.cgi?id=82784 + + Reviewed by Eric Seidel. + + * API/JSCallbackObject.h: + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty): + (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnNonIndexPropertyNames): + * API/JSClassRef.cpp: + (OpaqueJSClass::~OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + (OpaqueJSClass::contextData): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::EvalCodeCache::visitAggregate): + (JSC::CodeBlock::nameForRegister): + * bytecode/JumpTable.h: + (JSC::StringJumpTable::offsetForValue): + (JSC::StringJumpTable::ctiForValue): + * bytecode/LazyOperandValueProfile.cpp: + (JSC::LazyOperandValueProfileParser::getIfPresent): + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::dump): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::addVar): + (JSC::BytecodeGenerator::addGlobalVar): + (JSC::BytecodeGenerator::addConstant): + (JSC::BytecodeGenerator::addConstantValue): + (JSC::BytecodeGenerator::emitLoad): + (JSC::BytecodeGenerator::addStringConstant): + (JSC::BytecodeGenerator::emitLazyNewFunction): + * bytecompiler/NodesCodegen.cpp: + (JSC::PropertyListNode::emitBytecode): + * debugger/Debugger.cpp: + * dfg/DFGArgumentsSimplificationPhase.cpp: + (JSC::DFG::ArgumentsSimplificationPhase::run): + (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse): + (JSC::DFG::ArgumentsSimplificationPhase::observeProperArgumentsUse): + (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize): + (JSC::DFG::ArgumentsSimplificationPhase::removeArgumentsReferencingPhantomChild): + * dfg/DFGAssemblyHelpers.cpp: + (JSC::DFG::AssemblyHelpers::decodedCodeMapFor): + * dfg/DFGByteCodeCache.h: + (JSC::DFG::ByteCodeCache::~ByteCodeCache): + (JSC::DFG::ByteCodeCache::get): + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::cellConstant): + (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry): + * dfg/DFGStructureCheckHoistingPhase.cpp: + (JSC::DFG::StructureCheckHoistingPhase::run): + (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck): + (JSC::DFG::StructureCheckHoistingPhase::noticeClobber): + * heap/Heap.cpp: + (JSC::Heap::markProtectedObjects): + * heap/Heap.h: + (JSC::Heap::forEachProtectedCell): + * heap/JITStubRoutineSet.cpp: + (JSC::JITStubRoutineSet::markSlow): + (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines): + * heap/SlotVisitor.cpp: + (JSC::SlotVisitor::internalAppend): + * heap/Weak.h: + (JSC::weakRemove): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JITStubs.cpp: + (JSC::JITThunks::ctiStub): + * parser/Parser.cpp: + (JSC::::parseStrictObjectLiteral): + * profiler/Profile.cpp: + (JSC::functionNameCountPairComparator): + (JSC::Profile::debugPrintDataSampleStyle): + * runtime/Identifier.cpp: + (JSC::Identifier::add): + * runtime/JSActivation.cpp: + (JSC::JSActivation::getOwnNonIndexPropertyNames): + (JSC::JSActivation::symbolTablePutWithAttributes): + * runtime/JSArray.cpp: + (JSC::JSArray::setLength): + * runtime/JSObject.cpp: + (JSC::JSObject::getOwnPropertySlotByIndex): + (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists): + (JSC::JSObject::deletePropertyByIndex): + (JSC::JSObject::getOwnPropertyNames): + (JSC::JSObject::defineOwnIndexedProperty): + (JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype): + (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage): + (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage): + (JSC::JSObject::getOwnPropertyDescriptor): + * runtime/JSSymbolTableObject.cpp: + (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames): + * runtime/JSSymbolTableObject.h: + (JSC::symbolTableGet): + (JSC::symbolTablePut): + (JSC::symbolTablePutWithAttributes): + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::invalidateCode): + * runtime/SparseArrayValueMap.cpp: + (JSC::SparseArrayValueMap::putEntry): + (JSC::SparseArrayValueMap::putDirect): + (JSC::SparseArrayValueMap::visitChildren): + * runtime/WeakGCMap.h: + (JSC::WeakGCMap::clear): + (JSC::WeakGCMap::set): + * tools/ProfileTreeNode.h: + (JSC::ProfileTreeNode::sampleChild): + (JSC::ProfileTreeNode::childCount): + (JSC::ProfileTreeNode::dumpInternal): + (JSC::ProfileTreeNode::compareEntries): + +2012-10-05 Mark Hahnenberg + + JSC should have a way to gather and log Heap memory use and pause times + https://bugs.webkit.org/show_bug.cgi?id=98431 + + Reviewed by Geoffrey Garen. + + In order to improve our infrastructure for benchmark-driven development, we should + have a centralized method of gathering and logging various statistics about the state + of the JS heap. This would allow us to create and to use other tools to analyze the + output of the VM after running various workloads. + + The first two statistics that might be interesting is memory use by JSC and GC pause + times. We can control whether this recording happens through the use of the Options + class, allowing us to either use environment variables or command line flags. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * heap/Heap.cpp: + (JSC::Heap::collect): If we finish a collection and are still over our set GC heap size, + we end the program immediately and report an error. Also added recording of pause times. + * heap/Heap.h: + (Heap): + (JSC::Heap::shouldCollect): When we set a specific GC heap size through Options, we + ignore all other heuristics on when we should collect and instead only ask if we're + greater than the amount specified in the Option value. This allows us to view time/memory + tradeoffs more clearly. + * heap/HeapStatistics.cpp: Added. + (JSC): + (JSC::HeapStatistics::initialize): + (JSC::HeapStatistics::recordGCPauseTime): + (JSC::HeapStatistics::logStatistics): + (JSC::HeapStatistics::exitWithFailure): + (JSC::HeapStatistics::reportSuccess): + (JSC::HeapStatistics::parseMemoryAmount): + (StorageStatistics): + (JSC::StorageStatistics::StorageStatistics): + (JSC::StorageStatistics::operator()): + (JSC::StorageStatistics::objectWithOutOfLineStorageCount): + (JSC::StorageStatistics::objectCount): + (JSC::StorageStatistics::storageSize): + (JSC::StorageStatistics::storageCapacity): + (JSC::HeapStatistics::showObjectStatistics): Moved the old showHeapStatistics (renamed to showObjectStatistics) + to try to start collecting our various memory statistics gathering/reporting mechanisms scattered throughout the + codebase into one place. + * heap/HeapStatistics.h: Added. + (JSC): + (HeapStatistics): + * jsc.cpp: + (main): + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): We need to initialize our data structures for recording + statistics if necessary. + * runtime/Options.cpp: Add new Options for the various types of statistics we'll be gathering. + (JSC::parse): + (JSC): + (JSC::Options::initialize): Initialize the various new options using environment variables. + (JSC::Options::dumpOption): + * runtime/Options.h: + (JSC): + +2012-10-04 Rik Cabanier + + Turn Compositing on by default in WebKit build + https://bugs.webkit.org/show_bug.cgi?id=98315 + + Reviewed by Simon Fraser. + + enable -webkit-blend-mode on trunk. + + * Configurations/FeatureDefines.xcconfig: + +2012-10-04 Michael Saboff + + Crash in Safari at com.apple.JavaScriptCore: WTF::StringImpl::is8Bit const + 12 + https://bugs.webkit.org/show_bug.cgi?id=98433 + + Reviewed by Jessie Berlin. + + The problem is due to a String with a null StringImpl (i.e. a null string). + Added a length check before the is8Bit() check since length() checks for a null StringImpl. Changed the + characters16() call to characters() since it can handle a null StringImpl as well. + + * API/JSValueRef.cpp: + (JSValueMakeFromJSONString): + +2012-10-04 Benjamin Poulain + + Use copyLCharsFromUCharSource() for IdentifierLCharFromUCharTranslator translation + https://bugs.webkit.org/show_bug.cgi?id=98335 + + Reviewed by Michael Saboff. + + Michael Saboff added an optimized version of UChar->LChar conversion in r125846. + Use this function in JSC::Identifier. + + * runtime/Identifier.cpp: + (JSC::IdentifierLCharFromUCharTranslator::translate): + +2012-10-04 Michael Saboff + + After r130344, OpaqueJSString() creates a empty string which should be a null string + https://bugs.webkit.org/show_bug.cgi?id=98417 + + Reviewed by Alexey Proskuryakov. + + Removed the setting of enclosed string to an empty string from default constructor. + Before changeset r130344, the semantic was the default constructor produced a null + string. + + * API/OpaqueJSString.h: + (OpaqueJSString::OpaqueJSString): + +2012-10-04 Csaba Osztrogonác + + [Qt] Add missing LLInt dependencies to the build system + https://bugs.webkit.org/show_bug.cgi?id=98394 + + Reviewed by Geoffrey Garen. + + * DerivedSources.pri: + * LLIntOffsetsExtractor.pro: + +2012-10-03 Geoffrey Garen + + Next step toward fixing Windows: add new symbol. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-10-03 Geoffrey Garen + + First step toward fixing Windows: remove old symbol. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2012-10-03 Geoffrey Garen + + Removed the assumption that "final" objects have a fixed number of inline slots + https://bugs.webkit.org/show_bug.cgi?id=98332 + + Reviewed by Filip Pizlo. + + This is a step toward object size inference. + + I replaced the inline storage capacity constant with a data member per + structure, set the the maximum supported value for the constant to 100, + then fixed what broke. (Note that even though this patch increases the + theoretical maximum inline capacity, it doesn't change any actual inline + capacity.) + + * dfg/DFGSpeculativeJIT32_64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT64.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): These functions just get a rename: + the constant they need is the first out of line offset along the offset + number line, which is not necessarily the same thing (and is, in this + patch, never the same thing) as the inline capacity of any given object. + + (JSC::JIT::emit_op_get_by_pname): + * jit/JITPropertyAccess32_64.cpp: This function changes functionality, + since it needs to convert from the abstract offset number line to an + actual offset in memory, and it can't assume that inline and out-of-line + offsets are contiguous on the number line. + + (JSC::JIT::compileGetDirectOffset): Updated for rename. + + (JSC::JIT::emit_op_get_by_pname): Same as emit_op_get_by_pname above. + + * llint/LowLevelInterpreter.asm: Updated to mirror changes in PropertyOffset.h, + since we duplicate values from there. + + * llint/LowLevelInterpreter32_64.asm: + * llint/LowLevelInterpreter64.asm: Just like the JIT, most things are just + renames, and get_by_pname changes to do more math. I also standardized + offset calculations to use a hard-coded "-2", to match the JIT. This + isn't really better, but it makes global search and replace easier, + should we choose to refactor this code not to hard-code constants. + + I also renamed loadPropertyAtVariableOffsetKnownNotFinal to + loadPropertyAtVariableOffsetKnownNotInline in order to sever the assumption + that inline capacity is tied to object type, and I changed the 64bit LLInt + to use this -- not using this previously seems to have been an oversight. + + * runtime/JSObject.cpp: + (JSC::JSObject::visitChildren): + (JSC::JSFinalObject::visitChildren): + * runtime/JSObject.h: + (JSC::JSObject::offsetForLocation): + (JSNonFinalObject): + (JSC::JSFinalObject::createStructure): + (JSFinalObject): + (JSC::JSFinalObject::finishCreation): Updated for above changes. + + * runtime/JSPropertyNameIterator.h: + (JSPropertyNameIterator): + (JSC::JSPropertyNameIterator::finishCreation): Store the inline capacity + of our object, since it's not a constant. + + (JSC::JSPropertyNameIterator::getOffset): Removed. This function was + wrong. Luckily, it was also unused, since the C++ interpreter is gone. + + * runtime/PropertyMapHashTable.h: + (PropertyTable): Use a helper function instead of hard-coding assumptions + about object types. + + (JSC::PropertyTable::nextOffset): + * runtime/PropertyOffset.h: + (JSC): + (JSC::checkOffset): + (JSC::validateOffset): + (JSC::isInlineOffset): + (JSC::numberOfSlotsForLastOffset): + (JSC::propertyOffsetFor): Refactored these functions to take inline capacity + as an argument, since it's not fixed at compile time anymore. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::putSpecificValue): + * runtime/Structure.h: + (Structure): + (JSC::Structure::outOfLineCapacity): + (JSC::Structure::hasInlineStorage): + (JSC::Structure::inlineCapacity): + (JSC::Structure::inlineSize): + (JSC::Structure::firstValidOffset): + (JSC::Structure::lastValidOffset): + (JSC::Structure::create): Removed some hard-coded assumptions about inline + capacity and object type, and replaced with more liberal use of helper functions. + +2012-10-03 Michael Saboff + + OpaqueJSString doesn't optimally handle 8 bit strings + https://bugs.webkit.org/show_bug.cgi?id=98300 + + Reviewed by Geoffrey Garen. + + Change OpaqueJSString to store and manage a String instead of a UChar buffer. + The member string is a copy of any string used during creation. + + * API/OpaqueJSString.cpp: + (OpaqueJSString::create): + (OpaqueJSString::identifier): + * API/OpaqueJSString.h: + (OpaqueJSString::characters): + (OpaqueJSString::length): + (OpaqueJSString::string): + (OpaqueJSString::OpaqueJSString): + (OpaqueJSString): + +2012-10-03 Filip Pizlo + + Array.splice should be fast when it is used to remove elements other than the very first + https://bugs.webkit.org/show_bug.cgi?id=98236 + + Reviewed by Michael Saboff. + + Applied the same technique that was used to optimize the unshift case of splice in + http://trac.webkit.org/changeset/129676. This is a >20x speed-up on programs that + use splice for element removal. + + * runtime/ArrayPrototype.cpp: + (JSC::shift): + * runtime/JSArray.cpp: + (JSC::JSArray::shiftCount): + * runtime/JSArray.h: + (JSArray): + +2012-09-16 Mark Hahnenberg + + Delayed structure sweep can leak structures without bound + https://bugs.webkit.org/show_bug.cgi?id=96546 + + Reviewed by Geoffrey Garen. + + This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only + allocators. We now have separate allocators for our three types of objects: those objects with no destructors, + those objects with destructors and with immortal structures, and those objects with destructors that don't have + immortal structures. All of the objects of the third type (destructors without immortal structures) now + inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores + the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction. + + * API/JSCallbackConstructor.cpp: Use JSDestructibleObject for JSCallbackConstructor. + (JSC): + (JSC::JSCallbackConstructor::JSCallbackConstructor): + * API/JSCallbackConstructor.h: + (JSCallbackConstructor): + * API/JSCallbackObject.cpp: Inherit from JSDestructibleObject for normal JSCallbackObjects and use a finalizer for + JSCallbackObject, since JSGlobalObject also uses a finalizer. + (JSC): + (JSC::::create): We need to move the create function for JSCallbackObject out of line so we can add + the finalizer for it. We don't want to add the finalizer is something like finishCreation in case somebody decides + to subclass this. We use this same technique for many other subclasses of JSGlobalObject. + (JSC::::createStructure): + * API/JSCallbackObject.h: + (JSCallbackObject): + (JSC): + * API/JSClassRef.cpp: Change all the JSCallbackObject to use JSDestructibleObject instead. + (OpaqueJSClass::prototype): + * API/JSObjectRef.cpp: Ditto. + (JSObjectMake): + (JSObjectGetPrivate): + (JSObjectSetPrivate): + (JSObjectGetPrivateProperty): + (JSObjectSetPrivateProperty): + (JSObjectDeletePrivateProperty): + * API/JSValueRef.cpp: Ditto. + (JSValueIsObjectOfClass): + * API/JSWeakObjectMapRefPrivate.cpp: Ditto. + * JSCTypedArrayStubs.h: + (JSC): + * JavaScriptCore.xcodeproj/project.pbxproj: + * dfg/DFGSpeculativeJIT.h: Use the proper allocator type when doing inline allocation in the DFG. + (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): + (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject): + * heap/Heap.cpp: + (JSC): + * heap/Heap.h: Add accessors for the various types of allocators now. Also remove the isSafeToSweepStructures function + since it's always safe to sweep Structures now. + (JSC::Heap::allocatorForObjectWithNormalDestructor): + (JSC::Heap::allocatorForObjectWithImmortalStructureDestructor): + (Heap): + (JSC::Heap::allocateWithNormalDestructor): + (JSC): + (JSC::Heap::allocateWithImmortalStructureDestructor): + * heap/IncrementalSweeper.cpp: Remove all the logic to detect when it's safe to sweep Structures from the + IncrementalSweeper since it's always safe to sweep Structures now. + (JSC::IncrementalSweeper::IncrementalSweeper): + (JSC::IncrementalSweeper::sweepNextBlock): + (JSC::IncrementalSweeper::startSweeping): + (JSC::IncrementalSweeper::willFinishSweeping): + (JSC): + * heap/IncrementalSweeper.h: + (IncrementalSweeper): + * heap/MarkedAllocator.cpp: Remove the logic that was preventing us from sweeping Structures if it wasn't safe. Add + tracking of the specific destructor type of allocator. + (JSC::MarkedAllocator::tryAllocateHelper): + (JSC::MarkedAllocator::allocateBlock): + * heap/MarkedAllocator.h: + (JSC::MarkedAllocator::destructorType): + (MarkedAllocator): + (JSC::MarkedAllocator::MarkedAllocator): + (JSC::MarkedAllocator::init): + * heap/MarkedBlock.cpp: Add all the destructor type stuff to MarkedBlocks so that we do the right thing when sweeping. + We also use the stored destructor type to determine the right thing to do in all JSCell::classInfo() calls. + (JSC::MarkedBlock::create): + (JSC::MarkedBlock::MarkedBlock): + (JSC): + (JSC::MarkedBlock::specializedSweep): + (JSC::MarkedBlock::sweep): + (JSC::MarkedBlock::sweepHelper): + * heap/MarkedBlock.h: + (JSC): + (JSC::MarkedBlock::allocator): + (JSC::MarkedBlock::destructorType): + * heap/MarkedSpace.cpp: Add the new destructor allocators to MarkedSpace. + (JSC::MarkedSpace::MarkedSpace): + (JSC::MarkedSpace::resetAllocators): + (JSC::MarkedSpace::canonicalizeCellLivenessData): + (JSC::MarkedSpace::isPagedOut): + (JSC::MarkedSpace::freeBlock): + * heap/MarkedSpace.h: + (MarkedSpace): + (JSC::MarkedSpace::immortalStructureDestructorAllocatorFor): + (JSC::MarkedSpace::normalDestructorAllocatorFor): + (JSC::MarkedSpace::allocateWithImmortalStructureDestructor): + (JSC::MarkedSpace::allocateWithNormalDestructor): + (JSC::MarkedSpace::forEachBlock): + * heap/SlotVisitor.cpp: Add include because the symbol was needed in an inlined function. + * jit/JIT.h: Make sure we use the correct allocator when doing inline allocations in the baseline JIT. + * jit/JITInlineMethods.h: + (JSC::JIT::emitAllocateBasicJSObject): + (JSC::JIT::emitAllocateJSFinalObject): + (JSC::JIT::emitAllocateJSArray): + * jsc.cpp: + (GlobalObject::create): Add finalizer here since JSGlobalObject needs to use a finalizer instead of inheriting from + JSDestructibleObject. + * runtime/Arguments.cpp: Inherit from JSDestructibleObject. + (JSC): + * runtime/Arguments.h: + (Arguments): + (JSC::Arguments::Arguments): + * runtime/ErrorPrototype.cpp: Added an assert to make sure we have a trivial destructor. + (JSC): + * runtime/Executable.h: Indicate that all of the Executable* classes have immortal Structures. + (JSC): + * runtime/InternalFunction.cpp: Inherit from JSDestructibleObject. + (JSC): + (JSC::InternalFunction::InternalFunction): + * runtime/InternalFunction.h: + (InternalFunction): + * runtime/JSCell.h: Added two static bools, needsDestruction and hasImmortalStructure, that classes can override + to indicate at compile time which part of the heap they should be allocated in. + (JSC::allocateCell): Use the appropriate allocator depending on the destructor type. + * runtime/JSDestructibleObject.h: Added. New class that stores the ClassInfo of any subclass so that it can be + accessed safely when the object is being destroyed. + (JSC): + (JSDestructibleObject): + (JSC::JSDestructibleObject::classInfo): + (JSC::JSDestructibleObject::JSDestructibleObject): + (JSC::JSCell::classInfo): Checks the current MarkedBlock to see where it should get the ClassInfo from so that it's always safe. + * runtime/JSGlobalObject.cpp: JSGlobalObject now uses a finalizer instead of a destructor so that it can avoid forcing all + of its relatives in the inheritance hierarchy (e.g. JSScope) to use destructors as well. + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObject.h: + (JSGlobalObject): + (JSC::JSGlobalObject::createRareDataIfNeeded): Since we always create a finalizer now, we don't have to worry about adding one + for the m_rareData field when it's created. + (JSC::JSGlobalObject::create): + (JSC): + * runtime/JSGlobalThis.h: Inherit from JSDestructibleObject. + (JSGlobalThis): + (JSC::JSGlobalThis::JSGlobalThis): + * runtime/JSPropertyNameIterator.h: Has an immortal Structure. + (JSC): + * runtime/JSScope.cpp: + (JSC): + * runtime/JSString.h: Has an immortal Structure. + (JSC): + * runtime/JSWrapperObject.h: Inherit from JSDestructibleObject. + (JSWrapperObject): + (JSC::JSWrapperObject::JSWrapperObject): + * runtime/MathObject.cpp: Cleaning up some of the inheritance stuff. + (JSC): + * runtime/NameInstance.h: Inherit from JSDestructibleObject. + (NameInstance): + * runtime/RegExp.h: Has immortal Structure. + (JSC): + * runtime/RegExpObject.cpp: Inheritance cleanup. + (JSC): + * runtime/SparseArrayValueMap.h: Has immortal Structure. + (JSC): + * runtime/Structure.h: Has immortal Structure. + (JSC): + * runtime/StructureChain.h: Ditto. + (JSC): + * runtime/SymbolTable.h: Ditto. + (SharedSymbolTable): + (JSC): + +== Rolled over to ChangeLog-2012-10-02 == diff --git a/Source/JavaScriptCore/Configurations/Base.xcconfig b/Source/JavaScriptCore/Configurations/Base.xcconfig index 2de8597d7..19a93909b 100644 --- a/Source/JavaScriptCore/Configurations/Base.xcconfig +++ b/Source/JavaScriptCore/Configurations/Base.xcconfig @@ -48,6 +48,13 @@ GCC_STRICT_ALIASING = YES; GCC_THREADSAFE_STATICS = NO; GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; +// FIXME: JavaSciptCore should build with -Wshorten-64-to-32 +GCC_WARN_64_TO_32_BIT_CONVERSION = $(GCC_WARN_64_TO_32_BIT_CONVERSION_$(CURRENT_ARCH)); +GCC_WARN_64_TO_32_BIT_CONVERSION_ = YES; +GCC_WARN_64_TO_32_BIT_CONVERSION_armv7 = YES; +GCC_WARN_64_TO_32_BIT_CONVERSION_armv7s = YES; +GCC_WARN_64_TO_32_BIT_CONVERSION_i386 = YES; +GCC_WARN_64_TO_32_BIT_CONVERSION_x86_64 = NO; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -59,16 +66,7 @@ VALID_ARCHS = $(VALID_ARCHS_$(PLATFORM_NAME)); VALID_ARCHS_iphoneos = $(ARCHS_STANDARD_32_BIT); VALID_ARCHS_iphonesimulator = $(ARCHS_STANDARD_32_BIT); VALID_ARCHS_macosx = i386 ppc x86_64 ppc64 $(ARCHS_UNIVERSAL_IPHONE_OS); -WARNING_CFLAGS_BASE = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare; -WARNING_CFLAGS = $(WARNING_CFLAGS_$(PLATFORM_NAME)); -WARNING_CFLAGS_iphoneos = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32; -WARNING_CFLAGS_iphonesimulator = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32; -WARNING_CFLAGS_macosx = $(WARNING_CFLAGS_macosx_$(CURRENT_ARCH)); -WARNING_CFLAGS_macosx_ = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32; -WARNING_CFLAGS_macosx_i386 = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32; -WARNING_CFLAGS_macosx_ppc = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32; -// FIXME: JavaScriptCore 64-bit builds should build with -Wshorten-64-to-32 -WARNING_CFLAGS_macosx_x86_64 = $(WARNING_CFLAGS_BASE); +WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare; HEADER_SEARCH_PATHS = . icu "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS); TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR); diff --git a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig index 00678accd..4903d2bf8 100644 --- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig +++ b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig @@ -33,8 +33,14 @@ ENABLE_3D_RENDERING = ENABLE_3D_RENDERING; ENABLE_ACCELERATED_2D_CANVAS = ; -ENABLE_ANIMATION_API = ; ENABLE_BLOB = ENABLE_BLOB; +ENABLE_CACHE_PARTITIONING = $(ENABLE_CACHE_PARTITIONING_$(PLATFORM_NAME)); +ENABLE_CACHE_PARTITIONING_macosx = $(ENABLE_CACHE_PARTITIONING_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +ENABLE_CACHE_PARTITIONING_macosx_1070 = ; +ENABLE_CACHE_PARTITIONING_macosx_1080 = ENABLE_CACHE_PARTITIONING; +ENABLE_CACHE_PARTITIONING_macosx_1090 = ENABLE_CACHE_PARTITIONING; +ENABLE_CANVAS_PATH = ENABLE_CANVAS_PATH; +ENABLE_CANVAS_PROXY = ; ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING; ENABLE_CSP_NEXT = ; ENABLE_CSS_BOX_DECORATION_BREAK = ENABLE_CSS_BOX_DECORATION_BREAK; @@ -46,34 +52,47 @@ ENABLE_CSS_IMAGE_ORIENTATION = ; ENABLE_CSS_IMAGE_RESOLUTION = ; ENABLE_CSS_REGIONS = ENABLE_CSS_REGIONS; ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS; +ENABLE_CSS_SHAPES = ENABLE_CSS_SHAPES; ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION; +ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED = ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED; ENABLE_CSS_VARIABLES = ; -ENABLE_CSS3_BACKGROUND = ; ENABLE_CSS3_CONDITIONAL_RULES = ; ENABLE_CSS3_TEXT = ; +ENABLE_CSS3_TEXT_LINE_BREAK = ; +ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY; ENABLE_CUSTOM_SCHEME_HANDLER = ; ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME)); ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT; ENABLE_DATALIST_ELEMENT = ; ENABLE_DATA_TRANSFER_ITEMS = ; ENABLE_DETAILS_ELEMENT = ENABLE_DETAILS_ELEMENT; -ENABLE_DEVICE_ORIENTATION = ; +ENABLE_DEVICE_ORIENTATION = $(ENABLE_DEVICE_ORIENTATION_$(PLATFORM_NAME)); +ENABLE_DEVICE_ORIENTATION_iphoneos = ENABLE_DEVICE_ORIENTATION; +ENABLE_DEVICE_ORIENTATION_iphonesimulator = $(ENABLE_DEVICE_ORIENTATION_iphoneos); ENABLE_DIALOG_ELEMENT = ; ENABLE_DIRECTORY_UPLOAD = ; +ENABLE_DOM4_EVENTS_CONSTRUCTOR = ENABLE_DOM4_EVENTS_CONSTRUCTOR; ENABLE_DRAGGABLE_REGION = ; ENABLE_ENCRYPTED_MEDIA = $(ENABLE_ENCRYPTED_MEDIA_$(PLATFORM_NAME)); ENABLE_ENCRYPTED_MEDIA_macosx = $(ENABLE_ENCRYPTED_MEDIA_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); ENABLE_ENCRYPTED_MEDIA_macosx_1070 = ; ENABLE_ENCRYPTED_MEDIA_macosx_1080 = ; ENABLE_ENCRYPTED_MEDIA_macosx_1090 = ENABLE_ENCRYPTED_MEDIA; +ENABLE_ENCRYPTED_MEDIA_V2 = $(ENABLE_ENCRYPTED_MEDIA_V2_$(PLATFORM_NAME)); +ENABLE_ENCRYPTED_MEDIA_V2_macosx = $(ENABLE_ENCRYPTED_MEDIA_V2_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +ENABLE_ENCRYPTED_MEDIA_V2_macosx_1070 = ; +ENABLE_ENCRYPTED_MEDIA_V2_macosx_1080 = ; +ENABLE_ENCRYPTED_MEDIA_V2_macosx_1090 = ENABLE_ENCRYPTED_MEDIA_V2; ENABLE_FILE_SYSTEM = ; ENABLE_FILTERS = ENABLE_FILTERS; -ENABLE_FULLSCREEN_API = ENABLE_FULLSCREEN_API; +ENABLE_FONT_LOAD_EVENTS = ; +ENABLE_FULLSCREEN_API = $(ENABLE_FULLSCREEN_API_$(PLATFORM_NAME)); +ENABLE_FULLSCREEN_API_macosx = ENABLE_FULLSCREEN_API; ENABLE_GAMEPAD = ; ENABLE_GEOLOCATION = ENABLE_GEOLOCATION; ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING = $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING_$(PLATFORM_NAME)); ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING_macosx = ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING; -ENABLE_HIGH_DPI_CANVAS = ENABLE_HIGH_DPI_CANVAS; +ENABLE_HIGH_DPI_CANVAS = $(ENABLE_HIGH_DPI_CANVAS_$(PLATFORM_NAME)); ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(PLATFORM_NAME)); ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE; ENABLE_IFRAME_SEAMLESS = ENABLE_IFRAME_SEAMLESS; @@ -83,9 +102,9 @@ ENABLE_INPUT_TYPE_COLOR = ; ENABLE_INPUT_TYPE_DATE = $(ENABLE_INPUT_TYPE_DATE_$(PLATFORM_NAME)); ENABLE_INPUT_TYPE_DATE_iphoneos = ENABLE_INPUT_TYPE_DATE; ENABLE_INPUT_TYPE_DATE_iphonesimulator = $(ENABLE_INPUT_TYPE_DATE_iphoneos); -ENABLE_INPUT_TYPE_DATETIME = $(ENABLE_INPUT_TYPE_DATETIME_$(PLATFORM_NAME)); -ENABLE_INPUT_TYPE_DATETIME_iphoneos = ENABLE_INPUT_TYPE_DATETIME; -ENABLE_INPUT_TYPE_DATETIME_iphonesimulator = $(ENABLE_INPUT_TYPE_DATETIME_iphoneos); +ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE = $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE_$(PLATFORM_NAME)); +ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE_iphoneos = ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE; +ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE_iphonesimulator = $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE_iphoneos); ENABLE_INPUT_TYPE_DATETIMELOCAL = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_$(PLATFORM_NAME)); ENABLE_INPUT_TYPE_DATETIMELOCAL_iphoneos = ENABLE_INPUT_TYPE_DATETIMELOCAL; ENABLE_INPUT_TYPE_DATETIMELOCAL_iphonesimulator = $(ENABLE_INPUT_TYPE_DATETIMELOCAL_iphoneos); @@ -108,49 +127,55 @@ ENABLE_LEGACY_NOTIFICATIONS_macosx_1090 = ENABLE_LEGACY_NOTIFICATIONS; ENABLE_LEGACY_VENDOR_PREFIXES = ENABLE_LEGACY_VENDOR_PREFIXES; ENABLE_LEGACY_WEB_AUDIO = ENABLE_LEGACY_WEB_AUDIO; ENABLE_LINK_PREFETCH = ; -ENABLE_LINK_PRERENDER = ; ENABLE_MATHML = ENABLE_MATHML; ENABLE_MEDIA_SOURCE = ; ENABLE_MEDIA_STATISTICS = ; ENABLE_METER_ELEMENT = ENABLE_METER_ELEMENT; ENABLE_MHTML = ; ENABLE_MICRODATA = ; -ENABLE_MUTATION_OBSERVERS = ENABLE_MUTATION_OBSERVERS; +ENABLE_MOUSE_CURSOR_SCALE = ENABLE_MOUSE_CURSOR_SCALE; ENABLE_NAVIGATOR_CONTENT_UTILS = ; +ENABLE_NOSNIFF = ; ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(PLATFORM_NAME)); ENABLE_NOTIFICATIONS_macosx = $(ENABLE_NOTIFICATIONS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); ENABLE_NOTIFICATIONS_macosx_1070 = ; ENABLE_NOTIFICATIONS_macosx_1080 = ENABLE_NOTIFICATIONS; ENABLE_NOTIFICATIONS_macosx_1090 = ENABLE_NOTIFICATIONS; -ENABLE_PAGE_VISIBILITY_API = ; +ENABLE_PAGE_VISIBILITY_API = ENABLE_PAGE_VISIBILITY_API; ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(PLATFORM_NAME)); -ENABLE_PDFKIT_PLUGIN_macosx = $(ENABLE_PDFKIT_PLUGIN_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); -ENABLE_PDFKIT_PLUGIN_macosx_1070 = ; -ENABLE_PDFKIT_PLUGIN_macosx_1080 = ; -ENABLE_PDFKIT_PLUGIN_macosx_1090 = ENABLE_PDFKIT_PLUGIN; +ENABLE_PDFKIT_PLUGIN_macosx = ENABLE_PDFKIT_PLUGIN; +ENABLE_PLUGIN_PROXY_FOR_VIDEO = $(ENABLE_PLUGIN_PROXY_FOR_VIDEO_$(PLATFORM_NAME)); +ENABLE_PLUGIN_PROXY_FOR_VIDEO_iphoneos = ENABLE_PLUGIN_PROXY_FOR_VIDEO; +ENABLE_PLUGIN_PROXY_FOR_VIDEO_iphonesimulator = $(ENABLE_PLUGIN_PROXY_FOR_VIDEO_iphoneos); ENABLE_PROGRESS_ELEMENT = ENABLE_PROGRESS_ELEMENT; ENABLE_PROXIMITY_EVENTS = ; +ENABLE_PUBLIC_SUFFIX_LIST = $(ENABLE_PUBLIC_SUFFIX_LIST_$(PLATFORM_NAME)); +ENABLE_PUBLIC_SUFFIX_LIST_macosx = $(ENABLE_PUBLIC_SUFFIX_LIST_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +ENABLE_PUBLIC_SUFFIX_LIST_macosx_1070 = ; +ENABLE_PUBLIC_SUFFIX_LIST_macosx_1080 = ENABLE_PUBLIC_SUFFIX_LIST; +ENABLE_PUBLIC_SUFFIX_LIST_macosx_1090 = ENABLE_PUBLIC_SUFFIX_LIST; ENABLE_QUOTA = ; ENABLE_REQUEST_ANIMATION_FRAME = ENABLE_REQUEST_ANIMATION_FRAME; ENABLE_RESOLUTION_MEDIA_QUERY = ; ENABLE_SCRIPTED_SPEECH = ; ENABLE_SHADOW_DOM = ; ENABLE_SHARED_WORKERS = ENABLE_SHARED_WORKERS; +ENABLE_SPEECH_SYNTHESIS = $(ENABLE_SPEECH_SYNTHESIS_$(PLATFORM_NAME)); +ENABLE_SPEECH_SYNTHESIS_macosx = ENABLE_SPEECH_SYNTHESIS; ENABLE_SQL_DATABASE = ENABLE_SQL_DATABASE; ENABLE_STYLE_SCOPED = ; -ENABLE_SUBPIXEL_LAYOUT = ENABLE_SUBPIXEL_LAYOUT; +ENABLE_SUBPIXEL_LAYOUT = ; ENABLE_SVG = ENABLE_SVG; -ENABLE_SVG_DOM_OBJC_BINDINGS = $(ENABLE_SVG_DOM_OBJC_BINDINGS_$(PLATFORM_NAME)); -ENABLE_SVG_DOM_OBJC_BINDINGS_macosx = ENABLE_SVG_DOM_OBJC_BINDINGS; ENABLE_SVG_FONTS = ENABLE_SVG_FONTS; ENABLE_TEMPLATE_ELEMENT = ; ENABLE_TEXT_AUTOSIZING = ; -ENABLE_TEXT_NOTIFICATIONS_ONLY = ENABLE_TEXT_NOTIFICATIONS_ONLY; +ENABLE_THREADED_HTML_PARSER = ; ENABLE_TOUCH_ICON_LOADING = ; ENABLE_USERSELECT_ALL = ENABLE_USERSELECT_ALL; ENABLE_VIDEO = ENABLE_VIDEO; ENABLE_VIDEO_TRACK = $(ENABLE_VIDEO_TRACK_$(PLATFORM_NAME)); ENABLE_VIDEO_TRACK_macosx = ENABLE_VIDEO_TRACK; +ENABLE_VIEW_MODE_CSS_MEDIA = ; ENABLE_WEBGL = ENABLE_WEBGL; ENABLE_WEB_AUDIO = ENABLE_WEB_AUDIO; ENABLE_WEB_SOCKETS = ENABLE_WEB_SOCKETS; @@ -159,5 +184,4 @@ ENABLE_WORKERS = ENABLE_WORKERS; ENABLE_XHR_TIMEOUT = ENABLE_XHR_TIMEOUT; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_BACKGROUND) $(ENABLE_CSS3_TEXT) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT); - +FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME)); diff --git a/Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig b/Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig index bd733d4a2..a91c75730 100644 --- a/Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig +++ b/Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig @@ -31,3 +31,9 @@ SKIP_INSTALL = $(SKIP_INSTALL_$(FORCE_TOOL_INSTALL)); SKIP_INSTALL_ = YES; SKIP_INSTALL_NO = YES; SKIP_INSTALL_YES = NO; + +GCC_ENABLE_OBJC_GC = NO; +CLANG_ENABLE_OBJC_ARC = $(CLANG_ENABLE_OBJC_ARC_$(CURRENT_ARCH)); +CLANG_ENABLE_OBJC_ARC_x86_64 = YES; +CLANG_ENABLE_OBJC_ARC_armv7 = YES; +CLANG_ENABLE_OBJC_ARC_armv7s = YES; diff --git a/Source/JavaScriptCore/Configurations/Version.xcconfig b/Source/JavaScriptCore/Configurations/Version.xcconfig index 943e88ecf..e2531abb4 100644 --- a/Source/JavaScriptCore/Configurations/Version.xcconfig +++ b/Source/JavaScriptCore/Configurations/Version.xcconfig @@ -21,8 +21,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -MAJOR_VERSION = 537; -MINOR_VERSION = 21; +MAJOR_VERSION = 538; +MINOR_VERSION = 1; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make index b0b637e88..517063d78 100644 --- a/Source/JavaScriptCore/DerivedSources.make +++ b/Source/JavaScriptCore/DerivedSources.make @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. +# Copyright (C) 2006, 2007, 2008, 2009, 2011, 2013 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -41,7 +41,6 @@ all : \ DateConstructor.lut.h \ DatePrototype.lut.h \ ErrorPrototype.lut.h \ - HeaderDetection.h \ JSONObject.lut.h \ JSGlobalObject.lut.h \ KeywordLookup.h \ @@ -51,13 +50,11 @@ all : \ NumberConstructor.lut.h \ NumberPrototype.lut.h \ ObjectConstructor.lut.h \ - ObjectPrototype.lut.h \ RegExpConstructor.lut.h \ RegExpPrototype.lut.h \ RegExpJitTables.h \ RegExpObject.lut.h \ StringConstructor.lut.h \ - StringPrototype.lut.h \ docs/bytecode.html \ udis86_itab.h \ # @@ -84,19 +81,3 @@ KeywordLookup.h: KeywordLookupGenerator.py Keywords.table udis86_itab.h: $(JavaScriptCore)/disassembler/udis86/itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml (PYTHONPATH=$(JavaScriptCore)/disassembler/udis86 python $(JavaScriptCore)/disassembler/udis86/itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml || exit 1) - -# header detection - -ifeq ($(OS),MACOS) - -HeaderDetection.h : DerivedSources.make /System/Library/CoreServices/SystemVersion.plist - rm -f $@ - echo "/* This is a generated file. Do not edit. */" > $@ - if [ -f $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders/pthread_machdep.h ]; then echo "#define HAVE_PTHREAD_MACHDEP_H 1" >> $@; else echo >> $@; fi - -else - -HeaderDetection.h : - echo > $@ - -endif diff --git a/Source/JavaScriptCore/DerivedSources.pri b/Source/JavaScriptCore/DerivedSources.pri index 8bbc29d2a..c27c15f3e 100644 --- a/Source/JavaScriptCore/DerivedSources.pri +++ b/Source/JavaScriptCore/DerivedSources.pri @@ -20,12 +20,10 @@ LUT_FILES += \ runtime/NumberConstructor.cpp \ runtime/NumberPrototype.cpp \ runtime/ObjectConstructor.cpp \ - runtime/ObjectPrototype.cpp \ runtime/RegExpConstructor.cpp \ runtime/RegExpObject.cpp \ runtime/RegExpPrototype.cpp \ runtime/StringConstructor.cpp \ - runtime/StringPrototype.cpp \ KEYWORDLUT_FILES += \ parser/Keywords.table diff --git a/Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSCTestRunnerUtils.h b/Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSCTestRunnerUtils.h new file mode 100644 index 000000000..93a199df4 --- /dev/null +++ b/Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSCTestRunnerUtils.h @@ -0,0 +1 @@ +#include diff --git a/Source/JavaScriptCore/GNUmakefile.am b/Source/JavaScriptCore/GNUmakefile.am index 96a23f288..1c68b7621 100644 --- a/Source/JavaScriptCore/GNUmakefile.am +++ b/Source/JavaScriptCore/GNUmakefile.am @@ -200,3 +200,13 @@ CLEANFILES += \ DISTCLEANFILES += \ $(top_builddir)/Source/JavaScriptCore/javascriptcoregtk-@WEBKITGTK_API_VERSION@.pc + +if ENABLE_INTROSPECTION +# The GIR file is generated via autoconf, as we don't need to run the scanner against non-GObject libraries. +JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib: JavaScriptCore-@WEBKITGTK_API_VERSION@.gir $(G_IR_COMPILER) + $(AM_V_GEN)$(G_IR_COMPILER) --includedir $(WebKit) --includedir $(top_builddir) $< -o $@ + +gir_DATA += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir +typelibs_DATA += JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib +CLEANFILES += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib +endif diff --git a/Source/JavaScriptCore/GNUmakefile.list.am b/Source/JavaScriptCore/GNUmakefile.list.am index 701d80fae..b1f38ccc5 100644 --- a/Source/JavaScriptCore/GNUmakefile.list.am +++ b/Source/JavaScriptCore/GNUmakefile.list.am @@ -24,18 +24,17 @@ javascriptcore_built_nosources += \ DerivedSources/JavaScriptCore/NumberConstructor.lut.h \ DerivedSources/JavaScriptCore/NumberPrototype.lut.h \ DerivedSources/JavaScriptCore/ObjectConstructor.lut.h \ - DerivedSources/JavaScriptCore/ObjectPrototype.lut.h \ DerivedSources/JavaScriptCore/RegExpConstructor.lut.h \ DerivedSources/JavaScriptCore/RegExpObject.lut.h \ DerivedSources/JavaScriptCore/RegExpPrototype.lut.h \ DerivedSources/JavaScriptCore/StringConstructor.lut.h \ - DerivedSources/JavaScriptCore/StringPrototype.lut.h \ DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h \ DerivedSources/JavaScriptCore/LLIntAssembly.h javascriptcore_sources += \ Source/JavaScriptCore/API/APICast.h \ Source/JavaScriptCore/API/APIShims.h \ + Source/JavaScriptCore/API/JSAPIWrapperObject.h \ Source/JavaScriptCore/API/JSBase.cpp \ Source/JavaScriptCore/API/JSBasePrivate.h \ Source/JavaScriptCore/API/JSCallbackConstructor.cpp \ @@ -52,9 +51,13 @@ javascriptcore_sources += \ Source/JavaScriptCore/API/JSObjectRef.cpp \ Source/JavaScriptCore/API/JSObjectRefPrivate.h \ Source/JavaScriptCore/API/JSRetainPtr.h \ + Source/JavaScriptCore/API/JSScriptRef.cpp \ + Source/JavaScriptCore/API/JSScriptRefPrivate.h \ Source/JavaScriptCore/API/JSStringRef.cpp \ + Source/JavaScriptCore/API/JSStringRefPrivate.h \ Source/JavaScriptCore/API/JSValueRef.cpp \ Source/JavaScriptCore/API/JSWeakObjectMapRefInternal.h \ + Source/JavaScriptCore/API/ObjCCallbackFunction.h \ Source/JavaScriptCore/API/OpaqueJSString.cpp \ Source/JavaScriptCore/API/OpaqueJSString.h \ Source/JavaScriptCore/assembler/AbstractMacroAssembler.h \ @@ -74,7 +77,6 @@ javascriptcore_sources += \ Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h \ Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h \ Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h \ - Source/JavaScriptCore/assembler/MacroAssemblerSH4.cpp \ Source/JavaScriptCore/assembler/MacroAssemblerSH4.h \ Source/JavaScriptCore/assembler/MacroAssemblerX86.h \ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h \ @@ -103,13 +105,14 @@ javascriptcore_sources += \ Source/JavaScriptCore/bytecode/CodeBlockWithJITType.h \ Source/JavaScriptCore/bytecode/CodeOrigin.cpp \ Source/JavaScriptCore/bytecode/CodeOrigin.h \ - Source/JavaScriptCore/bytecode/Comment.h \ Source/JavaScriptCore/bytecode/DataFormat.h \ Source/JavaScriptCore/bytecode/DFGExitProfile.cpp \ Source/JavaScriptCore/bytecode/DFGExitProfile.h \ Source/JavaScriptCore/bytecode/EvalCodeCache.h \ Source/JavaScriptCore/bytecode/ExecutionCounter.cpp \ Source/JavaScriptCore/bytecode/ExecutionCounter.h \ + Source/JavaScriptCore/bytecode/ExitKind.cpp \ + Source/JavaScriptCore/bytecode/ExitKind.h \ Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h \ Source/JavaScriptCore/bytecode/GetByIdStatus.cpp \ Source/JavaScriptCore/bytecode/GetByIdStatus.h \ @@ -123,16 +126,22 @@ javascriptcore_sources += \ Source/JavaScriptCore/bytecode/LineInfo.h \ Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp \ Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h \ + Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h \ Source/JavaScriptCore/bytecode/Opcode.cpp \ Source/JavaScriptCore/bytecode/Opcode.h \ Source/JavaScriptCore/bytecode/Operands.h \ + Source/JavaScriptCore/bytecode/PolymorphicAccessStructureList.h \ Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.cpp \ Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.h \ + Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp \ + Source/JavaScriptCore/bytecode/PreciseJumpTargets.h \ Source/JavaScriptCore/bytecode/SpeculatedType.cpp \ Source/JavaScriptCore/bytecode/SpeculatedType.h \ Source/JavaScriptCore/bytecode/PutByIdStatus.cpp \ Source/JavaScriptCore/bytecode/PutByIdStatus.h \ Source/JavaScriptCore/bytecode/PutKind.h \ + Source/JavaScriptCore/bytecode/ReduceWhitespace.cpp \ + Source/JavaScriptCore/bytecode/ReduceWhitespace.h \ Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp \ Source/JavaScriptCore/bytecode/ResolveGlobalStatus.h \ Source/JavaScriptCore/bytecode/ResolveOperation.h \ @@ -158,19 +167,26 @@ javascriptcore_sources += \ Source/JavaScriptCore/bytecompiler/LabelScope.h \ Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp \ Source/JavaScriptCore/bytecompiler/RegisterID.h \ + Source/JavaScriptCore/bytecompiler/StaticPropertyAnalysis.h \ + Source/JavaScriptCore/bytecompiler/StaticPropertyAnalyzer.h \ Source/JavaScriptCore/dfg/DFGAbstractState.cpp \ Source/JavaScriptCore/dfg/DFGAbstractState.h \ Source/JavaScriptCore/dfg/DFGAbstractValue.h \ + Source/JavaScriptCore/dfg/DFGAdjacencyList.h \ + Source/JavaScriptCore/dfg/DFGAllocator.h \ Source/JavaScriptCore/dfg/DFGArgumentPosition.h \ Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp \ Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.h \ Source/JavaScriptCore/dfg/DFGArrayMode.cpp \ Source/JavaScriptCore/dfg/DFGArrayMode.h \ + Source/JavaScriptCore/dfg/DFGArrayifySlowPathGenerator.h \ Source/JavaScriptCore/dfg/DFGAssemblyHelpers.cpp \ Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h \ + Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp \ + Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.h \ Source/JavaScriptCore/dfg/DFGBasicBlock.h \ + Source/JavaScriptCore/dfg/DFGBasicBlockInlines.h \ Source/JavaScriptCore/dfg/DFGBranchDirection.h \ - Source/JavaScriptCore/dfg/DFGByteCodeCache.h \ Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp \ Source/JavaScriptCore/dfg/DFGByteCodeParser.h \ Source/JavaScriptCore/dfg/DFGCCallHelpers.h \ @@ -181,13 +197,16 @@ javascriptcore_sources += \ Source/JavaScriptCore/dfg/DFGCapabilities.h \ Source/JavaScriptCore/dfg/DFGCFAPhase.cpp \ Source/JavaScriptCore/dfg/DFGCFAPhase.h \ + Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp \ + Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.h \ + Source/JavaScriptCore/dfg/DFGCommon.cpp \ Source/JavaScriptCore/dfg/DFGCommon.h \ - Source/JavaScriptCore/dfg/DFGCorrectableJumpPoint.cpp \ - Source/JavaScriptCore/dfg/DFGCorrectableJumpPoint.h \ Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp \ Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.h \ Source/JavaScriptCore/dfg/DFGCSEPhase.cpp \ Source/JavaScriptCore/dfg/DFGCSEPhase.h \ + Source/JavaScriptCore/dfg/DFGDCEPhase.cpp \ + Source/JavaScriptCore/dfg/DFGDCEPhase.h \ Source/JavaScriptCore/dfg/DFGDisassembler.cpp \ Source/JavaScriptCore/dfg/DFGDisassembler.h \ Source/JavaScriptCore/dfg/DFGDominators.cpp \ @@ -195,6 +214,8 @@ javascriptcore_sources += \ Source/JavaScriptCore/dfg/DFGDoubleFormatState.h \ Source/JavaScriptCore/dfg/DFGDriver.cpp \ Source/JavaScriptCore/dfg/DFGDriver.h \ + Source/JavaScriptCore/dfg/DFGEdge.cpp \ + Source/JavaScriptCore/dfg/DFGEdge.h \ Source/JavaScriptCore/dfg/DFGFPRInfo.h \ Source/JavaScriptCore/dfg/DFGFixupPhase.cpp \ Source/JavaScriptCore/dfg/DFGFixupPhase.h \ @@ -205,15 +226,18 @@ javascriptcore_sources += \ Source/JavaScriptCore/dfg/DFGInsertionSet.h \ Source/JavaScriptCore/dfg/DFGJITCompiler.cpp \ Source/JavaScriptCore/dfg/DFGJITCompiler.h \ + Source/JavaScriptCore/dfg/DFGLongLivedState.cpp \ + Source/JavaScriptCore/dfg/DFGLongLivedState.h \ Source/JavaScriptCore/dfg/DFGMinifiedGraph.h \ + Source/JavaScriptCore/dfg/DFGMinifiedID.h \ Source/JavaScriptCore/dfg/DFGMinifiedNode.cpp \ Source/JavaScriptCore/dfg/DFGMinifiedNode.h \ + Source/JavaScriptCore/dfg/DFGNode.cpp \ Source/JavaScriptCore/dfg/DFGNode.h \ + Source/JavaScriptCore/dfg/DFGNodeAllocator.h \ Source/JavaScriptCore/dfg/DFGNodeFlags.cpp \ Source/JavaScriptCore/dfg/DFGNodeFlags.h \ - Source/JavaScriptCore/dfg/DFGAdjacencyList.h \ Source/JavaScriptCore/dfg/DFGNodeType.h \ - Source/JavaScriptCore/dfg/DFGEdge.h \ Source/JavaScriptCore/dfg/DFGOperations.cpp \ Source/JavaScriptCore/dfg/DFGOperations.h \ Source/JavaScriptCore/dfg/DFGOSREntry.cpp \ @@ -224,10 +248,15 @@ javascriptcore_sources += \ Source/JavaScriptCore/dfg/DFGOSRExitCompiler.h \ Source/JavaScriptCore/dfg/DFGOSRExit.h \ Source/JavaScriptCore/dfg/DFGOSRExit.cpp \ + Source/JavaScriptCore/dfg/DFGOSRExitCompilationInfo.h \ + Source/JavaScriptCore/dfg/DFGOSRExitJumpPlaceholder.cpp \ + Source/JavaScriptCore/dfg/DFGOSRExitJumpPlaceholder.h \ Source/JavaScriptCore/dfg/DFGPhase.cpp \ Source/JavaScriptCore/dfg/DFGPhase.h \ Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp \ Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.h \ + Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.cpp \ + Source/JavaScriptCore/dfg/DFGPredictionInjectionPhase.h \ Source/JavaScriptCore/dfg/DFGRegisterBank.h \ Source/JavaScriptCore/dfg/DFGRegisterSet.h \ Source/JavaScriptCore/dfg/DFGRepatch.cpp \ @@ -241,10 +270,14 @@ javascriptcore_sources += \ Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp \ Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h \ Source/JavaScriptCore/dfg/DFGStructureAbstractValue.h \ - Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.cpp \ - Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.h \ + Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp \ + Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.h \ Source/JavaScriptCore/dfg/DFGThunks.cpp \ Source/JavaScriptCore/dfg/DFGThunks.h \ + Source/JavaScriptCore/dfg/DFGUnificationPhase.cpp \ + Source/JavaScriptCore/dfg/DFGUnificationPhase.h \ + Source/JavaScriptCore/dfg/DFGUseKind.cpp \ + Source/JavaScriptCore/dfg/DFGUseKind.h \ Source/JavaScriptCore/dfg/DFGValueRecoveryOverride.h \ Source/JavaScriptCore/dfg/DFGValueSource.cpp \ Source/JavaScriptCore/dfg/DFGValueSource.h \ @@ -257,33 +290,37 @@ javascriptcore_sources += \ Source/JavaScriptCore/dfg/DFGVariableAccessData.h \ Source/JavaScriptCore/dfg/DFGVariableAccessDataDump.cpp \ Source/JavaScriptCore/dfg/DFGVariableAccessDataDump.h \ + Source/JavaScriptCore/dfg/DFGVariadicFunction.h \ Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp \ Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.h \ Source/JavaScriptCore/disassembler/Disassembler.cpp \ Source/JavaScriptCore/disassembler/Disassembler.h \ Source/JavaScriptCore/heap/CopiedAllocator.h \ Source/JavaScriptCore/heap/CopiedBlock.h \ + Source/JavaScriptCore/heap/CopiedBlockInlines.h \ Source/JavaScriptCore/heap/CopiedSpace.cpp \ Source/JavaScriptCore/heap/CopiedSpace.h \ Source/JavaScriptCore/heap/CopiedSpaceInlines.h \ - Source/JavaScriptCore/heap/CopyVisitor.h \ - Source/JavaScriptCore/heap/CopyVisitorInlines.h \ - Source/JavaScriptCore/heap/CopyVisitor.cpp \ - Source/JavaScriptCore/heap/CardSet.h \ + Source/JavaScriptCore/heap/CopyVisitor.h \ + Source/JavaScriptCore/heap/CopyVisitorInlines.h \ + Source/JavaScriptCore/heap/CopyVisitor.cpp \ + Source/JavaScriptCore/heap/CopyWorkList.h \ Source/JavaScriptCore/heap/ConservativeRoots.cpp \ Source/JavaScriptCore/heap/ConservativeRoots.h \ Source/JavaScriptCore/heap/DFGCodeBlocks.cpp \ Source/JavaScriptCore/heap/DFGCodeBlocks.h \ Source/JavaScriptCore/heap/GCAssertions.h \ Source/JavaScriptCore/heap/Handle.h \ + Source/JavaScriptCore/heap/HandleBlock.h \ + Source/JavaScriptCore/heap/HandleBlockInlines.h \ Source/JavaScriptCore/heap/HandleSet.cpp \ Source/JavaScriptCore/heap/HandleSet.h \ Source/JavaScriptCore/heap/HeapBlock.h \ - Source/JavaScriptCore/heap/HeapTimer.h \ - Source/JavaScriptCore/heap/HeapTimer.cpp \ + Source/JavaScriptCore/heap/HeapTimer.h \ + Source/JavaScriptCore/heap/HeapTimer.cpp \ Source/JavaScriptCore/heap/IncrementalSweeper.h \ Source/JavaScriptCore/heap/IncrementalSweeper.cpp \ - Source/JavaScriptCore/heap/SlotVisitor.cpp \ + Source/JavaScriptCore/heap/SlotVisitor.cpp \ Source/JavaScriptCore/heap/SlotVisitor.h \ Source/JavaScriptCore/heap/SlotVisitorInlines.h \ Source/JavaScriptCore/heap/HandleStack.cpp \ @@ -291,14 +328,14 @@ javascriptcore_sources += \ Source/JavaScriptCore/heap/HandleTypes.h \ Source/JavaScriptCore/heap/BlockAllocator.cpp \ Source/JavaScriptCore/heap/BlockAllocator.h \ - Source/JavaScriptCore/heap/GCThreadSharedData.cpp \ - Source/JavaScriptCore/heap/GCThreadSharedData.h \ - Source/JavaScriptCore/heap/GCThread.cpp \ - Source/JavaScriptCore/heap/GCThread.h \ + Source/JavaScriptCore/heap/GCThreadSharedData.cpp \ + Source/JavaScriptCore/heap/GCThreadSharedData.h \ + Source/JavaScriptCore/heap/GCThread.cpp \ + Source/JavaScriptCore/heap/GCThread.h \ Source/JavaScriptCore/heap/Heap.cpp \ Source/JavaScriptCore/heap/Heap.h \ - Source/JavaScriptCore/heap/HeapStatistics.cpp \ - Source/JavaScriptCore/heap/HeapStatistics.h \ + Source/JavaScriptCore/heap/HeapStatistics.cpp \ + Source/JavaScriptCore/heap/HeapStatistics.h \ Source/JavaScriptCore/heap/JITStubRoutineSet.cpp \ Source/JavaScriptCore/heap/JITStubRoutineSet.h \ Source/JavaScriptCore/heap/ListableHandler.h \ @@ -308,7 +345,7 @@ javascriptcore_sources += \ Source/JavaScriptCore/heap/MachineStackMarker.h \ Source/JavaScriptCore/heap/MarkStack.cpp \ Source/JavaScriptCore/heap/MarkStack.h \ - Source/JavaScriptCore/heap/MarkStackInlines.h \ + Source/JavaScriptCore/heap/MarkStackInlines.h \ Source/JavaScriptCore/heap/HeapRootVisitor.h \ Source/JavaScriptCore/heap/MarkedAllocator.cpp \ Source/JavaScriptCore/heap/MarkedAllocator.h \ @@ -319,17 +356,22 @@ javascriptcore_sources += \ Source/JavaScriptCore/heap/MarkedSpace.cpp \ Source/JavaScriptCore/heap/MarkedSpace.h \ Source/JavaScriptCore/heap/PassWeak.h \ + Source/JavaScriptCore/heap/Region.h \ Source/JavaScriptCore/heap/Strong.h \ Source/JavaScriptCore/heap/StrongInlines.h \ + Source/JavaScriptCore/heap/SuperRegion.cpp \ + Source/JavaScriptCore/heap/SuperRegion.h \ Source/JavaScriptCore/heap/UnconditionalFinalizer.h \ Source/JavaScriptCore/heap/VTableSpectrum.cpp \ Source/JavaScriptCore/heap/VTableSpectrum.h \ + Source/JavaScriptCore/heap/Weak.cpp \ Source/JavaScriptCore/heap/Weak.h \ Source/JavaScriptCore/heap/WeakBlock.cpp \ Source/JavaScriptCore/heap/WeakBlock.h \ Source/JavaScriptCore/heap/WeakHandleOwner.cpp \ Source/JavaScriptCore/heap/WeakHandleOwner.h \ Source/JavaScriptCore/heap/WeakImpl.h \ + Source/JavaScriptCore/heap/WeakInlines.h \ Source/JavaScriptCore/heap/WeakSet.cpp \ Source/JavaScriptCore/heap/WeakSet.h \ Source/JavaScriptCore/heap/WeakSetInlines.h \ @@ -396,6 +438,7 @@ javascriptcore_sources += \ Source/JavaScriptCore/jit/ClosureCallStubRoutine.h \ Source/JavaScriptCore/jit/ExecutableAllocator.cpp \ Source/JavaScriptCore/jit/ExecutableAllocator.h \ + Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp \ Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp \ Source/JavaScriptCore/jit/GCAwareJITStubRoutine.h \ Source/JavaScriptCore/jit/HostCallReturnValue.cpp \ @@ -424,13 +467,17 @@ javascriptcore_sources += \ Source/JavaScriptCore/jit/JITStubRoutine.h \ Source/JavaScriptCore/jit/JITStubs.cpp \ Source/JavaScriptCore/jit/JITStubs.h \ + Source/JavaScriptCore/jit/JITThunks.cpp \ + Source/JavaScriptCore/jit/JITThunks.h \ Source/JavaScriptCore/jit/JITWriteBarrier.h \ Source/JavaScriptCore/jit/JSInterfaceJIT.h \ Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp \ Source/JavaScriptCore/jit/JumpReplacementWatchpoint.h \ Source/JavaScriptCore/jit/SpecializedThunkJIT.h \ + Source/JavaScriptCore/jit/ThunkGenerator.h \ Source/JavaScriptCore/jit/ThunkGenerators.cpp \ Source/JavaScriptCore/jit/ThunkGenerators.h \ + Source/JavaScriptCore/jit/UnusedPointer.h \ Source/JavaScriptCore/llint/LLIntCommon.h \ Source/JavaScriptCore/llint/LLIntCLoop.cpp \ Source/JavaScriptCore/llint/LLIntCLoop.h \ @@ -449,7 +496,6 @@ javascriptcore_sources += \ Source/JavaScriptCore/llint/LowLevelInterpreter.cpp \ Source/JavaScriptCore/llint/LowLevelInterpreter.h \ Source/JavaScriptCore/os-win32/stdbool.h \ - Source/JavaScriptCore/os-win32/stdint.h \ Source/JavaScriptCore/parser/ASTBuilder.h \ Source/JavaScriptCore/parser/Lexer.cpp \ Source/JavaScriptCore/parser/Lexer.h \ @@ -459,26 +505,53 @@ javascriptcore_sources += \ Source/JavaScriptCore/parser/Nodes.h \ Source/JavaScriptCore/parser/ParserArena.cpp \ Source/JavaScriptCore/parser/ParserArena.h \ + Source/JavaScriptCore/parser/ParserError.h \ Source/JavaScriptCore/parser/ParserTokens.h \ Source/JavaScriptCore/parser/Parser.cpp \ Source/JavaScriptCore/parser/Parser.h \ Source/JavaScriptCore/parser/ParserModes.h \ Source/JavaScriptCore/parser/ResultType.h \ Source/JavaScriptCore/parser/SourceCode.h \ + Source/JavaScriptCore/parser/SourceProvider.cpp \ Source/JavaScriptCore/parser/SourceProvider.h \ Source/JavaScriptCore/parser/SourceProviderCache.cpp \ Source/JavaScriptCore/parser/SourceProviderCache.h \ Source/JavaScriptCore/parser/SourceProviderCacheItem.h \ Source/JavaScriptCore/parser/SyntaxChecker.h \ Source/JavaScriptCore/profiler/CallIdentifier.h \ + Source/JavaScriptCore/profiler/ProfilerBytecode.cpp \ + Source/JavaScriptCore/profiler/ProfilerBytecode.h \ + Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp \ + Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.h \ + Source/JavaScriptCore/profiler/ProfilerBytecodes.cpp \ + Source/JavaScriptCore/profiler/ProfilerBytecodes.h \ + Source/JavaScriptCore/profiler/ProfilerCompilation.cpp \ + Source/JavaScriptCore/profiler/ProfilerCompilation.h \ + Source/JavaScriptCore/profiler/ProfilerCompilationKind.cpp \ + Source/JavaScriptCore/profiler/ProfilerCompilationKind.h \ + Source/JavaScriptCore/profiler/ProfilerCompiledBytecode.cpp \ + Source/JavaScriptCore/profiler/ProfilerCompiledBytecode.h \ + Source/JavaScriptCore/profiler/ProfilerDatabase.cpp \ + Source/JavaScriptCore/profiler/ProfilerDatabase.h \ + Source/JavaScriptCore/profiler/ProfilerExecutionCounter.h \ + Source/JavaScriptCore/profiler/ProfilerOrigin.cpp \ + Source/JavaScriptCore/profiler/ProfilerOrigin.h \ + Source/JavaScriptCore/profiler/ProfilerOriginStack.cpp \ + Source/JavaScriptCore/profiler/ProfilerOriginStack.h \ + Source/JavaScriptCore/profiler/ProfilerOSRExit.cpp \ + Source/JavaScriptCore/profiler/ProfilerOSRExit.h \ + Source/JavaScriptCore/profiler/ProfilerOSRExitSite.cpp \ + Source/JavaScriptCore/profiler/ProfilerOSRExitSite.h \ + Source/JavaScriptCore/profiler/ProfilerProfiledBytecodes.cpp \ + Source/JavaScriptCore/profiler/ProfilerProfiledBytecodes.h \ Source/JavaScriptCore/profiler/Profile.cpp \ Source/JavaScriptCore/profiler/ProfileGenerator.cpp \ Source/JavaScriptCore/profiler/ProfileGenerator.h \ Source/JavaScriptCore/profiler/Profile.h \ Source/JavaScriptCore/profiler/ProfileNode.cpp \ Source/JavaScriptCore/profiler/ProfileNode.h \ - Source/JavaScriptCore/profiler/Profiler.cpp \ - Source/JavaScriptCore/profiler/Profiler.h \ + Source/JavaScriptCore/profiler/LegacyProfiler.cpp \ + Source/JavaScriptCore/profiler/LegacyProfiler.h \ Source/JavaScriptCore/runtime/ArgList.cpp \ Source/JavaScriptCore/runtime/ArgList.h \ Source/JavaScriptCore/runtime/Arguments.cpp \ @@ -538,6 +611,8 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/ExecutionHarness.h \ Source/JavaScriptCore/runtime/FunctionConstructor.cpp \ Source/JavaScriptCore/runtime/FunctionConstructor.h \ + Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp \ + Source/JavaScriptCore/runtime/FunctionExecutableDump.h \ Source/JavaScriptCore/runtime/FunctionPrototype.cpp \ Source/JavaScriptCore/runtime/FunctionPrototype.h \ Source/JavaScriptCore/runtime/GCActivityCallback.cpp \ @@ -564,15 +639,16 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/JSCell.cpp \ Source/JavaScriptCore/runtime/JSCell.h \ Source/JavaScriptCore/runtime/JSDateMath.cpp \ + Source/JavaScriptCore/runtime/JSCellInlines.h \ Source/JavaScriptCore/runtime/JSDateMath.h \ - Source/JavaScriptCore/runtime/JSDestructibleObject.h \ + Source/JavaScriptCore/runtime/JSDestructibleObject.h \ Source/JavaScriptCore/runtime/JSFunction.cpp \ Source/JavaScriptCore/runtime/JSFunction.h \ Source/JavaScriptCore/runtime/JSBoundFunction.cpp \ Source/JavaScriptCore/runtime/JSBoundFunction.h \ Source/JavaScriptCore/runtime/JSExportMacros.h \ - Source/JavaScriptCore/runtime/JSGlobalData.cpp \ - Source/JavaScriptCore/runtime/JSGlobalData.h \ + Source/JavaScriptCore/runtime/VM.cpp \ + Source/JavaScriptCore/runtime/VM.h \ Source/JavaScriptCore/runtime/JSGlobalObject.cpp \ Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp \ Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h \ @@ -605,9 +681,9 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/JSSymbolTableObject.h \ Source/JavaScriptCore/runtime/JSType.h \ Source/JavaScriptCore/runtime/JSTypeInfo.h \ - Source/JavaScriptCore/runtime/JSValue.cpp \ - Source/JavaScriptCore/runtime/JSValue.h \ - Source/JavaScriptCore/runtime/JSValueInlines.h \ + Source/JavaScriptCore/runtime/JSCJSValue.cpp \ + Source/JavaScriptCore/runtime/JSCJSValue.h \ + Source/JavaScriptCore/runtime/JSCJSValueInlines.h \ Source/JavaScriptCore/runtime/JSVariableObject.cpp \ Source/JavaScriptCore/runtime/JSVariableObject.h \ Source/JavaScriptCore/runtime/JSWithScope.h \ @@ -656,6 +732,9 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/PropertyOffset.h \ Source/JavaScriptCore/runtime/PropertySlot.cpp \ Source/JavaScriptCore/runtime/PropertySlot.h \ + Source/JavaScriptCore/runtime/PropertyTable.cpp \ + Source/JavaScriptCore/runtime/PrototypeMap.cpp \ + Source/JavaScriptCore/runtime/PrototypeMap.h \ Source/JavaScriptCore/runtime/PropertyStorage.h \ Source/JavaScriptCore/runtime/Protect.h \ Source/JavaScriptCore/runtime/PutDirectIndexMode.h \ @@ -696,15 +775,20 @@ javascriptcore_sources += \ Source/JavaScriptCore/runtime/StructureChain.h \ Source/JavaScriptCore/runtime/Structure.cpp \ Source/JavaScriptCore/runtime/Structure.h \ + Source/JavaScriptCore/runtime/StructureInlines.h \ + Source/JavaScriptCore/runtime/StructureRareData.cpp \ + Source/JavaScriptCore/runtime/StructureRareData.h \ + Source/JavaScriptCore/runtime/StructureRareDataInlines.h \ Source/JavaScriptCore/runtime/StructureTransitionTable.h \ Source/JavaScriptCore/runtime/SymbolTable.cpp \ Source/JavaScriptCore/runtime/SymbolTable.h \ - Source/JavaScriptCore/runtime/Terminator.h \ - Source/JavaScriptCore/runtime/TimeoutChecker.cpp \ - Source/JavaScriptCore/runtime/TimeoutChecker.h \ Source/JavaScriptCore/runtime/Tracing.h \ Source/JavaScriptCore/runtime/TypedArrayDescriptor.h \ Source/JavaScriptCore/runtime/Uint16WithFraction.h \ + Source/JavaScriptCore/runtime/VMStackBounds.h \ + Source/JavaScriptCore/runtime/Watchdog.cpp \ + Source/JavaScriptCore/runtime/Watchdog.h \ + Source/JavaScriptCore/runtime/WatchdogNone.cpp \ Source/JavaScriptCore/runtime/WeakGCMap.h \ Source/JavaScriptCore/runtime/WeakRandom.h \ Source/JavaScriptCore/runtime/WriteBarrier.h \ @@ -727,19 +811,13 @@ javascriptcore_sources += \ Source/JavaScriptCore/yarr/YarrSyntaxChecker.cpp \ Source/JavaScriptCore/yarr/YarrSyntaxChecker.h -if TARGET_WIN32 -else -javascriptcore_sources += \ - Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp -endif - llint_nosources += \ Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm \ Source/JavaScriptCore/llint/LowLevelInterpreter64.asm \ Source/JavaScriptCore/llint/LowLevelInterpreter.asm offlineasm_nosources += \ - Source/JavaScriptCore/offlineasm/armv7.rb \ + Source/JavaScriptCore/offlineasm/arm.rb \ Source/JavaScriptCore/offlineasm/asm.rb \ Source/JavaScriptCore/offlineasm/ast.rb \ Source/JavaScriptCore/offlineasm/backends.rb \ @@ -747,6 +825,7 @@ offlineasm_nosources += \ Source/JavaScriptCore/offlineasm/config.rb \ Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb \ Source/JavaScriptCore/offlineasm/instructions.rb \ + Source/JavaScriptCore/offlineasm/mips.rb \ Source/JavaScriptCore/offlineasm/offsets.rb \ Source/JavaScriptCore/offlineasm/opt.rb \ Source/JavaScriptCore/offlineasm/parser.rb \ @@ -754,6 +833,7 @@ offlineasm_nosources += \ Source/JavaScriptCore/offlineasm/risc.rb \ Source/JavaScriptCore/offlineasm/self_hash.rb \ Source/JavaScriptCore/offlineasm/settings.rb \ + Source/JavaScriptCore/offlineasm/sh4.rb \ Source/JavaScriptCore/offlineasm/transform.rb \ Source/JavaScriptCore/offlineasm/x86.rb diff --git a/Source/JavaScriptCore/Info.plist b/Source/JavaScriptCore/Info.plist index 3c0bf46cf..35b597c71 100644 --- a/Source/JavaScriptCore/Info.plist +++ b/Source/JavaScriptCore/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${PRODUCT_NAME} CFBundleGetInfoString - ${BUNDLE_VERSION}, Copyright 2003-2012 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies. + ${BUNDLE_VERSION}, Copyright 2003-2013 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies. CFBundleIdentifier com.apple.${PRODUCT_NAME} CFBundleInfoDictionaryVersion diff --git a/Source/JavaScriptCore/JSCTypedArrayStubs.h b/Source/JavaScriptCore/JSCTypedArrayStubs.h index 91481fab0..fef67305e 100644 --- a/Source/JavaScriptCore/JSCTypedArrayStubs.h +++ b/Source/JavaScriptCore/JSCTypedArrayStubs.h @@ -28,6 +28,7 @@ #include "JSDestructibleObject.h" #include "ObjectPrototype.h" +#include "Operations.h" #include #include #include @@ -47,8 +48,8 @@ public: \ typedef JSDestructibleObject Base; \ static JS##name##Array* create(JSC::Structure* structure, JSGlobalObject* globalObject, PassRefPtr impl) \ { \ - JS##name##Array* ptr = new (NotNull, JSC::allocateCell(globalObject->globalData().heap)) JS##name##Array(structure, globalObject, impl); \ - ptr->finishCreation(globalObject->globalData()); \ + JS##name##Array* ptr = new (NotNull, JSC::allocateCell(globalObject->vm().heap)) JS##name##Array(structure, globalObject, impl); \ + ptr->finishCreation(globalObject->vm()); \ return ptr; \ }\ \ @@ -59,9 +60,9 @@ public: \ static void putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool);\ static const JSC::ClassInfo s_info;\ \ - static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\ + static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\ {\ - return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);\ + return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);\ }\ \ static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);\ @@ -73,7 +74,7 @@ public: \ RefPtr m_impl;\ protected:\ JS##name##Array(JSC::Structure*, JSGlobalObject*, PassRefPtr);\ - void finishCreation(JSC::JSGlobalData&);\ + void finishCreation(JSC::VM&);\ static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; \ JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);\ void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);\ @@ -82,19 +83,19 @@ protected:\ const ClassInfo JS##name##Array::s_info = { #name "Array" , &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JS##name##Array) };\ \ JS##name##Array::JS##name##Array(Structure* structure, JSGlobalObject* globalObject, PassRefPtr impl)\ - : Base(globalObject->globalData(), structure)\ + : Base(globalObject->vm(), structure)\ , m_impl(impl)\ {\ }\ \ -void JS##name##Array::finishCreation(JSGlobalData& globalData)\ +void JS##name##Array::finishCreation(VM& vm)\ {\ - Base::finishCreation(globalData);\ + Base::finishCreation(vm);\ TypedArrayDescriptor descriptor(&JS##name##Array::s_info, OBJECT_OFFSETOF(JS##name##Array, m_storage), OBJECT_OFFSETOF(JS##name##Array, m_storageLength));\ - globalData.registerTypedArrayDescriptor(m_impl.get(), descriptor);\ + vm.registerTypedArrayDescriptor(m_impl.get(), descriptor);\ m_storage = m_impl->data();\ m_storageLength = m_impl->length();\ - putDirect(globalData, globalData.propertyNames->length, jsNumber(m_storageLength), DontDelete | ReadOnly | DontEnum); \ + putDirect(vm, vm.propertyNames->length, jsNumber(m_storageLength), DontDelete | ReadOnly | DontEnum); \ ASSERT(inherits(&s_info));\ }\ \ @@ -173,7 +174,7 @@ JSValue JS##name##Array::getByIndex(ExecState*, unsigned index)\ {\ ASSERT_GC_OBJECT_INHERITS(this, &s_info);\ type result = m_impl->item(index);\ - if (isnan((double)result))\ + if (std::isnan((double)result))\ return jsNaN();\ return JSValue(result);\ }\ @@ -183,7 +184,7 @@ static EncodedJSValue JSC_HOST_CALL constructJS##name##Array(ExecState* callFram int32_t length = callFrame->argument(0).toInt32(callFrame); \ if (length < 0) \ return JSValue::encode(jsUndefined()); \ - Structure* structure = JS##name##Array::createStructure(callFrame->globalData(), callFrame->lexicalGlobalObject(), callFrame->lexicalGlobalObject()->objectPrototype()); \ + Structure* structure = JS##name##Array::createStructure(callFrame->vm(), callFrame->lexicalGlobalObject(), callFrame->lexicalGlobalObject()->objectPrototype()); \ RefPtr buffer = name##Array::create(length); \ if (!buffer) \ return throwVMError(callFrame, createRangeError(callFrame, "ArrayBuffer size is not a small enough positive integer.")); \ diff --git a/Source/JavaScriptCore/JavaScriptCore.gir.in b/Source/JavaScriptCore/JavaScriptCore.gir.in new file mode 100644 index 000000000..6f8dcc128 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.gir.in @@ -0,0 +1,12 @@ + + + + + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp b/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp deleted file mode 100644 index 4f7a205e7..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (C) 2009, 2012 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -{ - 'includes': [ - '../../WebKit/chromium/WinPrecompile.gypi', - '../../WebKit/chromium/features.gypi', - '../JavaScriptCore.gypi', - ], - 'variables': { - # Location of the chromium src directory. - 'conditions': [ - ['inside_chromium_build==0', { - # Webkit is being built outside of the full chromium project. - 'chromium_src_dir': '../../WebKit/chromium', - },{ - # WebKit is checked out in src/chromium/third_party/WebKit - 'chromium_src_dir': '../../../../..', - }], - ], - }, - 'conditions': [ - ['os_posix == 1 and OS != "mac" and gcc_version>=46', { - 'target_defaults': { - # Disable warnings about c++0x compatibility, as some names (such as nullptr) conflict - # with upcoming c++0x types. - 'cflags_cc': ['-Wno-c++0x-compat'], - }, - }], - ], - 'targets': [ - { - 'target_name': 'yarr', - 'type': 'static_library', - 'dependencies': [ - '../../WTF/WTF.gyp/WTF.gyp:wtf', - ], - 'variables': { 'optimize': 'max' }, - 'actions': [ - { - 'action_name': 'retgen', - 'inputs': [ - '../create_regex_tables', - ], - 'arguments': [ - '--no-tables', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/RegExpJitTables.h', - ], - 'action': ['python', '<@(_inputs)', '<@(_arguments)', '<@(_outputs)'], - }, - ], - 'include_dirs': [ - '<(INTERMEDIATE_DIR)', - '..', - '../runtime', - ], - 'sources': [ - '<@(javascriptcore_yarr_files)', - ], - 'export_dependent_settings': [ - '../../WTF/WTF.gyp/WTF.gyp:wtf', - ], - }, - ], # targets -} diff --git a/Source/JavaScriptCore/JavaScriptCore.gypi b/Source/JavaScriptCore/JavaScriptCore.gypi deleted file mode 100644 index 1f1802bde..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.gypi +++ /dev/null @@ -1,14 +0,0 @@ -{ - 'variables': { - 'project_dir': ['.'], - 'javascriptcore_yarr_files': [ - 'yarr/YarrCanonicalizeUCS2.cpp', - 'yarr/YarrInterpreter.cpp', - 'yarr/YarrPattern.cpp', - 'yarr/YarrSyntaxChecker.cpp', - ], - 'javascriptcore_derived_source_files': [ - '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/RegExpJitTables.h', - ], - } -} diff --git a/Source/JavaScriptCore/JavaScriptCore.order b/Source/JavaScriptCore/JavaScriptCore.order index 6a1946684..0c2b29c87 100644 --- a/Source/JavaScriptCore/JavaScriptCore.order +++ b/Source/JavaScriptCore/JavaScriptCore.order @@ -23,7 +23,7 @@ __ZN3JSCL23initializeThreadingOnceEv __ZN3WTF10StringImpl5emptyEv __ZN3WTF13WTFThreadDataC1Ev __ZN3WTF11StackBounds10initializeEv -__ZN3JSC12JSGlobalData10storeVPtrsEv +__ZN3JSC12VM10storeVPtrsEv __ZN3JSC7JSArrayC1ENS_6JSCell20VPtrStealingHackTypeE __ZN3JSC10JSFunctionC1ENS_6JSCell20VPtrStealingHackTypeE __ZN3WTF15initializeDatesEv @@ -119,65 +119,65 @@ __ZN3WTF12AtomicString6removeEPNS_10StringImplE _JSGlobalContextCreate __ZN3JSC6JSLock4lockENS_14JSLockBehaviorE __ZN3JSCL17createJSLockCountEv -__ZN3JSC12JSGlobalData14sharedInstanceEv -__ZN3JSC12JSGlobalDataC2ENS0_14GlobalDataTypeENS_8HeapTypeE +__ZN3JSC12VM14sharedInstanceEv +__ZN3JSC12VMC2ENS0_14VMTypeENS_8HeapTypeE __ZN3JSC21createIdentifierTableEv -__ZN3JSC17CommonIdentifiersC1EPNS_12JSGlobalDataE -__ZN3JSC17CommonIdentifiersC2EPNS_12JSGlobalDataE -__ZN3JSC10Identifier3addEPNS_12JSGlobalDataEPKc +__ZN3JSC17CommonIdentifiersC1EPNS_12VME +__ZN3JSC17CommonIdentifiersC2EPNS_12VME +__ZN3JSC10Identifier3addEPNS_12VMEPKc __ZN3JSC15IdentifierTable3addIPKcNS_27IdentifierCStringTranslatorEEESt4pairIN3WTF29HashTableConstIteratorAdapterINS6_9HashTableIPNS6_10StringImplESA_NS6_17IdentityExtractorISA_EENS6_10StringHashENS6_10HashTraitsISA_EESF_EESA_EEbET_ __ZN3WTF9HashTableIPNS_10StringImplES2_NS_17IdentityExtractorIS2_EENS_10StringHashENS_10HashTraitsIS2_EES7_E6expandEv __ZN3WTF9HashTableIPKcSt4pairIS2_NS_6RefPtrINS_10StringImplEEEENS_18PairFirstExtractorIS7_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSD_IS6_EEEESE_E6expandEv __ZN3WTF9HashTableIPNS_10StringImplES2_NS_17IdentityExtractorIS2_EENS_10StringHashENS_10HashTraitsIS2_EES7_E4findIS2_NS_22IdentityHashTranslatorIS2_S2_S5_EEEENS_17HashTableIteratorIS2_S2_S4_S5_S7_S7_EERKT_ -__ZN3JSC10IdentifierC1EPNS_12JSGlobalDataEPKc +__ZN3JSC10IdentifierC1EPNS_12VMEPKc __ZN3JSC12SmallStringsC1Ev __ZN3JSC19ExecutableAllocator17intializePageSizeEv __ZNK3JSC19ExecutableAllocator7isValidEv __ZN3WTF11OSAllocator18reserveUncommittedEmNS0_5UsageEbb __ZN3JSC14ExecutablePool11systemAllocEm __ZN3WTF11OSAllocator6commitEPvmbb -__ZN3JSC5LexerC1EPNS_12JSGlobalDataE +__ZN3JSC5LexerC1EPNS_12VME __ZN3JSC11ParserArenaC1Ev __ZN3JSC11ParserArenaC2Ev __ZN3JSC14TimeoutCheckerC1Ev -__ZN3JSC4HeapC1EPNS_12JSGlobalDataE -__ZN3JSC4HeapC2EPNS_12JSGlobalDataE -__ZN3JSC11MarkedSpaceC1EPNS_12JSGlobalDataE +__ZN3JSC4HeapC1EPNS_12VME +__ZN3JSC4HeapC2EPNS_12VME +__ZN3JSC11MarkedSpaceC1EPNS_12VME __ZN3JSC25DefaultGCActivityCallbackC1EPNS_4HeapE __ZN3JSC25DefaultGCActivityCallback17commonConstructorEPNS_4HeapEP11__CFRunLoop __ZN3JSC14MachineThreadsC1EPNS_4HeapE __ZN3JSC9MarkStack18initializePagesizeEv __ZN3WTF11OSAllocator16reserveAndCommitEmNS0_5UsageEbb -__ZN3JSC10HandleHeapC1EPNS_12JSGlobalDataE +__ZN3JSC10HandleHeapC1EPNS_12VME __ZN3WTF10BlockStackIN3JSC10HandleHeap4NodeEE4growEv __ZN3WTF6VectorIPN3JSC10HandleHeap4NodeELm0EE15reserveCapacityEm __ZN3JSC11HandleStackC1Ev __ZN3WTF10BlockStackIN3JSC7JSValueEE4growEv __ZN3WTF6VectorIPN3JSC7JSValueELm0EE15reserveCapacityEm __ZN3JSC25DefaultGCActivityCallbackclEv -__ZN3JSC11RegExpCacheC1EPNS_12JSGlobalDataE -__ZN3JSC11InterpreterC1ERNS_12JSGlobalDataE +__ZN3JSC11RegExpCacheC1EPNS_12VME +__ZN3JSC11InterpreterC1ERNS_12VME __ZN3JSC10HandleHeap12writeBarrierEPNS_7JSValueERKS1_ __ZN3JSC12JSStack23addToCommittedByteCountEl __ZN3JSC11MarkedSpace21allocateFromSizeClassERNS0_9SizeClassE __ZN3JSC11MarkedSpace13allocateBlockERNS0_9SizeClassE -__ZN3JSC11MarkedBlock6createEPNS_12JSGlobalDataEm +__ZN3JSC11MarkedBlock6createEPNS_12VMEm __ZN3WTF21PageAllocationAligned8allocateEmmNS_11OSAllocator5UsageEbb __ZN3WTF9HashTableIPN3JSC11MarkedBlockES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi __ZN3JSC6JSCellD1Ev -__ZN3JSC9StructureC1ERNS_12JSGlobalDataE -__ZN3JSC6StrongINS_9StructureEE3setERNS_12JSGlobalDataEPS1_ -__ZN3JSC9Structure6createERNS_12JSGlobalDataENS_7JSValueERKNS_8TypeInfoEjPKNS_9ClassInfoE -__ZN3JSC9StructureC1ERNS_12JSGlobalDataENS_7JSValueERKNS_8TypeInfoEjPKNS_9ClassInfoE +__ZN3JSC9StructureC1ERNS_12VME +__ZN3JSC6StrongINS_9StructureEE3setERNS_12VMEPS1_ +__ZN3JSC9Structure6createERNS_12VMENS_7JSValueERKNS_8TypeInfoEjPKNS_9ClassInfoE +__ZN3JSC9StructureC1ERNS_12VMENS_7JSValueERKNS_8TypeInfoEjPKNS_9ClassInfoE __ZN3WTF13wtfThreadDataEv __ZN3JSC27startProfilerServerIfNeededEv +[ProfilerServer sharedProfileServer] -[ProfilerServer init] -__ZN3JSC9JITThunksC1EPNS_12JSGlobalDataE -__ZN3JSC9JITThunksC2EPNS_12JSGlobalDataE -__ZN3JSC3JITC1EPNS_12JSGlobalDataEPNS_9CodeBlockE -__ZN3JSC3JITC2EPNS_12JSGlobalDataEPNS_9CodeBlockE -__ZN3JSC3JIT35privateCompileCTIMachineTrampolinesEPN3WTF6RefPtrINS_14ExecutablePoolEEEPNS_12JSGlobalDataEPNS_19TrampolineStructureE +__ZN3JSC9JITThunksC1EPNS_12VME +__ZN3JSC9JITThunksC2EPNS_12VME +__ZN3JSC3JITC1EPNS_12VMEPNS_9CodeBlockE +__ZN3JSC3JITC2EPNS_12VMEPNS_9CodeBlockE +__ZN3JSC3JIT35privateCompileCTIMachineTrampolinesEPN3WTF6RefPtrINS_14ExecutablePoolEEEPNS_12VMEPNS_19TrampolineStructureE __ZN3JSC20MacroAssemblerX86_6413branchTestPtrENS_23MacroAssemblerX86Common15ResultConditionENS_12X86Registers10RegisterIDES4_ __ZN3JSC12X86Assembler23X86InstructionFormatter11oneByteOp64ENS0_15OneByteOpcodeIDEiNS_12X86Registers10RegisterIDE __ZN3JSC12X86Assembler3jCCENS0_9ConditionE @@ -192,7 +192,7 @@ __ZN3JSC20MacroAssemblerX86_6413branchTestPtrENS_23MacroAssemblerX86Common15Resu __ZN3JSC12X86Assembler23X86InstructionFormatter9oneByteOpENS0_15OneByteOpcodeIDENS_12X86Registers10RegisterIDE __ZN3WTF6VectorIcLm128EE14expandCapacityEm __ZN3WTF6VectorIcLm128EE4growEm -__ZN3JSC3JIT27privateCompileCTINativeCallEPNS_12JSGlobalDataEb +__ZN3JSC3JIT27privateCompileCTINativeCallEPNS_12VMEb __ZNK3JSC22AbstractMacroAssemblerINS_12X86AssemblerEE4Jump4linkEPS2_ __ZN3WTF10RefCountedIN3JSC14ExecutablePoolEE5derefEv __ZN3JSC14MachineThreads29makeUsableFromMultipleThreadsEv @@ -200,7 +200,7 @@ _JSGlobalContextCreateInGroup __ZN3JSC4Heap16activityCallbackEv __ZN3JSC25DefaultGCActivityCallback11synchronizeEv __ZN3JSC14TimeoutChecker5resetEv -__ZN3JSC14JSGlobalObjectnwEmPNS_12JSGlobalDataE +__ZN3JSC14JSGlobalObjectnwEmPNS_12VME __ZN3WTF12randomNumberEv __ZN3WTF29cryptographicallyRandomNumberEv __ZN3WTF35cryptographicallyRandomValuesFromOSEPhm @@ -208,53 +208,52 @@ __ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE __ZN3JSC14JSGlobalObject5resetENS_7JSValueE __ZN3JSC17FunctionPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC17FunctionPrototypeC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE -__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEPNS_14JSGlobalObjectEPNS_9StructureERKNS_10IdentifierE +__ZN3JSC16InternalFunctionC2EPNS_12VMEPNS_14JSGlobalObjectEPNS_9StructureERKNS_10IdentifierE __ZN3JSC24JSObjectWithGlobalObjectC2EPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC7UStringC1EPKc -__ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE +__ZN3JSC12SmallStrings17createEmptyStringEPNS_12VME __ZN3JSC9Structure40addPropertyTransitionToExistingStructureEPS0_RKNS_10IdentifierEjPNS_6JSCellERm -__ZN3JSC9Structure3getERNS_12JSGlobalDataEPN3WTF10StringImplERjRPNS_6JSCellE -__ZN3JSC9Structure21addPropertyTransitionERNS_12JSGlobalDataEPS0_RKNS_10IdentifierEjPNS_6JSCellERm +__ZN3JSC9Structure3getERNS_12VMEPN3WTF10StringImplERjRPNS_6JSCellE +__ZN3JSC9Structure21addPropertyTransitionERNS_12VMEPS0_RKNS_10IdentifierEjPNS_6JSCellERm __ZN3JSC9Structure17createPropertyMapEj __ZN3WTF14deleteOwnedPtrIN3JSC13PropertyTableEEEvPT_ -__ZN3JSC9Structure16putSpecificValueERNS_12JSGlobalDataERKNS_10IdentifierEjPNS_6JSCellE -__ZN3JSC24StructureTransitionTable3addERNS_12JSGlobalDataEPNS_9StructureE -__ZN3JSC9Structure28addPropertyWithoutTransitionERNS_12JSGlobalDataERKNS_10IdentifierEjPNS_6JSCellE +__ZN3JSC9Structure16putSpecificValueERNS_12VMERKNS_10IdentifierEjPNS_6JSCellE +__ZN3JSC24StructureTransitionTable3addERNS_12VMEPNS_9StructureE +__ZN3JSC9Structure28addPropertyWithoutTransitionERNS_12VMERKNS_10IdentifierEjPNS_6JSCellE __ZN3JSC8JSObject23allocatePropertyStorageEmm __ZN3JSC17FunctionPrototype21addFunctionPropertiesEPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEPPNS_10JSFunctionES9_ __ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEiRKNS_10IdentifierEPFPvS2_E __ZN3JSC10JSFunctionC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEiRKNS_10IdentifierEPFPvS2_E -__ZN3JSC12JSGlobalData15getHostFunctionEPFPvPNS_9ExecStateEE -__ZN3JSC9JITThunks16hostFunctionStubEPNS_12JSGlobalDataEPFPvPNS_9ExecStateEE +__ZN3JSC12VM15getHostFunctionEPFPvPNS_9ExecStateEE +__ZN3JSC9JITThunks16hostFunctionStubEPNS_12VMEPFPvPNS_9ExecStateEE __ZN3WTF7HashMapIPFPvPN3JSC9ExecStateEENS2_4WeakINS2_16NativeExecutableEEENS_7PtrHashIS6_EENS_10HashTraitsIS6_EENSC_IS9_EEE3addERKS6_RKS9_ __ZN3WTF9HashTableIPFPvPN3JSC9ExecStateEESt4pairIS6_NS2_4WeakINS2_16NativeExecutableEEEENS_18PairFirstExtractorISB_EENS_7PtrHashIS6_EENS_14PairHashTraitsINS_10HashTraitsIS6_EENSH_ISA_EEEESI_E6expandEv -__ZN3JSC3JIT27privateCompileCTINativeCallEN3WTF10PassRefPtrINS_14ExecutablePoolEEEPNS_12JSGlobalDataEPFPvPNS_9ExecStateEE -__ZN3JSC16NativeExecutable6createERNS_12JSGlobalDataENS_21MacroAssemblerCodePtrEPFPvPNS_9ExecStateEES3_S8_ +__ZN3JSC3JIT27privateCompileCTINativeCallEN3WTF10PassRefPtrINS_14ExecutablePoolEEEPNS_12VMEPFPvPNS_9ExecStateEE +__ZN3JSC16NativeExecutable6createERNS_12VMENS_21MacroAssemblerCodePtrEPFPvPNS_9ExecStateEES3_S8_ __ZN3JSC8JSObject34putDirectFunctionWithoutTransitionEPNS_9ExecStateEPNS_10JSFunctionEj __ZN3JSC10JSFunction4nameEPNS_9ExecStateE __ZN3JSC15ObjectPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE -__ZN3JSC8JSObject17createInheritorIDERNS_12JSGlobalDataE __ZN3JSC14ArrayPrototypeC1EPNS_14JSGlobalObjectEPNS_9StructureE -__ZN3JSC7JSArrayC2ERNS_12JSGlobalDataEPNS_9StructureE +__ZN3JSC7JSArrayC2ERNS_12VMEPNS_9StructureE __ZN3JSC15StringPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC15StringPrototypeC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC12StringObjectC2EPNS_9ExecStateEPNS_9StructureE __ZN3JSC16BooleanPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE -__ZN3JSC13BooleanObjectC2ERNS_12JSGlobalDataEPNS_9StructureE +__ZN3JSC13BooleanObjectC2ERNS_12VMEPNS_9StructureE __ZN3JSC15NumberPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE -__ZN3JSC12NumberObjectC2ERNS_12JSGlobalDataEPNS_9StructureE +__ZN3JSC12NumberObjectC2ERNS_12VMEPNS_9StructureE __ZN3JSC13DatePrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC12DateInstanceC2EPNS_9ExecStateEPNS_9StructureE __ZN3JSC12nonInlineNaNEv __ZN3JSC15RegExpPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC15RegExpPrototypeC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE -__ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE -__ZN3JSC6RegExp7compileEPNS_12JSGlobalDataE +__ZN3JSC6RegExp6createEPNS_12VMERKNS_7UStringENS_11RegExpFlagsE +__ZN3JSC6RegExp7compileEPNS_12VME __ZN3JSC4Yarr11YarrPatternC1ERKNS_7UStringEbbPPKc __ZN3JSC4Yarr11YarrPattern7compileERKNS_7UStringE __ZN3WTF6VectorIPN3JSC4Yarr18PatternAlternativeELm0EE14expandCapacityEm __ZN3JSC4Yarr6ParserINS0_22YarrPatternConstructorEE5parseEv -__ZN3JSC4Yarr10jitCompileERNS0_11YarrPatternEPNS_12JSGlobalDataERNS0_13YarrCodeBlockE +__ZN3JSC4Yarr10jitCompileERNS0_11YarrPatternEPNS_12VMERNS0_13YarrCodeBlockE __ZN3JSC4Yarr13YarrGenerator13opCompileBodyEPNS0_18PatternDisjunctionE __ZN3WTF6VectorIN3JSC22AbstractMacroAssemblerINS1_12X86AssemblerEE4JumpELm16EED1Ev __ZN3JSC4Yarr13YarrGenerator20opCompileAlternativeEPNS0_18PatternAlternativeE @@ -270,7 +269,7 @@ __ZN3WTF15deleteAllValuesIPN3JSC4Yarr18PatternDisjunctionELm4EEEvRKNS_6VectorIT_ __ZN3WTF15deleteAllValuesIPN3JSC4Yarr14CharacterClassELm0EEEvRKNS_6VectorIT_XT0_EEE __ZN3JSC14ErrorPrototypeC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC14ErrorPrototypeC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureE -__ZN3JSC13ErrorInstanceC2EPNS_12JSGlobalDataEPNS_9StructureE +__ZN3JSC13ErrorInstanceC2EPNS_12VMEPNS_9StructureE __ZN3JSC17ObjectConstructorC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEPNS_15ObjectPrototypeE __ZN3JSC17ObjectConstructorC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEPNS_15ObjectPrototypeE __ZN3JSC10Identifier3addEPNS_9ExecStateEPKc @@ -304,8 +303,8 @@ __ZN3JSC19SmallStringsStorageC2Ev __ZN3JSC10JSONObjectC1EPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi __ZN3WTF7HashMapINS_6RefPtrINS_10StringImplEEEN3JSC16SymbolTableEntryENS4_17IdentifierRepHashENS_10HashTraitsIS3_EENS4_26SymbolTableIndexHashTraitsEE3addEPS2_RKS5_ -__ZN3JSC9Structure25changePrototypeTransitionERNS_12JSGlobalDataEPS0_NS_7JSValueE -__ZN3JSC9Structure17copyPropertyTableERNS_12JSGlobalDataEPS0_ +__ZN3JSC9Structure25changePrototypeTransitionERNS_12VMEPS0_NS_7JSValueE +__ZN3JSC9Structure17copyPropertyTableERNS_12VMEPS0_ __ZN3JSC14JSGlobalObject10globalExecEv _JSGlobalContextRetain __ZN3JSC14MachineThreads16addCurrentThreadEv @@ -318,7 +317,7 @@ __ZNK14OpaqueJSString7ustringEv __ZN3JSC7UStringC1EPKtj __ZN3JSC13LiteralParser5Lexer3lexERNS1_18LiteralParserTokenE __ZN3JSC13LiteralParser5parseENS0_11ParserStateE -__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE +__ZN3JSC7JSArrayC1ERNS_12VMEPNS_9StructureE __ZN3WTF13StringBuilder6appendEPKtj __ZN3WTF13StringBuilder19appendUninitializedEj __ZN3WTF13StringBuilder14allocateBufferEPKtj @@ -341,8 +340,8 @@ _JSContextGetGlobalObject __ZNK3JSC8JSObject12toThisObjectEPNS_9ExecStateE _JSStringCreateWithUTF8CString _JSObjectGetProperty -__ZNK14OpaqueJSString10identifierEPN3JSC12JSGlobalDataE -__ZN3JSC10Identifier3addEPNS_12JSGlobalDataEPKti +__ZNK14OpaqueJSString10identifierEPN3JSC12VME +__ZN3JSC10Identifier3addEPNS_12VMEPKti __ZN3JSC14JSGlobalObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE _JSValueIsInstanceOfConstructor __ZN3JSC16ArrayConstructor18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE @@ -361,10 +360,10 @@ __ZN3JSC4Heap9unprotectENS_7JSValueE __ZN3WTF9HashTableIPN3JSC6JSCellESt4pairIS3_jENS_18PairFirstExtractorIS5_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSB_IjEEEESC_E4findIS3_NS_22IdentityHashTranslatorIS3_S5_S9_EEEENS_17HashTableIteratorIS3_S5_S7_S9_SE_SC_EERKT_ __ZN3WTF9HashTableIPN3JSC6JSCellESt4pairIS3_jENS_18PairFirstExtractorIS5_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSB_IjEEEESC_E6rehashEi __ZN3JSC10HandleHeap4growEv -__ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh +__ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12VMEh __ZN3JSC37DefaultGCActivityCallbackPlatformData7triggerEP16__CFRunLoopTimerPv __ZN3JSC4Heap17collectAllGarbageEv -__ZN3JSC12JSGlobalData23recompileAllJSFunctionsEv +__ZN3JSC12VM23recompileAllJSFunctionsEv __ZN3JSC4Heap5resetENS0_11SweepToggleE __ZN3JSC4Heap9markRootsEv __ZN3JSC14MachineThreads23gatherConservativeRootsERNS_17ConservativeRootsEPv @@ -440,20 +439,20 @@ __ZN3WTF6strtodEPKcPPc __ZN3WTF10StringImpl22containsOnlyWhitespaceEv __ZN3WTF10StringImpl11reverseFindEPS0_j __ZN3WTF17equalIgnoringCaseEPNS_10StringImplES1_ -__ZN3JSC12JSGlobalData12createLeakedENS_8HeapTypeE -__ZN3JSC24JSObjectWithGlobalObjectC2ERNS_12JSGlobalDataEPNS_14JSGlobalObjectEPNS_9StructureE +__ZN3JSC12VM12createLeakedENS_8HeapTypeE +__ZN3JSC24JSObjectWithGlobalObjectC2ERNS_12VMEPNS_14JSGlobalObjectEPNS_9StructureE __ZN3JSC8evaluateEPNS_9ExecStateEPNS_14ScopeChainNodeERKNS_10SourceCodeENS_7JSValueE __ZN3JSC17ProgramExecutableC1EPNS_9ExecStateERKNS_10SourceCodeE __ZN3JSC11Interpreter7executeEPNS_17ProgramExecutableEPNS_9ExecStateEPNS_14ScopeChainNodeEPNS_8JSObjectE -__ZN3JSC24DynamicGlobalObjectScopeC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectE +__ZN3JSC24DynamicGlobalObjectScopeC1ERNS_12VMEPNS_14JSGlobalObjectE __ZN3JSC19ExecutableAllocator19underMemoryPressureEv -__ZN3JSC12JSGlobalData14resetDateCacheEv +__ZN3JSC12VM14resetDateCacheEv __ZN3JSC17ProgramExecutable15compileInternalEPNS_9ExecStateEPNS_14ScopeChainNodeE __ZN3JSC6Parser5parseINS_11ProgramNodeEEEN3WTF10PassRefPtrIT_EEPNS_14JSGlobalObjectEPNS_8DebuggerEPNS_9ExecStateERKNS_10SourceCodeEPNS_18FunctionParametersENS_18JSParserStrictnessEPPNS_8JSObjectE -__ZN3JSC6Parser5parseEPNS_12JSGlobalDataEPNS_18FunctionParametersENS_18JSParserStrictnessENS_12JSParserModeEPiPNS_7UStringE +__ZN3JSC6Parser5parseEPNS_12VMEPNS_18FunctionParametersENS_18JSParserStrictnessENS_12JSParserModeEPiPNS_7UStringE __ZN3JSC5Lexer7setCodeERKNS_10SourceCodeERNS_11ParserArenaE -__ZN3JSC7jsParseEPNS_12JSGlobalDataEPNS_18FunctionParametersENS_18JSParserStrictnessENS_12JSParserModeEPKNS_10SourceCodeE -__ZN3JSC8JSParserC2EPNS_5LexerEPNS_12JSGlobalDataEPNS_18FunctionParametersEbbPNS_14SourceProviderE +__ZN3JSC7jsParseEPNS_12VMEPNS_18FunctionParametersENS_18JSParserStrictnessENS_12JSParserModeEPKNS_10SourceCodeE +__ZN3JSC8JSParserC2EPNS_5LexerEPNS_12VMEPNS_18FunctionParametersEbbPNS_14SourceProviderE __ZN3JSC8JSParser9pushScopeEv __ZN3JSC8JSParser4nextENS_5Lexer7LexTypeE __ZN3JSC5Lexer3lexEPNS_11JSTokenDataEPNS_11JSTokenInfoENS0_7LexTypeEb @@ -465,11 +464,10 @@ __ZN3JSC8JSParser14parseStatementINS_10ASTBuilderEEENT_9StatementERS3_RPKNS_10Id __ZN3JSC6Parser16didFinishParsingEPNS_14SourceElementsEPNS_15ParserArenaDataIN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEEEPNS3_INS5_IPNS_16FunctionBodyNodeELm0EEEEEjiiRNS4_7HashSetINS4_6RefPtrINS4_10StringImplEEENS_17IdentifierRepHashENS4_10HashTraitsISM_EEEE __ZN3JSC11ParserArenaD1Ev __ZN3JSC5Lexer5clearEv -__ZN3JSC11ProgramNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPNS_16FunctionBodyNodeELm0EEERNS5_7HashSetINS5_6RefPtrINS5_10StringImplEEENS_17IdentifierRepHashENS5_10HashTraitsISL_EEEERKNS_10SourceCodeEji -__ZN3JSC9ScopeNodeC2EPNS_12JSGlobalDataERKNS_10SourceCodeEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS9_IPNS_16FunctionBodyNodeELm0EEERNS8_7HashSetINS8_6RefPtrINS8_10StringImplEEENS_17IdentifierRepHashENS8_10HashTraitsISO_EEEEji +__ZN3JSC11ProgramNode6createEPNS_12VMEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPNS_16FunctionBodyNodeELm0EEERNS5_7HashSetINS5_6RefPtrINS5_10StringImplEEENS_17IdentifierRepHashENS5_10HashTraitsISL_EEEERKNS_10SourceCodeEji +__ZN3JSC9ScopeNodeC2EPNS_12VMERKNS_10SourceCodeEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS9_IPNS_16FunctionBodyNodeELm0EEERNS8_7HashSetINS8_6RefPtrINS8_10StringImplEEENS_17IdentifierRepHashENS8_10HashTraitsISO_EEEEji __ZN3JSC11ParserArena14derefWithArenaEN3WTF10PassRefPtrINS_21ParserArenaRefCountedEEE __ZN3JSC11ParserArena10removeLastEv -__ZN3JSC13StatementNode6setLocEii __ZN3JSC11ParserArena5resetEv __ZN3WTF6VectorIN3JSC10IdentifierELm64EE14shrinkCapacityEm __ZN3JSC9CodeBlockC2EPNS_16ScriptExecutableENS_8CodeTypeEPNS_14JSGlobalObjectEN3WTF10PassRefPtrINS_14SourceProviderEEEjPNS6_7HashMapINS6_6RefPtrINS6_10StringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS6_10HashTraitsISD_EENS_26SymbolTableIndexHashTraitsEEEb @@ -516,7 +514,7 @@ __ZN3JSC14JSGlobalObject13copyGlobalsToERNS_12JSStackE __ZN3JSC12JSStack15setGlobalObjectEPNS_14JSGlobalObjectE _ctiTrampoline __ZN3WTF15SegmentedVectorIN3JSC10IdentifierELm64EE6appendIS2_EEvRKT_ -__ZNK3JSC9HashTable11createTableEPNS_12JSGlobalDataE +__ZNK3JSC9HashTable11createTableEPNS_12VME __ZN3JSC8JSParser31parseExpressionOrLabelStatementINS_10ASTBuilderEEENT_9StatementERS3_ __ZN3JSC5Lexer16nextTokenIsColonEv __ZN3JSC8JSParser15parseExpressionINS_10ASTBuilderEEENT_10ExpressionERS3_ @@ -562,9 +560,9 @@ __ZN3JSC28createUndefinedVariableErrorEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC11makeUStringIPKcNS_7UStringEEES3_T_T0_ __ZN3WTF13tryMakeStringIPKcN3JSC7UStringEEENS_10PassRefPtrINS_10StringImplEEET_T0_ __ZN3JSC20createReferenceErrorEPNS_9ExecStateERKNS_7UStringE -__ZN3JSC13ErrorInstance6createEPNS_12JSGlobalDataEPNS_9StructureERKNS_7UStringE -__ZN3JSC13ErrorInstanceC2EPNS_12JSGlobalDataEPNS_9StructureERKNS_7UStringE -__ZN3JSCL23returnToThrowTrampolineEPNS_12JSGlobalDataENS_16ReturnAddressPtrERS2_ +__ZN3JSC13ErrorInstance6createEPNS_12VMEPNS_9StructureERKNS_7UStringE +__ZN3JSC13ErrorInstanceC2EPNS_12VMEPNS_9StructureERKNS_7UStringE +__ZN3JSCL23returnToThrowTrampolineEPNS_12VMENS_16ReturnAddressPtrERS2_ _ctiVMThrowTrampoline _cti_vm_throw __ZN3JSC11Interpreter14throwExceptionERPNS_9ExecStateERNS_7JSValueEj @@ -613,14 +611,14 @@ __ZN3JSC9ArrayNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator12emitNewArrayEPNS_10RegisterIDEPNS_11ElementNodeE __ZN3JSC3JIT17emit_op_new_arrayEPNS_11InstructionE _cti_op_new_array -__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureERKNS_7ArgListE +__ZN3JSC7JSArrayC1ERNS_12VMEPNS_9StructureERKNS_7ArgListE __ZN3JSC8JSParser17parseFunctionInfoILNS0_20FunctionRequirementsE0ELb0ENS_10ASTBuilderEEEbRT1_RPKNS_10IdentifierERNS4_19FormalParameterListERNS4_12FunctionBodyERiSE_SE_ __ZN3JSC8JSParser19parseSourceElementsILNS0_18SourceElementsModeE0ENS_13SyntaxCheckerEEENT0_14SourceElementsERS4_ __ZN3JSC8JSParser14parseStatementINS_13SyntaxCheckerEEENT_9StatementERS3_RPKNS_10IdentifierE __ZN3JSC8JSParser15parseExpressionINS_13SyntaxCheckerEEENT_10ExpressionERS3_ __ZN3JSC8JSParser25parseAssignmentExpressionINS_13SyntaxCheckerEEENT_10ExpressionERS3_ __ZN3JSC8JSParser21parseMemberExpressionINS_13SyntaxCheckerEEENT_10ExpressionERS3_ -__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataEb +__ZN3JSC16FunctionBodyNode6createEPNS_12VMEb __ZN3JSC8JSParser5ScopeD1Ev __ZN3JSC5Lexer10sourceCodeEiii __ZN3JSC16FunctionBodyNode13finishParsingERKNS_10SourceCodeEPNS_13ParameterNodeERKNS_10IdentifierE @@ -630,7 +628,7 @@ __ZNK3JSC14ExpressionNode10isLocationEv __ZN3JSC21FunctionCallValueNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC12FuncExprNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator25emitNewFunctionExpressionEPNS_10RegisterIDEPNS_12FuncExprNodeE -__ZN3JSC18FunctionExecutableC1EPNS_12JSGlobalDataERKNS_10IdentifierERKNS_10SourceCodeEbPNS_18FunctionParametersEbii +__ZN3JSC18FunctionExecutableC1EPNS_12VMERKNS_10IdentifierERKNS_10SourceCodeEbPNS_18FunctionParametersEbii __ZN3WTF6VectorIN3JSC12WriteBarrierINS1_18FunctionExecutableEEELm0EE14expandCapacityEm __ZN3JSC17BytecodeGenerator8emitCallEPNS_10RegisterIDES2_RNS_13CallArgumentsEjjj __ZN3JSC17BytecodeGenerator8emitCallENS_8OpcodeIDEPNS_10RegisterIDES3_RNS_13CallArgumentsEjjj @@ -647,7 +645,7 @@ __ZN3JSC18FunctionExecutable22compileForCallInternalEPNS_9ExecStateEPNS_14ScopeC __ZN3JSC6Parser5parseINS_16FunctionBodyNodeEEEN3WTF10PassRefPtrIT_EEPNS_14JSGlobalObjectEPNS_8DebuggerEPNS_9ExecStateERKNS_10SourceCodeEPNS_18FunctionParametersENS_18JSParserStrictnessEPPNS_8JSObjectE __ZN3JSC8JSParser19parseSourceElementsILNS0_18SourceElementsModeE1ENS_10ASTBuilderEEENT0_14SourceElementsERS4_ __ZN3JSC8JSParser19parseThrowStatementINS_10ASTBuilderEEENT_9StatementERS3_ -__ZN3JSC16FunctionBodyNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPS0_Lm0EEERNS5_7HashSetINS5_6RefPtrINS5_10StringImplEEENS_17IdentifierRepHashENS5_10HashTraitsISK_EEEERKNS_10SourceCodeEji +__ZN3JSC16FunctionBodyNode6createEPNS_12VMEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPS0_Lm0EEERNS5_7HashSetINS5_6RefPtrINS5_10StringImplEEENS_17IdentifierRepHashENS5_10HashTraitsISK_EEEERKNS_10SourceCodeEji __ZN3JSC17BytecodeGeneratorC1EPNS_16FunctionBodyNodeEPNS_14ScopeChainNodeEPN3WTF7HashMapINS5_6RefPtrINS5_10StringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS5_10HashTraitsIS9_EENS_26SymbolTableIndexHashTraitsEEEPNS_9CodeBlockE __ZN3JSC17BytecodeGeneratorC2EPNS_16FunctionBodyNodeEPNS_14ScopeChainNodeEPN3WTF7HashMapINS5_6RefPtrINS5_10StringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS5_10HashTraitsIS9_EENS_26SymbolTableIndexHashTraitsEEEPNS_9CodeBlockE __ZN3WTF15SegmentedVectorIN3JSC10RegisterIDELm32EEC1Ev @@ -663,7 +661,7 @@ __ZN3JSC11JITStubCall11addArgumentEjNS_12X86Registers10RegisterIDE __ZN3JSC3JIT11emit_op_retEPNS_11InstructionE _cti_op_throw __ZNK3JSC8JSString8toObjectEPNS_9ExecStateEPNS_14JSGlobalObjectE -__ZN3JSC12StringObjectC1ERNS_12JSGlobalDataEPNS_9StructureEPNS_8JSStringE +__ZN3JSC12StringObjectC1ERNS_12VMEPNS_9StructureEPNS_8JSStringE __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC15StringPrototype18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC17BytecodeGenerator8emitMoveEPNS_10RegisterIDES2_ @@ -705,7 +703,7 @@ __ZN3JSC16JSCallbackObjectINS_24JSObjectWithGlobalObjectEE4initEPNS_9ExecStateE __ZN13OpaqueJSClass9prototypeEPN3JSC9ExecStateE __ZN13OpaqueJSClass11contextDataEPN3JSC9ExecStateE __ZN3WTF9HashTableIP13OpaqueJSClassSt4pairIS2_P24OpaqueJSClassContextDataENS_18PairFirstExtractorIS6_EENS_7PtrHashIS2_EENS_14PairHashTraitsINS_10HashTraitsIS2_EENSC_IS5_EEEESD_E6expandEv -__ZN24OpaqueJSClassContextDataC2ERN3JSC12JSGlobalDataEP13OpaqueJSClass +__ZN24OpaqueJSClassContextDataC2ERN3JSC12VMEP13OpaqueJSClass _JSClassRelease _JSObjectSetProperty __ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE @@ -719,7 +717,6 @@ __ZNK3JSC14ExpressionNode13isResolveNodeEv __ZNK3JSC14ExpressionNode21isBracketAccessorNodeEv __ZN3JSC9CodeBlock25createRareDataIfNecessaryEv __ZN3WTF6VectorIN3JSC8LineInfoELm0EE14expandCapacityEm -__ZN3JSC6IfNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator8newLabelEv __ZNK3JSC14ExpressionNode26hasConditionContextCodegenEv __ZN3WTF6VectorIN3JSC19ExpressionRangeInfoELm0EE14expandCapacityEm @@ -776,7 +773,7 @@ __ZN3WTF6VectorINS_6RefPtrINS_10StringImplEEELm0EE14expandCapacityEm __ZN3JSC19SourceProviderCache3addEiN3WTF10PassOwnPtrINS_23SourceProviderCacheItemEEEj __ZN3WTF9HashTableIiSt4pairIiPN3JSC23SourceProviderCacheItemEENS_18PairFirstExtractorIS5_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIiEENSB_IS4_EEEESC_E6expandEv __ZN3WTF6VectorIPN3JSC16FunctionBodyNodeELm0EE15reserveCapacityEm -__ZN3JSC8JSObject12removeDirectERNS_12JSGlobalDataERKNS_10IdentifierE +__ZN3JSC8JSObject12removeDirectERNS_12VMERKNS_10IdentifierE __ZN3WTF9HashTableINS_6RefPtrINS_10StringImplEEESt4pairIS3_N3JSC16SymbolTableEntryEENS_18PairFirstExtractorIS7_EENS5_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS3_EENS5_26SymbolTableIndexHashTraitsEEESD_E13isEmptyBucketERKS7_ __ZN3WTF9HashTableINS_6RefPtrINS_10StringImplEEESt4pairIS3_N3JSC16SymbolTableEntryEENS_18PairFirstExtractorIS7_EENS5_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS3_EENS5_26SymbolTableIndexHashTraitsEEESD_E6expandEv __ZN3WTF9HashTableINS_6RefPtrINS_10StringImplEEESt4pairIS3_N3JSC16SymbolTableEntryEENS_18PairFirstExtractorIS7_EENS5_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS3_EENS5_26SymbolTableIndexHashTraitsEEESD_E6rehashEi @@ -794,7 +791,7 @@ __ZNK3JSC21UStringSourceProvider4dataEv __ZN3JSC8JSParser16declareParameterEPKNS_10IdentifierE __ZN3WTF6VectorIN3JSC10IdentifierELm0EE14expandCapacityEm __ZN3JSC10JSFunction18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC9Structure22materializePropertyMapERNS_12JSGlobalDataE +__ZN3JSC9Structure22materializePropertyMapERNS_12VME __ZNK3JSC11ResolveNode10isLocationEv __ZNK3JSC11ResolveNode13isResolveNodeEv __ZN3JSC17BytecodeGenerator12addParameterERKNS_10IdentifierEi @@ -892,15 +889,15 @@ __ZN3JSC3JIT11emit_op_jmpEPNS_11InstructionE __ZN3JSC3JIT18emit_op_get_by_valEPNS_11InstructionE __ZN3JSC20MacroAssemblerX86_649branchPtrENS_23MacroAssemblerX86Common19RelationalConditionENS_22AbstractMacroAssemblerINS_12X86AssemblerEE7AddressENS5_13TrustedImmPtrE __ZN3JSC12X86Assembler23X86InstructionFormatter11oneByteOp64ENS0_15OneByteOpcodeIDEiNS_12X86Registers10RegisterIDES4_ii -__ZN3JSC3JIT15emit_op_pre_incEPNS_11InstructionE +__ZN3JSC3JIT15emit_op_incEPNS_11InstructionE __ZN3JSC3JIT16emitTimeoutCheckEv __ZN3JSC3JIT13emit_op_jlessEPNS_11InstructionE __ZN3JSC3JIT22emitSlow_op_get_by_valEPNS_11InstructionERPNS_13SlowCaseEntryE -__ZN3JSC9JITThunks7ctiStubEPNS_12JSGlobalDataEPFNS_21MacroAssemblerCodePtrES2_PNS_14ExecutablePoolEE -__ZN3WTF9HashTableIPFN3JSC21MacroAssemblerCodePtrEPNS1_12JSGlobalDataEPNS1_14ExecutablePoolEESt4pairIS8_S2_ENS_18PairFirstExtractorISA_EENS_7PtrHashIS8_EENS_14PairHashTraitsINS_10HashTraitsIS8_EENSG_IS2_EEEESH_E6expandEv -__ZN3JSC3JIT27stringGetByValStubGeneratorEPNS_12JSGlobalDataEPNS_14ExecutablePoolE +__ZN3JSC9JITThunks7ctiStubEPNS_12VMEPFNS_21MacroAssemblerCodePtrES2_PNS_14ExecutablePoolEE +__ZN3WTF9HashTableIPFN3JSC21MacroAssemblerCodePtrEPNS1_12VMEPNS1_14ExecutablePoolEESt4pairIS8_S2_ENS_18PairFirstExtractorISA_EENS_7PtrHashIS8_EENS_14PairHashTraitsINS_10HashTraitsIS8_EENSG_IS2_EEEESH_E6expandEv +__ZN3JSC3JIT27stringGetByValStubGeneratorEPNS_12VMEPNS_14ExecutablePoolE __ZN3JSC21roundUpAllocationSizeEmm -__ZN3JSC3JIT19emitSlow_op_pre_incEPNS_11InstructionERPNS_13SlowCaseEntryE +__ZN3JSC3JIT19emitSlow_op_incEPNS_11InstructionERPNS_13SlowCaseEntryE __ZN3JSC3JIT17emitSlow_op_jlessEPNS_11InstructionERPNS_13SlowCaseEntryE __ZN3JSC12X86Assembler7movq_rrENS_12X86Registers10RegisterIDENS1_13XMMRegisterIDE __ZN3JSC23MacroAssemblerX86Common12branchDoubleENS0_15DoubleConditionENS_12X86Registers13XMMRegisterIDES3_ @@ -983,7 +980,7 @@ __ZN3JSC11Interpreter8callEvalEPNS_9ExecStateEPNS_12JSStackEPNS_8RegisterEii __ZN3JSC14EvalExecutableC1EPNS_9ExecStateERKNS_10SourceCodeEb __ZN3JSC14EvalExecutable15compileInternalEPNS_9ExecStateEPNS_14ScopeChainNodeE __ZN3JSC6Parser5parseINS_8EvalNodeEEEN3WTF10PassRefPtrIT_EEPNS_14JSGlobalObjectEPNS_8DebuggerEPNS_9ExecStateERKNS_10SourceCodeEPNS_18FunctionParametersENS_18JSParserStrictnessEPPNS_8JSObjectE -__ZN3JSC8EvalNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPNS_16FunctionBodyNodeELm0EEERNS5_7HashSetINS5_6RefPtrINS5_10StringImplEEENS_17IdentifierRepHashENS5_10HashTraitsISL_EEEERKNS_10SourceCodeEji +__ZN3JSC8EvalNode6createEPNS_12VMEPNS_14SourceElementsEPN3WTF6VectorISt4pairIPKNS_10IdentifierEjELm0EEEPNS6_IPNS_16FunctionBodyNodeELm0EEERNS5_7HashSetINS5_6RefPtrINS5_10StringImplEEENS_17IdentifierRepHashENS5_10HashTraitsISL_EEEERKNS_10SourceCodeEji __ZN3JSC14ScopeChainNode10localDepthEv __ZN3JSC17BytecodeGeneratorC1EPNS_8EvalNodeEPNS_14ScopeChainNodeEPN3WTF7HashMapINS5_6RefPtrINS5_10StringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS5_10HashTraitsIS9_EENS_26SymbolTableIndexHashTraitsEEEPNS_13EvalCodeBlockE __ZN3JSC17BytecodeGeneratorC2EPNS_8EvalNodeEPNS_14ScopeChainNodeEPN3WTF7HashMapINS5_6RefPtrINS5_10StringImplEEENS_16SymbolTableEntryENS_17IdentifierRepHashENS5_10HashTraitsIS9_EENS_26SymbolTableIndexHashTraitsEEEPNS_13EvalCodeBlockE @@ -1048,13 +1045,13 @@ __ZN3JSC9JITThunks15tryCacheGetByIDEPNS_9ExecStateEPNS_9CodeBlockENS_16ReturnAdd __ZN3JSC3JIT33privateCompilePatchGetArrayLengthENS_16ReturnAddressPtrE __ZNK3JSC8JSObject24getPropertySpecificValueEPNS_9ExecStateERKNS_10IdentifierERPNS_6JSCellE __ZN3JSC27ctiPatchCallByReturnAddressEPNS_9CodeBlockENS_16ReturnAddressPtrENS_11FunctionPtrE -__ZN3JSC3JIT8linkCallEPNS_10JSFunctionEPNS_9CodeBlockES4_NS_21MacroAssemblerCodePtrEPNS_12CallLinkInfoEiPNS_12JSGlobalDataE -__ZN3JSC3JIT20patchMethodCallProtoERNS_12JSGlobalDataEPNS_9CodeBlockERNS_18MethodCallLinkInfoEPNS_10JSFunctionEPNS_9StructureEPNS_8JSObjectENS_16ReturnAddressPtrE +__ZN3JSC3JIT8linkCallEPNS_10JSFunctionEPNS_9CodeBlockES4_NS_21MacroAssemblerCodePtrEPNS_12CallLinkInfoEiPNS_12VME +__ZN3JSC3JIT20patchMethodCallProtoERNS_12VMEPNS_9CodeBlockERNS_18MethodCallLinkInfoEPNS_10JSFunctionEPNS_9StructureEPNS_8JSObjectENS_16ReturnAddressPtrE __ZN3JSC9JITThunks15tryCachePutByIDEPNS_9ExecStateEPNS_9CodeBlockENS_16ReturnAddressPtrENS_7JSValueERKNS_15PutPropertySlotEPNS_17StructureStubInfoEb _cti_op_get_by_id_generic _cti_op_put_by_id_generic -__ZN3JSC14StructureChainC1ERNS_12JSGlobalDataEPNS_9StructureES4_ -__ZN3JSC14StructureChainC2ERNS_12JSGlobalDataEPNS_9StructureES4_ +__ZN3JSC14StructureChainC1ERNS_12VMEPNS_9StructureES4_ +__ZN3JSC14StructureChainC2ERNS_12VMEPNS_9StructureES4_ __ZN3JSC3JIT26privateCompileGetByIdChainEPNS_17StructureStubInfoEPNS_9StructureEPNS_14StructureChainEmRKNS_10IdentifierERKNS_12PropertySlotEmNS_16ReturnAddressPtrEPNS_9ExecStateE __ZN3JSC3JIT13testPrototypeENS_7JSValueERNS_22AbstractMacroAssemblerINS_12X86AssemblerEE8JumpListE __ZN3JSC3JIT22compileGetDirectOffsetEPNS_8JSObjectENS_12X86Registers10RegisterIDEm @@ -1119,7 +1116,7 @@ __ZN3JSC23MacroAssemblerX86Common4moveENS_12X86Registers10RegisterIDES2_ __ZN3JSCL20stringProtoFuncMatchEPNS_9ExecStateE __ZNK3JSC17RegExpConstructor14arrayOfMatchesEPNS_9ExecStateE __ZN3JSC18RegExpMatchesArrayC2EPNS_9ExecStateEPNS_24RegExpConstructorPrivateE -__ZN3JSC7JSArrayC2ERNS_12JSGlobalDataEPNS_9StructureEjNS_17ArrayCreationModeE +__ZN3JSC7JSArrayC2ERNS_12VMEPNS_9StructureEjNS_17ArrayCreationModeE __ZN3JSC7JSArray15setSubclassDataEPv __ZN3JSC18RegExpMatchesArrayD1Ev __ZNK3JSC7JSArray12subclassDataEv @@ -1149,7 +1146,7 @@ __ZN3WTF10StringImpl4findEPFbtEj __ZN3WTF10StringImpl4findEPKcj __ZN3WTF6String26fromUTF8WithLatin1FallbackEPKcm __ZN3WTF10fastStrDupEPKc -__ZN3JSC10Identifier11addSlowCaseEPNS_12JSGlobalDataEPN3WTF10StringImplE +__ZN3JSC10Identifier11addSlowCaseEPNS_12VMEPN3WTF10StringImplE _JSStringRetain ___initializeScavenger_block_invoke_1 __ZN3WTF23waitForThreadCompletionEj @@ -1158,7 +1155,7 @@ _JSObjectCopyPropertyNames __ZN3JSC8JSObject16copyBackingStoreEPNS_6JSCellERNS_11CopyVisitorE __ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE __ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE -__ZN3JSC9Structure16getPropertyNamesERNS_12JSGlobalDataERNS_17PropertyNameArrayENS_15EnumerationModeE +__ZN3JSC9Structure16getPropertyNamesERNS_12VMERNS_17PropertyNameArrayENS_15EnumerationModeE __ZN3JSC9ExecState20objectPrototypeTableEPS0_ _JSPropertyNameArrayGetCount _JSPropertyNameArrayRelease @@ -1204,7 +1201,7 @@ __ZN3JSC9BreakNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator11breakTargetERKNS_10IdentifierE __ZN3JSC17BytecodeGenerator14emitJumpScopesEPNS_5LabelEi __ZN3JSCL20stringProtoFuncSplitEPNS_9ExecStateE -__ZN3JSC11jsSubstringEPNS_12JSGlobalDataERKNS_7UStringEjj +__ZN3JSC11jsSubstringEPNS_12VMERKNS_7UStringEjj __ZN3JSC7JSArray3putEPNS_9ExecStateEjNS_7JSValueE __ZN3JSC7JSArray11putSlowCaseEPNS_9ExecStateEjNS_7JSValueE __ZN3JSC10ASTBuilder11makeSubNodeEPNS_14ExpressionNodeES2_b @@ -1272,7 +1269,6 @@ __ZN3JSC3JIT17emit_op_nstricteqEPNS_11InstructionE __ZN3JSC3JIT21emitSlow_op_nstricteqEPNS_11InstructionERPNS_13SlowCaseEntryE _cti_op_nstricteq __ZN3JSC14LogicalNotNode30emitBytecodeInConditionContextERNS_17BytecodeGeneratorEPNS_5LabelES4_b -__ZN3JSC3JIT18emit_op_jmp_scopesEPNS_11InstructionE _cti_op_negate __ZN3JSCL16mathProtoFuncMaxEPNS_9ExecStateE __ZN3WTF15ThreadConditionD1Ev @@ -1306,8 +1302,8 @@ __ZN3JSC10throwErrorEPNS_9ExecStateENS_7JSValueE __ZN3JSC12hasErrorInfoEPNS_9ExecStateEPNS_8JSObjectE __ZN3JSC9CodeBlock27lineNumberForBytecodeOffsetEj __ZN3JSC12addErrorInfoEPNS_9ExecStateEPNS_8JSObjectEiRKNS_10SourceCodeE -__ZN3JSC12addErrorInfoEPNS_12JSGlobalDataEPNS_8JSObjectEiRKNS_10SourceCodeE -__ZN3JSC8JSObject17putWithAttributesEPNS_12JSGlobalDataERKNS_10IdentifierENS_7JSValueEj +__ZN3JSC12addErrorInfoEPNS_12VMEPNS_8JSObjectEiRKNS_10SourceCodeE +__ZN3JSC8JSObject17putWithAttributesEPNS_12VMERKNS_10IdentifierENS_7JSValueEj _cti_op_push_new_scope __ZN3JSC19JSStaticScopeObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN3JSC12JSActivation3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE @@ -1363,21 +1359,21 @@ __ZN3JSC16throwSyntaxErrorEPNS_9ExecStateE _cti_op_load_varargs __ZN3WTF13tryFastCallocEmm __ZN3JSC17BytecodeGenerator10emitPreDecEPNS_10RegisterIDE -__ZN3JSC3JIT15emit_op_pre_decEPNS_11InstructionE -__ZN3JSC3JIT19emitSlow_op_pre_decEPNS_11InstructionERPNS_13SlowCaseEntryE -_cti_op_pre_dec +__ZN3JSC3JIT15emit_op_decEPNS_11InstructionE +__ZN3JSC3JIT19emitSlow_op_decEPNS_11InstructionERPNS_13SlowCaseEntryE +_cti_op_dec __ZN3WTF10StringImpl16findIgnoringCaseEPS0_j __ZN3JSC5Lexer19getUnicodeCharacterEv __ZN3JSCL23numberProtoFuncToStringEPNS_9ExecStateE -__ZN3JSC12JSGlobalData15getHostFunctionEPFPvPNS_9ExecStateEEPFNS_21MacroAssemblerCodePtrEPS0_PNS_14ExecutablePoolEE -__ZN3JSC9JITThunks16hostFunctionStubEPNS_12JSGlobalDataEPFPvPNS_9ExecStateEEPFNS_21MacroAssemblerCodePtrES2_PNS_14ExecutablePoolEE -__ZN3JSC18sqrtThunkGeneratorEPNS_12JSGlobalDataEPNS_14ExecutablePoolE +__ZN3JSC12VM15getHostFunctionEPFPvPNS_9ExecStateEEPFNS_21MacroAssemblerCodePtrEPS0_PNS_14ExecutablePoolEE +__ZN3JSC9JITThunks16hostFunctionStubEPNS_12VMEPFPvPNS_9ExecStateEEPFNS_21MacroAssemblerCodePtrES2_PNS_14ExecutablePoolEE +__ZN3JSC18sqrtThunkGeneratorEPNS_12VMEPNS_14ExecutablePoolE __ZN3JSC19SpecializedThunkJIT8finalizeENS_21MacroAssemblerCodePtrE __ZN3JSC10JSFunctionC1EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEiRKNS_10IdentifierEPNS_16NativeExecutableE __ZN3JSC10JSFunctionC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureEiRKNS_10IdentifierEPNS_16NativeExecutableE __ZN3JSC3JIT11emit_op_notEPNS_11InstructionE __ZN3JSC3JIT15emitSlow_op_notEPNS_11InstructionERPNS_13SlowCaseEntryE -__ZN3JSC17powThunkGeneratorEPNS_12JSGlobalDataEPNS_14ExecutablePoolE +__ZN3JSC17powThunkGeneratorEPNS_12VMEPNS_14ExecutablePoolE __ZN3JSC12X86Assembler7cmpl_imEiiNS_12X86Registers10RegisterIDE __ZN3JSC23MacroAssemblerX86Common26branchConvertDoubleToInt32ENS_12X86Registers13XMMRegisterIDENS1_10RegisterIDERNS_22AbstractMacroAssemblerINS_12X86AssemblerEE8JumpListES2_ __ZN3JSC19SpecializedThunkJIT11returnInt32ENS_12X86Registers10RegisterIDE @@ -1391,8 +1387,8 @@ _cti_op_del_by_id __ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC17ObjectConstructor18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC9Structure27despecifyFunctionTransitionERNS_12JSGlobalDataEPS0_RKNS_10IdentifierE -__ZN3JSC13PropertyTableC2ERNS_12JSGlobalDataEPNS_6JSCellERKS0_ +__ZN3JSC9Structure27despecifyFunctionTransitionERNS_12VMEPS0_RKNS_10IdentifierE +__ZN3JSC13PropertyTableC2ERNS_12VMEPNS_6JSCellERKS0_ __ZNK3WTF6String6toUIntEPb __ZN3WTF10StringImpl6toUIntEPb __ZN3WTF16charactersToUIntEPKtmPb @@ -1437,9 +1433,7 @@ __ZN3WTF10StringImpl7replaceEtPS0_ __ZN3JSC3JIT31privateCompilePutByIdTransitionEPNS_17StructureStubInfoEPNS_9StructureES4_mPNS_14StructureChainENS_16ReturnAddressPtrEb _cti_op_put_by_id_fail __ZN3JSC17BytecodeGenerator11emitPostIncEPNS_10RegisterIDES2_ -__ZN3JSC3JIT16emit_op_post_incEPNS_11InstructionE -__ZN3JSC3JIT20emitSlow_op_post_incEPNS_11InstructionERPNS_13SlowCaseEntryE -__ZN3JSCL23createPrototypePropertyERNS_12JSGlobalDataEPNS_14JSGlobalObjectEPNS_10JSFunctionE +__ZN3JSCL23createPrototypePropertyERNS_12VMEPNS_14JSGlobalObjectEPNS_10JSFunctionE __ZNK3JSC8NullNode6isNullEv __ZN3JSC3JIT17emit_op_jneq_nullEPNS_11InstructionE _cti_op_convert_this @@ -1473,7 +1467,6 @@ __ZN3WTF22charactersToUIntStrictEPKtmPbi __ZNK3WTF6String5upperEv __ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE __ZN3JSC23createNotAFunctionErrorEPNS_9ExecStateENS_7JSValueE -_cti_op_jmp_scopes __ZNK3WTF6String6latin1Ev __ZN3JSC3JIT30privateCompileGetByIdProtoListEPNS_17StructureStubInfoEPNS_30PolymorphicAccessStructureListEiPNS_9StructureES6_RKNS_10IdentifierERKNS_12PropertySlotEmPNS_9ExecStateE __ZN3JSC3JIT15emit_op_eq_nullEPNS_11InstructionE @@ -1482,7 +1475,7 @@ __ZN3WTF7Unicode18equalUTF16WithUTF8EPKtS2_PKcS4_ __ZN3WTF11emptyStringEv __ZN3WTF6String6numberEj __ZN3JSC14PostfixDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureEjNS_17ArrayCreationModeE +__ZN3JSC7JSArrayC1ERNS_12VMEPNS_9StructureEjNS_17ArrayCreationModeE __ZN3JSC10Identifier4fromEPNS_9ExecStateEj __ZN3JSC3JIT22compileGetDirectOffsetENS_12X86Registers10RegisterIDES2_PNS_9StructureEm __ZN3WTF6VectorIN3JSC14ExecutablePool10AllocationELm2EE15reserveCapacityEm @@ -1498,8 +1491,8 @@ __ZN3JSC4Yarr13YarrGenerator29generateAssertionWordBoundaryEm __ZN3JSC12X86Assembler23X86InstructionFormatter11memoryModRMEiNS_12X86Registers10RegisterIDES3_ii __ZN3JSCL21stringProtoFuncSearchEPNS_9ExecStateE __ZN3JSC17StringConstructor18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC26fromCharCodeThunkGeneratorEPNS_12JSGlobalDataEPNS_14ExecutablePoolE -__ZN3JSCL12charToStringERNS_19SpecializedThunkJITEPNS_12JSGlobalDataENS_12X86Registers10RegisterIDES5_S5_ +__ZN3JSC26fromCharCodeThunkGeneratorEPNS_12VMEPNS_14ExecutablePoolE +__ZN3JSCL12charToStringERNS_19SpecializedThunkJITEPNS_12VMENS_12X86Registers10RegisterIDES5_S5_ __ZN3JSCL18stringFromCharCodeEPNS_9ExecStateE __ZNK3JSC8JSObject14isGlobalObjectEv __ZNK3WTF6String16removeCharactersEPFbtE @@ -1522,12 +1515,12 @@ __ZN3JSC3JIT18emit_op_get_pnamesEPNS_11InstructionE __ZN3JSC3JIT20emit_op_get_by_pnameEPNS_11InstructionE __ZN3JSC3JIT18emit_op_next_pnameEPNS_11InstructionE __ZN3JSC3JIT24emitSlow_op_get_by_pnameEPNS_11InstructionERPNS_13SlowCaseEntryE -__ZN3JSC9Structure22toDictionaryTransitionERNS_12JSGlobalDataEPS0_NS0_14DictionaryKindE +__ZN3JSC9Structure22toDictionaryTransitionERNS_12VMEPS0_NS0_14DictionaryKindE _cti_op_get_pnames __ZN3JSC22JSPropertyNameIterator6createEPNS_9ExecStateEPNS_8JSObjectE __ZN3WTF6VectorIN3JSC10IdentifierELm20EE14expandCapacityEm _cti_has_property -__ZN3JSC9Structure26flattenDictionaryStructureERNS_12JSGlobalDataEPNS_8JSObjectE +__ZN3JSC9Structure26flattenDictionaryStructureERNS_12VMEPNS_8JSObjectE _JSValueIsObjectOfClass __ZN3JSC16JSCallbackObjectINS_24JSObjectWithGlobalObjectEE3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE _JSValueCreateJSONString @@ -1602,7 +1595,7 @@ __ZN3JSC11Stringifier18appendQuotedStringERNS_14UStringBuilderERKNS_7UStringE __ZN3JSC7UStringC1EPKcj _JSObjectGetPrivateProperty _JSObjectSetPrivateProperty -__ZN3JSC20JSCallbackObjectData18setPrivatePropertyERNS_12JSGlobalDataEPNS_6JSCellERKNS_10IdentifierENS_7JSValueE +__ZN3JSC20JSCallbackObjectData18setPrivatePropertyERNS_12VMEPNS_6JSCellERKNS_10IdentifierENS_7JSValueE __ZN3WTF9HashTableINS_6RefPtrINS_10StringImplEEESt4pairIS3_N3JSC12WriteBarrierINS5_7UnknownEEEENS_18PairFirstExtractorIS9_EENS5_17IdentifierRepHashENS_14PairHashTraitsINS_10HashTraitsIS3_EENSE_IS8_EEEESF_E6rehashEi _JSObjectDeletePrivateProperty __ZN3JSC4Yarr18PatternDisjunction17addNewAlternativeEv @@ -1622,14 +1615,10 @@ __ZN3WTF6VectorItLm64EE18tryReserveCapacityEm __ZN3JSC16globalFuncEscapeEPNS_9ExecStateE __ZN3JSC13PrefixDotNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE __ZN3JSC17BytecodeGenerator11emitPostDecEPNS_10RegisterIDES2_ -__ZN3JSC3JIT16emit_op_post_decEPNS_11InstructionE -__ZN3JSC3JIT20emitSlow_op_post_decEPNS_11InstructionERPNS_13SlowCaseEntryE -__ZN3JSC3JIT22emit_op_loop_if_lesseqEPNS_11InstructionE -__ZN3JSC3JIT26emitSlow_op_loop_if_lesseqEPNS_11InstructionERPNS_13SlowCaseEntryE __ZN3JSC7JSArray19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE __ZN3JSC17PropertyNameArray3addEPN3WTF10StringImplE __ZN3JSC9ExecState19arrayPrototypeTableEPS0_ -__ZN3JSC20charAtThunkGeneratorEPNS_12JSGlobalDataEPNS_14ExecutablePoolE +__ZN3JSC20charAtThunkGeneratorEPNS_12VMEPNS_14ExecutablePoolE __ZN3JSCL14stringCharLoadERNS_19SpecializedThunkJITE __ZN3JSCL21stringProtoFuncCharAtEPNS_9ExecStateE __ZN3WTF6VectorIPN3JSC14ExpressionNodeELm16EE14expandCapacityEm @@ -1671,7 +1660,7 @@ __ZN3JSC3JIT14emit_op_rshiftEPNS_11InstructionE __ZN3JSC3JIT18emitSlow_op_rshiftEPNS_11InstructionERPNS_13SlowCaseEntryE _cti_op_put_by_id_transition_realloc __ZNK3WTF6String5splitEtbRNS_6VectorIS0_Lm0EEE -__ZN3JSC24charCodeAtThunkGeneratorEPNS_12JSGlobalDataEPNS_14ExecutablePoolE +__ZN3JSC24charCodeAtThunkGeneratorEPNS_12VMEPNS_14ExecutablePoolE _cti_op_get_by_val_string __ZN3JSC17StringConstructor11getCallDataERNS_8CallDataE __ZN3JSCL21callStringConstructorEPNS_9ExecStateE @@ -1681,10 +1670,10 @@ __ZN3JSC17NumberConstructor18getOwnPropertySlotEPNS_9ExecStateERKNS_10Identifier __ZN3JSC13jsAddSlowCaseEPNS_9ExecStateENS_7JSValueES2_ __ZNK3JSC8JSString11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE _cti_op_get_by_id_getter_stub -__ZN3JSC9Structure24removePropertyTransitionERNS_12JSGlobalDataEPS0_RKNS_10IdentifierERm +__ZN3JSC9Structure24removePropertyTransitionERNS_12VMEPS0_RKNS_10IdentifierERm __ZN3JSC9Structure6removeERKNS_10IdentifierE __ZN3WTF6VectorIjLm0EE14expandCapacityEm -__ZN3JSC9Structure31removePropertyWithoutTransitionERNS_12JSGlobalDataERKNS_10IdentifierE +__ZN3JSC9Structure31removePropertyWithoutTransitionERNS_12VMERKNS_10IdentifierE __ZN3JSC12GetterSetter13visitChildrenERNS_9MarkStackE __ZN3JSC9Arguments13visitChildrenERNS_9MarkStackE __ZN3JSC14JSGlobalObject17WeakMapsFinalizer8finalizeENS_6HandleINS_7UnknownEEEPv @@ -1707,13 +1696,13 @@ __ZN3JSC8JSParser21parseDoWhileStatementINS_13SyntaxCheckerEEENT_9StatementERS3_ __ZN3JSCL16mathProtoFuncMinEPNS_9ExecStateE __ZN3JSCL21arrayProtoFuncReverseEPNS_9ExecStateE __ZN3JSC17ProgramExecutable13visitChildrenERNS_9MarkStackE -__ZN3JSC12JSGlobalData18createContextGroupENS_8HeapTypeE -__ZN3JSC12JSGlobalData22clearBuiltinStructuresEv +__ZN3JSC12VM18createContextGroupENS_8HeapTypeE +__ZN3JSC12VM22clearBuiltinStructuresEv __ZN3JSC4Heap7destroyEv __ZN3JSC9JITThunks22clearHostFunctionStubsEv __ZN3JSC11MarkedSpace7destroyEv -__ZN3JSC12JSGlobalDataD1Ev -__ZN3JSC12JSGlobalDataD2Ev +__ZN3JSC12VMD1Ev +__ZN3JSC12VMD2Ev __ZN3JSC12JSStackD1Ev __ZN3JSC12JSStackD2Ev __ZNK3JSC9HashTable11deleteTableEv @@ -1732,12 +1721,12 @@ __ZN3JSC25DefaultGCActivityCallbackD0Ev __ZN3JSC9JITThunksD1Ev __ZN3JSC12SmallStringsD1Ev __ZN13OpaqueJSClass26createNoAutomaticPrototypeEPK17JSClassDefinition -__ZN3JSC16JSCallbackObjectINS_14JSGlobalObjectEEC2ERNS_12JSGlobalDataEP13OpaqueJSClassPNS_9StructureE +__ZN3JSC16JSCallbackObjectINS_14JSGlobalObjectEEC2ERNS_12VMEP13OpaqueJSClassPNS_9StructureE __ZN3JSC16JSCallbackObjectINS_14JSGlobalObjectEE4initEPNS_9ExecStateE __ZN3JSC16JSCallbackObjectINS_14JSGlobalObjectEE18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE __ZN13OpaqueJSClass12staticValuesEPN3JSC9ExecStateE __ZN13OpaqueJSClass15staticFunctionsEPN3JSC9ExecStateE -__ZN3JSC14JSGlobalObject14resetPrototypeERNS_12JSGlobalDataENS_7JSValueE +__ZN3JSC14JSGlobalObject14resetPrototypeERNS_12VMENS_7JSValueE _JSReportExtraMemoryCost _JSValueIsObject _JSValueMakeNull @@ -1786,7 +1775,6 @@ __ZN3JSCL21dateProtoFuncToStringEPNS_9ExecStateE __ZNK3JSC12DateInstance26calculateGregorianDateTimeEPNS_9ExecStateE __ZN3JSC21msToGregorianDateTimeEPNS_9ExecStateEdbRNS_17GregorianDateTimeE __ZN3JSCL12getDSTOffsetEPNS_9ExecStateEdd -__ZN3WTF18calculateDSTOffsetEdd __ZN3WTF18dateToDaysFrom1970Eiii __ZN3JSC10formatDateERKNS_17GregorianDateTimeERA100_c __ZN3JSC10formatTimeERKNS_17GregorianDateTimeERA100_c @@ -1825,9 +1813,9 @@ __ZNK3JSC18PropertyDescriptor8writableEv __ZNK3JSC18PropertyDescriptor10enumerableEv __ZNK3JSC18PropertyDescriptor12configurableEv __ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE -__ZN3JSC3JIT19emit_op_to_jsnumberEPNS_11InstructionE -__ZN3JSC3JIT23emitSlow_op_to_jsnumberEPNS_11InstructionERPNS_13SlowCaseEntryE -_cti_op_to_jsnumber +__ZN3JSC3JIT19emit_op_to_numberEPNS_11InstructionE +__ZN3JSC3JIT23emitSlow_op_to_numberEPNS_11InstructionERPNS_13SlowCaseEntryE +_cti_op_to_number __ZNK3JSC16JSCallbackObjectINS_24JSObjectWithGlobalObjectEE8toNumberEPNS_9ExecStateE __ZNK3JSC16JSCallbackObjectINS_24JSObjectWithGlobalObjectEE9classNameEv __ZNK3JSC16JSCallbackObjectINS_24JSObjectWithGlobalObjectEE8toStringEPNS_9ExecStateE @@ -1842,18 +1830,18 @@ _JSObjectHasProperty _JSObjectGetPrototype __ZN3JSC8JSObject15unwrappedObjectEv __ZN3JSC11createErrorEPNS_9ExecStateERKNS_7UStringE -__ZN3JSC12JSGlobalData6createENS_8HeapTypeE +__ZN3JSC12VM6createENS_8HeapTypeE __ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_10JSFunctionEj -__ZN3JSC12JSGlobalData13startSamplingEv +__ZN3JSC12VM13startSamplingEv __ZN3JSC11Interpreter13startSamplingEv __ZN3JSC15DateConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL28constructWithDateConstructorEPNS_9ExecStateE __ZN3JSC21gregorianDateTimeToMSEPNS_9ExecStateERKNS_17GregorianDateTimeEdb __ZN3JSCL30dateProtoFuncGetTimezoneOffsetEPNS_9ExecStateE -__ZN3JSC12JSGlobalData12stopSamplingEv +__ZN3JSC12VM12stopSamplingEv __ZN3JSC11Interpreter12stopSamplingEv __ZN3WTF9HashTableIjSt4pairIjN3JSC12WriteBarrierINS2_7UnknownEEEENS_18PairFirstExtractorIS6_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIjEENSC_IS5_EEEESD_E6rehashEi -__ZN3JSC12JSGlobalData14dumpSampleDataEPNS_9ExecStateE +__ZN3JSC12VM14dumpSampleDataEPNS_9ExecStateE __ZN3JSC11Interpreter14dumpSampleDataEPNS_9ExecStateE __ZN3JSC16ArrayConstructor11getCallDataERNS_8CallDataE __ZN3JSCL20callArrayConstructorEPNS_9ExecStateE @@ -1861,15 +1849,15 @@ __ZN3JSC17NumberConstructor11getCallDataERNS_8CallDataE __ZN3JSCL21callNumberConstructorEPNS_9ExecStateE __ZN3JSCL28numberConstructorPosInfinityEPNS_9ExecStateENS_7JSValueERKNS_10IdentifierE _cti_op_mod -__ZN3JSC3JIT13linkConstructEPNS_10JSFunctionEPNS_9CodeBlockES4_NS_21MacroAssemblerCodePtrEPNS_12CallLinkInfoEiPNS_12JSGlobalDataE +__ZN3JSC3JIT13linkConstructEPNS_10JSFunctionEPNS_9CodeBlockES4_NS_21MacroAssemblerCodePtrEPNS_12CallLinkInfoEiPNS_12VME __ZN3JSC14EvalExecutable13visitChildrenERNS_9MarkStackE __ZN3JSC17NumberConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL30constructWithNumberConstructorEPNS_9ExecStateE -__ZN3JSC12NumberObjectC1ERNS_12JSGlobalDataEPNS_9StructureE +__ZN3JSC12NumberObjectC1ERNS_12VMEPNS_9StructureE __ZN3JSC18BooleanConstructor16getConstructDataERNS_13ConstructDataE __ZN3JSCL31constructWithBooleanConstructorEPNS_9ExecStateE __ZN3JSC16constructBooleanEPNS_9ExecStateERKNS_7ArgListE -__ZN3JSC13BooleanObjectC1ERNS_12JSGlobalDataEPNS_9StructureE +__ZN3JSC13BooleanObjectC1ERNS_12VMEPNS_9StructureE __ZN3JSC13BooleanObjectD1Ev __ZN3JSC9ExecState21arrayConstructorTableEPS0_ __ZN3JSC17FunctionPrototype11getCallDataERNS_8CallDataE @@ -1940,7 +1928,7 @@ __ZN3JSC15globalFuncIsNaNEPNS_9ExecStateE _cti_op_is_object __ZN3JSC14jsIsObjectTypeENS_7JSValueE __ZN3JSCL20dateProtoFuncGetYearEPNS_9ExecStateE -_cti_op_pre_inc +_cti_op_inc __ZN3JSCL20dateProtoFuncSetTimeEPNS_9ExecStateE __ZN3JSCL17arrayProtoFuncPopEPNS_9ExecStateE __ZN3JSC7JSArray3popEv @@ -1980,8 +1968,6 @@ __ZN3JSC19FunctionConstructor11getCallDataERNS_8CallDataE __ZN3JSC15DateConstructor11getCallDataERNS_8CallDataE __ZN3JSCL25numberConstructorMaxValueEPNS_9ExecStateENS_7JSValueERKNS_10IdentifierE __ZN3JSCL25numberConstructorMinValueEPNS_9ExecStateENS_7JSValueERKNS_10IdentifierE -_cti_op_post_inc -_cti_op_post_dec __ZN3JSC10ASTBuilder18makeBitwiseNotNodeEPNS_14ExpressionNodeE __ZN3JSC3JIT14emit_op_bitnotEPNS_11InstructionE __ZN3JSC3JIT18emitSlow_op_bitnotEPNS_11InstructionERPNS_13SlowCaseEntryE @@ -2196,7 +2182,7 @@ __ZN3JSCL25arrayProtoFuncLastIndexOfEPNS_9ExecStateE __ZN3WTF20equalIgnoringNullityEPNS_10StringImplES1_ _cti_op_get_by_id_array_fail __ZN3JSC17PrefixBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE -__ZN3JSC12JSGlobalData10ClientDataD2Ev +__ZN3JSC12VM10ClientDataD2Ev __ZN3JSC8DebuggerD2Ev __ZN3WTF14ThreadSpecificINS_13WTFThreadDataEE7destroyEPv __ZN3WTF13WTFThreadDataD1Ev @@ -2213,7 +2199,7 @@ __ZNK3JSC4Heap11objectCountEv __ZNK3JSC11MarkedSpace11objectCountEv __ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj __ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj -__ZN3JSC9Structure22getterSetterTransitionERNS_12JSGlobalDataEPS0_ +__ZN3JSC9Structure22getterSetterTransitionERNS_12VMEPS0_ __ZN3JSCL28objectProtoFuncIsPrototypeOfEPNS_9ExecStateE __ZN3JSCL21functionProtoFuncCallEPNS_9ExecStateE __ZNK3JSC7ArgList8getSliceEiRS0_ @@ -2304,7 +2290,6 @@ __ZN3JSCL35createDescriptorForThrowingPropertyEPNS_9ExecStateERNS_18PropertyDesc __ZN3JSC20StrictEvalActivationD1Ev __ZN3JSC27StrictModeTypeErrorFunctionD1Ev __ZN3JSC9Arguments15copyToRegistersEPNS_9ExecStateEPNS_8RegisterEj -_cti_op_loop_if_lesseq __ZN3JSC23MacroAssemblerX86Common12branchTest32ENS0_15ResultConditionENS_22AbstractMacroAssemblerINS_12X86AssemblerEE7AddressENS4_12TrustedImm32E __ZN3JSC23MacroAssemblerX86Common8branch32ENS0_19RelationalConditionENS_22AbstractMacroAssemblerINS_12X86AssemblerEE7AddressENS4_12TrustedImm32E __ZN3JSC12X86Assembler23X86InstructionFormatter9twoByteOpENS0_15TwoByteOpcodeIDEiNS_12X86Registers10RegisterIDEi @@ -2339,17 +2324,17 @@ __ZN3JSC13UnaryPlusNode14stripUnaryPlusEv __ZN3JSCL29objectProtoFuncToLocaleStringEPNS_9ExecStateE __ZN3WTF6VectorIN3JSC8JSParser14ScopeLabelInfoELm2EE14expandCapacityEm __ZN3JSCL34objectConstructorPreventExtensionsEPNS_9ExecStateE -__ZN3JSC10JSFunction17preventExtensionsERNS_12JSGlobalDataE -__ZN3JSC8JSObject17preventExtensionsERNS_12JSGlobalDataE -__ZN3JSC9Structure27preventExtensionsTransitionERNS_12JSGlobalDataEPS0_ +__ZN3JSC10JSFunction17preventExtensionsERNS_12VME +__ZN3JSC8JSObject17preventExtensionsERNS_12VME +__ZN3JSC9Structure27preventExtensionsTransitionERNS_12VMEPS0_ __ZN3JSCL21objectConstructorSealEPNS_9ExecStateE -__ZN3JSC8JSObject4sealERNS_12JSGlobalDataE -__ZN3JSC9Structure8isSealedERNS_12JSGlobalDataE -__ZN3JSC9Structure14sealTransitionERNS_12JSGlobalDataEPS0_ +__ZN3JSC8JSObject4sealERNS_12VME +__ZN3JSC9Structure8isSealedERNS_12VME +__ZN3JSC9Structure14sealTransitionERNS_12VMEPS0_ __ZN3JSCL23objectConstructorFreezeEPNS_9ExecStateE -__ZN3JSC8JSObject6freezeERNS_12JSGlobalDataE -__ZN3JSC9Structure8isFrozenERNS_12JSGlobalDataE -__ZN3JSC9Structure16freezeTransitionERNS_12JSGlobalDataEPS0_ +__ZN3JSC8JSObject6freezeERNS_12VME +__ZN3JSC9Structure8isFrozenERNS_12VME +__ZN3JSC9Structure16freezeTransitionERNS_12VMEPS0_ __ZN3JSCL25objectConstructorIsSealedEPNS_9ExecStateE __ZN3JSCL25objectConstructorIsFrozenEPNS_9ExecStateE __ZN3JSCL29objectConstructorIsExtensibleEPNS_9ExecStateE @@ -2364,10 +2349,8 @@ __ZNK3WTF8Collator7collateEPKtmS2_m __ZNK3WTF8Collator14createCollatorEv __ZN3WTF8CollatorD1Ev __ZN3WTF8Collator15releaseCollatorEv -__ZN3JSC3JIT30emit_op_ensure_property_existsEPNS_11InstructionE -_cti_op_ensure_property_exists __ZNK3JSC20StrictEvalActivation12toThisObjectEPNS_9ExecStateE -__ZN3JSC15IdentifierArena21makeNumericIdentifierEPNS_12JSGlobalDataEd +__ZN3JSC15IdentifierArena21makeNumericIdentifierEPNS_12VMEd __ZN3JSC6JSCell3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC6JSCell3putEPNS_9ExecStateEjNS_7JSValueE __ZN3WTF16codePointCompareERKNS_6StringES2_ @@ -2401,7 +2384,7 @@ __ZNK3JSC11ProfileNode25traverseNextNodePostOrderEv __ZN3JSC11ProfileNode13stopProfilingEv __ZN3JSC11ProfileNode11removeChildEPS0_ __ZN3JSC11ProfileNode8addChildEN3WTF10PassRefPtrIS0_EE -__ZN3JSC8Debugger23recompileAllJSFunctionsEPNS_12JSGlobalDataE +__ZN3JSC8Debugger23recompileAllJSFunctionsEPNS_12VME __ZN3WTF9HashTableIPN3JSC18FunctionExecutableES3_NS_17IdentityExtractorIS3_EENS_7PtrHashIS3_EENS_10HashTraitsIS3_EES9_E6rehashEi __ZN3JSC7ProfileD0Ev __ZN3WTF10RefCountedIN3JSC11ProfileNodeEE5derefEv @@ -2409,7 +2392,7 @@ __ZN3JSC8Profiler11willExecuteEPNS_9ExecStateERKNS_7UStringEi __ZN3JSC8Profiler10didExecuteEPNS_9ExecStateERKNS_7UStringEi __ZNK3JSC16ProfileGenerator5titleEv __ZN3JSC8Profiler13stopProfilingEPNS_14JSGlobalObjectE -__ZN3JSC34createTerminatedExecutionExceptionEPNS_12JSGlobalDataE +__ZN3JSC34createTerminatedExecutionExceptionEPNS_12VME __ZNK3JSC24TerminatedExecutionError13exceptionTypeEv __ZN3JSC24TerminatedExecutionErrorD1Ev __ZN3WTF5Mutex7tryLockEv @@ -2418,7 +2401,7 @@ __ZN3WTF5yieldEv __ZN3WTF8CollatorC1EPKc __ZN3WTF8Collator18setOrderLowerFirstEb __ZN3JSC10JSONObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE -__ZN3JSC9Structure27despecifyDictionaryFunctionERNS_12JSGlobalDataERKNS_10IdentifierE +__ZN3JSC9Structure27despecifyDictionaryFunctionERNS_12VMERKNS_10IdentifierE __ZN3JSC17ObjectConstructor24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC15ObjectPrototype24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE __ZN3JSC17StringConstructor24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE diff --git a/Source/JavaScriptCore/JavaScriptCore.pri b/Source/JavaScriptCore/JavaScriptCore.pri index 629a4838c..b636e587c 100644 --- a/Source/JavaScriptCore/JavaScriptCore.pri +++ b/Source/JavaScriptCore/JavaScriptCore.pri @@ -33,7 +33,7 @@ INCLUDEPATH += \ $$JAVASCRIPTCORE_GENERATED_SOURCES_DIR # Pick up the right version of LLIntAssembly.h -macx:INCLUDEPATH+=$$JAVASCRIPTCORE_GENERATED_SOURCES_DIR/$$targetSubDir() +macx: INCLUDEPATH += $$JAVASCRIPTCORE_GENERATED_SOURCES_DIR/$$targetSubDir() win32-*: LIBS += -lwinmm diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make deleted file mode 100644 index a87ecc9dd..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make +++ /dev/null @@ -1,41 +0,0 @@ -!IF defined(BUILDSTYLE) && "$(BUILDSTYLE)"=="DEBUG" -BUILDSTYLE=Debug_All -!ELSE -BUILDSTYLE=Release_PGO -!ENDIF - -install: - set OFFICIAL_BUILD=1 - set WebKitLibrariesDir=$(SRCROOT)\AppleInternal - set WebKitOutputDir=$(OBJROOT) - set ConfigurationBuildDir=$(OBJROOT)\$(BUILDSTYLE) - set WebKitVSPropsRedirectionDir=$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\4\ - -mkdir "%ConfigurationBuildDir%\include\private" - xcopy "%WebKitLibrariesDir%\include\private\*" "%ConfigurationBuildDir%\include\private" /e/v/i/h/y -!IF "$(BUILDSTYLE)"=="Release_PGO" - devenv "JavaScriptCoreSubmit.sln" /clean $(BUILDSTYLE) - devenv "JavaScriptCoreSubmit.sln" /build $(BUILDSTYLE) - set PATH=$(SYSTEMDRIVE)\cygwin\bin;$(PATH) - xcopy "$(SRCROOT)\AppleInternal\tests\SunSpider\*" "%ConfigurationBuildDir%\tests\SunSpider" /e/v/i/h/y - cd "%ConfigurationBuildDir%\tests\SunSpider" - perl sunspider --shell ../../bin/jsc.exe --runs 3 - del "%ConfigurationBuildDir%\bin\JavaScriptCore.dll" - cd "$(SRCROOT)\JavaScriptCore.vcproj" - devenv "JavaScriptCoreSubmit.sln" /build Release_PGO_Optimize -!ELSE - devenv "JavaScriptCoreSubmit.sln" /clean $(BUILDSTYLE) - devenv "JavaScriptCoreSubmit.sln" /build $(BUILDSTYLE) -!ENDIF - -xcopy "%ConfigurationBuildDir%\bin\JavaScriptCore.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - -xcopy "%ConfigurationBuildDir%\bin\JavaScriptCore_debug.dll" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - -xcopy "%ConfigurationBuildDir%\bin\JavaScriptCore.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - -xcopy "%ConfigurationBuildDir%\bin\JavaScriptCore_debug.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - -xcopy "%ConfigurationBuildDir%\bin\jsc.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - -xcopy "%ConfigurationBuildDir%\bin\jsc_debug.exe" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - -xcopy "%ConfigurationBuildDir%\bin\jsc.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - -xcopy "%ConfigurationBuildDir%\bin\jsc_debug.pdb" "$(DSTROOT)\AppleInternal\bin\" /e/v/i/h/y - xcopy "%ConfigurationBuildDir%\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y - xcopy "%ConfigurationBuildDir%\lib\*" "$(DSTROOT)\AppleInternal\lib\" /e/v/i/h/y - xcopy "%ConfigurationBuildDir%\bin\JavaScriptCore.resources\*" "$(DSTROOT)\AppleInternal\bin\JavaScriptCore.resources" /e/v/i/h/y - -mkdir "$(DSTROOT)\AppleInternal\Sources\JavaScriptCore" - xcopy "%ConfigurationBuildDir%\obj\JavaScriptCore\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources\JavaScriptCore" /e/v/i/h/y diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist deleted file mode 100644 index 7de8638e2..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - JavaScriptCore - CFBundleGetInfoString - 530, Copyright 2003-2010 Apple Inc. - CFBundleIdentifier - com.apple.JavaScriptCore - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - JavaScriptCore - CFBundlePackageType - APPL - CFBundleShortVersionString - 530 - CFBundleVersion - 530 - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln deleted file mode 100644 index 6f4236e03..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln +++ /dev/null @@ -1,170 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}" - ProjectSection(ProjectDependencies) = postProject - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} - {9221744B-5715-4F56-9590-42F7AB23DD8B} = {9221744B-5715-4F56-9590-42F7AB23DD8B} - {D595E3F6-24F2-4C60-935C-95D50C6B3E96} = {D595E3F6-24F2-4C60-935C-95D50C6B3E96} - {877150A0-41B3-4730-9D98-1B8298098B14} = {877150A0-41B3-4730-9D98-1B8298098B14} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "jsc\jsc.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}" - ProjectSection(ProjectDependencies) = postProject - {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\WTF\WTF.vcproj\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}" - ProjectSection(ProjectDependencies) = postProject - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} = {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}" - ProjectSection(ProjectDependencies) = postProject - {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testRegExp", "testRegExp\testRegExp.vcproj", "{14C94979-1ED3-4E1D-9B55-A80FCF4677D0}" - ProjectSection(ProjectDependencies) = postProject - {C59E5129-B453-49B7-A52B-1E104715F76E} = {C59E5129-B453-49B7-A52B-1E104715F76E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTFGenerated", "..\..\WTF\WTF.vcproj\WTFGenerated.vcproj", "{5AE5F5E4-782D-4F63-B4D7-3977B52B9950}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LLIntDesiredOffsets", "LLIntDesiredOffsets\LLIntDesiredOffsets.vcproj", "{877150A0-41B3-4730-9D98-1B8298098B14}" - ProjectSection(ProjectDependencies) = postProject - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} = {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} - {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6} - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LLIntOffsetsExtractor", "LLIntOffsetsExtractor\LLIntOffsetsExtractor.vcproj", "{D595E3F6-24F2-4C60-935C-95D50C6B3E96}" - ProjectSection(ProjectDependencies) = postProject - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} - {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6} - {877150A0-41B3-4730-9D98-1B8298098B14} = {877150A0-41B3-4730-9D98-1B8298098B14} - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} = {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LLIntAssembly", "LLIntAssembly\LLIntAssembly.vcproj", "{9221744B-5715-4F56-9590-42F7AB23DD8B}" - ProjectSection(ProjectDependencies) = postProject - {D595E3F6-24F2-4C60-935C-95D50C6B3E96} = {D595E3F6-24F2-4C60-935C-95D50C6B3E96} - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} = {5AE5F5E4-782D-4F63-B4D7-3977B52B9950} - {877150A0-41B3-4730-9D98-1B8298098B14} = {877150A0-41B3-4730-9D98-1B8298098B14} - {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6} - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_All|Win32 = Debug_All|Win32 - Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32 - Debug|Win32 = Debug|Win32 - Production|Win32 = Production|Win32 - Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32 - Release_PGO_Optimize|Win32 = Release_PGO_Optimize|Win32 - Release_PGO|Win32 = Release_PGO|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Production|Win32.ActiveCfg = Production|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Production|Win32.Build.0 = Production|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO_Optimize|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO_Optimize|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO|Win32.Build.0 = Release_PGO|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Production|Win32.ActiveCfg = Production|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Production|Win32.Build.0 = Production|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO|Win32.Build.0 = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.Build.0 = Debug|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Production|Win32.ActiveCfg = Production|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Production|Win32.Build.0 = Production|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO_Optimize|Win32.ActiveCfg = Production|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO_Optimize|Win32.Build.0 = Production|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO|Win32.ActiveCfg = Production|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO|Win32.Build.0 = Production|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = Debug|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = Debug|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Production|Win32.ActiveCfg = Production|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Production|Win32.Build.0 = Production|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO|Win32.Build.0 = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = Release|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = Release|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Debug|Win32.ActiveCfg = Debug|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Debug|Win32.Build.0 = Debug|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Production|Win32.ActiveCfg = Production|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Production|Win32.Build.0 = Production|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release_PGO|Win32.Build.0 = Release_PGO|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release|Win32.ActiveCfg = Release|Win32 - {14C94979-1ED3-4E1D-9B55-A80FCF4677D0}.Release|Win32.Build.0 = Release|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Debug|Win32.ActiveCfg = Debug|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Debug|Win32.Build.0 = Debug|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Production|Win32.ActiveCfg = Production|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Production|Win32.Build.0 = Production|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release_PGO_Optimize|Win32.ActiveCfg = Production|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release_PGO_Optimize|Win32.Build.0 = Production|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release_PGO|Win32.ActiveCfg = Production|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release_PGO|Win32.Build.0 = Production|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release|Win32.ActiveCfg = Release|Win32 - {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def deleted file mode 100755 index 422aac464..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def +++ /dev/null @@ -1,439 +0,0 @@ -EXPORTS - - ??0ArrayBufferView@WTF@@IAE@V?$PassRefPtr@VArrayBuffer@WTF@@@1@I@Z - ??0BooleanObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z - ??0Collator@WTF@@QAE@PBD@Z - ??0CString@WTF@@QAE@PBD@Z - ??0CString@WTF@@QAE@PBDI@Z - ??0DateInstance@JSC@@IAE@PAVExecState@1@PAVStructure@1@@Z - ??0DefaultGCActivityCallback@JSC@@QAE@PAVHeap@1@@Z - ??0DropAllLocks@JSLock@JSC@@QAE@PAVExecState@2@@Z - ??0DropAllLocks@JSLock@JSC@@QAE@PAVJSGlobalData@2@@Z - ??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z - ??0ErrorHandlingMode@Interpreter@JSC@@QAE@PAVExecState@2@@Z - ??1ErrorHandlingMode@Interpreter@JSC@@QAE@XZ - ??0InstrumentedPointerBase@MemoryInstrumentation@WTF@@QAE@PAVMemoryObjectInfo@2@@Z - ??0InternalFunction@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@@Z - ??0JSGlobalObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@PBUGlobalObjectMethodTable@1@@Z - ??0JSLockHolder@JSC@@QAE@AAVJSGlobalData@1@@Z - ??0JSLockHolder@JSC@@QAE@PAVExecState@1@@Z - ??0JSLockHolder@JSC@@QAE@PAVJSGlobalData@1@@Z - ??0MD5@WTF@@QAE@XZ - ??0MediaTime@WTF@@QAE@_JHI@Z - ??0MemoryInstrumentation@WTF@@QAE@PAVMemoryInstrumentationClient@1@@Z - ??0Mutex@WTF@@QAE@XZ - ??0ParallelEnvironment@WTF@@QAE@P6AXPAX@ZIH@Z - ??0RefCountedLeakCounter@WTF@@QAE@PBD@Z - ??0RegExpObject@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@PAVRegExp@1@@Z - ??0SHA1@WTF@@QAE@XZ - ??0StringObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z - ??0Structure@JSC@@AAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@VJSValue@1@ABVTypeInfo@1@PBUClassInfo@1@EH@Z - ??0ThreadCondition@WTF@@QAE@XZ - ??0WTFThreadData@WTF@@QAE@XZ - ??0YarrPattern@Yarr@JSC@@QAE@ABVString@WTF@@_N1PAPBD@Z - ??1ArrayBufferView@WTF@@UAE@XZ - ??1ClientData@JSGlobalData@JSC@@UAE@XZ - ??1Collator@WTF@@QAE@XZ - ??1Debugger@JSC@@UAE@XZ - ??1DropAllLocks@JSLock@JSC@@QAE@XZ - ??1JSGlobalData@JSC@@QAE@XZ - ??1JSGlobalObject@JSC@@QAE@XZ - ??1JSLockHolder@JSC@@QAE@XZ - ??1MediaTime@WTF@@QAE@XZ - ??1MemoryInstrumentation@WTF@@UAE@XZ - ??1Mutex@WTF@@QAE@XZ - ??1RefCountedLeakCounter@WTF@@QAE@XZ - ??1SourceProviderCache@JSC@@QAE@XZ - ??1ThreadCondition@WTF@@QAE@XZ - ??1WeakHandleOwner@JSC@@UAE@XZ - ??1WTFThreadData@WTF@@QAE@XZ - ??8MediaTime@WTF@@QBE_NABV01@@Z - ??8WTF@@YA_NABVCString@0@0@Z - ??GMediaTime@WTF@@QBE?AV01@ABV01@@Z - ??HMediaTime@WTF@@QBE?AV01@ABV01@@Z - ??MMediaTime@WTF@@QBE_NABV01@@Z - ??OMediaTime@WTF@@QBE_NABV01@@Z - ?abs@WTF@@YA?AVMediaTime@1@ABV21@@Z - ?absoluteTimeToWaitTimeoutInterval@WTF@@YAKN@Z - ?activityCallback@Heap@JSC@@QAEPAVGCActivityCallback@2@XZ - ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z - ?addFromLiteralData@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBDI@Z - ?add@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVJSGlobalData@2@PAVStringImpl@4@@Z - ?add@Identifier@JSC@@SA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PBD@Z - ?add@PropertyNameArray@JSC@@QAEXPAVStringImpl@WTF@@@Z - ?addBytes@MD5@WTF@@QAEXPBEI@Z - ?addBytes@SHA1@WTF@@QAEXPBEI@Z - ?addCurrentThread@MachineThreads@JSC@@QAEXXZ - ?addFinalizer@Heap@JSC@@QAEXPAVJSCell@2@P6AX0@Z@Z - ?addPropertyTransition@Structure@JSC@@SAPAV12@AAVJSGlobalData@2@PAV12@VPropertyName@2@IPAVJSCell@2@AAH@Z - ?addPropertyTransitionToExistingStructure@Structure@JSC@@SAPAV12@PAV12@VPropertyName@2@IPAVJSCell@2@AAH@Z - ?addPropertyWithoutTransition@Structure@JSC@@QAEHAAVJSGlobalData@2@VPropertyName@2@IPAVJSCell@2@@Z - ?addPrivateBuffer@MemoryClassInfo@WTF@@QAEXIPBD@Z - ?addRawBuffer@MemoryClassInfo@WTF@@QAEXABQBXI@Z - ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PAVStringImpl@4@@Z - ?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVJSGlobalData@2@PAVStringImpl@4@@Z - ?addStaticGlobals@JSGlobalObject@JSC@@IAEXPAUGlobalPropertyInfo@12@H@Z - ?allocateSlowCase@MarkedAllocator@JSC@@AAEPAXI@Z - ?append@StringBuilder@WTF@@QAEXPB_WI@Z - ?append@StringBuilder@WTF@@QAEXPBEI@Z - ?appendNumber@StringBuilder@WTF@@QAEX_J@Z - ?appendNumber@StringBuilder@WTF@@QAEX_K@Z - ?appendNumber@StringBuilder@WTF@@QAEXH@Z - ?appendNumber@StringBuilder@WTF@@QAEXI@Z - ?appendNumber@StringBuilder@WTF@@QAEXJ@Z - ?appendNumber@StringBuilder@WTF@@QAEXK@Z - ?attach@Debugger@JSC@@QAEXPAVJSGlobalObject@2@@Z - ?base64Decode@WTF@@YA_NABVString@1@AAV?$Vector@D$0A@@1@W4Base64DecodePolicy@1@@Z - ?base64Encode@WTF@@YA?AVString@1@PBDIW4Base64EncodePolicy@1@@Z - ?base64Encode@WTF@@YAXPBDIAAV?$Vector@D$0A@@1@W4Base64EncodePolicy@1@@Z - ?broadcast@ThreadCondition@WTF@@QAEXXZ - ?bufferLengthForStringDecimal@DecimalNumber@WTF@@QBEIXZ - ?bufferLengthForStringExponential@DecimalNumber@WTF@@QBEIXZ - ?byteCompile@Yarr@JSC@@YA?AV?$PassOwnPtr@UBytecodePattern@Yarr@JSC@@@WTF@@AAUYarrPattern@12@PAVBumpPointerAllocator@4@@Z - ?byteSize@SourceProviderCache@JSC@@QBEIXZ - ?calculatedFunctionName@DebuggerCallFrame@JSC@@QBE?AVString@WTF@@XZ - ?calculateDSTOffset@WTF@@YANNN@Z - ?calculateStringHashAndLengthFromUTF8MaskingTop8Bits@Unicode@WTF@@YAIPBD0AAI1@Z - ?calculateUTCOffset@WTF@@YAHXZ - ?call@JSC@@YA?AVJSValue@1@PAVExecState@1@V21@W4CallType@1@ABTCallData@1@1ABVArgList@1@@Z - ?callHostFunctionAsConstructor@JSC@@YI_JPAVExecState@1@@Z - ?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z - ?callOnMainThreadAndWait@WTF@@YAXP6AXPAX@Z0@Z - ?callReportObjectInfo@MemoryInstrumentation@WTF@@CAXPAVMemoryObjectInfo@2@PBXPBDI@Z - ?cancelCallOnMainThread@WTF@@YAXP6AXPAX@Z0@Z - ?canShrink@StringBuilder@WTF@@QBE_NXZ - ?capacity@Heap@JSC@@QAEIXZ - ?changePrototypeTransition@Structure@JSC@@SAPAV12@AAVJSGlobalData@2@PAV12@VJSValue@2@@Z - ?checkCurrentIdentifierTable@Identifier@JSC@@CAXPAVExecState@2@@Z - ?checkCurrentIdentifierTable@Identifier@JSC@@CAXPAVJSGlobalData@2@@Z - ?checksum@MD5@WTF@@QAEXAAV?$Vector@E$0BA@@2@@Z - ?checkSyntax@JSC@@YA_NPAVExecState@1@ABVSourceCode@1@PAVJSValue@1@@Z - ?className@JSObject@JSC@@SA?AVString@WTF@@PBV12@@Z - ?className@JSProxy@JSC@@KA?AVString@WTF@@PBVJSObject@2@@Z - ?clear@SourceProviderCache@JSC@@QAEXXZ - ?clearRareData@JSGlobalObject@JSC@@CAXPAVJSCell@2@@Z - ?collate@Collator@WTF@@QBE?AW4Result@12@PB_WI0I@Z - ?collectAllGarbage@Heap@JSC@@QAEXXZ - ?computeHash@SHA1@WTF@@QAEXAAV?$Vector@E$0BE@@2@@Z - ?configurable@PropertyDescriptor@JSC@@QBE_NXZ - ?construct@JSC@@YAPAVJSObject@1@PAVExecState@1@VJSValue@1@W4ConstructType@1@ABTConstructData@1@ABVArgList@1@@Z - ?constructEmptyObject@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?constructFunctionSkippingEvalEnabledCheck@JSC@@YAPAVJSObject@1@PAVExecState@1@PAVJSGlobalObject@1@ABVArgList@1@ABVIdentifier@1@ABVString@WTF@@ABVTextPosition@8@@Z - ?constructNumber@JSC@@YAPAVNumberObject@1@PAVExecState@1@PAVJSGlobalObject@1@VJSValue@1@@Z - ?constructString@JSC@@YAPAVStringObject@1@PAVExecState@1@PAVJSGlobalObject@1@VJSValue@1@@Z - ?convertDoubleToContiguousWhilePerformingSetIndex@JSObject@JSC@@AAEXAAVJSGlobalData@2@IVJSValue@2@@Z - ?convertInt32ToDoubleOrContiguousWhilePerformingSetIndex@JSObject@JSC@@AAEXAAVJSGlobalData@2@IVJSValue@2@@Z - ?convertLatin1ToUTF8@Unicode@WTF@@YA?AW4ConversionResult@12@PAPBEPBEPAPADPAD@Z - ?convertUTF16ToUTF8@Unicode@WTF@@YA?AW4ConversionResult@12@PAPB_WPB_WPAPADPAD_N@Z - ?convertUTF8ToUTF16@Unicode@WTF@@YA?AW4ConversionResult@12@PAPBDPBDPAPA_WPA_WPA_N_N@Z - ?copyBackingStore@JSObject@JSC@@SAXPAVJSCell@2@AAVCopyVisitor@2@@Z - ?create@JSFunction@JSC@@SAPAV12@PAVExecState@2@PAVJSGlobalObject@2@HABVString@WTF@@P6I_J0@ZW4Intrinsic@2@3@Z - ?create@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@W4HeapType@2@@Z - ?create@OpaqueJSString@@SA?AV?$PassRefPtr@UOpaqueJSString@@@WTF@@ABVString@3@@Z - ?create@RegExp@JSC@@SAPAV12@AAVJSGlobalData@2@ABVString@WTF@@W4RegExpFlags@2@@Z - ?createEmptyString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@@Z - ?createError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVString@WTF@@@Z - ?createInterruptedExecutionException@JSC@@YAPAVJSObject@1@PAVJSGlobalData@1@@Z - ?createLeaked@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@W4HeapType@2@@Z - ?createNotEnoughArgumentsError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?createRangeError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVString@WTF@@@Z - ?createReferenceError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVString@WTF@@@Z - ?createSingleCharacterString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@E@Z - ?createStackOverflowError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?createSyntaxError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVString@WTF@@@Z - ?createTable@HashTable@JSC@@ABEXPAVJSGlobalData@2@@Z - ?createThread@WTF@@YAIP6APAXPAX@Z0@Z - ?createThread@WTF@@YAIP6APAXPAX@Z0PBD@Z - ?createThread@WTF@@YAIP6AXPAX@Z0PBD@Z - ?createTypeError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVString@WTF@@@Z - ?createWithDouble@MediaTime@WTF@@SA?AV12@NH@Z - ?createWithFloat@MediaTime@WTF@@SA?AV12@MH@Z - ?cryptographicallyRandomNumber@WTF@@YAIXZ - ?cryptographicallyRandomValues@WTF@@YAXPAXI@Z - ?currentThread@WTF@@YAIXZ - ?currentTime@WTF@@YANXZ - ?customHasInstance@JSCell@JSC@@KA_NPAVJSObject@2@PAVExecState@2@VJSValue@2@@Z - ?data@CString@WTF@@QBEPBDXZ - ?dataLogF@WTF@@YAXPBDZZ - ?dateToDaysFrom1970@WTF@@YANHHH@Z - ?dayInMonthFromDayInYear@WTF@@YAHH_N@Z - ?dayInYear@WTF@@YAHNH@Z - ?decrement@RefCountedLeakCounter@WTF@@QAEXXZ - ?defaultValue@JSObject@JSC@@SA?AVJSValue@2@PBV12@PAVExecState@2@W4PreferredPrimitiveType@2@@Z - ?defineOwnProperty@JSGlobalObject@JSC@@SA_NPAVJSObject@2@PAVExecState@2@VPropertyName@2@AAVPropertyDescriptor@2@_N@Z - ?defineOwnProperty@JSObject@JSC@@SA_NPAV12@PAVExecState@2@VPropertyName@2@AAVPropertyDescriptor@2@_N@Z - ?defineOwnProperty@JSProxy@JSC@@KA_NPAVJSObject@2@PAVExecState@2@VPropertyName@2@AAVPropertyDescriptor@2@_N@Z - ?deleteAllCompiledCode@Heap@JSC@@QAEXXZ - ?deleteOwnedPtr@WTF@@YAXPAUHBITMAP__@@@Z - ?deleteOwnedPtr@WTF@@YAXPAUHBRUSH__@@@Z - ?deleteOwnedPtr@WTF@@YAXPAUHDC__@@@Z - ?deleteOwnedPtr@WTF@@YAXPAUHFONT__@@@Z - ?deleteOwnedPtr@WTF@@YAXPAUHRGN__@@@Z - ?deleteProperty@JSObject@JSC@@SA_NPAVJSCell@2@PAVExecState@2@VPropertyName@2@@Z - ?deleteProperty@JSProxy@JSC@@KA_NPAVJSCell@2@PAVExecState@2@VPropertyName@2@@Z - ?deleteProperty@JSSymbolTableObject@JSC@@SA_NPAVJSCell@2@PAVExecState@2@VPropertyName@2@@Z - ?deletePropertyByIndex@JSObject@JSC@@SA_NPAVJSCell@2@PAVExecState@2@I@Z - ?deletePropertyByIndex@JSProxy@JSC@@KA_NPAVJSCell@2@PAVExecState@2@I@Z - ?deleteTable@HashTable@JSC@@QBEXXZ - ?description@JSValue@JSC@@QBEPADXZ - ?despecifyDictionaryFunction@Structure@JSC@@QAEXAAVJSGlobalData@2@VPropertyName@2@@Z - ?despecifyFunctionTransition@Structure@JSC@@SAPAV12@AAVJSGlobalData@2@PAV12@VPropertyName@2@@Z - ?destroy@JSCell@JSC@@KAXPAV12@@Z - ?destroy@JSGlobalObject@JSC@@SAXPAVJSCell@2@@Z - ?destroy@OutOfLineBits@BitVector@WTF@@SAXPAV123@@Z - ?detach@Debugger@JSC@@UAEXPAVJSGlobalObject@2@@Z - ?detachThread@WTF@@YAXI@Z - ?didTimeOut@TimeoutChecker@JSC@@QAE_NPAVExecState@2@@Z - ?displayName@JSFunction@JSC@@QAE?AVString@WTF@@PAVExecState@2@@Z - ?dtoa@WTF@@YAXQADNAA_NAAHAAI@Z - ?dumpAllOptions@Options@JSC@@SAXPAU_iobuf@@@Z - ?dumpCallFrame@Interpreter@JSC@@QAEXPAVExecState@2@@Z - ?dumpSampleData@JSGlobalData@JSC@@QAEXPAVExecState@2@@Z - ?EcmaScriptConverter@DoubleToStringConverter@double_conversion@WTF@@SAABV123@XZ - ?empty@StringImpl@WTF@@SAPAV12@XZ - ?enumerable@PropertyDescriptor@JSC@@QBE_NXZ - ?equalUTF16WithUTF8@Unicode@WTF@@YA_NPB_W0PBD1@Z - ?evaluate@DebuggerCallFrame@JSC@@QBE?AVJSValue@2@ABVString@WTF@@AAV32@@Z - ?evaluate@JSC@@YA?AVJSValue@1@PAVExecState@1@ABVSourceCode@1@V21@PAV21@@Z - ?exclude@Profile@JSC@@QAEXPBVProfileNode@2@@Z - ?execute@ParallelEnvironment@WTF@@QAEXPAX@Z - ?expand@MarkStackArray@JSC@@AAEXXZ - ?fastCalloc@WTF@@YAPAXII@Z - ?fastFree@WTF@@YAXPAX@Z - ?fastMalloc@WTF@@YAPAXI@Z - ?fastMallocMatchFailed@Internal@WTF@@YAXPAX@Z - ?fastMallocSize@WTF@@YAIPBX@Z - ?fastMallocStatistics@WTF@@YA?AUFastMallocStatistics@1@XZ - ?fastRealloc@WTF@@YAPAXPAXI@Z - ?fastStrDup@WTF@@YAPADPBD@Z - ?fastZeroedMalloc@WTF@@YAPAXI@Z - ?fillGetterPropertySlot@JSObject@JSC@@AAEXAAVPropertySlot@2@H@Z - ?finalize@WeakHandleOwner@JSC@@UAEXV?$Handle@W4Unknown@JSC@@@2@PAX@Z - ?findAllocator@WeakSet@JSC@@AAEPAUFreeCell@WeakBlock@2@XZ - ?finishCreation@BooleanObject@JSC@@IAEXAAVJSGlobalData@2@@Z - ?finishCreation@DateInstance@JSC@@IAEXAAVJSGlobalData@2@N@Z - ?finishCreation@InternalFunction@JSC@@IAEXAAVJSGlobalData@2@ABVString@WTF@@@Z - ?finishCreation@RegExpObject@JSC@@IAEXPAVJSGlobalObject@2@@Z - ?finishCreation@StringObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSString@2@@Z - ?focus@Profile@JSC@@QAEXPBVProfileNode@2@@Z - ?freeFatEntrySlow@SymbolTableEntry@JSC@@AAEXXZ - ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@H@Z - ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@I@Z - ?functionGetter@PropertySlot@JSC@@ABE?AVJSValue@2@PAVExecState@2@@Z - ?get@Structure@JSC@@QAEHAAVJSGlobalData@2@VPropertyName@2@AAIAAPAVJSCell@2@@Z - ?getCalculatedDisplayName@JSC@@YA?AVString@WTF@@PAVExecState@1@PAVJSObject@1@@Z - ?getCallableObjectSlow@JSC@@YAPAVJSCell@1@PAV21@@Z - ?getCallData@JSCell@JSC@@SA?AW4CallType@2@PAV12@AATCallData@2@@Z - ?getConstructData@JSCell@JSC@@SA?AW4ConstructType@2@PAV12@AATConstructData@2@@Z - ?getObject@JSCell@JSC@@QAEPAVJSObject@2@XZ - ?getObjectType@MemoryInstrumentation@WTF@@CAPBDPAVMemoryObjectInfo@2@@Z - ?getOwnNonIndexPropertyNames@JSObject@JSC@@SAXPAV12@PAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z - ?getOwnNonIndexPropertyNames@JSSymbolTableObject@JSC@@SAXPAVJSObject@2@PAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z - ?getOwnPropertyDescriptor@JSGlobalObject@JSC@@SA_NPAVJSObject@2@PAVExecState@2@VPropertyName@2@AAVPropertyDescriptor@2@@Z - ?getOwnPropertyDescriptor@JSObject@JSC@@SA_NPAV12@PAVExecState@2@VPropertyName@2@AAVPropertyDescriptor@2@@Z - ?getOwnPropertyDescriptor@JSProxy@JSC@@KA_NPAVJSObject@2@PAVExecState@2@VPropertyName@2@AAVPropertyDescriptor@2@@Z - ?getOwnPropertyNames@JSObject@JSC@@SAXPAV12@PAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z - ?getOwnPropertyNames@JSProxy@JSC@@KAXPAVJSObject@2@PAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z - ?getOwnPropertySlot@JSGlobalObject@JSC@@SA_NPAVJSCell@2@PAVExecState@2@VPropertyName@2@AAVPropertySlot@2@@Z - ?getOwnPropertySlot@JSProxy@JSC@@KA_NPAVJSCell@2@PAVExecState@2@VPropertyName@2@AAVPropertySlot@2@@Z - ?getOwnPropertySlotByIndex@JSObject@JSC@@SA_NPAVJSCell@2@PAVExecState@2@IAAVPropertySlot@2@@Z - ?getOwnPropertySlotByIndex@JSProxy@JSC@@KA_NPAVJSCell@2@PAVExecState@2@IAAVPropertySlot@2@@Z - ?getOwnPropertySlotSlow@JSObject@JSC@@AAE_NPAVExecState@2@VPropertyName@2@AAVPropertySlot@2@@Z - ?getPropertyNames@JSObject@JSC@@SAXPAV12@PAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z - ?getPropertyNames@JSProxy@JSC@@KAXPAVJSObject@2@PAVExecState@2@AAVPropertyNameArray@2@W4EnumerationMode@2@@Z - ?getSlice@ArgList@JSC@@QBEXHAAV12@@Z - ?getStackTrace@Interpreter@JSC@@SAXPAVJSGlobalData@2@AAV?$Vector@UStackFrame@JSC@@$0A@@WTF@@@Z - ?getString@JSCell@JSC@@QBE?AVString@WTF@@PAVExecState@2@@Z - ?getString@JSCell@JSC@@QBE_NPAVExecState@2@AAVString@WTF@@@Z - ?getter@PropertyDescriptor@JSC@@QBE?AVJSValue@2@XZ - ?globalExec@JSGlobalObject@JSC@@QAEPAVExecState@2@XZ - ?globalObjectCount@Heap@JSC@@QAEIXZ - ?grow@HandleSet@JSC@@AAEXXZ - ?growOutOfLineStorage@JSObject@JSC@@QAEPAVButterfly@2@AAVJSGlobalData@2@II@Z - ?hashSlowCase@StringImpl@WTF@@ABEIXZ - ?hasProperty@JSObject@JSC@@QBE_NPAVExecState@2@I@Z - ?hasProperty@JSObject@JSC@@QBE_NPAVExecState@2@VPropertyName@2@@Z - ?heap@Heap@JSC@@SAPAV12@VJSValue@2@@Z - ?increment@RefCountedLeakCounter@WTF@@QAEXXZ - ?indefiniteTime@MediaTime@WTF@@SAABV12@XZ - ?init@AtomicString@WTF@@SAXXZ - ?init@JSGlobalObject@JSC@@AAEXPAVJSObject@2@@Z - ?init@MemoryClassInfo@WTF@@AAEXPBXPBDI@Z - ?initialize@double_conversion@WTF@@YAXXZ - ?initializeMainThread@WTF@@YAXXZ - ?initializeThreading@JSC@@YAXXZ - ?initializeThreading@WTF@@YAXXZ - ?interpret@Yarr@JSC@@YAIPAUBytecodePattern@12@ABVString@WTF@@IPAI@Z - ?invalidTime@MediaTime@WTF@@SAABV12@XZ - ?isAccessorDescriptor@PropertyDescriptor@JSC@@QBE_NXZ - ?isBusy@Heap@JSC@@QAE_NXZ - ?isDataDescriptor@PropertyDescriptor@JSC@@QBE_NXZ - ?isHostFunctionNonInline@JSFunction@JSC@@ABE_NXZ - ?isMainThread@WTF@@YA_NXZ - ?isReachableFromOpaqueRoots@WeakHandleOwner@JSC@@UAE_NV?$Handle@W4Unknown@JSC@@@2@PAXAAVSlotVisitor@2@@Z - ?isTerminatedExecutionException@JSC@@YA_NVJSValue@1@@Z - ?isValidAllocation@Heap@JSC@@AAE_NI@Z - ?isValidCallee@JSValue@JSC@@QAE_NXZ - ?length@CString@WTF@@QBEIXZ - ?lock@JSLock@JSC@@QAEXXZ - ?lock@Mutex@WTF@@QAEXXZ - ?lockAtomicallyInitializedStaticMutex@WTF@@YAXXZ - ?match@RegExp@JSC@@QAEHAAVJSGlobalData@2@ABVString@WTF@@IAAV?$Vector@H$0CA@@5@@Z - ?materializePropertyMap@Structure@JSC@@AAEXAAVJSGlobalData@2@@Z - ?monotonicallyIncreasingTime@WTF@@YANXZ - ?monthFromDayInYear@WTF@@YAHH_N@Z - ?msToYear@WTF@@YAHN@Z - ?name@JSFunction@JSC@@QAE?AVString@WTF@@PAVExecState@2@@Z - ?negativeInfiniteTime@MediaTime@WTF@@SAABV12@XZ - ?neuter@ArrayBufferView@WTF@@MAEXXZ - ?newUninitialized@CString@WTF@@SA?AV12@IAAPAD@Z - ?notifyWriteSlow@SymbolTableEntry@JSC@@AAEXXZ - ?notifyWriteSlow@WatchpointSet@JSC@@QAEXXZ - ?nullptr@@3Vnullptr_t@std@@A - ?numberToFixedPrecisionString@WTF@@YAPBDNIQAD_N@Z - ?numberToFixedWidthString@WTF@@YAPBDNIQAD@Z - ?numberToString@WTF@@YAPBDNQAD@Z - ?objectAtScope@JSScope@JSC@@SAPAVJSObject@2@PAV12@@Z - ?objectCount@Heap@JSC@@QAEIXZ - ?objectProtoFuncToString@JSC@@YI_JPAVExecState@1@@Z - ?objectTypeCounts@Heap@JSC@@QAE?AV?$PassOwnPtr@V?$HashCountedSet@PBDU?$PtrHash@PBD@WTF@@U?$HashTraits@PBD@2@@WTF@@@WTF@@XZ - ?parseDateFromNullTerminatedCharacters@WTF@@YANPBD@Z - ?parseDoubleFromLongString@Internal@WTF@@YANPB_WIAAI@Z - ?positiveInfiniteTime@MediaTime@WTF@@SAABV12@XZ - ?process@InstrumentedPointerBase@MemoryInstrumentation@WTF@@QAEXPAV23@@Z - ?profiler@Profiler@JSC@@SAPAV12@XZ - ?protect@Heap@JSC@@QAEXVJSValue@2@@Z - ?protectedGlobalObjectCount@Heap@JSC@@QAEIXZ - ?protectedObjectCount@Heap@JSC@@QAEIXZ - ?protectedObjectTypeCounts@Heap@JSC@@QAE?AV?$PassOwnPtr@V?$HashCountedSet@PBDU?$PtrHash@PBD@WTF@@U?$HashTraits@PBD@2@@WTF@@@WTF@@XZ - ?put@JSGlobalObject@JSC@@SAXPAVJSCell@2@PAVExecState@2@VPropertyName@2@VJSValue@2@AAVPutPropertySlot@2@@Z - ?put@JSObject@JSC@@SAXPAVJSCell@2@PAVExecState@2@VPropertyName@2@VJSValue@2@AAVPutPropertySlot@2@@Z - ?put@JSProxy@JSC@@KAXPAVJSCell@2@PAVExecState@2@VPropertyName@2@VJSValue@2@AAVPutPropertySlot@2@@Z - ?putByIndex@JSObject@JSC@@SAXPAVJSCell@2@PAVExecState@2@IVJSValue@2@_N@Z - ?putByIndex@JSProxy@JSC@@KAXPAVJSCell@2@PAVExecState@2@IVJSValue@2@_N@Z - ?putDirectIndexBeyondVectorLength@JSObject@JSC@@AAE_NPAVExecState@2@IVJSValue@2@IW4PutDirectIndexMode@2@@Z - ?putDirectMayBeIndex@JSObject@JSC@@QAEXPAVExecState@2@VPropertyName@2@VJSValue@2@@Z - ?putDirectVirtual@JSGlobalObject@JSC@@SAXPAVJSObject@2@PAVExecState@2@VPropertyName@2@VJSValue@2@I@Z - ?putDirectVirtual@JSObject@JSC@@SAXPAV12@PAVExecState@2@VPropertyName@2@VJSValue@2@I@Z - ?putDirectVirtual@JSProxy@JSC@@KAXPAVJSObject@2@PAVExecState@2@VPropertyName@2@VJSValue@2@I@Z - ?randomNumber@WTF@@YANXZ - ?recompileAllJSFunctions@Debugger@JSC@@QAEXPAVJSGlobalData@2@@Z - ?regExpFlags@JSC@@YA?AW4RegExpFlags@1@ABVString@WTF@@@Z - ?reifyString@StringBuilder@WTF@@ABEXXZ - ?releaseDecommitted@OSAllocator@WTF@@SAXPAXI@Z - ?releaseExecutableMemory@JSGlobalData@JSC@@QAEXXZ - ?removeBlock@MarkedAllocator@JSC@@QAEXPAVMarkedBlock@2@@Z - ?removeDirect@JSObject@JSC@@QAE_NAAVJSGlobalData@2@VPropertyName@2@@Z - ?reportAbandonedObjectGraph@Heap@JSC@@QAEXXZ - ?reportExtraMemoryCostSlowCase@Heap@JSC@@AAEXI@Z - ?reportSuccess@HeapStatistics@JSC@@SAXXZ - ?reserveAndCommit@OSAllocator@WTF@@SAPAXIW4Usage@12@_N11@Z - ?reserveCapacity@StringBuilder@WTF@@QAEXI@Z - ?reset@ParserArena@JSC@@QAEXXZ - ?reset@TimeoutChecker@JSC@@QAEXXZ - ?resetDateCache@JSGlobalData@JSC@@QAEXXZ - ?resize@StringBuilder@WTF@@QAEXI@Z - ?resizeOutOfLine@BitVector@WTF@@AAEXI@Z - ?resolveRope@JSRopeString@JSC@@ABEXPAVExecState@2@@Z - ?restoreAll@Profile@JSC@@QAEXXZ - ?retrieveCallerFromVMCode@Interpreter@JSC@@QBE?AVJSValue@2@PAVExecState@2@PAVJSFunction@2@@Z - ?retrieveLastCaller@Interpreter@JSC@@QBEXPAVExecState@2@AAH1AAVString@WTF@@AAVJSValue@2@@Z - ?setConfigurable@PropertyDescriptor@JSC@@QAEX_N@Z - ?setDescriptor@PropertyDescriptor@JSC@@QAEXVJSValue@2@I@Z - ?setEnumerable@PropertyDescriptor@JSC@@QAEX_N@Z - ?setGarbageCollectionTimerEnabled@Heap@JSC@@QAEX_N@Z - ?setGetter@PropertyDescriptor@JSC@@QAEXVJSValue@2@@Z - ?setGlobalThis@JSGlobalObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSObject@2@@Z - ?setIndexQuicklyToUndecided@JSObject@JSC@@AAEXAAVJSGlobalData@2@IVJSValue@2@@Z - ?setLoc@StatementNode@JSC@@QAEXHH@Z - ?setMainThreadCallbacksPaused@WTF@@YAX_N@Z - ?setOption@Options@JSC@@SA_NPBD@Z - ?setOrderLowerFirst@Collator@WTF@@QAEX_N@Z - ?setPrototype@JSObject@JSC@@QAEXAAVJSGlobalData@2@VJSValue@2@@Z - ?setSetter@PropertyDescriptor@JSC@@QAEXVJSValue@2@@Z - ?setTarget@JSProxy@JSC@@IAEXAAVJSGlobalData@2@PAVJSGlobalObject@2@@Z - ?setter@PropertyDescriptor@JSC@@QBE?AVJSValue@2@XZ - ?setToCurrentLocalTime@GregorianDateTime@WTF@@QAEXXZ - ?setUndefined@PropertyDescriptor@JSC@@QAEXXZ - ?setUpStaticFunctionSlot@JSC@@YA_NPAVExecState@1@PBVHashEntry@1@PAVJSObject@1@VPropertyName@1@AAVPropertySlot@1@@Z - ?setWritable@PropertyDescriptor@JSC@@QAEX_N@Z - ?shrinkToFit@StringBuilder@WTF@@QAEXXZ - ?signal@ThreadCondition@WTF@@QAEXXZ - ?singleCharacterStringRep@SmallStrings@JSC@@QAEPAVStringImpl@WTF@@E@Z - ?size@Heap@JSC@@QAEIXZ - ?slowAppend@MarkedArgumentBuffer@JSC@@AAEXVJSValue@2@@Z - ?slowValidateCell@JSC@@YAXPAVJSCell@1@@Z - ?slowValidateCell@JSC@@YAXPAVJSGlobalObject@1@@Z - ?sourceCode@JSFunction@JSC@@QBEPBVSourceCode@2@XZ - ?startProfiling@Profiler@JSC@@QAEXPAVExecState@2@ABVString@WTF@@@Z - ?startSampling@JSGlobalData@JSC@@QAEXXZ - ?stopProfiling@Profiler@JSC@@QAE?AV?$PassRefPtr@VProfile@JSC@@@WTF@@PAVExecState@2@ABVString@4@@Z - ?stopSampling@JSGlobalData@JSC@@QAEXXZ - ?string@OpaqueJSString@@QBE?AVString@WTF@@XZ - ?StringToDouble@StringToDoubleConverter@double_conversion@WTF@@SANPBDIPAI@Z - ?suggestedNewOutOfLineStorageCapacity@Structure@JSC@@QAEIXZ - ?sweeper@Heap@JSC@@QAEPAVIncrementalSweeper@2@XZ - ?synthesizePrototype@JSValue@JSC@@QBEPAVJSObject@2@PAVExecState@2@@Z - ?thisObject@DebuggerCallFrame@JSC@@QBEPAVJSObject@2@XZ - ?throwError@JSC@@YA?AVJSValue@1@PAVExecState@1@V21@@Z - ?throwError@JSC@@YAPAVJSObject@1@PAVExecState@1@PAV21@@Z - ?throwSyntaxError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?throwTypeError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?throwTypeError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVString@WTF@@@Z - ?timedWait@ThreadCondition@WTF@@QAE_NAAVMutex@2@N@Z - ?tlsKeyCount@WTF@@YAAAJXZ - ?tlsKeys@WTF@@YAPAKXZ - ?toBoolean@JSString@JSC@@QBE_NXZ - ?toDouble@MediaTime@WTF@@QBENXZ - ?ToExponential@DoubleToStringConverter@double_conversion@WTF@@QBE_NNHPAVStringBuilder@23@@Z - ?ToFixed@DoubleToStringConverter@double_conversion@WTF@@QBE_NNHPAVStringBuilder@23@@Z - ?toFloat@MediaTime@WTF@@QBEMXZ - ?toInt32@JSC@@YAHN@Z - ?toInteger@JSValue@JSC@@QBENPAVExecState@2@@Z - ?toNumberSlowCase@JSValue@JSC@@ABENPAVExecState@2@@Z - ?toObject@JSCell@JSC@@QBEPAVJSObject@2@PAVExecState@2@PAVJSGlobalObject@2@@Z - ?toObjectSlowCase@JSValue@JSC@@ABEPAVJSObject@2@PAVExecState@2@PAVJSGlobalObject@2@@Z - ?ToPrecision@DoubleToStringConverter@double_conversion@WTF@@QBE_NNHPAVStringBuilder@23@@Z - ?ToShortest@DoubleToStringConverter@double_conversion@WTF@@QBE_NNPAVStringBuilder@23@@Z - ?toString@JSObject@JSC@@QBEPAVJSString@2@PAVExecState@2@@Z - ?toStringDecimal@DecimalNumber@WTF@@QBEIPAEI@Z - ?toStringExponential@DecimalNumber@WTF@@QBEIPAEI@Z - ?toStringSlowCase@JSValue@JSC@@ABEPAVJSString@2@PAVExecState@2@@Z - ?toThisObject@JSGlobalObject@JSC@@KAPAVJSObject@2@PAVJSCell@2@PAVExecState@2@@Z - ?toThisObject@JSObject@JSC@@SAPAV12@PAVJSCell@2@PAVExecState@2@@Z - ?toThisObjectSlowCase@JSValue@JSC@@ABEPAVJSObject@2@PAVExecState@2@@Z - ?toWTFStringSlowCase@JSValue@JSC@@ABE?AVString@WTF@@PAVExecState@2@@Z - ?transfer@ArrayBuffer@WTF@@QAE_NAAVArrayBufferContents@2@AAV?$Vector@V?$RefPtr@VArrayBufferView@WTF@@@WTF@@$0A@@2@@Z - ?tryAllocateSlowCase@CopiedSpace@JSC@@AAE?AVCheckedBoolean@@IPAPAX@Z - ?tryFastCalloc@WTF@@YA?AUTryMallocReturnValue@1@II@Z - ?tryFastMalloc@WTF@@YA?AUTryMallocReturnValue@1@I@Z - ?tryFastRealloc@WTF@@YA?AUTryMallocReturnValue@1@PAXI@Z - ?tryLock@Mutex@WTF@@QAE_NXZ - ?type@DebuggerCallFrame@JSC@@QBE?AW4Type@12@XZ - ?unlock@JSLock@JSC@@QAEXXZ - ?unlock@Mutex@WTF@@QAEXXZ - ?unlockAtomicallyInitializedStaticMutex@WTF@@YAXXZ - ?unprotect@Heap@JSC@@QAE_NVJSValue@2@@Z - ?updateIndexingType@ArrayAllocationProfile@JSC@@QAEXXZ - ?validate@SlotVisitor@JSC@@CAXPAVJSCell@2@@Z - ?visitChildren@JSGlobalObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z - ?visitChildren@JSObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z - ?visitChildren@JSProxy@JSC@@KAXPAVJSCell@2@AAVSlotVisitor@2@@Z - ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z - ?waitForThreadCompletion@WTF@@YAHI@Z - ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z - ?writable@PropertyDescriptor@JSC@@QBE_NXZ - ?writeBarrier@HandleSet@JSC@@QAEXPAVJSValue@2@ABV32@@Z - ?yield@WTF@@YAXXZ - ?zeroTime@MediaTime@WTF@@SAABV12@XZ - WTFGetBacktrace - WTFInvokeCrashHook - WTFLog - WTFLogAlways - WTFLogVerbose - WTFReportArgumentAssertionFailure - WTFReportAssertionFailure - WTFReportAssertionFailureWithMessage - WTFReportBacktrace - WTFReportError - WTFSetCrashHook diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj deleted file mode 100644 index e8eda62f9..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj +++ /dev/null @@ -1,2668 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops deleted file mode 100644 index fe884aa43..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops deleted file mode 100644 index 8c9e31f47..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops deleted file mode 100644 index 236dd7b0e..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops deleted file mode 100644 index 6de574be5..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops deleted file mode 100644 index 90223be1a..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops deleted file mode 100644 index 4238d1572..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make deleted file mode 100644 index c7c640b0d..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make +++ /dev/null @@ -1,12 +0,0 @@ -all: - touch "%ConfigurationBuildDir%\buildfailed" - bash build-generated-files.sh "%ConfigurationBuildDir%" "$(WEBKITLIBRARIESDIR)" - copy-files.cmd - - -del "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdbool.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdint.h" - -del "%ConfigurationBuildDir%\buildfailed" - -clean: - -del "%ConfigurationBuildDir%\buildfailed" - copy-files.cmd clean - -del /s /q "%ConfigurationBuildDir%\obj\JavaScriptCore\DerivedSources" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj deleted file mode 100644 index 394f2b8aa..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops deleted file mode 100644 index eb747a0ca..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops deleted file mode 100644 index 5bee6ea49..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops deleted file mode 100644 index 61e5c297b..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops deleted file mode 100644 index 5bd330bd8..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops deleted file mode 100644 index 6fbc585d6..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops deleted file mode 100644 index 5e9c39950..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops deleted file mode 100644 index d0f5b47e3..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops deleted file mode 100644 index 649ec1fb8..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops deleted file mode 100644 index 647b3ac18..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd deleted file mode 100644 index 233c45cb5..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd +++ /dev/null @@ -1,2 +0,0 @@ -if exist "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" "%WEBKITLIBRARIESDIR%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%" -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd deleted file mode 100644 index a77077674..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd +++ /dev/null @@ -1,6 +0,0 @@ -%SystemDrive%\cygwin\bin\which.exe bash -if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% -cmd /c -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" -if errorlevel 1 exit 1 -echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd deleted file mode 100644 index 3ff506931..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd +++ /dev/null @@ -1,9 +0,0 @@ -mkdir 2>NUL "%IntDir%\lib" - -if exist "%WebKitLibrariesDir%\lib\icuuc%LibraryConfigSuffix%.lib" copy /y "%WebKitLibrariesDir%\lib\icuuc%LibraryConfigSuffix%.lib" "%IntDir%\lib\libicuuc%LibraryConfigSuffix%.lib" -if exist "%WebKitLibrariesDir%\lib\icuin%LibraryConfigSuffix%.lib" copy /y "%WebKitLibrariesDir%\lib\icuin%LibraryConfigSuffix%.lib" "%IntDir%\lib\libicuin%LibraryConfigSuffix%.lib" - -if exist "%WebKitLibrariesDir%\lib\libicuuc%LibraryConfigSuffix%.lib" copy /y "%WebKitLibrariesDir%\lib\libicuuc%LibraryConfigSuffix%.lib" "%IntDir%\lib" -if exist "%WebKitLibrariesDir%\lib\libicuin%LibraryConfigSuffix%.lib" copy /y "%WebKitLibrariesDir%\lib\libicuin%LibraryConfigSuffix%.lib" "%IntDir%\lib" - -cmd /c diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops deleted file mode 100644 index 0822117f5..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops deleted file mode 100644 index 614c7a0d9..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops deleted file mode 100644 index 05f1b77c9..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops deleted file mode 100644 index c17193942..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops deleted file mode 100644 index 0c7c2d3c7..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh deleted file mode 100755 index 56316e9d7..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/bash - -NUMCPUS=`../../../../Tools/Scripts/num-cpus` - -XSRCROOT="`pwd`/../.." -XSRCROOT=`realpath "$XSRCROOT"` -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XSRCROOT=`cygpath -m -s "$XSRCROOT"` -XSRCROOT=`cygpath -u "$XSRCROOT"` -export XSRCROOT -export SOURCE_ROOT=$XSRCROOT - -XDSTROOT="$1" -export XDSTROOT -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XDSTROOT=`cygpath -m -s "$XDSTROOT"` -XDSTROOT=`cygpath -u "$XDSTROOT"` -export XDSTROOT - -SDKROOT="$2" -export SDKROOT -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -SDKROOT=`cygpath -m -s "$SDKROOT"` -SDKROOT=`cygpath -u "$SDKROOT"` -export SDKROOT - -export BUILT_PRODUCTS_DIR="$XDSTROOT/obj/JavaScriptCore" - -mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/docs" -cd "${BUILT_PRODUCTS_DIR}/DerivedSources" - -export JavaScriptCore="${XSRCROOT}" -export DFTABLES_EXTENSION=".exe" -make -f "$JavaScriptCore/DerivedSources.make" -j ${NUMCPUS} || exit 1 diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd deleted file mode 100755 index 0a32c319a..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd +++ /dev/null @@ -1,67 +0,0 @@ -@echo off - -set PublicHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\JavaScriptCore -set PrivateHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\private\JavaScriptCore -set ResourcesDirectory=%CONFIGURATIONBUILDDIR%\bin\JavaScriptCore.resources - -if "%1" EQU "clean" goto :clean -if "%1" EQU "rebuild" call :clean - -echo Copying public headers... -mkdir "%PublicHeadersDirectory%" 2>NUL -for %%f in ( - APICast.h - APIShims.h - JSBase.h - JSContextRef.h - JSContextRefPrivate.h - JSObjectRef.h - JSObjectRefPrivate.h - JSRetainPtr.h - JSRetainPtr.h - JSStringRef.h - JSStringRefBSTR.h - JSStringRefCF.h - JSValueRef.h - JSWeakObjectMapRefInternal.h - JSWeakObjectMapRefPrivate.h - JavaScript.h - JavaScriptCore.h - OpaqueJSString.h - WebKitAvailability.h -) do ( - xcopy /y /d ..\..\API\%%f "%PublicHeadersDirectory%" >NUL -) - -echo Copying private headers... -mkdir "%PrivateHeadersDirectory%" 2>NUL -for %%d in ( - assembler - bytecode - dfg - disassembler - heap - debugger - interpreter - jit - llint - parser - profiler - runtime - yarr -) do ( - xcopy /y /d ..\..\%%d\*.h "%PrivateHeadersDirectory%" >NUL -) - -echo Copying resources... -mkdir "%ResourcesDirectory%" 2>NUL -xcopy /y /d ..\JavaScriptCore.resources\* "%ResourcesDirectory%" >NUL - -goto :EOF - -:clean - -echo Deleting copied files... -if exist "%PublicHeadersDirectory%" rmdir /s /q "%PublicHeadersDirectory%" >NUL -if exist "%PrivateHeadersDirectory%" rmdir /s /q "%PrivateHeadersDirectory%" >NUL -if exist "%ResourcesDirectory%" rmdir /s /q "%ResourcesDirectory%" >NUL diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln deleted file mode 100644 index a706a9c51..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln +++ /dev/null @@ -1,80 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}" - ProjectSection(ProjectDependencies) = postProject - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "jsc\jsc.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}" - ProjectSection(ProjectDependencies) = postProject - {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_All|Win32 = Debug_All|Win32 - Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32 - Debug|Win32 = Debug|Win32 - Production|Win32 = Production|Win32 - Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32 - Release_PGO_Optimize|Win32 = Release_PGO_Optimize|Win32 - Release_PGO|Win32 = Release_PGO|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Production|Win32.ActiveCfg = Production|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Production|Win32.Build.0 = Production|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO_Optimize|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO_Optimize|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_PGO|Win32.Build.0 = Release_PGO|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = Debug|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = Debug|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Production|Win32.ActiveCfg = Production|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Production|Win32.Build.0 = Production|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_PGO|Win32.Build.0 = Release_PGO|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = Release|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = Release|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.ActiveCfg = Debug_All|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Production|Win32.ActiveCfg = Production|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Production|Win32.Build.0 = Production|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_PGO|Win32.Build.0 = Release_PGO|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.make b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.make deleted file mode 100644 index ea4a72902..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.make +++ /dev/null @@ -1,9 +0,0 @@ -all: - touch "%ConfigurationBuildDir%\buildfailed" - bash build-LLIntAssembly.sh "%ConfigurationBuildDir%" "$(WEBKITLIBRARIESDIR)" - -del "%ConfigurationBuildDir%\buildfailed" - -clean: - -del "%ConfigurationBuildDir%\buildfailed" - -del /s /q "%ConfigurationBuildDir%\obj\LLIntOffsetsExtractor\LLIntOffsetsExtractor.exe" - -del /s /q "%ConfigurationBuildDir%\obj\JavaScriptCore\DerivedSources\LLIntAssembly.h" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.vcproj deleted file mode 100644 index ed6aae895..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.vcproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/build-LLIntAssembly.sh b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/build-LLIntAssembly.sh deleted file mode 100755 index a809be776..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntAssembly/build-LLIntAssembly.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/bash - -SRCROOT="`pwd`/../.." -SRCROOT=`realpath "$SRCROOT"` -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -SRCROOT=`cygpath -m -s "$SRCROOT"` -SRCROOT=`cygpath -u "$SRCROOT"` -export SRCROOT - -XDSTROOT="$1" -export XDSTROOT -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XDSTROOT=`cygpath -m -s "$XDSTROOT"` -XDSTROOT=`cygpath -u "$XDSTROOT"` -export XDSTROOT - -export BUILT_PRODUCTS_DIR="$XDSTROOT/obj" - -cd "${BUILT_PRODUCTS_DIR}/JavaScriptCore/DerivedSources" - -############################################################################## -# Step 3: Build LLIntOffsetsExtractor - -/usr/bin/env ruby "${SRCROOT}/offlineasm/asm.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntOffsetsExtractor/LLIntOffsetsExtractor.exe" "LLIntAssembly.h" || exit 1 diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make deleted file mode 100644 index 996c92377..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make +++ /dev/null @@ -1,9 +0,0 @@ -all: - touch "%ConfigurationBuildDir%\buildfailed" - bash build-LLIntDesiredOffsets.sh "%ConfigurationBuildDir%" "$(WEBKITLIBRARIESDIR)" - - -del "%ConfigurationBuildDir%\buildfailed" - -clean: - -del "%ConfigurationBuildDir%\buildfailed" - -del /s /q "%ConfigurationBuildDir%\obj\JavaScriptCore\DerivedSources\LLIntDesiredOffsets.h" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcproj deleted file mode 100644 index 0ece351b0..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcproj +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh deleted file mode 100755 index 57d715ca1..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/bash - -SRCROOT="`pwd`/../.." -SRCROOT=`realpath "$SRCROOT"` -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -SRCROOT=`cygpath -m -s "$SRCROOT"` -SRCROOT=`cygpath -u "$SRCROOT"` -export SRCROOT - -XDSTROOT="$1" -export XDSTROOT -# Do a little dance to get the path into 8.3 form to make it safe for gnu make -# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 -XDSTROOT=`cygpath -m -s "$XDSTROOT"` -XDSTROOT=`cygpath -u "$XDSTROOT"` -export XDSTROOT - -export BUILT_PRODUCTS_DIR="$XDSTROOT/obj/JavaScriptCore/DerivedSources" - -############################################################################## -# Step 1: Generate LLIntDesiredOffsets.h -mkdir -p "${BUILT_PRODUCTS_DIR}" - -/usr/bin/env ruby "${SRCROOT}/offlineasm/generate_offset_extractor.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntDesiredOffsets.h" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcproj deleted file mode 100644 index 4862b658a..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcproj +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.vsprops deleted file mode 100644 index 6340081d9..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.vsprops +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.vsprops deleted file mode 100644 index 69c0a2738..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugAll.vsprops deleted file mode 100644 index e508f9160..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugCairoCFLite.vsprops deleted file mode 100644 index 33804ca90..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.vsprops deleted file mode 100644 index 3683199fd..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.vsprops deleted file mode 100644 index b2f4e872d..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleaseCairoCFLite.vsprops deleted file mode 100644 index 4adb12216..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleasePGO.vsprops deleted file mode 100644 index 331f96af2..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleasePGO.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj deleted file mode 100644 index 5997d9f93..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops deleted file mode 100644 index 9bb7fe93a..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebug.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebug.vsprops deleted file mode 100644 index f2765fba4..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops deleted file mode 100644 index 4a2727d0d..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops deleted file mode 100644 index 5f0db2314..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPostBuild.cmd deleted file mode 100644 index 4dafacbbc..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPostBuild.cmd +++ /dev/null @@ -1,25 +0,0 @@ -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" - -mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt46.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt46.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt46%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt46%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt44.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt44.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt44%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt44%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\libicuin%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libicuin%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\libicuuc%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libicuuc%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%CONFIGURATIONBUILDDIR%\bin\CoreFoundation.resources" -if exist "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\ASL%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\ASL%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\libdispatch%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libdispatch%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" - -cmd /c diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreBuild.cmd deleted file mode 100644 index a77077674..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreBuild.cmd +++ /dev/null @@ -1,6 +0,0 @@ -%SystemDrive%\cygwin\bin\which.exe bash -if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% -cmd /c -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" -if errorlevel 1 exit 1 -echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreLink.cmd deleted file mode 100644 index 85230262d..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreLink.cmd +++ /dev/null @@ -1,9 +0,0 @@ -mkdir 2>NUL "%INTDIR%\lib" - -if exist "%WEBKITLIBRARIESDIR%\lib\icuuc%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\icuuc%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" -if exist "%WEBKITLIBRARIESDIR%\lib\icuin%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\icuin%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" - -if exist "%WEBKITLIBRARIESDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib" -if exist "%WEBKITLIBRARIESDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib" - -cmd /c diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops deleted file mode 100644 index f450e5520..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops deleted file mode 100644 index b3dbed9a6..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops deleted file mode 100644 index 29b0e5527..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops deleted file mode 100644 index 800a821bb..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj deleted file mode 100755 index 9362d775a..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops deleted file mode 100755 index 2e8edfb49..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops deleted file mode 100755 index e71f2e7ce..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops deleted file mode 100755 index 5590713ea..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops deleted file mode 100755 index fddb47257..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd deleted file mode 100755 index 4dafacbbc..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd +++ /dev/null @@ -1,25 +0,0 @@ -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" - -mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt46.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt46.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt46%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt46%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt44.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt44.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt44%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt44%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\libicuin%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libicuin%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\libicuuc%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libicuuc%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%CONFIGURATIONBUILDDIR%\bin\CoreFoundation.resources" -if exist "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\ASL%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\ASL%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" -if exist "%WEBKITLIBRARIESDIR%\bin\libdispatch%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libdispatch%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin" - -cmd /c diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd deleted file mode 100755 index a77077674..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd +++ /dev/null @@ -1,6 +0,0 @@ -%SystemDrive%\cygwin\bin\which.exe bash -if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% -cmd /c -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" -if errorlevel 1 exit 1 -echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd deleted file mode 100755 index 85230262d..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd +++ /dev/null @@ -1,9 +0,0 @@ -mkdir 2>NUL "%INTDIR%\lib" - -if exist "%WEBKITLIBRARIESDIR%\lib\icuuc%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\icuuc%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" -if exist "%WEBKITLIBRARIESDIR%\lib\icuin%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\icuin%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" - -if exist "%WEBKITLIBRARIESDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib" -if exist "%WEBKITLIBRARIESDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib" - -cmd /c diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops deleted file mode 100755 index d6d7a9fd2..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops deleted file mode 100755 index d34a44e4c..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops deleted file mode 100755 index 2f0199486..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops deleted file mode 100755 index 771999f24..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj deleted file mode 100644 index de9518e16..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops deleted file mode 100644 index a15d04d23..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebug.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebug.vsprops deleted file mode 100644 index f17de961b..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebug.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops deleted file mode 100644 index 9e5f2c515..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops deleted file mode 100644 index 821c88574..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd deleted file mode 100644 index 0820433b0..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd +++ /dev/null @@ -1,3 +0,0 @@ -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" - -xcopy /y /d "%PROJECTDIR%\..\..\API\tests\testapi.js" "%OUTDIR%" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd deleted file mode 100644 index a77077674..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd +++ /dev/null @@ -1,6 +0,0 @@ -%SystemDrive%\cygwin\bin\which.exe bash -if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% -cmd /c -if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" -if errorlevel 1 exit 1 -echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreLink.cmd deleted file mode 100644 index 85230262d..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreLink.cmd +++ /dev/null @@ -1,9 +0,0 @@ -mkdir 2>NUL "%INTDIR%\lib" - -if exist "%WEBKITLIBRARIESDIR%\lib\icuuc%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\icuuc%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" -if exist "%WEBKITLIBRARIESDIR%\lib\icuin%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\icuin%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" - -if exist "%WEBKITLIBRARIESDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\libicuuc%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib" -if exist "%WEBKITLIBRARIESDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" copy /y "%WEBKITLIBRARIESDIR%\lib\libicuin%LIBRARYCONFIGSUFFIX%.lib" "%INTDIR%\lib" - -cmd /c diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops deleted file mode 100644 index 4dbc0c185..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops deleted file mode 100644 index 15ad84ffd..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops deleted file mode 100644 index 692de7447..000000000 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.make b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.make new file mode 100644 index 000000000..311dfed53 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.make @@ -0,0 +1,30 @@ +!IF defined(BUILDSTYLE) && "$(BUILDSTYLE)"=="DEBUG" +BUILDSTYLE=DebugSuffix +!ELSE +BUILDSTYLE=Production +!ENDIF + +install: + set OFFICIAL_BUILD=1 + set WebKit_Libraries=$(SRCROOT)\AppleInternal + set WebKit_OutputDir=$(OBJROOT) + set ProgramFilesAAS=Program Files (x86)\Common Files\Apple\Apple Application Support + set Path=%PATH%;$(SRCROOT)\%ProgramFilesAAS% + set ConfigurationBuildDir=$(OBJROOT)\$(BUILDSTYLE) + -mkdir "%ConfigurationBuildDir%\include\private" + xcopy "%WebKit_Libraries%\include\private\*" "%ConfigurationBuildDir%\include\private" /e/v/i/h/y + devenv "JavaScriptCore.submit.sln" /clean $(BUILDSTYLE) + devenv "JavaScriptCore.submit.sln" /build $(BUILDSTYLE) + -xcopy "%ConfigurationBuildDir%\bin32\JavaScriptCore.dll" "$(DSTROOT)\%ProgramFilesAAS%\" /e/v/i/h/y + -xcopy "%ConfigurationBuildDir%\bin32\JavaScriptCore_debug.dll" "$(DSTROOT)\%ProgramFilesAAS%\" /e/v/i/h/y + -xcopy "%ConfigurationBuildDir%\bin32\JavaScriptCore.pdb" "$(DSTROOT)\%ProgramFilesAAS%\" /e/v/i/h/y + -xcopy "%ConfigurationBuildDir%\bin32\JavaScriptCore_debug.pdb" "$(DSTROOT)\%ProgramFilesAAS%\" /e/v/i/h/y + -xcopy "%ConfigurationBuildDir%\bin32\jsc.exe" "$(DSTROOT)\AppleInternal\bin32\" /e/v/i/h/y + -xcopy "%ConfigurationBuildDir%\bin32\jsc_debug.exe" "$(DSTROOT)\AppleInternal\bin32\" /e/v/i/h/y + -xcopy "%ConfigurationBuildDir%\bin32\jsc.pdb" "$(DSTROOT)\AppleInternal\bin32\" /e/v/i/h/y + -xcopy "%ConfigurationBuildDir%\bin32\jsc_debug.pdb" "$(DSTROOT)\AppleInternal\bin32\" /e/v/i/h/y + xcopy "%ConfigurationBuildDir%\include\*" "$(DSTROOT)\AppleInternal\include\" /e/v/i/h/y + xcopy "%ConfigurationBuildDir%\lib32\*" "$(DSTROOT)\AppleInternal\lib32\" /e/v/i/h/y + xcopy "%ConfigurationBuildDir%\bin32\JavaScriptCore.resources\*" "$(DSTROOT)\%ProgramFilesAAS%\JavaScriptCore.resources" /e/v/i/h/y + -mkdir "$(DSTROOT)\AppleInternal\Sources32\JavaScriptCore" + xcopy "%ConfigurationBuildDir%\obj32\JavaScriptCore\DerivedSources\*" "$(DSTROOT)\AppleInternal\Sources32\JavaScriptCore" /e/v/i/h/y diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist new file mode 100644 index 000000000..f69d73f5a --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + JavaScriptCore + CFBundleGetInfoString + 530, Copyright 2003-2013 Apple Inc. + CFBundleIdentifier + com.apple.JavaScriptCore + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + JavaScriptCore + CFBundlePackageType + APPL + CFBundleShortVersionString + 530 + CFBundleVersion + 530 + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.submit.sln b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.submit.sln new file mode 100644 index 000000000..296f59f7b --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.submit.sln @@ -0,0 +1,78 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "JavaScriptCore.vcxproj", "{22413D41-3A18-42B7-92A8-CEDC6CE86920}" + ProjectSection(ProjectDependencies) = postProject + {3670D01F-95F3-45A8-B878-947EB6CF214E} = {3670D01F-95F3-45A8-B878-947EB6CF214E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "JavaScriptCoreGenerated.vcxproj", "{3670D01F-95F3-45A8-B878-947EB6CF214E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "jsc\jsc.vcxproj", "{2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}" + ProjectSection(ProjectDependencies) = postProject + {22413D41-3A18-42B7-92A8-CEDC6CE86920} = {22413D41-3A18-42B7-92A8-CEDC6CE86920} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testRegExp", "testRegExp\testRegExp.vcxproj", "{BB16286B-AADC-46C1-BC0D-6C06F323E04B}" + ProjectSection(ProjectDependencies) = postProject + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3} = {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "testapi\testapi.vcxproj", "{5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}" + ProjectSection(ProjectDependencies) = postProject + {BB16286B-AADC-46C1-BC0D-6C06F323E04B} = {BB16286B-AADC-46C1-BC0D-6C06F323E04B} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + DebugSuffix|Win32 = DebugSuffix|Win32 + Production|Win32 = Production|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.Debug|Win32.ActiveCfg = Debug|Win32 + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.Debug|Win32.Build.0 = Debug|Win32 + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.DebugSuffix|Win32.ActiveCfg = DebugSuffix|Win32 + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.DebugSuffix|Win32.Build.0 = DebugSuffix|Win32 + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.Production|Win32.ActiveCfg = Production|Win32 + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.Production|Win32.Build.0 = Production|Win32 + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.Release|Win32.ActiveCfg = Release|Win32 + {22413D41-3A18-42B7-92A8-CEDC6CE86920}.Release|Win32.Build.0 = Release|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.Debug|Win32.Build.0 = Debug|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.DebugSuffix|Win32.ActiveCfg = DebugSuffix|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.DebugSuffix|Win32.Build.0 = DebugSuffix|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.Production|Win32.ActiveCfg = Production|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.Production|Win32.Build.0 = Production|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.Release|Win32.ActiveCfg = Release|Win32 + {3670D01F-95F3-45A8-B878-947EB6CF214E}.Release|Win32.Build.0 = Release|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.Debug|Win32.Build.0 = Debug|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.DebugSuffix|Win32.ActiveCfg = DebugSuffix|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.DebugSuffix|Win32.Build.0 = DebugSuffix|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.Production|Win32.ActiveCfg = Production|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.Production|Win32.Build.0 = Production|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.Release|Win32.ActiveCfg = Release|Win32 + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3}.Release|Win32.Build.0 = Release|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.Debug|Win32.ActiveCfg = Debug|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.Debug|Win32.Build.0 = Debug|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.DebugSuffix|Win32.ActiveCfg = DebugSuffix|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.DebugSuffix|Win32.Build.0 = DebugSuffix|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.Production|Win32.ActiveCfg = Production|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.Production|Win32.Build.0 = Production|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.Release|Win32.ActiveCfg = Release|Win32 + {BB16286B-AADC-46C1-BC0D-6C06F323E04B}.Release|Win32.Build.0 = Release|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.Debug|Win32.ActiveCfg = Debug|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.Debug|Win32.Build.0 = Debug|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.DebugSuffix|Win32.ActiveCfg = DebugSuffix|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.DebugSuffix|Win32.Build.0 = DebugSuffix|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.Production|Win32.ActiveCfg = Production|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.Production|Win32.Build.0 = Production|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.Release|Win32.ActiveCfg = Release|Win32 + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj new file mode 100644 index 000000000..907f28582 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj @@ -0,0 +1,931 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + {22413D41-3A18-42B7-92A8-CEDC6CE86920} + Win32Proj + JavaScriptCore2 + JavaScriptCore + + + + true + Unicode + DynamicLibrary + + + true + Unicode + DynamicLibrary + + + true + Unicode + DynamicLibrary + + + true + Unicode + DynamicLibrary + + + true + Unicode + DynamicLibrary + + + true + Unicode + DynamicLibrary + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document + + + Document + + + Document + + + + + true + true + true + true + true + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters new file mode 100644 index 000000000..5a0a3176a --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters @@ -0,0 +1,1940 @@ + + + + + {429783a1-5d6a-4019-ad1a-ddb2c98f9b6c} + + + {766088a0-1216-4854-aa43-560c5e283668} + + + {bddd153e-8c53-4515-ab9e-5d901686bd4f} + + + {6e0cb358-2fe7-46a4-8efd-f6649cee6370} + + + {9f7469bb-7833-4279-8d28-2fc71c632552} + + + {6c82539d-40d2-45a5-a663-8349c2141b1a} + + + {940f749b-a189-45be-83b9-b4e74ecf1486} + + + {bd49e5cf-95d6-4151-b286-8837ccd347fa} + + + {10d97ea3-2af9-489c-a54e-d69ef2e4ca0a} + + + {94d7eb64-3e51-4008-8536-0bcb6768ba9f} + + + {63e3dd92-7ea9-4723-b099-6c79a939dec0} + + + {e6a026a4-156a-4a59-9e3f-e8b54e665841} + + + {351dcbd2-e47e-4467-8609-53acfce72f91} + + + {3b9d72a5-135b-43b3-a524-c6d2b9d29d34} + + + {03eda3ec-bcb2-4474-b1b3-69ad771846a4} + + + {fac52666-842e-4d02-9d5f-844f54dca5f7} + + + {9ed0bc6e-7372-4795-9651-917c9e05c641} + + + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + assembler + + + assembler + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecodecompiler + + + bytecodecompiler + + + debugger + + + debugger + + + debugger + + + disassembler + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + parser + + + parser + + + parser + + + parser + + + parser + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + tools + + + tools + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + runtime + + + runtime + + + runtime + + + parser + + + runtime + + + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + API + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + assembler + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecode + + + bytecodecompiler + + + bytecodecompiler + + + bytecodecompiler + + + bytecodecompiler + + + debugger + + + debugger + + + debugger + + + dfg + + + dfg + + + disassembler + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + heap + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + interpreter + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + jit + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + llint + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + parser + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + profiler + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + runtime + + + tools + + + tools + + + tools + + + tools + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + yarr + + + + runtime + + + API + + + runtime + + + runtime + + + bytecode + + + runtime + + + runtime + + + API + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + Derived Sources + + + + + + + + + + jit + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCF.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCF.props new file mode 100644 index 000000000..081981bb7 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCF.props @@ -0,0 +1,12 @@ + + + + + + + + CoreFoundation$(DebugSuffix).lib;%(AdditionalDependencies) + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props new file mode 100644 index 000000000..cd3b5dd84 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props @@ -0,0 +1,12 @@ + + + + + + + + CFLite.lib;%(AdditionalDependencies) + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props new file mode 100644 index 000000000..901aaa35d --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props @@ -0,0 +1,19 @@ + + + + + + + + ..\;..\tools\;..\runtime\;..\llint\;..\jit\;..\disassembler\;..\heap\;..\debugger\;..\assembler\;..\profiler\;..\yarr\;..\interpreter\;..\bytecode\;..\dfg\;..\bytecompiler\;..\parser\;..\API\;$(ConfigurationBuildDir)\obj32\JavaScriptCore\DerivedSources\;$(ConfigurationBuildDir)\include\;$(ConfigurationBuildDir)\include\JavaScriptCore\;$(ConfigurationBuildDir)\include\private\;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories) + ICUVersion.h;%(ForcedIncludeFiles) + + + winmm.lib;libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;WTF$(DebugSuffix).lib;%(AdditionalDependencies) + + + Console + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebug.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebug.props new file mode 100644 index 000000000..1f0bd7dc3 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebug.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props new file mode 100644 index 000000000..3ccdbb1b3 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make new file mode 100644 index 000000000..e480fa711 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make @@ -0,0 +1,12 @@ +all: + touch "%ConfigurationBuildDir%\buildfailed" + bash build-generated-files.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" + copy-files.cmd + + -del "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdbool.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdint.h" + -del "%ConfigurationBuildDir%\buildfailed" + +clean: + -del "%ConfigurationBuildDir%\buildfailed" + copy-files.cmd clean + -del /s /q "%ConfigurationBuildDir%\obj32\JavaScriptCore\DerivedSources" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj new file mode 100644 index 000000000..d1f00cd0a --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj @@ -0,0 +1,214 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + {3670D01F-95F3-45A8-B878-947EB6CF214E} + MakeFileProj + + + + Makefile + true + + + Makefile + true + + + Makefile + true + + + Makefile + true + + + Makefile + true + + + Makefile + true + + + Makefile + false + + + Makefile + false + + + Makefile + false + + + Makefile + false + + + Makefile + false + + + Makefile + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WIN32;NDEBUG; + + + + WIN32;NDEBUG; + + + + WIN32;NDEBUG; + + + + WIN32;NDEBUG; + + + + WIN32;NDEBUG; + + + + WIN32;NDEBUG; + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters new file mode 100644 index 000000000..9dce732ff --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props new file mode 100644 index 000000000..36fc059a5 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props new file mode 100644 index 000000000..619e43a96 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props new file mode 100644 index 000000000..aef8ccf37 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props new file mode 100644 index 000000000..472cae9ec --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd new file mode 100644 index 000000000..8b0a3a458 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd @@ -0,0 +1,2 @@ +if exist "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%" +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd new file mode 100644 index 000000000..a77077674 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd @@ -0,0 +1,6 @@ +%SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd new file mode 100644 index 000000000..e69de29bb diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreProduction.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreProduction.props new file mode 100644 index 000000000..48e7f4217 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreProduction.props @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreRelease.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreRelease.props new file mode 100644 index 000000000..593388531 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreRelease.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props new file mode 100644 index 000000000..f5c263284 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make new file mode 100644 index 000000000..3708c2b6c --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make @@ -0,0 +1,8 @@ +all: + touch "%ConfigurationBuildDir%\buildfailed" + bash build-LLIntAssembly.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" + -del "%ConfigurationBuildDir%\buildfailed" + +clean: + -del "%ConfigurationBuildDir%\buildfailed" + -del /s /q "%ConfigurationBuildDir%\obj32\JavaScriptCore\DerivedSources\LLIntAssembly.h" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj new file mode 100644 index 000000000..4d50d4733 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj @@ -0,0 +1,271 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + {9221744B-5715-4F56-9590-42F7AB23DD8B} + LLIntAssembly + MakeFileProj + + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + + + + + + + + + + + + + + + + + + + + + + + + + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + LLIntAssembly.h + + + + + + + + + + + + + + + + + + + + + + + + + %SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +nmake /nologo -f $(ProjectName).make DEBUGSUFFIX=_debug + %SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +nmake /nologo -f $(ProjectName).make DEBUGSUFFIX=_debug + %SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +nmake /nologo -f $(ProjectName).make clean +nmake /nologo -f $(ProjectName).make DEBUGSUFFIX=_debug + %SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +nmake /nologo -f $(ProjectName).make clean +nmake /nologo -f $(ProjectName).make DEBUGSUFFIX=_debug + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh new file mode 100644 index 000000000..e8a3b37f4 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh @@ -0,0 +1,26 @@ +#!/usr/bin/bash + +SRCROOT="`pwd`/../../.." +SRCROOT=`realpath "$SRCROOT"` +# Do a little dance to get the path into 8.3 form to make it safe for gnu make +# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 +SRCROOT=`cygpath -m -s "$SRCROOT"` +SRCROOT=`cygpath -u "$SRCROOT"` +export SRCROOT + +XDSTROOT="$1" +export XDSTROOT +# Do a little dance to get the path into 8.3 form to make it safe for gnu make +# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 +XDSTROOT=`cygpath -m -s "$XDSTROOT"` +XDSTROOT=`cygpath -u "$XDSTROOT"` +export XDSTROOT + +export BUILT_PRODUCTS_DIR="$XDSTROOT/obj32" + +cd "${BUILT_PRODUCTS_DIR}/JavaScriptCore/DerivedSources" + +############################################################################## +# Step 3: Build LLIntOffsetsExtractor + +/usr/bin/env ruby "${SRCROOT}/offlineasm/asm.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntOffsetsExtractor/LLIntOffsetsExtractor${3}.exe" "LLIntAssembly.h" || exit 1 diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make new file mode 100644 index 000000000..f70c92bc4 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make @@ -0,0 +1,9 @@ +all: + touch "%ConfigurationBuildDir%\buildfailed" + bash build-LLIntDesiredOffsets.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" + + -del "%ConfigurationBuildDir%\buildfailed" + +clean: + -del "%ConfigurationBuildDir%\buildfailed" + -del /s /q "%ConfigurationBuildDir%\obj32\JavaScriptCore\DerivedSources\LLIntDesiredOffsets.h" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj new file mode 100644 index 000000000..135fb87bd --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj @@ -0,0 +1,257 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + {877150A0-41B3-4730-9D98-1B8298098B14} + LLIntDesiredOffsets + MakeFileProj + + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + Makefile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + + + + + + + + + + + + + + + + + + + + + + + + + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + LLIntDesiredOffsets.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh new file mode 100644 index 000000000..c3186fd7f --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh @@ -0,0 +1,25 @@ +#!/usr/bin/bash + +SRCROOT="`pwd`/../../.." +SRCROOT=`realpath "$SRCROOT"` +# Do a little dance to get the path into 8.3 form to make it safe for gnu make +# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 +SRCROOT=`cygpath -m -s "$SRCROOT"` +SRCROOT=`cygpath -u "$SRCROOT"` +export SRCROOT + +XDSTROOT="$1" +export XDSTROOT +# Do a little dance to get the path into 8.3 form to make it safe for gnu make +# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 +XDSTROOT=`cygpath -m -s "$XDSTROOT"` +XDSTROOT=`cygpath -u "$XDSTROOT"` +export XDSTROOT + +export BUILT_PRODUCTS_DIR="$XDSTROOT/obj32/JavaScriptCore/DerivedSources" + +############################################################################## +# Step 1: Generate LLIntDesiredOffsets.h +mkdir -p "${BUILT_PRODUCTS_DIR}" + +/usr/bin/env ruby "${SRCROOT}/offlineasm/generate_offset_extractor.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntDesiredOffsets.h" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj new file mode 100644 index 000000000..fffc03eb6 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj @@ -0,0 +1,199 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + {D595E3F6-24F2-4C60-935C-95D50C6B3E96} + LLIntOffsetsExtractor + + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + $(ConfigurationBuildDir)\obj32\$(ProjectName)\ + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props new file mode 100644 index 000000000..88c0a95a6 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props @@ -0,0 +1,19 @@ + + + + .exe + + + + $(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ConfigurationBuildDir)\obj32\JavaScriptCore\DerivedSources\;../../../;../../../os-win32/;../../../assembler/;../../../API/;../../../parser/;../../../heap/;../../../runtime/;../../../bytecode/;../../../interpreter/;../../../debugger/;../../../bytecompiler/;../../../profiler;../../../jit/;$(WebKit_Libraries)\include;%(AdditionalIncludeDirectories) + __STD_C;%(PreprocessorDefinitions) + ICUVersion.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + + + libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;winmm.lib;WTF$(DebugSuffix).lib;user32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories) + Console + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props new file mode 100644 index 000000000..462c5f5a6 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props new file mode 100644 index 000000000..3549dab89 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props new file mode 100644 index 000000000..d32fc860f --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props @@ -0,0 +1,15 @@ + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh b/Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh new file mode 100644 index 000000000..e6b7ebb98 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh @@ -0,0 +1,36 @@ +#!/usr/bin/bash + +NUMCPUS=`../../../Tools/Scripts/num-cpus` + +XSRCROOT="`pwd`/.." +XSRCROOT=`realpath "$XSRCROOT"` +# Do a little dance to get the path into 8.3 form to make it safe for gnu make +# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 +XSRCROOT=`cygpath -m "$XSRCROOT"` +XSRCROOT=`cygpath -u "$XSRCROOT"` +export XSRCROOT +export SOURCE_ROOT=$XSRCROOT +XDSTROOT="$1" +export XDSTROOT +# Do a little dance to get the path into 8.3 form to make it safe for gnu make +# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 +XDSTROOT=`cygpath -m -s "$XDSTROOT"` +XDSTROOT=`cygpath -u "$XDSTROOT"` +export XDSTROOT + +SDKROOT="$2" +export SDKROOT +# Do a little dance to get the path into 8.3 form to make it safe for gnu make +# http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 +SDKROOT=`cygpath -m -s "$SDKROOT"` +SDKROOT=`cygpath -u "$SDKROOT"` +export SDKROOT + +export BUILT_PRODUCTS_DIR="$XDSTROOT/obj32/JavaScriptCore" + +mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/docs" +cd "${BUILT_PRODUCTS_DIR}/DerivedSources" + +export JavaScriptCore="${XSRCROOT}" +export DFTABLES_EXTENSION=".exe" +make -f "$JavaScriptCore/DerivedSources.make" -j ${NUMCPUS} || exit 1 diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd new file mode 100755 index 000000000..8d1e46f1e --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd @@ -0,0 +1,68 @@ +@echo off + +set PublicHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\JavaScriptCore +set PrivateHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\private\JavaScriptCore +set ResourcesDirectory=%CONFIGURATIONBUILDDIR%\bin32\JavaScriptCore.resources + +if "%1" EQU "clean" goto :clean +if "%1" EQU "rebuild" call :clean + +echo Copying public headers... +mkdir "%PublicHeadersDirectory%" 2>NUL +for %%f in ( + APICast.h + APIShims.h + JSBase.h + JSClassRef.h + JSContextRef.h + JSContextRefPrivate.h + JSObjectRef.h + JSObjectRefPrivate.h + JSRetainPtr.h + JSRetainPtr.h + JSStringRef.h + JSStringRefBSTR.h + JSStringRefCF.h + JSValueRef.h + JSWeakObjectMapRefInternal.h + JSWeakObjectMapRefPrivate.h + JavaScript.h + JavaScriptCore.h + OpaqueJSString.h + WebKitAvailability.h +) do ( + xcopy /y /d ..\API\%%f "%PublicHeadersDirectory%" >NUL +) + +echo Copying private headers... +mkdir "%PrivateHeadersDirectory%" 2>NUL +for %%d in ( + assembler + bytecode + dfg + disassembler + heap + debugger + interpreter + jit + llint + parser + profiler + runtime + yarr +) do ( + xcopy /y /d ..\%%d\*.h "%PrivateHeadersDirectory%" >NUL +) + +echo Copying resources... +mkdir "%ResourcesDirectory%" 2>NUL +xcopy /y /d JavaScriptCore.resources\* "%ResourcesDirectory%" >NUL + +goto :EOF + +:clean + +echo Deleting copied files... +if exist "%PublicHeadersDirectory%" rmdir /s /q "%PublicHeadersDirectory%" >NUL +if exist "%PrivateHeadersDirectory%" rmdir /s /q "%PrivateHeadersDirectory%" >NUL +if exist "%ResourcesDirectory%" rmdir /s /q "%ResourcesDirectory%" >NUL diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj new file mode 100644 index 000000000..ca9e1f78f --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj @@ -0,0 +1,310 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + {2BD437CF-BDAC-4119-9ED6-E10EF46C69F3} + Win32Proj + jsc + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MaxSpeed + true + + + + + + + + MaxSpeed + true + + + + + + + + MaxSpeed + true + + + + + + + + MaxSpeed + true + + + + + + + + MaxSpeed + true + + + + + + + + MaxSpeed + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters new file mode 100644 index 000000000..47638ede7 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscCommon.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscCommon.props new file mode 100644 index 000000000..bed03fdfd --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscCommon.props @@ -0,0 +1,22 @@ + + + + + + .exe + + + + ..\..\;..\..\tools\;..\..\runtime\;..\..\llint\;..\..\jit\;..\..\disassembler\;..\..\heap\;..\..\debugger\;..\..\assembler\;..\..\profiler\;..\..\interpreter\;..\..\bytecode\;..\..\dfg\;..\..\bytecompiler\;..\..\parser\;..\..\API\;$(ConfigurationBuildDir)\include\;$(ConfigurationBuildDir)\include\private\;$(ConfigurationBuildDir)\include\JavaScriptCore\;$(ConfigurationBuildDir)\obj32\JavaScriptCore\DerivedSources\;$(WebKit_Libraries)\include;%(AdditionalIncludeDirectories) + _CONSOLE;%(PreprocessorDefinitions) + ICUVersion.h + + + WTF$(DebugSuffix).lib;JavaScriptCore$(DebugSuffix).lib;winmm.lib;libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;%(AdditionalDependencies) + + + Console + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscDebug.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscDebug.props new file mode 100644 index 000000000..3b3bc7663 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscDebug.props @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd new file mode 100644 index 000000000..02da44bdc --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd @@ -0,0 +1 @@ +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd new file mode 100644 index 000000000..a77077674 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd @@ -0,0 +1,6 @@ +%SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreLink.cmd new file mode 100644 index 000000000..e69de29bb diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscProduction.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscProduction.props new file mode 100644 index 000000000..396c1b3df --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscProduction.props @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscRelease.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscRelease.props new file mode 100644 index 000000000..9a1b6626b --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscRelease.props @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/resource.h b/Source/JavaScriptCore/JavaScriptCore.vcxproj/resource.h new file mode 100644 index 000000000..052eb0d0e --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by JavaScriptCore.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj new file mode 100644 index 000000000..2d1c9706a --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj @@ -0,0 +1,317 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + {BB16286B-AADC-46C1-BC0D-6C06F323E04B} + Win32Proj + textRegExp + testRegExp + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ICUVersion.h;%(ForcedIncludeFiles) + + + Console + + + + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ICUVersion.h;%(ForcedIncludeFiles) + + + Console + + + + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ICUVersion.h;%(ForcedIncludeFiles) + + + Console + + + + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ICUVersion.h;%(ForcedIncludeFiles) + + + Console + + + + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ICUVersion.h;%(ForcedIncludeFiles) + + + Console + + + + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ICUVersion.h;%(ForcedIncludeFiles) + + + Console + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters new file mode 100644 index 000000000..73b65999a --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props new file mode 100644 index 000000000..62881b31b --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props @@ -0,0 +1,17 @@ + + + + + + + + _CONSOLE;__STD_C;%(PreprocessorDefinitions) + $(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ConfigurationBuildDir)\obj32\JavaScriptCore\DerivedSources;..\..\;..\..\os-win32;..\..\assembler;..\..\API;..\..\parser;..\..\heap;..\..\runtime;..\..\bytecode;..\..\interpreter;..\..\debugger;..\..\bytecompiler;..\..\profiler;..\..\jit;$(WebKit_Libraries)\include;%(AdditionalIncludeDirectories) + + + JavaScriptCore$(DebugSuffix).lib;libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;WTF$(DebugSuffix).lib;winmm.lib;user32.lib;%(AdditionalDependencies) + Console + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props new file mode 100644 index 000000000..6e8ad946d --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd new file mode 100644 index 000000000..0204125ca --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd @@ -0,0 +1,3 @@ +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" + +cmd /c diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd new file mode 100644 index 000000000..a77077674 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd @@ -0,0 +1,6 @@ +%SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd new file mode 100644 index 000000000..e69de29bb diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props new file mode 100644 index 000000000..7e6b5b248 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props new file mode 100644 index 000000000..069677a21 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj new file mode 100644 index 000000000..547b26af0 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj @@ -0,0 +1,287 @@ + + + + + DebugSuffix + Win32 + + + DebugSuffix + x64 + + + Debug_WinCairo + Win32 + + + Debug_WinCairo + x64 + + + Debug + Win32 + + + Debug + x64 + + + Production + Win32 + + + Production + x64 + + + Release_WinCairo + Win32 + + + Release_WinCairo + x64 + + + Release + Win32 + + + Release + x64 + + + + {5CC08E13-2CF9-4C2E-8544-07DA4E8C1843} + Win32Proj + testapi + + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + true + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + ICUVersion.h;%(ForcedIncludeFiles) + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters new file mode 100644 index 000000000..87ead9cc9 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommon.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommon.props new file mode 100644 index 000000000..c8c791a7d --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommon.props @@ -0,0 +1,17 @@ + + + + + + + + CoreFoundation$(DebugSuffix).lib;JavaScriptCore$(DebugSuffix).lib;WTF$(DebugSuffix).lib;libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;%(AdditionalDependencies) + Console + + + NOMINMAX;_CONSOLE;%(PreprocessorDefinitions) + $(ProjectDir)\..\..\API;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories) + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props new file mode 100644 index 000000000..0da8cdf70 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props @@ -0,0 +1,17 @@ + + + + + + + + CFLite.lib;JavaScriptCore$(DebugSuffix).lib;WTF$(DebugSuffix).lib;libicuin.lib;libicuuc.lib;%(AdditionalDependencies) + Console + + + NOMINMAX;_CONSOLE;%(PreprocessorDefinitions) + $(ProjectDir)\..\..\API;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories) + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebug.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebug.props new file mode 100644 index 000000000..8dc5cc955 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebug.props @@ -0,0 +1,14 @@ + + + + + + + + + + <_PropertySheetDisplayName>testapiDebug + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props new file mode 100644 index 000000000..0aead2d2f --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props @@ -0,0 +1,14 @@ + + + + + + + + + + <_PropertySheetDisplayName>testapiDebug + + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd new file mode 100644 index 000000000..0820433b0 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd @@ -0,0 +1,3 @@ +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" + +xcopy /y /d "%PROJECTDIR%\..\..\API\tests\testapi.js" "%OUTDIR%" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd new file mode 100644 index 000000000..a77077674 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd @@ -0,0 +1,6 @@ +%SystemDrive%\cygwin\bin\which.exe bash +if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% +cmd /c +if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" +if errorlevel 1 exit 1 +echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd new file mode 100644 index 000000000..e69de29bb diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiProduction.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiProduction.props new file mode 100644 index 000000000..b2ef74756 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiProduction.props @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiRelease.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiRelease.props new file mode 100644 index 000000000..cd9b500b2 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiRelease.props @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props new file mode 100644 index 000000000..efb49e7e4 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj index 61867036a..e047fabf7 100644 --- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj +++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj @@ -58,6 +58,7 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 0F05C3B41683CF9200BAF45B /* DFGArrayifySlowPathGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F05C3B21683CF8F00BAF45B /* DFGArrayifySlowPathGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F0776BF14FF002B00102332 /* JITCompilationEffort.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0776BD14FF002800102332 /* JITCompilationEffort.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F0B839A14BCF45D00885B4F /* LLIntEntrypoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F0B839514BCF45A00885B4F /* LLIntEntrypoints.cpp */; }; 0F0B839B14BCF46000885B4F /* LLIntEntrypoints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B839614BCF45A00885B4F /* LLIntEntrypoints.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -73,6 +74,10 @@ 0F0CD4C215F1A6070032F1C0 /* PutDirectIndexMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0CD4C015F1A6040032F1C0 /* PutDirectIndexMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F0CD4C415F6B6BB0032F1C0 /* SparseArrayValueMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F0CD4C315F6B6B50032F1C0 /* SparseArrayValueMap.cpp */; }; 0F0FC45A14BD15F500B81154 /* LLIntCallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F13912916771C33009CCB07 /* ProfilerBytecodeSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F13912416771C30009CCB07 /* ProfilerBytecodeSequence.cpp */; }; + 0F13912A16771C36009CCB07 /* ProfilerBytecodeSequence.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F13912516771C30009CCB07 /* ProfilerBytecodeSequence.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F13912B16771C3A009CCB07 /* ProfilerProfiledBytecodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F13912616771C30009CCB07 /* ProfilerProfiledBytecodes.cpp */; }; + 0F13912C16771C3D009CCB07 /* ProfilerProfiledBytecodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F13912716771C30009CCB07 /* ProfilerProfiledBytecodes.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F13E04E16164A1F00DC8DE7 /* IndexingType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F13E04C16164A1B00DC8DE7 /* IndexingType.cpp */; }; 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F16015D156198C900C2587C /* DFGArgumentsSimplificationPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F16015A156198BF00C2587C /* DFGArgumentsSimplificationPhase.cpp */; }; @@ -102,6 +107,13 @@ 0F2BDC5115228FFD00CD8910 /* DFGVariableEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2BDC5015228FFA00CD8910 /* DFGVariableEvent.cpp */; }; 0F2C556F14738F3100121E4F /* DFGCodeBlocks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F2C557014738F3500121E4F /* DFGCodeBlocks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2C556D14738F2E00121E4F /* DFGCodeBlocks.cpp */; }; + 0F2E892C16D028AD009E4FD2 /* UnusedPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = 65987F2F16828A7E003C2F8D /* UnusedPointer.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F2E892D16D02BAF009E4FD2 /* DFGMinifiedID.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB4B51016B3A964003F696B /* DFGMinifiedID.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F2FC77216E12F710038D976 /* DFGDCEPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2FC77016E12F6F0038D976 /* DFGDCEPhase.cpp */; }; + 0F2FC77316E12F740038D976 /* DFGDCEPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2FC77116E12F6F0038D976 /* DFGDCEPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F34B14916D42010001CDA5A /* DFGUseKind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F34B14716D4200E001CDA5A /* DFGUseKind.cpp */; }; + 0F34B14A16D42013001CDA5A /* DFGUseKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F34B14816D4200E001CDA5A /* DFGUseKind.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F34B14C16D43E0D001CDA5A /* PolymorphicAccessStructureList.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F34B14B16D43E0C001CDA5A /* PolymorphicAccessStructureList.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F3B3A1A153E68F2003ED0FF /* DFGConstantFoldingPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F3B3A17153E68EF003ED0FF /* DFGConstantFoldingPhase.cpp */; }; 0F3B3A1B153E68F4003ED0FF /* DFGConstantFoldingPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F3B3A18153E68EF003ED0FF /* DFGConstantFoldingPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F3B3A271544C995003ED0FF /* DFGCFGSimplificationPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F3B3A241544C991003ED0FF /* DFGCFGSimplificationPhase.cpp */; }; @@ -126,20 +138,24 @@ 0F4680D314BBD16700BFE272 /* LLIntData.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680CF14BBB3D100BFE272 /* LLIntData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F4680D414BBD24900BFE272 /* HostCallReturnValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4680D014BBC5F800BFE272 /* HostCallReturnValue.cpp */; }; 0F4680D514BBD24B00BFE272 /* HostCallReturnValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F493AF816D0CAD10084508B /* SourceProvider.cpp */; }; 0F5541B11613C1FB00CE3E25 /* SpecialPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5541AF1613C1FB00CE3E25 /* SpecialPointer.cpp */; }; 0F5541B21613C1FB00CE3E25 /* SpecialPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5541B01613C1FB00CE3E25 /* SpecialPointer.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F55F0F414D1063900AC7649 /* AbstractPC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F55F0F114D1063600AC7649 /* AbstractPC.cpp */; }; 0F55F0F514D1063C00AC7649 /* AbstractPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F55F0F214D1063600AC7649 /* AbstractPC.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F56A1D315000F35002992B1 /* ExecutionCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F56A1D115000F31002992B1 /* ExecutionCounter.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F56A1D515001CF4002992B1 /* ExecutionCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */; }; + 0F572D4F16879FDD00E57FBD /* ThunkGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F572D4D16879FDB00E57FBD /* ThunkGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F5EF91E16878F7A003E5C25 /* JITThunks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */; }; + 0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5EF91C16878F78003E5C25 /* JITThunks.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F620172143FCD2F0068B77C /* DFGVariableAccessData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F620176143FCD3B0068B77C /* DFGBasicBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F620170143FCD2F0068B77C /* DFGBasicBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F620177143FCD3F0068B77C /* DFGAbstractValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F62016F143FCD2F0068B77C /* DFGAbstractValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F620178143FCD440068B77C /* DFGAbstractState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F62016E143FCD2F0068B77C /* DFGAbstractState.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F620179143FCD480068B77C /* DFGAbstractState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F62016D143FCD2F0068B77C /* DFGAbstractState.cpp */; }; - 0F63943F15C75F19006A597C /* DFGStructureCheckHoistingPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63943D15C75F14006A597C /* DFGStructureCheckHoistingPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 0F63944015C75F1D006A597C /* DFGStructureCheckHoistingPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F63943C15C75F14006A597C /* DFGStructureCheckHoistingPhase.cpp */; }; + 0F63943F15C75F19006A597C /* DFGTypeCheckHoistingPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63943D15C75F14006A597C /* DFGTypeCheckHoistingPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F63944015C75F1D006A597C /* DFGTypeCheckHoistingPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F63943C15C75F14006A597C /* DFGTypeCheckHoistingPhase.cpp */; }; 0F63945415D07055006A597C /* ArrayProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F63945115D07051006A597C /* ArrayProfile.cpp */; }; 0F63945515D07057006A597C /* ArrayProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63945215D07051006A597C /* ArrayProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63947615DCE347006A597C /* DFGStructureAbstractValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -147,6 +163,8 @@ 0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F63948215E48114006A597C /* DFGArrayMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F66E16B14DF3F1600B7B2E4 /* DFGAdjacencyList.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16814DF3F1300B7B2E4 /* DFGAdjacencyList.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F66E16914DF3F1300B7B2E4 /* DFGEdge.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F714CA416EA92F000F3EBEB /* DFGBackwardsPropagationPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F714CA116EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.cpp */; }; + 0F714CA516EA92F200F3EBEB /* DFGBackwardsPropagationPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F714CA216EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F73D7AE165A142D00ACAB71 /* ClosureCallStubRoutine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F73D7AB165A142A00ACAB71 /* ClosureCallStubRoutine.cpp */; }; 0F73D7AF165A143000ACAB71 /* ClosureCallStubRoutine.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F73D7AC165A142A00ACAB71 /* ClosureCallStubRoutine.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F766D2815A8CC1E008F363E /* JITStubRoutine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F766D2615A8CC1B008F363E /* JITStubRoutine.cpp */; }; @@ -164,7 +182,6 @@ 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F7700911402FF280078EB39 /* SamplingCounter.cpp */; }; 0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F7B294814C3CD23007C3DB1 /* DFGCCallHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 0F7B294C14C3CD43007C3DB1 /* DFGByteCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC0977E1469EBC400CF2442 /* DFGCommon.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F8023E91613832300A0BA45 /* ByValInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F8335B71639C1E6001443B5 /* ArrayAllocationProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F8335B41639C1E3001443B5 /* ArrayAllocationProfile.cpp */; }; @@ -192,6 +209,9 @@ 0F9332A514CA7DDD0085F3C6 /* StructureSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F93329B14CA7DC10085F3C6 /* StructureSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F963B3813FC6FE90002D9B2 /* ValueProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F963B3613FC6FDE0002D9B2 /* ValueProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F96EBB316676EF6008BADE3 /* CodeBlockWithJITType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F96EBB116676EF4008BADE3 /* CodeBlockWithJITType.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F9749711687ADE400A4FF6A /* JSCellInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F97496F1687ADE200A4FF6A /* JSCellInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0F98206016BFE38100240D02 /* PreciseJumpTargets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F98205D16BFE37F00240D02 /* PreciseJumpTargets.cpp */; }; + 0F98206116BFE38300240D02 /* PreciseJumpTargets.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F98205E16BFE37F00240D02 /* PreciseJumpTargets.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0F9D3370165DBB90005AD387 /* Disassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F9D336E165DBB8D005AD387 /* Disassembler.cpp */; }; 0F9FC8C314E1B5FE00D52AE0 /* PolymorphicPutByIdList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F9FC8BF14E1B5FB00D52AE0 /* PolymorphicPutByIdList.cpp */; }; 0F9FC8C414E1B60000D52AE0 /* PolymorphicPutByIdList.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9FC8C014E1B5FB00D52AE0 /* PolymorphicPutByIdList.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -201,6 +221,12 @@ 0FA581BC150E953000B9A2D9 /* DFGNodeType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA581B9150E952A00B9A2D9 /* DFGNodeType.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FAF7EFD165BA91B000C8455 /* JITDisassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FAF7EFA165BA919000C8455 /* JITDisassembler.cpp */; }; 0FAF7EFE165BA91F000C8455 /* JITDisassembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FAF7EFB165BA919000C8455 /* JITDisassembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FB105851675480F00F8AB6E /* ExitKind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB105821675480C00F8AB6E /* ExitKind.cpp */; }; + 0FB105861675481200F8AB6E /* ExitKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB105831675480C00F8AB6E /* ExitKind.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FB1058B1675483100F8AB6E /* ProfilerOSRExit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB105871675482E00F8AB6E /* ProfilerOSRExit.cpp */; }; + 0FB1058C1675483300F8AB6E /* ProfilerOSRExit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB105881675482E00F8AB6E /* ProfilerOSRExit.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FB1058D1675483700F8AB6E /* ProfilerOSRExitSite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB105891675482E00F8AB6E /* ProfilerOSRExitSite.cpp */; }; + 0FB1058E1675483A00F8AB6E /* ProfilerOSRExitSite.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB1058A1675482E00F8AB6E /* ProfilerOSRExitSite.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FB5467714F59B5C002C2989 /* LazyOperandValueProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB5467614F59AD1002C2989 /* LazyOperandValueProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FB5467914F5C46B002C2989 /* LazyOperandValueProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB5467814F5C468002C2989 /* LazyOperandValueProfile.cpp */; }; 0FB5467B14F5C7E1002C2989 /* MethodOfGettingAValueProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB5467A14F5C7D4002C2989 /* MethodOfGettingAValueProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -218,6 +244,12 @@ 0FBC0AE71496C7C400D4FBDD /* DFGExitProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FBC0AE41496C7C100D4FBDD /* DFGExitProfile.cpp */; }; 0FBC0AE81496C7C700D4FBDD /* DFGExitProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FBD7E691447999600481315 /* CodeOrigin.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FBD7E671447998F00481315 /* CodeOrigin.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FBE0F7216C1DB030082C5E8 /* DFGCPSRethreadingPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FBE0F6B16C1DB010082C5E8 /* DFGCPSRethreadingPhase.cpp */; }; + 0FBE0F7316C1DB050082C5E8 /* DFGCPSRethreadingPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FBE0F6C16C1DB010082C5E8 /* DFGCPSRethreadingPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FBE0F7416C1DB090082C5E8 /* DFGPredictionInjectionPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FBE0F6D16C1DB010082C5E8 /* DFGPredictionInjectionPhase.cpp */; }; + 0FBE0F7516C1DB0B0082C5E8 /* DFGPredictionInjectionPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FBE0F6E16C1DB010082C5E8 /* DFGPredictionInjectionPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FBE0F7616C1DB0F0082C5E8 /* DFGUnificationPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FBE0F6F16C1DB010082C5E8 /* DFGUnificationPhase.cpp */; }; + 0FBE0F7716C1DB120082C5E8 /* DFGUnificationPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FBE0F7016C1DB010082C5E8 /* DFGUnificationPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FC0976A1468A6F700CF2442 /* DFGOSRExit.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC097681468A6EF00CF2442 /* DFGOSRExit.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FC0976D1468AB4E00CF2442 /* DFGAssemblyHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC0976C1468AB4A00CF2442 /* DFGAssemblyHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FC0976E1468AB5100CF2442 /* DFGAssemblyHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC0976B1468AB4A00CF2442 /* DFGAssemblyHelpers.cpp */; }; @@ -226,14 +258,14 @@ 0FC09776146943B000CF2442 /* DFGOSRExitCompiler32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC09775146943AD00CF2442 /* DFGOSRExitCompiler32_64.cpp */; }; 0FC09791146A6F7100CF2442 /* DFGOSRExit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC0978E146A6F6300CF2442 /* DFGOSRExit.cpp */; }; 0FC09792146A6F7300CF2442 /* DFGOSRExitCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC0978F146A6F6300CF2442 /* DFGOSRExitCompiler.cpp */; }; - 0FC0979C146A772500CF2442 /* DFGCorrectableJumpPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC0979A146A772000CF2442 /* DFGCorrectableJumpPoint.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 0FC0979E146B272100CF2442 /* DFGCorrectableJumpPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC0979D146B271E00CF2442 /* DFGCorrectableJumpPoint.cpp */; }; 0FC097A1146B28CA00CF2442 /* DFGThunks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC0979F146B28C700CF2442 /* DFGThunks.cpp */; }; 0FC097A2146B28CC00CF2442 /* DFGThunks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC097A0146B28C700CF2442 /* DFGThunks.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FC8150A14043BF500CFA603 /* WriteBarrierSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */; }; 0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC815141405118D00CFA603 /* VTableSpectrum.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC815121405118600CFA603 /* VTableSpectrum.cpp */; }; + 0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2C92316D01EE900C7803F /* StructureInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */; }; 0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3C82214115D0E00FD81CB /* DFGDriver.h */; }; 0FD81AD2154FB4EE00983E72 /* DFGDominators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD81ACF154FB4EB00983E72 /* DFGDominators.cpp */; }; @@ -250,6 +282,15 @@ 0FE228EE1436AB2C00196C48 /* Options.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE228EA1436AB2300196C48 /* Options.cpp */; }; 0FEB3ECD16237F4D00AB67AD /* TypedArrayDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEB3ECB16237F4700AB67AD /* TypedArrayDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB3ECE16237F6700AB67AD /* MacroAssembler.cpp */; }; + 0FEFC9AA1681A3B300567F53 /* DFGOSRExitJumpPlaceholder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEFC9A71681A3B000567F53 /* DFGOSRExitJumpPlaceholder.cpp */; }; + 0FEFC9AB1681A3B600567F53 /* DFGOSRExitJumpPlaceholder.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEFC9A81681A3B000567F53 /* DFGOSRExitJumpPlaceholder.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF0F19916B729F6005DF95B /* DFGLongLivedState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB4B51C16B62772003F696B /* DFGLongLivedState.cpp */; }; + 0FF0F19B16B729FA005DF95B /* DFGLongLivedState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB4B51D16B62772003F696B /* DFGLongLivedState.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF0F19C16B72A03005DF95B /* DFGNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB4B51E16B62772003F696B /* DFGNode.cpp */; }; + 0FF0F19D16B72A08005DF95B /* DFGCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB4B51A16B62772003F696B /* DFGCommon.cpp */; }; + 0FF0F19E16B72A0B005DF95B /* DFGEdge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB4B51B16B62772003F696B /* DFGEdge.cpp */; }; + 0FF0F19F16B72A17005DF95B /* FunctionExecutableDump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB4B52116B6278D003F696B /* FunctionExecutableDump.cpp */; }; + 0FF0F1A016B72A1A005DF95B /* FunctionExecutableDump.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB4B52216B6278D003F696B /* FunctionExecutableDump.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FF42731158EBD54004CB9FF /* Disassembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF4272F158EBD44004CB9FF /* Disassembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FF42732158EBD58004CB9FF /* UDis86Disassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF42730158EBD44004CB9FF /* UDis86Disassembler.cpp */; }; 0FF42740158EBE8B004CB9FF /* udis86_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FF42734158EBD94004CB9FF /* udis86_decode.c */; }; @@ -270,8 +311,35 @@ 0FF427651591A1CE004CB9FF /* DFGDisassembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF427621591A1C9004CB9FF /* DFGDisassembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FF42771159275D5004CB9FF /* ResolveGlobalStatus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF4276E159275D2004CB9FF /* ResolveGlobalStatus.cpp */; }; 0FF42772159275D8004CB9FF /* ResolveGlobalStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF4276F159275D2004CB9FF /* ResolveGlobalStatus.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF60AC216740F8300029779 /* ReduceWhitespace.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF60AC016740F8100029779 /* ReduceWhitespace.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF60AC316740F8800029779 /* ReduceWhitespace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF60ABF16740F8100029779 /* ReduceWhitespace.cpp */; }; 0FF7168C15A3B235008F5DAA /* PropertyOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF7168A15A3B231008F5DAA /* PropertyOffset.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729A5166AD351000F5BA3 /* ProfilerBytecode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF72993166AD347000F5BA3 /* ProfilerBytecode.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729AD166AD35C000F5BA3 /* ProfilerBytecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF72992166AD347000F5BA3 /* ProfilerBytecode.cpp */; }; + 0FF729AE166AD35C000F5BA3 /* ProfilerBytecodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF72994166AD347000F5BA3 /* ProfilerBytecodes.cpp */; }; + 0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF72996166AD347000F5BA3 /* ProfilerCompilation.cpp */; }; + 0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF72998166AD347000F5BA3 /* ProfilerCompilationKind.cpp */; }; + 0FF729B1166AD35C000F5BA3 /* ProfilerCompiledBytecode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF7299A166AD347000F5BA3 /* ProfilerCompiledBytecode.cpp */; }; + 0FF729B2166AD35C000F5BA3 /* ProfilerDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF7299C166AD347000F5BA3 /* ProfilerDatabase.cpp */; }; + 0FF729B3166AD35C000F5BA3 /* ProfilerOrigin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF7299F166AD347000F5BA3 /* ProfilerOrigin.cpp */; }; + 0FF729B4166AD35C000F5BA3 /* ProfilerOriginStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF729A1166AD347000F5BA3 /* ProfilerOriginStack.cpp */; }; + 0FF729B9166AD360000F5BA3 /* ProfilerBytecodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF72995166AD347000F5BA3 /* ProfilerBytecodes.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729BA166AD360000F5BA3 /* ProfilerCompilation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF72997166AD347000F5BA3 /* ProfilerCompilation.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729BB166AD360000F5BA3 /* ProfilerCompilationKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF72999166AD347000F5BA3 /* ProfilerCompilationKind.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729BC166AD360000F5BA3 /* ProfilerCompiledBytecode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF7299B166AD347000F5BA3 /* ProfilerCompiledBytecode.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729BD166AD360000F5BA3 /* ProfilerDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF7299D166AD347000F5BA3 /* ProfilerDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729BE166AD360000F5BA3 /* ProfilerExecutionCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF7299E166AD347000F5BA3 /* ProfilerExecutionCounter.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729BF166AD360000F5BA3 /* ProfilerOrigin.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF729A0166AD347000F5BA3 /* ProfilerOrigin.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FF729C0166AD360000F5BA3 /* ProfilerOriginStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF729A2166AD347000F5BA3 /* ProfilerOriginStack.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FF922D414F46B410041A24E /* LLIntOffsetsExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F4680A114BA7F8200BFE272 /* LLIntOffsetsExtractor.cpp */; }; + 0FFB921816D02EB20055A5DB /* DFGAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB4B51916B62772003F696B /* DFGAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FFB921A16D02EC50055A5DB /* DFGBasicBlockInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD5652216AB780A00197653 /* DFGBasicBlockInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FFB921B16D02F010055A5DB /* DFGNodeAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB4B51F16B62772003F696B /* DFGNodeAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FFB921C16D02F110055A5DB /* DFGOSRExitCompilationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 65987F2C167FE84B003C2F8D /* DFGOSRExitCompilationInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F1E3A501537C2CB000F9456 /* DFGSlowPathGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FFB921E16D02F470055A5DB /* DFGVariadicFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F85A31E16AB76AE0077571E /* DFGVariadicFunction.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 0FFB921F16D033050055A5DB /* (null) in Headers */ = {isa = PBXBuildFile; settings = {ATTRIBUTES = (Private, ); }; }; + 0FFB922016D033B70055A5DB /* NodeConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 930DAD030FB1EB1A0082D205 /* NodeConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FFFC95714EF90A000C72532 /* DFGCFAPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FFFC94B14EF909500C72532 /* DFGCFAPhase.cpp */; }; 0FFFC95814EF90A200C72532 /* DFGCFAPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FFFC94C14EF909500C72532 /* DFGCFAPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0FFFC95914EF90A600C72532 /* DFGCSEPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FFFC94D14EF909500C72532 /* DFGCSEPhase.cpp */; }; @@ -331,7 +399,6 @@ 142E313A134FF0A600AFADB5 /* LocalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 142E3131134FF0A600AFADB5 /* LocalScope.h */; }; 142E313B134FF0A600AFADB5 /* Strong.h in Headers */ = {isa = PBXBuildFile; fileRef = 142E3132134FF0A600AFADB5 /* Strong.h */; settings = {ATTRIBUTES = (Private, ); }; }; 142E313C134FF0A600AFADB5 /* Weak.h in Headers */ = {isa = PBXBuildFile; fileRef = 142E3133134FF0A600AFADB5 /* Weak.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 143A97E60A4A06E200456B66 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; }; 1440057F0A5335640005F061 /* JSNode.c in Sources */ = {isa = PBXBuildFile; fileRef = 1440F6420A4F8B6A0005F061 /* JSNode.c */; }; 144005CB0A5338D10005F061 /* JSNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440F6410A4F8B6A0005F061 /* JSNode.h */; }; 144005CC0A5338F80005F061 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440051F0A531D3B0005F061 /* Node.h */; }; @@ -365,6 +432,8 @@ 146AAB380B66A94400E55F16 /* JSStringRefCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146AAB370B66A94400E55F16 /* JSStringRefCF.cpp */; }; 146B16D812EB5B59001BEC1B /* ConservativeRoots.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146B14DB12EB5B12001BEC1B /* ConservativeRoots.cpp */; }; 146FE51211A710430087AE66 /* JITCall32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146FE51111A710430087AE66 /* JITCall32_64.cpp */; }; + 1474C33B16AA2D950062F01D /* PrototypeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D844A316AA2C7000A65AF0 /* PrototypeMap.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 1474C33C16AA2D9B0062F01D /* PrototypeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14D844A216AA2C7000A65AF0 /* PrototypeMap.cpp */; }; 1478297B1379E8A800A7C2A3 /* HandleTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 146FA5A81378F6B0003627A3 /* HandleTypes.h */; settings = {ATTRIBUTES = (Private, ); }; }; 147B83AC0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 147B83AA0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h */; }; 147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */ = {isa = PBXBuildFile; fileRef = 147B84620E6DE6B1004775A4 /* PutPropertySlot.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -391,7 +460,7 @@ 147F39D2107EC37600427A48 /* JSGlobalObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */; }; 147F39D4107EC37600427A48 /* JSObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC22A3980E16E14800AF21C8 /* JSObject.cpp */; }; 147F39D5107EC37600427A48 /* JSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC02E9B60E1842FA000F9297 /* JSString.cpp */; }; - 147F39D6107EC37600427A48 /* JSValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A8870255597D01FF60F7 /* JSValue.cpp */; }; + 147F39D6107EC37600427A48 /* JSCJSValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A8870255597D01FF60F7 /* JSCJSValue.cpp */; }; 147F39D7107EC37600427A48 /* JSVariableObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC22A39A0E16E14800AF21C8 /* JSVariableObject.cpp */; }; 14816E1B154CC56C00B8054C /* BlockAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14816E19154CC56C00B8054C /* BlockAllocator.cpp */; }; 14816E1C154CC56C00B8054C /* BlockAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 14816E1A154CC56C00B8054C /* BlockAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -410,8 +479,6 @@ 1497209114EB831500FEB1B7 /* PassWeak.h in Headers */ = {isa = PBXBuildFile; fileRef = 1497209014EB831500FEB1B7 /* PassWeak.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14A1563210966365006FA260 /* DateInstanceCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 14A1563010966365006FA260 /* DateInstanceCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14A23D750F4E1ABB0023CDAD /* JITStubs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */; }; - 14A42E3F0F4F60EE00599099 /* TimeoutChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14A42E3D0F4F60EE00599099 /* TimeoutChecker.cpp */; }; - 14A42E400F4F60EE00599099 /* TimeoutChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 14A42E3E0F4F60EE00599099 /* TimeoutChecker.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14ABDF600A437FEF00ECCA01 /* JSCallbackObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14ABDF5E0A437FEF00ECCA01 /* JSCallbackObject.cpp */; }; 14B723B212D7DA46003BD5ED /* MachineStackMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14B7233F12D7D0DA003BD5ED /* MachineStackMarker.cpp */; }; 14B723B812D7DA6F003BD5ED /* MachineStackMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 14B7234012D7D0DA003BD5ED /* MachineStackMarker.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -422,10 +489,14 @@ 14BD59C50A3E8F9F00BAF59C /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; }; 14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD5A290A3E91F600BAF59C /* JSContextRef.cpp */; }; 14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */; }; + 14BE7D3317135CF400D1807A /* WeakInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BE7D3217135CF400D1807A /* WeakInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14C5242B0F5355E900BA3D04 /* JITStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 14A6581A0F4E36F4000150FD /* JITStubs.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 14CA958B16AB50DE00938A06 /* StaticPropertyAnalyzer.h in Headers */ = {isa = PBXBuildFile; fileRef = 14CA958A16AB50DE00938A06 /* StaticPropertyAnalyzer.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 14CA958D16AB50FA00938A06 /* ObjectAllocationProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 14CA958C16AB50FA00938A06 /* ObjectAllocationProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14D2F3DA139F4BE200491031 /* MarkedSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14D2F3D8139F4BE200491031 /* MarkedSpace.cpp */; }; 14D2F3DB139F4BE200491031 /* MarkedSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D2F3D9139F4BE200491031 /* MarkedSpace.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 14DF04DA16B3996D0016A513 /* StaticPropertyAnalysis.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DF04D916B3996D0016A513 /* StaticPropertyAnalysis.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14E84F9E14EE1ACC00D6D5D4 /* WeakBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */; }; 14E84F9F14EE1ACC00D6D5D4 /* WeakBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14E84F9A14EE1ACC00D6D5D4 /* WeakBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14E84FA014EE1ACC00D6D5D4 /* WeakSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E84F9B14EE1ACC00D6D5D4 /* WeakSet.cpp */; }; @@ -435,9 +506,12 @@ 14F7256514EE265E00B1652B /* WeakHandleOwner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14F7256314EE265E00B1652B /* WeakHandleOwner.cpp */; }; 14F7256614EE265E00B1652B /* WeakHandleOwner.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F7256414EE265E00B1652B /* WeakHandleOwner.h */; settings = {ATTRIBUTES = (Private, ); }; }; 14F97447138C853E00DA1C67 /* HeapRootVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F97446138C853E00DA1C67 /* HeapRootVisitor.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 1A28D4A8177B71C80007FA3C /* JSStringRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A28D4A7177B71C80007FA3C /* JSStringRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 1ACF7377171CA6FB00C9BB1E /* Weak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACF7376171CA6FB00C9BB1E /* Weak.cpp */; }; 2600B5A6152BAAA70091EE5F /* JSStringJoiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2600B5A4152BAAA70091EE5F /* JSStringJoiner.cpp */; }; 2600B5A7152BAAA70091EE5F /* JSStringJoiner.h in Headers */ = {isa = PBXBuildFile; fileRef = 2600B5A5152BAAA70091EE5F /* JSStringJoiner.h */; }; 41359CF30FDD89AD00206180 /* DateConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = D21202290AD4310C00ED79B6 /* DateConversion.h */; }; + 4443AE3316E188D90076F110 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; }; 451539B912DC994500EF7AC4 /* Yarr.h in Headers */ = {isa = PBXBuildFile; fileRef = 451539B812DC994500EF7AC4 /* Yarr.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5D53726F0E1C54880021E549 /* Tracing.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D53726E0E1C54880021E549 /* Tracing.h */; }; 5D5D8AD10E0D0EBE00F9C692 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; }; @@ -450,9 +524,12 @@ 6511230714046B0A002B101D /* testRegExp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 651122E5140469BA002B101D /* testRegExp.cpp */; }; 65303D641447B9E100D3F904 /* ParserTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 65303D631447B9E100D3F904 /* ParserTokens.h */; settings = {ATTRIBUTES = (Private, ); }; }; 655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 655EB29A10CE2581001A990E /* NodesCodegen.cpp */; }; + 65C02850171795E200351E35 /* ARMv7Disassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65C0284F171795E200351E35 /* ARMv7Disassembler.cpp */; }; + 65C0285C1717966800351E35 /* ARMv7DOpcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65C0285A1717966800351E35 /* ARMv7DOpcode.cpp */; }; + 65C0285D1717966800351E35 /* ARMv7DOpcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C0285B1717966800351E35 /* ARMv7DOpcode.h */; }; 7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4EE7080EBB7963005934AA /* StructureChain.h */; settings = {ATTRIBUTES = (Private, ); }; }; 7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E4EE70E0EBB7A5B005934AA /* StructureChain.cpp */; }; - 7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EFF00630EC05A9A00AA7C93 /* NodeInfo.h */; }; + 7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EFF00630EC05A9A00AA7C93 /* NodeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 840480131021A1D9008E7F01 /* JSAPIValueWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = BC0894D60FAFBA2D00001865 /* JSAPIValueWrapper.h */; settings = {ATTRIBUTES = (Private, ); }; }; 860161E30F3A83C100F84710 /* AbstractMacroAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161DF0F3A83C100F84710 /* AbstractMacroAssembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 860161E40F3A83C100F84710 /* MacroAssemblerX86.h in Headers */ = {isa = PBXBuildFile; fileRef = 860161E00F3A83C100F84710 /* MacroAssemblerX86.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -467,7 +544,7 @@ 863C6D9C1521111A00585E4E /* YarrCanonicalizeUCS2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 863C6D981521111200585E4E /* YarrCanonicalizeUCS2.cpp */; }; 8642C510151C06A90046D4EF /* RegExpCachedResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86F75EFB151C062F007C9BA3 /* RegExpCachedResult.cpp */; }; 8642C512151C083D0046D4EF /* RegExpMatchesArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86F75EFD151C062F007C9BA3 /* RegExpMatchesArray.cpp */; }; - 865A30F1135007E100CDB49E /* JSValueInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 865A30F0135007E100CDB49E /* JSValueInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 865A30F1135007E100CDB49E /* JSCJSValueInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 865A30F0135007E100CDB49E /* JSCJSValueInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; 865F408810E7D56300947361 /* APIShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 865F408710E7D56300947361 /* APIShims.h */; settings = {ATTRIBUTES = (Private, ); }; }; 866739D213BFDE710023D87C /* BigInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 866739D013BFDE710023D87C /* BigInteger.h */; }; 866739D313BFDE710023D87C /* Uint16WithFraction.h in Headers */ = {isa = PBXBuildFile; fileRef = 866739D113BFDE710023D87C /* Uint16WithFraction.h */; }; @@ -488,15 +565,14 @@ 86A90ED00EE7D51F00AB350D /* JITArithmetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */; }; 86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 86AE64A8135E5E1C00963012 /* MacroAssemblerSH4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86AE64A5135E5E1C00963012 /* MacroAssemblerSH4.cpp */; }; 86AE64A9135E5E1C00963012 /* MacroAssemblerSH4.h in Headers */ = {isa = PBXBuildFile; fileRef = 86AE64A6135E5E1C00963012 /* MacroAssemblerSH4.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86AE64AA135E5E1C00963012 /* SH4Assembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86AE64A7135E5E1C00963012 /* SH4Assembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 86AE6C4D136A11E400963012 /* DFGFPRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86AE6C4B136A11E400963012 /* DFGFPRInfo.h */; }; - 86AE6C4E136A11E400963012 /* DFGGPRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86AE6C4C136A11E400963012 /* DFGGPRInfo.h */; }; + 86AE6C4D136A11E400963012 /* DFGFPRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86AE6C4B136A11E400963012 /* DFGFPRInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86AE6C4E136A11E400963012 /* DFGGPRInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86AE6C4C136A11E400963012 /* DFGGPRInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86B5822E14D2373B00A9C306 /* CodeProfile.cpp */; }; 86B5826914D2797000A9C306 /* CodeProfiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8603CEF214C7546400AE59E3 /* CodeProfiling.cpp */; }; 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BB09BE138E381B0056702F /* DFGRepatch.cpp */; }; - 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BB09BF138E381B0056702F /* DFGRepatch.h */; }; + 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BB09BF138E381B0056702F /* DFGRepatch.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86C36EEA0EE1289D00B3DF59 /* MacroAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86C568DD11A213EE0007F7F0 /* MacroAssemblerARM.cpp */; }; 86C568E111A213EE0007F7F0 /* MacroAssemblerMIPS.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C568DE11A213EE0007F7F0 /* MacroAssemblerMIPS.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -507,6 +583,7 @@ 86CC85A30EE79B7400288682 /* JITCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86CC85A20EE79B7400288682 /* JITCall.cpp */; }; 86CC85C40EE7A89400288682 /* JITPropertyAccess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */; }; 86CCEFDE0F413F8900FD7F9E /* JITCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CCEFDD0F413F8900FD7F9E /* JITCode.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86D2221A167EF9440024C804 /* testapi.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86D22219167EF9440024C804 /* testapi.mm */; }; 86D3B2C310156BDE002865E7 /* ARMAssembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86D3B2BF10156BDE002865E7 /* ARMAssembler.cpp */; }; 86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86D3B2C010156BDE002865E7 /* ARMAssembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86D3B2C510156BDE002865E7 /* AssemblerBufferWithConstantPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 86D3B2C110156BDE002865E7 /* AssemblerBufferWithConstantPool.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -515,6 +592,18 @@ 86D3B3C410159D7F002865E7 /* RepatchBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 86D3B3C210159D7F002865E7 /* RepatchBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */; }; 86E116B10FE75AC800B512BC /* CodeLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E116B00FE75AC800B512BC /* CodeLocation.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86E3C612167BABD7006D760A /* JSValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C606167BAB87006D760A /* JSValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 86E3C613167BABD7006D760A /* JSContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C607167BAB87006D760A /* JSContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 86E3C614167BABD7006D760A /* JSExport.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C60A167BAB87006D760A /* JSExport.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 86E3C615167BABD7006D760A /* JSVirtualMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C60F167BAB87006D760A /* JSVirtualMachine.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 86E3C616167BABEE006D760A /* JSContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86E3C608167BAB87006D760A /* JSContext.mm */; }; + 86E3C617167BABEE006D760A /* JSContextInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C609167BAB87006D760A /* JSContextInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86E3C618167BABEE006D760A /* JSWrapperMap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86E3C60B167BAB87006D760A /* JSWrapperMap.mm */; }; + 86E3C619167BABEE006D760A /* JSWrapperMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C60C167BAB87006D760A /* JSWrapperMap.h */; }; + 86E3C61A167BABEE006D760A /* JSValue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86E3C60D167BAB87006D760A /* JSValue.mm */; }; + 86E3C61B167BABEE006D760A /* JSValueInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C60E167BAB87006D760A /* JSValueInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86E3C61C167BABEE006D760A /* JSVirtualMachine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86E3C610167BAB87006D760A /* JSVirtualMachine.mm */; }; + 86E3C61D167BABEE006D760A /* JSVirtualMachineInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E3C611167BAB87006D760A /* JSVirtualMachineInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E85538111B9968001AF51E /* JSStringBuilder.h */; }; 86EBF2FF1560F06A008E9222 /* NameConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EBF2F91560F036008E9222 /* NameConstructor.cpp */; }; 86EBF3001560F06A008E9222 /* NameConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EBF2FA1560F036008E9222 /* NameConstructor.h */; }; @@ -523,19 +612,22 @@ 86EBF3031560F06A008E9222 /* NamePrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EBF2FD1560F036008E9222 /* NamePrototype.cpp */; }; 86EBF3041560F06A008E9222 /* NamePrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EBF2FE1560F036008E9222 /* NamePrototype.h */; }; 86EC9DC41328DF82002B2AD7 /* DFGByteCodeParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */; }; - 86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */; }; - 86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */; }; + 86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DB71328DF82002B2AD7 /* DFGGraph.cpp */; }; - 86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB81328DF82002B2AD7 /* DFGGraph.h */; }; + 86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB81328DF82002B2AD7 /* DFGGraph.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86EC9DCB1328DF82002B2AD7 /* DFGJITCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */; }; - 86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */; }; + 86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86EC9DCF1328DF82002B2AD7 /* DFGOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */; }; - 86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DC01328DF82002B2AD7 /* DFGOperations.h */; }; - 86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */; }; + 86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DC01328DF82002B2AD7 /* DFGOperations.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DC21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp */; }; - 86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DC31328DF82002B2AD7 /* DFGSpeculativeJIT.h */; }; - 86ECA3EA132DEF1C002B2AD7 /* DFGNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */; }; - 86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ECA3F9132DF25A002B2AD7 /* DFGScoreBoard.h */; }; + 86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DC31328DF82002B2AD7 /* DFGSpeculativeJIT.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86ECA3EA132DEF1C002B2AD7 /* DFGNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ECA3F9132DF25A002B2AD7 /* DFGScoreBoard.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86F3EEBD168CDE930077B92A /* ObjCCallbackFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F3EEB9168CCF750077B92A /* ObjCCallbackFunction.h */; }; + 86F3EEBE168CDE930077B92A /* ObjCCallbackFunction.mm in Sources */ = {isa = PBXBuildFile; fileRef = 86F3EEBA168CCF750077B92A /* ObjCCallbackFunction.mm */; }; + 86F3EEBF168CDE930077B92A /* ObjcRuntimeExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F3EEB616855A5B0077B92A /* ObjcRuntimeExtras.h */; }; 86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86FA9E8F142BBB2D001773B7 /* JSBoundFunction.cpp */; }; 86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */; }; 90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */; }; @@ -552,7 +644,7 @@ 9335F24D12E6765B002B5553 /* StringRecursionChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93345A8712D838C400302BE3 /* StringRecursionChecker.cpp */; }; 9534AAFB0E5B7A9600B8A45B /* JSProfilerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 952C63AC0E4777D600C13936 /* JSProfilerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 95742F650DD11F5A000917FB /* Profile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95742F630DD11F5A000917FB /* Profile.cpp */; }; - 95AB83420DA4322500BC83F3 /* Profiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */; }; + 95AB83420DA4322500BC83F3 /* LegacyProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB832E0DA42CAD00BC83F3 /* LegacyProfiler.cpp */; }; 95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB83540DA43B4400BC83F3 /* ProfileNode.cpp */; }; 95CD45760E1C4FDD0085358E /* ProfileGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95CD45740E1C4FDD0085358E /* ProfileGenerator.cpp */; }; 95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 95CD45750E1C4FDD0085358E /* ProfileGenerator.h */; settings = {ATTRIBUTES = (); }; }; @@ -566,18 +658,20 @@ 969A072A0ED1CE6900F1F681 /* Label.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07270ED1CE6900F1F681 /* Label.h */; }; 969A072B0ED1CE6900F1F681 /* RegisterID.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07280ED1CE6900F1F681 /* RegisterID.h */; }; 969A07960ED1D3AE00F1F681 /* CodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */; settings = {COMPILER_FLAGS = "-fno-strict-aliasing"; }; }; - 969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07910ED1D3AE00F1F681 /* CodeBlock.h */; settings = {ATTRIBUTES = (); }; }; - 969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */; }; - 969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07930ED1D3AE00F1F681 /* Instruction.h */; }; + 969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07910ED1D3AE00F1F681 /* CodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07930ED1D3AE00F1F681 /* Instruction.h */; settings = {ATTRIBUTES = (Private, ); }; }; 969A079A0ED1D3AE00F1F681 /* Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07940ED1D3AE00F1F681 /* Opcode.cpp */; }; 969A079B0ED1D3AE00F1F681 /* Opcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07950ED1D3AE00F1F681 /* Opcode.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 971EDEA61169E0D3005E4262 /* Terminator.h in Headers */ = {isa = PBXBuildFile; fileRef = 97F6903A1169DF7F00A6BB46 /* Terminator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 978801401471AD920041B016 /* JSDateMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9788FC221471AD0C0068CE2D /* JSDateMath.cpp */; }; 978801411471AD920041B016 /* JSDateMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 9788FC231471AD0C0068CE2D /* JSDateMath.h */; settings = {ATTRIBUTES = (Private, ); }; }; A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1712B3A11C7B212007A5315 /* RegExpCache.cpp */; }; A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */ = {isa = PBXBuildFile; fileRef = A1712B3E11C7B228007A5315 /* RegExpCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; A1712B4111C7B235007A5315 /* RegExpKey.h in Headers */ = {isa = PBXBuildFile; fileRef = A1712B4011C7B235007A5315 /* RegExpKey.h */; settings = {ATTRIBUTES = (Private, ); }; }; A71236E51195F33C00BD2174 /* JITOpcodes32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A71236E41195F33C00BD2174 /* JITOpcodes32_64.cpp */; }; + A72028B61797601E0098028C /* JSCTestRunnerUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72028B41797601E0098028C /* JSCTestRunnerUtils.cpp */; }; + A72028B81797601E0098028C /* JSCTestRunnerUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = A72028B51797601E0098028C /* JSCTestRunnerUtils.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A72028BA1797603D0098028C /* JSFunctionInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A72028B91797603D0098028C /* JSFunctionInlines.h */; }; A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72700780DAC605600E548D7 /* JSNotAnObject.cpp */; }; A72701B90DADE94900E548D7 /* ExceptionHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = A72701B30DADE94900E548D7 /* ExceptionHelpers.h */; }; A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */; }; @@ -593,21 +687,22 @@ A7482B9411671147003B0712 /* JSWeakObjectMapRefPrivate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7482B7A1166CDEA003B0712 /* JSWeakObjectMapRefPrivate.cpp */; }; A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A7482E37116A697B003B0712 /* JSWeakObjectMapRefInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; A74DE1D0120B875600D40D5B /* ARMv7Assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A74DE1CB120B86D600D40D5B /* ARMv7Assembler.cpp */; }; - A7521E131429169A003C8D0C /* CardSet.h in Headers */ = {isa = PBXBuildFile; fileRef = A7521E121429169A003C8D0C /* CardSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; A75706DE118A2BCF0057F88F /* JITArithmetic32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */; }; A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = A76C51741182748D00715B05 /* JSInterfaceJIT.h */; settings = {ATTRIBUTES = (Private, ); }; }; A76F279415F13C9600517D67 /* UnlinkedCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A79E781E15EECBA80047C855 /* UnlinkedCodeBlock.cpp */; }; - A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */; }; + A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */; settings = {ATTRIBUTES = (Private, ); }; }; A77F1821164088B200640A47 /* CodeCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A77F181F164088B200640A47 /* CodeCache.cpp */; }; A77F1822164088B200640A47 /* CodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = A77F1820164088B200640A47 /* CodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; A77F1825164192C700640A47 /* ParserModes.h in Headers */ = {isa = PBXBuildFile; fileRef = A77F18241641925400640A47 /* ParserModes.h */; settings = {ATTRIBUTES = (Private, ); }; }; - A784A26111D16622005776AC /* ASTBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A7EE7411B98B8D0065A14F /* ASTBuilder.h */; }; - A784A26411D16622005776AC /* SyntaxChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A7EE7711B98B8D0065A14F /* SyntaxChecker.h */; }; + A784A26111D16622005776AC /* ASTBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A7EE7411B98B8D0065A14F /* ASTBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A784A26411D16622005776AC /* SyntaxChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A7EE7711B98B8D0065A14F /* SyntaxChecker.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7AFC17915F7EFE30048F57B /* ResolveOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = A7AFC17715F7EFE30048F57B /* ResolveOperation.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7B48F490EE8936F00DCBDB6 /* ExecutableAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */; }; A7B4ACAF1484C9CE00B38A36 /* JSExportMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7B601821639FD2A00372BA3 /* UnlinkedCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = A79E781F15EECBA80047C855 /* UnlinkedCodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A7C0C4AC168103020017011D /* JSScriptRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C0C4AB167C08CD0017011D /* JSScriptRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A7C0C4AD1681067E0017011D /* JSScriptRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */; }; A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */; }; A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DCB77912E3D90500911940 /* WriteBarrier.h */; settings = {ATTRIBUTES = (Private, ); }; }; A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E2EA690FB460CF00601F06 /* LiteralParser.h */; }; @@ -617,6 +712,7 @@ A7FB60A4103F7DC20017A286 /* PropertyDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7FB60A3103F7DC20017A286 /* PropertyDescriptor.cpp */; }; A7FB61001040C38B0017A286 /* PropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = A7FB604B103F5EAB0017A286 /* PropertyDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; }; A8A4748E151A8306004123FF /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8A4748D151A8306004123FF /* libWTF.a */; }; + ADE39FFF16DD144B0003CD4A /* PropertyTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD1CF06816DCAB2D00B97123 /* PropertyTable.cpp */; }; BC02E90D0E1839DB000F9297 /* ErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9050E1839DB000F9297 /* ErrorConstructor.h */; }; BC02E90F0E1839DB000F9297 /* ErrorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9070E1839DB000F9297 /* ErrorPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9090E1839DB000F9297 /* NativeErrorConstructor.h */; }; @@ -651,10 +747,10 @@ BC18C41A0E16F5CD00B34460 /* JSCallbackFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440F88F0A508B100005F061 /* JSCallbackFunction.h */; }; BC18C41B0E16F5CD00B34460 /* JSCallbackObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 14ABDF5D0A437FEF00ECCA01 /* JSCallbackObject.h */; }; BC18C41C0E16F5CD00B34460 /* JSCallbackObjectFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E894310CD0602400367179 /* JSCallbackObjectFunctions.h */; }; - BC18C41D0E16F5CD00B34460 /* JSClassRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440FCE10A51E46B0005F061 /* JSClassRef.h */; }; + BC18C41D0E16F5CD00B34460 /* JSClassRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440FCE10A51E46B0005F061 /* JSClassRef.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C41E0E16F5CD00B34460 /* JSContextRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */; settings = {ATTRIBUTES = (Public, ); }; }; BC18C41F0E16F5CD00B34460 /* JSFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A85F0255597D01FF60F7 /* JSFunction.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC18C4200E16F5CD00B34460 /* JSGlobalData.h in Headers */ = {isa = PBXBuildFile; fileRef = E18E3A560DF9278C00D90B34 /* JSGlobalData.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BC18C4200E16F5CD00B34460 /* VM.h in Headers */ = {isa = PBXBuildFile; fileRef = E18E3A560DF9278C00D90B34 /* VM.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E894330CD0603F00367179 /* JSGlobalObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4230E16F5CD00B34460 /* JSLock.h in Headers */ = {isa = PBXBuildFile; fileRef = 65EA4C9A092AF9E20093D800 /* JSLock.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4240E16F5CD00B34460 /* JSObject.h in Headers */ = {isa = PBXBuildFile; fileRef = BC22A3990E16E14800AF21C8 /* JSObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -664,11 +760,11 @@ BC18C4280E16F5CD00B34460 /* JSStringRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1482B74B0A43032800517CFC /* JSStringRef.h */; settings = {ATTRIBUTES = (Public, ); }; }; BC18C4290E16F5CD00B34460 /* JSStringRefCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 146AAB2A0B66A84900E55F16 /* JSStringRefCF.h */; settings = {ATTRIBUTES = (Public, ); }; }; BC18C42A0E16F5CD00B34460 /* JSType.h in Headers */ = {isa = PBXBuildFile; fileRef = 14ABB454099C2A0F00E2A24F /* JSType.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC18C42B0E16F5CD00B34460 /* JSValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 14ABB36E099C076400E2A24F /* JSValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BC18C42B0E16F5CD00B34460 /* JSCJSValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 14ABB36E099C076400E2A24F /* JSCJSValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C42C0E16F5CD00B34460 /* JSValueRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1482B6EA0A4300B300517CFC /* JSValueRef.h */; settings = {ATTRIBUTES = (Public, ); }; }; BC18C42D0E16F5CD00B34460 /* JSVariableObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F252560D08DD8D004ECFFF /* JSVariableObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C42E0E16F5CD00B34460 /* JSWrapperObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C7A1720A8EAACB00FA37EA /* JSWrapperObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC18C4310E16F5CD00B34460 /* Lexer.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8660255597D01FF60F7 /* Lexer.h */; }; + BC18C4310E16F5CD00B34460 /* Lexer.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8660255597D01FF60F7 /* Lexer.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4370E16F5CD00B34460 /* Lookup.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8690255597D01FF60F7 /* Lookup.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A86B0255597D01FF60F7 /* MathObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A86E0255597D01FF60F7 /* Nodes.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -676,13 +772,13 @@ BC18C4420E16F5CD00B34460 /* NumberConstructor.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2680E60E16D52300A06E92 /* NumberConstructor.lut.h */; }; BC18C4430E16F5CD00B34460 /* NumberObject.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8710255597D01FF60F7 /* NumberObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4440E16F5CD00B34460 /* NumberPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2680C50E16D4E900A06E92 /* NumberPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC18C4450E16F5CD00B34460 /* ObjectConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2680C70E16D4E900A06E92 /* ObjectConstructor.h */; }; + BC18C4450E16F5CD00B34460 /* ObjectConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2680C70E16D4E900A06E92 /* ObjectConstructor.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4460E16F5CD00B34460 /* ObjectPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = BC2680C90E16D4E900A06E92 /* ObjectPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4480E16F5CD00B34460 /* Operations.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8780255597D01FF60F7 /* Operations.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC18C44B0E16F5CD00B34460 /* Parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F0B3AA09BB4DC00068FCE3 /* Parser.h */; settings = {ATTRIBUTES = (); }; }; + BC18C44B0E16F5CD00B34460 /* Parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F0B3AA09BB4DC00068FCE3 /* Parser.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4500E16F5CD00B34460 /* Profile.h in Headers */ = {isa = PBXBuildFile; fileRef = 95742F640DD11F5A000917FB /* Profile.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4510E16F5CD00B34460 /* ProfileNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB83550DA43B4400BC83F3 /* ProfileNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC18C4520E16F5CD00B34460 /* Profiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB832F0DA42CAD00BC83F3 /* Profiler.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BC18C4520E16F5CD00B34460 /* LegacyProfiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB832F0DA42CAD00BC83F3 /* LegacyProfiler.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4540E16F5CD00B34460 /* PropertyNameArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 65400C100A69BAF200509887 /* PropertyNameArray.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4550E16F5CD00B34460 /* PropertySlot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* PropertySlot.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC18C4560E16F5CD00B34460 /* Protect.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C02FBB0637462A003E7EE6 /* Protect.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -712,7 +808,7 @@ BC9041480EB9250900FE26FA /* StructureTransitionTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9041470EB9250900FE26FA /* StructureTransitionTable.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC95437D0EBA70FD0072B6D3 /* PropertyMapHashTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BC95437C0EBA70FD0072B6D3 /* PropertyMapHashTable.h */; settings = {ATTRIBUTES = (Private, ); }; }; BCBE2CAE14E985AA000593AD /* GCAssertions.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBE2CAD14E985AA000593AD /* GCAssertions.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCF0D070EF0AAB900413C8F /* StructureStubInfo.h */; }; + BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCCF0D070EF0AAB900413C8F /* StructureStubInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; BCCF0D0C0EF0B8A500413C8F /* StructureStubInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCCF0D0B0EF0B8A500413C8F /* StructureStubInfo.cpp */; }; BCD202C20E1706A7002C7E82 /* RegExpConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD202BE0E1706A7002C7E82 /* RegExpConstructor.h */; }; BCD202C40E1706A7002C7E82 /* RegExpPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD202C00E1706A7002C7E82 /* RegExpPrototype.h */; }; @@ -725,7 +821,9 @@ BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDE3AB00E6C82CF001453A7 /* Structure.cpp */; }; BCF605140E203EF800B9A64D /* ArgList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF605120E203EF800B9A64D /* ArgList.h */; settings = {ATTRIBUTES = (Private, ); }; }; BCFD8C920EEB2EE700283848 /* JumpTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCFD8C900EEB2EE700283848 /* JumpTable.cpp */; }; - BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFD8C910EEB2EE700283848 /* JumpTable.h */; }; + BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFD8C910EEB2EE700283848 /* JumpTable.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C20B25991706536200C21F4E /* Region.h in Headers */ = {isa = PBXBuildFile; fileRef = C20B25981706536200C21F4E /* Region.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C20BA92D16BB1C1500B3AEA2 /* StructureRareDataInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C20BA92C16BB1C1500B3AEA2 /* StructureRareDataInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; C21122E115DD9AB300790E3A /* GCThreadSharedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */; }; C21122E215DD9AB300790E3A /* GCThreadSharedData.h in Headers */ = {isa = PBXBuildFile; fileRef = C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */; settings = {ATTRIBUTES = (Private, ); }; }; C21122E315DD9AB300790E3A /* MarkStackInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C21122E015DD9AB300790E3A /* MarkStackInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -741,25 +839,35 @@ C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C240305314B404C90079EB64 /* CopiedSpace.cpp */; }; C24D31E2161CD695002AA4DB /* HeapStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C24D31E0161CD695002AA4DB /* HeapStatistics.cpp */; }; C24D31E3161CD695002AA4DB /* HeapStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = C24D31E1161CD695002AA4DB /* HeapStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C25D709B16DE99F400FCA6BC /* JSManagedValue.mm in Sources */ = {isa = PBXBuildFile; fileRef = C25D709916DE99F400FCA6BC /* JSManagedValue.mm */; }; + C25D709C16DE99F400FCA6BC /* JSManagedValue.h in Headers */ = {isa = PBXBuildFile; fileRef = C25D709A16DE99F400FCA6BC /* JSManagedValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; C25F8BCD157544A900245B71 /* IncrementalSweeper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C25F8BCB157544A900245B71 /* IncrementalSweeper.cpp */; }; C25F8BCE157544A900245B71 /* IncrementalSweeper.h in Headers */ = {isa = PBXBuildFile; fileRef = C25F8BCC157544A900245B71 /* IncrementalSweeper.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C283190016FE4B7D00157BFD /* HandleBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C28318FF16FE4B7D00157BFD /* HandleBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C283190216FE533E00157BFD /* HandleBlockInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C283190116FE533E00157BFD /* HandleBlockInlines.h */; }; C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */ = {isa = PBXBuildFile; fileRef = C2A7F687160432D400F76B98 /* JSDestructibleObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */; }; C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02B14A3C6B200578E65 /* CopiedSpaceInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; C2C8D03014A3CEFC00578E65 /* CopiedBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02E14A3CEFC00578E65 /* CopiedBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; C2C8D03114A3CEFC00578E65 /* HeapBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C2CF39C116E15A8100DD69BE /* JSAPIWrapperObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = C2CF39BF16E15A8100DD69BE /* JSAPIWrapperObject.mm */; }; + C2CF39C216E15A8100DD69BE /* JSAPIWrapperObject.h in Headers */ = {isa = PBXBuildFile; fileRef = C2CF39C016E15A8100DD69BE /* JSAPIWrapperObject.h */; }; C2D58C3415912FEE0021A844 /* GCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */; }; + C2DF442F1707AC0100A5CA96 /* SuperRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2DF442D1707AC0100A5CA96 /* SuperRegion.cpp */; }; + C2DF44301707AC0100A5CA96 /* SuperRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = C2DF442E1707AC0100A5CA96 /* SuperRegion.h */; settings = {ATTRIBUTES = (Private, ); }; }; C2E526BD1590EF000054E48D /* HeapTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2E526BB1590EF000054E48D /* HeapTimer.cpp */; }; C2E526BE1590EF000054E48D /* HeapTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = C2E526BC1590EF000054E48D /* HeapTimer.h */; settings = {ATTRIBUTES = (Private, ); }; }; C2EAA3FA149A835E00FCE112 /* CopiedSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = C2EAA3F8149A830800FCE112 /* CopiedSpace.h */; settings = {ATTRIBUTES = (Private, ); }; }; C2EAD2FC14F0249800A4B159 /* CopiedAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = C2EAD2FB14F0249800A4B159 /* CopiedAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C2F0F2D116BAEEE900187C19 /* StructureRareData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2F0F2D016BAEEE900187C19 /* StructureRareData.cpp */; }; C2FC9BD316644DFB00810D33 /* CopiedBlockInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C2FC9BD216644DFB00810D33 /* CopiedBlockInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; + C2FE18A416BAEC4000AF3061 /* StructureRareData.h in Headers */ = {isa = PBXBuildFile; fileRef = C2FE18A316BAEC4000AF3061 /* StructureRareData.h */; settings = {ATTRIBUTES = (Private, ); }; }; DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; }; E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */ = {isa = PBXBuildFile; fileRef = E124A8F50E555775003091F1 /* OpaqueJSString.h */; settings = {ATTRIBUTES = (Private, ); }; }; E124A8F80E555775003091F1 /* OpaqueJSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E124A8F60E555775003091F1 /* OpaqueJSString.cpp */; }; E178636D0D9BEEC300D74E75 /* InitializeThreading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E178636C0D9BEEC300D74E75 /* InitializeThreading.cpp */; }; - E18E3A590DF9278C00D90B34 /* JSGlobalData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18E3A570DF9278C00D90B34 /* JSGlobalData.cpp */; }; + E18E3A590DF9278C00D90B34 /* VM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18E3A570DF9278C00D90B34 /* VM.cpp */; }; E49DC16B12EF293E00184A1F /* SourceProviderCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E49DC15512EF277200184A1F /* SourceProviderCache.cpp */; }; E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC15112EF272200184A1F /* SourceProviderCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -767,7 +875,11 @@ FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */; settings = {ATTRIBUTES = (Private, ); }; }; FE4A331F15BD2E07006F54F3 /* VMInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE4A331D15BD2E07006F54F3 /* VMInspector.cpp */; }; FE4A332015BD2E07006F54F3 /* VMInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = FE4A331E15BD2E07006F54F3 /* VMInspector.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FE6617281774E03500495B00 /* VMStackBounds.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6617271774E03500495B00 /* VMStackBounds.h */; settings = {ATTRIBUTES = (Private, ); }; }; FED287B215EC9A5700DA8161 /* LLIntOpcode.h in Headers */ = {isa = PBXBuildFile; fileRef = FED287B115EC9A5700DA8161 /* LLIntOpcode.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FED94F2E171E3E2300BE77A4 /* Watchdog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FED94F2B171E3E2300BE77A4 /* Watchdog.cpp */; }; + FED94F2F171E3E2300BE77A4 /* Watchdog.h in Headers */ = {isa = PBXBuildFile; fileRef = FED94F2C171E3E2300BE77A4 /* Watchdog.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FED94F30171E3E2300BE77A4 /* WatchdogMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FED94F2D171E3E2300BE77A4 /* WatchdogMac.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -862,6 +974,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0F05C3B21683CF8F00BAF45B /* DFGArrayifySlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGArrayifySlowPathGenerator.h; path = dfg/DFGArrayifySlowPathGenerator.h; sourceTree = ""; }; 0F0776BD14FF002800102332 /* JITCompilationEffort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITCompilationEffort.h; sourceTree = ""; }; 0F0B839514BCF45A00885B4F /* LLIntEntrypoints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntEntrypoints.cpp; path = llint/LLIntEntrypoints.cpp; sourceTree = ""; }; 0F0B839614BCF45A00885B4F /* LLIntEntrypoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntEntrypoints.h; path = llint/LLIntEntrypoints.h; sourceTree = ""; }; @@ -877,6 +990,10 @@ 0F0CD4C015F1A6040032F1C0 /* PutDirectIndexMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PutDirectIndexMode.h; sourceTree = ""; }; 0F0CD4C315F6B6B50032F1C0 /* SparseArrayValueMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SparseArrayValueMap.cpp; sourceTree = ""; }; 0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLIntCallLinkInfo.h; sourceTree = ""; }; + 0F13912416771C30009CCB07 /* ProfilerBytecodeSequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerBytecodeSequence.cpp; path = profiler/ProfilerBytecodeSequence.cpp; sourceTree = ""; }; + 0F13912516771C30009CCB07 /* ProfilerBytecodeSequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerBytecodeSequence.h; path = profiler/ProfilerBytecodeSequence.h; sourceTree = ""; }; + 0F13912616771C30009CCB07 /* ProfilerProfiledBytecodes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerProfiledBytecodes.cpp; path = profiler/ProfilerProfiledBytecodes.cpp; sourceTree = ""; }; + 0F13912716771C30009CCB07 /* ProfilerProfiledBytecodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerProfiledBytecodes.h; path = profiler/ProfilerProfiledBytecodes.h; sourceTree = ""; }; 0F13E04C16164A1B00DC8DE7 /* IndexingType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndexingType.cpp; sourceTree = ""; }; 0F15F15D14B7A73A005DE37D /* CommonSlowPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonSlowPaths.h; sourceTree = ""; }; 0F16015A156198BF00C2587C /* DFGArgumentsSimplificationPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGArgumentsSimplificationPhase.cpp; path = dfg/DFGArgumentsSimplificationPhase.cpp; sourceTree = ""; }; @@ -907,6 +1024,11 @@ 0F2BDC5015228FFA00CD8910 /* DFGVariableEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGVariableEvent.cpp; path = dfg/DFGVariableEvent.cpp; sourceTree = ""; }; 0F2C556D14738F2E00121E4F /* DFGCodeBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFGCodeBlocks.cpp; sourceTree = ""; }; 0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DFGCodeBlocks.h; sourceTree = ""; }; + 0F2FC77016E12F6F0038D976 /* DFGDCEPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDCEPhase.cpp; path = dfg/DFGDCEPhase.cpp; sourceTree = ""; }; + 0F2FC77116E12F6F0038D976 /* DFGDCEPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDCEPhase.h; path = dfg/DFGDCEPhase.h; sourceTree = ""; }; + 0F34B14716D4200E001CDA5A /* DFGUseKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGUseKind.cpp; path = dfg/DFGUseKind.cpp; sourceTree = ""; }; + 0F34B14816D4200E001CDA5A /* DFGUseKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGUseKind.h; path = dfg/DFGUseKind.h; sourceTree = ""; }; + 0F34B14B16D43E0C001CDA5A /* PolymorphicAccessStructureList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolymorphicAccessStructureList.h; sourceTree = ""; }; 0F3B3A17153E68EF003ED0FF /* DFGConstantFoldingPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGConstantFoldingPhase.cpp; path = dfg/DFGConstantFoldingPhase.cpp; sourceTree = ""; }; 0F3B3A18153E68EF003ED0FF /* DFGConstantFoldingPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGConstantFoldingPhase.h; path = dfg/DFGConstantFoldingPhase.h; sourceTree = ""; }; 0F3B3A241544C991003ED0FF /* DFGCFGSimplificationPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGCFGSimplificationPhase.cpp; path = dfg/DFGCFGSimplificationPhase.cpp; sourceTree = ""; }; @@ -932,21 +1054,24 @@ 0F4680CF14BBB3D100BFE272 /* LLIntData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntData.h; path = llint/LLIntData.h; sourceTree = ""; }; 0F4680D014BBC5F800BFE272 /* HostCallReturnValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostCallReturnValue.cpp; sourceTree = ""; }; 0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostCallReturnValue.h; sourceTree = ""; }; + 0F493AF816D0CAD10084508B /* SourceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceProvider.cpp; sourceTree = ""; }; 0F5541AF1613C1FB00CE3E25 /* SpecialPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpecialPointer.cpp; sourceTree = ""; }; 0F5541B01613C1FB00CE3E25 /* SpecialPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPointer.h; sourceTree = ""; }; 0F55F0F114D1063600AC7649 /* AbstractPC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AbstractPC.cpp; sourceTree = ""; }; 0F55F0F214D1063600AC7649 /* AbstractPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractPC.h; sourceTree = ""; }; 0F56A1D115000F31002992B1 /* ExecutionCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutionCounter.h; sourceTree = ""; }; 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionCounter.cpp; sourceTree = ""; }; - 0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGByteCodeCache.h; path = dfg/DFGByteCodeCache.h; sourceTree = ""; }; + 0F572D4D16879FDB00E57FBD /* ThunkGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThunkGenerator.h; sourceTree = ""; }; + 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITThunks.cpp; sourceTree = ""; }; + 0F5EF91C16878F78003E5C25 /* JITThunks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITThunks.h; sourceTree = ""; }; 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnconditionalFinalizer.h; sourceTree = ""; }; 0F62016D143FCD2F0068B77C /* DFGAbstractState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAbstractState.cpp; path = dfg/DFGAbstractState.cpp; sourceTree = ""; }; 0F62016E143FCD2F0068B77C /* DFGAbstractState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAbstractState.h; path = dfg/DFGAbstractState.h; sourceTree = ""; }; 0F62016F143FCD2F0068B77C /* DFGAbstractValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAbstractValue.h; path = dfg/DFGAbstractValue.h; sourceTree = ""; }; 0F620170143FCD2F0068B77C /* DFGBasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGBasicBlock.h; path = dfg/DFGBasicBlock.h; sourceTree = ""; }; 0F620172143FCD2F0068B77C /* DFGVariableAccessData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGVariableAccessData.h; path = dfg/DFGVariableAccessData.h; sourceTree = ""; }; - 0F63943C15C75F14006A597C /* DFGStructureCheckHoistingPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGStructureCheckHoistingPhase.cpp; path = dfg/DFGStructureCheckHoistingPhase.cpp; sourceTree = ""; }; - 0F63943D15C75F14006A597C /* DFGStructureCheckHoistingPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGStructureCheckHoistingPhase.h; path = dfg/DFGStructureCheckHoistingPhase.h; sourceTree = ""; }; + 0F63943C15C75F14006A597C /* DFGTypeCheckHoistingPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGTypeCheckHoistingPhase.cpp; path = dfg/DFGTypeCheckHoistingPhase.cpp; sourceTree = ""; }; + 0F63943D15C75F14006A597C /* DFGTypeCheckHoistingPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGTypeCheckHoistingPhase.h; path = dfg/DFGTypeCheckHoistingPhase.h; sourceTree = ""; }; 0F63945115D07051006A597C /* ArrayProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayProfile.cpp; sourceTree = ""; }; 0F63945215D07051006A597C /* ArrayProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayProfile.h; sourceTree = ""; }; 0F63947615DCE347006A597C /* DFGStructureAbstractValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGStructureAbstractValue.h; path = dfg/DFGStructureAbstractValue.h; sourceTree = ""; }; @@ -954,6 +1079,8 @@ 0F63948215E48114006A597C /* DFGArrayMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGArrayMode.h; path = dfg/DFGArrayMode.h; sourceTree = ""; }; 0F66E16814DF3F1300B7B2E4 /* DFGAdjacencyList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAdjacencyList.h; path = dfg/DFGAdjacencyList.h; sourceTree = ""; }; 0F66E16914DF3F1300B7B2E4 /* DFGEdge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGEdge.h; path = dfg/DFGEdge.h; sourceTree = ""; }; + 0F714CA116EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGBackwardsPropagationPhase.cpp; path = dfg/DFGBackwardsPropagationPhase.cpp; sourceTree = ""; }; + 0F714CA216EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGBackwardsPropagationPhase.h; path = dfg/DFGBackwardsPropagationPhase.h; sourceTree = ""; }; 0F73D7AB165A142A00ACAB71 /* ClosureCallStubRoutine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClosureCallStubRoutine.cpp; sourceTree = ""; }; 0F73D7AC165A142A00ACAB71 /* ClosureCallStubRoutine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClosureCallStubRoutine.h; sourceTree = ""; }; 0F766D1C15A5028D008F363E /* JITStubRoutine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITStubRoutine.h; sourceTree = ""; }; @@ -975,6 +1102,7 @@ 0F8335B41639C1E3001443B5 /* ArrayAllocationProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayAllocationProfile.cpp; sourceTree = ""; }; 0F8335B51639C1E3001443B5 /* ArrayAllocationProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayAllocationProfile.h; sourceTree = ""; }; 0F8364B5164B0C0E0053329A /* DFGBranchDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGBranchDirection.h; path = dfg/DFGBranchDirection.h; sourceTree = ""; }; + 0F85A31E16AB76AE0077571E /* DFGVariadicFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGVariadicFunction.h; path = dfg/DFGVariadicFunction.h; sourceTree = ""; }; 0F8F943A1667631100D61971 /* CodeSpecializationKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeSpecializationKind.cpp; sourceTree = ""; }; 0F8F943D1667632D00D61971 /* CodeBlockHash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeBlockHash.cpp; sourceTree = ""; }; 0F8F943E1667632D00D61971 /* CodeBlockHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBlockHash.h; sourceTree = ""; }; @@ -997,6 +1125,9 @@ 0F93329B14CA7DC10085F3C6 /* StructureSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureSet.h; sourceTree = ""; }; 0F963B3613FC6FDE0002D9B2 /* ValueProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValueProfile.h; sourceTree = ""; }; 0F96EBB116676EF4008BADE3 /* CodeBlockWithJITType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBlockWithJITType.h; sourceTree = ""; }; + 0F97496F1687ADE200A4FF6A /* JSCellInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCellInlines.h; sourceTree = ""; }; + 0F98205D16BFE37F00240D02 /* PreciseJumpTargets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreciseJumpTargets.cpp; sourceTree = ""; }; + 0F98205E16BFE37F00240D02 /* PreciseJumpTargets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreciseJumpTargets.h; sourceTree = ""; }; 0F9D336E165DBB8D005AD387 /* Disassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Disassembler.cpp; path = disassembler/Disassembler.cpp; sourceTree = ""; }; 0F9FC8BF14E1B5FB00D52AE0 /* PolymorphicPutByIdList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolymorphicPutByIdList.cpp; sourceTree = ""; }; 0F9FC8C014E1B5FB00D52AE0 /* PolymorphicPutByIdList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolymorphicPutByIdList.h; sourceTree = ""; }; @@ -1006,6 +1137,22 @@ 0FA581B9150E952A00B9A2D9 /* DFGNodeType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGNodeType.h; path = dfg/DFGNodeType.h; sourceTree = ""; }; 0FAF7EFA165BA919000C8455 /* JITDisassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITDisassembler.cpp; sourceTree = ""; }; 0FAF7EFB165BA919000C8455 /* JITDisassembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITDisassembler.h; sourceTree = ""; }; + 0FB105821675480C00F8AB6E /* ExitKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExitKind.cpp; sourceTree = ""; }; + 0FB105831675480C00F8AB6E /* ExitKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExitKind.h; sourceTree = ""; }; + 0FB105871675482E00F8AB6E /* ProfilerOSRExit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerOSRExit.cpp; path = profiler/ProfilerOSRExit.cpp; sourceTree = ""; }; + 0FB105881675482E00F8AB6E /* ProfilerOSRExit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerOSRExit.h; path = profiler/ProfilerOSRExit.h; sourceTree = ""; }; + 0FB105891675482E00F8AB6E /* ProfilerOSRExitSite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerOSRExitSite.cpp; path = profiler/ProfilerOSRExitSite.cpp; sourceTree = ""; }; + 0FB1058A1675482E00F8AB6E /* ProfilerOSRExitSite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerOSRExitSite.h; path = profiler/ProfilerOSRExitSite.h; sourceTree = ""; }; + 0FB4B51016B3A964003F696B /* DFGMinifiedID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGMinifiedID.h; path = dfg/DFGMinifiedID.h; sourceTree = ""; }; + 0FB4B51916B62772003F696B /* DFGAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAllocator.h; path = dfg/DFGAllocator.h; sourceTree = ""; }; + 0FB4B51A16B62772003F696B /* DFGCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGCommon.cpp; path = dfg/DFGCommon.cpp; sourceTree = ""; }; + 0FB4B51B16B62772003F696B /* DFGEdge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGEdge.cpp; path = dfg/DFGEdge.cpp; sourceTree = ""; }; + 0FB4B51C16B62772003F696B /* DFGLongLivedState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGLongLivedState.cpp; path = dfg/DFGLongLivedState.cpp; sourceTree = ""; }; + 0FB4B51D16B62772003F696B /* DFGLongLivedState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGLongLivedState.h; path = dfg/DFGLongLivedState.h; sourceTree = ""; }; + 0FB4B51E16B62772003F696B /* DFGNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGNode.cpp; path = dfg/DFGNode.cpp; sourceTree = ""; }; + 0FB4B51F16B62772003F696B /* DFGNodeAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGNodeAllocator.h; path = dfg/DFGNodeAllocator.h; sourceTree = ""; }; + 0FB4B52116B6278D003F696B /* FunctionExecutableDump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionExecutableDump.cpp; sourceTree = ""; }; + 0FB4B52216B6278D003F696B /* FunctionExecutableDump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FunctionExecutableDump.h; sourceTree = ""; }; 0FB5467614F59AD1002C2989 /* LazyOperandValueProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LazyOperandValueProfile.h; sourceTree = ""; }; 0FB5467814F5C468002C2989 /* LazyOperandValueProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LazyOperandValueProfile.cpp; sourceTree = ""; }; 0FB5467A14F5C7D4002C2989 /* MethodOfGettingAValueProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MethodOfGettingAValueProfile.h; sourceTree = ""; }; @@ -1023,6 +1170,12 @@ 0FBC0AE41496C7C100D4FBDD /* DFGExitProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFGExitProfile.cpp; sourceTree = ""; }; 0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DFGExitProfile.h; sourceTree = ""; }; 0FBD7E671447998F00481315 /* CodeOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeOrigin.h; sourceTree = ""; }; + 0FBE0F6B16C1DB010082C5E8 /* DFGCPSRethreadingPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGCPSRethreadingPhase.cpp; path = dfg/DFGCPSRethreadingPhase.cpp; sourceTree = ""; }; + 0FBE0F6C16C1DB010082C5E8 /* DFGCPSRethreadingPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCPSRethreadingPhase.h; path = dfg/DFGCPSRethreadingPhase.h; sourceTree = ""; }; + 0FBE0F6D16C1DB010082C5E8 /* DFGPredictionInjectionPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGPredictionInjectionPhase.cpp; path = dfg/DFGPredictionInjectionPhase.cpp; sourceTree = ""; }; + 0FBE0F6E16C1DB010082C5E8 /* DFGPredictionInjectionPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGPredictionInjectionPhase.h; path = dfg/DFGPredictionInjectionPhase.h; sourceTree = ""; }; + 0FBE0F6F16C1DB010082C5E8 /* DFGUnificationPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGUnificationPhase.cpp; path = dfg/DFGUnificationPhase.cpp; sourceTree = ""; }; + 0FBE0F7016C1DB010082C5E8 /* DFGUnificationPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGUnificationPhase.h; path = dfg/DFGUnificationPhase.h; sourceTree = ""; }; 0FC097681468A6EF00CF2442 /* DFGOSRExit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOSRExit.h; path = dfg/DFGOSRExit.h; sourceTree = ""; }; 0FC0976B1468AB4A00CF2442 /* DFGAssemblyHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAssemblyHelpers.cpp; path = dfg/DFGAssemblyHelpers.cpp; sourceTree = ""; }; 0FC0976C1468AB4A00CF2442 /* DFGAssemblyHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAssemblyHelpers.h; path = dfg/DFGAssemblyHelpers.h; sourceTree = ""; }; @@ -1032,8 +1185,6 @@ 0FC0977E1469EBC400CF2442 /* DFGCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCommon.h; path = dfg/DFGCommon.h; sourceTree = ""; }; 0FC0978E146A6F6300CF2442 /* DFGOSRExit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGOSRExit.cpp; path = dfg/DFGOSRExit.cpp; sourceTree = ""; }; 0FC0978F146A6F6300CF2442 /* DFGOSRExitCompiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGOSRExitCompiler.cpp; path = dfg/DFGOSRExitCompiler.cpp; sourceTree = ""; }; - 0FC0979A146A772000CF2442 /* DFGCorrectableJumpPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCorrectableJumpPoint.h; path = dfg/DFGCorrectableJumpPoint.h; sourceTree = ""; }; - 0FC0979D146B271E00CF2442 /* DFGCorrectableJumpPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGCorrectableJumpPoint.cpp; path = dfg/DFGCorrectableJumpPoint.cpp; sourceTree = ""; }; 0FC0979F146B28C700CF2442 /* DFGThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGThunks.cpp; path = dfg/DFGThunks.cpp; sourceTree = ""; }; 0FC097A0146B28C700CF2442 /* DFGThunks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGThunks.h; path = dfg/DFGThunks.h; sourceTree = ""; }; 0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WriteBarrierSupport.cpp; sourceTree = ""; }; @@ -1041,8 +1192,11 @@ 0FC815121405118600CFA603 /* VTableSpectrum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VTableSpectrum.cpp; sourceTree = ""; }; 0FC815141405118D00CFA603 /* VTableSpectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTableSpectrum.h; sourceTree = ""; }; 0FCB408515C0A3C30048932B /* SlotVisitorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotVisitorInlines.h; sourceTree = ""; }; + 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserError.h; sourceTree = ""; }; + 0FD2C92316D01EE900C7803F /* StructureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureInlines.h; sourceTree = ""; }; 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDriver.cpp; path = dfg/DFGDriver.cpp; sourceTree = ""; }; 0FD3C82214115D0E00FD81CB /* DFGDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDriver.h; path = dfg/DFGDriver.h; sourceTree = ""; }; + 0FD5652216AB780A00197653 /* DFGBasicBlockInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGBasicBlockInlines.h; path = dfg/DFGBasicBlockInlines.h; sourceTree = ""; }; 0FD81ACF154FB4EB00983E72 /* DFGDominators.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDominators.cpp; path = dfg/DFGDominators.cpp; sourceTree = ""; }; 0FD81AD0154FB4EB00983E72 /* DFGDominators.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDominators.h; path = dfg/DFGDominators.h; sourceTree = ""; }; 0FD82E1E14172C2F00179C94 /* DFGCapabilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGCapabilities.cpp; path = dfg/DFGCapabilities.cpp; sourceTree = ""; }; @@ -1058,6 +1212,8 @@ 0FE228EB1436AB2300196C48 /* Options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Options.h; sourceTree = ""; }; 0FEB3ECB16237F4700AB67AD /* TypedArrayDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayDescriptor.h; sourceTree = ""; }; 0FEB3ECE16237F6700AB67AD /* MacroAssembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssembler.cpp; sourceTree = ""; }; + 0FEFC9A71681A3B000567F53 /* DFGOSRExitJumpPlaceholder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGOSRExitJumpPlaceholder.cpp; path = dfg/DFGOSRExitJumpPlaceholder.cpp; sourceTree = ""; }; + 0FEFC9A81681A3B000567F53 /* DFGOSRExitJumpPlaceholder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOSRExitJumpPlaceholder.h; path = dfg/DFGOSRExitJumpPlaceholder.h; sourceTree = ""; }; 0FF4272F158EBD44004CB9FF /* Disassembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Disassembler.h; path = disassembler/Disassembler.h; sourceTree = ""; }; 0FF42730158EBD44004CB9FF /* UDis86Disassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UDis86Disassembler.cpp; path = disassembler/UDis86Disassembler.cpp; sourceTree = ""; }; 0FF42734158EBD94004CB9FF /* udis86_decode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = udis86_decode.c; path = disassembler/udis86/udis86_decode.c; sourceTree = ""; }; @@ -1078,7 +1234,26 @@ 0FF427621591A1C9004CB9FF /* DFGDisassembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDisassembler.h; path = dfg/DFGDisassembler.h; sourceTree = ""; }; 0FF4276E159275D2004CB9FF /* ResolveGlobalStatus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResolveGlobalStatus.cpp; sourceTree = ""; }; 0FF4276F159275D2004CB9FF /* ResolveGlobalStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResolveGlobalStatus.h; sourceTree = ""; }; + 0FF60ABF16740F8100029779 /* ReduceWhitespace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReduceWhitespace.cpp; sourceTree = ""; }; + 0FF60AC016740F8100029779 /* ReduceWhitespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReduceWhitespace.h; sourceTree = ""; }; 0FF7168A15A3B231008F5DAA /* PropertyOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PropertyOffset.h; sourceTree = ""; }; + 0FF72992166AD347000F5BA3 /* ProfilerBytecode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerBytecode.cpp; path = profiler/ProfilerBytecode.cpp; sourceTree = ""; }; + 0FF72993166AD347000F5BA3 /* ProfilerBytecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerBytecode.h; path = profiler/ProfilerBytecode.h; sourceTree = ""; }; + 0FF72994166AD347000F5BA3 /* ProfilerBytecodes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerBytecodes.cpp; path = profiler/ProfilerBytecodes.cpp; sourceTree = ""; }; + 0FF72995166AD347000F5BA3 /* ProfilerBytecodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerBytecodes.h; path = profiler/ProfilerBytecodes.h; sourceTree = ""; }; + 0FF72996166AD347000F5BA3 /* ProfilerCompilation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerCompilation.cpp; path = profiler/ProfilerCompilation.cpp; sourceTree = ""; }; + 0FF72997166AD347000F5BA3 /* ProfilerCompilation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerCompilation.h; path = profiler/ProfilerCompilation.h; sourceTree = ""; }; + 0FF72998166AD347000F5BA3 /* ProfilerCompilationKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerCompilationKind.cpp; path = profiler/ProfilerCompilationKind.cpp; sourceTree = ""; }; + 0FF72999166AD347000F5BA3 /* ProfilerCompilationKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerCompilationKind.h; path = profiler/ProfilerCompilationKind.h; sourceTree = ""; }; + 0FF7299A166AD347000F5BA3 /* ProfilerCompiledBytecode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerCompiledBytecode.cpp; path = profiler/ProfilerCompiledBytecode.cpp; sourceTree = ""; }; + 0FF7299B166AD347000F5BA3 /* ProfilerCompiledBytecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerCompiledBytecode.h; path = profiler/ProfilerCompiledBytecode.h; sourceTree = ""; }; + 0FF7299C166AD347000F5BA3 /* ProfilerDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerDatabase.cpp; path = profiler/ProfilerDatabase.cpp; sourceTree = ""; }; + 0FF7299D166AD347000F5BA3 /* ProfilerDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerDatabase.h; path = profiler/ProfilerDatabase.h; sourceTree = ""; }; + 0FF7299E166AD347000F5BA3 /* ProfilerExecutionCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerExecutionCounter.h; path = profiler/ProfilerExecutionCounter.h; sourceTree = ""; }; + 0FF7299F166AD347000F5BA3 /* ProfilerOrigin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerOrigin.cpp; path = profiler/ProfilerOrigin.cpp; sourceTree = ""; }; + 0FF729A0166AD347000F5BA3 /* ProfilerOrigin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerOrigin.h; path = profiler/ProfilerOrigin.h; sourceTree = ""; }; + 0FF729A1166AD347000F5BA3 /* ProfilerOriginStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfilerOriginStack.cpp; path = profiler/ProfilerOriginStack.cpp; sourceTree = ""; }; + 0FF729A2166AD347000F5BA3 /* ProfilerOriginStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfilerOriginStack.h; path = profiler/ProfilerOriginStack.h; sourceTree = ""; }; 0FF922CF14F46B130041A24E /* JSCLLIntOffsetsExtractor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = JSCLLIntOffsetsExtractor; sourceTree = BUILT_PRODUCTS_DIR; }; 0FFFC94B14EF909500C72532 /* DFGCFAPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGCFAPhase.cpp; path = dfg/DFGCFAPhase.cpp; sourceTree = ""; }; 0FFFC94C14EF909500C72532 /* DFGCFAPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCFAPhase.h; path = dfg/DFGCFAPhase.h; sourceTree = ""; }; @@ -1170,10 +1345,8 @@ 14A1563010966365006FA260 /* DateInstanceCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateInstanceCache.h; sourceTree = ""; }; 14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITStubs.cpp; sourceTree = ""; }; 14A396A60CD2933100B5B4FF /* SymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolTable.h; sourceTree = ""; }; - 14A42E3D0F4F60EE00599099 /* TimeoutChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimeoutChecker.cpp; sourceTree = ""; }; - 14A42E3E0F4F60EE00599099 /* TimeoutChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeoutChecker.h; sourceTree = ""; }; 14A6581A0F4E36F4000150FD /* JITStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITStubs.h; sourceTree = ""; }; - 14ABB36E099C076400E2A24F /* JSValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSValue.h; sourceTree = ""; }; + 14ABB36E099C076400E2A24F /* JSCJSValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCJSValue.h; sourceTree = ""; }; 14ABB454099C2A0F00E2A24F /* JSType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSType.h; sourceTree = ""; }; 14ABDF5D0A437FEF00ECCA01 /* JSCallbackObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackObject.h; sourceTree = ""; }; 14ABDF5E0A437FEF00ECCA01 /* JSCallbackObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCallbackObject.cpp; sourceTree = ""; }; @@ -1187,14 +1360,20 @@ 14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSContextRef.h; sourceTree = ""; }; 14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSValueRef.cpp; sourceTree = ""; }; 14BD5A2D0A3E91F600BAF59C /* testapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testapi.c; path = API/tests/testapi.c; sourceTree = ""; }; + 14BE7D3217135CF400D1807A /* WeakInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakInlines.h; sourceTree = ""; }; 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCMap.h; sourceTree = ""; }; + 14CA958A16AB50DE00938A06 /* StaticPropertyAnalyzer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticPropertyAnalyzer.h; sourceTree = ""; }; + 14CA958C16AB50FA00938A06 /* ObjectAllocationProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectAllocationProfile.h; sourceTree = ""; }; 14D2F3D8139F4BE200491031 /* MarkedSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkedSpace.cpp; sourceTree = ""; }; 14D2F3D9139F4BE200491031 /* MarkedSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkedSpace.h; sourceTree = ""; }; 14D792640DAA03FB001A9F05 /* JSStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStack.h; sourceTree = ""; }; + 14D844A216AA2C7000A65AF0 /* PrototypeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrototypeMap.cpp; sourceTree = ""; }; + 14D844A316AA2C7000A65AF0 /* PrototypeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrototypeMap.h; sourceTree = ""; }; 14D857740A4696C80032146C /* testapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = testapi.js; path = API/tests/testapi.js; sourceTree = ""; }; 14DA818E0D99FD2000B0A4FB /* JSActivation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActivation.h; sourceTree = ""; }; 14DA818F0D99FD2000B0A4FB /* JSActivation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSActivation.cpp; sourceTree = ""; }; 14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObject.cpp; sourceTree = ""; }; + 14DF04D916B3996D0016A513 /* StaticPropertyAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticPropertyAnalysis.h; sourceTree = ""; }; 14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakBlock.cpp; sourceTree = ""; }; 14E84F9A14EE1ACC00D6D5D4 /* WeakBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakBlock.h; sourceTree = ""; }; 14E84F9B14EE1ACC00D6D5D4 /* WeakSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakSet.cpp; sourceTree = ""; }; @@ -1204,6 +1383,8 @@ 14F7256314EE265E00B1652B /* WeakHandleOwner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakHandleOwner.cpp; sourceTree = ""; }; 14F7256414EE265E00B1652B /* WeakHandleOwner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakHandleOwner.h; sourceTree = ""; }; 14F97446138C853E00DA1C67 /* HeapRootVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapRootVisitor.h; sourceTree = ""; }; + 1A28D4A7177B71C80007FA3C /* JSStringRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringRefPrivate.h; sourceTree = ""; }; + 1ACF7376171CA6FB00C9BB1E /* Weak.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Weak.cpp; sourceTree = ""; }; 1C9051420BA9E8A70081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = ""; }; 1C9051430BA9E8A70081E9D0 /* JavaScriptCore.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = JavaScriptCore.xcconfig; sourceTree = ""; }; 1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = ""; }; @@ -1234,6 +1415,11 @@ 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 65621E6B089E859700760F35 /* PropertySlot.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertySlot.cpp; sourceTree = ""; tabWidth = 8; }; 65621E6C089E859700760F35 /* PropertySlot.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = PropertySlot.h; sourceTree = ""; tabWidth = 8; }; + 65987F2C167FE84B003C2F8D /* DFGOSRExitCompilationInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOSRExitCompilationInfo.h; path = dfg/DFGOSRExitCompilationInfo.h; sourceTree = ""; }; + 65987F2F16828A7E003C2F8D /* UnusedPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnusedPointer.h; sourceTree = ""; }; + 65C0284F171795E200351E35 /* ARMv7Disassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ARMv7Disassembler.cpp; path = disassembler/ARMv7Disassembler.cpp; sourceTree = ""; }; + 65C0285A1717966800351E35 /* ARMv7DOpcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMv7DOpcode.cpp; sourceTree = ""; }; + 65C0285B1717966800351E35 /* ARMv7DOpcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMv7DOpcode.h; sourceTree = ""; }; 65C02FBB0637462A003E7EE6 /* Protect.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Protect.h; sourceTree = ""; tabWidth = 8; }; 65C7A1710A8EAACB00FA37EA /* JSWrapperObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapperObject.cpp; sourceTree = ""; }; 65C7A1720A8EAACB00FA37EA /* JSWrapperObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSWrapperObject.h; sourceTree = ""; }; @@ -1262,7 +1448,7 @@ 863C6D981521111200585E4E /* YarrCanonicalizeUCS2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrCanonicalizeUCS2.cpp; path = yarr/YarrCanonicalizeUCS2.cpp; sourceTree = ""; }; 863C6D991521111200585E4E /* YarrCanonicalizeUCS2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrCanonicalizeUCS2.h; path = yarr/YarrCanonicalizeUCS2.h; sourceTree = ""; }; 863C6D9A1521111200585E4E /* YarrCanonicalizeUCS2.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = YarrCanonicalizeUCS2.js; path = yarr/YarrCanonicalizeUCS2.js; sourceTree = ""; }; - 865A30F0135007E100CDB49E /* JSValueInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSValueInlines.h; sourceTree = ""; }; + 865A30F0135007E100CDB49E /* JSCJSValueInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCJSValueInlines.h; sourceTree = ""; }; 865F408710E7D56300947361 /* APIShims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIShims.h; sourceTree = ""; }; 866739D013BFDE710023D87C /* BigInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BigInteger.h; sourceTree = ""; }; 866739D113BFDE710023D87C /* Uint16WithFraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Uint16WithFraction.h; sourceTree = ""; }; @@ -1286,7 +1472,6 @@ 86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic.cpp; sourceTree = ""; }; 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMv7Assembler.h; sourceTree = ""; }; 86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerARMv7.h; sourceTree = ""; }; - 86AE64A5135E5E1C00963012 /* MacroAssemblerSH4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssemblerSH4.cpp; sourceTree = ""; }; 86AE64A6135E5E1C00963012 /* MacroAssemblerSH4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerSH4.h; sourceTree = ""; }; 86AE64A7135E5E1C00963012 /* SH4Assembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SH4Assembler.h; sourceTree = ""; }; 86AE6C4B136A11E400963012 /* DFGFPRInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGFPRInfo.h; path = dfg/DFGFPRInfo.h; sourceTree = ""; }; @@ -1308,6 +1493,7 @@ 86CC85A20EE79B7400288682 /* JITCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITCall.cpp; sourceTree = ""; }; 86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess.cpp; sourceTree = ""; }; 86CCEFDD0F413F8900FD7F9E /* JITCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITCode.h; sourceTree = ""; }; + 86D22219167EF9440024C804 /* testapi.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = testapi.mm; path = API/tests/testapi.mm; sourceTree = ""; }; 86D3B2BF10156BDE002865E7 /* ARMAssembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMAssembler.cpp; sourceTree = ""; }; 86D3B2C010156BDE002865E7 /* ARMAssembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMAssembler.h; sourceTree = ""; }; 86D3B2C110156BDE002865E7 /* AssemblerBufferWithConstantPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssemblerBufferWithConstantPool.h; sourceTree = ""; }; @@ -1316,6 +1502,18 @@ 86D3B3C210159D7F002865E7 /* RepatchBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RepatchBuffer.h; sourceTree = ""; }; 86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocatorFixedVMPool.cpp; sourceTree = ""; }; 86E116B00FE75AC800B512BC /* CodeLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeLocation.h; sourceTree = ""; }; + 86E3C606167BAB87006D760A /* JSValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSValue.h; sourceTree = ""; }; + 86E3C607167BAB87006D760A /* JSContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSContext.h; sourceTree = ""; }; + 86E3C608167BAB87006D760A /* JSContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSContext.mm; sourceTree = ""; }; + 86E3C609167BAB87006D760A /* JSContextInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSContextInternal.h; sourceTree = ""; }; + 86E3C60A167BAB87006D760A /* JSExport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExport.h; sourceTree = ""; }; + 86E3C60B167BAB87006D760A /* JSWrapperMap.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSWrapperMap.mm; sourceTree = ""; }; + 86E3C60C167BAB87006D760A /* JSWrapperMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapperMap.h; sourceTree = ""; }; + 86E3C60D167BAB87006D760A /* JSValue.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSValue.mm; sourceTree = ""; }; + 86E3C60E167BAB87006D760A /* JSValueInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSValueInternal.h; sourceTree = ""; }; + 86E3C60F167BAB87006D760A /* JSVirtualMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVirtualMachine.h; sourceTree = ""; }; + 86E3C610167BAB87006D760A /* JSVirtualMachine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSVirtualMachine.mm; sourceTree = ""; }; + 86E3C611167BAB87006D760A /* JSVirtualMachineInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSVirtualMachineInternal.h; sourceTree = ""; }; 86E85538111B9968001AF51E /* JSStringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringBuilder.h; sourceTree = ""; }; 86EBF2F91560F036008E9222 /* NameConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NameConstructor.cpp; sourceTree = ""; }; 86EBF2FA1560F036008E9222 /* NameConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NameConstructor.h; sourceTree = ""; }; @@ -1337,6 +1535,9 @@ 86EC9DC31328DF82002B2AD7 /* DFGSpeculativeJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGSpeculativeJIT.h; path = dfg/DFGSpeculativeJIT.h; sourceTree = ""; }; 86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGNode.h; path = dfg/DFGNode.h; sourceTree = ""; }; 86ECA3F9132DF25A002B2AD7 /* DFGScoreBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGScoreBoard.h; path = dfg/DFGScoreBoard.h; sourceTree = ""; }; + 86F3EEB616855A5B0077B92A /* ObjcRuntimeExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjcRuntimeExtras.h; sourceTree = ""; }; + 86F3EEB9168CCF750077B92A /* ObjCCallbackFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjCCallbackFunction.h; sourceTree = ""; }; + 86F3EEBA168CCF750077B92A /* ObjCCallbackFunction.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObjCCallbackFunction.mm; sourceTree = ""; }; 86F75EFB151C062F007C9BA3 /* RegExpCachedResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegExpCachedResult.cpp; sourceTree = ""; }; 86F75EFC151C062F007C9BA3 /* RegExpCachedResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpCachedResult.h; sourceTree = ""; }; 86F75EFD151C062F007C9BA3 /* RegExpMatchesArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegExpMatchesArray.cpp; sourceTree = ""; }; @@ -1368,8 +1569,8 @@ 95742F630DD11F5A000917FB /* Profile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Profile.cpp; path = profiler/Profile.cpp; sourceTree = ""; }; 95742F640DD11F5A000917FB /* Profile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Profile.h; path = profiler/Profile.h; sourceTree = ""; }; 95988BA90E477BEC00D28D4D /* JSProfilerPrivate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSProfilerPrivate.cpp; sourceTree = ""; }; - 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Profiler.cpp; path = profiler/Profiler.cpp; sourceTree = ""; }; - 95AB832F0DA42CAD00BC83F3 /* Profiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Profiler.h; path = profiler/Profiler.h; sourceTree = ""; }; + 95AB832E0DA42CAD00BC83F3 /* LegacyProfiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LegacyProfiler.cpp; path = profiler/LegacyProfiler.cpp; sourceTree = ""; }; + 95AB832F0DA42CAD00BC83F3 /* LegacyProfiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LegacyProfiler.h; path = profiler/LegacyProfiler.h; sourceTree = ""; }; 95AB83540DA43B4400BC83F3 /* ProfileNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProfileNode.cpp; path = profiler/ProfileNode.cpp; sourceTree = ""; }; 95AB83550DA43B4400BC83F3 /* ProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfileNode.h; path = profiler/ProfileNode.h; sourceTree = ""; }; 95C18D3E0C90E7EF00E72F73 /* JSRetainPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRetainPtr.h; sourceTree = ""; }; @@ -1393,13 +1594,15 @@ 969A09220ED1E09C00F1F681 /* Completion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Completion.cpp; sourceTree = ""; }; 9788FC221471AD0C0068CE2D /* JSDateMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDateMath.cpp; sourceTree = ""; }; 9788FC231471AD0C0068CE2D /* JSDateMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDateMath.h; sourceTree = ""; }; - 97F6903A1169DF7F00A6BB46 /* Terminator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Terminator.h; sourceTree = ""; }; A1712B3A11C7B212007A5315 /* RegExpCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegExpCache.cpp; sourceTree = ""; }; A1712B3E11C7B228007A5315 /* RegExpCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpCache.h; sourceTree = ""; }; A1712B4011C7B235007A5315 /* RegExpKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpKey.h; sourceTree = ""; }; A71236E41195F33C00BD2174 /* JITOpcodes32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITOpcodes32_64.cpp; sourceTree = ""; }; A718F61A11754A21002465A7 /* RegExpJitTables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpJitTables.h; sourceTree = ""; }; A718F8211178EB4B002465A7 /* create_regex_tables */ = {isa = PBXFileReference; explicitFileType = text.script.python; fileEncoding = 4; path = create_regex_tables; sourceTree = ""; }; + A72028B41797601E0098028C /* JSCTestRunnerUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCTestRunnerUtils.cpp; sourceTree = ""; }; + A72028B51797601E0098028C /* JSCTestRunnerUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCTestRunnerUtils.h; sourceTree = ""; }; + A72028B91797603D0098028C /* JSFunctionInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFunctionInlines.h; sourceTree = ""; }; A72700770DAC605600E548D7 /* JSNotAnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNotAnObject.h; sourceTree = ""; }; A72700780DAC605600E548D7 /* JSNotAnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotAnObject.cpp; sourceTree = ""; }; A72701B30DADE94900E548D7 /* ExceptionHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionHelpers.h; sourceTree = ""; }; @@ -1414,7 +1617,6 @@ A7482B7A1166CDEA003B0712 /* JSWeakObjectMapRefPrivate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWeakObjectMapRefPrivate.cpp; sourceTree = ""; }; A7482E37116A697B003B0712 /* JSWeakObjectMapRefInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWeakObjectMapRefInternal.h; sourceTree = ""; }; A74DE1CB120B86D600D40D5B /* ARMv7Assembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMv7Assembler.cpp; sourceTree = ""; }; - A7521E121429169A003C8D0C /* CardSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CardSet.h; sourceTree = ""; }; A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic32_64.cpp; sourceTree = ""; }; A767FF9F14F4502900789059 /* JSCTypedArrayStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCTypedArrayStubs.h; sourceTree = ""; }; A76C51741182748D00715B05 /* JSInterfaceJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInterfaceJIT.h; sourceTree = ""; }; @@ -1431,6 +1633,8 @@ A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecutableAllocator.h; sourceTree = ""; }; A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocator.cpp; sourceTree = ""; }; A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExportMacros.h; sourceTree = ""; }; + A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptRef.cpp; sourceTree = ""; }; + A7C0C4AB167C08CD0017011D /* JSScriptRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptRefPrivate.h; sourceTree = ""; }; A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess32_64.cpp; sourceTree = ""; }; A7C225CC139981F100FF1662 /* KeywordLookupGenerator.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = KeywordLookupGenerator.py; sourceTree = ""; }; A7C225CD1399849C00FF1662 /* KeywordLookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeywordLookup.h; sourceTree = ""; }; @@ -1446,6 +1650,7 @@ A8A4748D151A8306004123FF /* libWTF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; }; A8E894310CD0602400367179 /* JSCallbackObjectFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackObjectFunctions.h; sourceTree = ""; }; A8E894330CD0603F00367179 /* JSGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObject.h; sourceTree = ""; }; + AD1CF06816DCAB2D00B97123 /* PropertyTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertyTable.cpp; sourceTree = ""; }; BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ToolExecutable.xcconfig; sourceTree = ""; }; BC02E9040E1839DB000F9297 /* ErrorConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ErrorConstructor.cpp; sourceTree = ""; }; BC02E9050E1839DB000F9297 /* ErrorConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ErrorConstructor.h; sourceTree = ""; }; @@ -1535,6 +1740,8 @@ BCF605120E203EF800B9A64D /* ArgList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgList.h; sourceTree = ""; }; BCFD8C900EEB2EE700283848 /* JumpTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JumpTable.cpp; sourceTree = ""; }; BCFD8C910EEB2EE700283848 /* JumpTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpTable.h; sourceTree = ""; }; + C20B25981706536200C21F4E /* Region.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Region.h; sourceTree = ""; }; + C20BA92C16BB1C1500B3AEA2 /* StructureRareDataInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureRareDataInlines.h; sourceTree = ""; }; C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCThreadSharedData.cpp; sourceTree = ""; }; C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCThreadSharedData.h; sourceTree = ""; }; C21122E015DD9AB300790E3A /* MarkStackInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkStackInlines.h; sourceTree = ""; }; @@ -1548,20 +1755,30 @@ C240305314B404C90079EB64 /* CopiedSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CopiedSpace.cpp; sourceTree = ""; }; C24D31E0161CD695002AA4DB /* HeapStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeapStatistics.cpp; sourceTree = ""; }; C24D31E1161CD695002AA4DB /* HeapStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapStatistics.h; sourceTree = ""; }; + C25D709916DE99F400FCA6BC /* JSManagedValue.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSManagedValue.mm; sourceTree = ""; }; + C25D709A16DE99F400FCA6BC /* JSManagedValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSManagedValue.h; sourceTree = ""; }; C25F8BCB157544A900245B71 /* IncrementalSweeper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncrementalSweeper.cpp; sourceTree = ""; }; C25F8BCC157544A900245B71 /* IncrementalSweeper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncrementalSweeper.h; sourceTree = ""; }; + C28318FF16FE4B7D00157BFD /* HandleBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HandleBlock.h; sourceTree = ""; }; + C283190116FE533E00157BFD /* HandleBlockInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HandleBlockInlines.h; sourceTree = ""; }; C2A7F687160432D400F76B98 /* JSDestructibleObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDestructibleObject.h; sourceTree = ""; }; C2B916C114DA014E00CBAC86 /* MarkedAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkedAllocator.h; sourceTree = ""; }; C2B916C414DA040C00CBAC86 /* MarkedAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkedAllocator.cpp; sourceTree = ""; }; C2C8D02B14A3C6B200578E65 /* CopiedSpaceInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedSpaceInlines.h; sourceTree = ""; }; C2C8D02E14A3CEFC00578E65 /* CopiedBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedBlock.h; sourceTree = ""; }; C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapBlock.h; sourceTree = ""; }; + C2CF39BF16E15A8100DD69BE /* JSAPIWrapperObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSAPIWrapperObject.mm; sourceTree = ""; }; + C2CF39C016E15A8100DD69BE /* JSAPIWrapperObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAPIWrapperObject.h; sourceTree = ""; }; C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCActivityCallback.cpp; sourceTree = ""; }; + C2DF442D1707AC0100A5CA96 /* SuperRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SuperRegion.cpp; sourceTree = ""; }; + C2DF442E1707AC0100A5CA96 /* SuperRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SuperRegion.h; sourceTree = ""; }; C2E526BB1590EF000054E48D /* HeapTimer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeapTimer.cpp; sourceTree = ""; }; C2E526BC1590EF000054E48D /* HeapTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapTimer.h; sourceTree = ""; }; C2EAA3F8149A830800FCE112 /* CopiedSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedSpace.h; sourceTree = ""; }; C2EAD2FB14F0249800A4B159 /* CopiedAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedAllocator.h; sourceTree = ""; }; + C2F0F2D016BAEEE900187C19 /* StructureRareData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructureRareData.cpp; sourceTree = ""; }; C2FC9BD216644DFB00810D33 /* CopiedBlockInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopiedBlockInlines.h; sourceTree = ""; }; + C2FE18A316BAEC4000AF3061 /* StructureRareData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureRareData.h; sourceTree = ""; }; D21202280AD4310C00ED79B6 /* DateConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DateConversion.cpp; sourceTree = ""; }; D21202290AD4310C00ED79B6 /* DateConversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DateConversion.h; sourceTree = ""; }; DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCActivityCallback.h; sourceTree = ""; }; @@ -1569,8 +1786,8 @@ E124A8F60E555775003091F1 /* OpaqueJSString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpaqueJSString.cpp; sourceTree = ""; }; E178633F0D9BEC0000D74E75 /* InitializeThreading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeThreading.h; sourceTree = ""; }; E178636C0D9BEEC300D74E75 /* InitializeThreading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InitializeThreading.cpp; sourceTree = ""; }; - E18E3A560DF9278C00D90B34 /* JSGlobalData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalData.h; sourceTree = ""; }; - E18E3A570DF9278C00D90B34 /* JSGlobalData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalData.cpp; sourceTree = ""; }; + E18E3A560DF9278C00D90B34 /* VM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VM.h; sourceTree = ""; }; + E18E3A570DF9278C00D90B34 /* VM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VM.cpp; sourceTree = ""; }; E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceProviderCacheItem.h; sourceTree = ""; }; E49DC15112EF272200184A1F /* SourceProviderCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceProviderCache.h; sourceTree = ""; }; E49DC15512EF277200184A1F /* SourceProviderCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceProviderCache.cpp; sourceTree = ""; }; @@ -1604,13 +1821,16 @@ F692A87C0255597D01FF60F7 /* RegExpObject.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = RegExpObject.h; sourceTree = ""; tabWidth = 8; }; F692A87D0255597D01FF60F7 /* RegExp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegExp.cpp; sourceTree = ""; tabWidth = 8; }; F692A87E0255597D01FF60F7 /* RegExp.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = RegExp.h; sourceTree = ""; tabWidth = 8; }; - F692A8870255597D01FF60F7 /* JSValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSValue.cpp; sourceTree = ""; tabWidth = 8; }; + F692A8870255597D01FF60F7 /* JSCJSValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCJSValue.cpp; sourceTree = ""; tabWidth = 8; }; FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntCLoop.cpp; path = llint/LLIntCLoop.cpp; sourceTree = ""; }; FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntCLoop.h; path = llint/LLIntCLoop.h; sourceTree = ""; }; FE4A331D15BD2E07006F54F3 /* VMInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMInspector.cpp; sourceTree = ""; }; FE4A331E15BD2E07006F54F3 /* VMInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMInspector.h; sourceTree = ""; }; - FEB63AA2159B9DA3008932A6 /* Comment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Comment.h; sourceTree = ""; }; + FE6617271774E03500495B00 /* VMStackBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMStackBounds.h; sourceTree = ""; }; FED287B115EC9A5700DA8161 /* LLIntOpcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntOpcode.h; path = llint/LLIntOpcode.h; sourceTree = ""; }; + FED94F2B171E3E2300BE77A4 /* Watchdog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Watchdog.cpp; sourceTree = ""; }; + FED94F2C171E3E2300BE77A4 /* Watchdog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Watchdog.h; sourceTree = ""; }; + FED94F2D171E3E2300BE77A4 /* WatchdogMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WatchdogMac.cpp; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1634,7 +1854,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 143A97E60A4A06E200456B66 /* CoreFoundation.framework in Frameworks */, + 4443AE3316E188D90076F110 /* Foundation.framework in Frameworks */, 14BD59C50A3E8F9F00BAF59C /* JavaScriptCore.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1675,12 +1895,12 @@ 034768DFFF38A50411DB9C8B /* Products */ = { isa = PBXGroup; children = ( - 932F5BD90822A1C700736975 /* JavaScriptCore.framework */, 932F5BE10822A1C700736975 /* jsc */, + 0FF922CF14F46B130041A24E /* JSCLLIntOffsetsExtractor */, + 932F5BD90822A1C700736975 /* JavaScriptCore.framework */, 141211200A48793C00480255 /* minidom */, 14BD59BF0A3E8F9000BAF59C /* testapi */, 6511230514046A4C002B101D /* testRegExp */, - 0FF922CF14F46B130041A24E /* JSCLLIntOffsetsExtractor */, ); name = Products; sourceTree = ""; @@ -1728,12 +1948,12 @@ 0867D69AFE84028FC02AAC07 /* Frameworks */ = { isa = PBXGroup; children = ( - A8A4748D151A8306004123FF /* libWTF.a */, 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */, 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */, 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */, 9322A00306C341D3009067BB /* libicucore.dylib */, 51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */, + A8A4748D151A8306004123FF /* libWTF.a */, ); name = Frameworks; sourceTree = ""; @@ -1743,26 +1963,26 @@ 0F46809C14BA7F4D00BFE272 /* llint */ = { isa = PBXGroup; children = ( - FED287B115EC9A5700DA8161 /* LLIntOpcode.h */, FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */, FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */, + 0F4680C514BBB16900BFE272 /* LLIntCommon.h */, + 0F4680CE14BBB3D100BFE272 /* LLIntData.cpp */, + 0F4680CF14BBB3D100BFE272 /* LLIntData.h */, 5DDDF44614FEE72200B4FB4D /* LLIntDesiredOffsets.h */, 0F0B839514BCF45A00885B4F /* LLIntEntrypoints.cpp */, 0F0B839614BCF45A00885B4F /* LLIntEntrypoints.h */, - 0F0B839714BCF45A00885B4F /* LLIntThunks.cpp */, - 0F0B839814BCF45A00885B4F /* LLIntThunks.h */, - 0F4680CE14BBB3D100BFE272 /* LLIntData.cpp */, - 0F4680CF14BBB3D100BFE272 /* LLIntData.h */, - 0F4680C514BBB16900BFE272 /* LLIntCommon.h */, - 0F4680C614BBB16900BFE272 /* LLIntOfflineAsmConfig.h */, - 0F4680C714BBB16900BFE272 /* LowLevelInterpreter.cpp */, - 0F4680C814BBB16900BFE272 /* LowLevelInterpreter.h */, 0F46809D14BA7F8200BFE272 /* LLIntExceptions.cpp */, 0F46809E14BA7F8200BFE272 /* LLIntExceptions.h */, + 0F4680C614BBB16900BFE272 /* LLIntOfflineAsmConfig.h */, + 0F4680A114BA7F8200BFE272 /* LLIntOffsetsExtractor.cpp */, + FED287B115EC9A5700DA8161 /* LLIntOpcode.h */, 0F46809F14BA7F8200BFE272 /* LLIntSlowPaths.cpp */, 0F4680A014BA7F8200BFE272 /* LLIntSlowPaths.h */, - 0F4680A114BA7F8200BFE272 /* LLIntOffsetsExtractor.cpp */, + 0F0B839714BCF45A00885B4F /* LLIntThunks.cpp */, + 0F0B839814BCF45A00885B4F /* LLIntThunks.h */, 86A054461556451B00445157 /* LowLevelInterpreter.asm */, + 0F4680C714BBB16900BFE272 /* LowLevelInterpreter.cpp */, + 0F4680C814BBB16900BFE272 /* LowLevelInterpreter.h */, 86A054471556451B00445157 /* LowLevelInterpreter32_64.asm */, 86A054481556451B00445157 /* LowLevelInterpreter64.asm */, ); @@ -1772,7 +1992,9 @@ 0FF4272E158EBCCE004CB9FF /* disassembler */ = { isa = PBXGroup; children = ( + 65C028591717966800351E35 /* ARMv7 */, 0FF42733158EBD64004CB9FF /* udis86 */, + 65C0284F171795E200351E35 /* ARMv7Disassembler.cpp */, 0F9D336E165DBB8D005AD387 /* Disassembler.cpp */, 0FF4272F158EBD44004CB9FF /* Disassembler.h */, 0FF42730158EBD44004CB9FF /* UDis86Disassembler.cpp */, @@ -1783,6 +2005,8 @@ 0FF42733158EBD64004CB9FF /* udis86 */ = { isa = PBXGroup; children = ( + 0FF4273E158EBD94004CB9FF /* udis86.c */, + 0FF4273F158EBD94004CB9FF /* udis86.h */, 0FF42734158EBD94004CB9FF /* udis86_decode.c */, 0FF42735158EBD94004CB9FF /* udis86_decode.h */, 0FF42736158EBD94004CB9FF /* udis86_extern.h */, @@ -1794,8 +2018,6 @@ 0FF4273B158EBD94004CB9FF /* udis86_syn.c */, 0FF4273C158EBD94004CB9FF /* udis86_syn.h */, 0FF4273D158EBD94004CB9FF /* udis86_types.h */, - 0FF4273E158EBD94004CB9FF /* udis86.c */, - 0FF4273F158EBD94004CB9FF /* udis86.h */, ); name = udis86; sourceTree = ""; @@ -1806,6 +2028,7 @@ 144005170A531CB50005F061 /* minidom */, 14BD5A2D0A3E91F600BAF59C /* testapi.c */, 14D857740A4696C80032146C /* testapi.js */, + 86D22219167EF9440024C804 /* testapi.mm */, 651122E5140469BA002B101D /* testRegExp.cpp */, ); name = tests; @@ -1816,8 +2039,6 @@ 1429D77A0ED20D7300B89619 /* interpreter */ = { isa = PBXGroup; children = ( - FE4A331D15BD2E07006F54F3 /* VMInspector.cpp */, - FE4A331E15BD2E07006F54F3 /* VMInspector.h */, 0F55F0F114D1063600AC7649 /* AbstractPC.cpp */, 0F55F0F214D1063600AC7649 /* AbstractPC.h */, A7F8690E0F9584A100558697 /* CachedCall.h */, @@ -1826,9 +2047,11 @@ A7F869EC0F95C2EC00558697 /* CallFrameClosure.h */, 1429D7D30ED2128200B89619 /* Interpreter.cpp */, 1429D77B0ED20D7300B89619 /* Interpreter.h */, - 149B24FF0D8AF6D1009CB8C7 /* Register.h */, 1429D85B0ED218E900B89619 /* JSStack.cpp */, 14D792640DAA03FB001A9F05 /* JSStack.h */, + 149B24FF0D8AF6D1009CB8C7 /* Register.h */, + FE4A331D15BD2E07006F54F3 /* VMInspector.cpp */, + FE4A331E15BD2E07006F54F3 /* VMInspector.h */, ); path = interpreter; sourceTree = ""; @@ -1870,13 +2093,17 @@ 0F766D1C15A5028D008F363E /* JITStubRoutine.h */, 14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */, 14A6581A0F4E36F4000150FD /* JITStubs.h */, + 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */, + 0F5EF91C16878F78003E5C25 /* JITThunks.h */, A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */, A76C51741182748D00715B05 /* JSInterfaceJIT.h */, 0F766D3215AE2535008F363E /* JumpReplacementWatchpoint.cpp */, 0F766D3315AE2535008F363E /* JumpReplacementWatchpoint.h */, A7386551118697B400540279 /* SpecializedThunkJIT.h */, + 0F572D4D16879FDB00E57FBD /* ThunkGenerator.h */, A7386552118697B400540279 /* ThunkGenerators.cpp */, A7386553118697B400540279 /* ThunkGenerators.h */, + 65987F2F16828A7E003C2F8D /* UnusedPointer.h */, ); path = jit; sourceTree = ""; @@ -1884,35 +2111,30 @@ 142E312A134FF0A600AFADB5 /* heap */ = { isa = PBXGroup; children = ( - C2239D1216262BDD005AC5FD /* CopyVisitor.cpp */, - C2239D1316262BDD005AC5FD /* CopyVisitor.h */, - C2239D1416262BDD005AC5FD /* CopyVisitorInlines.h */, - C2239D1516262BDD005AC5FD /* GCThread.cpp */, - C2239D1616262BDD005AC5FD /* GCThread.h */, - C24D31E0161CD695002AA4DB /* HeapStatistics.cpp */, - C24D31E1161CD695002AA4DB /* HeapStatistics.h */, - C225494215F7DBAA0065E898 /* SlotVisitor.cpp */, - C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */, - C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */, - C21122E015DD9AB300790E3A /* MarkStackInlines.h */, - C2E526BB1590EF000054E48D /* HeapTimer.cpp */, - C2E526BC1590EF000054E48D /* HeapTimer.h */, - C25F8BCB157544A900245B71 /* IncrementalSweeper.cpp */, - C25F8BCC157544A900245B71 /* IncrementalSweeper.h */, 14816E19154CC56C00B8054C /* BlockAllocator.cpp */, 14816E1A154CC56C00B8054C /* BlockAllocator.h */, - A7521E121429169A003C8D0C /* CardSet.h */, 146B14DB12EB5B12001BEC1B /* ConservativeRoots.cpp */, 149DAAF212EB559D0083B12B /* ConservativeRoots.h */, C2EAD2FB14F0249800A4B159 /* CopiedAllocator.h */, C2C8D02E14A3CEFC00578E65 /* CopiedBlock.h */, + C2FC9BD216644DFB00810D33 /* CopiedBlockInlines.h */, C240305314B404C90079EB64 /* CopiedSpace.cpp */, C2EAA3F8149A830800FCE112 /* CopiedSpace.h */, C2C8D02B14A3C6B200578E65 /* CopiedSpaceInlines.h */, + C2239D1216262BDD005AC5FD /* CopyVisitor.cpp */, + C2239D1316262BDD005AC5FD /* CopyVisitor.h */, + C2239D1416262BDD005AC5FD /* CopyVisitorInlines.h */, + C218D13F1655CFD50062BB81 /* CopyWorkList.h */, 0F2C556D14738F2E00121E4F /* DFGCodeBlocks.cpp */, 0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */, BCBE2CAD14E985AA000593AD /* GCAssertions.h */, + C2239D1516262BDD005AC5FD /* GCThread.cpp */, + C2239D1616262BDD005AC5FD /* GCThread.h */, + C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */, + C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */, 142E312B134FF0A600AFADB5 /* Handle.h */, + C28318FF16FE4B7D00157BFD /* HandleBlock.h */, + C283190116FE533E00157BFD /* HandleBlockInlines.h */, 142E312C134FF0A600AFADB5 /* HandleSet.cpp */, 142E312D134FF0A600AFADB5 /* HandleSet.h */, 142E312E134FF0A600AFADB5 /* HandleStack.cpp */, @@ -1922,6 +2144,12 @@ 14BA7A9613AADFF8005B7C2C /* Heap.h */, C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */, 14F97446138C853E00DA1C67 /* HeapRootVisitor.h */, + C24D31E0161CD695002AA4DB /* HeapStatistics.cpp */, + C24D31E1161CD695002AA4DB /* HeapStatistics.h */, + C2E526BB1590EF000054E48D /* HeapTimer.cpp */, + C2E526BC1590EF000054E48D /* HeapTimer.h */, + C25F8BCB157544A900245B71 /* IncrementalSweeper.cpp */, + C25F8BCC157544A900245B71 /* IncrementalSweeper.h */, 0F766D2915A8CC34008F363E /* JITStubRoutineSet.cpp */, 0F766D2A15A8CC34008F363E /* JITStubRoutineSet.h */, 0F431736146BAC65007E3890 /* ListableHandler.h */, @@ -1938,29 +2166,34 @@ 14D2F3D9139F4BE200491031 /* MarkedSpace.h */, 142D6F0E13539A4100B02E86 /* MarkStack.cpp */, 142D6F0F13539A4100B02E86 /* MarkStack.h */, + C21122E015DD9AB300790E3A /* MarkStackInlines.h */, 1497209014EB831500FEB1B7 /* PassWeak.h */, + C20B25981706536200C21F4E /* Region.h */, + C225494215F7DBAA0065E898 /* SlotVisitor.cpp */, 14BA78F013AAB88F005B7C2C /* SlotVisitor.h */, 0FCB408515C0A3C30048932B /* SlotVisitorInlines.h */, 142E3132134FF0A600AFADB5 /* Strong.h */, 145722851437E140005FDE26 /* StrongInlines.h */, + C2DF442D1707AC0100A5CA96 /* SuperRegion.cpp */, + C2DF442E1707AC0100A5CA96 /* SuperRegion.h */, 141448CC13A1783700F5BA1A /* TinyBloomFilter.h */, 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */, 0FC815121405118600CFA603 /* VTableSpectrum.cpp */, 0FC815141405118D00CFA603 /* VTableSpectrum.h */, + 1ACF7376171CA6FB00C9BB1E /* Weak.cpp */, 142E3133134FF0A600AFADB5 /* Weak.h */, 14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */, 14E84F9A14EE1ACC00D6D5D4 /* WeakBlock.h */, 14F7256314EE265E00B1652B /* WeakHandleOwner.cpp */, 14F7256414EE265E00B1652B /* WeakHandleOwner.h */, 14E84F9D14EE1ACC00D6D5D4 /* WeakImpl.h */, + 14BE7D3217135CF400D1807A /* WeakInlines.h */, 0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */, 14E84F9B14EE1ACC00D6D5D4 /* WeakSet.cpp */, 14E84F9C14EE1ACC00D6D5D4 /* WeakSet.h */, 14150132154BB13F005D8C98 /* WeakSetInlines.h */, 0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */, 0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */, - C218D13F1655CFD50062BB81 /* CopyWorkList.h */, - C2FC9BD216644DFB00810D33 /* CopiedBlockInlines.h */, ); path = heap; sourceTree = ""; @@ -1968,12 +2201,16 @@ 1432EBD70A34CAD400717B9F /* API */ = { isa = PBXGroup; children = ( + A72028B41797601E0098028C /* JSCTestRunnerUtils.cpp */, + A72028B51797601E0098028C /* JSCTestRunnerUtils.h */, 1482B78A0A4305AB00517CFC /* APICast.h */, 865F408710E7D56300947361 /* APIShims.h */, 1CAA8B4A0D32C39A0041BCFF /* JavaScript.h */, 1CAA8B4B0D32C39A0041BCFF /* JavaScriptCore.h */, BC0894D50FAFBA2D00001865 /* JSAPIValueWrapper.cpp */, BC0894D60FAFBA2D00001865 /* JSAPIValueWrapper.h */, + C2CF39C016E15A8100DD69BE /* JSAPIWrapperObject.h */, + C2CF39BF16E15A8100DD69BE /* JSAPIWrapperObject.mm */, 1421359A0A677F4F00A8195E /* JSBase.cpp */, 142711380A460BBB0080EEEA /* JSBase.h */, 140D17D60E8AD4A9000CD17D /* JSBasePrivate.h */, @@ -1986,27 +2223,47 @@ A8E894310CD0602400367179 /* JSCallbackObjectFunctions.h */, 1440FCE20A51E46B0005F061 /* JSClassRef.cpp */, 1440FCE10A51E46B0005F061 /* JSClassRef.h */, + 86E3C607167BAB87006D760A /* JSContext.h */, + 86E3C608167BAB87006D760A /* JSContext.mm */, + 86E3C609167BAB87006D760A /* JSContextInternal.h */, 14BD5A290A3E91F600BAF59C /* JSContextRef.cpp */, 14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */, 148CD1D7108CF902008163C6 /* JSContextRefPrivate.h */, + 86E3C60A167BAB87006D760A /* JSExport.h */, + C25D709A16DE99F400FCA6BC /* JSManagedValue.h */, + C25D709916DE99F400FCA6BC /* JSManagedValue.mm */, 1482B7E20A43076000517CFC /* JSObjectRef.cpp */, 1482B7E10A43076000517CFC /* JSObjectRef.h */, A79EDB0811531CD60019E912 /* JSObjectRefPrivate.h */, 95988BA90E477BEC00D28D4D /* JSProfilerPrivate.cpp */, 952C63AC0E4777D600C13936 /* JSProfilerPrivate.h */, 95C18D3E0C90E7EF00E72F73 /* JSRetainPtr.h */, + A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */, + A7C0C4AB167C08CD0017011D /* JSScriptRefPrivate.h */, 1482B74C0A43032800517CFC /* JSStringRef.cpp */, 1482B74B0A43032800517CFC /* JSStringRef.h */, 146AAB370B66A94400E55F16 /* JSStringRefCF.cpp */, 146AAB2A0B66A84900E55F16 /* JSStringRefCF.h */, + 86E3C606167BAB87006D760A /* JSValue.h */, + 86E3C60D167BAB87006D760A /* JSValue.mm */, + 86E3C60E167BAB87006D760A /* JSValueInternal.h */, 14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */, 1482B6EA0A4300B300517CFC /* JSValueRef.h */, + 86E3C60F167BAB87006D760A /* JSVirtualMachine.h */, + 86E3C610167BAB87006D760A /* JSVirtualMachine.mm */, + 86E3C611167BAB87006D760A /* JSVirtualMachineInternal.h */, A7482E37116A697B003B0712 /* JSWeakObjectMapRefInternal.h */, A7482B7A1166CDEA003B0712 /* JSWeakObjectMapRefPrivate.cpp */, A7482B791166CDEA003B0712 /* JSWeakObjectMapRefPrivate.h */, + 86E3C60C167BAB87006D760A /* JSWrapperMap.h */, + 86E3C60B167BAB87006D760A /* JSWrapperMap.mm */, + 86F3EEB9168CCF750077B92A /* ObjCCallbackFunction.h */, + 86F3EEBA168CCF750077B92A /* ObjCCallbackFunction.mm */, + 86F3EEB616855A5B0077B92A /* ObjcRuntimeExtras.h */, E124A8F60E555775003091F1 /* OpaqueJSString.cpp */, E124A8F50E555775003091F1 /* OpaqueJSString.h */, 5DE3D0F40DD8DDFB00468714 /* WebKitAvailability.h */, + 1A28D4A7177B71C80007FA3C /* JSStringRefPrivate.h */, ); path = API; sourceTree = ""; @@ -2050,8 +2307,8 @@ 1C9051450BA9E8A70081E9D0 /* Base.xcconfig */, 1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */, 449097EE0F8F81B50076A327 /* FeatureDefines.xcconfig */, - 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */, 1C9051430BA9E8A70081E9D0 /* JavaScriptCore.xcconfig */, + 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */, BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */, 1C9051420BA9E8A70081E9D0 /* Version.xcconfig */, ); @@ -2083,6 +2340,16 @@ tabWidth = 4; usesTabs = 0; }; + 65C028591717966800351E35 /* ARMv7 */ = { + isa = PBXGroup; + children = ( + 65C0285A1717966800351E35 /* ARMv7DOpcode.cpp */, + 65C0285B1717966800351E35 /* ARMv7DOpcode.h */, + ); + name = ARMv7; + path = disassembler/ARMv7; + sourceTree = ""; + }; 7E39D81D0EC38EFA003AF11A /* bytecompiler */ = { isa = PBXGroup; children = ( @@ -2092,6 +2359,8 @@ 960097A50EBABB58007A7297 /* LabelScope.h */, 655EB29A10CE2581001A990E /* NodesCodegen.cpp */, 969A07280ED1CE6900F1F681 /* RegisterID.h */, + 14DF04D916B3996D0016A513 /* StaticPropertyAnalysis.h */, + 14CA958A16AB50DE00938A06 /* StaticPropertyAnalyzer.h */, ); path = bytecompiler; sourceTree = ""; @@ -2111,15 +2380,17 @@ 93F0B3AA09BB4DC00068FCE3 /* Parser.h */, 93052C320FB792190048FDC3 /* ParserArena.cpp */, 93052C330FB792190048FDC3 /* ParserArena.h */, + 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */, + A77F18241641925400640A47 /* ParserModes.h */, 65303D631447B9E100D3F904 /* ParserTokens.h */, 869EBCB60E8C6D4A008722CC /* ResultType.h */, 65E866EE0DD59AFA00A2B2A1 /* SourceCode.h */, + 0F493AF816D0CAD10084508B /* SourceProvider.cpp */, 65E866ED0DD59AFA00A2B2A1 /* SourceProvider.h */, E49DC15512EF277200184A1F /* SourceProviderCache.cpp */, E49DC15112EF272200184A1F /* SourceProviderCache.h */, E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */, A7A7EE7711B98B8D0065A14F /* SyntaxChecker.h */, - A77F18241641925400640A47 /* ParserModes.h */, ); path = parser; sourceTree = ""; @@ -2127,6 +2398,7 @@ 7EF6E0BB0EB7A1EC0079AFAF /* runtime */ = { isa = PBXGroup; children = ( + A72028B91797603D0098028C /* JSFunctionInlines.h */, BCF605110E203EF800B9A64D /* ArgList.cpp */, BCF605120E203EF800B9A64D /* ArgList.h */, BC257DE50E1F51C50016B6C9 /* Arguments.cpp */, @@ -2151,6 +2423,8 @@ BCA62DFE0E2826230004F30D /* CallData.cpp */, 145C507F0D9DF63B0088F6B9 /* CallData.h */, BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */, + A77F181F164088B200640A47 /* CodeCache.cpp */, + A77F1820164088B200640A47 /* CodeCache.h */, 0F8F943A1667631100D61971 /* CodeSpecializationKind.cpp */, 0F21C27914BE727300ADC64B /* CodeSpecializationKind.h */, 65EA73620BAE35D1001BB560 /* CommonIdentifiers.cpp */, @@ -2184,6 +2458,8 @@ 0F21C27A14BE727300ADC64B /* ExecutionHarness.h */, BC2680C00E16D4E900A06E92 /* FunctionConstructor.cpp */, BC2680C10E16D4E900A06E92 /* FunctionConstructor.h */, + 0FB4B52116B6278D003F696B /* FunctionExecutableDump.cpp */, + 0FB4B52216B6278D003F696B /* FunctionExecutableDump.h */, F692A85C0255597D01FF60F7 /* FunctionPrototype.cpp */, F692A85D0255597D01FF60F7 /* FunctionPrototype.h */, C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */, @@ -2209,14 +2485,16 @@ 86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */, BC7F8FBA0E19D1EF008632C0 /* JSCell.cpp */, BC1167D80E19BCC9008066DD /* JSCell.h */, + 0F97496F1687ADE200A4FF6A /* JSCellInlines.h */, + F692A8870255597D01FF60F7 /* JSCJSValue.cpp */, + 14ABB36E099C076400E2A24F /* JSCJSValue.h */, + 865A30F0135007E100CDB49E /* JSCJSValueInlines.h */, 9788FC221471AD0C0068CE2D /* JSDateMath.cpp */, 9788FC231471AD0C0068CE2D /* JSDateMath.h */, C2A7F687160432D400F76B98 /* JSDestructibleObject.h */, A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */, F692A85E0255597D01FF60F7 /* JSFunction.cpp */, F692A85F0255597D01FF60F7 /* JSFunction.h */, - E18E3A570DF9278C00D90B34 /* JSGlobalData.cpp */, - E18E3A560DF9278C00D90B34 /* JSGlobalData.h */, 14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */, A8E894330CD0603F00367179 /* JSGlobalObject.h */, BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */, @@ -2248,9 +2526,6 @@ 0F919D0A157EE09D004A4E7D /* JSSymbolTableObject.h */, 14ABB454099C2A0F00E2A24F /* JSType.h */, 6507D2970E871E4A00D7D896 /* JSTypeInfo.h */, - F692A8870255597D01FF60F7 /* JSValue.cpp */, - 14ABB36E099C076400E2A24F /* JSValue.h */, - 865A30F0135007E100CDB49E /* JSValueInlines.h */, BC22A39A0E16E14800AF21C8 /* JSVariableObject.cpp */, 14F252560D08DD8D004ECFFF /* JSVariableObject.h */, 1442565F15EDE98D0066A49B /* JSWithScope.cpp */, @@ -2302,7 +2577,10 @@ 65621E6B089E859700760F35 /* PropertySlot.cpp */, 65621E6C089E859700760F35 /* PropertySlot.h */, 0FB7F39015ED8E3800F167B2 /* PropertyStorage.h */, + AD1CF06816DCAB2D00B97123 /* PropertyTable.cpp */, 65C02FBB0637462A003E7EE6 /* Protect.h */, + 14D844A216AA2C7000A65AF0 /* PrototypeMap.cpp */, + 14D844A316AA2C7000A65AF0 /* PrototypeMap.h */, 0F0CD4C015F1A6040032F1C0 /* PutDirectIndexMode.h */, 147B84620E6DE6B1004775A4 /* PutPropertySlot.h */, F692A87D0255597D01FF60F7 /* RegExp.cpp */, @@ -2341,22 +2619,26 @@ BCDE3AB10E6C82CF001453A7 /* Structure.h */, 7E4EE70E0EBB7A5B005934AA /* StructureChain.cpp */, 7E4EE7080EBB7963005934AA /* StructureChain.h */, + 0FD2C92316D01EE900C7803F /* StructureInlines.h */, + C2F0F2D016BAEEE900187C19 /* StructureRareData.cpp */, + C2FE18A316BAEC4000AF3061 /* StructureRareData.h */, + C20BA92C16BB1C1500B3AEA2 /* StructureRareDataInlines.h */, BC9041470EB9250900FE26FA /* StructureTransitionTable.h */, 0F919D2715856770004A4E7D /* SymbolTable.cpp */, 14A396A60CD2933100B5B4FF /* SymbolTable.h */, - 97F6903A1169DF7F00A6BB46 /* Terminator.h */, - 14A42E3D0F4F60EE00599099 /* TimeoutChecker.cpp */, - 14A42E3E0F4F60EE00599099 /* TimeoutChecker.h */, 5D53726D0E1C546B0021E549 /* Tracing.d */, 5D53726E0E1C54880021E549 /* Tracing.h */, 0FEB3ECB16237F4700AB67AD /* TypedArrayDescriptor.h */, 866739D113BFDE710023D87C /* Uint16WithFraction.h */, + E18E3A570DF9278C00D90B34 /* VM.cpp */, + E18E3A560DF9278C00D90B34 /* VM.h */, + FE6617271774E03500495B00 /* VMStackBounds.h */, + FED94F2B171E3E2300BE77A4 /* Watchdog.cpp */, + FED94F2C171E3E2300BE77A4 /* Watchdog.h */, + FED94F2D171E3E2300BE77A4 /* WatchdogMac.cpp */, 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */, 1420BE7A10AA6DDB00F455D2 /* WeakRandom.h */, A7DCB77912E3D90500911940 /* WriteBarrier.h */, - C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */, - A77F181F164088B200640A47 /* CodeCache.cpp */, - A77F1820164088B200640A47 /* CodeCache.h */, ); path = runtime; sourceTree = ""; @@ -2401,16 +2683,20 @@ 0F62016E143FCD2F0068B77C /* DFGAbstractState.h */, 0F62016F143FCD2F0068B77C /* DFGAbstractValue.h */, 0F66E16814DF3F1300B7B2E4 /* DFGAdjacencyList.h */, + 0FB4B51916B62772003F696B /* DFGAllocator.h */, 0F1E3A431534CBAD000F9456 /* DFGArgumentPosition.h */, 0F16015A156198BF00C2587C /* DFGArgumentsSimplificationPhase.cpp */, 0F16015B156198BF00C2587C /* DFGArgumentsSimplificationPhase.h */, + 0F05C3B21683CF8F00BAF45B /* DFGArrayifySlowPathGenerator.h */, 0F63948115E48114006A597C /* DFGArrayMode.cpp */, 0F63948215E48114006A597C /* DFGArrayMode.h */, 0FC0976B1468AB4A00CF2442 /* DFGAssemblyHelpers.cpp */, 0FC0976C1468AB4A00CF2442 /* DFGAssemblyHelpers.h */, + 0F714CA116EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.cpp */, + 0F714CA216EA92ED00F3EBEB /* DFGBackwardsPropagationPhase.h */, 0F620170143FCD2F0068B77C /* DFGBasicBlock.h */, + 0FD5652216AB780A00197653 /* DFGBasicBlockInlines.h */, 0F8364B5164B0C0E0053329A /* DFGBranchDirection.h */, - 0F5F08CC146BE602000472A9 /* DFGByteCodeCache.h */, 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */, 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */, 0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */, @@ -2421,13 +2707,16 @@ 0FFFC94C14EF909500C72532 /* DFGCFAPhase.h */, 0F3B3A241544C991003ED0FF /* DFGCFGSimplificationPhase.cpp */, 0F3B3A251544C991003ED0FF /* DFGCFGSimplificationPhase.h */, + 0FB4B51A16B62772003F696B /* DFGCommon.cpp */, 0FC0977E1469EBC400CF2442 /* DFGCommon.h */, 0F3B3A17153E68EF003ED0FF /* DFGConstantFoldingPhase.cpp */, 0F3B3A18153E68EF003ED0FF /* DFGConstantFoldingPhase.h */, - 0FC0979D146B271E00CF2442 /* DFGCorrectableJumpPoint.cpp */, - 0FC0979A146A772000CF2442 /* DFGCorrectableJumpPoint.h */, + 0FBE0F6B16C1DB010082C5E8 /* DFGCPSRethreadingPhase.cpp */, + 0FBE0F6C16C1DB010082C5E8 /* DFGCPSRethreadingPhase.h */, 0FFFC94D14EF909500C72532 /* DFGCSEPhase.cpp */, 0FFFC94E14EF909500C72532 /* DFGCSEPhase.h */, + 0F2FC77016E12F6F0038D976 /* DFGDCEPhase.cpp */, + 0F2FC77116E12F6F0038D976 /* DFGDCEPhase.h */, 0FF427611591A1C9004CB9FF /* DFGDisassembler.cpp */, 0FF427621591A1C9004CB9FF /* DFGDisassembler.h */, 0FD81ACF154FB4EB00983E72 /* DFGDominators.cpp */, @@ -2435,6 +2724,7 @@ 0F1E3A441534CBAD000F9456 /* DFGDoubleFormatState.h */, 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */, 0FD3C82214115D0E00FD81CB /* DFGDriver.h */, + 0FB4B51B16B62772003F696B /* DFGEdge.cpp */, 0F66E16914DF3F1300B7B2E4 /* DFGEdge.h */, 0F2BDC12151C5D4A00CD8910 /* DFGFixupPhase.cpp */, 0F2BDC13151C5D4A00CD8910 /* DFGFixupPhase.h */, @@ -2446,10 +2736,15 @@ 0F2BDC1F151E803800CD8910 /* DFGInsertionSet.h */, 86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */, 86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */, + 0FB4B51C16B62772003F696B /* DFGLongLivedState.cpp */, + 0FB4B51D16B62772003F696B /* DFGLongLivedState.h */, 0F2BDC3D1522801700CD8910 /* DFGMinifiedGraph.h */, + 0FB4B51016B3A964003F696B /* DFGMinifiedID.h */, 0F2BDC4C1522818300CD8910 /* DFGMinifiedNode.cpp */, 0F2BDC3E1522801700CD8910 /* DFGMinifiedNode.h */, + 0FB4B51E16B62772003F696B /* DFGNode.cpp */, 86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */, + 0FB4B51F16B62772003F696B /* DFGNodeAllocator.h */, 0FA581B7150E952A00B9A2D9 /* DFGNodeFlags.cpp */, 0FA581B8150E952A00B9A2D9 /* DFGNodeFlags.h */, 0FA581B9150E952A00B9A2D9 /* DFGNodeType.h */, @@ -2459,12 +2754,17 @@ 0FD82E53141DAEDE00179C94 /* DFGOSREntry.h */, 0FC0978E146A6F6300CF2442 /* DFGOSRExit.cpp */, 0FC097681468A6EF00CF2442 /* DFGOSRExit.h */, + 65987F2C167FE84B003C2F8D /* DFGOSRExitCompilationInfo.h */, 0FC0978F146A6F6300CF2442 /* DFGOSRExitCompiler.cpp */, 0FC0976F14693AEF00CF2442 /* DFGOSRExitCompiler.h */, 0FC09775146943AD00CF2442 /* DFGOSRExitCompiler32_64.cpp */, 0FC0977014693AEF00CF2442 /* DFGOSRExitCompiler64.cpp */, + 0FEFC9A71681A3B000567F53 /* DFGOSRExitJumpPlaceholder.cpp */, + 0FEFC9A81681A3B000567F53 /* DFGOSRExitJumpPlaceholder.h */, 0FFFC94F14EF909500C72532 /* DFGPhase.cpp */, 0FFFC95014EF909500C72532 /* DFGPhase.h */, + 0FBE0F6D16C1DB010082C5E8 /* DFGPredictionInjectionPhase.cpp */, + 0FBE0F6E16C1DB010082C5E8 /* DFGPredictionInjectionPhase.h */, 0FFFC95114EF909500C72532 /* DFGPredictionPropagationPhase.cpp */, 0FFFC95214EF909500C72532 /* DFGPredictionPropagationPhase.h */, 86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */, @@ -2480,10 +2780,14 @@ 86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */, 86880F4C14353B2100B08D42 /* DFGSpeculativeJIT64.cpp */, 0F63947615DCE347006A597C /* DFGStructureAbstractValue.h */, - 0F63943C15C75F14006A597C /* DFGStructureCheckHoistingPhase.cpp */, - 0F63943D15C75F14006A597C /* DFGStructureCheckHoistingPhase.h */, 0FC0979F146B28C700CF2442 /* DFGThunks.cpp */, 0FC097A0146B28C700CF2442 /* DFGThunks.h */, + 0F63943C15C75F14006A597C /* DFGTypeCheckHoistingPhase.cpp */, + 0F63943D15C75F14006A597C /* DFGTypeCheckHoistingPhase.h */, + 0FBE0F6F16C1DB010082C5E8 /* DFGUnificationPhase.cpp */, + 0FBE0F7016C1DB010082C5E8 /* DFGUnificationPhase.h */, + 0F34B14716D4200E001CDA5A /* DFGUseKind.cpp */, + 0F34B14816D4200E001CDA5A /* DFGUseKind.h */, 0F3B3A2915474FF4003ED0FF /* DFGValidate.cpp */, 0F3B3A2A15474FF4003ED0FF /* DFGValidate.h */, 0F2BDC3F1522801700CD8910 /* DFGValueRecoveryOverride.h */, @@ -2496,6 +2800,7 @@ 0F2BDC411522801700CD8910 /* DFGVariableEvent.h */, 0F2BDC421522801700CD8910 /* DFGVariableEventStream.cpp */, 0F2BDC431522801700CD8910 /* DFGVariableEventStream.h */, + 0F85A31E16AB76AE0077571E /* DFGVariadicFunction.h */, 0FFFC95314EF909500C72532 /* DFGVirtualRegisterAllocationPhase.cpp */, 0FFFC95414EF909500C72532 /* DFGVirtualRegisterAllocationPhase.h */, ); @@ -2516,14 +2821,39 @@ isa = PBXGroup; children = ( 95E3BC040E1AE68200B2D1C1 /* CallIdentifier.h */, + 95AB832E0DA42CAD00BC83F3 /* LegacyProfiler.cpp */, + 95AB832F0DA42CAD00BC83F3 /* LegacyProfiler.h */, 95742F630DD11F5A000917FB /* Profile.cpp */, 95742F640DD11F5A000917FB /* Profile.h */, 95CD45740E1C4FDD0085358E /* ProfileGenerator.cpp */, 95CD45750E1C4FDD0085358E /* ProfileGenerator.h */, 95AB83540DA43B4400BC83F3 /* ProfileNode.cpp */, 95AB83550DA43B4400BC83F3 /* ProfileNode.h */, - 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */, - 95AB832F0DA42CAD00BC83F3 /* Profiler.h */, + 0FF72992166AD347000F5BA3 /* ProfilerBytecode.cpp */, + 0FF72993166AD347000F5BA3 /* ProfilerBytecode.h */, + 0FF72994166AD347000F5BA3 /* ProfilerBytecodes.cpp */, + 0FF72995166AD347000F5BA3 /* ProfilerBytecodes.h */, + 0F13912416771C30009CCB07 /* ProfilerBytecodeSequence.cpp */, + 0F13912516771C30009CCB07 /* ProfilerBytecodeSequence.h */, + 0FF72996166AD347000F5BA3 /* ProfilerCompilation.cpp */, + 0FF72997166AD347000F5BA3 /* ProfilerCompilation.h */, + 0FF72998166AD347000F5BA3 /* ProfilerCompilationKind.cpp */, + 0FF72999166AD347000F5BA3 /* ProfilerCompilationKind.h */, + 0FF7299A166AD347000F5BA3 /* ProfilerCompiledBytecode.cpp */, + 0FF7299B166AD347000F5BA3 /* ProfilerCompiledBytecode.h */, + 0FF7299C166AD347000F5BA3 /* ProfilerDatabase.cpp */, + 0FF7299D166AD347000F5BA3 /* ProfilerDatabase.h */, + 0FF7299E166AD347000F5BA3 /* ProfilerExecutionCounter.h */, + 0FF7299F166AD347000F5BA3 /* ProfilerOrigin.cpp */, + 0FF729A0166AD347000F5BA3 /* ProfilerOrigin.h */, + 0FF729A1166AD347000F5BA3 /* ProfilerOriginStack.cpp */, + 0FF729A2166AD347000F5BA3 /* ProfilerOriginStack.h */, + 0FB105871675482E00F8AB6E /* ProfilerOSRExit.cpp */, + 0FB105881675482E00F8AB6E /* ProfilerOSRExit.h */, + 0FB105891675482E00F8AB6E /* ProfilerOSRExitSite.cpp */, + 0FB1058A1675482E00F8AB6E /* ProfilerOSRExitSite.h */, + 0F13912616771C30009CCB07 /* ProfilerProfiledBytecodes.cpp */, + 0F13912716771C30009CCB07 /* ProfilerProfiledBytecodes.h */, ); name = profiler; sourceTree = ""; @@ -2549,7 +2879,6 @@ 86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */, 863B23DF0FC60E6200703AA4 /* MacroAssemblerCodeRef.h */, 86C568DE11A213EE0007F7F0 /* MacroAssemblerMIPS.h */, - 86AE64A5135E5E1C00963012 /* MacroAssemblerSH4.cpp */, 86AE64A6135E5E1C00963012 /* MacroAssemblerSH4.h */, 860161E00F3A83C100F84710 /* MacroAssemblerX86.h */, 860161E10F3A83C100F84710 /* MacroAssemblerX86_64.h */, @@ -2576,22 +2905,23 @@ 0F93329314CA7DC10085F3C6 /* CallLinkStatus.cpp */, 0F93329414CA7DC10085F3C6 /* CallLinkStatus.h */, 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */, + 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */, + 969A07910ED1D3AE00F1F681 /* CodeBlock.h */, 0F8F943D1667632D00D61971 /* CodeBlockHash.cpp */, 0F8F943E1667632D00D61971 /* CodeBlockHash.h */, 0F96EBB116676EF4008BADE3 /* CodeBlockWithJITType.h */, - 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */, - 969A07910ED1D3AE00F1F681 /* CodeBlock.h */, 0F8F9445166764EE00D61971 /* CodeOrigin.cpp */, 0FBD7E671447998F00481315 /* CodeOrigin.h */, 0F8F943F1667632D00D61971 /* CodeType.cpp */, 0F0B83A514BCF50400885B4F /* CodeType.h */, - FEB63AA2159B9DA3008932A6 /* Comment.h */, 0F426A4A1460CD6B00131F8F /* DataFormat.h */, 0FBC0AE41496C7C100D4FBDD /* DFGExitProfile.cpp */, 0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */, 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */, 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */, 0F56A1D115000F31002992B1 /* ExecutionCounter.h */, + 0FB105821675480C00F8AB6E /* ExitKind.cpp */, + 0FB105831675480C00F8AB6E /* ExitKind.h */, 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */, 0F93329514CA7DC10085F3C6 /* GetByIdStatus.cpp */, 0F93329614CA7DC10085F3C6 /* GetByIdStatus.h */, @@ -2605,14 +2935,20 @@ 0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */, 0FB5467C14F5CFD3002C2989 /* MethodOfGettingAValueProfile.cpp */, 0FB5467A14F5C7D4002C2989 /* MethodOfGettingAValueProfile.h */, + 14CA958C16AB50FA00938A06 /* ObjectAllocationProfile.h */, 969A07940ED1D3AE00F1F681 /* Opcode.cpp */, 969A07950ED1D3AE00F1F681 /* Opcode.h */, 0F2BDC2B151FDE8B00CD8910 /* Operands.h */, + 0F34B14B16D43E0C001CDA5A /* PolymorphicAccessStructureList.h */, 0F9FC8BF14E1B5FB00D52AE0 /* PolymorphicPutByIdList.cpp */, 0F9FC8C014E1B5FB00D52AE0 /* PolymorphicPutByIdList.h */, + 0F98205D16BFE37F00240D02 /* PreciseJumpTargets.cpp */, + 0F98205E16BFE37F00240D02 /* PreciseJumpTargets.h */, 0F93329914CA7DC10085F3C6 /* PutByIdStatus.cpp */, 0F93329A14CA7DC10085F3C6 /* PutByIdStatus.h */, 0F9FC8C114E1B5FB00D52AE0 /* PutKind.h */, + 0FF60ABF16740F8100029779 /* ReduceWhitespace.cpp */, + 0FF60AC016740F8100029779 /* ReduceWhitespace.h */, 0FF4276E159275D2004CB9FF /* ResolveGlobalStatus.cpp */, 0FF4276F159275D2004CB9FF /* ResolveGlobalStatus.h */, A7AFC17715F7EFE30048F57B /* ResolveOperation.h */, @@ -2623,22 +2959,17 @@ 0FD82E84141F3FDA00179C94 /* SpeculatedType.cpp */, 0FD82E4F141DAEA100179C94 /* SpeculatedType.h */, 0F93329B14CA7DC10085F3C6 /* StructureSet.h */, - 0F93329514CA7DC10085F3C6 /* GetByIdStatus.cpp */, 0F766D3615AE4A1A008F363E /* StructureStubClearingWatchpoint.cpp */, 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */, BCCF0D0B0EF0B8A500413C8F /* StructureStubInfo.cpp */, BCCF0D070EF0AAB900413C8F /* StructureStubInfo.h */, + A79E781E15EECBA80047C855 /* UnlinkedCodeBlock.cpp */, + A79E781F15EECBA80047C855 /* UnlinkedCodeBlock.h */, 0F963B3613FC6FDE0002D9B2 /* ValueProfile.h */, 0F426A451460CBAB00131F8F /* ValueRecovery.h */, 0F426A461460CBAB00131F8F /* VirtualRegister.h */, 0F919D2215853CDE004A4E7D /* Watchpoint.cpp */, 0F919D2315853CDE004A4E7D /* Watchpoint.h */, - 0F93329614CA7DC10085F3C6 /* GetByIdStatus.h */, - 0F93329914CA7DC10085F3C6 /* PutByIdStatus.cpp */, - 0F93329A14CA7DC10085F3C6 /* PutByIdStatus.h */, - 0F93329B14CA7DC10085F3C6 /* StructureSet.h */, - A79E781E15EECBA80047C855 /* UnlinkedCodeBlock.cpp */, - A79E781F15EECBA80047C855 /* UnlinkedCodeBlock.h */, ); path = bytecode; sourceTree = ""; @@ -2662,56 +2993,68 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 0FFB921F16D033050055A5DB /* (null) in Headers */, 860161E30F3A83C100F84710 /* AbstractMacroAssembler.h in Headers */, + 0F55F0F514D1063C00AC7649 /* AbstractPC.h in Headers */, BC18C3E50E16F5CD00B34460 /* APICast.h in Headers */, 865F408810E7D56300947361 /* APIShims.h in Headers */, BCF605140E203EF800B9A64D /* ArgList.h in Headers */, BC257DE80E1F51C50016B6C9 /* Arguments.h in Headers */, 86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */, 86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */, - C2EAD2FC14F0249800A4B159 /* CopiedAllocator.h in Headers */, - C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */, - C218D1401655CFD50062BB81 /* CopyWorkList.h in Headers */, - C2FC9BD316644DFB00810D33 /* CopiedBlockInlines.h in Headers */, - FE4A332015BD2E07006F54F3 /* VMInspector.h in Headers */, - C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */, - C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */, - C24D31E3161CD695002AA4DB /* HeapStatistics.h in Headers */, - C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */, - FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */, - C21122E215DD9AB300790E3A /* GCThreadSharedData.h in Headers */, - C2160FE715F7E95E00942DFC /* SlotVisitorInlines.h in Headers */, - C2E526BE1590EF000054E48D /* HeapTimer.h in Headers */, - C21122E315DD9AB300790E3A /* MarkStackInlines.h in Headers */, - C25F8BCE157544A900245B71 /* IncrementalSweeper.h in Headers */, + 65C0285D1717966800351E35 /* ARMv7DOpcode.h in Headers */, + 0F8335B81639C1EA001443B5 /* ArrayAllocationProfile.h in Headers */, BC18C3E60E16F5CD00B34460 /* ArrayConstructor.h in Headers */, + 0FB7F39515ED8E4600F167B2 /* ArrayConventions.h in Headers */, + 0F63945515D07057006A597C /* ArrayProfile.h in Headers */, BC18C3E70E16F5CD00B34460 /* ArrayPrototype.h in Headers */, BC18C5240E16FC8A00B34460 /* ArrayPrototype.lut.h in Headers */, + 0FB7F39615ED8E4600F167B2 /* ArrayStorage.h in Headers */, 9688CB150ED12B4E001D649F /* AssemblerBuffer.h in Headers */, 86D3B2C510156BDE002865E7 /* AssemblerBufferWithConstantPool.h in Headers */, A784A26111D16622005776AC /* ASTBuilder.h in Headers */, 147B83AC0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h in Headers */, 866739D213BFDE710023D87C /* BigInteger.h in Headers */, + 14816E1C154CC56C00B8054C /* BlockAllocator.h in Headers */, BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */, - C2C8D03014A3CEFC00578E65 /* CopiedBlock.h in Headers */, - C2EAA3FA149A835E00FCE112 /* CopiedSpace.h in Headers */, - C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlines.h in Headers */, + 0FB7F39715ED8E4600F167B2 /* Butterfly.h in Headers */, + 0FB7F39815ED8E4600F167B2 /* ButterflyInlines.h in Headers */, + 0F21C27F14BEAA8200ADC64B /* BytecodeConventions.h in Headers */, 969A07230ED1CE3300F1F681 /* BytecodeGenerator.h in Headers */, + 0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */, 869D04AF1193B54D00803475 /* CachedTranscendentalFunction.h in Headers */, BC18C3ED0E16F5CD00B34460 /* CallData.h in Headers */, 1429D8DE0ED2205B00B89619 /* CallFrame.h in Headers */, 95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */, - A7521E131429169A003C8D0C /* CardSet.h in Headers */, + 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */, + 0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */, + 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */, BC6AAAE50E1F426500AD87D8 /* ClassInfo.h in Headers */, + 0F73D7AF165A143000ACAB71 /* ClosureCallStubRoutine.h in Headers */, 969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */, + 0F8F94411667633200D61971 /* CodeBlockHash.h in Headers */, + 0F96EBB316676EF6008BADE3 /* CodeBlockWithJITType.h in Headers */, + A77F1822164088B200640A47 /* CodeCache.h in Headers */, 86E116B10FE75AC800B512BC /* CodeLocation.h in Headers */, 0FBD7E691447999600481315 /* CodeOrigin.h in Headers */, + 0F21C27D14BE727A00ADC64B /* CodeSpecializationKind.h in Headers */, + 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */, BC18C3F30E16F5CD00B34460 /* CommonIdentifiers.h in Headers */, + 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */, 0FD82E39141AB14D00179C94 /* CompactJITCodeMap.h in Headers */, BC18C3F40E16F5CD00B34460 /* Completion.h in Headers */, BC18C3F50E16F5CD00B34460 /* config.h in Headers */, 144836E7132DA7BE005BE785 /* ConservativeRoots.h in Headers */, BC18C3F60E16F5CD00B34460 /* ConstructData.h in Headers */, + C2EAD2FC14F0249800A4B159 /* CopiedAllocator.h in Headers */, + 1A28D4A8177B71C80007FA3C /* JSStringRefPrivate.h in Headers */, + C2C8D03014A3CEFC00578E65 /* CopiedBlock.h in Headers */, + C2FC9BD316644DFB00810D33 /* CopiedBlockInlines.h in Headers */, + C2EAA3FA149A835E00FCE112 /* CopiedSpace.h in Headers */, + C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlines.h in Headers */, + C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */, + C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */, + C218D1401655CFD50062BB81 /* CopyWorkList.h in Headers */, 5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */, 0F426A4B1460CD6E00131F8F /* DataFormat.h in Headers */, BCD2034A0E17135E002C7E82 /* DateConstructor.h in Headers */, @@ -2725,29 +3068,83 @@ BC18C3FB0E16F5CD00B34460 /* DebuggerCallFrame.h in Headers */, 0F620178143FCD440068B77C /* DFGAbstractState.h in Headers */, 0F620177143FCD3F0068B77C /* DFGAbstractValue.h in Headers */, + 0F66E16B14DF3F1600B7B2E4 /* DFGAdjacencyList.h in Headers */, + 0FFB921816D02EB20055A5DB /* DFGAllocator.h in Headers */, + 0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */, + 0F16015E156198C900C2587C /* DFGArgumentsSimplificationPhase.h in Headers */, + 0F05C3B41683CF9200BAF45B /* DFGArrayifySlowPathGenerator.h in Headers */, + 0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */, 0FC0976D1468AB4E00CF2442 /* DFGAssemblyHelpers.h in Headers */, + 0F714CA516EA92F200F3EBEB /* DFGBackwardsPropagationPhase.h in Headers */, 0F620176143FCD3B0068B77C /* DFGBasicBlock.h in Headers */, + 0FFB921A16D02EC50055A5DB /* DFGBasicBlockInlines.h in Headers */, + A72028B81797601E0098028C /* JSCTestRunnerUtils.h in Headers */, + 0F8364B7164B0C110053329A /* DFGBranchDirection.h in Headers */, 86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */, + 0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */, + 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */, + 0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */, + 0FFFC95814EF90A200C72532 /* DFGCFAPhase.h in Headers */, + 0F3B3A281544C997003ED0FF /* DFGCFGSimplificationPhase.h in Headers */, 0F2C556F14738F3100121E4F /* DFGCodeBlocks.h in Headers */, - 0FC0979C146A772500CF2442 /* DFGCorrectableJumpPoint.h in Headers */, + 0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */, + 0F3B3A1B153E68F4003ED0FF /* DFGConstantFoldingPhase.h in Headers */, + 0FBE0F7316C1DB050082C5E8 /* DFGCPSRethreadingPhase.h in Headers */, + 0FFFC95A14EF90A900C72532 /* DFGCSEPhase.h in Headers */, + 0F2FC77316E12F740038D976 /* DFGDCEPhase.h in Headers */, + 0FF427651591A1CE004CB9FF /* DFGDisassembler.h in Headers */, + 0FD81AD3154FB4F000983E72 /* DFGDominators.h in Headers */, + 0F1E3A471534CBB9000F9456 /* DFGDoubleFormatState.h in Headers */, 0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */, + 0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */, 0FBC0AE81496C7C700D4FBDD /* DFGExitProfile.h in Headers */, + 0F2BDC16151C5D4F00CD8910 /* DFGFixupPhase.h in Headers */, 86AE6C4D136A11E400963012 /* DFGFPRInfo.h in Headers */, 86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */, 86AE6C4E136A11E400963012 /* DFGGPRInfo.h in Headers */, 86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */, + 0F2BDC21151E803B00CD8910 /* DFGInsertionSet.h in Headers */, 86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */, + 0FF0F19B16B729FA005DF95B /* DFGLongLivedState.h in Headers */, + 0F2BDC451522801B00CD8910 /* DFGMinifiedGraph.h in Headers */, + 0F2E892D16D02BAF009E4FD2 /* DFGMinifiedID.h in Headers */, + 0F2BDC461522802000CD8910 /* DFGMinifiedNode.h in Headers */, 86ECA3EA132DEF1C002B2AD7 /* DFGNode.h in Headers */, + 0FFB921B16D02F010055A5DB /* DFGNodeAllocator.h in Headers */, + 0FA581BB150E953000B9A2D9 /* DFGNodeFlags.h in Headers */, + 0FA581BC150E953000B9A2D9 /* DFGNodeType.h in Headers */, 86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */, 0FD82E57141DAF1000179C94 /* DFGOSREntry.h in Headers */, 0FC0976A1468A6F700CF2442 /* DFGOSRExit.h in Headers */, + 0FFB921C16D02F110055A5DB /* DFGOSRExitCompilationInfo.h in Headers */, 0FC0977114693AF500CF2442 /* DFGOSRExitCompiler.h in Headers */, + 0FEFC9AB1681A3B600567F53 /* DFGOSRExitJumpPlaceholder.h in Headers */, + 0FFFC95C14EF90AF00C72532 /* DFGPhase.h in Headers */, + 0FBE0F7516C1DB0B0082C5E8 /* DFGPredictionInjectionPhase.h in Headers */, + 0FFFC95E14EF90B700C72532 /* DFGPredictionPropagationPhase.h in Headers */, 86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */, + 0F766D4415B2A3C0008F363E /* DFGRegisterSet.h in Headers */, 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */, 86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */, + 0F766D4615B3701F008F363E /* DFGScratchRegisterAllocator.h in Headers */, + 0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */, + 0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */, 86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */, + 0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */, 0FC097A2146B28CC00CF2442 /* DFGThunks.h in Headers */, + 0F63943F15C75F19006A597C /* DFGTypeCheckHoistingPhase.h in Headers */, + 0FBE0F7716C1DB120082C5E8 /* DFGUnificationPhase.h in Headers */, + 0F34B14A16D42013001CDA5A /* DFGUseKind.h in Headers */, + 0F3B3A2C15475002003ED0FF /* DFGValidate.h in Headers */, + 0F2BDC471522802500CD8910 /* DFGValueRecoveryOverride.h in Headers */, + 0F2BDC481522802900CD8910 /* DFGValueSource.h in Headers */, 0F620174143FCD330068B77C /* DFGVariableAccessData.h in Headers */, + 0FDDBFB61666EEDA00C55FEF /* DFGVariableAccessDataDump.h in Headers */, + 0F2BDC491522809600CD8910 /* DFGVariableEvent.h in Headers */, + 0F2BDC4B1522809D00CD8910 /* DFGVariableEventStream.h in Headers */, + 0FFB921E16D02F470055A5DB /* DFGVariadicFunction.h in Headers */, + 0FFFC96014EF90BD00C72532 /* DFGVirtualRegisterAllocationPhase.h in Headers */, + 0FF42731158EBD54004CB9FF /* Disassembler.h in Headers */, BC3046070E1F497F003232CF /* Error.h in Headers */, BC02E90D0E1839DB000F9297 /* ErrorConstructor.h in Headers */, BC02E98D0E183E38000F9297 /* ErrorInstance.h in Headers */, @@ -2756,17 +3153,37 @@ BC18C4000E16F5CD00B34460 /* ExceptionHelpers.h in Headers */, 86CAFEE31035DDE60028A609 /* Executable.h in Headers */, A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */, + 0F56A1D315000F35002992B1 /* ExecutionCounter.h in Headers */, + 0F21C27C14BE727600ADC64B /* ExecutionHarness.h in Headers */, + 0FB105861675481200F8AB6E /* ExitKind.h in Headers */, + 0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */, BC18C4040E16F5CD00B34460 /* FunctionConstructor.h in Headers */, + 0FF0F1A016B72A1A005DF95B /* FunctionExecutableDump.h in Headers */, BC18C4050E16F5CD00B34460 /* FunctionPrototype.h in Headers */, DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */, + BCBE2CAE14E985AA000593AD /* GCAssertions.h in Headers */, + 0F766D3015A8DCE2008F363E /* GCAwareJITStubRoutine.h in Headers */, + C2239D1B16262BDD005AC5FD /* GCThread.h in Headers */, + C21122E215DD9AB300790E3A /* GCThreadSharedData.h in Headers */, + 0F9332A014CA7DCD0085F3C6 /* GetByIdStatus.h in Headers */, 142E3134134FF0A600AFADB5 /* Handle.h in Headers */, + C283190016FE4B7D00157BFD /* HandleBlock.h in Headers */, + C283190216FE533E00157BFD /* HandleBlockInlines.h in Headers */, + 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */, 142E3136134FF0A600AFADB5 /* HandleSet.h in Headers */, 142E3138134FF0A600AFADB5 /* HandleStack.h in Headers */, 1478297B1379E8A800A7C2A3 /* HandleTypes.h in Headers */, 14BA7A9813AADFF8005B7C2C /* Heap.h in Headers */, C2C8D03114A3CEFC00578E65 /* HeapBlock.h in Headers */, 14F97447138C853E00DA1C67 /* HeapRootVisitor.h in Headers */, + C24D31E3161CD695002AA4DB /* HeapStatistics.h in Headers */, + C2E526BE1590EF000054E48D /* HeapTimer.h in Headers */, + 0F4680D514BBD24B00BFE272 /* HostCallReturnValue.h in Headers */, BC18C40F0E16F5CD00B34460 /* Identifier.h in Headers */, + C25F8BCE157544A900245B71 /* IncrementalSweeper.h in Headers */, + 0FB7F39915ED8E4600F167B2 /* IndexingHeader.h in Headers */, + 0FB7F39A15ED8E4600F167B2 /* IndexingHeaderInlines.h in Headers */, + 0FB7F39B15ED8E4600F167B2 /* IndexingType.h in Headers */, BC18C4100E16F5CD00B34460 /* InitializeThreading.h in Headers */, 969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */, BC11667B0E199C05008066DD /* InternalFunction.h in Headers */, @@ -2777,12 +3194,20 @@ BC18C4150E16F5CD00B34460 /* JavaScriptCorePrefix.h in Headers */, 1429D9300ED22D7000B89619 /* JIT.h in Headers */, 86CCEFDE0F413F8900FD7F9E /* JITCode.h in Headers */, + 0F0776BF14FF002B00102332 /* JITCompilationEffort.h in Headers */, + 0FAF7EFE165BA91F000C8455 /* JITDisassembler.h in Headers */, + 0F21C26814BE5F6800ADC64B /* JITDriver.h in Headers */, + 0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */, 86CC85A10EE79A4700288682 /* JITInlines.h in Headers */, 960626960FB8EC02009798AB /* JITStubCall.h in Headers */, + 0F766D3115AA8112008F363E /* JITStubRoutine.h in Headers */, + 0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */, 14C5242B0F5355E900BA3D04 /* JITStubs.h in Headers */, + 0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */, A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */, BC18C4160E16F5CD00B34460 /* JSActivation.h in Headers */, 840480131021A1D9008E7F01 /* JSAPIValueWrapper.h in Headers */, + C2CF39C216E15A8100DD69BE /* JSAPIWrapperObject.h in Headers */, BC18C4170E16F5CD00B34460 /* JSArray.h in Headers */, BC18C4180E16F5CD00B34460 /* JSBase.h in Headers */, 140D17D70E8AD4A9000CD17D /* JSBasePrivate.h in Headers */, @@ -2792,51 +3217,83 @@ BC18C41B0E16F5CD00B34460 /* JSCallbackObject.h in Headers */, BC18C41C0E16F5CD00B34460 /* JSCallbackObjectFunctions.h in Headers */, BC1167DA0E19BCC9008066DD /* JSCell.h in Headers */, + 0F9749711687ADE400A4FF6A /* JSCellInlines.h in Headers */, + BC18C42B0E16F5CD00B34460 /* JSCJSValue.h in Headers */, + 865A30F1135007E100CDB49E /* JSCJSValueInlines.h in Headers */, BC18C41D0E16F5CD00B34460 /* JSClassRef.h in Headers */, + 86E3C613167BABD7006D760A /* JSContext.h in Headers */, + 86E3C617167BABEE006D760A /* JSContextInternal.h in Headers */, BC18C41E0E16F5CD00B34460 /* JSContextRef.h in Headers */, 148CD1D8108CF902008163C6 /* JSContextRefPrivate.h in Headers */, 978801411471AD920041B016 /* JSDateMath.h in Headers */, + C2A7F688160432D400F76B98 /* JSDestructibleObject.h in Headers */, + 86E3C614167BABD7006D760A /* JSExport.h in Headers */, A7B4ACAF1484C9CE00B38A36 /* JSExportMacros.h in Headers */, BC18C41F0E16F5CD00B34460 /* JSFunction.h in Headers */, - BC18C4200E16F5CD00B34460 /* JSGlobalData.h in Headers */, BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */, BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */, A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */, BC18C4230E16F5CD00B34460 /* JSLock.h in Headers */, + C25D709C16DE99F400FCA6BC /* JSManagedValue.h in Headers */, + 14874AE415EBDE4A002E3587 /* JSNameScope.h in Headers */, BC18C4240E16F5CD00B34460 /* JSObject.h in Headers */, BC18C4250E16F5CD00B34460 /* JSObjectRef.h in Headers */, A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */, A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */, BC87CDB910712AD4000614CF /* JSONObject.lut.h in Headers */, 9534AAFB0E5B7A9600B8A45B /* JSProfilerPrivate.h in Headers */, + 862553D216136E1A009F17D0 /* JSProxy.h in Headers */, BC18C4260E16F5CD00B34460 /* JSRetainPtr.h in Headers */, + 14874AE615EBDE4A002E3587 /* JSScope.h in Headers */, + A7C0C4AC168103020017011D /* JSScriptRefPrivate.h in Headers */, + 0F919D11157F332C004A4E7D /* JSSegmentedVariableObject.h in Headers */, BC18C45E0E16F5CD00B34460 /* JSStack.h in Headers */, BC18C4270E16F5CD00B34460 /* JSString.h in Headers */, 86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */, 2600B5A7152BAAA70091EE5F /* JSStringJoiner.h in Headers */, BC18C4280E16F5CD00B34460 /* JSStringRef.h in Headers */, BC18C4290E16F5CD00B34460 /* JSStringRefCF.h in Headers */, + 0F919D0D157EE0A2004A4E7D /* JSSymbolTableObject.h in Headers */, BC18C42A0E16F5CD00B34460 /* JSType.h in Headers */, 6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */, - BC18C42B0E16F5CD00B34460 /* JSValue.h in Headers */, - 865A30F1135007E100CDB49E /* JSValueInlines.h in Headers */, + 86E3C612167BABD7006D760A /* JSValue.h in Headers */, + 86E3C61B167BABEE006D760A /* JSValueInternal.h in Headers */, BC18C42C0E16F5CD00B34460 /* JSValueRef.h in Headers */, BC18C42D0E16F5CD00B34460 /* JSVariableObject.h in Headers */, + 86E3C615167BABD7006D760A /* JSVirtualMachine.h in Headers */, + 86E3C61D167BABEE006D760A /* JSVirtualMachineInternal.h in Headers */, A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */, A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */, + 1442566215EDE98D0066A49B /* JSWithScope.h in Headers */, + 86E3C619167BABEE006D760A /* JSWrapperMap.h in Headers */, BC18C42E0E16F5CD00B34460 /* JSWrapperObject.h in Headers */, + 0F766D3515AE253B008F363E /* JumpReplacementWatchpoint.h in Headers */, BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */, A72FFD64139985A800E5365A /* KeywordLookup.h in Headers */, 969A072A0ED1CE6900F1F681 /* Label.h in Headers */, 960097A60EBABB58007A7297 /* LabelScope.h in Headers */, + 0FB5467714F59B5C002C2989 /* LazyOperandValueProfile.h in Headers */, + BC18C4520E16F5CD00B34460 /* LegacyProfiler.h in Headers */, BC18C4310E16F5CD00B34460 /* Lexer.h in Headers */, BC18C52E0E16FCE100B34460 /* Lexer.lut.h in Headers */, + 0F0B83AD14BCF60400885B4F /* LineInfo.h in Headers */, 86D3B3C310159D7F002865E7 /* LinkBuffer.h in Headers */, 0F431738146BAC69007E3890 /* ListableHandler.h in Headers */, A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */, + 0F0FC45A14BD15F500B81154 /* LLIntCallLinkInfo.h in Headers */, + FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */, + 0F4680CA14BBB16C00BFE272 /* LLIntCommon.h in Headers */, + 0F4680D314BBD16700BFE272 /* LLIntData.h in Headers */, + 0F0B839B14BCF46000885B4F /* LLIntEntrypoints.h in Headers */, + 0F4680A314BA7F8D00BFE272 /* LLIntExceptions.h in Headers */, + 0F4680CB14BBB17200BFE272 /* LLIntOfflineAsmConfig.h in Headers */, + FED287B215EC9A5700DA8161 /* LLIntOpcode.h in Headers */, + 0F4680A514BA7F8D00BFE272 /* LLIntSlowPaths.h in Headers */, + 0F0B839D14BCF46600885B4F /* LLIntThunks.h in Headers */, 142E3139134FF0A600AFADB5 /* Local.h in Headers */, 142E313A134FF0A600AFADB5 /* LocalScope.h in Headers */, BC18C4370E16F5CD00B34460 /* Lookup.h in Headers */, + 0F4680CD14BBB17D00BFE272 /* LowLevelInterpreter.h in Headers */, 14B723B812D7DA6F003BD5ED /* MachineStackMarker.h in Headers */, 86C36EEA0EE1289D00B3DF59 /* MacroAssembler.h in Headers */, 86D3B2C610156BDE002865E7 /* MacroAssemblerARM.h in Headers */, @@ -2847,16 +3304,24 @@ 860161E40F3A83C100F84710 /* MacroAssemblerX86.h in Headers */, 860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */, 860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */, + C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */, 142D6F0913539A2800B02E86 /* MarkedBlock.h in Headers */, 141448CB13A176EC00F5BA1A /* MarkedBlockSet.h in Headers */, 14D2F3DB139F4BE200491031 /* MarkedSpace.h in Headers */, 142D6F1213539A4100B02E86 /* MarkStack.h in Headers */, + C21122E315DD9AB300790E3A /* MarkStackInlines.h in Headers */, + 8612E4CD152389EC00C836BE /* MatchResult.h in Headers */, BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */, BC18C52A0E16FCC200B34460 /* MathObject.lut.h in Headers */, 90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */, + 0FB5467B14F5C7E1002C2989 /* MethodOfGettingAValueProfile.h in Headers */, 86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */, + 86EBF3001560F06A008E9222 /* NameConstructor.h in Headers */, + 86EBF3021560F06A008E9222 /* NameInstance.h in Headers */, + 86EBF3041560F06A008E9222 /* NamePrototype.h in Headers */, BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */, BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */, + 0FFB922016D033B70055A5DB /* NodeConstructors.h in Headers */, 7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */, BC18C43F0E16F5CD00B34460 /* Nodes.h in Headers */, BC18C4410E16F5CD00B34460 /* NumberConstructor.h in Headers */, @@ -2864,25 +3329,57 @@ BC18C4430E16F5CD00B34460 /* NumberObject.h in Headers */, BC18C4440E16F5CD00B34460 /* NumberPrototype.h in Headers */, 142D3939103E4560007DCB52 /* NumericStrings.h in Headers */, + 86F3EEBD168CDE930077B92A /* ObjCCallbackFunction.h in Headers */, + 86F3EEBF168CDE930077B92A /* ObjcRuntimeExtras.h in Headers */, + 14CA958D16AB50FA00938A06 /* ObjectAllocationProfile.h in Headers */, BC18C4450E16F5CD00B34460 /* ObjectConstructor.h in Headers */, BC18C4460E16F5CD00B34460 /* ObjectPrototype.h in Headers */, E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */, 969A079B0ED1D3AE00F1F681 /* Opcode.h in Headers */, + 0F2BDC2C151FDE9100CD8910 /* Operands.h in Headers */, BC18C4480E16F5CD00B34460 /* Operations.h in Headers */, 0FE228ED1436AB2700196C48 /* Options.h in Headers */, BC18C44B0E16F5CD00B34460 /* Parser.h in Headers */, 93052C350FB792190048FDC3 /* ParserArena.h in Headers */, + 0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */, + A77F1825164192C700640A47 /* ParserModes.h in Headers */, 65303D641447B9E100D3F904 /* ParserTokens.h in Headers */, - 0FD82E54141DAEEE00179C94 /* SpeculatedType.h in Headers */, + 1497209114EB831500FEB1B7 /* PassWeak.h in Headers */, + 0F34B14C16D43E0D001CDA5A /* PolymorphicAccessStructureList.h in Headers */, + 0F9FC8C414E1B60000D52AE0 /* PolymorphicPutByIdList.h in Headers */, + 0F98206116BFE38300240D02 /* PreciseJumpTargets.h in Headers */, + 868916B0155F286300CB2B9A /* PrivateName.h in Headers */, BC18C4500E16F5CD00B34460 /* Profile.h in Headers */, + 95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */, BC18C4510E16F5CD00B34460 /* ProfileNode.h in Headers */, - BC18C4520E16F5CD00B34460 /* Profiler.h in Headers */, + 0FF729A5166AD351000F5BA3 /* ProfilerBytecode.h in Headers */, + 0FF729B9166AD360000F5BA3 /* ProfilerBytecodes.h in Headers */, + 0F13912A16771C36009CCB07 /* ProfilerBytecodeSequence.h in Headers */, + 0FF729BA166AD360000F5BA3 /* ProfilerCompilation.h in Headers */, + 0FF729BB166AD360000F5BA3 /* ProfilerCompilationKind.h in Headers */, + A72028BA1797603D0098028C /* JSFunctionInlines.h in Headers */, + 0FF729BC166AD360000F5BA3 /* ProfilerCompiledBytecode.h in Headers */, + 0FF729BD166AD360000F5BA3 /* ProfilerDatabase.h in Headers */, + 0FF729BE166AD360000F5BA3 /* ProfilerExecutionCounter.h in Headers */, + 0FF729BF166AD360000F5BA3 /* ProfilerOrigin.h in Headers */, + 0FF729C0166AD360000F5BA3 /* ProfilerOriginStack.h in Headers */, + 0FB1058C1675483300F8AB6E /* ProfilerOSRExit.h in Headers */, + 0FB1058E1675483A00F8AB6E /* ProfilerOSRExitSite.h in Headers */, + 0F13912C16771C3D009CCB07 /* ProfilerProfiledBytecodes.h in Headers */, A7FB61001040C38B0017A286 /* PropertyDescriptor.h in Headers */, BC95437D0EBA70FD0072B6D3 /* PropertyMapHashTable.h in Headers */, + 86158AB3155C8B4000B45C9C /* PropertyName.h in Headers */, BC18C4540E16F5CD00B34460 /* PropertyNameArray.h in Headers */, + 0FF7168C15A3B235008F5DAA /* PropertyOffset.h in Headers */, BC18C4550E16F5CD00B34460 /* PropertySlot.h in Headers */, + 0FB7F39C15ED8E4600F167B2 /* PropertyStorage.h in Headers */, BC18C4560E16F5CD00B34460 /* Protect.h in Headers */, + 1474C33B16AA2D950062F01D /* PrototypeMap.h in Headers */, + 0F9332A414CA7DD90085F3C6 /* PutByIdStatus.h in Headers */, + 0F0CD4C215F1A6070032F1C0 /* PutDirectIndexMode.h in Headers */, + 0F9FC8C514E1B60400D52AE0 /* PutKind.h in Headers */, 147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */, + 0FF60AC216740F8300029779 /* ReduceWhitespace.h in Headers */, BC18C45A0E16F5CD00B34460 /* RegExp.h in Headers */, A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */, BCD202C20E1706A7002C7E82 /* RegExpConstructor.h in Headers */, @@ -2891,20 +3388,30 @@ BC18C45B0E16F5CD00B34460 /* RegExpObject.h in Headers */, BC18C52C0E16FCD200B34460 /* RegExpObject.lut.h in Headers */, BCD202C40E1706A7002C7E82 /* RegExpPrototype.h in Headers */, + C20B25991706536200C21F4E /* Region.h in Headers */, BC18C45D0E16F5CD00B34460 /* Register.h in Headers */, 969A072B0ED1CE6900F1F681 /* RegisterID.h in Headers */, + 0FB7F39D15ED8E4600F167B2 /* Reject.h in Headers */, 86D3B3C410159D7F002865E7 /* RepatchBuffer.h in Headers */, + 0FF42772159275D8004CB9FF /* ResolveGlobalStatus.h in Headers */, + A7AFC17915F7EFE30048F57B /* ResolveOperation.h in Headers */, 869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */, C22B31B9140577D700DB475A /* SamplingCounter.h in Headers */, 1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */, 86AE64AA135E5E1C00963012 /* SH4Assembler.h in Headers */, 14BA78F113AAB88F005B7C2C /* SlotVisitor.h in Headers */, + C2160FE715F7E95E00942DFC /* SlotVisitorInlines.h in Headers */, 933040040E6A749400786E6A /* SmallStrings.h in Headers */, BC18C4640E16F5CD00B34460 /* SourceCode.h in Headers */, BC18C4630E16F5CD00B34460 /* SourceProvider.h in Headers */, E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */, E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */, + 0FB7F39E15ED8E4600F167B2 /* SparseArrayValueMap.h in Headers */, A7386554118697B400540279 /* SpecializedThunkJIT.h in Headers */, + 0F5541B21613C1FB00CE3E25 /* SpecialPointer.h in Headers */, + 0FD82E54141DAEEE00179C94 /* SpeculatedType.h in Headers */, + 14DF04DA16B3996D0016A513 /* StaticPropertyAnalysis.h in Headers */, + 14CA958B16AB50DE00938A06 /* StaticPropertyAnalyzer.h in Headers */, A730B6121250068F009D25B1 /* StrictEvalActivation.h in Headers */, BC18C4660E16F5CD00B34460 /* StringConstructor.h in Headers */, BC18C4680E16F5CD00B34460 /* StringObject.h in Headers */, @@ -2914,25 +3421,50 @@ 145722861437E140005FDE26 /* StrongInlines.h in Headers */, BCDE3AB80E6C82F5001453A7 /* Structure.h in Headers */, 7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */, + 0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */, + C2FE18A416BAEC4000AF3061 /* StructureRareData.h in Headers */, + C20BA92D16BB1C1500B3AEA2 /* StructureRareDataInlines.h in Headers */, + 0F9332A514CA7DDD0085F3C6 /* StructureSet.h in Headers */, + 0F766D3915AE4A1F008F363E /* StructureStubClearingWatchpoint.h in Headers */, BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */, BC9041480EB9250900FE26FA /* StructureTransitionTable.h in Headers */, + C2DF44301707AC0100A5CA96 /* SuperRegion.h in Headers */, BC18C46B0E16F5CD00B34460 /* SymbolTable.h in Headers */, A784A26411D16622005776AC /* SyntaxChecker.h in Headers */, - 971EDEA61169E0D3005E4262 /* Terminator.h in Headers */, + 0F572D4F16879FDD00E57FBD /* ThunkGenerator.h in Headers */, A7386556118697B400540279 /* ThunkGenerators.h in Headers */, - 14A42E400F4F60EE00599099 /* TimeoutChecker.h in Headers */, 141448CD13A1783700F5BA1A /* TinyBloomFilter.h in Headers */, 5D53726F0E1C54880021E549 /* Tracing.h in Headers */, - 866739D313BFDE710023D87C /* Uint16WithFraction.h in Headers */, - 0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */, - 0F963B3813FC6FE90002D9B2 /* ValueProfile.h in Headers */, - 0F426A481460CBB300131F8F /* ValueRecovery.h in Headers */, + 0FEB3ECD16237F4D00AB67AD /* TypedArrayDescriptor.h in Headers */, + 0FF4274B158EBE91004CB9FF /* udis86.h in Headers */, + 0FF42741158EBE8D004CB9FF /* udis86_decode.h in Headers */, + 0FF42742158EBE91004CB9FF /* udis86_extern.h in Headers */, + 0FF42744158EBE91004CB9FF /* udis86_input.h in Headers */, + 0FF42748158EBE91004CB9FF /* udis86_syn.h in Headers */, + 0FF42749158EBE91004CB9FF /* udis86_types.h in Headers */, + 866739D313BFDE710023D87C /* Uint16WithFraction.h in Headers */, + 0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */, + A7B601821639FD2A00372BA3 /* UnlinkedCodeBlock.h in Headers */, + 0F2E892C16D028AD009E4FD2 /* UnusedPointer.h in Headers */, + 0F963B3813FC6FE90002D9B2 /* ValueProfile.h in Headers */, + 0F426A481460CBB300131F8F /* ValueRecovery.h in Headers */, 0F426A491460CBB700131F8F /* VirtualRegister.h in Headers */, + BC18C4200E16F5CD00B34460 /* VM.h in Headers */, + FE4A332015BD2E07006F54F3 /* VMInspector.h in Headers */, + FE6617281774E03500495B00 /* VMStackBounds.h in Headers */, 0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */, + FED94F2F171E3E2300BE77A4 /* Watchdog.h in Headers */, + 0F919D2615853CE3004A4E7D /* Watchpoint.h in Headers */, 142E313C134FF0A600AFADB5 /* Weak.h in Headers */, + 14E84F9F14EE1ACC00D6D5D4 /* WeakBlock.h in Headers */, 14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */, + 14F7256614EE265E00B1652B /* WeakHandleOwner.h in Headers */, + 14E84FA214EE1ACC00D6D5D4 /* WeakImpl.h in Headers */, + 14BE7D3317135CF400D1807A /* WeakInlines.h in Headers */, 1420BE7B10AA6DDB00F455D2 /* WeakRandom.h in Headers */, 0F242DA713F3B1E8007ADD4C /* WeakReferenceHarvester.h in Headers */, + 14E84FA114EE1ACC00D6D5D4 /* WeakSet.h in Headers */, + 14150133154BB13F005D8C98 /* WeakSetInlines.h in Headers */, BC18C47A0E16F5CD00B34460 /* WebKitAvailability.h in Headers */, A7DCB97312E5193F00911940 /* WriteBarrier.h in Headers */, 0FC8150A14043BF500CFA603 /* WriteBarrierSupport.h in Headers */, @@ -2943,140 +3475,6 @@ 86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */, 86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */, 86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */, - 0F15F15F14B7A73E005DE37D /* CommonSlowPaths.h in Headers */, - 0F4680A314BA7F8D00BFE272 /* LLIntExceptions.h in Headers */, - 0F4680A514BA7F8D00BFE272 /* LLIntSlowPaths.h in Headers */, - 0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */, - 0F4680CA14BBB16C00BFE272 /* LLIntCommon.h in Headers */, - 0F4680CB14BBB17200BFE272 /* LLIntOfflineAsmConfig.h in Headers */, - 0F4680CD14BBB17D00BFE272 /* LowLevelInterpreter.h in Headers */, - 0F4680D314BBD16700BFE272 /* LLIntData.h in Headers */, - 0F4680D514BBD24B00BFE272 /* HostCallReturnValue.h in Headers */, - 0F0B839B14BCF46000885B4F /* LLIntEntrypoints.h in Headers */, - 0F0B839D14BCF46600885B4F /* LLIntThunks.h in Headers */, - 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */, - 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */, - 0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */, - 0F0B83AD14BCF60400885B4F /* LineInfo.h in Headers */, - 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */, - 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */, - 0F0FC45A14BD15F500B81154 /* LLIntCallLinkInfo.h in Headers */, - 0F21C26814BE5F6800ADC64B /* JITDriver.h in Headers */, - 95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */, - 0F21C27C14BE727600ADC64B /* ExecutionHarness.h in Headers */, - 0F21C27D14BE727A00ADC64B /* CodeSpecializationKind.h in Headers */, - 0F21C27F14BEAA8200ADC64B /* BytecodeConventions.h in Headers */, - 0F7B294A14C3CD29007C3DB1 /* DFGCCallHelpers.h in Headers */, - 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */, - 0F7B294C14C3CD43007C3DB1 /* DFGByteCodeCache.h in Headers */, - 0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */, - 0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */, - 0F9332A014CA7DCD0085F3C6 /* GetByIdStatus.h in Headers */, - 0F9332A414CA7DD90085F3C6 /* PutByIdStatus.h in Headers */, - 0F9332A514CA7DDD0085F3C6 /* StructureSet.h in Headers */, - 0F55F0F514D1063C00AC7649 /* AbstractPC.h in Headers */, - 0F66E16B14DF3F1600B7B2E4 /* DFGAdjacencyList.h in Headers */, - 0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */, - 0F9FC8C414E1B60000D52AE0 /* PolymorphicPutByIdList.h in Headers */, - 0F9FC8C514E1B60400D52AE0 /* PutKind.h in Headers */, - BCBE2CAE14E985AA000593AD /* GCAssertions.h in Headers */, - 0FFFC95814EF90A200C72532 /* DFGCFAPhase.h in Headers */, - 0FFFC95A14EF90A900C72532 /* DFGCSEPhase.h in Headers */, - 0FFFC95C14EF90AF00C72532 /* DFGPhase.h in Headers */, - 0FFFC95E14EF90B700C72532 /* DFGPredictionPropagationPhase.h in Headers */, - 0FFFC96014EF90BD00C72532 /* DFGVirtualRegisterAllocationPhase.h in Headers */, - 1497209114EB831500FEB1B7 /* PassWeak.h in Headers */, - 14E84F9F14EE1ACC00D6D5D4 /* WeakBlock.h in Headers */, - 14E84FA114EE1ACC00D6D5D4 /* WeakSet.h in Headers */, - 14E84FA214EE1ACC00D6D5D4 /* WeakImpl.h in Headers */, - 14F7256614EE265E00B1652B /* WeakHandleOwner.h in Headers */, - 0FB5467714F59B5C002C2989 /* LazyOperandValueProfile.h in Headers */, - 0FB5467B14F5C7E1002C2989 /* MethodOfGettingAValueProfile.h in Headers */, - 0F0776BF14FF002B00102332 /* JITCompilationEffort.h in Headers */, - 0F56A1D315000F35002992B1 /* ExecutionCounter.h in Headers */, - 0FA581BB150E953000B9A2D9 /* DFGNodeFlags.h in Headers */, - 0FA581BC150E953000B9A2D9 /* DFGNodeType.h in Headers */, - 0F2BDC16151C5D4F00CD8910 /* DFGFixupPhase.h in Headers */, - 0F2BDC21151E803B00CD8910 /* DFGInsertionSet.h in Headers */, - 0F2BDC2C151FDE9100CD8910 /* Operands.h in Headers */, - 0F2BDC451522801B00CD8910 /* DFGMinifiedGraph.h in Headers */, - 0F2BDC461522802000CD8910 /* DFGMinifiedNode.h in Headers */, - 0F2BDC471522802500CD8910 /* DFGValueRecoveryOverride.h in Headers */, - 0F2BDC481522802900CD8910 /* DFGValueSource.h in Headers */, - 0F2BDC491522809600CD8910 /* DFGVariableEvent.h in Headers */, - 0F2BDC4B1522809D00CD8910 /* DFGVariableEventStream.h in Headers */, - 8612E4CD152389EC00C836BE /* MatchResult.h in Headers */, - 0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */, - 0F3B3A1B153E68F4003ED0FF /* DFGConstantFoldingPhase.h in Headers */, - 0F1E3A471534CBB9000F9456 /* DFGDoubleFormatState.h in Headers */, - 14150133154BB13F005D8C98 /* WeakSetInlines.h in Headers */, - 14816E1C154CC56C00B8054C /* BlockAllocator.h in Headers */, - 86158AB3155C8B4000B45C9C /* PropertyName.h in Headers */, - 868916B0155F286300CB2B9A /* PrivateName.h in Headers */, - 86EBF3001560F06A008E9222 /* NameConstructor.h in Headers */, - 86EBF3021560F06A008E9222 /* NameInstance.h in Headers */, - 86EBF3041560F06A008E9222 /* NamePrototype.h in Headers */, - 0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */, - 0F3B3A281544C997003ED0FF /* DFGCFGSimplificationPhase.h in Headers */, - 0F3B3A2C15475002003ED0FF /* DFGValidate.h in Headers */, - 0FD81AD3154FB4F000983E72 /* DFGDominators.h in Headers */, - 0F16015E156198C900C2587C /* DFGArgumentsSimplificationPhase.h in Headers */, - 0F919D0D157EE0A2004A4E7D /* JSSymbolTableObject.h in Headers */, - 0F919D11157F332C004A4E7D /* JSSegmentedVariableObject.h in Headers */, - 0F919D2615853CE3004A4E7D /* Watchpoint.h in Headers */, - 0FF42731158EBD54004CB9FF /* Disassembler.h in Headers */, - 0FF42741158EBE8D004CB9FF /* udis86_decode.h in Headers */, - 0FF42742158EBE91004CB9FF /* udis86_extern.h in Headers */, - 0FF42744158EBE91004CB9FF /* udis86_input.h in Headers */, - 0FF42748158EBE91004CB9FF /* udis86_syn.h in Headers */, - 0FF42749158EBE91004CB9FF /* udis86_types.h in Headers */, - 0FF4274B158EBE91004CB9FF /* udis86.h in Headers */, - 0FF427651591A1CE004CB9FF /* DFGDisassembler.h in Headers */, - 0FF42772159275D8004CB9FF /* ResolveGlobalStatus.h in Headers */, - 0FF7168C15A3B235008F5DAA /* PropertyOffset.h in Headers */, - 0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */, - 0F766D3015A8DCE2008F363E /* GCAwareJITStubRoutine.h in Headers */, - 0F766D3115AA8112008F363E /* JITStubRoutine.h in Headers */, - 0F766D3515AE253B008F363E /* JumpReplacementWatchpoint.h in Headers */, - 0F766D3915AE4A1F008F363E /* StructureStubClearingWatchpoint.h in Headers */, - 0F766D4415B2A3C0008F363E /* DFGRegisterSet.h in Headers */, - 0F766D4615B3701F008F363E /* DFGScratchRegisterAllocator.h in Headers */, - 0F63943F15C75F19006A597C /* DFGStructureCheckHoistingPhase.h in Headers */, - 0F63945515D07057006A597C /* ArrayProfile.h in Headers */, - 0F63948515E4811B006A597C /* DFGArrayMode.h in Headers */, - 0F63947815DCE34B006A597C /* DFGStructureAbstractValue.h in Headers */, - 14874AE415EBDE4A002E3587 /* JSNameScope.h in Headers */, - 14874AE615EBDE4A002E3587 /* JSScope.h in Headers */, - FED287B215EC9A5700DA8161 /* LLIntOpcode.h in Headers */, - 1442566215EDE98D0066A49B /* JSWithScope.h in Headers */, - A7AFC17915F7EFE30048F57B /* ResolveOperation.h in Headers */, - 0FB7F39515ED8E4600F167B2 /* ArrayConventions.h in Headers */, - 0FB7F39615ED8E4600F167B2 /* ArrayStorage.h in Headers */, - 0FB7F39715ED8E4600F167B2 /* Butterfly.h in Headers */, - 0FB7F39815ED8E4600F167B2 /* ButterflyInlines.h in Headers */, - 0FB7F39915ED8E4600F167B2 /* IndexingHeader.h in Headers */, - 0FB7F39A15ED8E4600F167B2 /* IndexingHeaderInlines.h in Headers */, - 0FB7F39B15ED8E4600F167B2 /* IndexingType.h in Headers */, - 0FB7F39C15ED8E4600F167B2 /* PropertyStorage.h in Headers */, - 0FB7F39D15ED8E4600F167B2 /* Reject.h in Headers */, - 0FB7F39E15ED8E4600F167B2 /* SparseArrayValueMap.h in Headers */, - 0F0CD4C215F1A6070032F1C0 /* PutDirectIndexMode.h in Headers */, - 0F8023EA1613832B00A0BA45 /* ByValInfo.h in Headers */, - 862553D216136E1A009F17D0 /* JSProxy.h in Headers */, - 0F5541B21613C1FB00CE3E25 /* SpecialPointer.h in Headers */, - 0FEB3ECD16237F4D00AB67AD /* TypedArrayDescriptor.h in Headers */, - 0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */, - C2239D1B16262BDD005AC5FD /* GCThread.h in Headers */, - 0F8364B7164B0C110053329A /* DFGBranchDirection.h in Headers */, - 0F8335B81639C1EA001443B5 /* ArrayAllocationProfile.h in Headers */, - A7B601821639FD2A00372BA3 /* UnlinkedCodeBlock.h in Headers */, - A77F1822164088B200640A47 /* CodeCache.h in Headers */, - A77F1825164192C700640A47 /* ParserModes.h in Headers */, - 0FAF7EFE165BA91F000C8455 /* JITDisassembler.h in Headers */, - 0F73D7AF165A143000ACAB71 /* ClosureCallStubRoutine.h in Headers */, - 0FDDBFB61666EEDA00C55FEF /* DFGVariableAccessDataDump.h in Headers */, - 0F8F94411667633200D61971 /* CodeBlockHash.h in Headers */, - 0F96EBB316676EF6008BADE3 /* CodeBlockWithJITType.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3164,6 +3562,7 @@ 932F5BD20822A1C700736975 /* Frameworks */, 5D29D8BE0E9860B400C3D2D0 /* Check For Weak VTables and Externals */, 3713F014142905240036387F /* Check For Inappropriate Objective-C Class Names */, + A55DEAA416703DF7003DB841 /* Check For Inappropriate Macros in External Headers */, ); buildRules = ( ); @@ -3356,6 +3755,21 @@ shellPath = /bin/sh; 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` || exit 1\n\n/usr/bin/env ruby JavaScriptCore/offlineasm/asm.rb JavaScriptCore/llint/LowLevelInterpreter.asm ${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor LLIntAssembly.h || exit 1\n"; }; + A55DEAA416703DF7003DB841 /* Check For Inappropriate Macros in External Headers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Check For Inappropriate Macros in External Headers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-macros-in-external-headers ]; then\n ../../Tools/Scripts/check-for-inappropriate-macros-in-external-headers Headers PrivateHeaders/JSBasePrivate.h || exit $?\nfi"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -3384,6 +3798,7 @@ buildActionMask = 2147483647; files = ( 1440F6100A4F85670005F061 /* testapi.c in Sources */, + 86D2221A167EF9440024C804 /* testapi.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3399,24 +3814,41 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0F55F0F414D1063900AC7649 /* AbstractPC.cpp in Sources */, 147F39BD107EC37600427A48 /* ArgList.cpp in Sources */, 147F39BE107EC37600427A48 /* Arguments.cpp in Sources */, 86D3B2C310156BDE002865E7 /* ARMAssembler.cpp in Sources */, A74DE1D0120B875600D40D5B /* ARMv7Assembler.cpp in Sources */, + 65C02850171795E200351E35 /* ARMv7Disassembler.cpp in Sources */, + 65C0285C1717966800351E35 /* ARMv7DOpcode.cpp in Sources */, + 0F8335B71639C1E6001443B5 /* ArrayAllocationProfile.cpp in Sources */, 147F39BF107EC37600427A48 /* ArrayConstructor.cpp in Sources */, + 0F63945415D07055006A597C /* ArrayProfile.cpp in Sources */, 147F39C0107EC37600427A48 /* ArrayPrototype.cpp in Sources */, + 14816E1B154CC56C00B8054C /* BlockAllocator.cpp in Sources */, 14280863107EC11A0013E7B2 /* BooleanConstructor.cpp in Sources */, 14280864107EC11A0013E7B2 /* BooleanObject.cpp in Sources */, 14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */, - C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */, 148F21AA107EC53A0042EC2C /* BytecodeGenerator.cpp in Sources */, 1428082D107EC0570013E7B2 /* CallData.cpp in Sources */, 1429D8DD0ED2205B00B89619 /* CallFrame.cpp in Sources */, + 0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */, + 0F93329D14CA7DC30085F3C6 /* CallLinkStatus.cpp in Sources */, + 0F73D7AE165A142D00ACAB71 /* ClosureCallStubRoutine.cpp in Sources */, 969A07960ED1D3AE00F1F681 /* CodeBlock.cpp in Sources */, + 0F8F94401667633000D61971 /* CodeBlockHash.cpp in Sources */, + A77F1821164088B200640A47 /* CodeCache.cpp in Sources */, + 0F8F9446166764F100D61971 /* CodeOrigin.cpp in Sources */, + 86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */, + 86B5826914D2797000A9C306 /* CodeProfiling.cpp in Sources */, + 0F8F943C1667631300D61971 /* CodeSpecializationKind.cpp in Sources */, + 0F8F94421667633500D61971 /* CodeType.cpp in Sources */, 147F39C1107EC37600427A48 /* CommonIdentifiers.cpp in Sources */, 147F39C2107EC37600427A48 /* Completion.cpp in Sources */, 146B16D812EB5B59001BEC1B /* ConservativeRoots.cpp in Sources */, 1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */, + C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */, + C2239D1716262BDD005AC5FD /* CopyVisitor.cpp in Sources */, 147F39C3107EC37600427A48 /* DateConstructor.cpp in Sources */, 147F39C4107EC37600427A48 /* DateConversion.cpp in Sources */, 147F39C5107EC37600427A48 /* DateInstance.cpp in Sources */, @@ -3425,26 +3857,57 @@ BC3135650F302FA3003DFD3A /* DebuggerActivation.cpp in Sources */, 149559EE0DDCDDF700648087 /* DebuggerCallFrame.cpp in Sources */, 0F620179143FCD480068B77C /* DFGAbstractState.cpp in Sources */, + 0F16015D156198C900C2587C /* DFGArgumentsSimplificationPhase.cpp in Sources */, + 0F63948415E48118006A597C /* DFGArrayMode.cpp in Sources */, 0FC0976E1468AB5100CF2442 /* DFGAssemblyHelpers.cpp in Sources */, + 0F714CA416EA92F000F3EBEB /* DFGBackwardsPropagationPhase.cpp in Sources */, 86EC9DC41328DF82002B2AD7 /* DFGByteCodeParser.cpp in Sources */, 0FD82E2114172CE300179C94 /* DFGCapabilities.cpp in Sources */, + 0FFFC95714EF90A000C72532 /* DFGCFAPhase.cpp in Sources */, + 0F3B3A271544C995003ED0FF /* DFGCFGSimplificationPhase.cpp in Sources */, 0F2C557014738F3500121E4F /* DFGCodeBlocks.cpp in Sources */, - 0FC0979E146B272100CF2442 /* DFGCorrectableJumpPoint.cpp in Sources */, + 0FF0F19D16B72A08005DF95B /* DFGCommon.cpp in Sources */, + 0F3B3A1A153E68F2003ED0FF /* DFGConstantFoldingPhase.cpp in Sources */, + 0FBE0F7216C1DB030082C5E8 /* DFGCPSRethreadingPhase.cpp in Sources */, + 0FFFC95914EF90A600C72532 /* DFGCSEPhase.cpp in Sources */, + 0F2FC77216E12F710038D976 /* DFGDCEPhase.cpp in Sources */, + 0FF427641591A1CC004CB9FF /* DFGDisassembler.cpp in Sources */, + 0FD81AD2154FB4EE00983E72 /* DFGDominators.cpp in Sources */, 0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */, + 0FF0F19E16B72A0B005DF95B /* DFGEdge.cpp in Sources */, 0FBC0AE71496C7C400D4FBDD /* DFGExitProfile.cpp in Sources */, + 0F2BDC15151C5D4D00CD8910 /* DFGFixupPhase.cpp in Sources */, 86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */, 86EC9DCB1328DF82002B2AD7 /* DFGJITCompiler.cpp in Sources */, + 0FF0F19916B729F6005DF95B /* DFGLongLivedState.cpp in Sources */, + 0F2BDC4D1522818600CD8910 /* DFGMinifiedNode.cpp in Sources */, + 0FF0F19C16B72A03005DF95B /* DFGNode.cpp in Sources */, + 0FA581BA150E952C00B9A2D9 /* DFGNodeFlags.cpp in Sources */, 86EC9DCF1328DF82002B2AD7 /* DFGOperations.cpp in Sources */, 0FD82E56141DAF0800179C94 /* DFGOSREntry.cpp in Sources */, 0FC09791146A6F7100CF2442 /* DFGOSRExit.cpp in Sources */, 0FC09792146A6F7300CF2442 /* DFGOSRExitCompiler.cpp in Sources */, 0FC09776146943B000CF2442 /* DFGOSRExitCompiler32_64.cpp in Sources */, 0FC0977214693AF900CF2442 /* DFGOSRExitCompiler64.cpp in Sources */, + 0FEFC9AA1681A3B300567F53 /* DFGOSRExitJumpPlaceholder.cpp in Sources */, + 0FFFC95B14EF90AD00C72532 /* DFGPhase.cpp in Sources */, + 0FBE0F7416C1DB090082C5E8 /* DFGPredictionInjectionPhase.cpp in Sources */, + 0FFFC95D14EF90B300C72532 /* DFGPredictionPropagationPhase.cpp in Sources */, 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */, 86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */, 86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */, 86880F4D14353B2100B08D42 /* DFGSpeculativeJIT64.cpp in Sources */, 0FC097A1146B28CA00CF2442 /* DFGThunks.cpp in Sources */, + 0F63944015C75F1D006A597C /* DFGTypeCheckHoistingPhase.cpp in Sources */, + 0FBE0F7616C1DB0F0082C5E8 /* DFGUnificationPhase.cpp in Sources */, + 0F34B14916D42010001CDA5A /* DFGUseKind.cpp in Sources */, + 0F3B3A2B15475000003ED0FF /* DFGValidate.cpp in Sources */, + 0F2BDC4F15228BF300CD8910 /* DFGValueSource.cpp in Sources */, + 0FDDBFB51666EED800C55FEF /* DFGVariableAccessDataDump.cpp in Sources */, + 0F2BDC5115228FFD00CD8910 /* DFGVariableEvent.cpp in Sources */, + 0F2BDC4A1522809A00CD8910 /* DFGVariableEventStream.cpp in Sources */, + 0FFFC95F14EF90BB00C72532 /* DFGVirtualRegisterAllocationPhase.cpp in Sources */, + 0F9D3370165DBB90005AD387 /* Disassembler.cpp in Sources */, 147F39C7107EC37600427A48 /* Error.cpp in Sources */, 147F39C8107EC37600427A48 /* ErrorConstructor.cpp in Sources */, 147F39C9107EC37600427A48 /* ErrorInstance.cpp in Sources */, @@ -3453,13 +3916,26 @@ 86CA032E1038E8440028A609 /* Executable.cpp in Sources */, A7B48F490EE8936F00DCBDB6 /* ExecutableAllocator.cpp in Sources */, 86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */, + 0F56A1D515001CF4002992B1 /* ExecutionCounter.cpp in Sources */, + 0FB105851675480F00F8AB6E /* ExitKind.cpp in Sources */, 147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */, + 0FF0F19F16B72A17005DF95B /* FunctionExecutableDump.cpp in Sources */, 147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */, + C2D58C3415912FEE0021A844 /* GCActivityCallback.cpp in Sources */, + 0F766D2F15A8DCE0008F363E /* GCAwareJITStubRoutine.cpp in Sources */, + C2239D1A16262BDD005AC5FD /* GCThread.cpp in Sources */, + C21122E115DD9AB300790E3A /* GCThreadSharedData.cpp in Sources */, + 0F93329F14CA7DCA0085F3C6 /* GetByIdStatus.cpp in Sources */, 14280855107EC0E70013E7B2 /* GetterSetter.cpp in Sources */, 142E3135134FF0A600AFADB5 /* HandleSet.cpp in Sources */, 142E3137134FF0A600AFADB5 /* HandleStack.cpp in Sources */, 14BA7A9713AADFF8005B7C2C /* Heap.cpp in Sources */, + C24D31E2161CD695002AA4DB /* HeapStatistics.cpp in Sources */, + C2E526BD1590EF000054E48D /* HeapTimer.cpp in Sources */, + 0F4680D414BBD24900BFE272 /* HostCallReturnValue.cpp in Sources */, 147F39CE107EC37600427A48 /* Identifier.cpp in Sources */, + C25F8BCD157544A900245B71 /* IncrementalSweeper.cpp in Sources */, + 0F13E04E16164A1F00DC8DE7 /* IndexingType.cpp in Sources */, E178636D0D9BEEC300D74E75 /* InitializeThreading.cpp in Sources */, 147F39CF107EC37600427A48 /* InternalFunction.cpp in Sources */, 1429D7D40ED2128200B89619 /* Interpreter.cpp in Sources */, @@ -3468,13 +3944,21 @@ A75706DE118A2BCF0057F88F /* JITArithmetic32_64.cpp in Sources */, 86CC85A30EE79B7400288682 /* JITCall.cpp in Sources */, 146FE51211A710430087AE66 /* JITCall32_64.cpp in Sources */, + 0F8F94441667635400D61971 /* JITCode.cpp in Sources */, + 0FAF7EFD165BA91B000C8455 /* JITDisassembler.cpp in Sources */, + 0F46808314BA573100BFE272 /* JITExceptions.cpp in Sources */, BCDD51EB0FB8DF74004A8BDC /* JITOpcodes.cpp in Sources */, A71236E51195F33C00BD2174 /* JITOpcodes32_64.cpp in Sources */, 86CC85C40EE7A89400288682 /* JITPropertyAccess.cpp in Sources */, A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */, + 0F766D2815A8CC1E008F363E /* JITStubRoutine.cpp in Sources */, + 0F766D2B15A8CC38008F363E /* JITStubRoutineSet.cpp in Sources */, 14A23D750F4E1ABB0023CDAD /* JITStubs.cpp in Sources */, + A72028B61797601E0098028C /* JSCTestRunnerUtils.cpp in Sources */, + 0F5EF91E16878F7A003E5C25 /* JITThunks.cpp in Sources */, 140B7D1D0DC69AF7009C42B8 /* JSActivation.cpp in Sources */, 140566C4107EC255005DBC8D /* JSAPIValueWrapper.cpp in Sources */, + C2CF39C116E15A8100DD69BE /* JSAPIWrapperObject.mm in Sources */, 147F39D0107EC37600427A48 /* JSArray.cpp in Sources */, 1421359B0A677F4F00A8195E /* JSBase.cpp in Sources */, 86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */, @@ -3482,42 +3966,69 @@ 1440F8920A508B100005F061 /* JSCallbackFunction.cpp in Sources */, 14ABDF600A437FEF00ECCA01 /* JSCallbackObject.cpp in Sources */, 147F39D1107EC37600427A48 /* JSCell.cpp in Sources */, + 147F39D6107EC37600427A48 /* JSCJSValue.cpp in Sources */, 1440FCE40A51E46B0005F061 /* JSClassRef.cpp in Sources */, + 86E3C616167BABEE006D760A /* JSContext.mm in Sources */, 14BD5A300A3E91F600BAF59C /* JSContextRef.cpp in Sources */, 978801401471AD920041B016 /* JSDateMath.cpp in Sources */, 140566D6107EC271005DBC8D /* JSFunction.cpp in Sources */, - E18E3A590DF9278C00D90B34 /* JSGlobalData.cpp in Sources */, 147F39D2107EC37600427A48 /* JSGlobalObject.cpp in Sources */, 14E9D17B107EC469004DDA21 /* JSGlobalObjectFunctions.cpp in Sources */, 14280875107EC13E0013E7B2 /* JSLock.cpp in Sources */, + C25D709B16DE99F400FCA6BC /* JSManagedValue.mm in Sources */, + 14874AE315EBDE4A002E3587 /* JSNameScope.cpp in Sources */, A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */, 147F39D4107EC37600427A48 /* JSObject.cpp in Sources */, 1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */, A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */, 95F6E6950E5B5F970091E860 /* JSProfilerPrivate.cpp in Sources */, A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */, + 862553D116136DA9009F17D0 /* JSProxy.cpp in Sources */, + 14874AE515EBDE4A002E3587 /* JSScope.cpp in Sources */, + A7C0C4AD1681067E0017011D /* JSScriptRef.cpp in Sources */, + 0F919D10157F3329004A4E7D /* JSSegmentedVariableObject.cpp in Sources */, 1428083A107EC0750013E7B2 /* JSStack.cpp in Sources */, 147F39D5107EC37600427A48 /* JSString.cpp in Sources */, 2600B5A6152BAAA70091EE5F /* JSStringJoiner.cpp in Sources */, 1482B74E0A43032800517CFC /* JSStringRef.cpp in Sources */, 146AAB380B66A94400E55F16 /* JSStringRefCF.cpp in Sources */, - 147F39D6107EC37600427A48 /* JSValue.cpp in Sources */, + 0F919D0C157EE09F004A4E7D /* JSSymbolTableObject.cpp in Sources */, + 86E3C61A167BABEE006D760A /* JSValue.mm in Sources */, 14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */, 147F39D7107EC37600427A48 /* JSVariableObject.cpp in Sources */, + 86E3C61C167BABEE006D760A /* JSVirtualMachine.mm in Sources */, A7482B9411671147003B0712 /* JSWeakObjectMapRefPrivate.cpp in Sources */, + 1442566115EDE98D0066A49B /* JSWithScope.cpp in Sources */, + 86E3C618167BABEE006D760A /* JSWrapperMap.mm in Sources */, 14280870107EC1340013E7B2 /* JSWrapperObject.cpp in Sources */, + 0F766D3415AE2538008F363E /* JumpReplacementWatchpoint.cpp in Sources */, BCFD8C920EEB2EE700283848 /* JumpTable.cpp in Sources */, + 0FB5467914F5C46B002C2989 /* LazyOperandValueProfile.cpp in Sources */, + 95AB83420DA4322500BC83F3 /* LegacyProfiler.cpp in Sources */, 148F21B0107EC5410042EC2C /* Lexer.cpp in Sources */, + 0FF4275715914A20004CB9FF /* LinkBuffer.cpp in Sources */, A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */, + FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */, + 0F4680D214BBD16500BFE272 /* LLIntData.cpp in Sources */, + 0F0B839A14BCF45D00885B4F /* LLIntEntrypoints.cpp in Sources */, + 0F4680A814BA7FAB00BFE272 /* LLIntExceptions.cpp in Sources */, + 0F4680A414BA7F8D00BFE272 /* LLIntSlowPaths.cpp in Sources */, + 0F0B839C14BCF46300885B4F /* LLIntThunks.cpp in Sources */, 14469DDE107EC7E700650446 /* Lookup.cpp in Sources */, + 0F4680CC14BBB17A00BFE272 /* LowLevelInterpreter.cpp in Sources */, 14B723B212D7DA46003BD5ED /* MachineStackMarker.cpp in Sources */, + 0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */, 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */, - 86AE64A8135E5E1C00963012 /* MacroAssemblerSH4.cpp in Sources */, + C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */, 142D6F0813539A2800B02E86 /* MarkedBlock.cpp in Sources */, 14D2F3DA139F4BE200491031 /* MarkedSpace.cpp in Sources */, 142D6F1113539A4100B02E86 /* MarkStack.cpp in Sources */, 14469DDF107EC7E700650446 /* MathObject.cpp in Sources */, 90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */, + 0FB5467D14F5CFD6002C2989 /* MethodOfGettingAValueProfile.cpp in Sources */, + 86EBF2FF1560F06A008E9222 /* NameConstructor.cpp in Sources */, + 86EBF3011560F06A008E9222 /* NameInstance.cpp in Sources */, + 86EBF3031560F06A008E9222 /* NamePrototype.cpp in Sources */, 14469DE0107EC7E700650446 /* NativeErrorConstructor.cpp in Sources */, 14469DE1107EC7E700650446 /* NativeErrorPrototype.cpp in Sources */, 148F21B7107EC5470042EC2C /* Nodes.cpp in Sources */, @@ -3525,6 +4036,7 @@ 14469DE2107EC7E700650446 /* NumberConstructor.cpp in Sources */, 14469DE3107EC7E700650446 /* NumberObject.cpp in Sources */, 14469DE4107EC7E700650446 /* NumberPrototype.cpp in Sources */, + 86F3EEBE168CDE930077B92A /* ObjCCallbackFunction.mm in Sources */, 14469DE5107EC7E700650446 /* ObjectConstructor.cpp in Sources */, 14469DE6107EC7E700650446 /* ObjectPrototype.cpp in Sources */, E124A8F80E555775003091F1 /* OpaqueJSString.cpp in Sources */, @@ -3533,23 +4045,47 @@ 0FE228EE1436AB2C00196C48 /* Options.cpp in Sources */, 148F21BC107EC54D0042EC2C /* Parser.cpp in Sources */, 93052C340FB792190048FDC3 /* ParserArena.cpp in Sources */, - 0FD82E86141F3FF100179C94 /* SpeculatedType.cpp in Sources */, + 0F9FC8C314E1B5FE00D52AE0 /* PolymorphicPutByIdList.cpp in Sources */, + 0F98206016BFE38100240D02 /* PreciseJumpTargets.cpp in Sources */, 95742F650DD11F5A000917FB /* Profile.cpp in Sources */, 95CD45760E1C4FDD0085358E /* ProfileGenerator.cpp in Sources */, 95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */, - 95AB83420DA4322500BC83F3 /* Profiler.cpp in Sources */, + 0FF729AD166AD35C000F5BA3 /* ProfilerBytecode.cpp in Sources */, + 0FF729AE166AD35C000F5BA3 /* ProfilerBytecodes.cpp in Sources */, + 0F13912916771C33009CCB07 /* ProfilerBytecodeSequence.cpp in Sources */, + 0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */, + 0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */, + 0FF729B1166AD35C000F5BA3 /* ProfilerCompiledBytecode.cpp in Sources */, + 0FF729B2166AD35C000F5BA3 /* ProfilerDatabase.cpp in Sources */, + 0FF729B3166AD35C000F5BA3 /* ProfilerOrigin.cpp in Sources */, + 0FF729B4166AD35C000F5BA3 /* ProfilerOriginStack.cpp in Sources */, + 0FB1058B1675483100F8AB6E /* ProfilerOSRExit.cpp in Sources */, + 0FB1058D1675483700F8AB6E /* ProfilerOSRExitSite.cpp in Sources */, + 0F13912B16771C3A009CCB07 /* ProfilerProfiledBytecodes.cpp in Sources */, A7FB60A4103F7DC20017A286 /* PropertyDescriptor.cpp in Sources */, 14469DE7107EC7E700650446 /* PropertyNameArray.cpp in Sources */, 14469DE8107EC7E700650446 /* PropertySlot.cpp in Sources */, + ADE39FFF16DD144B0003CD4A /* PropertyTable.cpp in Sources */, + 1474C33C16AA2D9B0062F01D /* PrototypeMap.cpp in Sources */, + 0F9332A314CA7DD70085F3C6 /* PutByIdStatus.cpp in Sources */, + 0FF60AC316740F8800029779 /* ReduceWhitespace.cpp in Sources */, 14280841107EC0930013E7B2 /* RegExp.cpp in Sources */, A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */, + 8642C510151C06A90046D4EF /* RegExpCachedResult.cpp in Sources */, 14280842107EC0930013E7B2 /* RegExpConstructor.cpp in Sources */, + 8642C512151C083D0046D4EF /* RegExpMatchesArray.cpp in Sources */, 14280843107EC0930013E7B2 /* RegExpObject.cpp in Sources */, 14280844107EC0930013E7B2 /* RegExpPrototype.cpp in Sources */, + 0FF42771159275D5004CB9FF /* ResolveGlobalStatus.cpp in Sources */, 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */, 1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */, + C225494315F7DBAA0065E898 /* SlotVisitor.cpp in Sources */, 9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */, + 0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */, E49DC16B12EF293E00184A1F /* SourceProviderCache.cpp in Sources */, + 0F0CD4C415F6B6BB0032F1C0 /* SparseArrayValueMap.cpp in Sources */, + 0F5541B11613C1FB00CE3E25 /* SpecialPointer.cpp in Sources */, + 0FD82E86141F3FF100179C94 /* SpeculatedType.cpp in Sources */, A730B6131250068F009D25B1 /* StrictEvalActivation.cpp in Sources */, 14469DEB107EC7E700650446 /* StringConstructor.cpp in Sources */, 14469DEC107EC7E700650446 /* StringObject.cpp in Sources */, @@ -3557,114 +4093,37 @@ 9335F24D12E6765B002B5553 /* StringRecursionChecker.cpp in Sources */, BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */, 7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */, + C2F0F2D116BAEEE900187C19 /* StructureRareData.cpp in Sources */, + 0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */, BCCF0D0C0EF0B8A500413C8F /* StructureStubInfo.cpp in Sources */, - A7386555118697B400540279 /* ThunkGenerators.cpp in Sources */, - 14A42E3F0F4F60EE00599099 /* TimeoutChecker.cpp in Sources */, - 0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */, - 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */, - 86704B8412DBA33700A9FE7B /* YarrInterpreter.cpp in Sources */, - 86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */, - 86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */, - 86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */, - 0F4680A414BA7F8D00BFE272 /* LLIntSlowPaths.cpp in Sources */, - 0F4680A814BA7FAB00BFE272 /* LLIntExceptions.cpp in Sources */, - 0F46808314BA573100BFE272 /* JITExceptions.cpp in Sources */, - 0F4680CC14BBB17A00BFE272 /* LowLevelInterpreter.cpp in Sources */, - 0F4680D214BBD16500BFE272 /* LLIntData.cpp in Sources */, - 0F4680D414BBD24900BFE272 /* HostCallReturnValue.cpp in Sources */, - 0F0B839A14BCF45D00885B4F /* LLIntEntrypoints.cpp in Sources */, - 0F0B839C14BCF46300885B4F /* LLIntThunks.cpp in Sources */, - 0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */, - 0F93329D14CA7DC30085F3C6 /* CallLinkStatus.cpp in Sources */, - 0F93329F14CA7DCA0085F3C6 /* GetByIdStatus.cpp in Sources */, - 0F9332A314CA7DD70085F3C6 /* PutByIdStatus.cpp in Sources */, - 0F55F0F414D1063900AC7649 /* AbstractPC.cpp in Sources */, - 86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */, - 86B5826914D2797000A9C306 /* CodeProfiling.cpp in Sources */, - C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */, - 0F9FC8C314E1B5FE00D52AE0 /* PolymorphicPutByIdList.cpp in Sources */, - 14E84F9E14EE1ACC00D6D5D4 /* WeakBlock.cpp in Sources */, - 14E84FA014EE1ACC00D6D5D4 /* WeakSet.cpp in Sources */, - 14F7256514EE265E00B1652B /* WeakHandleOwner.cpp in Sources */, - 0FFFC95714EF90A000C72532 /* DFGCFAPhase.cpp in Sources */, - 0FFFC95914EF90A600C72532 /* DFGCSEPhase.cpp in Sources */, - 0FFFC95B14EF90AD00C72532 /* DFGPhase.cpp in Sources */, - 0FFFC95D14EF90B300C72532 /* DFGPredictionPropagationPhase.cpp in Sources */, - 0FFFC95F14EF90BB00C72532 /* DFGVirtualRegisterAllocationPhase.cpp in Sources */, - 0FB5467914F5C46B002C2989 /* LazyOperandValueProfile.cpp in Sources */, - 0FB5467D14F5CFD6002C2989 /* MethodOfGettingAValueProfile.cpp in Sources */, - 0F56A1D515001CF4002992B1 /* ExecutionCounter.cpp in Sources */, - 0FA581BA150E952C00B9A2D9 /* DFGNodeFlags.cpp in Sources */, - 0F2BDC15151C5D4D00CD8910 /* DFGFixupPhase.cpp in Sources */, - 8642C510151C06A90046D4EF /* RegExpCachedResult.cpp in Sources */, - 8642C512151C083D0046D4EF /* RegExpMatchesArray.cpp in Sources */, - 863C6D9C1521111A00585E4E /* YarrCanonicalizeUCS2.cpp in Sources */, - 0F2BDC4A1522809A00CD8910 /* DFGVariableEventStream.cpp in Sources */, - 0F2BDC4D1522818600CD8910 /* DFGMinifiedNode.cpp in Sources */, - 0F2BDC4F15228BF300CD8910 /* DFGValueSource.cpp in Sources */, - 0F2BDC5115228FFD00CD8910 /* DFGVariableEvent.cpp in Sources */, - 14816E1B154CC56C00B8054C /* BlockAllocator.cpp in Sources */, - 86EBF2FF1560F06A008E9222 /* NameConstructor.cpp in Sources */, - 86EBF3011560F06A008E9222 /* NameInstance.cpp in Sources */, - 86EBF3031560F06A008E9222 /* NamePrototype.cpp in Sources */, - 0F3B3A1A153E68F2003ED0FF /* DFGConstantFoldingPhase.cpp in Sources */, - 0F3B3A271544C995003ED0FF /* DFGCFGSimplificationPhase.cpp in Sources */, - 0F3B3A2B15475000003ED0FF /* DFGValidate.cpp in Sources */, - 0FD81AD2154FB4EE00983E72 /* DFGDominators.cpp in Sources */, - 0F16015D156198C900C2587C /* DFGArgumentsSimplificationPhase.cpp in Sources */, - C25F8BCD157544A900245B71 /* IncrementalSweeper.cpp in Sources */, - 0F919D0C157EE09F004A4E7D /* JSSymbolTableObject.cpp in Sources */, - 0F919D10157F3329004A4E7D /* JSSegmentedVariableObject.cpp in Sources */, - 0F919D2515853CE0004A4E7D /* Watchpoint.cpp in Sources */, + C2DF442F1707AC0100A5CA96 /* SuperRegion.cpp in Sources */, 0F919D2815856773004A4E7D /* SymbolTable.cpp in Sources */, - 0FF42732158EBD58004CB9FF /* UDis86Disassembler.cpp in Sources */, + A7386555118697B400540279 /* ThunkGenerators.cpp in Sources */, + 0FF4274A158EBE91004CB9FF /* udis86.c in Sources */, 0FF42740158EBE8B004CB9FF /* udis86_decode.c in Sources */, 0FF42743158EBE91004CB9FF /* udis86_input.c in Sources */, + 0FF4274D158EBFE6004CB9FF /* udis86_itab_holder.c in Sources */, 0FF42745158EBE91004CB9FF /* udis86_syn-att.c in Sources */, 0FF42746158EBE91004CB9FF /* udis86_syn-intel.c in Sources */, 0FF42747158EBE91004CB9FF /* udis86_syn.c in Sources */, - 0FF4274A158EBE91004CB9FF /* udis86.c in Sources */, - 0FF4274D158EBFE6004CB9FF /* udis86_itab_holder.c in Sources */, - C2E526BD1590EF000054E48D /* HeapTimer.cpp in Sources */, - 0FF4275715914A20004CB9FF /* LinkBuffer.cpp in Sources */, - C2D58C3415912FEE0021A844 /* GCActivityCallback.cpp in Sources */, - 0FF427641591A1CC004CB9FF /* DFGDisassembler.cpp in Sources */, - 0FF42771159275D5004CB9FF /* ResolveGlobalStatus.cpp in Sources */, - 0F766D2815A8CC1E008F363E /* JITStubRoutine.cpp in Sources */, - 0F766D2B15A8CC38008F363E /* JITStubRoutineSet.cpp in Sources */, - 0F766D2F15A8DCE0008F363E /* GCAwareJITStubRoutine.cpp in Sources */, - 0F766D3415AE2538008F363E /* JumpReplacementWatchpoint.cpp in Sources */, - 0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */, - FE4A331F15BD2E07006F54F3 /* VMInspector.cpp in Sources */, - 0F63944015C75F1D006A597C /* DFGStructureCheckHoistingPhase.cpp in Sources */, - 0F63945415D07055006A597C /* ArrayProfile.cpp in Sources */, - 0F63948415E48118006A597C /* DFGArrayMode.cpp in Sources */, - C21122E115DD9AB300790E3A /* GCThreadSharedData.cpp in Sources */, - 14874AE315EBDE4A002E3587 /* JSNameScope.cpp in Sources */, - 14874AE515EBDE4A002E3587 /* JSScope.cpp in Sources */, - 1442566115EDE98D0066A49B /* JSWithScope.cpp in Sources */, - 0F0CD4C415F6B6BB0032F1C0 /* SparseArrayValueMap.cpp in Sources */, - FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */, - C225494315F7DBAA0065E898 /* SlotVisitor.cpp in Sources */, - 862553D116136DA9009F17D0 /* JSProxy.cpp in Sources */, - 0F13E04E16164A1F00DC8DE7 /* IndexingType.cpp in Sources */, - 0F5541B11613C1FB00CE3E25 /* SpecialPointer.cpp in Sources */, - 0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */, - C24D31E2161CD695002AA4DB /* HeapStatistics.cpp in Sources */, - C2239D1716262BDD005AC5FD /* CopyVisitor.cpp in Sources */, - C2239D1A16262BDD005AC5FD /* GCThread.cpp in Sources */, - 0F8335B71639C1E6001443B5 /* ArrayAllocationProfile.cpp in Sources */, + 0FF42732158EBD58004CB9FF /* UDis86Disassembler.cpp in Sources */, A76F279415F13C9600517D67 /* UnlinkedCodeBlock.cpp in Sources */, - A77F1821164088B200640A47 /* CodeCache.cpp in Sources */, - 0FAF7EFD165BA91B000C8455 /* JITDisassembler.cpp in Sources */, - 0F73D7AE165A142D00ACAB71 /* ClosureCallStubRoutine.cpp in Sources */, - 0F9D3370165DBB90005AD387 /* Disassembler.cpp in Sources */, - 0FDDBFB51666EED800C55FEF /* DFGVariableAccessDataDump.cpp in Sources */, - 0F8F943C1667631300D61971 /* CodeSpecializationKind.cpp in Sources */, - 0F8F94401667633000D61971 /* CodeBlockHash.cpp in Sources */, - 0F8F94421667633500D61971 /* CodeType.cpp in Sources */, - 0F8F94441667635400D61971 /* JITCode.cpp in Sources */, - 0F8F9446166764F100D61971 /* CodeOrigin.cpp in Sources */, + E18E3A590DF9278C00D90B34 /* VM.cpp in Sources */, + FE4A331F15BD2E07006F54F3 /* VMInspector.cpp in Sources */, + 0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */, + FED94F2E171E3E2300BE77A4 /* Watchdog.cpp in Sources */, + FED94F30171E3E2300BE77A4 /* WatchdogMac.cpp in Sources */, + 0F919D2515853CE0004A4E7D /* Watchpoint.cpp in Sources */, + 1ACF7377171CA6FB00C9BB1E /* Weak.cpp in Sources */, + 14E84F9E14EE1ACC00D6D5D4 /* WeakBlock.cpp in Sources */, + 14F7256514EE265E00B1652B /* WeakHandleOwner.cpp in Sources */, + 14E84FA014EE1ACC00D6D5D4 /* WeakSet.cpp in Sources */, + 0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */, + 863C6D9C1521111A00585E4E /* YarrCanonicalizeUCS2.cpp in Sources */, + 86704B8412DBA33700A9FE7B /* YarrInterpreter.cpp in Sources */, + 86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */, + 86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */, + 86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/JavaScriptCore/KeywordLookupGenerator.py b/Source/JavaScriptCore/KeywordLookupGenerator.py index 748acf9dc..e5c3b2d68 100644 --- a/Source/JavaScriptCore/KeywordLookupGenerator.py +++ b/Source/JavaScriptCore/KeywordLookupGenerator.py @@ -68,11 +68,16 @@ def allWhitespace(str): def parseKeywords(keywordsText): + + if sys.platform == "cygwin": + keywordsText = keywordsText.replace("\r\n", "\n") + lines = keywordsText.split("\n") lines = [line.split("#")[0] for line in lines] lines = [line for line in lines if (not allWhitespace(line))] name = lines[0].split() terminator = lines[-1] + if not name[0] == "@begin": raise Exception("expected description beginning with @begin") if not terminator == "@end": @@ -139,7 +144,7 @@ class Trie: print(str + "if (!isIdentPart(code[%d])) {" % (len(self.fullPrefix))) print(str + " internalShift<%d>();" % len(self.fullPrefix)) print(str + " if (shouldCreateIdentifier)") - print(str + (" data->ident = &m_globalData->propertyNames->%sKeyword;" % self.fullPrefix)) + print(str + (" data->ident = &m_vm->propertyNames->%sKeyword;" % self.fullPrefix)) print(str + " return " + self.value + ";") print(str + "}") rootIndex = len(self.fullPrefix) diff --git a/Source/JavaScriptCore/LLIntOffsetsExtractor.pro b/Source/JavaScriptCore/LLIntOffsetsExtractor.pro index d119bbf08..37d6f1962 100644 --- a/Source/JavaScriptCore/LLIntOffsetsExtractor.pro +++ b/Source/JavaScriptCore/LLIntOffsetsExtractor.pro @@ -34,7 +34,7 @@ LLINT_DEPENDENCY = \ $$PWD/llint/LowLevelInterpreter.asm \ $$PWD/llint/LowLevelInterpreter32_64.asm \ $$PWD/llint/LowLevelInterpreter64.asm \ - $$PWD/offlineasm/armv7.rb \ + $$PWD/offlineasm/arm.rb \ $$PWD/offlineasm/ast.rb \ $$PWD/offlineasm/backends.rb \ $$PWD/offlineasm/generate_offset_extractor.rb \ @@ -45,6 +45,7 @@ LLINT_DEPENDENCY = \ $$PWD/offlineasm/registers.rb \ $$PWD/offlineasm/self_hash.rb \ $$PWD/offlineasm/settings.rb \ + $$PWD/offlineasm/sh4.rb \ $$PWD/offlineasm/transform.rb \ $$PWD/offlineasm/x86.rb diff --git a/Source/JavaScriptCore/PlatformBlackBerry.cmake b/Source/JavaScriptCore/PlatformBlackBerry.cmake index f9352cd4f..15e45f28a 100644 --- a/Source/JavaScriptCore/PlatformBlackBerry.cmake +++ b/Source/JavaScriptCore/PlatformBlackBerry.cmake @@ -1,14 +1,9 @@ -LIST(INSERT JavaScriptCore_INCLUDE_DIRECTORIES 0 - "${BLACKBERRY_THIRD_PARTY_DIR}/icu" -) - -LIST(REMOVE_ITEM JavaScriptCore_SOURCES +list(REMOVE_ITEM JavaScriptCore_SOURCES runtime/GCActivityCallback.cpp ) -LIST(APPEND JavaScriptCore_SOURCES +list(APPEND JavaScriptCore_SOURCES runtime/GCActivityCallbackBlackBerry.cpp - runtime/MemoryStatistics.cpp ) -INSTALL(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf) +install(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf) diff --git a/Source/JavaScriptCore/PlatformEfl.cmake b/Source/JavaScriptCore/PlatformEfl.cmake index 3b4115514..0a3688078 100644 --- a/Source/JavaScriptCore/PlatformEfl.cmake +++ b/Source/JavaScriptCore/PlatformEfl.cmake @@ -1,20 +1,4 @@ -LIST(APPEND JavaScriptCore_SOURCES - jit/ExecutableAllocatorFixedVMPool.cpp - jit/ExecutableAllocator.cpp - - runtime/MemoryStatistics.cpp +list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES + ${ECORE_INCLUDE_DIRS} + ${EINA_INCLUDE_DIRS} ) - -LIST(APPEND JavaScriptCore_LIBRARIES - ${ICU_I18N_LIBRARIES} -) - -LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES - ${ICU_INCLUDE_DIRS} -) - -IF (ENABLE_GLIB_SUPPORT) - LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES - ${JAVASCRIPTCORE_DIR}/wtf/gobject - ) -ENDIF () diff --git a/Source/JavaScriptCore/PlatformWinCE.cmake b/Source/JavaScriptCore/PlatformWinCE.cmake deleted file mode 100644 index e1a43ff93..000000000 --- a/Source/JavaScriptCore/PlatformWinCE.cmake +++ /dev/null @@ -1,20 +0,0 @@ -LIST(APPEND JavaScriptCore_SOURCES - jit/ExecutableAllocator.cpp -) - -IF (ENABLE_JIT AND WTF_CPU_ARM) - ADD_CUSTOM_COMMAND( - OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm - MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_jit_stubs - DEPENDS ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp - COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_jit_stubs --prefix=MSVC ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp > ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm - VERBATIM) - - ADD_CUSTOM_COMMAND( - OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj - MAIN_DEPENDENCY ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm - COMMAND armasm -nologo ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj - VERBATIM) - - LIST (APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj) -ENDIF () diff --git a/Source/JavaScriptCore/Target.pri b/Source/JavaScriptCore/Target.pri index 0f2659ec9..12fd19ca6 100644 --- a/Source/JavaScriptCore/Target.pri +++ b/Source/JavaScriptCore/Target.pri @@ -40,7 +40,9 @@ SOURCES += \ API/JSClassRef.cpp \ API/JSContextRef.cpp \ API/JSObjectRef.cpp \ + API/JSScriptRef.cpp \ API/JSStringRef.cpp \ + API/JSStringRefQt.cpp \ API/JSValueRef.cpp \ API/JSWeakObjectMapRefPrivate.cpp \ API/OpaqueJSString.cpp \ @@ -49,7 +51,6 @@ SOURCES += \ assembler/LinkBuffer.cpp \ assembler/MacroAssembler.cpp \ assembler/MacroAssemblerARM.cpp \ - assembler/MacroAssemblerSH4.cpp \ bytecode/ArrayAllocationProfile.cpp \ bytecode/ArrayProfile.cpp \ bytecode/CallLinkInfo.cpp \ @@ -60,13 +61,16 @@ SOURCES += \ bytecode/CodeType.cpp \ bytecode/DFGExitProfile.cpp \ bytecode/ExecutionCounter.cpp \ + bytecode/ExitKind.cpp \ bytecode/GetByIdStatus.cpp \ bytecode/JumpTable.cpp \ bytecode/LazyOperandValueProfile.cpp \ bytecode/MethodOfGettingAValueProfile.cpp \ bytecode/Opcode.cpp \ bytecode/PolymorphicPutByIdList.cpp \ + bytecode/PreciseJumpTargets.cpp \ bytecode/PutByIdStatus.cpp \ + bytecode/ReduceWhitespace.cpp \ bytecode/ResolveGlobalStatus.cpp \ bytecode/SamplingTool.cpp \ bytecode/SpecialPointer.cpp \ @@ -81,9 +85,10 @@ SOURCES += \ heap/CopyVisitor.cpp \ heap/ConservativeRoots.cpp \ heap/DFGCodeBlocks.cpp \ - heap/WeakSet.cpp \ - heap/WeakHandleOwner.cpp \ + heap/Weak.cpp \ heap/WeakBlock.cpp \ + heap/WeakHandleOwner.cpp \ + heap/WeakSet.cpp \ heap/HandleSet.cpp \ heap/HandleStack.cpp \ heap/BlockAllocator.cpp \ @@ -100,6 +105,7 @@ SOURCES += \ heap/MarkedBlock.cpp \ heap/MarkedSpace.cpp \ heap/SlotVisitor.cpp \ + heap/SuperRegion.cpp \ heap/VTableSpectrum.cpp \ heap/WriteBarrierSupport.cpp \ debugger/DebuggerActivation.cpp \ @@ -109,20 +115,26 @@ SOURCES += \ dfg/DFGArgumentsSimplificationPhase.cpp \ dfg/DFGArrayMode.cpp \ dfg/DFGAssemblyHelpers.cpp \ + dfg/DFGBackwardsPropagationPhase.cpp \ dfg/DFGByteCodeParser.cpp \ dfg/DFGCapabilities.cpp \ + dfg/DFGCommon.cpp \ dfg/DFGCFAPhase.cpp \ dfg/DFGCFGSimplificationPhase.cpp \ + dfg/DFGCPSRethreadingPhase.cpp \ dfg/DFGConstantFoldingPhase.cpp \ - dfg/DFGCorrectableJumpPoint.cpp \ dfg/DFGCSEPhase.cpp \ + dfg/DFGDCEPhase.cpp \ dfg/DFGDisassembler.cpp \ dfg/DFGDominators.cpp \ dfg/DFGDriver.cpp \ + dfg/DFGEdge.cpp \ dfg/DFGFixupPhase.cpp \ dfg/DFGGraph.cpp \ dfg/DFGJITCompiler.cpp \ + dfg/DFGLongLivedState.cpp \ dfg/DFGMinifiedNode.cpp \ + dfg/DFGNode.cpp \ dfg/DFGNodeFlags.cpp \ dfg/DFGOperations.cpp \ dfg/DFGOSREntry.cpp \ @@ -130,14 +142,18 @@ SOURCES += \ dfg/DFGOSRExitCompiler.cpp \ dfg/DFGOSRExitCompiler64.cpp \ dfg/DFGOSRExitCompiler32_64.cpp \ + dfg/DFGOSRExitJumpPlaceholder.cpp \ dfg/DFGPhase.cpp \ dfg/DFGPredictionPropagationPhase.cpp \ + dfg/DFGPredictionInjectionPhase.cpp \ dfg/DFGRepatch.cpp \ dfg/DFGSpeculativeJIT.cpp \ dfg/DFGSpeculativeJIT32_64.cpp \ dfg/DFGSpeculativeJIT64.cpp \ - dfg/DFGStructureCheckHoistingPhase.cpp \ + dfg/DFGTypeCheckHoistingPhase.cpp \ dfg/DFGThunks.cpp \ + dfg/DFGUnificationPhase.cpp \ + dfg/DFGUseKind.cpp \ dfg/DFGValueSource.cpp \ dfg/DFGVariableAccessDataDump.cpp \ dfg/DFGVariableEvent.cpp \ @@ -168,6 +184,7 @@ SOURCES += \ jit/JITPropertyAccess32_64.cpp \ jit/JITStubRoutine.cpp \ jit/JITStubs.cpp \ + jit/JITThunks.cpp \ jit/JumpReplacementWatchpoint.cpp \ jit/ThunkGenerators.cpp \ llint/LLIntCLoop.cpp \ @@ -181,11 +198,33 @@ SOURCES += \ parser/Nodes.cpp \ parser/ParserArena.cpp \ parser/Parser.cpp \ + parser/SourceProvider.cpp \ parser/SourceProviderCache.cpp \ + profiler/ProfilerBytecode.cpp \ + profiler/ProfilerBytecode.h \ + profiler/ProfilerBytecodeSequence.cpp \ + profiler/ProfilerBytecodes.cpp \ + profiler/ProfilerBytecodes.h \ + profiler/ProfilerCompilation.cpp \ + profiler/ProfilerCompilation.h \ + profiler/ProfilerCompilationKind.cpp \ + profiler/ProfilerCompilationKind.h \ + profiler/ProfilerCompiledBytecode.cpp \ + profiler/ProfilerCompiledBytecode.h \ + profiler/ProfilerDatabase.cpp \ + profiler/ProfilerDatabase.h \ + profiler/ProfilerExecutionCounter.h \ + profiler/ProfilerOrigin.cpp \ + profiler/ProfilerOrigin.h \ + profiler/ProfilerOriginStack.cpp \ + profiler/ProfilerOriginStack.h \ + profiler/ProfilerOSRExit.cpp \ + profiler/ProfilerOSRExitSite.cpp \ + profiler/ProfilerProfiledBytecodes.cpp \ profiler/Profile.cpp \ profiler/ProfileGenerator.cpp \ profiler/ProfileNode.cpp \ - profiler/Profiler.cpp \ + profiler/LegacyProfiler.cpp \ runtime/ArgList.cpp \ runtime/Arguments.cpp \ runtime/ArrayConstructor.cpp \ @@ -210,6 +249,7 @@ SOURCES += \ runtime/ExceptionHelpers.cpp \ runtime/Executable.cpp \ runtime/FunctionConstructor.cpp \ + runtime/FunctionExecutableDump.cpp \ runtime/FunctionPrototype.cpp \ runtime/GCActivityCallback.cpp \ runtime/GetterSetter.cpp \ @@ -225,7 +265,7 @@ SOURCES += \ runtime/JSDateMath.cpp \ runtime/JSFunction.cpp \ runtime/JSBoundFunction.cpp \ - runtime/JSGlobalData.cpp \ + runtime/VM.cpp \ runtime/JSGlobalObject.cpp \ runtime/JSGlobalObjectFunctions.cpp \ runtime/JSProxy.cpp \ @@ -241,7 +281,7 @@ SOURCES += \ runtime/JSString.cpp \ runtime/JSStringJoiner.cpp \ runtime/JSSymbolTableObject.cpp \ - runtime/JSValue.cpp \ + runtime/JSCJSValue.cpp \ runtime/JSVariableObject.cpp \ runtime/JSWrapperObject.cpp \ runtime/LiteralParser.cpp \ @@ -262,6 +302,8 @@ SOURCES += \ runtime/PropertyDescriptor.cpp \ runtime/PropertyNameArray.cpp \ runtime/PropertySlot.cpp \ + runtime/PropertyTable.cpp \ + runtime/PrototypeMap.cpp \ runtime/RegExpConstructor.cpp \ runtime/RegExpCachedResult.cpp \ runtime/RegExpMatchesArray.cpp \ @@ -279,8 +321,10 @@ SOURCES += \ runtime/StringRecursionChecker.cpp \ runtime/StructureChain.cpp \ runtime/Structure.cpp \ + runtime/StructureRareData.cpp \ runtime/SymbolTable.cpp \ - runtime/TimeoutChecker.cpp \ + runtime/Watchdog.cpp \ + runtime/WatchdogNone.cpp \ tools/CodeProfile.cpp \ tools/CodeProfiling.cpp \ yarr/YarrJIT.cpp \ @@ -310,17 +354,14 @@ win32:!win32-g++*:isEqual(QT_ARCH, "x86_64"):{ ASM_SOURCES += jit/JITStubsMSVC64.asm } +build?(qttestsupport) { + HEADERS += API/JSCTestRunnerUtils.h + SOURCES += API/JSCTestRunnerUtils.cpp +} + HEADERS += $$files(*.h, true) *sh4* { QMAKE_CXXFLAGS += -mieee -w QMAKE_CFLAGS += -mieee -w } - -lessThan(QT_GCC_MAJOR_VERSION, 5) { - # GCC 4.5 and before - lessThan(QT_GCC_MINOR_VERSION, 6) { - # Disable C++0x mode in JSC for those who enabled it in their Qt's mkspec. - *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x - } -} diff --git a/Source/JavaScriptCore/assembler/ARMAssembler.cpp b/Source/JavaScriptCore/assembler/ARMAssembler.cpp index 6912d1ea3..4f4199bf2 100644 --- a/Source/JavaScriptCore/assembler/ARMAssembler.cpp +++ b/Source/JavaScriptCore/assembler/ARMAssembler.cpp @@ -391,14 +391,14 @@ void ARMAssembler::baseIndexTransferFloat(DataTransferTypeFloat transferType, FP dataTransferFloat(transferType, srcDst, ARMRegisters::S1, offset); } -PassRefPtr ARMAssembler::executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) +PassRefPtr ARMAssembler::executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { // 64-bit alignment is required for next constant pool and JIT code as well m_buffer.flushWithoutBarrier(true); if (!m_buffer.isAligned(8)) bkpt(0); - RefPtr result = m_buffer.executableCopy(globalData, ownerUID, effort); + RefPtr result = m_buffer.executableCopy(vm, ownerUID, effort); char* data = reinterpret_cast(result->start()); for (Jumps::Iterator iter = m_jumps.begin(); iter != m_jumps.end(); ++iter) { diff --git a/Source/JavaScriptCore/assembler/ARMAssembler.h b/Source/JavaScriptCore/assembler/ARMAssembler.h index 31d316d0d..c950e47bb 100644 --- a/Source/JavaScriptCore/assembler/ARMAssembler.h +++ b/Source/JavaScriptCore/assembler/ARMAssembler.h @@ -107,21 +107,21 @@ namespace JSC { // ARM conditional constants typedef enum { - EQ = 0x00000000, // Zero - NE = 0x10000000, // Non-zero - CS = 0x20000000, - CC = 0x30000000, - MI = 0x40000000, - PL = 0x50000000, - VS = 0x60000000, - VC = 0x70000000, - HI = 0x80000000, - LS = 0x90000000, - GE = 0xa0000000, - LT = 0xb0000000, - GT = 0xc0000000, - LE = 0xd0000000, - AL = 0xe0000000 + EQ = 0x00000000, // Zero / Equal. + NE = 0x10000000, // Non-zero / Not equal. + CS = 0x20000000, // Unsigned higher or same. + CC = 0x30000000, // Unsigned lower. + MI = 0x40000000, // Negative. + PL = 0x50000000, // Positive or zero. + VS = 0x60000000, // Overflowed. + VC = 0x70000000, // Not overflowed. + HI = 0x80000000, // Unsigned higher. + LS = 0x90000000, // Unsigned lower or same. + GE = 0xa0000000, // Signed greater than or equal. + LT = 0xb0000000, // Signed less than. + GT = 0xc0000000, // Signed greater than. + LE = 0xd0000000, // Signed less than or equal. + AL = 0xe0000000 // Unconditional / Always execute. } Condition; // ARM instruction constants @@ -760,7 +760,7 @@ namespace JSC { return loadBranchTarget(ARMRegisters::pc, cc, useConstantPool); } - PassRefPtr executableCopy(JSGlobalData&, void* ownerUID, JITCompilationEffort); + PassRefPtr executableCopy(VM&, void* ownerUID, JITCompilationEffort); unsigned debugOffset() { return m_buffer.debugOffset(); } @@ -1022,29 +1022,46 @@ namespace JSC { return AL | B | (offset & BranchOffsetMask); } +#if OS(LINUX) && COMPILER(GCC) + static inline void linuxPageFlush(uintptr_t begin, uintptr_t end) + { + asm volatile( + "push {r7}\n" + "mov r0, %0\n" + "mov r1, %1\n" + "mov r7, #0xf0000\n" + "add r7, r7, #0x2\n" + "mov r2, #0x0\n" + "svc 0x0\n" + "pop {r7}\n" + : + : "r" (begin), "r" (end) + : "r0", "r1", "r2"); + } +#endif + #if OS(LINUX) && COMPILER(RVCT) static __asm void cacheFlush(void* code, size_t); #else static void cacheFlush(void* code, size_t size) { #if OS(LINUX) && COMPILER(GCC) - uintptr_t currentPage = reinterpret_cast(code) & ~(pageSize() - 1); - uintptr_t lastPage = (reinterpret_cast(code) + size) & ~(pageSize() - 1); - do { - asm volatile( - "push {r7}\n" - "mov r0, %0\n" - "mov r1, %1\n" - "mov r7, #0xf0000\n" - "add r7, r7, #0x2\n" - "mov r2, #0x0\n" - "svc 0x0\n" - "pop {r7}\n" - : - : "r" (currentPage), "r" (currentPage + pageSize()) - : "r0", "r1", "r2"); - currentPage += pageSize(); - } while (lastPage >= currentPage); + size_t page = pageSize(); + uintptr_t current = reinterpret_cast(code); + uintptr_t end = current + size; + uintptr_t firstPageEnd = (current & ~(page - 1)) + page; + + if (end <= firstPageEnd) { + linuxPageFlush(current, end); + return; + } + + linuxPageFlush(current, firstPageEnd); + + for (current = firstPageEnd; current + page < end; current += page) + linuxPageFlush(current, current + page); + + linuxPageFlush(current, end); #elif OS(WINCE) CacheRangeFlush(code, size, CACHE_SYNC_ALL); #elif OS(QNX) && ENABLE(ASSEMBLER_WX_EXCLUSIVE) diff --git a/Source/JavaScriptCore/assembler/ARMv7Assembler.h b/Source/JavaScriptCore/assembler/ARMv7Assembler.h index aa402e208..28989549d 100644 --- a/Source/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/Source/JavaScriptCore/assembler/ARMv7Assembler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009, 2010, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. * Copyright (C) 2010 University of Szeged * * Redistribution and use in source and binary forms, with or without @@ -422,21 +422,21 @@ public: // (HS, LO, HI, LS) -> (AE, B, A, BE) // (VS, VC) -> (O, NO) typedef enum { - ConditionEQ, - ConditionNE, - ConditionHS, ConditionCS = ConditionHS, - ConditionLO, ConditionCC = ConditionLO, - ConditionMI, - ConditionPL, - ConditionVS, - ConditionVC, - ConditionHI, - ConditionLS, - ConditionGE, - ConditionLT, - ConditionGT, - ConditionLE, - ConditionAL, + ConditionEQ, // Zero / Equal. + ConditionNE, // Non-zero / Not equal. + ConditionHS, ConditionCS = ConditionHS, // Unsigned higher or same. + ConditionLO, ConditionCC = ConditionLO, // Unsigned lower. + ConditionMI, // Negative. + ConditionPL, // Positive or zero. + ConditionVS, // Overflowed. + ConditionVC, // Not overflowed. + ConditionHI, // Unsigned higher. + ConditionLS, // Unsigned lower or same. + ConditionGE, // Signed greater than or equal. + ConditionLT, // Signed less than. + ConditionGT, // Signed greater than. + ConditionLE, // Signed less than or equal. + ConditionAL, // Unconditional / Always execute. ConditionInvalid } Condition; @@ -661,6 +661,10 @@ private: OP_ROR_reg_T2 = 0xFA60, OP_CLZ = 0xFAB0, OP_SMULL_T1 = 0xFB80, +#if CPU(APPLE_ARMV7S) + OP_SDIV_T1 = 0xFB90, + OP_UDIV_T1 = 0xFBB0, +#endif } OpcodeID1; typedef enum { @@ -1403,6 +1407,16 @@ public: m_formatter.twoWordOp12Reg4FourFours(OP_ROR_reg_T2, rn, FourFours(0xf, rd, 0, rm)); } +#if CPU(APPLE_ARMV7S) + ALWAYS_INLINE void sdiv(RegisterID rd, RegisterID rn, RegisterID rm) + { + ASSERT(!BadReg(rd)); + ASSERT(!BadReg(rn)); + ASSERT(!BadReg(rm)); + m_formatter.twoWordOp12Reg4FourFours(OP_SDIV_T1, rn, FourFours(0xf, rd, 0xf, rm)); + } +#endif + ALWAYS_INLINE void smull(RegisterID rdLo, RegisterID rdHi, RegisterID rn, RegisterID rm) { ASSERT(!BadReg(rdLo)); @@ -1739,6 +1753,16 @@ public: m_formatter.twoWordOp12Reg40Imm3Reg4Imm20Imm5(OP_UBFX_T1, rd, rn, (lsb & 0x1c) << 10, (lsb & 0x3) << 6, (width - 1) & 0x1f); } +#if CPU(APPLE_ARMV7S) + ALWAYS_INLINE void udiv(RegisterID rd, RegisterID rn, RegisterID rm) + { + ASSERT(!BadReg(rd)); + ASSERT(!BadReg(rn)); + ASSERT(!BadReg(rm)); + m_formatter.twoWordOp12Reg4FourFours(OP_UDIV_T1, rn, FourFours(0xf, rd, 0xf, rm)); + } +#endif + void vadd(FPDoubleRegisterID rd, FPDoubleRegisterID rn, FPDoubleRegisterID rm) { m_formatter.vfpOp(OP_VADD_T2, OP_VADD_T2b, true, rn, rd, rm); @@ -2011,7 +2035,7 @@ public: offsets[ptr++] = offset; } - Vector& jumpsToLink() + Vector& jumpsToLink() { std::sort(m_jumpsToLink.begin(), m_jumpsToLink.end(), linkRecordSourceComparator); return m_jumpsToLink; @@ -2042,7 +2066,7 @@ public: linkBX(reinterpret_cast_ptr(from), to); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); break; } } @@ -2202,7 +2226,7 @@ public: cacheFlush(ptr, sizeof(uint16_t) * 2); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -2222,17 +2246,15 @@ public: case OP_ADD_imm_T3: break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } unsigned debugOffset() { return m_formatter.debugOffset(); } - static void cacheFlush(void* code, size_t size) +#if OS(LINUX) + static inline void linuxPageFlush(uintptr_t begin, uintptr_t end) { -#if OS(IOS) - sys_cache_control(kCacheFunctionPrepareForExecution, code, size); -#elif OS(LINUX) asm volatile( "push {r7}\n" "mov r0, %0\n" @@ -2243,8 +2265,32 @@ public: "svc 0x0\n" "pop {r7}\n" : - : "r" (code), "r" (reinterpret_cast(code) + size) + : "r" (begin), "r" (end) : "r0", "r1", "r2"); + } +#endif + + static void cacheFlush(void* code, size_t size) + { +#if OS(IOS) + sys_cache_control(kCacheFunctionPrepareForExecution, code, size); +#elif OS(LINUX) + size_t page = pageSize(); + uintptr_t current = reinterpret_cast(code); + uintptr_t end = current + size; + uintptr_t firstPageEnd = (current & ~(page - 1)) + page; + + if (end <= firstPageEnd) { + linuxPageFlush(current, end); + return; + } + + linuxPageFlush(current, firstPageEnd); + + for (current = firstPageEnd; current + page < end; current += page) + linuxPageFlush(current, current + page); + + linuxPageFlush(current, end); #elif OS(WINCE) CacheRangeFlush(code, size, CACHE_SYNC_ALL); #elif OS(QNX) @@ -2732,8 +2778,7 @@ private: AssemblerBuffer m_buffer; } m_formatter; - Vector m_jumpsToLink; - Vector m_offsets; + Vector m_jumpsToLink; int m_indexOfLastWatchpoint; int m_indexOfTailOfLastWatchpoint; }; diff --git a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h index 673031b7a..1861dc15c 100644 --- a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h +++ b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h @@ -31,7 +31,6 @@ #include "MacroAssemblerCodeRef.h" #include #include -#include #if ENABLE(ASSEMBLER) @@ -46,12 +45,30 @@ namespace JSC { +inline bool isARMv7s() +{ +#if CPU(APPLE_ARMV7S) + return true; +#else + return false; +#endif +} + +inline bool isX86() +{ +#if CPU(X86_64) || CPU(X86) + return true; +#else + return false; +#endif +} + class JumpReplacementWatchpoint; class LinkBuffer; class RepatchBuffer; class Watchpoint; namespace DFG { -class CorrectableJumpPoint; +struct OSRExit; } template @@ -320,7 +337,7 @@ public: class Label { template friend class AbstractMacroAssembler; - friend class DFG::CorrectableJumpPoint; + friend struct DFG::OSRExit; friend class Jump; friend class JumpReplacementWatchpoint; friend class MacroAssemblerCodeRef; @@ -501,7 +518,7 @@ public: template friend class AbstractMacroAssembler; friend class Call; - friend class DFG::CorrectableJumpPoint; + friend struct DFG::OSRExit; friend class LinkBuffer; public: Jump() @@ -510,7 +527,7 @@ public: #if CPU(ARM_THUMB2) // Fixme: this information should be stored in the instruction stream, not in the Jump object. - Jump(AssemblerLabel jmp, ARMv7Assembler::JumpType type, ARMv7Assembler::Condition condition = ARMv7Assembler::ConditionInvalid) + Jump(AssemblerLabel jmp, ARMv7Assembler::JumpType type = ARMv7Assembler::JumpNoCondition, ARMv7Assembler::Condition condition = ARMv7Assembler::ConditionInvalid) : m_label(jmp) , m_type(type) , m_condition(condition) @@ -528,9 +545,20 @@ public: { } #endif + + Label label() const + { + Label result; + result.m_label = m_label; + return result; + } void link(AbstractMacroAssembler* masm) const { +#if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION) + masm->checkRegisterAllocationAgainstBranchRange(m_label.m_offset, masm->debugOffset()); +#endif + #if CPU(ARM_THUMB2) masm->m_assembler.linkJump(m_label, masm->m_assembler.label(), m_type, m_condition); #elif CPU(SH4) @@ -542,6 +570,10 @@ public: void linkTo(Label label, AbstractMacroAssembler* masm) const { +#if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION) + masm->checkRegisterAllocationAgainstBranchRange(label.m_label.m_offset, m_label.m_offset); +#endif + #if CPU(ARM_THUMB2) masm->m_assembler.linkJump(m_label, label.m_label, m_type, m_condition); #else @@ -585,7 +617,7 @@ public: friend class LinkBuffer; public: - typedef Vector JumpVector; + typedef Vector JumpVector; JumpList() { } @@ -676,6 +708,44 @@ public: return Label(this); } +#if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION) + class RegisterAllocationOffset { + public: + RegisterAllocationOffset(unsigned offset) + : m_offset(offset) + { + } + + void check(unsigned low, unsigned high) + { + RELEASE_ASSERT_WITH_MESSAGE(!(low <= m_offset && m_offset <= high), "Unsafe branch over register allocation at instruction offset %u in jump offset range %u..%u", m_offset, low, high); + } + + private: + unsigned m_offset; + }; + + void addRegisterAllocationAtOffset(unsigned offset) + { + m_registerAllocationForOffsets.append(RegisterAllocationOffset(offset)); + } + + void clearRegisterAllocationOffsets() + { + m_registerAllocationForOffsets.clear(); + } + + void checkRegisterAllocationAgainstBranchRange(unsigned offset1, unsigned offset2) + { + if (offset1 > offset2) + std::swap(offset1, offset2); + + size_t size = m_registerAllocationForOffsets.size(); + for (size_t i = 0; i < size; ++i) + m_registerAllocationForOffsets[i].check(offset1, offset2); + } +#endif + template static ptrdiff_t differenceBetween(T from, U to) { @@ -708,6 +778,10 @@ protected: WeakRandom m_randomSource; +#if ENABLE(DFG_REGISTER_ALLOCATION_VALIDATION) + Vector m_registerAllocationForOffsets; +#endif + #if ENABLE(JIT_CONSTANT_BLINDING) static bool scratchRegisterForBlinding() { return false; } static bool shouldBlindForSpecificArch(uint32_t) { return true; } diff --git a/Source/JavaScriptCore/assembler/AssemblerBuffer.h b/Source/JavaScriptCore/assembler/AssemblerBuffer.h index 6bc1b3924..d82c0b946 100644 --- a/Source/JavaScriptCore/assembler/AssemblerBuffer.h +++ b/Source/JavaScriptCore/assembler/AssemblerBuffer.h @@ -30,7 +30,7 @@ #include "ExecutableAllocator.h" #include "JITCompilationEffort.h" -#include "JSGlobalData.h" +#include "VM.h" #include "stdint.h" #include #include @@ -130,12 +130,12 @@ namespace JSC { return AssemblerLabel(m_index); } - PassRefPtr executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { if (!m_index) return 0; - RefPtr result = globalData.executableAllocator.allocate(globalData, m_index, ownerUID, effort); + RefPtr result = vm.executableAllocator.allocate(vm, m_index, ownerUID, effort); if (!result) return 0; @@ -168,7 +168,7 @@ namespace JSC { } private: - Vector m_storage; + Vector m_storage; char* m_buffer; int m_capacity; int m_index; diff --git a/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h b/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h index 5377ef0c7..852f86df7 100644 --- a/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h +++ b/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h @@ -195,10 +195,10 @@ public: putIntegralUnchecked(value.low); } - PassRefPtr executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { flushConstantPool(false); - return AssemblerBuffer::executableCopy(globalData, ownerUID, effort); + return AssemblerBuffer::executableCopy(vm, ownerUID, effort); } void putShortWithConstantInt(uint16_t insn, uint32_t constant, bool isReusable = false) diff --git a/Source/JavaScriptCore/assembler/LinkBuffer.cpp b/Source/JavaScriptCore/assembler/LinkBuffer.cpp index c269157ba..cd393be65 100644 --- a/Source/JavaScriptCore/assembler/LinkBuffer.cpp +++ b/Source/JavaScriptCore/assembler/LinkBuffer.cpp @@ -62,7 +62,7 @@ void LinkBuffer::linkCode(void* ownerUID, JITCompilationEffort effort) { ASSERT(!m_code); #if !ENABLE(BRANCH_COMPACTION) - m_executableMemory = m_assembler->m_assembler.executableCopy(*m_globalData, ownerUID, effort); + m_executableMemory = m_assembler->m_assembler.executableCopy(*m_vm, ownerUID, effort); if (!m_executableMemory) return; m_code = m_executableMemory->start(); @@ -70,7 +70,7 @@ void LinkBuffer::linkCode(void* ownerUID, JITCompilationEffort effort) ASSERT(m_code); #else m_initialSize = m_assembler->m_assembler.codeSize(); - m_executableMemory = m_globalData->executableAllocator.allocate(*m_globalData, m_initialSize, ownerUID, effort); + m_executableMemory = m_vm->executableAllocator.allocate(*m_vm, m_initialSize, ownerUID, effort); if (!m_executableMemory) return; m_code = (uint8_t*)m_executableMemory->start(); @@ -80,7 +80,7 @@ void LinkBuffer::linkCode(void* ownerUID, JITCompilationEffort effort) uint8_t* outData = reinterpret_cast(m_code); int readPtr = 0; int writePtr = 0; - Vector& jumpsToLink = m_assembler->jumpsToLink(); + Vector& jumpsToLink = m_assembler->jumpsToLink(); unsigned jumpCount = jumpsToLink.size(); for (unsigned i = 0; i < jumpCount; ++i) { int offset = readPtr - writePtr; diff --git a/Source/JavaScriptCore/assembler/LinkBuffer.h b/Source/JavaScriptCore/assembler/LinkBuffer.h index e1882433c..52630fe50 100644 --- a/Source/JavaScriptCore/assembler/LinkBuffer.h +++ b/Source/JavaScriptCore/assembler/LinkBuffer.h @@ -41,7 +41,7 @@ namespace JSC { -class JSGlobalData; +class VM; // LinkBuffer: // @@ -76,14 +76,14 @@ class LinkBuffer { #endif public: - LinkBuffer(JSGlobalData& globalData, MacroAssembler* masm, void* ownerUID, JITCompilationEffort effort = JITCompilationMustSucceed) + LinkBuffer(VM& vm, MacroAssembler* masm, void* ownerUID, JITCompilationEffort effort = JITCompilationMustSucceed) : m_size(0) #if ENABLE(BRANCH_COMPACTION) , m_initialSize(0) #endif , m_code(0) , m_assembler(masm) - , m_globalData(&globalData) + , m_vm(&vm) #ifndef NDEBUG , m_completed(false) , m_effort(effort) @@ -256,7 +256,7 @@ private: #endif void* m_code; MacroAssembler* m_assembler; - JSGlobalData* m_globalData; + VM* m_vm; #ifndef NDEBUG bool m_completed; JITCompilationEffort m_effort; diff --git a/Source/JavaScriptCore/assembler/MIPSAssembler.h b/Source/JavaScriptCore/assembler/MIPSAssembler.h index 7f553bb9a..5f7b9b21a 100644 --- a/Source/JavaScriptCore/assembler/MIPSAssembler.h +++ b/Source/JavaScriptCore/assembler/MIPSAssembler.h @@ -676,9 +676,9 @@ public: return m_buffer.codeSize(); } - PassRefPtr executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { - RefPtr result = m_buffer.executableCopy(globalData, ownerUID, effort); + RefPtr result = m_buffer.executableCopy(vm, ownerUID, effort); if (!result) return 0; diff --git a/Source/JavaScriptCore/assembler/MacroAssembler.h b/Source/JavaScriptCore/assembler/MacroAssembler.h index 2f26ff281..f74680d7f 100644 --- a/Source/JavaScriptCore/assembler/MacroAssembler.h +++ b/Source/JavaScriptCore/assembler/MacroAssembler.h @@ -121,7 +121,7 @@ public: case DoubleLessThanOrEqualOrUnordered: return DoubleGreaterThan; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return DoubleEqual; // make compiler happy } } @@ -145,7 +145,7 @@ public: case NonZero: return Zero; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return Zero; // Make compiler happy for release builds. } } @@ -854,7 +854,7 @@ public: bool shouldBlindDouble(double value) { // Don't trust NaN or +/-Infinity - if (!isfinite(value)) + if (!std::isfinite(value)) return shouldConsiderBlinding(); // Try to force normalisation, and check that there's no change @@ -876,7 +876,7 @@ public: bool shouldBlind(ImmPtr imm) { -#if !defined(NDEBUG) +#if ENABLE(FORCED_JIT_BLINDING) UNUSED_PARAM(imm); // Debug always blind all constants, if only so we know // if we've broken blinding during patch development. @@ -934,8 +934,8 @@ public: } bool shouldBlind(Imm64 imm) - { -#if !defined(NDEBUG) + { +#if ENABLE(FORCED_JIT_BLINDING) UNUSED_PARAM(imm); // Debug always blind all constants, if only so we know // if we've broken blinding during patch development. @@ -1073,8 +1073,8 @@ public: #if ENABLE(JIT_CONSTANT_BLINDING) bool shouldBlind(Imm32 imm) - { -#if !defined(NDEBUG) + { +#if ENABLE(FORCED_JIT_BLINDING) UNUSED_PARAM(imm); // Debug always blind all constants, if only so we know // if we've broken blinding during patch development. @@ -1357,12 +1357,9 @@ public: Jump branchAdd32(ResultCondition cond, RegisterID src, Imm32 imm, RegisterID dest) { - if (src == dest) { - if (!scratchRegisterForBlinding()) { - // Release mode ASSERT, if this fails we will perform incorrect codegen. - CRASH(); - } - } + if (src == dest) + ASSERT(scratchRegisterForBlinding()); + if (shouldBlind(imm)) { if (src == dest) { if (RegisterID scratchRegister = (RegisterID)scratchRegisterForBlinding()) { @@ -1378,12 +1375,9 @@ public: Jump branchMul32(ResultCondition cond, Imm32 imm, RegisterID src, RegisterID dest) { - if (src == dest) { - if (!scratchRegisterForBlinding()) { - // Release mode ASSERT, if this fails we will perform incorrect codegen. - CRASH(); - } - } + if (src == dest) + ASSERT(scratchRegisterForBlinding()); + if (shouldBlind(imm)) { if (src == dest) { if (RegisterID scratchRegister = (RegisterID)scratchRegisterForBlinding()) { diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h index c5ea9c542..494fe640d 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h @@ -58,6 +58,7 @@ public: enum ResultCondition { Overflow = ARMAssembler::VS, Signed = ARMAssembler::MI, + PositiveOrZero = ARMAssembler::PL, Zero = ARMAssembler::EQ, NonZero = ARMAssembler::NE }; @@ -152,6 +153,12 @@ public: m_assembler.bitAnds(dest, src, w); } + void and32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + and32(ARMRegisters::S1, dest); + } + void lshift32(RegisterID shiftAmount, RegisterID dest) { lshift32(dest, shiftAmount, dest); @@ -342,7 +349,7 @@ public: #else UNUSED_PARAM(src); UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); #endif } @@ -445,10 +452,10 @@ public: m_assembler.baseIndexTransfer32(ARMAssembler::StoreUint8, src, address.base, address.index, static_cast(address.scale), address.offset); } - void store8(TrustedImm32 imm, void* address) + void store8(TrustedImm32 imm, const void* address) { move(TrustedImm32(reinterpret_cast(address)), ARMRegisters::S0); - m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + move(imm, ARMRegisters::S1); m_assembler.dtrUp(ARMAssembler::StoreUint8, ARMRegisters::S1, ARMRegisters::S0, 0); } @@ -479,13 +486,13 @@ public: m_assembler.baseIndexTransfer32(ARMAssembler::StoreUint32, ARMRegisters::S1, address.base, address.index, static_cast(address.scale), address.offset); } - void store32(RegisterID src, void* address) + void store32(RegisterID src, const void* address) { m_assembler.ldrUniqueImmediate(ARMRegisters::S0, reinterpret_cast(address)); m_assembler.dtrUp(ARMAssembler::StoreUint32, src, ARMRegisters::S0, 0); } - void store32(TrustedImm32 imm, void* address) + void store32(TrustedImm32 imm, const void* address) { m_assembler.ldrUniqueImmediate(ARMRegisters::S0, reinterpret_cast(address)); m_assembler.moveImm(imm.m_value, ARMRegisters::S1); @@ -532,9 +539,9 @@ public: void swap(RegisterID reg1, RegisterID reg2) { - m_assembler.mov(ARMRegisters::S0, reg1); - m_assembler.mov(reg1, reg2); - m_assembler.mov(reg2, ARMRegisters::S0); + xor32(reg1, reg2); + xor32(reg2, reg1); + xor32(reg1, reg2); } void signExtend32ToPtr(RegisterID src, RegisterID dest) @@ -680,35 +687,40 @@ public: Jump branchAdd32(ResultCondition cond, RegisterID src, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) + || (cond == NonZero) || (cond == PositiveOrZero)); add32(src, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchAdd32(ResultCondition cond, RegisterID op1, RegisterID op2, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) + || (cond == NonZero) || (cond == PositiveOrZero)); add32(op1, op2, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) + || (cond == NonZero) || (cond == PositiveOrZero)); add32(imm, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchAdd32(ResultCondition cond, RegisterID src, TrustedImm32 imm, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) + || (cond == NonZero) || (cond == PositiveOrZero)); add32(src, imm, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, AbsoluteAddress dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) + || (cond == NonZero) || (cond == PositiveOrZero)); add32(imm, dest); return Jump(m_assembler.jmp(ARMCondition(cond))); } @@ -885,20 +897,41 @@ public: void add32(TrustedImm32 imm, AbsoluteAddress address) { - m_assembler.ldrUniqueImmediate(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); - m_assembler.dtrUp(ARMAssembler::LoadUint32, ARMRegisters::S1, ARMRegisters::S1, 0); + load32(address.m_ptr, ARMRegisters::S1); add32(imm, ARMRegisters::S1); - m_assembler.ldrUniqueImmediate(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); - m_assembler.dtrUp(ARMAssembler::StoreUint32, ARMRegisters::S1, ARMRegisters::S0, 0); + store32(ARMRegisters::S1, address.m_ptr); + } + + void add64(TrustedImm32 imm, AbsoluteAddress address) + { + ARMWord tmp; + + move(TrustedImmPtr(address.m_ptr), ARMRegisters::S1); + m_assembler.dtrUp(ARMAssembler::LoadUint32, ARMRegisters::S0, ARMRegisters::S1, 0); + + if ((tmp = ARMAssembler::getOp2(imm.m_value)) != ARMAssembler::InvalidImmediate) + m_assembler.adds(ARMRegisters::S0, ARMRegisters::S0, tmp); + else if ((tmp = ARMAssembler::getOp2(-imm.m_value)) != ARMAssembler::InvalidImmediate) + m_assembler.subs(ARMRegisters::S0, ARMRegisters::S0, tmp); + else { + m_assembler.adds(ARMRegisters::S0, ARMRegisters::S0, m_assembler.getImm(imm.m_value, ARMRegisters::S1)); + move(TrustedImmPtr(address.m_ptr), ARMRegisters::S1); + } + m_assembler.dtrUp(ARMAssembler::StoreUint32, ARMRegisters::S0, ARMRegisters::S1, 0); + + m_assembler.dtrUp(ARMAssembler::LoadUint32, ARMRegisters::S0, ARMRegisters::S1, sizeof(ARMWord)); + if (imm.m_value >= 0) + m_assembler.adc(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::getOp2Byte(0)); + else + m_assembler.sbc(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::getOp2Byte(0)); + m_assembler.dtrUp(ARMAssembler::StoreUint32, ARMRegisters::S0, ARMRegisters::S1, sizeof(ARMWord)); } void sub32(TrustedImm32 imm, AbsoluteAddress address) { - m_assembler.ldrUniqueImmediate(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); - m_assembler.dtrUp(ARMAssembler::LoadUint32, ARMRegisters::S1, ARMRegisters::S1, 0); + load32(address.m_ptr, ARMRegisters::S1); sub32(imm, ARMRegisters::S1); - m_assembler.ldrUniqueImmediate(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); - m_assembler.dtrUp(ARMAssembler::StoreUint32, ARMRegisters::S1, ARMRegisters::S0, 0); + store32(ARMRegisters::S1, address.m_ptr); } void load32(const void* address, RegisterID dest) @@ -1080,7 +1113,7 @@ public: void divDouble(Address src, FPRegisterID dest) { - ASSERT_NOT_REACHED(); // Untested + RELEASE_ASSERT_NOT_REACHED(); // Untested loadDouble(src, ARMRegisters::SD0); divDouble(ARMRegisters::SD0, dest); } @@ -1216,7 +1249,7 @@ public: // If the result is not representable as a 32 bit value, branch. // May also branch for some values that are representable in 32 bits // (specifically, in this case, 0). - void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID) + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID, bool negZeroCheck = true) { m_assembler.vcvt_s32_f64(ARMRegisters::SD0 << 1, src); m_assembler.vmov_arm32(dest, ARMRegisters::SD0 << 1); @@ -1226,7 +1259,8 @@ public: failureCases.append(branchDouble(DoubleNotEqualOrUnordered, src, ARMRegisters::SD0)); // If the result is zero, it might have been -0.0, and 0.0 equals to -0.0 - failureCases.append(branchTest32(Zero, dest)); + if (negZeroCheck) + failureCases.append(branchTest32(Zero, dest)); } Jump branchDoubleNonZero(FPRegisterID reg, FPRegisterID scratch) diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h index 06d0e1534..b1bc41729 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -59,7 +59,7 @@ public: return value >= -255 && value <= 255; } - Vector& jumpsToLink() { return m_assembler.jumpsToLink(); } + Vector& jumpsToLink() { return m_assembler.jumpsToLink(); } void* unlinkedCode() { return m_assembler.unlinkedCode(); } bool canCompact(JumpType jumpType) { return m_assembler.canCompact(jumpType); } JumpLinkType computeJumpType(JumpType jumpType, const uint8_t* from, const uint8_t* to) { return m_assembler.computeJumpType(jumpType, from, to); } @@ -119,6 +119,7 @@ public: enum ResultCondition { Overflow = ARMv7Assembler::ConditionVS, Signed = ARMv7Assembler::ConditionMI, + PositiveOrZero = ARMv7Assembler::ConditionPL, Zero = ARMv7Assembler::ConditionEQ, NonZero = ARMv7Assembler::ConditionNE }; @@ -263,6 +264,12 @@ public: and32(imm, dest, dest); } + void and32(Address src, RegisterID dest) + { + load32(src, dataTempRegister); + and32(dataTempRegister, dest); + } + void countLeadingZeros32(RegisterID src, RegisterID dest) { m_assembler.clz(dest, src); @@ -1097,7 +1104,7 @@ public: // If the result is not representable as a 32 bit value, branch. // May also branch for some values that are representable in 32 bits // (specifically, in this case, 0). - void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID) + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID, bool negZeroCheck = true) { m_assembler.vcvt_floatingPointToSigned(fpTempRegisterAsSingle(), src); m_assembler.vmov(dest, fpTempRegisterAsSingle()); @@ -1107,7 +1114,8 @@ public: failureCases.append(branchDouble(DoubleNotEqualOrUnordered, src, fpTempRegister)); // If the result is zero, it might have been -0.0, and the double comparison won't catch this! - failureCases.append(branchTest32(Zero, dest)); + if (negZeroCheck) + failureCases.append(branchTest32(Zero, dest)); } Jump branchDoubleNonZero(FPRegisterID reg, FPRegisterID) diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h index c2af24060..ec16659d5 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h @@ -32,7 +32,6 @@ #include #include #include -#include // ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid // instruction address on the platform (for example, check any alignment requirements). diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h index f5298a0ab..298a25c29 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h @@ -80,6 +80,7 @@ public: enum ResultCondition { Overflow, Signed, + PositiveOrZero, Zero, NonZero }; @@ -233,22 +234,46 @@ public: /* li addrTemp, address li immTemp, imm - lw dataTemp, 0(addrTemp) - addu dataTemp, dataTemp, immTemp + lw cmpTemp, 0(addrTemp) + addu dataTemp, cmpTemp, immTemp sw dataTemp, 0(addrTemp) */ move(TrustedImmPtr(address.m_ptr), addrTempRegister); - m_assembler.lw(dataTempRegister, addrTempRegister, 0); - if (imm.m_value >= -32768 && imm.m_value <= 32767 - && !m_fixedWidth) - m_assembler.addiu(dataTempRegister, dataTempRegister, imm.m_value); + m_assembler.lw(cmpTempRegister, addrTempRegister, 0); + if (imm.m_value >= -32768 && imm.m_value <= 32767 && !m_fixedWidth) + m_assembler.addiu(dataTempRegister, cmpTempRegister, imm.m_value); else { move(imm, immTempRegister); - m_assembler.addu(dataTempRegister, dataTempRegister, immTempRegister); + m_assembler.addu(dataTempRegister, cmpTempRegister, immTempRegister); } m_assembler.sw(dataTempRegister, addrTempRegister, 0); } + void add64(TrustedImm32 imm, AbsoluteAddress address) + { + /* + add32(imm, address) + sltu immTemp, dataTemp, cmpTemp # set carry-in bit + lw dataTemp, 4(addrTemp) + addiu dataTemp, imm.m_value >> 31 ? -1 : 0 + addu dataTemp, dataTemp, immTemp + sw dataTemp, 4(addrTemp) + */ + add32(imm, address); + m_assembler.sltu(immTempRegister, dataTempRegister, cmpTempRegister); + m_assembler.lw(dataTempRegister, addrTempRegister, 4); + if (imm.m_value >> 31) + m_assembler.addiu(dataTempRegister, dataTempRegister, -1); + m_assembler.addu(dataTempRegister, dataTempRegister, immTempRegister); + m_assembler.sw(dataTempRegister, addrTempRegister, 4); + } + + void and32(Address src, RegisterID dest) + { + load32(src, dataTempRegister); + and32(dataTempRegister, dest); + } + void and32(RegisterID src, RegisterID dest) { m_assembler.andInsn(dest, dest, src); @@ -596,7 +621,7 @@ public: void absDouble(FPRegisterID, FPRegisterID) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest) @@ -1485,7 +1510,7 @@ public: Jump branchAdd32(ResultCondition cond, RegisterID src, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); if (cond == Overflow) { /* move dest, dataTemp @@ -1518,6 +1543,12 @@ public: m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); } + if (cond == PositiveOrZero) { + add32(src, dest); + // Check if dest is not negative. + m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); + return branchEqual(cmpTempRegister, MIPSRegisters::zero); + } if (cond == Zero) { add32(src, dest); return branchEqual(dest, MIPSRegisters::zero); @@ -1532,7 +1563,7 @@ public: Jump branchAdd32(ResultCondition cond, RegisterID op1, RegisterID op2, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); if (cond == Overflow) { /* move dataTemp, op1 @@ -1565,6 +1596,12 @@ public: m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); } + if (cond == PositiveOrZero) { + add32(op1, op2, dest); + // Check if dest is not negative. + m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); + return branchEqual(cmpTempRegister, MIPSRegisters::zero); + } if (cond == Zero) { add32(op1, op2, dest); return branchEqual(dest, MIPSRegisters::zero); @@ -1592,7 +1629,7 @@ public: Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, AbsoluteAddress dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); if (cond == Overflow) { /* move dataTemp, dest @@ -1642,6 +1679,11 @@ public: m_assembler.slt(cmpTempRegister, dataTempRegister, MIPSRegisters::zero); return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); } + if (cond == PositiveOrZero) { + // Check if dest is not negative. + m_assembler.slt(cmpTempRegister, dataTempRegister, MIPSRegisters::zero); + return branchEqual(cmpTempRegister, MIPSRegisters::zero); + } if (cond == Zero) return branchEqual(dataTempRegister, MIPSRegisters::zero); if (cond == NonZero) @@ -2598,13 +2640,14 @@ public: // If the result is not representable as a 32 bit value, branch. // May also branch for some values that are representable in 32 bits // (specifically, in this case, 0). - void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp, bool negZeroCheck = true) { m_assembler.cvtwd(fpTempRegister, src); m_assembler.mfc1(dest, fpTempRegister); // If the result is zero, it might have been -0.0, and the double comparison won't catch this! - failureCases.append(branch32(Equal, dest, MIPSRegisters::zero)); + if (negZeroCheck) + failureCases.append(branch32(Equal, dest, MIPSRegisters::zero)); // Convert the integer result back to float & compare to the original value - if not equal or unordered (NaN) then jump. convertInt32ToDouble(dest, fpTemp); diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerSH4.cpp b/Source/JavaScriptCore/assembler/MacroAssemblerSH4.cpp deleted file mode 100644 index 59de3ff48..000000000 --- a/Source/JavaScriptCore/assembler/MacroAssemblerSH4.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2011 STMicroelectronics. All rights reserved. - * Copyright (C) 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "config.h" - -#if ENABLE(ASSEMBLER) && CPU(SH4) - -#include "MacroAssemblerSH4.h" - -namespace JSC { - -void MacroAssemblerSH4::linkCall(void* code, Call call, FunctionPtr function) -{ - SH4Assembler::linkCall(code, call.m_label, function.value()); -} - -void MacroAssemblerSH4::repatchCall(CodeLocationCall call, CodeLocationLabel destination) -{ - SH4Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); -} - -void MacroAssemblerSH4::repatchCall(CodeLocationCall call, FunctionPtr destination) -{ - SH4Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); -} - -} // namespace JSC - -#endif // ENABLE(ASSEMBLER) diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerSH4.h b/Source/JavaScriptCore/assembler/MacroAssemblerSH4.h index 0c7fe12c6..ad5acfaeb 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerSH4.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerSH4.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2013 Cisco Systems, Inc. All rights reserved. * Copyright (C) 2009-2011 STMicroelectronics. All rights reserved. * Copyright (C) 2008 Apple Inc. All rights reserved. * @@ -40,7 +41,7 @@ public: typedef SH4Assembler::FPRegisterID FPRegisterID; static const Scale ScalePtr = TimesFour; - static const FPRegisterID fscratch = SH4Registers::fr10; + static const FPRegisterID fscratch = SH4Registers::dr10; static const RegisterID stackPointerRegister = SH4Registers::sp; static const RegisterID linkRegister = SH4Registers::pr; static const RegisterID scratchReg3 = SH4Registers::r13; @@ -49,7 +50,7 @@ public: static bool isCompactPtrAlignedAddressOffset(ptrdiff_t value) { - return (value >= 0) && (value <= MaximumCompactPtrAlignedAddressOffset); + return (value >= 0) && (value <= MaximumCompactPtrAlignedAddressOffset) && (!(value & 3)); } enum RelationalCondition { @@ -68,6 +69,7 @@ public: enum ResultCondition { Overflow = SH4Assembler::OF, Signed = SH4Assembler::SI, + PositiveOrZero = SH4Assembler::NS, Zero = SH4Assembler::EQ, NonZero = SH4Assembler::NE }; @@ -99,6 +101,34 @@ public: m_assembler.releaseScratch(reg); } + static RelationalCondition invert(RelationalCondition cond) + { + switch (cond) { + case Equal: + return NotEqual; + case NotEqual: + return Equal; + case Above: + return BelowOrEqual; + case AboveOrEqual: + return Below; + case Below: + return AboveOrEqual; + case BelowOrEqual: + return Above; + case GreaterThan: + return LessThanOrEqual; + case GreaterThanOrEqual: + return LessThan; + case LessThan: + return GreaterThanOrEqual; + case LessThanOrEqual: + return GreaterThan; + default: + RELEASE_ASSERT_NOT_REACHED(); + } + } + // Integer arithmetic operations void add32(RegisterID src, RegisterID dest) @@ -106,8 +136,21 @@ public: m_assembler.addlRegReg(src, dest); } + void add32(RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) + add32(src2, dest); + else { + move(src2, dest); + add32(src1, dest); + } + } + void add32(TrustedImm32 imm, RegisterID dest) { + if (!imm.m_value) + return; + if (m_assembler.isImmediate(imm.m_value)) { m_assembler.addlImm8r(imm.m_value, dest); return; @@ -121,13 +164,15 @@ public: void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) { - if (src != dest) - m_assembler.movlRegReg(src, dest); + move(src, dest); add32(imm, dest); } void add32(TrustedImm32 imm, Address address) { + if (!imm.m_value) + return; + RegisterID scr = claimScratch(); load32(address, scr); add32(imm, scr); @@ -156,15 +201,38 @@ public: m_assembler.andlRegReg(src, dest); } + void and32(RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) + and32(src2, dest); + else { + move(src2, dest); + and32(src1, dest); + } + } + + void and32(Address src, RegisterID dest) + { + RegisterID scr = claimScratch(); + load32(src, scr); + and32(scr, dest); + releaseScratch(scr); + } + void and32(TrustedImm32 imm, RegisterID dest) { + if (!imm.m_value) { + m_assembler.movImm8(0, dest); + return; + } + if ((imm.m_value <= 255) && (imm.m_value >= 0) && (dest == SH4Registers::r0)) { m_assembler.andlImm8r(imm.m_value, dest); return; } RegisterID scr = claimScratch(); - m_assembler.loadConstant((imm.m_value), scr); + m_assembler.loadConstant(imm.m_value, scr); m_assembler.andlRegReg(scr, dest); releaseScratch(scr); } @@ -182,63 +250,64 @@ public: void lshift32(RegisterID shiftamount, RegisterID dest) { - if (shiftamount == SH4Registers::r0) - m_assembler.andlImm8r(0x1f, shiftamount); - else { - RegisterID scr = claimScratch(); - m_assembler.loadConstant(0x1f, scr); - m_assembler.andlRegReg(scr, shiftamount); - releaseScratch(scr); - } - m_assembler.shllRegReg(dest, shiftamount); + RegisterID shiftTmp = claimScratch(); + m_assembler.loadConstant(0x1f, shiftTmp); + m_assembler.andlRegReg(shiftamount, shiftTmp); + m_assembler.shldRegReg(dest, shiftTmp); + releaseScratch(shiftTmp); } - void rshift32(int imm, RegisterID dest) + void lshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) { - RegisterID scr = claimScratch(); - m_assembler.loadConstant(-imm, scr); - m_assembler.shaRegReg(dest, scr); - releaseScratch(scr); + move(src, dest); + lshift32(shiftAmount, dest); } void lshift32(TrustedImm32 imm, RegisterID dest) { - if (!imm.m_value) + int immMasked = imm.m_value & 0x1f; + if (!immMasked) return; - if ((imm.m_value == 1) || (imm.m_value == 2) || (imm.m_value == 8) || (imm.m_value == 16)) { - m_assembler.shllImm8r(imm.m_value, dest); + if ((immMasked == 1) || (immMasked == 2) || (immMasked == 8) || (immMasked == 16)) { + m_assembler.shllImm8r(immMasked, dest); return; } - RegisterID scr = claimScratch(); - m_assembler.loadConstant((imm.m_value & 0x1f) , scr); - m_assembler.shllRegReg(dest, scr); - releaseScratch(scr); + RegisterID shiftTmp = claimScratch(); + m_assembler.loadConstant(immMasked, shiftTmp); + m_assembler.shldRegReg(dest, shiftTmp); + releaseScratch(shiftTmp); } void lshift32(RegisterID src, TrustedImm32 shiftamount, RegisterID dest) { - if (src != dest) - move(src, dest); - + move(src, dest); lshift32(shiftamount, dest); } void mul32(RegisterID src, RegisterID dest) { - m_assembler.imullRegReg(src, dest); + mul32(src, dest, dest); + } + + void mul32(RegisterID src1, RegisterID src2, RegisterID dest) + { + m_assembler.imullRegReg(src1, src2); m_assembler.stsmacl(dest); } void mul32(TrustedImm32 imm, RegisterID src, RegisterID dest) { - RegisterID scr = claimScratch(); - move(imm, scr); - if (src != dest) - move(src, dest); - mul32(scr, dest); - releaseScratch(scr); + if (src == dest) { + RegisterID immval = claimScratch(); + move(imm, immval); + mul32(immval, dest); + releaseScratch(immval); + } else { + move(imm, dest); + mul32(src, dest); + } } void or32(RegisterID src, RegisterID dest) @@ -271,10 +340,9 @@ public: } } - -void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) + void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { - if (src != dest) { + if (src != dest) { move(imm, dest); or32(src, dest); return; @@ -283,9 +351,21 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) or32(imm, dest); } + void or32(RegisterID src, AbsoluteAddress address) + { + RegisterID destptr = claimScratch(); + move(TrustedImmPtr(address.m_ptr), destptr); + RegisterID destval = claimScratch(); + m_assembler.movlMemReg(destptr, destval); + m_assembler.orlRegReg(src, destval); + m_assembler.movlRegMem(destval, destptr); + releaseScratch(destval); + releaseScratch(destptr); + } + void xor32(TrustedImm32 imm, RegisterID src, RegisterID dest) { - if (src != dest) { + if (src != dest) { move(imm, dest); xor32(src, dest); return; @@ -296,28 +376,40 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void rshift32(RegisterID shiftamount, RegisterID dest) { - if (shiftamount == SH4Registers::r0) - m_assembler.andlImm8r(0x1f, shiftamount); - else { - RegisterID scr = claimScratch(); - m_assembler.loadConstant(0x1f, scr); - m_assembler.andlRegReg(scr, shiftamount); - releaseScratch(scr); - } - m_assembler.neg(shiftamount, shiftamount); - m_assembler.shaRegReg(dest, shiftamount); + RegisterID shiftTmp = claimScratch(); + m_assembler.loadConstant(0x1f, shiftTmp); + m_assembler.andlRegReg(shiftamount, shiftTmp); + m_assembler.neg(shiftTmp, shiftTmp); + m_assembler.shadRegReg(dest, shiftTmp); + releaseScratch(shiftTmp); + } + + void rshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) + { + move(src, dest); + rshift32(shiftAmount, dest); } void rshift32(TrustedImm32 imm, RegisterID dest) { - if (imm.m_value & 0x1f) - rshift32(imm.m_value & 0x1f, dest); + int immMasked = imm.m_value & 0x1f; + if (!immMasked) + return; + + if (immMasked == 1) { + m_assembler.sharImm8r(immMasked, dest); + return; + } + + RegisterID shiftTmp = claimScratch(); + m_assembler.loadConstant(-immMasked, shiftTmp); + m_assembler.shadRegReg(dest, shiftTmp); + releaseScratch(shiftTmp); } void rshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) { - if (src != dest) - move(src, dest); + move(src, dest); rshift32(imm, dest); } @@ -326,30 +418,15 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.sublRegReg(src, dest); } - void sub32(TrustedImm32 imm, AbsoluteAddress address, RegisterID scratchReg) - { - RegisterID result = claimScratch(); - - m_assembler.loadConstant(reinterpret_cast(address.m_ptr), scratchReg); - m_assembler.movlMemReg(scratchReg, result); - - if (m_assembler.isImmediate(-imm.m_value)) - m_assembler.addlImm8r(-imm.m_value, result); - else { - m_assembler.loadConstant(imm.m_value, scratchReg3); - m_assembler.sublRegReg(scratchReg3, result); - } - - store32(result, scratchReg); - releaseScratch(result); - } - void sub32(TrustedImm32 imm, AbsoluteAddress address) { + if (!imm.m_value) + return; + RegisterID result = claimScratch(); RegisterID scratchReg = claimScratch(); - m_assembler.loadConstant(reinterpret_cast(address.m_ptr), scratchReg); + move(TrustedImmPtr(address.m_ptr), scratchReg); m_assembler.movlMemReg(scratchReg, result); if (m_assembler.isImmediate(-imm.m_value)) @@ -364,30 +441,20 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) releaseScratch(scratchReg); } - void add32(TrustedImm32 imm, AbsoluteAddress address, RegisterID scratchReg) + void sub32(TrustedImm32 imm, Address address) { - RegisterID result = claimScratch(); - - m_assembler.loadConstant(reinterpret_cast(address.m_ptr), scratchReg); - m_assembler.movlMemReg(scratchReg, result); - - if (m_assembler.isImmediate(imm.m_value)) - m_assembler.addlImm8r(imm.m_value, result); - else { - m_assembler.loadConstant(imm.m_value, scratchReg3); - m_assembler.addlRegReg(scratchReg3, result); - } - - store32(result, scratchReg); - releaseScratch(result); + add32(TrustedImm32(-imm.m_value), address); } void add32(TrustedImm32 imm, AbsoluteAddress address) { + if (!imm.m_value) + return; + RegisterID result = claimScratch(); RegisterID scratchReg = claimScratch(); - m_assembler.loadConstant(reinterpret_cast(address.m_ptr), scratchReg); + move(TrustedImmPtr(address.m_ptr), scratchReg); m_assembler.movlMemReg(scratchReg, result); if (m_assembler.isImmediate(imm.m_value)) @@ -402,8 +469,37 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) releaseScratch(scratchReg); } + void add64(TrustedImm32 imm, AbsoluteAddress address) + { + RegisterID scr1 = claimScratch(); + RegisterID scr2 = claimScratch(); + + // Add 32-bit LSB first. + move(TrustedImmPtr(address.m_ptr), scratchReg3); + m_assembler.movlMemReg(scratchReg3, scr1); // scr1 = 32-bit LSB of int64 @ address + m_assembler.loadConstant(imm.m_value, scr2); + m_assembler.clrt(); + m_assembler.addclRegReg(scr1, scr2); + m_assembler.movlRegMem(scr2, scratchReg3); // Update address with 32-bit LSB result. + + // Then add 32-bit MSB. + m_assembler.addlImm8r(4, scratchReg3); + m_assembler.movlMemReg(scratchReg3, scr1); // scr1 = 32-bit MSB of int64 @ address + m_assembler.movt(scr2); + if (imm.m_value < 0) + m_assembler.addlImm8r(-1, scr2); // Sign extend imm value if needed. + m_assembler.addvlRegReg(scr2, scr1); + m_assembler.movlRegMem(scr1, scratchReg3); // Update (address + 4) with 32-bit MSB result. + + releaseScratch(scr2); + releaseScratch(scr1); + } + void sub32(TrustedImm32 imm, RegisterID dest) { + if (!imm.m_value) + return; + if (m_assembler.isImmediate(-imm.m_value)) { m_assembler.addlImm8r(-imm.m_value, dest); return; @@ -428,6 +524,16 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.xorlRegReg(src, dest); } + void xor32(RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) + xor32(src2, dest); + else { + move(src2, dest); + xor32(src1, dest); + } + } + void xor32(TrustedImm32 imm, RegisterID srcDest) { if (imm.m_value == -1) { @@ -437,7 +543,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) if ((srcDest != SH4Registers::r0) || (imm.m_value > 255) || (imm.m_value < 0)) { RegisterID scr = claimScratch(); - m_assembler.loadConstant((imm.m_value), scr); + m_assembler.loadConstant(imm.m_value, scr); m_assembler.xorlRegReg(scr, srcDest); releaseScratch(scr); return; @@ -453,6 +559,11 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) return; } + if (((cond == Equal) || (cond == NotEqual)) && !imm) { + m_assembler.testlRegReg(dst, dst); + return; + } + RegisterID scr = claimScratch(); m_assembler.loadConstant(imm, scr); m_assembler.cmplRegReg(scr, dst, SH4Condition(cond)); @@ -486,20 +597,10 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void testImm(int imm, int offset, RegisterID base) { RegisterID scr = claimScratch(); - RegisterID scr1 = claimScratch(); + load32(base, offset, scr); - if ((offset < 0) || (offset >= 64)) { - m_assembler.loadConstant(offset, scr); - m_assembler.addlRegReg(base, scr); - m_assembler.movlMemReg(scr, scr); - } else if (offset) - m_assembler.movlMemReg(offset >> 2, base, scr); - else - m_assembler.movlMemReg(base, scr); - if (m_assembler.isImmediate(imm)) - m_assembler.movImm8(imm, scr1); - else - m_assembler.loadConstant(imm, scr1); + RegisterID scr1 = claimScratch(); + move(TrustedImm32(imm), scr1); m_assembler.testlRegReg(scr, scr1); releaseScratch(scr); @@ -547,41 +648,37 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void compare32(int imm, int offset, RegisterID base, RelationalCondition cond) { - if (!offset) { - RegisterID scr = claimScratch(); - RegisterID scr1 = claimScratch(); - m_assembler.movlMemReg(base, scr); - m_assembler.loadConstant(imm, scr1); - m_assembler.cmplRegReg(scr1, scr, SH4Condition(cond)); - releaseScratch(scr1); - releaseScratch(scr); - return; - } - - if ((offset < 0) || (offset >= 64)) { - RegisterID scr = claimScratch(); - RegisterID scr1 = claimScratch(); - m_assembler.loadConstant(offset, scr); - m_assembler.addlRegReg(base, scr); - m_assembler.movlMemReg(scr, scr); - m_assembler.loadConstant(imm, scr1); - m_assembler.cmplRegReg(scr1, scr, SH4Condition(cond)); - releaseScratch(scr1); - releaseScratch(scr); - return; - } - RegisterID scr = claimScratch(); + load32(base, offset, scr); + RegisterID scr1 = claimScratch(); - m_assembler.movlMemReg(offset >> 2, base, scr); - m_assembler.loadConstant(imm, scr1); + move(TrustedImm32(imm), scr1); + m_assembler.cmplRegReg(scr1, scr, SH4Condition(cond)); + releaseScratch(scr1); releaseScratch(scr); } // Memory access operation + ALWAYS_INLINE void loadEffectiveAddress(BaseIndex address, RegisterID dest, int extraoffset = 0) + { + if (dest == address.base) { + RegisterID scaledIndex = claimScratch(); + move(address.index, scaledIndex); + lshift32(TrustedImm32(address.scale), scaledIndex); + add32(scaledIndex, dest); + releaseScratch(scaledIndex); + } else { + move(address.index, dest); + lshift32(TrustedImm32(address.scale), dest); + add32(address.base, dest); + } + + add32(TrustedImm32(address.offset + extraoffset), dest); + } + void load32(ImplicitAddress address, RegisterID dest) { load32(address.base, address.offset, dest); @@ -602,6 +699,12 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) releaseScratch(scr); } + void load8PostInc(RegisterID base, RegisterID dest) + { + m_assembler.movbMemRegIn(base, dest); + m_assembler.extub(dest, dest); + } + void load8Signed(BaseIndex address, RegisterID dest) { RegisterID scr = claimScratch(); @@ -624,7 +727,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void load32(const void* address, RegisterID dest) { - m_assembler.loadConstant(reinterpret_cast(const_cast(address)), dest); + move(TrustedImmPtr(address), dest); m_assembler.movlMemReg(dest, dest); } @@ -640,20 +743,15 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) return; } - if ((dest == SH4Registers::r0) && (dest != base)) { - m_assembler.loadConstant((offset), dest); - m_assembler.movlR0mr(base, dest); - return; - } + RegisterID scr = (dest == base) ? claimScratch() : dest; - RegisterID scr; - if (dest == base) - scr = claimScratch(); - else - scr = dest; - m_assembler.loadConstant((offset), scr); - m_assembler.addlRegReg(base, scr); - m_assembler.movlMemReg(scr, dest); + m_assembler.loadConstant(offset, scr); + if (base == SH4Registers::r0) + m_assembler.movlR0mr(scr, dest); + else { + m_assembler.addlRegReg(base, scr); + m_assembler.movlMemReg(scr, dest); + } if (dest == base) releaseScratch(scr); @@ -666,59 +764,29 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) return; } - if ((offset > 0) && (offset < 64) && (dest == SH4Registers::r0)) { + if ((offset > 0) && (offset <= 15) && (dest == SH4Registers::r0)) { m_assembler.movbMemReg(offset, base, dest); return; } - if (base != dest) { - m_assembler.loadConstant((offset), dest); - m_assembler.addlRegReg(base, dest); - m_assembler.movbMemReg(dest, dest); - return; + RegisterID scr = (dest == base) ? claimScratch() : dest; + + m_assembler.loadConstant(offset, scr); + if (base == SH4Registers::r0) + m_assembler.movbR0mr(scr, dest); + else { + m_assembler.addlRegReg(base, scr); + m_assembler.movbMemReg(scr, dest); } - RegisterID scr = claimScratch(); - m_assembler.loadConstant((offset), scr); - m_assembler.addlRegReg(base, scr); - m_assembler.movbMemReg(scr, dest); - releaseScratch(scr); + if (dest == base) + releaseScratch(scr); } void load8(RegisterID base, int offset, RegisterID dest) { - if (!offset) { - m_assembler.movbMemReg(base, dest); - m_assembler.extub(dest, dest); - return; - } - - if ((offset > 0) && (offset < 64) && (dest == SH4Registers::r0)) { - m_assembler.movbMemReg(offset, base, dest); - m_assembler.extub(dest, dest); - return; - } - - if (base != dest) { - m_assembler.loadConstant((offset), dest); - m_assembler.addlRegReg(base, dest); - m_assembler.movbMemReg(dest, dest); - m_assembler.extub(dest, dest); - return; - } - - RegisterID scr = claimScratch(); - m_assembler.loadConstant((offset), scr); - m_assembler.addlRegReg(base, scr); - m_assembler.movbMemReg(scr, dest); + load8Signed(base, offset, dest); m_assembler.extub(dest, dest); - releaseScratch(scr); - } - - void load32(RegisterID r0, RegisterID src, RegisterID dst) - { - ASSERT(r0 == SH4Registers::r0); - m_assembler.movlR0mr(src, dst); } void load32(RegisterID src, RegisterID dst) @@ -730,47 +798,39 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { if (!address.offset) { m_assembler.movwMemReg(address.base, dest); - extuw(dest, dest); + m_assembler.extuw(dest, dest); return; } - if ((address.offset > 0) && (address.offset < 64) && (dest == SH4Registers::r0)) { - m_assembler.movwMemReg(address.offset, address.base, dest); - extuw(dest, dest); + if ((address.offset > 0) && (address.offset <= 30) && (dest == SH4Registers::r0)) { + m_assembler.movwMemReg(address.offset >> 1, address.base, dest); + m_assembler.extuw(dest, dest); return; } - if (address.base != dest) { - m_assembler.loadConstant((address.offset), dest); - m_assembler.addlRegReg(address.base, dest); - m_assembler.movwMemReg(dest, dest); - extuw(dest, dest); - return; + RegisterID scr = (dest == address.base) ? claimScratch() : dest; + + m_assembler.loadConstant(address.offset, scr); + if (address.base == SH4Registers::r0) + m_assembler.movwR0mr(scr, dest); + else { + m_assembler.addlRegReg(address.base, scr); + m_assembler.movwMemReg(scr, dest); } + m_assembler.extuw(dest, dest); - RegisterID scr = claimScratch(); - m_assembler.loadConstant((address.offset), scr); - m_assembler.addlRegReg(address.base, scr); - m_assembler.movwMemReg(scr, dest); - extuw(dest, dest); - releaseScratch(scr); + if (dest == address.base) + releaseScratch(scr); } void load16Unaligned(BaseIndex address, RegisterID dest) { - RegisterID scr = claimScratch(); - RegisterID scr1 = claimScratch(); - move(address.index, scr); - lshift32(TrustedImm32(address.scale), scr); - - if (address.offset) - add32(TrustedImm32(address.offset), scr); + loadEffectiveAddress(address, scr); - add32(address.base, scr); - load8(scr, scr1); - add32(TrustedImm32(1), scr); + RegisterID scr1 = claimScratch(); + load8PostInc(scr, scr1); load8(scr, dest); m_assembler.shllImm8r(8, dest); or32(scr1, dest); @@ -782,7 +842,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void load16(RegisterID src, RegisterID dest) { m_assembler.movwMemReg(src, dest); - extuw(dest, dest); + m_assembler.extuw(dest, dest); } void load16Signed(RegisterID src, RegisterID dest) @@ -790,68 +850,63 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.movwMemReg(src, dest); } - void load16(RegisterID r0, RegisterID src, RegisterID dest) + void load16(BaseIndex address, RegisterID dest) { - ASSERT(r0 == SH4Registers::r0); - m_assembler.movwR0mr(src, dest); - extuw(dest, dest); + load16Signed(address, dest); + m_assembler.extuw(dest, dest); } - void load16Signed(RegisterID r0, RegisterID src, RegisterID dest) + void load16PostInc(RegisterID base, RegisterID dest) { - ASSERT(r0 == SH4Registers::r0); - m_assembler.movwR0mr(src, dest); + m_assembler.movwMemRegIn(base, dest); + m_assembler.extuw(dest, dest); } - void load16(BaseIndex address, RegisterID dest) + void load16Signed(BaseIndex address, RegisterID dest) { RegisterID scr = claimScratch(); move(address.index, scr); lshift32(TrustedImm32(address.scale), scr); + add32(TrustedImm32(address.offset), scr); - if (address.offset) - add32(TrustedImm32(address.offset), scr); if (address.base == SH4Registers::r0) - load16(address.base, scr, dest); + m_assembler.movwR0mr(scr, dest); else { add32(address.base, scr); - load16(scr, dest); + load16Signed(scr, dest); } releaseScratch(scr); } - void load16Signed(BaseIndex address, RegisterID dest) + void store8(RegisterID src, BaseIndex address) { RegisterID scr = claimScratch(); move(address.index, scr); lshift32(TrustedImm32(address.scale), scr); + add32(TrustedImm32(address.offset), scr); - if (address.offset) - add32(TrustedImm32(address.offset), scr); if (address.base == SH4Registers::r0) - load16Signed(address.base, scr, dest); + m_assembler.movbRegMemr0(src, scr); else { add32(address.base, scr); - load16Signed(scr, dest); + m_assembler.movbRegMem(src, scr); } releaseScratch(scr); } - void store8(RegisterID src, BaseIndex address) + void store8(TrustedImm32 imm, void* address) { - RegisterID scr = claimScratch(); - - move(address.index, scr); - lshift32(TrustedImm32(address.scale), scr); - add32(address.base, scr); - - m_assembler.movbRegMem(src, scr); - - releaseScratch(scr); + RegisterID srcval = claimScratch(); + RegisterID dstptr = claimScratch(); + move(imm, srcval); + m_assembler.loadConstant(reinterpret_cast(address), dstptr); + m_assembler.movbRegMem(srcval, dstptr); + releaseScratch(dstptr); + releaseScratch(srcval); } void store16(RegisterID src, BaseIndex address) @@ -860,46 +915,39 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) move(address.index, scr); lshift32(TrustedImm32(address.scale), scr); - add32(address.base, scr); + add32(TrustedImm32(address.offset), scr); - m_assembler.movwRegMem(src, scr); + if (address.base == SH4Registers::r0) + m_assembler.movwRegMemr0(src, scr); + else { + add32(address.base, scr); + m_assembler.movwRegMem(src, scr); + } releaseScratch(scr); } void store32(RegisterID src, ImplicitAddress address) { - RegisterID scr = claimScratch(); - store32(src, address.offset, address.base, scr); - releaseScratch(scr); - } - - void store32(RegisterID src, int offset, RegisterID base, RegisterID scr) - { - if (!offset) { - m_assembler.movlRegMem(src, base); + if (!address.offset) { + m_assembler.movlRegMem(src, address.base); return; } - if ((offset >=0) && (offset < 64)) { - m_assembler.movlRegMem(src, offset >> 2, base); + if ((address.offset >= 0) && (address.offset < 64)) { + m_assembler.movlRegMem(src, address.offset >> 2, address.base); return; } - m_assembler.loadConstant((offset), scr); - if (scr == SH4Registers::r0) { - m_assembler.movlRegMemr0(src, base); - return; + RegisterID scr = claimScratch(); + m_assembler.loadConstant(address.offset, scr); + if (address.base == SH4Registers::r0) + m_assembler.movlRegMemr0(src, scr); + else { + m_assembler.addlRegReg(address.base, scr); + m_assembler.movlRegMem(src, scr); } - - m_assembler.addlRegReg(base, scr); - m_assembler.movlRegMem(src, scr); - } - - void store32(RegisterID src, RegisterID offset, RegisterID base) - { - ASSERT(offset == SH4Registers::r0); - m_assembler.movlRegMemr0(src, base); + releaseScratch(scr); } void store32(RegisterID src, RegisterID dst) @@ -910,11 +958,9 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void store32(TrustedImm32 imm, ImplicitAddress address) { RegisterID scr = claimScratch(); - RegisterID scr1 = claimScratch(); - m_assembler.loadConstant((imm.m_value), scr); - store32(scr, address.offset, address.base, scr1); + m_assembler.loadConstant(imm.m_value, scr); + store32(scr, address); releaseScratch(scr); - releaseScratch(scr1); } void store32(RegisterID src, BaseIndex address) @@ -933,8 +979,8 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { RegisterID scr = claimScratch(); RegisterID scr1 = claimScratch(); - m_assembler.loadConstant((imm.m_value), scr); - m_assembler.loadConstant(reinterpret_cast(address), scr1); + m_assembler.loadConstant(imm.m_value, scr); + move(TrustedImmPtr(address), scr1); m_assembler.movlRegMem(scr, scr1); releaseScratch(scr); releaseScratch(scr1); @@ -943,11 +989,24 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void store32(RegisterID src, void* address) { RegisterID scr = claimScratch(); - m_assembler.loadConstant(reinterpret_cast(address), scr); + move(TrustedImmPtr(address), scr); m_assembler.movlRegMem(src, scr); releaseScratch(scr); } + void store32(TrustedImm32 imm, BaseIndex address) + { + RegisterID destptr = claimScratch(); + + loadEffectiveAddress(address, destptr); + + RegisterID srcval = claimScratch(); + move(imm, srcval); + m_assembler.movlRegMem(srcval, destptr); + releaseScratch(srcval); + releaseScratch(destptr); + } + DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) { RegisterID scr = claimScratch(); @@ -973,8 +1032,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) DataLabelCompact load32WithCompactAddressOffsetPatch(Address address, RegisterID dest) { DataLabelCompact dataLabel(this); - ASSERT(address.offset <= MaximumCompactPtrAlignedAddressOffset); - ASSERT(address.offset >= 0); + ASSERT(isCompactPtrAlignedAddressOffset(address.offset)); m_assembler.movlMemRegCompact(address.offset >> 2, address.base, dest); return dataLabel; } @@ -997,7 +1055,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) static bool supportsFloatingPoint() { return true; } static bool supportsFloatingPointTruncate() { return true; } static bool supportsFloatingPointSqrt() { return true; } - static bool supportsFloatingPointAbs() { return false; } + static bool supportsFloatingPointAbs() { return true; } void moveDoubleToInts(FPRegisterID src, RegisterID dest1, RegisterID dest2) { @@ -1007,24 +1065,39 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.stsfpulReg(dest2); } - void moveIntsToDouble(RegisterID src1, RegisterID src2, FPRegisterID dest, FPRegisterID scratch) + void moveIntsToDouble(RegisterID src1, RegisterID src2, FPRegisterID dest, FPRegisterID) { - UNUSED_PARAM(scratch); m_assembler.ldsrmfpul(src1); m_assembler.fstsfpul((FPRegisterID)(dest + 1)); m_assembler.ldsrmfpul(src2); m_assembler.fstsfpul(dest); } + void moveDouble(FPRegisterID src, FPRegisterID dest) + { + if (src != dest) { + m_assembler.fmovsRegReg((FPRegisterID)(src + 1), (FPRegisterID)(dest + 1)); + m_assembler.fmovsRegReg(src, dest); + } + } + + void swapDouble(FPRegisterID fr1, FPRegisterID fr2) + { + if (fr1 != fr2) { + m_assembler.fldsfpul((FPRegisterID)(fr1 + 1)); + m_assembler.fmovsRegReg((FPRegisterID)(fr2 + 1), (FPRegisterID)(fr1 + 1)); + m_assembler.fstsfpul((FPRegisterID)(fr2 + 1)); + m_assembler.fldsfpul(fr1); + m_assembler.fmovsRegReg(fr2, fr1); + m_assembler.fstsfpul(fr2); + } + } + void loadFloat(BaseIndex address, FPRegisterID dest) { RegisterID scr = claimScratch(); - move(address.index, scr); - lshift32(TrustedImm32(address.scale), scr); - add32(address.base, scr); - if (address.offset) - add32(TrustedImm32(address.offset), scr); + loadEffectiveAddress(address, scr); m_assembler.fmovsReadrm(scr, dest); releaseScratch(scr); @@ -1034,11 +1107,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { RegisterID scr = claimScratch(); - move(address.index, scr); - lshift32(TrustedImm32(address.scale), scr); - add32(address.base, scr); - if (address.offset) - add32(TrustedImm32(address.offset), scr); + loadEffectiveAddress(address, scr); m_assembler.fmovsReadrminc(scr, (FPRegisterID)(dest + 1)); m_assembler.fmovsReadrm(scr, dest); @@ -1067,7 +1136,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void loadDouble(const void* address, FPRegisterID dest) { RegisterID scr = claimScratch(); - m_assembler.loadConstant(reinterpret_cast(address), scr); + move(TrustedImmPtr(address), scr); m_assembler.fmovsReadrminc(scr, (FPRegisterID)(dest + 1)); m_assembler.fmovsReadrm(scr, dest); releaseScratch(scr); @@ -1076,26 +1145,18 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void storeFloat(FPRegisterID src, BaseIndex address) { RegisterID scr = claimScratch(); - - move(address.index, scr); - lshift32(TrustedImm32(address.scale), scr); - add32(address.base, scr); - if (address.offset) - add32(TrustedImm32(address.offset), scr); - + loadEffectiveAddress(address, scr); m_assembler.fmovsWriterm(src, scr); - releaseScratch(scr); } void storeDouble(FPRegisterID src, ImplicitAddress address) { RegisterID scr = claimScratch(); - m_assembler.loadConstant(address.offset, scr); + m_assembler.loadConstant(address.offset + 8, scr); m_assembler.addlRegReg(address.base, scr); - m_assembler.fmovsWriterm((FPRegisterID)(src + 1), scr); - m_assembler.addlImm8r(4, scr); - m_assembler.fmovsWriterm(src, scr); + m_assembler.fmovsWriterndec(src, scr); + m_assembler.fmovsWriterndec((FPRegisterID)(src + 1), scr); releaseScratch(scr); } @@ -1103,15 +1164,10 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { RegisterID scr = claimScratch(); - move(address.index, scr); - lshift32(TrustedImm32(address.scale), scr); - add32(address.base, scr); - if (address.offset) - add32(TrustedImm32(address.offset), scr); + loadEffectiveAddress(address, scr, 8); - m_assembler.fmovsWriterm((FPRegisterID)(src + 1), scr); - m_assembler.addlImm8r(4, scr); - m_assembler.fmovsWriterm(src, scr); + m_assembler.fmovsWriterndec(src, scr); + m_assembler.fmovsWriterndec((FPRegisterID)(src + 1), scr); releaseScratch(scr); } @@ -1119,13 +1175,22 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void addDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) { if (op1 == dest) - m_assembler.daddRegReg(op2, dest); + addDouble(op2, dest); else { - m_assembler.dmovRegReg(op1, dest); - m_assembler.daddRegReg(op2, dest); + moveDouble(op2, dest); + addDouble(op1, dest); } } + void storeDouble(FPRegisterID src, const void* address) + { + RegisterID scr = claimScratch(); + m_assembler.loadConstant(reinterpret_cast(const_cast(address)) + 8, scr); + m_assembler.fmovsWriterndec(src, scr); + m_assembler.fmovsWriterndec((FPRegisterID)(src + 1), scr); + releaseScratch(scr); + } + void addDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.daddRegReg(src, dest); @@ -1148,6 +1213,18 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.dsubRegReg(src, dest); } + void subDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) + { + if (op2 == dest) { + moveDouble(op1, fscratch); + subDouble(op2, fscratch); + moveDouble(fscratch, dest); + } else { + moveDouble(op1, dest); + subDouble(op2, dest); + } + } + void subDouble(Address address, FPRegisterID dest) { loadDouble(address, fscratch); @@ -1159,6 +1236,16 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.dmulRegReg(src, dest); } + void mulDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) + { + if (op1 == dest) + mulDouble(op2, dest); + else { + moveDouble(op2, dest); + mulDouble(op1, dest); + } + } + void mulDouble(Address address, FPRegisterID dest) { loadDouble(address, fscratch); @@ -1170,6 +1257,24 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.ddivRegReg(src, dest); } + void divDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) + { + if (op2 == dest) { + moveDouble(op1, fscratch); + divDouble(op2, fscratch); + moveDouble(fscratch, dest); + } else { + moveDouble(op1, dest); + divDouble(op2, dest); + } + } + + void negateDouble(FPRegisterID src, FPRegisterID dest) + { + moveDouble(src, dest); + m_assembler.dneg(dest); + } + void convertFloatToDouble(FPRegisterID src, FPRegisterID dst) { m_assembler.fldsfpul(src); @@ -1191,7 +1296,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) { RegisterID scr = claimScratch(); - m_assembler.loadConstant(reinterpret_cast(src.m_ptr), scr); + load32(src.m_ptr, scr); convertInt32ToDouble(scr, dest); releaseScratch(scr); } @@ -1214,18 +1319,13 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) if (dest != SH4Registers::r0) move(SH4Registers::r0, scr1); - move(address.index, scr); - lshift32(TrustedImm32(address.scale), scr); - add32(address.base, scr); - - if (address.offset) - add32(TrustedImm32(address.offset), scr); + loadEffectiveAddress(address, scr); - m_assembler.ensureSpace(m_assembler.maxInstructionSize + 68, sizeof(uint32_t)); + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 58, sizeof(uint32_t)); move(scr, SH4Registers::r0); - m_assembler.andlImm8r(0x3, SH4Registers::r0); - m_assembler.cmpEqImmR0(0x0, SH4Registers::r0); + m_assembler.testlImm8r(0x3, SH4Registers::r0); m_jump = Jump(m_assembler.jne(), SH4Assembler::JumpNear); + if (dest != SH4Registers::r0) move(scr1, SH4Registers::r0); @@ -1233,27 +1333,23 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) end.append(Jump(m_assembler.bra(), SH4Assembler::JumpNear)); m_assembler.nop(); m_jump.link(this); - m_assembler.andlImm8r(0x1, SH4Registers::r0); - m_assembler.cmpEqImmR0(0x0, SH4Registers::r0); + m_assembler.testlImm8r(0x1, SH4Registers::r0); if (dest != SH4Registers::r0) move(scr1, SH4Registers::r0); m_jump = Jump(m_assembler.jne(), SH4Assembler::JumpNear); - load16(scr, scr1); - add32(TrustedImm32(2), scr); + load16PostInc(scr, scr1); load16(scr, dest); m_assembler.shllImm8r(16, dest); or32(scr1, dest); end.append(Jump(m_assembler.bra(), SH4Assembler::JumpNear)); m_assembler.nop(); m_jump.link(this); - load8(scr, scr1); - add32(TrustedImm32(1), scr); - load16(scr, dest); + load8PostInc(scr, scr1); + load16PostInc(scr, dest); m_assembler.shllImm8r(8, dest); or32(dest, scr1); - add32(TrustedImm32(2), scr); load8(scr, dest); m_assembler.shllImm8r(8, dest); m_assembler.shllImm8r(16, dest); @@ -1300,20 +1396,13 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) } if (cond == DoubleNotEqual) { - RegisterID scr = claimScratch(); JumpList end; - m_assembler.loadConstant(0x7fbfffff, scratchReg3); - m_assembler.dcnvds(right); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); + m_assembler.dcmppeq(left, left); m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); - m_assembler.dcnvds(left); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); + end.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); + m_assembler.dcmppeq(right, right); + end.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); m_assembler.dcmppeq(right, left); - releaseScratch(scr); Jump m_jump = branchFalse(); end.link(this); return m_jump; @@ -1325,8 +1414,16 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) } if (cond == DoubleGreaterThanOrEqual) { + JumpList end; + m_assembler.dcmppeq(left, left); + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); + end.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); + m_assembler.dcmppeq(right, right); + end.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); m_assembler.dcmppgt(left, right); - return branchFalse(); + Jump m_jump = branchFalse(); + end.link(this); + return m_jump; } if (cond == DoubleLessThan) { @@ -1335,134 +1432,73 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) } if (cond == DoubleLessThanOrEqual) { + JumpList end; + m_assembler.dcmppeq(left, left); + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); + end.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); + m_assembler.dcmppeq(right, right); + end.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); m_assembler.dcmppgt(right, left); - return branchFalse(); + Jump m_jump = branchFalse(); + end.link(this); + return m_jump; } if (cond == DoubleEqualOrUnordered) { - RegisterID scr = claimScratch(); - JumpList end; - m_assembler.loadConstant(0x7fbfffff, scratchReg3); - m_assembler.dcnvds(right); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); + JumpList takeBranch; + m_assembler.dcmppeq(left, left); m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); - m_assembler.dcnvds(left); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); + takeBranch.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); + m_assembler.dcmppeq(right, right); + takeBranch.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); m_assembler.dcmppeq(left, right); Jump m_jump = Jump(m_assembler.je()); - end.link(this); - m_assembler.extraInstrForBranch(scr); - releaseScratch(scr); + takeBranch.link(this); + m_assembler.extraInstrForBranch(scratchReg3); return m_jump; } if (cond == DoubleGreaterThanOrUnordered) { - RegisterID scr = claimScratch(); - JumpList end; - m_assembler.loadConstant(0x7fbfffff, scratchReg3); - m_assembler.dcnvds(right); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); + JumpList takeBranch; + m_assembler.dcmppeq(left, left); m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); - m_assembler.dcnvds(left); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); + takeBranch.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); + m_assembler.dcmppeq(right, right); + takeBranch.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); m_assembler.dcmppgt(right, left); Jump m_jump = Jump(m_assembler.je()); - end.link(this); - m_assembler.extraInstrForBranch(scr); - releaseScratch(scr); + takeBranch.link(this); + m_assembler.extraInstrForBranch(scratchReg3); return m_jump; } if (cond == DoubleGreaterThanOrEqualOrUnordered) { - RegisterID scr = claimScratch(); - JumpList end; - m_assembler.loadConstant(0x7fbfffff, scratchReg3); - m_assembler.dcnvds(right); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); - m_assembler.dcnvds(left); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); m_assembler.dcmppgt(left, right); - Jump m_jump = Jump(m_assembler.jne()); - end.link(this); - m_assembler.extraInstrForBranch(scr); - releaseScratch(scr); - return m_jump; + return branchFalse(); } if (cond == DoubleLessThanOrUnordered) { - RegisterID scr = claimScratch(); - JumpList end; - m_assembler.loadConstant(0x7fbfffff, scratchReg3); - m_assembler.dcnvds(right); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); + JumpList takeBranch; + m_assembler.dcmppeq(left, left); m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); - m_assembler.dcnvds(left); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); + takeBranch.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); + m_assembler.dcmppeq(right, right); + takeBranch.append(Jump(m_assembler.jne(), SH4Assembler::JumpNear)); m_assembler.dcmppgt(left, right); Jump m_jump = Jump(m_assembler.je()); - end.link(this); - m_assembler.extraInstrForBranch(scr); - releaseScratch(scr); + takeBranch.link(this); + m_assembler.extraInstrForBranch(scratchReg3); return m_jump; } if (cond == DoubleLessThanOrEqualOrUnordered) { - RegisterID scr = claimScratch(); - JumpList end; - m_assembler.loadConstant(0x7fbfffff, scratchReg3); - m_assembler.dcnvds(right); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); - m_assembler.dcnvds(left); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); m_assembler.dcmppgt(right, left); - Jump m_jump = Jump(m_assembler.jne()); - end.link(this); - m_assembler.extraInstrForBranch(scr); - releaseScratch(scr); - return m_jump; + return branchFalse(); } ASSERT(cond == DoubleNotEqualOrUnordered); - RegisterID scr = claimScratch(); - JumpList end; - m_assembler.loadConstant(0x7fbfffff, scratchReg3); - m_assembler.dcnvds(right); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - m_assembler.ensureSpace(m_assembler.maxInstructionSize + 22, sizeof(uint32_t)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); - m_assembler.dcnvds(left); - m_assembler.stsfpulReg(scr); - m_assembler.cmplRegReg(scratchReg3, scr, SH4Condition(Equal)); - end.append(Jump(m_assembler.je(), SH4Assembler::JumpNear)); m_assembler.dcmppeq(right, left); - Jump m_jump = Jump(m_assembler.jne()); - end.link(this); - m_assembler.extraInstrForBranch(scr); - releaseScratch(scr); - return m_jump; + return branchFalse(); } Jump branchTrue() @@ -1498,14 +1534,14 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void sqrtDouble(FPRegisterID src, FPRegisterID dest) { - if (dest != src) - m_assembler.dmovRegReg(src, dest); + moveDouble(src, dest); m_assembler.dsqrt(dest); } - void absDouble(FPRegisterID, FPRegisterID) + void absDouble(FPRegisterID src, FPRegisterID dest) { - ASSERT_NOT_REACHED(); + moveDouble(src, dest); + m_assembler.dabs(dest); } Jump branchTest8(ResultCondition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) @@ -1529,8 +1565,12 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void signExtend32ToPtr(RegisterID src, RegisterID dest) { - if (src != dest) - move(src, dest); + move(src, dest); + } + + void zeroExtend32ToPtr(RegisterID src, RegisterID dest) + { + move(src, dest); } Jump branch8(RelationalCondition cond, Address left, TrustedImm32 right) @@ -1550,17 +1590,77 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) releaseScratch(addressTempRegister); } - Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) + enum BranchTruncateType { BranchIfTruncateFailed, BranchIfTruncateSuccessful }; + Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest, BranchTruncateType branchType = BranchIfTruncateFailed) + { + Jump result; + truncateDoubleToInt32(src, dest); + RegisterID intscr = claimScratch(); + m_assembler.loadConstant(0x7fffffff, intscr); + m_assembler.cmplRegReg(dest, intscr, SH4Condition(Equal)); + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 12, sizeof(uint32_t)); + if (branchType == BranchIfTruncateFailed) { + m_assembler.branch(BT_OPCODE, 2); + m_assembler.addlImm8r(1, intscr); + m_assembler.cmplRegReg(dest, intscr, SH4Condition(Equal)); + result = branchTrue(); + } else { + Jump out = Jump(m_assembler.je(), SH4Assembler::JumpNear); + m_assembler.addlImm8r(1, intscr); + m_assembler.cmplRegReg(dest, intscr, SH4Condition(Equal)); + result = branchFalse(); + out.link(this); + } + releaseScratch(intscr); + return result; + } + + Jump branchTruncateDoubleToUint32(FPRegisterID src, RegisterID dest, BranchTruncateType branchType = BranchIfTruncateFailed) + { + Jump result; + RegisterID intscr = claimScratch(); + m_assembler.loadConstant(0x80000000, intscr); + convertInt32ToDouble(intscr, fscratch); + addDouble(src, fscratch); + truncateDoubleToInt32(fscratch, dest); + m_assembler.cmplRegReg(dest, intscr, SH4Condition(Equal)); + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 16, sizeof(uint32_t)); + if (branchType == BranchIfTruncateFailed) { + m_assembler.branch(BT_OPCODE, 4); + m_assembler.addlImm8r(-1, intscr); + m_assembler.cmplRegReg(dest, intscr, SH4Condition(Equal)); + m_assembler.addlImm8r(1, intscr); + m_assembler.sublRegReg(intscr, dest); + result = branchTrue(); + } else { + Jump out = Jump(m_assembler.je(), SH4Assembler::JumpNear); + m_assembler.addlImm8r(-1, intscr); + m_assembler.cmplRegReg(dest, intscr, SH4Condition(Equal)); + m_assembler.addlImm8r(1, intscr); + m_assembler.sublRegReg(intscr, dest); + result = branchFalse(); + out.link(this); + } + releaseScratch(intscr); + return result; + } + + void truncateDoubleToInt32(FPRegisterID src, RegisterID dest) { m_assembler.ftrcdrmfpul(src); m_assembler.stsfpulReg(dest); - m_assembler.loadConstant(0x7fffffff, scratchReg3); - m_assembler.cmplRegReg(dest, scratchReg3, SH4Condition(Equal)); - m_assembler.ensureSpace(m_assembler.maxInstructionSize + 14, sizeof(uint32_t)); - m_assembler.branch(BT_OPCODE, 2); - m_assembler.addlImm8r(1, scratchReg3); - m_assembler.cmplRegReg(dest, scratchReg3, SH4Condition(Equal)); - return branchTrue(); + } + + void truncateDoubleToUint32(FPRegisterID src, RegisterID dest) + { + RegisterID intscr = claimScratch(); + m_assembler.loadConstant(0x80000000, intscr); + convertInt32ToDouble(intscr, fscratch); + addDouble(src, fscratch); + m_assembler.ftrcdrmfpul(fscratch); + m_assembler.stsfpulReg(dest); + m_assembler.sublRegReg(intscr, dest); + releaseScratch(intscr); } // Stack manipulation operations @@ -1575,27 +1675,6 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.pushReg(src); } - void push(Address address) - { - if (!address.offset) { - push(address.base); - return; - } - - if ((address.offset < 0) || (address.offset >= 64)) { - RegisterID scr = claimScratch(); - m_assembler.loadConstant(address.offset, scr); - m_assembler.addlRegReg(address.base, scr); - m_assembler.movlMemReg(scr, SH4Registers::sp); - m_assembler.addlImm8r(-4, SH4Registers::sp); - releaseScratch(scr); - return; - } - - m_assembler.movlMemReg(address.offset >> 2, address.base, SH4Registers::sp); - m_assembler.addlImm8r(-4, SH4Registers::sp); - } - void push(TrustedImm32 imm) { RegisterID scr = claimScratch(); @@ -1630,9 +1709,13 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.loadConstant(imm.asIntptr(), dest); } - void extuw(RegisterID src, RegisterID dst) + void swap(RegisterID reg1, RegisterID reg2) { - m_assembler.extuw(src, dst); + if (reg1 != reg2) { + xor32(reg1, reg2); + xor32(reg2, reg1); + xor32(reg1, reg2); + } } void compare32(RelationalCondition cond, RegisterID left, RegisterID right, RegisterID dest) @@ -1744,7 +1827,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { RegisterID scr = claimScratch(); - move(TrustedImm32(reinterpret_cast(left.m_ptr)), scr); + load32(left.m_ptr, scr); m_assembler.cmplRegReg(right, scr, SH4Condition(cond)); releaseScratch(scr); @@ -1757,7 +1840,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { RegisterID addressTempRegister = claimScratch(); - m_assembler.loadConstant(reinterpret_cast(left.m_ptr), addressTempRegister); + move(TrustedImmPtr(left.m_ptr), addressTempRegister); m_assembler.movlMemReg(addressTempRegister, addressTempRegister); compare32(right.m_value, addressTempRegister, cond); releaseScratch(addressTempRegister); @@ -1770,21 +1853,18 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) Jump branch8(RelationalCondition cond, BaseIndex left, TrustedImm32 right) { ASSERT(!(right.m_value & 0xFFFFFF00)); - RegisterID scr = claimScratch(); + RegisterID lefttmp = claimScratch(); - move(left.index, scr); - lshift32(TrustedImm32(left.scale), scr); + loadEffectiveAddress(left, lefttmp); - if (left.offset) - add32(TrustedImm32(left.offset), scr); - add32(left.base, scr); - load8(scr, scr); - RegisterID scr1 = claimScratch(); - m_assembler.loadConstant(right.m_value, scr1); - releaseScratch(scr); - releaseScratch(scr1); + load8(lefttmp, lefttmp); + RegisterID righttmp = claimScratch(); + m_assembler.loadConstant(right.m_value, righttmp); - return branch32(cond, scr, scr1); + Jump result = branch32(cond, lefttmp, righttmp); + releaseScratch(lefttmp); + releaseScratch(righttmp); + return result; } Jump branchTest32(ResultCondition cond, RegisterID reg, RegisterID mask) @@ -1828,6 +1908,8 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) Jump branchTest32(ResultCondition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { + ASSERT((cond == Zero) || (cond == NonZero)); + RegisterID scr = claimScratch(); move(address.index, scr); @@ -1860,60 +1942,102 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void jump(Address address) { RegisterID scr = claimScratch(); - - if ((address.offset < 0) || (address.offset >= 64)) { - m_assembler.loadConstant(address.offset, scr); - m_assembler.addlRegReg(address.base, scr); - m_assembler.movlMemReg(scr, scr); - } else if (address.offset) - m_assembler.movlMemReg(address.offset >> 2, address.base, scr); - else - m_assembler.movlMemReg(address.base, scr); + load32(address, scr); m_assembler.jmpReg(scr); + releaseScratch(scr); + } + + void jump(AbsoluteAddress address) + { + RegisterID scr = claimScratch(); + move(TrustedImmPtr(address.m_ptr), scr); + m_assembler.movlMemReg(scr, scr); + m_assembler.jmpReg(scr); releaseScratch(scr); } // Arithmetic control flow operations - Jump branchAdd32(ResultCondition cond, RegisterID src, RegisterID dest) + Jump branchNeg32(ResultCondition cond, RegisterID srcDest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + if (cond == Overflow) + return branchMul32(cond, TrustedImm32(-1), srcDest, srcDest); + + neg32(srcDest); + + if (cond == Signed) { + m_assembler.cmppz(srcDest); + return branchFalse(); + } + + compare32(0, srcDest, Equal); + return (cond == NonZero) ? branchFalse() : branchTrue(); + } + + Jump branchAdd32(ResultCondition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); + if (cond == Overflow) { m_assembler.addvlRegReg(src, dest); return branchTrue(); } - if (cond == Signed) { - m_assembler.addlRegReg(src, dest); - // Check if dest is negative + m_assembler.addlRegReg(src, dest); + + if ((cond == Signed) || (cond == PositiveOrZero)) { m_assembler.cmppz(dest); - return branchFalse(); + return (cond == Signed) ? branchFalse() : branchTrue(); } - m_assembler.addlRegReg(src, dest); compare32(0, dest, Equal); + return (cond == NonZero) ? branchFalse() : branchTrue(); + } - if (cond == NonZero) // NotEqual - return branchFalse(); - return branchTrue(); + Jump branchAdd32(ResultCondition cond, RegisterID src1, RegisterID src2, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); + + if (cond == Overflow) { + if (src1 == dest) + m_assembler.addvlRegReg(src2, dest); + else { + move(src2, dest); + m_assembler.addvlRegReg(src1, dest); + } + return branchTrue(); + } + + add32(src1, src2, dest); + + if ((cond == Signed) || (cond == PositiveOrZero)) { + m_assembler.cmppz(dest); + return (cond == Signed) ? branchFalse() : branchTrue(); + } + + compare32(0, dest, Equal); + return (cond == NonZero) ? branchFalse() : branchTrue(); } Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); - move(imm, scratchReg3); - return branchAdd32(cond, scratchReg3, dest); + RegisterID immval = claimScratch(); + move(imm, immval); + Jump result = branchAdd32(cond, immval, dest); + releaseScratch(immval); + return result; } Jump branchAdd32(ResultCondition cond, RegisterID src, TrustedImm32 imm, RegisterID dest) { - ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); - if (src != dest) - move(src, dest); + move(src, dest); if (cond == Overflow) { move(imm, scratchReg3); @@ -1923,16 +2047,42 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) add32(imm, dest); - if (cond == Signed) { + if ((cond == Signed) || (cond == PositiveOrZero)) { m_assembler.cmppz(dest); - return branchFalse(); + return (cond == Signed) ? branchFalse() : branchTrue(); } compare32(0, dest, Equal); + return (cond == NonZero) ? branchFalse() : branchTrue(); + } - if (cond == NonZero) // NotEqual - return branchFalse(); - return branchTrue(); + Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, AbsoluteAddress dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == PositiveOrZero) || (cond == Zero) || (cond == NonZero)); + bool result; + + move(imm, scratchReg3); + RegisterID destptr = claimScratch(); + RegisterID destval = claimScratch(); + move(TrustedImmPtr(dest.m_ptr), destptr); + m_assembler.movlMemReg(destptr, destval); + if (cond == Overflow) { + m_assembler.addvlRegReg(scratchReg3, destval); + result = true; + } else { + m_assembler.addlRegReg(scratchReg3, destval); + if ((cond == Signed) || (cond == PositiveOrZero)) { + m_assembler.cmppz(destval); + result = (cond == PositiveOrZero); + } else { + m_assembler.testlRegReg(destval, destval); + result = (cond != NonZero); + } + } + m_assembler.movlRegMem(destval, destptr); + releaseScratch(destval); + releaseScratch(destptr); + return result ? branchTrue() : branchFalse(); } Jump branchMul32(ResultCondition cond, RegisterID src, RegisterID dest) @@ -1940,44 +2090,72 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); if (cond == Overflow) { - RegisterID scr1 = claimScratch(); - RegisterID scr = claimScratch(); - m_assembler.dmullRegReg(src, dest); + RegisterID scrsign = claimScratch(); + RegisterID msbres = claimScratch(); + m_assembler.dmulslRegReg(src, dest); m_assembler.stsmacl(dest); - m_assembler.movImm8(-31, scr); - m_assembler.movlRegReg(dest, scr1); - m_assembler.shaRegReg(scr1, scr); - m_assembler.stsmach(scr); - m_assembler.cmplRegReg(scr, scr1, SH4Condition(Equal)); - releaseScratch(scr1); - releaseScratch(scr); + m_assembler.cmppz(dest); + m_assembler.movt(scrsign); + m_assembler.addlImm8r(-1, scrsign); + m_assembler.stsmach(msbres); + m_assembler.cmplRegReg(msbres, scrsign, SH4Condition(Equal)); + releaseScratch(msbres); + releaseScratch(scrsign); return branchFalse(); } - m_assembler.imullRegReg(src, dest); - m_assembler.stsmacl(dest); + mul32(src, dest); + if (cond == Signed) { - // Check if dest is negative m_assembler.cmppz(dest); return branchFalse(); } compare32(0, dest, static_cast(cond)); + return (cond == NonZero) ? branchFalse() : branchTrue(); + } - if (cond == NonZero) // NotEqual + Jump branchMul32(ResultCondition cond, RegisterID src1, RegisterID src2, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + + if (cond == Overflow) { + RegisterID scrsign = claimScratch(); + RegisterID msbres = claimScratch(); + m_assembler.dmulslRegReg(src1, src2); + m_assembler.stsmacl(dest); + m_assembler.cmppz(dest); + m_assembler.movt(scrsign); + m_assembler.addlImm8r(-1, scrsign); + m_assembler.stsmach(msbres); + m_assembler.cmplRegReg(msbres, scrsign, SH4Condition(Equal)); + releaseScratch(msbres); + releaseScratch(scrsign); return branchFalse(); - return branchTrue(); + } + + mul32(src1, src2, dest); + + if (cond == Signed) { + m_assembler.cmppz(dest); + return branchFalse(); + } + + compare32(0, dest, Equal); + return (cond == NonZero) ? branchFalse() : branchTrue(); } Jump branchMul32(ResultCondition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); - move(imm, scratchReg3); - if (src != dest) - move(src, dest); + if (src == dest) { + move(imm, scratchReg3); + return branchMul32(cond, scratchReg3, dest); + } - return branchMul32(cond, scratchReg3, dest); + move(imm, dest); + return branchMul32(cond, src, dest); } Jump branchSub32(ResultCondition cond, RegisterID src, RegisterID dest) @@ -1989,76 +2167,92 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) return branchTrue(); } + sub32(src, dest); + if (cond == Signed) { - // Check if dest is negative - m_assembler.sublRegReg(src, dest); - compare32(0, dest, LessThan); - return branchTrue(); + m_assembler.cmppz(dest); + return branchFalse(); } - sub32(src, dest); compare32(0, dest, static_cast(cond)); - - if (cond == NonZero) // NotEqual - return branchFalse(); - return branchTrue(); + return (cond == NonZero) ? branchFalse() : branchTrue(); } Jump branchSub32(ResultCondition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); - move(imm, scratchReg3); - return branchSub32(cond, scratchReg3, dest); + RegisterID immval = claimScratch(); + move(imm, immval); + Jump result = branchSub32(cond, immval, dest); + releaseScratch(immval); + return result; } Jump branchSub32(ResultCondition cond, RegisterID src, TrustedImm32 imm, RegisterID dest) { - move(imm, scratchReg3); - if (src != dest) - move(src, dest); - return branchSub32(cond, scratchReg3, dest); + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + + move(src, dest); + return branchSub32(cond, imm, dest); } Jump branchSub32(ResultCondition cond, RegisterID src1, RegisterID src2, RegisterID dest) { - if (src1 != dest) + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); + + if (src2 != dest) { move(src1, dest); - return branchSub32(cond, src2, dest); + return branchSub32(cond, src2, dest); + } + + if (cond == Overflow) { + RegisterID tmpval = claimScratch(); + move(src1, tmpval); + m_assembler.subvlRegReg(src2, tmpval); + move(tmpval, dest); + releaseScratch(tmpval); + return branchTrue(); + } + + RegisterID tmpval = claimScratch(); + move(src1, tmpval); + sub32(src2, tmpval); + move(tmpval, dest); + releaseScratch(tmpval); + + if (cond == Signed) { + m_assembler.cmppz(dest); + return branchFalse(); + } + + compare32(0, dest, static_cast(cond)); + return (cond == NonZero) ? branchFalse() : branchTrue(); } Jump branchOr32(ResultCondition cond, RegisterID src, RegisterID dest) { ASSERT((cond == Signed) || (cond == Zero) || (cond == NonZero)); + or32(src, dest); + if (cond == Signed) { - or32(src, dest); - compare32(0, dest, static_cast(LessThan)); - return branchTrue(); + m_assembler.cmppz(dest); + return branchFalse(); } - or32(src, dest); compare32(0, dest, static_cast(cond)); - - if (cond == NonZero) // NotEqual - return branchFalse(); - return branchTrue(); + return (cond == NonZero) ? branchFalse() : branchTrue(); } - void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID, bool negZeroCheck = true) { - m_assembler.ftrcdrmfpul(src); - m_assembler.stsfpulReg(dest); + truncateDoubleToInt32(src, dest); convertInt32ToDouble(dest, fscratch); failureCases.append(branchDouble(DoubleNotEqualOrUnordered, fscratch, src)); - if (dest == SH4Registers::r0) - m_assembler.cmpEqImmR0(0, dest); - else { - m_assembler.movImm8(0, scratchReg3); - m_assembler.cmplRegReg(scratchReg3, dest, SH4Condition(Equal)); - } - failureCases.append(branchTrue()); + if (negZeroCheck) + failureCases.append(branch32(Equal, dest, TrustedImm32(0))); } void neg32(RegisterID dst) @@ -2068,31 +2262,40 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void urshift32(RegisterID shiftamount, RegisterID dest) { - if (shiftamount == SH4Registers::r0) - m_assembler.andlImm8r(0x1f, shiftamount); - else { - RegisterID scr = claimScratch(); - m_assembler.loadConstant(0x1f, scr); - m_assembler.andlRegReg(scr, shiftamount); - releaseScratch(scr); - } - m_assembler.neg(shiftamount, shiftamount); - m_assembler.shllRegReg(dest, shiftamount); + RegisterID shiftTmp = claimScratch(); + m_assembler.loadConstant(0x1f, shiftTmp); + m_assembler.andlRegReg(shiftamount, shiftTmp); + m_assembler.neg(shiftTmp, shiftTmp); + m_assembler.shldRegReg(dest, shiftTmp); + releaseScratch(shiftTmp); + } + + void urshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) + { + move(src, dest); + urshift32(shiftAmount, dest); } void urshift32(TrustedImm32 imm, RegisterID dest) { - RegisterID scr = claimScratch(); - m_assembler.loadConstant(-(imm.m_value & 0x1f), scr); - m_assembler.shaRegReg(dest, scr); - releaseScratch(scr); + int immMasked = imm.m_value & 0x1f; + if (!immMasked) + return; + + if ((immMasked == 1) || (immMasked == 2) || (immMasked == 8) || (immMasked == 16)) { + m_assembler.shlrImm8r(immMasked, dest); + return; + } + + RegisterID shiftTmp = claimScratch(); + m_assembler.loadConstant(-immMasked, shiftTmp); + m_assembler.shldRegReg(dest, shiftTmp); + releaseScratch(shiftTmp); } void urshift32(RegisterID src, TrustedImm32 shiftamount, RegisterID dest) { - if (src != dest) - move(src, dest); - + move(src, dest); urshift32(shiftamount, dest); } @@ -2121,6 +2324,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) void breakpoint() { + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 2); m_assembler.bkpt(); m_assembler.nop(); } @@ -2129,6 +2333,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) { RegisterID dataTempRegister = claimScratch(); + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 10, 2 * sizeof(uint32_t)); dataLabel = moveWithPatch(initialRightValue, dataTempRegister); m_assembler.cmplRegReg(dataTempRegister, left, SH4Condition(cond)); releaseScratch(dataTempRegister); @@ -2146,6 +2351,7 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) m_assembler.addlRegReg(left.base, scr); m_assembler.movlMemReg(scr, scr); RegisterID scr1 = claimScratch(); + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 10, 2 * sizeof(uint32_t)); dataLabel = moveWithPatch(initialRightValue, scr1); m_assembler.cmplRegReg(scr1, scr, SH4Condition(cond)); releaseScratch(scr); @@ -2207,13 +2413,12 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) static void replaceWithJump(CodeLocationLabel instructionStart, CodeLocationLabel destination) { - ASSERT_NOT_REACHED(); + SH4Assembler::replaceWithJump(instructionStart.dataLocation(), destination.dataLocation()); } static ptrdiff_t maxJumpReplacementSize() { - ASSERT_NOT_REACHED(); - return 0; + return SH4Assembler::maxJumpReplacementSize(); } static bool canJumpReplacePatchableBranchPtrWithPatch() { return false; } @@ -2223,9 +2428,9 @@ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) return label.labelAtOffset(0); } - static void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, RegisterID, void* initialValue) + static void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, RegisterID rd, void* initialValue) { - SH4Assembler::revertJump(instructionStart.dataLocation(), reinterpret_cast(initialValue) & 0xffff); + SH4Assembler::revertJumpToMove(instructionStart.dataLocation(), rd, reinterpret_cast(initialValue)); } static CodeLocationLabel startOfPatchableBranchPtrWithPatchOnAddress(CodeLocationDataLabelPtr) @@ -2253,9 +2458,20 @@ private: friend class LinkBuffer; friend class RepatchBuffer; - static void linkCall(void*, Call, FunctionPtr); - static void repatchCall(CodeLocationCall, CodeLocationLabel); - static void repatchCall(CodeLocationCall, FunctionPtr); + static void linkCall(void* code, Call call, FunctionPtr function) + { + SH4Assembler::linkCall(code, call.m_label, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + SH4Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + SH4Assembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } }; } // namespace JSC diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h index 53cb80c21..f171dc408 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h @@ -68,6 +68,7 @@ public: enum ResultCondition { Overflow = X86Assembler::ConditionO, Signed = X86Assembler::ConditionS, + PositiveOrZero = X86Assembler::ConditionNS, Zero = X86Assembler::ConditionE, NonZero = X86Assembler::ConditionNE }; @@ -884,13 +885,14 @@ public: // If the result is not representable as a 32 bit value, branch. // May also branch for some values that are representable in 32 bits // (specifically, in this case, 0). - void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp, bool negZeroCheck = true) { ASSERT(isSSE2Present()); m_assembler.cvttsd2si_rr(src, dest); // If the result is zero, it might have been -0.0, and the double comparison won't catch this! - failureCases.append(branchTest32(Zero, dest)); + if (negZeroCheck) + failureCases.append(branchTest32(Zero, dest)); // Convert the integer result back to float & compare to the original value - if not equal or unordered (NaN) then jump. convertInt32ToDouble(dest, fpTemp); diff --git a/Source/JavaScriptCore/assembler/SH4Assembler.h b/Source/JavaScriptCore/assembler/SH4Assembler.h index 39f5585be..fded7df89 100644 --- a/Source/JavaScriptCore/assembler/SH4Assembler.h +++ b/Source/JavaScriptCore/assembler/SH4Assembler.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2013 Cisco Systems, Inc. All rights reserved. * Copyright (C) 2009-2011 STMicroelectronics. All rights reserved. * Copyright (C) 2008 Apple Inc. All rights reserved. * @@ -114,7 +115,9 @@ enum { MOVL_READ_OFFPC_OPCODE = 0xd000, MOVL_READ_OFFRM_OPCODE = 0x5000, MOVW_WRITE_RN_OPCODE = 0x2001, + MOVW_WRITE_R0RN_OPCODE = 0x0005, MOVW_READ_RM_OPCODE = 0x6001, + MOVW_READ_RMINC_OPCODE = 0x6005, MOVW_READ_R0RM_OPCODE = 0x000d, MOVW_READ_OFFRM_OPCODE = 0x8500, MOVW_READ_OFFPC_OPCODE = 0x9000, @@ -175,6 +178,7 @@ enum { STSFPSCR_OPCODE = 0x006a, LDSRMFPUL_OPCODE = 0x405a, FSTSFPULFRN_OPCODE = 0xf00d, + FABS_OPCODE = 0xf05d, FSQRT_OPCODE = 0xf06d, FSCHG_OPCODE = 0xf3fd, CLRT_OPCODE = 8, @@ -333,30 +337,33 @@ public: }; SH4Assembler() + : m_claimscratchReg(0x0) + , m_indexOfLastWatchpoint(INT_MIN) + , m_indexOfTailOfLastWatchpoint(INT_MIN) { - m_claimscratchReg = 0x0; } // SH4 condition codes typedef enum { EQ = 0x0, // Equal NE = 0x1, // Not Equal - HS = 0x2, // Unsigend Greater Than equal - HI = 0x3, // Unsigend Greater Than - LS = 0x4, // Unsigend Lower or Same - LI = 0x5, // Unsigend Lower + HS = 0x2, // Unsigned Greater Than equal + HI = 0x3, // Unsigned Greater Than + LS = 0x4, // Unsigned Lower or Same + LI = 0x5, // Unsigned Lower GE = 0x6, // Greater or Equal LT = 0x7, // Less Than GT = 0x8, // Greater Than LE = 0x9, // Less or Equal OF = 0xa, // OverFlow SI = 0xb, // Signed - EQU= 0xc, // Equal or unordered(NaN) - NEU= 0xd, - GTU= 0xe, - GEU= 0xf, - LTU= 0x10, - LEU= 0x11, + NS = 0xc, // Not Signed + EQU= 0xd, // Equal or unordered(NaN) + NEU= 0xe, + GTU= 0xf, + GEU= 0x10, + LTU= 0x11, + LEU= 0x12, } Condition; // Opaque label types @@ -534,7 +541,7 @@ public: oneShortOp(getOpcodeGroup2(SHLL16_OPCODE, dst)); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -544,28 +551,14 @@ public: oneShortOp(opc); } - void shllRegReg(RegisterID dst, RegisterID rShift) + void shldRegReg(RegisterID dst, RegisterID rShift) { - uint16_t opc = getOpcodeGroup1(SHLD_OPCODE, dst, rShift); - oneShortOp(opc); - } - - void shlrRegReg(RegisterID dst, RegisterID rShift) - { - neg(rShift, rShift); - shllRegReg(dst, rShift); + oneShortOp(getOpcodeGroup1(SHLD_OPCODE, dst, rShift)); } - void sharRegReg(RegisterID dst, RegisterID rShift) + void shadRegReg(RegisterID dst, RegisterID rShift) { - neg(rShift, rShift); - shaRegReg(dst, rShift); - } - - void shaRegReg(RegisterID dst, RegisterID rShift) - { - uint16_t opc = getOpcodeGroup1(SHAD_OPCODE, dst, rShift); - oneShortOp(opc); + oneShortOp(getOpcodeGroup1(SHAD_OPCODE, dst, rShift)); } void shlrImm8r(int imm, RegisterID dst) @@ -584,7 +577,29 @@ public: oneShortOp(getOpcodeGroup2(SHLR16_OPCODE, dst)); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); + } + } + + void shalImm8r(int imm, RegisterID dst) + { + switch (imm) { + case 1: + oneShortOp(getOpcodeGroup2(SHAL_OPCODE, dst)); + break; + default: + RELEASE_ASSERT_NOT_REACHED(); + } + } + + void sharImm8r(int imm, RegisterID dst) + { + switch (imm) { + case 1: + oneShortOp(getOpcodeGroup2(SHAR_OPCODE, dst)); + break; + default: + RELEASE_ASSERT_NOT_REACHED(); } } @@ -654,7 +669,7 @@ public: oneShortOp(getOpcodeGroup1(CMPGT_OPCODE, left, right)); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -731,7 +746,7 @@ public: oneShortOp(getOpcodeGroup5(BF_OPCODE, label)); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -751,7 +766,7 @@ public: oneShortOp(getOpcodeGroup2(BSRF_OPCODE, reg)); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -817,6 +832,12 @@ public: oneShortOp(opc, true, false); } + void fmovsRegReg(FPRegisterID src, FPRegisterID dst) + { + uint16_t opc = getOpcodeGroup1(FMOV_OPCODE, dst, src); + oneShortOp(opc, true, false); + } + void fmovsReadrm(RegisterID src, FPRegisterID dst) { uint16_t opc = getOpcodeGroup1(FMOVS_READ_RM_OPCODE, dst, src); @@ -939,6 +960,12 @@ public: oneShortOp(opc); } + void dabs(FPRegisterID dst) + { + uint16_t opc = getOpcodeGroup7(FABS_OPCODE, dst >> 1); + oneShortOp(opc); + } + void dsqrt(FPRegisterID dst) { uint16_t opc = getOpcodeGroup7(FSQRT_OPCODE, dst >> 1); @@ -1027,6 +1054,12 @@ public: oneShortOp(opc); } + void movwMemRegIn(RegisterID base, RegisterID dst) + { + uint16_t opc = getOpcodeGroup1(MOVW_READ_RMINC_OPCODE, dst, base); + oneShortOp(opc); + } + void movwPCReg(int offset, RegisterID base, RegisterID dst) { ASSERT(base == SH4Registers::pc); @@ -1050,6 +1083,12 @@ public: oneShortOp(opc); } + void movwRegMemr0(RegisterID src, RegisterID dst) + { + uint16_t opc = getOpcodeGroup1(MOVW_WRITE_R0RN_OPCODE, dst, src); + oneShortOp(opc); + } + void movlRegMem(RegisterID src, int offset, RegisterID base) { ASSERT((offset <= 15) && (offset >= 0)); @@ -1116,6 +1155,18 @@ public: oneShortOp(opc); } + void movbMemRegIn(RegisterID base, RegisterID dst) + { + uint16_t opc = getOpcodeGroup1(MOVB_READ_RMINC_OPCODE, dst, base); + oneShortOp(opc); + } + + void movbRegMemr0(RegisterID src, RegisterID dst) + { + uint16_t opc = getOpcodeGroup1(MOVB_WRITE_R0RN_OPCODE, dst, src); + oneShortOp(opc); + } + void movlMemReg(RegisterID base, RegisterID dst) { uint16_t opc = getOpcodeGroup1(MOVL_READ_RM_OPCODE, dst, base); @@ -1140,14 +1191,6 @@ public: oneShortOp(opc); } - void movlImm8r(int imm8, RegisterID dst) - { - ASSERT((imm8 <= 127) && (imm8 >= -128)); - - uint16_t opc = getOpcodeGroup3(MOVIMM_OPCODE, dst, imm8); - oneShortOp(opc); - } - void loadConstant(uint32_t constant, RegisterID dst) { if (((int)constant <= 0x7f) && ((int)constant >= -0x80)) { @@ -1259,10 +1302,25 @@ public: return m_buffer.label(); } - AssemblerLabel label() + AssemblerLabel labelForWatchpoint() { m_buffer.ensureSpaceForAnyInstruction(); - return m_buffer.label(); + AssemblerLabel result = m_buffer.label(); + if (static_cast(result.m_offset) != m_indexOfLastWatchpoint) + result = label(); + m_indexOfLastWatchpoint = result.m_offset; + m_indexOfTailOfLastWatchpoint = result.m_offset + maxJumpReplacementSize(); + return result; + } + + AssemblerLabel label() + { + AssemblerLabel result = labelIgnoringWatchpoints(); + while (UNLIKELY(static_cast(result.m_offset) < m_indexOfTailOfLastWatchpoint)) { + nop(); + result = labelIgnoringWatchpoints(); + } + return result; } int sizeOfConstantPool() @@ -1282,12 +1340,14 @@ public: static void changePCrelativeAddress(int offset, uint16_t* instructionPtr, uint32_t newAddress) { + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); uint32_t address = (offset << 2) + ((reinterpret_cast(instructionPtr) + 4) &(~0x3)); *reinterpret_cast(address) = newAddress; } static uint32_t readPCrelativeAddress(int offset, uint16_t* instructionPtr) { + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); uint32_t address = (offset << 2) + ((reinterpret_cast(instructionPtr) + 4) &(~0x3)); return *reinterpret_cast(address); } @@ -1325,17 +1385,9 @@ public: braf @reg braf @reg nop nop */ - ASSERT((*(instructionPtr + 1) & BRAF_OPCODE) == BRAF_OPCODE); - - offsetBits -= 4; - if (offsetBits >= -4096 && offsetBits <= 4094) { - *instructionPtr = getOpcodeGroup6(BRA_OPCODE, offsetBits >> 1); - *(++instructionPtr) = NOP_OPCODE; - printBlockInstr(instructionPtr - 1, from.m_offset, 2); - return; - } - - changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, offsetBits - 2); + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); + ASSERT((instructionPtr[1] & 0xf0ff) == BRAF_OPCODE); + changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, offsetBits - 6); printInstr(*instructionPtr, from.m_offset + 2); } @@ -1343,12 +1395,14 @@ public: { uint16_t* instructionPtr = getInstructionPtr(code, from.m_offset); instructionPtr -= 3; + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, reinterpret_cast(to)); } static void linkPointer(void* code, AssemblerLabel where, void* value) { uint16_t* instructionPtr = getInstructionPtr(code, where.m_offset); + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, reinterpret_cast(value)); } @@ -1370,7 +1424,7 @@ public: static SH4Buffer::TwoShorts placeConstantPoolBarrier(int offset) { - ASSERT(((offset >> 1) <=2047) && ((offset >> 1) >= -2048)); + ASSERT(((offset >> 1) <= 2047) && ((offset >> 1) >= -2048)); SH4Buffer::TwoShorts m_barrier; m_barrier.high = (BRA_OPCODE | (offset >> 1)); @@ -1392,7 +1446,7 @@ public: ASSERT((((reinterpret_cast(constPoolAddr) - reinterpret_cast(loadAddr)) + index * 4)) < 1024); int offset = reinterpret_cast(constPoolAddr) + (index * 4) - ((reinterpret_cast(instructionPtr) & ~0x03) + 4); - instruction &=0xf00; + instruction &= 0x0f00; instruction |= 0xd000; offset &= 0x03ff; instruction |= (offset >> 2); @@ -1413,6 +1467,7 @@ public: static void repatchInt32(void* where, int32_t value) { uint16_t* instructionPtr = reinterpret_cast(where); + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, value); } @@ -1428,6 +1483,7 @@ public: { uint16_t* instructionPtr = reinterpret_cast(from); instructionPtr -= 3; + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, reinterpret_cast(to)); } @@ -1440,40 +1496,68 @@ public: if (((*instructionPtr & 0xff00) == BT_OPCODE) || ((*instructionPtr & 0xff00) == BF_OPCODE)) { offsetBits -= 8; instructionPtr++; + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, offsetBits); instruction = (BRAF_OPCODE | (*instructionPtr++ & 0xf00)); *instructionPtr = instruction; printBlockInstr(instructionPtr, reinterpret_cast(from) + 1, 3); + cacheFlush(instructionPtr, sizeof(SH4Word)); return; } - ASSERT((*(instructionPtr + 1) & BRAF_OPCODE) == BRAF_OPCODE); - offsetBits -= 4; - if (offsetBits >= -4096 && offsetBits <= 4094) { - *instructionPtr = getOpcodeGroup6(BRA_OPCODE, offsetBits >> 1); - *(++instructionPtr) = NOP_OPCODE; - printBlockInstr(instructionPtr - 2, reinterpret_cast(from), 2); - return; - } - - changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, offsetBits - 2); + ASSERT((instructionPtr[1] & 0xf0ff) == BRAF_OPCODE); + changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, offsetBits - 6); printInstr(*instructionPtr, reinterpret_cast(from)); } // Linking & patching - static void revertJump(void* instructionStart, SH4Word imm) + static ptrdiff_t maxJumpReplacementSize() { - SH4Word *insn = reinterpret_cast(instructionStart); - SH4Word disp; + return sizeof(SH4Word) * 6; + } + static void replaceWithJump(void *instructionStart, void *to) + { + SH4Word* instruction = reinterpret_cast(instructionStart); + intptr_t difference = reinterpret_cast(to) - (reinterpret_cast(instruction) + 2 * sizeof(SH4Word)); + + if ((instruction[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE) { + instruction[1] = (BRAF_OPCODE | (instruction[0] & 0x0f00)); + instruction[2] = NOP_OPCODE; + cacheFlush(&instruction[1], 2 * sizeof(SH4Word)); + } else { + instruction[0] = getOpcodeGroup3(MOVL_READ_OFFPC_OPCODE, SH4Registers::r13, 1); + instruction[1] = getOpcodeGroup2(BRAF_OPCODE, SH4Registers::r13); + instruction[2] = NOP_OPCODE; + cacheFlush(instruction, 3 * sizeof(SH4Word)); + } + + changePCrelativeAddress(instruction[0] & 0x00ff, instruction, difference - 2); + } + + static void revertJumpToMove(void* instructionStart, RegisterID rd, int imm) + { + SH4Word *insn = reinterpret_cast(instructionStart); ASSERT((insn[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); - disp = insn[0] & 0x00ff; - insn += 2 + (disp << 1); // PC += 4 + (disp*4) - insn = (SH4Word *) ((unsigned) insn & (~3)); - insn[0] = imm; - cacheFlush(insn, sizeof(SH4Word)); + if ((insn[1] & 0xf000) == CMPEQ_OPCODE) { + insn[0] = getOpcodeGroup3(MOVL_READ_OFFPC_OPCODE, SH4Registers::r13, insn[0] & 0x00ff); + insn[1] = (insn[1] & 0xf00f) | (rd << 8) | (SH4Registers::r13 << 4); + cacheFlush(insn, 2 * sizeof(SH4Word)); + changePCrelativeAddress(insn[0] & 0x00ff, insn, imm); + return; + } + + if ((insn[0] & 0x00ff) == 1) + insn[1] = getOpcodeGroup6(BRA_OPCODE, 3); + else + insn[1] = NOP_OPCODE; + + insn[2] = NOP_OPCODE; + cacheFlush(&insn[1], 2 * sizeof(SH4Word)); + + changePCrelativeAddress(insn[0] & 0x00ff, insn, imm); } void linkJump(AssemblerLabel from, AssemblerLabel to, JumpType type = JumpFar) @@ -1486,8 +1570,9 @@ public: int offsetBits; if (type == JumpNear) { - ASSERT((instruction == BT_OPCODE) || (instruction == BF_OPCODE) || (instruction == BRA_OPCODE)); int offset = (codeSize() - from.m_offset) - 4; + ASSERT((((instruction == BT_OPCODE) || (instruction == BF_OPCODE)) && (offset >= -256) && (offset <= 254)) + || ((instruction == BRA_OPCODE) && (offset >= -4096) && (offset <= 4094))); *instructionPtr++ = instruction | (offset >> 1); printInstr(*instructionPtr, from.m_offset + 2); return; @@ -1502,7 +1587,7 @@ public: offsetBits = (to.m_offset - from.m_offset) - 8; instruction ^= 0x0202; *instructionPtr++ = instruction; - if ((*instructionPtr & 0xf000) == 0xe000) { + if ((*instructionPtr & 0xf000) == MOVIMM_OPCODE) { uint32_t* addr = getLdrImmAddressOnPool(instructionPtr, m_buffer.poolAddress()); *addr = offsetBits; } else @@ -1518,23 +1603,18 @@ public: nop nop */ ASSERT((*(instructionPtr + 1) & BRAF_OPCODE) == BRAF_OPCODE); - offsetBits = (to.m_offset - from.m_offset) - 4; - if (offsetBits >= -4096 && offsetBits <= 4094) { - *instructionPtr = getOpcodeGroup6(BRA_OPCODE, offsetBits >> 1); - *(++instructionPtr) = NOP_OPCODE; - printBlockInstr(instructionPtr - 1, from.m_offset, 2); - return; - } + offsetBits = (to.m_offset - from.m_offset) - 6; instruction = *instructionPtr; - if ((instruction & 0xf000) == 0xe000) { + if ((instruction & 0xf000) == MOVIMM_OPCODE) { uint32_t* addr = getLdrImmAddressOnPool(instructionPtr, m_buffer.poolAddress()); - *addr = offsetBits - 2; + *addr = offsetBits; printInstr(*instructionPtr, from.m_offset + 2); return; } - changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, offsetBits - 2); + ASSERT((instructionPtr[0] & 0xf000) == MOVL_READ_OFFPC_OPCODE); + changePCrelativeAddress((*instructionPtr & 0xff), instructionPtr, offsetBits); printInstr(*instructionPtr, from.m_offset + 2); } @@ -1575,19 +1655,27 @@ public: return reinterpret_cast(readPCrelativeAddress((*instructionPtr & 0xff), instructionPtr)); } - PassRefPtr executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { - return m_buffer.executableCopy(globalData, ownerUID, effort); + return m_buffer.executableCopy(vm, ownerUID, effort); } static void cacheFlush(void* code, size_t size) { -#if !OS(LINUX) -#error "The cacheFlush support is missing on this platform." -#elif defined CACHEFLUSH_D_L2 - syscall(__NR_cacheflush, reinterpret_cast(code), size, CACHEFLUSH_D_WB | CACHEFLUSH_I | CACHEFLUSH_D_L2); +#if OS(LINUX) + // Flush each page separately, otherwise the whole flush will fail if an uncommited page is in the area. + unsigned currentPage = reinterpret_cast(code) & ~(pageSize() - 1); + unsigned lastPage = (reinterpret_cast(code) + size - 1) & ~(pageSize() - 1); + do { +#if defined CACHEFLUSH_D_L2 + syscall(__NR_cacheflush, currentPage, pageSize(), CACHEFLUSH_D_WB | CACHEFLUSH_I | CACHEFLUSH_D_L2); +#else + syscall(__NR_cacheflush, currentPage, pageSize(), CACHEFLUSH_D_WB | CACHEFLUSH_I); +#endif + currentPage += pageSize(); + } while (lastPage >= currentPage); #else - syscall(__NR_cacheflush, reinterpret_cast(code), size, CACHEFLUSH_D_WB | CACHEFLUSH_I); +#error "The cacheFlush support is missing on this platform." #endif } @@ -1619,6 +1707,8 @@ public: void* data() const { return m_buffer.data(); } size_t codeSize() const { return m_buffer.codeSize(); } + unsigned debugOffset() { return m_buffer.debugOffset(); } + #ifdef SH4_ASSEMBLER_TRACING static void printInstr(uint16_t opc, unsigned size, bool isdoubleInst = true) { @@ -1763,6 +1853,9 @@ public: case FTRC_OPCODE: format = " FTRC FR%d, FPUL\n"; break; + case FABS_OPCODE: + format = " FABS FR%d\n"; + break; case FSQRT_OPCODE: format = " FSQRT FR%d\n"; break; @@ -1897,9 +1990,15 @@ public: case MOVW_READ_RM_OPCODE: format = " MOV.W @R%d, R%d\n"; break; + case MOVW_READ_RMINC_OPCODE: + format = " MOV.W @R%d+, R%d\n"; + break; case MOVW_READ_R0RM_OPCODE: format = " MOV.W @(R0, R%d), R%d\n"; break; + case MOVW_WRITE_R0RN_OPCODE: + format = " MOV.W R%d, @(R0, R%d)\n"; + break; case EXTUB_OPCODE: format = " EXTU.B R%d, R%d\n"; break; @@ -2143,6 +2242,8 @@ public: private: SH4Buffer m_buffer; int m_claimscratchReg; + int m_indexOfLastWatchpoint; + int m_indexOfTailOfLastWatchpoint; }; } // namespace JSC diff --git a/Source/JavaScriptCore/assembler/X86Assembler.h b/Source/JavaScriptCore/assembler/X86Assembler.h index 25ff6f0a5..2883e0a4c 100644 --- a/Source/JavaScriptCore/assembler/X86Assembler.h +++ b/Source/JavaScriptCore/assembler/X86Assembler.h @@ -1952,7 +1952,7 @@ public: *ptr = OP_MOV_GvEv; break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -1970,7 +1970,7 @@ public: case OP_LEA: break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -1991,9 +1991,9 @@ public: return b.m_offset - a.m_offset; } - PassRefPtr executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { - return m_formatter.executableCopy(globalData, ownerUID, effort); + return m_formatter.executableCopy(vm, ownerUID, effort); } unsigned debugOffset() { return m_formatter.debugOffset(); } @@ -2349,9 +2349,9 @@ private: bool isAligned(int alignment) const { return m_buffer.isAligned(alignment); } void* data() const { return m_buffer.data(); } - PassRefPtr executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort) + PassRefPtr executableCopy(VM& vm, void* ownerUID, JITCompilationEffort effort) { - return m_buffer.executableCopy(globalData, ownerUID, effort); + return m_buffer.executableCopy(vm, ownerUID, effort); } unsigned debugOffset() { return m_buffer.debugOffset(); } diff --git a/Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp b/Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp index aa682da86..6d9afda28 100644 --- a/Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp +++ b/Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "ArrayAllocationProfile.h" +#include "Operations.h" + namespace JSC { void ArrayAllocationProfile::updateIndexingType() diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp index 51baf332f..ae3c8f94a 100644 --- a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp +++ b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp @@ -28,41 +28,50 @@ #include "CodeBlock.h" #include +#include namespace JSC { -const char* arrayModesToString(ArrayModes arrayModes) +void dumpArrayModes(PrintStream& out, ArrayModes arrayModes) { - if (!arrayModes) - return "0:"; + if (!arrayModes) { + out.print("0:"); + return; + } - if (arrayModes == ALL_ARRAY_MODES) - return "TOP"; - - bool isNonArray = !!(arrayModes & asArrayModes(NonArray)); - bool isNonArrayWithContiguous = !!(arrayModes & asArrayModes(NonArrayWithContiguous)); - bool isNonArrayWithArrayStorage = !!(arrayModes & asArrayModes(NonArrayWithArrayStorage)); - bool isNonArrayWithSlowPutArrayStorage = !!(arrayModes & asArrayModes(NonArrayWithSlowPutArrayStorage)); - bool isArray = !!(arrayModes & asArrayModes(ArrayClass)); - bool isArrayWithContiguous = !!(arrayModes & asArrayModes(ArrayWithContiguous)); - bool isArrayWithArrayStorage = !!(arrayModes & asArrayModes(ArrayWithArrayStorage)); - bool isArrayWithSlowPutArrayStorage = !!(arrayModes & asArrayModes(ArrayWithSlowPutArrayStorage)); - - static char result[256]; - snprintf( - result, sizeof(result), - "%u:%s%s%s%s%s%s%s%s", - arrayModes, - isNonArray ? "NonArray" : "", - isNonArrayWithContiguous ? "NonArrayWithContiguous" : "", - isNonArrayWithArrayStorage ? " NonArrayWithArrayStorage" : "", - isNonArrayWithSlowPutArrayStorage ? "NonArrayWithSlowPutArrayStorage" : "", - isArray ? "ArrayClass" : "", - isArrayWithContiguous ? "ArrayWithContiguous" : "", - isArrayWithArrayStorage ? " ArrayWithArrayStorage" : "", - isArrayWithSlowPutArrayStorage ? "ArrayWithSlowPutArrayStorage" : ""); - - return result; + if (arrayModes == ALL_ARRAY_MODES) { + out.print("TOP"); + return; + } + + out.print(arrayModes, ":"); + + if (arrayModes & asArrayModes(NonArray)) + out.print("NonArray"); + if (arrayModes & asArrayModes(NonArrayWithInt32)) + out.print("NonArrayWithInt32"); + if (arrayModes & asArrayModes(NonArrayWithDouble)) + out.print("NonArrayWithDouble"); + if (arrayModes & asArrayModes(NonArrayWithContiguous)) + out.print("NonArrayWithContiguous"); + if (arrayModes & asArrayModes(NonArrayWithArrayStorage)) + out.print("NonArrayWithArrayStorage"); + if (arrayModes & asArrayModes(NonArrayWithSlowPutArrayStorage)) + out.print("NonArrayWithSlowPutArrayStorage"); + if (arrayModes & asArrayModes(ArrayClass)) + out.print("ArrayClass"); + if (arrayModes & asArrayModes(ArrayWithUndecided)) + out.print("ArrayWithUndecided"); + if (arrayModes & asArrayModes(ArrayWithInt32)) + out.print("ArrayWithInt32"); + if (arrayModes & asArrayModes(ArrayWithDouble)) + out.print("ArrayWithDouble"); + if (arrayModes & asArrayModes(ArrayWithContiguous)) + out.print("ArrayWithContiguous"); + if (arrayModes & asArrayModes(ArrayWithArrayStorage)) + out.print("ArrayWithArrayStorage"); + if (arrayModes & asArrayModes(ArrayWithSlowPutArrayStorage)) + out.print("ArrayWithSlowPutArrayStorage"); } ArrayModes ArrayProfile::updatedObservedArrayModes() const @@ -74,34 +83,99 @@ ArrayModes ArrayProfile::updatedObservedArrayModes() const void ArrayProfile::computeUpdatedPrediction(CodeBlock* codeBlock, OperationInProgress operation) { + const bool verbose = false; + if (m_lastSeenStructure) { m_observedArrayModes |= arrayModeFromStructure(m_lastSeenStructure); m_mayInterceptIndexedAccesses |= m_lastSeenStructure->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero(); if (!codeBlock->globalObject()->isOriginalArrayStructure(m_lastSeenStructure)) m_usesOriginalArrayStructures = false; - if (!m_structureIsPolymorphic) { + if (!structureIsPolymorphic()) { if (!m_expectedStructure) m_expectedStructure = m_lastSeenStructure; else if (m_expectedStructure != m_lastSeenStructure) { - m_expectedStructure = 0; - m_structureIsPolymorphic = true; + if (verbose) + dataLog(*codeBlock, " bc#", m_bytecodeOffset, ": making structure polymorphic because ", RawPointer(m_expectedStructure), " (", m_expectedStructure->classInfo()->className, ") != ", RawPointer(m_lastSeenStructure), " (", m_lastSeenStructure->classInfo()->className, ")\n"); + m_expectedStructure = polymorphicStructure(); } } m_lastSeenStructure = 0; } if (hasTwoOrMoreBitsSet(m_observedArrayModes)) { - m_structureIsPolymorphic = true; - m_expectedStructure = 0; + if (verbose) + dataLog(*codeBlock, " bc#", m_bytecodeOffset, ": making structure polymorphic because two or more bits are set in m_observedArrayModes\n"); + m_expectedStructure = polymorphicStructure(); } if (operation == Collection - && m_expectedStructure + && expectedStructure() && !Heap::isMarked(m_expectedStructure)) { - m_expectedStructure = 0; - m_structureIsPolymorphic = true; + if (verbose) + dataLog(*codeBlock, " bc#", m_bytecodeOffset, ": making structure during GC\n"); + m_expectedStructure = polymorphicStructure(); + } +} + +CString ArrayProfile::briefDescription(CodeBlock* codeBlock) +{ + computeUpdatedPrediction(codeBlock); + + StringPrintStream out; + + bool hasPrinted = false; + + if (m_observedArrayModes) { + if (hasPrinted) + out.print(", "); + out.print(ArrayModesDump(m_observedArrayModes)); + hasPrinted = true; } + + if (structureIsPolymorphic()) { + if (hasPrinted) + out.print(", "); + out.print("struct = TOP"); + hasPrinted = true; + } else if (m_expectedStructure) { + if (hasPrinted) + out.print(", "); + out.print("struct = ", RawPointer(m_expectedStructure)); + hasPrinted = true; + } + + if (m_mayStoreToHole) { + if (hasPrinted) + out.print(", "); + out.print("Hole"); + hasPrinted = true; + } + + if (m_outOfBounds) { + if (hasPrinted) + out.print(", "); + out.print("OutOfBounds"); + hasPrinted = true; + } + + if (m_mayInterceptIndexedAccesses) { + if (hasPrinted) + out.print(", "); + out.print("Intercept"); + hasPrinted = true; + } + + if (m_usesOriginalArrayStructures) { + if (hasPrinted) + out.print(", "); + out.print("Original"); + hasPrinted = true; + } + + UNUSED_PARAM(hasPrinted); + + return out.toCString(); } } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.h b/Source/JavaScriptCore/bytecode/ArrayProfile.h index 5116cd36f..384275689 100644 --- a/Source/JavaScriptCore/bytecode/ArrayProfile.h +++ b/Source/JavaScriptCore/bytecode/ArrayProfile.h @@ -67,7 +67,8 @@ inline ArrayModes arrayModeFromStructure(Structure* structure) return asArrayModes(structure->indexingType()); } -const char* arrayModesToString(ArrayModes); +void dumpArrayModes(PrintStream&, ArrayModes); +MAKE_PRINT_ADAPTOR(ArrayModesDump, ArrayModes, dumpArrayModes); inline bool mergeArrayModes(ArrayModes& left, ArrayModes right) { @@ -114,14 +115,24 @@ inline bool shouldUseInt32(ArrayModes arrayModes) return arrayModesInclude(arrayModes, Int32Shape); } +inline bool hasSeenArray(ArrayModes arrayModes) +{ + return arrayModes & ALL_ARRAY_ARRAY_MODES; +} + +inline bool hasSeenNonArray(ArrayModes arrayModes) +{ + return arrayModes & ALL_NON_ARRAY_ARRAY_MODES; +} + class ArrayProfile { public: ArrayProfile() : m_bytecodeOffset(std::numeric_limits::max()) , m_lastSeenStructure(0) , m_expectedStructure(0) - , m_structureIsPolymorphic(false) , m_mayStoreToHole(false) + , m_outOfBounds(false) , m_mayInterceptIndexedAccesses(false) , m_usesOriginalArrayStructures(true) , m_observedArrayModes(0) @@ -132,8 +143,8 @@ public: : m_bytecodeOffset(bytecodeOffset) , m_lastSeenStructure(0) , m_expectedStructure(0) - , m_structureIsPolymorphic(false) , m_mayStoreToHole(false) + , m_outOfBounds(false) , m_mayInterceptIndexedAccesses(false) , m_usesOriginalArrayStructures(true) , m_observedArrayModes(0) @@ -145,6 +156,7 @@ public: Structure** addressOfLastSeenStructure() { return &m_lastSeenStructure; } ArrayModes* addressOfArrayModes() { return &m_observedArrayModes; } bool* addressOfMayStoreToHole() { return &m_mayStoreToHole; } + bool* addressOfOutOfBounds() { return &m_outOfBounds; } void observeStructure(Structure* structure) { @@ -153,10 +165,15 @@ public: void computeUpdatedPrediction(CodeBlock*, OperationInProgress = NoOperation); - Structure* expectedStructure() const { return m_expectedStructure; } + Structure* expectedStructure() const + { + if (structureIsPolymorphic()) + return 0; + return m_expectedStructure; + } bool structureIsPolymorphic() const { - return m_structureIsPolymorphic; + return m_expectedStructure == polymorphicStructure(); } bool hasDefiniteStructure() const { @@ -167,17 +184,22 @@ public: bool mayInterceptIndexedAccesses() const { return m_mayInterceptIndexedAccesses; } bool mayStoreToHole() const { return m_mayStoreToHole; } + bool outOfBounds() const { return m_outOfBounds; } bool usesOriginalArrayStructures() const { return m_usesOriginalArrayStructures; } + CString briefDescription(CodeBlock*); + private: friend class LLIntOffsetsExtractor; + static Structure* polymorphicStructure() { return static_cast(reinterpret_cast(1)); } + unsigned m_bytecodeOffset; Structure* m_lastSeenStructure; Structure* m_expectedStructure; - bool m_structureIsPolymorphic; bool m_mayStoreToHole; // This flag may become overloaded to indicate other special cases that were encountered during array access, as it depends on indexing type. Since we currently have basically just one indexing type (two variants of ArrayStorage), this flag for now just means exactly what its name implies. + bool m_outOfBounds; bool m_mayInterceptIndexedAccesses; bool m_usesOriginalArrayStructures; ArrayModes m_observedArrayModes; diff --git a/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp b/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp index 762dca12a..5b2661f06 100644 --- a/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp +++ b/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp @@ -33,19 +33,19 @@ #if ENABLE(JIT) namespace JSC { -void CallLinkInfo::unlink(JSGlobalData& globalData, RepatchBuffer& repatchBuffer) +void CallLinkInfo::unlink(VM& vm, RepatchBuffer& repatchBuffer) { ASSERT(isLinked()); repatchBuffer.revertJumpReplacementToBranchPtrWithPatch(RepatchBuffer::startOfBranchPtrWithPatchOnRegister(hotPathBegin), static_cast(calleeGPR), 0); if (isDFG) { #if ENABLE(DFG_JIT) - repatchBuffer.relink(callReturnLocation, (callType == Construct ? globalData.getCTIStub(DFG::linkConstructThunkGenerator) : globalData.getCTIStub(DFG::linkCallThunkGenerator)).code()); + repatchBuffer.relink(callReturnLocation, (callType == Construct ? vm.getCTIStub(DFG::linkConstructThunkGenerator) : vm.getCTIStub(DFG::linkCallThunkGenerator)).code()); #else - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); #endif } else - repatchBuffer.relink(callReturnLocation, callType == Construct ? globalData.jitStubs->ctiVirtualConstructLink() : globalData.jitStubs->ctiVirtualCallLink()); + repatchBuffer.relink(callReturnLocation, callType == Construct ? vm.getCTIStub(linkConstructGenerator).code() : vm.getCTIStub(linkCallGenerator).code()); hasSeenShouldRepatch = false; callee.clear(); stub.clear(); diff --git a/Source/JavaScriptCore/bytecode/CallLinkInfo.h b/Source/JavaScriptCore/bytecode/CallLinkInfo.h index 57608435c..36eb84bee 100644 --- a/Source/JavaScriptCore/bytecode/CallLinkInfo.h +++ b/Source/JavaScriptCore/bytecode/CallLinkInfo.h @@ -57,6 +57,7 @@ struct CallLinkInfo : public BasicRawSentinelNode { CallLinkInfo() : hasSeenShouldRepatch(false) , isDFG(false) + , hasSeenClosure(false) , callType(None) { } @@ -80,12 +81,13 @@ struct CallLinkInfo : public BasicRawSentinelNode { RefPtr stub; bool hasSeenShouldRepatch : 1; bool isDFG : 1; - CallType callType : 6; + bool hasSeenClosure : 1; + CallType callType : 5; unsigned calleeGPR : 8; CodeOrigin codeOrigin; bool isLinked() { return stub || callee; } - void unlink(JSGlobalData&, RepatchBuffer&); + void unlink(VM&, RepatchBuffer&); bool seenOnce() { diff --git a/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp b/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp index 7f9e9ee8a..509b15aaf 100644 --- a/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp +++ b/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Apple Inc. All rights reserved. + * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,9 +28,59 @@ #include "CodeBlock.h" #include "LLIntCallLinkInfo.h" +#include "Operations.h" +#include namespace JSC { +CallLinkStatus::CallLinkStatus(JSValue value) + : m_callTarget(value) + , m_executable(0) + , m_structure(0) + , m_couldTakeSlowPath(false) + , m_isProved(false) +{ + if (!value || !value.isCell()) + return; + + m_structure = value.asCell()->structure(); + + if (!value.asCell()->inherits(&JSFunction::s_info)) + return; + + m_executable = jsCast(value.asCell())->executable(); +} + +JSFunction* CallLinkStatus::function() const +{ + if (!m_callTarget || !m_callTarget.isCell()) + return 0; + + if (!m_callTarget.asCell()->inherits(&JSFunction::s_info)) + return 0; + + return jsCast(m_callTarget.asCell()); +} + +InternalFunction* CallLinkStatus::internalFunction() const +{ + if (!m_callTarget || !m_callTarget.isCell()) + return 0; + + if (!m_callTarget.asCell()->inherits(&InternalFunction::s_info)) + return 0; + + return jsCast(m_callTarget.asCell()); +} + +Intrinsic CallLinkStatus::intrinsicFor(CodeSpecializationKind kind) const +{ + if (!m_executable) + return NoIntrinsic; + + return m_executable->intrinsicFor(kind); +} + CallLinkStatus CallLinkStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex) { UNUSED_PARAM(profiledBlock); @@ -39,9 +89,9 @@ CallLinkStatus CallLinkStatus::computeFromLLInt(CodeBlock* profiledBlock, unsign Instruction* instruction = profiledBlock->instructions().begin() + bytecodeIndex; LLIntCallLinkInfo* callLinkInfo = instruction[4].u.callLinkInfo; - return CallLinkStatus(callLinkInfo->lastSeenCallee.get(), false); + return CallLinkStatus(callLinkInfo->lastSeenCallee.get()); #else - return CallLinkStatus(0, false); + return CallLinkStatus(); #endif } @@ -54,17 +104,49 @@ CallLinkStatus CallLinkStatus::computeFor(CodeBlock* profiledBlock, unsigned byt return computeFromLLInt(profiledBlock, bytecodeIndex); if (profiledBlock->couldTakeSlowCase(bytecodeIndex)) - return CallLinkStatus(0, true); + return CallLinkStatus::takesSlowPath(); - JSFunction* target = profiledBlock->getCallLinkInfo(bytecodeIndex).lastSeenCallee.get(); + CallLinkInfo& callLinkInfo = profiledBlock->getCallLinkInfo(bytecodeIndex); + if (callLinkInfo.stub) + return CallLinkStatus(callLinkInfo.stub->executable(), callLinkInfo.stub->structure()); + + JSFunction* target = callLinkInfo.lastSeenCallee.get(); if (!target) return computeFromLLInt(profiledBlock, bytecodeIndex); - return CallLinkStatus(target, false); + if (callLinkInfo.hasSeenClosure) + return CallLinkStatus(target->executable(), target->structure()); + + return CallLinkStatus(target); #else - return CallLinkStatus(0, false); + return CallLinkStatus(); #endif } +void CallLinkStatus::dump(PrintStream& out) const +{ + if (!isSet()) { + out.print("Not Set"); + return; + } + + CommaPrinter comma; + + if (m_isProved) + out.print(comma, "Statically Proved"); + + if (m_couldTakeSlowPath) + out.print(comma, "Could Take Slow Path"); + + if (m_callTarget) + out.print(comma, "Known target: ", m_callTarget); + + if (m_executable) + out.print(comma, "Executable/CallHash: ", RawPointer(m_executable), "/", m_executable->hashFor(CodeForCall)); + + if (m_structure) + out.print(comma, "Structure: ", RawPointer(m_structure)); +} + } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/CallLinkStatus.h b/Source/JavaScriptCore/bytecode/CallLinkStatus.h index 5f7201905..51965fe4a 100644 --- a/Source/JavaScriptCore/bytecode/CallLinkStatus.h +++ b/Source/JavaScriptCore/bytecode/CallLinkStatus.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Apple Inc. All rights reserved. + * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,40 +26,106 @@ #ifndef CallLinkStatus_h #define CallLinkStatus_h +#include "CodeSpecializationKind.h" +#include "Intrinsic.h" +#include "JSCJSValue.h" + namespace JSC { -class JSFunction; class CodeBlock; +class ExecutableBase; +class InternalFunction; +class JSFunction; +class Structure; class CallLinkStatus { public: CallLinkStatus() - : m_callTarget(0) + : m_executable(0) + , m_structure(0) + , m_couldTakeSlowPath(false) + , m_isProved(false) + { + } + + static CallLinkStatus takesSlowPath() + { + CallLinkStatus result; + result.m_couldTakeSlowPath = true; + return result; + } + + explicit CallLinkStatus(JSValue); + + CallLinkStatus(ExecutableBase* executable, Structure* structure) + : m_executable(executable) + , m_structure(structure) , m_couldTakeSlowPath(false) + , m_isProved(false) { + ASSERT(!!executable == !!structure); } - CallLinkStatus(JSFunction* callTarget, bool couldTakeSlowPath) - : m_callTarget(callTarget) - , m_couldTakeSlowPath(couldTakeSlowPath) + CallLinkStatus& setIsProved(bool isProved) { + m_isProved = isProved; + return *this; } static CallLinkStatus computeFor(CodeBlock*, unsigned bytecodeIndex); - bool isSet() const { return !!m_callTarget || m_couldTakeSlowPath; } + CallLinkStatus& setHasBadFunctionExitSite(bool didHaveExitSite) + { + ASSERT(!m_isProved); + if (didHaveExitSite) { + // Turn this into a closure call. + m_callTarget = JSValue(); + } + return *this; + } + + CallLinkStatus& setHasBadCacheExitSite(bool didHaveExitSite) + { + ASSERT(!m_isProved); + if (didHaveExitSite) + *this = takesSlowPath(); + return *this; + } + + CallLinkStatus& setHasBadExecutableExitSite(bool didHaveExitSite) + { + ASSERT(!m_isProved); + if (didHaveExitSite) + *this = takesSlowPath(); + return *this; + } + + bool isSet() const { return m_callTarget || m_executable || m_couldTakeSlowPath; } bool operator!() const { return !isSet(); } bool couldTakeSlowPath() const { return m_couldTakeSlowPath; } + bool isClosureCall() const { return m_executable && !m_callTarget; } + + JSValue callTarget() const { return m_callTarget; } + JSFunction* function() const; + InternalFunction* internalFunction() const; + Intrinsic intrinsicFor(CodeSpecializationKind) const; + ExecutableBase* executable() const { return m_executable; } + Structure* structure() const { return m_structure; } + bool isProved() const { return m_isProved; } + bool canOptimize() const { return (m_callTarget || m_executable) && !m_couldTakeSlowPath; } - JSFunction* callTarget() const { return m_callTarget; } + void dump(PrintStream&) const; private: static CallLinkStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex); - JSFunction* m_callTarget; + JSValue m_callTarget; + ExecutableBase* m_executable; + Structure* m_structure; bool m_couldTakeSlowPath; + bool m_isProved; }; } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp index fe9f6ac7c..904e40a4c 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. * Copyright (C) 2008 Cameron Zwarich * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,7 @@ #include "CodeBlock.h" #include "BytecodeGenerator.h" +#include "CallLinkStatus.h" #include "DFGCapabilities.h" #include "DFGCommon.h" #include "DFGNode.h" @@ -40,15 +41,18 @@ #include "JIT.h" #include "JITStubs.h" #include "JSActivation.h" +#include "JSCJSValue.h" #include "JSFunction.h" #include "JSNameScope.h" -#include "JSValue.h" #include "LowLevelInterpreter.h" +#include "Operations.h" +#include "ReduceWhitespace.h" #include "RepatchBuffer.h" #include "SlotVisitorInlines.h" #include +#include #include -#include +#include #if ENABLE(DFG_JIT) #include "DFGOperations.h" @@ -62,16 +66,57 @@ namespace JSC { using namespace DFG; #endif +String CodeBlock::inferredName() const +{ + switch (codeType()) { + case GlobalCode: + return ""; + case EvalCode: + return ""; + case FunctionCode: + return jsCast(ownerExecutable())->inferredName().string(); + default: + CRASH(); + return String(); + } +} + CodeBlockHash CodeBlock::hash() const { return CodeBlockHash(ownerExecutable()->source(), specializationKind()); } +String CodeBlock::sourceCodeForTools() const +{ + if (codeType() != FunctionCode) + return ownerExecutable()->source().toString(); + + SourceProvider* provider = source(); + FunctionExecutable* executable = jsCast(ownerExecutable()); + UnlinkedFunctionExecutable* unlinked = executable->unlinkedExecutable(); + unsigned unlinkedStartOffset = unlinked->startOffset(); + unsigned linkedStartOffset = executable->source().startOffset(); + int delta = linkedStartOffset - unlinkedStartOffset; + StringBuilder builder; + builder.append("function "); + builder.append(provider->getRange( + delta + unlinked->functionStartOffset(), + delta + unlinked->startOffset() + unlinked->sourceLength())); + return builder.toString(); +} + +String CodeBlock::sourceCodeOnOneLine() const +{ + return reduceWhitespace(sourceCodeForTools()); +} + void CodeBlock::dumpAssumingJITType(PrintStream& out, JITCode::JITType jitType) const { - out.print("#", hash(), ":[", RawPointer(this), ", ", jitType, codeType()); + out.print(inferredName(), "#", hash(), ":[", RawPointer(this), "->", RawPointer(ownerExecutable()), ", ", jitType, codeType()); if (codeType() == FunctionCode) out.print(specializationKind()); + if (ownerExecutable()->neverInline()) + out.print(" (NeverInline)"); out.print("]"); } @@ -99,7 +144,7 @@ static String valueToSourceString(ExecState* exec, JSValue val) if (val.isString()) return makeString("\"", escapeQuotes(val.toString(exec)->value(exec)), "\""); - return val.description(); + return toString(val); } static CString constantName(ExecState* exec, int k, JSValue value) @@ -112,18 +157,6 @@ static CString idName(int id0, const Identifier& ident) return makeString(ident.string(), "(@id", String::number(id0), ")").utf8(); } -void CodeBlock::dumpBytecodeCommentAndNewLine(int location) -{ -#if ENABLE(BYTECODE_COMMENTS) - const char* comment = commentForBytecodeOffset(location); - if (comment) - dataLogF("\t\t ; %s", comment); -#else - UNUSED_PARAM(location); -#endif - dataLogF("\n"); -} - CString CodeBlock::registerName(ExecState* exec, int r) const { if (r == missingThisObjectMarker()) @@ -178,37 +211,34 @@ NEVER_INLINE static const char* debugHookName(int debugHookID) return "didReachBreakpoint"; } - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return ""; } -void CodeBlock::printUnaryOp(ExecState* exec, int location, const Instruction*& it, const char* op) +void CodeBlock::printUnaryOp(PrintStream& out, ExecState* exec, int location, const Instruction*& it, const char* op) { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] %s\t\t %s, %s", location, op, registerName(exec, r0).data(), registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] %s\t\t %s, %s", location, op, registerName(exec, r0).data(), registerName(exec, r1).data()); } -void CodeBlock::printBinaryOp(ExecState* exec, int location, const Instruction*& it, const char* op) +void CodeBlock::printBinaryOp(PrintStream& out, ExecState* exec, int location, const Instruction*& it, const char* op) { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - dataLogF("[%4d] %s\t\t %s, %s, %s", location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] %s\t\t %s, %s, %s", location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); } -void CodeBlock::printConditionalJump(ExecState* exec, const Instruction*, const Instruction*& it, int location, const char* op) +void CodeBlock::printConditionalJump(PrintStream& out, ExecState* exec, const Instruction*, const Instruction*& it, int location, const char* op) { int r0 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] %s\t\t %s, %d(->%d)", location, op, registerName(exec, r0).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] %s\t\t %s, %d(->%d)", location, op, registerName(exec, r0).data(), offset, location + offset); } -void CodeBlock::printGetByIdOp(ExecState* exec, int location, const Instruction*& it) +void CodeBlock::printGetByIdOp(PrintStream& out, ExecState* exec, int location, const Instruction*& it) { const char* op; switch (exec->interpreter()->getOpcodeID(it->u.opcode)) { @@ -255,34 +285,34 @@ void CodeBlock::printGetByIdOp(ExecState* exec, int location, const Instruction* op = "string_length"; break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); op = 0; } int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - dataLogF("[%4d] %s\t %s, %s, %s", location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data()); - it += 5; + out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data()); + it += 4; // Increment up to the value profiler. } #if ENABLE(JIT) || ENABLE(LLINT) // unused in some configurations -static void dumpStructure(const char* name, ExecState* exec, Structure* structure, Identifier& ident) +static void dumpStructure(PrintStream& out, const char* name, ExecState* exec, Structure* structure, Identifier& ident) { if (!structure) return; - dataLogF("%s = %p", name, structure); + out.printf("%s = %p", name, structure); - PropertyOffset offset = structure->get(exec->globalData(), ident); + PropertyOffset offset = structure->get(exec->vm(), ident); if (offset != invalidOffset) - dataLogF(" (offset = %d)", offset); + out.printf(" (offset = %d)", offset); } #endif #if ENABLE(JIT) // unused when not ENABLE(JIT), leading to silly warnings -static void dumpChain(ExecState* exec, StructureChain* chain, Identifier& ident) +static void dumpChain(PrintStream& out, ExecState* exec, StructureChain* chain, Identifier& ident) { - dataLogF("chain = %p: [", chain); + out.printf("chain = %p: [", chain); bool first = true; for (WriteBarrier* currentStructure = chain->head(); *currentStructure; @@ -290,14 +320,14 @@ static void dumpChain(ExecState* exec, StructureChain* chain, Identifier& ident) if (first) first = false; else - dataLogF(", "); - dumpStructure("struct", exec, currentStructure->get(), ident); + out.printf(", "); + dumpStructure(out, "struct", exec, currentStructure->get(), ident); } - dataLogF("]"); + out.printf("]"); } #endif -void CodeBlock::printGetByIdCacheStatus(ExecState* exec, int location) +void CodeBlock::printGetByIdCacheStatus(PrintStream& out, ExecState* exec, int location) { Instruction* instruction = instructions().begin() + location; @@ -307,22 +337,20 @@ void CodeBlock::printGetByIdCacheStatus(ExecState* exec, int location) #if ENABLE(LLINT) if (exec->interpreter()->getOpcodeID(instruction[0].u.opcode) == op_get_array_length) - dataLogF(" llint(array_length)"); - else { - Structure* structure = instruction[4].u.structure.get(); - dataLogF(" llint("); - dumpStructure("struct", exec, structure, ident); - dataLogF(")"); + out.printf(" llint(array_length)"); + else if (Structure* structure = instruction[4].u.structure.get()) { + out.printf(" llint("); + dumpStructure(out, "struct", exec, structure, ident); + out.printf(")"); } #endif #if ENABLE(JIT) if (numberOfStructureStubInfos()) { - dataLogF(" jit("); StructureStubInfo& stubInfo = getStubInfo(location); - if (!stubInfo.seen) - dataLogF("not seen"); - else { + if (stubInfo.seen) { + out.printf(" jit("); + Structure* baseStructure = 0; Structure* prototypeStructure = 0; StructureChain* chain = 0; @@ -331,166 +359,163 @@ void CodeBlock::printGetByIdCacheStatus(ExecState* exec, int location) switch (stubInfo.accessType) { case access_get_by_id_self: - dataLogF("self"); + out.printf("self"); baseStructure = stubInfo.u.getByIdSelf.baseObjectStructure.get(); break; case access_get_by_id_proto: - dataLogF("proto"); + out.printf("proto"); baseStructure = stubInfo.u.getByIdProto.baseObjectStructure.get(); prototypeStructure = stubInfo.u.getByIdProto.prototypeStructure.get(); break; case access_get_by_id_chain: - dataLogF("chain"); + out.printf("chain"); baseStructure = stubInfo.u.getByIdChain.baseObjectStructure.get(); chain = stubInfo.u.getByIdChain.chain.get(); break; case access_get_by_id_self_list: - dataLogF("self_list"); + out.printf("self_list"); structureList = stubInfo.u.getByIdSelfList.structureList; listSize = stubInfo.u.getByIdSelfList.listSize; break; case access_get_by_id_proto_list: - dataLogF("proto_list"); + out.printf("proto_list"); structureList = stubInfo.u.getByIdProtoList.structureList; listSize = stubInfo.u.getByIdProtoList.listSize; break; case access_unset: - dataLogF("unset"); + out.printf("unset"); break; case access_get_by_id_generic: - dataLogF("generic"); + out.printf("generic"); break; case access_get_array_length: - dataLogF("array_length"); + out.printf("array_length"); break; case access_get_string_length: - dataLogF("string_length"); + out.printf("string_length"); break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); break; } if (baseStructure) { - dataLogF(", "); - dumpStructure("struct", exec, baseStructure, ident); + out.printf(", "); + dumpStructure(out, "struct", exec, baseStructure, ident); } if (prototypeStructure) { - dataLogF(", "); - dumpStructure("prototypeStruct", exec, baseStructure, ident); + out.printf(", "); + dumpStructure(out, "prototypeStruct", exec, baseStructure, ident); } if (chain) { - dataLogF(", "); - dumpChain(exec, chain, ident); + out.printf(", "); + dumpChain(out, exec, chain, ident); } if (structureList) { - dataLogF(", list = %p: [", structureList); + out.printf(", list = %p: [", structureList); for (int i = 0; i < listSize; ++i) { if (i) - dataLogF(", "); - dataLogF("("); - dumpStructure("base", exec, structureList->list[i].base.get(), ident); + out.printf(", "); + out.printf("("); + dumpStructure(out, "base", exec, structureList->list[i].base.get(), ident); if (structureList->list[i].isChain) { if (structureList->list[i].u.chain.get()) { - dataLogF(", "); - dumpChain(exec, structureList->list[i].u.chain.get(), ident); + out.printf(", "); + dumpChain(out, exec, structureList->list[i].u.chain.get(), ident); } } else { if (structureList->list[i].u.proto.get()) { - dataLogF(", "); - dumpStructure("proto", exec, structureList->list[i].u.proto.get(), ident); + out.printf(", "); + dumpStructure(out, "proto", exec, structureList->list[i].u.proto.get(), ident); } } - dataLogF(")"); + out.printf(")"); } - dataLogF("]"); + out.printf("]"); } + out.printf(")"); } - dataLogF(")"); } #endif } -void CodeBlock::printCallOp(ExecState* exec, int location, const Instruction*& it, const char* op, CacheDumpMode cacheDumpMode) +void CodeBlock::printCallOp(PrintStream& out, ExecState* exec, int location, const Instruction*& it, const char* op, CacheDumpMode cacheDumpMode) { int func = (++it)->u.operand; int argCount = (++it)->u.operand; int registerOffset = (++it)->u.operand; - dataLogF("[%4d] %s\t %s, %d, %d", location, op, registerName(exec, func).data(), argCount, registerOffset); + out.printf("[%4d] %s\t %s, %d, %d", location, op, registerName(exec, func).data(), argCount, registerOffset); if (cacheDumpMode == DumpCaches) { #if ENABLE(LLINT) LLIntCallLinkInfo* callLinkInfo = it[1].u.callLinkInfo; if (callLinkInfo->lastSeenCallee) { - dataLogF(" llint(%p, exec %p)", - callLinkInfo->lastSeenCallee.get(), - callLinkInfo->lastSeenCallee->executable()); - } else - dataLogF(" llint(not set)"); + out.printf( + " llint(%p, exec %p)", + callLinkInfo->lastSeenCallee.get(), + callLinkInfo->lastSeenCallee->executable()); + } #endif #if ENABLE(JIT) if (numberOfCallLinkInfos()) { JSFunction* target = getCallLinkInfo(location).lastSeenCallee.get(); if (target) - dataLogF(" jit(%p, exec %p)", target, target->executable()); - else - dataLogF(" jit(not set)"); + out.printf(" jit(%p, exec %p)", target, target->executable()); } #endif + out.print(" status(", CallLinkStatus::computeFor(this, location), ")"); } - dumpBytecodeCommentAndNewLine(location); it += 2; } -void CodeBlock::printPutByIdOp(ExecState* exec, int location, const Instruction*& it, const char* op) +void CodeBlock::printPutByIdOp(PrintStream& out, ExecState* exec, int location, const Instruction*& it, const char* op) { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] %s\t %s, %s, %s", location, op, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data()); it += 5; } -void CodeBlock::printStructure(const char* name, const Instruction* vPC, int operand) +void CodeBlock::printStructure(PrintStream& out, const char* name, const Instruction* vPC, int operand) { unsigned instructionOffset = vPC - instructions().begin(); - dataLogF(" [%4d] %s: %s\n", instructionOffset, name, pointerToSourceString(vPC[operand].u.structure).utf8().data()); + out.printf(" [%4d] %s: %s\n", instructionOffset, name, pointerToSourceString(vPC[operand].u.structure).utf8().data()); } -void CodeBlock::printStructures(const Instruction* vPC) +void CodeBlock::printStructures(PrintStream& out, const Instruction* vPC) { - Interpreter* interpreter = m_globalData->interpreter; + Interpreter* interpreter = m_vm->interpreter; unsigned instructionOffset = vPC - instructions().begin(); if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id)) { - printStructure("get_by_id", vPC, 4); + printStructure(out, "get_by_id", vPC, 4); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { - printStructure("get_by_id_self", vPC, 4); + printStructure(out, "get_by_id_self", vPC, 4); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) { - dataLogF(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(vPC[4].u.structure).utf8().data(), pointerToSourceString(vPC[5].u.structure).utf8().data()); + out.printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(vPC[4].u.structure).utf8().data(), pointerToSourceString(vPC[5].u.structure).utf8().data()); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) { - dataLogF(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(vPC[4].u.structure).utf8().data(), pointerToSourceString(vPC[5].u.structure).utf8().data(), pointerToSourceString(vPC[6].u.structureChain).utf8().data()); + out.printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(vPC[4].u.structure).utf8().data(), pointerToSourceString(vPC[5].u.structure).utf8().data(), pointerToSourceString(vPC[6].u.structureChain).utf8().data()); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) { - dataLogF(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(vPC[4].u.structure).utf8().data(), pointerToSourceString(vPC[5].u.structureChain).utf8().data()); + out.printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(vPC[4].u.structure).utf8().data(), pointerToSourceString(vPC[5].u.structureChain).utf8().data()); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id)) { - printStructure("put_by_id", vPC, 4); + printStructure(out, "put_by_id", vPC, 4); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_replace)) { - printStructure("put_by_id_replace", vPC, 4); + printStructure(out, "put_by_id_replace", vPC, 4); return; } @@ -498,7 +523,7 @@ void CodeBlock::printStructures(const Instruction* vPC) ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_call) || vPC[0].u.opcode == interpreter->getOpcode(op_call_eval) || vPC[0].u.opcode == interpreter->getOpcode(op_construct)); } -void CodeBlock::dumpBytecode() +void CodeBlock::dumpBytecode(PrintStream& out) { // We only use the ExecState* for things that don't actually lead to JS execution, // like converting a JSString to a String. Hence the globalExec is appropriate. @@ -509,92 +534,95 @@ void CodeBlock::dumpBytecode() for (size_t i = 0; i < instructions().size(); i += opcodeLengths[exec->interpreter()->getOpcodeID(instructions()[i].u.opcode)]) ++instructionCount; - dataLog(*this); - dataLogF( + out.print(*this); + out.printf( ": %lu m_instructions; %lu bytes; %d parameter(s); %d callee register(s); %d variable(s)", static_cast(instructions().size()), static_cast(instructions().size() * sizeof(Instruction)), m_numParameters, m_numCalleeRegisters, m_numVars); - if (symbolTable() && symbolTable()->captureCount()) - dataLogF("; %d captured var(s)", symbolTable()->captureCount()); + if (symbolTable() && symbolTable()->captureCount()) { + out.printf( + "; %d captured var(s) (from r%d to r%d, inclusive)", + symbolTable()->captureCount(), symbolTable()->captureStart(), symbolTable()->captureEnd() - 1); + } if (usesArguments()) { - dataLogF( + out.printf( "; uses arguments, in r%d, r%d", argumentsRegister(), unmodifiedArgumentsRegister(argumentsRegister())); } if (needsFullScopeChain() && codeType() == FunctionCode) - dataLogF("; activation in r%d", activationRegister()); - dataLogF("\n\n"); + out.printf("; activation in r%d", activationRegister()); + out.print("\n\nSource: ", sourceCodeOnOneLine(), "\n\n"); const Instruction* begin = instructions().begin(); const Instruction* end = instructions().end(); for (const Instruction* it = begin; it != end; ++it) - dumpBytecode(exec, begin, it); + dumpBytecode(out, exec, begin, it); if (!m_identifiers.isEmpty()) { - dataLogF("\nIdentifiers:\n"); + out.printf("\nIdentifiers:\n"); size_t i = 0; do { - dataLogF(" id%u = %s\n", static_cast(i), m_identifiers[i].string().utf8().data()); + out.printf(" id%u = %s\n", static_cast(i), m_identifiers[i].string().utf8().data()); ++i; } while (i != m_identifiers.size()); } if (!m_constantRegisters.isEmpty()) { - dataLogF("\nConstants:\n"); + out.printf("\nConstants:\n"); size_t i = 0; do { - dataLogF(" k%u = %s\n", static_cast(i), valueToSourceString(exec, m_constantRegisters[i].get()).utf8().data()); + out.printf(" k%u = %s\n", static_cast(i), valueToSourceString(exec, m_constantRegisters[i].get()).utf8().data()); ++i; } while (i < m_constantRegisters.size()); } if (size_t count = m_unlinkedCode->numberOfRegExps()) { - dataLogF("\nm_regexps:\n"); + out.printf("\nm_regexps:\n"); size_t i = 0; do { - dataLogF(" re%u = %s\n", static_cast(i), regexpToSourceString(m_unlinkedCode->regexp(i)).utf8().data()); + out.printf(" re%u = %s\n", static_cast(i), regexpToSourceString(m_unlinkedCode->regexp(i)).utf8().data()); ++i; } while (i < count); } #if ENABLE(JIT) if (!m_structureStubInfos.isEmpty()) - dataLogF("\nStructures:\n"); + out.printf("\nStructures:\n"); #endif if (m_rareData && !m_rareData->m_exceptionHandlers.isEmpty()) { - dataLogF("\nException Handlers:\n"); + out.printf("\nException Handlers:\n"); unsigned i = 0; do { - dataLogF("\t %d: { start: [%4d] end: [%4d] target: [%4d] depth: [%4d] }\n", i + 1, m_rareData->m_exceptionHandlers[i].start, m_rareData->m_exceptionHandlers[i].end, m_rareData->m_exceptionHandlers[i].target, m_rareData->m_exceptionHandlers[i].scopeDepth); + out.printf("\t %d: { start: [%4d] end: [%4d] target: [%4d] depth: [%4d] }\n", i + 1, m_rareData->m_exceptionHandlers[i].start, m_rareData->m_exceptionHandlers[i].end, m_rareData->m_exceptionHandlers[i].target, m_rareData->m_exceptionHandlers[i].scopeDepth); ++i; } while (i < m_rareData->m_exceptionHandlers.size()); } if (m_rareData && !m_rareData->m_immediateSwitchJumpTables.isEmpty()) { - dataLogF("Immediate Switch Jump Tables:\n"); + out.printf("Immediate Switch Jump Tables:\n"); unsigned i = 0; do { - dataLogF(" %1d = {\n", i); + out.printf(" %1d = {\n", i); int entry = 0; Vector::const_iterator end = m_rareData->m_immediateSwitchJumpTables[i].branchOffsets.end(); for (Vector::const_iterator iter = m_rareData->m_immediateSwitchJumpTables[i].branchOffsets.begin(); iter != end; ++iter, ++entry) { if (!*iter) continue; - dataLogF("\t\t%4d => %04d\n", entry + m_rareData->m_immediateSwitchJumpTables[i].min, *iter); + out.printf("\t\t%4d => %04d\n", entry + m_rareData->m_immediateSwitchJumpTables[i].min, *iter); } - dataLogF(" }\n"); + out.printf(" }\n"); ++i; } while (i < m_rareData->m_immediateSwitchJumpTables.size()); } if (m_rareData && !m_rareData->m_characterSwitchJumpTables.isEmpty()) { - dataLogF("\nCharacter Switch Jump Tables:\n"); + out.printf("\nCharacter Switch Jump Tables:\n"); unsigned i = 0; do { - dataLogF(" %1d = {\n", i); + out.printf(" %1d = {\n", i); int entry = 0; Vector::const_iterator end = m_rareData->m_characterSwitchJumpTables[i].branchOffsets.end(); for (Vector::const_iterator iter = m_rareData->m_characterSwitchJumpTables[i].branchOffsets.begin(); iter != end; ++iter, ++entry) { @@ -602,96 +630,143 @@ void CodeBlock::dumpBytecode() continue; ASSERT(!((i + m_rareData->m_characterSwitchJumpTables[i].min) & ~0xFFFF)); UChar ch = static_cast(entry + m_rareData->m_characterSwitchJumpTables[i].min); - dataLogF("\t\t\"%s\" => %04d\n", String(&ch, 1).utf8().data(), *iter); - } - dataLogF(" }\n"); + out.printf("\t\t\"%s\" => %04d\n", String(&ch, 1).utf8().data(), *iter); + } + out.printf(" }\n"); ++i; } while (i < m_rareData->m_characterSwitchJumpTables.size()); } if (m_rareData && !m_rareData->m_stringSwitchJumpTables.isEmpty()) { - dataLogF("\nString Switch Jump Tables:\n"); + out.printf("\nString Switch Jump Tables:\n"); unsigned i = 0; do { - dataLogF(" %1d = {\n", i); + out.printf(" %1d = {\n", i); StringJumpTable::StringOffsetTable::const_iterator end = m_rareData->m_stringSwitchJumpTables[i].offsetTable.end(); for (StringJumpTable::StringOffsetTable::const_iterator iter = m_rareData->m_stringSwitchJumpTables[i].offsetTable.begin(); iter != end; ++iter) - dataLogF("\t\t\"%s\" => %04d\n", String(iter->key).utf8().data(), iter->value.branchOffset); - dataLogF(" }\n"); + out.printf("\t\t\"%s\" => %04d\n", String(iter->key).utf8().data(), iter->value.branchOffset); + out.printf(" }\n"); ++i; } while (i < m_rareData->m_stringSwitchJumpTables.size()); } - dataLogF("\n"); + out.printf("\n"); +} + +void CodeBlock::beginDumpProfiling(PrintStream& out, bool& hasPrintedProfiling) +{ + if (hasPrintedProfiling) { + out.print("; "); + return; + } + + out.print(" "); + hasPrintedProfiling = true; } -void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const Instruction*& it) +void CodeBlock::dumpValueProfiling(PrintStream& out, const Instruction*& it, bool& hasPrintedProfiling) +{ + ++it; +#if ENABLE(VALUE_PROFILER) + CString description = it->u.profile->briefDescription(); + if (!description.length()) + return; + beginDumpProfiling(out, hasPrintedProfiling); + out.print(description); +#else + UNUSED_PARAM(out); + UNUSED_PARAM(hasPrintedProfiling); +#endif +} + +void CodeBlock::dumpArrayProfiling(PrintStream& out, const Instruction*& it, bool& hasPrintedProfiling) +{ + ++it; +#if ENABLE(VALUE_PROFILER) + CString description = it->u.arrayProfile->briefDescription(this); + if (!description.length()) + return; + beginDumpProfiling(out, hasPrintedProfiling); + out.print(description); +#else + UNUSED_PARAM(out); + UNUSED_PARAM(hasPrintedProfiling); +#endif +} + +#if ENABLE(VALUE_PROFILER) +void CodeBlock::dumpRareCaseProfile(PrintStream& out, const char* name, RareCaseProfile* profile, bool& hasPrintedProfiling) +{ + if (!profile || !profile->m_counter) + return; + + beginDumpProfiling(out, hasPrintedProfiling); + out.print(name, profile->m_counter); +} +#endif + +void CodeBlock::dumpBytecode(PrintStream& out, ExecState* exec, const Instruction* begin, const Instruction*& it) { int location = it - begin; + bool hasPrintedProfiling = false; switch (exec->interpreter()->getOpcodeID(it->u.opcode)) { case op_enter: { - dataLogF("[%4d] enter", location); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] enter", location); break; } case op_create_activation: { int r0 = (++it)->u.operand; - dataLogF("[%4d] create_activation %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] create_activation %s", location, registerName(exec, r0).data()); break; } case op_create_arguments: { int r0 = (++it)->u.operand; - dataLogF("[%4d] create_arguments\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] create_arguments\t %s", location, registerName(exec, r0).data()); break; } case op_init_lazy_reg: { int r0 = (++it)->u.operand; - dataLogF("[%4d] init_lazy_reg\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] init_lazy_reg\t %s", location, registerName(exec, r0).data()); break; } case op_get_callee: { int r0 = (++it)->u.operand; - dataLogF("[%4d] op_get_callee %s\n", location, registerName(exec, r0).data()); + out.printf("[%4d] op_get_callee %s\n", location, registerName(exec, r0).data()); ++it; break; } case op_create_this: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] create_this %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + unsigned inferredInlineCapacity = (++it)->u.operand; + out.printf("[%4d] create_this %s, %s, %u", location, registerName(exec, r0).data(), registerName(exec, r1).data(), inferredInlineCapacity); break; } case op_convert_this: { int r0 = (++it)->u.operand; - dataLogF("[%4d] convert_this\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] convert_this\t %s", location, registerName(exec, r0).data()); ++it; // Skip value profile. break; } case op_new_object: { int r0 = (++it)->u.operand; - dataLogF("[%4d] new_object\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + unsigned inferredInlineCapacity = (++it)->u.operand; + out.printf("[%4d] new_object\t %s, %u", location, registerName(exec, r0).data(), inferredInlineCapacity); + ++it; // Skip object allocation profile. break; } case op_new_array: { int dst = (++it)->u.operand; int argv = (++it)->u.operand; int argc = (++it)->u.operand; - dataLogF("[%4d] new_array\t %s, %s, %d", location, registerName(exec, dst).data(), registerName(exec, argv).data(), argc); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] new_array\t %s, %s, %d", location, registerName(exec, dst).data(), registerName(exec, argv).data(), argc); ++it; // Skip array allocation profile. break; } case op_new_array_with_size: { int dst = (++it)->u.operand; int length = (++it)->u.operand; - dataLogF("[%4d] new_array_with_size\t %s, %s", location, registerName(exec, dst).data(), registerName(exec, length).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] new_array_with_size\t %s, %s", location, registerName(exec, dst).data(), registerName(exec, length).data()); ++it; // Skip array allocation profile. break; } @@ -699,149 +774,136 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int dst = (++it)->u.operand; int argv = (++it)->u.operand; int argc = (++it)->u.operand; - dataLogF("[%4d] new_array_buffer\t %s, %d, %d", location, registerName(exec, dst).data(), argv, argc); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] new_array_buffer\t %s, %d, %d", location, registerName(exec, dst).data(), argv, argc); ++it; // Skip array allocation profile. break; } case op_new_regexp: { int r0 = (++it)->u.operand; int re0 = (++it)->u.operand; - dataLogF("[%4d] new_regexp\t %s, ", location, registerName(exec, r0).data()); + out.printf("[%4d] new_regexp\t %s, ", location, registerName(exec, r0).data()); if (r0 >=0 && r0 < (int)m_unlinkedCode->numberOfRegExps()) - dataLogF("%s", regexpName(re0, regexp(re0)).data()); + out.printf("%s", regexpName(re0, regexp(re0)).data()); else - dataLogF("bad_regexp(%d)", re0); - dumpBytecodeCommentAndNewLine(location); + out.printf("bad_regexp(%d)", re0); break; } case op_mov: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] mov\t\t %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] mov\t\t %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); break; } case op_not: { - printUnaryOp(exec, location, it, "not"); + printUnaryOp(out, exec, location, it, "not"); break; } case op_eq: { - printBinaryOp(exec, location, it, "eq"); + printBinaryOp(out, exec, location, it, "eq"); break; } case op_eq_null: { - printUnaryOp(exec, location, it, "eq_null"); + printUnaryOp(out, exec, location, it, "eq_null"); break; } case op_neq: { - printBinaryOp(exec, location, it, "neq"); + printBinaryOp(out, exec, location, it, "neq"); break; } case op_neq_null: { - printUnaryOp(exec, location, it, "neq_null"); + printUnaryOp(out, exec, location, it, "neq_null"); break; } case op_stricteq: { - printBinaryOp(exec, location, it, "stricteq"); + printBinaryOp(out, exec, location, it, "stricteq"); break; } case op_nstricteq: { - printBinaryOp(exec, location, it, "nstricteq"); + printBinaryOp(out, exec, location, it, "nstricteq"); break; } case op_less: { - printBinaryOp(exec, location, it, "less"); + printBinaryOp(out, exec, location, it, "less"); break; } case op_lesseq: { - printBinaryOp(exec, location, it, "lesseq"); + printBinaryOp(out, exec, location, it, "lesseq"); break; } case op_greater: { - printBinaryOp(exec, location, it, "greater"); + printBinaryOp(out, exec, location, it, "greater"); break; } case op_greatereq: { - printBinaryOp(exec, location, it, "greatereq"); + printBinaryOp(out, exec, location, it, "greatereq"); break; } - case op_pre_inc: { + case op_inc: { int r0 = (++it)->u.operand; - dataLogF("[%4d] pre_inc\t\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] pre_inc\t\t %s", location, registerName(exec, r0).data()); break; } - case op_pre_dec: { + case op_dec: { int r0 = (++it)->u.operand; - dataLogF("[%4d] pre_dec\t\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] pre_dec\t\t %s", location, registerName(exec, r0).data()); break; } - case op_post_inc: { - printUnaryOp(exec, location, it, "post_inc"); - break; - } - case op_post_dec: { - printUnaryOp(exec, location, it, "post_dec"); - break; - } - case op_to_jsnumber: { - printUnaryOp(exec, location, it, "to_jsnumber"); + case op_to_number: { + printUnaryOp(out, exec, location, it, "to_number"); break; } case op_negate: { - printUnaryOp(exec, location, it, "negate"); + printUnaryOp(out, exec, location, it, "negate"); break; } case op_add: { - printBinaryOp(exec, location, it, "add"); + printBinaryOp(out, exec, location, it, "add"); ++it; break; } case op_mul: { - printBinaryOp(exec, location, it, "mul"); + printBinaryOp(out, exec, location, it, "mul"); ++it; break; } case op_div: { - printBinaryOp(exec, location, it, "div"); + printBinaryOp(out, exec, location, it, "div"); ++it; break; } case op_mod: { - printBinaryOp(exec, location, it, "mod"); + printBinaryOp(out, exec, location, it, "mod"); break; } case op_sub: { - printBinaryOp(exec, location, it, "sub"); + printBinaryOp(out, exec, location, it, "sub"); ++it; break; } case op_lshift: { - printBinaryOp(exec, location, it, "lshift"); + printBinaryOp(out, exec, location, it, "lshift"); break; } case op_rshift: { - printBinaryOp(exec, location, it, "rshift"); + printBinaryOp(out, exec, location, it, "rshift"); break; } case op_urshift: { - printBinaryOp(exec, location, it, "urshift"); + printBinaryOp(out, exec, location, it, "urshift"); break; } case op_bitand: { - printBinaryOp(exec, location, it, "bitand"); + printBinaryOp(out, exec, location, it, "bitand"); ++it; break; } case op_bitxor: { - printBinaryOp(exec, location, it, "bitxor"); + printBinaryOp(out, exec, location, it, "bitxor"); ++it; break; } case op_bitor: { - printBinaryOp(exec, location, it, "bitor"); + printBinaryOp(out, exec, location, it, "bitor"); ++it; break; } @@ -850,48 +912,46 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] check_has_instance\t\t %s, %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] check_has_instance\t\t %s, %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), offset, location + offset); break; } case op_instanceof: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - dataLogF("[%4d] instanceof\t\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] instanceof\t\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); break; } case op_typeof: { - printUnaryOp(exec, location, it, "typeof"); + printUnaryOp(out, exec, location, it, "typeof"); break; } case op_is_undefined: { - printUnaryOp(exec, location, it, "is_undefined"); + printUnaryOp(out, exec, location, it, "is_undefined"); break; } case op_is_boolean: { - printUnaryOp(exec, location, it, "is_boolean"); + printUnaryOp(out, exec, location, it, "is_boolean"); break; } case op_is_number: { - printUnaryOp(exec, location, it, "is_number"); + printUnaryOp(out, exec, location, it, "is_number"); break; } case op_is_string: { - printUnaryOp(exec, location, it, "is_string"); + printUnaryOp(out, exec, location, it, "is_string"); break; } case op_is_object: { - printUnaryOp(exec, location, it, "is_object"); + printUnaryOp(out, exec, location, it, "is_object"); break; } case op_is_function: { - printUnaryOp(exec, location, it, "is_function"); + printUnaryOp(out, exec, location, it, "is_function"); break; } case op_in: { - printBinaryOp(exec, location, it, "in"); + printBinaryOp(out, exec, location, it, "in"); break; } case op_put_to_base_variable: @@ -900,8 +960,7 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int id0 = (++it)->u.operand; int value = (++it)->u.operand; int resolveInfo = (++it)->u.operand; - dataLogF("[%4d] put_to_base\t %s, %s, %s, %d", location, registerName(exec, base).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, value).data(), resolveInfo); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] put_to_base\t %s, %s, %s, %d", location, registerName(exec, base).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, value).data(), resolveInfo); break; } case op_resolve: @@ -913,14 +972,27 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int resolveInfo = (++it)->u.operand; - dataLogF("[%4d] resolve\t\t %s, %s, %d", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo); - dumpBytecodeCommentAndNewLine(location); - it++; + out.printf("[%4d] resolve\t\t %s, %s, %d", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo); + dumpValueProfiling(out, it, hasPrintedProfiling); + break; + } + case op_get_scoped_var: { + int r0 = (++it)->u.operand; + int index = (++it)->u.operand; + int skipLevels = (++it)->u.operand; + out.printf("[%4d] get_scoped_var\t %s, %d, %d", location, registerName(exec, r0).data(), index, skipLevels); + dumpValueProfiling(out, it, hasPrintedProfiling); + break; + } + case op_put_scoped_var: { + int index = (++it)->u.operand; + int skipLevels = (++it)->u.operand; + int r0 = (++it)->u.operand; + out.printf("[%4d] put_scoped_var\t %d, %d, %s", location, index, skipLevels, registerName(exec, r0).data()); break; } case op_init_global_const_nop: { - dataLogF("[%4d] init_global_const_nop\t", location); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] init_global_const_nop\t", location); it++; it++; it++; @@ -930,8 +1002,7 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In case op_init_global_const: { WriteBarrier* registerPointer = (++it)->u.registerPointer; int r0 = (++it)->u.operand; - dataLogF("[%4d] init_global_const\t g%d(%p), %s", location, m_globalObject->findRegisterIndex(registerPointer), registerPointer, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] init_global_const\t g%d(%p), %s", location, m_globalObject->findRegisterIndex(registerPointer), registerPointer, registerName(exec, r0).data()); it++; it++; break; @@ -939,8 +1010,7 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In case op_init_global_const_check: { WriteBarrier* registerPointer = (++it)->u.registerPointer; int r0 = (++it)->u.operand; - dataLogF("[%4d] init_global_const_check\t g%d(%p), %s", location, m_globalObject->findRegisterIndex(registerPointer), registerPointer, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] init_global_const_check\t g%d(%p), %s", location, m_globalObject->findRegisterIndex(registerPointer), registerPointer, registerName(exec, r0).data()); it++; it++; break; @@ -955,16 +1025,8 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int isStrict = (++it)->u.operand; int resolveInfo = (++it)->u.operand; int putToBaseInfo = (++it)->u.operand; - dataLogF("[%4d] resolve_base%s\t %s, %s, %d, %d", location, isStrict ? "_strict" : "", registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo, putToBaseInfo); - dumpBytecodeCommentAndNewLine(location); - it++; - break; - } - case op_ensure_property_exists: { - int r0 = (++it)->u.operand; - int id0 = (++it)->u.operand; - dataLogF("[%4d] ensure_property_exists\t %s, %s", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] resolve_base%s\t %s, %s, %d, %d", location, isStrict ? "_strict" : "", registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo, putToBaseInfo); + dumpValueProfiling(out, it, hasPrintedProfiling); break; } case op_resolve_with_base: { @@ -973,9 +1035,8 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int id0 = (++it)->u.operand; int resolveInfo = (++it)->u.operand; int putToBaseInfo = (++it)->u.operand; - dataLogF("[%4d] resolve_with_base %s, %s, %s, %d, %d", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo, putToBaseInfo); - dumpBytecodeCommentAndNewLine(location); - it++; + out.printf("[%4d] resolve_with_base %s, %s, %s, %d, %d", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo, putToBaseInfo); + dumpValueProfiling(out, it, hasPrintedProfiling); break; } case op_resolve_with_this: { @@ -983,9 +1044,8 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; int resolveInfo = (++it)->u.operand; - dataLogF("[%4d] resolve_with_this %s, %s, %s, %d", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo); - dumpBytecodeCommentAndNewLine(location); - it++; + out.printf("[%4d] resolve_with_this %s, %s, %s, %d", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data(), resolveInfo); + dumpValueProfiling(out, it, hasPrintedProfiling); break; } case op_get_by_id: @@ -1002,50 +1062,50 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In case op_get_by_id_generic: case op_get_array_length: case op_get_string_length: { - printGetByIdOp(exec, location, it); - printGetByIdCacheStatus(exec, location); - dumpBytecodeCommentAndNewLine(location); + printGetByIdOp(out, exec, location, it); + printGetByIdCacheStatus(out, exec, location); + dumpValueProfiling(out, it, hasPrintedProfiling); break; } case op_get_arguments_length: { - printUnaryOp(exec, location, it, "get_arguments_length"); + printUnaryOp(out, exec, location, it, "get_arguments_length"); it++; break; } case op_put_by_id: { - printPutByIdOp(exec, location, it, "put_by_id"); + printPutByIdOp(out, exec, location, it, "put_by_id"); break; } case op_put_by_id_out_of_line: { - printPutByIdOp(exec, location, it, "put_by_id_out_of_line"); + printPutByIdOp(out, exec, location, it, "put_by_id_out_of_line"); break; } case op_put_by_id_replace: { - printPutByIdOp(exec, location, it, "put_by_id_replace"); + printPutByIdOp(out, exec, location, it, "put_by_id_replace"); break; } case op_put_by_id_transition: { - printPutByIdOp(exec, location, it, "put_by_id_transition"); + printPutByIdOp(out, exec, location, it, "put_by_id_transition"); break; } case op_put_by_id_transition_direct: { - printPutByIdOp(exec, location, it, "put_by_id_transition_direct"); + printPutByIdOp(out, exec, location, it, "put_by_id_transition_direct"); break; } case op_put_by_id_transition_direct_out_of_line: { - printPutByIdOp(exec, location, it, "put_by_id_transition_direct_out_of_line"); + printPutByIdOp(out, exec, location, it, "put_by_id_transition_direct_out_of_line"); break; } case op_put_by_id_transition_normal: { - printPutByIdOp(exec, location, it, "put_by_id_transition_normal"); + printPutByIdOp(out, exec, location, it, "put_by_id_transition_normal"); break; } case op_put_by_id_transition_normal_out_of_line: { - printPutByIdOp(exec, location, it, "put_by_id_transition_normal_out_of_line"); + printPutByIdOp(out, exec, location, it, "put_by_id_transition_normal_out_of_line"); break; } case op_put_by_id_generic: { - printPutByIdOp(exec, location, it, "put_by_id_generic"); + printPutByIdOp(out, exec, location, it, "put_by_id_generic"); break; } case op_put_getter_setter: { @@ -1053,36 +1113,32 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - dataLogF("[%4d] put_getter_setter\t %s, %s, %s, %s", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] put_getter_setter\t %s, %s, %s, %s", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); break; } case op_del_by_id: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - dataLogF("[%4d] del_by_id\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] del_by_id\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data()); break; } case op_get_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - dataLogF("[%4d] get_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); - dumpBytecodeCommentAndNewLine(location); - it++; - it++; + out.printf("[%4d] get_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); + dumpArrayProfiling(out, it, hasPrintedProfiling); + dumpValueProfiling(out, it, hasPrintedProfiling); break; } case op_get_argument_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - dataLogF("[%4d] get_argument_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); - dumpBytecodeCommentAndNewLine(location); - ++it; + out.printf("[%4d] get_argument_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); ++it; + dumpValueProfiling(out, it, hasPrintedProfiling); break; } case op_get_by_pname: { @@ -1092,225 +1148,159 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int r3 = (++it)->u.operand; int r4 = (++it)->u.operand; int r5 = (++it)->u.operand; - dataLogF("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), registerName(exec, r4).data(), registerName(exec, r5).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), registerName(exec, r4).data(), registerName(exec, r5).data()); break; } case op_put_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - dataLogF("[%4d] put_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); - dumpBytecodeCommentAndNewLine(location); - ++it; + out.printf("[%4d] put_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); + dumpArrayProfiling(out, it, hasPrintedProfiling); break; } case op_del_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - dataLogF("[%4d] del_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] del_by_val\t %s, %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); break; } case op_put_by_index: { int r0 = (++it)->u.operand; unsigned n0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] put_by_index\t %s, %u, %s", location, registerName(exec, r0).data(), n0, registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] put_by_index\t %s, %u, %s", location, registerName(exec, r0).data(), n0, registerName(exec, r1).data()); break; } case op_jmp: { int offset = (++it)->u.operand; - dataLogF("[%4d] jmp\t\t %d(->%d)", location, offset, location + offset); - dumpBytecodeCommentAndNewLine(location); - break; - } - case op_loop: { - int offset = (++it)->u.operand; - dataLogF("[%4d] loop\t\t %d(->%d)", location, offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jmp\t\t %d(->%d)", location, offset, location + offset); break; } case op_jtrue: { - printConditionalJump(exec, begin, it, location, "jtrue"); - break; - } - case op_loop_if_true: { - printConditionalJump(exec, begin, it, location, "loop_if_true"); - break; - } - case op_loop_if_false: { - printConditionalJump(exec, begin, it, location, "loop_if_false"); + printConditionalJump(out, exec, begin, it, location, "jtrue"); break; } case op_jfalse: { - printConditionalJump(exec, begin, it, location, "jfalse"); + printConditionalJump(out, exec, begin, it, location, "jfalse"); break; } case op_jeq_null: { - printConditionalJump(exec, begin, it, location, "jeq_null"); + printConditionalJump(out, exec, begin, it, location, "jeq_null"); break; } case op_jneq_null: { - printConditionalJump(exec, begin, it, location, "jneq_null"); + printConditionalJump(out, exec, begin, it, location, "jneq_null"); break; } case op_jneq_ptr: { int r0 = (++it)->u.operand; Special::Pointer pointer = (++it)->u.specialPointer; int offset = (++it)->u.operand; - dataLogF("[%4d] jneq_ptr\t\t %s, %d (%p), %d(->%d)", location, registerName(exec, r0).data(), pointer, m_globalObject->actualPointerFor(pointer), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jneq_ptr\t\t %s, %d (%p), %d(->%d)", location, registerName(exec, r0).data(), pointer, m_globalObject->actualPointerFor(pointer), offset, location + offset); break; } case op_jless: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jless\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jless\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_jlesseq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jlesseq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jlesseq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_jgreater: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jgreater\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jgreater\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_jgreatereq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jgreatereq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jgreatereq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_jnless: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jnless\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jnless\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_jnlesseq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jnlesseq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_jngreater: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jngreater\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jngreater\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_jngreatereq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - dataLogF("[%4d] jngreatereq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); - break; - } - case op_loop_if_less: { - int r0 = (++it)->u.operand; - int r1 = (++it)->u.operand; - int offset = (++it)->u.operand; - dataLogF("[%4d] loop_if_less\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); - break; - } - case op_loop_if_lesseq: { - int r0 = (++it)->u.operand; - int r1 = (++it)->u.operand; - int offset = (++it)->u.operand; - dataLogF("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); - break; - } - case op_loop_if_greater: { - int r0 = (++it)->u.operand; - int r1 = (++it)->u.operand; - int offset = (++it)->u.operand; - dataLogF("[%4d] loop_if_greater\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); - break; - } - case op_loop_if_greatereq: { - int r0 = (++it)->u.operand; - int r1 = (++it)->u.operand; - int offset = (++it)->u.operand; - dataLogF("[%4d] loop_if_greatereq\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] jngreatereq\t\t %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); break; } case op_loop_hint: { - dataLogF("[%4d] loop_hint", location); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] loop_hint", location); break; } case op_switch_imm: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - dataLogF("[%4d] switch_imm\t %d, %d(->%d), %s", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] switch_imm\t %d, %d(->%d), %s", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); break; } case op_switch_char: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - dataLogF("[%4d] switch_char\t %d, %d(->%d), %s", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] switch_char\t %d, %d(->%d), %s", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); break; } case op_switch_string: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - dataLogF("[%4d] switch_string\t %d, %d(->%d), %s", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] switch_string\t %d, %d(->%d), %s", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); break; } case op_new_func: { int r0 = (++it)->u.operand; int f0 = (++it)->u.operand; int shouldCheck = (++it)->u.operand; - dataLogF("[%4d] new_func\t\t %s, f%d, %s", location, registerName(exec, r0).data(), f0, shouldCheck ? "" : ""); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] new_func\t\t %s, f%d, %s", location, registerName(exec, r0).data(), f0, shouldCheck ? "" : ""); break; } case op_new_func_exp: { int r0 = (++it)->u.operand; int f0 = (++it)->u.operand; - dataLogF("[%4d] new_func_exp\t %s, f%d", location, registerName(exec, r0).data(), f0); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] new_func_exp\t %s, f%d", location, registerName(exec, r0).data(), f0); break; } case op_call: { - printCallOp(exec, location, it, "call", DumpCaches); + printCallOp(out, exec, location, it, "call", DumpCaches); break; } case op_call_eval: { - printCallOp(exec, location, it, "call_eval", DontDumpCaches); + printCallOp(out, exec, location, it, "call_eval", DontDumpCaches); break; } case op_call_varargs: { @@ -1318,60 +1308,52 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int thisValue = (++it)->u.operand; int arguments = (++it)->u.operand; int firstFreeRegister = (++it)->u.operand; - dataLogF("[%4d] call_varargs\t %s, %s, %s, %d", location, registerName(exec, callee).data(), registerName(exec, thisValue).data(), registerName(exec, arguments).data(), firstFreeRegister); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] call_varargs\t %s, %s, %s, %d", location, registerName(exec, callee).data(), registerName(exec, thisValue).data(), registerName(exec, arguments).data(), firstFreeRegister); break; } case op_tear_off_activation: { int r0 = (++it)->u.operand; - dataLogF("[%4d] tear_off_activation\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] tear_off_activation\t %s", location, registerName(exec, r0).data()); break; } case op_tear_off_arguments: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] tear_off_arguments %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] tear_off_arguments %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); break; } case op_ret: { int r0 = (++it)->u.operand; - dataLogF("[%4d] ret\t\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] ret\t\t %s", location, registerName(exec, r0).data()); break; } case op_call_put_result: { int r0 = (++it)->u.operand; - dataLogF("[%4d] call_put_result\t\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); - it++; + out.printf("[%4d] call_put_result\t\t %s", location, registerName(exec, r0).data()); + dumpValueProfiling(out, it, hasPrintedProfiling); break; } case op_ret_object_or_this: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] constructor_ret\t\t %s %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] constructor_ret\t\t %s %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); break; } case op_construct: { - printCallOp(exec, location, it, "construct", DumpCaches); + printCallOp(out, exec, location, it, "construct", DumpCaches); break; } case op_strcat: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int count = (++it)->u.operand; - dataLogF("[%4d] strcat\t\t %s, %s, %d", location, registerName(exec, r0).data(), registerName(exec, r1).data(), count); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] strcat\t\t %s, %s, %d", location, registerName(exec, r0).data(), registerName(exec, r1).data(), count); break; } case op_to_primitive: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - dataLogF("[%4d] to_primitive\t %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] to_primitive\t %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data()); break; } case op_get_pnames: { @@ -1380,8 +1362,7 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int r2 = it[3].u.operand; int r3 = it[4].u.operand; int offset = it[5].u.operand; - dataLogF("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), offset, location + offset); it += OPCODE_LENGTH(op_get_pnames) - 1; break; } @@ -1392,54 +1373,40 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int size = it[4].u.operand; int iter = it[5].u.operand; int offset = it[6].u.operand; - dataLogF("[%4d] next_pname\t %s, %s, %s, %s, %s, %d(->%d)", location, registerName(exec, dest).data(), registerName(exec, base).data(), registerName(exec, i).data(), registerName(exec, size).data(), registerName(exec, iter).data(), offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] next_pname\t %s, %s, %s, %s, %s, %d(->%d)", location, registerName(exec, dest).data(), registerName(exec, base).data(), registerName(exec, i).data(), registerName(exec, size).data(), registerName(exec, iter).data(), offset, location + offset); it += OPCODE_LENGTH(op_next_pname) - 1; break; } case op_push_with_scope: { int r0 = (++it)->u.operand; - dataLogF("[%4d] push_with_scope\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] push_with_scope\t %s", location, registerName(exec, r0).data()); break; } case op_pop_scope: { - dataLogF("[%4d] pop_scope", location); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] pop_scope", location); break; } case op_push_name_scope: { int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; unsigned attributes = (++it)->u.operand; - dataLogF("[%4d] push_name_scope \t%s, %s, %u", location, idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data(), attributes); - dumpBytecodeCommentAndNewLine(location); - break; - } - case op_jmp_scopes: { - int scopeDelta = (++it)->u.operand; - int offset = (++it)->u.operand; - dataLogF("[%4d] jmp_scopes\t^%d, %d(->%d)", location, scopeDelta, offset, location + offset); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] push_name_scope \t%s, %s, %u", location, idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data(), attributes); break; } case op_catch: { int r0 = (++it)->u.operand; - dataLogF("[%4d] catch\t\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] catch\t\t %s", location, registerName(exec, r0).data()); break; } case op_throw: { int r0 = (++it)->u.operand; - dataLogF("[%4d] throw\t\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] throw\t\t %s", location, registerName(exec, r0).data()); break; } case op_throw_static_error: { int k0 = (++it)->u.operand; int k1 = (++it)->u.operand; - dataLogF("[%4d] throw_static_error\t %s, %s", location, constantName(exec, k0, getConstant(k0)).data(), k1 ? "true" : "false"); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] throw_static_error\t %s, %s", location, constantName(exec, k0, getConstant(k0)).data(), k1 ? "true" : "false"); break; } case op_debug: { @@ -1447,40 +1414,54 @@ void CodeBlock::dumpBytecode(ExecState* exec, const Instruction* begin, const In int firstLine = (++it)->u.operand; int lastLine = (++it)->u.operand; int column = (++it)->u.operand; - dataLogF("[%4d] debug\t\t %s, %d, %d, %d", location, debugHookName(debugHookID), firstLine, lastLine, column); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] debug\t\t %s, %d, %d, %d", location, debugHookName(debugHookID), firstLine, lastLine, column); break; } case op_profile_will_call: { int function = (++it)->u.operand; - dataLogF("[%4d] profile_will_call %s", location, registerName(exec, function).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] profile_will_call %s", location, registerName(exec, function).data()); break; } case op_profile_did_call: { int function = (++it)->u.operand; - dataLogF("[%4d] profile_did_call\t %s", location, registerName(exec, function).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] profile_did_call\t %s", location, registerName(exec, function).data()); break; } case op_end: { int r0 = (++it)->u.operand; - dataLogF("[%4d] end\t\t %s", location, registerName(exec, r0).data()); - dumpBytecodeCommentAndNewLine(location); + out.printf("[%4d] end\t\t %s", location, registerName(exec, r0).data()); break; } #if ENABLE(LLINT_C_LOOP) default: - ASSERT(false); // We should never get here. + RELEASE_ASSERT_NOT_REACHED(); +#endif + } + +#if ENABLE(VALUE_PROFILER) + dumpRareCaseProfile(out, "rare case: ", rareCaseProfileForBytecodeOffset(location), hasPrintedProfiling); + dumpRareCaseProfile(out, "special fast case: ", specialFastCaseProfileForBytecodeOffset(location), hasPrintedProfiling); #endif + +#if ENABLE(DFG_JIT) + Vector exitSites = exitProfile().exitSitesFor(location); + if (!exitSites.isEmpty()) { + out.print(" !! frequent exits: "); + CommaPrinter comma; + for (unsigned i = 0; i < exitSites.size(); ++i) + out.print(comma, exitSites[i].kind()); } +#else // ENABLE(DFG_JIT) + UNUSED_PARAM(location); +#endif // ENABLE(DFG_JIT) + out.print("\n"); } -void CodeBlock::dumpBytecode(unsigned bytecodeOffset) +void CodeBlock::dumpBytecode(PrintStream& out, unsigned bytecodeOffset) { ExecState* exec = m_globalObject->globalExec(); const Instruction* it = instructions().begin() + bytecodeOffset; - dumpBytecode(exec, instructions().begin(), it); + dumpBytecode(out, exec, instructions().begin(), it); } #if DUMP_CODE_BLOCK_STATISTICS @@ -1613,19 +1594,19 @@ CodeBlock::CodeBlock(CopyParsedBlockTag, CodeBlock& other) , m_numCalleeRegisters(other.m_numCalleeRegisters) , m_numVars(other.m_numVars) , m_isConstructor(other.m_isConstructor) - , m_unlinkedCode(*other.m_globalData, other.m_ownerExecutable.get(), other.m_unlinkedCode.get()) - , m_ownerExecutable(*other.m_globalData, other.m_ownerExecutable.get(), other.m_ownerExecutable.get()) - , m_globalData(other.m_globalData) + , m_unlinkedCode(*other.m_vm, other.m_ownerExecutable.get(), other.m_unlinkedCode.get()) + , m_ownerExecutable(*other.m_vm, other.m_ownerExecutable.get(), other.m_ownerExecutable.get()) + , m_vm(other.m_vm) , m_instructions(other.m_instructions) , m_thisRegister(other.m_thisRegister) , m_argumentsRegister(other.m_argumentsRegister) , m_activationRegister(other.m_activationRegister) , m_isStrictMode(other.m_isStrictMode) + , m_needsActivation(other.m_needsActivation) , m_source(other.m_source) , m_sourceOffset(other.m_sourceOffset) -#if ENABLE(VALUE_PROFILER) - , m_executionEntryCount(0) -#endif + , m_firstLineColumnOffset(other.m_firstLineColumnOffset) + , m_codeType(other.m_codeType) , m_identifiers(other.m_identifiers) , m_constantRegisters(other.m_constantRegisters) , m_functionDecls(other.m_functionDecls) @@ -1635,9 +1616,6 @@ CodeBlock::CodeBlock(CopyParsedBlockTag, CodeBlock& other) , m_reoptimizationRetryCounter(0) , m_resolveOperations(other.m_resolveOperations) , m_putToBaseOperations(other.m_putToBaseOperations) -#if ENABLE(BYTECODE_COMMENTS) - , m_bytecodeCommentIterator(0) -#endif #if ENABLE(JIT) , m_canCompileWithDFGState(DFG::CapabilityLevelNotSet) #endif @@ -1657,56 +1635,53 @@ CodeBlock::CodeBlock(CopyParsedBlockTag, CodeBlock& other) } } -CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, unsigned baseScopeDepth, PassRefPtr sourceProvider, unsigned sourceOffset, PassOwnPtr alternative) - : m_globalObject(globalObject->globalData(), ownerExecutable, globalObject) - , m_heap(&m_globalObject->globalData().heap) +CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, unsigned baseScopeDepth, PassRefPtr sourceProvider, unsigned sourceOffset, unsigned firstLineColumnOffset, PassOwnPtr alternative) + : m_globalObject(globalObject->vm(), ownerExecutable, globalObject) + , m_heap(&m_globalObject->vm().heap) , m_numCalleeRegisters(unlinkedCodeBlock->m_numCalleeRegisters) , m_numVars(unlinkedCodeBlock->m_numVars) , m_isConstructor(unlinkedCodeBlock->isConstructor()) - , m_unlinkedCode(globalObject->globalData(), ownerExecutable, unlinkedCodeBlock) - , m_ownerExecutable(globalObject->globalData(), ownerExecutable, ownerExecutable) - , m_globalData(unlinkedCodeBlock->globalData()) + , m_unlinkedCode(globalObject->vm(), ownerExecutable, unlinkedCodeBlock) + , m_ownerExecutable(globalObject->vm(), ownerExecutable, ownerExecutable) + , m_vm(unlinkedCodeBlock->vm()) , m_thisRegister(unlinkedCodeBlock->thisRegister()) , m_argumentsRegister(unlinkedCodeBlock->argumentsRegister()) , m_activationRegister(unlinkedCodeBlock->activationRegister()) , m_isStrictMode(unlinkedCodeBlock->isStrictMode()) + , m_needsActivation(unlinkedCodeBlock->needsFullScopeChain()) , m_source(sourceProvider) , m_sourceOffset(sourceOffset) -#if ENABLE(VALUE_PROFILER) - , m_executionEntryCount(0) -#endif + , m_firstLineColumnOffset(firstLineColumnOffset) + , m_codeType(unlinkedCodeBlock->codeType()) , m_alternative(alternative) , m_osrExitCounter(0) , m_optimizationDelayCounter(0) , m_reoptimizationRetryCounter(0) -#if ENABLE(BYTECODE_COMMENTS) - , m_bytecodeCommentIterator(0) -#endif { - m_globalData->startedCompiling(this); + m_vm->startedCompiling(this); ASSERT(m_source); setNumParameters(unlinkedCodeBlock->numParameters()); - optimizeAfterWarmUp(); - jitAfterWarmUp(); - #if DUMP_CODE_BLOCK_STATISTICS liveCodeBlockSet.add(this); #endif setIdentifiers(unlinkedCodeBlock->identifiers()); setConstantRegisters(unlinkedCodeBlock->constantRegisters()); - + if (unlinkedCodeBlock->usesGlobalObject()) + m_constantRegisters[unlinkedCodeBlock->globalObjectRegister()].set(*m_vm, ownerExecutable, globalObject); m_functionDecls.grow(unlinkedCodeBlock->numberOfFunctionDecls()); for (size_t count = unlinkedCodeBlock->numberOfFunctionDecls(), i = 0; i < count; ++i) { UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionDecl(i); unsigned lineCount = unlinkedExecutable->lineCount(); unsigned firstLine = ownerExecutable->lineNo() + unlinkedExecutable->firstLineOffset(); + unsigned startColumn = unlinkedExecutable->functionStartColumn(); + startColumn += (unlinkedExecutable->firstLineOffset() ? 1 : ownerExecutable->startColumn()); unsigned startOffset = sourceOffset + unlinkedExecutable->startOffset(); unsigned sourceLength = unlinkedExecutable->sourceLength(); - SourceCode code(m_source, startOffset, startOffset + sourceLength, firstLine); - FunctionExecutable* executable = FunctionExecutable::create(*m_globalData, code, unlinkedExecutable, firstLine, firstLine + lineCount); - m_functionDecls[i].set(*m_globalData, ownerExecutable, executable); + SourceCode code(m_source, startOffset, startOffset + sourceLength, firstLine, startColumn); + FunctionExecutable* executable = FunctionExecutable::create(*m_vm, code, unlinkedExecutable, firstLine, firstLine + lineCount, startColumn); + m_functionDecls[i].set(*m_vm, ownerExecutable, executable); } m_functionExprs.grow(unlinkedCodeBlock->numberOfFunctionExprs()); @@ -1714,11 +1689,13 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionExpr(i); unsigned lineCount = unlinkedExecutable->lineCount(); unsigned firstLine = ownerExecutable->lineNo() + unlinkedExecutable->firstLineOffset(); + unsigned startColumn = unlinkedExecutable->functionStartColumn(); + startColumn += (unlinkedExecutable->firstLineOffset() ? 1 : ownerExecutable->startColumn()); unsigned startOffset = sourceOffset + unlinkedExecutable->startOffset(); unsigned sourceLength = unlinkedExecutable->sourceLength(); - SourceCode code(m_source, startOffset, startOffset + sourceLength, firstLine); - FunctionExecutable* executable = FunctionExecutable::create(*m_globalData, code, unlinkedExecutable, firstLine, firstLine + lineCount); - m_functionExprs[i].set(*m_globalData, ownerExecutable, executable); + SourceCode code(m_source, startOffset, startOffset + sourceLength, firstLine, startColumn); + FunctionExecutable* executable = FunctionExecutable::create(*m_vm, code, unlinkedExecutable, firstLine, firstLine + lineCount, startColumn); + m_functionExprs[i].set(*m_vm, ownerExecutable, executable); } if (unlinkedCodeBlock->hasRareData()) { @@ -1791,22 +1768,23 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin if (size_t size = unlinkedCodeBlock->numberOfValueProfiles()) m_valueProfiles.grow(size); #endif + if (size_t size = unlinkedCodeBlock->numberOfObjectAllocationProfiles()) + m_objectAllocationProfiles.grow(size); if (size_t size = unlinkedCodeBlock->numberOfResolveOperations()) m_resolveOperations.grow(size); - size_t putToBaseCount = unlinkedCodeBlock->numberOfPutToBaseOperations(); - m_putToBaseOperations.reserveCapacity(putToBaseCount); - for (size_t i = 0; i < putToBaseCount; ++i) - m_putToBaseOperations.append(PutToBaseOperation(isStrictMode())); - - ASSERT(m_putToBaseOperations.capacity() == putToBaseCount); + if (size_t putToBaseCount = unlinkedCodeBlock->numberOfPutToBaseOperations()) { + m_putToBaseOperations.reserveInitialCapacity(putToBaseCount); + for (size_t i = 0; i < putToBaseCount; ++i) + m_putToBaseOperations.uncheckedAppend(PutToBaseOperation(isStrictMode())); + } // Copy and translate the UnlinkedInstructions size_t instructionCount = unlinkedCodeBlock->instructions().size(); UnlinkedInstruction* pc = unlinkedCodeBlock->instructions().data(); - Vector instructions(instructionCount); + Vector instructions(instructionCount); for (size_t i = 0; i < unlinkedCodeBlock->instructions().size(); ) { unsigned opLength = opcodeLength(pc[i].u.opcode); - instructions[i] = globalData()->interpreter->getOpcode(pc[i].u.opcode); + instructions[i] = vm()->interpreter->getOpcode(pc[i].u.opcode); for (size_t j = 1; j < opLength; ++j) { if (sizeof(int32_t) != sizeof(intptr_t)) instructions[i + j].u.pointer = 0; @@ -1823,10 +1801,6 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin // fallthrough } case op_convert_this: - case op_resolve: - case op_resolve_base: - case op_resolve_with_base: - case op_resolve_with_this: case op_get_by_id: case op_call_put_result: case op_get_callee: { @@ -1851,6 +1825,79 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin break; } #endif + case op_resolve_base: + case op_resolve_base_to_global: + case op_resolve_base_to_global_dynamic: + case op_resolve_base_to_scope: + case op_resolve_base_to_scope_with_top_scope_check: { + instructions[i + 4].u.resolveOperations = &m_resolveOperations[pc[i + 4].u.operand]; + instructions[i + 5].u.putToBaseOperation = &m_putToBaseOperations[pc[i + 5].u.operand]; +#if ENABLE(DFG_JIT) + ValueProfile* profile = &m_valueProfiles[pc[i + opLength - 1].u.operand]; + ASSERT(profile->m_bytecodeOffset == -1); + profile->m_bytecodeOffset = i; + ASSERT((opLength - 1) > 5); + instructions[i + opLength - 1] = profile; +#endif + break; + } + case op_resolve_global_property: + case op_resolve_global_var: + case op_resolve_scoped_var: + case op_resolve_scoped_var_on_top_scope: + case op_resolve_scoped_var_with_top_scope_check: { + instructions[i + 3].u.resolveOperations = &m_resolveOperations[pc[i + 3].u.operand]; + break; + } + case op_put_to_base: + case op_put_to_base_variable: { + instructions[i + 4].u.putToBaseOperation = &m_putToBaseOperations[pc[i + 4].u.operand]; + break; + } + case op_resolve: { +#if ENABLE(DFG_JIT) + ValueProfile* profile = &m_valueProfiles[pc[i + opLength - 1].u.operand]; + ASSERT(profile->m_bytecodeOffset == -1); + profile->m_bytecodeOffset = i; + ASSERT((opLength - 1) > 3); + instructions[i + opLength - 1] = profile; +#endif + instructions[i + 3].u.resolveOperations = &m_resolveOperations[pc[i + 3].u.operand]; + break; + } + case op_resolve_with_base: + case op_resolve_with_this: { + instructions[i + 4].u.resolveOperations = &m_resolveOperations[pc[i + 4].u.operand]; + if (pc[i].u.opcode != op_resolve_with_this) + instructions[i + 5].u.putToBaseOperation = &m_putToBaseOperations[pc[i + 5].u.operand]; +#if ENABLE(DFG_JIT) + ValueProfile* profile = &m_valueProfiles[pc[i + opLength - 1].u.operand]; + ASSERT(profile->m_bytecodeOffset == -1); + profile->m_bytecodeOffset = i; + instructions[i + opLength - 1] = profile; +#endif + break; + } + case op_new_object: { + int objectAllocationProfileIndex = pc[i + opLength - 1].u.operand; + ObjectAllocationProfile* objectAllocationProfile = &m_objectAllocationProfiles[objectAllocationProfileIndex]; + int inferredInlineCapacity = pc[i + opLength - 2].u.operand; + + instructions[i + opLength - 1] = objectAllocationProfile; + objectAllocationProfile->initialize(*vm(), + m_ownerExecutable.get(), m_globalObject->objectPrototype(), inferredInlineCapacity); + break; + } + + case op_get_scoped_var: { +#if ENABLE(DFG_JIT) + ValueProfile* profile = &m_valueProfiles[pc[i + opLength - 1].u.operand]; + ASSERT(profile->m_bytecodeOffset == -1); + profile->m_bytecodeOffset = i; + instructions[i + opLength - 1] = profile; +#endif + break; + } case op_call: case op_call_eval: { @@ -1892,16 +1939,22 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin break; if (entry.couldBeWatched()) { - instructions[i + 0] = globalData()->interpreter->getOpcode(op_init_global_const_check); + instructions[i + 0] = vm()->interpreter->getOpcode(op_init_global_const_check); instructions[i + 1] = &globalObject->registerAt(entry.getIndex()); instructions[i + 3] = entry.addressOfIsWatched(); break; } - instructions[i + 0] = globalData()->interpreter->getOpcode(op_init_global_const); + instructions[i + 0] = vm()->interpreter->getOpcode(op_init_global_const); instructions[i + 1] = &globalObject->registerAt(entry.getIndex()); break; } + + case op_debug: { + instructions[i + 4] = columnNumberForBytecodeOffset(i); + break; + } + default: break; } @@ -1909,17 +1962,26 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlin } m_instructions = WTF::RefCountedArray(instructions); + // Set optimization thresholds only after m_instructions is initialized, since these + // rely on the instruction count (and are in theory permitted to also inspect the + // instruction stream to more accurate assess the cost of tier-up). + optimizeAfterWarmUp(); + jitAfterWarmUp(); + if (Options::dumpGeneratedBytecodes()) dumpBytecode(); - m_globalData->finishedCompiling(this); + m_vm->finishedCompiling(this); } CodeBlock::~CodeBlock() { + if (m_vm->m_perBytecodeProfiler) + m_vm->m_perBytecodeProfiler->notifyDestruction(this); + #if ENABLE(DFG_JIT) // Remove myself from the set of DFG code blocks. Note that I may not be in this set // (because I'm not a DFG code block), in which case this is a no-op anyway. - m_globalData->heap.m_dfgCodeBlocks.m_set.remove(this); + m_vm->heap.m_dfgCodeBlocks.m_set.remove(this); #endif #if ENABLE(VERBOSE_VALUE_PROFILE) @@ -1958,13 +2020,13 @@ void CodeBlock::setNumParameters(int newValue) m_numParameters = newValue; #if ENABLE(VALUE_PROFILER) - m_argumentValueProfiles.resize(newValue); + m_argumentValueProfiles.resizeToFit(newValue); #endif } void CodeBlock::visitStructures(SlotVisitor& visitor, Instruction* vPC) { - Interpreter* interpreter = m_globalData->interpreter; + Interpreter* interpreter = m_vm->interpreter; if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) && vPC[4].u.structure) { visitor.append(&vPC[4].u.structure); @@ -2081,7 +2143,7 @@ void CodeBlock::visitAggregate(SlotVisitor& visitor) visitor.addWeakReferenceHarvester(this); #else // ENABLE(DFG_JIT) - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); #endif // ENABLE(DFG_JIT) } @@ -2158,7 +2220,7 @@ static const bool verboseUnlinking = false; void CodeBlock::finalizeUnconditionally() { #if ENABLE(LLINT) - Interpreter* interpreter = m_globalData->interpreter; + Interpreter* interpreter = m_vm->interpreter; if (!!numberOfInstructions()) { const Vector& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions(); for (size_t size = propertyAccessInstructions.size(), i = 0; i < size; ++i) { @@ -2197,7 +2259,7 @@ void CodeBlock::finalizeUnconditionally() case op_get_array_length: break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } @@ -2219,12 +2281,8 @@ void CodeBlock::finalizeUnconditionally() if (verboseUnlinking) dataLog(*this, " has dead weak references, jettisoning during GC.\n"); - // Make sure that the baseline JIT knows that it should re-warm-up before - // optimizing. - alternative()->optimizeAfterWarmUp(); - if (DFG::shouldShowDisassembly()) { - dataLog(*this, "will be jettisoned because of the following dead references:\n"); + dataLog(*this, " will be jettisoned because of the following dead references:\n"); for (unsigned i = 0; i < m_dfgData->transitions.size(); ++i) { WeakReferenceTransition& transition = m_dfgData->transitions[i]; JSCell* origin = transition.m_codeOrigin.get(); @@ -2232,15 +2290,13 @@ void CodeBlock::finalizeUnconditionally() JSCell* to = transition.m_to.get(); if ((!origin || Heap::isMarked(origin)) && Heap::isMarked(from)) continue; - dataLogF(" Transition under %s, ", JSValue(origin).description()); - dataLogF("%s -> ", JSValue(from).description()); - dataLogF("%s.\n", JSValue(to).description()); + dataLog(" Transition under ", JSValue(origin), ", ", JSValue(from), " -> ", JSValue(to), ".\n"); } for (unsigned i = 0; i < m_dfgData->weakReferences.size(); ++i) { JSCell* weak = m_dfgData->weakReferences[i].get(); if (Heap::isMarked(weak)) continue; - dataLogF(" Weak reference %s.\n", JSValue(weak).description()); + dataLog(" Weak reference ", JSValue(weak), ".\n"); } } @@ -2286,7 +2342,7 @@ void CodeBlock::finalizeUnconditionally() stub->executable()->hashFor(callLinkInfo(i).specializationKind()), ", stub routine ", RawPointer(stub), ".\n"); } - callLinkInfo(i).unlink(*m_globalData, repatchBuffer); + callLinkInfo(i).unlink(*m_vm, repatchBuffer); } } else if (!Heap::isMarked(callLinkInfo(i).callee.get())) { if (verboseUnlinking) { @@ -2297,7 +2353,7 @@ void CodeBlock::finalizeUnconditionally() callLinkInfo(i).specializationKind()), ").\n"); } - callLinkInfo(i).unlink(*m_globalData, repatchBuffer); + callLinkInfo(i).unlink(*m_vm, repatchBuffer); } } if (!!callLinkInfo(i).lastSeenCallee @@ -2310,7 +2366,7 @@ void CodeBlock::finalizeUnconditionally() if (stubInfo.visitWeakReferences()) continue; - resetStubInternal(repatchBuffer, stubInfo); + resetStubDuringGCInternal(repatchBuffer, stubInfo); } } #endif @@ -2348,6 +2404,12 @@ void CodeBlock::resetStubInternal(RepatchBuffer& repatchBuffer, StructureStubInf stubInfo.reset(); } + +void CodeBlock::resetStubDuringGCInternal(RepatchBuffer& repatchBuffer, StructureStubInfo& stubInfo) +{ + resetStubInternal(repatchBuffer, stubInfo); + stubInfo.resetByGC = true; +} #endif void CodeBlock::stronglyVisitStrongReferences(SlotVisitor& visitor) @@ -2362,6 +2424,8 @@ void CodeBlock::stronglyVisitStrongReferences(SlotVisitor& visitor) visitor.append(&m_functionExprs[i]); for (size_t i = 0; i < m_functionDecls.size(); ++i) visitor.append(&m_functionDecls[i]); + for (unsigned i = 0; i < m_objectAllocationProfiles.size(); ++i) + m_objectAllocationProfiles[i].visitAggregate(visitor); updateAllPredictions(Collection); } @@ -2386,85 +2450,9 @@ void CodeBlock::stronglyVisitWeakReferences(SlotVisitor& visitor) #endif } -#if ENABLE(BYTECODE_COMMENTS) -// Finds the comment string for the specified bytecode offset/PC is available. -const char* CodeBlock::commentForBytecodeOffset(unsigned bytecodeOffset) -{ - ASSERT(bytecodeOffset < instructions().size()); - - Vector& comments = m_bytecodeComments; - size_t numberOfComments = comments.size(); - const char* result = 0; - - if (!numberOfComments) - return 0; // No comments to match with. - - // The next match is most likely the next comment in the list. - // Do a quick check to see if that is a match first. - // m_bytecodeCommentIterator should already be pointing to the - // next comment we should check. - - ASSERT(m_bytecodeCommentIterator < comments.size()); - - size_t i = m_bytecodeCommentIterator; - size_t commentPC = comments[i].pc; - if (commentPC == bytecodeOffset) { - // We've got a match. All done! - m_bytecodeCommentIterator = i; - result = comments[i].string; - } else if (commentPC > bytecodeOffset) { - // The current comment is already greater than the requested PC. - // Start searching from the first comment. - i = 0; - } else { - // Otherwise, the current comment's PC is less than the requested PC. - // Hence, we can just start searching from the next comment in the - // list. - i++; - } - - // If the result is still not found, do a linear search in the range - // that we've determined above. - if (!result) { - for (; i < comments.size(); ++i) { - commentPC = comments[i].pc; - if (commentPC == bytecodeOffset) { - result = comments[i].string; - break; - } - if (comments[i].pc > bytecodeOffset) { - // The current comment PC is already past the requested - // bytecodeOffset. Hence, there are no more possible - // matches. Just fail. - break; - } - } - } - - // Update the iterator to point to the next comment. - if (++i >= numberOfComments) { - // At most point to the last comment entry. This ensures that the - // next time we call this function, the quick checks will at least - // have one entry to check and can fail fast if appropriate. - i = numberOfComments - 1; - } - m_bytecodeCommentIterator = i; - return result; -} - -void CodeBlock::dumpBytecodeComments() -{ - Vector& comments = m_bytecodeComments; - printf("Comments for codeblock %p: size %lu\n", this, comments.size()); - for (size_t i = 0; i < comments.size(); ++i) - printf(" pc %lu : '%s'\n", comments[i].pc, comments[i].string); - printf("End of comments for codeblock %p\n", this); -} -#endif // ENABLE_BYTECODE_COMMENTS - HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(bytecodeOffset < instructions().size()); + RELEASE_ASSERT(bytecodeOffset < instructions().size()); if (!m_rareData) return 0; @@ -2480,16 +2468,29 @@ HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset) return 0; } -int CodeBlock::lineNumberForBytecodeOffset(unsigned bytecodeOffset) +unsigned CodeBlock::lineNumberForBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(bytecodeOffset < instructions().size()); + RELEASE_ASSERT(bytecodeOffset < instructions().size()); return m_ownerExecutable->lineNo() + m_unlinkedCode->lineNumberForBytecodeOffset(bytecodeOffset); } -void CodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset) +unsigned CodeBlock::columnNumberForBytecodeOffset(unsigned bytecodeOffset) { - m_unlinkedCode->expressionRangeForBytecodeOffset(bytecodeOffset, divot, startOffset, endOffset); + int divot; + int startOffset; + int endOffset; + unsigned line; + unsigned column; + expressionRangeForBytecodeOffset(bytecodeOffset, divot, startOffset, endOffset, line, column); + return column; +} + +void CodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset, unsigned& line, unsigned& column) +{ + m_unlinkedCode->expressionRangeForBytecodeOffset(bytecodeOffset, divot, startOffset, endOffset, line, column); divot += m_sourceOffset; + column += line ? 1 : firstLineColumnOffset(); + line += m_ownerExecutable->lineNo(); } void CodeBlock::shrinkToFit(ShrinkMode shrinkMode) @@ -2502,8 +2503,6 @@ void CodeBlock::shrinkToFit(ShrinkMode shrinkMode) m_callLinkInfos.shrinkToFit(); #endif #if ENABLE(VALUE_PROFILER) - if (shrinkMode == EarlyShrink) - m_argumentValueProfiles.shrinkToFit(); m_rareCaseProfiles.shrinkToFit(); m_specialFastCaseProfiles.shrinkToFit(); #endif @@ -2547,7 +2546,7 @@ void CodeBlock::createActivation(CallFrame* callFrame) ASSERT(codeType() == FunctionCode); ASSERT(needsFullScopeChain()); ASSERT(!callFrame->uncheckedR(activationRegister()).jsValue()); - JSActivation* activation = JSActivation::create(callFrame->globalData(), callFrame, this); + JSActivation* activation = JSActivation::create(callFrame->vm(), callFrame, this); callFrame->uncheckedR(activationRegister()) = JSValue(activation); callFrame->setScope(activation); } @@ -2575,13 +2574,13 @@ void CodeBlock::unlinkCalls() #endif if (!m_callLinkInfos.size()) return; - if (!m_globalData->canUseJIT()) + if (!m_vm->canUseJIT()) return; RepatchBuffer repatchBuffer(this); for (size_t i = 0; i < m_callLinkInfos.size(); i++) { if (!m_callLinkInfos[i].isLinked()) continue; - m_callLinkInfos[i].unlink(*m_globalData, repatchBuffer); + m_callLinkInfos[i].unlink(*m_vm, repatchBuffer); } } @@ -2595,7 +2594,7 @@ void CodeBlock::unlinkIncomingCalls() return; RepatchBuffer repatchBuffer(this); while (m_incomingCalls.begin() != m_incomingCalls.end()) - m_incomingCalls.begin()->unlink(*m_globalData, repatchBuffer); + m_incomingCalls.begin()->unlink(*m_vm, repatchBuffer); } #endif // ENABLE(JIT) @@ -2662,12 +2661,13 @@ ClosureCallStubRoutine* CodeBlock::findClosureCallForReturnPC(ReturnAddressPtr r continue; if (!info.stub->code().executableMemory()->contains(returnAddress.value())) continue; - + + RELEASE_ASSERT(info.stub->codeOrigin().bytecodeIndex < CodeOrigin::maximumBytecodeIndex); return info.stub.get(); } // The stub routine may have been jettisoned. This is rare, but we have to handle it. - const JITStubRoutineSet& set = m_globalData->heap.jitStubRoutines(); + const JITStubRoutineSet& set = m_vm->heap.jitStubRoutines(); for (unsigned i = set.size(); i--;) { GCAwareJITStubRoutine* genericStub = set.at(i); if (!genericStub->isClosureCall()) @@ -2675,6 +2675,7 @@ ClosureCallStubRoutine* CodeBlock::findClosureCallForReturnPC(ReturnAddressPtr r ClosureCallStubRoutine* stub = static_cast(genericStub); if (!stub->code().executableMemory()->contains(returnAddress.value())) continue; + RELEASE_ASSERT(stub->codeOrigin().bytecodeIndex < CodeOrigin::maximumBytecodeIndex); return stub; } @@ -2702,11 +2703,11 @@ unsigned CodeBlock::bytecodeOffset(ExecState* exec, ReturnAddressPtr returnAddre && returnAddress.value() <= LLInt::getCodePtr(llint_end)) #endif { - ASSERT(exec->codeBlock()); - ASSERT(exec->codeBlock() == this); - ASSERT(JITCode::isBaselineCode(getJITType())); + RELEASE_ASSERT(exec->codeBlock()); + RELEASE_ASSERT(exec->codeBlock() == this); + RELEASE_ASSERT(JITCode::isBaselineCode(getJITType())); Instruction* instruction = exec->currentVPC(); - ASSERT(instruction); + RELEASE_ASSERT(instruction); instruction = adjustPCIfAtCallSite(instruction); return bytecodeOffset(instruction); @@ -2716,19 +2717,31 @@ unsigned CodeBlock::bytecodeOffset(ExecState* exec, ReturnAddressPtr returnAddre #if ENABLE(JIT) if (!m_rareData) return 1; - Vector& callIndices = m_rareData->m_callReturnIndexVector; + Vector& callIndices = m_rareData->m_callReturnIndexVector; if (!callIndices.size()) return 1; if (getJITCode().getExecutableMemory()->contains(returnAddress.value())) { unsigned callReturnOffset = getJITCode().offsetOf(returnAddress.value()); CallReturnOffsetToBytecodeOffset* result = - binarySearch(callIndices.begin(), callIndices.size(), callReturnOffset); - ASSERT(result->callReturnOffset == callReturnOffset); + binarySearch( + callIndices, callIndices.size(), callReturnOffset, getCallReturnOffset); + RELEASE_ASSERT(result->callReturnOffset == callReturnOffset); + RELEASE_ASSERT(result->bytecodeOffset < instructionCount()); return result->bytecodeOffset; } - - return findClosureCallForReturnPC(returnAddress)->codeOrigin().bytecodeIndex; + ClosureCallStubRoutine* closureInfo = findClosureCallForReturnPC(returnAddress); + CodeOrigin origin = closureInfo->codeOrigin(); + while (InlineCallFrame* inlineCallFrame = origin.inlineCallFrame) { + if (inlineCallFrame->baselineCodeBlock() == this) + break; + origin = inlineCallFrame->caller; + RELEASE_ASSERT(origin.bytecodeIndex < CodeOrigin::maximumBytecodeIndex); + } + RELEASE_ASSERT(origin.bytecodeIndex < CodeOrigin::maximumBytecodeIndex); + unsigned bytecodeIndex = origin.bytecodeIndex; + RELEASE_ASSERT(bytecodeIndex < instructionCount()); + return bytecodeIndex; #endif // ENABLE(JIT) #if !ENABLE(LLINT) && !ENABLE(JIT) @@ -2743,13 +2756,20 @@ bool CodeBlock::codeOriginForReturn(ReturnAddressPtr returnAddress, CodeOrigin& return false; if (!getJITCode().getExecutableMemory()->contains(returnAddress.value())) { - codeOrigin = findClosureCallForReturnPC(returnAddress)->codeOrigin(); + ClosureCallStubRoutine* stub = findClosureCallForReturnPC(returnAddress); + ASSERT(stub); + if (!stub) + return false; + codeOrigin = stub->codeOrigin(); return true; } unsigned offset = getJITCode().offsetOf(returnAddress.value()); - CodeOriginAtCallReturnOffset* entry = binarySearch(codeOrigins().begin(), codeOrigins().size(), offset, WTF::KeyMustNotBePresentInArray); - if (entry->callReturnOffset != offset) + CodeOriginAtCallReturnOffset* entry = + tryBinarySearch( + codeOrigins(), codeOrigins().size(), offset, + getCallReturnOffsetForCodeOrigin); + if (!entry) return false; codeOrigin = entry->codeOrigin; return true; @@ -2765,8 +2785,8 @@ void CodeBlock::clearEvalCache() m_rareData->m_evalCodeCache.clear(); } -template -inline void replaceExistingEntries(Vector& target, Vector& source) +template +inline void replaceExistingEntries(Vector& target, Vector& source) { ASSERT(target.size() <= source.size()); for (size_t i = 0; i < target.size(); ++i) @@ -2795,12 +2815,10 @@ void CodeBlock::reoptimize() { ASSERT(replacement() != this); ASSERT(replacement()->alternative() == this); - replacement()->tallyFrequentExitSites(); if (DFG::shouldShowDisassembly()) dataLog(*replacement(), " will be jettisoned due to reoptimization of ", *this, ".\n"); replacement()->jettison(); countReoptimization(); - optimizeAfterWarmUp(); } CodeBlock* ProgramCodeBlock::replacement() @@ -2859,31 +2877,30 @@ DFG::CapabilityLevel FunctionCodeBlock::canCompileWithDFGInternal() return DFG::canCompileFunctionForCall(this); } -void ProgramCodeBlock::jettison() +void CodeBlock::jettison() { ASSERT(JITCode::isOptimizingJIT(getJITType())); ASSERT(this == replacement()); + alternative()->optimizeAfterWarmUp(); + tallyFrequentExitSites(); if (DFG::shouldShowDisassembly()) dataLog("Jettisoning ", *this, ".\n"); - static_cast(ownerExecutable())->jettisonOptimizedCode(*globalData()); + jettisonImpl(); } -void EvalCodeBlock::jettison() +void ProgramCodeBlock::jettisonImpl() { - ASSERT(JITCode::isOptimizingJIT(getJITType())); - ASSERT(this == replacement()); - if (DFG::shouldShowDisassembly()) - dataLog("Jettisoning ", *this, ".\n"); - static_cast(ownerExecutable())->jettisonOptimizedCode(*globalData()); + static_cast(ownerExecutable())->jettisonOptimizedCode(*vm()); } -void FunctionCodeBlock::jettison() +void EvalCodeBlock::jettisonImpl() { - ASSERT(JITCode::isOptimizingJIT(getJITType())); - ASSERT(this == replacement()); - if (DFG::shouldShowDisassembly()) - dataLog("Jettisoning ", *this, ".\n"); - static_cast(ownerExecutable())->jettisonOptimizedCodeFor(*globalData(), m_isConstructor ? CodeForConstruct : CodeForCall); + static_cast(ownerExecutable())->jettisonOptimizedCode(*vm()); +} + +void FunctionCodeBlock::jettisonImpl() +{ + static_cast(ownerExecutable())->jettisonOptimizedCodeFor(*vm(), m_isConstructor ? CodeForConstruct : CodeForCall); } bool ProgramCodeBlock::jitCompileImpl(ExecState* exec) @@ -2908,6 +2925,217 @@ bool FunctionCodeBlock::jitCompileImpl(ExecState* exec) } #endif +JSGlobalObject* CodeBlock::globalObjectFor(CodeOrigin codeOrigin) +{ + if (!codeOrigin.inlineCallFrame) + return globalObject(); + return jsCast(codeOrigin.inlineCallFrame->executable.get())->generatedBytecode().globalObject(); +} + +unsigned CodeBlock::reoptimizationRetryCounter() const +{ + ASSERT(m_reoptimizationRetryCounter <= Options::reoptimizationRetryCounterMax()); + return m_reoptimizationRetryCounter; +} + +void CodeBlock::countReoptimization() +{ + m_reoptimizationRetryCounter++; + if (m_reoptimizationRetryCounter > Options::reoptimizationRetryCounterMax()) + m_reoptimizationRetryCounter = Options::reoptimizationRetryCounterMax(); +} + +unsigned CodeBlock::numberOfDFGCompiles() +{ + ASSERT(JITCode::isBaselineCode(getJITType())); + return (JITCode::isOptimizingJIT(replacement()->getJITType()) ? 1 : 0) + m_reoptimizationRetryCounter; +} + +int32_t CodeBlock::codeTypeThresholdMultiplier() const +{ + if (codeType() == EvalCode) + return Options::evalThresholdMultiplier(); + + return 1; +} + +double CodeBlock::optimizationThresholdScalingFactor() +{ + // This expression arises from doing a least-squares fit of + // + // F[x_] =: a * Sqrt[x + b] + Abs[c * x] + d + // + // against the data points: + // + // x F[x_] + // 10 0.9 (smallest reasonable code block) + // 200 1.0 (typical small-ish code block) + // 320 1.2 (something I saw in 3d-cube that I wanted to optimize) + // 1268 5.0 (something I saw in 3d-cube that I didn't want to optimize) + // 4000 5.5 (random large size, used to cause the function to converge to a shallow curve of some sort) + // 10000 6.0 (similar to above) + // + // I achieve the minimization using the following Mathematica code: + // + // MyFunctionTemplate[x_, a_, b_, c_, d_] := a*Sqrt[x + b] + Abs[c*x] + d + // + // samples = {{10, 0.9}, {200, 1}, {320, 1.2}, {1268, 5}, {4000, 5.5}, {10000, 6}} + // + // solution = + // Minimize[Plus @@ ((MyFunctionTemplate[#[[1]], a, b, c, d] - #[[2]])^2 & /@ samples), + // {a, b, c, d}][[2]] + // + // And the code below (to initialize a, b, c, d) is generated by: + // + // Print["const double " <> ToString[#[[1]]] <> " = " <> + // If[#[[2]] < 0.00001, "0.0", ToString[#[[2]]]] <> ";"] & /@ solution + // + // We've long known the following to be true: + // - Small code blocks are cheap to optimize and so we should do it sooner rather + // than later. + // - Large code blocks are expensive to optimize and so we should postpone doing so, + // and sometimes have a large enough threshold that we never optimize them. + // - The difference in cost is not totally linear because (a) just invoking the + // DFG incurs some base cost and (b) for large code blocks there is enough slop + // in the correlation between instruction count and the actual compilation cost + // that for those large blocks, the instruction count should not have a strong + // influence on our threshold. + // + // I knew the goals but I didn't know how to achieve them; so I picked an interesting + // example where the heuristics were right (code block in 3d-cube with instruction + // count 320, which got compiled early as it should have been) and one where they were + // totally wrong (code block in 3d-cube with instruction count 1268, which was expensive + // to compile and didn't run often enough to warrant compilation in my opinion), and + // then threw in additional data points that represented my own guess of what our + // heuristics should do for some round-numbered examples. + // + // The expression to which I decided to fit the data arose because I started with an + // affine function, and then did two things: put the linear part in an Abs to ensure + // that the fit didn't end up choosing a negative value of c (which would result in + // the function turning over and going negative for large x) and I threw in a Sqrt + // term because Sqrt represents my intution that the function should be more sensitive + // to small changes in small values of x, but less sensitive when x gets large. + + // Note that the current fit essentially eliminates the linear portion of the + // expression (c == 0.0). + const double a = 0.061504; + const double b = 1.02406; + const double c = 0.0; + const double d = 0.825914; + + double instructionCount = this->instructionCount(); + + ASSERT(instructionCount); // Make sure this is called only after we have an instruction stream; otherwise it'll just return the value of d, which makes no sense. + + double result = d + a * sqrt(instructionCount + b) + c * instructionCount; +#if ENABLE(JIT_VERBOSE_OSR) + dataLog(*this, ": instruction count is ", instructionCount, ", scaling execution counter by ", result, " * ", codeTypeThresholdMultiplier(), "\n"); +#endif + return result * codeTypeThresholdMultiplier(); +} + +static int32_t clipThreshold(double threshold) +{ + if (threshold < 1.0) + return 1; + + if (threshold > static_cast(std::numeric_limits::max())) + return std::numeric_limits::max(); + + return static_cast(threshold); +} + +int32_t CodeBlock::counterValueForOptimizeAfterWarmUp() +{ + return clipThreshold( + Options::thresholdForOptimizeAfterWarmUp() * + optimizationThresholdScalingFactor() * + (1 << reoptimizationRetryCounter())); +} + +int32_t CodeBlock::counterValueForOptimizeAfterLongWarmUp() +{ + return clipThreshold( + Options::thresholdForOptimizeAfterLongWarmUp() * + optimizationThresholdScalingFactor() * + (1 << reoptimizationRetryCounter())); +} + +int32_t CodeBlock::counterValueForOptimizeSoon() +{ + return clipThreshold( + Options::thresholdForOptimizeSoon() * + optimizationThresholdScalingFactor() * + (1 << reoptimizationRetryCounter())); +} + +bool CodeBlock::checkIfOptimizationThresholdReached() +{ + return m_jitExecuteCounter.checkIfThresholdCrossedAndSet(this); +} + +void CodeBlock::optimizeNextInvocation() +{ + m_jitExecuteCounter.setNewThreshold(0, this); +} + +void CodeBlock::dontOptimizeAnytimeSoon() +{ + m_jitExecuteCounter.deferIndefinitely(); +} + +void CodeBlock::optimizeAfterWarmUp() +{ + m_jitExecuteCounter.setNewThreshold(counterValueForOptimizeAfterWarmUp(), this); +} + +void CodeBlock::optimizeAfterLongWarmUp() +{ + m_jitExecuteCounter.setNewThreshold(counterValueForOptimizeAfterLongWarmUp(), this); +} + +void CodeBlock::optimizeSoon() +{ + m_jitExecuteCounter.setNewThreshold(counterValueForOptimizeSoon(), this); +} + +#if ENABLE(JIT) +uint32_t CodeBlock::adjustedExitCountThreshold(uint32_t desiredThreshold) +{ + ASSERT(getJITType() == JITCode::DFGJIT); + // Compute this the lame way so we don't saturate. This is called infrequently + // enough that this loop won't hurt us. + unsigned result = desiredThreshold; + for (unsigned n = baselineVersion()->reoptimizationRetryCounter(); n--;) { + unsigned newResult = result << 1; + if (newResult < result) + return std::numeric_limits::max(); + result = newResult; + } + return result; +} + +uint32_t CodeBlock::exitCountThresholdForReoptimization() +{ + return adjustedExitCountThreshold(Options::osrExitCountForReoptimization() * codeTypeThresholdMultiplier()); +} + +uint32_t CodeBlock::exitCountThresholdForReoptimizationFromLoop() +{ + return adjustedExitCountThreshold(Options::osrExitCountForReoptimizationFromLoop() * codeTypeThresholdMultiplier()); +} + +bool CodeBlock::shouldReoptimizeNow() +{ + return osrExitCounter() >= exitCountThresholdForReoptimization(); +} + +bool CodeBlock::shouldReoptimizeFromLoopNow() +{ + return osrExitCounter() >= exitCountThresholdForReoptimizationFromLoop(); +} +#endif + #if ENABLE(VALUE_PROFILER) ArrayProfile* CodeBlock::getArrayProfile(unsigned bytecodeOffset) { @@ -3020,11 +3248,11 @@ void CodeBlock::tallyFrequentExitSites() for (unsigned i = 0; i < m_dfgData->osrExit.size(); ++i) { DFG::OSRExit& exit = m_dfgData->osrExit[i]; - if (!exit.considerAddingAsFrequentExitSite(this, profiledBlock)) + if (!exit.considerAddingAsFrequentExitSite(profiledBlock)) continue; #if DFG_ENABLE(DEBUG_VERBOSE) - dataLog("OSR exit #", i, " (bc#", exit.m_codeOrigin.bytecodeIndex, ", @", exit.m_nodeIndex, ", ", DFG::exitKindToString(exit.m_kind), ") for ", *this, " occurred frequently: counting as frequent exit site.\n"); + dataLog("OSR exit #", i, " (bc#", exit.m_codeOrigin.bytecodeIndex, ", ", exit.m_kind, ") for ", *this, " occurred frequently: counting as frequent exit site.\n"); #endif } } @@ -3063,18 +3291,18 @@ void CodeBlock::dumpValueProfiles() size_t CodeBlock::predictedMachineCodeSize() { - // This will be called from CodeBlock::CodeBlock before either m_globalData or the + // This will be called from CodeBlock::CodeBlock before either m_vm or the // instructions have been initialized. It's OK to return 0 because what will really // matter is the recomputation of this value when the slow path is triggered. - if (!m_globalData) + if (!m_vm) return 0; - if (!m_globalData->machineCodeBytesPerBytecodeWordForBaselineJIT) + if (!m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT) return 0; // It's as good of a prediction as we'll get. // Be conservative: return a size that will be an overestimation 84% of the time. - double multiplier = m_globalData->machineCodeBytesPerBytecodeWordForBaselineJIT.mean() + - m_globalData->machineCodeBytesPerBytecodeWordForBaselineJIT.standardDeviation(); + double multiplier = m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT.mean() + + m_vm->machineCodeBytesPerBytecodeWordForBaselineJIT.standardDeviation(); // Be paranoid: silently reject bogus multipiers. Silently doing the "wrong" thing // here is OK, since this whole method is just a heuristic. @@ -3095,7 +3323,7 @@ size_t CodeBlock::predictedMachineCodeSize() bool CodeBlock::usesOpcode(OpcodeID opcodeID) { - Interpreter* interpreter = globalData()->interpreter; + Interpreter* interpreter = vm()->interpreter; Instruction* instructionsBegin = instructions().begin(); unsigned instructionCount = instructions().size(); @@ -3110,7 +3338,7 @@ bool CodeBlock::usesOpcode(OpcodeID opcodeID) FOR_EACH_OPCODE_ID(DEFINE_OP) #undef DEFINE_OP default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); break; } } diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h index eec95cac1..0b3d18e17 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.h +++ b/Source/JavaScriptCore/bytecode/CodeBlock.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. * Copyright (C) 2008 Cameron Zwarich * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,6 @@ #include "CodeBlockHash.h" #include "CodeOrigin.h" #include "CodeType.h" -#include "Comment.h" #include "CompactJITCodeMap.h" #include "DFGCodeBlocks.h" #include "DFGCommon.h" @@ -51,6 +50,7 @@ #include "ExecutionCounter.h" #include "ExpressionRangeInfo.h" #include "HandlerInfo.h" +#include "ObjectAllocationProfile.h" #include "Options.h" #include "Instruction.h" #include "JITCode.h" @@ -61,7 +61,7 @@ #include "LLIntCallLinkInfo.h" #include "LazyOperandValueProfile.h" #include "LineInfo.h" -#include "Nodes.h" +#include "ProfilerCompilation.h" #include "RegExpObject.h" #include "ResolveOperation.h" #include "StructureStubInfo.h" @@ -77,1511 +77,1407 @@ #include #include -// Set ENABLE_BYTECODE_COMMENTS to 1 to enable recording bytecode generator -// comments for the bytecodes that it generates. This will allow -// CodeBlock::dump() to provide some contextual info about the bytecodes. -// -// The way this comment system works is as follows: -// 1. The BytecodeGenerator calls prependComment() with a constant comment -// string in .text. The string must not be a stack or heap allocated -// string. -// 2. When the BytecodeGenerator's emitOpcode() is called, the last -// prepended comment will be recorded with the PC of the opcode being -// emitted. This comment is being recorded in the CodeBlock's -// m_bytecodeComments. -// 3. When CodeBlock::dump() is called, it will pair up the comments with -// their corresponding bytecodes based on the bytecode and comment's -// PC. If a matching pair is found, the comment will be printed after -// the bytecode. If not, no comment is printed. -// -// NOTE: Enabling this will consume additional memory at runtime to store -// the comments. Since these comments are only useful for VM debugging -// (as opposed to app debugging), this feature is to be disabled by default, -// and can be enabled as needed for VM development use only. - -#define ENABLE_BYTECODE_COMMENTS 0 - namespace JSC { - class DFGCodeBlocks; - class ExecState; - class LLIntOffsetsExtractor; - class RepatchBuffer; +class DFGCodeBlocks; +class ExecState; +class LLIntOffsetsExtractor; +class RepatchBuffer; - inline int unmodifiedArgumentsRegister(int argumentsRegister) { return argumentsRegister - 1; } +inline int unmodifiedArgumentsRegister(int argumentsRegister) { return argumentsRegister - 1; } - static ALWAYS_INLINE int missingThisObjectMarker() { return std::numeric_limits::max(); } +static ALWAYS_INLINE int missingThisObjectMarker() { return std::numeric_limits::max(); } - class CodeBlock : public UnconditionalFinalizer, public WeakReferenceHarvester { - WTF_MAKE_FAST_ALLOCATED; - friend class JIT; - friend class LLIntOffsetsExtractor; - public: - enum CopyParsedBlockTag { CopyParsedBlock }; - protected: - CodeBlock(CopyParsedBlockTag, CodeBlock& other); +class CodeBlock : public UnconditionalFinalizer, public WeakReferenceHarvester { + WTF_MAKE_FAST_ALLOCATED; + friend class JIT; + friend class LLIntOffsetsExtractor; +public: + enum CopyParsedBlockTag { CopyParsedBlock }; +protected: + CodeBlock(CopyParsedBlockTag, CodeBlock& other); - CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSGlobalObject*, unsigned baseScopeDepth, PassRefPtr, unsigned sourceOffset, PassOwnPtr alternative); + CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSGlobalObject*, unsigned baseScopeDepth, PassRefPtr, unsigned sourceOffset, unsigned firstLineColumnOffset, PassOwnPtr alternative); - WriteBarrier m_globalObject; - Heap* m_heap; + WriteBarrier m_globalObject; + Heap* m_heap; - public: - JS_EXPORT_PRIVATE virtual ~CodeBlock(); +public: + JS_EXPORT_PRIVATE virtual ~CodeBlock(); + + UnlinkedCodeBlock* unlinkedCodeBlock() const { return m_unlinkedCode.get(); } - CodeBlockHash hash() const; - void dumpAssumingJITType(PrintStream&, JITCode::JITType) const; - void dump(PrintStream&) const; + String inferredName() const; + CodeBlockHash hash() const; + String sourceCodeForTools() const; // Not quite the actual source we parsed; this will do things like prefix the source for a function with a reified signature. + String sourceCodeOnOneLine() const; // As sourceCodeForTools(), but replaces all whitespace runs with a single space. + void dumpAssumingJITType(PrintStream&, JITCode::JITType) const; + void dump(PrintStream&) const; - int numParameters() const { return m_numParameters; } - void setNumParameters(int newValue); + int numParameters() const { return m_numParameters; } + void setNumParameters(int newValue); - int* addressOfNumParameters() { return &m_numParameters; } - static ptrdiff_t offsetOfNumParameters() { return OBJECT_OFFSETOF(CodeBlock, m_numParameters); } + int* addressOfNumParameters() { return &m_numParameters; } + static ptrdiff_t offsetOfNumParameters() { return OBJECT_OFFSETOF(CodeBlock, m_numParameters); } - CodeBlock* alternative() { return m_alternative.get(); } - PassOwnPtr releaseAlternative() { return m_alternative.release(); } - void setAlternative(PassOwnPtr alternative) { m_alternative = alternative; } + CodeBlock* alternative() { return m_alternative.get(); } + PassOwnPtr releaseAlternative() { return m_alternative.release(); } + void setAlternative(PassOwnPtr alternative) { m_alternative = alternative; } - CodeSpecializationKind specializationKind() const - { - return specializationFromIsConstruct(m_isConstructor); - } + CodeSpecializationKind specializationKind() const + { + return specializationFromIsConstruct(m_isConstructor); + } #if ENABLE(JIT) - CodeBlock* baselineVersion() - { - CodeBlock* result = replacement(); - if (!result) - return 0; // This can happen if we're in the process of creating the baseline version. - while (result->alternative()) - result = result->alternative(); - ASSERT(result); - ASSERT(JITCode::isBaselineCode(result->getJITType())); - return result; - } + CodeBlock* baselineVersion() + { + CodeBlock* result = replacement(); + if (!result) + return 0; // This can happen if we're in the process of creating the baseline version. + while (result->alternative()) + result = result->alternative(); + ASSERT(result); + ASSERT(JITCode::isBaselineCode(result->getJITType())); + return result; + } +#else + CodeBlock* baselineVersion() + { + return this; + } #endif - void visitAggregate(SlotVisitor&); - - static void dumpStatistics(); - - void dumpBytecode(); - void dumpBytecode(unsigned bytecodeOffset); - void printStructures(const Instruction*); - void printStructure(const char* name, const Instruction*, int operand); - - bool isStrictMode() const { return m_isStrictMode; } + void visitAggregate(SlotVisitor&); - inline bool isKnownNotImmediate(int index) - { - if (index == m_thisRegister && !m_isStrictMode) - return true; + static void dumpStatistics(); - if (isConstantRegisterIndex(index)) - return getConstant(index).isCell(); + void dumpBytecode(PrintStream& = WTF::dataFile()); + void dumpBytecode(PrintStream&, unsigned bytecodeOffset); + void printStructures(PrintStream&, const Instruction*); + void printStructure(PrintStream&, const char* name, const Instruction*, int operand); - return false; - } - - ALWAYS_INLINE bool isTemporaryRegisterIndex(int index) - { - return index >= m_numVars; - } + bool isStrictMode() const { return m_isStrictMode; } - void dumpBytecodeCommentAndNewLine(int location); -#if ENABLE(BYTECODE_COMMENTS) - const char* commentForBytecodeOffset(unsigned bytecodeOffset); - void dumpBytecodeComments(); -#endif + inline bool isKnownNotImmediate(int index) + { + if (index == m_thisRegister && !m_isStrictMode) + return true; - HandlerInfo* handlerForBytecodeOffset(unsigned bytecodeOffset); - int lineNumberForBytecodeOffset(unsigned bytecodeOffset); - void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset); + if (isConstantRegisterIndex(index)) + return getConstant(index).isCell(); - uint32_t addResolve() - { - m_resolveOperations.grow(m_resolveOperations.size() + 1); - return m_resolveOperations.size() - 1; - } - uint32_t addPutToBase() - { - m_putToBaseOperations.append(PutToBaseOperation(isStrictMode())); - return m_putToBaseOperations.size() - 1; - } - - ResolveOperations* resolveOperations(uint32_t i) - { - return &m_resolveOperations[i]; - } + return false; + } - PutToBaseOperation* putToBaseOperation(uint32_t i) - { - return &m_putToBaseOperations[i]; - } + ALWAYS_INLINE bool isTemporaryRegisterIndex(int index) + { + return index >= m_numVars; + } - size_t numberOfResolveOperations() const { return m_resolveOperations.size(); } - size_t numberOfPutToBaseOperations() const { return m_putToBaseOperations.size(); } + HandlerInfo* handlerForBytecodeOffset(unsigned bytecodeOffset); + unsigned lineNumberForBytecodeOffset(unsigned bytecodeOffset); + unsigned columnNumberForBytecodeOffset(unsigned bytecodeOffset); + void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, + int& startOffset, int& endOffset, unsigned& line, unsigned& column); #if ENABLE(JIT) - StructureStubInfo& getStubInfo(ReturnAddressPtr returnAddress) - { - return *(binarySearch(m_structureStubInfos.begin(), m_structureStubInfos.size(), returnAddress.value())); - } + StructureStubInfo& getStubInfo(ReturnAddressPtr returnAddress) + { + return *(binarySearch(m_structureStubInfos, m_structureStubInfos.size(), returnAddress.value(), getStructureStubInfoReturnLocation)); + } - StructureStubInfo& getStubInfo(unsigned bytecodeIndex) - { - return *(binarySearch(m_structureStubInfos.begin(), m_structureStubInfos.size(), bytecodeIndex)); - } + StructureStubInfo& getStubInfo(unsigned bytecodeIndex) + { + return *(binarySearch(m_structureStubInfos, m_structureStubInfos.size(), bytecodeIndex, getStructureStubInfoBytecodeIndex)); + } - void resetStub(StructureStubInfo&); + void resetStub(StructureStubInfo&); - ByValInfo& getByValInfo(unsigned bytecodeIndex) - { - return *(binarySearch(m_byValInfos.begin(), m_byValInfos.size(), bytecodeIndex)); - } + ByValInfo& getByValInfo(unsigned bytecodeIndex) + { + return *(binarySearch(m_byValInfos, m_byValInfos.size(), bytecodeIndex, getByValInfoBytecodeIndex)); + } - CallLinkInfo& getCallLinkInfo(ReturnAddressPtr returnAddress) - { - return *(binarySearch(m_callLinkInfos.begin(), m_callLinkInfos.size(), returnAddress.value())); - } + CallLinkInfo& getCallLinkInfo(ReturnAddressPtr returnAddress) + { + return *(binarySearch(m_callLinkInfos, m_callLinkInfos.size(), returnAddress.value(), getCallLinkInfoReturnLocation)); + } - CallLinkInfo& getCallLinkInfo(unsigned bytecodeIndex) - { - ASSERT(JITCode::isBaselineCode(getJITType())); - return *(binarySearch(m_callLinkInfos.begin(), m_callLinkInfos.size(), bytecodeIndex)); - } + CallLinkInfo& getCallLinkInfo(unsigned bytecodeIndex) + { + ASSERT(JITCode::isBaselineCode(getJITType())); + return *(binarySearch(m_callLinkInfos, m_callLinkInfos.size(), bytecodeIndex, getCallLinkInfoBytecodeIndex)); + } #endif // ENABLE(JIT) #if ENABLE(LLINT) - Instruction* adjustPCIfAtCallSite(Instruction*); + Instruction* adjustPCIfAtCallSite(Instruction*); #endif - unsigned bytecodeOffset(ExecState*, ReturnAddressPtr); + unsigned bytecodeOffset(ExecState*, ReturnAddressPtr); #if ENABLE(JIT) - unsigned bytecodeOffsetForCallAtIndex(unsigned index) - { - if (!m_rareData) - return 1; - Vector& callIndices = m_rareData->m_callReturnIndexVector; - if (!callIndices.size()) - return 1; - ASSERT(index < m_rareData->m_callReturnIndexVector.size()); - return m_rareData->m_callReturnIndexVector[index].bytecodeOffset; - } + unsigned bytecodeOffsetForCallAtIndex(unsigned index) + { + if (!m_rareData) + return 1; + Vector& callIndices = m_rareData->m_callReturnIndexVector; + if (!callIndices.size()) + return 1; + // FIXME: Fix places in DFG that call out to C that don't set the CodeOrigin. https://bugs.webkit.org/show_bug.cgi?id=118315 + ASSERT(index < m_rareData->m_callReturnIndexVector.size()); + if (index >= m_rareData->m_callReturnIndexVector.size()) + return 1; + return m_rareData->m_callReturnIndexVector[index].bytecodeOffset; + } - void unlinkCalls(); + void unlinkCalls(); - bool hasIncomingCalls() { return m_incomingCalls.begin() != m_incomingCalls.end(); } + bool hasIncomingCalls() { return m_incomingCalls.begin() != m_incomingCalls.end(); } - void linkIncomingCall(CallLinkInfo* incoming) - { - m_incomingCalls.push(incoming); - } + void linkIncomingCall(CallLinkInfo* incoming) + { + m_incomingCalls.push(incoming); + } - bool isIncomingCallAlreadyLinked(CallLinkInfo* incoming) - { - return m_incomingCalls.isOnList(incoming); - } + bool isIncomingCallAlreadyLinked(CallLinkInfo* incoming) + { + return m_incomingCalls.isOnList(incoming); + } #endif // ENABLE(JIT) #if ENABLE(LLINT) - void linkIncomingCall(LLIntCallLinkInfo* incoming) - { - m_incomingLLIntCalls.push(incoming); - } + void linkIncomingCall(LLIntCallLinkInfo* incoming) + { + m_incomingLLIntCalls.push(incoming); + } #endif // ENABLE(LLINT) - void unlinkIncomingCalls(); + void unlinkIncomingCalls(); #if ENABLE(DFG_JIT) || ENABLE(LLINT) - void setJITCodeMap(PassOwnPtr jitCodeMap) - { - m_jitCodeMap = jitCodeMap; - } - CompactJITCodeMap* jitCodeMap() - { - return m_jitCodeMap.get(); - } + void setJITCodeMap(PassOwnPtr jitCodeMap) + { + m_jitCodeMap = jitCodeMap; + } + CompactJITCodeMap* jitCodeMap() + { + return m_jitCodeMap.get(); + } #endif #if ENABLE(DFG_JIT) - void createDFGDataIfNecessary() - { - if (!!m_dfgData) - return; + void createDFGDataIfNecessary() + { + if (!!m_dfgData) + return; - m_dfgData = adoptPtr(new DFGData); - } + m_dfgData = adoptPtr(new DFGData); + } - DFG::OSREntryData* appendDFGOSREntryData(unsigned bytecodeIndex, unsigned machineCodeOffset) - { - createDFGDataIfNecessary(); - DFG::OSREntryData entry; - entry.m_bytecodeIndex = bytecodeIndex; - entry.m_machineCodeOffset = machineCodeOffset; - m_dfgData->osrEntry.append(entry); - return &m_dfgData->osrEntry.last(); - } - unsigned numberOfDFGOSREntries() const - { - if (!m_dfgData) - return 0; - return m_dfgData->osrEntry.size(); - } - DFG::OSREntryData* dfgOSREntryData(unsigned i) { return &m_dfgData->osrEntry[i]; } - DFG::OSREntryData* dfgOSREntryDataForBytecodeIndex(unsigned bytecodeIndex) - { - if (!m_dfgData) - return 0; - if (m_dfgData->osrEntry.isEmpty()) - return 0; - DFG::OSREntryData* result = binarySearch< - DFG::OSREntryData, unsigned, DFG::getOSREntryDataBytecodeIndex>( - m_dfgData->osrEntry.begin(), m_dfgData->osrEntry.size(), - bytecodeIndex, WTF::KeyMustNotBePresentInArray); - if (result->m_bytecodeIndex != bytecodeIndex) - return 0; - return result; - } + void saveCompilation(PassRefPtr compilation) + { + createDFGDataIfNecessary(); + m_dfgData->compilation = compilation; + } - unsigned appendOSRExit(const DFG::OSRExit& osrExit) - { - createDFGDataIfNecessary(); - unsigned result = m_dfgData->osrExit.size(); - m_dfgData->osrExit.append(osrExit); - return result; - } + Profiler::Compilation* compilation() + { + if (!m_dfgData) + return 0; + return m_dfgData->compilation.get(); + } - DFG::OSRExit& lastOSRExit() - { - return m_dfgData->osrExit.last(); - } + DFG::OSREntryData* appendDFGOSREntryData(unsigned bytecodeIndex, unsigned machineCodeOffset) + { + createDFGDataIfNecessary(); + DFG::OSREntryData entry; + entry.m_bytecodeIndex = bytecodeIndex; + entry.m_machineCodeOffset = machineCodeOffset; + m_dfgData->osrEntry.append(entry); + return &m_dfgData->osrEntry.last(); + } + unsigned numberOfDFGOSREntries() const + { + if (!m_dfgData) + return 0; + return m_dfgData->osrEntry.size(); + } + DFG::OSREntryData* dfgOSREntryData(unsigned i) { return &m_dfgData->osrEntry[i]; } + DFG::OSREntryData* dfgOSREntryDataForBytecodeIndex(unsigned bytecodeIndex) + { + if (!m_dfgData) + return 0; + return tryBinarySearch( + m_dfgData->osrEntry, m_dfgData->osrEntry.size(), bytecodeIndex, + DFG::getOSREntryDataBytecodeIndex); + } - unsigned appendSpeculationRecovery(const DFG::SpeculationRecovery& recovery) - { - createDFGDataIfNecessary(); - unsigned result = m_dfgData->speculationRecovery.size(); - m_dfgData->speculationRecovery.append(recovery); - return result; - } + unsigned appendOSRExit(const DFG::OSRExit& osrExit) + { + createDFGDataIfNecessary(); + unsigned result = m_dfgData->osrExit.size(); + m_dfgData->osrExit.append(osrExit); + return result; + } - unsigned appendWatchpoint(const JumpReplacementWatchpoint& watchpoint) - { - createDFGDataIfNecessary(); - unsigned result = m_dfgData->watchpoints.size(); - m_dfgData->watchpoints.append(watchpoint); - return result; - } + DFG::OSRExit& lastOSRExit() + { + return m_dfgData->osrExit.last(); + } - unsigned numberOfOSRExits() - { - if (!m_dfgData) - return 0; - return m_dfgData->osrExit.size(); - } + unsigned appendSpeculationRecovery(const DFG::SpeculationRecovery& recovery) + { + createDFGDataIfNecessary(); + unsigned result = m_dfgData->speculationRecovery.size(); + m_dfgData->speculationRecovery.append(recovery); + return result; + } - unsigned numberOfSpeculationRecoveries() - { - if (!m_dfgData) - return 0; - return m_dfgData->speculationRecovery.size(); - } + unsigned appendWatchpoint(const JumpReplacementWatchpoint& watchpoint) + { + createDFGDataIfNecessary(); + unsigned result = m_dfgData->watchpoints.size(); + m_dfgData->watchpoints.append(watchpoint); + return result; + } - unsigned numberOfWatchpoints() - { - if (!m_dfgData) - return 0; - return m_dfgData->watchpoints.size(); - } + unsigned numberOfOSRExits() + { + if (!m_dfgData) + return 0; + return m_dfgData->osrExit.size(); + } - DFG::OSRExit& osrExit(unsigned index) - { - return m_dfgData->osrExit[index]; - } + unsigned numberOfSpeculationRecoveries() + { + if (!m_dfgData) + return 0; + return m_dfgData->speculationRecovery.size(); + } - DFG::SpeculationRecovery& speculationRecovery(unsigned index) - { - return m_dfgData->speculationRecovery[index]; - } + unsigned numberOfWatchpoints() + { + if (!m_dfgData) + return 0; + return m_dfgData->watchpoints.size(); + } - JumpReplacementWatchpoint& watchpoint(unsigned index) - { - return m_dfgData->watchpoints[index]; - } + DFG::OSRExit& osrExit(unsigned index) + { + return m_dfgData->osrExit[index]; + } - void appendWeakReference(JSCell* target) - { - createDFGDataIfNecessary(); - m_dfgData->weakReferences.append(WriteBarrier(*globalData(), ownerExecutable(), target)); - } + DFG::SpeculationRecovery& speculationRecovery(unsigned index) + { + return m_dfgData->speculationRecovery[index]; + } - void appendWeakReferenceTransition(JSCell* codeOrigin, JSCell* from, JSCell* to) - { - createDFGDataIfNecessary(); - m_dfgData->transitions.append( - WeakReferenceTransition(*globalData(), ownerExecutable(), codeOrigin, from, to)); - } + JumpReplacementWatchpoint& watchpoint(unsigned index) + { + return m_dfgData->watchpoints[index]; + } - DFG::MinifiedGraph& minifiedDFG() - { - createDFGDataIfNecessary(); - return m_dfgData->minifiedDFG; - } + void appendWeakReference(JSCell* target) + { + createDFGDataIfNecessary(); + m_dfgData->weakReferences.append(WriteBarrier(*vm(), ownerExecutable(), target)); + } - DFG::VariableEventStream& variableEventStream() - { - createDFGDataIfNecessary(); - return m_dfgData->variableEventStream; - } + void appendWeakReferenceTransition(JSCell* codeOrigin, JSCell* from, JSCell* to) + { + createDFGDataIfNecessary(); + m_dfgData->transitions.append( + WeakReferenceTransition(*vm(), ownerExecutable(), codeOrigin, from, to)); + } + + DFG::MinifiedGraph& minifiedDFG() + { + createDFGDataIfNecessary(); + return m_dfgData->minifiedDFG; + } + + DFG::VariableEventStream& variableEventStream() + { + createDFGDataIfNecessary(); + return m_dfgData->variableEventStream; + } #endif - unsigned bytecodeOffset(Instruction* returnAddress) - { - ASSERT(returnAddress >= instructions().begin() && returnAddress < instructions().end()); - return static_cast(returnAddress) - instructions().begin(); - } + unsigned bytecodeOffset(Instruction* returnAddress) + { + RELEASE_ASSERT(returnAddress >= instructions().begin() && returnAddress < instructions().end()); + return static_cast(returnAddress) - instructions().begin(); + } - bool isNumericCompareFunction() { return m_unlinkedCode->isNumericCompareFunction(); } + bool isNumericCompareFunction() { return m_unlinkedCode->isNumericCompareFunction(); } - unsigned numberOfInstructions() const { return m_instructions.size(); } - RefCountedArray& instructions() { return m_instructions; } - const RefCountedArray& instructions() const { return m_instructions; } + unsigned numberOfInstructions() const { return m_instructions.size(); } + RefCountedArray& instructions() { return m_instructions; } + const RefCountedArray& instructions() const { return m_instructions; } -#if ENABLE(BYTECODE_COMMENTS) - Vector& bytecodeComments() { return m_bytecodeComments; } -#endif - - size_t predictedMachineCodeSize(); + size_t predictedMachineCodeSize(); - bool usesOpcode(OpcodeID); + bool usesOpcode(OpcodeID); - unsigned instructionCount() { return m_instructions.size(); } + unsigned instructionCount() { return m_instructions.size(); } - int argumentIndexAfterCapture(size_t argument); + int argumentIndexAfterCapture(size_t argument); #if ENABLE(JIT) - void setJITCode(const JITCode& code, MacroAssemblerCodePtr codeWithArityCheck) - { - m_jitCode = code; - m_jitCodeWithArityCheck = codeWithArityCheck; + void setJITCode(const JITCode& code, MacroAssemblerCodePtr codeWithArityCheck) + { + m_jitCode = code; + m_jitCodeWithArityCheck = codeWithArityCheck; #if ENABLE(DFG_JIT) - if (m_jitCode.jitType() == JITCode::DFGJIT) { - createDFGDataIfNecessary(); - m_globalData->heap.m_dfgCodeBlocks.m_set.add(this); - } + if (m_jitCode.jitType() == JITCode::DFGJIT) { + createDFGDataIfNecessary(); + m_vm->heap.m_dfgCodeBlocks.m_set.add(this); + } #endif + } + JITCode& getJITCode() { return m_jitCode; } + MacroAssemblerCodePtr getJITCodeWithArityCheck() { return m_jitCodeWithArityCheck; } + JITCode::JITType getJITType() const { return m_jitCode.jitType(); } + ExecutableMemoryHandle* executableMemory() { return getJITCode().getExecutableMemory(); } + virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex) = 0; + void jettison(); + enum JITCompilationResult { AlreadyCompiled, CouldNotCompile, CompiledSuccessfully }; + JITCompilationResult jitCompile(ExecState* exec) + { + if (getJITType() != JITCode::InterpreterThunk) { + ASSERT(getJITType() == JITCode::BaselineJIT); + return AlreadyCompiled; } - JITCode& getJITCode() { return m_jitCode; } - MacroAssemblerCodePtr getJITCodeWithArityCheck() { return m_jitCodeWithArityCheck; } - JITCode::JITType getJITType() const { return m_jitCode.jitType(); } - ExecutableMemoryHandle* executableMemory() { return getJITCode().getExecutableMemory(); } - virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex) = 0; - virtual void jettison() = 0; - enum JITCompilationResult { AlreadyCompiled, CouldNotCompile, CompiledSuccessfully }; - JITCompilationResult jitCompile(ExecState* exec) - { - if (getJITType() != JITCode::InterpreterThunk) { - ASSERT(getJITType() == JITCode::BaselineJIT); - return AlreadyCompiled; - } #if ENABLE(JIT) - if (jitCompileImpl(exec)) - return CompiledSuccessfully; - return CouldNotCompile; + if (jitCompileImpl(exec)) + return CompiledSuccessfully; + return CouldNotCompile; #else - UNUSED_PARAM(exec); - return CouldNotCompile; + UNUSED_PARAM(exec); + return CouldNotCompile; #endif - } - virtual CodeBlock* replacement() = 0; + } + virtual CodeBlock* replacement() = 0; - virtual DFG::CapabilityLevel canCompileWithDFGInternal() = 0; - DFG::CapabilityLevel canCompileWithDFG() - { - DFG::CapabilityLevel result = canCompileWithDFGInternal(); - m_canCompileWithDFGState = result; - return result; - } - DFG::CapabilityLevel canCompileWithDFGState() { return m_canCompileWithDFGState; } + virtual DFG::CapabilityLevel canCompileWithDFGInternal() = 0; + DFG::CapabilityLevel canCompileWithDFG() + { + DFG::CapabilityLevel result = canCompileWithDFGInternal(); + m_canCompileWithDFGState = result; + return result; + } + DFG::CapabilityLevel canCompileWithDFGState() { return m_canCompileWithDFGState; } - bool hasOptimizedReplacement() - { - ASSERT(JITCode::isBaselineCode(getJITType())); - bool result = replacement()->getJITType() > getJITType(); + bool hasOptimizedReplacement() + { + ASSERT(JITCode::isBaselineCode(getJITType())); + bool result = replacement()->getJITType() > getJITType(); #if !ASSERT_DISABLED - if (result) - ASSERT(replacement()->getJITType() == JITCode::DFGJIT); - else { - ASSERT(JITCode::isBaselineCode(replacement()->getJITType())); - ASSERT(replacement() == this); - } -#endif - return result; + if (result) + ASSERT(replacement()->getJITType() == JITCode::DFGJIT); + else { + ASSERT(JITCode::isBaselineCode(replacement()->getJITType())); + ASSERT(replacement() == this); } +#endif + return result; + } #else - JITCode::JITType getJITType() const { return JITCode::BaselineJIT; } + JITCode::JITType getJITType() const { return JITCode::BaselineJIT; } #endif - ScriptExecutable* ownerExecutable() const { return m_ownerExecutable.get(); } + ScriptExecutable* ownerExecutable() const { return m_ownerExecutable.get(); } - void setGlobalData(JSGlobalData* globalData) { m_globalData = globalData; } - JSGlobalData* globalData() { return m_globalData; } + void setVM(VM* vm) { m_vm = vm; } + VM* vm() { return m_vm; } - void setThisRegister(int thisRegister) { m_thisRegister = thisRegister; } - int thisRegister() const { return m_thisRegister; } + void setThisRegister(int thisRegister) { m_thisRegister = thisRegister; } + int thisRegister() const { return m_thisRegister; } - bool needsFullScopeChain() const { return m_unlinkedCode->needsFullScopeChain(); } - bool usesEval() const { return m_unlinkedCode->usesEval(); } + bool needsFullScopeChain() const { return m_unlinkedCode->needsFullScopeChain(); } + bool usesEval() const { return m_unlinkedCode->usesEval(); } - void setArgumentsRegister(int argumentsRegister) - { - ASSERT(argumentsRegister != -1); - m_argumentsRegister = argumentsRegister; - ASSERT(usesArguments()); - } - int argumentsRegister() const - { - ASSERT(usesArguments()); - return m_argumentsRegister; - } - int uncheckedArgumentsRegister() - { - if (!usesArguments()) - return InvalidVirtualRegister; - return argumentsRegister(); - } - void setActivationRegister(int activationRegister) - { - m_activationRegister = activationRegister; - } - int activationRegister() const - { - ASSERT(needsFullScopeChain()); - return m_activationRegister; - } - int uncheckedActivationRegister() - { - if (!needsFullScopeChain()) - return InvalidVirtualRegister; - return activationRegister(); - } - bool usesArguments() const { return m_argumentsRegister != -1; } - - bool needsActivation() const - { - return needsFullScopeChain() && codeType() != GlobalCode; - } + void setArgumentsRegister(int argumentsRegister) + { + ASSERT(argumentsRegister != -1); + m_argumentsRegister = argumentsRegister; + ASSERT(usesArguments()); + } + int argumentsRegister() const + { + ASSERT(usesArguments()); + return m_argumentsRegister; + } + int uncheckedArgumentsRegister() + { + if (!usesArguments()) + return InvalidVirtualRegister; + return argumentsRegister(); + } + void setActivationRegister(int activationRegister) + { + m_activationRegister = activationRegister; + } + int activationRegister() const + { + ASSERT(needsFullScopeChain()); + return m_activationRegister; + } + int uncheckedActivationRegister() + { + if (!needsFullScopeChain()) + return InvalidVirtualRegister; + return activationRegister(); + } + bool usesArguments() const { return m_argumentsRegister != -1; } - bool isCaptured(int operand, InlineCallFrame* inlineCallFrame = 0) const - { - if (inlineCallFrame && !operandIsArgument(operand)) - return inlineCallFrame->capturedVars.get(operand); + bool needsActivation() const + { + return needsFullScopeChain() && codeType() != GlobalCode; + } - if (operandIsArgument(operand)) - return usesArguments(); + bool isCaptured(int operand, InlineCallFrame* inlineCallFrame = 0) const + { + if (operandIsArgument(operand)) + return operandToArgument(operand) && usesArguments(); - // The activation object isn't in the captured region, but it's "captured" - // in the sense that stores to its location can be observed indirectly. - if (needsActivation() && operand == activationRegister()) - return true; + if (inlineCallFrame) + return inlineCallFrame->capturedVars.get(operand); - // Ditto for the arguments object. - if (usesArguments() && operand == argumentsRegister()) - return true; + // The activation object isn't in the captured region, but it's "captured" + // in the sense that stores to its location can be observed indirectly. + if (needsActivation() && operand == activationRegister()) + return true; - // Ditto for the arguments object. - if (usesArguments() && operand == unmodifiedArgumentsRegister(argumentsRegister())) - return true; + // Ditto for the arguments object. + if (usesArguments() && operand == argumentsRegister()) + return true; - // We're in global code so there are no locals to capture - if (!symbolTable()) - return false; + // Ditto for the arguments object. + if (usesArguments() && operand == unmodifiedArgumentsRegister(argumentsRegister())) + return true; - return operand >= symbolTable()->captureStart() - && operand < symbolTable()->captureEnd(); - } + // We're in global code so there are no locals to capture + if (!symbolTable()) + return false; - CodeType codeType() const { return m_unlinkedCode->codeType(); } + return operand >= symbolTable()->captureStart() + && operand < symbolTable()->captureEnd(); + } - SourceProvider* source() const { return m_source.get(); } - unsigned sourceOffset() const { return m_sourceOffset; } + CodeType codeType() const { return m_unlinkedCode->codeType(); } - size_t numberOfJumpTargets() const { return m_unlinkedCode->numberOfJumpTargets(); } - unsigned jumpTarget(int index) const { return m_unlinkedCode->jumpTarget(index); } + SourceProvider* source() const { return m_source.get(); } + unsigned sourceOffset() const { return m_sourceOffset; } + unsigned firstLineColumnOffset() const { return m_firstLineColumnOffset; } - void createActivation(CallFrame*); + size_t numberOfJumpTargets() const { return m_unlinkedCode->numberOfJumpTargets(); } + unsigned jumpTarget(int index) const { return m_unlinkedCode->jumpTarget(index); } - void clearEvalCache(); + void createActivation(CallFrame*); + + void clearEvalCache(); - String nameForRegister(int registerNumber); + String nameForRegister(int registerNumber); #if ENABLE(JIT) - void setNumberOfStructureStubInfos(size_t size) { m_structureStubInfos.grow(size); } - size_t numberOfStructureStubInfos() const { return m_structureStubInfos.size(); } - StructureStubInfo& structureStubInfo(int index) { return m_structureStubInfos[index]; } + void setNumberOfStructureStubInfos(size_t size) { m_structureStubInfos.grow(size); } + size_t numberOfStructureStubInfos() const { return m_structureStubInfos.size(); } + StructureStubInfo& structureStubInfo(int index) { return m_structureStubInfos[index]; } - void setNumberOfByValInfos(size_t size) { m_byValInfos.grow(size); } - size_t numberOfByValInfos() const { return m_byValInfos.size(); } - ByValInfo& byValInfo(size_t index) { return m_byValInfos[index]; } + void setNumberOfByValInfos(size_t size) { m_byValInfos.grow(size); } + size_t numberOfByValInfos() const { return m_byValInfos.size(); } + ByValInfo& byValInfo(size_t index) { return m_byValInfos[index]; } - void setNumberOfCallLinkInfos(size_t size) { m_callLinkInfos.grow(size); } - size_t numberOfCallLinkInfos() const { return m_callLinkInfos.size(); } - CallLinkInfo& callLinkInfo(int index) { return m_callLinkInfos[index]; } + void setNumberOfCallLinkInfos(size_t size) { m_callLinkInfos.grow(size); } + size_t numberOfCallLinkInfos() const { return m_callLinkInfos.size(); } + CallLinkInfo& callLinkInfo(int index) { return m_callLinkInfos[index]; } #endif #if ENABLE(VALUE_PROFILER) - unsigned numberOfArgumentValueProfiles() - { - ASSERT(m_numParameters >= 0); - ASSERT(m_argumentValueProfiles.size() == static_cast(m_numParameters)); - return m_argumentValueProfiles.size(); - } - ValueProfile* valueProfileForArgument(unsigned argumentIndex) - { - ValueProfile* result = &m_argumentValueProfiles[argumentIndex]; - ASSERT(result->m_bytecodeOffset == -1); - return result; - } + unsigned numberOfArgumentValueProfiles() + { + ASSERT(m_numParameters >= 0); + ASSERT(m_argumentValueProfiles.size() == static_cast(m_numParameters)); + return m_argumentValueProfiles.size(); + } + ValueProfile* valueProfileForArgument(unsigned argumentIndex) + { + ValueProfile* result = &m_argumentValueProfiles[argumentIndex]; + ASSERT(result->m_bytecodeOffset == -1); + return result; + } - unsigned numberOfValueProfiles() { return m_valueProfiles.size(); } - ValueProfile* valueProfile(int index) - { - ValueProfile* result = &m_valueProfiles[index]; - ASSERT(result->m_bytecodeOffset != -1); - return result; - } - ValueProfile* valueProfileForBytecodeOffset(int bytecodeOffset) - { - ValueProfile* result = WTF::genericBinarySearch(m_valueProfiles, m_valueProfiles.size(), bytecodeOffset); - ASSERT(result->m_bytecodeOffset != -1); - ASSERT(instructions()[bytecodeOffset + opcodeLength( - m_globalData->interpreter->getOpcodeID( - instructions()[ - bytecodeOffset].u.opcode)) - 1].u.profile == result); - return result; - } - SpeculatedType valueProfilePredictionForBytecodeOffset(int bytecodeOffset) - { - return valueProfileForBytecodeOffset(bytecodeOffset)->computeUpdatedPrediction(); - } - - unsigned totalNumberOfValueProfiles() - { - return numberOfArgumentValueProfiles() + numberOfValueProfiles(); - } - ValueProfile* getFromAllValueProfiles(unsigned index) - { - if (index < numberOfArgumentValueProfiles()) - return valueProfileForArgument(index); - return valueProfile(index - numberOfArgumentValueProfiles()); - } + unsigned numberOfValueProfiles() { return m_valueProfiles.size(); } + ValueProfile* valueProfile(int index) { return &m_valueProfiles[index]; } + ValueProfile* valueProfileForBytecodeOffset(int bytecodeOffset) + { + ValueProfile* result = binarySearch( + m_valueProfiles, m_valueProfiles.size(), bytecodeOffset, + getValueProfileBytecodeOffset); + ASSERT(result->m_bytecodeOffset != -1); + ASSERT(instructions()[bytecodeOffset + opcodeLength( + m_vm->interpreter->getOpcodeID( + instructions()[ + bytecodeOffset].u.opcode)) - 1].u.profile == result); + return result; + } + SpeculatedType valueProfilePredictionForBytecodeOffset(int bytecodeOffset) + { + return valueProfileForBytecodeOffset(bytecodeOffset)->computeUpdatedPrediction(); + } - RareCaseProfile* addRareCaseProfile(int bytecodeOffset) - { - m_rareCaseProfiles.append(RareCaseProfile(bytecodeOffset)); - return &m_rareCaseProfiles.last(); - } - unsigned numberOfRareCaseProfiles() { return m_rareCaseProfiles.size(); } - RareCaseProfile* rareCaseProfile(int index) { return &m_rareCaseProfiles[index]; } - RareCaseProfile* rareCaseProfileForBytecodeOffset(int bytecodeOffset) - { - return WTF::genericBinarySearch(m_rareCaseProfiles, m_rareCaseProfiles.size(), bytecodeOffset); - } + unsigned totalNumberOfValueProfiles() + { + return numberOfArgumentValueProfiles() + numberOfValueProfiles(); + } + ValueProfile* getFromAllValueProfiles(unsigned index) + { + if (index < numberOfArgumentValueProfiles()) + return valueProfileForArgument(index); + return valueProfile(index - numberOfArgumentValueProfiles()); + } - bool likelyToTakeSlowCase(int bytecodeOffset) - { - if (!numberOfRareCaseProfiles()) - return false; - unsigned value = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - return value >= Options::likelyToTakeSlowCaseMinimumCount() && static_cast(value) / m_executionEntryCount >= Options::likelyToTakeSlowCaseThreshold(); - } + RareCaseProfile* addRareCaseProfile(int bytecodeOffset) + { + m_rareCaseProfiles.append(RareCaseProfile(bytecodeOffset)); + return &m_rareCaseProfiles.last(); + } + unsigned numberOfRareCaseProfiles() { return m_rareCaseProfiles.size(); } + RareCaseProfile* rareCaseProfile(int index) { return &m_rareCaseProfiles[index]; } + RareCaseProfile* rareCaseProfileForBytecodeOffset(int bytecodeOffset) + { + return tryBinarySearch( + m_rareCaseProfiles, m_rareCaseProfiles.size(), bytecodeOffset, + getRareCaseProfileBytecodeOffset); + } - bool couldTakeSlowCase(int bytecodeOffset) - { - if (!numberOfRareCaseProfiles()) - return false; - unsigned value = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - return value >= Options::couldTakeSlowCaseMinimumCount() && static_cast(value) / m_executionEntryCount >= Options::couldTakeSlowCaseThreshold(); - } + bool likelyToTakeSlowCase(int bytecodeOffset) + { + if (!numberOfRareCaseProfiles()) + return false; + unsigned value = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + return value >= Options::likelyToTakeSlowCaseMinimumCount(); + } - RareCaseProfile* addSpecialFastCaseProfile(int bytecodeOffset) - { - m_specialFastCaseProfiles.append(RareCaseProfile(bytecodeOffset)); - return &m_specialFastCaseProfiles.last(); - } - unsigned numberOfSpecialFastCaseProfiles() { return m_specialFastCaseProfiles.size(); } - RareCaseProfile* specialFastCaseProfile(int index) { return &m_specialFastCaseProfiles[index]; } - RareCaseProfile* specialFastCaseProfileForBytecodeOffset(int bytecodeOffset) - { - return WTF::genericBinarySearch(m_specialFastCaseProfiles, m_specialFastCaseProfiles.size(), bytecodeOffset); - } + bool couldTakeSlowCase(int bytecodeOffset) + { + if (!numberOfRareCaseProfiles()) + return false; + unsigned value = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + return value >= Options::couldTakeSlowCaseMinimumCount(); + } - bool likelyToTakeSpecialFastCase(int bytecodeOffset) - { - if (!numberOfRareCaseProfiles()) - return false; - unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - return specialFastCaseCount >= Options::likelyToTakeSlowCaseMinimumCount() && static_cast(specialFastCaseCount) / m_executionEntryCount >= Options::likelyToTakeSlowCaseThreshold(); - } + RareCaseProfile* addSpecialFastCaseProfile(int bytecodeOffset) + { + m_specialFastCaseProfiles.append(RareCaseProfile(bytecodeOffset)); + return &m_specialFastCaseProfiles.last(); + } + unsigned numberOfSpecialFastCaseProfiles() { return m_specialFastCaseProfiles.size(); } + RareCaseProfile* specialFastCaseProfile(int index) { return &m_specialFastCaseProfiles[index]; } + RareCaseProfile* specialFastCaseProfileForBytecodeOffset(int bytecodeOffset) + { + return tryBinarySearch( + m_specialFastCaseProfiles, m_specialFastCaseProfiles.size(), bytecodeOffset, + getRareCaseProfileBytecodeOffset); + } - bool couldTakeSpecialFastCase(int bytecodeOffset) - { - if (!numberOfRareCaseProfiles()) - return false; - unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - return specialFastCaseCount >= Options::couldTakeSlowCaseMinimumCount() && static_cast(specialFastCaseCount) / m_executionEntryCount >= Options::couldTakeSlowCaseThreshold(); - } + bool likelyToTakeSpecialFastCase(int bytecodeOffset) + { + if (!numberOfRareCaseProfiles()) + return false; + unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + return specialFastCaseCount >= Options::likelyToTakeSlowCaseMinimumCount(); + } - bool likelyToTakeDeepestSlowCase(int bytecodeOffset) - { - if (!numberOfRareCaseProfiles()) - return false; - unsigned slowCaseCount = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - unsigned value = slowCaseCount - specialFastCaseCount; - return value >= Options::likelyToTakeSlowCaseMinimumCount() && static_cast(value) / m_executionEntryCount >= Options::likelyToTakeSlowCaseThreshold(); - } + bool couldTakeSpecialFastCase(int bytecodeOffset) + { + if (!numberOfRareCaseProfiles()) + return false; + unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + return specialFastCaseCount >= Options::couldTakeSlowCaseMinimumCount(); + } - bool likelyToTakeAnySlowCase(int bytecodeOffset) - { - if (!numberOfRareCaseProfiles()) - return false; - unsigned slowCaseCount = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; - unsigned value = slowCaseCount + specialFastCaseCount; - return value >= Options::likelyToTakeSlowCaseMinimumCount() && static_cast(value) / m_executionEntryCount >= Options::likelyToTakeSlowCaseThreshold(); - } + bool likelyToTakeDeepestSlowCase(int bytecodeOffset) + { + if (!numberOfRareCaseProfiles()) + return false; + unsigned slowCaseCount = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + unsigned value = slowCaseCount - specialFastCaseCount; + return value >= Options::likelyToTakeSlowCaseMinimumCount(); + } - unsigned executionEntryCount() const { return m_executionEntryCount; } - - unsigned numberOfArrayProfiles() const { return m_arrayProfiles.size(); } - const ArrayProfileVector& arrayProfiles() { return m_arrayProfiles; } - ArrayProfile* addArrayProfile(unsigned bytecodeOffset) - { - m_arrayProfiles.append(ArrayProfile(bytecodeOffset)); - return &m_arrayProfiles.last(); - } - ArrayProfile* getArrayProfile(unsigned bytecodeOffset); - ArrayProfile* getOrAddArrayProfile(unsigned bytecodeOffset); + bool likelyToTakeAnySlowCase(int bytecodeOffset) + { + if (!numberOfRareCaseProfiles()) + return false; + unsigned slowCaseCount = rareCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + unsigned specialFastCaseCount = specialFastCaseProfileForBytecodeOffset(bytecodeOffset)->m_counter; + unsigned value = slowCaseCount + specialFastCaseCount; + return value >= Options::likelyToTakeSlowCaseMinimumCount(); + } - unsigned numberOfArrayAllocationProfiles() const { return m_arrayAllocationProfiles.size(); } - ArrayAllocationProfile* addArrayAllocationProfile() - { - m_arrayAllocationProfiles.append(ArrayAllocationProfile()); - return &m_arrayAllocationProfiles.last(); - } + unsigned numberOfArrayProfiles() const { return m_arrayProfiles.size(); } + const ArrayProfileVector& arrayProfiles() { return m_arrayProfiles; } + ArrayProfile* addArrayProfile(unsigned bytecodeOffset) + { + m_arrayProfiles.append(ArrayProfile(bytecodeOffset)); + return &m_arrayProfiles.last(); + } + ArrayProfile* getArrayProfile(unsigned bytecodeOffset); + ArrayProfile* getOrAddArrayProfile(unsigned bytecodeOffset); #endif - // Exception handling support - - size_t numberOfExceptionHandlers() const { return m_rareData ? m_rareData->m_exceptionHandlers.size() : 0; } - void allocateHandlers(const Vector& unlinkedHandlers) - { - size_t count = unlinkedHandlers.size(); - if (!count) - return; - createRareDataIfNecessary(); - m_rareData->m_exceptionHandlers.resize(count); - for (size_t i = 0; i < count; ++i) { - m_rareData->m_exceptionHandlers[i].start = unlinkedHandlers[i].start; - m_rareData->m_exceptionHandlers[i].end = unlinkedHandlers[i].end; - m_rareData->m_exceptionHandlers[i].target = unlinkedHandlers[i].target; - m_rareData->m_exceptionHandlers[i].scopeDepth = unlinkedHandlers[i].scopeDepth; - } + // Exception handling support + size_t numberOfExceptionHandlers() const { return m_rareData ? m_rareData->m_exceptionHandlers.size() : 0; } + void allocateHandlers(const Vector& unlinkedHandlers) + { + size_t count = unlinkedHandlers.size(); + if (!count) + return; + createRareDataIfNecessary(); + m_rareData->m_exceptionHandlers.resize(count); + for (size_t i = 0; i < count; ++i) { + m_rareData->m_exceptionHandlers[i].start = unlinkedHandlers[i].start; + m_rareData->m_exceptionHandlers[i].end = unlinkedHandlers[i].end; + m_rareData->m_exceptionHandlers[i].target = unlinkedHandlers[i].target; + m_rareData->m_exceptionHandlers[i].scopeDepth = unlinkedHandlers[i].scopeDepth; } - HandlerInfo& exceptionHandler(int index) { ASSERT(m_rareData); return m_rareData->m_exceptionHandlers[index]; } - bool hasExpressionInfo() { return m_unlinkedCode->hasExpressionInfo(); } + } + HandlerInfo& exceptionHandler(int index) { RELEASE_ASSERT(m_rareData); return m_rareData->m_exceptionHandlers[index]; } + + bool hasExpressionInfo() { return m_unlinkedCode->hasExpressionInfo(); } #if ENABLE(JIT) - Vector& callReturnIndexVector() - { - createRareDataIfNecessary(); - return m_rareData->m_callReturnIndexVector; - } + Vector& callReturnIndexVector() + { + createRareDataIfNecessary(); + return m_rareData->m_callReturnIndexVector; + } #endif #if ENABLE(DFG_JIT) - SegmentedVector& inlineCallFrames() - { - createRareDataIfNecessary(); - return m_rareData->m_inlineCallFrames; - } + SegmentedVector& inlineCallFrames() + { + createRareDataIfNecessary(); + return m_rareData->m_inlineCallFrames; + } - Vector& codeOrigins() - { - createRareDataIfNecessary(); - return m_rareData->m_codeOrigins; - } + Vector& codeOrigins() + { + createRareDataIfNecessary(); + return m_rareData->m_codeOrigins; + } - // Having code origins implies that there has been some inlining. - bool hasCodeOrigins() - { - return m_rareData && !!m_rareData->m_codeOrigins.size(); - } + // Having code origins implies that there has been some inlining. + bool hasCodeOrigins() + { + return m_rareData && !!m_rareData->m_codeOrigins.size(); + } - bool codeOriginForReturn(ReturnAddressPtr, CodeOrigin&); + bool codeOriginForReturn(ReturnAddressPtr, CodeOrigin&); - CodeOrigin codeOrigin(unsigned index) - { - ASSERT(m_rareData); - return m_rareData->m_codeOrigins[index].codeOrigin; - } + bool canGetCodeOrigin(unsigned index) + { + if (!m_rareData) + return false; + return m_rareData->m_codeOrigins.size() > index; + } - bool addFrequentExitSite(const DFG::FrequentExitSite& site) - { - ASSERT(JITCode::isBaselineCode(getJITType())); - return m_exitProfile.add(site); - } + CodeOrigin codeOrigin(unsigned index) + { + RELEASE_ASSERT(m_rareData); + return m_rareData->m_codeOrigins[index].codeOrigin; + } + + bool addFrequentExitSite(const DFG::FrequentExitSite& site) + { + ASSERT(JITCode::isBaselineCode(getJITType())); + return m_exitProfile.add(site); + } + + bool hasExitSite(const DFG::FrequentExitSite& site) const { return m_exitProfile.hasExitSite(site); } - DFG::ExitProfile& exitProfile() { return m_exitProfile; } + DFG::ExitProfile& exitProfile() { return m_exitProfile; } - CompressedLazyOperandValueProfileHolder& lazyOperandValueProfiles() - { - return m_lazyOperandValueProfiles; - } + CompressedLazyOperandValueProfileHolder& lazyOperandValueProfiles() + { + return m_lazyOperandValueProfiles; + } #endif - // Constant Pool + // Constant Pool - size_t numberOfIdentifiers() const { return m_identifiers.size(); } - void addIdentifier(const Identifier& i) { return m_identifiers.append(i); } - Identifier& identifier(int index) { return m_identifiers[index]; } + size_t numberOfIdentifiers() const { return m_identifiers.size(); } + void addIdentifier(const Identifier& i) { return m_identifiers.append(i); } + Identifier& identifier(int index) { return m_identifiers[index]; } - size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); } - unsigned addConstant(JSValue v) - { - unsigned result = m_constantRegisters.size(); - m_constantRegisters.append(WriteBarrier()); - m_constantRegisters.last().set(m_globalObject->globalData(), m_ownerExecutable.get(), v); - return result; - } + size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); } + unsigned addConstant(JSValue v) + { + unsigned result = m_constantRegisters.size(); + m_constantRegisters.append(WriteBarrier()); + m_constantRegisters.last().set(m_globalObject->vm(), m_ownerExecutable.get(), v); + return result; + } - unsigned addOrFindConstant(JSValue); - WriteBarrier& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; } - ALWAYS_INLINE bool isConstantRegisterIndex(int index) const { return index >= FirstConstantRegisterIndex; } - ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].get(); } + unsigned addOrFindConstant(JSValue); + WriteBarrier& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; } + ALWAYS_INLINE bool isConstantRegisterIndex(int index) const { return index >= FirstConstantRegisterIndex; } + ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].get(); } - unsigned addFunctionDecl(FunctionExecutable* n) - { - unsigned size = m_functionDecls.size(); - m_functionDecls.append(WriteBarrier()); - m_functionDecls.last().set(m_globalObject->globalData(), m_ownerExecutable.get(), n); - return size; - } - FunctionExecutable* functionDecl(int index) { return m_functionDecls[index].get(); } - int numberOfFunctionDecls() { return m_functionDecls.size(); } - unsigned addFunctionExpr(FunctionExecutable* n) - { - unsigned size = m_functionExprs.size(); - m_functionExprs.append(WriteBarrier()); - m_functionExprs.last().set(m_globalObject->globalData(), m_ownerExecutable.get(), n); - return size; - } - FunctionExecutable* functionExpr(int index) { return m_functionExprs[index].get(); } + FunctionExecutable* functionDecl(int index) { return m_functionDecls[index].get(); } + int numberOfFunctionDecls() { return m_functionDecls.size(); } + FunctionExecutable* functionExpr(int index) { return m_functionExprs[index].get(); } - RegExp* regexp(int index) const { return m_unlinkedCode->regexp(index); } + RegExp* regexp(int index) const { return m_unlinkedCode->regexp(index); } - unsigned numberOfConstantBuffers() const - { - if (!m_rareData) - return 0; - return m_rareData->m_constantBuffers.size(); - } - unsigned addConstantBuffer(const Vector& buffer) - { - createRareDataIfNecessary(); - unsigned size = m_rareData->m_constantBuffers.size(); - m_rareData->m_constantBuffers.append(buffer); - return size; - } + unsigned numberOfConstantBuffers() const + { + if (!m_rareData) + return 0; + return m_rareData->m_constantBuffers.size(); + } + unsigned addConstantBuffer(const Vector& buffer) + { + createRareDataIfNecessary(); + unsigned size = m_rareData->m_constantBuffers.size(); + m_rareData->m_constantBuffers.append(buffer); + return size; + } - Vector& constantBufferAsVector(unsigned index) - { - ASSERT(m_rareData); - return m_rareData->m_constantBuffers[index]; - } - JSValue* constantBuffer(unsigned index) - { - return constantBufferAsVector(index).data(); - } + Vector& constantBufferAsVector(unsigned index) + { + ASSERT(m_rareData); + return m_rareData->m_constantBuffers[index]; + } + JSValue* constantBuffer(unsigned index) + { + return constantBufferAsVector(index).data(); + } - JSGlobalObject* globalObject() { return m_globalObject.get(); } + JSGlobalObject* globalObject() { return m_globalObject.get(); } - JSGlobalObject* globalObjectFor(CodeOrigin codeOrigin) - { - if (!codeOrigin.inlineCallFrame) - return globalObject(); - // FIXME: if we ever inline based on executable not function, this code will need to change. - return codeOrigin.inlineCallFrame->callee->scope()->globalObject(); - } + JSGlobalObject* globalObjectFor(CodeOrigin); - // Jump Tables + // Jump Tables - size_t numberOfImmediateSwitchJumpTables() const { return m_rareData ? m_rareData->m_immediateSwitchJumpTables.size() : 0; } - SimpleJumpTable& addImmediateSwitchJumpTable() { createRareDataIfNecessary(); m_rareData->m_immediateSwitchJumpTables.append(SimpleJumpTable()); return m_rareData->m_immediateSwitchJumpTables.last(); } - SimpleJumpTable& immediateSwitchJumpTable(int tableIndex) { ASSERT(m_rareData); return m_rareData->m_immediateSwitchJumpTables[tableIndex]; } + size_t numberOfImmediateSwitchJumpTables() const { return m_rareData ? m_rareData->m_immediateSwitchJumpTables.size() : 0; } + SimpleJumpTable& addImmediateSwitchJumpTable() { createRareDataIfNecessary(); m_rareData->m_immediateSwitchJumpTables.append(SimpleJumpTable()); return m_rareData->m_immediateSwitchJumpTables.last(); } + SimpleJumpTable& immediateSwitchJumpTable(int tableIndex) { RELEASE_ASSERT(m_rareData); return m_rareData->m_immediateSwitchJumpTables[tableIndex]; } - size_t numberOfCharacterSwitchJumpTables() const { return m_rareData ? m_rareData->m_characterSwitchJumpTables.size() : 0; } - SimpleJumpTable& addCharacterSwitchJumpTable() { createRareDataIfNecessary(); m_rareData->m_characterSwitchJumpTables.append(SimpleJumpTable()); return m_rareData->m_characterSwitchJumpTables.last(); } - SimpleJumpTable& characterSwitchJumpTable(int tableIndex) { ASSERT(m_rareData); return m_rareData->m_characterSwitchJumpTables[tableIndex]; } + size_t numberOfCharacterSwitchJumpTables() const { return m_rareData ? m_rareData->m_characterSwitchJumpTables.size() : 0; } + SimpleJumpTable& addCharacterSwitchJumpTable() { createRareDataIfNecessary(); m_rareData->m_characterSwitchJumpTables.append(SimpleJumpTable()); return m_rareData->m_characterSwitchJumpTables.last(); } + SimpleJumpTable& characterSwitchJumpTable(int tableIndex) { RELEASE_ASSERT(m_rareData); return m_rareData->m_characterSwitchJumpTables[tableIndex]; } - size_t numberOfStringSwitchJumpTables() const { return m_rareData ? m_rareData->m_stringSwitchJumpTables.size() : 0; } - StringJumpTable& addStringSwitchJumpTable() { createRareDataIfNecessary(); m_rareData->m_stringSwitchJumpTables.append(StringJumpTable()); return m_rareData->m_stringSwitchJumpTables.last(); } - StringJumpTable& stringSwitchJumpTable(int tableIndex) { ASSERT(m_rareData); return m_rareData->m_stringSwitchJumpTables[tableIndex]; } + size_t numberOfStringSwitchJumpTables() const { return m_rareData ? m_rareData->m_stringSwitchJumpTables.size() : 0; } + StringJumpTable& addStringSwitchJumpTable() { createRareDataIfNecessary(); m_rareData->m_stringSwitchJumpTables.append(StringJumpTable()); return m_rareData->m_stringSwitchJumpTables.last(); } + StringJumpTable& stringSwitchJumpTable(int tableIndex) { RELEASE_ASSERT(m_rareData); return m_rareData->m_stringSwitchJumpTables[tableIndex]; } - SharedSymbolTable* symbolTable() const { return m_unlinkedCode->symbolTable(); } + SharedSymbolTable* symbolTable() const { return m_unlinkedCode->symbolTable(); } - EvalCodeCache& evalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; } + EvalCodeCache& evalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; } - enum ShrinkMode { - // Shrink prior to generating machine code that may point directly into vectors. - EarlyShrink, + enum ShrinkMode { + // Shrink prior to generating machine code that may point directly into vectors. + EarlyShrink, - // Shrink after generating machine code, and after possibly creating new vectors - // and appending to others. At this time it is not safe to shrink certain vectors - // because we would have generated machine code that references them directly. - LateShrink - }; - void shrinkToFit(ShrinkMode); - - void copyPostParseDataFrom(CodeBlock* alternative); - void copyPostParseDataFromAlternative(); - - // Functions for controlling when JITting kicks in, in a mixed mode - // execution world. - - bool checkIfJITThresholdReached() - { - return m_llintExecuteCounter.checkIfThresholdCrossedAndSet(this); - } - - void dontJITAnytimeSoon() - { - m_llintExecuteCounter.deferIndefinitely(); - } - - void jitAfterWarmUp() - { - m_llintExecuteCounter.setNewThreshold(Options::thresholdForJITAfterWarmUp(), this); - } + // Shrink after generating machine code, and after possibly creating new vectors + // and appending to others. At this time it is not safe to shrink certain vectors + // because we would have generated machine code that references them directly. + LateShrink + }; + void shrinkToFit(ShrinkMode); - void jitSoon() - { - m_llintExecuteCounter.setNewThreshold(Options::thresholdForJITSoon(), this); - } + void copyPostParseDataFrom(CodeBlock* alternative); + void copyPostParseDataFromAlternative(); - const ExecutionCounter& llintExecuteCounter() const - { - return m_llintExecuteCounter; - } + // Functions for controlling when JITting kicks in, in a mixed mode + // execution world. - // Functions for controlling when tiered compilation kicks in. This - // controls both when the optimizing compiler is invoked and when OSR - // entry happens. Two triggers exist: the loop trigger and the return - // trigger. In either case, when an addition to m_jitExecuteCounter - // causes it to become non-negative, the optimizing compiler is - // invoked. This includes a fast check to see if this CodeBlock has - // already been optimized (i.e. replacement() returns a CodeBlock - // that was optimized with a higher tier JIT than this one). In the - // case of the loop trigger, if the optimized compilation succeeds - // (or has already succeeded in the past) then OSR is attempted to - // redirect program flow into the optimized code. - - // These functions are called from within the optimization triggers, - // and are used as a single point at which we define the heuristics - // for how much warm-up is mandated before the next optimization - // trigger files. All CodeBlocks start out with optimizeAfterWarmUp(), - // as this is called from the CodeBlock constructor. - - // When we observe a lot of speculation failures, we trigger a - // reoptimization. But each time, we increase the optimization trigger - // to avoid thrashing. - unsigned reoptimizationRetryCounter() const - { - ASSERT(m_reoptimizationRetryCounter <= Options::reoptimizationRetryCounterMax()); - return m_reoptimizationRetryCounter; - } + bool checkIfJITThresholdReached() + { + return m_llintExecuteCounter.checkIfThresholdCrossedAndSet(this); + } - void countReoptimization() - { - m_reoptimizationRetryCounter++; - if (m_reoptimizationRetryCounter > Options::reoptimizationRetryCounterMax()) - m_reoptimizationRetryCounter = Options::reoptimizationRetryCounterMax(); - } + void dontJITAnytimeSoon() + { + m_llintExecuteCounter.deferIndefinitely(); + } - int32_t counterValueForOptimizeAfterWarmUp() - { - return Options::thresholdForOptimizeAfterWarmUp() << reoptimizationRetryCounter(); - } + void jitAfterWarmUp() + { + m_llintExecuteCounter.setNewThreshold(Options::thresholdForJITAfterWarmUp(), this); + } - int32_t counterValueForOptimizeAfterLongWarmUp() - { - return Options::thresholdForOptimizeAfterLongWarmUp() << reoptimizationRetryCounter(); - } + void jitSoon() + { + m_llintExecuteCounter.setNewThreshold(Options::thresholdForJITSoon(), this); + } - int32_t* addressOfJITExecuteCounter() - { - return &m_jitExecuteCounter.m_counter; - } + const ExecutionCounter& llintExecuteCounter() const + { + return m_llintExecuteCounter; + } - static ptrdiff_t offsetOfJITExecuteCounter() { return OBJECT_OFFSETOF(CodeBlock, m_jitExecuteCounter) + OBJECT_OFFSETOF(ExecutionCounter, m_counter); } - static ptrdiff_t offsetOfJITExecutionActiveThreshold() { return OBJECT_OFFSETOF(CodeBlock, m_jitExecuteCounter) + OBJECT_OFFSETOF(ExecutionCounter, m_activeThreshold); } - static ptrdiff_t offsetOfJITExecutionTotalCount() { return OBJECT_OFFSETOF(CodeBlock, m_jitExecuteCounter) + OBJECT_OFFSETOF(ExecutionCounter, m_totalCount); } + // Functions for controlling when tiered compilation kicks in. This + // controls both when the optimizing compiler is invoked and when OSR + // entry happens. Two triggers exist: the loop trigger and the return + // trigger. In either case, when an addition to m_jitExecuteCounter + // causes it to become non-negative, the optimizing compiler is + // invoked. This includes a fast check to see if this CodeBlock has + // already been optimized (i.e. replacement() returns a CodeBlock + // that was optimized with a higher tier JIT than this one). In the + // case of the loop trigger, if the optimized compilation succeeds + // (or has already succeeded in the past) then OSR is attempted to + // redirect program flow into the optimized code. + + // These functions are called from within the optimization triggers, + // and are used as a single point at which we define the heuristics + // for how much warm-up is mandated before the next optimization + // trigger files. All CodeBlocks start out with optimizeAfterWarmUp(), + // as this is called from the CodeBlock constructor. + + // When we observe a lot of speculation failures, we trigger a + // reoptimization. But each time, we increase the optimization trigger + // to avoid thrashing. + unsigned reoptimizationRetryCounter() const; + void countReoptimization(); + + unsigned numberOfDFGCompiles(); - const ExecutionCounter& jitExecuteCounter() const { return m_jitExecuteCounter; } - - unsigned optimizationDelayCounter() const { return m_optimizationDelayCounter; } - - // Check if the optimization threshold has been reached, and if not, - // adjust the heuristics accordingly. Returns true if the threshold has - // been reached. - bool checkIfOptimizationThresholdReached() - { - return m_jitExecuteCounter.checkIfThresholdCrossedAndSet(this); - } - - // Call this to force the next optimization trigger to fire. This is - // rarely wise, since optimization triggers are typically more - // expensive than executing baseline code. - void optimizeNextInvocation() - { - m_jitExecuteCounter.setNewThreshold(0, this); - } - - // Call this to prevent optimization from happening again. Note that - // optimization will still happen after roughly 2^29 invocations, - // so this is really meant to delay that as much as possible. This - // is called if optimization failed, and we expect it to fail in - // the future as well. - void dontOptimizeAnytimeSoon() - { - m_jitExecuteCounter.deferIndefinitely(); - } - - // Call this to reinitialize the counter to its starting state, - // forcing a warm-up to happen before the next optimization trigger - // fires. This is called in the CodeBlock constructor. It also - // makes sense to call this if an OSR exit occurred. Note that - // OSR exit code is code generated, so the value of the execute - // counter that this corresponds to is also available directly. - void optimizeAfterWarmUp() - { - m_jitExecuteCounter.setNewThreshold(counterValueForOptimizeAfterWarmUp(), this); - } - - // Call this to force an optimization trigger to fire only after - // a lot of warm-up. - void optimizeAfterLongWarmUp() - { - m_jitExecuteCounter.setNewThreshold(counterValueForOptimizeAfterLongWarmUp(), this); - } - - // Call this to cause an optimization trigger to fire soon, but - // not necessarily the next one. This makes sense if optimization - // succeeds. Successfuly optimization means that all calls are - // relinked to the optimized code, so this only affects call - // frames that are still executing this CodeBlock. The value here - // is tuned to strike a balance between the cost of OSR entry - // (which is too high to warrant making every loop back edge to - // trigger OSR immediately) and the cost of executing baseline - // code (which is high enough that we don't necessarily want to - // have a full warm-up). The intuition for calling this instead of - // optimizeNextInvocation() is for the case of recursive functions - // with loops. Consider that there may be N call frames of some - // recursive function, for a reasonably large value of N. The top - // one triggers optimization, and then returns, and then all of - // the others return. We don't want optimization to be triggered on - // each return, as that would be superfluous. It only makes sense - // to trigger optimization if one of those functions becomes hot - // in the baseline code. - void optimizeSoon() - { - m_jitExecuteCounter.setNewThreshold(Options::thresholdForOptimizeSoon() << reoptimizationRetryCounter(), this); - } + int32_t codeTypeThresholdMultiplier() const; - uint32_t osrExitCounter() const { return m_osrExitCounter; } + int32_t counterValueForOptimizeAfterWarmUp(); + int32_t counterValueForOptimizeAfterLongWarmUp(); + int32_t counterValueForOptimizeSoon(); - void countOSRExit() { m_osrExitCounter++; } - - uint32_t* addressOfOSRExitCounter() { return &m_osrExitCounter; } + int32_t* addressOfJITExecuteCounter() + { + return &m_jitExecuteCounter.m_counter; + } - static ptrdiff_t offsetOfOSRExitCounter() { return OBJECT_OFFSETOF(CodeBlock, m_osrExitCounter); } + static ptrdiff_t offsetOfJITExecuteCounter() { return OBJECT_OFFSETOF(CodeBlock, m_jitExecuteCounter) + OBJECT_OFFSETOF(ExecutionCounter, m_counter); } + static ptrdiff_t offsetOfJITExecutionActiveThreshold() { return OBJECT_OFFSETOF(CodeBlock, m_jitExecuteCounter) + OBJECT_OFFSETOF(ExecutionCounter, m_activeThreshold); } + static ptrdiff_t offsetOfJITExecutionTotalCount() { return OBJECT_OFFSETOF(CodeBlock, m_jitExecuteCounter) + OBJECT_OFFSETOF(ExecutionCounter, m_totalCount); } + + const ExecutionCounter& jitExecuteCounter() const { return m_jitExecuteCounter; } + + unsigned optimizationDelayCounter() const { return m_optimizationDelayCounter; } + + // Check if the optimization threshold has been reached, and if not, + // adjust the heuristics accordingly. Returns true if the threshold has + // been reached. + bool checkIfOptimizationThresholdReached(); + + // Call this to force the next optimization trigger to fire. This is + // rarely wise, since optimization triggers are typically more + // expensive than executing baseline code. + void optimizeNextInvocation(); + + // Call this to prevent optimization from happening again. Note that + // optimization will still happen after roughly 2^29 invocations, + // so this is really meant to delay that as much as possible. This + // is called if optimization failed, and we expect it to fail in + // the future as well. + void dontOptimizeAnytimeSoon(); + + // Call this to reinitialize the counter to its starting state, + // forcing a warm-up to happen before the next optimization trigger + // fires. This is called in the CodeBlock constructor. It also + // makes sense to call this if an OSR exit occurred. Note that + // OSR exit code is code generated, so the value of the execute + // counter that this corresponds to is also available directly. + void optimizeAfterWarmUp(); + + // Call this to force an optimization trigger to fire only after + // a lot of warm-up. + void optimizeAfterLongWarmUp(); + + // Call this to cause an optimization trigger to fire soon, but + // not necessarily the next one. This makes sense if optimization + // succeeds. Successfuly optimization means that all calls are + // relinked to the optimized code, so this only affects call + // frames that are still executing this CodeBlock. The value here + // is tuned to strike a balance between the cost of OSR entry + // (which is too high to warrant making every loop back edge to + // trigger OSR immediately) and the cost of executing baseline + // code (which is high enough that we don't necessarily want to + // have a full warm-up). The intuition for calling this instead of + // optimizeNextInvocation() is for the case of recursive functions + // with loops. Consider that there may be N call frames of some + // recursive function, for a reasonably large value of N. The top + // one triggers optimization, and then returns, and then all of + // the others return. We don't want optimization to be triggered on + // each return, as that would be superfluous. It only makes sense + // to trigger optimization if one of those functions becomes hot + // in the baseline code. + void optimizeSoon(); + + uint32_t osrExitCounter() const { return m_osrExitCounter; } + + void countOSRExit() { m_osrExitCounter++; } + + uint32_t* addressOfOSRExitCounter() { return &m_osrExitCounter; } + + static ptrdiff_t offsetOfOSRExitCounter() { return OBJECT_OFFSETOF(CodeBlock, m_osrExitCounter); } #if ENABLE(JIT) - uint32_t adjustedExitCountThreshold(uint32_t desiredThreshold) - { - ASSERT(getJITType() == JITCode::DFGJIT); - // Compute this the lame way so we don't saturate. This is called infrequently - // enough that this loop won't hurt us. - unsigned result = desiredThreshold; - for (unsigned n = baselineVersion()->reoptimizationRetryCounter(); n--;) { - unsigned newResult = result << 1; - if (newResult < result) - return std::numeric_limits::max(); - result = newResult; - } - return result; - } - - uint32_t exitCountThresholdForReoptimization() - { - return adjustedExitCountThreshold(Options::osrExitCountForReoptimization()); - } - - uint32_t exitCountThresholdForReoptimizationFromLoop() - { - return adjustedExitCountThreshold(Options::osrExitCountForReoptimizationFromLoop()); - } - - bool shouldReoptimizeNow() - { - return osrExitCounter() >= exitCountThresholdForReoptimization(); - } - - bool shouldReoptimizeFromLoopNow() - { - return osrExitCounter() >= exitCountThresholdForReoptimizationFromLoop(); - } + uint32_t adjustedExitCountThreshold(uint32_t desiredThreshold); + uint32_t exitCountThresholdForReoptimization(); + uint32_t exitCountThresholdForReoptimizationFromLoop(); + bool shouldReoptimizeNow(); + bool shouldReoptimizeFromLoopNow(); #endif #if ENABLE(VALUE_PROFILER) - bool shouldOptimizeNow(); - void updateAllValueProfilePredictions(OperationInProgress = NoOperation); - void updateAllArrayPredictions(OperationInProgress = NoOperation); - void updateAllPredictions(OperationInProgress = NoOperation); + bool shouldOptimizeNow(); + void updateAllValueProfilePredictions(OperationInProgress = NoOperation); + void updateAllArrayPredictions(OperationInProgress = NoOperation); + void updateAllPredictions(OperationInProgress = NoOperation); #else - bool shouldOptimizeNow() { return false; } - void updateAllValueProfilePredictions(OperationInProgress = NoOperation) { } - void updateAllArrayPredictions(OperationInProgress = NoOperation) { } - void updateAllPredictions(OperationInProgress = NoOperation) { } + bool shouldOptimizeNow() { return false; } + void updateAllValueProfilePredictions(OperationInProgress = NoOperation) { } + void updateAllArrayPredictions(OperationInProgress = NoOperation) { } + void updateAllPredictions(OperationInProgress = NoOperation) { } #endif #if ENABLE(JIT) - void reoptimize(); + void reoptimize(); #endif #if ENABLE(VERBOSE_VALUE_PROFILE) - void dumpValueProfiles(); + void dumpValueProfiles(); #endif - // FIXME: Make these remaining members private. + // FIXME: Make these remaining members private. - int m_numCalleeRegisters; - int m_numVars; - bool m_isConstructor; + int m_numCalleeRegisters; + int m_numVars; + bool m_isConstructor; - protected: +protected: #if ENABLE(JIT) - virtual bool jitCompileImpl(ExecState*) = 0; + virtual bool jitCompileImpl(ExecState*) = 0; + virtual void jettisonImpl() = 0; #endif - virtual void visitWeakReferences(SlotVisitor&); - virtual void finalizeUnconditionally(); + virtual void visitWeakReferences(SlotVisitor&); + virtual void finalizeUnconditionally(); - UnlinkedCodeBlock* unlinkedCodeBlock() const { return m_unlinkedCode.get(); } +#if ENABLE(DFG_JIT) + void tallyFrequentExitSites(); +#else + void tallyFrequentExitSites() { } +#endif - private: - friend class DFGCodeBlocks; +private: + friend class DFGCodeBlocks; + + double optimizationThresholdScalingFactor(); #if ENABLE(JIT) - ClosureCallStubRoutine* findClosureCallForReturnPC(ReturnAddressPtr); + ClosureCallStubRoutine* findClosureCallForReturnPC(ReturnAddressPtr); #endif -#if ENABLE(DFG_JIT) - void tallyFrequentExitSites(); -#else - void tallyFrequentExitSites() { } -#endif #if ENABLE(VALUE_PROFILER) - void updateAllPredictionsAndCountLiveness(OperationInProgress, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles); + void updateAllPredictionsAndCountLiveness(OperationInProgress, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles); #endif - void setIdentifiers(const Vector& identifiers) - { - ASSERT(m_identifiers.isEmpty()); - m_identifiers.appendVector(identifiers); - } + void setIdentifiers(const Vector& identifiers) + { + RELEASE_ASSERT(m_identifiers.isEmpty()); + m_identifiers.appendVector(identifiers); + } - void setConstantRegisters(const Vector >& constants) - { - size_t count = constants.size(); - m_constantRegisters.resize(count); - for (size_t i = 0; i < count; i++) - m_constantRegisters[i].set(*m_globalData, ownerExecutable(), constants[i].get()); - } + void setConstantRegisters(const Vector >& constants) + { + size_t count = constants.size(); + m_constantRegisters.resize(count); + for (size_t i = 0; i < count; i++) + m_constantRegisters[i].set(*m_vm, ownerExecutable(), constants[i].get()); + } - void dumpBytecode(ExecState*, const Instruction* begin, const Instruction*&); + void dumpBytecode(PrintStream&, ExecState*, const Instruction* begin, const Instruction*&); + + CString registerName(ExecState*, int r) const; + void printUnaryOp(PrintStream&, ExecState*, int location, const Instruction*&, const char* op); + void printBinaryOp(PrintStream&, ExecState*, int location, const Instruction*&, const char* op); + void printConditionalJump(PrintStream&, ExecState*, const Instruction*, const Instruction*&, int location, const char* op); + void printGetByIdOp(PrintStream&, ExecState*, int location, const Instruction*&); + void printGetByIdCacheStatus(PrintStream&, ExecState*, int location); + enum CacheDumpMode { DumpCaches, DontDumpCaches }; + void printCallOp(PrintStream&, ExecState*, int location, const Instruction*&, const char* op, CacheDumpMode); + void printPutByIdOp(PrintStream&, ExecState*, int location, const Instruction*&, const char* op); + void beginDumpProfiling(PrintStream&, bool& hasPrintedProfiling); + void dumpValueProfiling(PrintStream&, const Instruction*&, bool& hasPrintedProfiling); + void dumpArrayProfiling(PrintStream&, const Instruction*&, bool& hasPrintedProfiling); +#if ENABLE(VALUE_PROFILER) + void dumpRareCaseProfile(PrintStream&, const char* name, RareCaseProfile*, bool& hasPrintedProfiling); +#endif - CString registerName(ExecState*, int r) const; - void printUnaryOp(ExecState*, int location, const Instruction*&, const char* op); - void printBinaryOp(ExecState*, int location, const Instruction*&, const char* op); - void printConditionalJump(ExecState*, const Instruction*, const Instruction*&, int location, const char* op); - void printGetByIdOp(ExecState*, int location, const Instruction*&); - void printGetByIdCacheStatus(ExecState*, int location); - enum CacheDumpMode { DumpCaches, DontDumpCaches }; - void printCallOp(ExecState*, int location, const Instruction*&, const char* op, CacheDumpMode); - void printPutByIdOp(ExecState*, int location, const Instruction*&, const char* op); - void visitStructures(SlotVisitor&, Instruction* vPC); + void visitStructures(SlotVisitor&, Instruction* vPC); #if ENABLE(DFG_JIT) - bool shouldImmediatelyAssumeLivenessDuringScan() - { - // Null m_dfgData means that this is a baseline JIT CodeBlock. Baseline JIT - // CodeBlocks don't need to be jettisoned when their weak references go - // stale. So if a basline JIT CodeBlock gets scanned, we can assume that - // this means that it's live. - if (!m_dfgData) - return true; + bool shouldImmediatelyAssumeLivenessDuringScan() + { + // Null m_dfgData means that this is a baseline JIT CodeBlock. Baseline JIT + // CodeBlocks don't need to be jettisoned when their weak references go + // stale. So if a basline JIT CodeBlock gets scanned, we can assume that + // this means that it's live. + if (!m_dfgData) + return true; - // For simplicity, we don't attempt to jettison code blocks during GC if - // they are executing. Instead we strongly mark their weak references to - // allow them to continue to execute soundly. - if (m_dfgData->mayBeExecuting) - return true; + // For simplicity, we don't attempt to jettison code blocks during GC if + // they are executing. Instead we strongly mark their weak references to + // allow them to continue to execute soundly. + if (m_dfgData->mayBeExecuting) + return true; - if (Options::forceDFGCodeBlockLiveness()) - return true; + if (Options::forceDFGCodeBlockLiveness()) + return true; - return false; - } + return false; + } #else - bool shouldImmediatelyAssumeLivenessDuringScan() { return true; } + bool shouldImmediatelyAssumeLivenessDuringScan() { return true; } #endif - void performTracingFixpointIteration(SlotVisitor&); + void performTracingFixpointIteration(SlotVisitor&); - void stronglyVisitStrongReferences(SlotVisitor&); - void stronglyVisitWeakReferences(SlotVisitor&); + void stronglyVisitStrongReferences(SlotVisitor&); + void stronglyVisitWeakReferences(SlotVisitor&); - void createRareDataIfNecessary() - { - if (!m_rareData) - m_rareData = adoptPtr(new RareData); - } + void createRareDataIfNecessary() + { + if (!m_rareData) + m_rareData = adoptPtr(new RareData); + } #if ENABLE(JIT) - void resetStubInternal(RepatchBuffer&, StructureStubInfo&); + void resetStubInternal(RepatchBuffer&, StructureStubInfo&); + void resetStubDuringGCInternal(RepatchBuffer&, StructureStubInfo&); #endif - WriteBarrier m_unlinkedCode; - int m_numParameters; - WriteBarrier m_ownerExecutable; - JSGlobalData* m_globalData; + WriteBarrier m_unlinkedCode; + int m_numParameters; + WriteBarrier m_ownerExecutable; + VM* m_vm; - RefCountedArray m_instructions; - int m_thisRegister; - int m_argumentsRegister; - int m_activationRegister; + RefCountedArray m_instructions; + int m_thisRegister; + int m_argumentsRegister; + int m_activationRegister; - bool m_isStrictMode; + bool m_isStrictMode; + bool m_needsActivation; - RefPtr m_source; - unsigned m_sourceOffset; + RefPtr m_source; + unsigned m_sourceOffset; + unsigned m_firstLineColumnOffset; + unsigned m_codeType; #if ENABLE(LLINT) - SegmentedVector m_llintCallLinkInfos; - SentinelLinkedList > m_incomingLLIntCalls; + SegmentedVector m_llintCallLinkInfos; + SentinelLinkedList > m_incomingLLIntCalls; #endif #if ENABLE(JIT) - Vector m_structureStubInfos; - Vector m_byValInfos; - Vector m_callLinkInfos; - JITCode m_jitCode; - MacroAssemblerCodePtr m_jitCodeWithArityCheck; - SentinelLinkedList > m_incomingCalls; + Vector m_structureStubInfos; + Vector m_byValInfos; + Vector m_callLinkInfos; + JITCode m_jitCode; + MacroAssemblerCodePtr m_jitCodeWithArityCheck; + SentinelLinkedList > m_incomingCalls; #endif #if ENABLE(DFG_JIT) || ENABLE(LLINT) - OwnPtr m_jitCodeMap; + OwnPtr m_jitCodeMap; #endif #if ENABLE(DFG_JIT) - struct WeakReferenceTransition { - WeakReferenceTransition() { } + struct WeakReferenceTransition { + WeakReferenceTransition() { } - WeakReferenceTransition(JSGlobalData& globalData, JSCell* owner, JSCell* codeOrigin, JSCell* from, JSCell* to) - : m_from(globalData, owner, from) - , m_to(globalData, owner, to) - { - if (!!codeOrigin) - m_codeOrigin.set(globalData, owner, codeOrigin); - } - - WriteBarrier m_codeOrigin; - WriteBarrier m_from; - WriteBarrier m_to; - }; - - struct DFGData { - DFGData() - : mayBeExecuting(false) - , isJettisoned(false) - { - } + WeakReferenceTransition(VM& vm, JSCell* owner, JSCell* codeOrigin, JSCell* from, JSCell* to) + : m_from(vm, owner, from) + , m_to(vm, owner, to) + { + if (!!codeOrigin) + m_codeOrigin.set(vm, owner, codeOrigin); + } + + WriteBarrier m_codeOrigin; + WriteBarrier m_from; + WriteBarrier m_to; + }; + + struct DFGData { + DFGData() + : mayBeExecuting(false) + , isJettisoned(false) + { + } - Vector osrEntry; - SegmentedVector osrExit; - Vector speculationRecovery; - SegmentedVector watchpoints; - Vector transitions; - Vector > weakReferences; - DFG::VariableEventStream variableEventStream; - DFG::MinifiedGraph minifiedDFG; - bool mayBeExecuting; - bool isJettisoned; - bool livenessHasBeenProved; // Initialized and used on every GC. - bool allTransitionsHaveBeenMarked; // Initialized and used on every GC. - unsigned visitAggregateHasBeenCalled; // Unsigned to make it work seamlessly with the broadest set of CAS implementations. - }; - - OwnPtr m_dfgData; - - // This is relevant to non-DFG code blocks that serve as the profiled code block - // for DFG code blocks. - DFG::ExitProfile m_exitProfile; - CompressedLazyOperandValueProfileHolder m_lazyOperandValueProfiles; + Vector osrEntry; + SegmentedVector osrExit; + Vector speculationRecovery; + SegmentedVector watchpoints; + Vector transitions; + Vector > weakReferences; + DFG::VariableEventStream variableEventStream; + DFG::MinifiedGraph minifiedDFG; + RefPtr compilation; + bool mayBeExecuting; + bool isJettisoned; + bool livenessHasBeenProved; // Initialized and used on every GC. + bool allTransitionsHaveBeenMarked; // Initialized and used on every GC. + unsigned visitAggregateHasBeenCalled; // Unsigned to make it work seamlessly with the broadest set of CAS implementations. + }; + + OwnPtr m_dfgData; + + // This is relevant to non-DFG code blocks that serve as the profiled code block + // for DFG code blocks. + DFG::ExitProfile m_exitProfile; + CompressedLazyOperandValueProfileHolder m_lazyOperandValueProfiles; #endif #if ENABLE(VALUE_PROFILER) - Vector m_argumentValueProfiles; - SegmentedVector m_valueProfiles; - SegmentedVector m_rareCaseProfiles; - SegmentedVector m_specialFastCaseProfiles; - SegmentedVector m_arrayAllocationProfiles; - ArrayProfileVector m_arrayProfiles; - unsigned m_executionEntryCount; + Vector m_argumentValueProfiles; + SegmentedVector m_valueProfiles; + SegmentedVector m_rareCaseProfiles; + SegmentedVector m_specialFastCaseProfiles; + SegmentedVector m_arrayAllocationProfiles; + ArrayProfileVector m_arrayProfiles; #endif + SegmentedVector m_objectAllocationProfiles; - // Constant Pool - Vector m_identifiers; - COMPILE_ASSERT(sizeof(Register) == sizeof(WriteBarrier), Register_must_be_same_size_as_WriteBarrier_Unknown); - // TODO: This could just be a pointer to m_unlinkedCodeBlock's data, but the DFG mutates - // it, so we're stuck with it for now. - Vector > m_constantRegisters; - Vector > m_functionDecls; - Vector > m_functionExprs; + // Constant Pool + Vector m_identifiers; + COMPILE_ASSERT(sizeof(Register) == sizeof(WriteBarrier), Register_must_be_same_size_as_WriteBarrier_Unknown); + // TODO: This could just be a pointer to m_unlinkedCodeBlock's data, but the DFG mutates + // it, so we're stuck with it for now. + Vector > m_constantRegisters; + Vector > m_functionDecls; + Vector > m_functionExprs; - OwnPtr m_alternative; + OwnPtr m_alternative; - ExecutionCounter m_llintExecuteCounter; + ExecutionCounter m_llintExecuteCounter; - ExecutionCounter m_jitExecuteCounter; - int32_t m_totalJITExecutions; - uint32_t m_osrExitCounter; - uint16_t m_optimizationDelayCounter; - uint16_t m_reoptimizationRetryCounter; + ExecutionCounter m_jitExecuteCounter; + int32_t m_totalJITExecutions; + uint32_t m_osrExitCounter; + uint16_t m_optimizationDelayCounter; + uint16_t m_reoptimizationRetryCounter; - Vector m_resolveOperations; - Vector m_putToBaseOperations; + Vector m_resolveOperations; + Vector m_putToBaseOperations; - struct RareData { - WTF_MAKE_FAST_ALLOCATED; - public: - Vector m_exceptionHandlers; + struct RareData { + WTF_MAKE_FAST_ALLOCATED; + public: + Vector m_exceptionHandlers; - // Buffers used for large array literals - Vector > m_constantBuffers; + // Buffers used for large array literals + Vector > m_constantBuffers; - // Jump Tables - Vector m_immediateSwitchJumpTables; - Vector m_characterSwitchJumpTables; - Vector m_stringSwitchJumpTables; + // Jump Tables + Vector m_immediateSwitchJumpTables; + Vector m_characterSwitchJumpTables; + Vector m_stringSwitchJumpTables; - EvalCodeCache m_evalCodeCache; + EvalCodeCache m_evalCodeCache; #if ENABLE(JIT) - Vector m_callReturnIndexVector; + Vector m_callReturnIndexVector; #endif #if ENABLE(DFG_JIT) - SegmentedVector m_inlineCallFrames; - Vector m_codeOrigins; + SegmentedVector m_inlineCallFrames; + Vector m_codeOrigins; #endif - }; + }; #if COMPILER(MSVC) - friend void WTF::deleteOwnedPtr(RareData*); -#endif - OwnPtr m_rareData; -#if ENABLE(JIT) - DFG::CapabilityLevel m_canCompileWithDFGState; + friend void WTF::deleteOwnedPtr(RareData*); #endif - }; - - // Program code is not marked by any function, so we make the global object - // responsible for marking it. - - class GlobalCodeBlock : public CodeBlock { - protected: - GlobalCodeBlock(CopyParsedBlockTag, GlobalCodeBlock& other) - : CodeBlock(CopyParsedBlock, other) - { - } - - GlobalCodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, unsigned baseScopeDepth, PassRefPtr sourceProvider, unsigned sourceOffset, PassOwnPtr alternative) - : CodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, baseScopeDepth, sourceProvider, sourceOffset, alternative) - { - } - }; - - class ProgramCodeBlock : public GlobalCodeBlock { - public: - ProgramCodeBlock(CopyParsedBlockTag, ProgramCodeBlock& other) - : GlobalCodeBlock(CopyParsedBlock, other) - { - } - - ProgramCodeBlock(ProgramExecutable* ownerExecutable, UnlinkedProgramCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, PassRefPtr sourceProvider, PassOwnPtr alternative) - : GlobalCodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, 0, sourceProvider, 0, alternative) - { - } - + OwnPtr m_rareData; #if ENABLE(JIT) - protected: - virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex); - virtual void jettison(); - virtual bool jitCompileImpl(ExecState*); - virtual CodeBlock* replacement(); - virtual DFG::CapabilityLevel canCompileWithDFGInternal(); + DFG::CapabilityLevel m_canCompileWithDFGState; #endif - }; +}; - class EvalCodeBlock : public GlobalCodeBlock { - public: - EvalCodeBlock(CopyParsedBlockTag, EvalCodeBlock& other) - : GlobalCodeBlock(CopyParsedBlock, other) - { - } - - EvalCodeBlock(EvalExecutable* ownerExecutable, UnlinkedEvalCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, PassRefPtr sourceProvider, int baseScopeDepth, PassOwnPtr alternative) - : GlobalCodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, baseScopeDepth, sourceProvider, 0, alternative) - { - } +// Program code is not marked by any function, so we make the global object +// responsible for marking it. - const Identifier& variable(unsigned index) { return unlinkedEvalCodeBlock()->variable(index); } - unsigned numVariables() { return unlinkedEvalCodeBlock()->numVariables(); } +class GlobalCodeBlock : public CodeBlock { +protected: + GlobalCodeBlock(CopyParsedBlockTag, GlobalCodeBlock& other) + : CodeBlock(CopyParsedBlock, other) + { + } -#if ENABLE(JIT) - protected: - virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex); - virtual void jettison(); - virtual bool jitCompileImpl(ExecState*); - virtual CodeBlock* replacement(); - virtual DFG::CapabilityLevel canCompileWithDFGInternal(); -#endif + GlobalCodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, unsigned baseScopeDepth, PassRefPtr sourceProvider, unsigned sourceOffset, unsigned firstLineColumnOffset, PassOwnPtr alternative) + : CodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, baseScopeDepth, sourceProvider, sourceOffset, firstLineColumnOffset, alternative) + { + } +}; - private: - UnlinkedEvalCodeBlock* unlinkedEvalCodeBlock() const { return jsCast(unlinkedCodeBlock()); } - }; +class ProgramCodeBlock : public GlobalCodeBlock { +public: + ProgramCodeBlock(CopyParsedBlockTag, ProgramCodeBlock& other) + : GlobalCodeBlock(CopyParsedBlock, other) + { + } - class FunctionCodeBlock : public CodeBlock { - public: - FunctionCodeBlock(CopyParsedBlockTag, FunctionCodeBlock& other) - : CodeBlock(CopyParsedBlock, other) - { - } + ProgramCodeBlock(ProgramExecutable* ownerExecutable, UnlinkedProgramCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, PassRefPtr sourceProvider, unsigned firstLineColumnOffset, PassOwnPtr alternative) + : GlobalCodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, 0, sourceProvider, 0, firstLineColumnOffset, alternative) + { + } - FunctionCodeBlock(FunctionExecutable* ownerExecutable, UnlinkedFunctionCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, PassRefPtr sourceProvider, unsigned sourceOffset, PassOwnPtr alternative = nullptr) - : CodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, 0, sourceProvider, sourceOffset, alternative) - { - } - #if ENABLE(JIT) - protected: - virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex); - virtual void jettison(); - virtual bool jitCompileImpl(ExecState*); - virtual CodeBlock* replacement(); - virtual DFG::CapabilityLevel canCompileWithDFGInternal(); +protected: + virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex); + virtual void jettisonImpl(); + virtual bool jitCompileImpl(ExecState*); + virtual CodeBlock* replacement(); + virtual DFG::CapabilityLevel canCompileWithDFGInternal(); #endif - }; +}; - inline CodeBlock* baselineCodeBlockForInlineCallFrame(InlineCallFrame* inlineCallFrame) +class EvalCodeBlock : public GlobalCodeBlock { +public: + EvalCodeBlock(CopyParsedBlockTag, EvalCodeBlock& other) + : GlobalCodeBlock(CopyParsedBlock, other) { - ASSERT(inlineCallFrame); - ExecutableBase* executable = inlineCallFrame->executable.get(); - ASSERT(executable->structure()->classInfo() == &FunctionExecutable::s_info); - return static_cast(executable)->baselineCodeBlockFor(inlineCallFrame->isCall ? CodeForCall : CodeForConstruct); } - - inline CodeBlock* baselineCodeBlockForOriginAndBaselineCodeBlock(const CodeOrigin& codeOrigin, CodeBlock* baselineCodeBlock) + + EvalCodeBlock(EvalExecutable* ownerExecutable, UnlinkedEvalCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, PassRefPtr sourceProvider, int baseScopeDepth, PassOwnPtr alternative) + : GlobalCodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, baseScopeDepth, sourceProvider, 0, 1, alternative) { - if (codeOrigin.inlineCallFrame) - return baselineCodeBlockForInlineCallFrame(codeOrigin.inlineCallFrame); - return baselineCodeBlock; } - - inline int CodeBlock::argumentIndexAfterCapture(size_t argument) - { - if (argument >= static_cast(symbolTable()->parameterCount())) - return CallFrame::argumentOffset(argument); - const SlowArgument* slowArguments = symbolTable()->slowArguments(); - if (!slowArguments || slowArguments[argument].status == SlowArgument::Normal) - return CallFrame::argumentOffset(argument); + const Identifier& variable(unsigned index) { return unlinkedEvalCodeBlock()->variable(index); } + unsigned numVariables() { return unlinkedEvalCodeBlock()->numVariables(); } + +#if ENABLE(JIT) +protected: + virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex); + virtual void jettisonImpl(); + virtual bool jitCompileImpl(ExecState*); + virtual CodeBlock* replacement(); + virtual DFG::CapabilityLevel canCompileWithDFGInternal(); +#endif - ASSERT(slowArguments[argument].status == SlowArgument::Captured); - return slowArguments[argument].index; - } +private: + UnlinkedEvalCodeBlock* unlinkedEvalCodeBlock() const { return jsCast(unlinkedCodeBlock()); } +}; - inline Register& ExecState::r(int index) +class FunctionCodeBlock : public CodeBlock { +public: + FunctionCodeBlock(CopyParsedBlockTag, FunctionCodeBlock& other) + : CodeBlock(CopyParsedBlock, other) { - CodeBlock* codeBlock = this->codeBlock(); - if (codeBlock->isConstantRegisterIndex(index)) - return *reinterpret_cast(&codeBlock->constantRegister(index)); - return this[index]; } - inline Register& ExecState::uncheckedR(int index) + FunctionCodeBlock(FunctionExecutable* ownerExecutable, UnlinkedFunctionCodeBlock* unlinkedCodeBlock, JSGlobalObject* globalObject, PassRefPtr sourceProvider, unsigned sourceOffset, unsigned firstLineColumnOffset, PassOwnPtr alternative = nullptr) + : CodeBlock(ownerExecutable, unlinkedCodeBlock, globalObject, 0, sourceProvider, sourceOffset, firstLineColumnOffset, alternative) { - ASSERT(index < FirstConstantRegisterIndex); - return this[index]; } + +#if ENABLE(JIT) +protected: + virtual JSObject* compileOptimized(ExecState*, JSScope*, unsigned bytecodeIndex); + virtual void jettisonImpl(); + virtual bool jitCompileImpl(ExecState*); + virtual CodeBlock* replacement(); + virtual DFG::CapabilityLevel canCompileWithDFGInternal(); +#endif +}; + +inline CodeBlock* baselineCodeBlockForInlineCallFrame(InlineCallFrame* inlineCallFrame) +{ + RELEASE_ASSERT(inlineCallFrame); + ExecutableBase* executable = inlineCallFrame->executable.get(); + RELEASE_ASSERT(executable->structure()->classInfo() == &FunctionExecutable::s_info); + return static_cast(executable)->baselineCodeBlockFor(inlineCallFrame->isCall ? CodeForCall : CodeForConstruct); +} + +inline CodeBlock* baselineCodeBlockForOriginAndBaselineCodeBlock(const CodeOrigin& codeOrigin, CodeBlock* baselineCodeBlock) +{ + if (codeOrigin.inlineCallFrame) + return baselineCodeBlockForInlineCallFrame(codeOrigin.inlineCallFrame); + return baselineCodeBlock; +} + +inline int CodeBlock::argumentIndexAfterCapture(size_t argument) +{ + if (argument >= static_cast(symbolTable()->parameterCount())) + return CallFrame::argumentOffset(argument); + + const SlowArgument* slowArguments = symbolTable()->slowArguments(); + if (!slowArguments || slowArguments[argument].status == SlowArgument::Normal) + return CallFrame::argumentOffset(argument); + + ASSERT(slowArguments[argument].status == SlowArgument::Captured); + return slowArguments[argument].index; +} + +inline Register& ExecState::r(int index) +{ + CodeBlock* codeBlock = this->codeBlock(); + if (codeBlock->isConstantRegisterIndex(index)) + return *reinterpret_cast(&codeBlock->constantRegister(index)); + return this[index]; +} + +inline Register& ExecState::uncheckedR(int index) +{ + RELEASE_ASSERT(index < FirstConstantRegisterIndex); + return this[index]; +} #if ENABLE(DFG_JIT) - inline bool ExecState::isInlineCallFrame() - { - if (LIKELY(!codeBlock() || codeBlock()->getJITType() != JITCode::DFGJIT)) - return false; - return isInlineCallFrameSlow(); - } +inline bool ExecState::isInlineCallFrame() +{ + if (LIKELY(!codeBlock() || codeBlock()->getJITType() != JITCode::DFGJIT)) + return false; + return isInlineCallFrameSlow(); +} #endif - inline JSValue ExecState::argumentAfterCapture(size_t argument) - { - if (argument >= argumentCount()) - return jsUndefined(); +inline JSValue ExecState::argumentAfterCapture(size_t argument) +{ + if (argument >= argumentCount()) + return jsUndefined(); - if (!codeBlock()) - return this[argumentOffset(argument)].jsValue(); + if (!codeBlock()) + return this[argumentOffset(argument)].jsValue(); - return this[codeBlock()->argumentIndexAfterCapture(argument)].jsValue(); - } + return this[codeBlock()->argumentIndexAfterCapture(argument)].jsValue(); +} #if ENABLE(DFG_JIT) - inline void DFGCodeBlocks::mark(void* candidateCodeBlock) - { - // We have to check for 0 and -1 because those are used by the HashMap as markers. - uintptr_t value = reinterpret_cast(candidateCodeBlock); - - // This checks for both of those nasty cases in one go. - // 0 + 1 = 1 - // -1 + 1 = 0 - if (value + 1 <= 1) - return; - - HashSet::iterator iter = m_set.find(static_cast(candidateCodeBlock)); - if (iter == m_set.end()) - return; - - (*iter)->m_dfgData->mayBeExecuting = true; - } +inline void DFGCodeBlocks::mark(void* candidateCodeBlock) +{ + // We have to check for 0 and -1 because those are used by the HashMap as markers. + uintptr_t value = reinterpret_cast(candidateCodeBlock); + + // This checks for both of those nasty cases in one go. + // 0 + 1 = 1 + // -1 + 1 = 0 + if (value + 1 <= 1) + return; + + HashSet::iterator iter = m_set.find(static_cast(candidateCodeBlock)); + if (iter == m_set.end()) + return; + + (*iter)->m_dfgData->mayBeExecuting = true; +} #endif - inline JSValue Structure::prototypeForLookup(CodeBlock* codeBlock) const - { - return prototypeForLookup(codeBlock->globalObject()); - } - } // namespace JSC #endif // CodeBlock_h diff --git a/Source/JavaScriptCore/bytecode/CodeBlockHash.cpp b/Source/JavaScriptCore/bytecode/CodeBlockHash.cpp index 79fe9ccb5..7c890cc88 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlockHash.cpp +++ b/Source/JavaScriptCore/bytecode/CodeBlockHash.cpp @@ -36,8 +36,7 @@ namespace JSC { CodeBlockHash::CodeBlockHash(const char* string) : m_hash(0) { - if (strlen(string) != 6) - CRASH(); + RELEASE_ASSERT(strlen(string) == 6); for (unsigned i = 0; i < 6; ++i) { m_hash *= 62; diff --git a/Source/JavaScriptCore/bytecode/CodeOrigin.cpp b/Source/JavaScriptCore/bytecode/CodeOrigin.cpp index 92e2b0fc9..52bc2bf7f 100644 --- a/Source/JavaScriptCore/bytecode/CodeOrigin.cpp +++ b/Source/JavaScriptCore/bytecode/CodeOrigin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Apple Inc. All rights reserved. + * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,7 +26,10 @@ #include "config.h" #include "CodeOrigin.h" +#include "CallFrame.h" +#include "CodeBlock.h" #include "Executable.h" +#include "Operations.h" namespace JSC { @@ -50,13 +53,66 @@ Vector CodeOrigin::inlineStack() const unsigned index = result.size() - 2; for (InlineCallFrame* current = inlineCallFrame; current; current = current->caller.inlineCallFrame) result[index--] = current->caller; + RELEASE_ASSERT(!result[0].inlineCallFrame); return result; } +void CodeOrigin::dump(PrintStream& out) const +{ + Vector stack = inlineStack(); + for (unsigned i = 0; i < stack.size(); ++i) { + if (i) + out.print(" --> "); + + if (InlineCallFrame* frame = stack[i].inlineCallFrame) { + out.print(frame->briefFunctionInformation(), ":<", RawPointer(frame->executable.get()), "> "); + if (frame->isClosureCall()) + out.print("(closure) "); + } + + out.print("bc#", stack[i].bytecodeIndex); + } +} + +JSFunction* InlineCallFrame::calleeForCallFrame(ExecState* exec) const +{ + if (!isClosureCall()) + return callee.get(); + + return jsCast((exec + stackOffset)->callee()); +} + CodeBlockHash InlineCallFrame::hash() const { return executable->hashFor(specializationKind()); } +String InlineCallFrame::inferredName() const +{ + return jsCast(executable.get())->inferredName().string(); +} + +CodeBlock* InlineCallFrame::baselineCodeBlock() const +{ + return jsCast(executable.get())->baselineCodeBlockFor(specializationKind()); +} + +void InlineCallFrame::dumpBriefFunctionInformation(PrintStream& out) const +{ + out.print(inferredName(), "#", hash()); +} + +void InlineCallFrame::dump(PrintStream& out) const +{ + out.print(briefFunctionInformation(), ":<", RawPointer(executable.get()), ", bc#", caller.bytecodeIndex, ", ", specializationKind()); + if (callee) + out.print(", known callee: ", JSValue(callee.get())); + else + out.print(", closure call"); + out.print(", numArgs+this = ", arguments.size()); + out.print(", stack >= r", stackOffset); + out.print(">"); +} + } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/CodeOrigin.h b/Source/JavaScriptCore/bytecode/CodeOrigin.h index d8fbf7328..5d9eaa041 100644 --- a/Source/JavaScriptCore/bytecode/CodeOrigin.h +++ b/Source/JavaScriptCore/bytecode/CodeOrigin.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,12 +31,14 @@ #include "ValueRecovery.h" #include "WriteBarrier.h" #include +#include #include #include namespace JSC { struct InlineCallFrame; +class ExecState; class ExecutableBase; class JSFunction; @@ -63,8 +65,8 @@ struct CodeOrigin { , valueProfileOffset(valueProfileOffset) , inlineCallFrame(inlineCallFrame) { - ASSERT(bytecodeIndex <= maximumBytecodeIndex); - ASSERT(valueProfileOffset < (1u << 3)); + RELEASE_ASSERT(bytecodeIndex <= maximumBytecodeIndex); + RELEASE_ASSERT(valueProfileOffset < (1u << 3)); } bool isSet() const { return bytecodeIndex != maximumBytecodeIndex; } @@ -82,6 +84,8 @@ struct CodeOrigin { // would have owned the code if it had not been inlined. Otherwise returns 0. ExecutableBase* codeOriginOwner() const; + unsigned stackOffset() const; + static unsigned inlineDepthForCallFrame(InlineCallFrame*); bool operator==(const CodeOrigin& other) const; @@ -90,12 +94,14 @@ struct CodeOrigin { // Get the inline stack. This is slow, and is intended for debugging only. Vector inlineStack() const; + + void dump(PrintStream&) const; }; struct InlineCallFrame { Vector arguments; WriteBarrier executable; - WriteBarrier callee; + WriteBarrier callee; // This may be null, indicating that this is a closure call and that the JSFunction and JSScope are already on the stack. CodeOrigin caller; BitVector capturedVars; // Indexed by the machine call frame's variable numbering. unsigned stackOffset : 31; @@ -103,7 +109,20 @@ struct InlineCallFrame { CodeSpecializationKind specializationKind() const { return specializationFromIsCall(isCall); } + bool isClosureCall() const { return !callee; } + + // Get the callee given a machine call frame to which this InlineCallFrame belongs. + JSFunction* calleeForCallFrame(ExecState*) const; + + String inferredName() const; CodeBlockHash hash() const; + + CodeBlock* baselineCodeBlock() const; + + void dumpBriefFunctionInformation(PrintStream&) const; + void dump(PrintStream&) const; + + MAKE_PRINT_METHOD(InlineCallFrame, dumpBriefFunctionInformation, briefFunctionInformation); }; struct CodeOriginAtCallReturnOffset { @@ -111,6 +130,14 @@ struct CodeOriginAtCallReturnOffset { unsigned callReturnOffset; }; +inline unsigned CodeOrigin::stackOffset() const +{ + if (!inlineCallFrame) + return 0; + + return inlineCallFrame->stackOffset; +} + inline bool CodeOrigin::operator==(const CodeOrigin& other) const { return bytecodeIndex == other.bytecodeIndex diff --git a/Source/JavaScriptCore/bytecode/Comment.h b/Source/JavaScriptCore/bytecode/Comment.h deleted file mode 100644 index c28f3a068..000000000 --- a/Source/JavaScriptCore/bytecode/Comment.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2012 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef Comment_h -#define Comment_h - -namespace JSC { - -struct Comment { - size_t pc; - const char* string; -}; - -} // namespace JSC - -#endif // Comment_h diff --git a/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp b/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp index 69fdc3737..d36878fc9 100644 --- a/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp +++ b/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp @@ -55,6 +55,33 @@ bool ExitProfile::add(const FrequentExitSite& site) return true; } +Vector ExitProfile::exitSitesFor(unsigned bytecodeIndex) +{ + Vector result; + + if (!m_frequentExitSites) + return result; + + for (unsigned i = 0; i < m_frequentExitSites->size(); ++i) { + if (m_frequentExitSites->at(i).bytecodeOffset() == bytecodeIndex) + result.append(m_frequentExitSites->at(i)); + } + + return result; +} + +bool ExitProfile::hasExitSite(const FrequentExitSite& site) const +{ + if (!m_frequentExitSites) + return false; + + for (unsigned i = m_frequentExitSites->size(); i--;) { + if (m_frequentExitSites->at(i) == site) + return true; + } + return false; +} + QueryableExitProfile::QueryableExitProfile(const ExitProfile& profile) { if (!profile.m_frequentExitSites) diff --git a/Source/JavaScriptCore/bytecode/DFGExitProfile.h b/Source/JavaScriptCore/bytecode/DFGExitProfile.h index 7132adfd4..fe7b2f921 100644 --- a/Source/JavaScriptCore/bytecode/DFGExitProfile.h +++ b/Source/JavaScriptCore/bytecode/DFGExitProfile.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,73 +26,13 @@ #ifndef DFGExitProfile_h #define DFGExitProfile_h +#include "ExitKind.h" #include #include #include namespace JSC { namespace DFG { -enum ExitKind { - ExitKindUnset, - BadType, // We exited because a type prediction was wrong. - BadCache, // We exited because an inline cache was wrong. - BadWeakConstantCache, // We exited because a cache on a weak constant (usually a prototype) was wrong. - BadIndexingType, // We exited because an indexing type was wrong. - Overflow, // We exited because of overflow. - NegativeZero, // We exited because we encountered negative zero. - OutOfBounds, // We had an out-of-bounds access to an array. - InadequateCoverage, // We exited because we ended up in code that didn't have profiling coverage. - ArgumentsEscaped, // We exited because arguments escaped but we didn't expect them to. - Uncountable, // We exited for none of the above reasons, and we should not count it. Most uses of this should be viewed as a FIXME. - UncountableWatchpoint // We exited because of a watchpoint, which isn't counted because watchpoints do tracking themselves. -}; - -inline const char* exitKindToString(ExitKind kind) -{ - switch (kind) { - case ExitKindUnset: - return "Unset"; - case BadType: - return "BadType"; - case BadCache: - return "BadCache"; - case BadWeakConstantCache: - return "BadWeakConstantCache"; - case BadIndexingType: - return "BadIndexingType"; - case Overflow: - return "Overflow"; - case NegativeZero: - return "NegativeZero"; - case OutOfBounds: - return "OutOfBounds"; - case InadequateCoverage: - return "InadequateCoverage"; - case ArgumentsEscaped: - return "ArgumentsEscaped"; - case Uncountable: - return "Uncountable"; - case UncountableWatchpoint: - return "UncountableWatchpoint"; - default: - return "Unknown"; - } -} - -inline bool exitKindIsCountable(ExitKind kind) -{ - switch (kind) { - case ExitKindUnset: - ASSERT_NOT_REACHED(); - case BadType: - case Uncountable: - case UncountableWatchpoint: - return false; - default: - return true; - } -} - class FrequentExitSite { public: FrequentExitSite() @@ -189,6 +129,24 @@ public: // anyway. bool add(const FrequentExitSite&); + // Get the frequent exit sites for a bytecode index. This is O(n), and is + // meant to only be used from debugging/profiling code. + Vector exitSitesFor(unsigned bytecodeIndex); + + // This is O(n) and should be called on less-frequently executed code paths + // in the compiler. It should be strictly cheaper than building a + // QueryableExitProfile, if you really expect this to be called infrequently + // and you believe that there are few exit sites. + bool hasExitSite(const FrequentExitSite&) const; + bool hasExitSite(ExitKind kind) const + { + return hasExitSite(FrequentExitSite(kind)); + } + bool hasExitSite(unsigned bytecodeIndex, ExitKind kind) const + { + return hasExitSite(FrequentExitSite(bytecodeIndex, kind)); + } + private: friend class QueryableExitProfile; diff --git a/Source/JavaScriptCore/bytecode/DataFormat.h b/Source/JavaScriptCore/bytecode/DataFormat.h index 51c8afbf6..da8dacf49 100644 --- a/Source/JavaScriptCore/bytecode/DataFormat.h +++ b/Source/JavaScriptCore/bytecode/DataFormat.h @@ -82,7 +82,12 @@ inline const char* dataFormatToString(DataFormat dataFormat) return "JSCell"; case DataFormatJSBoolean: return "JSBoolean"; + case DataFormatDead: + return "Dead"; + case DataFormatArguments: + return "Arguments"; default: + RELEASE_ASSERT_NOT_REACHED(); return "Unknown"; } } @@ -115,14 +120,14 @@ inline bool needDataFormatConversion(DataFormat from, DataFormat to) return false; default: // This captures DataFormatBoolean, which is currently unused. - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } case DataFormatStorage: ASSERT(to == DataFormatStorage); return false; default: // This captures DataFormatBoolean, which is currently unused. - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } return true; } @@ -149,7 +154,7 @@ inline bool needDataFormatConversion(DataFormat from, DataFormat to) ASSERT(to == DataFormatStorage); return false; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } return true; } diff --git a/Source/JavaScriptCore/bytecode/EvalCodeCache.h b/Source/JavaScriptCore/bytecode/EvalCodeCache.h index 29b17dd82..5d04637f4 100644 --- a/Source/JavaScriptCore/bytecode/EvalCodeCache.h +++ b/Source/JavaScriptCore/bytecode/EvalCodeCache.h @@ -31,8 +31,6 @@ #include "Executable.h" #include "JSGlobalObject.h" -#include "Nodes.h" -#include "Parser.h" #include "SourceCode.h" #include #include @@ -40,6 +38,7 @@ namespace JSC { + class CodeCache; class SlotVisitor; class EvalCodeCache { @@ -51,25 +50,25 @@ namespace JSC { return 0; } - EvalExecutable* getSlow(ExecState* exec, ScriptExecutable* owner, bool inStrictContext, const String& evalSource, JSScope* scope, JSValue& exceptionValue) + EvalExecutable* getSlow(ExecState* exec, CodeCache* codeCache, ScriptExecutable* owner, bool inStrictContext, const String& evalSource, JSScope* scope, JSValue& exceptionValue) { - EvalExecutable* evalExecutable = EvalExecutable::create(exec, makeSource(evalSource), inStrictContext); + EvalExecutable* evalExecutable = EvalExecutable::create(exec, codeCache, makeSource(evalSource), inStrictContext); exceptionValue = evalExecutable->compile(exec, scope); if (exceptionValue) return 0; if (!inStrictContext && evalSource.length() < maxCacheableSourceLength && scope->begin()->isVariableObject() && m_cacheMap.size() < maxCacheEntries) - m_cacheMap.set(evalSource.impl(), WriteBarrier(exec->globalData(), owner, evalExecutable)); + m_cacheMap.set(evalSource.impl(), WriteBarrier(exec->vm(), owner, evalExecutable)); return evalExecutable; } - EvalExecutable* get(ExecState* exec, ScriptExecutable* owner, bool inStrictContext, const String& evalSource, JSScope* scope, JSValue& exceptionValue) + EvalExecutable* get(ExecState* exec, CodeCache* codeCache, ScriptExecutable* owner, bool inStrictContext, const String& evalSource, JSScope* scope, JSValue& exceptionValue) { EvalExecutable* evalExecutable = tryGet(inStrictContext, evalSource, scope); if (!evalExecutable) - evalExecutable = getSlow(exec, owner, inStrictContext, evalSource, scope, exceptionValue); + evalExecutable = getSlow(exec, codeCache, owner, inStrictContext, evalSource, scope, exceptionValue); return evalExecutable; } diff --git a/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp b/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp index e619a0376..dca9c5126 100644 --- a/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp +++ b/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp @@ -113,7 +113,8 @@ bool ExecutionCounter::hasCrossedThreshold(CodeBlock* codeBlock) const double modifiedThreshold = applyMemoryUsageHeuristics(m_activeThreshold, codeBlock); return static_cast(m_totalCount) + m_counter >= - modifiedThreshold - static_cast(m_activeThreshold) / 2; + modifiedThreshold - static_cast( + std::min(m_activeThreshold, Options::maximumExecutionCountsBetweenCheckpoints())) / 2; } bool ExecutionCounter::setThreshold(CodeBlock* codeBlock) diff --git a/Source/JavaScriptCore/bytecode/ExitKind.cpp b/Source/JavaScriptCore/bytecode/ExitKind.cpp new file mode 100644 index 000000000..a8d904585 --- /dev/null +++ b/Source/JavaScriptCore/bytecode/ExitKind.cpp @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "ExitKind.h" + +#include +#include + +namespace JSC { + +const char* exitKindToString(ExitKind kind) +{ + switch (kind) { + case ExitKindUnset: + return "Unset"; + case BadType: + return "BadType"; + case BadFunction: + return "BadFunction"; + case BadExecutable: + return "BadExecutable"; + case BadCache: + return "BadCache"; + case BadWeakConstantCache: + return "BadWeakConstantCache"; + case BadIndexingType: + return "BadIndexingType"; + case Overflow: + return "Overflow"; + case NegativeZero: + return "NegativeZero"; + case StoreToHole: + return "StoreToHole"; + case LoadFromHole: + return "LoadFromHole"; + case OutOfBounds: + return "OutOfBounds"; + case StoreToHoleOrOutOfBounds: + return "StoreToHoleOrOutOfBounds"; + case InadequateCoverage: + return "InadequateCoverage"; + case ArgumentsEscaped: + return "ArgumentsEscaped"; + case NotStringObject: + return "NotStringObject"; + case Uncountable: + return "Uncountable"; + case UncountableWatchpoint: + return "UncountableWatchpoint"; + default: + RELEASE_ASSERT_NOT_REACHED(); + return "Unknown"; + } +} + +bool exitKindIsCountable(ExitKind kind) +{ + switch (kind) { + case ExitKindUnset: + RELEASE_ASSERT_NOT_REACHED(); + case BadType: + case Uncountable: + case UncountableWatchpoint: + case LoadFromHole: // Already counted directly by the baseline JIT. + case StoreToHole: // Already counted directly by the baseline JIT. + case OutOfBounds: // Already counted directly by the baseline JIT. + case StoreToHoleOrOutOfBounds: // Already counted directly by the baseline JIT. + return false; + default: + return true; + } +} + +} // namespace JSC + +namespace WTF { + +void printInternal(PrintStream& out, JSC::ExitKind kind) +{ + out.print(exitKindToString(kind)); +} + +} // namespace WTF + diff --git a/Source/JavaScriptCore/bytecode/ExitKind.h b/Source/JavaScriptCore/bytecode/ExitKind.h new file mode 100644 index 000000000..af918ace3 --- /dev/null +++ b/Source/JavaScriptCore/bytecode/ExitKind.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ExitKind_h +#define ExitKind_h + +namespace JSC { + +enum ExitKind { + ExitKindUnset, + BadType, // We exited because a type prediction was wrong. + BadFunction, // We exited because we made an incorrect assumption about what function we would see. + BadExecutable, // We exited because we made an incorrect assumption about what executable we would see. + BadCache, // We exited because an inline cache was wrong. + BadWeakConstantCache, // We exited because a cache on a weak constant (usually a prototype) was wrong. + BadIndexingType, // We exited because an indexing type was wrong. + Overflow, // We exited because of overflow. + NegativeZero, // We exited because we encountered negative zero. + StoreToHole, // We had a store to a hole. + LoadFromHole, // We had a load from a hole. + OutOfBounds, // We had an out-of-bounds access to an array. + StoreToHoleOrOutOfBounds, // We're simultaneously speculating that we're in bounds and not accessing a hole, and one of those things didn't pan out. + InadequateCoverage, // We exited because we ended up in code that didn't have profiling coverage. + ArgumentsEscaped, // We exited because arguments escaped but we didn't expect them to. + NotStringObject, // We exited because we shouldn't have attempted to optimize string object access. + Uncountable, // We exited for none of the above reasons, and we should not count it. Most uses of this should be viewed as a FIXME. + UncountableWatchpoint, // We exited because of a watchpoint, which isn't counted because watchpoints do tracking themselves. + WatchdogTimerFired // We exited because we need to service the watchdog timer. +}; + +const char* exitKindToString(ExitKind); +bool exitKindIsCountable(ExitKind); + +} // namespace JSC + +namespace WTF { + +class PrintStream; +void printInternal(PrintStream&, JSC::ExitKind); + +} // namespace WTF + +#endif // ExitKind_h + diff --git a/Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h b/Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h index f4949a686..855738aec 100644 --- a/Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h +++ b/Source/JavaScriptCore/bytecode/ExpressionRangeInfo.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Apple Inc. All rights reserved. + * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,14 +31,79 @@ namespace JSC { struct ExpressionRangeInfo { + // Line and column values are encoded in 1 of 3 modes depending on the size + // of their values. These modes are: + // + // 1. FatLine: 22-bit line, 8-bit column. + // 2. FatColumn: 8-bit line, 22-bit column. + // 3. FatLineAndColumn: 32-bit line, 32-bit column. + // + // For the first 2 modes, the line and column will be encoded in the 30-bit + // position field in the ExpressionRangeInfo. For the FatLineAndColumn mode, + // the position field will hold an index into a FatPosition vector which + // holds the FatPosition records with the full 32-bit line and column values. + + enum { + FatLineMode, + FatColumnMode, + FatLineAndColumnMode + }; + + struct FatPosition { + uint32_t line; + uint32_t column; + }; + + enum { + FatLineModeLineShift = 8, + FatLineModeLineMask = (1 << 22) - 1, + FatLineModeColumnMask = (1 << 8) - 1, + FatColumnModeLineShift = 22, + FatColumnModeLineMask = (1 << 8) - 1, + FatColumnModeColumnMask = (1 << 22) - 1 + }; + enum { MaxOffset = (1 << 7) - 1, - MaxDivot = (1 << 25) - 1 + MaxDivot = (1 << 25) - 1, + MaxFatLineModeLine = (1 << 22) - 1, + MaxFatLineModeColumn = (1 << 8) - 1, + MaxFatColumnModeLine = (1 << 8) - 1, + MaxFatColumnModeColumn = (1 << 22) - 1 }; + + void encodeFatLineMode(unsigned line, unsigned column) + { + ASSERT(line <= MaxFatLineModeLine); + ASSERT(column <= MaxFatLineModeColumn); + position = ((line & FatLineModeLineMask) << FatLineModeLineShift | (column & FatLineModeColumnMask)); + } + + void encodeFatColumnMode(unsigned line, unsigned column) + { + ASSERT(line <= MaxFatColumnModeLine); + ASSERT(column <= MaxFatColumnModeColumn); + position = ((line & FatColumnModeLineMask) << FatColumnModeLineShift | (column & FatColumnModeColumnMask)); + } + + void decodeFatLineMode(unsigned& line, unsigned& column) + { + line = (position >> FatLineModeLineShift) & FatLineModeLineMask; + column = position & FatLineModeColumnMask; + } + + void decodeFatColumnMode(unsigned& line, unsigned& column) + { + line = (position >> FatColumnModeLineShift) & FatColumnModeLineMask; + column = position & FatColumnModeColumnMask; + } + uint32_t instructionOffset : 25; - uint32_t divotPoint : 25; uint32_t startOffset : 7; + uint32_t divotPoint : 25; uint32_t endOffset : 7; + uint32_t mode : 2; + uint32_t position : 30; }; } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp b/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp index d17c17325..db4aa9b99 100644 --- a/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp +++ b/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp @@ -30,6 +30,7 @@ #include "JSScope.h" #include "LLIntData.h" #include "LowLevelInterpreter.h" +#include "Operations.h" namespace JSC { @@ -51,7 +52,7 @@ GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned unsigned attributesIgnored; JSCell* specificValue; PropertyOffset offset = structure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; if (!isValidOffset(offset)) @@ -92,7 +93,7 @@ void GetByIdStatus::computeForChain(GetByIdStatus& result, CodeBlock* profiledBl JSCell* specificValue; result.m_offset = currentStructure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (currentStructure->isDictionary()) specificValue = 0; if (!isValidOffset(result.m_offset)) @@ -124,6 +125,9 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec if (!stubInfo.seen) return computeFromLLInt(profiledBlock, bytecodeIndex, ident); + if (stubInfo.resetByGC) + return GetByIdStatus(TakesSlowPath, true); + PolymorphicAccessStructureList* list; int listSize; switch (stubInfo.accessType) { @@ -161,7 +165,7 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec unsigned attributesIgnored; JSCell* specificValue; result.m_offset = structure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; @@ -186,7 +190,7 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec unsigned attributesIgnored; JSCell* specificValue; PropertyOffset myOffset = structure->get( - *profiledBlock->globalData(), ident, attributesIgnored, specificValue); + *profiledBlock->vm(), ident, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; @@ -252,7 +256,7 @@ GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec #endif // ENABLE(JIT) } -GetByIdStatus GetByIdStatus::computeFor(JSGlobalData& globalData, Structure* structure, Identifier& ident) +GetByIdStatus GetByIdStatus::computeFor(VM& vm, Structure* structure, Identifier& ident) { // For now we only handle the super simple self access case. We could handle the // prototype case in the future. @@ -267,10 +271,10 @@ GetByIdStatus GetByIdStatus::computeFor(JSGlobalData& globalData, Structure* str return GetByIdStatus(TakesSlowPath); GetByIdStatus result; - result.m_wasSeenInJIT = false; // To my knowledge nobody that uses computeFor(JSGlobalData&, Structure*, Identifier&) reads this field, but I might as well be honest: no, it wasn't seen in the JIT, since I computed it statically. + result.m_wasSeenInJIT = false; // To my knowledge nobody that uses computeFor(VM&, Structure*, Identifier&) reads this field, but I might as well be honest: no, it wasn't seen in the JIT, since I computed it statically. unsigned attributes; JSCell* specificValue; - result.m_offset = structure->get(globalData, ident, attributes, specificValue); + result.m_offset = structure->get(vm, ident, attributes, specificValue); if (!isValidOffset(result.m_offset)) return GetByIdStatus(TakesSlowPath); // It's probably a prototype lookup. Give up on life for now, even though we could totally be way smarter about it. if (attributes & Accessor) diff --git a/Source/JavaScriptCore/bytecode/GetByIdStatus.h b/Source/JavaScriptCore/bytecode/GetByIdStatus.h index 45d8c0b1f..117766646 100644 --- a/Source/JavaScriptCore/bytecode/GetByIdStatus.h +++ b/Source/JavaScriptCore/bytecode/GetByIdStatus.h @@ -72,7 +72,7 @@ public: } static GetByIdStatus computeFor(CodeBlock*, unsigned bytecodeIndex, Identifier&); - static GetByIdStatus computeFor(JSGlobalData&, Structure*, Identifier&); + static GetByIdStatus computeFor(VM&, Structure*, Identifier&); State state() const { return m_state; } diff --git a/Source/JavaScriptCore/bytecode/Instruction.h b/Source/JavaScriptCore/bytecode/Instruction.h index 50b80e03c..988b1ddf1 100644 --- a/Source/JavaScriptCore/bytecode/Instruction.h +++ b/Source/JavaScriptCore/bytecode/Instruction.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,206 +29,108 @@ #ifndef Instruction_h #define Instruction_h -#include "JITStubRoutine.h" #include "MacroAssembler.h" #include "Opcode.h" #include "PropertySlot.h" +#include "ResolveOperation.h" #include "SpecialPointer.h" #include "Structure.h" #include "StructureChain.h" #include -#define POLYMORPHIC_LIST_CACHE_SIZE 8 - namespace JSC { - // *Sigh*, If the JIT is enabled we need to track the stubRountine (of type CodeLocationLabel), - // If the JIT is not in use we don't actually need the variable (that said, if the JIT is not in use we don't - // curently actually use PolymorphicAccessStructureLists, which we should). Anyway, this seems like the best - // solution for now - will need to something smarter if/when we actually want mixed-mode operation. - - class ArrayAllocationProfile; - class ArrayProfile; - class JSCell; - class Structure; - class StructureChain; - struct LLIntCallLinkInfo; - struct ValueProfile; - -#if ENABLE(JIT) - // Structure used by op_get_by_id_self_list and op_get_by_id_proto_list instruction to hold data off the main opcode stream. - struct PolymorphicAccessStructureList { - WTF_MAKE_FAST_ALLOCATED; - public: - struct PolymorphicStubInfo { - bool isChain; - bool isDirect; - RefPtr stubRoutine; - WriteBarrier base; - union { - WriteBarrierBase proto; - WriteBarrierBase chain; - } u; - - PolymorphicStubInfo() - { - u.proto.clear(); - } - - void set(JSGlobalData& globalData, JSCell* owner, PassRefPtr _stubRoutine, Structure* _base, bool isDirect) - { - stubRoutine = _stubRoutine; - base.set(globalData, owner, _base); - u.proto.clear(); - isChain = false; - this->isDirect = isDirect; - } - - void set(JSGlobalData& globalData, JSCell* owner, PassRefPtr _stubRoutine, Structure* _base, Structure* _proto, bool isDirect) - { - stubRoutine = _stubRoutine; - base.set(globalData, owner, _base); - u.proto.set(globalData, owner, _proto); - isChain = false; - this->isDirect = isDirect; - } - - void set(JSGlobalData& globalData, JSCell* owner, PassRefPtr _stubRoutine, Structure* _base, StructureChain* _chain, bool isDirect) - { - stubRoutine = _stubRoutine; - base.set(globalData, owner, _base); - u.chain.set(globalData, owner, _chain); - isChain = true; - this->isDirect = isDirect; - } - } list[POLYMORPHIC_LIST_CACHE_SIZE]; +class ArrayAllocationProfile; +class ArrayProfile; +class ObjectAllocationProfile; +struct LLIntCallLinkInfo; +struct ValueProfile; + +struct Instruction { + Instruction() + { + u.jsCell.clear(); + } - PolymorphicAccessStructureList() - { - } - - PolymorphicAccessStructureList(JSGlobalData& globalData, JSCell* owner, PassRefPtr stubRoutine, Structure* firstBase, bool isDirect) - { - list[0].set(globalData, owner, stubRoutine, firstBase, isDirect); - } - - PolymorphicAccessStructureList(JSGlobalData& globalData, JSCell* owner, PassRefPtr stubRoutine, Structure* firstBase, Structure* firstProto, bool isDirect) - { - list[0].set(globalData, owner, stubRoutine, firstBase, firstProto, isDirect); - } - - PolymorphicAccessStructureList(JSGlobalData& globalData, JSCell* owner, PassRefPtr stubRoutine, Structure* firstBase, StructureChain* firstChain, bool isDirect) - { - list[0].set(globalData, owner, stubRoutine, firstBase, firstChain, isDirect); - } - - bool visitWeak(int count) - { - for (int i = 0; i < count; ++i) { - PolymorphicStubInfo& info = list[i]; - if (!info.base) { - // We're being marked during initialisation of an entry - ASSERT(!info.u.proto); - continue; - } - - if (!Heap::isMarked(info.base.get())) - return false; - if (info.u.proto && !info.isChain - && !Heap::isMarked(info.u.proto.get())) - return false; - if (info.u.chain && info.isChain - && !Heap::isMarked(info.u.chain.get())) - return false; - } - - return true; - } - }; - -#endif - - struct Instruction { - Instruction() - { - u.jsCell.clear(); - } - - Instruction(Opcode opcode) - { + Instruction(Opcode opcode) + { #if !ENABLE(COMPUTED_GOTO_OPCODES) - // We have to initialize one of the pointer members to ensure that - // the entire struct is initialized, when opcode is not a pointer. - u.jsCell.clear(); + // We have to initialize one of the pointer members to ensure that + // the entire struct is initialized, when opcode is not a pointer. + u.jsCell.clear(); #endif - u.opcode = opcode; - } - - Instruction(int operand) - { - // We have to initialize one of the pointer members to ensure that - // the entire struct is initialized in 64-bit. - u.jsCell.clear(); - u.operand = operand; - } - - Instruction(JSGlobalData& globalData, JSCell* owner, Structure* structure) - { - u.structure.clear(); - u.structure.set(globalData, owner, structure); - } - Instruction(JSGlobalData& globalData, JSCell* owner, StructureChain* structureChain) - { - u.structureChain.clear(); - u.structureChain.set(globalData, owner, structureChain); - } - Instruction(JSGlobalData& globalData, JSCell* owner, JSCell* jsCell) - { - u.jsCell.clear(); - u.jsCell.set(globalData, owner, jsCell); - } - - Instruction(PropertySlot::GetValueFunc getterFunc) { u.getterFunc = getterFunc; } + u.opcode = opcode; + } + + Instruction(int operand) + { + // We have to initialize one of the pointer members to ensure that + // the entire struct is initialized in 64-bit. + u.jsCell.clear(); + u.operand = operand; + } + + Instruction(VM& vm, JSCell* owner, Structure* structure) + { + u.structure.clear(); + u.structure.set(vm, owner, structure); + } + Instruction(VM& vm, JSCell* owner, StructureChain* structureChain) + { + u.structureChain.clear(); + u.structureChain.set(vm, owner, structureChain); + } + Instruction(VM& vm, JSCell* owner, JSCell* jsCell) + { + u.jsCell.clear(); + u.jsCell.set(vm, owner, jsCell); + } + + Instruction(PropertySlot::GetValueFunc getterFunc) { u.getterFunc = getterFunc; } - Instruction(LLIntCallLinkInfo* callLinkInfo) { u.callLinkInfo = callLinkInfo; } + Instruction(LLIntCallLinkInfo* callLinkInfo) { u.callLinkInfo = callLinkInfo; } - Instruction(ValueProfile* profile) { u.profile = profile; } - Instruction(ArrayProfile* profile) { u.arrayProfile = profile; } - Instruction(ArrayAllocationProfile* profile) { u.arrayAllocationProfile = profile; } + Instruction(ValueProfile* profile) { u.profile = profile; } + Instruction(ArrayProfile* profile) { u.arrayProfile = profile; } + Instruction(ArrayAllocationProfile* profile) { u.arrayAllocationProfile = profile; } + Instruction(ObjectAllocationProfile* profile) { u.objectAllocationProfile = profile; } - Instruction(WriteBarrier* registerPointer) { u.registerPointer = registerPointer; } + Instruction(WriteBarrier* registerPointer) { u.registerPointer = registerPointer; } - Instruction(Special::Pointer pointer) { u.specialPointer = pointer; } + Instruction(Special::Pointer pointer) { u.specialPointer = pointer; } - Instruction(bool* predicatePointer) { u.predicatePointer = predicatePointer; } - - union { - Opcode opcode; - int operand; - WriteBarrierBase structure; - WriteBarrierBase structureChain; - WriteBarrierBase jsCell; - WriteBarrier* registerPointer; - Special::Pointer specialPointer; - PropertySlot::GetValueFunc getterFunc; - LLIntCallLinkInfo* callLinkInfo; - ValueProfile* profile; - ArrayProfile* arrayProfile; - ArrayAllocationProfile* arrayAllocationProfile; - void* pointer; - bool* predicatePointer; - } u; + Instruction(bool* predicatePointer) { u.predicatePointer = predicatePointer; } + + union { + Opcode opcode; + int operand; + WriteBarrierBase structure; + WriteBarrierBase structureChain; + WriteBarrierBase jsCell; + WriteBarrier* registerPointer; + Special::Pointer specialPointer; + PropertySlot::GetValueFunc getterFunc; + LLIntCallLinkInfo* callLinkInfo; + ValueProfile* profile; + ArrayProfile* arrayProfile; + ArrayAllocationProfile* arrayAllocationProfile; + ObjectAllocationProfile* objectAllocationProfile; + void* pointer; + bool* predicatePointer; + ResolveOperations* resolveOperations; + PutToBaseOperation* putToBaseOperation; + } u; - private: - Instruction(StructureChain*); - Instruction(Structure*); - }; +private: + Instruction(StructureChain*); + Instruction(Structure*); +}; } // namespace JSC namespace WTF { - template<> struct VectorTraits : VectorTraitsBase { }; +template<> struct VectorTraits : VectorTraitsBase { }; } // namespace WTF diff --git a/Source/JavaScriptCore/bytecode/LazyOperandValueProfile.cpp b/Source/JavaScriptCore/bytecode/LazyOperandValueProfile.cpp index f923e4a28..97b8f3bcd 100644 --- a/Source/JavaScriptCore/bytecode/LazyOperandValueProfile.cpp +++ b/Source/JavaScriptCore/bytecode/LazyOperandValueProfile.cpp @@ -28,6 +28,8 @@ #if ENABLE(VALUE_PROFILER) +#include "Operations.h" + namespace JSC { CompressedLazyOperandValueProfileHolder::CompressedLazyOperandValueProfileHolder() { } diff --git a/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp b/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp index 857ed9c87..a0f301a0c 100644 --- a/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp +++ b/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp @@ -58,7 +58,7 @@ EncodedJSValue* MethodOfGettingAValueProfile::getSpecFailBucket(unsigned index) u.lazyOperand.bytecodeOffset, u.lazyOperand.operand))->specFailBucket(index); default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return 0; } } diff --git a/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h b/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h index 0f5c2be7b..c6fe6c5f0 100644 --- a/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h +++ b/Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h @@ -34,7 +34,7 @@ // these #if's will disappear... #if ENABLE(DFG_JIT) -#include "JSValue.h" +#include "JSCJSValue.h" namespace JSC { diff --git a/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h b/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h new file mode 100644 index 000000000..9a9db0bc7 --- /dev/null +++ b/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ObjectAllocationProfile_h +#define ObjectAllocationProfile_h + +#include "VM.h" +#include "JSGlobalObject.h" +#include "ObjectPrototype.h" +#include "SlotVisitor.h" +#include "WriteBarrier.h" + +namespace JSC { + +class ObjectAllocationProfile { + friend class LLIntOffsetsExtractor; +public: + static ptrdiff_t offsetOfAllocator() { return OBJECT_OFFSETOF(ObjectAllocationProfile, m_allocator); } + static ptrdiff_t offsetOfStructure() { return OBJECT_OFFSETOF(ObjectAllocationProfile, m_structure); } + + ObjectAllocationProfile() + : m_allocator(0) + { + } + + bool isNull() { return !m_allocator; } + + void initialize(VM& vm, JSCell* owner, JSObject* prototype, unsigned inferredInlineCapacity) + { + ASSERT(!m_allocator); + ASSERT(!m_structure); + + unsigned inlineCapacity = 0; + if (inferredInlineCapacity < JSFinalObject::defaultInlineCapacity()) { + // Try to shrink the object based on static analysis. + inferredInlineCapacity += possibleDefaultPropertyCount(vm, prototype); + + if (!inferredInlineCapacity) { + // Empty objects are rare, so most likely the static analyzer just didn't + // see the real initializer function. This can happen with helper functions. + inferredInlineCapacity = JSFinalObject::defaultInlineCapacity(); + } else if (inferredInlineCapacity > JSFinalObject::defaultInlineCapacity()) { + // Default properties are weak guesses, so don't allow them to turn a small + // object into a large object. + inferredInlineCapacity = JSFinalObject::defaultInlineCapacity(); + } + + inlineCapacity = inferredInlineCapacity; + ASSERT(inlineCapacity < JSFinalObject::maxInlineCapacity()); + } else { + // Normal or large object. + inlineCapacity = inferredInlineCapacity; + if (inlineCapacity > JSFinalObject::maxInlineCapacity()) + inlineCapacity = JSFinalObject::maxInlineCapacity(); + } + + ASSERT(inlineCapacity > 0); + ASSERT(inlineCapacity <= JSFinalObject::maxInlineCapacity()); + + size_t allocationSize = JSFinalObject::allocationSize(inlineCapacity); + MarkedAllocator* allocator = &vm.heap.allocatorForObjectWithoutDestructor(allocationSize); + ASSERT(allocator->cellSize()); + + // Take advantage of extra inline capacity available in the size class. + size_t slop = (allocator->cellSize() - allocationSize) / sizeof(WriteBarrier); + inlineCapacity += slop; + if (inlineCapacity > JSFinalObject::maxInlineCapacity()) + inlineCapacity = JSFinalObject::maxInlineCapacity(); + + m_allocator = allocator; + m_structure.set(vm, owner, + vm.prototypeMap.emptyObjectStructureForPrototype(prototype, inlineCapacity)); + } + + Structure* structure() { return m_structure.get(); } + unsigned inlineCapacity() { return m_structure->inlineCapacity(); } + + void clear() + { + m_allocator = 0; + m_structure.clear(); + ASSERT(isNull()); + } + + void visitAggregate(SlotVisitor& visitor) + { + visitor.append(&m_structure); + } + +private: + + unsigned possibleDefaultPropertyCount(VM& vm, JSObject* prototype) + { + if (prototype == prototype->globalObject()->objectPrototype()) + return 0; + + size_t count = 0; + PropertyNameArray propertyNameArray(&vm); + prototype->structure()->getPropertyNamesFromStructure(vm, propertyNameArray, ExcludeDontEnumProperties); + PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArray.data()->propertyNameVector(); + for (size_t i = 0; i < propertyNameVector.size(); ++i) { + JSValue value = prototype->getDirect(vm, propertyNameVector[i]); + + // Functions are common, and are usually class-level objects that are not overridden. + if (jsDynamicCast(value)) + continue; + + ++count; + + } + return count; + } + + MarkedAllocator* m_allocator; // Precomputed to make things easier for generated code. + WriteBarrier m_structure; +}; + +} // namespace JSC + +#endif // ObjectAllocationProfile_h diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h index 5fe28bc09..72ac51b4f 100644 --- a/Source/JavaScriptCore/bytecode/Opcode.h +++ b/Source/JavaScriptCore/bytecode/Opcode.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009, 2013 Apple Inc. All rights reserved. * Copyright (C) 2008 Cameron Zwarich * * Redistribution and use in source and binary forms, with or without @@ -39,260 +39,253 @@ namespace JSC { - #define FOR_EACH_CORE_OPCODE_ID_WITH_EXTENSION(macro, extension__) \ - macro(op_enter, 1) \ - macro(op_create_activation, 2) \ - macro(op_init_lazy_reg, 2) \ - macro(op_create_arguments, 2) \ - macro(op_create_this, 3) \ - macro(op_get_callee, 3) \ - macro(op_convert_this, 3) \ - \ - macro(op_new_object, 2) \ - macro(op_new_array, 5) \ - macro(op_new_array_with_size, 4) \ - macro(op_new_array_buffer, 5) \ - macro(op_new_regexp, 3) \ - macro(op_mov, 3) \ - \ - macro(op_not, 3) \ - macro(op_eq, 4) \ - macro(op_eq_null, 3) \ - macro(op_neq, 4) \ - macro(op_neq_null, 3) \ - macro(op_stricteq, 4) \ - macro(op_nstricteq, 4) \ - macro(op_less, 4) \ - macro(op_lesseq, 4) \ - macro(op_greater, 4) \ - macro(op_greatereq, 4) \ - \ - macro(op_pre_inc, 2) \ - macro(op_pre_dec, 2) \ - macro(op_post_inc, 3) \ - macro(op_post_dec, 3) \ - macro(op_to_jsnumber, 3) \ - macro(op_negate, 3) \ - macro(op_add, 5) \ - macro(op_mul, 5) \ - macro(op_div, 5) \ - macro(op_mod, 4) \ - macro(op_sub, 5) \ - \ - macro(op_lshift, 4) \ - macro(op_rshift, 4) \ - macro(op_urshift, 4) \ - macro(op_bitand, 5) \ - macro(op_bitxor, 5) \ - macro(op_bitor, 5) \ - \ - macro(op_check_has_instance, 5) \ - macro(op_instanceof, 4) \ - macro(op_typeof, 3) \ - macro(op_is_undefined, 3) \ - macro(op_is_boolean, 3) \ - macro(op_is_number, 3) \ - macro(op_is_string, 3) \ - macro(op_is_object, 3) \ - macro(op_is_function, 3) \ - macro(op_in, 4) \ - \ - macro(op_resolve, 5) /* has value profiling */ \ - macro(op_resolve_global_property, 5) /* has value profiling */ \ - macro(op_resolve_global_var, 5) /* has value profiling */ \ - macro(op_resolve_scoped_var, 5) /* has value profiling */ \ - macro(op_resolve_scoped_var_on_top_scope, 5) /* has value profiling */ \ - macro(op_resolve_scoped_var_with_top_scope_check, 5) /* has value profiling */ \ - \ - macro(op_resolve_base_to_global, 7) /* has value profiling */ \ - macro(op_resolve_base_to_global_dynamic, 7) /* has value profiling */ \ - macro(op_resolve_base_to_scope, 7) /* has value profiling */ \ - macro(op_resolve_base_to_scope_with_top_scope_check, 7) /* has value profiling */ \ - macro(op_resolve_base, 7) /* has value profiling */ \ - \ - macro(op_ensure_property_exists, 3) \ - \ - macro(op_resolve_with_base, 7) /* has value profiling */ \ - \ - macro(op_resolve_with_this, 6) /* has value profiling */ \ - \ - macro(op_put_to_base, 5) \ - macro(op_put_to_base_variable, 5) \ - \ - macro(op_init_global_const_nop, 5) \ - macro(op_init_global_const, 5) \ - macro(op_init_global_const_check, 5) \ - macro(op_get_by_id, 9) /* has value profiling */ \ - macro(op_get_by_id_out_of_line, 9) /* has value profiling */ \ - macro(op_get_by_id_self, 9) /* has value profiling */ \ - macro(op_get_by_id_proto, 9) /* has value profiling */ \ - macro(op_get_by_id_chain, 9) /* has value profiling */ \ - macro(op_get_by_id_getter_self, 9) /* has value profiling */ \ - macro(op_get_by_id_getter_proto, 9) /* has value profiling */ \ - macro(op_get_by_id_getter_chain, 9) /* has value profiling */ \ - macro(op_get_by_id_custom_self, 9) /* has value profiling */ \ - macro(op_get_by_id_custom_proto, 9) /* has value profiling */ \ - macro(op_get_by_id_custom_chain, 9) /* has value profiling */ \ - macro(op_get_by_id_generic, 9) /* has value profiling */ \ - macro(op_get_array_length, 9) /* has value profiling */ \ - macro(op_get_string_length, 9) /* has value profiling */ \ - macro(op_get_arguments_length, 4) \ - macro(op_put_by_id, 9) \ - macro(op_put_by_id_out_of_line, 9) \ - macro(op_put_by_id_transition, 9) \ - macro(op_put_by_id_transition_direct, 9) \ - macro(op_put_by_id_transition_direct_out_of_line, 9) \ - macro(op_put_by_id_transition_normal, 9) \ - macro(op_put_by_id_transition_normal_out_of_line, 9) \ - macro(op_put_by_id_replace, 9) \ - macro(op_put_by_id_generic, 9) \ - macro(op_del_by_id, 4) \ - macro(op_get_by_val, 6) /* has value profiling */ \ - macro(op_get_argument_by_val, 6) /* must be the same size as op_get_by_val */ \ - macro(op_get_by_pname, 7) \ - macro(op_put_by_val, 5) \ - macro(op_del_by_val, 4) \ - macro(op_put_by_index, 4) \ - macro(op_put_getter_setter, 5) \ - \ - macro(op_jmp, 2) \ - macro(op_jtrue, 3) \ - macro(op_jfalse, 3) \ - macro(op_jeq_null, 3) \ - macro(op_jneq_null, 3) \ - macro(op_jneq_ptr, 4) \ - macro(op_jless, 4) \ - macro(op_jlesseq, 4) \ - macro(op_jgreater, 4) \ - macro(op_jgreatereq, 4) \ - macro(op_jnless, 4) \ - macro(op_jnlesseq, 4) \ - macro(op_jngreater, 4) \ - macro(op_jngreatereq, 4) \ - macro(op_jmp_scopes, 3) \ - macro(op_loop, 2) \ - macro(op_loop_if_true, 3) \ - macro(op_loop_if_false, 3) \ - macro(op_loop_if_less, 4) \ - macro(op_loop_if_lesseq, 4) \ - macro(op_loop_if_greater, 4) \ - macro(op_loop_if_greatereq, 4) \ - macro(op_loop_hint, 1) \ - macro(op_switch_imm, 4) \ - macro(op_switch_char, 4) \ - macro(op_switch_string, 4) \ - \ - macro(op_new_func, 4) \ - macro(op_new_func_exp, 3) \ - macro(op_call, 6) \ - macro(op_call_eval, 6) \ - macro(op_call_varargs, 5) \ - macro(op_tear_off_activation, 2) \ - macro(op_tear_off_arguments, 3) \ - macro(op_ret, 2) \ - macro(op_call_put_result, 3) /* has value profiling */ \ - macro(op_ret_object_or_this, 3) \ - \ - macro(op_construct, 6) \ - macro(op_strcat, 4) \ - macro(op_to_primitive, 3) \ - \ - macro(op_get_pnames, 6) \ - macro(op_next_pname, 7) \ - \ - macro(op_push_with_scope, 2) \ - macro(op_pop_scope, 1) \ - macro(op_push_name_scope, 4) \ - \ - macro(op_catch, 2) \ - macro(op_throw, 2) \ - macro(op_throw_static_error, 3) \ - \ - macro(op_debug, 5) \ - macro(op_profile_will_call, 2) \ - macro(op_profile_did_call, 2) \ - \ - extension__ \ - \ - macro(op_end, 2) // end must be the last opcode in the list +#define FOR_EACH_CORE_OPCODE_ID_WITH_EXTENSION(macro, extension__) \ + macro(op_enter, 1) \ + macro(op_create_activation, 2) \ + macro(op_init_lazy_reg, 2) \ + macro(op_create_arguments, 2) \ + macro(op_create_this, 4) \ + macro(op_get_callee, 3) \ + macro(op_convert_this, 3) \ + \ + macro(op_new_object, 4) \ + macro(op_new_array, 5) \ + macro(op_new_array_with_size, 4) \ + macro(op_new_array_buffer, 5) \ + macro(op_new_regexp, 3) \ + macro(op_mov, 3) \ + \ + macro(op_not, 3) \ + macro(op_eq, 4) \ + macro(op_eq_null, 3) \ + macro(op_neq, 4) \ + macro(op_neq_null, 3) \ + macro(op_stricteq, 4) \ + macro(op_nstricteq, 4) \ + macro(op_less, 4) \ + macro(op_lesseq, 4) \ + macro(op_greater, 4) \ + macro(op_greatereq, 4) \ + \ + macro(op_inc, 2) \ + macro(op_dec, 2) \ + macro(op_to_number, 3) \ + macro(op_negate, 3) \ + macro(op_add, 5) \ + macro(op_mul, 5) \ + macro(op_div, 5) \ + macro(op_mod, 4) \ + macro(op_sub, 5) \ + \ + macro(op_lshift, 4) \ + macro(op_rshift, 4) \ + macro(op_urshift, 4) \ + macro(op_bitand, 5) \ + macro(op_bitxor, 5) \ + macro(op_bitor, 5) \ + \ + macro(op_check_has_instance, 5) \ + macro(op_instanceof, 4) \ + macro(op_typeof, 3) \ + macro(op_is_undefined, 3) \ + macro(op_is_boolean, 3) \ + macro(op_is_number, 3) \ + macro(op_is_string, 3) \ + macro(op_is_object, 3) \ + macro(op_is_function, 3) \ + macro(op_in, 4) \ + \ + macro(op_get_scoped_var, 5) /* has value profiling */ \ + macro(op_put_scoped_var, 4) \ + \ + macro(op_resolve, 5) /* has value profiling */ \ + macro(op_resolve_global_property, 5) /* has value profiling */ \ + macro(op_resolve_global_var, 5) /* has value profiling */ \ + macro(op_resolve_scoped_var, 5) /* has value profiling */ \ + macro(op_resolve_scoped_var_on_top_scope, 5) /* has value profiling */ \ + macro(op_resolve_scoped_var_with_top_scope_check, 5) /* has value profiling */ \ + \ + macro(op_resolve_base_to_global, 7) /* has value profiling */ \ + macro(op_resolve_base_to_global_dynamic, 7) /* has value profiling */ \ + macro(op_resolve_base_to_scope, 7) /* has value profiling */ \ + macro(op_resolve_base_to_scope_with_top_scope_check, 7) /* has value profiling */ \ + macro(op_resolve_base, 7) /* has value profiling */ \ + \ + macro(op_resolve_with_base, 7) /* has value profiling */ \ + \ + macro(op_resolve_with_this, 6) /* has value profiling */ \ + \ + macro(op_put_to_base, 5) \ + macro(op_put_to_base_variable, 5) \ + \ + macro(op_init_global_const_nop, 5) \ + macro(op_init_global_const, 5) \ + macro(op_init_global_const_check, 5) \ + macro(op_get_by_id, 9) /* has value profiling */ \ + macro(op_get_by_id_out_of_line, 9) /* has value profiling */ \ + macro(op_get_by_id_self, 9) /* has value profiling */ \ + macro(op_get_by_id_proto, 9) /* has value profiling */ \ + macro(op_get_by_id_chain, 9) /* has value profiling */ \ + macro(op_get_by_id_getter_self, 9) /* has value profiling */ \ + macro(op_get_by_id_getter_proto, 9) /* has value profiling */ \ + macro(op_get_by_id_getter_chain, 9) /* has value profiling */ \ + macro(op_get_by_id_custom_self, 9) /* has value profiling */ \ + macro(op_get_by_id_custom_proto, 9) /* has value profiling */ \ + macro(op_get_by_id_custom_chain, 9) /* has value profiling */ \ + macro(op_get_by_id_generic, 9) /* has value profiling */ \ + macro(op_get_array_length, 9) /* has value profiling */ \ + macro(op_get_string_length, 9) /* has value profiling */ \ + macro(op_get_arguments_length, 4) \ + macro(op_put_by_id, 9) \ + macro(op_put_by_id_out_of_line, 9) \ + macro(op_put_by_id_transition, 9) \ + macro(op_put_by_id_transition_direct, 9) \ + macro(op_put_by_id_transition_direct_out_of_line, 9) \ + macro(op_put_by_id_transition_normal, 9) \ + macro(op_put_by_id_transition_normal_out_of_line, 9) \ + macro(op_put_by_id_replace, 9) \ + macro(op_put_by_id_generic, 9) \ + macro(op_del_by_id, 4) \ + macro(op_get_by_val, 6) /* has value profiling */ \ + macro(op_get_argument_by_val, 6) /* must be the same size as op_get_by_val */ \ + macro(op_get_by_pname, 7) \ + macro(op_put_by_val, 5) \ + macro(op_del_by_val, 4) \ + macro(op_put_by_index, 4) \ + macro(op_put_getter_setter, 5) \ + \ + macro(op_jmp, 2) \ + macro(op_jtrue, 3) \ + macro(op_jfalse, 3) \ + macro(op_jeq_null, 3) \ + macro(op_jneq_null, 3) \ + macro(op_jneq_ptr, 4) \ + macro(op_jless, 4) \ + macro(op_jlesseq, 4) \ + macro(op_jgreater, 4) \ + macro(op_jgreatereq, 4) \ + macro(op_jnless, 4) \ + macro(op_jnlesseq, 4) \ + macro(op_jngreater, 4) \ + macro(op_jngreatereq, 4) \ + \ + macro(op_loop_hint, 1) \ + \ + macro(op_switch_imm, 4) \ + macro(op_switch_char, 4) \ + macro(op_switch_string, 4) \ + \ + macro(op_new_func, 4) \ + macro(op_new_func_exp, 3) \ + macro(op_call, 6) \ + macro(op_call_eval, 6) \ + macro(op_call_varargs, 5) \ + macro(op_tear_off_activation, 2) \ + macro(op_tear_off_arguments, 3) \ + macro(op_ret, 2) \ + macro(op_call_put_result, 3) /* has value profiling */ \ + macro(op_ret_object_or_this, 3) \ + \ + macro(op_construct, 6) \ + macro(op_strcat, 4) \ + macro(op_to_primitive, 3) \ + \ + macro(op_get_pnames, 6) \ + macro(op_next_pname, 7) \ + \ + macro(op_push_with_scope, 2) \ + macro(op_pop_scope, 1) \ + macro(op_push_name_scope, 4) \ + \ + macro(op_catch, 2) \ + macro(op_throw, 2) \ + macro(op_throw_static_error, 3) \ + \ + macro(op_debug, 5) \ + macro(op_profile_will_call, 2) \ + macro(op_profile_did_call, 2) \ + \ + extension__ \ + \ + macro(op_end, 2) // end must be the last opcode in the list - #define FOR_EACH_CORE_OPCODE_ID(macro) \ - FOR_EACH_CORE_OPCODE_ID_WITH_EXTENSION(macro, /* No extension */ ) +#define FOR_EACH_CORE_OPCODE_ID(macro) \ + FOR_EACH_CORE_OPCODE_ID_WITH_EXTENSION(macro, /* No extension */ ) - #define FOR_EACH_OPCODE_ID(macro) \ - FOR_EACH_CORE_OPCODE_ID_WITH_EXTENSION( \ - macro, \ - FOR_EACH_LLINT_OPCODE_EXTENSION(macro) \ - ) +#define FOR_EACH_OPCODE_ID(macro) \ + FOR_EACH_CORE_OPCODE_ID_WITH_EXTENSION( \ + macro, \ + FOR_EACH_LLINT_OPCODE_EXTENSION(macro) \ + ) - #define OPCODE_ID_ENUM(opcode, length) opcode, - typedef enum { FOR_EACH_OPCODE_ID(OPCODE_ID_ENUM) } OpcodeID; - #undef OPCODE_ID_ENUM +#define OPCODE_ID_ENUM(opcode, length) opcode, + typedef enum { FOR_EACH_OPCODE_ID(OPCODE_ID_ENUM) } OpcodeID; +#undef OPCODE_ID_ENUM - const int maxOpcodeLength = 9; - const int numOpcodeIDs = op_end + 1; +const int maxOpcodeLength = 9; +const int numOpcodeIDs = op_end + 1; - #define OPCODE_ID_LENGTHS(id, length) const int id##_length = length; - FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS); - #undef OPCODE_ID_LENGTHS - - #define OPCODE_LENGTH(opcode) opcode##_length +#define OPCODE_ID_LENGTHS(id, length) const int id##_length = length; + FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS); +#undef OPCODE_ID_LENGTHS + +#define OPCODE_LENGTH(opcode) opcode##_length - #define OPCODE_ID_LENGTH_MAP(opcode, length) length, - const int opcodeLengths[numOpcodeIDs] = { FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTH_MAP) }; - #undef OPCODE_ID_LENGTH_MAP +#define OPCODE_ID_LENGTH_MAP(opcode, length) length, + const int opcodeLengths[numOpcodeIDs] = { FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTH_MAP) }; +#undef OPCODE_ID_LENGTH_MAP - #define VERIFY_OPCODE_ID(id, size) COMPILE_ASSERT(id <= op_end, ASSERT_THAT_JS_OPCODE_IDS_ARE_VALID); - FOR_EACH_OPCODE_ID(VERIFY_OPCODE_ID); - #undef VERIFY_OPCODE_ID +#define VERIFY_OPCODE_ID(id, size) COMPILE_ASSERT(id <= op_end, ASSERT_THAT_JS_OPCODE_IDS_ARE_VALID); + FOR_EACH_OPCODE_ID(VERIFY_OPCODE_ID); +#undef VERIFY_OPCODE_ID #if ENABLE(COMPUTED_GOTO_OPCODES) - typedef void* Opcode; +typedef void* Opcode; #else - typedef OpcodeID Opcode; +typedef OpcodeID Opcode; #endif #define PADDING_STRING " " #define PADDING_STRING_LENGTH static_cast(strlen(PADDING_STRING)) - extern const char* const opcodeNames[]; +extern const char* const opcodeNames[]; - inline const char* padOpcodeName(OpcodeID op, unsigned width) - { - unsigned pad = width - strlen(opcodeNames[op]); - pad = std::min(pad, PADDING_STRING_LENGTH); - return PADDING_STRING + PADDING_STRING_LENGTH - pad; - } +inline const char* padOpcodeName(OpcodeID op, unsigned width) +{ + unsigned pad = width - strlen(opcodeNames[op]); + pad = std::min(pad, PADDING_STRING_LENGTH); + return PADDING_STRING + PADDING_STRING_LENGTH - pad; +} #undef PADDING_STRING_LENGTH #undef PADDING_STRING #if ENABLE(OPCODE_STATS) - struct OpcodeStats { - OpcodeStats(); - ~OpcodeStats(); - static long long opcodeCounts[numOpcodeIDs]; - static long long opcodePairCounts[numOpcodeIDs][numOpcodeIDs]; - static int lastOpcode; - - static void recordInstruction(int opcode); - static void resetLastInstruction(); - }; +struct OpcodeStats { + OpcodeStats(); + ~OpcodeStats(); + static long long opcodeCounts[numOpcodeIDs]; + static long long opcodePairCounts[numOpcodeIDs][numOpcodeIDs]; + static int lastOpcode; + + static void recordInstruction(int opcode); + static void resetLastInstruction(); +}; #endif - inline size_t opcodeLength(OpcodeID opcode) - { - switch (opcode) { +inline size_t opcodeLength(OpcodeID opcode) +{ + switch (opcode) { #define OPCODE_ID_LENGTHS(id, length) case id: return OPCODE_LENGTH(id); - FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS) + FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS) #undef OPCODE_ID_LENGTHS - } - ASSERT_NOT_REACHED(); - return 0; } + RELEASE_ASSERT_NOT_REACHED(); + return 0; +} } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/Operands.h b/Source/JavaScriptCore/bytecode/Operands.h index 20f79ffd1..e7b3e241f 100644 --- a/Source/JavaScriptCore/bytecode/Operands.h +++ b/Source/JavaScriptCore/bytecode/Operands.h @@ -46,6 +46,8 @@ struct OperandValueTraits { static void dump(const T& value, PrintStream& out) { value.dump(out); } }; +enum OperandKind { ArgumentOperand, LocalOperand }; + template > class Operands { public: @@ -66,6 +68,28 @@ public: T& local(size_t idx) { return m_locals[idx]; } const T& local(size_t idx) const { return m_locals[idx]; } + template + size_t sizeFor() const + { + if (operandKind == ArgumentOperand) + return numberOfArguments(); + return numberOfLocals(); + } + template + T& atFor(size_t idx) + { + if (operandKind == ArgumentOperand) + return argument(idx); + return local(idx); + } + template + const T& atFor(size_t idx) const + { + if (operandKind == ArgumentOperand) + return argument(idx); + return local(idx); + } + void ensureLocals(size_t size) { if (size <= m_locals.size()) @@ -192,15 +216,17 @@ private: template void dumpOperands(const Operands& operands, PrintStream& out) { - for (size_t argument = 0; argument < operands.numberOfArguments(); ++argument) { - if (argument) + for (size_t argument = operands.numberOfArguments(); argument--;) { + if (argument != operands.numberOfArguments() - 1) out.printf(" "); + out.print("arg", argument, ":"); Traits::dump(operands.argument(argument), out); } out.printf(" : "); for (size_t local = 0; local < operands.numberOfLocals(); ++local) { if (local) out.printf(" "); + out.print("r", local, ":"); Traits::dump(operands.local(local), out); } } diff --git a/Source/JavaScriptCore/bytecode/PolymorphicAccessStructureList.h b/Source/JavaScriptCore/bytecode/PolymorphicAccessStructureList.h new file mode 100644 index 000000000..d1da89d77 --- /dev/null +++ b/Source/JavaScriptCore/bytecode/PolymorphicAccessStructureList.h @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef PolymorphicAccessStructureList_h +#define PolymorphicAccessStructureList_h + +#include "JITStubRoutine.h" +#include "Structure.h" +#include "StructureChain.h" +#include + +#define POLYMORPHIC_LIST_CACHE_SIZE 8 + +namespace JSC { + +// *Sigh*, If the JIT is enabled we need to track the stubRountine (of type CodeLocationLabel), +// If the JIT is not in use we don't actually need the variable (that said, if the JIT is not in use we don't +// curently actually use PolymorphicAccessStructureLists, which we should). Anyway, this seems like the best +// solution for now - will need to something smarter if/when we actually want mixed-mode operation. + +#if ENABLE(JIT) +// Structure used by op_get_by_id_self_list and op_get_by_id_proto_list instruction to hold data off the main opcode stream. +struct PolymorphicAccessStructureList { + WTF_MAKE_FAST_ALLOCATED; +public: + struct PolymorphicStubInfo { + bool isChain; + bool isDirect; + RefPtr stubRoutine; + WriteBarrier base; + union { + WriteBarrierBase proto; + WriteBarrierBase chain; + } u; + + PolymorphicStubInfo() + { + u.proto.clear(); + } + + void set(VM& vm, JSCell* owner, PassRefPtr _stubRoutine, Structure* _base, bool isDirect) + { + stubRoutine = _stubRoutine; + base.set(vm, owner, _base); + u.proto.clear(); + isChain = false; + this->isDirect = isDirect; + } + + void set(VM& vm, JSCell* owner, PassRefPtr _stubRoutine, Structure* _base, Structure* _proto, bool isDirect) + { + stubRoutine = _stubRoutine; + base.set(vm, owner, _base); + u.proto.set(vm, owner, _proto); + isChain = false; + this->isDirect = isDirect; + } + + void set(VM& vm, JSCell* owner, PassRefPtr _stubRoutine, Structure* _base, StructureChain* _chain, bool isDirect) + { + stubRoutine = _stubRoutine; + base.set(vm, owner, _base); + u.chain.set(vm, owner, _chain); + isChain = true; + this->isDirect = isDirect; + } + } list[POLYMORPHIC_LIST_CACHE_SIZE]; + + PolymorphicAccessStructureList() + { + } + + PolymorphicAccessStructureList(VM& vm, JSCell* owner, PassRefPtr stubRoutine, Structure* firstBase, bool isDirect) + { + list[0].set(vm, owner, stubRoutine, firstBase, isDirect); + } + + PolymorphicAccessStructureList(VM& vm, JSCell* owner, PassRefPtr stubRoutine, Structure* firstBase, Structure* firstProto, bool isDirect) + { + list[0].set(vm, owner, stubRoutine, firstBase, firstProto, isDirect); + } + + PolymorphicAccessStructureList(VM& vm, JSCell* owner, PassRefPtr stubRoutine, Structure* firstBase, StructureChain* firstChain, bool isDirect) + { + list[0].set(vm, owner, stubRoutine, firstBase, firstChain, isDirect); + } + + bool visitWeak(int count) + { + for (int i = 0; i < count; ++i) { + PolymorphicStubInfo& info = list[i]; + if (!info.base) { + // We're being marked during initialisation of an entry + ASSERT(!info.u.proto); + continue; + } + + if (!Heap::isMarked(info.base.get())) + return false; + if (info.u.proto && !info.isChain + && !Heap::isMarked(info.u.proto.get())) + return false; + if (info.u.chain && info.isChain + && !Heap::isMarked(info.u.chain.get())) + return false; + } + + return true; + } +}; + +#endif // ENABLE(JIT) + +} // namespace JSC + +#endif // PolymorphicAccessStructureList_h + diff --git a/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.cpp b/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.cpp index 3a87567d8..6a6ec8141 100644 --- a/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.cpp +++ b/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.cpp @@ -55,7 +55,7 @@ PutByIdAccess PutByIdAccess::fromStructureStubInfo( break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } return result; @@ -77,7 +77,7 @@ bool PutByIdAccess::visitWeak() const return false; break; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return false; } return true; diff --git a/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.h b/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.h index 4a20b6d1c..6e88e7062 100644 --- a/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.h +++ b/Source/JavaScriptCore/bytecode/PolymorphicPutByIdList.h @@ -55,7 +55,7 @@ public: } static PutByIdAccess transition( - JSGlobalData& globalData, + VM& vm, JSCell* owner, Structure* oldStructure, Structure* newStructure, @@ -64,22 +64,22 @@ public: { PutByIdAccess result; result.m_type = Transition; - result.m_oldStructure.set(globalData, owner, oldStructure); - result.m_newStructure.set(globalData, owner, newStructure); - result.m_chain.set(globalData, owner, chain); + result.m_oldStructure.set(vm, owner, oldStructure); + result.m_newStructure.set(vm, owner, newStructure); + result.m_chain.set(vm, owner, chain); result.m_stubRoutine = stubRoutine; return result; } static PutByIdAccess replace( - JSGlobalData& globalData, + VM& vm, JSCell* owner, Structure* structure, PassRefPtr stubRoutine) { PutByIdAccess result; result.m_type = Replace; - result.m_oldStructure.set(globalData, owner, structure); + result.m_oldStructure.set(vm, owner, structure); result.m_stubRoutine = stubRoutine; return result; } diff --git a/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp b/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp new file mode 100644 index 000000000..0cdf51a98 --- /dev/null +++ b/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "PreciseJumpTargets.h" + +namespace JSC { + +static void addSimpleSwitchTargets(SimpleJumpTable& jumpTable, unsigned bytecodeOffset, Vector& out) +{ + for (unsigned i = jumpTable.branchOffsets.size(); i--;) + out.append(bytecodeOffset + jumpTable.branchOffsets[i]); +} + +void computePreciseJumpTargets(CodeBlock* codeBlock, Vector& out) +{ + ASSERT(out.isEmpty()); + + // We will derive a superset of the jump targets that the code block thinks it has. + // So, if the code block claims there are none, then we are done. + if (!codeBlock->numberOfJumpTargets()) + return; + + for (unsigned i = codeBlock->numberOfExceptionHandlers(); i--;) + out.append(codeBlock->exceptionHandler(i).target); + + Interpreter* interpreter = codeBlock->vm()->interpreter; + Instruction* instructionsBegin = codeBlock->instructions().begin(); + unsigned instructionCount = codeBlock->instructions().size(); + for (unsigned bytecodeOffset = 0; bytecodeOffset < instructionCount;) { + OpcodeID opcodeID = interpreter->getOpcodeID(instructionsBegin[bytecodeOffset].u.opcode); + Instruction* current = instructionsBegin + bytecodeOffset; + switch (opcodeID) { + case op_jmp: + out.append(bytecodeOffset + current[1].u.operand); + break; + case op_jtrue: + case op_jfalse: + case op_jeq_null: + case op_jneq_null: + out.append(bytecodeOffset + current[2].u.operand); + break; + case op_jneq_ptr: + case op_jless: + case op_jlesseq: + case op_jgreater: + case op_jgreatereq: + case op_jnless: + case op_jnlesseq: + case op_jngreater: + case op_jngreatereq: + out.append(bytecodeOffset + current[3].u.operand); + break; + case op_switch_imm: + addSimpleSwitchTargets(codeBlock->immediateSwitchJumpTable(current[1].u.operand), bytecodeOffset, out); + out.append(bytecodeOffset + current[2].u.operand); + break; + case op_switch_char: + addSimpleSwitchTargets(codeBlock->characterSwitchJumpTable(current[1].u.operand), bytecodeOffset, out); + out.append(bytecodeOffset + current[2].u.operand); + break; + case op_switch_string: { + StringJumpTable& table = codeBlock->stringSwitchJumpTable(current[1].u.operand); + StringJumpTable::StringOffsetTable::iterator iter = table.offsetTable.begin(); + StringJumpTable::StringOffsetTable::iterator end = table.offsetTable.end(); + for (; iter != end; ++iter) + out.append(bytecodeOffset + iter->value.branchOffset); + out.append(bytecodeOffset + current[2].u.operand); + break; + } + case op_get_pnames: + out.append(bytecodeOffset + current[5].u.operand); + break; + case op_next_pname: + out.append(bytecodeOffset + current[6].u.operand); + break; + case op_check_has_instance: + out.append(bytecodeOffset + current[4].u.operand); + break; + case op_loop_hint: + out.append(bytecodeOffset); + break; + default: + break; + } + bytecodeOffset += opcodeLengths[opcodeID]; + } + + std::sort(out.begin(), out.end()); + + // We will have duplicates, and we must remove them. + unsigned toIndex = 0; + unsigned fromIndex = 0; + unsigned lastValue = UINT_MAX; + while (fromIndex < out.size()) { + unsigned value = out[fromIndex++]; + if (value == lastValue) + continue; + out[toIndex++] = value; + lastValue = value; + } + out.resize(toIndex); +} + +} // namespace JSC + diff --git a/Source/JavaScriptCore/bytecode/PreciseJumpTargets.h b/Source/JavaScriptCore/bytecode/PreciseJumpTargets.h new file mode 100644 index 000000000..109c40cea --- /dev/null +++ b/Source/JavaScriptCore/bytecode/PreciseJumpTargets.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2013 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef PreciseJumpTargets_h +#define PreciseJumpTargets_h + +#include "CodeBlock.h" + +namespace JSC { + +void computePreciseJumpTargets(CodeBlock*, Vector& out); + +} // namespace JSC + +#endif // PreciseJumpTargets_h + diff --git a/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp b/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp index 7d6ba0987..24a57eb50 100644 --- a/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp +++ b/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp @@ -49,7 +49,7 @@ PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned if (instruction[0].u.opcode == LLInt::getOpcode(llint_op_put_by_id) || instruction[0].u.opcode == LLInt::getOpcode(llint_op_put_by_id_out_of_line)) { - PropertyOffset offset = structure->get(*profiledBlock->globalData(), ident); + PropertyOffset offset = structure->get(*profiledBlock->vm(), ident); if (!isValidOffset(offset)) return PutByIdStatus(NoInformation, 0, 0, 0, invalidOffset); @@ -68,7 +68,7 @@ PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned ASSERT(newStructure); ASSERT(chain); - PropertyOffset offset = newStructure->get(*profiledBlock->globalData(), ident); + PropertyOffset offset = newStructure->get(*profiledBlock->vm(), ident); if (!isValidOffset(offset)) return PutByIdStatus(NoInformation, 0, 0, 0, invalidOffset); @@ -94,13 +94,17 @@ PutByIdStatus PutByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec if (!stubInfo.seen) return computeFromLLInt(profiledBlock, bytecodeIndex, ident); + if (stubInfo.resetByGC) + return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); + switch (stubInfo.accessType) { case access_unset: - return computeFromLLInt(profiledBlock, bytecodeIndex, ident); + // If the JIT saw it but didn't optimize it, then assume that this takes slow path. + return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); case access_put_by_id_replace: { PropertyOffset offset = stubInfo.u.putByIdReplace.baseObjectStructure->get( - *profiledBlock->globalData(), ident); + *profiledBlock->vm(), ident); if (isValidOffset(offset)) { return PutByIdStatus( SimpleReplace, @@ -115,7 +119,7 @@ PutByIdStatus PutByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec case access_put_by_id_transition_direct: { ASSERT(stubInfo.u.putByIdTransition.previousStructure->transitionWatchpointSetHasBeenInvalidated()); PropertyOffset offset = stubInfo.u.putByIdTransition.structure->get( - *profiledBlock->globalData(), ident); + *profiledBlock->vm(), ident); if (isValidOffset(offset)) { return PutByIdStatus( SimpleTransition, @@ -135,7 +139,7 @@ PutByIdStatus PutByIdStatus::computeFor(CodeBlock* profiledBlock, unsigned bytec #endif // ENABLE(JIT) } -PutByIdStatus PutByIdStatus::computeFor(JSGlobalData& globalData, JSGlobalObject* globalObject, Structure* structure, Identifier& ident, bool isDirect) +PutByIdStatus PutByIdStatus::computeFor(VM& vm, JSGlobalObject* globalObject, Structure* structure, Identifier& ident, bool isDirect) { if (PropertyName(ident).asIndex() != PropertyName::NotAnIndex) return PutByIdStatus(TakesSlowPath); @@ -147,11 +151,16 @@ PutByIdStatus PutByIdStatus::computeFor(JSGlobalData& globalData, JSGlobalObject return PutByIdStatus(TakesSlowPath); unsigned attributes; - JSCell* specificValueIgnored; - PropertyOffset offset = structure->get(globalData, ident, attributes, specificValueIgnored); + JSCell* specificValue; + PropertyOffset offset = structure->get(vm, ident, attributes, specificValue); if (isValidOffset(offset)) { if (attributes & (Accessor | ReadOnly)) return PutByIdStatus(TakesSlowPath); + if (specificValue) { + // We need the PutById slow path to verify that we're storing the right value into + // the specialized slot. + return PutByIdStatus(TakesSlowPath); + } return PutByIdStatus(SimpleReplace, structure, 0, 0, offset); } @@ -169,7 +178,7 @@ PutByIdStatus PutByIdStatus::computeFor(JSGlobalData& globalData, JSGlobalObject if (!isDirect) { // If the prototype chain has setters or read-only properties, then give up. - if (structure->prototypeChainMayInterceptStoreTo(globalData, ident)) + if (structure->prototypeChainMayInterceptStoreTo(vm, ident)) return PutByIdStatus(TakesSlowPath); // If the prototype chain hasn't been normalized (i.e. there are proxies or dictionaries) @@ -204,7 +213,7 @@ PutByIdStatus PutByIdStatus::computeFor(JSGlobalData& globalData, JSGlobalObject return PutByIdStatus( SimpleTransition, structure, transition, - structure->prototypeChain(globalData, globalObject), offset); + structure->prototypeChain(vm, globalObject), offset); } } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/PutByIdStatus.h b/Source/JavaScriptCore/bytecode/PutByIdStatus.h index fe22009fe..659e629d2 100644 --- a/Source/JavaScriptCore/bytecode/PutByIdStatus.h +++ b/Source/JavaScriptCore/bytecode/PutByIdStatus.h @@ -33,7 +33,7 @@ namespace JSC { class CodeBlock; class Identifier; -class JSGlobalData; +class VM; class JSGlobalObject; class Structure; class StructureChain; @@ -91,7 +91,7 @@ public: } static PutByIdStatus computeFor(CodeBlock*, unsigned bytecodeIndex, Identifier&); - static PutByIdStatus computeFor(JSGlobalData&, JSGlobalObject*, Structure*, Identifier&, bool isDirect); + static PutByIdStatus computeFor(VM&, JSGlobalObject*, Structure*, Identifier&, bool isDirect); State state() const { return m_state; } diff --git a/Source/JavaScriptCore/bytecode/ReduceWhitespace.cpp b/Source/JavaScriptCore/bytecode/ReduceWhitespace.cpp new file mode 100644 index 000000000..1636cba1d --- /dev/null +++ b/Source/JavaScriptCore/bytecode/ReduceWhitespace.cpp @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2012 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "ReduceWhitespace.h" + +#include +#include + +namespace JSC { + +String reduceWhitespace(const String& input) +{ + StringBuilder builder; + + for (unsigned i = 0; i < input.length();) { + if (isASCIISpace(input[i])) { + while (i < input.length() && isASCIISpace(input[i])) + ++i; + builder.append(' '); + continue; + } + builder.append(input[i]); + ++i; + } + + return builder.toString(); +} + +} // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/ReduceWhitespace.h b/Source/JavaScriptCore/bytecode/ReduceWhitespace.h new file mode 100644 index 000000000..383dd3798 --- /dev/null +++ b/Source/JavaScriptCore/bytecode/ReduceWhitespace.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2012 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ReduceWhitespace_h +#define ReduceWhitespace_h + +#include + +namespace JSC { + +// Replace all whitespace runs with a single space. +String reduceWhitespace(const String&); + +} // namespace JSC + +#endif // ReduceWhitespace_h diff --git a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp index 7814f8c99..c02acb38d 100644 --- a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp +++ b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.cpp @@ -27,7 +27,8 @@ #include "ResolveGlobalStatus.h" #include "CodeBlock.h" -#include "JSValue.h" +#include "JSCJSValue.h" +#include "Operations.h" #include "Structure.h" namespace JSC { @@ -36,7 +37,7 @@ static ResolveGlobalStatus computeForStructure(CodeBlock* codeBlock, Structure* { unsigned attributesIgnored; JSCell* specificValue; - PropertyOffset offset = structure->get(*codeBlock->globalData(), identifier, attributesIgnored, specificValue); + PropertyOffset offset = structure->get(*codeBlock->vm(), identifier, attributesIgnored, specificValue); if (structure->isDictionary()) specificValue = 0; if (!isValidOffset(offset)) diff --git a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.h b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.h index 46a9254e7..6763ff7c8 100644 --- a/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.h +++ b/Source/JavaScriptCore/bytecode/ResolveGlobalStatus.h @@ -26,7 +26,7 @@ #ifndef ResolveGlobalStatus_h #define ResolveGlobalStatus_h -#include "JSValue.h" +#include "JSCJSValue.h" #include "PropertyOffset.h" #include diff --git a/Source/JavaScriptCore/bytecode/SamplingTool.cpp b/Source/JavaScriptCore/bytecode/SamplingTool.cpp index a76fee179..d18dbc1ff 100644 --- a/Source/JavaScriptCore/bytecode/SamplingTool.cpp +++ b/Source/JavaScriptCore/bytecode/SamplingTool.cpp @@ -297,13 +297,13 @@ void SamplingTool::sample() s_samplingTool->doRun(); } -void SamplingTool::notifyOfScope(JSGlobalData& globalData, ScriptExecutable* script) +void SamplingTool::notifyOfScope(VM& vm, ScriptExecutable* script) { #if ENABLE(CODEBLOCK_SAMPLING) MutexLocker locker(m_scriptSampleMapMutex); - m_scopeSampleMap->set(script, adoptPtr(new ScriptSampleRecord(globalData, script))); + m_scopeSampleMap->set(script, adoptPtr(new ScriptSampleRecord(vm, script))); #else - UNUSED_PARAM(globalData); + UNUSED_PARAM(vm); UNUSED_PARAM(script); #endif } diff --git a/Source/JavaScriptCore/bytecode/SamplingTool.h b/Source/JavaScriptCore/bytecode/SamplingTool.h index 6c9df62ee..516968a33 100644 --- a/Source/JavaScriptCore/bytecode/SamplingTool.h +++ b/Source/JavaScriptCore/bytecode/SamplingTool.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,6 @@ #define SamplingTool_h #include "Strong.h" -#include "Nodes.h" #include "Opcode.h" #include "SamplingCounter.h" #include @@ -186,8 +185,8 @@ namespace JSC { struct Instruction; struct ScriptSampleRecord { - ScriptSampleRecord(JSGlobalData& globalData, ScriptExecutable* executable) - : m_executable(globalData, executable) + ScriptSampleRecord(VM& vm, ScriptExecutable* executable) + : m_executable(vm, executable) , m_codeBlock(0) , m_sampleCount(0) , m_opcodeSampleCount(0) @@ -282,7 +281,7 @@ namespace JSC { JS_EXPORT_PRIVATE void setup(); void dump(ExecState*); - void notifyOfScope(JSGlobalData&, ScriptExecutable* scope); + void notifyOfScope(VM&, ScriptExecutable* scope); void sample(CodeBlock* codeBlock, Instruction* vPC) { diff --git a/Source/JavaScriptCore/bytecode/SpeculatedType.cpp b/Source/JavaScriptCore/bytecode/SpeculatedType.cpp index a07ca2b22..0e33b650f 100644 --- a/Source/JavaScriptCore/bytecode/SpeculatedType.cpp +++ b/Source/JavaScriptCore/bytecode/SpeculatedType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,6 +32,8 @@ #include "Arguments.h" #include "JSArray.h" #include "JSFunction.h" +#include "Operations.h" +#include "StringObject.h" #include "ValueProfile.h" #include #include @@ -119,18 +121,18 @@ void dumpSpeculation(PrintStream& out, SpeculatedType value) else isTop = false; - if (value & SpecMyArguments) - myOut.print("Myarguments"); + if (value & SpecArguments) + myOut.print("Arguments"); else isTop = false; - if (value & SpecForeignArguments) - myOut.print("Foreignarguments"); + if (value & SpecString) + myOut.print("String"); else isTop = false; - if (value & SpecString) - myOut.print("String"); + if (value & SpecStringObject) + myOut.print("Stringobject"); else isTop = false; @@ -196,10 +198,12 @@ static const char* speculationToAbbreviatedString(SpeculatedType prediction) return ""; if (isFloat64ArraySpeculation(prediction)) return ""; - if (isMyArgumentsSpeculation(prediction)) - return ""; if (isArgumentsSpeculation(prediction)) return ""; + if (isStringObjectSpeculation(prediction)) + return ""; + if (isStringOrStringObjectSpeculation(prediction)) + return ""; if (isObjectSpeculation(prediction)) return ""; if (isCellSpeculation(prediction)) @@ -231,11 +235,13 @@ SpeculatedType speculationFromClassInfo(const ClassInfo* classInfo) return SpecArray; if (classInfo == &Arguments::s_info) - return SpecArguments; // Cannot distinguish between MyArguments and ForeignArguments at this stage. That happens in the flow analysis. + return SpecArguments; + + if (classInfo == &StringObject::s_info) + return SpecStringObject; if (classInfo->isSubClassOf(&JSFunction::s_info)) return SpecFunction; - if (classInfo->typedArrayStorageType != TypedArrayNone) { switch (classInfo->typedArrayStorageType) { diff --git a/Source/JavaScriptCore/bytecode/SpeculatedType.h b/Source/JavaScriptCore/bytecode/SpeculatedType.h index 261a26b0e..05788f0f1 100644 --- a/Source/JavaScriptCore/bytecode/SpeculatedType.h +++ b/Source/JavaScriptCore/bytecode/SpeculatedType.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,7 +29,8 @@ #ifndef SpeculatedType_h #define SpeculatedType_h -#include "JSValue.h" +#include "JSCJSValue.h" +#include namespace JSC { @@ -49,11 +50,10 @@ static const SpeculatedType SpecUint16Array = 0x00000200; // It's definite static const SpeculatedType SpecUint32Array = 0x00000400; // It's definitely an Uint32Array or one of its subclasses. static const SpeculatedType SpecFloat32Array = 0x00000800; // It's definitely an Uint16Array or one of its subclasses. static const SpeculatedType SpecFloat64Array = 0x00001000; // It's definitely an Uint16Array or one of its subclasses. -static const SpeculatedType SpecMyArguments = 0x00002000; // It's definitely an Arguments object, and it's definitely the one for my current frame. -static const SpeculatedType SpecForeignArguments = 0x00004000; // It's definitely an Arguments object, and it's definitely not mine. -static const SpeculatedType SpecArguments = 0x00006000; // It's definitely an Arguments object. +static const SpeculatedType SpecArguments = 0x00002000; // It's definitely an Arguments object. +static const SpeculatedType SpecStringObject = 0x00004000; // It's definitely a StringObject. static const SpeculatedType SpecObjectOther = 0x00008000; // It's definitely an object but not JSFinalObject, JSArray, or JSFunction. -static const SpeculatedType SpecObjectMask = 0x0000ffff; // Bitmask used for testing for any kind of object prediction. +static const SpeculatedType SpecObject = 0x0000ffff; // Bitmask used for testing for any kind of object prediction. static const SpeculatedType SpecString = 0x00010000; // It's definitely a JSString. static const SpeculatedType SpecCellOther = 0x00020000; // It's definitely a JSCell but not a subclass of JSObject and definitely not a JSString. static const SpeculatedType SpecCell = 0x0003ffff; // It's definitely a JSCell. @@ -83,19 +83,14 @@ inline bool isCellSpeculation(SpeculatedType value) return !!(value & SpecCell) && !(value & ~SpecCell); } -inline bool isNonStringCellSpeculation(SpeculatedType value) -{ - return !!(value & (SpecCell & ~SpecString)) && !(value & ~(SpecCell & ~SpecString)); -} - -inline bool isNonStringCellOrOtherSpeculation(SpeculatedType value) +inline bool isObjectSpeculation(SpeculatedType value) { - return !!(value & ((SpecCell & ~SpecString) | SpecOther)) && !(value & ~((SpecCell & ~SpecString) | SpecOther)); + return !!(value & SpecObject) && !(value & ~SpecObject); } -inline bool isObjectSpeculation(SpeculatedType value) +inline bool isObjectOrOtherSpeculation(SpeculatedType value) { - return !!(value & SpecObjectMask) && !(value & ~SpecObjectMask); + return !!(value & (SpecObject | SpecOther)) && !(value & ~(SpecObject | SpecOther)); } inline bool isFinalObjectSpeculation(SpeculatedType value) @@ -219,9 +214,14 @@ inline bool isArrayOrOtherSpeculation(SpeculatedType value) return !!(value & (SpecArray | SpecOther)) && !(value & ~(SpecArray | SpecOther)); } -inline bool isMyArgumentsSpeculation(SpeculatedType value) +inline bool isStringObjectSpeculation(SpeculatedType value) +{ + return value == SpecStringObject; +} + +inline bool isStringOrStringObjectSpeculation(SpeculatedType value) { - return value == SpecMyArguments; + return !!value && !(value & ~(SpecString | SpecStringObject)); } inline bool isInt32Speculation(SpeculatedType value) diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp index 9238fefdc..70cf2fccb 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp +++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp @@ -63,7 +63,7 @@ void StructureStubInfo::deref() // These instructions don't have to release any allocated memory return; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.h b/Source/JavaScriptCore/bytecode/StructureStubInfo.h index 445ffe6c6..f5c39357c 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubInfo.h +++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.h @@ -36,282 +36,285 @@ #include "JITStubRoutine.h" #include "MacroAssembler.h" #include "Opcode.h" +#include "PolymorphicAccessStructureList.h" #include "Structure.h" #include "StructureStubClearingWatchpoint.h" #include namespace JSC { - class PolymorphicPutByIdList; - - enum AccessType { - access_get_by_id_self, - access_get_by_id_proto, - access_get_by_id_chain, - access_get_by_id_self_list, - access_get_by_id_proto_list, - access_put_by_id_transition_normal, - access_put_by_id_transition_direct, - access_put_by_id_replace, - access_put_by_id_list, - access_unset, - access_get_by_id_generic, - access_put_by_id_generic, - access_get_array_length, - access_get_string_length, - }; - - inline bool isGetByIdAccess(AccessType accessType) - { - switch (accessType) { - case access_get_by_id_self: - case access_get_by_id_proto: - case access_get_by_id_chain: - case access_get_by_id_self_list: - case access_get_by_id_proto_list: - case access_get_by_id_generic: - case access_get_array_length: - case access_get_string_length: - return true; - default: - return false; - } +class PolymorphicPutByIdList; + +enum AccessType { + access_get_by_id_self, + access_get_by_id_proto, + access_get_by_id_chain, + access_get_by_id_self_list, + access_get_by_id_proto_list, + access_put_by_id_transition_normal, + access_put_by_id_transition_direct, + access_put_by_id_replace, + access_put_by_id_list, + access_unset, + access_get_by_id_generic, + access_put_by_id_generic, + access_get_array_length, + access_get_string_length, +}; + +inline bool isGetByIdAccess(AccessType accessType) +{ + switch (accessType) { + case access_get_by_id_self: + case access_get_by_id_proto: + case access_get_by_id_chain: + case access_get_by_id_self_list: + case access_get_by_id_proto_list: + case access_get_by_id_generic: + case access_get_array_length: + case access_get_string_length: + return true; + default: + return false; } +} - inline bool isPutByIdAccess(AccessType accessType) +inline bool isPutByIdAccess(AccessType accessType) +{ + switch (accessType) { + case access_put_by_id_transition_normal: + case access_put_by_id_transition_direct: + case access_put_by_id_replace: + case access_put_by_id_list: + case access_put_by_id_generic: + return true; + default: + return false; + } +} + +struct StructureStubInfo { + StructureStubInfo() + : accessType(access_unset) + , seen(false) + , resetByGC(false) + { + } + + void initGetByIdSelf(VM& vm, JSCell* owner, Structure* baseObjectStructure) { - switch (accessType) { - case access_put_by_id_transition_normal: - case access_put_by_id_transition_direct: - case access_put_by_id_replace: - case access_put_by_id_list: - case access_put_by_id_generic: - return true; - default: - return false; - } + accessType = access_get_by_id_self; + + u.getByIdSelf.baseObjectStructure.set(vm, owner, baseObjectStructure); + } + + void initGetByIdProto(VM& vm, JSCell* owner, Structure* baseObjectStructure, Structure* prototypeStructure, bool isDirect) + { + accessType = access_get_by_id_proto; + + u.getByIdProto.baseObjectStructure.set(vm, owner, baseObjectStructure); + u.getByIdProto.prototypeStructure.set(vm, owner, prototypeStructure); + u.getByIdProto.isDirect = isDirect; + } + + void initGetByIdChain(VM& vm, JSCell* owner, Structure* baseObjectStructure, StructureChain* chain, unsigned count, bool isDirect) + { + accessType = access_get_by_id_chain; + + u.getByIdChain.baseObjectStructure.set(vm, owner, baseObjectStructure); + u.getByIdChain.chain.set(vm, owner, chain); + u.getByIdChain.count = count; + u.getByIdChain.isDirect = isDirect; + } + + void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize) + { + accessType = access_get_by_id_self_list; + + u.getByIdSelfList.structureList = structureList; + u.getByIdSelfList.listSize = listSize; + } + + void initGetByIdProtoList(PolymorphicAccessStructureList* structureList, int listSize) + { + accessType = access_get_by_id_proto_list; + + u.getByIdProtoList.structureList = structureList; + u.getByIdProtoList.listSize = listSize; } - struct StructureStubInfo { - StructureStubInfo() - : accessType(access_unset) - , seen(false) - { - } - - void initGetByIdSelf(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure) - { - accessType = access_get_by_id_self; - - u.getByIdSelf.baseObjectStructure.set(globalData, owner, baseObjectStructure); - } - - void initGetByIdProto(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure, Structure* prototypeStructure, bool isDirect) - { - accessType = access_get_by_id_proto; - - u.getByIdProto.baseObjectStructure.set(globalData, owner, baseObjectStructure); - u.getByIdProto.prototypeStructure.set(globalData, owner, prototypeStructure); - u.getByIdProto.isDirect = isDirect; - } - - void initGetByIdChain(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure, StructureChain* chain, unsigned count, bool isDirect) - { - accessType = access_get_by_id_chain; - - u.getByIdChain.baseObjectStructure.set(globalData, owner, baseObjectStructure); - u.getByIdChain.chain.set(globalData, owner, chain); - u.getByIdChain.count = count; - u.getByIdChain.isDirect = isDirect; - } - - void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize) - { - accessType = access_get_by_id_self_list; - - u.getByIdSelfList.structureList = structureList; - u.getByIdSelfList.listSize = listSize; - } - - void initGetByIdProtoList(PolymorphicAccessStructureList* structureList, int listSize) - { - accessType = access_get_by_id_proto_list; - - u.getByIdProtoList.structureList = structureList; - u.getByIdProtoList.listSize = listSize; - } - - // PutById* - - void initPutByIdTransition(JSGlobalData& globalData, JSCell* owner, Structure* previousStructure, Structure* structure, StructureChain* chain, bool isDirect) - { - if (isDirect) - accessType = access_put_by_id_transition_direct; - else - accessType = access_put_by_id_transition_normal; - - u.putByIdTransition.previousStructure.set(globalData, owner, previousStructure); - u.putByIdTransition.structure.set(globalData, owner, structure); - u.putByIdTransition.chain.set(globalData, owner, chain); - } - - void initPutByIdReplace(JSGlobalData& globalData, JSCell* owner, Structure* baseObjectStructure) - { - accessType = access_put_by_id_replace; + // PutById* + + void initPutByIdTransition(VM& vm, JSCell* owner, Structure* previousStructure, Structure* structure, StructureChain* chain, bool isDirect) + { + if (isDirect) + accessType = access_put_by_id_transition_direct; + else + accessType = access_put_by_id_transition_normal; + + u.putByIdTransition.previousStructure.set(vm, owner, previousStructure); + u.putByIdTransition.structure.set(vm, owner, structure); + u.putByIdTransition.chain.set(vm, owner, chain); + } + + void initPutByIdReplace(VM& vm, JSCell* owner, Structure* baseObjectStructure) + { + accessType = access_put_by_id_replace; - u.putByIdReplace.baseObjectStructure.set(globalData, owner, baseObjectStructure); - } + u.putByIdReplace.baseObjectStructure.set(vm, owner, baseObjectStructure); + } - void initPutByIdList(PolymorphicPutByIdList* list) - { - accessType = access_put_by_id_list; - u.putByIdList.list = list; - } + void initPutByIdList(PolymorphicPutByIdList* list) + { + accessType = access_put_by_id_list; + u.putByIdList.list = list; + } - void reset() - { - deref(); - accessType = access_unset; - stubRoutine.clear(); - watchpoints.clear(); - } + void reset() + { + deref(); + accessType = access_unset; + stubRoutine.clear(); + watchpoints.clear(); + } - void deref(); + void deref(); - bool visitWeakReferences(); + bool visitWeakReferences(); - bool seenOnce() - { - return seen; - } - - void setSeen() - { - seen = true; - } + bool seenOnce() + { + return seen; + } + + void setSeen() + { + seen = true; + } - StructureStubClearingWatchpoint* addWatchpoint(CodeBlock* codeBlock) - { - return WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint( - watchpoints, codeBlock, this); - } + StructureStubClearingWatchpoint* addWatchpoint(CodeBlock* codeBlock) + { + return WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint( + watchpoints, codeBlock, this); + } - unsigned bytecodeIndex; + unsigned bytecodeIndex; - int8_t accessType; - int8_t seen; + int8_t accessType; + bool seen : 1; + bool resetByGC : 1; #if ENABLE(DFG_JIT) - CodeOrigin codeOrigin; + CodeOrigin codeOrigin; #endif // ENABLE(DFG_JIT) - union { - struct { - int8_t registersFlushed; - int8_t baseGPR; + union { + struct { + int8_t registersFlushed; + int8_t baseGPR; #if USE(JSVALUE32_64) - int8_t valueTagGPR; + int8_t valueTagGPR; #endif - int8_t valueGPR; - DFG::RegisterSetPOD usedRegisters; - int32_t deltaCallToDone; - int32_t deltaCallToStorageLoad; - int32_t deltaCallToStructCheck; - int32_t deltaCallToSlowCase; - int32_t deltaCheckImmToCall; + int8_t valueGPR; + DFG::RegisterSetPOD usedRegisters; + int32_t deltaCallToDone; + int32_t deltaCallToStorageLoad; + int32_t deltaCallToStructCheck; + int32_t deltaCallToSlowCase; + int32_t deltaCheckImmToCall; #if USE(JSVALUE64) - int32_t deltaCallToLoadOrStore; + int32_t deltaCallToLoadOrStore; #else - int32_t deltaCallToTagLoadOrStore; - int32_t deltaCallToPayloadLoadOrStore; + int32_t deltaCallToTagLoadOrStore; + int32_t deltaCallToPayloadLoadOrStore; #endif - } dfg; - struct { - union { - struct { - int16_t structureToCompare; - int16_t structureCheck; - int16_t propertyStorageLoad; + } dfg; + struct { + union { + struct { + int16_t structureToCompare; + int16_t structureCheck; + int16_t propertyStorageLoad; #if USE(JSVALUE64) - int16_t displacementLabel; + int16_t displacementLabel; #else - int16_t displacementLabel1; - int16_t displacementLabel2; + int16_t displacementLabel1; + int16_t displacementLabel2; #endif - int16_t putResult; - int16_t coldPathBegin; - } get; - struct { - int16_t structureToCompare; - int16_t propertyStorageLoad; + int16_t putResult; + int16_t coldPathBegin; + } get; + struct { + int16_t structureToCompare; + int16_t propertyStorageLoad; #if USE(JSVALUE64) - int16_t displacementLabel; + int16_t displacementLabel; #else - int16_t displacementLabel1; - int16_t displacementLabel2; + int16_t displacementLabel1; + int16_t displacementLabel2; #endif - } put; - } u; - int16_t methodCheckProtoObj; - int16_t methodCheckProtoStructureToCompare; - int16_t methodCheckPutFunction; - } baseline; - } patch; - - union { - struct { - // It would be unwise to put anything here, as it will surely be overwritten. - } unset; - struct { - WriteBarrierBase baseObjectStructure; - } getByIdSelf; - struct { - WriteBarrierBase baseObjectStructure; - WriteBarrierBase prototypeStructure; - bool isDirect; - } getByIdProto; - struct { - WriteBarrierBase baseObjectStructure; - WriteBarrierBase chain; - unsigned count : 31; - bool isDirect : 1; - } getByIdChain; - struct { - PolymorphicAccessStructureList* structureList; - int listSize; - } getByIdSelfList; - struct { - PolymorphicAccessStructureList* structureList; - int listSize; - } getByIdProtoList; - struct { - WriteBarrierBase previousStructure; - WriteBarrierBase structure; - WriteBarrierBase chain; - } putByIdTransition; - struct { - WriteBarrierBase baseObjectStructure; - } putByIdReplace; - struct { - PolymorphicPutByIdList* list; - } putByIdList; - } u; - - RefPtr stubRoutine; - CodeLocationCall callReturnLocation; - CodeLocationLabel hotPathBegin; - RefPtr watchpoints; - }; - - inline void* getStructureStubInfoReturnLocation(StructureStubInfo* structureStubInfo) - { - return structureStubInfo->callReturnLocation.executableAddress(); - } - - inline unsigned getStructureStubInfoBytecodeIndex(StructureStubInfo* structureStubInfo) - { - return structureStubInfo->bytecodeIndex; - } + } put; + } u; + int16_t methodCheckProtoObj; + int16_t methodCheckProtoStructureToCompare; + int16_t methodCheckPutFunction; + } baseline; + } patch; + + union { + struct { + // It would be unwise to put anything here, as it will surely be overwritten. + } unset; + struct { + WriteBarrierBase baseObjectStructure; + } getByIdSelf; + struct { + WriteBarrierBase baseObjectStructure; + WriteBarrierBase prototypeStructure; + bool isDirect; + } getByIdProto; + struct { + WriteBarrierBase baseObjectStructure; + WriteBarrierBase chain; + unsigned count : 31; + bool isDirect : 1; + } getByIdChain; + struct { + PolymorphicAccessStructureList* structureList; + int listSize; + } getByIdSelfList; + struct { + PolymorphicAccessStructureList* structureList; + int listSize; + } getByIdProtoList; + struct { + WriteBarrierBase previousStructure; + WriteBarrierBase structure; + WriteBarrierBase chain; + } putByIdTransition; + struct { + WriteBarrierBase baseObjectStructure; + } putByIdReplace; + struct { + PolymorphicPutByIdList* list; + } putByIdList; + } u; + + RefPtr stubRoutine; + CodeLocationCall callReturnLocation; + CodeLocationLabel hotPathBegin; + RefPtr watchpoints; +}; + +inline void* getStructureStubInfoReturnLocation(StructureStubInfo* structureStubInfo) +{ + return structureStubInfo->callReturnLocation.executableAddress(); +} + +inline unsigned getStructureStubInfoBytecodeIndex(StructureStubInfo* structureStubInfo) +{ + return structureStubInfo->bytecodeIndex; +} } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp index e98d4de0a..8aba1ff8b 100644 --- a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp +++ b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Apple Inc. All Rights Reserved. + * Copyright (C) 2012, 2013 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,6 +32,8 @@ #include "CodeCache.h" #include "Executable.h" #include "JSString.h" +#include "Operations.h" +#include "Parser.h" #include "SourceProvider.h" #include "Structure.h" #include "SymbolTable.h" @@ -45,6 +47,29 @@ const ClassInfo UnlinkedProgramCodeBlock::s_info = { "UnlinkedProgramCodeBlock", const ClassInfo UnlinkedEvalCodeBlock::s_info = { "UnlinkedEvalCodeBlock", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(UnlinkedEvalCodeBlock) }; const ClassInfo UnlinkedFunctionCodeBlock::s_info = { "UnlinkedFunctionCodeBlock", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) }; +static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, JSScope* scope, UnlinkedFunctionExecutable* executable, const SourceCode& source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error) +{ + RefPtr body = parse(&vm, source, executable->parameters(), executable->name(), executable->isInStrictContext() ? JSParseStrict : JSParseNormal, JSParseFunctionCode, error); + + if (!body) { + ASSERT(error.m_type != ParserError::ErrorNone); + return 0; + } + + if (executable->forceUsesArguments()) + body->setUsesArguments(); + body->finishParsing(executable->parameters(), executable->name(), executable->functionNameIsInScopeToggle()); + executable->recordParse(body->features(), body->hasCapturedVariables(), body->lineNo(), body->lastLine()); + + UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode, ExecutableInfo(body->needsActivation(), body->usesEval(), body->isStrictMode(), kind == CodeForConstruct)); + OwnPtr generator(adoptPtr(new BytecodeGenerator(vm, scope, body.get(), result, debuggerMode, profilerMode))); + error = generator->generate(); + body->destroyData(); + if (error.m_type != ParserError::ErrorNone) + return 0; + return result; +} + unsigned UnlinkedCodeBlock::addOrFindConstant(JSValue v) { unsigned numberOfConstants = numberOfConstantRegisters(); @@ -55,8 +80,8 @@ unsigned UnlinkedCodeBlock::addOrFindConstant(JSValue v) return addConstant(v); } -UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(JSGlobalData* globalData, Structure* structure, const SourceCode& source, FunctionBodyNode* node) - : Base(*globalData, structure) +UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node) + : Base(*vm, structure) , m_numCapturedVariables(node->capturedVariableCount()) , m_forceUsesArguments(node->usesArguments()) , m_isInStrictContext(node->isStrictMode()) @@ -66,6 +91,8 @@ UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(JSGlobalData* globalData, , m_parameters(node->parameters()) , m_firstLineOffset(node->firstLine() - source.firstLine()) , m_lineCount(node->lastLine() - node->firstLine()) + , m_functionStartOffset(node->functionStart() - source.startOffset()) + , m_functionStartColumn(node->startColumn()) , m_startOffset(node->source().startOffset() - source.startOffset()) , m_sourceLength(node->source().length()) , m_features(node->features()) @@ -73,6 +100,11 @@ UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(JSGlobalData* globalData, { } +size_t UnlinkedFunctionExecutable::parameterCount() const +{ + return m_parameters->size(); +} + void UnlinkedFunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor) { UnlinkedFunctionExecutable* thisObject = jsCast(cell); @@ -80,24 +112,31 @@ void UnlinkedFunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visito COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); Base::visitChildren(thisObject, visitor); + visitor.append(&thisObject->m_codeBlockForCall); + visitor.append(&thisObject->m_codeBlockForConstruct); visitor.append(&thisObject->m_nameValue); visitor.append(&thisObject->m_symbolTableForCall); visitor.append(&thisObject->m_symbolTableForConstruct); } -FunctionExecutable* UnlinkedFunctionExecutable::link(JSGlobalData& globalData, const SourceCode& source, size_t lineOffset, size_t sourceOffset) +FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& source, size_t lineOffset, size_t sourceOffset) { unsigned firstLine = lineOffset + m_firstLineOffset; unsigned startOffset = sourceOffset + m_startOffset; - SourceCode code(source.provider(), startOffset, startOffset + m_sourceLength, firstLine); - return FunctionExecutable::create(globalData, code, this, firstLine, firstLine + m_lineCount); + unsigned startColumn = m_functionStartColumn + 1; // startColumn should start from 1, not 0. + SourceCode code(source.provider(), startOffset, startOffset + m_sourceLength, firstLine, startColumn); + return FunctionExecutable::create(vm, code, this, firstLine, firstLine + m_lineCount, startColumn); } UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(const Identifier& name, ExecState* exec, Debugger*, const SourceCode& source, JSObject** exception) { ParserError error; - CodeCache* codeCache = exec->globalData().codeCache(); - UnlinkedFunctionExecutable* executable = codeCache->getFunctionExecutableFromGlobalCode(exec->globalData(), name, source, error); + CodeCache* codeCache = exec->vm().codeCache(); + UnlinkedFunctionExecutable* executable = codeCache->getFunctionExecutableFromGlobalCode(exec->vm(), name, source, error); + + if (exec->lexicalGlobalObject()->hasDebugger()) + exec->lexicalGlobalObject()->debugger()->sourceParsed(exec, source.provider(), error.m_line, error.m_message); + if (error.m_type != ParserError::ErrorNone) { *exception = error.toErrorObject(exec->lexicalGlobalObject(), source); return 0; @@ -106,36 +145,32 @@ UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(const Ide return executable; } -UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(JSGlobalData& globalData, const SourceCode& source, CodeSpecializationKind specializationKind, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error) +UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(VM& vm, JSScope* scope, const SourceCode& source, CodeSpecializationKind specializationKind, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error) { switch (specializationKind) { case CodeForCall: - if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForCall.get()) { - globalData.codeCache()->usedFunctionCode(globalData, codeBlock); + if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForCall.get()) return codeBlock; - } break; case CodeForConstruct: - if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForConstruct.get()) { - globalData.codeCache()->usedFunctionCode(globalData, codeBlock); + if (UnlinkedFunctionCodeBlock* codeBlock = m_codeBlockForConstruct.get()) return codeBlock; - } break; } - UnlinkedFunctionCodeBlock* result = globalData.codeCache()->getFunctionCodeBlock(globalData, this, source, specializationKind, debuggerMode, profilerMode, error); + UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, scope, this, source, specializationKind, debuggerMode, profilerMode, error); if (error.m_type != ParserError::ErrorNone) return 0; switch (specializationKind) { case CodeForCall: - m_codeBlockForCall = PassWeak(result); - m_symbolTableForCall.set(globalData, this, result->symbolTable()); + m_codeBlockForCall.set(vm, this, result); + m_symbolTableForCall.set(vm, this, result->symbolTable()); break; case CodeForConstruct: - m_codeBlockForConstruct = PassWeak(result); - m_symbolTableForConstruct.set(globalData, this, result->symbolTable()); + m_codeBlockForConstruct.set(vm, this, result); + m_symbolTableForConstruct.set(vm, this, result->symbolTable()); break; } return result; @@ -148,18 +183,19 @@ String UnlinkedFunctionExecutable::paramString() const for (size_t pos = 0; pos < parameters.size(); ++pos) { if (!builder.isEmpty()) builder.appendLiteral(", "); - builder.append(parameters[pos].string()); + builder.append(parameters.at(pos).string()); } return builder.toString(); } -UnlinkedCodeBlock::UnlinkedCodeBlock(JSGlobalData* globalData, Structure* structure, CodeType codeType, const ExecutableInfo& info) - : Base(*globalData, structure) +UnlinkedCodeBlock::UnlinkedCodeBlock(VM* vm, Structure* structure, CodeType codeType, const ExecutableInfo& info) + : Base(*vm, structure) , m_numVars(0) , m_numCalleeRegisters(0) , m_numParameters(0) - , m_globalData(globalData) + , m_vm(vm) , m_argumentsRegister(-1) + , m_globalObjectRegister(-1) , m_needsFullScopeChain(info.m_needsActivation) , m_usesEval(info.m_usesEval) , m_isNumericCompareFunction(false) @@ -174,6 +210,7 @@ UnlinkedCodeBlock::UnlinkedCodeBlock(JSGlobalData* globalData, Structure* struct , m_putToBaseOperationCount(1) , m_arrayProfileCount(0) , m_arrayAllocationProfileCount(0) + , m_objectAllocationProfileCount(0) , m_valueProfileCount(0) , m_llintCallLinkInfoCount(0) #if ENABLE(BYTECODE_COMMENTS) @@ -205,24 +242,17 @@ void UnlinkedCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor) int UnlinkedCodeBlock::lineNumberForBytecodeOffset(unsigned bytecodeOffset) { ASSERT(bytecodeOffset < instructions().size()); - Vector& lineInfo = m_lineInfo; - - int low = 0; - int high = lineInfo.size(); - while (low < high) { - int mid = low + (high - low) / 2; - if (lineInfo[mid].instructionOffset <= bytecodeOffset) - low = mid + 1; - else - high = mid; - } - - if (!low) - return 0; - return lineInfo[low - 1].lineNumber; + int divot; + int startOffset; + int endOffset; + unsigned line; + unsigned column; + expressionRangeForBytecodeOffset(bytecodeOffset, divot, startOffset, endOffset, line, column); + return line; } -void UnlinkedCodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset) +void UnlinkedCodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset, + int& divot, int& startOffset, int& endOffset, unsigned& line, unsigned& column) { ASSERT(bytecodeOffset < instructions().size()); @@ -230,6 +260,8 @@ void UnlinkedCodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset startOffset = 0; endOffset = 0; divot = 0; + line = 0; + column = 0; return; } @@ -245,17 +277,83 @@ void UnlinkedCodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset high = mid; } - ASSERT(low); - if (!low) { + if (!low) + low = 1; + + ExpressionRangeInfo& info = expressionInfo[low - 1]; + startOffset = info.startOffset; + endOffset = info.endOffset; + divot = info.divotPoint; + + switch (info.mode) { + case ExpressionRangeInfo::FatLineMode: + info.decodeFatLineMode(line, column); + break; + case ExpressionRangeInfo::FatColumnMode: + info.decodeFatColumnMode(line, column); + break; + case ExpressionRangeInfo::FatLineAndColumnMode: { + unsigned fatIndex = info.position; + ExpressionRangeInfo::FatPosition& fatPos = m_rareData->m_expressionInfoFatPositions[fatIndex]; + line = fatPos.line; + column = fatPos.column; + break; + } + } // switch +} + +void UnlinkedCodeBlock::addExpressionInfo(unsigned instructionOffset, + int divot, int startOffset, int endOffset, unsigned line, unsigned column) +{ + if (divot > ExpressionRangeInfo::MaxDivot) { + // Overflow has occurred, we can only give line number info for errors for this region + divot = 0; startOffset = 0; endOffset = 0; - divot = 0; - return; + } else if (startOffset > ExpressionRangeInfo::MaxOffset) { + // If the start offset is out of bounds we clear both offsets + // so we only get the divot marker. Error message will have to be reduced + // to line and charPosition number. + startOffset = 0; + endOffset = 0; + } else if (endOffset > ExpressionRangeInfo::MaxOffset) { + // The end offset is only used for additional context, and is much more likely + // to overflow (eg. function call arguments) so we are willing to drop it without + // dropping the rest of the range. + endOffset = 0; + } + + unsigned positionMode = + (line <= ExpressionRangeInfo::MaxFatLineModeLine && column <= ExpressionRangeInfo::MaxFatLineModeColumn) + ? ExpressionRangeInfo::FatLineMode + : (line <= ExpressionRangeInfo::MaxFatColumnModeLine && column <= ExpressionRangeInfo::MaxFatColumnModeColumn) + ? ExpressionRangeInfo::FatColumnMode + : ExpressionRangeInfo::FatLineAndColumnMode; + + ExpressionRangeInfo info; + info.instructionOffset = instructionOffset; + info.divotPoint = divot; + info.startOffset = startOffset; + info.endOffset = endOffset; + + info.mode = positionMode; + switch (positionMode) { + case ExpressionRangeInfo::FatLineMode: + info.encodeFatLineMode(line, column); + break; + case ExpressionRangeInfo::FatColumnMode: + info.encodeFatColumnMode(line, column); + break; + case ExpressionRangeInfo::FatLineAndColumnMode: { + createRareDataIfNecessary(); + unsigned fatIndex = m_rareData->m_expressionInfoFatPositions.size(); + ExpressionRangeInfo::FatPosition fatPos = { line, column }; + m_rareData->m_expressionInfoFatPositions.append(fatPos); + info.position = fatIndex; } + } // switch - startOffset = expressionInfo[low - 1].startOffset; - endOffset = expressionInfo[low - 1].endOffset; - divot = expressionInfo[low - 1].divotPoint; + m_expressionInfo.append(info); } void UnlinkedProgramCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor) diff --git a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h index 23937d773..634968313 100644 --- a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h +++ b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Apple Inc. All Rights Reserved. + * Copyright (C) 2012, 2013 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,16 +27,18 @@ #define UnlinkedCodeBlock_h #include "BytecodeConventions.h" +#include "CodeCache.h" #include "CodeSpecializationKind.h" #include "CodeType.h" #include "ExpressionRangeInfo.h" #include "Identifier.h" #include "JSCell.h" +#include "JSString.h" #include "LineInfo.h" -#include "Nodes.h" +#include "ParserModes.h" #include "RegExp.h" #include "SpecialPointer.h" -#include "Weak.h" +#include "SymbolTable.h" #include #include @@ -47,6 +49,7 @@ class Debugger; class FunctionBodyNode; class FunctionExecutable; class FunctionParameters; +class JSScope; struct ParserError; class ScriptExecutable; class SourceCode; @@ -58,6 +61,7 @@ class UnlinkedFunctionCodeBlock; typedef unsigned UnlinkedValueProfile; typedef unsigned UnlinkedArrayProfile; typedef unsigned UnlinkedArrayAllocationProfile; +typedef unsigned UnlinkedObjectAllocationProfile; typedef unsigned UnlinkedLLIntCallLinkInfo; struct ExecutableInfo { @@ -78,10 +82,10 @@ class UnlinkedFunctionExecutable : public JSCell { public: friend class CodeCache; typedef JSCell Base; - static UnlinkedFunctionExecutable* create(JSGlobalData* globalData, const SourceCode& source, FunctionBodyNode* node) + static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionBodyNode* node) { - UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell(globalData->heap)) UnlinkedFunctionExecutable(globalData, globalData->unlinkedFunctionExecutableStructure.get(), source, node); - instance->finishCreation(*globalData); + UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell(vm->heap)) UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, node); + instance->finishCreation(*vm); return instance; } @@ -92,22 +96,24 @@ public: { return (kind == CodeForCall) ? m_symbolTableForCall.get() : m_symbolTableForConstruct.get(); } - size_t parameterCount() const { return m_parameters->size(); } + size_t parameterCount() const; bool isInStrictContext() const { return m_isInStrictContext; } FunctionNameIsInScopeToggle functionNameIsInScopeToggle() const { return m_functionNameIsInScopeToggle; } unsigned firstLineOffset() const { return m_firstLineOffset; } unsigned lineCount() const { return m_lineCount; } + unsigned functionStartOffset() const { return m_functionStartOffset; } + unsigned functionStartColumn() const { return m_functionStartColumn; } unsigned startOffset() const { return m_startOffset; } unsigned sourceLength() { return m_sourceLength; } String paramString() const; - UnlinkedFunctionCodeBlock* codeBlockFor(JSGlobalData&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode, ParserError&); + UnlinkedFunctionCodeBlock* codeBlockFor(VM&, JSScope*, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode, ParserError&); static UnlinkedFunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception); - FunctionExecutable* link(JSGlobalData&, const SourceCode&, size_t lineOffset, size_t sourceOffset); + FunctionExecutable* link(VM&, const SourceCode&, size_t lineOffset, size_t sourceOffset); void clearCodeForRecompilation() { @@ -136,9 +142,9 @@ public: static void destroy(JSCell*); private: - UnlinkedFunctionExecutable(JSGlobalData*, Structure*, const SourceCode&, FunctionBodyNode*); - Weak m_codeBlockForCall; - Weak m_codeBlockForConstruct; + UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, FunctionBodyNode*); + WriteBarrier m_codeBlockForCall; + WriteBarrier m_codeBlockForConstruct; unsigned m_numCapturedVariables : 29; bool m_forceUsesArguments : 1; @@ -153,6 +159,8 @@ private: RefPtr m_parameters; unsigned m_firstLineOffset; unsigned m_lineCount; + unsigned m_functionStartOffset; + unsigned m_functionStartColumn; unsigned m_startOffset; unsigned m_sourceLength; @@ -161,18 +169,18 @@ private: FunctionNameIsInScopeToggle m_functionNameIsInScopeToggle; protected: - void finishCreation(JSGlobalData& globalData) + void finishCreation(VM& vm) { - Base::finishCreation(globalData); - m_nameValue.set(globalData, this, jsString(&globalData, name().string())); + Base::finishCreation(vm); + m_nameValue.set(vm, this, jsString(&vm, name().string())); } static void visitChildren(JSCell*, SlotVisitor&); public: - static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(UnlinkedFunctionExecutableType, StructureFlags), &s_info); + return Structure::create(vm, globalObject, proto, TypeInfo(UnlinkedFunctionExecutableType, StructureFlags), &s_info); } static const unsigned StructureFlags = OverridesVisitChildren | JSCell::StructureFlags; @@ -239,19 +247,8 @@ public: bool needsFullScopeChain() const { return m_needsFullScopeChain; } void setNeedsFullScopeChain(bool needsFullScopeChain) { m_needsFullScopeChain = needsFullScopeChain; } - void addExpressionInfo(const ExpressionRangeInfo& expressionInfo) - { - m_expressionInfo.append(expressionInfo); - } - - void addLineInfo(unsigned bytecodeOffset, int lineNo) - { - Vector& lineInfo = m_lineInfo; - if (!lineInfo.size() || lineInfo.last().lineNumber != lineNo) { - LineInfo info = { bytecodeOffset, lineNo }; - lineInfo.append(info); - } - } + void addExpressionInfo(unsigned instructionOffset, int divot, + int startOffset, int endOffset, unsigned line, unsigned column); bool hasExpressionInfo() { return m_expressionInfo.size(); } @@ -263,6 +260,11 @@ public: bool usesArguments() const { return m_argumentsRegister != -1; } int argumentsRegister() const { return m_argumentsRegister; } + + bool usesGlobalObject() const { return m_globalObjectRegister != -1; } + void setGlobalObjectRegister(int globalObjectRegister) { m_globalObjectRegister = globalObjectRegister; } + int globalObjectRegister() const { return m_globalObjectRegister; } + // Parameter information void setNumParameters(int newValue) { m_numParameters = newValue; } void addParameter() { m_numParameters++; } @@ -272,7 +274,7 @@ public: { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); - m_rareData->m_regexps.append(WriteBarrier(*m_globalData, this, r)); + m_rareData->m_regexps.append(WriteBarrier(*m_vm, this, r)); return size; } unsigned numberOfRegExps() const @@ -295,7 +297,7 @@ public: { unsigned result = m_constantRegisters.size(); m_constantRegisters.append(WriteBarrier()); - m_constantRegisters.last().set(*m_globalData, this, v); + m_constantRegisters.last().set(*m_vm, this, v); return result; } unsigned addOrFindConstant(JSValue); @@ -320,7 +322,6 @@ public: m_constantRegisters.shrinkToFit(); m_functionDecls.shrinkToFit(); m_functionExprs.shrinkToFit(); - m_lineInfo.shrinkToFit(); m_propertyAccessInstructions.shrinkToFit(); m_expressionInfo.shrinkToFit(); @@ -334,6 +335,7 @@ public: m_rareData->m_immediateSwitchJumpTables.shrinkToFit(); m_rareData->m_characterSwitchJumpTables.shrinkToFit(); m_rareData->m_stringSwitchJumpTables.shrinkToFit(); + m_rareData->m_expressionInfoFatPositions.shrinkToFit(); } } @@ -363,7 +365,7 @@ public: { unsigned size = m_functionDecls.size(); m_functionDecls.append(WriteBarrier()); - m_functionDecls.last().set(*m_globalData, this, n); + m_functionDecls.last().set(*m_vm, this, n); return size; } UnlinkedFunctionExecutable* functionDecl(int index) { return m_functionDecls[index].get(); } @@ -372,7 +374,7 @@ public: { unsigned size = m_functionExprs.size(); m_functionExprs.append(WriteBarrier()); - m_functionExprs.last().set(*m_globalData, this, n); + m_functionExprs.last().set(*m_vm, this, n); return size; } UnlinkedFunctionExecutable* functionExpr(int index) { return m_functionExprs[index].get(); } @@ -385,7 +387,7 @@ public: SharedSymbolTable* symbolTable() const { return m_symbolTable.get(); } - JSGlobalData* globalData() const { return m_globalData; } + VM* vm() const { return m_vm; } unsigned addResolve() { return m_resolveOperationCount++; } unsigned numberOfResolveOperations() const { return m_resolveOperationCount; } @@ -396,6 +398,8 @@ public: unsigned numberOfArrayProfiles() { return m_arrayProfileCount; } UnlinkedArrayAllocationProfile addArrayAllocationProfile() { return m_arrayAllocationProfileCount++; } unsigned numberOfArrayAllocationProfiles() { return m_arrayAllocationProfileCount; } + UnlinkedObjectAllocationProfile addObjectAllocationProfile() { return m_objectAllocationProfileCount++; } + unsigned numberOfObjectAllocationProfiles() { return m_objectAllocationProfileCount; } UnlinkedValueProfile addValueProfile() { return m_valueProfileCount++; } unsigned numberOfValueProfiles() { return m_valueProfileCount; } @@ -443,7 +447,8 @@ public: int lineNumberForBytecodeOffset(unsigned bytecodeOffset); - void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset); + void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, + int& startOffset, int& endOffset, unsigned& line, unsigned& column); void recordParse(CodeFeatures features, bool hasCapturedVariables, unsigned firstLine, unsigned lineCount) { @@ -458,16 +463,26 @@ public: unsigned firstLine() const { return m_firstLine; } unsigned lineCount() const { return m_lineCount; } + PassRefPtr codeCacheForEval() + { + if (m_codeType == GlobalCode) + return m_vm->codeCache(); + createRareDataIfNecessary(); + if (!m_rareData->m_evalCodeCache) + m_rareData->m_evalCodeCache = CodeCache::create(CodeCache::NonGlobalCodeCache); + return m_rareData->m_evalCodeCache.get(); + } + protected: - UnlinkedCodeBlock(JSGlobalData*, Structure*, CodeType, const ExecutableInfo&); + UnlinkedCodeBlock(VM*, Structure*, CodeType, const ExecutableInfo&); ~UnlinkedCodeBlock(); - void finishCreation(JSGlobalData& globalData) + void finishCreation(VM& vm) { - Base::finishCreation(globalData); + Base::finishCreation(vm); if (codeType() == GlobalCode) return; - m_symbolTable.set(globalData, this, SharedSymbolTable::create(globalData)); + m_symbolTable.set(vm, this, SharedSymbolTable::create(vm)); } private: @@ -481,11 +496,12 @@ private: RefCountedArray m_unlinkedInstructions; int m_numParameters; - JSGlobalData* m_globalData; + VM* m_vm; int m_thisRegister; int m_argumentsRegister; int m_activationRegister; + int m_globalObjectRegister; bool m_needsFullScopeChain : 1; bool m_usesEval : 1; @@ -510,8 +526,6 @@ private: WriteBarrier m_symbolTable; - Vector m_lineInfo; - Vector m_propertyAccessInstructions; #if ENABLE(BYTECODE_COMMENTS) @@ -523,6 +537,7 @@ private: unsigned m_putToBaseOperationCount; unsigned m_arrayProfileCount; unsigned m_arrayAllocationProfileCount; + unsigned m_objectAllocationProfileCount; unsigned m_valueProfileCount; unsigned m_llintCallLinkInfoCount; @@ -542,8 +557,9 @@ public: Vector m_immediateSwitchJumpTables; Vector m_characterSwitchJumpTables; Vector m_stringSwitchJumpTables; + RefPtr m_evalCodeCache; - // Expression info - present if debugging. + Vector m_expressionInfoFatPositions; }; private: @@ -564,8 +580,8 @@ public: typedef UnlinkedCodeBlock Base; protected: - UnlinkedGlobalCodeBlock(JSGlobalData* globalData, Structure* structure, CodeType codeType, const ExecutableInfo& info) - : Base(globalData, structure, codeType, info) + UnlinkedGlobalCodeBlock(VM* vm, Structure* structure, CodeType codeType, const ExecutableInfo& info) + : Base(vm, structure, codeType, info) { } @@ -577,10 +593,10 @@ protected: class UnlinkedProgramCodeBlock : public UnlinkedGlobalCodeBlock { private: friend class CodeCache; - static UnlinkedProgramCodeBlock* create(JSGlobalData* globalData, const ExecutableInfo& info) + static UnlinkedProgramCodeBlock* create(VM* vm, const ExecutableInfo& info) { - UnlinkedProgramCodeBlock* instance = new (NotNull, allocateCell(globalData->heap)) UnlinkedProgramCodeBlock(globalData, globalData->unlinkedProgramCodeBlockStructure.get(), info); - instance->finishCreation(*globalData); + UnlinkedProgramCodeBlock* instance = new (NotNull, allocateCell(vm->heap)) UnlinkedProgramCodeBlock(vm, vm->unlinkedProgramCodeBlockStructure.get(), info); + instance->finishCreation(*vm); return instance; } @@ -588,9 +604,9 @@ public: typedef UnlinkedGlobalCodeBlock Base; static void destroy(JSCell*); - void addFunctionDeclaration(JSGlobalData& globalData, const Identifier& name, UnlinkedFunctionExecutable* functionExecutable) + void addFunctionDeclaration(VM& vm, const Identifier& name, UnlinkedFunctionExecutable* functionExecutable) { - m_functionDeclarations.append(std::make_pair(name, WriteBarrier(globalData, this, functionExecutable))); + m_functionDeclarations.append(std::make_pair(name, WriteBarrier(vm, this, functionExecutable))); } void addVariableDeclaration(const Identifier& name, bool isConstant) @@ -607,8 +623,8 @@ public: static void visitChildren(JSCell*, SlotVisitor&); private: - UnlinkedProgramCodeBlock(JSGlobalData* globalData, Structure* structure, const ExecutableInfo& info) - : Base(globalData, structure, GlobalCode, info) + UnlinkedProgramCodeBlock(VM* vm, Structure* structure, const ExecutableInfo& info) + : Base(vm, structure, GlobalCode, info) { } @@ -616,9 +632,9 @@ private: FunctionDeclations m_functionDeclarations; public: - static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(UnlinkedProgramCodeBlockType, StructureFlags), &s_info); + return Structure::create(vm, globalObject, proto, TypeInfo(UnlinkedProgramCodeBlockType, StructureFlags), &s_info); } static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags; @@ -630,10 +646,10 @@ class UnlinkedEvalCodeBlock : public UnlinkedGlobalCodeBlock { private: friend class CodeCache; - static UnlinkedEvalCodeBlock* create(JSGlobalData* globalData, const ExecutableInfo& info) + static UnlinkedEvalCodeBlock* create(VM* vm, const ExecutableInfo& info) { - UnlinkedEvalCodeBlock* instance = new (NotNull, allocateCell(globalData->heap)) UnlinkedEvalCodeBlock(globalData, globalData->unlinkedEvalCodeBlockStructure.get(), info); - instance->finishCreation(*globalData); + UnlinkedEvalCodeBlock* instance = new (NotNull, allocateCell(vm->heap)) UnlinkedEvalCodeBlock(vm, vm->unlinkedEvalCodeBlockStructure.get(), info); + instance->finishCreation(*vm); return instance; } @@ -643,24 +659,24 @@ public: const Identifier& variable(unsigned index) { return m_variables[index]; } unsigned numVariables() { return m_variables.size(); } - void adoptVariables(Vector& variables) + void adoptVariables(Vector& variables) { ASSERT(m_variables.isEmpty()); m_variables.swap(variables); } private: - UnlinkedEvalCodeBlock(JSGlobalData* globalData, Structure* structure, const ExecutableInfo& info) - : Base(globalData, structure, EvalCode, info) + UnlinkedEvalCodeBlock(VM* vm, Structure* structure, const ExecutableInfo& info) + : Base(vm, structure, EvalCode, info) { } - Vector m_variables; + Vector m_variables; public: - static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(UnlinkedEvalCodeBlockType, StructureFlags), &s_info); + return Structure::create(vm, globalObject, proto, TypeInfo(UnlinkedEvalCodeBlockType, StructureFlags), &s_info); } static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags; @@ -669,30 +685,27 @@ public: }; class UnlinkedFunctionCodeBlock : public UnlinkedCodeBlock { -private: - friend class CodeCache; - - static UnlinkedFunctionCodeBlock* create(JSGlobalData* globalData, CodeType codeType, const ExecutableInfo& info) +public: + static UnlinkedFunctionCodeBlock* create(VM* vm, CodeType codeType, const ExecutableInfo& info) { - UnlinkedFunctionCodeBlock* instance = new (NotNull, allocateCell(globalData->heap)) UnlinkedFunctionCodeBlock(globalData, globalData->unlinkedFunctionCodeBlockStructure.get(), codeType, info); - instance->finishCreation(*globalData); + UnlinkedFunctionCodeBlock* instance = new (NotNull, allocateCell(vm->heap)) UnlinkedFunctionCodeBlock(vm, vm->unlinkedFunctionCodeBlockStructure.get(), codeType, info); + instance->finishCreation(*vm); return instance; } -public: typedef UnlinkedCodeBlock Base; static void destroy(JSCell*); private: - UnlinkedFunctionCodeBlock(JSGlobalData* globalData, Structure* structure, CodeType codeType, const ExecutableInfo& info) - : Base(globalData, structure, codeType, info) + UnlinkedFunctionCodeBlock(VM* vm, Structure* structure, CodeType codeType, const ExecutableInfo& info) + : Base(vm, structure, codeType, info) { } public: - static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) + static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { - return Structure::create(globalData, globalObject, proto, TypeInfo(UnlinkedFunctionCodeBlockType, StructureFlags), &s_info); + return Structure::create(vm, globalObject, proto, TypeInfo(UnlinkedFunctionCodeBlockType, StructureFlags), &s_info); } static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags; diff --git a/Source/JavaScriptCore/bytecode/ValueProfile.h b/Source/JavaScriptCore/bytecode/ValueProfile.h index e56e6eb6e..028c1f696 100644 --- a/Source/JavaScriptCore/bytecode/ValueProfile.h +++ b/Source/JavaScriptCore/bytecode/ValueProfile.h @@ -39,6 +39,7 @@ #include "Structure.h" #include "WriteBarrier.h" #include +#include namespace JSC { @@ -110,6 +111,20 @@ struct ValueProfileBase { return false; } + CString briefDescription() + { + computeUpdatedPrediction(); + + StringPrintStream out; + + if (m_singletonValueIsTop) + out.print("predicting ", SpeculationDump(m_prediction)); + else if (m_singletonValue) + out.print("predicting ", m_singletonValue); + + return out.toCString(); + } + void dump(PrintStream& out) { out.print("samples = ", totalNumberOfSamples(), " prediction = ", SpeculationDump(m_prediction)); @@ -117,7 +132,7 @@ struct ValueProfileBase { if (m_singletonValueIsTop) out.printf("TOP"); else - out.printf("%s", m_singletonValue.description()); + out.print(m_singletonValue); bool first = true; for (unsigned i = 0; i < totalNumberOfBuckets; ++i) { JSValue value = JSValue::decode(m_buckets[i]); @@ -127,7 +142,7 @@ struct ValueProfileBase { first = false; } else out.printf(", "); - out.printf("%s", value.description()); + out.print(value); } } } diff --git a/Source/JavaScriptCore/bytecode/ValueRecovery.h b/Source/JavaScriptCore/bytecode/ValueRecovery.h index fc991a413..77d5a1030 100644 --- a/Source/JavaScriptCore/bytecode/ValueRecovery.h +++ b/Source/JavaScriptCore/bytecode/ValueRecovery.h @@ -27,7 +27,7 @@ #define ValueRecovery_h #include "DataFormat.h" -#include "JSValue.h" +#include "JSCJSValue.h" #include "MacroAssembler.h" #include "VirtualRegister.h" #include @@ -331,7 +331,7 @@ public: out.printf("arguments"); break; case Constant: - out.printf("[%s]", constant().description()); + out.print("[", constant(), "]"); break; case DontKnow: out.printf("!"); diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 507241696..b4e3d3de8 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2009, 2012 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009, 2012, 2013 Apple Inc. All rights reserved. * Copyright (C) 2008 Cameron Zwarich * Copyright (C) 2012 Igalia, S.L. * @@ -32,95 +32,21 @@ #include "BytecodeGenerator.h" #include "BatchedTransitionOptimizer.h" -#include "Comment.h" #include "Interpreter.h" #include "JSActivation.h" #include "JSFunction.h" #include "JSNameScope.h" #include "LowLevelInterpreter.h" +#include "Operations.h" #include "Options.h" #include "StrongInlines.h" +#include "UnlinkedCodeBlock.h" #include using namespace std; namespace JSC { -/* - The layout of a register frame looks like this: - - For - - function f(x, y) { - var v1; - function g() { } - var v2; - return (x) * (y); - } - - assuming (x) and (y) generated temporaries t1 and t2, you would have - - ------------------------------------ - | x | y | g | v2 | v1 | t1 | t2 | <-- value held - ------------------------------------ - | -5 | -4 | -3 | -2 | -1 | +0 | +1 | <-- register index - ------------------------------------ - | params->|<-locals | temps-> - - Because temporary registers are allocated in a stack-like fashion, we - can reclaim them with a simple popping algorithm. The same goes for labels. - (We never reclaim parameter or local registers, because parameters and - locals are DontDelete.) - - The register layout before a function call looks like this: - - For - - function f(x, y) - { - } - - f(1); - - > <------------------------------ - < > reserved: call frame | 1 | <-- value held - > >snip< <------------------------------ - < > +0 | +1 | +2 | +3 | +4 | +5 | <-- register index - > <------------------------------ - | params->|<-locals | temps-> - - The call instruction fills in the "call frame" registers. It also pads - missing arguments at the end of the call: - - > <----------------------------------- - < > reserved: call frame | 1 | ? | <-- value held ("?" stands for "undefined") - > >snip< <----------------------------------- - < > +0 | +1 | +2 | +3 | +4 | +5 | +6 | <-- register index - > <----------------------------------- - | params->|<-locals | temps-> - - After filling in missing arguments, the call instruction sets up the new - stack frame to overlap the end of the old stack frame: - - |----------------------------------> < - | reserved: call frame | 1 | ? < > <-- value held ("?" stands for "undefined") - |----------------------------------> >snip< < - | -7 | -6 | -5 | -4 | -3 | -2 | -1 < > <-- register index - |----------------------------------> < - | | params->|<-locals | temps-> - - That way, arguments are "copied" into the callee's stack frame for free. - - If the caller supplies too many arguments, this trick doesn't work. The - extra arguments protrude into space reserved for locals and temporaries. - In that case, the call instruction makes a real copy of the call frame header, - along with just the arguments expected by the callee, leaving the original - call frame header and arguments behind. (The call instruction can't just discard - extra arguments, because the "arguments" object may access them later.) - This copying strategy ensures that all named values will be at the indices - expected by the callee. -*/ - void Label::setLocation(unsigned location) { m_location = location; @@ -141,8 +67,12 @@ void ResolveResult::checkValidity() case Dynamic: ASSERT(!m_local); return; + case Lexical: + case ReadOnlyLexical: + ASSERT(!m_local); + return; default: - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } } #endif @@ -154,7 +84,9 @@ ParserError BytecodeGenerator::generate() m_codeBlock->setThisRegister(m_thisRegister.index()); m_scopeNode->emitBytecode(*this); - + + m_staticPropertyAnalyzer.kill(); + for (unsigned i = 0; i < m_tryRanges.size(); ++i) { TryRange& range = m_tryRanges[i]; int start = range.start->bind(); @@ -199,8 +131,8 @@ ParserError BytecodeGenerator::generate() m_codeBlock->shrinkToFit(); if (m_expressionTooDeep) - return ParserError::OutOfMemory; - return ParserError::ErrorNone; + return ParserError(ParserError::OutOfMemory); + return ParserError(ParserError::ErrorNone); } bool BytecodeGenerator::addVar(const Identifier& ident, bool isConstant, RegisterID*& r0) @@ -224,17 +156,15 @@ void BytecodeGenerator::preserveLastVar() m_lastVar = &m_calleeRegisters.last(); } -BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, ProgramNode* programNode, UnlinkedProgramCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode) +BytecodeGenerator::BytecodeGenerator(VM& vm, JSScope*, ProgramNode* programNode, UnlinkedProgramCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode) : m_shouldEmitDebugHooks(debuggerMode == DebuggerOn) , m_shouldEmitProfileHooks(profilerMode == ProfilerOn) -#if ENABLE(BYTECODE_COMMENTS) - , m_currentCommentString(0) -#endif , m_symbolTable(0) , m_scopeNode(programNode) - , m_codeBlock(globalData, codeBlock) + , m_codeBlock(vm, codeBlock) , m_thisRegister(CallFrame::thisArgumentOffset()) , m_emptyValueRegister(0) + , m_globalObjectRegister(0) , m_finallyDepth(0) , m_dynamicScopeDepth(0) , m_codeType(GlobalCode) @@ -243,12 +173,13 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, ProgramNode* prog , m_hasCreatedActivation(true) , m_firstLazyFunction(0) , m_lastLazyFunction(0) - , m_globalData(&globalData) + , m_staticPropertyAnalyzer(&m_instructions) + , m_vm(&vm) , m_lastOpcodeID(op_end) #ifndef NDEBUG , m_lastOpcodePosition(0) #endif - , m_stack(wtfThreadData().stack()) + , m_stack(vm, wtfThreadData().stack()) , m_usesExceptions(false) , m_expressionTooDeep(false) { @@ -257,7 +188,6 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, ProgramNode* prog m_codeBlock->setNumParameters(1); // Allocate space for "this" - prependComment("entering Program block"); emitOpcode(op_enter); const VarStack& varStack = programNode->varStack(); @@ -266,7 +196,7 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, ProgramNode* prog for (size_t i = 0; i < functionStack.size(); ++i) { FunctionBodyNode* function = functionStack[i]; UnlinkedFunctionExecutable* unlinkedFunction = makeFunction(function); - codeBlock->addFunctionDeclaration(*m_globalData, function->ident(), unlinkedFunction); + codeBlock->addFunctionDeclaration(*m_vm, function->ident(), unlinkedFunction); } for (size_t i = 0; i < varStack.size(); ++i) @@ -274,17 +204,16 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, ProgramNode* prog } -BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* functionBody, UnlinkedFunctionCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode) +BytecodeGenerator::BytecodeGenerator(VM& vm, JSScope* scope, FunctionBodyNode* functionBody, UnlinkedFunctionCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode) : m_shouldEmitDebugHooks(debuggerMode == DebuggerOn) , m_shouldEmitProfileHooks(profilerMode == ProfilerOn) , m_symbolTable(codeBlock->symbolTable()) -#if ENABLE(BYTECODE_COMMENTS) - , m_currentCommentString(0) -#endif , m_scopeNode(functionBody) - , m_codeBlock(globalData, codeBlock) + , m_scope(vm, scope) + , m_codeBlock(vm, codeBlock) , m_activationRegister(0) , m_emptyValueRegister(0) + , m_globalObjectRegister(0) , m_finallyDepth(0) , m_dynamicScopeDepth(0) , m_codeType(FunctionCode) @@ -293,12 +222,13 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* , m_hasCreatedActivation(false) , m_firstLazyFunction(0) , m_lastLazyFunction(0) - , m_globalData(&globalData) + , m_staticPropertyAnalyzer(&m_instructions) + , m_vm(&vm) , m_lastOpcodeID(op_end) #ifndef NDEBUG , m_lastOpcodePosition(0) #endif - , m_stack(wtfThreadData().stack()) + , m_stack(vm, wtfThreadData().stack()) , m_usesExceptions(false) , m_expressionTooDeep(false) { @@ -308,11 +238,9 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* m_symbolTable->setUsesNonStrictEval(codeBlock->usesEval() && !codeBlock->isStrictMode()); m_symbolTable->setParameterCountIncludingThis(functionBody->parameters()->size() + 1); - prependComment("entering Function block"); emitOpcode(op_enter); if (m_codeBlock->needsFullScopeChain()) { m_activationRegister = addVar(); - prependComment("activation for Full Scope Chain"); emitInitLazyRegister(m_activationRegister); m_codeBlock->setActivationRegister(m_activationRegister->index()); } @@ -329,13 +257,10 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* codeBlock->setArgumentsRegister(argumentsRegister->index()); ASSERT_UNUSED(unmodifiedArgumentsRegister, unmodifiedArgumentsRegister->index() == JSC::unmodifiedArgumentsRegister(codeBlock->argumentsRegister())); - prependComment("arguments for Full Scope Chain"); emitInitLazyRegister(argumentsRegister); - prependComment("unmodified arguments for Full Scope Chain"); emitInitLazyRegister(unmodifiedArgumentsRegister); if (m_codeBlock->isStrictMode()) { - prependComment("create arguments for strict mode"); emitOpcode(op_create_arguments); instructions().append(argumentsRegister->index()); } @@ -344,7 +269,6 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* // it from a call frame. In the long-term it should stop doing that (), // but for now we force eager creation of the arguments object when debugging. if (m_shouldEmitDebugHooks) { - prependComment("create arguments for debug hooks"); emitOpcode(op_create_arguments); instructions().append(argumentsRegister->index()); } @@ -353,13 +277,13 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* bool shouldCaptureAllTheThings = m_shouldEmitDebugHooks || codeBlock->usesEval(); bool capturesAnyArgumentByName = false; - Vector capturedArguments; + Vector capturedArguments; if (functionBody->hasCapturedVariables() || shouldCaptureAllTheThings) { FunctionParameters& parameters = *functionBody->parameters(); capturedArguments.resize(parameters.size()); for (size_t i = 0; i < parameters.size(); ++i) { capturedArguments[i] = 0; - if (!functionBody->captures(parameters[i]) && !shouldCaptureAllTheThings) + if (!functionBody->captures(parameters.at(i)) && !shouldCaptureAllTheThings) continue; capturesAnyArgumentByName = true; capturedArguments[i] = addVar(); @@ -396,12 +320,10 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* if (functionBody->captures(ident)) { if (!m_hasCreatedActivation) { m_hasCreatedActivation = true; - prependComment("activation for captured vars"); emitOpcode(op_create_activation); instructions().append(m_activationRegister->index()); } m_functions.add(ident.impl()); - prependComment("captured function var"); emitNewFunction(addVar(ident, false), function); } } @@ -414,7 +336,6 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* bool canLazilyCreateFunctions = !functionBody->needsActivationForMoreThanVariables() && !m_shouldEmitDebugHooks; if (!canLazilyCreateFunctions && !m_hasCreatedActivation) { m_hasCreatedActivation = true; - prependComment("cannot lazily create functions"); emitOpcode(op_create_activation); instructions().append(m_activationRegister->index()); } @@ -430,7 +351,6 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* RefPtr reg = addVar(ident, false); // Don't lazily create functions that override the name 'arguments' // as this would complicate lazy instantiation of actual arguments. - prependComment("a function that override 'arguments'"); if (!canLazilyCreateFunctions || ident == propertyNames().arguments) emitNewFunction(reg.get(), function); else { @@ -460,12 +380,12 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* for (size_t i = 0; i < parameters.size(); ++i, --nextParameterIndex) { int index = nextParameterIndex; if (capturedArguments.size() && capturedArguments[i]) { - ASSERT((functionBody->hasCapturedVariables() && functionBody->captures(parameters[i])) || shouldCaptureAllTheThings); + ASSERT((functionBody->hasCapturedVariables() && functionBody->captures(parameters.at(i))) || shouldCaptureAllTheThings); index = capturedArguments[i]->index(); RegisterID original(nextParameterIndex); emitMove(capturedArguments[i], &original); } - addParameter(parameters[i], index); + addParameter(parameters.at(i), index); } preserveLastVar(); @@ -473,35 +393,24 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, FunctionBodyNode* addCallee(functionBody, calleeRegister); if (isConstructor()) { - prependComment("'this' because we are a Constructor function"); - - RefPtr func = newTemporary(); - - UnlinkedValueProfile profile = emitProfiledOpcode(op_get_callee); - instructions().append(func->index()); - instructions().append(profile); - - emitOpcode(op_create_this); - instructions().append(m_thisRegister.index()); - instructions().append(func->index()); + emitCreateThis(&m_thisRegister); } else if (!codeBlock->isStrictMode() && (functionBody->usesThis() || codeBlock->usesEval() || m_shouldEmitDebugHooks)) { UnlinkedValueProfile profile = emitProfiledOpcode(op_convert_this); - instructions().append(m_thisRegister.index()); + instructions().append(kill(&m_thisRegister)); instructions().append(profile); } } -BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, EvalNode* evalNode, UnlinkedEvalCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode) +BytecodeGenerator::BytecodeGenerator(VM& vm, JSScope* scope, EvalNode* evalNode, UnlinkedEvalCodeBlock* codeBlock, DebuggerMode debuggerMode, ProfilerMode profilerMode) : m_shouldEmitDebugHooks(debuggerMode == DebuggerOn) , m_shouldEmitProfileHooks(profilerMode == ProfilerOn) , m_symbolTable(codeBlock->symbolTable()) -#if ENABLE(BYTECODE_COMMENTS) - , m_currentCommentString(0) -#endif , m_scopeNode(evalNode) - , m_codeBlock(globalData, codeBlock) + , m_scope(vm, scope) + , m_codeBlock(vm, codeBlock) , m_thisRegister(CallFrame::thisArgumentOffset()) , m_emptyValueRegister(0) + , m_globalObjectRegister(0) , m_finallyDepth(0) , m_dynamicScopeDepth(0) , m_codeType(EvalCode) @@ -510,12 +419,13 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, EvalNode* evalNod , m_hasCreatedActivation(true) , m_firstLazyFunction(0) , m_lastLazyFunction(0) - , m_globalData(&globalData) + , m_staticPropertyAnalyzer(&m_instructions) + , m_vm(&vm) , m_lastOpcodeID(op_end) #ifndef NDEBUG , m_lastOpcodePosition(0) #endif - , m_stack(wtfThreadData().stack()) + , m_stack(vm, wtfThreadData().stack()) , m_usesExceptions(false) , m_expressionTooDeep(false) { @@ -524,7 +434,6 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, EvalNode* evalNod m_symbolTable->setUsesNonStrictEval(codeBlock->usesEval() && !codeBlock->isStrictMode()); m_codeBlock->setNumParameters(1); - prependComment("entering Eval block"); emitOpcode(op_enter); const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack(); @@ -533,7 +442,7 @@ BytecodeGenerator::BytecodeGenerator(JSGlobalData& globalData, EvalNode* evalNod const DeclarationStacks::VarStack& varStack = evalNode->varStack(); unsigned numVariables = varStack.size(); - Vector variables; + Vector variables; variables.reserveCapacity(numVariables); for (size_t i = 0; i < numVariables; ++i) variables.append(*varStack[i].first); @@ -656,7 +565,7 @@ RegisterID* BytecodeGenerator::newTemporary() return result; } -PassRefPtr BytecodeGenerator::newLabelScope(LabelScope::Type type, const Identifier* name) +LabelScopePtr BytecodeGenerator::newLabelScope(LabelScope::Type type, const Identifier* name) { // Reclaim free label scopes. while (m_labelScopes.size() && !m_labelScopes.last().refCount()) @@ -665,7 +574,7 @@ PassRefPtr BytecodeGenerator::newLabelScope(LabelScope::Type type, c // Allocate new label scope. LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr