From a94275402997c11dd2e778633dacf4b7e630a35d Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 22 Oct 2010 13:02:20 +0100 Subject: Merge WebKit at r70209: Initial merge by Git Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e --- JavaScriptCore/Android.mk | 2 + JavaScriptCore/Android.v8.wtf.mk | 2 + JavaScriptCore/CMakeLists.txt | 3 +- JavaScriptCore/ChangeLog | 1731 ++++++++++++++++++++ .../Configurations/FeatureDefines.xcconfig | 10 +- JavaScriptCore/Configurations/Version.xcconfig | 2 +- JavaScriptCore/GNUmakefile.am | 13 +- JavaScriptCore/JavaScriptCore.exp | 23 +- JavaScriptCore/JavaScriptCore.gypi | 9 +- JavaScriptCore/JavaScriptCore.pri | 6 + JavaScriptCore/JavaScriptCore.pro | 1 + .../JavaScriptCore/JavaScriptCore.def | 21 +- .../JavaScriptCore/JavaScriptCore.vcproj | 16 + .../JavaScriptCore/JavaScriptCoreCommon.vsprops | 2 +- .../JavaScriptCore/JavaScriptCoreGenerated.make | 28 + .../JavaScriptCore.vcproj/WTF/WTF.vcproj | 28 + .../JavaScriptCore.vcproj/jsc/jsc.vcproj | 4 + .../JavaScriptCore.xcodeproj/project.pbxproj | 67 +- JavaScriptCore/assembler/ARMv7Assembler.cpp | 5 +- JavaScriptCore/assembler/ARMv7Assembler.h | 324 +++- JavaScriptCore/assembler/LinkBuffer.h | 73 +- JavaScriptCore/assembler/MacroAssemblerARMv7.h | 27 +- JavaScriptCore/bytecode/CodeBlock.cpp | 64 +- JavaScriptCore/bytecode/CodeBlock.h | 17 +- JavaScriptCore/bytecode/EvalCodeCache.h | 8 +- JavaScriptCore/bytecode/Opcode.h | 6 +- JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 94 +- JavaScriptCore/bytecompiler/BytecodeGenerator.h | 13 +- JavaScriptCore/bytecompiler/NodesCodegen.cpp | 18 +- JavaScriptCore/debugger/Debugger.cpp | 2 +- JavaScriptCore/debugger/DebuggerCallFrame.cpp | 2 +- JavaScriptCore/interpreter/Interpreter.cpp | 229 ++- JavaScriptCore/jit/ExecutableAllocator.h | 13 + JavaScriptCore/jit/JIT.cpp | 20 +- JavaScriptCore/jit/JIT.h | 10 +- JavaScriptCore/jit/JITArithmetic.cpp | 600 +------ JavaScriptCore/jit/JITCall.cpp | 4 +- JavaScriptCore/jit/JITCall32_64.cpp | 11 +- JavaScriptCore/jit/JITInlineMethods.h | 6 +- JavaScriptCore/jit/JITOpcodes.cpp | 119 +- JavaScriptCore/jit/JITOpcodes32_64.cpp | 77 +- JavaScriptCore/jit/JITPropertyAccess.cpp | 14 +- JavaScriptCore/jit/JITStubs.cpp | 104 +- JavaScriptCore/jit/JITStubs.h | 5 +- JavaScriptCore/jit/JSInterfaceJIT.h | 32 +- JavaScriptCore/jit/SpecializedThunkJIT.h | 13 +- JavaScriptCore/jit/ThunkGenerators.cpp | 10 - JavaScriptCore/jsc/CMakeLists.txt | 25 - JavaScriptCore/jsc/CMakeListsEfl.txt | 8 - JavaScriptCore/parser/ASTBuilder.h | 7 +- JavaScriptCore/parser/JSParser.cpp | 459 +++++- JavaScriptCore/parser/JSParser.h | 8 +- JavaScriptCore/parser/Lexer.cpp | 18 +- JavaScriptCore/parser/Lexer.h | 5 +- JavaScriptCore/parser/Nodes.cpp | 12 +- JavaScriptCore/parser/Nodes.h | 11 +- JavaScriptCore/parser/Parser.cpp | 16 +- JavaScriptCore/parser/Parser.h | 15 +- JavaScriptCore/parser/SyntaxChecker.h | 103 +- JavaScriptCore/profiler/Profiler.cpp | 4 +- JavaScriptCore/runtime/Arguments.cpp | 66 +- JavaScriptCore/runtime/Arguments.h | 12 + JavaScriptCore/runtime/ArrayPrototype.cpp | 7 + JavaScriptCore/runtime/Collector.cpp | 18 - JavaScriptCore/runtime/Collector.h | 2 +- JavaScriptCore/runtime/CommonIdentifiers.cpp | 1 + JavaScriptCore/runtime/CommonIdentifiers.h | 1 + JavaScriptCore/runtime/DateConversion.cpp | 4 +- JavaScriptCore/runtime/Error.cpp | 43 + JavaScriptCore/runtime/Error.h | 2 + JavaScriptCore/runtime/ExceptionHelpers.cpp | 17 +- JavaScriptCore/runtime/ExceptionHelpers.h | 1 + JavaScriptCore/runtime/Executable.cpp | 48 +- JavaScriptCore/runtime/Executable.h | 33 +- JavaScriptCore/runtime/FunctionConstructor.cpp | 10 +- JavaScriptCore/runtime/FunctionPrototype.cpp | 2 +- JavaScriptCore/runtime/JSActivation.cpp | 5 + JavaScriptCore/runtime/JSActivation.h | 1 + JavaScriptCore/runtime/JSCell.h | 14 +- JavaScriptCore/runtime/JSFunction.cpp | 86 +- JavaScriptCore/runtime/JSGlobalData.cpp | 5 +- JavaScriptCore/runtime/JSGlobalData.h | 5 +- JavaScriptCore/runtime/JSGlobalObject.cpp | 1 + JavaScriptCore/runtime/JSGlobalObject.h | 10 +- JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp | 8 +- JavaScriptCore/runtime/JSImmediate.h | 65 +- JavaScriptCore/runtime/JSNumberCell.cpp | 70 - JavaScriptCore/runtime/JSNumberCell.h | 165 +- JavaScriptCore/runtime/JSONObject.cpp | 32 +- JavaScriptCore/runtime/JSObject.cpp | 23 +- JavaScriptCore/runtime/JSObject.h | 60 +- JavaScriptCore/runtime/JSStaticScopeObject.cpp | 5 + JavaScriptCore/runtime/JSStaticScopeObject.h | 1 + JavaScriptCore/runtime/JSStringBuilder.h | 12 +- JavaScriptCore/runtime/JSValue.h | 3 +- JavaScriptCore/runtime/JSZombie.h | 1 + JavaScriptCore/runtime/LiteralParser.cpp | 6 +- JavaScriptCore/runtime/NumberObject.h | 4 - JavaScriptCore/runtime/NumberPrototype.cpp | 12 +- JavaScriptCore/runtime/Operations.h | 6 +- JavaScriptCore/runtime/PutPropertySlot.h | 5 +- JavaScriptCore/runtime/RegExpConstructor.cpp | 4 +- JavaScriptCore/runtime/RegExpObject.cpp | 4 +- JavaScriptCore/runtime/RegExpPrototype.cpp | 3 +- JavaScriptCore/runtime/StrictEvalActivation.cpp | 51 + JavaScriptCore/runtime/StrictEvalActivation.h | 43 + JavaScriptCore/runtime/StringBuilder.h | 87 - JavaScriptCore/runtime/StringConcatenate.h | 428 ----- JavaScriptCore/runtime/StringPrototype.cpp | 49 +- JavaScriptCore/runtime/UStringBuilder.h | 43 + JavaScriptCore/runtime/UStringConcatenate.h | 125 ++ JavaScriptCore/shell/CMakeLists.txt | 25 + JavaScriptCore/shell/CMakeListsEfl.txt | 8 + JavaScriptCore/wscript | 8 +- JavaScriptCore/wtf/CMakeLists.txt | 2 + JavaScriptCore/wtf/CMakeListsEfl.txt | 15 +- JavaScriptCore/wtf/CurrentTime.h | 1 + JavaScriptCore/wtf/DateMath.cpp | 159 +- JavaScriptCore/wtf/DateMath.h | 4 +- JavaScriptCore/wtf/DecimalNumber.cpp | 199 +++ JavaScriptCore/wtf/DecimalNumber.h | 104 +- JavaScriptCore/wtf/FastAllocBase.h | 67 +- JavaScriptCore/wtf/FastMalloc.cpp | 16 +- JavaScriptCore/wtf/MD5.cpp | 2 +- JavaScriptCore/wtf/Noncopyable.h | 2 +- JavaScriptCore/wtf/NullPtr.h | 48 + JavaScriptCore/wtf/OwnArrayPtr.h | 2 + JavaScriptCore/wtf/OwnPtr.h | 2 + JavaScriptCore/wtf/PassOwnArrayPtr.h | 2 + JavaScriptCore/wtf/PassOwnPtr.h | 2 + JavaScriptCore/wtf/PassRefPtr.h | 2 + JavaScriptCore/wtf/Platform.h | 18 +- JavaScriptCore/wtf/RandomNumber.cpp | 10 +- JavaScriptCore/wtf/RandomNumberSeed.h | 2 + JavaScriptCore/wtf/RefPtr.h | 2 +- JavaScriptCore/wtf/RetainPtr.h | 2 + JavaScriptCore/wtf/StringHashFunctions.h | 170 -- JavaScriptCore/wtf/StringHasher.h | 170 ++ JavaScriptCore/wtf/TCSpinLock.h | 11 +- JavaScriptCore/wtf/TypeTraits.cpp | 3 + JavaScriptCore/wtf/TypeTraits.h | 9 + JavaScriptCore/wtf/WTFThreadData.h | 6 - JavaScriptCore/wtf/brew/RefPtrBrew.h | 53 + JavaScriptCore/wtf/brew/ShellBrew.h | 14 + JavaScriptCore/wtf/dtoa.cpp | 4 +- JavaScriptCore/wtf/dtoa.h | 3 +- JavaScriptCore/wtf/text/CString.cpp | 4 +- JavaScriptCore/wtf/text/CString.h | 10 +- JavaScriptCore/wtf/text/StringBuffer.h | 17 +- JavaScriptCore/wtf/text/StringBuilder.cpp | 172 ++ JavaScriptCore/wtf/text/StringBuilder.h | 139 ++ JavaScriptCore/wtf/text/StringConcatenate.h | 467 ++++++ JavaScriptCore/wtf/text/StringHash.h | 95 +- JavaScriptCore/wtf/text/StringImpl.cpp | 2 +- JavaScriptCore/wtf/text/StringImpl.h | 6 +- JavaScriptCore/wtf/text/WTFString.cpp | 12 +- JavaScriptCore/wtf/unicode/Unicode.h | 2 + JavaScriptCore/wtf/unicode/brew/UnicodeBrew.cpp | 181 ++ JavaScriptCore/wtf/unicode/brew/UnicodeBrew.h | 194 +++ JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h | 32 +- JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp | 38 +- JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h | 286 ++-- JavaScriptCore/wtf/url/src/URLCharacterTypes.cpp | 173 ++ JavaScriptCore/wtf/url/src/URLCharacterTypes.h | 61 + JavaScriptCore/wtf/url/src/URLEscape.cpp | 39 + JavaScriptCore/wtf/url/src/URLEscape.h | 49 + JavaScriptCore/wtf/url/src/URLQueryCanonicalizer.h | 107 ++ JavaScriptCore/wtf/wtf.pri | 2 + JavaScriptCore/yarr/RegexInterpreter.cpp | 50 +- 169 files changed, 6753 insertions(+), 2820 deletions(-) delete mode 100644 JavaScriptCore/jsc/CMakeLists.txt delete mode 100644 JavaScriptCore/jsc/CMakeListsEfl.txt create mode 100644 JavaScriptCore/runtime/StrictEvalActivation.cpp create mode 100644 JavaScriptCore/runtime/StrictEvalActivation.h delete mode 100644 JavaScriptCore/runtime/StringBuilder.h delete mode 100644 JavaScriptCore/runtime/StringConcatenate.h create mode 100644 JavaScriptCore/runtime/UStringBuilder.h create mode 100644 JavaScriptCore/runtime/UStringConcatenate.h create mode 100644 JavaScriptCore/shell/CMakeLists.txt create mode 100644 JavaScriptCore/shell/CMakeListsEfl.txt create mode 100644 JavaScriptCore/wtf/DecimalNumber.cpp create mode 100644 JavaScriptCore/wtf/NullPtr.h delete mode 100644 JavaScriptCore/wtf/StringHashFunctions.h create mode 100644 JavaScriptCore/wtf/StringHasher.h create mode 100644 JavaScriptCore/wtf/brew/RefPtrBrew.h create mode 100644 JavaScriptCore/wtf/text/StringBuilder.cpp create mode 100644 JavaScriptCore/wtf/text/StringBuilder.h create mode 100644 JavaScriptCore/wtf/text/StringConcatenate.h create mode 100644 JavaScriptCore/wtf/unicode/brew/UnicodeBrew.cpp create mode 100644 JavaScriptCore/wtf/unicode/brew/UnicodeBrew.h create mode 100644 JavaScriptCore/wtf/url/src/URLCharacterTypes.cpp create mode 100644 JavaScriptCore/wtf/url/src/URLCharacterTypes.h create mode 100644 JavaScriptCore/wtf/url/src/URLEscape.cpp create mode 100644 JavaScriptCore/wtf/url/src/URLEscape.h create mode 100644 JavaScriptCore/wtf/url/src/URLQueryCanonicalizer.h (limited to 'JavaScriptCore') diff --git a/JavaScriptCore/Android.mk b/JavaScriptCore/Android.mk index 959fbc4..c690477 100644 --- a/JavaScriptCore/Android.mk +++ b/JavaScriptCore/Android.mk @@ -166,6 +166,7 @@ LOCAL_SRC_FILES := \ wtf/ByteArray.cpp \ wtf/CurrentTime.cpp \ wtf/DateMath.cpp \ + wtf/DecimalNumber.cpp \ wtf/FastMalloc.cpp \ wtf/HashTable.cpp \ wtf/MD5.cpp \ @@ -185,6 +186,7 @@ LOCAL_SRC_FILES := \ \ wtf/text/AtomicString.cpp \ wtf/text/CString.cpp \ + wtf/text/StringBuilder.cpp \ wtf/text/StringImpl.cpp \ wtf/text/StringStatics.cpp \ wtf/text/WTFString.cpp \ diff --git a/JavaScriptCore/Android.v8.wtf.mk b/JavaScriptCore/Android.v8.wtf.mk index 16554b1..a9c8a3b 100644 --- a/JavaScriptCore/Android.v8.wtf.mk +++ b/JavaScriptCore/Android.v8.wtf.mk @@ -36,6 +36,7 @@ LOCAL_SRC_FILES := \ wtf/ByteArray.cpp \ wtf/CurrentTime.cpp \ wtf/DateMath.cpp \ + wtf/DecimalNumber.cpp \ wtf/FastMalloc.cpp \ wtf/HashTable.cpp \ wtf/MD5.cpp \ @@ -55,6 +56,7 @@ LOCAL_SRC_FILES := \ \ wtf/text/AtomicString.cpp \ wtf/text/CString.cpp \ + wtf/text/StringBuidler.cpp \ wtf/text/StringImpl.cpp \ wtf/text/StringStatics.cpp \ wtf/text/WTFString.cpp \ diff --git a/JavaScriptCore/CMakeLists.txt b/JavaScriptCore/CMakeLists.txt index 89c9ef1..90067a4 100644 --- a/JavaScriptCore/CMakeLists.txt +++ b/JavaScriptCore/CMakeLists.txt @@ -157,6 +157,7 @@ SET(JavaScriptCore_SOURCES runtime/RopeImpl.cpp runtime/ScopeChain.cpp runtime/SmallStrings.cpp + runtime/StrictEvalActivation.cpp runtime/StringConstructor.cpp runtime/StringObject.cpp runtime/StringPrototype.cpp @@ -254,7 +255,7 @@ SOURCE_GROUP(yarr "yarr/") SOURCE_GROUP(wtf "wtf/") ADD_SUBDIRECTORY(wtf) -ADD_SUBDIRECTORY(jsc) +ADD_SUBDIRECTORY(shell) WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES}) INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES}) diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index bbdf703..95bf475 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,1734 @@ +2010-10-20 Simon Fraser + + Fix the EFL build. + + * wtf/CMakeLists.txt: + +2010-10-20 Simon Fraser + + Fix Windows build: export needed symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-19 Simon Fraser + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=47851 + + Add methods to DecimalNumber to return the buffer length + required for decimal and exponential output. + + Make some of the DecimalNumber code non-inline (no + effect on Sunspider), adding DecimalNumber.cpp to various + build systems. + + Make some DecimalNumber methods 'const'. + + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToExponential): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * wtf/DecimalNumber.cpp: Added. + (WTF::DecimalNumber::bufferLengthForStringDecimal): + (WTF::DecimalNumber::bufferLengthForStringExponential): + (WTF::DecimalNumber::toStringDecimal): + (WTF::DecimalNumber::toStringExponential): + * wtf/DecimalNumber.h: + (WTF::DecimalNumber::sign): + (WTF::DecimalNumber::exponent): + (WTF::DecimalNumber::significand): + (WTF::DecimalNumber::precision): + * wtf/dtoa.cpp: + (WTF::dtoa): + * wtf/dtoa.h: + * wtf/wtf.pri: + +2010-10-20 Sheriff Bot + + Unreviewed, rolling out r70165. + http://trac.webkit.org/changeset/70165 + https://bugs.webkit.org/show_bug.cgi?id=48007 + + It broke tests on Qt bot (Requested by Ossy on #webkit). + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Removed. + +2010-10-20 Brian Weinstein + + Reviewed by Adam Roben. + + Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build + step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2010-10-20 Dumitru Daniliuc + + Unreviewed, fixing the Win build. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + +2010-10-20 Geoffrey Garen + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=41948 + REGRESSION(r60392): Registerfile can be unwound too far following an exception + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): Walk the stack to calculate the high + water mark currently in use. It's not safe to assume that the current + CallFrame's high water mark is the highest high water mark because + calls do not always set up at the end of a CallFrame. A large caller + CallFrame can encompass a small callee CallFrame. + +2010-10-20 Peter Rybin + + Reviewed by Adam Barth. + + HTML parser should provide script column position within HTML document to JavaScript engine + https://bugs.webkit.org/show_bug.cgi?id=45271 + + Adds TextPosition* classes -- a structure that stores line/column/generation + level coordinates inside text document. Adds *BasedNumber classes -- typesafe int + wrappers that emphasize whether int number is used as zero-based or + one-based. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/text/TextPosition.h: Added. + (WTF::TextPosition::TextPosition): + (WTF::TextPosition::minimumPosition): + (WTF::TextPosition::belowRangePosition): + (WTF::ZeroBasedNumber::fromZeroBasedInt): + (WTF::ZeroBasedNumber::ZeroBasedNumber): + (WTF::ZeroBasedNumber::zeroBasedInt): + (WTF::ZeroBasedNumber::base): + (WTF::ZeroBasedNumber::belowBase): + (WTF::OneBasedNumber::fromOneBasedInt): + (WTF::OneBasedNumber::OneBasedNumber): + (WTF::OneBasedNumber::oneBasedInt): + (WTF::OneBasedNumber::convertAsZeroBasedInt): + (WTF::OneBasedNumber::convertToZeroBased): + (WTF::OneBasedNumber::base): + (WTF::OneBasedNumber::belowBase): + (WTF::toZeroBasedTextPosition): + (WTF::toOneBasedTextPosition): + (WTF::ZeroBasedNumber::convertToOneBased): + +2010-10-19 Kwang Yul Seo + + Reviewed by David Kilzer. + + [BREWMP] Turn off JIT for simulator build + https://bugs.webkit.org/show_bug.cgi?id=47937 + + We don't need to test x86 JIT. + + * wtf/Platform.h: + +2010-10-19 Oliver Hunt + + Reviewed by Geoffrey Garen. + + Remove support for JSVALUE32 from JSC + https://bugs.webkit.org/show_bug.cgi?id=47948 + + Remove all the code for supporting JSVALUE32 from JSC. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emitSlow_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emit_op_urshift): + (JSC::JIT::emitSlow_op_urshift): + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jless): + (JSC::JIT::emitSlow_op_jless): + (JSC::JIT::emit_op_jlesseq): + (JSC::JIT::emitSlow_op_jlesseq): + (JSC::JIT::emit_op_bitand): + (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): + (JSC::JIT::emitSlow_op_mod): + * jit/JITCall.cpp: + * jit/JITInlineMethods.h: + (JSC::JIT::emitGetFromCallFrameHeaderPtr): + (JSC::JIT::emitGetFromCallFrameHeader32): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_next_pname): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + * jit/JITStubs.h: + * jit/JSInterfaceJIT.h: + * jit/SpecializedThunkJIT.h: + (JSC::SpecializedThunkJIT::returnDouble): + (JSC::SpecializedThunkJIT::tagReturnAsInt32): + * jit/ThunkGenerators.cpp: + (JSC::sqrtThunkGenerator): + (JSC::powThunkGenerator): + * runtime/Collector.cpp: + (JSC::isPossibleCell): + (JSC::typeName): + * runtime/JSCell.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.h: + (JSC::Structure::prototypeForLookup): + * runtime/JSImmediate.h: + (JSC::reinterpretIntptrToDouble): + (JSC::JSImmediate::isIntegerNumber): + (JSC::JSImmediate::isDouble): + (JSC::JSImmediate::areBothImmediateIntegerNumbers): + (JSC::JSImmediate::makeDouble): + (JSC::JSImmediate::doubleValue): + (JSC::JSImmediate::toBoolean): + (JSC::JSImmediate::fromNumberOutsideIntegerRange): + (JSC::JSImmediate::from): + (JSC::JSImmediate::toDouble): + (JSC::JSFastMath::rightShiftImmediateNumbers): + * runtime/JSNumberCell.cpp: + * runtime/JSNumberCell.h: + * runtime/JSObject.h: + (JSC::JSObject::JSObject): + * runtime/JSValue.h: + * runtime/NumberObject.h: + * wtf/Platform.h: + +2010-10-19 Csaba Osztrogonác + + Reviewed by Geoffrey Garen. + + BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors + https://bugs.webkit.org/show_bug.cgi?id=47920 + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization. + +2010-10-19 Kwang Yul Seo + + Reviewed by David Kilzer. + + RVCT fails to compile DateMath.cpp due to overloaded function pow + https://bugs.webkit.org/show_bug.cgi?id=47844 + + Choose std::pow(double, double) among multiple overloaded pow functions + to fix build for RVCT. + + * wtf/DateMath.cpp: + (WTF::parseES5DateFromNullTerminatedCharacters): + +2010-10-19 Patrick Gansterer + + Reviewed by David Kilzer. + + Use UChar instead of wchar_t in UnicodeWinCE + https://bugs.webkit.org/show_bug.cgi?id=47904 + + Make UnicodeWinCE more portable, so we can use it for other ports too. + + * wtf/unicode/wince/UnicodeWinCE.cpp: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isSpace): + (WTF::Unicode::isLetter): + (WTF::Unicode::isUpper): + (WTF::Unicode::isLower): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::isAlphanumeric): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::digitValue): + * wtf/unicode/wince/UnicodeWinCE.h: + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isHighSurrogate): + (WTF::Unicode::isLowSurrogate): + (WTF::Unicode::umemcasecmp): + (WTF::Unicode::surrogateToUcs4): + +2010-10-19 Patrick Gansterer + + Reviewed by Andreas Kling. + + Fix style of UnicodeWinCE + https://bugs.webkit.org/show_bug.cgi?id=47818 + + * wtf/unicode/wince/UnicodeWinCE.cpp: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + * wtf/unicode/wince/UnicodeWinCE.h: + +2010-10-18 Xan Lopez + + Reviewed by Martin Robinson. + + * GNUmakefile.am: add missing file. + +2010-10-18 Oliver Hunt + + Reviewed by Sam Weinig. + + Strict mode: Functions created with the function constructor don't implement strict mode semantics + https://bugs.webkit.org/show_bug.cgi?id=47860 + + When creating the FunctionExecutable for a new function the function constructor + was always passing false for whether or not a function was strict, rather than + using the information from the freshly parsed function itself. + + * runtime/Executable.cpp: + (JSC::FunctionExecutable::fromGlobalCode): + +2010-10-18 Oliver Hunt + + Reviewed by Darin Adler. + + Strict mode: |this| should be undefined if it is not explicitly provided + https://bugs.webkit.org/show_bug.cgi?id=47833 + + To make strict mode behave correctly we want to pass undefined instead of null + as the default this value. This has no impact on behaviour outside of strict + mode as both values are replaced with the global object if necessary. + + * bytecompiler/NodesCodegen.cpp: + (JSC::FunctionCallValueNode::emitBytecode): + (JSC::FunctionCallResolveNode::emitBytecode): + (JSC::CallFunctionCallDotNode::emitBytecode): + (JSC::ApplyFunctionCallDotNode::emitBytecode): + + +2010-10-18 Darin Adler + + Reviewed by Anders Carlsson. + + Make a nullptr that works with OwnPtr and RefPtr + https://bugs.webkit.org/show_bug.cgi?id=47756 + + * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h. + + * wtf/NullPtr.h: Added. + + * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr. + * wtf/OwnPtr.h: Ditto. + * wtf/PassOwnArrayPtr.h: Ditto. + * wtf/PassOwnPtr.h: Ditto. + * wtf/PassRefPtr.h: Ditto. + * wtf/RefPtr.h: Ditto. + * wtf/RetainPtr.h: Ditto. + +2010-10-18 Oliver Hunt + + Reviewed by Sam Weinig. + + Strict mode: JIT doesn't check for |this| being an immediate before dereferencing + https://bugs.webkit.org/show_bug.cgi?id=47826 + + There's no guarantee that |this| will be a cell in a strict mode function, so + don't claim that it is. + + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isKnownNotImmediate): + +2010-10-18 Zoltan Herczeg + + Reviewed by Oliver Hunt. + + if (0) throw "x" ; else { } throws parse error after r69906 + https://bugs.webkit.org/show_bug.cgi?id=47807 + + r69906 introduced a bug: the semicolon is not parsed after a throw + expression anymore. Thus, the semicolon terminates the "if" parsing + in the example above, and the else token results a parse error. + + * parser/JSParser.cpp: + (JSC::JSParser::parseThrowStatement): + +2010-10-18 Peter Varga + + Reviewed by Andreas Kling. + + Remove some unnecessary lines of code from Parser.cpp + https://bugs.webkit.org/show_bug.cgi?id=47816 + + * parser/Parser.cpp: + +2010-10-18 Xan Lopez + + Reviewed by Csaba Osztrogonác. + + Build broken with JIT disabled + https://bugs.webkit.org/show_bug.cgi?id=47801 + + This is a regression caused by r69940. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): + +2010-10-18 Zoltan Horvath + + Reviewed by Darin Adler. + + Change FastAllocBase implementation into a macro + https://bugs.webkit.org/show_bug.cgi?id=42998 + + It was investigated in bug #33896 that inheriting classes from FastAllocBase + can result in objects getting larger which leads to memory regressions. + Using a macro instead of inheriting classes from FastAllocBase would solve the issue. + + * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro + +2010-10-17 Oliver Hunt + + Reviewed by Sam Weinig. + + Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions + https://bugs.webkit.org/show_bug.cgi?id=47791 + + Simple fix, check for arguments in addition to eval. + + * parser/JSParser.cpp: + (JSC::JSParser::parseUnaryExpression): + +2010-10-17 Oliver Hunt + + Reviewed by Sam Weinig. + + Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure + https://bugs.webkit.org/show_bug.cgi?id=47788 + + Fixing this required a couple of changes: + * resolve_base now has a flag to indicate whether it is being used for a put in strict mode. + this allows us to throw an exception when we're doing a completely generic resolve for + assignment, and that assignment would create a new global. + * There is a new opcode 'op_ensure_property_exists' that is used to determine whether + the property being assigned to already exists on the global object. This currently + has no caching, but such caching could be added relatively trivially. It is only used + in the case where we know that a property will be placed on the global object, and + we cannot verify that the property already exists. + + In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather + than making op_resolve_base have an additional runtime branch. + + There's also a new helper function to create the exception for the invalid assignment. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveBaseForPut): + * bytecompiler/BytecodeGenerator.h: + * bytecompiler/NodesCodegen.cpp: + (JSC::AssignResolveNode::emitBytecode): + (JSC::ForInNode::emitBytecode): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_resolve_base): + (JSC::JIT::emit_op_ensure_property_exists): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * parser/JSParser.cpp: + (JSC::JSParser::parseProgram): + * runtime/ExceptionHelpers.cpp: + (JSC::createErrorForInvalidGlobalAssignment): + * runtime/ExceptionHelpers.h: + * runtime/Operations.h: + (JSC::resolveBase): + +2010-10-17 Simon Fraser + + First part of fix for Windows build failure. Will wait for the + next set of link errors to determine the mangled forms for dtoaRoundSF + and dtoaRoundDP. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-17 Simon Fraser + + Reviewed by Nikolas Zimmermann. + + Very large and small numbers fail to round-trip through CSS + https://bugs.webkit.org/show_bug.cgi?id=20674 + + New exports required to use DecimalNumber in WebCore. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-10-16 Kyusun Kim + + Reviewed by Alexey Proskuryakov. + + Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters() + https://bugs.webkit.org/show_bug.cgi?id=47758 + + * wtf/CurrentTime.h: + * wtf/DateMath.h: + +2010-10-16 Patrick Gansterer + + Reviewed by Adam Barth. + + Rename StringHasherFunctions.h to StringHasher.h + https://bugs.webkit.org/show_bug.cgi?id=47200 + + Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/StringHashFunctions.h: Removed. + * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h. + * wtf/text/StringHash.h: + * wtf/text/StringImpl.h: + +2010-10-15 Oliver Hunt + + Reviewed by Sam Weinig. + + Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline + https://bugs.webkit.org/show_bug.cgi?id=47762 + + The old YACC parser depended on the lexer for some classes of semicolon insertion. + The new parser handles ASI entirely on its own so when the lexer inserts a semicolon + on its own the net result is a spurious semicolon in the input stream. This can result + in incorrect parsing in some cases: + + if (0) + break + ;else {} + + Would result in a parse failure as the output from the lexer is essentially + + if (0) + break + ;;else + + So the second semicolon is interpreted as a empty statement, which terminates the if, + making the else an error. + + + * parser/JSParser.cpp: + (JSC::JSParser::parseThrowStatement): + Parsing of throw statement was wrong, and only worked due to the weird behaviour + in the lexer + * parser/Lexer.cpp: + (JSC::Lexer::lex): + Remove bogus semicolon insertion from the newline handling + +2010-10-15 Nikolas Zimmermann + + Reviewed by Dirk Schulze. + + Replace some String::format() usages by StringConcatenate in WebKit + https://bugs.webkit.org/show_bug.cgi?id=47714 + + * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString(). + +2010-10-15 Ilya Tikhonovsky + + Unreviewed build fix for Debug Leopard which is failng to compile after r69842. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): + +2010-10-15 Peter Varga + + Reviewed by Gavin Barraclough. + + The parenthetical assertion checking isn't working in some cases with YARR + Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46893 + + Calculate the countToCheck value of a TypeParentheticalAssertion by + subtracting the number of characters which follows + a TypeParentheticalAssertion term with the number of characters which should + be matched by terms which are contained + in the TypeParentheticalAssertion term (minimumSize). + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::ByteCompiler::emitDisjunction): + +2010-10-14 Nathan Vander Wilt + + Reviewed by Darin Adler. + + Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632 + + * runtime/DateConversion.cpp: + (JSC::parseDate): + * wtf/DateMath.cpp: + (WTF::ymdhmsToSeconds): + (WTF::parseES5DateFromNullTerminatedCharacters): + * wtf/DateMath.h: + +2010-10-14 Nikolas Zimmermann + + Reviewed by Gavin Barraclough. + + Replace lots of String::format() usages by StringConcatenate + https://bugs.webkit.org/show_bug.cgi?id=47664 + + Add StringTypeAdapter to accept single characters for makeString(). + + * wtf/text/StringConcatenate.h: + (WTF::makeString): + +2010-10-14 David Goodwin + + Reviewed by Darin Adler. + + need way to measure size of JITed ARM code + https://bugs.webkit.org/show_bug.cgi?id=47121 + + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::linkCode): + (JSC::LinkBuffer::dumpLinkStats): + (JSC::LinkBuffer::dumpCode): + +2010-10-14 Peter Varga + + Reviewed by Gavin Barraclough. + + The backreference checking isn't working in some cases with YARR Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46904 + + The Interpreter::matchBackReference() function returns true without matching + when a backreference points to the same parentheses where it is. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::matchBackReference): + +2010-10-14 No'am Rosenthal + + Reviewed by Andreas Kling. + + [Qt] Text breaking is slow: enable ICU as an opt-in + https://bugs.webkit.org/show_bug.cgi?id=40332 + + Added a config flag that enables ICU as an opt-in instead of the Qt specific code. + Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h + + * JavaScriptCore.pri: + * wtf/unicode/qt4/UnicodeQt4.h: + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isPunct): + (WTF::Unicode::isLower): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::combiningClass): + (WTF::Unicode::direction): + (WTF::Unicode::category): + +2010-10-14 Anton Faern + + Reviewed by Csaba Osztrogonác. + + https://bugs.webkit.org/show_bug.cgi?id=47658 + NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO + change. This means that OS(NETBSD) is also undefined. + + * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD + +2010-10-13 David Goodwin + + Reviewed by Oliver Hunt. + + ARMv7 JIT should generated conditional branches when possible + https://bugs.webkit.org/show_bug.cgi?id=47384 + + Use different jump padding sizes for conditional and unconditional + jumps (12 bytes and 10 bytes respectively). This allows the JIT to + include the IT instruction as part of the conditional jump sequence + which in turn allows it to optimize away the IT using an ARMv7 + conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for + conditional branches when displacement is in range. Also use IT/B(T4) + for conditional branch when displacement does not fit in B(T3). + + For unconditional jump, instruction selection options are: + B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection + options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX. + + * assembler/ARMv7Assembler.cpp: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::JmpSrc::JmpSrc): + (JSC::ARMv7Assembler::ifThenElse): + (JSC::ARMv7Assembler::jumpSizeDelta): + (JSC::ARMv7Assembler::canCompact): + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::canBeJumpT1): + (JSC::ARMv7Assembler::canBeJumpT3): + (JSC::ARMv7Assembler::canBeJumpT4): + (JSC::ARMv7Assembler::linkJumpT1): + (JSC::ARMv7Assembler::linkJumpT3): + (JSC::ARMv7Assembler::linkJumpT4): + (JSC::ARMv7Assembler::linkConditionalJumpT4): + (JSC::ARMv7Assembler::linkBX): + (JSC::ARMv7Assembler::linkConditionalBX): + (JSC::ARMv7Assembler::linkJumpAbsolute): + * assembler/LinkBuffer.h: + (JSC::LinkBuffer::linkCode): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::canCompact): + (JSC::MacroAssemblerARMv7::computeJumpType): + (JSC::MacroAssemblerARMv7::jumpSizeDelta): + (JSC::MacroAssemblerARMv7::jump): + (JSC::MacroAssemblerARMv7::nearCall): + (JSC::MacroAssemblerARMv7::call): + (JSC::MacroAssemblerARMv7::ret): + (JSC::MacroAssemblerARMv7::tailRecursiveCall): + (JSC::MacroAssemblerARMv7::makeJump): + (JSC::MacroAssemblerARMv7::makeBranch): + +2010-10-13 Fridrich Strba + + Reviewed by Darin Adler. + + Don't depend on Windows on sched_yield and sched.h + https://bugs.webkit.org/show_bug.cgi?id=45543 + + sched.h is part of pthreads and sched_yield is implemented + in pthreads-win32 as Sleep(0). This patch avoids a gratuitous + dependency on pthreads-win32 in this file. + + * wtf/TCSpinLock.h: + (TCMalloc_SlowLock): + +2010-10-13 Kwang Yul Seo + + Reviewed by Kent Tamura. + + [BREWMP] Port unicode + https://bugs.webkit.org/show_bug.cgi?id=45716 + + Brew MP port uses only the subset of ICU library to reduce the binary size. + Follow the WinCE's implementation. + + * wtf/Platform.h: + * wtf/unicode/Unicode.h: + * wtf/unicode/brew/UnicodeBrew.cpp: Added. + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isUpper): + (WTF::Unicode::isLower): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::isAlphanumeric): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::direction): + (WTF::Unicode::category): + (WTF::Unicode::decompositionType): + (WTF::Unicode::combiningClass): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::digitValue): + (WTF::Unicode::isSpace): + (WTF::Unicode::isLetter): + * wtf/unicode/brew/UnicodeBrew.h: Added. + (WTF::Unicode::isArabicChar): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::hasLineBreakingPropertyComplexContext): + (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic): + (WTF::Unicode::umemcasecmp): + +2010-10-13 Gavin Barraclough + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-13 Adam Barth + + Reviewed by Maciej Stachowiak. + + [WTFURL] Add URLQueryCanonicalizer + https://bugs.webkit.org/show_bug.cgi?id=45088 + + This class canonicalizes the query component of URLs. The main tricky + bit there is the convertCharset function, which I've moved to a + templated dependency. There'll likely be more about that in future + patches. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/src/URLEscape.cpp: Added. + * wtf/url/src/URLEscape.h: Added. + (WTF::appendEscapedCharacter): + * wtf/url/src/URLQueryCanonicalizer.h: Added. + (WTF::URLQueryCanonicalizer::canonicalize): + (WTF::URLQueryCanonicalizer::isAllASCII): + (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString): + (WTF::URLQueryCanonicalizer::convertToQueryEncoding): + +2010-10-13 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Bug 43987 - Downloading using XHR is much slower than before + Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector. + Fundamentally this should be the same (copies current contents to expand capacity, + rather than using a rope), but this approach allows the intermadiate state of the + String to be inspected in the buffer without copying to resolve. + + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendQuotedString): + (JSC::Stringifier::Holder::appendNextProperty): + Renamed StringBuilder::size() -> length() (to match other String types). + + * runtime/UStringBuilder.h: + (JSC::UStringBuilder::append): + (JSC::UStringBuilder::toUString): + Update for changes in parent class, can just 'using' the append methods. + + * wtf/text/StringBuilder.cpp: Added. + (WTF::StringBuilder::reifyString): + (WTF::StringBuilder::resize): + (WTF::StringBuilder::reserveCapacity): + (WTF::StringBuilder::allocateBuffer): + (WTF::StringBuilder::appendUninitialized): + (WTF::StringBuilder::append): + (WTF::StringBuilder::shrinkToFit): + * wtf/text/StringBuilder.h: + (WTF::StringBuilder::StringBuilder): + (WTF::StringBuilder::append): + (WTF::StringBuilder::toString): + (WTF::StringBuilder::toStringPreserveCapacity): + (WTF::StringBuilder::length): + (WTF::StringBuilder::isEmpty): + (WTF::StringBuilder::operator[]): + (WTF::StringBuilder::clear): + Class updated to use overcapacity in a StringImpl, rather than a Vector. + + * Android.mk: + * Android.v8.wtf.mk: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.vcproj/jsc/jsc.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/CMakeLists.txt: + * wtf/wtf.pri: + +2010-10-13 Adam Roben + + Export tryFastRealloc for WebKit2's benefit + + Rubber-stamped by Anders Carlsson. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added + tryFastRealloc. Removed RegExpObject::info, which is now exported via + JS_EXPORTDATA. + +2010-10-13 Adam Barth + + Reviewed by Maciej Stachowiak. + + [WTFURL] Add a mechanism for classifying types of characters + https://bugs.webkit.org/show_bug.cgi?id=45085 + + Various characters have different escaping rules depending on where + they are in URLs. This patch adds a table containing that information. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * wtf/url/src/URLCharacterTypes.cpp: Added. + * wtf/url/src/URLCharacterTypes.h: Added. + (WTF::URLCharacterTypes::isQueryChar): + (WTF::URLCharacterTypes::isIPv4Char): + (WTF::URLCharacterTypes::isHexChar): + (WTF::URLCharacterTypes::isCharOfType): + +2010-10-13 Xan Lopez + + Reviewed by Csaba Osztrogonác. + + Missing parameters for bytecode dump of next_pname + https://bugs.webkit.org/show_bug.cgi?id=47590 + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): add missing parameters to the dump. + +2010-10-13 Nikolas Zimmermann + + Reviewed by Dirk Schulze. + + Add wtf/text/StringConcatenate + https://bugs.webkit.org/show_bug.cgi?id=47584 + + Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too. + Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString. + Exactly the same design that has been followed while refactoring StringBuilder. + + The UString variants can all be removed as soon as WTF::String & JSC::UString converge. + + * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * bytecode/CodeBlock.cpp: s/makeString/makeUString/ + (JSC::escapeQuotes): + (JSC::valueToSourceString): + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpToSourceString): + (JSC::regexpName): + * bytecompiler/NodesCodegen.cpp: Ditto. + (JSC::substitute): + * profiler/Profiler.cpp: Ditto. + (JSC::Profiler::createCallIdentifier): + * runtime/ExceptionHelpers.cpp: Ditto. + (JSC::createUndefinedVariableError): + (JSC::createErrorMessage): + (JSC::createInvalidParamError): + * runtime/FunctionConstructor.cpp: Ditto. + (JSC::constructFunction): + * runtime/FunctionPrototype.cpp: Ditto. + (JSC::insertSemicolonIfNeeded): + * runtime/JSONObject.cpp: Ditto. + (JSC::Stringifier::indent): + * runtime/JSStringBuilder.h: + (JSC::jsMakeNontrivialString): + * runtime/RegExpConstructor.cpp: Ditto. + (JSC::constructRegExp): + * runtime/RegExpObject.cpp: Ditto. + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: Ditto. + (JSC::regExpProtoFuncCompile): + * runtime/StringConcatenate.h: Removed. + * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h + (JSC::makeUString): + * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h. + (WTF::makeString): + +2010-10-12 Gavin Barraclough + + Windows build fix. + + * wtf/text/StringBuilder.h: + (WTF::StringBuilder::length): + +2010-10-12 Nikolas Zimmermann + + Reviewed by Gavin Barraclough. + + Unify JSC::StringBuilder & WebCore::StringBuilder + https://bugs.webkit.org/show_bug.cgi?id=47538 + + Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String(). + Move the append(const JSC::UString&) method into runtime/UStringBuilder.h. + UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality. + + No new code, just move code around. + + * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + * runtime/Executable.cpp: + (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString(). + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): Ditto. + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncUnescape): Ditto. + * runtime/JSONObject.cpp: + (JSC::Stringifier::stringify): Ditto. + (JSC::Stringifier::appendQuotedString): Ditto. + (JSC::Stringifier::appendStringifiedValue): Ditto. + (JSC::Stringifier::startNewLine): Ditto. + (JSC::Stringifier::Holder::appendNextProperty): Ditto. + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::Lexer::lexString): Ditto. + * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include. + * runtime/StringBuilder.h: Removed. + * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods. + (JSC::UStringBuilder::append): append(const JSC::UString&) + (JSC::UStringBuilder::toUString): + * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h + (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere. + (WTF::StringBuilder::isEmpty): Ditto (+ constify method). + (WTF::StringBuilder::reserveCapacity): Ditto. + (WTF::StringBuilder::resize): Ditto. + (WTF::StringBuilder::size): Ditto. + (WTF::StringBuilder::operator[]): Ditto. + (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder. + +2010-10-12 Michael Saboff + + Reviewed by Oliver Hunt. + + Cleaned up the processing of replacements after regular expression + processing, especially the case where there wasn't a match. + Changed to use empty strings instead of computing a zero length sub + string. + https://bugs.webkit.org/show_bug.cgi?id=47506 + + * runtime/StringPrototype.cpp: + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::stringProtoFuncReplace): + +2010-10-11 Patrick Gansterer + + Unreviewed. + + Clang build fix after r69472. + https://bugs.webkit.org/show_bug.cgi?id=46523 + + * wtf/text/StringHash.h: + +2010-10-11 Oliver Hunt + + Undo last minute change to 32bit build. + + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_convert_this_strict): + +2010-10-11 Brian Weinstein + + Build fix for Windows. Add a necessary export from r69516. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-10-11 Oliver Hunt + + Fix interpreter build -- was broken by incorrect merge. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-10-01 Oliver Hunt + + Reviewed by Gavin Barraclough. + + [ES5] Implement strict mode + https://bugs.webkit.org/show_bug.cgi?id=10701 + + Initial strict mode implementation. This is the simplest + implementation that could possibly work and adds (hopefully) + all of the restrictions required by strict mode. There are + a number of inefficiencies, especially in the handling of + arguments and eval as smart implementations would make this + patch more complicated. + + The SyntaxChecker AST builder has become somewhat more complex + as strict mode does require more parse tree information to + validate the syntax. + + Summary of major changes to the parser: + * We track when we enter strict mode (this may come as a surprise) + * Strict mode actually requires a degree of AST knowledge to validate + so the SyntaxChecker now produces values that can be used to distinguish + "node" types. + * We now track variables that are written to. We do this to + statically identify writes to global properties that don't exist + and abort at that point. This should actually make it possible + to optimise some other cases in the future but for now it's + purely for validity checking. Currently writes are only tracked + in strict mode code. + * Labels are now tracked as it is now a syntax error to jump to a label + that does not exist (or to use break, continue, or return in a context + where they would be invalid). + + Runtime changes: + * In order to get correct hanlding of the Arguments object all + strict mode functions that reference arguments create and tearoff + the arguments object on entry. This is not strictly necessary + but was the least work necessary to get the correct behaviour. + * PutPropertySlot now tracks whether it is being used for a strict + mode write, and if so Object::put will throw when a write can't be + completed. + * StrictEvalActivation was added as an "activation" object for strict + mode eval (so that strict eval does not introduce new variables into + the containing scope). + + * CMakeLists.txt: + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.pro: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isStrictMode): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::createArgumentsIfNecessary): + (JSC::BytecodeGenerator::emitReturn): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::isStrictMode): + (JSC::BytecodeGenerator::makeFunction): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::execute): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_pnames): + (JSC::JIT::emit_op_convert_this_strict): + (JSC::JIT::emitSlow_op_convert_this_strict): + * jit/JITOpcodes32_64.cpp: + (JSC::JIT::emit_op_get_pnames): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + * parser/ASTBuilder.h: + (JSC::ASTBuilder::createFunctionBody): + (JSC::ASTBuilder::isResolve): + * parser/JSParser.cpp: + (JSC::JSParser::next): + (JSC::JSParser::startLoop): + (JSC::JSParser::endLoop): + (JSC::JSParser::startSwitch): + (JSC::JSParser::endSwitch): + (JSC::JSParser::setStrictMode): + (JSC::JSParser::strictMode): + (JSC::JSParser::isValidStrictMode): + (JSC::JSParser::declareParameter): + (JSC::JSParser::breakIsValid): + (JSC::JSParser::pushLabel): + (JSC::JSParser::popLabel): + (JSC::JSParser::hasLabel): + (JSC::JSParser::DepthManager::DepthManager): + (JSC::JSParser::DepthManager::~DepthManager): + (JSC::JSParser::Scope::Scope): + (JSC::JSParser::Scope::startSwitch): + (JSC::JSParser::Scope::endSwitch): + (JSC::JSParser::Scope::startLoop): + (JSC::JSParser::Scope::endLoop): + (JSC::JSParser::Scope::inLoop): + (JSC::JSParser::Scope::breakIsValid): + (JSC::JSParser::Scope::pushLabel): + (JSC::JSParser::Scope::popLabel): + (JSC::JSParser::Scope::hasLabel): + (JSC::JSParser::Scope::isFunction): + (JSC::JSParser::Scope::declareVariable): + (JSC::JSParser::Scope::declareWrite): + (JSC::JSParser::Scope::deleteProperty): + (JSC::JSParser::Scope::declareParameter): + (JSC::JSParser::Scope::setNeedsFullActivation): + (JSC::JSParser::Scope::collectFreeVariables): + (JSC::JSParser::Scope::getUncapturedWrittenVariables): + (JSC::JSParser::Scope::getDeletedVariables): + (JSC::JSParser::Scope::setStrictMode): + (JSC::JSParser::Scope::strictMode): + (JSC::JSParser::Scope::isValidStrictMode): + (JSC::JSParser::pushScope): + (JSC::JSParser::popScope): + (JSC::JSParser::declareVariable): + (JSC::JSParser::declareWrite): + (JSC::JSParser::deleteProperty): + (JSC::jsParse): + (JSC::JSParser::JSParser): + (JSC::JSParser::parseProgram): + (JSC::JSParser::parseSourceElements): + (JSC::JSParser::parseDoWhileStatement): + (JSC::JSParser::parseWhileStatement): + (JSC::JSParser::parseVarDeclarationList): + (JSC::JSParser::parseConstDeclarationList): + (JSC::JSParser::parseForStatement): + (JSC::JSParser::parseBreakStatement): + (JSC::JSParser::parseContinueStatement): + (JSC::JSParser::parseReturnStatement): + (JSC::JSParser::parseWithStatement): + (JSC::JSParser::parseSwitchStatement): + (JSC::JSParser::parseSwitchClauses): + (JSC::JSParser::parseSwitchDefaultClause): + (JSC::JSParser::parseTryStatement): + (JSC::JSParser::parseBlockStatement): + (JSC::JSParser::parseStatement): + (JSC::JSParser::parseFormalParameters): + (JSC::JSParser::parseFunctionBody): + (JSC::JSParser::parseFunctionInfo): + (JSC::JSParser::parseFunctionDeclaration): + (JSC::JSParser::parseExpressionOrLabelStatement): + (JSC::JSParser::parseIfStatement): + (JSC::JSParser::parseExpression): + (JSC::JSParser::parseAssignmentExpression): + (JSC::JSParser::parseConditionalExpression): + (JSC::JSParser::parseBinaryExpression): + (JSC::JSParser::parseStrictObjectLiteral): + (JSC::JSParser::parsePrimaryExpression): + (JSC::JSParser::parseMemberExpression): + (JSC::JSParser::parseUnaryExpression): + * parser/JSParser.h: + * parser/Lexer.cpp: + (JSC::Lexer::parseString): + (JSC::Lexer::lex): + * parser/Lexer.h: + (JSC::Lexer::isReparsing): + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (JSC::ScopeNode::isStrictMode): + * parser/Parser.cpp: + (JSC::Parser::parse): + * parser/Parser.h: + (JSC::Parser::parse): + * parser/SyntaxChecker.h: + (JSC::SyntaxChecker::SyntaxChecker): + (JSC::SyntaxChecker::makeFunctionCallNode): + (JSC::SyntaxChecker::appendToComma): + (JSC::SyntaxChecker::createCommaExpr): + (JSC::SyntaxChecker::makeAssignNode): + (JSC::SyntaxChecker::makePrefixNode): + (JSC::SyntaxChecker::makePostfixNode): + (JSC::SyntaxChecker::makeTypeOfNode): + (JSC::SyntaxChecker::makeDeleteNode): + (JSC::SyntaxChecker::makeNegateNode): + (JSC::SyntaxChecker::makeBitwiseNotNode): + (JSC::SyntaxChecker::createLogicalNot): + (JSC::SyntaxChecker::createUnaryPlus): + (JSC::SyntaxChecker::createVoid): + (JSC::SyntaxChecker::thisExpr): + (JSC::SyntaxChecker::createResolve): + (JSC::SyntaxChecker::createObjectLiteral): + (JSC::SyntaxChecker::createArray): + (JSC::SyntaxChecker::createNumberExpr): + (JSC::SyntaxChecker::createString): + (JSC::SyntaxChecker::createBoolean): + (JSC::SyntaxChecker::createNull): + (JSC::SyntaxChecker::createBracketAccess): + (JSC::SyntaxChecker::createDotAccess): + (JSC::SyntaxChecker::createRegex): + (JSC::SyntaxChecker::createNewExpr): + (JSC::SyntaxChecker::createConditionalExpr): + (JSC::SyntaxChecker::createAssignResolve): + (JSC::SyntaxChecker::createFunctionExpr): + (JSC::SyntaxChecker::createFunctionBody): + (JSC::SyntaxChecker::appendBinaryExpressionInfo): + (JSC::SyntaxChecker::operatorStackPop): + * runtime/Arguments.cpp: + (JSC::Arguments::createStrictModeCallerIfNecessary): + (JSC::Arguments::createStrictModeCalleeIfNecessary): + (JSC::Arguments::getOwnPropertySlot): + (JSC::Arguments::getOwnPropertyDescriptor): + (JSC::Arguments::put): + (JSC::Arguments::deleteProperty): + * runtime/Arguments.h: + (JSC::Arguments::Arguments): + * runtime/CommonIdentifiers.cpp: + (JSC::CommonIdentifiers::CommonIdentifiers): + * runtime/CommonIdentifiers.h: + * runtime/Error.cpp: + (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction): + (JSC::StrictModeTypeErrorFunction::constructThrowTypeError): + (JSC::StrictModeTypeErrorFunction::getConstructData): + (JSC::StrictModeTypeErrorFunction::callThrowTypeError): + (JSC::StrictModeTypeErrorFunction::getCallData): + (JSC::createTypeErrorFunction): + * runtime/Error.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::EvalExecutable::compileInternal): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compileInternal): + (JSC::FunctionExecutable::compileForCallInternal): + (JSC::FunctionExecutable::compileForConstructInternal): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + (JSC::ProgramExecutable::reparseExceptionInfo): + * runtime/Executable.h: + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::ScriptExecutable::isStrictMode): + (JSC::EvalExecutable::create): + (JSC::FunctionExecutable::create): + * runtime/JSActivation.cpp: + (JSC::JSActivation::toStrictThisObject): + * runtime/JSActivation.h: + * runtime/JSFunction.cpp: + (JSC::createDescriptorForThrowingProperty): + (JSC::JSFunction::getOwnPropertySlot): + (JSC::JSFunction::getOwnPropertyDescriptor): + (JSC::JSFunction::put): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::internalFunctionStructure): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + * runtime/JSObject.cpp: + (JSC::JSObject::put): + (JSC::JSObject::toStrictThisObject): + (JSC::throwTypeError): + * runtime/JSObject.h: + (JSC::JSObject::isStrictModeFunction): + (JSC::JSObject::putDirectInternal): + (JSC::JSObject::putDirect): + (JSC::JSValue::putDirect): + (JSC::JSValue::toStrictThisObject): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::toStrictThisObject): + * runtime/JSStaticScopeObject.h: + * runtime/JSValue.h: + * runtime/JSZombie.h: + (JSC::JSZombie::toStrictThisObject): + * runtime/PutPropertySlot.h: + (JSC::PutPropertySlot::PutPropertySlot): + (JSC::PutPropertySlot::isStrictMode): + * runtime/StrictEvalActivation.cpp: Added. + (JSC::StrictEvalActivation::StrictEvalActivation): + (JSC::StrictEvalActivation::deleteProperty): + (JSC::StrictEvalActivation::toThisObject): + (JSC::StrictEvalActivation::toStrictThisObject): + * runtime/StrictEvalActivation.h: Added. + +2010-10-10 Patrick Gansterer + + Unreviewed. + + Windows build fix after r69472. + + * wtf/text/StringHash.h: + (WTF::CaseFoldingHash::hash): + +2010-10-10 Patrick Gansterer + + Reviewed by Adam Barth. + + Use WTF::StringHasher in WTF::CaseFoldingHash + https://bugs.webkit.org/show_bug.cgi?id=46523 + + * wtf/text/StringHash.h: + (WTF::CaseFoldingHash::foldCase): + (WTF::CaseFoldingHash::hash): + +2010-10-09 Pratik Solanki + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=47445 + Remove unused function WTFThreadData::initializeIdentifierTable() + + * wtf/WTFThreadData.h: + +2010-10-08 Michael Saboff + + Reviewed by Darin Adler. + + Added check to start of subexpression being positive before using + subexpression in replacement. + https://bugs.webkit.org/show_bug.cgi?id=47324 + + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + +2010-10-08 Chris Evans + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=47393 + + Use unsigned consistently to check for max StringImpl length. + Add a few integer overflow checks. + Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request. + + * wtf/text/WTFString.cpp: + * wtf/text/StringImpl.h: + * wtf/text/StringImpl.cpp: + Better use of size_t vs. unsigned; check for integer overflows. + +2010-10-07 David Goodwin + + Reviewed by Oliver Hunt. + + ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount + https://bugs.webkit.org/show_bug.cgi?id=47356 + + * assembler/ARMv7Assembler.h: + +2010-10-06 Chris Evans + + Reviewed by David Levin. + + https://bugs.webkit.org/show_bug.cgi?id=47248 + + Use size_t consistently in CString, to prevent theoretical trouble + with > 4GB strings on 64-bit platforms. + + * wtf/text/CString.h: + * wtf/text/CString.cpp: + Use size_t for string lengths. + * wtf/MD5.cpp: + (WTF::expectMD5): use suitable format string + cast for size_t. + * JavaScriptCore.exp: + Update symbol name. + +2010-10-06 Anders Carlsson + + Reviewed by Sam Weinig. + + Start cleaning up Arguments.h + https://bugs.webkit.org/show_bug.cgi?id=47304 + + * wtf/TypeTraits.h: + * wtf/TypeTraits.cpp: + Add RemoveReference type trait. + +2010-10-06 Rafael Antognolli + + Unreviewed build fix. + + [EFL] Build fix for glib support. + https://bugs.webkit.org/show_bug.cgi?id=47221 + + If compiling with GLib support enabled, we also need to link wtf against + glib library. + + * wtf/CMakeListsEfl.txt: + +2010-10-05 Kwang Yul Seo + + Reviewed by Gavin Barraclough. + + [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT + https://bugs.webkit.org/show_bug.cgi?id=47117 + + Use IMemCache1 to flush data cache and invalidate instruction cache. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2010-10-05 Leandro Pereira + + Unreviewed. Build fix. + + Moved "jsc" directory to "shell", so that the name does not clash with the + JavaScriptCore shell in some build systems. + http://webkit.org/b/47049 + + * CMakeLists.txt: Changed reference from "jsc" to "shell". + * jsc: Removed. + * jsc/CMakeLists.txt: Removed. + * jsc/CMakeListsEfl.txt: Removed. + * shell: Copied from JavaScriptCore/jsc. + +2010-10-05 Kwang Yul Seo + + Reviewed by Kent Tamura. + + [BREWMP] Use PlatformRefPtr in randomNumber + https://bugs.webkit.org/show_bug.cgi?id=46989 + + Use PlatformRefPtr to free memory automatically. + + * wtf/RandomNumber.cpp: + (WTF::randomNumber): + +2010-10-05 Oliver Hunt + + Reviewed by Darin Adler. + + REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64) + https://bugs.webkit.org/show_bug.cgi?id=46690 + + Use the correct register value when initialising the arguments + object in the interpreter. This is covered by existing tests. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2010-10-04 David Goodwin + + Reviewed by Oliver Hunt. + + ARMv7 JIT should take advantage of 2-byte branches to reduce code size + https://bugs.webkit.org/show_bug.cgi?id=47007 + + * assembler/ARMv7Assembler.cpp: + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::computeJumpType): + (JSC::ARMv7Assembler::link): + (JSC::ARMv7Assembler::canBeJumpT2): + (JSC::ARMv7Assembler::canBeJumpT4): + (JSC::ARMv7Assembler::linkBX): + (JSC::ARMv7Assembler::linkJumpT4): + (JSC::ARMv7Assembler::linkJumpT2): + (JSC::ARMv7Assembler::linkJumpAbsolute): + +2010-10-04 Gyuyoung Kim + + Reviewed by Antonio Gomes. + + [EFL] Use fast malloc for WebKit EFL + https://bugs.webkit.org/show_bug.cgi?id=46691 + + Use fast malloc for WebKit EFL because the fast malloc is to allocate + memory quickly. + + * wtf/CMakeListsEfl.txt: + +2010-10-04 Oliver Hunt + + Reviewed by Geoff Garen. + + Lazily create activation objects + https://bugs.webkit.org/show_bug.cgi?id=47107 + + Make it possible to lazily create the activation object + for a function that needs one. This allows us to reduce + the overhead of entering a function that may require + an activation in some cases, but not always. + + This does make exception handling a little more complex as + it's now necessary to verify that a callframes activation + has been created, and create it if not, in all of the + paths used in exception handling. + + We also need to add logic to check for the existence of + the activation in the scoped_var opcodes, as well as + op_ret, op_ret_object_or_this and op_tearoff_activation + so that we can avoid creating an activation unnecesarily + on function exit. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::createActivation): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::setActivationRegister): + (JSC::CodeBlock::activationRegister): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitNewFunctionInternal): + (JSC::BytecodeGenerator::emitNewFunctionExpression): + (JSC::BytecodeGenerator::createActivationIfNecessary): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobalDynamic): + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITCall32_64.cpp: + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_ret_object_or_this): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_end): + (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_ret): + (JSC::JIT::emit_op_ret_object_or_this): + (JSC::JIT::emit_op_create_activation): + (JSC::JIT::emit_op_resolve_global_dynamic): + * jit/JITOpcodes32_64.cpp: + (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_create_activation): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2010-10-04 Adam Barth + + Reviewed by Sam Weinig. + + Remove ENABLE_SANDBOX + https://bugs.webkit.org/show_bug.cgi?id=47032 + + * Configurations/FeatureDefines.xcconfig: + +2010-10-01 Pratik Solanki + + Reviewed by Geoffrey Garen. + Specify ALWAYS_INLINE at function declaration not function definition + https://bugs.webkit.org/show_bug.cgi?id=46960 + + For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well. + + * bytecompiler/BytecodeGenerator.h: + * wtf/FastMalloc.cpp: + +2010-10-01 Kwang Yul Seo + + Unreviewed. + + [BREWMP] Change Collector BLOCK_SIZE to 64KB + https://bugs.webkit.org/show_bug.cgi?id=46436 + + Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices. + + * runtime/Collector.h: + +2010-10-01 Viatcheslav Ostapenko + + Reviewed by Andreas Kling. + + [Qt] Stack overflow on symbian platform. + https://bugs.webkit.org/show_bug.cgi?id=40598 + + Move big allocation in arrayProtoFuncToString from stack to heap. + JSC::arrayProtoFuncToString function can be called recursivly and + 1K allocation on stack cahse stack overflow. + Can be useful for other platforms with limited stack size. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + +2010-09-30 Kwang Yul Seo + + Reviewed by Kent Tamura. + + [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr. + https://bugs.webkit.org/show_bug.cgi?id=46373 + + A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef + to wrap the instance in PlatformRefPtr. + + * wtf/brew/ShellBrew.h: + (WTF::createRefPtrInstance): + +2010-09-30 Kwang Yul Seo + + Reviewed by Kent Tamura. + + [BREWMP] Port PlatformRefPtr + https://bugs.webkit.org/show_bug.cgi?id=46370 + + Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP. + + * wtf/brew/RefPtrBrew.h: Added. + (WTF::refPlatformPtr): + (WTF::derefPlatformPtr): + +2010-09-29 Sam Weinig + + Reviewed by Darin Adler. + + Add additional checks to StringBuffer. + + + * wtf/text/StringBuffer.h: + (WTF::StringBuffer::StringBuffer): + (WTF::StringBuffer::resize): + +2010-09-30 Chris Marrin + + Reviewed by Simon Fraser. + + Make 2D accelerated canvas rendering build on Mac + https://bugs.webkit.org/show_bug.cgi?id=46007 + + Added ACCELERATED_2D_CANVAS to FeatureDefines + + * Configurations/FeatureDefines.xcconfig: + +2010-09-30 Kevin Ollivier + + [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from + the copy so as not to alter global settings. + + * wscript: + +2010-09-30 Peter Varga + + Reviewed by Gavin Barraclough. + + The case-insensitivity backreference checking isn't working with YARR + Interpreter + https://bugs.webkit.org/show_bug.cgi?id=46882 + + Add ignorecase checking to the Interpreter::tryConsumeBackReference() function. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::tryConsumeBackReference): + +2010-09-30 Kwang Yul Seo + + Reviewed by Andreas Kling. + + [BREWMP] Leave initializeRandomNumberGenerator empty. + https://bugs.webkit.org/show_bug.cgi?id=46851 + + On Brew MP, AEECLSID_RANDOM initializes itself. + + * wtf/RandomNumberSeed.h: + (WTF::initializeRandomNumberGenerator): + +2010-09-30 Gabor Loki + + Reviewed by Csaba Osztrogonác. + + Remove unnecessary cacheFlush calls from Thumb-2 + https://bugs.webkit.org/show_bug.cgi?id=46702 + + * assembler/ARMv7Assembler.h: + (JSC::ARMv7Assembler::relinkCall): + (JSC::ARMv7Assembler::repatchInt32): + (JSC::ARMv7Assembler::repatchPointer): + 2010-09-29 Patrick Gansterer Unreviewed. diff --git a/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/JavaScriptCore/Configurations/FeatureDefines.xcconfig index 2ed3a8e..4c698ce 100644 --- a/JavaScriptCore/Configurations/FeatureDefines.xcconfig +++ b/JavaScriptCore/Configurations/FeatureDefines.xcconfig @@ -33,6 +33,11 @@ ENABLE_LINK_PREFETCH = ; +ENABLE_ACCELERATED_2D_CANVAS = $(ENABLE_ACCELERATED_2D_CANVAS_$(REAL_PLATFORM_NAME)); +ENABLE_ACCELERATED_2D_CANVAS_macosx = $(ENABLE_ACCELERATED_2D_CANVAS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); +ENABLE_ACCELERATED_2D_CANVAS_macosx_1060 = ; +ENABLE_ACCELERATED_2D_CANVAS_macosx_1070 = ; + ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(REAL_PLATFORM_NAME)); ENABLE_3D_CANVAS_macosx = $(ENABLE_3D_CANVAS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); ENABLE_3D_CANVAS_macosx_1060 = ENABLE_3D_CANVAS; @@ -88,9 +93,6 @@ ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG; ENABLE_RUBY = $(ENABLE_RUBY_$(REAL_PLATFORM_NAME)); ENABLE_RUBY_macosx = ENABLE_RUBY; -ENABLE_SANDBOX = $(ENABLE_SANDBOX_$(REAL_PLATFORM_NAME)); -ENABLE_SANDBOX_macosx = ENABLE_SANDBOX; - ENABLE_SHARED_WORKERS = $(ENABLE_SHARED_WORKERS_$(REAL_PLATFORM_NAME)); ENABLE_SHARED_WORKERS_macosx = ENABLE_SHARED_WORKERS; @@ -119,4 +121,4 @@ ENABLE_XHTMLMP = ; ENABLE_XPATH = ENABLE_XPATH; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); +FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT); diff --git a/JavaScriptCore/Configurations/Version.xcconfig b/JavaScriptCore/Configurations/Version.xcconfig index f688ea8..35ae251 100644 --- a/JavaScriptCore/Configurations/Version.xcconfig +++ b/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 = 10; +MINOR_VERSION = 11; TINY_VERSION = 0; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION); diff --git a/JavaScriptCore/GNUmakefile.am b/JavaScriptCore/GNUmakefile.am index 88d1761..c507f5d 100644 --- a/JavaScriptCore/GNUmakefile.am +++ b/JavaScriptCore/GNUmakefile.am @@ -388,8 +388,8 @@ javascriptcore_sources += \ JavaScriptCore/runtime/ScopeChainMark.h \ JavaScriptCore/runtime/SmallStrings.cpp \ JavaScriptCore/runtime/SmallStrings.h \ - JavaScriptCore/runtime/StringBuilder.h \ - JavaScriptCore/runtime/StringConcatenate.h \ + JavaScriptCore/runtime/StrictEvalActivation.cpp \ + JavaScriptCore/runtime/StrictEvalActivation.h \ JavaScriptCore/runtime/StringConstructor.cpp \ JavaScriptCore/runtime/StringConstructor.h \ JavaScriptCore/runtime/StringObject.cpp \ @@ -409,6 +409,8 @@ javascriptcore_sources += \ JavaScriptCore/runtime/Tracing.h \ JavaScriptCore/runtime/UString.cpp \ JavaScriptCore/runtime/UString.h \ + JavaScriptCore/runtime/UStringBuilder.h \ + JavaScriptCore/runtime/UStringConcatenate.h \ JavaScriptCore/runtime/WeakGCMap.h \ JavaScriptCore/runtime/WeakGCPtr.h \ JavaScriptCore/runtime/WeakRandom.h \ @@ -428,6 +430,7 @@ javascriptcore_sources += \ JavaScriptCore/wtf/DateMath.cpp \ JavaScriptCore/wtf/DateMath.h \ JavaScriptCore/wtf/DecimalNumber.h \ + JavaScriptCore/wtf/DecimalNumber.cpp \ JavaScriptCore/wtf/Deque.h \ JavaScriptCore/wtf/DisallowCType.h \ JavaScriptCore/wtf/dtoa.cpp \ @@ -466,6 +469,7 @@ javascriptcore_sources += \ JavaScriptCore/wtf/NonCopyingSort.h \ JavaScriptCore/wtf/Noncopyable.h \ JavaScriptCore/wtf/NotFound.h \ + JavaScriptCore/wtf/NullPtr.h \ JavaScriptCore/wtf/OwnArrayPtr.h \ JavaScriptCore/wtf/OwnFastMallocPtr.h \ JavaScriptCore/wtf/OwnArrayPtrCommon.h \ @@ -493,7 +497,7 @@ javascriptcore_sources += \ JavaScriptCore/wtf/StaticConstructors.h \ JavaScriptCore/wtf/StdLibExtras.h \ JavaScriptCore/wtf/StringExtras.h \ - JavaScriptCore/wtf/StringHashFunctions.h \ + JavaScriptCore/wtf/StringHasher.h \ JavaScriptCore/wtf/TCPackedCache.h \ JavaScriptCore/wtf/TCPageMap.h \ JavaScriptCore/wtf/TCSpinLock.h \ @@ -506,6 +510,9 @@ javascriptcore_sources += \ JavaScriptCore/wtf/text/CString.cpp \ JavaScriptCore/wtf/text/CString.h \ JavaScriptCore/wtf/text/StringBuffer.h \ + JavaScriptCore/wtf/text/StringBuilder.cpp \ + JavaScriptCore/wtf/text/StringBuilder.h \ + JavaScriptCore/wtf/text/StringConcatenate.h \ JavaScriptCore/wtf/text/StringHash.h \ JavaScriptCore/wtf/text/StringImplBase.h \ JavaScriptCore/wtf/text/StringImpl.cpp \ diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp index ff3d9b3..6ef8ead 100644 --- a/JavaScriptCore/JavaScriptCore.exp +++ b/JavaScriptCore/JavaScriptCore.exp @@ -132,6 +132,8 @@ __ZN3JSC12JSGlobalData14sharedInstanceEv __ZN3JSC12JSGlobalData15dumpRegExpTraceEv __ZN3JSC12JSGlobalData6createENS_15ThreadStackTypeE __ZN3JSC12JSGlobalDataD1Ev +__ZN3JSC12RegExpObject4infoE +__ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEENS4_INS_6RegExpEEE __ZN3JSC12SamplingTool5setupEv __ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE __ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh @@ -150,7 +152,6 @@ __ZN3JSC13SamplingFlags4stopEv __ZN3JSC13SamplingFlags5startEv __ZN3JSC13SamplingFlags7s_flagsE __ZN3JSC13StatementNode6setLocEii -__ZN3JSC14heapStatisticsEPNS_12JSGlobalDataE __ZN3JSC14JSGlobalObject10globalExecEv __ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj __ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj @@ -165,6 +166,7 @@ __ZN3JSC14SamplingThread4stopEv __ZN3JSC14SamplingThread5startEj __ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE __ZN3JSC14TimeoutChecker5resetEv +__ZN3JSC14heapStatisticsEPNS_12JSGlobalDataE __ZN3JSC14throwTypeErrorEPNS_9ExecStateE __ZN3JSC15JSWrapperObject12markChildrenERNS_9MarkStackE __ZN3JSC15createTypeErrorEPNS_9ExecStateERKNS_7UStringE @@ -239,6 +241,8 @@ __ZN3JSC6JSLock4lockENS_14JSLockBehaviorE __ZN3JSC6JSLock6unlockENS_14JSLockBehaviorE __ZN3JSC6JSLock9lockCountEv __ZN3JSC6JSLockC1EPNS_9ExecStateE +__ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringES5_ +__ZN3JSC6RegExpD1Ev __ZN3JSC7JSArray12markChildrenERNS_9MarkStackE __ZN3JSC7JSArray15setSubclassDataEPv __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE @@ -372,6 +376,11 @@ __ZN3WTF12createThreadEPFPvS0_ES0_PKc __ZN3WTF12detachThreadEj __ZN3WTF12isMainThreadEv __ZN3WTF12randomNumberEv +__ZN3WTF13StringBuilder11reifyStringEv +__ZN3WTF13StringBuilder11shrinkToFitEv +__ZN3WTF13StringBuilder6appendEPKcj +__ZN3WTF13StringBuilder6appendEPKtj +__ZN3WTF13StringBuilder6resizeEj __ZN3WTF13WTFThreadData10staticDataE __ZN3WTF13WTFThreadDataC1Ev __ZN3WTF13WTFThreadDataD1Ev @@ -458,7 +467,7 @@ __ZN3WTF6strtodEPKcPPc __ZN3WTF7CString11mutableDataEv __ZN3WTF7CString16newUninitializedEmRPc __ZN3WTF7CStringC1EPKc -__ZN3WTF7CStringC1EPKcj +__ZN3WTF7CStringC1EPKcm __ZN3WTF7Unicode18convertUTF16ToUTF8EPPKtS2_PPcS4_b __ZN3WTF7Unicode18convertUTF8ToUTF16EPPKcS2_PPtS4_b __ZN3WTF7xmlAtomE @@ -484,8 +493,6 @@ __ZNK3JSC10JSFunction23isHostFunctionNonInlineEv __ZNK3JSC11Interpreter14retrieveCallerEPNS_9ExecStateEPNS_10JSFunctionE __ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE __ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE -__ZN3JSC12RegExpObject4infoE -__ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEN3WTF17NonNullPassRefPtrINS_9StructureEEENS4_INS_6RegExpEEE __ZNK3JSC14JSGlobalObject14isDynamicScopeERb __ZNK3JSC16InternalFunction9classInfoEv __ZNK3JSC16JSVariableObject16isVariableObjectEv @@ -516,8 +523,6 @@ __ZNK3JSC6JSCell9getStringEPNS_9ExecStateE __ZNK3JSC6JSCell9getStringEPNS_9ExecStateERNS_7UStringE __ZNK3JSC6JSCell9getUInt32ERj __ZNK3JSC6JSCell9toBooleanEPNS_9ExecStateE -__ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringES5_ -__ZN3JSC6RegExpD1Ev __ZNK3JSC7ArgList8getSliceEiRS0_ __ZNK3JSC7JSArray12subclassDataEv __ZNK3JSC7JSValue16toObjectSlowCaseEPNS_9ExecStateE @@ -531,6 +536,7 @@ __ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE __ZNK3JSC8JSObject11hasPropertyEPNS_9ExecStateEj __ZNK3JSC8JSObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE __ZNK3JSC8JSObject12toThisObjectEPNS_9ExecStateE +__ZNK3JSC8JSObject18toStrictThisObjectEPNS_9ExecStateE __ZNK3JSC8JSObject8toNumberEPNS_9ExecStateE __ZNK3JSC8JSObject8toObjectEPNS_9ExecStateE __ZNK3JSC8JSObject8toStringEPNS_9ExecStateE @@ -539,7 +545,12 @@ __ZNK3JSC8JSObject9toBooleanEPNS_9ExecStateE __ZNK3JSC8JSString11resolveRopeEPNS_9ExecStateE __ZNK3JSC9HashTable11createTableEPNS_12JSGlobalDataE __ZNK3JSC9HashTable11deleteTableEv +__ZN3WTF11dtoaRoundSFEPcdiRbRiRj +__ZN3WTF11dtoaRoundDPEPcdiRbRiRj +__ZN3WTF4dtoaEPcdRbRiRj __ZNK3WTF12AtomicString5lowerEv +__ZNK3WTF13DecimalNumber15toStringDecimalEPtj +__ZNK3WTF13DecimalNumber28bufferLengthForStringDecimalEv __ZNK3WTF6String11toIntStrictEPbi __ZNK3WTF6String12toUIntStrictEPbi __ZNK3WTF6String13toInt64StrictEPbi diff --git a/JavaScriptCore/JavaScriptCore.gypi b/JavaScriptCore/JavaScriptCore.gypi index 462960d..6252d07 100644 --- a/JavaScriptCore/JavaScriptCore.gypi +++ b/JavaScriptCore/JavaScriptCore.gypi @@ -346,6 +346,8 @@ 'runtime/Tracing.h', 'runtime/UString.cpp', 'runtime/UString.h', + 'runtime/UStringBuilder.h', + 'runtime/UStringConcatenate.h', 'runtime/WeakRandom.h', 'wtf/AlwaysInline.h', 'wtf/ASCIICType.h', @@ -363,6 +365,7 @@ 'wtf/CurrentTime.h', 'wtf/DateMath.cpp', 'wtf/DateMath.h', + 'wtf/DecimalNumber.cpp', 'wtf/Deque.h', 'wtf/DisallowCType.h', 'wtf/dtoa.cpp', @@ -422,7 +425,7 @@ 'wtf/StaticConstructors.h', 'wtf/StdLibExtras.h', 'wtf/StringExtras.h', - 'wtf/StringHashFunctions.h', + 'wtf/StringHasher.h', 'wtf/TCPackedCache.h', 'wtf/qt/MainThreadQt.cpp', 'wtf/qt/StringQt.cpp', @@ -450,6 +453,10 @@ 'wtf/text/AtomicStringImpl.h', 'wtf/text/CString.cpp', 'wtf/text/CString.h', + 'wtf/text/StringBuffer.h', + 'wtf/text/StringBuilder.cpp', + 'wtf/text/StringBuilder.h', + 'wtf/text/StringConcatenate.h', 'wtf/text/StringHash.h', 'wtf/text/StringImpl.cpp', 'wtf/text/StringImpl.h', diff --git a/JavaScriptCore/JavaScriptCore.pri b/JavaScriptCore/JavaScriptCore.pri index 57b1ce8..847576d 100644 --- a/JavaScriptCore/JavaScriptCore.pri +++ b/JavaScriptCore/JavaScriptCore.pri @@ -54,6 +54,12 @@ win32-*: DEFINES += _HAS_TR1=0 DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF +# CONFIG += text_breaking_with_icu + +contains (CONFIG, text_breaking_with_icu) { + DEFINES += WTF_USE_QT_ICU_TEXT_BREAKING=1 +} + wince* { INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/ce-compat INCLUDEPATH += $$PWD/../JavaScriptCore/os-win32 diff --git a/JavaScriptCore/JavaScriptCore.pro b/JavaScriptCore/JavaScriptCore.pro index f463f41..f83bf4c 100644 --- a/JavaScriptCore/JavaScriptCore.pro +++ b/JavaScriptCore/JavaScriptCore.pro @@ -197,6 +197,7 @@ SOURCES += \ runtime/RopeImpl.cpp \ runtime/ScopeChain.cpp \ runtime/SmallStrings.cpp \ + runtime/StrictEvalActivation.cpp \ runtime/StringConstructor.cpp \ runtime/StringObject.cpp \ runtime/StringPrototype.cpp \ diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def index ba564f0..779b0bc 100644 --- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def +++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def @@ -41,7 +41,6 @@ EXPORTS ??8JSC@@YA_NABVUString@0@0@Z ??8WTF@@YA_NABVCString@0@0@Z ?NaN@JSC@@3NB - ?utf8@UString@JSC@@QBE?AVCString@WTF@@_N@Z ?add@Identifier@JSC@@SA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PBD@Z ?add@PropertyNameArray@JSC@@QAEXPAVStringImpl@WTF@@@Z ?addBytes@MD5@WTF@@QAEXPBEI@Z @@ -53,9 +52,12 @@ EXPORTS ?allocate@Heap@JSC@@QAEPAXI@Z ?allocatePropertyStorage@JSObject@JSC@@QAEXII@Z ?allocateStack@MarkStack@JSC@@CAPAXI@Z + ?append@StringBuilder@WTF@@QAEXPBDI@Z + ?append@StringBuilder@WTF@@QAEXPB_WI@Z ?ascii@UString@JSC@@QBE?AVCString@WTF@@XZ ?attach@Debugger@JSC@@QAEXPAVJSGlobalObject@2@@Z ?broadcast@ThreadCondition@WTF@@QAEXXZ + ?bufferLengthForStringDecimal@DecimalNumber@WTF@@QBEIXZ ?calculatedFunctionName@DebuggerCallFrame@JSC@@QBE?AVUString@2@XZ ?call@JSC@@YA?AVJSValue@1@PAVExecState@1@V21@W4CallType@1@ABTCallData@1@1ABVArgList@1@@Z ?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z @@ -130,6 +132,7 @@ EXPORTS ?detach@Debugger@JSC@@UAEXPAVJSGlobalObject@2@@Z ?detachThread@WTF@@YAXI@Z ?didTimeOut@TimeoutChecker@JSC@@QAE_NPAVExecState@2@@Z + ?dtoa@WTF@@YAXQADNAA_NAAHAAI@Z ?dumpSampleData@JSGlobalData@JSC@@QAEXPAVExecState@2@@Z ?empty@StringImpl@WTF@@SAPAV12@XZ ?enumerable@PropertyDescriptor@JSC@@QBE_NXZ @@ -149,10 +152,6 @@ EXPORTS ?free@WeakGCHandlePool@JSC@@QAEXPAVWeakGCHandle@2@@Z ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@H@Z ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@I@Z - ?number@UString@JSC@@SA?AV12@H@Z - ?number@UString@JSC@@SA?AV12@I@Z - ?number@UString@JSC@@SA?AV12@N@Z - ?numberToString@WTF@@YAINQA_W@Z ?functionGetter@PropertySlot@JSC@@ABE?AVJSValue@2@PAVExecState@2@@Z ?functionName@DebuggerCallFrame@JSC@@QBEPBVUString@2@XZ ?get@Structure@JSC@@QAEIPBVStringImpl@WTF@@AAIAAPAVJSCell@2@@Z @@ -193,7 +192,6 @@ EXPORTS ?hasTransition@Structure@JSC@@QAE_NPAVStringImpl@WTF@@I@Z ?heap@Heap@JSC@@SAPAV12@VJSValue@2@@Z ?increment@RefCountedLeakCounter@WTF@@QAEXXZ - ?info@RegExpObject@JSC@@2UClassInfo@2@B ?init@AtomicString@WTF@@SAXXZ ?init@JSGlobalObject@JSC@@AAEXPAVJSObject@2@@Z ?initializeMainThread@WTF@@YAXXZ @@ -230,6 +228,10 @@ EXPORTS ?name@JSFunction@JSC@@QAEABVUString@2@PAVExecState@2@@Z ?newUninitialized@CString@WTF@@SA?AV12@IAAPAD@Z ?nonInlineNaN@JSC@@YANXZ + ?number@UString@JSC@@SA?AV12@H@Z + ?number@UString@JSC@@SA?AV12@I@Z + ?number@UString@JSC@@SA?AV12@N@Z + ?numberToString@WTF@@YAINQA_W@Z ?objectCount@Heap@JSC@@QBEIXZ ?objectProtoFuncToString@JSC@@YI_JPAVExecState@1@@Z ?parseDateFromNullTerminatedCharacters@WTF@@YANPBD@Z @@ -257,10 +259,12 @@ EXPORTS ?randomNumber@WTF@@YANXZ ?recompileAllJSFunctions@Debugger@JSC@@QAEXPAVJSGlobalData@2@@Z ?recordExtraCost@Heap@JSC@@AAEXI@Z + ?reifyString@StringBuilder@WTF@@AAEXXZ ?releaseStack@MarkStack@JSC@@CAXPAXI@Z ?reset@ParserArena@JSC@@QAEXXZ ?reset@TimeoutChecker@JSC@@QAEXXZ ?resetDateCache@JSGlobalData@JSC@@QAEXXZ + ?resize@StringBuilder@WTF@@QAEXI@Z ?resolveRope@JSString@JSC@@ABEXPAVExecState@2@@Z ?restoreAll@Profile@JSC@@QAEXXZ ?retrieveCaller@Interpreter@JSC@@QBE?AVJSValue@2@PAVExecState@2@PAVJSFunction@2@@Z @@ -280,6 +284,7 @@ EXPORTS ?setUpStaticFunctionSlot@JSC@@YAXPAVExecState@1@PBVHashEntry@1@PAVJSObject@1@ABVIdentifier@1@AAVPropertySlot@1@@Z ?setWritable@PropertyDescriptor@JSC@@QAEX_N@Z ?setter@PropertyDescriptor@JSC@@QBE?AVJSValue@2@XZ + ?shrinkToFit@StringBuilder@WTF@@QAEXXZ ?signal@ThreadCondition@WTF@@QAEXXZ ?size@Heap@JSC@@QBEIXZ ?slowAppend@MarkedArgumentBuffer@JSC@@AAEXVJSValue@2@@Z @@ -315,6 +320,8 @@ EXPORTS ?toObjectSlowCase@JSValue@JSC@@ABEPAVJSObject@2@PAVExecState@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 + ?toStringDecimal@DecimalNumber@WTF@@QBEIPA_WI@Z ?toString@JSCell@JSC@@UBE?AVUString@2@PAVExecState@2@@Z ?toString@JSObject@JSC@@UBE?AVUString@2@PAVExecState@2@@Z ?toString@JSString@JSC@@EBE?AVUString@2@PAVExecState@2@@Z @@ -325,6 +332,7 @@ EXPORTS ?toUInt32@Identifier@JSC@@SAIABVUString@2@AA_N@Z ?tryFastCalloc@WTF@@YA?AUTryMallocReturnValue@1@II@Z ?tryFastMalloc@WTF@@YA?AUTryMallocReturnValue@1@I@Z + ?tryFastRealloc@WTF@@YA?AUTryMallocReturnValue@1@PAXI@Z ?tryLock@Mutex@WTF@@QAE_NXZ ?type@DebuggerCallFrame@JSC@@QBE?AW4Type@12@XZ ?unlock@JSLock@JSC@@SAXW4JSLockBehavior@2@@Z @@ -332,6 +340,7 @@ EXPORTS ?unlockAtomicallyInitializedStaticMutex@WTF@@YAXXZ ?unprotect@Heap@JSC@@QAE_NVJSValue@2@@Z ?unwrappedObject@JSObject@JSC@@UAEPAV12@XZ + ?utf8@UString@JSC@@QBE?AVCString@WTF@@_N@Z ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z ?writable@PropertyDescriptor@JSC@@QBE_NXZ diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj index 83d34e3..4823286 100644 --- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj +++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj @@ -1173,6 +1173,14 @@ > + + + + @@ -1245,6 +1253,14 @@ > + + + + diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops index c92196e..6929c8a 100644 --- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops +++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops @@ -19,7 +19,7 @@ /> NUL "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + + xcopy /y /d "..\..\wtf\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\wtf\text\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\wtf\unicode\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\wtf\unicode\icu\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\parser\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\runtime\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\bytecode\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\interpreter\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\assembler\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\jit\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\debugger\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\profiler\*.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\create_hash_table" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\pcre\pcre.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\wtf\text\AtomicString.cpp" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\wtf\text\StringBuilder.cpp" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\wtf\text\StringImpl.cpp" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + xcopy /y /d "..\..\wtf\text\WTFString.cpp" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + + + -mkdir 2>NUL "$(WEBKITOUTPUTDIR)\bin\JavaScriptCore.resources" + xcopy /y /d "..\JavaScriptCore.resources\*" "$(WEBKITOUTPUTDIR)\bin\JavaScriptCore.resources" + -del "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore\stdbool.h" "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore\stdint.h" -del "$(WEBKITOUTPUTDIR)\buildfailed" @@ -28,3 +54,5 @@ clean: -del "$(WEBKITOUTPUTDIR)\buildfailed" -del /s /q "$(WEBKITOUTPUTDIR)\include\JavaScriptCore\JavaScriptCore" -del /s /q "$(WEBKITOUTPUTDIR)\obj\JavaScriptCore\DerivedSources" + -del /s /q "$(WEBKITOUTPUTDIR)\include\private\JavaScriptCore" + -del /s /q "$(WEBKITOUTPUTDIR)\bin\JavaScriptCore.resources" diff --git a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj index 42a91eb..3a53070 100644 --- a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj +++ b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj @@ -309,6 +309,14 @@ > + + + + @@ -609,6 +617,22 @@ > + + + + + + + + @@ -620,6 +644,10 @@ RelativePath="..\..\wtf\text\StringImpl.h" > + + diff --git a/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj index 0f3e145..029a4b0 100644 --- a/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj +++ b/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj @@ -334,6 +334,10 @@ > + + diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj index 675d26d..d134a73 100644 --- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj +++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj @@ -36,14 +36,18 @@ /* Begin PBXBuildFile section */ 06D358B30DAADAA4003B174E /* MainThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06D358A20DAAD9C4003B174E /* MainThread.cpp */; }; 06D358B40DAADAAA003B174E /* MainThreadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 06D358A10DAAD9C4003B174E /* MainThreadMac.mm */; }; + 081469491264378500DFF935 /* StringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081469481264375E00DFF935 /* StringBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 088FA5BB0EF76D4300578E6F /* RandomNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 088FA5B90EF76D4300578E6F /* RandomNumber.cpp */; }; 088FA5BC0EF76D4300578E6F /* RandomNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 088FA5BA0EF76D4300578E6F /* RandomNumber.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 08CABBA61265AB3900B206CE /* StringConcatenate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0896C29E1265AB0900B1CDD3 /* StringConcatenate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 08DDA5C11264631700751732 /* UStringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 08DDA5BB12645F1D00751732 /* UStringBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 08E279E90EF83B10007DB523 /* RandomNumberSeed.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E279E80EF83B10007DB523 /* RandomNumberSeed.h */; }; 0B330C270F38C62300692DE3 /* TypeTraits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B330C260F38C62300692DE3 /* TypeTraits.cpp */; }; 0B4D7E630F319AC800AD7E58 /* TypeTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0BDFFAE00FC6192900D69EF4 /* CrossThreadRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BDFFAD40FC6171000D69EF4 /* CrossThreadRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0BDFFAE10FC6193100D69EF4 /* OwnFastMallocPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */; settings = {ATTRIBUTES = (Private, ); }; }; 0BF28A2911A33DC300638F84 /* SizeLimits.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */; }; + 0F29479C126E698C00B3ABF5 /* DecimalNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F29479B126E698C00B3ABF5 /* DecimalNumber.cpp */; }; 14035DB110DBFB2A00FFFFE7 /* WeakGCPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */; settings = {ATTRIBUTES = (Private, ); }; }; 140566C4107EC255005DBC8D /* JSAPIValueWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0894D50FAFBA2D00001865 /* JSAPIValueWrapper.cpp */; }; 140566D1107EC267005DBC8D /* JSStaticScopeObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E42C190E3938830065A544 /* JSStaticScopeObject.cpp */; }; @@ -182,7 +186,7 @@ 5D53726F0E1C54880021E549 /* Tracing.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D53726E0E1C54880021E549 /* Tracing.h */; }; 5D5D8AB60E0D0A7200F9C692 /* jsc in Copy Into Framework */ = {isa = PBXBuildFile; fileRef = 932F5BE10822A1C700736975 /* jsc */; }; 5D5D8AD10E0D0EBE00F9C692 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; }; - 5D63E9AD10F2BD6E00FC8AE9 /* StringHashFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D63E9AC10F2BD6E00FC8AE9 /* StringHashFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 5D63E9AD10F2BD6E00FC8AE9 /* StringHasher.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D63E9AC10F2BD6E00FC8AE9 /* StringHasher.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5D6A566B0F05995500266145 /* Threading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5D6A566A0F05995500266145 /* Threading.cpp */; }; 5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */ = {isa = PBXBuildFile; fileRef = F692A8540255597D01FF60F7 /* create_hash_table */; settings = {ATTRIBUTES = (); }; }; 6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6507D2970E871E4A00D7D896 /* JSTypeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -201,8 +205,9 @@ 8626BECF11928E3900782FAB /* StringStatics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8626BECE11928E3900782FAB /* StringStatics.cpp */; }; 8627E5EB11F1281900A313B5 /* PageAllocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8627E5E911F1281900A313B5 /* PageAllocation.cpp */; }; 8627E5EC11F1281900A313B5 /* PageAllocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8627E5EA11F1281900A313B5 /* PageAllocation.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 862AF4B612239C7B0024E5B8 /* DecimalNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 862AF4B512239C7B0024E5B8 /* DecimalNumber.h */; }; + 862AF4B612239C7B0024E5B8 /* DecimalNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 862AF4B512239C7B0024E5B8 /* DecimalNumber.h */; settings = {ATTRIBUTES = (Private, ); }; }; 863B23E00FC6118900703AA4 /* MacroAssemblerCodeRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 863B23DF0FC60E6200703AA4 /* MacroAssemblerCodeRef.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 86438FC41265503E00E0DFCA /* StringBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86438FC31265503E00E0DFCA /* StringBuilder.cpp */; }; 86565742115BE3DA00291F40 /* CString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86565740115BE3DA00291F40 /* CString.cpp */; }; 86565743115BE3DA00291F40 /* CString.h in Headers */ = {isa = PBXBuildFile; fileRef = 86565741115BE3DA00291F40 /* CString.h */; settings = {ATTRIBUTES = (Private, ); }; }; 865F408810E7D56300947361 /* APIShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 865F408710E7D56300947361 /* APIShims.h */; }; @@ -217,13 +222,11 @@ 868BFA18117CF19900B908B1 /* WTFString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA16117CF19900B908B1 /* WTFString.h */; settings = {ATTRIBUTES = (Private, ); }; }; 868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA5F117D048200B908B1 /* StaticConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; }; 8690231512092D5C00630AF9 /* PageReservation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8690231412092D5C00630AF9 /* PageReservation.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 8698B86910D44D9400D8D01B /* StringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8698B86810D44D9400D8D01B /* StringBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 869D04AF1193B54D00803475 /* CachedTranscendentalFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 869D04AE1193B54D00803475 /* CachedTranscendentalFunction.h */; settings = {ATTRIBUTES = (Private, ); }; }; 869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */ = {isa = PBXBuildFile; fileRef = 869EBCB60E8C6D4A008722CC /* ResultType.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86A90ED00EE7D51F00AB350D /* JITArithmetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */; }; 86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */; }; 86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */ = {isa = PBXBuildFile; fileRef = 86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */; }; - 86B6DA0212132B9A000D316F /* StringConcatenate.h in Headers */ = {isa = PBXBuildFile; fileRef = 86B6DA0112132B9A000D316F /* StringConcatenate.h */; }; 86B99AB8117E391E00DF5A90 /* RopeImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86B99AB6117E391E00DF5A90 /* RopeImpl.cpp */; }; 86B99AB9117E391E00DF5A90 /* RopeImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 86B99AB7117E391E00DF5A90 /* RopeImpl.h */; settings = {ATTRIBUTES = (Private, ); }; }; 86B99AE3117E578100DF5A90 /* StringBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 86B99AE1117E578100DF5A90 /* StringBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -275,6 +278,7 @@ 932F5BEA0822A1C700736975 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; }; 933040040E6A749400786E6A /* SmallStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 93303FEA0E6A72C000786E6A /* SmallStrings.h */; settings = {ATTRIBUTES = (Private, ); }; }; 9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93303FE80E6A72B500786E6A /* SmallStrings.cpp */; }; + 933F5CDC1269229B0049191E /* NullPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 933F5CDB126922690049191E /* NullPtr.h */; settings = {ATTRIBUTES = (Private, ); }; }; 937013480CA97E0E00FA14D3 /* pcre_ucp_searchfuncs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 937013470CA97E0E00FA14D3 /* pcre_ucp_searchfuncs.cpp */; settings = {COMPILER_FLAGS = "-Wno-sign-compare"; }; }; 93E26BD408B1514100F85226 /* pcre_xclass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93E26BD308B1514100F85226 /* pcre_xclass.cpp */; }; 9534AAFB0E5B7A9600B8A45B /* JSProfilerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 952C63AC0E4777D600C13936 /* JSProfilerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -310,6 +314,8 @@ 9714AF5F122F32070092D9F5 /* ParsedURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 9714AF58122F31F50092D9F5 /* ParsedURL.h */; }; 9714AF60122F32070092D9F5 /* URLString.h in Headers */ = {isa = PBXBuildFile; fileRef = 9714AF59122F31F50092D9F5 /* URLString.h */; }; 971EDEA61169E0D3005E4262 /* Terminator.h in Headers */ = {isa = PBXBuildFile; fileRef = 97F6903A1169DF7F00A6BB46 /* Terminator.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 972A485F12661E0800F4514F /* URLCharacterTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 972A485D12661E0800F4514F /* URLCharacterTypes.cpp */; }; + 972A48771266256F00F4514F /* URLEscape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 972A48741266256F00F4514F /* URLEscape.cpp */; }; A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1712B3A11C7B212007A5315 /* RegExpCache.cpp */; }; A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */ = {isa = PBXBuildFile; fileRef = A1712B3E11C7B228007A5315 /* RegExpCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; A1712B4111C7B235007A5315 /* RegExpKey.h in Headers */ = {isa = PBXBuildFile; fileRef = A1712B4011C7B235007A5315 /* RegExpKey.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -318,6 +324,8 @@ A72701B90DADE94900E548D7 /* ExceptionHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = A72701B30DADE94900E548D7 /* ExceptionHelpers.h */; }; A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */; }; A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A79EDB0811531CD60019E912 /* JSObjectRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + A730B6121250068F009D25B1 /* StrictEvalActivation.h in Headers */ = {isa = PBXBuildFile; fileRef = A730B6101250068F009D25B1 /* StrictEvalActivation.h */; }; + A730B6131250068F009D25B1 /* StrictEvalActivation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A730B6111250068F009D25B1 /* StrictEvalActivation.cpp */; }; A7386554118697B400540279 /* SpecializedThunkJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = A7386551118697B400540279 /* SpecializedThunkJIT.h */; }; A7386555118697B400540279 /* ThunkGenerators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7386552118697B400540279 /* ThunkGenerators.cpp */; }; A7386556118697B400540279 /* ThunkGenerators.h in Headers */ = {isa = PBXBuildFile; fileRef = A7386553118697B400540279 /* ThunkGenerators.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -627,14 +635,19 @@ 06D358A10DAAD9C4003B174E /* MainThreadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MainThreadMac.mm; sourceTree = ""; }; 06D358A20DAAD9C4003B174E /* MainThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainThread.cpp; sourceTree = ""; }; 06D358A30DAAD9C4003B174E /* MainThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainThread.h; sourceTree = ""; }; + 081469481264375E00DFF935 /* StringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringBuilder.h; path = text/StringBuilder.h; sourceTree = ""; }; 088FA5B90EF76D4300578E6F /* RandomNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RandomNumber.cpp; sourceTree = ""; }; 088FA5BA0EF76D4300578E6F /* RandomNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomNumber.h; sourceTree = ""; }; + 0896C29B1265AAF600B1CDD3 /* UStringConcatenate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UStringConcatenate.h; sourceTree = ""; }; + 0896C29E1265AB0900B1CDD3 /* StringConcatenate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringConcatenate.h; path = text/StringConcatenate.h; sourceTree = ""; }; + 08DDA5BB12645F1D00751732 /* UStringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UStringBuilder.h; sourceTree = ""; }; 08E279E80EF83B10007DB523 /* RandomNumberSeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomNumberSeed.h; sourceTree = ""; }; 0B330C260F38C62300692DE3 /* TypeTraits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypeTraits.cpp; sourceTree = ""; }; 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeTraits.h; sourceTree = ""; }; 0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OwnFastMallocPtr.h; sourceTree = ""; }; 0BDFFAD40FC6171000D69EF4 /* CrossThreadRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadRefCounted.h; sourceTree = ""; }; 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SizeLimits.cpp; sourceTree = ""; }; + 0F29479B126E698C00B3ABF5 /* DecimalNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DecimalNumber.cpp; sourceTree = ""; }; 14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCPtr.h; sourceTree = ""; }; 140D17D60E8AD4A9000CD17D /* JSBasePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBasePrivate.h; sourceTree = ""; }; 141211020A48780900480255 /* minidom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = minidom.c; path = tests/minidom.c; sourceTree = ""; }; @@ -741,7 +754,7 @@ 5D53726E0E1C54880021E549 /* Tracing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tracing.h; sourceTree = ""; }; 5D53727D0E1C55EC0021E549 /* TracingDtrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TracingDtrace.h; sourceTree = ""; }; 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = /usr/lib/libedit.dylib; sourceTree = ""; }; - 5D63E9AC10F2BD6E00FC8AE9 /* StringHashFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringHashFunctions.h; sourceTree = ""; }; + 5D63E9AC10F2BD6E00FC8AE9 /* StringHasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringHasher.h; sourceTree = ""; }; 5D6A566A0F05995500266145 /* Threading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Threading.cpp; sourceTree = ""; }; 5DA479650CFBCF56009328A0 /* TCPackedCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCPackedCache.h; sourceTree = ""; }; 5DBD18AF0C5401A700C15EAE /* MallocZoneSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MallocZoneSupport.h; sourceTree = ""; }; @@ -803,6 +816,7 @@ 8627E5EA11F1281900A313B5 /* PageAllocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageAllocation.h; sourceTree = ""; }; 862AF4B512239C7B0024E5B8 /* DecimalNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DecimalNumber.h; sourceTree = ""; }; 863B23DF0FC60E6200703AA4 /* MacroAssemblerCodeRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerCodeRef.h; sourceTree = ""; }; + 86438FC31265503E00E0DFCA /* StringBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringBuilder.cpp; path = text/StringBuilder.cpp; sourceTree = ""; }; 86565740115BE3DA00291F40 /* CString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CString.cpp; path = text/CString.cpp; sourceTree = ""; }; 86565741115BE3DA00291F40 /* CString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CString.h; path = text/CString.h; sourceTree = ""; }; 865F408710E7D56300947361 /* APIShims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIShims.h; sourceTree = ""; }; @@ -820,13 +834,11 @@ 868BFA16117CF19900B908B1 /* WTFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WTFString.h; path = text/WTFString.h; sourceTree = ""; }; 868BFA5F117D048200B908B1 /* StaticConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticConstructors.h; sourceTree = ""; }; 8690231412092D5C00630AF9 /* PageReservation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageReservation.h; sourceTree = ""; }; - 8698B86810D44D9400D8D01B /* StringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringBuilder.h; sourceTree = ""; }; 869D04AE1193B54D00803475 /* CachedTranscendentalFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedTranscendentalFunction.h; sourceTree = ""; }; 869EBCB60E8C6D4A008722CC /* ResultType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultType.h; sourceTree = ""; }; 86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITArithmetic.cpp; sourceTree = ""; }; 86ADD1430FDDEA980006EEC2 /* ARMv7Assembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARMv7Assembler.h; sourceTree = ""; }; 86ADD1440FDDEA980006EEC2 /* MacroAssemblerARMv7.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerARMv7.h; sourceTree = ""; }; - 86B6DA0112132B9A000D316F /* StringConcatenate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringConcatenate.h; sourceTree = ""; }; 86B99AB6117E391E00DF5A90 /* RopeImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RopeImpl.cpp; sourceTree = ""; }; 86B99AB7117E391E00DF5A90 /* RopeImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RopeImpl.h; sourceTree = ""; }; 86B99AE1117E578100DF5A90 /* StringBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringBuffer.h; path = text/StringBuffer.h; sourceTree = ""; }; @@ -882,6 +894,7 @@ 93303FEA0E6A72C000786E6A /* SmallStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallStrings.h; sourceTree = ""; }; 933A349A038AE7C6008635CE /* Identifier.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Identifier.h; sourceTree = ""; tabWidth = 8; }; 933A349D038AE80F008635CE /* Identifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Identifier.cpp; sourceTree = ""; tabWidth = 8; }; + 933F5CDB126922690049191E /* NullPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NullPtr.h; sourceTree = ""; }; 935AF46909E9D9DB00ACD1D8 /* Forward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Forward.h; sourceTree = ""; }; 935AF46B09E9D9DB00ACD1D8 /* UnusedParam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnusedParam.h; sourceTree = ""; }; 937013470CA97E0E00FA14D3 /* pcre_ucp_searchfuncs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pcre_ucp_searchfuncs.cpp; sourceTree = ""; }; @@ -939,6 +952,11 @@ 9714AF57122F31F50092D9F5 /* ParsedURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParsedURL.cpp; path = url/api/ParsedURL.cpp; sourceTree = ""; }; 9714AF58122F31F50092D9F5 /* ParsedURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParsedURL.h; path = url/api/ParsedURL.h; sourceTree = ""; }; 9714AF59122F31F50092D9F5 /* URLString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = URLString.h; path = url/api/URLString.h; sourceTree = ""; }; + 972A485D12661E0800F4514F /* URLCharacterTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = URLCharacterTypes.cpp; path = url/src/URLCharacterTypes.cpp; sourceTree = ""; }; + 972A485E12661E0800F4514F /* URLCharacterTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = URLCharacterTypes.h; path = url/src/URLCharacterTypes.h; sourceTree = ""; }; + 972A48741266256F00F4514F /* URLEscape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = URLEscape.cpp; path = url/src/URLEscape.cpp; sourceTree = ""; }; + 972A48751266256F00F4514F /* URLEscape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = URLEscape.h; path = url/src/URLEscape.h; sourceTree = ""; }; + 972A48761266256F00F4514F /* URLQueryCanonicalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = URLQueryCanonicalizer.h; path = url/src/URLQueryCanonicalizer.h; sourceTree = ""; }; 97F6903A1169DF7F00A6BB46 /* Terminator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Terminator.h; sourceTree = ""; }; A1712B3A11C7B212007A5315 /* RegExpCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegExpCache.cpp; sourceTree = ""; }; A1712B3E11C7B228007A5315 /* RegExpCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegExpCache.h; sourceTree = ""; }; @@ -951,6 +969,8 @@ A72701B30DADE94900E548D7 /* ExceptionHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionHelpers.h; sourceTree = ""; }; A727FF650DA3053B00E548D7 /* JSPropertyNameIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPropertyNameIterator.h; sourceTree = ""; }; A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPropertyNameIterator.cpp; sourceTree = ""; }; + A730B6101250068F009D25B1 /* StrictEvalActivation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StrictEvalActivation.h; sourceTree = ""; }; + A730B6111250068F009D25B1 /* StrictEvalActivation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StrictEvalActivation.cpp; sourceTree = ""; }; A7386551118697B400540279 /* SpecializedThunkJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecializedThunkJIT.h; sourceTree = ""; }; A7386552118697B400540279 /* ThunkGenerators.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThunkGenerators.cpp; sourceTree = ""; }; A7386553118697B400540279 /* ThunkGenerators.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThunkGenerators.h; sourceTree = ""; }; @@ -1470,6 +1490,7 @@ 41359CF40FDD89CB00206180 /* DateMath.cpp */, 41359CF50FDD89CB00206180 /* DateMath.h */, 862AF4B512239C7B0024E5B8 /* DecimalNumber.h */, + 0F29479B126E698C00B3ABF5 /* DecimalNumber.cpp */, 5186111D0CC824830081412B /* Deque.h */, 938C4F6B0CA06BCE00D9310A /* DisallowCType.h */, 651F6412039D5B5F0078395C /* dtoa.cpp */, @@ -1501,6 +1522,7 @@ 65E1A2F4122B880D00B26097 /* NonCopyingSort.h */, 9303F5690991190000AD71B8 /* Noncopyable.h */, C0A2723F0E509F1E00E96E15 /* NotFound.h */, + 933F5CDB126922690049191E /* NullPtr.h */, 9303F5A409911A5800AD71B8 /* OwnArrayPtr.h */, BCFBE697122561D200309E9D /* OwnArrayPtrCommon.h */, 0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */, @@ -1528,7 +1550,7 @@ 868BFA5F117D048200B908B1 /* StaticConstructors.h */, FE1B44790ECCD73B004F4DD1 /* StdLibExtras.h */, E11D51750B2E798D0056C188 /* StringExtras.h */, - 5D63E9AC10F2BD6E00FC8AE9 /* StringHashFunctions.h */, + 5D63E9AC10F2BD6E00FC8AE9 /* StringHasher.h */, 5DA479650CFBCF56009328A0 /* TCPackedCache.h */, 6541BD6E08E80A17002CBEE7 /* TCPageMap.h */, 6541BD6F08E80A17002CBEE7 /* TCSpinLock.h */, @@ -1789,8 +1811,6 @@ 7E2C6C980D31C6B6002D44E2 /* ScopeChainMark.h */, 93303FE80E6A72B500786E6A /* SmallStrings.cpp */, 93303FEA0E6A72C000786E6A /* SmallStrings.h */, - 8698B86810D44D9400D8D01B /* StringBuilder.h */, - 86B6DA0112132B9A000D316F /* StringConcatenate.h */, BC18C3C00E16EE3300B34460 /* StringConstructor.cpp */, BC18C3C10E16EE3300B34460 /* StringConstructor.h */, BC18C3C20E16EE3300B34460 /* StringObject.cpp */, @@ -1811,9 +1831,13 @@ 5D53726E0E1C54880021E549 /* Tracing.h */, F692A8850255597D01FF60F7 /* UString.cpp */, F692A8860255597D01FF60F7 /* UString.h */, + 08DDA5BB12645F1D00751732 /* UStringBuilder.h */, + 0896C29B1265AAF600B1CDD3 /* UStringConcatenate.h */, 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */, 14035DB010DBFB2A00FFFFE7 /* WeakGCPtr.h */, 1420BE7A10AA6DDB00F455D2 /* WeakRandom.h */, + A730B6101250068F009D25B1 /* StrictEvalActivation.h */, + A730B6111250068F009D25B1 /* StrictEvalActivation.cpp */, ); path = runtime; sourceTree = ""; @@ -1828,6 +1852,9 @@ 86565740115BE3DA00291F40 /* CString.cpp */, 86565741115BE3DA00291F40 /* CString.h */, 86B99AE1117E578100DF5A90 /* StringBuffer.h */, + 86438FC31265503E00E0DFCA /* StringBuilder.cpp */, + 081469481264375E00DFF935 /* StringBuilder.h */, + 0896C29E1265AB0900B1CDD3 /* StringConcatenate.h */, 868BFA05117CEFD100B908B1 /* StringHash.h */, 868BFA06117CEFD100B908B1 /* StringImpl.cpp */, 868BFA07117CEFD100B908B1 /* StringImpl.h */, @@ -1944,8 +1971,13 @@ children = ( 9714AF31122F27E70092D9F5 /* RawURLBuffer.h */, 9714AF32122F27E70092D9F5 /* URLBuffer.h */, + 972A485D12661E0800F4514F /* URLCharacterTypes.cpp */, + 972A485E12661E0800F4514F /* URLCharacterTypes.h */, 9714AF33122F27E70092D9F5 /* URLComponent.h */, + 972A48741266256F00F4514F /* URLEscape.cpp */, + 972A48751266256F00F4514F /* URLEscape.h */, 9714AF34122F27E70092D9F5 /* URLParser.h */, + 972A48761266256F00F4514F /* URLQueryCanonicalizer.h */, 9714AF35122F27E70092D9F5 /* URLSegments.cpp */, 9714AF36122F27E70092D9F5 /* URLSegments.h */, ); @@ -2250,11 +2282,12 @@ 868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */, FE1B447A0ECCD73B004F4DD1 /* StdLibExtras.h in Headers */, 86B99AE3117E578100DF5A90 /* StringBuffer.h in Headers */, - 8698B86910D44D9400D8D01B /* StringBuilder.h in Headers */, + 081469491264378500DFF935 /* StringBuilder.h in Headers */, + 08CABBA61265AB3900B206CE /* StringConcatenate.h in Headers */, BC18C4660E16F5CD00B34460 /* StringConstructor.h in Headers */, BC18C4670E16F5CD00B34460 /* StringExtras.h in Headers */, 868BFA0D117CEFD100B908B1 /* StringHash.h in Headers */, - 5D63E9AD10F2BD6E00FC8AE9 /* StringHashFunctions.h in Headers */, + 5D63E9AD10F2BD6E00FC8AE9 /* StringHasher.h in Headers */, 868BFA0F117CEFD100B908B1 /* StringImpl.h in Headers */, 86B99AE4117E578100DF5A90 /* StringImplBase.h in Headers */, BC18C4680E16F5CD00B34460 /* StringObject.h in Headers */, @@ -2286,6 +2319,7 @@ BC18C4740E16F5CD00B34460 /* UnicodeIcu.h in Headers */, BC18C4750E16F5CD00B34460 /* UnusedParam.h in Headers */, BC18C4760E16F5CD00B34460 /* UString.h in Headers */, + 08DDA5C11264631700751732 /* UStringBuilder.h in Headers */, BC18C4770E16F5CD00B34460 /* UTF8.h in Headers */, E17FF771112131D200076A19 /* ValueCheck.h in Headers */, BC18C4780E16F5CD00B34460 /* Vector.h in Headers */, @@ -2302,7 +2336,6 @@ DD2724691208D1FF00F9ABE7 /* AlignedMemoryAllocator.h in Headers */, DDE82AD81209D955005C1756 /* GCHandle.h in Headers */, 86F38859121130CA007A7CE3 /* AtomicStringHash.h in Headers */, - 86B6DA0212132B9A000D316F /* StringConcatenate.h in Headers */, 862AF4B612239C7B0024E5B8 /* DecimalNumber.h in Headers */, BCFBE696122560E800309E9D /* PassOwnArrayPtr.h in Headers */, BCFBE698122561D200309E9D /* OwnArrayPtrCommon.h in Headers */, @@ -2314,6 +2347,8 @@ 9714AF5F122F32070092D9F5 /* ParsedURL.h in Headers */, 9714AF60122F32070092D9F5 /* URLString.h in Headers */, 90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */, + A730B6121250068F009D25B1 /* StrictEvalActivation.h in Headers */, + 933F5CDC1269229B0049191E /* NullPtr.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2407,6 +2442,7 @@ isa = PBXProject; buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */; compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, @@ -2768,6 +2804,9 @@ 9714AF46122F28850092D9F5 /* URLSegments.cpp in Sources */, 9714AF5E122F32070092D9F5 /* ParsedURL.cpp in Sources */, 90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */, + A730B6131250068F009D25B1 /* StrictEvalActivation.cpp in Sources */, + 86438FC41265503E00E0DFCA /* StringBuilder.cpp in Sources */, + 0F29479C126E698C00B3ABF5 /* DecimalNumber.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2777,6 +2816,8 @@ files = ( 932F5BDD0822A1C700736975 /* jsc.cpp in Sources */, DDE82AD31209D955005C1756 /* GCHandle.cpp in Sources */, + 972A485F12661E0800F4514F /* URLCharacterTypes.cpp in Sources */, + 972A48771266256F00F4514F /* URLEscape.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/JavaScriptCore/assembler/ARMv7Assembler.cpp b/JavaScriptCore/assembler/ARMv7Assembler.cpp index 233a6f1..7aa1f10 100644 --- a/JavaScriptCore/assembler/ARMv7Assembler.cpp +++ b/JavaScriptCore/assembler/ARMv7Assembler.cpp @@ -31,7 +31,10 @@ namespace JSC { -const int ARMv7Assembler::JumpSizes[] = { 0xffffffff, 2 * sizeof(uint16_t), 2 * sizeof(uint16_t), 5 * sizeof(uint16_t) }; +const int ARMv7Assembler::JumpSizes[] = { 0xffffffff, sizeof(uint16_t), sizeof(uint16_t), + 2 * sizeof(uint16_t), 2 * sizeof(uint16_t), 3 * sizeof(uint16_t), 5 * sizeof(uint16_t), 6 * sizeof(uint16_t) }; +const int ARMv7Assembler::JumpPaddingSizes[] = { 0, 5 * sizeof(uint16_t), 6 * sizeof(uint16_t), + 5 * sizeof(uint16_t), 6 * sizeof(uint16_t) }; } diff --git a/JavaScriptCore/assembler/ARMv7Assembler.h b/JavaScriptCore/assembler/ARMv7Assembler.h index d960546..37b650b 100644 --- a/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/JavaScriptCore/assembler/ARMv7Assembler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All rights reserved. + * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2010 University of Szeged * * Redistribution and use in source and binary forms, with or without @@ -440,7 +440,7 @@ private: }; struct { unsigned type : 2; - unsigned amount : 5; + unsigned amount : 6; }; } m_u; }; @@ -478,10 +478,11 @@ public: ConditionInvalid } Condition; - enum JumpType { JumpNoCondition, JumpCondition, JumpFullSize }; - enum JumpLinkType { LinkInvalid, LinkShortJump, LinkConditionalShortJump, LinkLongJump, JumpTypeCount }; - static const int JumpSizes[JumpTypeCount]; - enum { JumpPaddingSize = 5 * sizeof(uint16_t) }; + enum JumpType { JumpFixed, JumpNoCondition, JumpCondition, JumpNoConditionFixedSize, JumpConditionFixedSize, JumpTypeCount }; + enum JumpLinkType { LinkInvalid, LinkJumpT1, LinkJumpT2, LinkJumpT3, + LinkJumpT4, LinkConditionalJumpT4, LinkBX, LinkConditionalBX, JumpLinkTypeCount }; + static const int JumpSizes[JumpLinkTypeCount]; + static const int JumpPaddingSizes[JumpTypeCount]; class LinkRecord { public: LinkRecord(intptr_t from, intptr_t to, JumpType type, Condition condition) @@ -502,8 +503,8 @@ public: private: intptr_t m_from : 31; intptr_t m_to : 31; - JumpType m_type : 2; - JumpLinkType m_linkType : 3; + JumpType m_type : 3; + JumpLinkType m_linkType : 4; Condition m_condition : 16; }; @@ -523,7 +524,7 @@ public: , m_condition(ConditionInvalid) , m_type(type) { - ASSERT(m_type != JumpCondition); + ASSERT(m_type == JumpFixed || m_type == JumpNoCondition || m_type == JumpNoConditionFixedSize); } JmpSrc(int offset, JumpType type, Condition condition) @@ -531,7 +532,7 @@ public: , m_condition(condition) , m_type(type) { - ASSERT(m_type == JumpCondition || m_type == JumpFullSize); + ASSERT(m_type == JumpFixed || m_type == JumpCondition || m_type == JumpConditionFixedSize); } int m_offset; @@ -628,6 +629,8 @@ private: } OpcodeID; typedef enum { + OP_B_T1 = 0xD000, + OP_B_T2 = 0xE000, OP_AND_reg_T2 = 0xEA00, OP_TST_reg_T2 = 0xEA10, OP_ORR_reg_T2 = 0xEA40, @@ -655,6 +658,7 @@ private: OP_VCVT_FPIVFP = 0xEEB0, OP_VMOV_IMM_T2 = 0xEEB0, OP_VMRS = 0xEEB0, + OP_B_T3a = 0xF000, OP_B_T4a = 0xF000, OP_AND_imm_T1 = 0xF000, OP_TST_imm = 0xF010, @@ -707,6 +711,7 @@ private: OP_VCVT_FPIVFPb = 0x0A40, OP_VSUB_T2b = 0x0A40, OP_NOP_T2b = 0x8000, + OP_B_T3b = 0x8000, OP_B_T4b = 0x9000, } OpcodeID2; @@ -743,7 +748,7 @@ private: | (ifThenElseConditionBit(condition, inst3if) << 2) | (ifThenElseConditionBit(condition, inst4if) << 1) | 1; - ASSERT((condition != ConditionAL) || (mask & (mask - 1))); + ASSERT((condition != ConditionAL) || !(mask & (mask - 1))); return (condition << 4) | mask; } uint8_t ifThenElse(Condition condition, bool inst2if, bool inst3if) @@ -751,21 +756,20 @@ private: int mask = (ifThenElseConditionBit(condition, inst2if) << 3) | (ifThenElseConditionBit(condition, inst3if) << 2) | 2; - ASSERT((condition != ConditionAL) || (mask & (mask - 1))); + ASSERT((condition != ConditionAL) || !(mask & (mask - 1))); return (condition << 4) | mask; } uint8_t ifThenElse(Condition condition, bool inst2if) { int mask = (ifThenElseConditionBit(condition, inst2if) << 3) | 4; - ASSERT((condition != ConditionAL) || (mask & (mask - 1))); + ASSERT((condition != ConditionAL) || !(mask & (mask - 1))); return (condition << 4) | mask; } uint8_t ifThenElse(Condition condition) { int mask = 8; - ASSERT((condition != ConditionAL) || (mask & (mask - 1))); return (condition << 4) | mask; } @@ -1662,7 +1666,7 @@ public: return static_cast(m_formatter.data())[location / sizeof(int32_t) - 1]; } - int jumpSizeDelta(JumpLinkType jumpLinkType) { return JumpPaddingSize - JumpSizes[jumpLinkType]; } + int jumpSizeDelta(JumpType jumpType, JumpLinkType jumpLinkType) { return JumpPaddingSizes[jumpType] - JumpSizes[jumpLinkType]; } // Assembler admin methods: @@ -1676,30 +1680,73 @@ public: return a.from() < b.from(); } - JumpLinkType computeJumpType(LinkRecord& record, const uint8_t* from, const uint8_t* to) + bool canCompact(JumpType jumpType) { - if (record.type() >= JumpFullSize) { - record.setLinkType(LinkLongJump); - return LinkLongJump; - } + // The following cannot be compacted: + // JumpFixed: represents custom jump sequence + // JumpNoConditionFixedSize: represents unconditional jump that must remain a fixed size + // JumpConditionFixedSize: represents conditional jump that must remain a fixed size + return (jumpType == JumpNoCondition) || (jumpType == JumpCondition); + } + + JumpLinkType computeJumpType(JumpType jumpType, const uint8_t* from, const uint8_t* to) + { + if (jumpType == JumpFixed) + return LinkInvalid; + + // for patchable jump we must leave space for the longest code sequence + if (jumpType == JumpNoConditionFixedSize) + return LinkBX; + if (jumpType == JumpConditionFixedSize) + return LinkConditionalBX; + + const int paddingSize = JumpPaddingSizes[jumpType]; bool mayTriggerErrata = false; - const uint16_t* shortJumpLocation = reinterpret_cast(from - (JumpPaddingSize - JumpSizes[LinkShortJump])); - if (!canBeShortJump(shortJumpLocation, to, mayTriggerErrata)) { - record.setLinkType(LinkLongJump); - return LinkLongJump; - } - if (mayTriggerErrata) { - record.setLinkType(LinkLongJump); - return LinkLongJump; - } - if (record.type() == JumpCondition) { - record.setLinkType(LinkConditionalShortJump); - return LinkConditionalShortJump; + + if (jumpType == JumpCondition) { + // 2-byte conditional T1 + const uint16_t* jumpT1Location = reinterpret_cast(from - (paddingSize - JumpSizes[LinkJumpT1])); + if (canBeJumpT1(jumpT1Location, to)) + return LinkJumpT1; + // 4-byte conditional T3 + const uint16_t* jumpT3Location = reinterpret_cast(from - (paddingSize - JumpSizes[LinkJumpT3])); + if (canBeJumpT3(jumpT3Location, to, mayTriggerErrata)) { + if (!mayTriggerErrata) + return LinkJumpT3; + } + // 4-byte conditional T4 with IT + const uint16_t* conditionalJumpT4Location = + reinterpret_cast(from - (paddingSize - JumpSizes[LinkConditionalJumpT4])); + if (canBeJumpT4(conditionalJumpT4Location, to, mayTriggerErrata)) { + if (!mayTriggerErrata) + return LinkConditionalJumpT4; + } + } else { + // 2-byte unconditional T2 + const uint16_t* jumpT2Location = reinterpret_cast(from - (paddingSize - JumpSizes[LinkJumpT2])); + if (canBeJumpT2(jumpT2Location, to)) + return LinkJumpT2; + // 4-byte unconditional T4 + const uint16_t* jumpT4Location = reinterpret_cast(from - (paddingSize - JumpSizes[LinkJumpT4])); + if (canBeJumpT4(jumpT4Location, to, mayTriggerErrata)) { + if (!mayTriggerErrata) + return LinkJumpT4; + } + // use long jump sequence + return LinkBX; } - record.setLinkType(LinkShortJump); - return LinkShortJump; + + ASSERT(jumpType == JumpCondition); + return LinkConditionalBX; } - + + JumpLinkType computeJumpType(LinkRecord& record, const uint8_t* from, const uint8_t* to) + { + JumpLinkType linkType = computeJumpType(record.type(), from, to); + record.setLinkType(linkType); + return linkType; + } + void recordLinkOffsets(int32_t regionStart, int32_t regionEnd, int32_t offset) { int32_t ptr = regionStart / sizeof(int32_t); @@ -1717,16 +1764,32 @@ public: void link(LinkRecord& record, uint8_t* from, uint8_t* to) { - uint16_t* itttLocation; - if (record.linkType() == LinkConditionalShortJump) { - itttLocation = reinterpret_cast(from - JumpSizes[LinkConditionalShortJump] - 2); - itttLocation[0] = ifThenElse(record.condition()) | OP_IT; + switch (record.linkType()) { + case LinkJumpT1: + linkJumpT1(record.condition(), reinterpret_cast(from), to); + break; + case LinkJumpT2: + linkJumpT2(reinterpret_cast(from), to); + break; + case LinkJumpT3: + linkJumpT3(record.condition(), reinterpret_cast(from), to); + break; + case LinkJumpT4: + linkJumpT4(reinterpret_cast(from), to); + break; + case LinkConditionalJumpT4: + linkConditionalJumpT4(record.condition(), reinterpret_cast(from), to); + break; + case LinkConditionalBX: + linkConditionalBX(record.condition(), reinterpret_cast(from), to); + break; + case LinkBX: + linkBX(reinterpret_cast(from), to); + break; + default: + ASSERT_NOT_REACHED(); + break; } - ASSERT(record.linkType() != LinkInvalid); - if (record.linkType() != LinkLongJump) - linkShortJump(reinterpret_cast(from), to); - else - linkLongJump(reinterpret_cast(from), to); } void* unlinkedCode() { return m_formatter.data(); } @@ -1792,8 +1855,6 @@ public: ASSERT(reinterpret_cast(to) & 1); setPointer(reinterpret_cast(from) - 1, to); - - ExecutableAllocator::cacheFlush(reinterpret_cast(from) - 5, 4 * sizeof(uint16_t)); } static void repatchInt32(void* where, int32_t value) @@ -1801,8 +1862,6 @@ public: ASSERT(!(reinterpret_cast(where) & 1)); setInt32(where, value); - - ExecutableAllocator::cacheFlush(reinterpret_cast(where) - 4, 4 * sizeof(uint16_t)); } static void repatchPointer(void* where, void* value) @@ -1810,8 +1869,6 @@ public: ASSERT(!(reinterpret_cast(where) & 1)); setPointer(where, value); - - ExecutableAllocator::cacheFlush(reinterpret_cast(where) - 4, 4 * sizeof(uint16_t)); } static void repatchLoadPtrToLEA(void* where) @@ -1952,7 +2009,54 @@ private: return (instruction[0] == OP_NOP_T2a) && (instruction[1] == OP_NOP_T2b); } - static bool canBeShortJump(const uint16_t* instruction, const void* target, bool& mayTriggerErrata) + static bool canBeJumpT1(const uint16_t* instruction, const void* target) + { + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + // It does not appear to be documented in the ARM ARM (big surprise), but + // for OP_B_T1 the branch displacement encoded in the instruction is 2 + // less than the actual displacement. + relative -= 2; + return ((relative << 23) >> 23) == relative; + } + + static bool canBeJumpT2(const uint16_t* instruction, const void* target) + { + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + // It does not appear to be documented in the ARM ARM (big surprise), but + // for OP_B_T2 the branch displacement encoded in the instruction is 2 + // less than the actual displacement. + relative -= 2; + return ((relative << 20) >> 20) == relative; + } + + static bool canBeJumpT3(const uint16_t* instruction, const void* target, bool& mayTriggerErrata) + { + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + // From Cortex-A8 errata: + // If the 32-bit Thumb-2 branch instruction spans two 4KiB regions and + // the target of the branch falls within the first region it is + // possible for the processor to incorrectly determine the branch + // instruction, and it is also possible in some cases for the processor + // to enter a deadlock state. + // The instruction is spanning two pages if it ends at an address ending 0x002 + bool spansTwo4K = ((reinterpret_cast(instruction) & 0xfff) == 0x002); + mayTriggerErrata = spansTwo4K; + // The target is in the first page if the jump branch back by [3..0x1002] bytes + bool targetInFirstPage = (relative >= -0x1002) && (relative < -2); + bool wouldTriggerA8Errata = spansTwo4K && targetInFirstPage; + return ((relative << 11) >> 11) == relative && !wouldTriggerA8Errata; + } + + static bool canBeJumpT4(const uint16_t* instruction, const void* target, bool& mayTriggerErrata) { ASSERT(!(reinterpret_cast(instruction) & 1)); ASSERT(!(reinterpret_cast(target) & 1)); @@ -1972,50 +2076,127 @@ private: bool wouldTriggerA8Errata = spansTwo4K && targetInFirstPage; return ((relative << 7) >> 7) == relative && !wouldTriggerA8Errata; } - - static void linkLongJump(uint16_t* instruction, void* target) + + void linkJumpT1(Condition cond, uint16_t* instruction, void* target) { - linkJumpAbsolute(instruction, target); + // FIMXE: this should be up in the MacroAssembler layer. :-( + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + ASSERT(canBeJumpT1(instruction, target)); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + // It does not appear to be documented in the ARM ARM (big surprise), but + // for OP_B_T1 the branch displacement encoded in the instruction is 2 + // less than the actual displacement. + relative -= 2; + + // All branch offsets should be an even distance. + ASSERT(!(relative & 1)); + instruction[-1] = OP_B_T1 | ((cond & 0xf) << 8) | ((relative & 0x1fe) >> 1); } - static void linkShortJump(uint16_t* instruction, void* target) + static void linkJumpT2(uint16_t* instruction, void* target) { // FIMXE: this should be up in the MacroAssembler layer. :-( ASSERT(!(reinterpret_cast(instruction) & 1)); ASSERT(!(reinterpret_cast(target) & 1)); + ASSERT(canBeJumpT2(instruction, target)); intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + // It does not appear to be documented in the ARM ARM (big surprise), but + // for OP_B_T2 the branch displacement encoded in the instruction is 2 + // less than the actual displacement. + relative -= 2; + + // All branch offsets should be an even distance. + ASSERT(!(relative & 1)); + instruction[-1] = OP_B_T2 | ((relative & 0xffe) >> 1); + } + + void linkJumpT3(Condition cond, uint16_t* instruction, void* target) + { + // FIMXE: this should be up in the MacroAssembler layer. :-( + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); bool scratch; UNUSED_PARAM(scratch); - ASSERT(canBeShortJump(instruction, target, scratch)); + ASSERT(canBeJumpT3(instruction, target, scratch)); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + + // All branch offsets should be an even distance. + ASSERT(!(relative & 1)); + instruction[-2] = OP_B_T3a | ((relative & 0x100000) >> 10) | ((cond & 0xf) << 6) | ((relative & 0x3f000) >> 12); + instruction[-1] = OP_B_T3b | ((relative & 0x80000) >> 8) | ((relative & 0x40000) >> 5) | ((relative & 0xffe) >> 1); + } + + static void linkJumpT4(uint16_t* instruction, void* target) + { + // FIMXE: this should be up in the MacroAssembler layer. :-( + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + bool scratch; + UNUSED_PARAM(scratch); + ASSERT(canBeJumpT4(instruction, target, scratch)); + + intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); // ARM encoding for the top two bits below the sign bit is 'peculiar'. if (relative >= 0) relative ^= 0xC00000; - + // All branch offsets should be an even distance. ASSERT(!(relative & 1)); instruction[-2] = OP_B_T4a | ((relative & 0x1000000) >> 14) | ((relative & 0x3ff000) >> 12); instruction[-1] = OP_B_T4b | ((relative & 0x800000) >> 10) | ((relative & 0x400000) >> 11) | ((relative & 0xffe) >> 1); } - + + void linkConditionalJumpT4(Condition cond, uint16_t* instruction, void* target) + { + // FIMXE: this should be up in the MacroAssembler layer. :-( + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + instruction[-3] = ifThenElse(cond) | OP_IT; + linkJumpT4(instruction, target); + } + + static void linkBX(uint16_t* instruction, void* target) + { + // FIMXE: this should be up in the MacroAssembler layer. :-( + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + const uint16_t JUMP_TEMPORARY_REGISTER = ARMRegisters::ip; + ARMThumbImmediate lo16 = ARMThumbImmediate::makeUInt16(static_cast(reinterpret_cast(target) + 1)); + ARMThumbImmediate hi16 = ARMThumbImmediate::makeUInt16(static_cast(reinterpret_cast(target) >> 16)); + instruction[-5] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOV_imm_T3, lo16); + instruction[-4] = twoWordOp5i6Imm4Reg4EncodedImmSecond(JUMP_TEMPORARY_REGISTER, lo16); + instruction[-3] = twoWordOp5i6Imm4Reg4EncodedImmFirst(OP_MOVT, hi16); + instruction[-2] = twoWordOp5i6Imm4Reg4EncodedImmSecond(JUMP_TEMPORARY_REGISTER, hi16); + instruction[-1] = OP_BX | (JUMP_TEMPORARY_REGISTER << 3); + } + + void linkConditionalBX(Condition cond, uint16_t* instruction, void* target) + { + // FIMXE: this should be up in the MacroAssembler layer. :-( + ASSERT(!(reinterpret_cast(instruction) & 1)); + ASSERT(!(reinterpret_cast(target) & 1)); + + linkBX(instruction, target); + instruction[-6] = ifThenElse(cond, true, true) | OP_IT; + } + static void linkJumpAbsolute(uint16_t* instruction, void* target) { // FIMXE: this should be up in the MacroAssembler layer. :-( ASSERT(!(reinterpret_cast(instruction) & 1)); ASSERT(!(reinterpret_cast(target) & 1)); - + ASSERT((isMOV_imm_T3(instruction - 5) && isMOVT(instruction - 3) && isBX(instruction - 1)) - || (isNOP_T1(instruction - 5) && isNOP_T2(instruction - 4) && isB(instruction - 2))); - - intptr_t relative = reinterpret_cast(target) - (reinterpret_cast(instruction)); + || (isNOP_T1(instruction - 5) && isNOP_T2(instruction - 4) && isB(instruction - 2))); + bool scratch; - if (canBeShortJump(instruction, target, scratch)) { - // ARM encoding for the top two bits below the sign bit is 'peculiar'. - if (relative >= 0) - relative ^= 0xC00000; - - // All branch offsets should be an even distance. - ASSERT(!(relative & 1)); + if (canBeJumpT4(instruction, target, scratch)) { // There may be a better way to fix this, but right now put the NOPs first, since in the // case of an conditional branch this will be coming after an ITTT predicating *three* // instructions! Looking backwards to modify the ITTT to an IT is not easy, due to @@ -2024,8 +2205,7 @@ private: instruction[-5] = OP_NOP_T1; instruction[-4] = OP_NOP_T2a; instruction[-3] = OP_NOP_T2b; - instruction[-2] = OP_B_T4a | ((relative & 0x1000000) >> 14) | ((relative & 0x3ff000) >> 12); - instruction[-1] = OP_B_T4b | ((relative & 0x800000) >> 10) | ((relative & 0x400000) >> 11) | ((relative & 0xffe) >> 1); + linkJumpT4(instruction, target); } else { const uint16_t JUMP_TEMPORARY_REGISTER = ARMRegisters::ip; ARMThumbImmediate lo16 = ARMThumbImmediate::makeUInt16(static_cast(reinterpret_cast(target) + 1)); @@ -2037,7 +2217,7 @@ private: instruction[-1] = OP_BX | (JUMP_TEMPORARY_REGISTER << 3); } } - + static uint16_t twoWordOp5i6Imm4Reg4EncodedImmFirst(uint16_t op, ARMThumbImmediate imm) { return op | (imm.m_value.i << 10) | imm.m_value.imm4; diff --git a/JavaScriptCore/assembler/LinkBuffer.h b/JavaScriptCore/assembler/LinkBuffer.h index 408deb0..e1dca0b 100644 --- a/JavaScriptCore/assembler/LinkBuffer.h +++ b/JavaScriptCore/assembler/LinkBuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All rights reserved. + * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,6 +28,9 @@ #if ENABLE(ASSEMBLER) +#define DUMP_LINK_STATISTICS 0 +#define DUMP_CODE 0 + #include #include @@ -235,12 +238,14 @@ private: target = linkBase + jumpsToLink[i].to() - m_assembler->executableOffsetFor(jumpsToLink[i].to()); JumpLinkType jumpLinkType = m_assembler->computeJumpType(jumpsToLink[i], linkBase + writePtr, target); - - // Step back in the write stream - int32_t delta = m_assembler->jumpSizeDelta(jumpLinkType); - if (delta) { - writePtr -= delta; - m_assembler->recordLinkOffsets(jumpsToLink[i].from() - delta, readPtr, readPtr - writePtr); + // Compact branch if we can... + if (m_assembler->canCompact(jumpsToLink[i].type())) { + // Step back in the write stream + int32_t delta = m_assembler->jumpSizeDelta(jumpsToLink[i].type(), jumpLinkType); + if (delta) { + writePtr -= delta; + m_assembler->recordLinkOffsets(jumpsToLink[i].from() - delta, readPtr, readPtr - writePtr); + } } jumpsToLink[i].setFrom(writePtr); } @@ -261,6 +266,13 @@ private: jumpsToLink.clear(); m_size = writePtr + m_assembler->size() - readPtr; m_executablePool->returnLastBytes(initialSize - m_size); + +#if DUMP_LINK_STATISTICS + dumpLinkStatistics(m_code, initialSize, m_size); +#endif +#if DUMP_CODE + dumpCode(m_code, m_size); +#endif #endif } @@ -275,6 +287,53 @@ private: ExecutableAllocator::cacheFlush(code(), m_size); } +#if DUMP_LINK_STATISTICS + static void dumpLinkStatistics(void* code, size_t initialSize, size_t finalSize) + { + static unsigned linkCount = 0; + static unsigned totalInitialSize = 0; + static unsigned totalFinalSize = 0; + linkCount++; + totalInitialSize += initialSize; + totalFinalSize += finalSize; + printf("link %p: orig %u, compact %u (delta %u, %.2f%%)\n", + code, static_cast(initialSize), static_cast(finalSize), + static_cast(initialSize - finalSize), + 100.0 * (initialSize - finalSize) / initialSize); + printf("\ttotal %u: orig %u, compact %u (delta %u, %.2f%%)\n", + linkCount, totalInitialSize, totalFinalSize, totalInitialSize - totalFinalSize, + 100.0 * (totalInitialSize - totalFinalSize) / totalInitialSize); + } +#endif + +#if DUMP_CODE + static void dumpCode(void* code, size_t size) + { +#if CPU(ARM_THUMB2) + // Dump the generated code in an asm file format that can be assembled and then disassembled + // for debugging purposes. For example, save this output as jit.s: + // gcc -arch armv7 -c jit.s + // otool -tv jit.o + static unsigned codeCount = 0; + unsigned short* tcode = static_cast(code); + size_t tsize = size / sizeof(short); + char nameBuf[128]; + snprintf(nameBuf, sizeof(nameBuf), "_jsc_jit%u", codeCount++); + printf("\t.syntax unified\n" + "\t.section\t__TEXT,__text,regular,pure_instructions\n" + "\t.globl\t%s\n" + "\t.align 2\n" + "\t.code 16\n" + "\t.thumb_func\t%s\n" + "# %p\n" + "%s:\n", nameBuf, nameBuf, code, nameBuf); + + for (unsigned i = 0; i < tsize; i++) + printf("\t.short\t0x%x\n", tcode[i]); +#endif + } +#endif + RefPtr m_executablePool; size_t m_size; void* m_code; diff --git a/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/JavaScriptCore/assembler/MacroAssemblerARMv7.h index a1539f2..fe5d052 100644 --- a/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All rights reserved. + * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2010 University of Szeged * * Redistribution and use in source and binary forms, with or without @@ -46,6 +46,7 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler { public: typedef ARMv7Assembler::LinkRecord LinkRecord; + typedef ARMv7Assembler::JumpType JumpType; typedef ARMv7Assembler::JumpLinkType JumpLinkType; MacroAssemblerARMv7() @@ -57,9 +58,11 @@ public: void endUninterruptedSequence() { m_inUninterruptedSequence = false; } Vector& jumpsToLink() { return m_assembler.jumpsToLink(); } void* unlinkedCode() { return m_assembler.unlinkedCode(); } + bool canCompact(JumpType jumpType) { return m_assembler.canCompact(jumpType); } + JumpLinkType computeJumpType(JumpType jumpType, const uint8_t* from, const uint8_t* to) { return m_assembler.computeJumpType(jumpType, from, to); } JumpLinkType computeJumpType(LinkRecord& record, const uint8_t* from, const uint8_t* to) { return m_assembler.computeJumpType(record, from, to); } void recordLinkOffsets(int32_t regionStart, int32_t regionEnd, int32_t offset) {return m_assembler.recordLinkOffsets(regionStart, regionEnd, offset); } - int jumpSizeDelta(JumpLinkType jumpLinkType) { return m_assembler.jumpSizeDelta(jumpLinkType); } + int jumpSizeDelta(JumpType jumpType, JumpLinkType jumpLinkType) { return m_assembler.jumpSizeDelta(jumpType, jumpLinkType); } void link(LinkRecord& record, uint8_t* from, uint8_t* to) { return m_assembler.link(record, from, to); } struct ArmAddress { @@ -986,14 +989,14 @@ public: void jump(RegisterID target) { - m_assembler.bx(target, inUninterruptedSequence() ? ARMv7Assembler::JumpFullSize : ARMv7Assembler::JumpNoCondition); + m_assembler.bx(target, ARMv7Assembler::JumpFixed); } // Address is a memory location containing the address to jump to void jump(Address address) { load32(address, dataTempRegister); - m_assembler.bx(dataTempRegister, inUninterruptedSequence() ? ARMv7Assembler::JumpFullSize : ARMv7Assembler::JumpNoCondition); + m_assembler.bx(dataTempRegister, ARMv7Assembler::JumpFixed); } @@ -1082,29 +1085,29 @@ public: Call nearCall() { moveFixedWidthEncoding(Imm32(0), dataTempRegister); - return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFullSize), Call::LinkableNear); + return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFixed), Call::LinkableNear); } Call call() { moveFixedWidthEncoding(Imm32(0), dataTempRegister); - return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFullSize), Call::Linkable); + return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFixed), Call::Linkable); } Call call(RegisterID target) { - return Call(m_assembler.blx(target, ARMv7Assembler::JumpFullSize), Call::None); + return Call(m_assembler.blx(target, ARMv7Assembler::JumpFixed), Call::None); } Call call(Address address) { load32(address, dataTempRegister); - return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFullSize), Call::None); + return Call(m_assembler.blx(dataTempRegister, ARMv7Assembler::JumpFixed), Call::None); } void ret() { - m_assembler.bx(linkRegister, ARMv7Assembler::JumpFullSize); + m_assembler.bx(linkRegister, ARMv7Assembler::JumpFixed); } void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) @@ -1204,7 +1207,7 @@ public: { // Like a normal call, but don't link. moveFixedWidthEncoding(Imm32(0), dataTempRegister); - return Call(m_assembler.bx(dataTempRegister, ARMv7Assembler::JumpFullSize), Call::Linkable); + return Call(m_assembler.bx(dataTempRegister, ARMv7Assembler::JumpFixed), Call::Linkable); } Call makeTailRecursiveCall(Jump oldJump) @@ -1228,14 +1231,14 @@ protected: ARMv7Assembler::JmpSrc makeJump() { moveFixedWidthEncoding(Imm32(0), dataTempRegister); - return m_assembler.bx(dataTempRegister, inUninterruptedSequence() ? ARMv7Assembler::JumpFullSize : ARMv7Assembler::JumpNoCondition); + 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); - return m_assembler.bx(dataTempRegister, inUninterruptedSequence() ? ARMv7Assembler::JumpFullSize : ARMv7Assembler::JumpCondition, cond); + return m_assembler.bx(dataTempRegister, inUninterruptedSequence() ? ARMv7Assembler::JumpConditionFixedSize : ARMv7Assembler::JumpCondition, cond); } ARMv7Assembler::JmpSrc makeBranch(Condition cond) { return makeBranch(armV7Condition(cond)); } ARMv7Assembler::JmpSrc makeBranch(DoubleCondition cond) { return makeBranch(armV7Condition(cond)); } diff --git a/JavaScriptCore/bytecode/CodeBlock.cpp b/JavaScriptCore/bytecode/CodeBlock.cpp index 6c0696e..55101d4 100644 --- a/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/JavaScriptCore/bytecode/CodeBlock.cpp @@ -34,10 +34,11 @@ #include "Debugger.h" #include "Interpreter.h" #include "JIT.h" +#include "JSActivation.h" #include "JSFunction.h" #include "JSStaticScopeObject.h" #include "JSValue.h" -#include "StringConcatenate.h" +#include "UStringConcatenate.h" #include #include @@ -52,7 +53,7 @@ static UString escapeQuotes(const UString& str) UString result = str; size_t pos = 0; while ((pos = result.find('\"', pos)) != notFound) { - result = makeString(result.substringSharingImpl(0, pos), "\"\\\"\"", result.substringSharingImpl(pos + 1)); + result = makeUString(result.substringSharingImpl(0, pos), "\"\\\"\"", result.substringSharingImpl(pos + 1)); pos += 4; } return result; @@ -64,19 +65,19 @@ static UString valueToSourceString(ExecState* exec, JSValue val) return "0"; if (val.isString()) - return makeString("\"", escapeQuotes(val.toString(exec)), "\""); + return makeUString("\"", escapeQuotes(val.toString(exec)), "\""); return val.toString(exec); } static CString constantName(ExecState* exec, int k, JSValue value) { - return makeString(valueToSourceString(exec, value), "(@k", UString::number(k - FirstConstantRegisterIndex), ")").utf8(); + return makeUString(valueToSourceString(exec, value), "(@k", UString::number(k - FirstConstantRegisterIndex), ")").utf8(); } static CString idName(int id0, const Identifier& ident) { - return makeString(ident.ustring(), "(@id", UString::number(id0), ")").utf8(); + return makeUString(ident.ustring(), "(@id", UString::number(id0), ")").utf8(); } CString CodeBlock::registerName(ExecState* exec, int r) const @@ -87,7 +88,7 @@ CString CodeBlock::registerName(ExecState* exec, int r) const if (isConstantRegisterIndex(r)) return constantName(exec, r, getConstant(r)); - return makeString("r", UString::number(r)).utf8(); + return makeUString("r", UString::number(r)).utf8(); } static UString regexpToSourceString(RegExp* regExp) @@ -101,12 +102,12 @@ static UString regexpToSourceString(RegExp* regExp) if (regExp->multiline()) postfix[index] = 'm'; - return makeString("/", regExp->pattern(), postfix); + return makeUString("/", regExp->pattern(), postfix); } static CString regexpName(int re, RegExp* regexp) { - return makeString(regexpToSourceString(regexp), "(@re", UString::number(re), ")").utf8(); + return makeUString(regexpToSourceString(regexp), "(@re", UString::number(re), ")").utf8(); } static UString pointerToSourceString(void* p) @@ -485,9 +486,9 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& printf("[%4d] enter\n", location); break; } - case op_enter_with_activation: { + case op_create_activation: { int r0 = (++it)->u.operand; - printf("[%4d] enter_with_activation %s\n", location, registerName(exec, r0).data()); + printf("[%4d] create_activation %s\n", location, registerName(exec, r0).data()); break; } case op_create_arguments: { @@ -516,6 +517,11 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& printf("[%4d] convert_this %s\n", location, registerName(exec, r0).data()); break; } + case op_convert_this_strict: { + int r0 = (++it)->u.operand; + printf("[%4d] convert_this_strict %s\n", location, registerName(exec, r0).data()); + break; + } case op_new_object: { int r0 = (++it)->u.operand; printf("[%4d] new_object\t %s\n", location, registerName(exec, r0).data()); @@ -722,9 +728,8 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int id0 = (++it)->u.operand; JSValue scope = JSValue((++it)->u.jsCell); ++it; - int depth = it[2].u.operand; + 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); - it += 3; break; } case op_get_scoped_var: { @@ -756,7 +761,14 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& case op_resolve_base: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] resolve_base\t %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data()); + int isStrict = (++it)->u.operand; + printf("[%4d] resolve_base%s\t %s, %s\n", location, isStrict ? "_strict" : "", registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data()); + break; + } + case op_ensure_property_exists: { + int r0 = (++it)->u.operand; + int id0 = (++it)->u.operand; + printf("[%4d] ensure_property_exists\t %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data()); break; } case op_resolve_with_base: { @@ -1134,9 +1146,12 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_next_pname: { int dest = it[1].u.operand; - int iter = it[4].u.operand; - int offset = it[5].u.operand; - printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(exec, dest).data(), registerName(exec, iter).data(), offset, location + offset); + int base = it[2].u.operand; + int i = it[3].u.operand; + int size = it[4].u.operand; + int iter = it[5].u.operand; + int offset = it[6].u.operand; + printf("[%4d] next_pname\t %s, %s, %s, %s, %s, %d(->%d)\n", location, registerName(exec, dest).data(), registerName(exec, base).data(), registerName(exec, i).data(), registerName(exec, size).data(), registerName(exec, iter).data(), offset, location + offset); it += OPCODE_LENGTH(op_next_pname) - 1; break; } @@ -1371,6 +1386,7 @@ CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, JSGlo , m_needsFullScopeChain(ownerExecutable->needsActivation()) , m_usesEval(ownerExecutable->usesEval()) , m_isNumericCompareFunction(false) + , m_isStrictMode(ownerExecutable->isStrictMode()) , m_codeType(codeType) , m_source(sourceProvider) , m_sourceOffset(sourceOffset) @@ -1542,6 +1558,10 @@ bool CodeBlock::reparseForExceptionInfoIfNecessary(CallFrame* callFrame) ASSERT(!m_rareData || !m_rareData->m_exceptionHandlers.size()); ScopeChainNode* scopeChain = callFrame->scopeChain(); if (m_needsFullScopeChain) { + if (codeType() == FunctionCode && !callFrame->r(activationRegister()).jsValue()) { + createActivation(callFrame); + scopeChain = callFrame->scopeChain(); + } ScopeChain sc(scopeChain); int scopeDelta = sc.localDepth(); if (m_codeType == EvalCode) @@ -1553,7 +1573,7 @@ bool CodeBlock::reparseForExceptionInfoIfNecessary(CallFrame* callFrame) scopeChain = scopeChain->next; } - m_exceptionInfo = m_ownerExecutable->reparseExceptionInfo(m_globalData, scopeChain, this); + m_exceptionInfo = m_ownerExecutable->reparseExceptionInfo(scopeChain, this); return m_exceptionInfo; } @@ -1765,4 +1785,14 @@ void CodeBlock::shrinkToFit() } } +void CodeBlock::createActivation(CallFrame* callFrame) +{ + ASSERT(codeType() == FunctionCode); + ASSERT(needsFullScopeChain()); + ASSERT(!callFrame->r(activationRegister()).jsValue()); + JSActivation* activation = new (callFrame) JSActivation(callFrame, static_cast(ownerExecutable())); + callFrame->r(activationRegister()) = JSValue(activation); + callFrame->setScopeChain(callFrame->scopeChain()->copy()->push(activation)); +} + } // namespace JSC diff --git a/JavaScriptCore/bytecode/CodeBlock.h b/JavaScriptCore/bytecode/CodeBlock.h index cda4530..e4ebeb8 100644 --- a/JavaScriptCore/bytecode/CodeBlock.h +++ b/JavaScriptCore/bytecode/CodeBlock.h @@ -297,9 +297,11 @@ namespace JSC { void printStructure(const char* name, const Instruction*, int operand) const; #endif + bool isStrictMode() const { return m_isStrictMode; } + inline bool isKnownNotImmediate(int index) { - if (index == m_thisRegister) + if (index == m_thisRegister && !m_isStrictMode) return true; if (isConstantRegisterIndex(index)) @@ -408,6 +410,15 @@ namespace JSC { ASSERT(usesArguments()); return m_argumentsRegister; } + void setActivationRegister(int activationRegister) + { + m_activationRegister = activationRegister; + } + int activationRegister() + { + ASSERT(needsFullScopeChain()); + return m_activationRegister; + } bool usesArguments() const { return m_argumentsRegister != -1; } CodeType codeType() const { return m_codeType; } @@ -420,6 +431,8 @@ namespace JSC { unsigned jumpTarget(int index) const { return m_jumpTargets[index]; } unsigned lastJumpTarget() const { return m_jumpTargets.last(); } + void createActivation(CallFrame*); + #if ENABLE(INTERPRETER) void addPropertyAccessInstruction(unsigned propertyAccessInstruction) { m_propertyAccessInstructions.append(propertyAccessInstruction); } void addGlobalResolveInstruction(unsigned globalResolveInstruction) { m_globalResolveInstructions.append(globalResolveInstruction); } @@ -548,10 +561,12 @@ namespace JSC { int m_thisRegister; int m_argumentsRegister; + int m_activationRegister; bool m_needsFullScopeChain; bool m_usesEval; bool m_isNumericCompareFunction; + bool m_isStrictMode; CodeType m_codeType; diff --git a/JavaScriptCore/bytecode/EvalCodeCache.h b/JavaScriptCore/bytecode/EvalCodeCache.h index 7c4cb33..edd575f 100644 --- a/JavaScriptCore/bytecode/EvalCodeCache.h +++ b/JavaScriptCore/bytecode/EvalCodeCache.h @@ -43,20 +43,20 @@ namespace JSC { class EvalCodeCache { public: - PassRefPtr get(ExecState* exec, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) + PassRefPtr get(ExecState* exec, bool inStrictContext, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) { RefPtr evalExecutable; - if (evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject()) + if (!inStrictContext && evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject()) evalExecutable = m_cacheMap.get(evalSource.impl()); if (!evalExecutable) { - evalExecutable = EvalExecutable::create(exec, makeSource(evalSource)); + evalExecutable = EvalExecutable::create(exec, makeSource(evalSource), inStrictContext); exceptionValue = evalExecutable->compile(exec, scopeChain); if (exceptionValue) return 0; - if (evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries) + if (!inStrictContext && evalSource.length() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries) m_cacheMap.set(evalSource.impl(), evalExecutable); } diff --git a/JavaScriptCore/bytecode/Opcode.h b/JavaScriptCore/bytecode/Opcode.h index 03f6573..e1ef01e 100644 --- a/JavaScriptCore/bytecode/Opcode.h +++ b/JavaScriptCore/bytecode/Opcode.h @@ -39,12 +39,13 @@ namespace JSC { #define FOR_EACH_OPCODE_ID(macro) \ macro(op_enter, 1) \ - macro(op_enter_with_activation, 2) \ + macro(op_create_activation, 2) \ macro(op_init_lazy_reg, 2) \ macro(op_create_arguments, 2) \ macro(op_create_this, 3) \ macro(op_get_callee, 2) \ macro(op_convert_this, 2) \ + macro(op_convert_this_strict, 2) \ \ macro(op_new_object, 2) \ macro(op_new_array, 4) \ @@ -99,7 +100,8 @@ namespace JSC { macro(op_put_scoped_var, 4) \ macro(op_get_global_var, 3) \ macro(op_put_global_var, 3) \ - macro(op_resolve_base, 3) \ + macro(op_resolve_base, 4) \ + macro(op_ensure_property_exists, 3) \ macro(op_resolve_with_base, 4) \ macro(op_get_by_id, 8) \ macro(op_get_by_id_self, 8) \ diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 986709b..f34c38c 100644 --- a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -214,6 +214,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d , m_nextGlobalIndex(-1) , m_nextConstantOffset(0) , m_globalConstantIndex(0) + , m_hasCreatedActivation(true) , m_firstLazyFunction(0) , m_lastLazyFunction(0) , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) @@ -306,10 +307,14 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug , m_codeType(FunctionCode) , m_nextConstantOffset(0) , m_globalConstantIndex(0) + , m_hasCreatedActivation(false) , m_firstLazyFunction(0) , m_lastLazyFunction(0) , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) , m_lastOpcodeID(op_end) +#ifndef NDEBUG + , m_lastOpcodePosition(0) +#endif , m_emitNodeDepth(0) , m_usesExceptions(false) , m_regeneratingForExceptionInfo(false) @@ -319,13 +324,13 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug m_codeBlock->setNeedsFullScopeChain(true); codeBlock->setGlobalData(m_globalData); - + + emitOpcode(op_enter); if (m_codeBlock->needsFullScopeChain()) { m_activationRegister = addVar(); - emitOpcode(op_enter_with_activation); - instructions().append(m_activationRegister->index()); - } else - emitOpcode(op_enter); + emitInitLazyRegister(m_activationRegister); + m_codeBlock->setActivationRegister(m_activationRegister->index()); + } // Both op_tear_off_activation and op_tear_off_arguments tear off the 'arguments' // object, if created. @@ -341,6 +346,11 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug emitInitLazyRegister(argumentsRegister); emitInitLazyRegister(unmodifiedArgumentsRegister); + + if (m_codeBlock->isStrictMode()) { + emitOpcode(op_create_arguments); + instructions().append(argumentsRegister->index()); + } // The debugger currently retrieves the arguments object from an activation rather than pulling // it from a call frame. In the long-term it should stop doing that (), @@ -356,11 +366,17 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug // Captured variables and functions go first so that activations don't have // to step over the non-captured locals to mark them. + m_hasCreatedActivation = false; if (functionBody->hasCapturedVariables()) { for (size_t i = 0; i < functionStack.size(); ++i) { FunctionBodyNode* function = functionStack[i]; const Identifier& ident = function->ident(); if (functionBody->captures(ident)) { + if (!m_hasCreatedActivation) { + m_hasCreatedActivation = true; + emitOpcode(op_create_activation); + instructions().append(m_activationRegister->index()); + } m_functions.add(ident.impl()); emitNewFunction(addVar(ident, false), function); } @@ -371,7 +387,13 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug addVar(ident, varStack[i].second & DeclarationStacks::IsConstant); } } - bool canLazilyCreateFunctions = !functionBody->needsActivationForMoreThanVariables(); + bool canLazilyCreateFunctions = !functionBody->needsActivationForMoreThanVariables() && !debugger; + if (!canLazilyCreateFunctions && !m_hasCreatedActivation) { + m_hasCreatedActivation = true; + emitOpcode(op_create_activation); + instructions().append(m_activationRegister->index()); + } + codeBlock->m_numCapturedVars = codeBlock->m_numVars; m_firstLazyFunction = codeBlock->m_numVars; for (size_t i = 0; i < functionStack.size(); ++i) { @@ -399,7 +421,6 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug if (debugger) codeBlock->m_numCapturedVars = codeBlock->m_numVars; - FunctionParameters& parameters = *functionBody->parameters(); size_t parameterCount = parameters.size(); @@ -429,7 +450,10 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug instructions().append(m_thisRegister.index()); instructions().append(funcProto->index()); } else if (functionBody->usesThis() || m_shouldEmitDebugHooks) { - emitOpcode(op_convert_this); + if (codeBlock->isStrictMode()) + emitOpcode(op_convert_this_strict); + else + emitOpcode(op_convert_this); instructions().append(m_thisRegister.index()); } } @@ -448,10 +472,14 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge , m_codeType(EvalCode) , m_nextConstantOffset(0) , m_globalConstantIndex(0) + , m_hasCreatedActivation(true) , m_firstLazyFunction(0) , m_lastLazyFunction(0) , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) , m_lastOpcodeID(op_end) +#ifndef NDEBUG + , m_lastOpcodePosition(0) +#endif , m_emitNodeDepth(0) , m_usesExceptions(false) , m_regeneratingForExceptionInfo(false) @@ -1249,6 +1277,7 @@ RegisterID* BytecodeGenerator::emitResolveBase(RegisterID* dst, const Identifier emitOpcode(op_resolve_base); instructions().append(dst->index()); instructions().append(addConstant(property)); + instructions().append(false); return dst; } @@ -1256,6 +1285,32 @@ RegisterID* BytecodeGenerator::emitResolveBase(RegisterID* dst, const Identifier return emitLoad(dst, JSValue(globalObject)); } +RegisterID* BytecodeGenerator::emitResolveBaseForPut(RegisterID* dst, const Identifier& property) +{ + if (!m_codeBlock->isStrictMode()) + return emitResolveBase(dst, property); + size_t depth = 0; + int index = 0; + JSObject* globalObject = 0; + bool requiresDynamicChecks = false; + findScopedProperty(property, index, depth, false, requiresDynamicChecks, globalObject); + if (!globalObject || requiresDynamicChecks) { + // We can't optimise at all :-( + emitOpcode(op_resolve_base); + instructions().append(dst->index()); + instructions().append(addConstant(property)); + instructions().append(true); + return dst; + } + + // Global object is the base + RefPtr result = emitLoad(dst, JSValue(globalObject)); + emitOpcode(op_ensure_property_exists); + instructions().append(dst->index()); + instructions().append(addConstant(property)); + return result.get(); +} + RegisterID* BytecodeGenerator::emitResolveWithBase(RegisterID* baseDst, RegisterID* propDst, const Identifier& property) { size_t depth = 0; @@ -1504,6 +1559,7 @@ RegisterID* BytecodeGenerator::emitLazyNewFunction(RegisterID* dst, FunctionBody RegisterID* BytecodeGenerator::emitNewFunctionInternal(RegisterID* dst, unsigned index, bool doNullCheck) { + createActivationIfNecessary(); emitOpcode(op_new_func); instructions().append(dst->index()); instructions().append(index); @@ -1523,7 +1579,8 @@ RegisterID* BytecodeGenerator::emitNewFunctionExpression(RegisterID* r0, FuncExp { FunctionBodyNode* function = n->body(); unsigned index = m_codeBlock->addFunctionExpr(makeFunction(m_globalData, function)); - + + createActivationIfNecessary(); emitOpcode(op_new_func_exp); instructions().append(r0->index()); instructions().append(index); @@ -1541,10 +1598,26 @@ void BytecodeGenerator::createArgumentsIfNecessary() return; ASSERT(m_codeBlock->usesArguments()); + // If we're in strict mode we tear off the arguments on function + // entry, so there's no need to check if we need to create them + // now + if (m_codeBlock->isStrictMode()) + return; + emitOpcode(op_create_arguments); instructions().append(m_codeBlock->argumentsRegister()); } +void BytecodeGenerator::createActivationIfNecessary() +{ + if (m_hasCreatedActivation) + return; + if (!m_codeBlock->needsFullScopeChain()) + return; + emitOpcode(op_create_activation); + instructions().append(m_activationRegister->index()); +} + RegisterID* BytecodeGenerator::emitCallEval(RegisterID* dst, RegisterID* func, CallArguments& callArguments, unsigned divot, unsigned startOffset, unsigned endOffset) { return emitCall(op_call_eval, dst, func, callArguments, divot, startOffset, endOffset); @@ -1648,7 +1721,8 @@ RegisterID* BytecodeGenerator::emitReturn(RegisterID* src) emitOpcode(op_tear_off_activation); instructions().append(m_activationRegister->index()); instructions().append(m_codeBlock->argumentsRegister()); - } else if (m_codeBlock->usesArguments() && m_codeBlock->m_numParameters > 1) { // If there are no named parameters, there's nothing to tear off, since extra / unnamed parameters get copied to the arguments object at construct time. + } else if (m_codeBlock->usesArguments() && m_codeBlock->m_numParameters > 1 + && !m_codeBlock->isStrictMode()) { // If there are no named parameters, there's nothing to tear off, since extra / unnamed parameters get copied to the arguments object at construct time. emitOpcode(op_tear_off_arguments); instructions().append(m_codeBlock->argumentsRegister()); } diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/JavaScriptCore/bytecompiler/BytecodeGenerator.h index 2afa0c4..d0e4a6b 100644 --- a/JavaScriptCore/bytecompiler/BytecodeGenerator.h +++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.h @@ -329,6 +329,7 @@ namespace JSC { RegisterID* emitPutScopedVar(size_t skip, int index, RegisterID* value, JSValue globalObject); RegisterID* emitResolveBase(RegisterID* dst, const Identifier& property); + RegisterID* emitResolveBaseForPut(RegisterID* dst, const Identifier& property); RegisterID* emitResolveWithBase(RegisterID* baseDst, RegisterID* propDst, const Identifier& property); void emitMethodCheck(); @@ -419,13 +420,15 @@ namespace JSC { } bool shouldEmitProfileHooks() { return m_shouldEmitProfileHooks; } + + bool isStrictMode() const { return m_codeBlock->isStrictMode(); } private: void emitOpcode(OpcodeID); void retrieveLastBinaryOp(int& dstIndex, int& src1Index, int& src2Index); void retrieveLastUnaryOp(int& dstIndex, int& srcIndex); - void rewindBinaryOp(); - void rewindUnaryOp(); + ALWAYS_INLINE void rewindBinaryOp(); + ALWAYS_INLINE void rewindUnaryOp(); PassRefPtr