From 2bde8e466a4451c7319e3a072d118917957d6554 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 25 May 2011 19:08:45 +0100 Subject: Merge WebKit at r82507: Initial merge by git Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e --- Source/JavaScriptCore/API/APIShims.h | 2 +- Source/JavaScriptCore/API/JSBase.h | 5 + Source/JavaScriptCore/API/JSCallbackConstructor.h | 4 +- Source/JavaScriptCore/API/JSCallbackFunction.h | 4 +- Source/JavaScriptCore/API/JSCallbackObject.h | 4 +- Source/JavaScriptCore/API/JSClassRef.cpp | 10 +- Source/JavaScriptCore/API/JSClassRef.h | 2 +- Source/JavaScriptCore/API/JSContextRef.cpp | 4 +- Source/JavaScriptCore/API/JSObjectRef.cpp | 6 +- .../API/JSWeakObjectMapRefPrivate.cpp | 11 +- .../JavaScriptCore/API/JSWeakObjectMapRefPrivate.h | 11 - Source/JavaScriptCore/API/OpaqueJSString.h | 4 +- Source/JavaScriptCore/CMakeLists.txt | 1 + Source/JavaScriptCore/ChangeLog | 3315 ++++++++++++++++++++ Source/JavaScriptCore/Configurations/Base.xcconfig | 14 +- .../JavaScriptCore/Configurations/Version.xcconfig | 2 +- Source/JavaScriptCore/DerivedSources.make | 1 - Source/JavaScriptCore/GNUmakefile.am | 7 +- Source/JavaScriptCore/JavaScriptCore.exp | 27 +- Source/JavaScriptCore/JavaScriptCore.gypi | 61 +- Source/JavaScriptCore/JavaScriptCore.pri | 1 + Source/JavaScriptCore/JavaScriptCore.pro | 10 +- .../JavaScriptCore.vcproj/JavaScriptCore.make | 1 - .../JavaScriptCore.vcproj/JavaScriptCore.sln | 22 +- .../JavaScriptCore/JavaScriptCore.def | 22 +- .../JavaScriptCore/JavaScriptCore.vcproj | 34 +- .../JavaScriptCore/JavaScriptCoreDebug.vsprops | 13 + .../JavaScriptCore/JavaScriptCoreDebugAll.vsprops | 14 + .../JavaScriptCoreDebugCairoCFLite.vsprops | 14 + .../JavaScriptCore/JavaScriptCoreGenerated.vcproj | 2 +- .../JavaScriptCoreProduction.vsprops | 14 + .../JavaScriptCore/JavaScriptCoreRelease.vsprops | 13 + .../JavaScriptCoreReleaseCairoCFLite.vsprops | 14 + .../JavaScriptCoreReleasePGO.vsprops | 14 + .../JavaScriptCoreReleasePGOOptimize.vsprops | 15 + .../JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln | 18 +- .../JavaScriptCore.vcproj/WTF/WTF.vcproj | 24 +- .../JavaScriptCore.vcproj/WTF/WTFDebug.vsprops | 12 + .../JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops | 13 + .../WTF/WTFDebugCairoCFLite.vsprops | 13 + .../WTF/WTFProduction.vsprops | 13 + .../JavaScriptCore.vcproj/WTF/WTFRelease.vsprops | 12 + .../WTF/WTFReleaseCairoCFLite.vsprops | 13 + .../WTF/WTFReleasePGO.vsprops | 13 + .../JavaScriptCore.vcproj/jsc/jsc.vcproj | 16 +- .../JavaScriptCore.vcproj/jsc/jscDebug.vsprops | 11 + .../JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops | 12 + .../jsc/jscDebugCairoCFLite.vsprops | 12 + .../jsc/jscProduction.vsprops | 12 + .../JavaScriptCore.vcproj/jsc/jscRelease.vsprops | 11 + .../jsc/jscReleaseCairoCFLite.vsprops | 12 + .../jsc/jscReleasePGO.vsprops | 12 + .../JavaScriptCore.vcproj/testapi/testapi.vcproj | 16 +- .../testapi/testapiDebug.vsprops | 12 + .../testapi/testapiDebugAll.vsprops | 13 + .../testapi/testapiDebugCairoCFLite.vsprops | 13 + .../testapi/testapiProduction.vsprops | 13 + .../testapi/testapiRelease.vsprops | 12 + .../testapi/testapiReleaseCairoCFLite.vsprops | 13 + .../JavaScriptCore.xcodeproj/project.pbxproj | 116 +- Source/JavaScriptCore/Makefile | 1 - .../assembler/AbstractMacroAssembler.h | 44 +- Source/JavaScriptCore/assembler/AssemblerBuffer.h | 15 + .../assembler/AssemblerBufferWithConstantPool.h | 56 +- Source/JavaScriptCore/assembler/MacroAssembler.h | 66 +- .../JavaScriptCore/assembler/MacroAssemblerARM.h | 90 +- .../JavaScriptCore/assembler/MacroAssemblerARMv7.h | 148 +- .../assembler/MacroAssemblerCodeRef.h | 46 +- .../JavaScriptCore/assembler/MacroAssemblerMIPS.h | 126 +- .../JavaScriptCore/assembler/MacroAssemblerX86.h | 24 +- .../assembler/MacroAssemblerX86Common.h | 385 ++- .../assembler/MacroAssemblerX86_64.h | 99 +- Source/JavaScriptCore/assembler/X86Assembler.h | 49 +- Source/JavaScriptCore/bytecode/CodeBlock.cpp | 73 +- Source/JavaScriptCore/bytecode/CodeBlock.h | 131 +- Source/JavaScriptCore/bytecode/EvalCodeCache.h | 16 +- Source/JavaScriptCore/bytecode/Instruction.h | 45 +- Source/JavaScriptCore/bytecode/SamplingTool.h | 9 +- .../JavaScriptCore/bytecode/StructureStubInfo.cpp | 39 +- Source/JavaScriptCore/bytecode/StructureStubInfo.h | 3 +- .../bytecompiler/BytecodeGenerator.cpp | 80 +- .../bytecompiler/BytecodeGenerator.h | 16 +- .../JavaScriptCore/bytecompiler/NodesCodegen.cpp | 5 +- Source/JavaScriptCore/collector/handles/Handle.h | 14 + .../collector/handles/HandleHeap.cpp | 9 +- .../JavaScriptCore/collector/handles/HandleHeap.h | 4 +- .../collector/handles/HandleStack.cpp | 63 + .../JavaScriptCore/collector/handles/HandleStack.h | 129 + Source/JavaScriptCore/collector/handles/Local.h | 157 + .../JavaScriptCore/collector/handles/LocalScope.h | 78 + Source/JavaScriptCore/config.h | 23 + Source/JavaScriptCore/debugger/Debugger.cpp | 24 +- .../JavaScriptCore/debugger/DebuggerActivation.cpp | 2 +- .../JavaScriptCore/debugger/DebuggerActivation.h | 4 +- .../JavaScriptCore/debugger/DebuggerCallFrame.cpp | 17 +- Source/JavaScriptCore/dfg/DFGAliasTracker.h | 121 + Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp | 744 +++++ Source/JavaScriptCore/dfg/DFGByteCodeParser.h | 47 + Source/JavaScriptCore/dfg/DFGGenerationInfo.h | 249 ++ Source/JavaScriptCore/dfg/DFGGraph.cpp | 141 + Source/JavaScriptCore/dfg/DFGGraph.h | 69 + Source/JavaScriptCore/dfg/DFGJITCodeGenerator.cpp | 563 ++++ Source/JavaScriptCore/dfg/DFGJITCodeGenerator.h | 955 ++++++ Source/JavaScriptCore/dfg/DFGJITCompiler.cpp | 429 +++ Source/JavaScriptCore/dfg/DFGJITCompiler.h | 325 ++ Source/JavaScriptCore/dfg/DFGNode.h | 293 ++ Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp | 585 ++++ Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.h | 211 ++ Source/JavaScriptCore/dfg/DFGOperations.cpp | 220 ++ Source/JavaScriptCore/dfg/DFGOperations.h | 83 + Source/JavaScriptCore/dfg/DFGRegisterBank.h | 253 ++ Source/JavaScriptCore/dfg/DFGScoreBoard.h | 127 + Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp | 663 ++++ Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h | 356 +++ Source/JavaScriptCore/gyp/JavaScriptCore.gyp | 168 +- .../JavaScriptCore/gyp/generate-dtrace-header.sh | 9 + Source/JavaScriptCore/gyp/run-if-exists.sh | 5 + Source/JavaScriptCore/gyp/update-info-plist.sh | 4 + Source/JavaScriptCore/interpreter/CachedCall.h | 2 +- Source/JavaScriptCore/interpreter/CallFrame.h | 2 +- Source/JavaScriptCore/interpreter/Interpreter.cpp | 55 +- Source/JavaScriptCore/interpreter/Register.h | 66 +- Source/JavaScriptCore/interpreter/RegisterFile.cpp | 11 + Source/JavaScriptCore/interpreter/RegisterFile.h | 8 +- Source/JavaScriptCore/jit/JIT.cpp | 31 +- Source/JavaScriptCore/jit/JIT.h | 5 +- Source/JavaScriptCore/jit/JITArithmetic.cpp | 18 +- Source/JavaScriptCore/jit/JITArithmetic32_64.cpp | 160 +- Source/JavaScriptCore/jit/JITCall.cpp | 29 +- Source/JavaScriptCore/jit/JITCall32_64.cpp | 49 +- Source/JavaScriptCore/jit/JITInlineMethods.h | 92 +- Source/JavaScriptCore/jit/JITOpcodes.cpp | 235 +- Source/JavaScriptCore/jit/JITOpcodes32_64.cpp | 334 +- Source/JavaScriptCore/jit/JITPropertyAccess.cpp | 145 +- .../JavaScriptCore/jit/JITPropertyAccess32_64.cpp | 159 +- Source/JavaScriptCore/jit/JITStubCall.h | 4 +- Source/JavaScriptCore/jit/JITStubs.cpp | 57 +- Source/JavaScriptCore/jit/JITStubs.h | 13 +- Source/JavaScriptCore/jit/JSInterfaceJIT.h | 67 +- Source/JavaScriptCore/jit/SpecializedThunkJIT.h | 16 +- Source/JavaScriptCore/jit/ThunkGenerators.cpp | 10 +- Source/JavaScriptCore/jsc.cpp | 10 +- Source/JavaScriptCore/jsc.pro | 4 + Source/JavaScriptCore/profiler/CallIdentifier.h | 2 +- .../JavaScriptCore/profiler/ProfileGenerator.cpp | 18 +- Source/JavaScriptCore/profiler/ProfileGenerator.h | 9 +- Source/JavaScriptCore/profiler/Profiler.cpp | 25 +- Source/JavaScriptCore/profiler/Profiler.h | 2 + Source/JavaScriptCore/runtime/ArgList.cpp | 9 +- Source/JavaScriptCore/runtime/ArgList.h | 2 +- Source/JavaScriptCore/runtime/Arguments.h | 14 +- Source/JavaScriptCore/runtime/ArrayConstructor.cpp | 6 +- Source/JavaScriptCore/runtime/ArrayPrototype.cpp | 106 +- Source/JavaScriptCore/runtime/ArrayPrototype.h | 4 +- .../JavaScriptCore/runtime/BooleanConstructor.cpp | 6 +- Source/JavaScriptCore/runtime/BooleanConstructor.h | 2 +- Source/JavaScriptCore/runtime/BooleanObject.cpp | 4 +- Source/JavaScriptCore/runtime/BooleanObject.h | 4 +- Source/JavaScriptCore/runtime/Completion.cpp | 14 +- Source/JavaScriptCore/runtime/ConservativeSet.cpp | 25 +- Source/JavaScriptCore/runtime/ConservativeSet.h | 57 +- Source/JavaScriptCore/runtime/DateConstructor.cpp | 6 +- Source/JavaScriptCore/runtime/DateConstructor.h | 2 +- Source/JavaScriptCore/runtime/DateConversion.cpp | 1 + Source/JavaScriptCore/runtime/DateInstance.cpp | 11 +- Source/JavaScriptCore/runtime/DateInstance.h | 8 +- Source/JavaScriptCore/runtime/DatePrototype.h | 6 +- Source/JavaScriptCore/runtime/ErrorConstructor.cpp | 4 +- Source/JavaScriptCore/runtime/ErrorInstance.h | 4 +- Source/JavaScriptCore/runtime/Executable.cpp | 68 +- Source/JavaScriptCore/runtime/Executable.h | 77 +- .../JavaScriptCore/runtime/FunctionConstructor.cpp | 13 +- .../JavaScriptCore/runtime/FunctionConstructor.h | 4 +- Source/JavaScriptCore/runtime/FunctionPrototype.h | 4 +- .../runtime/GCActivityCallbackCF.cpp | 1 + Source/JavaScriptCore/runtime/GetterSetter.h | 4 +- Source/JavaScriptCore/runtime/Heap.cpp | 66 +- Source/JavaScriptCore/runtime/Heap.h | 21 +- Source/JavaScriptCore/runtime/Identifier.cpp | 9 +- Source/JavaScriptCore/runtime/InternalFunction.h | 4 +- Source/JavaScriptCore/runtime/JSAPIValueWrapper.h | 4 +- Source/JavaScriptCore/runtime/JSActivation.cpp | 59 +- Source/JavaScriptCore/runtime/JSActivation.h | 31 +- Source/JavaScriptCore/runtime/JSArray.cpp | 2 +- Source/JavaScriptCore/runtime/JSArray.h | 93 +- Source/JavaScriptCore/runtime/JSByteArray.cpp | 4 +- Source/JavaScriptCore/runtime/JSByteArray.h | 4 +- Source/JavaScriptCore/runtime/JSCell.cpp | 16 +- Source/JavaScriptCore/runtime/JSCell.h | 75 +- Source/JavaScriptCore/runtime/JSFunction.cpp | 40 +- Source/JavaScriptCore/runtime/JSFunction.h | 13 +- Source/JavaScriptCore/runtime/JSGlobalData.cpp | 82 +- Source/JavaScriptCore/runtime/JSGlobalData.h | 17 +- Source/JavaScriptCore/runtime/JSGlobalObject.cpp | 317 +- Source/JavaScriptCore/runtime/JSGlobalObject.h | 270 +- .../runtime/JSGlobalObjectFunctions.cpp | 4 +- Source/JavaScriptCore/runtime/JSLock.cpp | 1 + Source/JavaScriptCore/runtime/JSNotAnObject.cpp | 2 +- Source/JavaScriptCore/runtime/JSNotAnObject.h | 6 +- Source/JavaScriptCore/runtime/JSNumberCell.cpp | 1 + Source/JavaScriptCore/runtime/JSONObject.cpp | 125 +- Source/JavaScriptCore/runtime/JSONObject.h | 6 +- Source/JavaScriptCore/runtime/JSObject.cpp | 12 +- Source/JavaScriptCore/runtime/JSObject.h | 44 +- .../runtime/JSObjectWithGlobalObject.h | 4 +- .../runtime/JSPropertyNameIterator.cpp | 6 +- .../runtime/JSPropertyNameIterator.h | 13 +- .../JavaScriptCore/runtime/JSStaticScopeObject.cpp | 9 +- .../JavaScriptCore/runtime/JSStaticScopeObject.h | 22 +- Source/JavaScriptCore/runtime/JSString.cpp | 12 +- Source/JavaScriptCore/runtime/JSString.h | 16 +- Source/JavaScriptCore/runtime/JSTypeInfo.h | 11 +- Source/JavaScriptCore/runtime/JSValue.cpp | 14 +- Source/JavaScriptCore/runtime/JSValue.h | 51 +- Source/JavaScriptCore/runtime/JSVariableObject.h | 47 +- Source/JavaScriptCore/runtime/JSWrapperObject.h | 19 +- Source/JavaScriptCore/runtime/JSZombie.cpp | 3 +- Source/JavaScriptCore/runtime/JSZombie.h | 4 +- .../JavaScriptCore/runtime/MachineStackMarker.cpp | 80 +- Source/JavaScriptCore/runtime/MachineStackMarker.h | 31 +- Source/JavaScriptCore/runtime/MarkStack.cpp | 89 +- Source/JavaScriptCore/runtime/MarkStack.h | 127 +- Source/JavaScriptCore/runtime/MarkedBlock.cpp | 2 + Source/JavaScriptCore/runtime/MarkedBlock.h | 12 +- Source/JavaScriptCore/runtime/MarkedSpace.cpp | 11 +- Source/JavaScriptCore/runtime/MarkedSpace.h | 17 +- Source/JavaScriptCore/runtime/MathObject.h | 4 +- .../runtime/NativeErrorConstructor.cpp | 2 +- .../runtime/NativeErrorConstructor.h | 4 +- .../JavaScriptCore/runtime/NumberConstructor.cpp | 2 +- Source/JavaScriptCore/runtime/NumberConstructor.h | 4 +- Source/JavaScriptCore/runtime/NumberObject.cpp | 8 +- Source/JavaScriptCore/runtime/NumberObject.h | 9 +- .../JavaScriptCore/runtime/ObjectConstructor.cpp | 10 +- Source/JavaScriptCore/runtime/ObjectConstructor.h | 4 +- .../JavaScriptCore/runtime/PropertyMapHashTable.h | 2 +- .../JavaScriptCore/runtime/PropertyNameArray.cpp | 1 + Source/JavaScriptCore/runtime/PutPropertySlot.h | 9 +- Source/JavaScriptCore/runtime/RegExp.cpp | 49 +- Source/JavaScriptCore/runtime/RegExp.h | 18 +- Source/JavaScriptCore/runtime/RegExpCache.cpp | 4 +- Source/JavaScriptCore/runtime/RegExpCache.h | 4 +- .../JavaScriptCore/runtime/RegExpConstructor.cpp | 22 +- Source/JavaScriptCore/runtime/RegExpConstructor.h | 6 +- Source/JavaScriptCore/runtime/RegExpKey.h | 49 +- Source/JavaScriptCore/runtime/RegExpObject.cpp | 44 +- Source/JavaScriptCore/runtime/RegExpObject.h | 32 +- Source/JavaScriptCore/runtime/RegExpPrototype.cpp | 20 +- Source/JavaScriptCore/runtime/ScopeChain.h | 15 +- Source/JavaScriptCore/runtime/SmallStrings.cpp | 35 +- Source/JavaScriptCore/runtime/SmallStrings.h | 20 +- .../JavaScriptCore/runtime/StringConstructor.cpp | 5 +- Source/JavaScriptCore/runtime/StringObject.cpp | 6 +- Source/JavaScriptCore/runtime/StringObject.h | 10 +- .../StringObjectThatMasqueradesAsUndefined.h | 6 +- Source/JavaScriptCore/runtime/StringPrototype.cpp | 19 +- Source/JavaScriptCore/runtime/StringPrototype.h | 10 +- Source/JavaScriptCore/runtime/Structure.h | 29 +- Source/JavaScriptCore/runtime/StructureChain.cpp | 3 +- Source/JavaScriptCore/runtime/StructureChain.h | 9 +- Source/JavaScriptCore/runtime/TimeoutChecker.cpp | 2 +- Source/JavaScriptCore/runtime/WriteBarrier.h | 54 +- .../tests/mozilla/js1_2/regexp/RegExp_input.js | 36 +- .../mozilla/js1_2/regexp/RegExp_input_as_array.js | 36 +- Source/JavaScriptCore/wtf/Assertions.cpp | 6 + Source/JavaScriptCore/wtf/Assertions.h | 16 +- Source/JavaScriptCore/wtf/Atomics.h | 8 +- Source/JavaScriptCore/wtf/CMakeLists.txt | 3 +- Source/JavaScriptCore/wtf/CrossThreadRefCounted.h | 12 +- Source/JavaScriptCore/wtf/DateMath.cpp | 9 +- Source/JavaScriptCore/wtf/ExportMacros.h | 46 + Source/JavaScriptCore/wtf/HexNumber.h | 107 + Source/JavaScriptCore/wtf/MathExtras.h | 11 +- Source/JavaScriptCore/wtf/MessageQueue.h | 2 +- Source/JavaScriptCore/wtf/Platform.h | 36 +- Source/JavaScriptCore/wtf/RefCounted.h | 12 +- Source/JavaScriptCore/wtf/StdLibExtras.h | 47 + Source/JavaScriptCore/wtf/StringHasher.h | 22 +- Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h | 149 + Source/JavaScriptCore/wtf/ThreadSafeShared.h | 148 - Source/JavaScriptCore/wtf/Threading.h | 2 +- Source/JavaScriptCore/wtf/ThreadingPthreads.cpp | 10 + Source/JavaScriptCore/wtf/Vector.h | 10 +- Source/JavaScriptCore/wtf/text/AtomicString.cpp | 8 +- Source/JavaScriptCore/wtf/text/StringConcatenate.h | 28 + Source/JavaScriptCore/wtf/text/StringHash.h | 4 +- Source/JavaScriptCore/wtf/text/StringImpl.h | 7 +- Source/JavaScriptCore/wtf/unicode/UTF8.cpp | 2 +- Source/JavaScriptCore/yarr/YarrInterpreter.cpp | 24 + Source/JavaScriptCore/yarr/YarrInterpreter.h | 8 + Source/JavaScriptCore/yarr/YarrJIT.cpp | 66 +- 291 files changed, 15040 insertions(+), 3242 deletions(-) create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebug.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFProduction.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFRelease.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebug.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebug.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops create mode 100644 Source/JavaScriptCore/collector/handles/HandleStack.cpp create mode 100644 Source/JavaScriptCore/collector/handles/HandleStack.h create mode 100644 Source/JavaScriptCore/collector/handles/Local.h create mode 100644 Source/JavaScriptCore/collector/handles/LocalScope.h create mode 100644 Source/JavaScriptCore/dfg/DFGAliasTracker.h create mode 100644 Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGByteCodeParser.h create mode 100644 Source/JavaScriptCore/dfg/DFGGenerationInfo.h create mode 100644 Source/JavaScriptCore/dfg/DFGGraph.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGGraph.h create mode 100644 Source/JavaScriptCore/dfg/DFGJITCodeGenerator.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGJITCodeGenerator.h create mode 100644 Source/JavaScriptCore/dfg/DFGJITCompiler.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGJITCompiler.h create mode 100644 Source/JavaScriptCore/dfg/DFGNode.h create mode 100644 Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.h create mode 100644 Source/JavaScriptCore/dfg/DFGOperations.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGOperations.h create mode 100644 Source/JavaScriptCore/dfg/DFGRegisterBank.h create mode 100644 Source/JavaScriptCore/dfg/DFGScoreBoard.h create mode 100644 Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp create mode 100644 Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h create mode 100755 Source/JavaScriptCore/gyp/generate-dtrace-header.sh create mode 100755 Source/JavaScriptCore/gyp/run-if-exists.sh create mode 100755 Source/JavaScriptCore/gyp/update-info-plist.sh create mode 100644 Source/JavaScriptCore/wtf/ExportMacros.h create mode 100644 Source/JavaScriptCore/wtf/HexNumber.h create mode 100644 Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h delete mode 100644 Source/JavaScriptCore/wtf/ThreadSafeShared.h (limited to 'Source/JavaScriptCore') diff --git a/Source/JavaScriptCore/API/APIShims.h b/Source/JavaScriptCore/API/APIShims.h index 26db2dc..2e13851 100644 --- a/Source/JavaScriptCore/API/APIShims.h +++ b/Source/JavaScriptCore/API/APIShims.h @@ -42,7 +42,7 @@ protected: UNUSED_PARAM(registerThread); #if ENABLE(JSC_MULTIPLE_THREADS) if (registerThread) - globalData->heap.machineStackMarker().registerThread(); + globalData->heap.machineThreads().addCurrentThread(); #endif m_globalData->heap.activityCallback()->synchronize(); m_globalData->timeoutChecker.start(); diff --git a/Source/JavaScriptCore/API/JSBase.h b/Source/JavaScriptCore/API/JSBase.h index d962b01..fed54fe 100644 --- a/Source/JavaScriptCore/API/JSBase.h +++ b/Source/JavaScriptCore/API/JSBase.h @@ -80,6 +80,11 @@ typedef struct OpaqueJSValue* JSObjectRef; #define JS_EXPORT #endif /* defined(JS_NO_EXPORT) */ +/* JS tests uses WTF but has no config.h, so we need to set the export defines here. */ +#ifndef WTF_EXPORT_PRIVATE +#define WTF_EXPORT_PRIVATE JS_EXPORT +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/Source/JavaScriptCore/API/JSCallbackConstructor.h b/Source/JavaScriptCore/API/JSCallbackConstructor.h index cd307a6..001c416 100644 --- a/Source/JavaScriptCore/API/JSCallbackConstructor.h +++ b/Source/JavaScriptCore/API/JSCallbackConstructor.h @@ -39,9 +39,9 @@ public: JSObjectCallAsConstructorCallback callback() const { return m_callback; } static const ClassInfo s_info; - static PassRefPtr createStructure(JSValue proto) + static PassRefPtr createStructure(JSGlobalData& globalData, JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: diff --git a/Source/JavaScriptCore/API/JSCallbackFunction.h b/Source/JavaScriptCore/API/JSCallbackFunction.h index d8ae608..11fb95c 100644 --- a/Source/JavaScriptCore/API/JSCallbackFunction.h +++ b/Source/JavaScriptCore/API/JSCallbackFunction.h @@ -39,9 +39,9 @@ public: // InternalFunction mish-mashes constructor and function behavior -- we should // refactor the code so this override isn't necessary - static PassRefPtr createStructure(JSValue proto) + static PassRefPtr createStructure(JSGlobalData& globalData, JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } private: diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h index 732cc1d..a0adb44 100644 --- a/Source/JavaScriptCore/API/JSCallbackObject.h +++ b/Source/JavaScriptCore/API/JSCallbackObject.h @@ -128,9 +128,9 @@ public: JSClassRef classRef() const { return m_callbackObjectData->jsClass; } bool inherits(JSClassRef) const; - static PassRefPtr createStructure(JSValue proto) + static PassRefPtr createStructure(JSGlobalData& globalData, JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount, &s_info); + return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount, &s_info); } JSValue getPrivateProperty(const Identifier& propertyName) const diff --git a/Source/JavaScriptCore/API/JSClassRef.cpp b/Source/JavaScriptCore/API/JSClassRef.cpp index d953dce..70668bd 100644 --- a/Source/JavaScriptCore/API/JSClassRef.cpp +++ b/Source/JavaScriptCore/API/JSClassRef.cpp @@ -84,8 +84,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* // Use a local variable here to sidestep an RVCT compiler bug. StaticValueEntry* entry = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes); StringImpl* impl = valueName.impl(); - impl->ref(); - m_staticValues->add(impl, entry); + StaticValueEntry* existingEntry = m_staticValues->get(impl); + m_staticValues->set(impl, entry); + delete existingEntry; } ++staticValue; } @@ -99,8 +100,9 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* // Use a local variable here to sidestep an RVCT compiler bug. StaticFunctionEntry* entry = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes); StringImpl* impl = functionName.impl(); - impl->ref(); - m_staticFunctions->add(impl, entry); + StaticFunctionEntry* existingEntry = m_staticFunctions->get(impl); + m_staticFunctions->set(impl, entry); + delete existingEntry; } ++staticFunction; } diff --git a/Source/JavaScriptCore/API/JSClassRef.h b/Source/JavaScriptCore/API/JSClassRef.h index 0f4119a..239c5a4 100644 --- a/Source/JavaScriptCore/API/JSClassRef.h +++ b/Source/JavaScriptCore/API/JSClassRef.h @@ -85,7 +85,7 @@ public: JSC::WeakGCPtr cachedPrototype; }; -struct OpaqueJSClass : public ThreadSafeShared { +struct OpaqueJSClass : public ThreadSafeRefCounted { static PassRefPtr create(const JSClassDefinition*); static PassRefPtr createNoAutomaticPrototype(const JSClassDefinition*); ~OpaqueJSClass(); diff --git a/Source/JavaScriptCore/API/JSContextRef.cpp b/Source/JavaScriptCore/API/JSContextRef.cpp index ccab953..e5c778f 100644 --- a/Source/JavaScriptCore/API/JSContextRef.cpp +++ b/Source/JavaScriptCore/API/JSContextRef.cpp @@ -93,11 +93,11 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass #endif if (!globalObjectClass) { - JSGlobalObject* globalObject = new (globalData.get()) JSGlobalObject; + JSGlobalObject* globalObject = new (globalData.get()) JSGlobalObject(*globalData); return JSGlobalContextRetain(toGlobalRef(globalObject->globalExec())); } - JSGlobalObject* globalObject = new (globalData.get()) JSCallbackObject(globalObjectClass, JSCallbackObject::createStructure(jsNull())); + JSGlobalObject* globalObject = new (globalData.get()) JSCallbackObject(globalObjectClass, JSCallbackObject::createStructure(*globalData, jsNull())); ExecState* exec = globalObject->globalExec(); JSValue prototype = globalObjectClass->prototype(exec); if (!prototype) diff --git a/Source/JavaScriptCore/API/JSObjectRef.cpp b/Source/JavaScriptCore/API/JSObjectRef.cpp index 36ca338..b7030e4 100644 --- a/Source/JavaScriptCore/API/JSObjectRef.cpp +++ b/Source/JavaScriptCore/API/JSObjectRef.cpp @@ -124,7 +124,7 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa args.append(jsString(exec, parameterNames[i]->ustring())); args.append(jsString(exec, body->ustring())); - JSObject* result = constructFunction(exec, args, nameID, sourceURL->ustring(), startingLineNumber); + JSObject* result = constructFunction(exec, exec->lexicalGlobalObject(), args, nameID, sourceURL->ustring(), startingLineNumber); if (exec->hadException()) { if (exception) *exception = toRef(exec, exec->exception()); @@ -168,7 +168,7 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal for (size_t i = 0; i < argumentCount; ++i) argList.append(toJS(exec, arguments[i])); - JSObject* result = constructDate(exec, argList); + JSObject* result = constructDate(exec, exec->lexicalGlobalObject(), argList); if (exec->hadException()) { if (exception) *exception = toRef(exec, exec->exception()); @@ -207,7 +207,7 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV for (size_t i = 0; i < argumentCount; ++i) argList.append(toJS(exec, arguments[i])); - JSObject* result = constructRegExp(exec, argList); + JSObject* result = constructRegExp(exec, exec->lexicalGlobalObject(), argList); if (exec->hadException()) { if (exception) *exception = toRef(exec, exec->exception()); diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp index bc5e383..54dfda6 100644 --- a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp @@ -68,14 +68,11 @@ JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* k return toRef(static_cast(map->map().get(key))); } -bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object) +// We need to keep this function in the build to keep the nightlies running. +JS_EXPORT bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef); +bool JSWeakObjectMapClear(JSContextRef, JSWeakObjectMapRef, void*, JSObjectRef) { - ExecState* exec = toJS(ctx); - APIEntryShim entryShim(exec); - JSObject* obj = toJS(object); - if (map->map().deprecatedRemove(key, obj)) - return true; - return false; + return true; } #ifdef __cplusplus diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h index bb3fe96..01e0611 100644 --- a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h @@ -76,17 +76,6 @@ JS_EXPORT void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void */ JS_EXPORT JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key); -/*! - @function - @abstract Clears the association between a key and an object in a JSWeakObjectMapRef - @param ctx The execution context to use. - @param map The map to clear the key association from. - @param key The key to use. - @param object The old object value. - @result Returns true if the key/object association was present in map, and has been removed. - */ -JS_EXPORT bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object); - #ifdef __cplusplus } #endif diff --git a/Source/JavaScriptCore/API/OpaqueJSString.h b/Source/JavaScriptCore/API/OpaqueJSString.h index 473c815..69c0962 100644 --- a/Source/JavaScriptCore/API/OpaqueJSString.h +++ b/Source/JavaScriptCore/API/OpaqueJSString.h @@ -33,7 +33,7 @@ namespace JSC { class JSGlobalData; } -struct OpaqueJSString : public ThreadSafeShared { +struct OpaqueJSString : public ThreadSafeRefCounted { static PassRefPtr create() // null { @@ -54,7 +54,7 @@ struct OpaqueJSString : public ThreadSafeShared { JSC::Identifier identifier(JSC::JSGlobalData*) const; private: - friend class WTF::ThreadSafeShared; + friend class WTF::ThreadSafeRefCounted; OpaqueJSString() : m_characters(0) diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt index 97f100e..247d372 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt @@ -42,6 +42,7 @@ SET(JavaScriptCore_SOURCES bytecompiler/NodesCodegen.cpp collector/handles/HandleHeap.cpp + collector/handles/HandleStack.cpp debugger/Debugger.cpp debugger/DebuggerActivation.cpp diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 162f23f..7cc1d15 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,3318 @@ +2011-03-30 Oliver Hunt + + Reviewed by Geoffrey Garen. + + Make StructureChain GC allocated + https://bugs.webkit.org/show_bug.cgi?id=56695 + + Make StructureChain GC allocated, and make the various owners + mark it correctly. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::refStructures): + (JSC::CodeBlock::markAggregate): + * bytecode/Instruction.h: + (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set): + (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList): + (JSC::PolymorphicAccessStructureList::derefStructures): + (JSC::PolymorphicAccessStructureList::markAggregate): + (JSC::Instruction::Instruction): + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::deref): + (JSC::StructureStubInfo::markAggregate): + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initPutByIdTransition): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall): + (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jneq_ptr): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_jneq_ptr): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdChainList): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::privateCompileGetByIdChainList): + * jit/JITStubs.cpp: + (JSC::getPolymorphicAccessStructureListSlot): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSCell.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + * runtime/JSGlobalObject.h: + (JSC::Structure::prototypeChain): + * runtime/JSObject.h: + (JSC::JSObject::markChildrenDirect): + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::create): + (JSC::JSPropertyNameIterator::get): + (JSC::JSPropertyNameIterator::markChildren): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::setCachedPrototypeChain): + * runtime/MarkStack.h: + (JSC::MarkStack::append): + * runtime/Structure.h: + (JSC::Structure::cachedPrototypeChainSlot): + * runtime/StructureChain.cpp: + (JSC::StructureChain::StructureChain): + * runtime/StructureChain.h: + (JSC::StructureChain::create): + (JSC::StructureChain::createStructure): + +2011-03-30 Steve Falkenburg + + Reviewed by Adam Roben. + + Update Windows production build logic for new production configurations + https://bugs.webkit.org/show_bug.cgi?id=57494 + + * JavaScriptCore.vcproj/JavaScriptCore.make: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: + * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops: + * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops: + * JavaScriptCore.vcproj/jsc/jscProduction.vsprops: + * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: + * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops: + +2011-03-30 Steve Falkenburg + + Reviewed by Adam Roben. + + Rename Windows configuration Release_LTCG to Production for clarity + https://bugs.webkit.org/show_bug.cgi?id=57465 + + * JavaScriptCore.vcproj/JavaScriptCore.sln: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Removed. + * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops. + * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Removed. + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/jsc/jscProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops. + * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Removed. + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops. + * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Removed. + +2011-03-30 Zoltan Herczeg + + Reviewed by Maciej Stachowiak. + + Add the NEXT_OPCODE() macro to the DFG-JIT parser + https://bugs.webkit.org/show_bug.cgi?id=57322 + + In JavaScriptCore we use macros to jump to the next opcode + (both in interpreter and JIT). This macro is added to the + DFG-JIT parser as well. + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::parse): + +2011-03-29 Geoffrey Garen + + Reviewed by Darin Adler. + + ~25% regression on v8-splay in the SunSpider harness + https://bugs.webkit.org/show_bug.cgi?id=56128 + + I'm not sure if this is the root cause of the regression Stephanie + measured, but it seems to get us back to previous v8-splay times. + + SunSpider reports no change. v8-splay says 41% faster. + + * runtime/Heap.cpp: + (JSC::Heap::reset): Make marking proportional to 1X the size of the heap, + not .5X the size of the heap. When the heap is large, this makes a big + difference. (Our old heap growth policy matched this. You can see by + looking at resizeBlocks in revisions prior to r77699.) + +2011-03-29 Steve Falkenburg + + Reviewed by Darin Adler. + + Use per-configuration vsprops in JavaScriptCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE + https://bugs.webkit.org/show_bug.cgi?id=57350 + + Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from + InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within + the IDE. To avoid this, add a separate vsprops file for each project configuration that + contains the required inherited property sheets. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: Added. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/WTF/WTFDebug.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Added. + * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.vcproj/jsc/jscDebug.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jscRelease.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Added. + * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: Added. + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + * JavaScriptCore.vcproj/testapi/testapiDebug.vsprops: Added. + * JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops: Added. + * JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops: Added. + * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops: Added. + * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Added. + +2011-03-29 Oliver Hunt + + Reviewed by Eric Seidel. + + REGRESSION(r82173): Causes assertion and test failures in run-javascriptcore-tests on Windows (Requested by aroben on #webkit). + https://bugs.webkit.org/show_bug.cgi?id=57333 + + constructDate now takes the global object explicitly as it may be called + by functions other than the constructor itself. + + * API/JSObjectRef.cpp: + (JSObjectMakeDate): + * runtime/DateConstructor.cpp: + (JSC::constructDate): + (JSC::constructWithDateConstructor): + * runtime/DateConstructor.h: + +2011-03-29 Ben Taylor + + Reviewed by Benjamin Poulain. + + https://bugs.webkit.org/show_bug.cgi?id=41953 + + Fix compile error on Solaris 10/Sun Studio 12 CC emanating from MathExtras.h + + * wtf/MathExtras.h: + +2011-03-29 Ben Taylor + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=57231 + Add conditional for SUNCC supporting alignment macros + + Compile fix for Solaris 10/Sun Studio 12 CC + + * wtf/Vector.h: + +2011-03-29 Ben Taylor + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=57256 + + Fix crash on misaligned reads on Solaris 10/Sparc + + * wtf/text/AtomicString.cpp: + (WTF::equal): + +2011-03-28 Oliver Hunt + + Reviewed by Geoffrey Garen. + + instanceof Array test fails when using iframes + https://bugs.webkit.org/show_bug.cgi?id=17250 + + This is a problem with all built in constructors, the use of + lexicalGlobalObject rather than the constructors own + global object reference means that a builtin will always use + the prototype from the lexical global object rather than that + of the constructors origin. + + * API/JSObjectRef.cpp: + (JSObjectMakeFunction): + (JSObjectMakeRegExp): + * JavaScriptCore.exp: + * runtime/ArrayConstructor.cpp: + (JSC::constructArrayWithSizeQuirk): + * runtime/BooleanConstructor.cpp: + (JSC::constructBoolean): + (JSC::constructBooleanFromImmediateBoolean): + * runtime/BooleanConstructor.h: + * runtime/DateConstructor.cpp: + (JSC::constructDate): + * runtime/DateInstance.cpp: + * runtime/DateInstance.h: + * runtime/ErrorConstructor.cpp: + (JSC::constructWithErrorConstructor): + (JSC::callErrorConstructor): + * runtime/FunctionConstructor.cpp: + (JSC::constructWithFunctionConstructor): + (JSC::callFunctionConstructor): + (JSC::constructFunction): + * runtime/FunctionConstructor.h: + * runtime/JSCell.cpp: + (JSC::JSCell::getOwnPropertySlot): + (JSC::JSCell::put): + (JSC::JSCell::deleteProperty): + (JSC::JSCell::toThisObject): + (JSC::JSCell::toObject): + * runtime/JSCell.h: + (JSC::JSCell::JSValue::toObject): + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::toObject): + * runtime/JSNotAnObject.h: + * runtime/JSObject.cpp: + (JSC::JSObject::toObject): + * runtime/JSObject.h: + * runtime/JSString.cpp: + (JSC::StringObject::create): + (JSC::JSString::toObject): + (JSC::JSString::toThisObject): + * runtime/JSString.h: + * runtime/JSValue.cpp: + (JSC::JSValue::toObjectSlowCase): + (JSC::JSValue::toThisObjectSlowCase): + (JSC::JSValue::synthesizeObject): + * runtime/JSValue.h: + * runtime/NumberConstructor.cpp: + (JSC::constructWithNumberConstructor): + * runtime/NumberObject.cpp: + (JSC::constructNumber): + * runtime/NumberObject.h: + * runtime/ObjectConstructor.cpp: + (JSC::constructObject): + (JSC::constructWithObjectConstructor): + (JSC::callObjectConstructor): + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + (JSC::constructWithRegExpConstructor): + (JSC::callRegExpConstructor): + * runtime/RegExpConstructor.h: + * runtime/StringConstructor.cpp: + (JSC::constructWithStringConstructor): + * runtime/StringObject.h: + +2011-03-28 Geoffrey Garen + + Reviewed by Oliver Hunt. + + REGRESSION [r78794-r79249] Allocation of memory is slow when number of active objects is large + https://bugs.webkit.org/show_bug.cgi?id=56823 + + Partial fix for most of the problem. (TOT still shows a regression, though.) + + * runtime/Heap.cpp: + (JSC::Heap::reportExtraMemoryCostSlowCase): Use highWaterMark(), instead of + capacity(), since capacity() is O(n) relative to the size of the heap. + + In limited circumstances, capacity() is also worse than highWaterMark() + for measuring extra cost relative to heap size, since capacity() only + measures the *current* capacity of the heap, but the heap will grow if + necessary to attain highWaterMark(). + +2011-03-28 Oliver Hunt + + REGRESSION(r82130): It made all tests crash (Requested by Ossy on #webkit). + https://bugs.webkit.org/show_bug.cgi?id=57251 + + Build fix, had remnant of another patch in r82130 + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdChainList): + +2011-03-27 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + Add additional immediate types to allow us to distinguish the source of a JIT immediate + https://bugs.webkit.org/show_bug.cgi?id=57190 + + Allow us to distinguish whether a JIT immediate is a value that we + control (TrustedImm32 and TrustedImmPtr) vs. ones that can be controlled + or influenced by code we are compiling. Currently we do nothing with this + information -- this change is large and mechanical but would obscure any + logic changes that we would have made. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr): + (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr): + (JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32): + (JSC::AbstractMacroAssembler::Imm32::Imm32): + * assembler/MacroAssembler.h: + (JSC::MacroAssembler::pop): + (JSC::MacroAssembler::poke): + (JSC::MacroAssembler::branchPtr): + (JSC::MacroAssembler::branch32): + (JSC::MacroAssembler::addPtr): + (JSC::MacroAssembler::andPtr): + (JSC::MacroAssembler::orPtr): + (JSC::MacroAssembler::subPtr): + (JSC::MacroAssembler::xorPtr): + (JSC::MacroAssembler::setPtr): + (JSC::MacroAssembler::storePtr): + (JSC::MacroAssembler::branchTestPtr): + (JSC::MacroAssembler::branchSubPtr): + (JSC::MacroAssembler::branchTest8): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::add32): + (JSC::MacroAssemblerARM::and32): + (JSC::MacroAssemblerARM::lshift32): + (JSC::MacroAssemblerARM::mul32): + (JSC::MacroAssemblerARM::or32): + (JSC::MacroAssemblerARM::rshift32): + (JSC::MacroAssemblerARM::urshift32): + (JSC::MacroAssemblerARM::sub32): + (JSC::MacroAssemblerARM::xor32): + (JSC::MacroAssemblerARM::store32): + (JSC::MacroAssemblerARM::push): + (JSC::MacroAssemblerARM::move): + (JSC::MacroAssemblerARM::branch8): + (JSC::MacroAssemblerARM::branch32): + (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords): + (JSC::MacroAssemblerARM::branch16): + (JSC::MacroAssemblerARM::branchTest8): + (JSC::MacroAssemblerARM::branchTest32): + (JSC::MacroAssemblerARM::branchAdd32): + (JSC::MacroAssemblerARM::branchMul32): + (JSC::MacroAssemblerARM::branchSub32): + (JSC::MacroAssemblerARM::set32Compare32): + (JSC::MacroAssemblerARM::set8Compare32): + (JSC::MacroAssemblerARM::set32Test32): + (JSC::MacroAssemblerARM::set32Test8): + (JSC::MacroAssemblerARM::moveWithPatch): + (JSC::MacroAssemblerARM::branchPtrWithPatch): + (JSC::MacroAssemblerARM::storePtrWithPatch): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::add32): + (JSC::MacroAssemblerARMv7::and32): + (JSC::MacroAssemblerARMv7::lshift32): + (JSC::MacroAssemblerARMv7::mul32): + (JSC::MacroAssemblerARMv7::or32): + (JSC::MacroAssemblerARMv7::rshift32): + (JSC::MacroAssemblerARMv7::urshift32): + (JSC::MacroAssemblerARMv7::sub32): + (JSC::MacroAssemblerARMv7::xor32): + (JSC::MacroAssemblerARMv7::load32): + (JSC::MacroAssemblerARMv7::load32WithAddressOffsetPatch): + (JSC::MacroAssemblerARMv7::load16): + (JSC::MacroAssemblerARMv7::store32WithAddressOffsetPatch): + (JSC::MacroAssemblerARMv7::store32): + (JSC::MacroAssemblerARMv7::loadDouble): + (JSC::MacroAssemblerARMv7::storeDouble): + (JSC::MacroAssemblerARMv7::push): + (JSC::MacroAssemblerARMv7::move): + (JSC::MacroAssemblerARMv7::compare32): + (JSC::MacroAssemblerARMv7::test32): + (JSC::MacroAssemblerARMv7::branch32): + (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords): + (JSC::MacroAssemblerARMv7::branch16): + (JSC::MacroAssemblerARMv7::branch8): + (JSC::MacroAssemblerARMv7::branchTest32): + (JSC::MacroAssemblerARMv7::branchTest8): + (JSC::MacroAssemblerARMv7::branchAdd32): + (JSC::MacroAssemblerARMv7::branchMul32): + (JSC::MacroAssemblerARMv7::branchSub32): + (JSC::MacroAssemblerARMv7::nearCall): + (JSC::MacroAssemblerARMv7::call): + (JSC::MacroAssemblerARMv7::set32Compare32): + (JSC::MacroAssemblerARMv7::set8Compare32): + (JSC::MacroAssemblerARMv7::set32Test32): + (JSC::MacroAssemblerARMv7::set32Test8): + (JSC::MacroAssemblerARMv7::moveWithPatch): + (JSC::MacroAssemblerARMv7::branchPtrWithPatch): + (JSC::MacroAssemblerARMv7::storePtrWithPatch): + (JSC::MacroAssemblerARMv7::tailRecursiveCall): + (JSC::MacroAssemblerARMv7::makeJump): + (JSC::MacroAssemblerARMv7::makeBranch): + (JSC::MacroAssemblerARMv7::setupArmAddress): + (JSC::MacroAssemblerARMv7::makeBaseIndexBase): + (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding): + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::add32): + (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::load32): + (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch): + (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch): + (JSC::MacroAssemblerMIPS::store32): + (JSC::MacroAssemblerMIPS::push): + (JSC::MacroAssemblerMIPS::move): + (JSC::MacroAssemblerMIPS::branch8): + (JSC::MacroAssemblerMIPS::branch32): + (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords): + (JSC::MacroAssemblerMIPS::branch16): + (JSC::MacroAssemblerMIPS::branchTest32): + (JSC::MacroAssemblerMIPS::branchTest8): + (JSC::MacroAssemblerMIPS::branchAdd32): + (JSC::MacroAssemblerMIPS::branchMul32): + (JSC::MacroAssemblerMIPS::branchSub32): + (JSC::MacroAssemblerMIPS::set8Compare32): + (JSC::MacroAssemblerMIPS::set32Compare32): + (JSC::MacroAssemblerMIPS::set32Test8): + (JSC::MacroAssemblerMIPS::set32Test32): + (JSC::MacroAssemblerMIPS::moveWithPatch): + (JSC::MacroAssemblerMIPS::branchPtrWithPatch): + (JSC::MacroAssemblerMIPS::storePtrWithPatch): + (JSC::MacroAssemblerMIPS::tailRecursiveCall): + (JSC::MacroAssemblerMIPS::loadDouble): + (JSC::MacroAssemblerMIPS::storeDouble): + (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32): + * assembler/MacroAssemblerX86.h: + (JSC::MacroAssemblerX86::add32): + (JSC::MacroAssemblerX86::addWithCarry32): + (JSC::MacroAssemblerX86::and32): + (JSC::MacroAssemblerX86::or32): + (JSC::MacroAssemblerX86::sub32): + (JSC::MacroAssemblerX86::store32): + (JSC::MacroAssemblerX86::branch32): + (JSC::MacroAssemblerX86::moveWithPatch): + (JSC::MacroAssemblerX86::branchPtrWithPatch): + (JSC::MacroAssemblerX86::storePtrWithPatch): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::add32): + (JSC::MacroAssemblerX86Common::and32): + (JSC::MacroAssemblerX86Common::lshift32): + (JSC::MacroAssemblerX86Common::mul32): + (JSC::MacroAssemblerX86Common::or32): + (JSC::MacroAssemblerX86Common::rshift32): + (JSC::MacroAssemblerX86Common::urshift32): + (JSC::MacroAssemblerX86Common::sub32): + (JSC::MacroAssemblerX86Common::xor32): + (JSC::MacroAssemblerX86Common::store32): + (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerX86Common::push): + (JSC::MacroAssemblerX86Common::move): + (JSC::MacroAssemblerX86Common::branch8): + (JSC::MacroAssemblerX86Common::branch32): + (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords): + (JSC::MacroAssemblerX86Common::branch16): + (JSC::MacroAssemblerX86Common::branchTest32): + (JSC::MacroAssemblerX86Common::branchTest8): + (JSC::MacroAssemblerX86Common::branchAdd32): + (JSC::MacroAssemblerX86Common::branchMul32): + (JSC::MacroAssemblerX86Common::branchSub32): + (JSC::MacroAssemblerX86Common::set8Compare32): + (JSC::MacroAssemblerX86Common::set32Compare32): + (JSC::MacroAssemblerX86Common::set32Test8): + (JSC::MacroAssemblerX86Common::set32Test32): + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::add32): + (JSC::MacroAssemblerX86_64::and32): + (JSC::MacroAssemblerX86_64::or32): + (JSC::MacroAssemblerX86_64::sub32): + (JSC::MacroAssemblerX86_64::loadDouble): + (JSC::MacroAssemblerX86_64::addDouble): + (JSC::MacroAssemblerX86_64::convertInt32ToDouble): + (JSC::MacroAssemblerX86_64::store32): + (JSC::MacroAssemblerX86_64::call): + (JSC::MacroAssemblerX86_64::tailRecursiveCall): + (JSC::MacroAssemblerX86_64::makeTailRecursiveCall): + (JSC::MacroAssemblerX86_64::addPtr): + (JSC::MacroAssemblerX86_64::andPtr): + (JSC::MacroAssemblerX86_64::orPtr): + (JSC::MacroAssemblerX86_64::subPtr): + (JSC::MacroAssemblerX86_64::xorPtr): + (JSC::MacroAssemblerX86_64::storePtr): + (JSC::MacroAssemblerX86_64::setPtr): + (JSC::MacroAssemblerX86_64::branchPtr): + (JSC::MacroAssemblerX86_64::branchTestPtr): + (JSC::MacroAssemblerX86_64::branchSubPtr): + (JSC::MacroAssemblerX86_64::moveWithPatch): + (JSC::MacroAssemblerX86_64::branchPtrWithPatch): + (JSC::MacroAssemblerX86_64::storePtrWithPatch): + (JSC::MacroAssemblerX86_64::branchTest8): + * dfg/DFGJITCodeGenerator.h: + (JSC::DFG::JITCodeGenerator::callOperation): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::jitAssertIsInt32): + (JSC::DFG::JITCompiler::emitCount): + * dfg/DFGJITCompiler.h: + (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader): + * dfg/DFGNonSpeculativeJIT.cpp: + (JSC::DFG::NonSpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::fillSpeculateCell): + (JSC::DFG::SpeculativeJIT::compile): + * jit/JIT.cpp: + (JSC::JIT::emitTimeoutCheck): + (JSC::JIT::privateCompile): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_urshift): + (JSC::JIT::emitSlow_op_urshift): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emit_op_mod): + * jit/JITArithmetic32_64.cpp: + (JSC::JIT::emit_op_negate): + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emit_op_jless): + (JSC::JIT::emit_op_jlesseq): + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emitRightShift): + (JSC::JIT::emitRightShiftSlowCase): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emitSlow_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emit_op_add): + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSub32Constant): + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emit_op_div): + (JSC::JIT::emit_op_mod): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutCellToCallFrameHeader): + (JSC::JIT::emitPutIntToCallFrameHeader): + (JSC::JIT::emitPutImmediateToCallFrameHeader): + (JSC::JIT::emitLoadCharacterString): + (JSC::JIT::restoreArgumentReferenceForTrampoline): + (JSC::JIT::checkStructure): + (JSC::JIT::setSamplingFlag): + (JSC::JIT::clearSamplingFlag): + (JSC::JIT::emitCount): + (JSC::JIT::sampleInstruction): + (JSC::JIT::sampleCodeBlock): + (JSC::JIT::emitStoreInt32): + (JSC::JIT::emitStoreCell): + (JSC::JIT::emitStoreBool): + (JSC::JIT::emitJumpSlowCaseIfNotJSCell): + (JSC::JIT::emitInitRegister): + (JSC::JIT::emitJumpIfJSCell): + (JSC::JIT::emitJumpIfNotJSCell): + (JSC::JIT::emitJumpIfImmediateInteger): + (JSC::JIT::emitJumpIfNotImmediateInteger): + (JSC::JIT::emitFastArithDeTagImmediate): + (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero): + (JSC::JIT::emitFastArithReTagImmediate): + (JSC::JIT::emitTagAsBoolImmediate): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_check_has_instance): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::emit_op_resolve): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + (JSC::JIT::emit_op_resolve_skip): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (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_jneq_ptr): + (JSC::JIT::emit_op_jsr): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emit_op_new_func_exp): + (JSC::JIT::emit_op_jtrue): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::emit_op_to_jsnumber): + (JSC::JIT::emit_op_push_new_scope): + (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + (JSC::JIT::emit_op_init_lazy_reg): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emit_op_convert_this_strict): + (JSC::JIT::emitSlow_op_not): + (JSC::JIT::emitSlow_op_neq): + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emitSlow_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::emitSlow_op_resolve_global_dynamic): + (JSC::JIT::emit_op_new_regexp): + (JSC::JIT::emit_op_load_varargs): + (JSC::JIT::emitSlow_op_load_varargs): + (JSC::JIT::emit_op_new_func): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_check_has_instance): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_tear_off_activation): + (JSC::JIT::emit_op_tear_off_arguments): + (JSC::JIT::emit_op_resolve): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + (JSC::JIT::emit_op_resolve_skip): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (JSC::JIT::emit_op_not): + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + (JSC::JIT::emit_op_jneq_ptr): + (JSC::JIT::emit_op_jsr): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emitSlow_op_neq): + (JSC::JIT::compileOpStrictEq): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + (JSC::JIT::emit_op_resolve_with_base): + (JSC::JIT::emit_op_new_func_exp): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::emit_op_to_jsnumber): + (JSC::JIT::emit_op_push_new_scope): + (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_create_activation): + (JSC::JIT::emit_op_create_arguments): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emit_op_convert_this_strict): + (JSC::JIT::emit_op_get_arguments_length): + (JSC::JIT::emitSlow_op_get_arguments_length): + (JSC::JIT::emit_op_get_argument_by_val): + (JSC::JIT::softModulo): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emit_op_get_by_pname): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emit_op_put_by_index): + (JSC::JIT::emit_op_put_getter): + (JSC::JIT::emit_op_put_setter): + (JSC::JIT::emit_op_del_by_id): + (JSC::JIT::emit_op_get_by_id): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::emit_op_method_check): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITPropertyAccess32_64.cpp: + (JSC::JIT::emit_op_put_getter): + (JSC::JIT::emit_op_put_setter): + (JSC::JIT::emit_op_del_by_id): + (JSC::JIT::emit_op_get_by_id): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::emit_op_method_check): + (JSC::JIT::stringGetByValStubGenerator): + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::emit_op_get_by_pname): + * jit/JITStubCall.h: + (JSC::JITStubCall::addArgument): + * jit/JITStubs.cpp: + (JSC::getPolymorphicAccessStructureListSlot): + (JSC::DEFINE_STUB_FUNCTION): + * jit/JSInterfaceJIT.h: + (JSC::JSInterfaceJIT::emitJumpIfNotJSCell): + (JSC::JSInterfaceJIT::emitLoadInt32): + (JSC::JSInterfaceJIT::emitLoadDouble): + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::SpecializedThunkJIT): + (JSC::SpecializedThunkJIT::loadJSStringArgument): + (JSC::SpecializedThunkJIT::tagReturnAsInt32): + (JSC::SpecializedThunkJIT::tagReturnAsJSCell): + * jit/ThunkGenerators.cpp: + (JSC::charToString): + (JSC::powThunkGenerator): + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::matchCharacterClass): + (JSC::Yarr::YarrGenerator::storeToFrame): + (JSC::Yarr::YarrGenerator::storeToFrameWithPatch): + (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode): + (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle): + (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed): + (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy): + (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy): + (JSC::Yarr::YarrGenerator::generateCharacterClassFixed): + (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): + (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy): + (JSC::Yarr::YarrGenerator::generateParenthesesSingle): + (JSC::Yarr::YarrGenerator::generateDisjunction): + +2011-03-28 Andras Becsi + + Reviewed by Csaba Osztrogonác. + + [Qt] Fix the linking of jsc with MinGW after r81963. + + * jsc.pro: add -l and remove the lib suffix. + +2011-03-27 Ben Taylor + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=57170 Fix last elements + in an enum to remove a trailing comma. Sun Studio 12 CC errors out. + + Compile fix only, no actual code change. + + * wtf/MessageQueue.h: + +2011-03-25 Oliver Hunt + + Reviewed by Darin Adler. + + Allow defineOwnProperty to work on DOMObjects + https://bugs.webkit.org/show_bug.cgi?id=57129 + + Fix a couple of places where we uses getter()/setter() rather + than [gs]etterPresent(). + + * runtime/JSObject.cpp: + (JSC::JSObject::defineOwnProperty): + +2011-03-25 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Crash when paused at a breakpoint caused by inaccurate Activation records. + https://bugs.webkit.org/show_bug.cgi?id=57120 + + * runtime/JSActivation.cpp: + (JSC::JSActivation::symbolTableGet): + (JSC::JSActivation::symbolTablePut): + (JSC::JSActivation::getOwnPropertyNames): + (JSC::JSActivation::symbolTablePutWithAttributes): + +2011-03-24 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Crash in debugger beneath MarkStack::drain @ me.com, ibm.com + https://bugs.webkit.org/show_bug.cgi?id=57080 + + + The crash was caused by changes in the executable after recompilation. + + The fix is for the activation to copy the data it needs instead of + relying on the data in the executable. + + SunSpider and v8 report no change. + + * runtime/Arguments.h: + (JSC::JSActivation::copyRegisters): Use our own data members instead of + reading data out of the executable. + + * runtime/JSActivation.cpp: + (JSC::JSActivation::JSActivation): Initialize our data members. + + (JSC::JSActivation::markChildren): + (JSC::JSActivation::symbolTableGet): + (JSC::JSActivation::symbolTablePut): + (JSC::JSActivation::getOwnPropertyNames): + (JSC::JSActivation::symbolTablePutWithAttributes): + (JSC::JSActivation::isDynamicScope): + (JSC::JSActivation::argumentsGetter): Use our own data members instead of + reading data out of the executable. + + * runtime/JSActivation.h: Added new data members to track data previously + tracked by the executable. Since I've removed the executable pointer, + on a 64bit system, I've only made activations bigger by an int. + +2011-03-25 David Kilzer + + Remove duplicate entry from JavaScriptCore.exp + + JSC::createStackOverflowError(JSC::ExecState*) was originally + exported in r60057, then duplicated in r60392. + + * JavaScriptCore.exp: Removed duplicate entry. + +2011-03-25 Jarred Nicholls + + Reviewed by Ariya Hidayat. + + [Qt] MSVC Build Error - need to link advapi32.lib for jsc.exe + https://bugs.webkit.org/show_bug.cgi?id=56098 + + Need to link advapi32.lib for jsc.exe since wtf/OSRandomSource.cpp uses the Win32 Crypto API + + * jsc.pro: + +2011-03-24 Nikolas Zimmermann + + Reviewed by Darin Adler. + + Introduce WTF HexNumber.h + https://bugs.webkit.org/show_bug.cgi?id=56099 + + Introduce a set of functions that ease converting from a bye or a number to a hex string, + replacing several of these conversions and String::format("%x") usages all over WebCore. + + * GNUmakefile.am: Add HexNumber.h to build. + * JavaScriptCore.exp: Export StringBuilder::reserveCapacity. + * JavaScriptCore.gypi: Add HexNumber.h to build. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export StringBuilder::reserveCapacity. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add HexNumber.h to build. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * wtf/CMakeLists.txt: Ditto. + * wtf/HexNumber.h: Added. + (WTF::Internal::hexDigitsForMode): Internal helper. + (WTF::appendByteAsHex): Free function, that appends a byte as hex string into a destination. + (WTF::placeByteAsHex): Ditto, but places the result using *foo++ = '..' or foo[index++] = '..' + (WTF::appendUnsignedAsHex): Free function, that appends a number as hex string into a destination. + +2011-03-24 Geoffrey Garen + + Windows build fix take 2: Add new symobl. + + (I should have used the EWS bots for this!) + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-03-24 Geoffrey Garen + + Windows build fix take 1: Removed old symobl. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-03-24 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Ensure that all compilation takes place within a dynamic global object scope + https://bugs.webkit.org/show_bug.cgi?id=57054 + + + Otherwise, entry to the global object scope might throw away the code + we just compiled, causing a crash. + + * JavaScriptCore.exp: Updated for signature change. + + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): Removed explicit compilation calls + here because (a) they took place outside a dynamic global object scope + and (b) they were redundant. + + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): Updated for signature change. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::executeCall): + (JSC::Interpreter::executeConstruct): Declare our dynamic global object + scope earlier, to ensure that compilation takes place within it. + + * runtime/Completion.cpp: + (JSC::evaluate): Removed explicit compilation calls here because (a) + they took place outside a dynamic global object scope and (b) they were + redundant. + + * runtime/Executable.h: + (JSC::EvalExecutable::compile): + (JSC::ProgramExecutable::compile): + (JSC::FunctionExecutable::compileForCall): + (JSC::FunctionExecutable::compileForConstruct): Added an ASSERT to + verify our new invariant that all compilation takes place within a + dynamic global object scope. + + * runtime/JSGlobalObject.cpp: + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): + * runtime/JSGlobalObject.h: Changed the signature of DynamicGlobalObjectScope + to require a JSGlobalData instead of an ExecState* since it is often + easier to provide the former, and the latter was not necessary. + +2011-03-24 Oliver Hunt + + Reviewed by Geoffrey Garen. + + REGRESSION (r79987-r80210): Crash in JSWeakObjectMapClear + https://bugs.webkit.org/show_bug.cgi?id=55671 + + This is no longer necessary, and it seems that with the new weakmap + model it's simply unsafe, so this reduces it to a no-op. + + * API/JSWeakObjectMapRefPrivate.cpp: + +2011-03-24 Ben Taylor + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=20302 + Correct implementation of signbit on Solaris + + * wtf/MathExtras.h: + (signbit): + +2011-03-23 Mark Rowe + + Reviewed by Darin Adler. + + Threads that use APIs above the BSD layer must be registered with the Obj-C GC. + + * wtf/ThreadingPthreads.cpp: + (WTF::initializeCurrentThreadInternal): + +2011-03-23 Mark Rowe + + Stop setting OTHER_OPTIONS in JavaScriptCore's Makefile. + + It's not necessary to pass "-target All" as xcodebuild always builds the + first target in the project unless otherwise specified. The presence of + that option also breaks "make clean" since that results in both the + -target and -alltargets options being passed to xcodebuild. + + * Makefile: + +2011-03-23 Pavel Feldman + + Not reviewed: bring back Vector::contains that was removed as a part of roll back. + + * wtf/Vector.h: + (WTF::::contains): + +2011-03-23 Sheriff Bot + + Unreviewed, rolling out r81686. + http://trac.webkit.org/changeset/81686 + https://bugs.webkit.org/show_bug.cgi?id=56914 + + Breaks webkit_tests in Chromium again. (Requested by pfeldman + on #webkit). + + * wtf/Vector.h: + +2011-03-23 Adam Barth + + Reviewed by Eric Seidel. + + JavaScriptCore GYP build should work on a case-sensitive file system + https://bugs.webkit.org/show_bug.cgi?id=56911 + + The issue is that there are two UString.h headers, one named UString.h + and one named ustring.h. This patch excludes ustring.h from the header + map to avoid confusion. While I was editing this part of the GYP file, + I cleaned up the exclude rules to be more modern. + + * gyp/JavaScriptCore.gyp: + +2011-03-22 Geoffrey Garen + + Reviewed by Maciej Stachowiak. + + REGRESSION (r78382): No scripts appear in the Web Inspector's Scripts + panel on Windows, and many inspector regression tests are failing + https://bugs.webkit.org/show_bug.cgi?id=54490 + + The bug was caused by two different classes using the same name (Recompiler). + + * debugger/Debugger.cpp: + * runtime/JSGlobalData.cpp: + (WTF::Recompiler::operator()): Put Recompiler in an anonymous namespace, + so our two recompilers' inline functions don't stomp each other at + link time. + +2011-03-22 Sam Weinig + + Reviewed by Mark Rowe. + + Remove USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER. + + + * DerivedSources.make: + Remove generation of USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER. + +2011-03-22 Gabor Loki + + Reviewed by Csaba Osztrogonác. + + [Qt] Add DFG module to build system (disabled by default). + https://bugs.webkit.org/show_bug.cgi?id=56845 + + * JavaScriptCore.pri: + * JavaScriptCore.pro: + +2011-03-22 Eric Seidel + + Reviewed by Adam Barth. + + Add support to build-webkit for building with gyp-generated project files + https://bugs.webkit.org/show_bug.cgi?id=56877 + + Found a couple missing Private headers while trying to make WebCore build. + + * JavaScriptCore.gypi: + +2011-03-22 Eric Seidel + + Reviewed by Adam Barth. + + Make it possible to build JavaScriptCore and WebCore gyp builds outside of Source + https://bugs.webkit.org/show_bug.cgi?id=56867 + + This should make it possible to build the gyp-generated JavaScriptCore.xcodeproj + from a JavaScriptCore directory outside of Source. + + * gyp/JavaScriptCore.gyp: + * gyp/run-if-exists.sh: Added. + * gyp/update-info-plist.sh: Added. + +2011-03-22 Eric Seidel + + Reviewed by Adam Barth. + + Add Profiling Configuration to JavaScriptCore gyp build + https://bugs.webkit.org/show_bug.cgi?id=56862 + + It appears this is identical to Release, but I suspect + there is someone/thing who uses the Profiling target + so we're adding it for completeness. + + * gyp/JavaScriptCore.gyp: + +2011-03-22 Adam Barth + + Reviewed by Eric Seidel. + + Remove os_win32_files variable from the GYP build + https://bugs.webkit.org/show_bug.cgi?id=56804 + + Now that our understanding of GYP is sufficiently advanced, we don't + need os_win32_files any more. (Turns out Eric was right, as he always + is.) + + * JavaScriptCore.gypi: + +2011-03-22 Adam Barth + + Reviewed by Eric Seidel. + + GYP build of JavaScriptCore should be able to link from an empty WebKitBuild directory + https://bugs.webkit.org/show_bug.cgi?id=56803 + + Previously, we thought we should generate the derived source files in + the shared intermediate build products directory, but there are + assumptions built into other parts of the Mac build system that the + derived source files will be generated in a particular subdirectory of + the build products directory. + + This patch is a partial revert of the change that moved the derived + source files to the shared intermediate directory. After this patch, + the GYP build can build JavaScriptCore without help from the main + normal build system. + + * JavaScriptCore.gypi: + * gyp/JavaScriptCore.gyp: + * gyp/generate-derived-sources.sh: + * gyp/generate-dtrace-header.sh: + +2011-03-22 Jay Civelli + + Reviewed by David Levin. + + Adding a contains method to Vector. + https://bugs.webkit.org/show_bug.cgi?id=55859 + + * wtf/Vector.h: + (WTF::Vector::contains): + +2011-03-22 Gabor Loki + + Reviewed by Alexey Proskuryakov. + + Fix a bunch of typos in DFG. + https://bugs.webkit.org/show_bug.cgi?id=56813 + + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::parse): + * dfg/DFGGenerationInfo.h: + (JSC::DFG::GenerationInfo::setSpilled): + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + * dfg/DFGGraph.h: + * dfg/DFGJITCodeGenerator.h: + (JSC::DFG::JITCodeGenerator::setupStubArguments): + * dfg/DFGJITCompiler.cpp: + (JSC::DFG::JITCompiler::compileFunction): + * dfg/DFGJITCompiler.h: + * dfg/DFGNode.h: + * dfg/DFGNonSpeculativeJIT.h: + * dfg/DFGOperations.h: + * dfg/DFGRegisterBank.h: + (JSC::DFG::RegisterBank::allocate): + * dfg/DFGScoreBoard.h: + (JSC::DFG::ScoreBoard::~ScoreBoard): + (JSC::DFG::ScoreBoard::allocate): + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT.h: + +2011-03-22 Adam Barth + + Reviewed by Eric Seidel. + + Production configuration in GYP isn't set up correctly + https://bugs.webkit.org/show_bug.cgi?id=56786 + + Update JavaScriptCore.gyp with information mined from + JavaScriptCore.xcodeproj. + + * JavaScriptCore.gypi: + * gyp/JavaScriptCore.gyp: + +2011-03-22 Kent Tamura + + Reviewed by Eric Seidel. + + REGRESSION(r80096): Number type input unexpectedly rounds fractional values + https://bugs.webkit.org/show_bug.cgi?id=56367 + + Introduce clampToInteger(unsigned). + + * wtf/MathExtras.h: + (clampToInteger): Added. + +2011-03-21 Adam Barth + + Reviewed by Eric Seidel. + + GYP build should not have include paths that point within the source tree + https://bugs.webkit.org/show_bug.cgi?id=56788 + + Turns out we don't need these include paths anymore now that we have + header maps working properly. + + * gyp/JavaScriptCore.gyp: + - Also, remove jsc.cpp from the excluded list because it's not part + of the jsc_files variable instead of the javascriptcore_files + variable. + +2011-03-21 Adam Barth + + Reviewed by Eric Seidel. + + Solve the Assertions.cpp / -Wno-missing-format-attribute mystery + https://bugs.webkit.org/show_bug.cgi?id=56780 + + The reason we couldn't resolve this warning in the GYP build was that + the normal build disables this warning specifically for this file. + This patch takes the same approach as the previous patch to + WebCoreObjCExtras.mm in that it uses a pragma to suppress the warning + (rather than a build system configuration). + + * JavaScriptCore.xcodeproj/project.pbxproj: + - Remove the special-case for this file. + * gyp/JavaScriptCore.gyp: + - Remove the work-around for this issue. + * wtf/Assertions.cpp: + - Add a pragma disabling this warning for this file. + +2011-03-21 Adam Barth + + Reviewed by Dimitri Glazkov. + + WebCore GYP build shouldn't crash on startup + https://bugs.webkit.org/show_bug.cgi?id=56776 + + Debug builds shouldn't define NDEBUG. This same logic exists in the + project.pbxproj file. + + * gyp/JavaScriptCore.gyp: + +2011-03-21 Robert Kroeger + + Reviewed by Antonio Gomes. + + Flag to enable/disable a GestureReocognizer framework + + https://bugs.webkit.org/show_bug.cgi?id=49345 + + * wtf/Platform.h: + +2011-03-21 Adam Barth + + Reviewed by Dimitri Glazkov. + + Add new files to JavaScriptCore.gypi + https://bugs.webkit.org/show_bug.cgi?id=56766 + + * JavaScriptCore.gypi: + +2011-03-21 Sheriff Bot + + Unreviewed, rolling out r81377. + http://trac.webkit.org/changeset/81377 + https://bugs.webkit.org/show_bug.cgi?id=56765 + + WebPageSerializerTest.MultipleFrames is broken (Requested by + simonjam on #webkit). + + * wtf/Vector.h: + +2011-03-21 Gabor Loki + + Reviewed by Csaba Osztrogonác. + + Extend constant pool to be able to store 16 bit instructions with a constant + https://bugs.webkit.org/show_bug.cgi?id=46796 + + The putShortWithConstantInt function inserts a 16 bit instruction which + refers a 32 bits constant or literal. This is a vital function for those + target which loads a PC relative value with a 16 bit instruction (like + Thumb-2 instruction set and SH4 architecture). + + * assembler/AssemblerBuffer.h: + (JSC::AssemblerBuffer::putIntegral): + (JSC::AssemblerBuffer::putIntegralUnchecked): + * assembler/AssemblerBufferWithConstantPool.h: + +2011-03-21 Philippe Normand + + Unreviewed, GTK distcheck build fix. + + * GNUmakefile.am: + +2011-03-20 Bill Budge + + Reviewed by Adam Barth. + + Rename ThreadSafeShared to ThreadSafeRefCounted + https://bugs.webkit.org/show_bug.cgi?id=56714 + + No new tests. Exposes no new functionality. + + * API/JSClassRef.h: + * API/OpaqueJSString.h: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/Atomics.h: + * wtf/CMakeLists.txt: + * wtf/CrossThreadRefCounted.h: + (WTF::CrossThreadRefCounted::CrossThreadRefCounted): + (WTF::::crossThreadCopy): + * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h. + (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase): + (WTF::ThreadSafeRefCountedBase::ref): + (WTF::ThreadSafeRefCountedBase::refCount): + (WTF::ThreadSafeRefCountedBase::derefBase): + (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted): + * wtf/ThreadSafeShared.h: Removed. + * wtf/Threading.h: + +2011-03-19 Patrick Gansterer + + Reviewed by Darin Adler. + + Remove StringImpl::computeHash() + https://bugs.webkit.org/show_bug.cgi?id=49894 + + Replace remainig StringImpl::computeHash with StringImpl::computeHashStringHasher. + + * wtf/text/AtomicString.cpp: + (WTF::CStringTranslator::hash): + (WTF::UCharBufferTranslator::hash): + (WTF::HashAndCharactersTranslator::hash): + * wtf/text/StringImpl.h: + (WTF::StringImpl::setHash): + (WTF::StringImpl::hash): + +2011-03-19 Patrick Gansterer + + Reviewed by Darin Adler. + + Rename WTF::StringHasher methods + https://bugs.webkit.org/show_bug.cgi?id=53532 + + Rename createHash to computeHash and createBlobHash to hashMemory. + Also add a using WTF::StringHasher in the header file. + + * profiler/CallIdentifier.h: + (JSC::CallIdentifier::Hash::hash): + * runtime/Identifier.cpp: + (JSC::IdentifierCStringTranslator::hash): + (JSC::IdentifierUCharBufferTranslator::hash): + * wtf/StringHasher.h: + (WTF::StringHasher::computeHash): + (WTF::StringHasher::hashMemory): + * wtf/text/StringHash.h: + (WTF::CaseFoldingHash::hash): + * wtf/text/StringImpl.h: + (WTF::StringImpl::computeHash): + * wtf/unicode/UTF8.cpp: + (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal): + +2011-03-18 Geoffrey Garen + + Reviewed by Oliver Hunt. + + [GTK] JSC crashes in 32bit Release bots after r80743 + https://bugs.webkit.org/show_bug.cgi?id=56180 + + The crash was caused by referencing GC memory from a GC destructor. This + is not safe because destruction time / order is not guaranteed. + + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::create): + (JSC::ProfileGenerator::ProfileGenerator): + (JSC::ProfileGenerator::willExecute): + (JSC::ProfileGenerator::didExecute): + * profiler/ProfileGenerator.h: + (JSC::ProfileGenerator::origin): Made ExecState* the first argument, + to match the rest of this class and JSC. + + Use a JSGlobalObject* instead of an ExecState* with an indirect reference + to a JSGlobalObject* to track our origin. This is simpler and more + efficient, and it removes the destruction order dependency that was causing + our crash. + + * profiler/Profiler.cpp: + (JSC::Profiler::startProfiling): Updated for change to JSGlobalObject*. + (JSC::Profiler::stopProfiling): New function for stopping all profiles + for a given global object. This is more straight-forward than multiplexing + through the old function. + + (JSC::dispatchFunctionToProfiles): Updated for change to JSGlobalObject*. + * profiler/Profiler.h: Ditto. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): Ditto. + +2011-03-17 Geoffrey Garen + + Reviewed by Oliver Hunt. + + 1 Structure leaked beneath JSGlobalData::storeVPtrs() + https://bugs.webkit.org/show_bug.cgi?id=56595 + + * runtime/Executable.cpp: + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::FunctionExecutable): + * runtime/Executable.h: + (JSC::ExecutableBase::ExecutableBase): + (JSC::NativeExecutable::NativeExecutable): + (JSC::VPtrHackExecutable::VPtrHackExecutable): + (JSC::ScriptExecutable::ScriptExecutable): Use a raw pointer instead of + PassRefPtr, like JSString does, since JSGlobalData owns the singleton + exectuable structure. + +2011-03-17 Geoffrey Garen + + Reviewed by Mark Rowe. + + Fixed some string leaks seen on the buildbot + https://bugs.webkit.org/show_bug.cgi?id=56619 + + * runtime/PropertyMapHashTable.h: + (JSC::PropertyTable::~PropertyTable): DEref! + +2011-03-17 Oliver Hunt + + Reviewed by Geoffrey Garen. + + Crash in JSC::MarkStack::drain Under Stress + https://bugs.webkit.org/show_bug.cgi?id=56470 + + We perform a number of gc allocations while when + we are setting up new globals in a piece of global + code. We do this by adding new properties to the + symbol table, and then expanding the storage to fit + at the end. + + If a GC happens during this time we will report an + incorrect size for the global object's symbol table + storage. + + This patch corrects this by growing the storage size + before we starting adding entries to the symbol table. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::resizeRegisters): + +2011-03-17 Geoffrey Garen + + Reviewed by Oliver Hunt. + + 1 Structure leaked beneath JSGlobalData::storeVPtrs() + https://bugs.webkit.org/show_bug.cgi?id=56595 + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): Take local ownership of the Structure + we're using, since the Executable is not designed to own the Structure. + +2011-03-17 Gavin Barraclough + + Rubber Stamped by Sam Weinig. + + Add missing register-register branchTest8 to MacroAssemblerX86Common/X86Assembler. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::branchTest8): + * assembler/X86Assembler.h: + (JSC::X86Assembler::testb_rr): + +2011-03-17 Gavin Barraclough + + Reviewed by Sam Weinig. + + Bug 56603 - DFG JIT related cleanup + Move node generation out to separate function, move binarySearch algorithm out + to StdLibExtras, fix Graph::dump() to print comma between non-node children, + even if there are no node children. + + * bytecode/CodeBlock.h: + (JSC::getCallReturnOffset): + (JSC::CodeBlock::getStubInfo): + (JSC::CodeBlock::getCallLinkInfo): + (JSC::CodeBlock::getMethodCallLinkInfo): + (JSC::CodeBlock::bytecodeOffset): + - Move binaryChop to binarySearch in StdLibExtras + * dfg/DFGByteCodeParser.cpp: + (JSC::DFG::ByteCodeParser::ByteCodeParser): + (JSC::DFG::ByteCodeParser::parse): + (JSC::DFG::parse): + - Make m_noArithmetic a member, initialize m_currentIndex in the constructor. + * dfg/DFGByteCodeParser.h: + - Change parse() to not take a start index (always 0). + * dfg/DFGGraph.cpp: + (JSC::DFG::Graph::dump): + - Fix Graph::dump() to print comma between non-node children, even if there are no node children. + * dfg/DFGJITCodeGenerator.h: + (JSC::DFG::JITCodeGenerator::JITCodeGenerator): + - Initialize m_compileIndex in constructor. + * dfg/DFGNonSpeculativeJIT.cpp: + (JSC::DFG::NonSpeculativeJIT::compile): + * dfg/DFGNonSpeculativeJIT.h: + - Spilt out compilation of individual node. + * dfg/DFGOperations.cpp: + (JSC::DFG::operationConvertThis): + * dfg/DFGOperations.h: + - Cleanup parameter name. + * dfg/DFGSpeculativeJIT.cpp: + (JSC::DFG::SpeculativeJIT::compile): + * dfg/DFGSpeculativeJIT.h: + - Spilt out compilation of individual node. + * runtime/Executable.cpp: + (JSC::tryDFGCompile): + - Change parse() to not take a start index (always 0). + * wtf/StdLibExtras.h: + (WTF::binarySearch): + - Move binaryChop to binarySearch in StdLibExtras + +2011-03-17 Anders Carlsson + + Reviewed by Geoffrey Garen. + + Fix clang build. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): + +2011-03-17 Geoffrey Garen + + Reviewed by Darin Adler. + + 1 Structure leaked beneath JSGlobalData::storeVPtrs() + https://bugs.webkit.org/show_bug.cgi?id=56595 + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): Now that we have an executable, we need + to explicitly run its destructor. + +2011-03-17 Jeff Miller + + Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically: + + *.mode* + *.pbxuser + *.perspective* + project.xcworkspace + xcuserdata + + * JavaScriptCore.xcodeproj: Modified property svn:ignore. + +2011-03-17 Gavin Barraclough + + Reverting r81197, breaks JIT + INTERPRETER build. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset): + (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addPropertyAccessInstruction): + (JSC::CodeBlock::addGlobalResolveInstruction): + (JSC::CodeBlock::addStructureStubInfo): + * bytecode/Opcode.h: + * bytecode/StructureStubInfo.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveWithBase): + (JSC::BytecodeGenerator::emitGetById): + (JSC::BytecodeGenerator::emitPutById): + (JSC::BytecodeGenerator::emitDirectPutById): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitConstruct): + (JSC::BytecodeGenerator::emitCatch): + +2011-03-17 Ben Taylor + + Reviewed by Alexey Proskuryakov. + + Add a COMPILER(SUNCC) define for Sun Studio 12. + https://bugs.webkit.org/show_bug.cgi?56444 + derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932 + + * wtf/Platform.h: + +2011-03-17 Jay Civelli + + Reviewed by David Levin. + + Adding a contains method to Vector. + https://bugs.webkit.org/show_bug.cgi?id=55859 + + * wtf/Vector.h: + (WTF::::operator): + (WTF::::contains): + +2011-03-17 Patrick Gansterer + + Fix the interpreter build. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Added globalData to inheritorID(). + +2011-03-16 Sam Weinig + + Fix the interpreter build. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::privateExecute): + Remove .get()s. + +2011-03-16 Adam Barth + + Reviewed by James Robinson. + + Remove USE(BUILTIN_UTF8_CODEC) + https://bugs.webkit.org/show_bug.cgi?id=56508 + + We added this recently when we were unsure about the stability of the + built-in UTF-8 codec. However, the codec seems to be stable, so we + don't need the macro. + + * wtf/Platform.h: + +2011-03-16 Daniel Bates + + Reviewed by Darin Adler. + + Make JIT build for ARM Thumb-2 with RVCT + https://bugs.webkit.org/show_bug.cgi?id=56440 + + Derived from a patch by Dave Tapuska. + + Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment. + + * jit/JITStubs.cpp: + +2011-03-16 Chao-ying Fu + + Reviewed by Darin Adler. + + Fix MIPS build with const *void + https://bugs.webkit.org/show_bug.cgi?id=56513 + + * assembler/MacroAssemblerMIPS.h: + (JSC::MacroAssemblerMIPS::load32): + (JSC::MacroAssemblerMIPS::store32): + +2011-03-16 Oliver Hunt + + Reviewed by Darin Adler. + + Remove unnecessary caller tracking shenanigans from CodeBlock + https://bugs.webkit.org/show_bug.cgi?id=56483 + + This removes some leftover cruft from when we made CodeBlock + mark its callees. Removing it gives us a 0.7% progression, + reducing the overall regression to ~1.3%. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::CallLinkInfo): + * jit/JIT.cpp: + (JSC::JIT::linkCall): + (JSC::JIT::linkConstruct): + +2011-03-15 Oliver Hunt + + Reviewed by Geoffrey Garen. + + Make Structure creation require a JSGlobalData + https://bugs.webkit.org/show_bug.cgi?id=56438 + + Mechanical change to make Structure::create require JSGlobalData&, and + require all users to provide the globalData. + + * API/JSCallbackConstructor.h: + (JSC::JSCallbackConstructor::createStructure): + * API/JSCallbackFunction.h: + (JSC::JSCallbackFunction::createStructure): + * API/JSCallbackObject.h: + (JSC::JSCallbackObject::createStructure): + * API/JSContextRef.cpp: + * JavaScriptCore.exp: + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::DebuggerActivation): + * debugger/DebuggerActivation.h: + (JSC::DebuggerActivation::createStructure): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jsc.cpp: + (GlobalObject::GlobalObject): + (functionRun): + (jscmain): + * runtime/Arguments.h: + (JSC::Arguments::createStructure): + * runtime/ArrayPrototype.h: + (JSC::ArrayPrototype::createStructure): + * runtime/BooleanObject.h: + (JSC::BooleanObject::createStructure): + * runtime/DateInstance.h: + (JSC::DateInstance::createStructure): + * runtime/DatePrototype.h: + (JSC::DatePrototype::createStructure): + * runtime/ErrorInstance.h: + (JSC::ErrorInstance::createStructure): + * runtime/Executable.h: + (JSC::ExecutableBase::createStructure): + (JSC::EvalExecutable::createStructure): + (JSC::ProgramExecutable::createStructure): + (JSC::FunctionExecutable::createStructure): + * runtime/FunctionPrototype.h: + (JSC::FunctionPrototype::createStructure): + * runtime/GetterSetter.h: + (JSC::GetterSetter::createStructure): + * runtime/InternalFunction.h: + (JSC::InternalFunction::createStructure): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::createStructure): + * runtime/JSActivation.h: + (JSC::JSActivation::createStructure): + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + * runtime/JSArray.h: + (JSC::JSArray::createStructure): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::createStructure): + * runtime/JSByteArray.h: + (JSC::JSByteArray::JSByteArray): + * runtime/JSCell.h: + (JSC::JSCell::JSCell::createDummyStructure): + * runtime/JSFunction.h: + (JSC::JSFunction::createStructure): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObject): + (JSC::JSGlobalObject::createStructure): + * runtime/JSNotAnObject.h: + (JSC::JSNotAnObject::createStructure): + * runtime/JSONObject.h: + (JSC::JSONObject::createStructure): + * runtime/JSObject.cpp: + (JSC::JSObject::createInheritorID): + * runtime/JSObject.h: + (JSC::JSObject::createStructure): + (JSC::JSNonFinalObject::createStructure): + (JSC::JSFinalObject::createStructure): + (JSC::createEmptyObjectStructure): + (JSC::JSObject::inheritorID): + * runtime/JSObjectWithGlobalObject.h: + (JSC::JSObjectWithGlobalObject::createStructure): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::createStructure): + * runtime/JSStaticScopeObject.h: + (JSC::JSStaticScopeObject::createStructure): + * runtime/JSString.h: + (JSC::RopeBuilder::createStructure): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::createStructure): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::createStructure): + * runtime/JSZombie.h: + (JSC::JSZombie::createStructure): + * runtime/MathObject.h: + (JSC::MathObject::createStructure): + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/NativeErrorConstructor.h: + (JSC::NativeErrorConstructor::createStructure): + * runtime/NumberConstructor.h: + (JSC::NumberConstructor::createStructure): + * runtime/NumberObject.h: + (JSC::NumberObject::createStructure): + * runtime/ObjectConstructor.h: + (JSC::ObjectConstructor::createStructure): + * runtime/RegExpConstructor.h: + (JSC::RegExpConstructor::createStructure): + * runtime/RegExpObject.h: + (JSC::RegExpObject::createStructure): + * runtime/ScopeChain.h: + (JSC::ScopeChainNode::createStructure): + * runtime/StringObject.h: + (JSC::StringObject::createStructure): + * runtime/StringObjectThatMasqueradesAsUndefined.h: + (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): + * runtime/StringPrototype.h: + (JSC::StringPrototype::createStructure): + * runtime/Structure.h: + (JSC::Structure::create): + +2011-03-16 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Some conservative root gathering cleanup + https://bugs.webkit.org/show_bug.cgi?id=56447 + + SunSpider says 0.5% - 1.8% faster. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::gatherConservativeRoots): + * interpreter/RegisterFile.h: New helper function for doing the + conservative gathering of the register file. It's still conservative, + since the register file may contain uninitialized values, but it's + moving-safe, because it only visits values tagged as pointers, so there's + no risk of mistaking an integer for a pointer and accidentally changing it. + + * runtime/ConservativeSet.cpp: + (JSC::ConservativeRoots::add): + * runtime/ConservativeSet.h: Added a single-value add function, used above. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): Separated machine stack conservative roots from + register file conservative roots because machine stack roots must be + pinned, but register file roots need not be pinned. + + Adopted new interface for passing the current stack extent to the machine + stack root gathering routine. This allows us to exclude marking-related + data structures on the stack, and thus avoid double-marking the set of + machine roots. + + * runtime/MachineStackMarker.cpp: + (JSC::MachineThreads::gatherFromCurrentThread): + (JSC::MachineThreads::gatherConservativeRoots): + * runtime/MachineStackMarker.h: Added new interface, described above. + + * runtime/MarkedBlock.h: + (JSC::MarkedBlock::firstAtom): + * wtf/StdLibExtras.h: + (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used + by MachineStacks. + +2011-03-16 Geoffrey Garen + + Reviewed by Oliver Hunt. + + A little bit of MarkStack cleanup + https://bugs.webkit.org/show_bug.cgi?id=56443 + + Moved MarkStack functions into MarkStack.h/.cpp. + + SunSpider reports no change. + + * runtime/JSArray.h: + * runtime/JSCell.h: Moved from here... + * runtime/MarkStack.cpp: + (JSC::MarkStack::markChildren): + (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's + a huge function, and not called many times. + + * runtime/MarkStack.h: + (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide. + (JSC::MarkStack::append): + (JSC::MarkStack::deprecatedAppend): + (JSC::MarkStack::internalAppend): Moved to here. + +2011-03-15 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed another deprecatedAppend + https://bugs.webkit.org/show_bug.cgi?id=56429 + + * collector/handles/HandleHeap.cpp: + (JSC::HandleHeap::markStrongHandles): + * collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are + marked directly by the Heap. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): Ditto. + +2011-03-15 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed some more deprecated / unsafe append + https://bugs.webkit.org/show_bug.cgi?id=56428 + + * collector/handles/HandleStack.cpp: + (JSC::HandleStack::mark): + * collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot + marker, since it's a heap root. + + * runtime/ArgList.cpp: + (JSC::MarkedArgumentBuffer::markLists): + (JSC::MarkedArgumentBuffer::slowAppend): + * runtime/ArgList.h: Ditto. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): Added a mark call for marking the handle stack. + It seems like Oliver forgot this in his last patch. (!) + + * runtime/MarkStack.h: Removed appendSlots, since it would allow an + object to embed JSValues directly instead of using WriteBarrier. + + (JSC::MarkStack::append): Added a private append for a list of values. + + (JSC::HeapRootMarker::mark): Access to the above. + +2011-03-15 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed a few more deprecatedAppends, and removed HeapRoot + https://bugs.webkit.org/show_bug.cgi?id=56422 + + Added HeapRootMarker, a privileged class for marking direct heap roots + that are iterated during each garbage collection. This is easier to use + and more reliable than HeapRoot, so I've removed HeapRoot. + + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/CallFrame.h: + (JSC::ExecState::exception): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Completion.cpp: + (JSC::evaluate): exception is no longer a HeapRoot, so no need to + call .get() on it. + + * runtime/Heap.cpp: + (JSC::Heap::markProtectedObjects): + (JSC::Heap::markTempSortVectors): + (JSC::Heap::markRoots): + * runtime/Heap.h: Updated to use HeapRootMarker. + + * runtime/JSCell.h: + (JSC::JSCell::MarkStack::append): Added private functions for + HeapRootMarker to use. + + * runtime/JSGlobalData.h: exception is no longer a HeapRoot. + + * runtime/MarkStack.h: + (JSC::HeapRootMarker::HeapRootMarker): + (JSC::HeapRootMarker::mark): Added private functions for + HeapRootMarker to use. + + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker. + + * runtime/SmallStrings.h: + (JSC::SmallStrings::emptyString): + (JSC::SmallStrings::singleCharacterString): + (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker. + + * runtime/WriteBarrier.h: Removed HeapRoot. + +2011-03-14 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Made the global object moving-GC-safe + https://bugs.webkit.org/show_bug.cgi?id=56348 + + SunSpider reports no change. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::markChildren): Removed a dubious comment that + suggested we do not need to visit all our references during GC, since + that is not true in a moving GC. + + Re-sorted data members by type, removed one duplicate, and added back + the one missing mark I found. + + * runtime/JSGlobalObject.h: Re-sorted data members by type. + +2011-03-15 Oliver Hunt + + Reviewed by Geoffrey Garen. + + Introduce Local to allow us to start moving to precise marking of locals + https://bugs.webkit.org/show_bug.cgi?id=56394 + + Introduce a new handle type, Local and a scoping mechanism + LocalScope to allow us to start moving towards precise marking + of temporaries and local variables. + + We also start to use the new Local<> type in the JSON stringifier + so that we can have some coverage of their behaviour in the initial + checkin. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * collector/handles/Handle.h: + (JSC::::asObject): + * collector/handles/HandleStack.cpp: Added. + (JSC::HandleStack::HandleStack): + (JSC::HandleStack::mark): + (JSC::HandleStack::grow): + * collector/handles/HandleStack.h: Added. + (JSC::HandleStack::enterScope): + (JSC::HandleStack::zapTo): + (JSC::HandleStack::leaveScope): + (JSC::HandleStack::push): + * collector/handles/Local.h: Added. + (JSC::Local::internalSet): + (JSC::::Local): + (JSC::::operator): + (JSC::LocalStack::LocalStack): + (JSC::LocalStack::peek): + (JSC::LocalStack::pop): + (JSC::LocalStack::push): + (JSC::LocalStack::isEmpty): + (JSC::LocalStack::size): + * collector/handles/LocalScope.h: Added. + (JSC::LocalScope::LocalScope): + (JSC::LocalScope::~LocalScope): + (JSC::LocalScope::release): + * runtime/Heap.cpp: + (JSC::Heap::markRoots): + * runtime/Heap.h: + (JSC::Heap::allocateLocalHandle): + (JSC::Heap::handleStack): + * runtime/JSCell.h: + (JSC::JSCell::::getString): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::allocateLocalHandle): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Stringifier): + (JSC::Stringifier::stringify): + (JSC::Stringifier::appendStringifiedValue): + (JSC::Stringifier::Holder::Holder): + (JSC::Walker::Walker): + (JSC::Walker::walk): + (JSC::JSONProtoFuncParse): + (JSC::JSONProtoFuncStringify): + (JSC::JSONStringify): + * runtime/JSONObject.h: + * runtime/MarkStack.h: + (JSC::MarkStack::appendValues): + (JSC::MarkStack::appendSlots): + +2011-03-15 Gavin Barraclough + + Rubber Stamped by Sam Weinig. + + Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler + Some methods have unnecessary differences in name/arguments for interpreter/JIT. + + * bytecode/CodeBlock.cpp: + * bytecode/CodeBlock.h: + (JSC::HandlerInfo::HandlerInfo): + (JSC::CodeBlock::addPropertyAccessInfo): + (JSC::CodeBlock::addGlobalResolveInfo): + (JSC::CodeBlock::addCallLinkInfo): + (JSC::CodeBlock::globalResolveInfo): + * bytecode/Opcode.h: + * bytecode/StructureStubInfo.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitResolve): + (JSC::BytecodeGenerator::emitResolveWithBase): + (JSC::BytecodeGenerator::emitGetById): + (JSC::BytecodeGenerator::emitPutById): + (JSC::BytecodeGenerator::emitDirectPutById): + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitConstruct): + (JSC::BytecodeGenerator::emitCatch): + +2011-03-15 Gavin Barraclough + + Reviewed by Sam Weinig. + + Fix broken assert in new code. + + * dfg/DFGAliasTracker.h: + (JSC::DFG::AliasTracker::recordPutByVal): + - recordPutByVal is called for both PutByVal & PutByValAlias. + +2011-03-15 Gavin Barraclough + + Rubber stamped by Sam Weinig. + + Removed redundant code from BytecodeGenerator. + + * bytecompiler/BytecodeGenerator.cpp: + * bytecompiler/BytecodeGenerator.h: + - delete uncalled code missed when reparsing was removed. + +2011-03-15 Kevin Ollivier + + Reviewed by Darin Adler. + + Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export + info into the headers rather than in export symbol definition files, but disable it on + all platforms initially so we can deal with port build issues one port at a time. + + https://bugs.webkit.org/show_bug.cgi?id=27551 + + * API/JSBase.h: + * config.h: + * wtf/Assertions.h: + * wtf/ExportMacros.h: Added. + * wtf/Platform.h: + +2011-03-14 Laszlo Gombos + + Unreviewed build fix. + + Buildfix when JIT is not enabled after r81079 + https://bugs.webkit.org/show_bug.cgi?id=56361 + + * runtime/Executable.cpp: + +2011-03-14 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Made the global object moving-GC-safe + https://bugs.webkit.org/show_bug.cgi?id=56348 + + SunSpider reports no change. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::markChildren): Removed a dubious comment that + suggested we do not need to visit all our references during GC, since + that is not true in a moving GC. + + Re-sorted data members by type, removed one duplicate, and added back + the one missing mark I found. + + * runtime/JSGlobalObject.h: Re-sorted data members by type. + +2011-03-14 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Made JSWrapperObject and subclasses moving-GC-safe + https://bugs.webkit.org/show_bug.cgi?id=56346 + + SunSpider reports no change. + + * runtime/BooleanObject.cpp: + (JSC::BooleanObject::BooleanObject): + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): No more need for JSGlobalData, since + we don't initialize the wrapped value in our constructor. + + * runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because + we do not in fact override markChildren. + + * runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object + no longer does so for us. Also added an ASSERT to catch a latent bug, + where DatePrototype stomped on its base class's anonymous slot. Hard-coded + anonymous slots are a plague on our code. This doesn't cause any problems + in our existing code since the base class never reads the anonymous slot + it declares, but it caused crashes when I tried to start using the slot + in an initial version of this patch. + + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::JSWrapperObject): + (JSC::JSWrapperObject::internalValue): + (JSC::JSWrapperObject::setInternalValue): Resolved a problem where + our internal value was stored in two places: an anonymous slot, and a + data member which was not always visited during GC. Now, we only use the + data member, and we always visit it. (Instead of relying on certain + subclasses to set the OverridesMarkChildren bit, we set it ourselves.) + + * runtime/NumberObject.cpp: + (JSC::NumberObject::NumberObject): No more need for JSGlobalData, since + we don't initialize the wrapped value in our constructor. + + * runtime/NumberObject.h: Removed meaningless declaration. + + * runtime/StringObject.cpp: + (JSC::StringObject::StringObject): No more need for JSGlobalData, since + we don't initialize the wrapped value in our constructor. + + * runtime/StringObject.h: Don't set the OverridesMarkChildren flag because + we do not in fact override markChildren. + + * runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object + no longer does so for us. Also added an ASSERT to catch a latent bug, + where DatePrototype stomped on its base class's anonymous slot. Hard-coded + anonymous slots are a plague on our code. + +2011-03-14 Michael Saboff + + Reviewed by Gavin Barraclough. + + Look-ahead assertions with back references don’t work as expected + https://bugs.webkit.org/show_bug.cgi?id=56082 + + Changed parentheses assertion processing to temporarily back out the + number of known characters after the assertion while processing the + assertion. This was done so that assertions don't fail due to + checking the number of required characters as additional to the + rest of the express since assertions don't "consume" input. + Added a byte code to uncheck characters to support the change. + + * yarr/YarrInterpreter.cpp: + (JSC::Yarr::Interpreter::matchDisjunction): + (JSC::Yarr::ByteCompiler::uncheckInput): + (JSC::Yarr::ByteCompiler::emitDisjunction): + * yarr/YarrInterpreter.h: + (JSC::Yarr::ByteTerm::UncheckInput): + +2011-03-14 Viatcheslav Ostapenko + + Reviewed by Laszlo Gombos. + + [Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian. + https://bugs.webkit.org/show_bug.cgi?id=56133 + + Add condition to not compile webkit internal math round functions on RVCT compiler versions + from 3.0.0 because they are already defined in compiler math library. + + * wtf/MathExtras.h: + +2011-03-14 Gavin Barraclough + + Reviewed by Geoffrey Garen & Oliver Hunt. + + Bug 56284 - Add a dataflow intermediate representation for use in JIT generation. + + The JSC JIT presently generates code directly from the bytecode used by the interpreter. + This is not an optimal intermediate representation for JIT code generation, since it does + not capture liveness information of values, and provides little opportunity to perform + any static analysis for even primitive types. The JIT currently generates two code paths, + a fast path handling common cases, and a slower path handling less common operand types. + However the slow path jumps back into the fast path, meaning that information arising + from the earlier type checks cannot be propagated to later operations. + + This patch adds: + * a dataflow intermediate representation capable of describing a single basic block + of operations, + * a mechanism to convert a simple, single-block bytecode functions to the new IR, + * and a JIT code generator capable of generating code from this representation. + + The JIT generates two code paths, with the slower path not reentering the fast path + mid-block, allowing speculative optimizations to be made on the hot path, with type + information arising from these speculative decisions able to be propagated through the + dataflow. Code generation of both speculative and non-speculative paths exploits the type + and liveness information represented in the dataflow graph to attempt to avoid redundant + boxing and type-checking of values, and to remove unnecessary spills of temporary values + to the RegisterFile. + + The dataflow JIT currently can only support a subset of bytecode operations, limited to + arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the + dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be + expanded to include, control-flow, function calls, and then the long-tail of remaining + bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of + this only supports x86-64. + + The status of the dataflow JIT is currently work-in-progress. Limitations of the present + JIT code generation may cause performance regressions, particularly: + * the policy to only generate arithmetic code on the speculative path using integer + instructions, never using floating point. + * the policy to only generate arithmetic code on the non-speculative path using + floating point instructions, never using integer. + * always generating JSValue adds on the non-speculative path as a call out to a + C-function, never handling this in JIT code. + * always assuming by-Value property accesses on the speculative path to be array + accesses. + * generating all by-Value property accesses from the non-speculative path as a call + out to a C-function. + * generating all by-Indentifer property accesses as a call out to a C-function. + Due to these regressions, the code is landed in a state where it is disabled in most + cases by the ENABLE_DFG_JIT_RESTRICTIONS guard in Platform.h. As these regressions are + addressed, the JIT will be allowed to trigger in more cases. + + * JavaScriptCore.xcodeproj/project.pbxproj: + - Added new files to Xcode project. + * dfg: Added. + - Added directory for new code. + * dfg/DFGByteCodeParser.cpp: Added. + * dfg/DFGByteCodeParser.h: Added. + - Contruct a DFG::Graph representation from a bytecode CodeBlock. + * dfg/DFGGenerationInfo.h: Added. + - Track type & register information for VirtualRegisters during JIT code generation. + * dfg/DFGGraph.cpp: Added. + * dfg/DFGGraph.h: Added. + - Dataflow graph intermediate representation for code generation. + * dfg/DFGJITCodeGenerator.cpp: Added. + * dfg/DFGJITCodeGenerator.h: Added. + - Base class for SpeculativeJIT & NonSpeculativeJIT to share common functionality. + * dfg/DFGJITCompiler.cpp: Added. + * dfg/DFGJITCompiler.h: Added. + - Class responsible for driving code generation of speculativeJIT & non-speculative + code paths from the dataflow graph. + * dfg/DFGNonSpeculativeJIT.cpp: Added. + * dfg/DFGNonSpeculativeJIT.h: Added. + - Used to generate the non-speculative code path, this make no assumptions + about operand types. + * dfg/DFGOperations.cpp: Added. + * dfg/DFGOperations.h: Added. + - Helper functions called from the JIT generated code. + * dfg/DFGRegisterBank.h: Added. + - Used to track contents of physical registers during JIT code generation. + * dfg/DFGSpeculativeJIT.cpp: Added. + * dfg/DFGSpeculativeJIT.h: Added. + - Used to generate the speculative code path, this make assumptions about + operand types to enable optimization. + * runtime/Executable.cpp: + - Add code to attempt to use the DFG JIT to compile a function, with fallback + to the existing JIT. + * wtf/Platform.h: + - Added compile guards to enable the DFG JIT. + +2011-03-14 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed more cases of DeprecatedPtr (exception, SmallStrings) + https://bugs.webkit.org/show_bug.cgi?id=56332 + + * runtime/Identifier.cpp: + (JSC::Identifier::add): + (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded + constant, to make this code less brittle. + + * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because + this reference is owned and managed directly by the heap. + + * runtime/JSString.cpp: + (JSC::JSString::substringFromRope): + * runtime/JSString.h: + (JSC::jsSingleCharacterString): + (JSC::jsSingleCharacterSubstring): + (JSC::jsString): + (JSC::jsStringWithFinalizer): + (JSC::jsSubstring): + (JSC::jsOwnedString): Use a variable instead of a hard-coded + constant, to make this code less brittle. + + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::rep): + (JSC::SmallStringsStorage::SmallStringsStorage): + (JSC::SmallStrings::SmallStrings): + (JSC::SmallStrings::markChildren): + (JSC::SmallStrings::clear): + (JSC::SmallStrings::count): Use a variable instead of a hard-coded + constant, to make this code less brittle. + + * runtime/SmallStrings.h: + (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of + DeprecatedPtr because these references are owned and managed directly by + the heap. + + Stop using FixedArray because we only want a very limited set + of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.) + + * runtime/WriteBarrier.h: + (JSC::operator==): + (JSC::WriteBarrier::WriteBarrier): + (JSC::HeapRoot::HeapRoot): + (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set + without write barrier because we assume all HeapRoots are scanned during + all GC passes. + +2011-03-14 Brian Weinstein + + Reviewed by Adam Roben and Gavin Barraclough. + + FileSystemWin.cpp needs listDirectory() implementation + https://bugs.webkit.org/show_bug.cgi?id=56331 + + + Give StringConcatenate the ability to deal with const UChar*'s as a String type to append. + + * wtf/text/StringConcatenate.h: + +2011-03-14 Mark Rowe + + Reviewed by Oliver Hunt. + + REGRESSION(r80892): 100,000+ leaks seen on the build bot + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): Don't leak any existing entry for the given name if + the class definition contains duplicates. This also removes what look to be leaks + of the StringImpl instances that are used as keys: the HashMap key type is a RefPtr + which retains / releases the instances at the appropriate time, so explicitly calling + ref is not necessary. + +2011-03-14 Oliver Hunt + + Fix windows build + + * jit/JSInterfaceJIT.h: + (JSC::JSInterfaceJIT::emitLoadInt32): + (JSC::JSInterfaceJIT::tagFor): + (JSC::JSInterfaceJIT::payloadFor): + (JSC::JSInterfaceJIT::intPayloadFor): + (JSC::JSInterfaceJIT::intTagFor): + (JSC::JSInterfaceJIT::addressFor): + +2011-03-11 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Ensure all values are correctly tagged in the registerfile + https://bugs.webkit.org/show_bug.cgi?id=56214 + + This patch makes sure that all JSCell pointers written to + the registerfile are correctly tagged as JSCells, and replaces + raw int usage with the immediate representation. + + For performance, register pressure, and general saneness reasons + I've added abstractions for reading and writing the tag + and payload of integer registers directly for the JSVALUE64 + encoding. + + * interpreter/Register.h: + (JSC::Register::withInt): + (JSC::Register::withCallee): + (JSC::Register::operator=): + (JSC::Register::i): + (JSC::Register::activation): + (JSC::Register::function): + (JSC::Register::propertyNameIterator): + (JSC::Register::scopeChain): + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutToCallFrameHeader): + (JSC::JIT::emitPutCellToCallFrameHeader): + (JSC::JIT::emitPutIntToCallFrameHeader): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::emit_op_load_varargs): + (JSC::JIT::emitSlow_op_load_varargs): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + * jit/JSInterfaceJIT.h: + (JSC::JSInterfaceJIT::intPayloadFor): + (JSC::JSInterfaceJIT::intTagFor): + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnJSValue): + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::returnInt32): + (JSC::SpecializedThunkJIT::returnJSCell): + +2011-03-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + A few Heap-related renames (sans file moves, which should come next) + https://bugs.webkit.org/show_bug.cgi?id=56283 + + ConservativeSet => ConservativeRoots. "Set" was misleading, since items + are not uniqued. Also, "Roots" is more specific about what's in the set. + + MachineStackMarker => MachineThreads. "Threads" is more descriptive of + the fact that this class maintains a set of all threads using JSC. + "Stack" was misleading, since this class traverses stacks and registers. + "Mark" was misleading, since this class doesn't mark anything anymore. + + registerThread => addCurrentThread. "Current" is more specific. + unregisterThread => removeCurrentThread. "Current" is more specific. + + "currentThreadRegistrar" => threadSpecific. The only point of this data + structure is to register a thread-specific destructor with a pointer to + this. + + "mark...Conservatively" => "gather". "Mark" is not true, since these + functions don't mark anything. "Conservatively" is redundant, since they + take "ConservativeRoots" as an argument. + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + * JavaScriptCore.exp: + * runtime/ConservativeSet.cpp: + (JSC::ConservativeRoots::grow): + (JSC::ConservativeRoots::add): + * runtime/ConservativeSet.h: + (JSC::ConservativeRoots::ConservativeRoots): + (JSC::ConservativeRoots::~ConservativeRoots): + (JSC::ConservativeRoots::size): + (JSC::ConservativeRoots::roots): + * runtime/Heap.cpp: + (JSC::Heap::Heap): + (JSC::Heap::markRoots): + * runtime/Heap.h: + (JSC::Heap::machineThreads): + * runtime/JSGlobalData.h: + (JSC::JSGlobalData::makeUsableFromMultipleThreads): + * runtime/MachineStackMarker.cpp: + (JSC::MachineThreads::MachineThreads): + (JSC::MachineThreads::~MachineThreads): + (JSC::MachineThreads::makeUsableFromMultipleThreads): + (JSC::MachineThreads::addCurrentThread): + (JSC::MachineThreads::removeThread): + (JSC::MachineThreads::removeCurrentThread): + (JSC::MachineThreads::gatherFromCurrentThreadInternal): + (JSC::MachineThreads::gatherFromCurrentThread): + (JSC::MachineThreads::gatherFromOtherThread): + (JSC::MachineThreads::gatherConservativeRoots): + * runtime/MachineStackMarker.h: + * runtime/MarkStack.h: + (JSC::MarkStack::append): + +2011-03-13 David Kilzer + + BUILD FIX for armv7 after r80969 + + Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this. + + + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::load32): Made void* address argument + const. + (JSC::MacroAssemblerARMv7::store32): Ditto. + +2011-03-13 Geoffrey Garen + + Not reviewed. + + Try to fix the Mac build. + + * JavaScriptCore.xcodeproj/project.pbxproj: Make sure to forward + ConervativeSet.h, since it's now visible when compiling other projects. + +2011-03-13 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed another case of DeprecatedPtr (ConservativeSet) + https://bugs.webkit.org/show_bug.cgi?id=56281 + + The ConservativeSet is an internal data structure used during marking, + so direct pointers are fine. + + * runtime/ConservativeSet.cpp: + (JSC::ConservativeSet::grow): + * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append. + (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated + the size of the set based on sizeof(DeprecatedPtr*) instead of + sizeof(DeprecatedPtr). I'm not sure if this had real-world implications or not. + (JSC::ConservativeSet::size): + (JSC::ConservativeSet::set): Use direct pointers, as stated above. + + * runtime/Heap.cpp: + (JSC::Heap::markRoots): + * runtime/MarkStack.h: + (JSC::MarkStack::append): Created a special case of append for + ConservativeSet. I didn't want to add back a generic "append JSCell*" + function, since other class might start using that wrong. (In the end, + this function might go away, since the Heap will want to do something + slightly more interesting with the conservative set, but this is OK for + now.) + +2011-03-13 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed another case of DeprecatedPtr (PutPropertySlot) + https://bugs.webkit.org/show_bug.cgi?id=56278 + + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::setExistingProperty): + (JSC::PutPropertySlot::setNewProperty): + (JSC::PutPropertySlot::base): Direct pointer is fine for PutPropertySlot, + since it's a stack-allocated temporary. + +2011-03-13 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed one case of DeprecatedPtr (ScopeChainIterator) + https://bugs.webkit.org/show_bug.cgi?id=56277 + + * runtime/ScopeChain.h: Direct pointer is fine for ScopeChainIterator, + since it's a stack-allocated temporary. + +2011-03-13 Gavin Barraclough + + Reviewed by Sam Weinig. + + Bug 56273 - Add three operand forms to MacroAssember operations. + + Adding for X86(_64) for now, should be rolled out to other backends as necessary. + These may allow more efficient code generation in some cases, avoiding the need + for unnecessary register-register move instructions. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Jump::link): + (JSC::AbstractMacroAssembler::Jump::linkTo): + - marked these methods const. + (JSC::AbstractMacroAssembler::Jump::isSet): + - add a method to check whether a Jump object has been set to + reference an instruction, or is in a null, unset state. + * assembler/MacroAssemblerCodeRef.h: + (JSC::FunctionPtr::FunctionPtr): + - add non-explicit constructor, for FunctionPtr's to C/C++ functions. + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::and32): + (JSC::MacroAssemblerX86Common::lshift32): + (JSC::MacroAssemblerX86Common::or32): + (JSC::MacroAssemblerX86Common::rshift32): + (JSC::MacroAssemblerX86Common::urshift32): + (JSC::MacroAssemblerX86Common::xor32): + (JSC::MacroAssemblerX86Common::moveDouble): + (JSC::MacroAssemblerX86Common::addDouble): + (JSC::MacroAssemblerX86Common::divDouble): + (JSC::MacroAssemblerX86Common::subDouble): + (JSC::MacroAssemblerX86Common::mulDouble): + (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerX86Common::branchTest32): + (JSC::MacroAssemblerX86Common::branchTest8): + (JSC::MacroAssemblerX86Common::branchAdd32): + (JSC::MacroAssemblerX86Common::branchMul32): + (JSC::MacroAssemblerX86Common::branchSub32): + - add three operand forms of these instructions. + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::addDouble): + (JSC::MacroAssemblerX86_64::convertInt32ToDouble): + (JSC::MacroAssemblerX86_64::loadPtr): + (JSC::MacroAssemblerX86_64::branchTestPtr): + * assembler/X86Assembler.h: + (JSC::X86Assembler::JmpSrc::isSet): + - add a method to check whether a JmpSrc object has been set to + reference an instruction, or is in a null, unset state. + (JSC::X86Assembler::movsd_rr): + - added FP register-register move. + (JSC::X86Assembler::linkJump): + - Add an assert to check jumps aren't linked more than once. + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoadInt32ToDouble): + - load integers to the FPU via regsiters on x86-64. + +2011-03-13 Gavin Barraclough + + ARM build fix. + + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::load32): + +2011-03-13 Gavin Barraclough + + Reviewed by Sam Weinig. + + Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this. + + The JIT need to 'friend' other classes in order to be able to calculate offsets + of various properties, or the absolute addresses of members within specific objects, + in order to JIT generate code that will access members within the class when run. + + Instead of using friends in these cases, switch to providing specific accessor + methods to provide this information. In the case of offsets, these can be static + functions, and in the case of pointers to members within a specific object these can + be const methods returning pointers to const values, to prevent clients from + modifying values otherwise encapsulated within classes. + + * bytecode/SamplingTool.h: + * interpreter/Register.h: + * interpreter/RegisterFile.h: + * runtime/JSArray.h: + * runtime/JSCell.h: + * runtime/JSTypeInfo.h: + * runtime/JSVariableObject.h: + * runtime/Structure.h: + * wtf/RefCounted.h: + - Change these classes to no longer friend the JIT, add accessors for member offsets. + * jit/JIT.cpp: + * jit/JITCall32_64.cpp: + * jit/JITInlineMethods.h: + * jit/JITOpcodes.cpp: + * jit/JITOpcodes32_64.cpp: + * jit/JITPropertyAccess.cpp: + * jit/JITPropertyAccess32_64.cpp: + - Change the JIT to use class accessors, rather than taking object ofsets directly. + * assembler/AbstractMacroAssembler.h: + * assembler/MacroAssemblerX86_64.h: + * assembler/X86Assembler.h: + - Since the accessors for objects members return const pointers to retain encapsulation, + methods generating code with absolute addresses must be able to handle const pointers + (the JIT doesn't write to these values, do dies treat the pointer to value as const + from within the C++ code of the JIT, if not at runtime!). + +2011-03-12 Sheriff Bot + + Unreviewed, rolling out r80919. + http://trac.webkit.org/changeset/80919 + https://bugs.webkit.org/show_bug.cgi?id=56251 + + all windows bots failed to compile this change (Requested by + loislo on #webkit). + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/StructureStubInfo.cpp: + * interpreter/Register.h: + (JSC::Register::withInt): + (JSC::Register::withCallee): + (JSC::Register::operator=): + (JSC::Register::i): + (JSC::Register::activation): + (JSC::Register::function): + (JSC::Register::propertyNameIterator): + (JSC::Register::scopeChain): + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutToCallFrameHeader): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::emit_op_load_varargs): + (JSC::JIT::emitSlow_op_load_varargs): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + * jit/JSInterfaceJIT.h: + (JSC::JSInterfaceJIT::payloadFor): + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnJSValue): + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::returnInt32): + (JSC::SpecializedThunkJIT::returnJSCell): + * runtime/ArgList.cpp: + * runtime/DateConversion.cpp: + * runtime/GCActivityCallbackCF.cpp: + * runtime/Identifier.cpp: + * runtime/JSActivation.h: + (JSC::asActivation): + * runtime/JSLock.cpp: + * runtime/JSNumberCell.cpp: + * runtime/JSObject.h: + * runtime/JSPropertyNameIterator.h: + * runtime/JSValue.h: + * runtime/JSZombie.cpp: + * runtime/MarkedBlock.cpp: + * runtime/MarkedSpace.cpp: + * runtime/PropertyNameArray.cpp: + * runtime/ScopeChain.h: + (JSC::ExecState::globalThisValue): + * wtf/DateMath.cpp: + +2011-03-11 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Ensure all values are correctly tagged in the registerfile + https://bugs.webkit.org/show_bug.cgi?id=56214 + + This patch makes sure that all JSCell pointers written to + the registerfile are correctly tagged as JSCells, and replaces + raw int usage with the immediate representation. + + For performance, register pressure, and general saneness reasons + I've added abstractions for reading and writing the tag + and payload of integer registers directly for the JSVALUE64 + encoding. + + * interpreter/Register.h: + (JSC::Register::withInt): + (JSC::Register::withCallee): + (JSC::Register::operator=): + (JSC::Register::i): + (JSC::Register::activation): + (JSC::Register::function): + (JSC::Register::propertyNameIterator): + (JSC::Register::scopeChain): + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + * jit/JITCall32_64.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutToCallFrameHeader): + (JSC::JIT::emitPutCellToCallFrameHeader): + (JSC::JIT::emitPutIntToCallFrameHeader): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::emit_op_load_varargs): + (JSC::JIT::emitSlow_op_load_varargs): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::privateCompileCTINativeCall): + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_next_pname): + * jit/JSInterfaceJIT.h: + (JSC::JSInterfaceJIT::intPayloadFor): + (JSC::JSInterfaceJIT::intTagFor): + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnJSValue): + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::returnInt32): + (JSC::SpecializedThunkJIT::returnJSCell): + +2011-03-11 Dimitri Glazkov + + Reviewed by Eric Seidel. + + Introduce project_dir variable and make paths a whole lot saner. Ok, a little bit saner. + https://bugs.webkit.org/show_bug.cgi?id=56231 + + * JavaScriptCore.gypi: Added project_dir variable. + * gyp/JavaScriptCore.gyp: Changed to use project_dir, rather than DEPTH/JavaScriptCore. + * gyp/generate-dtrace-header.sh: Changed to use project_dir. + +2011-03-11 Dimitri Glazkov + + Reviewed by Adam Barth. + + Start using derived sources correctly and link minidom with JavaScriptCore gyp project. + https://bugs.webkit.org/show_bug.cgi?id=56217 + + * gyp/JavaScriptCore.gyp: Added derived source files and passing of shared directory + to the scripts. + * gyp/generate-derived-sources.sh: Changed to use passed directory. + * gyp/generate-dtrace-header.sh: Ditto. + +2011-03-11 Eric Carlson + + Reviewed by Sam Weinig. + + Adopt AVFoundation media back end on Lion. + + No new tests, existing media tests cover this. + + * JavaScriptCore.exp: Export cancelCallOnMainThread + * wtf/Platform.h: Define WTF_USE_AVFOUNDATION. + +2011-03-11 Dimitri Glazkov + + Reviewed by Adam Barth. + + Tweak dylib paths and add dtrace header generation action to JavaScriptCore gyp project. + https://bugs.webkit.org/show_bug.cgi?id=56207 + + * JavaScriptCore.gypi: Added Tracing.d to the sources. + * gyp/generate-dtrace-header.sh: Added. + * gyp/JavaScriptCore.gyp: Updated dylib paths (now the project can see them), + and added DTrace header generating step. + +2011-03-10 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Fix allocation of native function with a cached thunk + https://bugs.webkit.org/show_bug.cgi?id=56127 + + Fix this race condition found while fixing zombies. + + * collector/handles/HandleHeap.cpp: + (JSC::HandleHeap::clearWeakPointers): + * runtime/Heap.cpp: + (JSC::Heap::reset): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::markChildren): + * runtime/JSValue.h: + (JSC::JSValue::decode): + * runtime/JSZombie.cpp: + (JSC::JSZombie::leakedZombieStructure): + * runtime/JSZombie.h: + (JSC::JSZombie::createStructure): + * runtime/MarkedBlock.cpp: + +2011-03-10 Luiz Agostini + + Reviewed by Andreas Kling. + + [Qt] fast/workers/stress-js-execution.html is crashing on Qt bot (intermittently) + https://bugs.webkit.org/show_bug.cgi?id=33008 + + Defining WTF_USE_PTHREAD_BASED_QT=1 for platforms where QThread uses pthread internally. + Symbian is excluded because pthread_kill does not work on it. Mac is excluded because + it has its own ways to do JSC threading. + + Defining WTF_USE_PTHREADS inside MachineStackMarker.cpp if USE(PTHREAD_BASED_QT) is true. + + * runtime/MachineStackMarker.cpp: + * wtf/Platform.h: + +2011-03-10 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Bug 56077 - ES5 conformance issues with RegExp.prototype + + There are three issues causing test failures in sputnik. + + (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden). + (2) The 'length' property of the test/exec functions should be 1. + (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input. + + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::markChildren): + - Added to mark lastIndex + (JSC::regExpObjectLastIndex): + (JSC::setRegExpObjectLastIndex): + - lastIndex is now stored as a JSValue. + (JSC::RegExpObject::match): + - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double). + * runtime/RegExpObject.h: + (JSC::RegExpObject::setLastIndex): + (JSC::RegExpObject::setLastIndex): + - Set lastIndex, either from a size_t or a JSValue. + (JSC::RegExpObject::getLastIndex): + - Get lastIndex. + (JSC::RegExpObject::RegExpObjectData::RegExpObjectData): + - Initialize as a JSValue. + * runtime/RegExpPrototype.cpp: + (JSC::RegExpPrototype::RegExpPrototype): + - Add test/exec properties with length 1. + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + - Do not read RegExp.input if none is provided. + * tests/mozilla/js1_2/regexp/RegExp_input.js: + * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: + - Update these tests (they relied on non-ES5 behaviour). + +2011-03-10 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Rolled back in 80277 and 80280 with event handler layout test failures fixed. + https://bugs.webkit.org/show_bug.cgi?id=55653 + + The failures were caused by a last minute typo: assigning to currentEvent + instead of m_currentEvent. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecompiler/BytecodeGenerator.cpp: + * jit/JITOpcodes.cpp: + * jit/JITOpcodes32_64.cpp: + * runtime/Arguments.h: + * runtime/JSActivation.cpp: + * runtime/JSActivation.h: + * runtime/JSCell.h: + * runtime/JSGlobalObject.cpp: + * runtime/JSGlobalObject.h: + * runtime/JSObject.cpp: + * runtime/JSStaticScopeObject.cpp: + * runtime/JSStaticScopeObject.h: + * runtime/JSVariableObject.h: + * runtime/MarkedSpace.cpp: + * runtime/MarkedSpace.h: + +2011-03-09 Oliver Hunt + + Reviewed by Gavin Barraclough. + + jquery/manipulation.html fails after r80598 + https://bugs.webkit.org/show_bug.cgi?id=56019 + + When linking a call, codeblock now takes ownership of the linked function + This removes the need for unlinking, and thus the incorrectness that was + showing up in these tests. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::CallLinkInfo): + (JSC::CallLinkInfo::setUnlinked): + (JSC::CodeBlock::addCaller): + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + (JSC::JIT::linkCall): + (JSC::JIT::linkConstruct): + * jit/JIT.h: + * runtime/Executable.cpp: + * runtime/Executable.h: + +2011-03-09 Daniel Bates + + Attempt to fix the WinCE build after changeset 80684 + (Bug #56041). + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Substitute variable callFrame for exec in call to createSyntaxError(). + +2011-03-09 Gavin Barraclough + + Reviewed by Sam Weinig. + + Bug 56041 - RexExp constructor should only accept flags "gim" + Fix for issues introduced in r80667. + + Invalid flags to a RegExp literal are a late syntax error! + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addRegExp): + - Pass a PassRefPtr + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::addRegExp): + (JSC::BytecodeGenerator::emitNewRegExp): + * bytecompiler/BytecodeGenerator.h: + - Pass a PassRefPtr + * bytecompiler/NodesCodegen.cpp: + (JSC::RegExpNode::emitBytecode): + - Should not be ASSERTing that the flags are valid - this is a late(er) error. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + - Need to check for error from RegExp constructor. + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + - Need to check for error from RegExp constructor. + * runtime/RegExp.h: + (JSC::RegExp::isValid): + - Make isValid check that the regexp was created with valid flags. + * runtime/RegExpKey.h: + - Since we'll not create RegExp objects with invalid flags, separate out the deleted value. + +2011-03-09 Gavin Barraclough + + Windows build fix part 2. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-03-09 Gavin Barraclough + + Windows build fix part 1. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2011-03-09 Gavin Barraclough + + Reviewed by Darin Adler. + + Bug 56041 - RexExp constructor should only accept flags "gim" + We also should be passing the flags around as a bitfield rather than a string, + and should not have redundant, incompatible code for converting the string to a bitfield! + + * JavaScriptCore.exp: + * bytecompiler/NodesCodegen.cpp: + (JSC::RegExpNode::emitBytecode): + - Need to parse flags string to enum. + * runtime/RegExp.cpp: + (JSC::regExpFlags): + (JSC::RegExp::RegExp): + (JSC::RegExp::create): + - Add method to parse flags string to enum, change constructor/create args to take enum. + * runtime/RegExp.h: + (JSC::RegExp::global): + (JSC::RegExp::ignoreCase): + (JSC::RegExp::multiline): + - Change to use new enum values. + * runtime/RegExpCache.cpp: + (JSC::RegExpCache::lookupOrCreate): + (JSC::RegExpCache::create): + * runtime/RegExpCache.h: + - Changed to use regExpFlags enum instead of int/const UString&. + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + - Add use new enum parsing, check for error. + * runtime/RegExpKey.h: + (JSC::RegExpKey::RegExpKey): + * runtime/RegExpPrototype.cpp: + (JSC::RegExpPrototype::RegExpPrototype): + - Pass NoFlags value instead of empty string. + (JSC::regExpProtoFuncCompile): + - Add use new enum parsing, check for error. + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + - Pass NoFlags value instead of empty string. + +2011-03-08 Gavin Barraclough + + Reviewed by Sam Weinig + + Bug 55994 - Functions on Array.prototype should check length first. + These methods are designed to work on generic objects too, and if 'length' + is a getter that throws an exception, ensure this is correctly thrown + (even if other exceptions would be thrown, too). + + Make the length check the first thing we do. + This change shows a progression on SunSpider on my machine, but this is likely bogus. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + (JSC::arrayProtoFuncPop): + (JSC::arrayProtoFuncPush): + (JSC::arrayProtoFuncReverse): + (JSC::arrayProtoFuncShift): + (JSC::arrayProtoFuncSlice): + (JSC::arrayProtoFuncSort): + (JSC::arrayProtoFuncSplice): + (JSC::arrayProtoFuncUnShift): + (JSC::arrayProtoFuncFilter): + (JSC::arrayProtoFuncMap): + (JSC::arrayProtoFuncEvery): + (JSC::arrayProtoFuncForEach): + (JSC::arrayProtoFuncSome): + (JSC::arrayProtoFuncReduce): + (JSC::arrayProtoFuncReduceRight): + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + +2011-03-07 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Make CodeBlock GC write barrier safe + https://bugs.webkit.org/show_bug.cgi?id=55910 + + In order to make CodeBlock WriteBarrier safe it was necessary + to make it have a single GC owner, and for that reason I have + made ExecutableBase a GC allocated object. This required + updating their creation routines as well as all sites that hold + a reference to them. GC objects that held Executable's have been + converted to WriteBarriers, and all other sites now use Global<>. + + As an added benefit this gets rid of JSGlobalData's list of + GlobalCodeBlocks. + + Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression + on SunSpider. Given none of the tests that show regressions + demonstrate a regression on their own, and sampling shows up nothing. + I suspect we're just getting one or two additional gc passes at + the end of the run. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::EvalCodeCache::markAggregate): + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::ownerExecutable): + (JSC::CodeBlock::addConstant): + (JSC::CodeBlock::constantRegister): + (JSC::CodeBlock::getConstant): + (JSC::CodeBlock::addFunctionDecl): + (JSC::CodeBlock::addFunctionExpr): + (JSC::GlobalCodeBlock::GlobalCodeBlock): + (JSC::ExecState::r): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecode/SamplingTool.h: + (JSC::ScriptSampleRecord::ScriptSampleRecord): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::addConstantValue): + (JSC::BytecodeGenerator::emitEqualityOp): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::makeFunction): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoadDouble): + (JSC::JIT::emitLoadInt32ToDouble): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::hostFunctionStub): + (JSC::JITThunks::clearHostFunctionStubs): + * jit/JITStubs.h: + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Executable.cpp: + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::FunctionExecutable::~FunctionExecutable): + (JSC::EvalExecutable::markChildren): + (JSC::ProgramExecutable::markChildren): + (JSC::FunctionExecutable::markChildren): + (JSC::FunctionExecutable::fromGlobalCode): + * runtime/Executable.h: + (JSC::ExecutableBase::ExecutableBase): + (JSC::ExecutableBase::createStructure): + (JSC::NativeExecutable::create): + (JSC::NativeExecutable::NativeExecutable): + (JSC::VPtrHackExecutable::VPtrHackExecutable): + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::EvalExecutable::create): + (JSC::EvalExecutable::createStructure): + (JSC::ProgramExecutable::create): + (JSC::ProgramExecutable::createStructure): + (JSC::FunctionExecutable::create): + (JSC::FunctionExecutable::createStructure): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/Heap.cpp: + (JSC::Heap::destroy): + (JSC::Heap::markRoots): + * runtime/Heap.h: + * runtime/JSActivation.cpp: + (JSC::JSActivation::JSActivation): + (JSC::JSActivation::markChildren): + * runtime/JSActivation.h: + (JSC::JSActivation::JSActivationData::JSActivationData): + * runtime/JSCell.h: + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::~JSFunction): + (JSC::JSFunction::markChildren): + * runtime/JSFunction.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::getHostFunction): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + * runtime/JSObject.cpp: + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSStaticScopeObject.h: + (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData): + (JSC::JSStaticScopeObject::JSStaticScopeObject): + * runtime/JSZombie.cpp: + (JSC::JSZombie::leakedZombieStructure): + * runtime/JSZombie.h: + (JSC::JSZombie::createStructure): + * runtime/MarkedSpace.h: + +2011-03-07 Andy Estes + + Reviewed by Dan Bernstein. + + REGRESSION (r79060): Timestamp is missing from tweets in twitter. + https://bugs.webkit.org/show_bug.cgi?id=55228 + + A change to the date parser to handle the case where the year is + specified before the time zone inadvertently started accepting strings + such as '+0000' as valid years. Those strings actually represent time + zones in an offset of hours and minutes from UTC, not years. + + * wtf/DateMath.cpp: + (WTF::parseDateFromNullTerminatedCharacters): If the current character + in dateString is '+' or '-', do not try to parse the next token as a + year. + 2011-03-06 Yuta Kitamura Reviewed by Kent Tamura. diff --git a/Source/JavaScriptCore/Configurations/Base.xcconfig b/Source/JavaScriptCore/Configurations/Base.xcconfig index 8d91d70..12d0efd 100644 --- a/Source/JavaScriptCore/Configurations/Base.xcconfig +++ b/Source/JavaScriptCore/Configurations/Base.xcconfig @@ -25,7 +25,6 @@ DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DEBUGGING_SYMBOLS = default; GCC_DYNAMIC_NO_PIC = NO; -GCC_ENABLE_CPP_EXCEPTIONS = NO; GCC_ENABLE_CPP_RTTI = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(REAL_PLATFORM_NAME)); @@ -118,12 +117,23 @@ TARGET_GCC_VERSION_macosx_1050_ = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSI TARGET_GCC_VERSION_macosx_1050_0310 = GCC_42; TARGET_GCC_VERSION_macosx_1050_0320 = GCC_42; TARGET_GCC_VERSION_macosx_1060 = GCC_42; -TARGET_GCC_VERSION_macosx_1070 = LLVM_GCC_42; +TARGET_GCC_VERSION_macosx_1070 = $(TARGET_GCC_VERSION_macosx_1070_$(CONFIGURATION)); +TARGET_GCC_VERSION_macosx_1070_Debug = LLVM_COMPILER; +TARGET_GCC_VERSION_macosx_1070_Release = LLVM_GCC_42; +TARGET_GCC_VERSION_macosx_1070_Production = LLVM_GCC_42; GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION)); GCC_VERSION_GCC_40 = 4.0; GCC_VERSION_GCC_42 = 4.2; GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42; +GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0; + +// FIXME: Disable C++ exceptions in the LLVM Compiler once it supports enabling Obj-C exceptions without C++ exceptions. +GCC_ENABLE_CPP_EXCEPTIONS = $(GCC_ENABLE_CPP_EXCEPTIONS_$(TARGET_GCC_VERSION)); +GCC_ENABLE_CPP_EXCEPTIONS_GCC_40 = NO; +GCC_ENABLE_CPP_EXCEPTIONS_GCC_42 = NO; +GCC_ENABLE_CPP_EXCEPTIONS_LLVM_GCC = NO; +GCC_ENABLE_CPP_EXCEPTIONS_LLVM_COMPILER = YES; // If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK. SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR)); diff --git a/Source/JavaScriptCore/Configurations/Version.xcconfig b/Source/JavaScriptCore/Configurations/Version.xcconfig index ae9167c..59988e3 100644 --- a/Source/JavaScriptCore/Configurations/Version.xcconfig +++ b/Source/JavaScriptCore/Configurations/Version.xcconfig @@ -22,7 +22,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. MAJOR_VERSION = 534; -MINOR_VERSION = 24; +MINOR_VERSION = 27; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make index 8abb17c..9a8c2cc 100644 --- a/Source/JavaScriptCore/DerivedSources.make +++ b/Source/JavaScriptCore/DerivedSources.make @@ -84,7 +84,6 @@ HeaderDetection.h : DerivedSources.make /System/Library/CoreServices/SystemVersi 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 - if [ -f $(SDKROOT)/System/Library/Frameworks/AppKit.framework/PrivateHeaders/NSScrollerImpPair_Private.h ]; then echo "#define USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER 1" >> $@; else echo >> $@; fi else diff --git a/Source/JavaScriptCore/GNUmakefile.am b/Source/JavaScriptCore/GNUmakefile.am index 977cb18..31e70a0 100644 --- a/Source/JavaScriptCore/GNUmakefile.am +++ b/Source/JavaScriptCore/GNUmakefile.am @@ -115,6 +115,10 @@ javascriptcore_sources += \ Source/JavaScriptCore/collector/handles/Handle.h \ Source/JavaScriptCore/collector/handles/HandleHeap.cpp \ Source/JavaScriptCore/collector/handles/HandleHeap.h \ + Source/JavaScriptCore/collector/handles/HandleStack.cpp \ + Source/JavaScriptCore/collector/handles/HandleStack.h \ + Source/JavaScriptCore/collector/handles/Local.h \ + Source/JavaScriptCore/collector/handles/LocalScope.h \ Source/JavaScriptCore/config.h \ Source/JavaScriptCore/debugger/DebuggerActivation.cpp \ Source/JavaScriptCore/debugger/DebuggerActivation.h \ @@ -468,6 +472,7 @@ javascriptcore_sources += \ Source/JavaScriptCore/wtf/HashTable.cpp \ Source/JavaScriptCore/wtf/HashTable.h \ Source/JavaScriptCore/wtf/HashTraits.h \ + Source/JavaScriptCore/wtf/HexNumber.h \ Source/JavaScriptCore/wtf/ListHashSet.h \ Source/JavaScriptCore/wtf/ListRefPtr.h \ Source/JavaScriptCore/wtf/Locker.h \ @@ -549,7 +554,7 @@ javascriptcore_sources += \ Source/JavaScriptCore/wtf/Threading.h \ Source/JavaScriptCore/wtf/ThreadingPrimitives.h \ Source/JavaScriptCore/wtf/ThreadingPthreads.cpp \ - Source/JavaScriptCore/wtf/ThreadSafeShared.h \ + Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h \ Source/JavaScriptCore/wtf/ThreadSpecific.h \ Source/JavaScriptCore/wtf/TypeTraits.cpp \ Source/JavaScriptCore/wtf/TypeTraits.h \ diff --git a/Source/JavaScriptCore/JavaScriptCore.exp b/Source/JavaScriptCore/JavaScriptCore.exp index 914c2ac..e2647d1 100644 --- a/Source/JavaScriptCore/JavaScriptCore.exp +++ b/Source/JavaScriptCore/JavaScriptCore.exp @@ -1,4 +1,3 @@ -__ZN3JSC22objectConstructorTableE _JSCheckScriptSyntax _JSClassCreate _JSClassRelease @@ -114,15 +113,15 @@ __ZN3JSC10JSFunction6s_infoE __ZN3JSC10throwErrorEPNS_9ExecStateENS_7JSValueE __ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE __ZN3JSC11JSByteArray13s_defaultInfoE -__ZN3JSC11JSByteArray15createStructureENS_7JSValueEPKNS_9ClassInfoE +__ZN3JSC11JSByteArray15createStructureERNS_12JSGlobalDataENS_7JSValueEPKNS_9ClassInfoE __ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS3_9ByteArrayE __ZN3JSC11MarkedSpace21allocateFromSizeClassERNS0_9SizeClassE __ZN3JSC11ParserArena5resetEv __ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE __ZN3JSC11createErrorEPNS_9ExecStateERKNS_7UStringE +__ZN3JSC11regExpFlagsERKNS_7UStringE __ZN3JSC12DateInstance6s_infoE __ZN3JSC12DateInstanceC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEd -__ZN3JSC12DateInstanceC1EPNS_9ExecStateEd __ZN3JSC12JSGlobalData10ClientDataD2Ev __ZN3JSC12JSGlobalData11jsArrayVPtrE __ZN3JSC12JSGlobalData12createLeakedENS_15ThreadStackTypeE @@ -159,11 +158,11 @@ __ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSO __ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj __ZN3JSC14JSGlobalObject12markChildrenERNS_9MarkStackE __ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj -__ZN3JSC14JSGlobalObject25destroyJSGlobalObjectDataEPv __ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE __ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE __ZN3JSC14JSGlobalObjectD2Ev __ZN3JSC14JSGlobalObjectnwEmPNS_12JSGlobalDataE +__ZN3JSC14MachineThreads16addCurrentThreadEv __ZN3JSC14SamplingThread4stopEv __ZN3JSC14SamplingThread5startEj __ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE @@ -182,10 +181,9 @@ __ZN3JSC16createRangeErrorEPNS_9ExecStateERKNS_7UStringE __ZN3JSC16throwSyntaxErrorEPNS_9ExecStateE __ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb __ZN3JSC17PropertyNameArray3addEPN3WTF10StringImplE -__ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi +__ZN3JSC17constructFunctionEPNS_9ExecStateEPNS_14JSGlobalObjectERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi __ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE __ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataEPNS_8JSObjectE -__ZN3JSC18MachineStackMarker14registerThreadEv __ZN3JSC18PropertyDescriptor11setWritableEb __ZN3JSC18PropertyDescriptor12setUndefinedEv __ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj @@ -201,13 +199,13 @@ __ZN3JSC19initializeThreadingEv __ZN3JSC20MarkedArgumentBuffer10slowAppendENS_7JSValueE __ZN3JSC20createReferenceErrorEPNS_9ExecStateERKNS_7UStringE __ZN3JSC22globalMemoryStatisticsEv +__ZN3JSC22objectConstructorTableE __ZN3JSC23AbstractSamplingCounter4dumpEv __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateE __ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE -__ZN3JSC24DynamicGlobalObjectScopeC1EPNS_9ExecStateEPNS_14JSGlobalObjectE +__ZN3JSC24DynamicGlobalObjectScopeC1ERNS_12JSGlobalDataEPNS_14JSGlobalObjectE __ZN3JSC24JSObjectWithGlobalObjectC2EPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEE __ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE -__ZN3JSC24createStackOverflowErrorEPNS_9ExecStateE __ZN3JSC25evaluateInGlobalCallFrameERKNS_7UStringERNS_7JSValueEPNS_14JSGlobalObjectE __ZN3JSC35createInterruptedExecutionExceptionEPNS_12JSGlobalDataE __ZN3JSC3NaNE @@ -248,7 +246,7 @@ __ZN3JSC6JSLock4lockENS_14JSLockBehaviorE __ZN3JSC6JSLock6unlockENS_14JSLockBehaviorE __ZN3JSC6JSLock9lockCountEv __ZN3JSC6JSLockC1EPNS_9ExecStateE -__ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringES5_ +__ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE __ZN3JSC6RegExpD1Ev __ZN3JSC7JSArray12markChildrenERNS_9MarkStackE __ZN3JSC7JSArray15setSubclassDataEPv @@ -287,7 +285,6 @@ __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj __ZN3JSC8JSObject15unwrappedObjectEv __ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE -__ZN3JSC8JSObject17createInheritorIDEv __ZN3JSC8JSObject17defineOwnPropertyEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb __ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_10JSFunctionEj __ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_16InternalFunctionEj @@ -387,6 +384,7 @@ __ZN3WTF12createThreadEPFPvS0_ES0_PKc __ZN3WTF12detachThreadEj __ZN3WTF12isMainThreadEv __ZN3WTF12randomNumberEv +__ZN3WTF13StringBuilder15reserveCapacityEj __ZN3WTF13StringBuilder11reifyStringEv __ZN3WTF13StringBuilder11shrinkToFitEv __ZN3WTF13StringBuilder6appendEPKcj @@ -431,6 +429,7 @@ __ZN3WTF21RefCountedLeakCounter9incrementEv __ZN3WTF21RefCountedLeakCounterC1EPKc __ZN3WTF21RefCountedLeakCounterD1Ev __ZN3WTF21charactersToIntStrictEPKtmPbi +__ZN3WTF22cancelCallOnMainThreadEPFvPvES0_ __ZN3WTF22charactersToUIntStrictEPKtmPbi __ZN3WTF23callOnMainThreadAndWaitEPFvPvES0_ __ZN3WTF23dayInMonthFromDayInYearEib @@ -446,10 +445,10 @@ __ZN3WTF39initializeMainThreadToProcessMainThreadEv __ZN3WTF3MD58addBytesEPKhm __ZN3WTF3MD58checksumERNS_6VectorIhLm16EEE __ZN3WTF3MD5C1Ev -__ZN3WTF4dtoaEPcdRbRiRj __ZN3WTF4SHA111computeHashERNS_6VectorIhLm20EEE __ZN3WTF4SHA18addBytesEPKhm __ZN3WTF4SHA1C1Ev +__ZN3WTF4dtoaEPcdRbRiRj __ZN3WTF5Mutex4lockEv __ZN3WTF5Mutex6unlockEv __ZN3WTF5Mutex7tryLockEv @@ -535,7 +534,7 @@ __ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE __ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE __ZNK3JSC6JSCell14isGetterSetterEv __ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE -__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateE +__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateEPNS_14JSGlobalObjectE __ZNK3JSC6JSCell8toStringEPNS_9ExecStateE __ZNK3JSC6JSCell9getStringEPNS_9ExecStateE __ZNK3JSC6JSCell9getStringEPNS_9ExecStateERNS_7UStringE @@ -543,7 +542,7 @@ __ZNK3JSC6JSCell9getUInt32ERj __ZNK3JSC6JSCell9toBooleanEPNS_9ExecStateE __ZNK3JSC7ArgList8getSliceEiRS0_ __ZNK3JSC7JSArray12subclassDataEv -__ZNK3JSC7JSValue16toObjectSlowCaseEPNS_9ExecStateE +__ZNK3JSC7JSValue16toObjectSlowCaseEPNS_9ExecStateEPNS_14JSGlobalObjectE __ZNK3JSC7JSValue19synthesizePrototypeEPNS_9ExecStateE __ZNK3JSC7JSValue20toThisObjectSlowCaseEPNS_9ExecStateE __ZNK3JSC7JSValue9toIntegerEPNS_9ExecStateE @@ -556,7 +555,7 @@ __ZNK3JSC8JSObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE __ZNK3JSC8JSObject12toThisObjectEPNS_9ExecStateE __ZNK3JSC8JSObject18toStrictThisObjectEPNS_9ExecStateE __ZNK3JSC8JSObject8toNumberEPNS_9ExecStateE -__ZNK3JSC8JSObject8toObjectEPNS_9ExecStateE +__ZNK3JSC8JSObject8toObjectEPNS_9ExecStateEPNS_14JSGlobalObjectE __ZNK3JSC8JSObject8toStringEPNS_9ExecStateE __ZNK3JSC8JSObject9classNameEv __ZNK3JSC8JSObject9toBooleanEPNS_9ExecStateE diff --git a/Source/JavaScriptCore/JavaScriptCore.gypi b/Source/JavaScriptCore/JavaScriptCore.gypi index 292473c..cb93a29 100644 --- a/Source/JavaScriptCore/JavaScriptCore.gypi +++ b/Source/JavaScriptCore/JavaScriptCore.gypi @@ -1,5 +1,6 @@ { 'variables': { + 'project_dir': ['.'], # These headers are part of JavaScriptCore's public API in the Apple Mac build. 'javascriptcore_publicheader_files': [ 'API/JSBase.h', @@ -29,6 +30,9 @@ 'collector/handles/Global.h', 'collector/handles/Handle.h', 'collector/handles/HandleHeap.h', + 'collector/handles/HandleStack.h', + 'collector/handles/Local.h', + 'collector/handles/LocalScope.h', 'config.h', 'debugger/Debugger.h', 'debugger/DebuggerActivation.h', @@ -64,6 +68,7 @@ 'runtime/ExceptionHelpers.h', 'runtime/FunctionConstructor.h', 'runtime/FunctionPrototype.h', + 'runtime/GCActivityCallback.h', 'runtime/Heap.h', 'runtime/Identifier.h', 'runtime/InitializeThreading.h', @@ -105,7 +110,9 @@ 'runtime/Protect.h', 'runtime/PutPropertySlot.h', 'runtime/RegExp.h', + 'runtime/RegExpKey.h', 'runtime/RegExpCache.h', + 'runtime/RegExpObject.h', 'runtime/RopeImpl.h', 'runtime/ScopeChain.h', 'runtime/SmallStrings.h', @@ -157,6 +164,7 @@ 'wtf/HashSet.h', 'wtf/HashTable.h', 'wtf/HashTraits.h', + 'wtf/HexNumber.h', 'wtf/ListHashSet.h', 'wtf/ListRefPtr.h', 'wtf/Locker.h', @@ -195,7 +203,7 @@ 'wtf/StdLibExtras.h', 'wtf/StringExtras.h', 'wtf/StringHasher.h', - 'wtf/ThreadSafeShared.h', + 'wtf/ThreadSafeRefCounted.h', 'wtf/ThreadSpecific.h', 'wtf/Threading.h', 'wtf/ThreadingPrimitives.h', @@ -303,9 +311,29 @@ 'bytecompiler/NodesCodegen.cpp', 'bytecompiler/RegisterID.h', 'collector/handles/HandleHeap.cpp', + 'collector/handles/HandleStack.cpp', 'debugger/Debugger.cpp', 'debugger/DebuggerActivation.cpp', 'debugger/DebuggerCallFrame.cpp', + 'dfg/DFGAliasTracker.h', + 'dfg/DFGByteCodeParser.cpp', + 'dfg/DFGByteCodeParser.h', + 'dfg/DFGGenerationInfo.h', + 'dfg/DFGGraph.cpp', + 'dfg/DFGGraph.h', + 'dfg/DFGJITCodeGenerator.cpp', + 'dfg/DFGJITCodeGenerator.h', + 'dfg/DFGJITCompiler.cpp', + 'dfg/DFGJITCompiler.h', + 'dfg/DFGNode.h', + 'dfg/DFGNonSpeculativeJIT.cpp', + 'dfg/DFGNonSpeculativeJIT.h', + 'dfg/DFGOperations.cpp', + 'dfg/DFGOperations.h', + 'dfg/DFGRegisterBank.h', + 'dfg/DFGScoreBoard.h', + 'dfg/DFGSpeculativeJIT.cpp', + 'dfg/DFGSpeculativeJIT.h', 'icu/unicode/parseerr.h', 'icu/unicode/platform.h', 'icu/unicode/putil.h', @@ -351,6 +379,10 @@ 'jit/JSInterfaceJIT.h', 'jit/SpecializedThunkJIT.h', 'jit/ThunkGenerators.cpp', + 'os-win32/WinMain.cpp', + 'os-win32/inttypes.h', + 'os-win32/stdbool.h', + 'os-win32/stdint.h', 'parser/ASTBuilder.h', 'parser/JSParser.cpp', 'parser/JSParser.h', @@ -447,7 +479,6 @@ 'runtime/FunctionConstructor.cpp', 'runtime/FunctionPrototype.cpp', 'runtime/GCActivityCallback.cpp', - 'runtime/GCActivityCallback.h', 'runtime/GCActivityCallbackCF.cpp', 'runtime/GetterSetter.cpp', 'runtime/GetterSetter.h', @@ -517,10 +548,8 @@ 'runtime/RegExpCache.cpp', 'runtime/RegExpConstructor.cpp', 'runtime/RegExpConstructor.h', - 'runtime/RegExpKey.h', 'runtime/RegExpMatchesArray.h', 'runtime/RegExpObject.cpp', - 'runtime/RegExpObject.h', 'runtime/RegExpPrototype.cpp', 'runtime/RegExpPrototype.h', 'runtime/RopeImpl.cpp', @@ -538,6 +567,7 @@ 'runtime/Structure.cpp', 'runtime/StructureChain.cpp', 'runtime/TimeoutChecker.cpp', + 'runtime/Tracing.d', 'runtime/Tracing.h', 'runtime/UString.cpp', 'runtime/UStringConcatenate.h', @@ -564,9 +594,9 @@ 'wtf/RandomNumber.cpp', 'wtf/RandomNumberSeed.h', 'wtf/RefCountedLeakCounter.cpp', - 'wtf/SegmentedVector.h', 'wtf/SHA1.cpp', 'wtf/SHA1.h', + 'wtf/SegmentedVector.h', 'wtf/SizeLimits.cpp', 'wtf/StackBounds.cpp', 'wtf/StringExtras.cpp', @@ -656,13 +686,20 @@ 'yarr/YarrSyntaxChecker.cpp', 'yarr/YarrSyntaxChecker.h', ], - # These files are separate from javascriptcore_files so we can use a - # header map in the Apple Mac Xcode build. - 'os_win32_files': [ - 'os-win32/WinMain.cpp', - 'os-win32/inttypes.h', - 'os-win32/stdbool.h', - 'os-win32/stdint.h', + 'javascriptcore_derived_source_files': [ + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/ArrayPrototype.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/DatePrototype.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/HeaderDetection.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/JSONObject.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/Lexer.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/MathObject.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/NumberConstructor.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/RegExpConstructor.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/RegExpJitTables.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/RegExpObject.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/StringPrototype.lut.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/TracingDtrace.h', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore/ObjectConstructor.lut.h', ], 'minidom_files': [ 'API/tests/JSNode.c', diff --git a/Source/JavaScriptCore/JavaScriptCore.pri b/Source/JavaScriptCore/JavaScriptCore.pri index 391c74f..941a708 100644 --- a/Source/JavaScriptCore/JavaScriptCore.pri +++ b/Source/JavaScriptCore/JavaScriptCore.pri @@ -26,6 +26,7 @@ JAVASCRIPTCORE_INCLUDEPATH = \ $$PWD/bytecode \ $$PWD/bytecompiler \ $$PWD/collector/handles \ + $$PWD/dfg \ $$PWD/debugger \ $$PWD/interpreter \ $$PWD/jit \ diff --git a/Source/JavaScriptCore/JavaScriptCore.pro b/Source/JavaScriptCore/JavaScriptCore.pro index e41f04d..80ad3e8 100644 --- a/Source/JavaScriptCore/JavaScriptCore.pro +++ b/Source/JavaScriptCore/JavaScriptCore.pro @@ -69,10 +69,18 @@ SOURCES += \ bytecode/StructureStubInfo.cpp \ bytecompiler/BytecodeGenerator.cpp \ bytecompiler/NodesCodegen.cpp \ + collector/handles/HandleHeap.cpp \ + collector/handles/HandleStack.cpp \ debugger/DebuggerActivation.cpp \ debugger/DebuggerCallFrame.cpp \ debugger/Debugger.cpp \ - collector/handles/HandleHeap.cpp \ + dfg/DFGByteCodeParser.cpp \ + dfg/DFGGraph.cpp \ + dfg/DFGJITCodeGenerator.cpp \ + dfg/DFGJITCompiler.cpp \ + dfg/DFGNonSpeculativeJIT.cpp \ + dfg/DFGOperations.cpp \ + dfg/DFGSpeculativeJIT.cpp \ interpreter/CallFrame.cpp \ interpreter/Interpreter.cpp \ interpreter/RegisterFile.cpp \ diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make index 68075f9..b5461e4 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make @@ -5,7 +5,6 @@ BUILDSTYLE=Release_PGO !ENDIF install: - set PRODUCTION=1 set WebKitLibrariesDir=$(SRCROOT)\AppleInternal set WebKitOutputDir=$(OBJROOT) set ConfigurationBuildDir=$(OBJROOT)\$(BUILDSTYLE) diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln index a4832ed..0b610e2 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln @@ -22,7 +22,7 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_All|Win32 = Debug_All|Win32 Debug|Win32 = Debug|Win32 - Release_LTCG|Win32 = Release_LTCG|Win32 + Production|Win32 = Production|Win32 Release_PGO_Optimize|Win32 = Release_PGO_Optimize|Win32 Release_PGO|Win32 = Release_PGO|Win32 Release|Win32 = Release|Win32 @@ -32,8 +32,8 @@ Global {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_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 @@ -44,8 +44,8 @@ Global {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_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 @@ -56,8 +56,8 @@ Global {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 @@ -68,8 +68,8 @@ Global {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = Debug_All|Win32 {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = Debug|Win32 {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32 - {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32 + {DA31DA52-6675-48D4-89E0-333A7144397C}.Production|Win32.ActiveCfg = Production|Win32 + {DA31DA52-6675-48D4-89E0-333A7144397C}.Production|Win32.Build.0 = Production|Win32 {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 @@ -80,8 +80,8 @@ Global {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_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 diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def index 7a8be2a..d7cddf4 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def @@ -3,11 +3,10 @@ EXPORTS ??0CString@WTF@@QAE@PBD@Z ??0CString@WTF@@QAE@PBDI@Z ??0Collator@WTF@@QAE@PBD@Z - ??0DateInstance@JSC@@QAE@PAVExecState@1@N@Z ??0DateInstance@JSC@@QAE@PAVExecState@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@N@Z ??0DefaultGCActivityCallback@JSC@@QAE@PAVHeap@1@@Z ??0DropAllLocks@JSLock@JSC@@QAE@W4JSLockBehavior@2@@Z - ??0DynamicGlobalObjectScope@JSC@@QAE@PAVExecState@1@PAVJSGlobalObject@1@@Z + ??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z ??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@PAVJSGlobalObject@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVIdentifier@1@@Z ??0JSArray@JSC@@QAE@AAVJSGlobalData@1@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@ABVArgList@1@@Z ??0JSArray@JSC@@QAE@V?$NonNullPassRefPtr@VStructure@JSC@@@WTF@@@Z @@ -51,6 +50,7 @@ EXPORTS ?add@PropertyNameArray@JSC@@QAEXPAVStringImpl@WTF@@@Z ?addBytes@MD5@WTF@@QAEXPBEI@Z ?addBytes@SHA1@WTF@@QAEXPBEI@Z + ?addCurrentThread@MachineThreads@JSC@@QAEXXZ ?addPropertyTransition@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@IPAVJSCell@2@AAI@Z ?addPropertyTransitionToExistingStructure@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@IPAVJSCell@2@AAI@Z ?addPropertyWithoutTransition@Structure@JSC@@QAEIABVIdentifier@2@IPAVJSCell@2@@Z @@ -93,23 +93,22 @@ EXPORTS ?constructArray@JSC@@YAPAVJSArray@1@PAVExecState@1@ABVArgList@1@@Z ?constructEmptyArray@JSC@@YAPAVJSArray@1@PAVExecState@1@@Z ?constructEmptyObject@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?constructFunction@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVArgList@1@ABVIdentifier@1@ABVUString@1@H@Z + ?constructFunction@JSC@@YAPAVJSObject@1@PAVExecState@1@PAVJSGlobalObject@1@ABVArgList@1@ABVIdentifier@1@ABVUString@1@H@Z ?convertUTF16ToUTF8@Unicode@WTF@@YA?AW4ConversionResult@12@PAPB_WPB_WPAPADPAD_N@Z ?convertUTF8ToUTF16@Unicode@WTF@@YA?AW4ConversionResult@12@PAPBDPBDPAPA_WPA_W_N@Z ?create@ByteArray@WTF@@SA?AV?$PassRefPtr@VByteArray@WTF@@@2@I@Z ?create@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@W4ThreadStackType@2@@Z ?create@OpaqueJSString@@SA?AV?$PassRefPtr@UOpaqueJSString@@@WTF@@ABVUString@JSC@@@Z - ?create@RegExp@JSC@@SA?AV?$PassRefPtr@VRegExp@JSC@@@WTF@@PAVJSGlobalData@2@ABVUString@2@1@Z + ?create@RegExp@JSC@@SA?AV?$PassRefPtr@VRegExp@JSC@@@WTF@@PAVJSGlobalData@2@ABVUString@2@W4RegExpFlags@2@@Z ?createEmptyString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@@Z ?createError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z - ?createInheritorID@JSObject@JSC@@AAEPAVStructure@2@XZ ?createInterruptedExecutionException@JSC@@YAPAVJSObject@1@PAVJSGlobalData@1@@Z ?createLeaked@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@W4ThreadStackType@2@@Z ?createRangeError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z ?createReferenceError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z ?createSingleCharacterString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@E@Z ?createStackOverflowError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z - ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@VJSValue@2@PBUClassInfo@2@@Z + ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@AAVJSGlobalData@2@VJSValue@2@PBUClassInfo@2@@Z ?createSyntaxError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z ?createTable@HashTable@JSC@@ABEXPAVJSGlobalData@2@@Z ?createThread@WTF@@YAIP6APAXPAX@Z0@Z @@ -147,7 +146,6 @@ EXPORTS ?despecifyDictionaryFunction@Structure@JSC@@QAEXABVIdentifier@2@@Z ?despecifyFunctionTransition@Structure@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@PAV12@ABVIdentifier@2@@Z ?destroy@Heap@JSC@@QAEXXZ - ?destroyJSGlobalObjectData@JSGlobalObject@JSC@@CAXPAX@Z ?detach@Debugger@JSC@@UAEXPAVJSGlobalObject@2@@Z ?detachThread@WTF@@YAXI@Z ?didTimeOut@TimeoutChecker@JSC@@QAE_NPAVExecState@2@@Z @@ -277,8 +275,9 @@ EXPORTS ?putWithAttributes@JSObject@JSC@@UAEXPAVJSGlobalData@2@IVJSValue@2@I@Z ?randomNumber@WTF@@YANXZ ?recompileAllJSFunctions@Debugger@JSC@@QAEXPAVJSGlobalData@2@@Z - ?registerThread@MachineStackMarker@JSC@@QAEXXZ + ?regExpFlags@JSC@@YA?AW4RegExpFlags@1@ABVUString@1@@Z ?reifyString@StringBuilder@WTF@@AAEXXZ + ?reserveCapacity@StringBuilder@WTF@@QAEXI@Z ?releaseDecommitted@OSAllocator@WTF@@SAXPAXI@Z ?releaseStack@MarkStack@JSC@@CAXPAXI@Z ?reportExtraMemoryCostSlowCase@Heap@JSC@@AAEXI@Z @@ -336,10 +335,9 @@ EXPORTS ?toNumber@JSCell@JSC@@UBENPAVExecState@2@@Z ?toNumber@JSObject@JSC@@UBENPAVExecState@2@@Z ?toNumber@JSString@JSC@@EBENPAVExecState@2@@Z - ?toObject@JSCell@JSC@@UBEPAVJSObject@2@PAVExecState@2@@Z - ?toObject@JSObject@JSC@@UBEPAV12@PAVExecState@2@@Z - ?toObject@JSString@JSC@@EBEPAVJSObject@2@PAVExecState@2@@Z - ?toObjectSlowCase@JSValue@JSC@@ABEPAVJSObject@2@PAVExecState@2@@Z + ?toObject@JSCell@JSC@@UBEPAVJSObject@2@PAVExecState@2@PAVJSGlobalObject@2@@Z + ?toObject@JSObject@JSC@@UBEPAV12@PAVExecState@2@PAVJSGlobalObject@2@@Z + ?toObjectSlowCase@JSValue@JSC@@ABEPAVJSObject@2@PAVExecState@2@PAVJSGlobalObject@2@@Z ?toPrimitive@JSCell@JSC@@UBE?AVJSValue@2@PAVExecState@2@W4PreferredPrimitiveType@2@@Z ?toPrimitive@JSString@JSC@@EBE?AVJSValue@2@PAVExecState@2@W4PreferredPrimitiveType@2@@Z ?toStrictThisObject@JSObject@JSC@@UBE?AVJSValue@2@PAVExecState@2@@Z diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj index 34a9902..30b014a 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj @@ -18,7 +18,7 @@ @@ -202,7 +202,7 @@ @@ -447,7 +447,7 @@ @@ -1960,6 +1960,22 @@ RelativePath="..\..\collector\handles\HandleHeap.h" > + + + + + + + + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops new file mode 100644 index 0000000..8cd1130 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops @@ -0,0 +1,14 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops new file mode 100644 index 0000000..ea0806d --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops @@ -0,0 +1,14 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj index 2437071..ebff713 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj @@ -43,7 +43,7 @@ /> diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops new file mode 100644 index 0000000..1d8e82d --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops @@ -0,0 +1,14 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops new file mode 100644 index 0000000..e4612c3 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops new file mode 100644 index 0000000..64699b5 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops @@ -0,0 +1,14 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops new file mode 100644 index 0000000..ada0b8e --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops @@ -0,0 +1,14 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops new file mode 100644 index 0000000..3e207e7 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops @@ -0,0 +1,15 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln index 1109c33..1e24f28 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln @@ -22,7 +22,7 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_All|Win32 = Debug_All|Win32 Debug|Win32 = Debug|Win32 - Release_LTCG|Win32 = Release_LTCG|Win32 + Production|Win32 = Production|Win32 Release_PGO_Optimize|Win32 = Release_PGO_Optimize|Win32 Release_PGO|Win32 = Release_PGO|Win32 Release|Win32 = Release|Win32 @@ -32,8 +32,8 @@ Global {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_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 @@ -44,8 +44,8 @@ Global {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_PGO_Optimize|Win32.ActiveCfg = Release_PGO|Win32 {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO_Optimize|Win32.Build.0 = Release_PGO|Win32 {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_PGO|Win32.ActiveCfg = Release_PGO|Win32 @@ -56,8 +56,8 @@ Global {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_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 @@ -68,8 +68,8 @@ Global {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32 - {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_LTCG|Win32.Build.0 = Release_LTCG|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_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 diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj index 8f0cfcb..aa337b3 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj @@ -18,7 +18,7 @@ @@ -227,7 +227,7 @@ + + @@ -965,7 +969,7 @@ > + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops new file mode 100644 index 0000000..061f2ed --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops new file mode 100644 index 0000000..7965652 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFProduction.vsprops new file mode 100644 index 0000000..3de342c --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFProduction.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFRelease.vsprops new file mode 100644 index 0000000..3960f98 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFRelease.vsprops @@ -0,0 +1,12 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops new file mode 100644 index 0000000..3267d79 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops new file mode 100644 index 0000000..ac4f8a5 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj index ebcfd8e..a650cd2 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj @@ -18,7 +18,7 @@ @@ -324,7 +324,7 @@ + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops new file mode 100644 index 0000000..6090c60 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops @@ -0,0 +1,12 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops new file mode 100644 index 0000000..c1868a8 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops @@ -0,0 +1,12 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops new file mode 100644 index 0000000..408871b --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscProduction.vsprops @@ -0,0 +1,12 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops new file mode 100644 index 0000000..ba9b288 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscRelease.vsprops @@ -0,0 +1,11 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops new file mode 100644 index 0000000..2104fe4 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops @@ -0,0 +1,12 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops new file mode 100644 index 0000000..78f3672 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops @@ -0,0 +1,12 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj index 5b18032..1dfdd1e 100644 --- a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj @@ -18,7 +18,7 @@ @@ -430,7 +430,7 @@ /> + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops new file mode 100644 index 0000000..cc139f8 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops new file mode 100644 index 0000000..4e1e11f --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops new file mode 100644 index 0000000..03fceab --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiProduction.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops new file mode 100644 index 0000000..1c041ff --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiRelease.vsprops @@ -0,0 +1,12 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops new file mode 100644 index 0000000..c025283 --- /dev/null +++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops @@ -0,0 +1,13 @@ + + + diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj index 9f8d49a..44e108c 100644 --- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj +++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj @@ -121,6 +121,7 @@ 14469DEC107EC7E700650446 /* StringObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC18C3C20E16EE3300B34460 /* StringObject.cpp */; }; 14469DED107EC7E700650446 /* StringPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC18C3C50E16EE3300B34460 /* StringPrototype.cpp */; }; 14469DEE107EC7E700650446 /* UString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A8850255597D01FF60F7 /* UString.cpp */; }; + 144836E7132DA7BE005BE785 /* ConservativeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 149DAAF212EB559D0083B12B /* ConservativeSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; 146AAB380B66A94400E55F16 /* JSStringRefCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146AAB370B66A94400E55F16 /* JSStringRefCF.cpp */; }; 146B16D812EB5B59001BEC1B /* ConservativeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146B14DB12EB5B12001BEC1B /* ConservativeSet.cpp */; }; 146FE51211A710430087AE66 /* JITCall32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146FE51111A710430087AE66 /* JITCall32_64.cpp */; }; @@ -209,7 +210,8 @@ 655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 655EB29A10CE2581001A990E /* NodesCodegen.cpp */; }; 65DFC93308EA173A00F7300B /* HashTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65DFC92D08EA173A00F7300B /* HashTable.cpp */; }; 65E1A3DF122B894500B26097 /* NonCopyingSort.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E1A2F4122B880D00B26097 /* NonCopyingSort.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 65FDE49C0BDD1D4A00E80111 /* Assertions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65E217B808E7EECC0023E5F6 /* Assertions.cpp */; settings = {COMPILER_FLAGS = "-Wno-missing-format-attribute"; }; }; + 65FDE49C0BDD1D4A00E80111 /* Assertions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65E217B808E7EECC0023E5F6 /* Assertions.cpp */; }; + 7186A6EC13100BA5004479E1 /* HexNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 7186A6E813100B57004479E1 /* HexNumber.h */; settings = {ATTRIBUTES = (Private, ); }; }; 76FB9F0F12E851860051A2EB /* SHA1.h in Headers */ = {isa = PBXBuildFile; fileRef = 76FB9F0E12E851860051A2EB /* SHA1.h */; settings = {ATTRIBUTES = (Private, ); }; }; 76FB9F1112E851960051A2EB /* SHA1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76FB9F1012E851960051A2EB /* SHA1.cpp */; }; 7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4EE7080EBB7963005934AA /* StructureChain.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -280,6 +282,25 @@ 86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */; }; 86E116B10FE75AC800B512BC /* CodeLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E116B00FE75AC800B512BC /* CodeLocation.h */; }; 86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E85538111B9968001AF51E /* JSStringBuilder.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 */; }; + 86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DB71328DF82002B2AD7 /* DFGGraph.cpp */; }; + 86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DB81328DF82002B2AD7 /* DFGGraph.h */; }; + 86EC9DC91328DF82002B2AD7 /* DFGJITCodeGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DB91328DF82002B2AD7 /* DFGJITCodeGenerator.cpp */; }; + 86EC9DCA1328DF82002B2AD7 /* DFGJITCodeGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DBA1328DF82002B2AD7 /* DFGJITCodeGenerator.h */; }; + 86EC9DCB1328DF82002B2AD7 /* DFGJITCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */; }; + 86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */; }; + 86EC9DCD1328DF82002B2AD7 /* DFGNonSpeculativeJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EC9DBD1328DF82002B2AD7 /* DFGNonSpeculativeJIT.cpp */; }; + 86EC9DCE1328DF82002B2AD7 /* DFGNonSpeculativeJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EC9DBE1328DF82002B2AD7 /* DFGNonSpeculativeJIT.h */; }; + 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 */; }; + 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 */; }; + 86ECA4F1132EAA6D002B2AD7 /* DFGAliasTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ECA4F0132EAA6D002B2AD7 /* DFGAliasTracker.h */; }; 86F38859121130CA007A7CE3 /* AtomicStringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F38858121130CA007A7CE3 /* AtomicStringHash.h */; settings = {ATTRIBUTES = (Private, ); }; }; 90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */; }; 90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = 90213E3C123A40C200D422F3 /* MemoryStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -355,6 +376,10 @@ A74DE1D0120B875600D40D5B /* ARMv7Assembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A74DE1CB120B86D600D40D5B /* ARMv7Assembler.cpp */; }; 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, ); }; }; + A76BE39F132EEA7C008F7F0B /* HandleStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A76BE1B7132DAC68008F7F0B /* HandleStack.cpp */; }; + A76BE3A0132EEA7C008F7F0B /* HandleStack.h in Headers */ = {isa = PBXBuildFile; fileRef = A76BE1B8132DAC68008F7F0B /* HandleStack.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A76BE3A1132EEA7C008F7F0B /* Local.h in Headers */ = {isa = PBXBuildFile; fileRef = A76BE1B5132DABF5008F7F0B /* Local.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A76BE3A2132EEA7C008F7F0B /* LocalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = A76BE1B6132DAC24008F7F0B /* LocalScope.h */; settings = {ATTRIBUTES = (Private, ); }; }; A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = A76C51741182748D00715B05 /* JSInterfaceJIT.h */; }; A7795590101A74D500114E55 /* MarkStack.h in Headers */ = {isa = PBXBuildFile; fileRef = A779558F101A74D500114E55 /* MarkStack.h */; settings = {ATTRIBUTES = (Private, ); }; }; A783A0D111A36DCA00563D20 /* JSObjectWithGlobalObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A783A0D011A36DCA00563D20 /* JSObjectWithGlobalObject.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -531,7 +556,7 @@ BC3135650F302FA3003DFD3A /* DebuggerActivation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC3135630F302FA3003DFD3A /* DebuggerActivation.cpp */; }; BC5F7BBE11823B590052C02C /* Atomics.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBB11823B590052C02C /* Atomics.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC5F7BBF11823B590052C02C /* ThreadingPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */; settings = {ATTRIBUTES = (Private, ); }; }; - BC5F7BC011823B590052C02C /* ThreadSafeShared.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBD11823B590052C02C /* ThreadSafeShared.h */; settings = {ATTRIBUTES = (Private, ); }; }; + BC5F7BC011823B590052C02C /* ThreadSafeRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC6AAAE50E1F426500AD87D8 /* ClassInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */; }; BC7F8FB90E19D1C3008632C0 /* JSNumberCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7F8FB80E19D1C3008632C0 /* JSNumberCell.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -850,6 +875,7 @@ 65EA73620BAE35D1001BB560 /* CommonIdentifiers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CommonIdentifiers.cpp; sourceTree = ""; }; 65EA73630BAE35D1001BB560 /* CommonIdentifiers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CommonIdentifiers.h; sourceTree = ""; }; 704FD35305697E6D003DBED9 /* BooleanObject.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = BooleanObject.h; sourceTree = ""; tabWidth = 8; }; + 7186A6E813100B57004479E1 /* HexNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HexNumber.h; sourceTree = ""; }; 76FB9F0E12E851860051A2EB /* SHA1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SHA1.h; sourceTree = ""; }; 76FB9F1012E851960051A2EB /* SHA1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SHA1.cpp; sourceTree = ""; }; 7E2C6C980D31C6B6002D44E2 /* ScopeChainMark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScopeChainMark.h; sourceTree = ""; }; @@ -922,6 +948,25 @@ 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 = ""; }; 86E85538111B9968001AF51E /* JSStringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringBuilder.h; sourceTree = ""; }; + 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGByteCodeParser.cpp; path = dfg/DFGByteCodeParser.cpp; sourceTree = ""; }; + 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGByteCodeParser.h; path = dfg/DFGByteCodeParser.h; sourceTree = ""; }; + 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGGenerationInfo.h; path = dfg/DFGGenerationInfo.h; sourceTree = ""; }; + 86EC9DB71328DF82002B2AD7 /* DFGGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGGraph.cpp; path = dfg/DFGGraph.cpp; sourceTree = ""; }; + 86EC9DB81328DF82002B2AD7 /* DFGGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGGraph.h; path = dfg/DFGGraph.h; sourceTree = ""; }; + 86EC9DB91328DF82002B2AD7 /* DFGJITCodeGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCodeGenerator.cpp; path = dfg/DFGJITCodeGenerator.cpp; sourceTree = ""; }; + 86EC9DBA1328DF82002B2AD7 /* DFGJITCodeGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGJITCodeGenerator.h; path = dfg/DFGJITCodeGenerator.h; sourceTree = ""; }; + 86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCompiler.cpp; path = dfg/DFGJITCompiler.cpp; sourceTree = ""; }; + 86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGJITCompiler.h; path = dfg/DFGJITCompiler.h; sourceTree = ""; }; + 86EC9DBD1328DF82002B2AD7 /* DFGNonSpeculativeJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGNonSpeculativeJIT.cpp; path = dfg/DFGNonSpeculativeJIT.cpp; sourceTree = ""; }; + 86EC9DBE1328DF82002B2AD7 /* DFGNonSpeculativeJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGNonSpeculativeJIT.h; path = dfg/DFGNonSpeculativeJIT.h; sourceTree = ""; }; + 86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGOperations.cpp; path = dfg/DFGOperations.cpp; sourceTree = ""; }; + 86EC9DC01328DF82002B2AD7 /* DFGOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGOperations.h; path = dfg/DFGOperations.h; sourceTree = ""; }; + 86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGRegisterBank.h; path = dfg/DFGRegisterBank.h; sourceTree = ""; }; + 86EC9DC21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGSpeculativeJIT.cpp; path = dfg/DFGSpeculativeJIT.cpp; sourceTree = ""; }; + 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 = ""; }; + 86ECA4F0132EAA6D002B2AD7 /* DFGAliasTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAliasTracker.h; path = dfg/DFGAliasTracker.h; sourceTree = ""; }; 86F38858121130CA007A7CE3 /* AtomicStringHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicStringHash.h; path = text/AtomicStringHash.h; sourceTree = ""; }; 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStatistics.cpp; sourceTree = ""; }; 90213E3C123A40C200D422F3 /* MemoryStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStatistics.h; sourceTree = ""; }; @@ -1030,6 +1075,10 @@ A74B3498102A5F8E0032AB98 /* MarkStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MarkStack.cpp; sourceTree = ""; }; A74DE1CB120B86D600D40D5B /* ARMv7Assembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ARMv7Assembler.cpp; sourceTree = ""; }; A75706DD118A2BCF0057F88F /* JITArithmetic32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic32_64.cpp; sourceTree = ""; }; + A76BE1B5132DABF5008F7F0B /* Local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Local.h; path = collector/handles/Local.h; sourceTree = ""; }; + A76BE1B6132DAC24008F7F0B /* LocalScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocalScope.h; path = collector/handles/LocalScope.h; sourceTree = ""; }; + A76BE1B7132DAC68008F7F0B /* HandleStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HandleStack.cpp; path = collector/handles/HandleStack.cpp; sourceTree = ""; }; + A76BE1B8132DAC68008F7F0B /* HandleStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HandleStack.h; path = collector/handles/HandleStack.h; sourceTree = ""; }; A76C51741182748D00715B05 /* JSInterfaceJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInterfaceJIT.h; sourceTree = ""; }; A779558F101A74D500114E55 /* MarkStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkStack.h; sourceTree = ""; }; A783A0D011A36DCA00563D20 /* JSObjectWithGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSObjectWithGlobalObject.h; sourceTree = ""; }; @@ -1125,7 +1174,7 @@ BC337BEA0E1B00CB0076918A /* Error.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Error.cpp; sourceTree = ""; }; BC5F7BBB11823B590052C02C /* Atomics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atomics.h; sourceTree = ""; }; BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadingPrimitives.h; sourceTree = ""; }; - BC5F7BBD11823B590052C02C /* ThreadSafeShared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeShared.h; sourceTree = ""; }; + BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeRefCounted.h; sourceTree = ""; }; BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassInfo.h; sourceTree = ""; }; BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectFunctions.cpp; sourceTree = ""; }; BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectFunctions.h; sourceTree = ""; }; @@ -1317,6 +1366,7 @@ 7E39D81D0EC38EFA003AF11A /* bytecompiler */, A7E4FC8312F8E4A300AF4CF4 /* collector */, 1480DB9A0DDC2231003CFDF2 /* debugger */, + 86EC9DB31328DF44002B2AD7 /* dfg */, 1429D77A0ED20D7300B89619 /* interpreter */, 1429D92C0ED22D7000B89619 /* jit */, 7E39D8370EC3A388003AF11A /* parser */, @@ -1567,6 +1617,7 @@ 65DFC92D08EA173A00F7300B /* HashTable.cpp */, 65DFC92E08EA173A00F7300B /* HashTable.h */, 65DFC92F08EA173A00F7300B /* HashTraits.h */, + 7186A6E813100B57004479E1 /* HexNumber.h */, 657EB7450B708F540063461B /* ListHashSet.h */, 148A1626095D16BB00666D0D /* ListRefPtr.h */, E1EE79270D6C964500FEA3BA /* Locker.h */, @@ -1634,7 +1685,7 @@ E1EE79220D6C95CD00FEA3BA /* Threading.h */, BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */, E1EE793C0D6C9B9200FEA3BA /* ThreadingPthreads.cpp */, - BC5F7BBD11823B590052C02C /* ThreadSafeShared.h */, + BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */, E1B7C8BD0DA3A3360074B0DC /* ThreadSpecific.h */, 0B330C260F38C62300692DE3 /* TypeTraits.cpp */, 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */, @@ -1946,6 +1997,32 @@ name = yarr; sourceTree = ""; }; + 86EC9DB31328DF44002B2AD7 /* dfg */ = { + isa = PBXGroup; + children = ( + 86ECA4F0132EAA6D002B2AD7 /* DFGAliasTracker.h */, + 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */, + 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */, + 86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */, + 86EC9DB71328DF82002B2AD7 /* DFGGraph.cpp */, + 86EC9DB81328DF82002B2AD7 /* DFGGraph.h */, + 86EC9DB91328DF82002B2AD7 /* DFGJITCodeGenerator.cpp */, + 86EC9DBA1328DF82002B2AD7 /* DFGJITCodeGenerator.h */, + 86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */, + 86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */, + 86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */, + 86EC9DBD1328DF82002B2AD7 /* DFGNonSpeculativeJIT.cpp */, + 86EC9DBE1328DF82002B2AD7 /* DFGNonSpeculativeJIT.h */, + 86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */, + 86EC9DC01328DF82002B2AD7 /* DFGOperations.h */, + 86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */, + 86ECA3F9132DF25A002B2AD7 /* DFGScoreBoard.h */, + 86EC9DC21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp */, + 86EC9DC31328DF82002B2AD7 /* DFGSpeculativeJIT.h */, + ); + name = dfg; + sourceTree = ""; + }; 932FC3C20824BB70005B3C75 /* Resources */ = { isa = PBXGroup; children = ( @@ -2074,6 +2151,10 @@ A7E4FC8812F8E4CA00AF4CF4 /* Handle.h */, A7E4FC8912F8E4CA00AF4CF4 /* HandleHeap.cpp */, A7E4FC8A12F8E4CA00AF4CF4 /* HandleHeap.h */, + A76BE1B7132DAC68008F7F0B /* HandleStack.cpp */, + A76BE1B8132DAC68008F7F0B /* HandleStack.h */, + A76BE1B5132DABF5008F7F0B /* Local.h */, + A76BE1B6132DAC24008F7F0B /* LocalScope.h */, ); name = handles; sourceTree = ""; @@ -2160,6 +2241,7 @@ BC18C3F40E16F5CD00B34460 /* Completion.h in Headers */, FDA15C1E12B0305C003A583A /* Complex.h in Headers */, BC18C3F50E16F5CD00B34460 /* config.h in Headers */, + 144836E7132DA7BE005BE785 /* ConservativeSet.h in Headers */, BC18C3F60E16F5CD00B34460 /* ConstructData.h in Headers */, 0BDFFAE00FC6192900D69EF4 /* CrossThreadRefCounted.h in Headers */, 86565743115BE3DA00291F40 /* CString.h in Headers */, @@ -2205,6 +2287,7 @@ BC18C40D0E16F5CD00B34460 /* HashTable.h in Headers */, BC18C40E0E16F5CD00B34460 /* HashTraits.h in Headers */, 140CDE7112DE97B10013CFC5 /* Heap.h in Headers */, + 7186A6EC13100BA5004479E1 /* HexNumber.h in Headers */, BC18C40F0E16F5CD00B34460 /* Identifier.h in Headers */, BC18C4100E16F5CD00B34460 /* InitializeThreading.h in Headers */, 969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */, @@ -2401,7 +2484,7 @@ 18BAB55410DAE066000D945B /* ThreadIdentifierDataPthreads.h in Headers */, BC18C4700E16F5CD00B34460 /* Threading.h in Headers */, BC5F7BBF11823B590052C02C /* ThreadingPrimitives.h in Headers */, - BC5F7BC011823B590052C02C /* ThreadSafeShared.h in Headers */, + BC5F7BC011823B590052C02C /* ThreadSafeRefCounted.h in Headers */, BC18C4710E16F5CD00B34460 /* ThreadSpecific.h in Headers */, A7386556118697B400540279 /* ThunkGenerators.h in Headers */, 14A42E400F4F60EE00599099 /* TimeoutChecker.h in Headers */, @@ -2449,6 +2532,21 @@ A7C40C0A130B057D00D002A1 /* BlockStack.h in Headers */, A7C40C0B130B057D00D002A1 /* SentinelLinkedList.h in Headers */, A7C40C0C130B057D00D002A1 /* SinglyLinkedList.h in Headers */, + A76BE3A0132EEA7C008F7F0B /* HandleStack.h in Headers */, + A76BE3A1132EEA7C008F7F0B /* Local.h in Headers */, + A76BE3A2132EEA7C008F7F0B /* LocalScope.h in Headers */, + 86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */, + 86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */, + 86EC9DC81328DF82002B2AD7 /* DFGGraph.h in Headers */, + 86EC9DCA1328DF82002B2AD7 /* DFGJITCodeGenerator.h in Headers */, + 86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */, + 86EC9DCE1328DF82002B2AD7 /* DFGNonSpeculativeJIT.h in Headers */, + 86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */, + 86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */, + 86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */, + 86ECA3EA132DEF1C002B2AD7 /* DFGNode.h in Headers */, + 86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */, + 86ECA4F1132EAA6D002B2AD7 /* DFGAliasTracker.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2888,6 +2986,14 @@ 97941A7E1302A098004A3447 /* CryptographicallyRandomNumber.cpp in Sources */, A7E4FC9112F8E4CA00AF4CF4 /* HandleHeap.cpp in Sources */, A7AC25BD1304D146003396DE /* MarkedBlock.cpp in Sources */, + A76BE39F132EEA7C008F7F0B /* HandleStack.cpp in Sources */, + 86EC9DC41328DF82002B2AD7 /* DFGByteCodeParser.cpp in Sources */, + 86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */, + 86EC9DC91328DF82002B2AD7 /* DFGJITCodeGenerator.cpp in Sources */, + 86EC9DCB1328DF82002B2AD7 /* DFGJITCompiler.cpp in Sources */, + 86EC9DCD1328DF82002B2AD7 /* DFGNonSpeculativeJIT.cpp in Sources */, + 86EC9DCF1328DF82002B2AD7 /* DFGOperations.cpp in Sources */, + 86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/JavaScriptCore/Makefile b/Source/JavaScriptCore/Makefile index b9e2a72..cb4c11a 100644 --- a/Source/JavaScriptCore/Makefile +++ b/Source/JavaScriptCore/Makefile @@ -1,2 +1 @@ -OTHER_OPTIONS = -target All include ../Makefile.shared diff --git a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h index 5ebc572..8e81784 100644 --- a/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h +++ b/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h @@ -145,21 +145,21 @@ public: // Describes an memory operand given by a pointer. For regular load & store // operations an unwrapped void* will be used, rather than using this. struct AbsoluteAddress { - explicit AbsoluteAddress(void* ptr) + explicit AbsoluteAddress(const void* ptr) : m_ptr(ptr) { } - void* m_ptr; + const void* m_ptr; }; - // ImmPtr: + // TrustedImmPtr: // // A pointer sized immediate operand to an instruction - this is wrapped // in a class requiring explicit construction in order to differentiate // from pointers used as absolute addresses to memory operations - struct ImmPtr { - explicit ImmPtr(const void* value) + struct TrustedImmPtr { + explicit TrustedImmPtr(const void* value) : m_value(value) { } @@ -172,14 +172,21 @@ public: const void* m_value; }; - // Imm32: + struct ImmPtr : public TrustedImmPtr { + explicit ImmPtr(const void* value) + : TrustedImmPtr(value) + { + } + }; + + // TrustedImm32: // // A 32bit immediate operand to an instruction - this is wrapped in a // class requiring explicit construction in order to prevent RegisterIDs // (which are implemented as an enum) from accidentally being passed as // immediate values. - struct Imm32 { - explicit Imm32(int32_t value) + struct TrustedImm32 { + explicit TrustedImm32(int32_t value) : m_value(value) #if CPU(ARM) || CPU(MIPS) , m_isPointer(false) @@ -188,7 +195,7 @@ public: } #if !CPU(X86_64) - explicit Imm32(ImmPtr ptr) + explicit TrustedImm32(TrustedImmPtr ptr) : m_value(ptr.asIntptr()) #if CPU(ARM) || CPU(MIPS) , m_isPointer(true) @@ -211,6 +218,19 @@ public: }; + struct Imm32 : public TrustedImm32 { + explicit Imm32(int32_t value) + : TrustedImm32(value) + { + } +#if !CPU(X86_64) + explicit Imm32(TrustedImmPtr ptr) + : TrustedImm32(ptr) + { + } +#endif + }; + // Section 2: MacroAssembler code buffer handles // // The following types are used to reference items in the code buffer @@ -358,16 +378,18 @@ public: { } - void link(AbstractMacroAssembler* masm) + void link(AbstractMacroAssembler* masm) const { masm->m_assembler.linkJump(m_jmp, masm->m_assembler.label()); } - void linkTo(Label label, AbstractMacroAssembler* masm) + void linkTo(Label label, AbstractMacroAssembler* masm) const { masm->m_assembler.linkJump(m_jmp, label.m_label); } + bool isSet() const { return m_jmp.isSet(); } + private: JmpSrc m_jmp; }; diff --git a/Source/JavaScriptCore/assembler/AssemblerBuffer.h b/Source/JavaScriptCore/assembler/AssemblerBuffer.h index 0454a99..a90efc6 100644 --- a/Source/JavaScriptCore/assembler/AssemblerBuffer.h +++ b/Source/JavaScriptCore/assembler/AssemblerBuffer.h @@ -114,6 +114,21 @@ namespace JSC { putIntUnchecked(value); } + template + void putIntegral(IntegralType value) + { + if (m_size > m_capacity - sizeof(IntegralType)) + grow(); + putIntegralUnchecked(value); + } + + template + void putIntegralUnchecked(IntegralType value) + { + *reinterpret_cast_ptr(&m_buffer[m_size]) = value; + m_size += sizeof(IntegralType); + } + void* data() const { return m_buffer; diff --git a/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h b/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h index 599be14..9a9618f 100644 --- a/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h +++ b/Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h @@ -188,29 +188,14 @@ public: return AssemblerBuffer::executableCopy(allocator); } - void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false) + void putShortWithConstantInt(uint16_t insn, uint32_t constant, bool isReusable = false) { - if (!m_numConsts) - m_maxDistance = maxPoolSize; - flushIfNoSpaceFor(4, 4); - - m_loadOffsets.append(AssemblerBuffer::size()); - if (isReusable) - for (int i = 0; i < m_numConsts; ++i) { - if (m_mask[i] == ReusableConst && m_pool[i] == constant) { - AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, i)); - correctDeltas(4); - return; - } - } - - m_pool[m_numConsts] = constant; - m_mask[m_numConsts] = static_cast(isReusable ? ReusableConst : UniqueConst); - - AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, m_numConsts)); - ++m_numConsts; + putIntegralWithConstantInt(insn, constant, isReusable); + } - correctDeltas(4, 4); + void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false) + { + putIntegralWithConstantInt(insn, constant, isReusable); } // This flushing mechanism can be called after any unconditional jumps. @@ -248,6 +233,33 @@ private: m_lastConstDelta = constSize; } + template + void putIntegralWithConstantInt(IntegralType insn, uint32_t constant, bool isReusable) + { + if (!m_numConsts) + m_maxDistance = maxPoolSize; + flushIfNoSpaceFor(sizeof(IntegralType), 4); + + m_loadOffsets.append(AssemblerBuffer::size()); + if (isReusable) { + for (int i = 0; i < m_numConsts; ++i) { + if (m_mask[i] == ReusableConst && m_pool[i] == constant) { + putIntegral(static_cast(AssemblerType::patchConstantPoolLoad(insn, i))); + correctDeltas(sizeof(IntegralType)); + return; + } + } + } + + m_pool[m_numConsts] = constant; + m_mask[m_numConsts] = static_cast(isReusable ? ReusableConst : UniqueConst); + + putIntegral(static_cast(AssemblerType::patchConstantPoolLoad(insn, m_numConsts))); + ++m_numConsts; + + correctDeltas(sizeof(IntegralType), 4); + } + void flushConstantPool(bool useBarrier = true) { if (m_numConsts == 0) @@ -259,7 +271,7 @@ private: // Callback to protect the constant pool from execution if (useBarrier) - AssemblerBuffer::putInt(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool)); + putIntegral(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool)); if (alignPool) { if (alignPool & 1) diff --git a/Source/JavaScriptCore/assembler/MacroAssembler.h b/Source/JavaScriptCore/assembler/MacroAssembler.h index fa165de..bb19a98 100644 --- a/Source/JavaScriptCore/assembler/MacroAssembler.h +++ b/Source/JavaScriptCore/assembler/MacroAssembler.h @@ -74,7 +74,7 @@ public: // described in terms of other macro assembly methods. void pop() { - addPtr(Imm32(sizeof(void*)), stackPointerRegister); + addPtr(TrustedImm32(sizeof(void*)), stackPointerRegister); } void peek(RegisterID dest, int index = 0) @@ -87,19 +87,19 @@ public: storePtr(src, Address(stackPointerRegister, (index * sizeof(void*)))); } - void poke(Imm32 value, int index = 0) + void poke(TrustedImm32 value, int index = 0) { store32(value, Address(stackPointerRegister, (index * sizeof(void*)))); } - void poke(ImmPtr imm, int index = 0) + void poke(TrustedImmPtr imm, int index = 0) { storePtr(imm, Address(stackPointerRegister, (index * sizeof(void*)))); } // Backwards banches, these are currently all implemented using existing forwards branch mechanisms. - void branchPtr(Condition cond, RegisterID op1, ImmPtr imm, Label target) + void branchPtr(Condition cond, RegisterID op1, TrustedImmPtr imm, Label target) { branchPtr(cond, op1, imm).linkTo(target, this); } @@ -109,7 +109,7 @@ public: branch32(cond, op1, op2).linkTo(target, this); } - void branch32(Condition cond, RegisterID op1, Imm32 imm, Label target) + void branch32(Condition cond, RegisterID op1, TrustedImm32 imm, Label target) { branch32(cond, op1, imm).linkTo(target, this); } @@ -144,17 +144,17 @@ public: add32(src, dest); } - void addPtr(Imm32 imm, RegisterID srcDest) + void addPtr(TrustedImm32 imm, RegisterID srcDest) { add32(imm, srcDest); } - void addPtr(ImmPtr imm, RegisterID dest) + void addPtr(TrustedImmPtr imm, RegisterID dest) { - add32(Imm32(imm), dest); + add32(TrustedImm32(imm), dest); } - void addPtr(Imm32 imm, RegisterID src, RegisterID dest) + void addPtr(TrustedImm32 imm, RegisterID src, RegisterID dest) { add32(imm, src, dest); } @@ -164,7 +164,7 @@ public: and32(src, dest); } - void andPtr(Imm32 imm, RegisterID srcDest) + void andPtr(TrustedImm32 imm, RegisterID srcDest) { and32(imm, srcDest); } @@ -174,12 +174,12 @@ public: or32(src, dest); } - void orPtr(ImmPtr imm, RegisterID dest) + void orPtr(TrustedImmPtr imm, RegisterID dest) { - or32(Imm32(imm), dest); + or32(TrustedImm32(imm), dest); } - void orPtr(Imm32 imm, RegisterID dest) + void orPtr(TrustedImm32 imm, RegisterID dest) { or32(imm, dest); } @@ -189,14 +189,14 @@ public: sub32(src, dest); } - void subPtr(Imm32 imm, RegisterID dest) + void subPtr(TrustedImm32 imm, RegisterID dest) { sub32(imm, dest); } - void subPtr(ImmPtr imm, RegisterID dest) + void subPtr(TrustedImmPtr imm, RegisterID dest) { - sub32(Imm32(imm), dest); + sub32(TrustedImm32(imm), dest); } void xorPtr(RegisterID src, RegisterID dest) @@ -204,7 +204,7 @@ public: xor32(src, dest); } - void xorPtr(Imm32 imm, RegisterID srcDest) + void xorPtr(TrustedImm32 imm, RegisterID srcDest) { xor32(imm, srcDest); } @@ -230,7 +230,7 @@ public: return load32WithAddressOffsetPatch(address, dest); } - void setPtr(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void setPtr(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { set32Compare32(cond, left, right, dest); } @@ -250,14 +250,14 @@ public: store32(src, address); } - void storePtr(ImmPtr imm, ImplicitAddress address) + void storePtr(TrustedImmPtr imm, ImplicitAddress address) { - store32(Imm32(imm), address); + store32(TrustedImm32(imm), address); } - void storePtr(ImmPtr imm, void* address) + void storePtr(TrustedImmPtr imm, void* address) { - store32(Imm32(imm), address); + store32(TrustedImm32(imm), address); } DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) @@ -271,9 +271,9 @@ public: return branch32(cond, left, right); } - Jump branchPtr(Condition cond, RegisterID left, ImmPtr right) + Jump branchPtr(Condition cond, RegisterID left, TrustedImmPtr right) { - return branch32(cond, left, Imm32(right)); + return branch32(cond, left, TrustedImm32(right)); } Jump branchPtr(Condition cond, RegisterID left, Address right) @@ -291,14 +291,14 @@ public: return branch32(cond, left, right); } - Jump branchPtr(Condition cond, Address left, ImmPtr right) + Jump branchPtr(Condition cond, Address left, TrustedImmPtr right) { - return branch32(cond, left, Imm32(right)); + return branch32(cond, left, TrustedImm32(right)); } - Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right) + Jump branchPtr(Condition cond, AbsoluteAddress left, TrustedImmPtr right) { - return branch32(cond, left, Imm32(right)); + return branch32(cond, left, TrustedImm32(right)); } Jump branchTestPtr(Condition cond, RegisterID reg, RegisterID mask) @@ -306,17 +306,17 @@ public: return branchTest32(cond, reg, mask); } - Jump branchTestPtr(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + Jump branchTestPtr(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) { return branchTest32(cond, reg, mask); } - Jump branchTestPtr(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTestPtr(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { return branchTest32(cond, address, mask); } - Jump branchTestPtr(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + Jump branchTestPtr(Condition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { return branchTest32(cond, address, mask); } @@ -327,12 +327,12 @@ public: return branchAdd32(cond, src, dest); } - Jump branchSubPtr(Condition cond, Imm32 imm, RegisterID dest) + Jump branchSubPtr(Condition cond, TrustedImm32 imm, RegisterID dest) { return branchSub32(cond, imm, dest); } using MacroAssemblerBase::branchTest8; - Jump branchTest8(Condition cond, ExtendedAddress address, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, ExtendedAddress address, TrustedImm32 mask = TrustedImm32(-1)) { return MacroAssemblerBase::branchTest8(cond, Address(address.base, address.offset), mask); } diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h index 66814b5..80f69bf 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h @@ -86,14 +86,14 @@ public: m_assembler.adds_r(dest, dest, src); } - void add32(Imm32 imm, Address address) + void add32(TrustedImm32 imm, Address address) { load32(address, ARMRegisters::S1); add32(imm, ARMRegisters::S1); store32(ARMRegisters::S1, address); } - void add32(Imm32 imm, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID dest) { m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } @@ -109,7 +109,7 @@ public: m_assembler.ands_r(dest, dest, src); } - void and32(Imm32 imm, RegisterID dest) + void and32(TrustedImm32 imm, RegisterID dest) { ARMWord w = m_assembler.getImm(imm.m_value, ARMRegisters::S0, true); if (w & ARMAssembler::OP2_INV_IMM) @@ -127,7 +127,7 @@ public: m_assembler.movs_r(dest, m_assembler.lsl_r(dest, ARMRegisters::S0)); } - void lshift32(Imm32 imm, RegisterID dest) + void lshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); } @@ -141,7 +141,7 @@ public: m_assembler.muls_r(dest, dest, src); } - void mul32(Imm32 imm, RegisterID src, RegisterID dest) + void mul32(TrustedImm32 imm, RegisterID src, RegisterID dest) { move(imm, ARMRegisters::S0); m_assembler.muls_r(dest, src, ARMRegisters::S0); @@ -162,7 +162,7 @@ public: m_assembler.orrs_r(dest, dest, src); } - void or32(Imm32 imm, RegisterID dest) + void or32(TrustedImm32 imm, RegisterID dest) { m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } @@ -176,7 +176,7 @@ public: m_assembler.movs_r(dest, m_assembler.asr_r(dest, ARMRegisters::S0)); } - void rshift32(Imm32 imm, RegisterID dest) + void rshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f)); } @@ -190,7 +190,7 @@ public: m_assembler.movs_r(dest, m_assembler.lsr_r(dest, ARMRegisters::S0)); } - void urshift32(Imm32 imm, RegisterID dest) + void urshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.movs_r(dest, m_assembler.lsr(dest, imm.m_value & 0x1f)); } @@ -200,12 +200,12 @@ public: m_assembler.subs_r(dest, dest, src); } - void sub32(Imm32 imm, RegisterID dest) + void sub32(TrustedImm32 imm, RegisterID dest) { m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } - void sub32(Imm32 imm, Address address) + void sub32(TrustedImm32 imm, Address address) { load32(address, ARMRegisters::S1); sub32(imm, ARMRegisters::S1); @@ -223,7 +223,7 @@ public: m_assembler.eors_r(dest, dest, src); } - void xor32(Imm32 imm, RegisterID dest) + void xor32(TrustedImm32 imm, RegisterID dest) { m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } @@ -303,7 +303,7 @@ public: m_assembler.baseIndexTransfer32(false, src, address.base, address.index, static_cast(address.scale), address.offset); } - void store32(Imm32 imm, ImplicitAddress address) + void store32(TrustedImm32 imm, ImplicitAddress address) { if (imm.m_isPointer) m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); @@ -318,7 +318,7 @@ public: m_assembler.dtr_u(false, src, ARMRegisters::S0, 0); } - void store32(Imm32 imm, void* address) + void store32(TrustedImm32 imm, void* address) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); if (imm.m_isPointer) @@ -344,13 +344,13 @@ public: push(ARMRegisters::S1); } - void push(Imm32 imm) + void push(TrustedImm32 imm) { move(imm, ARMRegisters::S0); push(ARMRegisters::S0); } - void move(Imm32 imm, RegisterID dest) + void move(TrustedImm32 imm, RegisterID dest) { if (imm.m_isPointer) m_assembler.ldr_un_imm(dest, imm.m_value); @@ -363,9 +363,9 @@ public: m_assembler.mov_r(dest, src); } - void move(ImmPtr imm, RegisterID dest) + void move(TrustedImmPtr imm, RegisterID dest) { - move(Imm32(imm), dest); + move(TrustedImm32(imm), dest); } void swap(RegisterID reg1, RegisterID reg2) @@ -387,7 +387,7 @@ public: move(src, dest); } - Jump branch8(Condition cond, Address left, Imm32 right) + Jump branch8(Condition cond, Address left, TrustedImm32 right) { load8(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); @@ -399,7 +399,7 @@ public: return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); } - Jump branch32(Condition cond, RegisterID left, Imm32 right, int useConstantPool = 0) + Jump branch32(Condition cond, RegisterID left, TrustedImm32 right, int useConstantPool = 0) { if (right.m_isPointer) { m_assembler.ldr_un_imm(ARMRegisters::S0, right.m_value); @@ -426,19 +426,19 @@ public: return branch32(cond, ARMRegisters::S1, right); } - Jump branch32(Condition cond, Address left, Imm32 right) + Jump branch32(Condition cond, Address left, TrustedImm32 right) { load32(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } - Jump branch32(Condition cond, BaseIndex left, Imm32 right) + Jump branch32(Condition cond, BaseIndex left, TrustedImm32 right) { load32(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); } - Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right) + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, TrustedImm32 right) { load32WithUnalignedHalfWords(left, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); @@ -453,7 +453,7 @@ public: return jump(); } - Jump branch16(Condition cond, BaseIndex left, Imm32 right) + Jump branch16(Condition cond, BaseIndex left, TrustedImm32 right) { load16(left, ARMRegisters::S0); move(right, ARMRegisters::S1); @@ -461,7 +461,7 @@ public: return m_assembler.jmp(ARMCondition(cond)); } - Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { load8(address, ARMRegisters::S1); return branchTest32(cond, ARMRegisters::S1, mask); @@ -474,7 +474,7 @@ public: return Jump(m_assembler.jmp(ARMCondition(cond))); } - Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); ARMWord w = m_assembler.getImm(mask.m_value, ARMRegisters::S0, true); @@ -485,13 +485,13 @@ public: return Jump(m_assembler.jmp(ARMCondition(cond))); } - Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { load32(address, ARMRegisters::S1); return branchTest32(cond, ARMRegisters::S1, mask); } - Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { load32(address, ARMRegisters::S1); return branchTest32(cond, ARMRegisters::S1, mask); @@ -519,7 +519,7 @@ public: return Jump(m_assembler.jmp(ARMCondition(cond))); } - Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchAdd32(Condition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); add32(imm, dest); @@ -548,7 +548,7 @@ public: return Jump(m_assembler.jmp(ARMCondition(cond))); } - Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + Jump branchMul32(Condition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); if (cond == Overflow) { @@ -568,7 +568,7 @@ public: return Jump(m_assembler.jmp(ARMCondition(cond))); } - Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchSub32(Condition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); sub32(imm, dest); @@ -628,7 +628,7 @@ public: m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } - void set32Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set32Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); @@ -648,13 +648,13 @@ public: set32Compare32(cond, ARMRegisters::S1, right, dest); } - void set8Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set8Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { // ARM doesn't have byte registers set32Compare32(cond, left, right, dest); } - void set32Test32(Condition cond, RegisterID reg, Imm32 mask, RegisterID dest) + void set32Test32(Condition cond, RegisterID reg, TrustedImm32 mask, RegisterID dest) { if (mask.m_value == -1) m_assembler.cmp_r(0, reg); @@ -664,24 +664,24 @@ public: m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } - void set32Test32(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test32(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { load32(address, ARMRegisters::S1); set32Test32(cond, ARMRegisters::S1, mask, dest); } - void set32Test8(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test8(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { load8(address, ARMRegisters::S1); set32Test32(cond, ARMRegisters::S1, mask, dest); } - void add32(Imm32 imm, RegisterID src, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) { m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } - void add32(Imm32 imm, AbsoluteAddress address) + void add32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); @@ -690,7 +690,7 @@ public: m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } - void sub32(Imm32 imm, AbsoluteAddress address) + void sub32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); @@ -699,7 +699,7 @@ public: m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } - void load32(void* address, RegisterID dest) + void load32(const void* address, RegisterID dest) { m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); m_assembler.dtr_u(true, dest, ARMRegisters::S0, 0); @@ -711,7 +711,7 @@ public: return branch32(cond, ARMRegisters::S1, right); } - Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right) + Jump branch32(Condition cond, AbsoluteAddress left, TrustedImm32 right) { load32(left.m_ptr, ARMRegisters::S1); return branch32(cond, ARMRegisters::S1, right); @@ -748,21 +748,21 @@ public: return Call::fromTailJump(oldJump); } - DataLabelPtr moveWithPatch(ImmPtr initialValue, RegisterID dest) + DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest) { DataLabelPtr dataLabel(this); m_assembler.ldr_un_imm(dest, reinterpret_cast(initialValue.m_value)); return dataLabel; } - Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S1); Jump jump = branch32(cond, left, ARMRegisters::S1, true); return jump; } - Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { load32(left, ARMRegisters::S1); dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S0); @@ -770,7 +770,7 @@ public: return jump; } - DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) + DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) { DataLabelPtr dataLabel = moveWithPatch(initialValue, ARMRegisters::S1); store32(ARMRegisters::S1, address); @@ -779,7 +779,7 @@ public: DataLabelPtr storePtrWithPatch(ImplicitAddress address) { - return storePtrWithPatch(ImmPtr(0), address); + return storePtrWithPatch(TrustedImmPtr(0), address); } // Floating point operators diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h index 450a34c..84e0a5e 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -139,7 +139,7 @@ public: // Integer arithmetic operations: // // Operations are typically two operand - operation(source, srcDst) - // For many operations the source may be an Imm32, the srcDst operand + // For many operations the source may be an TrustedImm32, the srcDst operand // may often be a memory location (explictly described using an Address // object). @@ -148,12 +148,12 @@ public: m_assembler.add(dest, dest, src); } - void add32(Imm32 imm, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID dest) { add32(imm, dest, dest); } - void add32(Imm32 imm, RegisterID src, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) { ARMThumbImmediate armImm = ARMThumbImmediate::makeUInt12OrEncodedImm(imm.m_value); if (armImm.isValid()) @@ -164,7 +164,7 @@ public: } } - void add32(Imm32 imm, Address address) + void add32(TrustedImm32 imm, Address address) { load32(address, dataTempRegister); @@ -187,7 +187,7 @@ public: add32(dataTempRegister, dest); } - void add32(Imm32 imm, AbsoluteAddress address) + void add32(TrustedImm32 imm, AbsoluteAddress address) { load32(address.m_ptr, dataTempRegister); @@ -209,7 +209,7 @@ public: m_assembler.ARM_and(dest, dest, src); } - void and32(Imm32 imm, RegisterID dest) + void and32(TrustedImm32 imm, RegisterID dest) { ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(imm.m_value); if (armImm.isValid()) @@ -235,7 +235,7 @@ public: m_assembler.lsl(dest, dest, dataTempRegister); } - void lshift32(Imm32 imm, RegisterID dest) + void lshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.lsl(dest, dest, imm.m_value & 0x1f); } @@ -245,7 +245,7 @@ public: m_assembler.smull(dest, dataTempRegister, dest, src); } - void mul32(Imm32 imm, RegisterID src, RegisterID dest) + void mul32(TrustedImm32 imm, RegisterID src, RegisterID dest) { move(imm, dataTempRegister); m_assembler.smull(dest, dataTempRegister, src, dataTempRegister); @@ -266,7 +266,7 @@ public: m_assembler.orr(dest, dest, src); } - void or32(Imm32 imm, RegisterID dest) + void or32(TrustedImm32 imm, RegisterID dest) { ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(imm.m_value); if (armImm.isValid()) @@ -287,7 +287,7 @@ public: m_assembler.asr(dest, dest, dataTempRegister); } - void rshift32(Imm32 imm, RegisterID dest) + void rshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.asr(dest, dest, imm.m_value & 0x1f); } @@ -302,7 +302,7 @@ public: m_assembler.lsr(dest, dest, dataTempRegister); } - void urshift32(Imm32 imm, RegisterID dest) + void urshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.lsr(dest, dest, imm.m_value & 0x1f); } @@ -312,7 +312,7 @@ public: m_assembler.sub(dest, dest, src); } - void sub32(Imm32 imm, RegisterID dest) + void sub32(TrustedImm32 imm, RegisterID dest) { ARMThumbImmediate armImm = ARMThumbImmediate::makeUInt12OrEncodedImm(imm.m_value); if (armImm.isValid()) @@ -323,7 +323,7 @@ public: } } - void sub32(Imm32 imm, Address address) + void sub32(TrustedImm32 imm, Address address) { load32(address, dataTempRegister); @@ -346,7 +346,7 @@ public: sub32(dataTempRegister, dest); } - void sub32(Imm32 imm, AbsoluteAddress address) + void sub32(TrustedImm32 imm, AbsoluteAddress address) { load32(address.m_ptr, dataTempRegister); @@ -368,7 +368,7 @@ public: m_assembler.eor(dest, dest, src); } - void xor32(Imm32 imm, RegisterID dest) + void xor32(TrustedImm32 imm, RegisterID dest) { ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(imm.m_value); if (armImm.isValid()) @@ -383,7 +383,7 @@ public: // Memory access operations: // // Loads are of the form load(address, destination) and stores of the form - // store(source, address). The source for a store may be an Imm32. Address + // store(source, address). The source for a store may be an TrustedImm32. Address // operand objects to loads and store will be implicitly constructed if a // register is passed. @@ -460,9 +460,9 @@ public: load32(setupArmAddress(address), dest); } - void load32(void* address, RegisterID dest) + void load32(const void* address, RegisterID dest) { - move(ImmPtr(address), addressTempRegister); + move(TrustedImmPtr(address), addressTempRegister); m_assembler.ldr(dest, addressTempRegister, ARMThumbImmediate::makeUInt16(0)); } @@ -473,7 +473,7 @@ public: DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) { - DataLabel32 label = moveWithPatch(Imm32(address.offset), dataTempRegister); + DataLabel32 label = moveWithPatch(TrustedImm32(address.offset), dataTempRegister); load32(ArmAddress(address.base, dataTempRegister), dest); return label; } @@ -489,14 +489,14 @@ public: if (armImm.isValid()) m_assembler.ldrh(dest, address.base, armImm); else { - move(Imm32(address.offset), dataTempRegister); + move(TrustedImm32(address.offset), dataTempRegister); m_assembler.ldrh(dest, address.base, dataTempRegister); } } DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) { - DataLabel32 label = moveWithPatch(Imm32(address.offset), dataTempRegister); + DataLabel32 label = moveWithPatch(TrustedImm32(address.offset), dataTempRegister); store32(src, ArmAddress(address.base, dataTempRegister)); return label; } @@ -511,19 +511,19 @@ public: store32(src, setupArmAddress(address)); } - void store32(Imm32 imm, ImplicitAddress address) + void store32(TrustedImm32 imm, ImplicitAddress address) { move(imm, dataTempRegister); store32(dataTempRegister, setupArmAddress(address)); } - void store32(RegisterID src, void* address) + void store32(RegisterID src, const void* address) { - move(ImmPtr(address), addressTempRegister); + move(TrustedImmPtr(address), addressTempRegister); m_assembler.str(src, addressTempRegister, ARMThumbImmediate::makeUInt16(0)); } - void store32(Imm32 imm, void* address) + void store32(TrustedImm32 imm, const void* address) { move(imm, dataTempRegister); store32(dataTempRegister, address); @@ -558,7 +558,7 @@ public: // Arm vfp addresses can be offset by a 9-bit ones-comp immediate, left shifted by 2. if ((offset & 3) || (offset > (255 * 4)) || (offset < -(255 * 4))) { - add32(Imm32(offset), base, addressTempRegister); + add32(TrustedImm32(offset), base, addressTempRegister); base = addressTempRegister; offset = 0; } @@ -568,7 +568,7 @@ public: void loadDouble(const void* address, FPRegisterID dest) { - move(ImmPtr(address), addressTempRegister); + move(TrustedImmPtr(address), addressTempRegister); m_assembler.vldr(dest, addressTempRegister, 0); } @@ -579,7 +579,7 @@ public: // Arm vfp addresses can be offset by a 9-bit ones-comp immediate, left shifted by 2. if ((offset & 3) || (offset > (255 * 4)) || (offset < -(255 * 4))) { - add32(Imm32(offset), base, addressTempRegister); + add32(TrustedImm32(offset), base, addressTempRegister); base = addressTempRegister; offset = 0; } @@ -748,7 +748,7 @@ public: push(dataTempRegister); } - void push(Imm32 imm) + void push(TrustedImm32 imm) { move(imm, dataTempRegister); push(dataTempRegister); @@ -758,7 +758,7 @@ public: // // Move values in registers. - void move(Imm32 imm, RegisterID dest) + void move(TrustedImm32 imm, RegisterID dest) { uint32_t value = imm.m_value; @@ -784,9 +784,9 @@ public: m_assembler.mov(dest, src); } - void move(ImmPtr imm, RegisterID dest) + void move(TrustedImmPtr imm, RegisterID dest) { - move(Imm32(imm), dest); + move(TrustedImm32(imm), dest); } void swap(RegisterID reg1, RegisterID reg2) @@ -821,7 +821,7 @@ public: // used (representing the names 'below' and 'above'). // // Operands to the comparision are provided in the expected order, e.g. - // jle32(reg1, Imm32(5)) will branch if the value held in reg1, when + // jle32(reg1, TrustedImm32(5)) will branch if the value held in reg1, when // treated as a signed 32bit value, is less than or equal to 5. // // jz and jnz test whether the first operand is equal to zero, and take @@ -829,7 +829,7 @@ public: private: // Should we be using TEQ for equal/not-equal? - void compare32(RegisterID left, Imm32 right) + void compare32(RegisterID left, TrustedImm32 right) { int32_t imm = right.m_value; if (!imm) @@ -841,13 +841,13 @@ private: else if ((armImm = ARMThumbImmediate::makeEncodedImm(-imm)).isValid()) m_assembler.cmn(left, armImm); else { - move(Imm32(imm), dataTempRegister); + move(TrustedImm32(imm), dataTempRegister); m_assembler.cmp(left, dataTempRegister); } } } - void test32(RegisterID reg, Imm32 mask) + void test32(RegisterID reg, TrustedImm32 mask) { int32_t imm = mask.m_value; @@ -871,7 +871,7 @@ public: return Jump(makeBranch(cond)); } - Jump branch32(Condition cond, RegisterID left, Imm32 right) + Jump branch32(Condition cond, RegisterID left, TrustedImm32 right) { compare32(left, right); return Jump(makeBranch(cond)); @@ -889,21 +889,21 @@ public: return branch32(cond, dataTempRegister, right); } - Jump branch32(Condition cond, Address left, Imm32 right) + Jump branch32(Condition cond, Address left, TrustedImm32 right) { // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ load32(left, addressTempRegister); return branch32(cond, addressTempRegister, right); } - Jump branch32(Condition cond, BaseIndex left, Imm32 right) + Jump branch32(Condition cond, BaseIndex left, TrustedImm32 right) { // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ load32(left, addressTempRegister); return branch32(cond, addressTempRegister, right); } - Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right) + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, TrustedImm32 right) { // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ load32WithUnalignedHalfWords(left, addressTempRegister); @@ -916,7 +916,7 @@ public: return branch32(cond, dataTempRegister, right); } - Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right) + Jump branch32(Condition cond, AbsoluteAddress left, TrustedImm32 right) { // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ load32(left.m_ptr, addressTempRegister); @@ -931,21 +931,21 @@ public: return branch32(cond, dataTempRegister, addressTempRegister); } - Jump branch16(Condition cond, BaseIndex left, Imm32 right) + Jump branch16(Condition cond, BaseIndex left, TrustedImm32 right) { // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ load16(left, addressTempRegister); m_assembler.lsl(addressTempRegister, addressTempRegister, 16); - return branch32(cond, addressTempRegister, Imm32(right.m_value << 16)); + return branch32(cond, addressTempRegister, TrustedImm32(right.m_value << 16)); } - Jump branch8(Condition cond, RegisterID left, Imm32 right) + Jump branch8(Condition cond, RegisterID left, TrustedImm32 right) { compare32(left, right); return Jump(makeBranch(cond)); } - Jump branch8(Condition cond, Address left, Imm32 right) + Jump branch8(Condition cond, Address left, TrustedImm32 right) { // use addressTempRegister incase the branch8 we call uses dataTempRegister. :-/ load8(left, addressTempRegister); @@ -959,14 +959,14 @@ public: return Jump(makeBranch(cond)); } - Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); test32(reg, mask); return Jump(makeBranch(cond)); } - Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); // use addressTempRegister incase the branchTest32 we call uses dataTempRegister. :-/ @@ -974,7 +974,7 @@ public: return branchTest32(cond, addressTempRegister, mask); } - Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); // use addressTempRegister incase the branchTest32 we call uses dataTempRegister. :-/ @@ -982,14 +982,14 @@ public: return branchTest32(cond, addressTempRegister, mask); } - Jump branchTest8(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); test32(reg, mask); return Jump(makeBranch(cond)); } - Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); // use addressTempRegister incase the branchTest8 we call uses dataTempRegister. :-/ @@ -1032,7 +1032,7 @@ public: return Jump(makeBranch(cond)); } - Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchAdd32(Condition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(imm.m_value); @@ -1053,7 +1053,7 @@ public: return branch32(NotEqual, addressTempRegister, dataTempRegister); } - Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + Jump branchMul32(Condition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) { ASSERT_UNUSED(cond, cond == Overflow); move(imm, dataTempRegister); @@ -1076,7 +1076,7 @@ public: return Jump(makeBranch(cond)); } - Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchSub32(Condition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(imm.m_value); @@ -1111,13 +1111,13 @@ public: Call nearCall() { - moveFixedWidthEncoding(Imm32(0), dataTempRegister); + moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister); return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFixed), Call::LinkableNear); } Call call() { - moveFixedWidthEncoding(Imm32(0), dataTempRegister); + moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister); return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFixed), Call::Linkable); } @@ -1151,7 +1151,7 @@ public: set32Compare32(cond, dataTempRegister, right, dest); } - void set32Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set32Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { compare32(left, right); m_assembler.it(armV7Condition(cond), false); @@ -1169,7 +1169,7 @@ public: set32Compare32(cond, left, right, dest); } - void set8Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set8Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { set32Compare32(cond, left, right, dest); } @@ -1178,7 +1178,7 @@ public: // The mask should be optional... paerhaps the argument order should be // dest-src, operations always have a dest? ... possibly not true, considering // asm ops like test, or pseudo ops like pop(). - void set32Test32(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test32(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { load32(address, dataTempRegister); test32(dataTempRegister, mask); @@ -1187,7 +1187,7 @@ public: m_assembler.mov(dest, ARMThumbImmediate::makeUInt16(0)); } - void set32Test8(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test8(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { load8(address, dataTempRegister); test32(dataTempRegister, mask); @@ -1196,44 +1196,44 @@ public: m_assembler.mov(dest, ARMThumbImmediate::makeUInt16(0)); } - DataLabel32 moveWithPatch(Imm32 imm, RegisterID dst) + DataLabel32 moveWithPatch(TrustedImm32 imm, RegisterID dst) { moveFixedWidthEncoding(imm, dst); return DataLabel32(this); } - DataLabelPtr moveWithPatch(ImmPtr imm, RegisterID dst) + DataLabelPtr moveWithPatch(TrustedImmPtr imm, RegisterID dst) { - moveFixedWidthEncoding(Imm32(imm), dst); + moveFixedWidthEncoding(TrustedImm32(imm), dst); return DataLabelPtr(this); } - Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { dataLabel = moveWithPatch(initialRightValue, dataTempRegister); return branch32(cond, left, dataTempRegister); } - Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { load32(left, addressTempRegister); dataLabel = moveWithPatch(initialRightValue, dataTempRegister); return branch32(cond, addressTempRegister, dataTempRegister); } - DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) + DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) { DataLabelPtr label = moveWithPatch(initialValue, dataTempRegister); store32(dataTempRegister, address); return label; } - DataLabelPtr storePtrWithPatch(ImplicitAddress address) { return storePtrWithPatch(ImmPtr(0), address); } + DataLabelPtr storePtrWithPatch(ImplicitAddress address) { return storePtrWithPatch(TrustedImmPtr(0), address); } Call tailRecursiveCall() { // Like a normal call, but don't link. - moveFixedWidthEncoding(Imm32(0), dataTempRegister); + moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister); return Call(m_assembler.bx(dataTempRegister, ARMv7Assembler::JumpFixed), Call::Linkable); } @@ -1257,14 +1257,14 @@ protected: ARMv7Assembler::JmpSrc makeJump() { - moveFixedWidthEncoding(Imm32(0), dataTempRegister); + moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister); return m_assembler.bx(dataTempRegister, inUninterruptedSequence() ? ARMv7Assembler::JumpNoConditionFixedSize : ARMv7Assembler::JumpNoCondition); } ARMv7Assembler::JmpSrc makeBranch(ARMv7Assembler::Condition cond) { m_assembler.it(cond, true, true); - moveFixedWidthEncoding(Imm32(0), dataTempRegister); + moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister); return m_assembler.bx(dataTempRegister, inUninterruptedSequence() ? ARMv7Assembler::JumpConditionFixedSize : ARMv7Assembler::JumpCondition, cond); } ARMv7Assembler::JmpSrc makeBranch(Condition cond) { return makeBranch(armV7Condition(cond)); } @@ -1277,7 +1277,7 @@ protected: if (imm.isValid()) m_assembler.add(addressTempRegister, address.base, imm); else { - move(Imm32(address.offset), addressTempRegister); + move(TrustedImm32(address.offset), addressTempRegister); m_assembler.add(addressTempRegister, addressTempRegister, address.base); } @@ -1291,7 +1291,7 @@ protected: if ((address.offset >= -0xff) && (address.offset <= 0xfff)) return ArmAddress(address.base, address.offset); - move(Imm32(address.offset), addressTempRegister); + move(TrustedImm32(address.offset), addressTempRegister); return ArmAddress(address.base, addressTempRegister); } @@ -1300,7 +1300,7 @@ protected: if ((address.offset >= -0xff) && (address.offset <= 0xfff)) return ArmAddress(address.base, address.offset); - move(Imm32(address.offset), addressTempRegister); + move(TrustedImm32(address.offset), addressTempRegister); return ArmAddress(address.base, addressTempRegister); } @@ -1313,14 +1313,14 @@ protected: if (imm.isValid()) m_assembler.add(addressTempRegister, address.base, imm); else { - move(Imm32(address.offset), addressTempRegister); + move(TrustedImm32(address.offset), addressTempRegister); m_assembler.add(addressTempRegister, addressTempRegister, address.base); } return addressTempRegister; } - void moveFixedWidthEncoding(Imm32 imm, RegisterID dst) + void moveFixedWidthEncoding(TrustedImm32 imm, RegisterID dst) { uint32_t value = imm.m_value; m_assembler.movT3(dst, ARMThumbImmediate::makeUInt16(value & 0xffff)); diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h index 543b0fa..2183b22 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h @@ -65,15 +65,47 @@ public: { } + template + FunctionPtr(returnType(*value)()) + : m_value((void*)value) + { + ASSERT_VALID_CODE_POINTER(m_value); + } + + template + FunctionPtr(returnType(*value)(argType1)) + : m_value((void*)value) + { + ASSERT_VALID_CODE_POINTER(m_value); + } + + template + FunctionPtr(returnType(*value)(argType1, argType2)) + : m_value((void*)value) + { + ASSERT_VALID_CODE_POINTER(m_value); + } + + template + FunctionPtr(returnType(*value)(argType1, argType2, argType3)) + : m_value((void*)value) + { + ASSERT_VALID_CODE_POINTER(m_value); + } + + template + FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4)) + : m_value((void*)value) + { + ASSERT_VALID_CODE_POINTER(m_value); + } + template explicit FunctionPtr(FunctionType* value) -#if COMPILER(RVCT) - // RVTC compiler needs C-style cast as it fails with the following error - // Error: #694: reinterpret_cast cannot cast away const or other type qualifiers - : m_value((void*)(value)) -#else - : m_value(reinterpret_cast(value)) -#endif + // Using a C-ctyle cast here to avoid compiler error on RVTC: + // Error: #694: reinterpret_cast cannot cast away const or other type qualifiers + // (I guess on RVTC function pointers have a different constness to GCC/MSVC?) + : m_value((void*)value) { ASSERT_VALID_CODE_POINTER(m_value); } diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h index 4697dfc..1bcec38 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h @@ -95,7 +95,7 @@ public: // Integer arithmetic operations: // // Operations are typically two operand - operation(source, srcDst) - // For many operations the source may be an Imm32, the srcDst operand + // For many operations the source may be an TrustedImm32, the srcDst operand // may often be a memory location (explictly described using an Address // object). @@ -104,12 +104,12 @@ public: m_assembler.addu(dest, dest, src); } - void add32(Imm32 imm, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID dest) { add32(imm, dest, dest); } - void add32(Imm32 imm, RegisterID src, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) { if (!imm.m_isPointer && imm.m_value >= -32768 && imm.m_value <= 32767 && !m_fixedWidth) { @@ -127,7 +127,7 @@ public: } } - void add32(Imm32 imm, Address address) + void add32(TrustedImm32 imm, Address address) { if (address.offset >= -32768 && address.offset <= 32767 && !m_fixedWidth) { @@ -207,7 +207,7 @@ public: } } - void add32(Imm32 imm, AbsoluteAddress address) + void add32(TrustedImm32 imm, AbsoluteAddress address) { /* li addrTemp, address @@ -216,7 +216,7 @@ public: addu dataTemp, dataTemp, immTemp sw dataTemp, 0(addrTemp) */ - move(ImmPtr(address.m_ptr), addrTempRegister); + move(TrustedImmPtr(address.m_ptr), addrTempRegister); m_assembler.lw(dataTempRegister, addrTempRegister, 0); if (!imm.m_isPointer && imm.m_value >= -32768 && imm.m_value <= 32767 && !m_fixedWidth) @@ -233,7 +233,7 @@ public: m_assembler.andInsn(dest, dest, src); } - void and32(Imm32 imm, RegisterID dest) + void and32(TrustedImm32 imm, RegisterID dest) { if (!imm.m_isPointer && !imm.m_value && !m_fixedWidth) move(MIPSRegisters::zero, dest); @@ -250,7 +250,7 @@ public: } } - void lshift32(Imm32 imm, RegisterID dest) + void lshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.sll(dest, dest, imm.m_value); } @@ -265,7 +265,7 @@ public: m_assembler.mul(dest, dest, src); } - void mul32(Imm32 imm, RegisterID src, RegisterID dest) + void mul32(TrustedImm32 imm, RegisterID src, RegisterID dest) { if (!imm.m_isPointer && !imm.m_value && !m_fixedWidth) move(MIPSRegisters::zero, dest); @@ -296,7 +296,7 @@ public: m_assembler.orInsn(dest, dest, src); } - void or32(Imm32 imm, RegisterID dest) + void or32(TrustedImm32 imm, RegisterID dest) { if (!imm.m_isPointer && !imm.m_value && !m_fixedWidth) return; @@ -320,7 +320,7 @@ public: m_assembler.srav(dest, dest, shiftAmount); } - void rshift32(Imm32 imm, RegisterID dest) + void rshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.sra(dest, dest, imm.m_value); } @@ -330,7 +330,7 @@ public: m_assembler.srlv(dest, dest, shiftAmount); } - void urshift32(Imm32 imm, RegisterID dest) + void urshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.srl(dest, dest, imm.m_value); } @@ -340,7 +340,7 @@ public: m_assembler.subu(dest, dest, src); } - void sub32(Imm32 imm, RegisterID dest) + void sub32(TrustedImm32 imm, RegisterID dest) { if (!imm.m_isPointer && imm.m_value >= -32767 && imm.m_value <= 32768 && !m_fixedWidth) { @@ -358,7 +358,7 @@ public: } } - void sub32(Imm32 imm, Address address) + void sub32(TrustedImm32 imm, Address address) { if (address.offset >= -32768 && address.offset <= 32767 && !m_fixedWidth) { @@ -413,7 +413,7 @@ public: sub32(dataTempRegister, dest); } - void sub32(Imm32 imm, AbsoluteAddress address) + void sub32(TrustedImm32 imm, AbsoluteAddress address) { /* li addrTemp, address @@ -422,7 +422,7 @@ public: subu dataTemp, dataTemp, immTemp sw dataTemp, 0(addrTemp) */ - move(ImmPtr(address.m_ptr), addrTempRegister); + move(TrustedImmPtr(address.m_ptr), addrTempRegister); m_assembler.lw(dataTempRegister, addrTempRegister, 0); if (!imm.m_isPointer && imm.m_value >= -32767 && imm.m_value <= 32768 @@ -441,7 +441,7 @@ public: m_assembler.xorInsn(dest, dest, src); } - void xor32(Imm32 imm, RegisterID dest) + void xor32(TrustedImm32 imm, RegisterID dest) { /* li immTemp, imm @@ -459,7 +459,7 @@ public: // Memory access operations: // // Loads are of the form load(address, destination) and stores of the form - // store(source, address). The source for a store may be an Imm32. Address + // store(source, address). The source for a store may be an TrustedImm32. Address // operand objects to loads and store will be implicitly constructed if a // register is passed. @@ -581,13 +581,13 @@ public: } } - void load32(void* address, RegisterID dest) + void load32(const void* address, RegisterID dest) { /* li addrTemp, address lw dest, 0(addrTemp) */ - move(ImmPtr(address), addrTempRegister); + move(TrustedImmPtr(address), addrTempRegister); m_assembler.lw(dest, addrTempRegister, 0); } @@ -601,7 +601,7 @@ public: lw dest, 0(addrTemp) */ DataLabel32 dataLabel(this); - move(Imm32(address.offset), addrTempRegister); + move(TrustedImm32(address.offset), addrTempRegister); m_assembler.addu(addrTempRegister, addrTempRegister, address.base); m_assembler.lw(dest, addrTempRegister, 0); m_fixedWidth = false; @@ -666,7 +666,7 @@ public: sw src, 0(addrTemp) */ DataLabel32 dataLabel(this); - move(Imm32(address.offset), addrTempRegister); + move(TrustedImm32(address.offset), addrTempRegister); m_assembler.addu(addrTempRegister, addrTempRegister, address.base); m_assembler.sw(src, addrTempRegister, 0); m_fixedWidth = false; @@ -719,7 +719,7 @@ public: } } - void store32(Imm32 imm, ImplicitAddress address) + void store32(TrustedImm32 imm, ImplicitAddress address) { if (address.offset >= -32768 && address.offset <= 32767 && !m_fixedWidth) { @@ -749,17 +749,17 @@ public: } } - void store32(RegisterID src, void* address) + void store32(RegisterID src, const void* address) { /* li addrTemp, address sw src, 0(addrTemp) */ - move(ImmPtr(address), addrTempRegister); + move(TrustedImmPtr(address), addrTempRegister); m_assembler.sw(src, addrTempRegister, 0); } - void store32(Imm32 imm, void* address) + void store32(TrustedImm32 imm, const void* address) { /* li immTemp, imm @@ -767,11 +767,11 @@ public: sw src, 0(addrTemp) */ if (!imm.m_isPointer && !imm.m_value && !m_fixedWidth) { - move(ImmPtr(address), addrTempRegister); + move(TrustedImmPtr(address), addrTempRegister); m_assembler.sw(MIPSRegisters::zero, addrTempRegister, 0); } else { move(imm, immTempRegister); - move(ImmPtr(address), addrTempRegister); + move(TrustedImmPtr(address), addrTempRegister); m_assembler.sw(immTempRegister, addrTempRegister, 0); } } @@ -831,7 +831,7 @@ public: push(dataTempRegister); } - void push(Imm32 imm) + void push(TrustedImm32 imm) { move(imm, immTempRegister); push(immTempRegister); @@ -841,7 +841,7 @@ public: // // Move values in registers. - void move(Imm32 imm, RegisterID dest) + void move(TrustedImm32 imm, RegisterID dest) { if (!imm.m_isPointer && !imm.m_value && !m_fixedWidth) move(MIPSRegisters::zero, dest); @@ -858,9 +858,9 @@ public: m_assembler.move(dest, src); } - void move(ImmPtr imm, RegisterID dest) + void move(TrustedImmPtr imm, RegisterID dest) { - move(Imm32(imm), dest); + move(TrustedImm32(imm), dest); } void swap(RegisterID reg1, RegisterID reg2) @@ -894,13 +894,13 @@ public: // used (representing the names 'below' and 'above'). // // Operands to the comparision are provided in the expected order, e.g. - // jle32(reg1, Imm32(5)) will branch if the value held in reg1, when + // jle32(reg1, TrustedImm32(5)) will branch if the value held in reg1, when // treated as a signed 32bit value, is less than or equal to 5. // // jz and jnz test whether the first operand is equal to zero, and take // an optional second operand of a mask under which to perform the test. - Jump branch8(Condition cond, Address left, Imm32 right) + Jump branch8(Condition cond, Address left, TrustedImm32 right) { // Make sure the immediate value is unsigned 8 bits. ASSERT(!(right.m_value & 0xFFFFFF00)); @@ -985,7 +985,7 @@ public: return Jump(); } - Jump branch32(Condition cond, RegisterID left, Imm32 right) + Jump branch32(Condition cond, RegisterID left, TrustedImm32 right) { move(right, immTempRegister); return branch32(cond, left, immTempRegister); @@ -1003,14 +1003,14 @@ public: return branch32(cond, dataTempRegister, right); } - Jump branch32(Condition cond, Address left, Imm32 right) + Jump branch32(Condition cond, Address left, TrustedImm32 right) { load32(left, dataTempRegister); move(right, immTempRegister); return branch32(cond, dataTempRegister, immTempRegister); } - Jump branch32(Condition cond, BaseIndex left, Imm32 right) + Jump branch32(Condition cond, BaseIndex left, TrustedImm32 right) { load32(left, dataTempRegister); // Be careful that the previous load32() uses immTempRegister. @@ -1019,7 +1019,7 @@ public: return branch32(cond, dataTempRegister, immTempRegister); } - Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right) + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, TrustedImm32 right) { load32WithUnalignedHalfWords(left, dataTempRegister); // Be careful that the previous load32WithUnalignedHalfWords() @@ -1035,7 +1035,7 @@ public: return branch32(cond, dataTempRegister, right); } - Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right) + Jump branch32(Condition cond, AbsoluteAddress left, TrustedImm32 right) { load32(left.m_ptr, dataTempRegister); move(right, immTempRegister); @@ -1048,7 +1048,7 @@ public: return branch32(cond, dataTempRegister, right); } - Jump branch16(Condition cond, BaseIndex left, Imm32 right) + Jump branch16(Condition cond, BaseIndex left, TrustedImm32 right) { ASSERT(!(right.m_value & 0xFFFF0000)); load16(left, dataTempRegister); @@ -1067,7 +1067,7 @@ public: return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); } - Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); if (mask.m_value == -1 && !m_fixedWidth) { @@ -1079,19 +1079,19 @@ public: return branchTest32(cond, reg, immTempRegister); } - Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { load32(address, dataTempRegister); return branchTest32(cond, dataTempRegister, mask); } - Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { load32(address, dataTempRegister); return branchTest32(cond, dataTempRegister, mask); } - Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { load8(address, dataTempRegister); return branchTest32(cond, dataTempRegister, mask); @@ -1174,7 +1174,7 @@ public: return Jump(); } - Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchAdd32(Condition cond, TrustedImm32 imm, RegisterID dest) { move(imm, immTempRegister); return branchAdd32(cond, immTempRegister, dest); @@ -1225,7 +1225,7 @@ public: return Jump(); } - Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + Jump branchMul32(Condition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) { move(imm, immTempRegister); move(src, dest); @@ -1279,7 +1279,7 @@ public: return Jump(); } - Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchSub32(Condition cond, TrustedImm32 imm, RegisterID dest) { move(imm, immTempRegister); return branchSub32(cond, immTempRegister, dest); @@ -1360,7 +1360,7 @@ public: set32Compare32(cond, left, right, dest); } - void set8Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set8Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { move(right, immTempRegister); set32Compare32(cond, left, immTempRegister, dest); @@ -1417,13 +1417,13 @@ public: } } - void set32Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set32Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { move(right, immTempRegister); set32Compare32(cond, left, immTempRegister, dest); } - void set32Test8(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test8(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { ASSERT((cond == Zero) || (cond == NonZero)); load8(address, dataTempRegister); @@ -1443,7 +1443,7 @@ public: } } - void set32Test32(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test32(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { ASSERT((cond == Zero) || (cond == NonZero)); load32(address, dataTempRegister); @@ -1463,7 +1463,7 @@ public: } } - DataLabel32 moveWithPatch(Imm32 imm, RegisterID dest) + DataLabel32 moveWithPatch(TrustedImm32 imm, RegisterID dest) { m_fixedWidth = true; DataLabel32 label(this); @@ -1472,7 +1472,7 @@ public: return label; } - DataLabelPtr moveWithPatch(ImmPtr initialValue, RegisterID dest) + DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest) { m_fixedWidth = true; DataLabelPtr label(this); @@ -1481,7 +1481,7 @@ public: return label; } - Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { m_fixedWidth = true; dataLabel = moveWithPatch(initialRightValue, immTempRegister); @@ -1490,7 +1490,7 @@ public: return temp; } - Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { m_fixedWidth = true; load32(left, dataTempRegister); @@ -1500,7 +1500,7 @@ public: return temp; } - DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) + DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) { m_fixedWidth = true; DataLabelPtr dataLabel = moveWithPatch(initialValue, dataTempRegister); @@ -1511,14 +1511,14 @@ public: DataLabelPtr storePtrWithPatch(ImplicitAddress address) { - return storePtrWithPatch(ImmPtr(0), address); + return storePtrWithPatch(TrustedImmPtr(0), address); } Call tailRecursiveCall() { // Like a normal call, but don't update the returned address register m_fixedWidth = true; - move(Imm32(0), MIPSRegisters::t9); + move(TrustedImm32(0), MIPSRegisters::t9); m_assembler.jr(MIPSRegisters::t9); m_assembler.nop(); m_fixedWidth = false; @@ -1540,7 +1540,7 @@ public: lwc1 dest, 0(addrTemp) lwc1 dest+1, 4(addrTemp) */ - move(Imm32(address.offset), addrTempRegister); + move(TrustedImm32(address.offset), addrTempRegister); m_assembler.addu(addrTempRegister, addrTempRegister, address.base); m_assembler.lwc1(dest, addrTempRegister, 0); m_assembler.lwc1(FPRegisterID(dest + 1), addrTempRegister, 4); @@ -1569,7 +1569,7 @@ public: lwc1 dest, 0(addrTemp) lwc1 dest+1, 4(addrTemp) */ - move(ImmPtr(address), addrTempRegister); + move(TrustedImmPtr(address), addrTempRegister); m_assembler.lwc1(dest, addrTempRegister, 0); m_assembler.lwc1(FPRegisterID(dest + 1), addrTempRegister, 4); #else @@ -1577,7 +1577,7 @@ public: li addrTemp, address ldc1 dest, 0(addrTemp) */ - move(ImmPtr(address), addrTempRegister); + move(TrustedImmPtr(address), addrTempRegister); m_assembler.ldc1(dest, addrTempRegister, 0); #endif } @@ -1592,7 +1592,7 @@ public: swc1 dest, 0(addrTemp) swc1 dest+1, 4(addrTemp) */ - move(Imm32(address.offset), addrTempRegister); + move(TrustedImm32(address.offset), addrTempRegister); m_assembler.addu(addrTempRegister, addrTempRegister, address.base); m_assembler.swc1(src, addrTempRegister, 0); m_assembler.swc1(FPRegisterID(src + 1), addrTempRegister, 4); @@ -1779,7 +1779,7 @@ public: { m_assembler.truncwd(fpTempRegister, src); m_assembler.mfc1(dest, fpTempRegister); - return branch32(Equal, dest, Imm32(0x7fffffff)); + return branch32(Equal, dest, TrustedImm32(0x7fffffff)); } // Convert 'src' to an integer, and places the resulting 'dest'. diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86.h index 92da5f0..b180e2b 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerX86.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86.h @@ -52,32 +52,32 @@ public: using MacroAssemblerX86Common::loadDouble; using MacroAssemblerX86Common::convertInt32ToDouble; - void add32(Imm32 imm, RegisterID src, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) { m_assembler.leal_mr(imm.m_value, src, dest); } - void add32(Imm32 imm, AbsoluteAddress address) + void add32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.addl_im(imm.m_value, address.m_ptr); } - void addWithCarry32(Imm32 imm, AbsoluteAddress address) + void addWithCarry32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.adcl_im(imm.m_value, address.m_ptr); } - void and32(Imm32 imm, AbsoluteAddress address) + void and32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.andl_im(imm.m_value, address.m_ptr); } - void or32(Imm32 imm, AbsoluteAddress address) + void or32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.orl_im(imm.m_value, address.m_ptr); } - void sub32(Imm32 imm, AbsoluteAddress address) + void sub32(TrustedImm32 imm, AbsoluteAddress address) { m_assembler.subl_im(imm.m_value, address.m_ptr); } @@ -98,7 +98,7 @@ public: m_assembler.cvtsi2sd_mr(src.m_ptr, dest); } - void store32(Imm32 imm, void* address) + void store32(TrustedImm32 imm, void* address) { m_assembler.movl_i32m(imm.m_value, address); } @@ -114,7 +114,7 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right) + Jump branch32(Condition cond, AbsoluteAddress left, TrustedImm32 right) { m_assembler.cmpl_im(right.m_value, left.m_ptr); return Jump(m_assembler.jCC(x86Condition(cond))); @@ -136,27 +136,27 @@ public: } - DataLabelPtr moveWithPatch(ImmPtr initialValue, RegisterID dest) + DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest) { m_assembler.movl_i32r(initialValue.asIntptr(), dest); return DataLabelPtr(this); } - Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { m_assembler.cmpl_ir_force32(initialRightValue.asIntptr(), left); dataLabel = DataLabelPtr(this); return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { m_assembler.cmpl_im_force32(initialRightValue.asIntptr(), left.offset, left.base); dataLabel = DataLabelPtr(this); return Jump(m_assembler.jCC(x86Condition(cond))); } - DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) + DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) { m_assembler.movl_i32m(initialValue.asIntptr(), address.offset, address.base); return DataLabelPtr(this); diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h index a02074c..f5829dd 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h @@ -83,7 +83,7 @@ public: // Integer arithmetic operations: // // Operations are typically two operand - operation(source, srcDst) - // For many operations the source may be an Imm32, the srcDst operand + // For many operations the source may be an TrustedImm32, the srcDst operand // may often be a memory location (explictly described using an Address // object). @@ -92,12 +92,12 @@ public: m_assembler.addl_rr(src, dest); } - void add32(Imm32 imm, Address address) + void add32(TrustedImm32 imm, Address address) { m_assembler.addl_im(imm.m_value, address.offset, address.base); } - void add32(Imm32 imm, RegisterID dest) + void add32(TrustedImm32 imm, RegisterID dest) { m_assembler.addl_ir(imm.m_value, dest); } @@ -117,7 +117,7 @@ public: m_assembler.andl_rr(src, dest); } - void and32(Imm32 imm, RegisterID dest) + void and32(TrustedImm32 imm, RegisterID dest) { m_assembler.andl_ir(imm.m_value, dest); } @@ -132,36 +132,64 @@ public: m_assembler.andl_mr(src.offset, src.base, dest); } - void and32(Imm32 imm, Address address) + void and32(TrustedImm32 imm, Address address) { m_assembler.andl_im(imm.m_value, address.offset, address.base); } - void lshift32(Imm32 imm, RegisterID dest) + void and32(RegisterID op1, RegisterID op2, RegisterID dest) { - m_assembler.shll_i8r(imm.m_value, dest); + if (op1 == op2) + zeroExtend32ToPtr(op1, dest); + else if (op1 == dest) + and32(op2, dest); + else { + move(op2, dest); + and32(op1, dest); + } } - + + void and32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { + move(src, dest); + and32(imm, dest); + } + void lshift32(RegisterID shift_amount, RegisterID dest) { - // On x86 we can only shift by ecx; if asked to shift by another register we'll - // need rejig the shift amount into ecx first, and restore the registers afterwards. - if (shift_amount != X86Registers::ecx) { - swap(shift_amount, X86Registers::ecx); + ASSERT(shift_amount != dest); - // E.g. transform "shll %eax, %eax" -> "xchgl %eax, %ecx; shll %ecx, %ecx; xchgl %eax, %ecx" - if (dest == shift_amount) - m_assembler.shll_CLr(X86Registers::ecx); - // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86Registers::ecx) - m_assembler.shll_CLr(shift_amount); - // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" - else - m_assembler.shll_CLr(dest); - - swap(shift_amount, X86Registers::ecx); - } else + if (shift_amount == X86Registers::ecx) m_assembler.shll_CLr(dest); + else { + // On x86 we can only shift by ecx; if asked to shift by another register we'll + // need rejig the shift amount into ecx first, and restore the registers afterwards. + // If we dest is ecx, then shift the swapped register! + swap(shift_amount, X86Registers::ecx); + m_assembler.shll_CLr(dest == X86Registers::ecx ? shift_amount : dest); + swap(shift_amount, X86Registers::ecx); + } + } + + void lshift32(RegisterID src, RegisterID shift_amount, RegisterID dest) + { + ASSERT(shift_amount != dest); + + if (src != dest) + move(src, dest); + lshift32(shift_amount, dest); + } + + void lshift32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.shll_i8r(imm.m_value, dest); + } + + void lshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) + { + if (src != dest) + move(src, dest); + lshift32(imm, dest); } void mul32(RegisterID src, RegisterID dest) @@ -174,7 +202,7 @@ public: m_assembler.imull_mr(src.offset, src.base, dest); } - void mul32(Imm32 imm, RegisterID src, RegisterID dest) + void mul32(TrustedImm32 imm, RegisterID src, RegisterID dest) { m_assembler.imull_i32r(src, imm.m_value, dest); } @@ -204,7 +232,7 @@ public: m_assembler.orl_rr(src, dest); } - void or32(Imm32 imm, RegisterID dest) + void or32(TrustedImm32 imm, RegisterID dest) { m_assembler.orl_ir(imm.m_value, dest); } @@ -219,76 +247,114 @@ public: m_assembler.orl_mr(src.offset, src.base, dest); } - void or32(Imm32 imm, Address address) + void or32(TrustedImm32 imm, Address address) { m_assembler.orl_im(imm.m_value, address.offset, address.base); } + void or32(RegisterID op1, RegisterID op2, RegisterID dest) + { + if (op1 == op2) + zeroExtend32ToPtr(op1, dest); + else if (op1 == dest) + or32(op2, dest); + else { + move(op2, dest); + or32(op1, dest); + } + } + + void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { + move(src, dest); + or32(imm, dest); + } + void rshift32(RegisterID shift_amount, RegisterID dest) { - // On x86 we can only shift by ecx; if asked to shift by another register we'll - // need rejig the shift amount into ecx first, and restore the registers afterwards. - if (shift_amount != X86Registers::ecx) { - swap(shift_amount, X86Registers::ecx); + ASSERT(shift_amount != dest); - // E.g. transform "shll %eax, %eax" -> "xchgl %eax, %ecx; shll %ecx, %ecx; xchgl %eax, %ecx" - if (dest == shift_amount) - m_assembler.sarl_CLr(X86Registers::ecx); - // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86Registers::ecx) - m_assembler.sarl_CLr(shift_amount); - // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" - else - m_assembler.sarl_CLr(dest); - - swap(shift_amount, X86Registers::ecx); - } else + if (shift_amount == X86Registers::ecx) m_assembler.sarl_CLr(dest); + else { + // On x86 we can only shift by ecx; if asked to shift by another register we'll + // need rejig the shift amount into ecx first, and restore the registers afterwards. + // If we dest is ecx, then shift the swapped register! + swap(shift_amount, X86Registers::ecx); + m_assembler.sarl_CLr(dest == X86Registers::ecx ? shift_amount : dest); + swap(shift_amount, X86Registers::ecx); + } + } + + void rshift32(RegisterID src, RegisterID shift_amount, RegisterID dest) + { + ASSERT(shift_amount != dest); + + if (src != dest) + move(src, dest); + rshift32(shift_amount, dest); } - void rshift32(Imm32 imm, RegisterID dest) + void rshift32(TrustedImm32 imm, RegisterID dest) { m_assembler.sarl_i8r(imm.m_value, dest); } + void rshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) + { + if (src != dest) + move(src, dest); + rshift32(imm, dest); + } + void urshift32(RegisterID shift_amount, RegisterID dest) { - // On x86 we can only shift by ecx; if asked to shift by another register we'll - // need rejig the shift amount into ecx first, and restore the registers afterwards. - if (shift_amount != X86Registers::ecx) { + ASSERT(shift_amount != dest); + + if (shift_amount == X86Registers::ecx) + m_assembler.shrl_CLr(dest); + else { + // On x86 we can only shift by ecx; if asked to shift by another register we'll + // need rejig the shift amount into ecx first, and restore the registers afterwards. + // If we dest is ecx, then shift the swapped register! swap(shift_amount, X86Registers::ecx); - - // E.g. transform "shrl %eax, %eax" -> "xchgl %eax, %ecx; shrl %ecx, %ecx; xchgl %eax, %ecx" - if (dest == shift_amount) - m_assembler.shrl_CLr(X86Registers::ecx); - // E.g. transform "shrl %eax, %ecx" -> "xchgl %eax, %ecx; shrl %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86Registers::ecx) - m_assembler.shrl_CLr(shift_amount); - // E.g. transform "shrl %eax, %ebx" -> "xchgl %eax, %ecx; shrl %ecx, %ebx; xchgl %eax, %ecx" - else - m_assembler.shrl_CLr(dest); - + m_assembler.shrl_CLr(dest == X86Registers::ecx ? shift_amount : dest); swap(shift_amount, X86Registers::ecx); - } else - m_assembler.shrl_CLr(dest); + } } - - void urshift32(Imm32 imm, RegisterID dest) + + void urshift32(RegisterID src, RegisterID shift_amount, RegisterID dest) { - m_assembler.shrl_i8r(imm.m_value, dest); + ASSERT(shift_amount != dest); + + if (src != dest) + move(src, dest); + urshift32(shift_amount, dest); } + void urshift32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.shrl_i8r(imm.m_value, dest); + } + + void urshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) + { + if (src != dest) + move(src, dest); + urshift32(imm, dest); + } + void sub32(RegisterID src, RegisterID dest) { m_assembler.subl_rr(src, dest); } - void sub32(Imm32 imm, RegisterID dest) + void sub32(TrustedImm32 imm, RegisterID dest) { m_assembler.subl_ir(imm.m_value, dest); } - void sub32(Imm32 imm, Address address) + void sub32(TrustedImm32 imm, Address address) { m_assembler.subl_im(imm.m_value, address.offset, address.base); } @@ -309,12 +375,12 @@ public: m_assembler.xorl_rr(src, dest); } - void xor32(Imm32 imm, Address dest) + void xor32(TrustedImm32 imm, Address dest) { m_assembler.xorl_im(imm.m_value, dest.offset, dest.base); } - void xor32(Imm32 imm, RegisterID dest) + void xor32(TrustedImm32 imm, RegisterID dest) { m_assembler.xorl_ir(imm.m_value, dest); } @@ -329,6 +395,24 @@ public: m_assembler.xorl_mr(src.offset, src.base, dest); } + void xor32(RegisterID op1, RegisterID op2, RegisterID dest) + { + if (op1 == op2) + move(TrustedImm32(0), dest); + else if (op1 == dest) + xor32(op2, dest); + else { + move(op2, dest); + xor32(op1, dest); + } + } + + void xor32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { + move(src, dest); + xor32(imm, dest); + } + void sqrtDouble(FPRegisterID src, FPRegisterID dst) { m_assembler.sqrtsd_rr(src, dst); @@ -337,7 +421,7 @@ public: // Memory access operations: // // Loads are of the form load(address, destination) and stores of the form - // store(source, address). The source for a store may be an Imm32. Address + // store(source, address). The source for a store may be an TrustedImm32. Address // operand objects to loads and store will be implicitly constructed if a // register is passed. @@ -388,7 +472,7 @@ public: m_assembler.movl_rm(src, address.offset, address.base, address.index, address.scale); } - void store32(Imm32 imm, ImplicitAddress address) + void store32(TrustedImm32 imm, ImplicitAddress address) { m_assembler.movl_i32m(imm.m_value, address.offset, address.base); } @@ -398,6 +482,13 @@ public: // // Presently only supports SSE, not x87 floating point. + void moveDouble(FPRegisterID src, FPRegisterID dest) + { + ASSERT(isSSE2Present()); + if (src != dest) + m_assembler.movsd_rr(src, dest); + } + void loadDouble(ImplicitAddress address, FPRegisterID dest) { ASSERT(isSSE2Present()); @@ -416,6 +507,17 @@ public: m_assembler.addsd_rr(src, dest); } + void addDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) + { + ASSERT(isSSE2Present()); + if (op1 == dest) + addDouble(op2, dest); + else { + moveDouble(op2, dest); + addDouble(op1, dest); + } + } + void addDouble(Address src, FPRegisterID dest) { ASSERT(isSSE2Present()); @@ -428,6 +530,15 @@ public: m_assembler.divsd_rr(src, dest); } + void divDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) + { + // B := A / B is invalid. + ASSERT(op1 == dest || op2 != dest); + + moveDouble(op1, dest); + divDouble(op2, dest); + } + void divDouble(Address src, FPRegisterID dest) { ASSERT(isSSE2Present()); @@ -440,6 +551,15 @@ public: m_assembler.subsd_rr(src, dest); } + void subDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) + { + // B := A - B is invalid. + ASSERT(op1 == dest || op2 != dest); + + moveDouble(op1, dest); + subDouble(op2, dest); + } + void subDouble(Address src, FPRegisterID dest) { ASSERT(isSSE2Present()); @@ -452,6 +572,17 @@ public: m_assembler.mulsd_rr(src, dest); } + void mulDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) + { + ASSERT(isSSE2Present()); + if (op1 == dest) + mulDouble(op2, dest); + else { + moveDouble(op2, dest); + mulDouble(op1, dest); + } + } + void mulDouble(Address src, FPRegisterID dest) { ASSERT(isSSE2Present()); @@ -501,11 +632,12 @@ 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, INT_MIN). - Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) + enum BranchTruncateType { BranchIfTruncateFailed, BranchIfTruncateSuccessful }; + Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest, BranchTruncateType branchType = BranchIfTruncateFailed) { ASSERT(isSSE2Present()); m_assembler.cvttsd2si_rr(src, dest); - return branch32(Equal, dest, Imm32(0x80000000)); + return branch32(branchType ? NotEqual : Equal, dest, TrustedImm32(0x80000000)); } // Convert 'src' to an integer, and places the resulting 'dest'. @@ -564,7 +696,7 @@ public: m_assembler.push_m(address.offset, address.base); } - void push(Imm32 imm) + void push(TrustedImm32 imm) { m_assembler.push_i32(imm.m_value); } @@ -574,9 +706,9 @@ public: // // Move values in registers. - void move(Imm32 imm, RegisterID dest) + void move(TrustedImm32 imm, RegisterID dest) { - // Note: on 64-bit the Imm32 value is zero extended into the register, it + // Note: on 64-bit the TrustedImm32 value is zero extended into the register, it // may be useful to have a separate version that sign extends the value? if (!imm.m_value) m_assembler.xorl_rr(dest, dest); @@ -593,7 +725,7 @@ public: m_assembler.movq_rr(src, dest); } - void move(ImmPtr imm, RegisterID dest) + void move(TrustedImmPtr imm, RegisterID dest) { m_assembler.movq_i64r(imm.asIntptr(), dest); } @@ -620,7 +752,7 @@ public: m_assembler.movl_rr(src, dest); } - void move(ImmPtr imm, RegisterID dest) + void move(TrustedImmPtr imm, RegisterID dest) { m_assembler.movl_i32r(imm.asIntptr(), dest); } @@ -655,14 +787,14 @@ public: // used (representing the names 'below' and 'above'). // // Operands to the comparision are provided in the expected order, e.g. - // jle32(reg1, Imm32(5)) will branch if the value held in reg1, when + // jle32(reg1, TrustedImm32(5)) will branch if the value held in reg1, when // treated as a signed 32bit value, is less than or equal to 5. // // jz and jnz test whether the first operand is equal to zero, and take // an optional second operand of a mask under which to perform the test. public: - Jump branch8(Condition cond, Address left, Imm32 right) + Jump branch8(Condition cond, Address left, TrustedImm32 right) { m_assembler.cmpb_im(right.m_value, left.offset, left.base); return Jump(m_assembler.jCC(x86Condition(cond))); @@ -674,7 +806,7 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branch32(Condition cond, RegisterID left, Imm32 right) + Jump branch32(Condition cond, RegisterID left, TrustedImm32 right) { if (((cond == Equal) || (cond == NotEqual)) && !right.m_value) m_assembler.testl_rr(left, left); @@ -695,19 +827,19 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branch32(Condition cond, Address left, Imm32 right) + Jump branch32(Condition cond, Address left, TrustedImm32 right) { m_assembler.cmpl_im(right.m_value, left.offset, left.base); return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branch32(Condition cond, BaseIndex left, Imm32 right) + Jump branch32(Condition cond, BaseIndex left, TrustedImm32 right) { m_assembler.cmpl_im(right.m_value, left.offset, left.base, left.index, left.scale); return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right) + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, TrustedImm32 right) { return branch32(cond, left, right); } @@ -718,7 +850,7 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branch16(Condition cond, BaseIndex left, Imm32 right) + Jump branch16(Condition cond, BaseIndex left, TrustedImm32 right) { ASSERT(!(right.m_value & 0xFFFF0000)); @@ -728,14 +860,14 @@ public: Jump branchTest32(Condition cond, RegisterID reg, RegisterID mask) { - ASSERT((cond == Zero) || (cond == NonZero)); + ASSERT((cond == Zero) || (cond == NonZero) || (cond == Signed)); m_assembler.testl_rr(reg, mask); return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) { - ASSERT((cond == Zero) || (cond == NonZero)); + ASSERT((cond == Zero) || (cond == NonZero) || (cond == Signed)); // if we are only interested in the low seven bits, this can be tested with a testb if (mask.m_value == -1) m_assembler.testl_rr(reg, reg); @@ -746,9 +878,9 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { - ASSERT((cond == Zero) || (cond == NonZero)); + ASSERT((cond == Zero) || (cond == NonZero) || (cond == Signed)); if (mask.m_value == -1) m_assembler.cmpl_im(0, address.offset, address.base); else @@ -756,9 +888,9 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + Jump branchTest32(Condition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { - ASSERT((cond == Zero) || (cond == NonZero)); + ASSERT((cond == Zero) || (cond == NonZero) || (cond == Signed)); if (mask.m_value == -1) m_assembler.cmpl_im(0, address.offset, address.base, address.index, address.scale); else @@ -766,9 +898,23 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) + { + // Byte in TrustedImm32 is not well defined, so be a little permisive here, but don't accept nonsense values. + ASSERT(mask.m_value >= -128 && mask.m_value <= 255); + ASSERT((cond == Zero) || (cond == NonZero) || (cond == Signed)); + if (mask.m_value == -1) + m_assembler.testb_rr(reg, reg); + else + m_assembler.testb_i8r(mask.m_value, reg); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + + Jump branchTest8(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { - ASSERT((cond == Zero) || (cond == NonZero)); + // Byte in TrustedImm32 is not well defined, so be a little permisive here, but don't accept nonsense values. + ASSERT(mask.m_value >= -128 && mask.m_value <= 255); + ASSERT((cond == Zero) || (cond == NonZero) || (cond == Signed)); if (mask.m_value == -1) m_assembler.cmpb_im(0, address.offset, address.base); else @@ -776,9 +922,11 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTest8(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { - ASSERT((cond == Zero) || (cond == NonZero)); + // Byte in TrustedImm32 is not well defined, so be a little permisive here, but don't accept nonsense values. + ASSERT(mask.m_value >= -128 && mask.m_value <= 255); + ASSERT((cond == Zero) || (cond == NonZero) || (cond == Signed)); if (mask.m_value == -1) m_assembler.cmpb_im(0, address.offset, address.base, address.index, address.scale); else @@ -820,14 +968,14 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchAdd32(Condition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); add32(imm, dest); return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchAdd32(Condition cond, Imm32 src, Address dest) + Jump branchAdd32(Condition cond, TrustedImm32 src, Address dest) { ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); add32(src, dest); @@ -848,6 +996,20 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } + Jump branchAdd32(Condition cond, RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) + return branchAdd32(cond, src2, dest); + move(src2, dest); + return branchAdd32(cond, src1, dest); + } + + Jump branchAdd32(Condition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) + { + move(src, dest); + return branchAdd32(cond, imm, dest); + } + Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) { ASSERT(cond == Overflow); @@ -862,13 +1024,21 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + Jump branchMul32(Condition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) { ASSERT(cond == Overflow); mul32(imm, src, dest); return Jump(m_assembler.jCC(x86Condition(cond))); } + Jump branchMul32(Condition cond, RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) + return branchMul32(cond, src2, dest); + move(src2, dest); + return branchMul32(cond, src1, dest); + } + Jump branchSub32(Condition cond, RegisterID src, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); @@ -876,14 +1046,14 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + Jump branchSub32(Condition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); sub32(imm, dest); return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchSub32(Condition cond, Imm32 imm, Address dest) + Jump branchSub32(Condition cond, TrustedImm32 imm, Address dest) { ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); sub32(imm, dest); @@ -904,6 +1074,15 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } + Jump branchSub32(Condition cond, RegisterID src1, RegisterID src2, RegisterID dest) + { + // B := A - B is invalid. + ASSERT(src1 == dest || src2 != dest); + + move(src1, dest); + return branchSub32(cond, src2, dest); + } + Jump branchNeg32(Condition cond, RegisterID srcDest) { ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); @@ -958,7 +1137,7 @@ public: m_assembler.setCC_r(x86Condition(cond), dest); } - void set8Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set8Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { if (((cond == Equal) || (cond == NotEqual)) && !right.m_value) m_assembler.testl_rr(left, left); @@ -974,7 +1153,7 @@ public: m_assembler.movzbl_rr(dest, dest); } - void set32Compare32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void set32Compare32(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { if (((cond == Equal) || (cond == NotEqual)) && !right.m_value) m_assembler.testl_rr(left, left); @@ -989,7 +1168,7 @@ public: // dest-src, operations always have a dest? ... possibly not true, considering // asm ops like test, or pseudo ops like pop(). - void set32Test8(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test8(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { if (mask.m_value == -1) m_assembler.cmpb_im(0, address.offset, address.base); @@ -999,7 +1178,7 @@ public: m_assembler.movzbl_rr(dest, dest); } - void set32Test32(Condition cond, Address address, Imm32 mask, RegisterID dest) + void set32Test32(Condition cond, Address address, TrustedImm32 mask, RegisterID dest) { if (mask.m_value == -1) m_assembler.cmpl_im(0, address.offset, address.base); diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h b/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h index ebbe0bd..bd417aa 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h @@ -48,30 +48,31 @@ public: using MacroAssemblerX86Common::load32; using MacroAssemblerX86Common::store32; using MacroAssemblerX86Common::call; + using MacroAssemblerX86Common::addDouble; using MacroAssemblerX86Common::loadDouble; using MacroAssemblerX86Common::convertInt32ToDouble; - void add32(Imm32 imm, AbsoluteAddress address) + void add32(TrustedImm32 imm, AbsoluteAddress address) { - move(ImmPtr(address.m_ptr), scratchRegister); + move(TrustedImmPtr(address.m_ptr), scratchRegister); add32(imm, Address(scratchRegister)); } - void and32(Imm32 imm, AbsoluteAddress address) + void and32(TrustedImm32 imm, AbsoluteAddress address) { - move(ImmPtr(address.m_ptr), scratchRegister); + move(TrustedImmPtr(address.m_ptr), scratchRegister); and32(imm, Address(scratchRegister)); } - void or32(Imm32 imm, AbsoluteAddress address) + void or32(TrustedImm32 imm, AbsoluteAddress address) { - move(ImmPtr(address.m_ptr), scratchRegister); + move(TrustedImmPtr(address.m_ptr), scratchRegister); or32(imm, Address(scratchRegister)); } - void sub32(Imm32 imm, AbsoluteAddress address) + void sub32(TrustedImm32 imm, AbsoluteAddress address) { - move(ImmPtr(address.m_ptr), scratchRegister); + move(TrustedImmPtr(address.m_ptr), scratchRegister); sub32(imm, Address(scratchRegister)); } @@ -88,17 +89,23 @@ public: void loadDouble(const void* address, FPRegisterID dest) { - move(ImmPtr(address), scratchRegister); + move(TrustedImmPtr(address), scratchRegister); loadDouble(scratchRegister, dest); } - void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) + void addDouble(AbsoluteAddress address, FPRegisterID dest) { - move(Imm32(*static_cast(src.m_ptr)), scratchRegister); + move(TrustedImmPtr(address.m_ptr), scratchRegister); + m_assembler.addsd_mr(0, scratchRegister, dest); + } + + void convertInt32ToDouble(TrustedImm32 imm, FPRegisterID dest) + { + move(imm, scratchRegister); m_assembler.cvtsi2sd_rr(scratchRegister, dest); } - void store32(Imm32 imm, void* address) + void store32(TrustedImm32 imm, void* address) { move(X86Registers::eax, scratchRegister); move(imm, X86Registers::eax); @@ -108,7 +115,7 @@ public: Call call() { - DataLabelPtr label = moveWithPatch(ImmPtr(0), scratchRegister); + DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister); Call result = Call(m_assembler.call(scratchRegister), Call::Linkable); ASSERT(differenceBetween(label, result) == REPTACH_OFFSET_CALL_R11); return result; @@ -116,7 +123,7 @@ public: Call tailRecursiveCall() { - DataLabelPtr label = moveWithPatch(ImmPtr(0), scratchRegister); + DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister); Jump newJump = Jump(m_assembler.jmp_r(scratchRegister)); ASSERT(differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11); return Call::fromTailJump(newJump); @@ -125,7 +132,7 @@ public: Call makeTailRecursiveCall(Jump oldJump) { oldJump.link(this); - DataLabelPtr label = moveWithPatch(ImmPtr(0), scratchRegister); + DataLabelPtr label = moveWithPatch(TrustedImmPtr(0), scratchRegister); Jump newJump = Jump(m_assembler.jmp_r(scratchRegister)); ASSERT(differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11); return Call::fromTailJump(newJump); @@ -137,30 +144,30 @@ public: m_assembler.addq_rr(src, dest); } - void addPtr(Imm32 imm, RegisterID srcDest) + void addPtr(TrustedImm32 imm, RegisterID srcDest) { m_assembler.addq_ir(imm.m_value, srcDest); } - void addPtr(ImmPtr imm, RegisterID dest) + void addPtr(TrustedImmPtr imm, RegisterID dest) { move(imm, scratchRegister); m_assembler.addq_rr(scratchRegister, dest); } - void addPtr(Imm32 imm, RegisterID src, RegisterID dest) + void addPtr(TrustedImm32 imm, RegisterID src, RegisterID dest) { m_assembler.leaq_mr(imm.m_value, src, dest); } - void addPtr(Imm32 imm, Address address) + void addPtr(TrustedImm32 imm, Address address) { m_assembler.addq_im(imm.m_value, address.offset, address.base); } - void addPtr(Imm32 imm, AbsoluteAddress address) + void addPtr(TrustedImm32 imm, AbsoluteAddress address) { - move(ImmPtr(address.m_ptr), scratchRegister); + move(TrustedImmPtr(address.m_ptr), scratchRegister); addPtr(imm, Address(scratchRegister)); } @@ -169,7 +176,7 @@ public: m_assembler.andq_rr(src, dest); } - void andPtr(Imm32 imm, RegisterID srcDest) + void andPtr(TrustedImm32 imm, RegisterID srcDest) { m_assembler.andq_ir(imm.m_value, srcDest); } @@ -179,13 +186,13 @@ public: m_assembler.orq_rr(src, dest); } - void orPtr(ImmPtr imm, RegisterID dest) + void orPtr(TrustedImmPtr imm, RegisterID dest) { move(imm, scratchRegister); m_assembler.orq_rr(scratchRegister, dest); } - void orPtr(Imm32 imm, RegisterID dest) + void orPtr(TrustedImm32 imm, RegisterID dest) { m_assembler.orq_ir(imm.m_value, dest); } @@ -195,12 +202,12 @@ public: m_assembler.subq_rr(src, dest); } - void subPtr(Imm32 imm, RegisterID dest) + void subPtr(TrustedImm32 imm, RegisterID dest) { m_assembler.subq_ir(imm.m_value, dest); } - void subPtr(ImmPtr imm, RegisterID dest) + void subPtr(TrustedImmPtr imm, RegisterID dest) { move(imm, scratchRegister); m_assembler.subq_rr(scratchRegister, dest); @@ -211,7 +218,7 @@ public: m_assembler.xorq_rr(src, dest); } - void xorPtr(Imm32 imm, RegisterID srcDest) + void xorPtr(TrustedImm32 imm, RegisterID srcDest) { m_assembler.xorq_ir(imm.m_value, srcDest); } @@ -227,7 +234,7 @@ public: m_assembler.movq_mr(address.offset, address.base, address.index, address.scale, dest); } - void loadPtr(void* address, RegisterID dest) + void loadPtr(const void* address, RegisterID dest) { if (dest == X86Registers::eax) m_assembler.movq_mEAX(address); @@ -265,7 +272,7 @@ public: } } - void storePtr(ImmPtr imm, ImplicitAddress address) + void storePtr(TrustedImmPtr imm, ImplicitAddress address) { move(imm, scratchRegister); storePtr(scratchRegister, address); @@ -287,7 +294,7 @@ public: m_assembler.movq_rr(src, dest); } - void setPtr(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + void setPtr(Condition cond, RegisterID left, TrustedImm32 right, RegisterID dest) { if (((cond == Equal) || (cond == NotEqual)) && !right.m_value) m_assembler.testq_rr(left, left); @@ -303,7 +310,7 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchPtr(Condition cond, RegisterID left, ImmPtr right) + Jump branchPtr(Condition cond, RegisterID left, TrustedImmPtr right) { move(right, scratchRegister); return branchPtr(cond, left, scratchRegister); @@ -317,7 +324,7 @@ public: Jump branchPtr(Condition cond, AbsoluteAddress left, RegisterID right) { - move(ImmPtr(left.m_ptr), scratchRegister); + move(TrustedImmPtr(left.m_ptr), scratchRegister); return branchPtr(cond, Address(scratchRegister), right); } @@ -327,7 +334,7 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchPtr(Condition cond, Address left, ImmPtr right) + Jump branchPtr(Condition cond, Address left, TrustedImmPtr right) { move(right, scratchRegister); return branchPtr(cond, left, scratchRegister); @@ -339,7 +346,7 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTestPtr(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + Jump branchTestPtr(Condition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1)) { // if we are only interested in the low seven bits, this can be tested with a testb if (mask.m_value == -1) @@ -351,7 +358,13 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTestPtr(Condition cond, Address address, Imm32 mask = Imm32(-1)) + Jump branchTestPtr(Condition cond, AbsoluteAddress address, TrustedImm32 mask = TrustedImm32(-1)) + { + loadPtr(address.m_ptr, scratchRegister); + return branchTestPtr(cond, scratchRegister, mask); + } + + Jump branchTestPtr(Condition cond, Address address, TrustedImm32 mask = TrustedImm32(-1)) { if (mask.m_value == -1) m_assembler.cmpq_im(0, address.offset, address.base); @@ -360,7 +373,7 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchTestPtr(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + Jump branchTestPtr(Condition cond, BaseIndex address, TrustedImm32 mask = TrustedImm32(-1)) { if (mask.m_value == -1) m_assembler.cmpq_im(0, address.offset, address.base, address.index, address.scale); @@ -377,32 +390,32 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } - Jump branchSubPtr(Condition cond, Imm32 imm, RegisterID dest) + Jump branchSubPtr(Condition cond, TrustedImm32 imm, RegisterID dest) { ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); subPtr(imm, dest); return Jump(m_assembler.jCC(x86Condition(cond))); } - DataLabelPtr moveWithPatch(ImmPtr initialValue, RegisterID dest) + DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest) { m_assembler.movq_i64r(initialValue.asIntptr(), dest); return DataLabelPtr(this); } - Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { dataLabel = moveWithPatch(initialRightValue, scratchRegister); return branchPtr(cond, left, scratchRegister); } - Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, TrustedImmPtr initialRightValue = TrustedImmPtr(0)) { dataLabel = moveWithPatch(initialRightValue, scratchRegister); return branchPtr(cond, left, scratchRegister); } - DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) + DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) { DataLabelPtr label = moveWithPatch(initialValue, scratchRegister); storePtr(scratchRegister, address); @@ -410,9 +423,9 @@ public: } using MacroAssemblerX86Common::branchTest8; - Jump branchTest8(Condition cond, ExtendedAddress address, Imm32 mask = Imm32(-1)) + Jump branchTest8(Condition cond, ExtendedAddress address, TrustedImm32 mask = TrustedImm32(-1)) { - ImmPtr addr(reinterpret_cast(address.offset)); + TrustedImmPtr addr(reinterpret_cast(address.offset)); MacroAssemblerX86Common::move(addr, scratchRegister); return MacroAssemblerX86Common::branchTest8(cond, BaseIndex(scratchRegister, address.base, TimesOne), mask); } diff --git a/Source/JavaScriptCore/assembler/X86Assembler.h b/Source/JavaScriptCore/assembler/X86Assembler.h index 587d900..4851c1e 100644 --- a/Source/JavaScriptCore/assembler/X86Assembler.h +++ b/Source/JavaScriptCore/assembler/X86Assembler.h @@ -131,6 +131,7 @@ private: OP_GROUP1_EbIb = 0x80, OP_GROUP1_EvIz = 0x81, OP_GROUP1_EvIb = 0x83, + OP_TEST_EbGb = 0x84, OP_TEST_EvGv = 0x85, OP_XCHG_EvGv = 0x87, OP_MOV_EvGv = 0x89, @@ -228,6 +229,8 @@ public: { } + bool isSet() const { return (m_offset != -1); } + private: JmpSrc(int offset) : m_offset(offset) @@ -299,7 +302,7 @@ public: // Arithmetic operations: #if !CPU(X86_64) - void adcl_im(int imm, void* addr) + void adcl_im(int imm, const void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { m_formatter.oneByteOp(OP_GROUP1_EvIb, GROUP1_OP_ADC, addr); @@ -376,7 +379,7 @@ public: } } #else - void addl_im(int imm, void* addr) + void addl_im(int imm, const void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { m_formatter.oneByteOp(OP_GROUP1_EvIb, GROUP1_OP_ADD, addr); @@ -442,7 +445,7 @@ public: } } #else - void andl_im(int imm, void* addr) + void andl_im(int imm, const void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { m_formatter.oneByteOp(OP_GROUP1_EvIb, GROUP1_OP_AND, addr); @@ -528,7 +531,7 @@ public: } } #else - void orl_im(int imm, void* addr) + void orl_im(int imm, const void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { m_formatter.oneByteOp(OP_GROUP1_EvIb, GROUP1_OP_OR, addr); @@ -594,7 +597,7 @@ public: } } #else - void subl_im(int imm, void* addr) + void subl_im(int imm, const void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { m_formatter.oneByteOp(OP_GROUP1_EvIb, GROUP1_OP_SUB, addr); @@ -867,12 +870,12 @@ public: } } #else - void cmpl_rm(RegisterID reg, void* addr) + void cmpl_rm(RegisterID reg, const void* addr) { m_formatter.oneByteOp(OP_CMP_EvGv, reg, addr); } - void cmpl_im(int imm, void* addr) + void cmpl_im(int imm, const void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { m_formatter.oneByteOp(OP_GROUP1_EvIb, GROUP1_OP_CMP, addr); @@ -919,7 +922,12 @@ public: m_formatter.oneByteOp(OP_GROUP3_EvIz, GROUP3_OP_TEST, base, offset); m_formatter.immediate32(imm); } - + + void testb_rr(RegisterID src, RegisterID dst) + { + m_formatter.oneByteOp(OP_TEST_EbGb, src, dst); + } + void testb_im(int imm, int offset, RegisterID base) { m_formatter.oneByteOp(OP_GROUP3_EbIb, GROUP3_OP_TEST, base, offset); @@ -1039,7 +1047,7 @@ public: m_formatter.oneByteOp(OP_MOV_EvGv, src, base, index, scale, offset); } - void movl_mEAX(void* addr) + void movl_mEAX(const void* addr) { m_formatter.oneByteOp(OP_MOV_EAXOv); #if CPU(X86_64) @@ -1076,7 +1084,7 @@ public: m_formatter.immediate32(imm); } - void movl_EAXm(void* addr) + void movl_EAXm(const void* addr) { m_formatter.oneByteOp(OP_MOV_OvEAX); #if CPU(X86_64) @@ -1107,13 +1115,13 @@ public: m_formatter.oneByteOp64(OP_MOV_EvGv, src, base, index, scale, offset); } - void movq_mEAX(void* addr) + void movq_mEAX(const void* addr) { m_formatter.oneByteOp64(OP_MOV_EAXOv); m_formatter.immediate64(reinterpret_cast(addr)); } - void movq_EAXm(void* addr) + void movq_EAXm(const void* addr) { m_formatter.oneByteOp64(OP_MOV_OvEAX); m_formatter.immediate64(reinterpret_cast(addr)); @@ -1153,7 +1161,7 @@ public: #else - void movl_rm(RegisterID src, void* addr) + void movl_rm(RegisterID src, const void* addr) { if (src == X86Registers::eax) movl_EAXm(addr); @@ -1161,7 +1169,7 @@ public: m_formatter.oneByteOp(OP_MOV_EvGv, src, addr); } - void movl_mr(void* addr, RegisterID dst) + void movl_mr(const void* addr, RegisterID dst) { if (dst == X86Registers::eax) movl_mEAX(addr); @@ -1169,7 +1177,7 @@ public: m_formatter.oneByteOp(OP_MOV_GvEv, dst, addr); } - void movl_i32m(int imm, void* addr) + void movl_i32m(int imm, const void* addr) { m_formatter.oneByteOp(OP_GROUP11_EvIz, GROUP11_MOV, addr); m_formatter.immediate32(imm); @@ -1365,7 +1373,7 @@ public: } #if !CPU(X86_64) - void cvtsi2sd_mr(void* address, XMMRegisterID dst) + void cvtsi2sd_mr(const void* address, XMMRegisterID dst) { m_formatter.prefix(PRE_SSE_F2); m_formatter.twoByteOp(OP2_CVTSI2SD_VsdEd, (RegisterID)dst, address); @@ -1398,6 +1406,12 @@ public: } #endif + void movsd_rr(XMMRegisterID src, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_F2); + m_formatter.twoByteOp(OP2_MOVSD_VsdWsd, (RegisterID)dst, (RegisterID)src); + } + void movsd_rm(XMMRegisterID src, int offset, RegisterID base) { m_formatter.prefix(PRE_SSE_F2); @@ -1536,6 +1550,7 @@ public: ASSERT(to.m_offset != -1); char* code = reinterpret_cast(m_formatter.data()); + ASSERT(!reinterpret_cast(code + from.m_offset)[-1]); setRel32(code + from.m_offset, code + to.m_offset); } @@ -1717,7 +1732,7 @@ private: } #if !CPU(X86_64) - void oneByteOp(OneByteOpcodeID opcode, int reg, void* address) + void oneByteOp(OneByteOpcodeID opcode, int reg, const void* address) { m_buffer.ensureSpace(maxInstructionSize); m_buffer.putByteUnchecked(opcode); diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp index 2d235df..98bbb3c 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp @@ -364,7 +364,7 @@ void CodeBlock::dump(ExecState* exec) const unsigned registerIndex = m_numVars; size_t i = 0; do { - printf(" k%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].jsValue()).utf8().data()); + printf(" k%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].get()).utf8().data()); ++i; ++registerIndex; } while (i < m_constantRegisters.size()); @@ -731,7 +731,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& case op_resolve_global_dynamic: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; - JSValue scope = JSValue((++it)->u.jsCell); + JSValue scope = JSValue((++it)->u.jsCell.get()); ++it; int depth = (++it)->u.operand; printf("[%4d] resolve_global_dynamic\t %s, %s, %s, %d\n", location, registerName(exec, r0).data(), valueToSourceString(exec, scope).utf8().data(), idName(id0, m_identifiers[id0]).data(), depth); @@ -1360,13 +1360,13 @@ void CodeBlock::dumpStatistics() } CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, JSGlobalObject *globalObject, PassRefPtr sourceProvider, unsigned sourceOffset, SymbolTable* symTab, bool isConstructor) - : m_globalObject(globalObject) + : m_globalObject(globalObject->globalData(), ownerExecutable, globalObject) , m_heap(&m_globalObject->globalData().heap) , m_numCalleeRegisters(0) , m_numVars(0) , m_numParameters(0) , m_isConstructor(isConstructor) - , m_ownerExecutable(ownerExecutable) + , m_ownerExecutable(globalObject->globalData(), ownerExecutable, ownerExecutable) , m_globalData(0) #ifndef NDEBUG , m_instructionCount(0) @@ -1406,12 +1406,6 @@ CodeBlock::~CodeBlock() for (size_t size = m_structureStubInfos.size(), i = 0; i < size; ++i) m_structureStubInfos[i].deref(); - for (size_t size = m_callLinkInfos.size(), i = 0; i < size; ++i) { - CallLinkInfo* callLinkInfo = &m_callLinkInfos[i]; - if (callLinkInfo->isLinked()) - callLinkInfo->callee->removeCaller(callLinkInfo); - } - for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) { if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) { structure->deref(); @@ -1421,10 +1415,6 @@ CodeBlock::~CodeBlock() } } -#if ENABLE(JIT_OPTIMIZE_CALL) - unlinkCallers(); -#endif - #endif // ENABLE(JIT) #if DUMP_CODE_BLOCK_STATISTICS @@ -1432,19 +1422,6 @@ CodeBlock::~CodeBlock() #endif } -#if ENABLE(JIT_OPTIMIZE_CALL) -void CodeBlock::unlinkCallers() -{ - size_t size = m_linkedCallerList.size(); - for (size_t i = 0; i < size; ++i) { - CallLinkInfo* currentCaller = m_linkedCallerList[i]; - JIT::unlinkCallOrConstruct(currentCaller); - currentCaller->setUnlinked(); - } - m_linkedCallerList.clear(); -} -#endif - void CodeBlock::derefStructures(Instruction* vPC) const { Interpreter* interpreter = m_globalData->interpreter; @@ -1460,13 +1437,11 @@ void CodeBlock::derefStructures(Instruction* vPC) const } if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_chain)) { vPC[4].u.structure->deref(); - vPC[5].u.structureChain->deref(); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) { vPC[4].u.structure->deref(); vPC[5].u.structure->deref(); - vPC[6].u.structureChain->deref(); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_replace)) { @@ -1509,13 +1484,11 @@ void CodeBlock::refStructures(Instruction* vPC) const } if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_chain)) { vPC[4].u.structure->ref(); - vPC[5].u.structureChain->ref(); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) { vPC[4].u.structure->ref(); vPC[5].u.structure->ref(); - vPC[6].u.structureChain->ref(); return; } if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_replace)) { @@ -1527,14 +1500,43 @@ void CodeBlock::refStructures(Instruction* vPC) const ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic)); } +void EvalCodeCache::markAggregate(MarkStack& markStack) +{ + EvalCacheMap::iterator end = m_cacheMap.end(); + for (EvalCacheMap::iterator ptr = m_cacheMap.begin(); ptr != end; ++ptr) + markStack.append(&ptr->second); +} + void CodeBlock::markAggregate(MarkStack& markStack) { - for (size_t i = 0; i < m_constantRegisters.size(); ++i) - markStack.deprecatedAppend(&m_constantRegisters[i]); + markStack.append(&m_globalObject); + markStack.append(&m_ownerExecutable); + if (m_rareData) + m_rareData->m_evalCodeCache.markAggregate(markStack); + markStack.appendValues(m_constantRegisters.data(), m_constantRegisters.size()); for (size_t i = 0; i < m_functionExprs.size(); ++i) - m_functionExprs[i]->markAggregate(markStack); + markStack.append(&m_functionExprs[i]); for (size_t i = 0; i < m_functionDecls.size(); ++i) - m_functionDecls[i]->markAggregate(markStack); + markStack.append(&m_functionDecls[i]); +#if ENABLE(JIT_OPTIMIZE_CALL) + for (unsigned i = 0; i < numberOfCallLinkInfos(); ++i) + if (callLinkInfo(i).isLinked()) + markStack.append(&callLinkInfo(i).callee); +#endif +#if ENABLE(INTERPRETER) + Interpreter* interpreter = m_globalData->interpreter; + for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i) { + Instruction* vPC = &m_instructions[m_propertyAccessInstructions[i]]; + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_chain)) + markStack.append(&vPC[5].u.structureChain); + else if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) + markStack.append(&vPC[6].u.structureChain); + } +#endif +#if ENABLE(JIT) + for (size_t size = m_structureStubInfos.size(), i = 0; i < size; ++i) + m_structureStubInfos[i].markAggregate(markStack); +#endif } HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset) @@ -1671,7 +1673,6 @@ void CodeBlock::shrinkToFit() m_structureStubInfos.shrinkToFit(); m_globalResolveInfos.shrinkToFit(); m_callLinkInfos.shrinkToFit(); - m_linkedCallerList.shrinkToFit(); #endif m_identifiers.shrinkToFit(); diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h index bef4561..25e65f4 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.h +++ b/Source/JavaScriptCore/bytecode/CodeBlock.h @@ -96,21 +96,17 @@ namespace JSC { #if ENABLE(JIT) struct CallLinkInfo { CallLinkInfo() - : callee(0) - , position(0) - , hasSeenShouldRepatch(0) + : hasSeenShouldRepatch(false) { } CodeLocationNearCall callReturnLocation; CodeLocationDataLabelPtr hotPathBegin; CodeLocationNearCall hotPathOther; - CodeBlock* ownerCodeBlock; - CodeBlock* callee; - unsigned position : 31; - unsigned hasSeenShouldRepatch : 1; + WriteBarrier callee; + bool hasSeenShouldRepatch; - void setUnlinked() { callee = 0; } + void setUnlinked() { callee.clear(); } bool isLinked() { return callee; } bool seenOnce() @@ -183,7 +179,7 @@ namespace JSC { unsigned bytecodeOffset; }; - // valueAtPosition helpers for the binaryChop algorithm below. + // valueAtPosition helpers for the binarySearch algorithm. inline void* getStructureStubInfoReturnLocation(StructureStubInfo* structureStubInfo) { @@ -204,42 +200,6 @@ namespace JSC { { return pc->callReturnOffset; } - - // Binary chop algorithm, calls valueAtPosition on pre-sorted elements in array, - // compares result with key (KeyTypes should be comparable with '--', '<', '>'). - // Optimized for cases where the array contains the key, checked by assertions. - template - inline ArrayType* binaryChop(ArrayType* array, size_t size, KeyType key) - { - // The array must contain at least one element (pre-condition, array does conatin key). - // If the array only contains one element, no need to do the comparison. - while (size > 1) { - // Pick an element to check, half way through the array, and read the value. - int pos = (size - 1) >> 1; - KeyType val = valueAtPosition(&array[pos]); - - // If the key matches, success! - if (val == key) - return &array[pos]; - // The item we are looking for is smaller than the item being check; reduce the value of 'size', - // chopping off the right hand half of the array. - else if (key < val) - size = pos; - // Discard all values in the left hand half of the array, up to and including the item at pos. - else { - size -= (pos + 1); - array += (pos + 1); - } - - // 'size' should never reach zero. - ASSERT(size); - } - - // If we reach this point we've chopped down to one element, no need to check it matches - ASSERT(size == 1); - ASSERT(key == valueAtPosition(&array[0])); - return &array[0]; - } #endif class CodeBlock { @@ -248,7 +208,7 @@ namespace JSC { protected: CodeBlock(ScriptExecutable* ownerExecutable, CodeType, JSGlobalObject*, PassRefPtr, unsigned sourceOffset, SymbolTable* symbolTable, bool isConstructor); - DeprecatedPtr m_globalObject; + WriteBarrier m_globalObject; Heap* m_heap; public: @@ -257,9 +217,6 @@ namespace JSC { void markAggregate(MarkStack&); void refStructures(Instruction* vPC) const; void derefStructures(Instruction* vPC) const; -#if ENABLE(JIT_OPTIMIZE_CALL) - void unlinkCallers(); -#endif static void dumpStatistics(); @@ -292,38 +249,20 @@ namespace JSC { void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset); #if ENABLE(JIT) - void addCaller(CallLinkInfo* caller) - { - caller->callee = this; - caller->position = m_linkedCallerList.size(); - m_linkedCallerList.append(caller); - } - - void removeCaller(CallLinkInfo* caller) - { - unsigned pos = caller->position; - unsigned lastPos = m_linkedCallerList.size() - 1; - - if (pos != lastPos) { - m_linkedCallerList[pos] = m_linkedCallerList[lastPos]; - m_linkedCallerList[pos]->position = pos; - } - m_linkedCallerList.shrink(lastPos); - } StructureStubInfo& getStubInfo(ReturnAddressPtr returnAddress) { - return *(binaryChop(m_structureStubInfos.begin(), m_structureStubInfos.size(), returnAddress.value())); + return *(binarySearch(m_structureStubInfos.begin(), m_structureStubInfos.size(), returnAddress.value())); } CallLinkInfo& getCallLinkInfo(ReturnAddressPtr returnAddress) { - return *(binaryChop(m_callLinkInfos.begin(), m_callLinkInfos.size(), returnAddress.value())); + return *(binarySearch(m_callLinkInfos.begin(), m_callLinkInfos.size(), returnAddress.value())); } MethodCallLinkInfo& getMethodCallLinkInfo(ReturnAddressPtr returnAddress) { - return *(binaryChop(m_methodCallLinkInfos.begin(), m_methodCallLinkInfos.size(), returnAddress.value())); + return *(binarySearch(m_methodCallLinkInfos.begin(), m_methodCallLinkInfos.size(), returnAddress.value())); } unsigned bytecodeOffset(ReturnAddressPtr returnAddress) @@ -333,7 +272,7 @@ namespace JSC { Vector& callIndices = m_rareData->m_callReturnIndexVector; if (!callIndices.size()) return 1; - return binaryChop(callIndices.begin(), callIndices.size(), getJITCode().offsetOf(returnAddress.value()))->bytecodeOffset; + return binarySearch(callIndices.begin(), callIndices.size(), getJITCode().offsetOf(returnAddress.value()))->bytecodeOffset; } #endif #if ENABLE(INTERPRETER) @@ -359,7 +298,7 @@ namespace JSC { ExecutablePool* executablePool() { return getJITCode().getExecutablePool(); } #endif - ScriptExecutable* ownerExecutable() const { return m_ownerExecutable; } + ScriptExecutable* ownerExecutable() const { return m_ownerExecutable.get(); } void setGlobalData(JSGlobalData* globalData) { m_globalData = globalData; } @@ -451,6 +390,8 @@ namespace JSC { bool hasExpressionInfo() { return m_rareData && m_rareData->m_expressionInfo.size(); } bool hasLineInfo() { return m_rareData && m_rareData->m_lineInfo.size(); } + // We only generate exception handling info if the user is debugging + // (and may want line number info), or if the function contains exception handler. bool needsCallReturnIndices() { return m_rareData && @@ -472,18 +413,34 @@ namespace JSC { Identifier& identifier(int index) { return m_identifiers[index]; } size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); } - void addConstantRegister(const Register& r) { return m_constantRegisters.append(r); } - Register& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; } + void addConstant(JSValue v) + { + m_constantRegisters.append(WriteBarrier()); + m_constantRegisters.last().set(m_globalObject->globalData(), m_ownerExecutable.get(), v); + } + 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].jsValue(); } + ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].get(); } - unsigned addFunctionDecl(NonNullPassRefPtr n) { unsigned size = m_functionDecls.size(); m_functionDecls.append(n); return size; } + 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(NonNullPassRefPtr n) { unsigned size = m_functionExprs.size(); m_functionExprs.append(n); return 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(); } - unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; } + unsigned addRegExp(PassRefPtr r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; } RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); } JSGlobalObject* globalObject() { return m_globalObject.get(); } @@ -536,7 +493,7 @@ namespace JSC { m_rareData = adoptPtr(new RareData); } - ScriptExecutable* m_ownerExecutable; + WriteBarrier m_ownerExecutable; JSGlobalData* m_globalData; Vector m_instructions; @@ -567,16 +524,16 @@ namespace JSC { Vector m_globalResolveInfos; Vector m_callLinkInfos; Vector m_methodCallLinkInfos; - Vector m_linkedCallerList; #endif Vector m_jumpTargets; // Constant Pool Vector m_identifiers; - Vector m_constantRegisters; - Vector > m_functionDecls; - Vector > m_functionExprs; + COMPILE_ASSERT(sizeof(Register) == sizeof(WriteBarrier), Register_must_be_same_size_as_WriteBarrier_Unknown); + Vector > m_constantRegisters; + Vector > m_functionDecls; + Vector > m_functionExprs; SymbolTable* m_symbolTable; @@ -617,12 +574,6 @@ namespace JSC { GlobalCodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr sourceProvider, unsigned sourceOffset) : CodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, sourceOffset, &m_unsharedSymbolTable, false) { - m_heap->codeBlocks().add(this); - } - - ~GlobalCodeBlock() - { - m_heap->codeBlocks().remove(this); } private: @@ -680,7 +631,7 @@ namespace JSC { { CodeBlock* codeBlock = this->codeBlock(); if (codeBlock->isConstantRegisterIndex(index)) - return codeBlock->constantRegister(index); + return *reinterpret_cast(&codeBlock->constantRegister(index)); return this[index]; } diff --git a/Source/JavaScriptCore/bytecode/EvalCodeCache.h b/Source/JavaScriptCore/bytecode/EvalCodeCache.h index edd575f..3e450b1 100644 --- a/Source/JavaScriptCore/bytecode/EvalCodeCache.h +++ b/Source/JavaScriptCore/bytecode/EvalCodeCache.h @@ -41,14 +41,16 @@ namespace JSC { + class MarkStack; + class EvalCodeCache { public: - PassRefPtr get(ExecState* exec, bool inStrictContext, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) + EvalExecutable* get(ExecState* exec, ScriptExecutable* owner, bool inStrictContext, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) { - RefPtr evalExecutable; + EvalExecutable* evalExecutable = 0; if (!inStrictContext && evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject()) - evalExecutable = m_cacheMap.get(evalSource.impl()); + evalExecutable = m_cacheMap.get(evalSource.impl()).get(); if (!evalExecutable) { evalExecutable = EvalExecutable::create(exec, makeSource(evalSource), inStrictContext); @@ -57,19 +59,21 @@ namespace JSC { return 0; if (!inStrictContext && evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries) - m_cacheMap.set(evalSource.impl(), evalExecutable); + m_cacheMap.set(evalSource.impl(), WriteBarrier(exec->globalData(), owner, evalExecutable)); } - return evalExecutable.release(); + return evalExecutable; } bool isEmpty() const { return m_cacheMap.isEmpty(); } + void markAggregate(MarkStack&); + private: static const unsigned maxCacheableSourceLength = 256; static const int maxCacheEntries = 64; - typedef HashMap, RefPtr > EvalCacheMap; + typedef HashMap, WriteBarrier > EvalCacheMap; EvalCacheMap m_cacheMap; }; diff --git a/Source/JavaScriptCore/bytecode/Instruction.h b/Source/JavaScriptCore/bytecode/Instruction.h index f077cbf..da0821d 100644 --- a/Source/JavaScriptCore/bytecode/Instruction.h +++ b/Source/JavaScriptCore/bytecode/Instruction.h @@ -63,7 +63,7 @@ namespace JSC { Structure* base; union { Structure* proto; - StructureChain* chain; + WriteBarrierBase chain; } u; void set(PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base) @@ -82,11 +82,11 @@ namespace JSC { isChain = false; } - void set(PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base, StructureChain* _chain) + void set(JSGlobalData& globalData, JSCell* owner, PolymorphicAccessStructureListStubRoutineType _stubRoutine, Structure* _base, StructureChain* _chain) { stubRoutine = _stubRoutine; base = _base; - u.chain = _chain; + u.chain.set(globalData, owner, _chain); isChain = true; } } list[POLYMORPHIC_LIST_CACHE_SIZE]; @@ -101,9 +101,9 @@ namespace JSC { list[0].set(stubRoutine, firstBase, firstProto); } - PolymorphicAccessStructureList(PolymorphicAccessStructureListStubRoutineType stubRoutine, Structure* firstBase, StructureChain* firstChain) + PolymorphicAccessStructureList(JSGlobalData& globalData, JSCell* owner, PolymorphicAccessStructureListStubRoutineType stubRoutine, Structure* firstBase, StructureChain* firstChain) { - list[0].set(stubRoutine, firstBase, firstChain); + list[0].set(globalData, owner, stubRoutine, firstBase, firstChain); } void derefStructures(int count) @@ -115,13 +115,22 @@ namespace JSC { info.base->deref(); if (info.u.proto) { - if (info.isChain) - info.u.chain->deref(); - else + if (!info.isChain) info.u.proto->deref(); } } } + + void markAggregate(MarkStack& markStack, int count) + { + for (int i = 0; i < count; ++i) { + PolymorphicStubInfo& info = list[i]; + ASSERT(info.base); + + if (info.u.proto && info.isChain) + markStack.append(&info.u.chain); + } + } }; struct Instruction { @@ -130,7 +139,7 @@ namespace JSC { #if !ENABLE(COMPUTED_GOTO_INTERPRETER) // 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 = 0; + u.jsCell.clear(); #endif u.opcode = opcode; } @@ -139,13 +148,21 @@ namespace JSC { { // We have to initialize one of the pointer members to ensure that // the entire struct is initialized in 64-bit. - u.jsCell = 0; + u.jsCell.clear(); u.operand = operand; } Instruction(Structure* structure) { u.structure = structure; } - Instruction(StructureChain* structureChain) { u.structureChain = structureChain; } - Instruction(JSCell* jsCell) { u.jsCell = jsCell; } + 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(PolymorphicAccessStructureList* polymorphicStructures) { u.polymorphicStructures = polymorphicStructures; } Instruction(PropertySlot::GetValueFunc getterFunc) { u.getterFunc = getterFunc; } @@ -153,8 +170,8 @@ namespace JSC { Opcode opcode; int operand; Structure* structure; - StructureChain* structureChain; - JSCell* jsCell; + WriteBarrierBase structureChain; + WriteBarrierBase jsCell; PolymorphicAccessStructureList* polymorphicStructures; PropertySlot::GetValueFunc getterFunc; } u; diff --git a/Source/JavaScriptCore/bytecode/SamplingTool.h b/Source/JavaScriptCore/bytecode/SamplingTool.h index 9ca54da..a0696b1 100644 --- a/Source/JavaScriptCore/bytecode/SamplingTool.h +++ b/Source/JavaScriptCore/bytecode/SamplingTool.h @@ -95,8 +95,8 @@ namespace JSC { struct Instruction; struct ScriptSampleRecord { - ScriptSampleRecord(ScriptExecutable* executable) - : m_executable(executable) + ScriptSampleRecord(JSGlobalData& globalData, ScriptExecutable* executable) + : m_executable(globalData, executable) , m_codeBlock(0) , m_sampleCount(0) , m_opcodeSampleCount(0) @@ -113,7 +113,7 @@ namespace JSC { void sample(CodeBlock*, Instruction*); - RefPtr m_executable; + Global m_executable; CodeBlock* m_codeBlock; int m_sampleCount; int m_opcodeSampleCount; @@ -280,7 +280,6 @@ namespace JSC { // Implements a named set of counters, printed on exit if ENABLE(SAMPLING_COUNTERS). // See subclasses below, SamplingCounter, GlobalSamplingCounter and DeletableSamplingCounter. class AbstractSamplingCounter { - friend class JIT; friend class DeletableSamplingCounter; public: void count(uint32_t count = 1) @@ -290,6 +289,8 @@ namespace JSC { static void dump(); + int64_t* addressOfCounter() { return &m_counter; } + protected: // Effectively the contructor, however called lazily in the case of GlobalSamplingCounter. void init(const char* name) diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp index 5ec2a3f..4d59ac1 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp +++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "StructureStubInfo.h" +#include "JSObject.h" #include "ScopeChain.h" namespace JSC { @@ -43,7 +44,6 @@ void StructureStubInfo::deref() return; case access_get_by_id_chain: u.getByIdChain.baseObjectStructure->deref(); - u.getByIdChain.chain->deref(); return; case access_get_by_id_self_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; @@ -60,7 +60,6 @@ void StructureStubInfo::deref() case access_put_by_id_transition: u.putByIdTransition.previousStructure->deref(); u.putByIdTransition.structure->deref(); - u.putByIdTransition.chain->deref(); return; case access_put_by_id_replace: u.putByIdReplace.baseObjectStructure->deref(); @@ -77,6 +76,42 @@ void StructureStubInfo::deref() ASSERT_NOT_REACHED(); } } + +void StructureStubInfo::markAggregate(MarkStack& markStack) +{ + switch (accessType) { + case access_get_by_id_self: + return; + case access_get_by_id_proto: + return; + case access_get_by_id_chain: + return; + case access_get_by_id_self_list: { + PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; + polymorphicStructures->markAggregate(markStack, u.getByIdSelfList.listSize); + return; + } + case access_get_by_id_proto_list: { + PolymorphicAccessStructureList* polymorphicStructures = u.getByIdProtoList.structureList; + polymorphicStructures->markAggregate(markStack, u.getByIdProtoList.listSize); + return; + } + case access_put_by_id_transition: + return; + case access_put_by_id_replace: + return; + case access_get_by_id: + case access_put_by_id: + case access_get_by_id_generic: + case access_put_by_id_generic: + case access_get_array_length: + case access_get_string_length: + // These instructions don't ref their Structures. + return; + default: + ASSERT_NOT_REACHED(); + } +} #endif } // namespace JSC diff --git a/Source/JavaScriptCore/bytecode/StructureStubInfo.h b/Source/JavaScriptCore/bytecode/StructureStubInfo.h index 8e2c489..28202f9 100644 --- a/Source/JavaScriptCore/bytecode/StructureStubInfo.h +++ b/Source/JavaScriptCore/bytecode/StructureStubInfo.h @@ -85,7 +85,6 @@ namespace JSC { baseObjectStructure->ref(); u.getByIdChain.chain = chain; - chain->ref(); } void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize) @@ -117,7 +116,6 @@ namespace JSC { structure->ref(); u.putByIdTransition.chain = chain; - chain->ref(); } void initPutByIdReplace(Structure* baseObjectStructure) @@ -129,6 +127,7 @@ namespace JSC { } void deref(); + void markAggregate(MarkStack&); bool seenOnce() { diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 08f4bd4..5af3420 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -224,8 +224,6 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, ScopeChainNode* s #endif , m_stack(m_globalData->stack()) , m_usesExceptions(false) - , m_regeneratingForExceptionInfo(false) - , m_codeBlockBeingRegeneratedFrom(0) , m_expressionTooDeep(false) { if (m_shouldEmitDebugHooks) @@ -250,7 +248,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, ScopeChainNode* s SymbolTable::iterator end = symbolTable->end(); for (SymbolTable::iterator it = symbolTable->begin(); it != end; ++it) registerFor(it->second.getIndex()).setIndex(it->second.getIndex() + m_globalVarStorageOffset); - + BatchedTransitionOptimizer optimizer(*m_globalData, globalObject); const VarStack& varStack = programNode->varStack(); @@ -260,27 +258,49 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, ScopeChainNode* s // Shift new symbols so they get stored prior to existing symbols. m_nextGlobalIndex -= symbolTable->size(); - size_t oldSymbolTableSize = symbolTable->size(); - + HashSet newGlobals; + Vector, 16> functionInfo(functionStack.size()); for (size_t i = 0; i < functionStack.size(); ++i) { FunctionBodyNode* function = functionStack[i]; globalObject->removeDirect(function->ident()); // Make sure our new function is not shadowed by an old property. - emitNewFunction(addGlobalVar(function->ident(), false), function); + SymbolTableEntry entry = symbolTable->inlineGet(function->ident().impl()); + + if (entry.isNull()) + newGlobals.add(function->ident().impl()); + functionInfo[i] = make_pair(entry.getIndex(), entry.isReadOnly()); } - - Vector newVars; + + Vector shouldCreateVar(varStack.size()); for (size_t i = 0; i < varStack.size(); ++i) { - if (globalObject->symbolTableHasProperty(*varStack[i].first) || globalObject->hasProperty(exec, *varStack[i].first)) + if (newGlobals.contains(varStack[i].first->impl()) || globalObject->hasProperty(exec, *varStack[i].first)) { + shouldCreateVar[i] = false; continue; - newVars.append(addGlobalVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); + } + shouldCreateVar[i] = true; + newGlobals.add(varStack[i].first->impl()); } - globalObject->resizeRegisters(oldSymbolTableSize, symbolTable->size()); + int expectedSize = symbolTable->size() + newGlobals.size(); + globalObject->resizeRegisters(symbolTable->size(), expectedSize); + + for (size_t i = 0; i < functionStack.size(); ++i) { + FunctionBodyNode* function = functionStack[i]; + if (functionInfo[i].second) + continue; + RegisterID* dst = addGlobalVar(function->ident(), false); + JSValue value = new (exec) JSFunction(exec, makeFunction(exec, function), scopeChain); + globalObject->registerAt(dst->index() - m_globalVarStorageOffset).set(*m_globalData, globalObject, value); + } - preserveLastVar(); + for (size_t i = 0; i < varStack.size(); ++i) { + if (!shouldCreateVar[i]) + continue; + addGlobalVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant); + } + if (symbolTable->size() != expectedSize) + CRASH(); - for (size_t i = 0; i < newVars.size(); ++i) - emitLoad(newVars[i], jsUndefined()); + preserveLastVar(); } else { for (size_t i = 0; i < functionStack.size(); ++i) { FunctionBodyNode* function = functionStack[i]; @@ -325,8 +345,6 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, ScopeChainN #endif , m_stack(m_globalData->stack()) , m_usesExceptions(false) - , m_regeneratingForExceptionInfo(false) - , m_codeBlockBeingRegeneratedFrom(0) , m_expressionTooDeep(false) { if (m_shouldEmitDebugHooks) @@ -491,8 +509,6 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, ScopeChainNode* scopeCh #endif , m_stack(m_globalData->stack()) , m_usesExceptions(false) - , m_regeneratingForExceptionInfo(false) - , m_codeBlockBeingRegeneratedFrom(0) , m_expressionTooDeep(false) { if (m_shouldEmitDebugHooks || m_baseScopeDepth) @@ -909,7 +925,7 @@ PassRefPtr