├── WTF ├── Makefile ├── CMakeLists.txt ├── icu │ ├── unicode │ │ └── utf_old.h │ └── README ├── Configurations │ └── iOS.xcconfig ├── wtf │ ├── PlatformBlackBerry.cmake │ ├── PlatformWin.cmake │ ├── PlatformNix.cmake │ ├── PlatformGTK.cmake │ ├── dtoa │ │ └── README │ ├── PlatformEfl.cmake │ ├── NumberOfCores.h │ ├── gobject │ │ └── GlibUtilities.h │ ├── GetPtr.h │ ├── text │ │ └── mac │ │ │ └── StringImplMac.mm │ ├── Noncopyable.h │ ├── efl │ │ └── RefPtrEfl.h │ ├── unicode │ │ └── icu │ │ │ └── UnicodeIcu.h │ └── blackberry │ │ └── MainThreadBlackBerry.cpp ├── WTF.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── WTF.vcxproj │ ├── WTFPostBuild.cmd │ ├── WTFPreBuild.cmd │ ├── WTFGenerated.vcxproj.filters │ ├── WTFCoreFoundation.props │ ├── WTFCFLite.props │ ├── WTFGeneratedRelease.props │ ├── WTFGeneratedDebug.props │ ├── WTFGeneratedProduction.props │ ├── WTFRelease.props │ ├── WTFDebug.props │ ├── WTFProduction.props │ ├── build-generated-files.sh │ ├── WTFReleaseWinCairo.props │ ├── WTFDebugWinCairo.props │ ├── WTFGeneratedCommon.props │ ├── WTFGenerated.make │ └── copy-files.cmd └── GNUmakefile.am ├── JavaScriptCore ├── runtime │ ├── JSStaticScopeObject.cpp │ ├── JSStaticScopeObject.h │ ├── JSDestructibleObject.h │ ├── PropertySlot.cpp │ ├── StringRecursionChecker.cpp │ └── JSAPIValueWrapper.cpp ├── JavaScriptCore.vcxproj │ ├── jsc │ │ ├── jscPreLink.cmd │ │ ├── jscPostBuild.cmd │ │ ├── jscPreBuild.cmd │ │ ├── jsc.vcxproj.filters │ │ ├── jscDebug.props │ │ ├── jscRelease.props │ │ └── jscProduction.props │ ├── JavaScriptCorePreLink.cmd │ ├── testapi │ │ ├── testapiPreLink.cmd │ │ ├── testapiPostBuild.cmd │ │ ├── testapiPreBuild.cmd │ │ ├── testapi.vcxproj.filters │ │ ├── testapiRelease.props │ │ ├── testapiProduction.props │ │ ├── testapiReleaseCFLite.props │ │ ├── testapiDebug.props │ │ ├── testapiDebugCFLite.props │ │ ├── testapiCommonCFLite.props │ │ └── testapiCommon.props │ ├── testRegExp │ │ ├── testRegExpPreLink.cmd │ │ ├── testRegExpPostBuild.cmd │ │ ├── testRegExpPreBuild.cmd │ │ ├── testRegExp.vcxproj.filters │ │ ├── testRegExpRelease.props │ │ ├── testRegExpProduction.props │ │ ├── testRegExpDebug.props │ │ └── testRegExpCommon.props │ ├── JavaScriptCorePostBuild.cmd │ ├── JavaScriptCorePreBuild.cmd │ ├── JavaScriptCoreGenerated.vcxproj.filters │ ├── JavaScriptCoreGeneratedCommon.props │ ├── LLInt │ │ ├── LLIntAssembly │ │ │ ├── LLIntAssembly.make │ │ │ └── build-LLIntAssembly.sh │ │ ├── LLIntDesiredOffsets │ │ │ ├── LLIntDesiredOffsets.make │ │ │ └── build-LLIntDesiredOffsets.sh │ │ └── LLIntOffsetsExtractor │ │ │ ├── LLIntOffsetsExtractorDebug.props │ │ │ ├── LLIntOffsetsExtractorProduction.props │ │ │ └── LLIntOffsetsExtractorRelease.props │ ├── resource.h │ ├── JavaScriptCoreCFLite.props │ ├── JavaScriptCoreCF.props │ ├── JavaScriptCoreGenerated.make │ ├── JavaScriptCoreGeneratedRelease.props │ ├── JavaScriptCoreGeneratedProduction.props │ ├── JavaScriptCoreProduction.props │ ├── JavaScriptCoreGeneratedDebug.props │ ├── JavaScriptCoreDebug.props │ ├── JavaScriptCoreRelease.props │ ├── JavaScriptCoreDebugCFLite.props │ ├── JavaScriptCoreReleaseCFLite.props │ ├── JavaScriptCore.resources │ │ └── Info.plist │ ├── build-generated-files.sh │ └── JavaScriptCoreCommon.props ├── Makefile ├── tests │ ├── mozilla │ │ ├── js1_6 │ │ │ ├── Array │ │ │ │ ├── browser.js │ │ │ │ └── shell.js │ │ │ ├── String │ │ │ │ ├── browser.js │ │ │ │ └── shell.js │ │ │ ├── README │ │ │ └── Regress │ │ │ │ ├── browser.js │ │ │ │ └── shell.js │ │ ├── Makefile │ │ ├── ecma_3 │ │ │ ├── Unicode │ │ │ │ ├── uc-005.js │ │ │ │ ├── uc-002-n.js │ │ │ │ └── uc-001.js │ │ │ ├── Function │ │ │ │ ├── call-001.js │ │ │ │ └── regress-58274.js │ │ │ ├── FunExpr │ │ │ │ ├── fe-001-n.js │ │ │ │ └── fe-001.js │ │ │ └── RegExp │ │ │ │ ├── regress-28686.js │ │ │ │ └── regress-24712.js │ │ ├── ecma_2 │ │ │ ├── String │ │ │ │ └── replace-001.js │ │ │ ├── LexicalConventions │ │ │ │ ├── keywords-001.js │ │ │ │ ├── regexp-literals-002.js │ │ │ │ └── regexp-literals-001.js │ │ │ ├── Exceptions │ │ │ │ ├── statement-009.js │ │ │ │ ├── expression-005.js │ │ │ │ ├── expression-017.js │ │ │ │ ├── expression-015.js │ │ │ │ ├── expression-016.js │ │ │ │ ├── lexical-003.js │ │ │ │ ├── statement-008.js │ │ │ │ ├── expression-008.js │ │ │ │ ├── statement-007.js │ │ │ │ ├── expression-010.js │ │ │ │ ├── expression-009.js │ │ │ │ ├── expression-007.js │ │ │ │ ├── expression-011.js │ │ │ │ ├── expression-013.js │ │ │ │ ├── expression-019.js │ │ │ │ ├── expression-014.js │ │ │ │ ├── lexical-007.js │ │ │ │ ├── lexical-005.js │ │ │ │ ├── exception-001.js │ │ │ │ ├── expression-006.js │ │ │ │ ├── global-002.js │ │ │ │ ├── lexical-048.js │ │ │ │ ├── global-001.js │ │ │ │ ├── lexical-050.js │ │ │ │ ├── expression-012.js │ │ │ │ ├── lexical-004.js │ │ │ │ ├── exception-004.js │ │ │ │ ├── exception-005.js │ │ │ │ ├── exception-008.js │ │ │ │ ├── exception-002.js │ │ │ │ ├── lexical-051.js │ │ │ │ ├── exception-011-n.js │ │ │ │ ├── lexical-047.js │ │ │ │ ├── statement-001.js │ │ │ │ ├── lexical-039.js │ │ │ │ ├── lexical-040.js │ │ │ │ ├── statement-006.js │ │ │ │ ├── statement-004.js │ │ │ │ ├── exception-010-n.js │ │ │ │ ├── lexical-052.js │ │ │ │ ├── lexical-054.js │ │ │ │ ├── lexical-053.js │ │ │ │ ├── statement-005.js │ │ │ │ ├── lexical-049.js │ │ │ │ ├── lexical-041.js │ │ │ │ ├── lexical-042.js │ │ │ │ ├── expression-004.js │ │ │ │ ├── date-004.js │ │ │ │ ├── exception-009.js │ │ │ │ ├── lexical-016.js │ │ │ │ ├── lexical-010.js │ │ │ │ ├── lexical-017.js │ │ │ │ ├── lexical-023.js │ │ │ │ ├── lexical-008.js │ │ │ │ ├── lexical-009.js │ │ │ │ ├── lexical-011.js │ │ │ │ ├── lexical-012.js │ │ │ │ ├── lexical-013.js │ │ │ │ ├── lexical-015.js │ │ │ │ ├── lexical-018.js │ │ │ │ ├── lexical-019.js │ │ │ │ ├── lexical-020.js │ │ │ │ ├── boolean-001.js │ │ │ │ ├── lexical-014.js │ │ │ │ └── lexical-021.js │ │ │ ├── Statements │ │ │ │ ├── while-001.js │ │ │ │ ├── dowhile-001.js │ │ │ │ ├── if-001.js │ │ │ │ └── label-001.js │ │ │ ├── instanceof │ │ │ │ └── instanceof-001.js │ │ │ ├── RegExp │ │ │ │ ├── exec-001.js │ │ │ │ └── regress-001.js │ │ │ └── FunctionObjects │ │ │ │ ├── apply-001-n.js │ │ │ │ └── call-1.js │ │ ├── js1_2 │ │ │ ├── regexp │ │ │ │ └── control_characters.js │ │ │ └── version120 │ │ │ │ └── shell.js │ │ ├── menufoot.html │ │ └── js1_3 │ │ │ └── template.js │ ├── perf │ │ ├── bench-allocate-nonretained.js │ │ └── bench-allocate-retained.js │ └── stress │ │ ├── use-arguments-as-object-pointer.js │ │ ├── dead-int32-to-double.js │ │ ├── dead-uint32-to-number.js │ │ ├── untyped-equality.js │ │ ├── double-as-int32.js │ │ ├── untyped-less-than.js │ │ ├── float32array-out-of-bounds.js │ │ ├── int32-out-of-bounds.js │ │ ├── int32-object-out-of-bounds.js │ │ └── fold-typed-array-properties.js ├── AUTHORS ├── icu │ ├── unicode │ │ └── utf_old.h │ └── README ├── ForwardingHeaders │ └── JavaScriptCore │ │ ├── APICast.h │ │ ├── APIShims.h │ │ ├── JSBase.h │ │ ├── JSValueRef.h │ │ ├── JavaScript.h │ │ ├── JSContextRef.h │ │ ├── JSObjectRef.h │ │ ├── JSRetainPtr.h │ │ ├── JSStringRef.h │ │ ├── JSStringRefCF.h │ │ ├── JavaScriptCore.h │ │ ├── OpaqueJSString.h │ │ ├── JSCTestRunnerUtils.h │ │ └── WebKitAvailability.h ├── shell │ ├── PlatformGTK.cmake │ ├── PlatformEfl.cmake │ ├── PlatformBlackBerry.cmake │ └── CMakeLists.txt ├── Configurations │ └── iOS.xcconfig ├── PlatformEfl.cmake ├── API │ └── tests │ │ └── minidom.html ├── JavaScriptCore.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── entitlements.plist ├── PlatformBlackBerry.cmake ├── javascriptcoregtk.pc.in ├── THANKS ├── make-generated-sources.sh ├── JavaScriptCore.gir.in ├── inspector │ └── protocol │ │ ├── GenericTypes.json │ │ └── InspectorDomain.json ├── JavaScriptCorePrefix.h ├── disassembler │ └── udis86 │ │ └── differences.txt ├── Info.plist ├── parser │ └── Keywords.table └── PlatformGTK.cmake ├── JavaScriptCore-iOS.xcworkspace └── contents.xcworkspacedata ├── .gitignore ├── ToolExecutable-iOS-Static.xcconfig ├── WTF-iOS-Static.xcconfig └── JavaScriptCore-iOS-Static.xcconfig /WTF/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.shared 2 | -------------------------------------------------------------------------------- /JavaScriptCore/runtime/JSStaticScopeObject.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JavaScriptCore/runtime/JSStaticScopeObject.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WTF/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(wtf) 2 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JavaScriptCore/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.shared 2 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_6/Array/browser.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_6/Array/shell.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_6/String/browser.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_6/String/shell.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_6/README: -------------------------------------------------------------------------------- 1 | JavaScript 1.6 2 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_6/Regress/browser.js: -------------------------------------------------------------------------------- 1 | // dummy file 2 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_6/Regress/shell.js: -------------------------------------------------------------------------------- 1 | // dummy file 2 | -------------------------------------------------------------------------------- /WTF/icu/unicode/utf_old.h: -------------------------------------------------------------------------------- 1 | /* This file is intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /JavaScriptCore/AUTHORS: -------------------------------------------------------------------------------- 1 | Harri Porten (porten@kde.org) 2 | Peter Kelly (pmk@post.com) 3 | -------------------------------------------------------------------------------- /JavaScriptCore/icu/unicode/utf_old.h: -------------------------------------------------------------------------------- 1 | /* This file is intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/APIShims.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/shell/PlatformGTK.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND JSC_LIBRARIES 2 | ${GLIB_LIBRARIES} 3 | ) 4 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScript.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSContextRef.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSObjectRef.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSRetainPtr.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRef.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /WTF/Configurations/iOS.xcconfig: -------------------------------------------------------------------------------- 1 | #include "/AppleInternal/XcodeConfig/AspenFamily.xcconfig" 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/OpaqueJSString.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/Configurations/iOS.xcconfig: -------------------------------------------------------------------------------- 1 | #include "/AppleInternal/XcodeConfig/AspenFamily.xcconfig" 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSCTestRunnerUtils.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /JavaScriptCore/shell/PlatformEfl.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND JSC_LIBRARIES 2 | ${ECORE_LIBRARIES} 3 | ${GLIB_LIBRARIES} 4 | ) 5 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: -------------------------------------------------------------------------------- 1 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" -------------------------------------------------------------------------------- /WTF/wtf/PlatformBlackBerry.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND WTF_SOURCES 2 | blackberry/MainThreadBlackBerry.cpp 3 | blackberry/RunLoopBlackBerry.cpp 4 | ) 5 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/Makefile: -------------------------------------------------------------------------------- 1 | testmenu: 2 | exec perl mklistpage.pl > menubody.html 3 | cat menuhead.html menubody.html menufoot.html > menu.html 4 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-005.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoboslab/JavaScriptCore-iOS/HEAD/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-005.js -------------------------------------------------------------------------------- /JavaScriptCore/PlatformEfl.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES 2 | ${ECORE_INCLUDE_DIRS} 3 | ${EINA_INCLUDE_DIRS} 4 | ${EO_INCLUDE_DIRS} 5 | ) 6 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/String/replace-001.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoboslab/JavaScriptCore-iOS/HEAD/JavaScriptCore/tests/mozilla/ecma_2/String/replace-001.js -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/Function/call-001.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoboslab/JavaScriptCore-iOS/HEAD/JavaScriptCore/tests/mozilla/ecma_3/Function/call-001.js -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: -------------------------------------------------------------------------------- 1 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" 2 | 3 | cmd /c 4 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/Function/regress-58274.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoboslab/JavaScriptCore-iOS/HEAD/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-58274.js -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_2/regexp/control_characters.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phoboslab/JavaScriptCore-iOS/HEAD/JavaScriptCore/tests/mozilla/js1_2/regexp/control_characters.js -------------------------------------------------------------------------------- /JavaScriptCore/API/tests/minidom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

 8 | 
 9 | 
10 | 


--------------------------------------------------------------------------------
/JavaScriptCore/tests/perf/bench-allocate-nonretained.js:
--------------------------------------------------------------------------------
1 | (function () {
2 |     for (var i = 0; i < 500; ++i) {
3 |         for (var j = 0; j < 100000; ++j)
4 |             var a = {};
5 |     }
6 | })();
7 | 


--------------------------------------------------------------------------------
/JavaScriptCore/tests/mozilla/menufoot.html:
--------------------------------------------------------------------------------
1 | 
2 |     
3 | 
4 |     
5 |
6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd: -------------------------------------------------------------------------------- 1 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" 2 | 3 | xcopy /y /d "%PROJECTDIR%\..\..\API\tests\testapi.js" "%OUTDIR%" 4 | -------------------------------------------------------------------------------- /WTF/WTF.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFPostBuild.cmd: -------------------------------------------------------------------------------- 1 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" 2 | if exist "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%" -------------------------------------------------------------------------------- /WTF/icu/README: -------------------------------------------------------------------------------- 1 | The headers in this directory are for compiling on Mac OS X 10.4. 2 | The Mac OS X 10.4 release includes the ICU binary, but not ICU headers. 3 | For other platforms, installed ICU headers should be used rather than these. 4 | They are specific to Mac OS X 10.4. 5 | -------------------------------------------------------------------------------- /JavaScriptCore/icu/README: -------------------------------------------------------------------------------- 1 | The headers in this directory are for compiling on Mac OS X 10.4. 2 | The Mac OS X 10.4 release includes the ICU binary, but not ICU headers. 3 | For other platforms, installed ICU headers should be used rather than these. 4 | They are specific to Mac OS X 10.4. 5 | -------------------------------------------------------------------------------- /JavaScriptCore/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | dynamic-codesigning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: -------------------------------------------------------------------------------- 1 | if exist "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" "%WEBKIT_LIBRARIES%\tools\VersionStamper\VersionStamper.exe" --verbose "%TARGETPATH%" 2 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed" 3 | -------------------------------------------------------------------------------- /JavaScriptCore/PlatformBlackBerry.cmake: -------------------------------------------------------------------------------- 1 | list(REMOVE_ITEM JavaScriptCore_SOURCES 2 | runtime/GCActivityCallback.cpp 3 | ) 4 | 5 | list(APPEND JavaScriptCore_SOURCES 6 | runtime/GCActivityCallbackBlackBerry.cpp 7 | ) 8 | 9 | install(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf) 10 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/perf/bench-allocate-retained.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var a = new Array(100000); 3 | for (var i = 0; i < 100000; ++i) 4 | a[i] = {}; 5 | 6 | for (var i = 0; i < 500; ++i) { 7 | for (var j = 0; j < 100000; ++j) 8 | var b = {}; 9 | } 10 | })(); 11 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/use-arguments-as-object-pointer.js: -------------------------------------------------------------------------------- 1 | function foo() { 2 | arguments = {f:42}; 3 | return arguments.f; 4 | } 5 | 6 | noInline(foo); 7 | 8 | for (var i = 0; i < 100000; ++i) { 9 | var result = foo(); 10 | if (result != 42) 11 | throw "Error: bad result: " + result; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /JavaScriptCore-iOS.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFPreBuild.cmd: -------------------------------------------------------------------------------- 1 | %SystemDrive%\cygwin\bin\which.exe bash 2 | if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% 3 | cmd /c 4 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" 5 | if errorlevel 1 exit 1 6 | echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" 7 | -------------------------------------------------------------------------------- /WTF/wtf/PlatformWin.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND WTF_SOURCES 2 | threads/win/BinarySemaphoreWin.cpp 3 | 4 | win/MainThreadWin.cpp 5 | win/RunLoopWin.cpp 6 | ) 7 | 8 | if (WINCE) 9 | list(APPEND WTF_LIBRARIES 10 | mmtimer 11 | ) 12 | else () 13 | list(APPEND WTF_LIBRARIES 14 | winmm 15 | ) 16 | endif () 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xccheckout 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | .svn* 20 | *.pyc 21 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd: -------------------------------------------------------------------------------- 1 | %SystemDrive%\cygwin\bin\which.exe bash 2 | if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% 3 | cmd /c 4 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" 5 | if errorlevel 1 exit 1 6 | echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" 7 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/dead-int32-to-double.js: -------------------------------------------------------------------------------- 1 | function foo(int, o) { 2 | var x = int; 3 | o.f = x; 4 | for (var i = 0; i < 100; ++i) 5 | x += 0.5; 6 | } 7 | 8 | noInline(foo); 9 | 10 | for (var i = 0; i < 100; ++i) 11 | foo(42, {}); 12 | 13 | var o = {g: 43}; 14 | foo(47, o); 15 | if (o.f != 47) 16 | throw "Error: o.f is " + o.f; 17 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd: -------------------------------------------------------------------------------- 1 | %SystemDrive%\cygwin\bin\which.exe bash 2 | if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% 3 | cmd /c 4 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" 5 | if errorlevel 1 exit 1 6 | echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" 7 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd: -------------------------------------------------------------------------------- 1 | %SystemDrive%\cygwin\bin\which.exe bash 2 | if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% 3 | cmd /c 4 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" 5 | if errorlevel 1 exit 1 6 | echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" 7 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/dead-uint32-to-number.js: -------------------------------------------------------------------------------- 1 | function foo(a, o) { 2 | var x = a >>> 0; 3 | o.f = x | 0; 4 | for (var i = 0; i < 100; ++i) 5 | x++; 6 | } 7 | 8 | noInline(foo); 9 | 10 | for (var i = 0; i < 100; ++i) 11 | foo(42, {}); 12 | 13 | var o = {g: 43}; 14 | foo(47, o); 15 | if (o.f != 47) 16 | throw "Error: o.f is " + o.f; 17 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd: -------------------------------------------------------------------------------- 1 | %SystemDrive%\cygwin\bin\which.exe bash 2 | if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH% 3 | cmd /c 4 | if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed" 5 | if errorlevel 1 exit 1 6 | echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed" 7 | -------------------------------------------------------------------------------- /JavaScriptCore/javascriptcoregtk.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: JavaScriptCoreGTK+ 7 | Description: GTK+ version of the JavaScriptCore engine 8 | Version: @VERSION@ 9 | Requires: glib-2.0 10 | Libs: -L${libdir} -ljavascriptcoregtk-@WEBKITGTK_API_VERSION@ 11 | Cflags: -I${includedir}/webkitgtk-@WEBKITGTK_API_VERSION@ 12 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFGenerated.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFCoreFoundation.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | CoreFoundation$(DebugSuffix).lib;%(AdditionalDependencies) 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WTF/wtf/PlatformNix.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND WTF_SOURCES 2 | gobject/GOwnPtr.cpp 3 | gobject/GRefPtr.cpp 4 | gobject/GlibUtilities.cpp 5 | 6 | gtk/MainThreadGtk.cpp 7 | 8 | nix/RunLoopNix.cpp 9 | ) 10 | 11 | list(APPEND WTF_LIBRARIES 12 | pthread 13 | ${GLIB_LIBRARIES} 14 | ${GLIB_GIO_LIBRARIES} 15 | ${ZLIB_LIBRARIES} 16 | ) 17 | 18 | list(APPEND WTF_INCLUDE_DIRECTORIES 19 | ${GLIB_INCLUDE_DIRS} 20 | ) 21 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /JavaScriptCore/THANKS: -------------------------------------------------------------------------------- 1 | 2 | I would like to thank the following people for their help: 3 | 4 | Richard Moore - for filling the Math object with some life 5 | Daegeun Lee - for pointing out some bugs and providing 6 | much code for the String and Date object. 7 | Marco Pinelli - for his patches 8 | Christian Kirsch - for his contribution to the Date object 9 | -------------------------------------------------------------------------------- /JavaScriptCore/shell/PlatformBlackBerry.cmake: -------------------------------------------------------------------------------- 1 | FIND_STAGING_LIBRARY(SLOG2_LIBRARY slog2) 2 | list(APPEND JSC_LIBRARIES 3 | ${ICUI18N_LIBRARY} 4 | ${ICUUC_LIBRARY} 5 | ${INTL_LIBRARY} # Required for x86 builds 6 | ${M_LIBRARY} 7 | ${SLOG2_LIBRARY} 8 | ${Screen_LIBRARY} 9 | ${WebKitPlatform_LIBRARY} 10 | ) 11 | 12 | if (PROFILING) 13 | list(APPEND JSC_LIBRARIES 14 | ${PROFILING_LIBRARY} 15 | ) 16 | endif () 17 | -------------------------------------------------------------------------------- /JavaScriptCore/make-generated-sources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export SRCROOT=$PWD 4 | export CREATE_HASH_TABLE="$SRCROOT/create_hash_table" 5 | export CREATE_REGEXP_TABLES="$SRCROOT/create_regex_tables" 6 | export CREATE_KEYWORD_LOOKUP="$SRCROOT/KeywordLookupGenerator.py" 7 | 8 | mkdir -p DerivedSources/JavaScriptCore 9 | cd DerivedSources/JavaScriptCore 10 | 11 | make -f ../../DerivedSources.make JavaScriptCore=../.. BUILT_PRODUCTS_DIR=../.. 12 | cd ../.. 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WTF/wtf/PlatformGTK.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND WTF_SOURCES 2 | gobject/GOwnPtr.cpp 3 | gobject/GRefPtr.cpp 4 | gobject/GlibUtilities.cpp 5 | 6 | gtk/MainThreadGtk.cpp 7 | gtk/RunLoopGtk.cpp 8 | ) 9 | 10 | list(APPEND WTF_LIBRARIES 11 | ${GLIB_GIO_LIBRARIES} 12 | ${GLIB_GOBJECT_LIBRARIES} 13 | ${GLIB_LIBRARIES} 14 | pthread 15 | ${ZLIB_LIBRARIES} 16 | ) 17 | 18 | list(APPEND WTF_INCLUDE_DIRECTORIES 19 | ${GLIB_INCLUDE_DIRS} 20 | ) 21 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make: -------------------------------------------------------------------------------- 1 | all: 2 | touch "%ConfigurationBuildDir%\buildfailed" 3 | bash build-LLIntAssembly.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" "%PlatformArchitecture%" 4 | -del "%ConfigurationBuildDir%\buildfailed" 5 | 6 | clean: 7 | -del "%ConfigurationBuildDir%\buildfailed" 8 | -del /s /q "%ConfigurationBuildDir%\obj%PlatformArchitecture%\JavaScriptCore\DerivedSources\LLIntAssembly.h" 9 | -------------------------------------------------------------------------------- /ToolExecutable-iOS-Static.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // ToolExecutable-iOS-Static.xcconfig 3 | // JavaScriptCore 4 | // 5 | // Created by Martijn The on 1/17/14. 6 | // 7 | // 8 | 9 | #include "JavaScriptCore/Configurations/ToolExecutable.xcconfig" 10 | 11 | PRODUCT_NAME = JSCLLIntOffsetsExtractor; 12 | HEADER_SEARCH_PATHS = . icu "${BUILT_PRODUCTS_DIR}/usr/local/include" "${SOURCE_ROOT}/../WTF/" $(HEADER_SEARCH_PATHS); 13 | 14 | SECTORDER_FLAGS = ; 15 | SECTORDER_FLAGS_iphoneos = ; 16 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make: -------------------------------------------------------------------------------- 1 | all: 2 | touch "%ConfigurationBuildDir%\buildfailed" 3 | bash build-LLIntDesiredOffsets.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%" 4 | 5 | -del "%ConfigurationBuildDir%\buildfailed" 6 | 7 | clean: 8 | -del "%ConfigurationBuildDir%\buildfailed" 9 | -del /s /q "%ConfigurationBuildDir%\obj%PlatformArchitecture%\JavaScriptCore\DerivedSources\LLIntDesiredOffsets.h" 10 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by JavaScriptCore.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | CFLite.lib;%(AdditionalDependencies) 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/untyped-equality.js: -------------------------------------------------------------------------------- 1 | function foo(a, b) { 2 | return a == b; 3 | } 4 | 5 | noInline(foo); 6 | 7 | var data = [ 8 | [5, 6.5, false], 9 | ["foo", "bar", false], 10 | [true, false, false], 11 | ["42", 42, true], 12 | [1.2, 1.2, true] 13 | ]; 14 | 15 | for (var i = 0; i < 100000; ++i) { 16 | var test = data[i % data.length]; 17 | var result = foo(test[0], test[1]); 18 | if (result != test[2]) 19 | throw "Error: bad result for " + test + ": " + result; 20 | } 21 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCF.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | CoreFoundation$(DebugSuffix).lib;%(AdditionalDependencies) 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/double-as-int32.js: -------------------------------------------------------------------------------- 1 | //@ defaultRun; runNoCJITNoASO 2 | 3 | function foo(a, b) { 4 | return a.f / b.f; 5 | } 6 | 7 | noInline(foo); 8 | 9 | function test(a, b, e) { 10 | var result = foo({f:a}, {f:b}); 11 | if (result != e) 12 | throw "Error: " + a + " / " + b + " should be " + e + " but was " + result; 13 | } 14 | 15 | for (var i = 1; i < 101; ++i) 16 | test(i * 2, i, 2); 17 | 18 | test(9, 3, 3); 19 | test(12, 4, 3); 20 | test(-32, 8, -4); 21 | test(-21, 7, -3); 22 | test(7, 2, 3.5); 23 | -------------------------------------------------------------------------------- /WTF/wtf/dtoa/README: -------------------------------------------------------------------------------- 1 | http://code.google.com/p/double-conversion 2 | 3 | This project (double-conversion) provides binary-decimal and decimal-binary 4 | routines for IEEE doubles. 5 | 6 | The library consists of efficient conversion routines that have been extracted 7 | from the V8 JavaScript engine. The code has been refactored and improved so that 8 | it can be used more easily in other projects. 9 | 10 | There is extensive documentation in src/double-conversion.h. Other examples can 11 | be found in test/cctest/test-conversions.cc. 12 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFCFLite.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <_ProjectFileVersion>10.0.40219.1 5 | <_PropertySheetDisplayName>WebKitCFLite 6 | 7 | 8 | 9 | CFLite.lib;%(AdditionalDependencies) 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/untyped-less-than.js: -------------------------------------------------------------------------------- 1 | function foo(a, b) { 2 | return a < b; 3 | } 4 | 5 | noInline(foo); 6 | 7 | var data = [ 8 | [5, 6.5, true], 9 | ["foo", "bar", false], 10 | [true, false, false], 11 | [false, true, true], 12 | ["42", 42, false], 13 | [1.2, 1.2, false], 14 | ["-1", 1, true], 15 | [-1, "1", true] 16 | ]; 17 | 18 | for (var i = 0; i < 100000; ++i) { 19 | var test = data[i % data.length]; 20 | var result = foo(test[0], test[1]); 21 | if (result != test[2]) 22 | throw "Error: bad result for " + test + ": " + result; 23 | } 24 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFGeneratedRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.gir.in: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/inspector/protocol/GenericTypes.json: -------------------------------------------------------------------------------- 1 | { 2 | "domain": "GenericTypes", 3 | "description": "Exposes generic types to be used by any domain.", 4 | "types": [ 5 | { 6 | "id": "SearchMatch", 7 | "type": "object", 8 | "description": "Search match in a resource.", 9 | "properties": [ 10 | { "name": "lineNumber", "type": "number", "description": "Line number in resource content." }, 11 | { "name": "lineContent", "type": "string", "description": "Line with match content." } 12 | ] 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFGeneratedDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make: -------------------------------------------------------------------------------- 1 | all: 2 | touch "%ConfigurationBuildDir%\buildfailed" 3 | bash build-generated-files.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "%PlatformArchitecture%" 4 | copy-files.cmd 5 | 6 | -del "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdbool.h" "%ConfigurationBuildDir%\include\private\JavaScriptCore\stdint.h" 7 | -del "%ConfigurationBuildDir%\buildfailed" 8 | 9 | clean: 10 | -del "%ConfigurationBuildDir%\buildfailed" 11 | copy-files.cmd clean 12 | -del /s /q "%ConfigurationBuildDir%\obj%PlatformArchitecture%\JavaScriptCore\DerivedSources" 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFGeneratedProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <_PropertySheetDisplayName>testapiDebug 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <_PropertySheetDisplayName>testapiDebug 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/build-generated-files.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | # Determine whether we have the versioned ICU 4.0 or the unversioned ICU 4.4 4 | UNVERSIONED_ICU_LIB_PATH=$(cygpath -u "${WEBKIT_LIBRARIES}/lib${4}/libicuuc${3}.lib") 5 | ICUVERSION_H_PATH=$(cygpath -u "${CONFIGURATIONBUILDDIR}/include/private/ICUVersion.h") 6 | if test \( ! -f "${ICUVERSION_H_PATH}" \) -o \( -f "${UNVERSIONED_ICU_LIB_PATH}" -a \( "${UNVERSIONED_ICU_LIB_PATH}" -nt "${ICUVERSION_H_PATH}" \) \) 7 | then 8 | mkdir -p "$(dirname "${ICUVERSION_H_PATH}")" 9 | echo "Checking ${UNVERSIONED_ICU_LIB_PATH}" 10 | test ! -f "${UNVERSIONED_ICU_LIB_PATH}" 11 | echo "#define U_DISABLE_RENAMING $?" > "${ICUVERSION_H_PATH}" 12 | fi 13 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: 3 | * ECMA Section: 4 | * Description: 5 | * 6 | * 7 | * Author: christine@netscape.com 8 | * Date: 11 August 1998 9 | */ 10 | var SECTION = ""; 11 | var VERSION = "ECMA_2"; 12 | var TITLE = "Keywords"; 13 | 14 | startTest(); 15 | 16 | var result = "failed"; 17 | 18 | try { 19 | eval("super;"); 20 | } 21 | catch (x) { 22 | if (x instanceof SyntaxError) 23 | result = x.name; 24 | } 25 | 26 | AddTestCase( 27 | "using the expression \"super\" shouldn't cause js to crash", 28 | "SyntaxError", 29 | result ); 30 | 31 | test(); 32 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreProduction.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/float32array-out-of-bounds.js: -------------------------------------------------------------------------------- 1 | function make(value) { 2 | var result = new Float32Array(1); 3 | result[0] = value; 4 | return result; 5 | } 6 | 7 | function foo(a, i) { 8 | return a[i]; 9 | } 10 | 11 | noInline(foo); 12 | 13 | function test(value) { 14 | var result = foo(make(value), 0); 15 | if (result != value) 16 | throw "Error: bad result: " + result; 17 | } 18 | 19 | for (var i = 0; i < 100000; ++i) 20 | test(42); 21 | 22 | var result = foo(make(42), 1); 23 | if (result !== void 0) 24 | throw "Error: bad result: " + result; 25 | 26 | Float32Array.prototype[1] = 23; 27 | result = foo(make(42), 1); 28 | if (result !== 23) 29 | throw "Error: bad result: " + result; 30 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFReleaseWinCairo.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFDebugWinCairo.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WTF-iOS-Static.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // WTF-iOS-Static.xcconfig 3 | // WTF 4 | // 5 | // Created by Martijn The on 1/17/14. 6 | // 7 | // 8 | 9 | #include "WTF/Configurations/WTF.xcconfig" 10 | 11 | PRODUCT_NAME = WTF 12 | ARCHS = arm64 armv7 armv7s 13 | ONLY_ACTIVE_ARCH = NO 14 | SDKROOT = iphoneos 15 | SUPPORTED_PLATFORMS = iphoneos iphonesimulator 16 | IPHONEOS_DEPLOYMENT_TARGET = 5.1 17 | GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST HAVE_HEADER_DETECTION_H $(GCC_PREPROCESSOR_DEFINITIONS) TARGET_OS_IPHONE __MAC_OS_X_VERSION_MIN_REQUIRED=0 UCONFIG_NO_COLLATION=1 ENABLE_YARR_JIT=0; 18 | PRIVATE_HEADERS_FOLDER_PATH = /dev/null; 19 | PUBLIC_HEADERS_FOLDER_PATH = /dev/null; 20 | PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; 21 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <_ProjectFileVersion>10.0.40219.1 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/int32-out-of-bounds.js: -------------------------------------------------------------------------------- 1 | function foo(a, i) { 2 | return a[i]; 3 | } 4 | 5 | noInline(foo); 6 | 7 | function test(value) { 8 | var result = foo([value], 0); 9 | if (result != value) 10 | throw "Error: bad result: " + result; 11 | } 12 | 13 | for (var i = 0; i < 100000; ++i) 14 | test(42); 15 | 16 | var result = foo([42], 1); 17 | if (result !== void 0) 18 | throw "Error: bad result: " + result; 19 | 20 | result = foo([42], 100); 21 | if (result !== void 0) 22 | throw "Error: bad result: " + result; 23 | 24 | result = foo([42], 10000); 25 | if (result !== void 0) 26 | throw "Error: bad result: " + result; 27 | 28 | Array.prototype[10000] = 23; 29 | result = foo([42], 10000); 30 | if (result !== 23) 31 | throw "Error: bad result: " + result; 32 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/regexp-literals-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: LexicalConventions/regexp-literals-002.js 3 | * ECMA Section: 7.8.5 4 | * Description: Based on ECMA 2 Draft 8 October 1999 5 | * 6 | * Author: christine@netscape.com 7 | * Date: 19 February 1999 8 | */ 9 | var SECTION = "LexicalConventions/regexp-literals-002.js"; 10 | var VERSION = "ECMA_2"; 11 | var TITLE = "Regular Expression Literals"; 12 | 13 | startTest(); 14 | 15 | // A regular expression literal represents an object of type RegExp. 16 | 17 | AddTestCase( 18 | "// A regular expression literal represents an object of type RegExp.", 19 | "true", 20 | (/x*/ instanceof RegExp).toString() ); 21 | 22 | test(); 23 | -------------------------------------------------------------------------------- /WTF/wtf/PlatformEfl.cmake: -------------------------------------------------------------------------------- 1 | list(APPEND WTF_SOURCES 2 | efl/MainThreadEfl.cpp 3 | efl/OwnPtrEfl.cpp 4 | efl/RefPtrEfl.cpp 5 | efl/RunLoopEfl.cpp 6 | 7 | gobject/GOwnPtr.cpp 8 | gobject/GRefPtr.cpp 9 | ) 10 | 11 | list(APPEND WTF_LIBRARIES 12 | ${ECORE_EVAS_LIBRARIES} 13 | ${ECORE_IMF_LIBRARIES} 14 | ${ECORE_LIBRARIES} 15 | ${EINA_LIBRARIES} 16 | ${EO_LIBRARIES} 17 | ${EVAS_LIBRARIES} 18 | ${GLIB_GIO_LIBRARIES} 19 | ${GLIB_GOBJECT_LIBRARIES} 20 | ${GLIB_LIBRARIES} 21 | ${ZLIB_LIBRARIES} 22 | pthread 23 | ) 24 | 25 | list(APPEND WTF_INCLUDE_DIRECTORIES 26 | ${ECORE_EVAS_INCLUDE_DIRS} 27 | ${ECORE_INCLUDE_DIRS} 28 | ${ECORE_IMF_INCLUDE_DIRS} 29 | ${EINA_INCLUDE_DIRS} 30 | ${EO_INCLUDE_DIRS} 31 | ${EVAS_INCLUDE_DIRS} 32 | ${GLIB_INCLUDE_DIRS} 33 | ) 34 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFGeneratedCommon.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 32 6 | 7 | 8 | 9 | 10 | 11 | $(ConfigurationBuildDir)\lib$(PlatformArchitecture)\ 12 | 13 | 14 | 15 | 16 | 17 | 18 | $(PLATFORMARCHITECTURE) 19 | true 20 | 21 | 22 | -------------------------------------------------------------------------------- /WTF/GNUmakefile.am: -------------------------------------------------------------------------------- 1 | include $(srcdir)/Source/WTF/GNUmakefile.list.am 2 | 3 | noinst_LTLIBRARIES += \ 4 | libWTF.la 5 | 6 | wtf_lib_for_dep = libWTF.la 7 | $(wtf_lib_for_dep): $(srcdir)/Source/WTF/GNUmakefile.list.am 8 | 9 | libWTF_la_LDFLAGS = \ 10 | $(no_undefined) 11 | 12 | libWTF_la_SOURCES = \ 13 | $(wtf_sources) 14 | 15 | libWTF_la_LIBADD = \ 16 | $(UNICODE_LIBS) \ 17 | $(GLIB_LIBS) \ 18 | $(WINMM_LIBS) \ 19 | -lpthread \ 20 | -lz 21 | 22 | if TARGET_WIN32 23 | # OwnPtrWin.cpp needs the symbols from gdi32 dll 24 | libWTF_la_LIBADD += -lgdi32 25 | endif 26 | 27 | libWTF_la_CXXFLAGS = \ 28 | $(global_cxxflags) \ 29 | $(libWTF_la_CFLAGS) 30 | 31 | libWTF_la_CFLAGS = \ 32 | $(global_cflags) \ 33 | $(GLIB_CFLAGS) \ 34 | $(UNICODE_CFLAGS) 35 | 36 | libWTF_la_CPPFLAGS = \ 37 | $(global_cppflags) \ 38 | -I$(srcdir)/Source \ 39 | -I$(srcdir)/Source/WTF \ 40 | -I$(srcdir)/Source/WTF/wtf 41 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | JavaScriptCore 9 | CFBundleGetInfoString 10 | 530, Copyright 2003-2014 Apple Inc. 11 | CFBundleIdentifier 12 | com.apple.JavaScriptCore 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | JavaScriptCore 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 530 21 | CFBundleVersion 22 | 530 23 | 24 | 25 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCorePrefix.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | #define NULL __null 3 | #else 4 | #define NULL ((void *)0) 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #ifdef __cplusplus 22 | 23 | #include 24 | #include 25 | 26 | #endif 27 | 28 | #ifdef __cplusplus 29 | #define new ("if you use new/delete make sure to include config.h at the top of the file"()) 30 | #define delete ("if you use new/delete make sure to include config.h at the top of the file"()) 31 | #endif 32 | 33 | /* Work around bug with C++ library that screws up Objective-C++ when exception support is disabled. */ 34 | #undef try 35 | #undef catch 36 | 37 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/int32-object-out-of-bounds.js: -------------------------------------------------------------------------------- 1 | function make(value) { 2 | var result = {}; 3 | result[0] = value; 4 | return result; 5 | } 6 | 7 | function foo(a, i) { 8 | return a[i]; 9 | } 10 | 11 | noInline(foo); 12 | 13 | function test(value) { 14 | var result = foo(make(value), 0); 15 | if (result != value) 16 | throw "Error: bad result: " + result; 17 | } 18 | 19 | for (var i = 0; i < 100000; ++i) 20 | test(42); 21 | 22 | var result = foo(make(42), 1); 23 | if (result !== void 0) 24 | throw "Error: bad result: " + result; 25 | 26 | result = foo(make(42), 100); 27 | if (result !== void 0) 28 | throw "Error: bad result: " + result; 29 | 30 | result = foo(make(42), 10000); 31 | if (result !== void 0) 32 | throw "Error: bad result: " + result; 33 | 34 | Object.prototype[10000] = 23; 35 | result = foo(make(42), 10000); 36 | if (result !== 23) 37 | throw "Error: bad result: " + result; 38 | -------------------------------------------------------------------------------- /JavaScriptCore/disassembler/udis86/differences.txt: -------------------------------------------------------------------------------- 1 | This documents the differences between the stock version of udis86 and the one found 2 | here: 3 | 4 | - All files not named "udis86" were prefixed with "udis86". 5 | 6 | - assert() has been changed to ASSERT() 7 | 8 | - Mass rename of udis86_input.h inp_ prefixed functions and macros to ud_inp_ to 9 | avoid namespace pollution. 10 | 11 | - Removal of KERNEL checks. 12 | 13 | - Added #include of udis86_extern.h in udis86_decode.c. 14 | 15 | - Removed s_ie__pause and s_ie__nop from udis86_decode.c, since they weren't used. 16 | 17 | - Made udis86_syn.h use WTF_ATTRIBUTE_PRINTF. This required making a bunch of little 18 | fixes to make the compiler's format string warnings go away. 19 | 20 | - Made the code in udis86_syn.h use vsnprintf() instead of vsprintf(). 21 | 22 | - Fixed udis86_syn-att.c's jump destination printing to work correctly in 64-bit mode. 23 | 24 | - Add --outputDir option to itab.py. 25 | -------------------------------------------------------------------------------- /JavaScriptCore/shell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(JSC_SOURCES 2 | ../jsc.cpp 3 | ) 4 | 5 | set(JSC_LIBRARIES 6 | ${CMAKE_DL_LIBS} 7 | JavaScriptCore 8 | WTF 9 | ) 10 | 11 | if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC") 12 | add_definitions(-DSTATICALLY_LINKED_WITH_JavaScriptCore) 13 | endif () 14 | 15 | WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() 16 | 17 | WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES}) 18 | include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES}) 19 | add_executable(jsc ${JSC_SOURCES}) 20 | target_link_libraries(jsc ${JSC_LIBRARIES}) 21 | set_target_properties(jsc PROPERTIES FOLDER "JavaScriptCore") 22 | 23 | if (JSC_OUTPUT_NAME) 24 | set_target_properties(jsc PROPERTIES OUTPUT_NAME ${JSC_OUTPUT_NAME}) 25 | endif () 26 | 27 | if (JSC_LINK_FLAGS) 28 | ADD_TARGET_PROPERTIES(jsc LINK_FLAGS "${JSC_LINK_FLAGS}") 29 | endif () 30 | 31 | if (SHOULD_INSTALL_JS_SHELL) 32 | install(TARGETS jsc DESTINATION "${EXEC_INSTALL_DIR}") 33 | endif () 34 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_2/version120/shell.js: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Netscape Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/NPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is mozilla.org code. 13 | * 14 | * The Initial Developer of the Original Code is Netscape 15 | * Communications Corporation. Portions created by Netscape are 16 | * Copyright (C) 1998 Netscape Communications Corporation. All 17 | * Rights Reserved. 18 | * 19 | * Contributor(s): 20 | */ 21 | 22 | /* all files in this dir need version(120) called before they are *loaded* */ 23 | 24 | version(120); -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: 12.9-1-n.js 3 | ECMA Section: 12.9 The return statement 4 | Description: 5 | 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "12.9-1-n"; 10 | var VERSION = "ECMA_1"; 11 | var TITLE = "The return statment"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " The return statement"); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | eval("return;"); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "return outside of a function" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | 39 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-005.js 3 | Corresponds To: 11.2.2-10-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | 11 | var SECTION = "expression-005"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "The new operator"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var expect = "Passed"; 23 | var exception = "No exception thrown"; 24 | 25 | try { 26 | result = new Math(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "result= new Math() (threw " + exception + ")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Statements/while-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: while-001 3 | * ECMA Section: 4 | * Description: while statement 5 | * 6 | * Verify that the while statement is not executed if the while expression is 7 | * false 8 | * 9 | * Author: christine@netscape.com 10 | * Date: 11 August 1998 11 | */ 12 | var SECTION = "while-001"; 13 | var VERSION = "ECMA_2"; 14 | var TITLE = "while statement"; 15 | 16 | startTest(); 17 | writeHeaderToLog( SECTION + " "+ TITLE); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | DoWhile(); 23 | test(); 24 | 25 | function DoWhile() { 26 | result = "pass"; 27 | 28 | while (false) { 29 | result = "fail"; 30 | break; 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "while statement: don't evaluate statement is expression is false", 36 | "pass", 37 | result ); 38 | 39 | } -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/instanceof/instanceof-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: instanceof-1.js 3 | ECMA Section: 4 | Description: instanceof operator 5 | 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = ""; 10 | var VERSION = "ECMA_2"; 11 | var TITLE = "instanceof operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var b = new Boolean(); 20 | 21 | testcases[tc++] = new TestCase( SECTION, 22 | "var b = new Boolean(); b instanceof Boolean", 23 | true, 24 | b instanceof Boolean ); 25 | 26 | testcases[tc++] = new TestCase( SECTION, 27 | "b instanceof Object", 28 | true, 29 | b instanceof Object ); 30 | 31 | test(); 32 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-017.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-07.js 3 | Corresponds To: ecma/Expressions/11.2.3-4-n.js 4 | ECMA Section: 11.2.3. Function Calls 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-017"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "Function Calls"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | result = nullvalueOf(); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "null.valueOf()" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-015.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-015.js 3 | Corresponds To: ecma/Expressions/11.2.3-2-n.js 4 | ECMA Section: 11.2.3. Function Calls 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-015"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "Function Calls"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | eval("result = 3.valueOf();"); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "3.valueOf()" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/RegExp/exec-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: RegExp/exec-001.js 3 | * ECMA Section: 15.7.5.3 4 | * Description: Based on ECMA 2 Draft 7 February 1999 5 | * 6 | * Author: christine@netscape.com 7 | * Date: 19 February 1999 8 | */ 9 | var SECTION = "RegExp/exec-001"; 10 | var VERSION = "ECMA_2"; 11 | var TITLE = "RegExp.prototype.exec(string)"; 12 | 13 | startTest(); 14 | 15 | /* 16 | * for each test case, verify: 17 | * - type of object returned 18 | * - length of the returned array 19 | * - value of lastIndex 20 | * - value of index 21 | * - value of input 22 | * - value of the array indices 23 | */ 24 | 25 | // test cases without subpatterns 26 | // test cases with subpatterns 27 | // global property is true 28 | // global property is false 29 | // test cases in which the exec returns null 30 | 31 | testcases[0] = { expect:"PASSED", actual:"PASSED", description:"NO TESTS EXIST" }; 32 | 33 | test(); 34 | 35 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-016.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-016.js 3 | Corresponds To: ecma/Expressions/11.2.3-3-n.js 4 | ECMA Section: 11.2.3. Function Calls 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-016"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "Function Calls"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | result = (void 0).valueOf(); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "(void 0).valueOf()" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-003.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-003.js 3 | Corresponds To: 7.3-13-n.js 4 | ECMA Section: 7.3 Comments 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | 10 | */ 11 | var SECTION = "lexical-003.js"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Comments"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | 22 | var result = "Failed"; 23 | var exception = "No exception thrown"; 24 | var expect = "Passed"; 25 | 26 | try { 27 | eval("/*\n/* nested comment */\n*/\n"); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "/*/*nested comment*/ */" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-008.js 3 | Corresponds To: 12.8-1-n.js 4 | ECMA Section: 12.8 The break statement 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "statement-008"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The break in statment"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | eval("break;"); 26 | } catch ( e ) { 27 | result = expect; 28 | exception = e.toString(); 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "break outside of an iteration statement" + 34 | " (threw " + exception +")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | 40 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-008 3 | Corresponds To: 11.2.2-3-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-008"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var NULL = null; 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | result = new NULL(); 26 | } catch ( e ) { 27 | result = expect; 28 | exception = e.toString(); 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "NULL = null; result = new NULL()" + 34 | " (threw " + exception +")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: dowhile-001 3 | * ECMA Section: 4 | * Description: do...while statements 5 | * 6 | * 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 11 August 1998 10 | */ 11 | var SECTION = "dowhile-002"; 12 | var VERSION = "ECMA_2"; 13 | var TITLE = "do...while with a labeled continue statement"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | LabeledContinue( 0, 1 ); 22 | LabeledContinue( 1, 1 ); 23 | LabeledContinue( -1, 1 ); 24 | LabeledContinue( 5, 5 ); 25 | 26 | test(); 27 | 28 | function LabeledContinue( limit, expect ) { 29 | i = 0; 30 | woohoo: 31 | do { 32 | i++; 33 | continue woohoo; 34 | } while ( i < limit ); 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "do while ( " + i +" < " + limit +" )", 39 | expect, 40 | i ); 41 | } 42 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Statements/if-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: if-001.js 3 | * ECMA Section: 4 | * Description: The if statement 5 | * 6 | * Verify that assignment in the if expression is evaluated correctly. 7 | * Verifies the fix for bug http://scopus/bugsplat/show_bug.cgi?id=148822. 8 | * 9 | * Author: christine@netscape.com 10 | * Date: 28 August 1998 11 | */ 12 | var SECTION = "for-001"; 13 | var VERSION = "ECMA_2"; 14 | var TITLE = "The if statement"; 15 | var BUGNUMBER="148822"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var a = 0; 24 | var b = 0; 25 | var result = "passed"; 26 | 27 | if ( a = b ) { 28 | result = "failed: a = b should return 0"; 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "if ( a = b ), where a and b are both equal to 0", 34 | "passed", 35 | result ); 36 | 37 | 38 | test(); 39 | 40 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-007.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-007.js 3 | Corresponds To: 12.7-1-n.js 4 | ECMA Section: 12.7 The continue statement 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "statement-007"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The continue statment"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | eval("continue;"); 26 | } catch ( e ) { 27 | result = expect; 28 | exception = e.toString(); 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "continue outside of an iteration statement" + 34 | " (threw " + exception +")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | 40 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | SRCROOT="`pwd`/../../.." 4 | SRCROOT=`realpath "$SRCROOT"` 5 | # Do a little dance to get the path into 8.3 form to make it safe for gnu make 6 | # http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 7 | SRCROOT=`cygpath -m -s "$SRCROOT"` 8 | SRCROOT=`cygpath -u "$SRCROOT"` 9 | export SRCROOT 10 | 11 | XDSTROOT="$1" 12 | export XDSTROOT 13 | # Do a little dance to get the path into 8.3 form to make it safe for gnu make 14 | # http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 15 | XDSTROOT=`cygpath -m -s "$XDSTROOT"` 16 | XDSTROOT=`cygpath -u "$XDSTROOT"` 17 | export XDSTROOT 18 | 19 | export BUILT_PRODUCTS_DIR="$XDSTROOT/obj${3}/JavaScriptCore/DerivedSources" 20 | 21 | ############################################################################## 22 | # Step 1: Generate LLIntDesiredOffsets.h 23 | mkdir -p "${BUILT_PRODUCTS_DIR}" 24 | 25 | /usr/bin/env ruby "${SRCROOT}/offlineasm/generate_offset_extractor.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntDesiredOffsets.h" 26 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-010.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-010.js 3 | Corresponds To: 11.2.2-5-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-010"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var NUMBER = 0; 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | result = new NUMBER(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "NUMBER=0, result = new NUMBER()" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | -------------------------------------------------------------------------------- /WTF/wtf/NumberOfCores.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 University of Szeged. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef NumberOfCores_h 22 | #define NumberOfCores_h 23 | 24 | namespace WTF { 25 | 26 | WTF_EXPORT_PRIVATE int numberOfProcessorCores(); 27 | 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-009 3 | Corresponds to: ecma/Expressions/11.2.2-4-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-009"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var STRING = ""; 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | result = new STRING(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "STRING = ''; result = new STRING()" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); -------------------------------------------------------------------------------- /WTF/wtf/gobject/GlibUtilities.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 Igalia, S.L. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef GlibUtilities_h 21 | #define GlibUtilities_h 22 | 23 | #include 24 | #include 25 | 26 | CString getCurrentExecutablePath(); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /JavaScriptCore/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${PRODUCT_NAME} 9 | CFBundleGetInfoString 10 | ${BUNDLE_VERSION}, Copyright 2003-2014 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies. 11 | CFBundleIdentifier 12 | com.apple.${PRODUCT_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | ${SHORT_VERSION_STRING} 21 | CFBundleVersion 22 | ${BUNDLE_VERSION} 23 | 24 | 25 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | SRCROOT="`pwd`/../../.." 4 | SRCROOT=`realpath "$SRCROOT"` 5 | # Do a little dance to get the path into 8.3 form to make it safe for gnu make 6 | # http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 7 | SRCROOT=`cygpath -m -s "$SRCROOT"` 8 | SRCROOT=`cygpath -u "$SRCROOT"` 9 | export SRCROOT 10 | 11 | XDSTROOT="$1" 12 | export XDSTROOT 13 | # Do a little dance to get the path into 8.3 form to make it safe for gnu make 14 | # http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 15 | XDSTROOT=`cygpath -m -s "$XDSTROOT"` 16 | XDSTROOT=`cygpath -u "$XDSTROOT"` 17 | export XDSTROOT 18 | 19 | export BUILT_PRODUCTS_DIR="$XDSTROOT/obj${4}" 20 | 21 | cd "${BUILT_PRODUCTS_DIR}/JavaScriptCore/DerivedSources" 22 | 23 | ############################################################################## 24 | # Step 3: Build LLIntOffsetsExtractor 25 | 26 | /usr/bin/env ruby "${SRCROOT}/offlineasm/asm.rb" "${SRCROOT}/llint/LowLevelInterpreter.asm" "${BUILT_PRODUCTS_DIR}/LLIntOffsetsExtractor/LLIntOffsetsExtractor${3}.exe" "LLIntAssembly.h" || exit 1 27 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-007.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-007.js 3 | Corresponds To: 11.2.2-2-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | 8 | Author: christine@netscape.com 9 | Date: 12 november 1997 10 | */ 11 | var SECTION = "expression-007"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "The new operator"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | UNDEFINED = void 0; 27 | result = new UNDEFINED(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "UNDEFINED = void 0; result = new UNDEFINED()" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-011.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-011.js 3 | Corresponds To: ecma/Expressions/11.2.2-6-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-011"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var BOOLEAN = true; 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | var OBJECT = new BOOLEAN(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "BOOLEAN = true; result = new BOOLEAN()" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Statements/label-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: label-001.js 3 | * ECMA Section: 4 | * Description: Labeled statements 5 | * 6 | * Labeled break and continue within a for loop. 7 | * 8 | * 9 | * Author: christine@netscape.com 10 | * Date: 11 August 1998 11 | */ 12 | var SECTION = "label-003"; 13 | var VERSION = "ECMA_2"; 14 | var TITLE = "Labeled statements"; 15 | 16 | startTest(); 17 | writeHeaderToLog( SECTION + " "+ TITLE); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | LabelTest(0, 0); 23 | LabelTest(1, 1) 24 | LabelTest(-1, 1000); 25 | LabelTest(false, 0); 26 | LabelTest(true, 1); 27 | 28 | test(); 29 | 30 | function LabelTest( limit, expect) { 31 | woo: for ( var result = 0; result < 1000; result++ ) { if (result == limit) { break woo; } else { continue woo; } }; 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "break out of a labeled for loop: "+ limit, 36 | expect, 37 | result ); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | CFLite.lib;JavaScriptCore$(DebugSuffix).lib;WTF$(DebugSuffix).lib;libicuin.lib;libicuuc.lib;%(AdditionalDependencies) 9 | Console 10 | 11 | 12 | NOMINMAX;_CONSOLE;%(PreprocessorDefinitions) 13 | $(ProjectDir)\..\..\API;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories) 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/stress/fold-typed-array-properties.js: -------------------------------------------------------------------------------- 1 | var a = new Int32Array(new ArrayBuffer(100), 4, 1); 2 | 3 | if (a.length != 1) 4 | throw "Error: bad length: " + a.length; 5 | if (a.byteOffset != 4) 6 | throw "Error: bad offset: " + a.byteOffset; 7 | if (a.byteLength != 4) 8 | throw "Error: bad byte length: " + a.byteLength; 9 | 10 | function foo() { 11 | if (a.length != 1) 12 | throw "Error: bad length: " + a.length; 13 | if (a.byteOffset != 4) 14 | throw "Error: bad offset: " + a.byteOffset; 15 | if (a.byteLength != 4) 16 | throw "Error: bad byte length: " + a.byteLength; 17 | } 18 | 19 | for (var i = 0; i < 1000000; ++i) 20 | foo(); 21 | 22 | transferArrayBuffer(a.buffer); 23 | 24 | var didThrow = false; 25 | try { 26 | foo(); 27 | } catch (e) { 28 | didThrow = true; 29 | } 30 | 31 | if (!didThrow) 32 | throw "Should have thrown."; 33 | 34 | if (a.length != 0) 35 | throw "Error: bad length: " + a.length; 36 | if (a.byteOffset != 0) 37 | throw "Error: bad offset: " + a.byteOffset; 38 | if (a.byteLength != 0) 39 | throw "Error: bad byte length: " + a.byteLength; 40 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/WTFGenerated.make: -------------------------------------------------------------------------------- 1 | all: WTFHeaderDetection.h 2 | touch "%ConfigurationBuildDir%\buildfailed" 3 | bash build-generated-files.sh "%ConfigurationBuildDir%" "$(WEBKIT_LIBRARIES)" "$(DEBUGSUFFIX)" "%PlatformArchitecture%" 4 | !IF "$(OFFICIAL_BUILD)"!="1" 5 | bash -c "python work-around-vs-dependency-tracking-bugs.py" 6 | !ENDIF 7 | copy-files.cmd 8 | 9 | -del "%ConfigurationBuildDir%\buildfailed" 10 | 11 | clean: 12 | -del "%ConfigurationBuildDir%\buildfailed" 13 | -del "%ConfigurationBuildDir%\include\private\wtf\WTFHeaderDetection.h" 14 | copy-files.cmd clean 15 | 16 | # Header detection 17 | WTFHeaderDetection.h: WTFGenerated.make 18 | -mkdir "%ConfigurationBuildDir%\include\private\wtf 19 | < "%ConfigurationBuildDir%\include\private\wtf\$@" 22 | IF EXIST "$(WEBKIT_LIBRARIES)/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h" (echo #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1090 > "%ConfigurationBuildDir%\include\private\wtf\$@") 23 | :DONE 24 | << 25 | 26 | -------------------------------------------------------------------------------- /WTF/wtf/GetPtr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Apple Computer, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_GetPtr_h 22 | #define WTF_GetPtr_h 23 | 24 | namespace WTF { 25 | 26 | template inline T* getPtr(T* p) 27 | { 28 | return p; 29 | } 30 | 31 | } // namespace WTF 32 | 33 | #endif // WTF_GetPtr_h 34 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-013.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-013.js 3 | Corresponds To: ecma/Expressions/11.2.2-8-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-013"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | var BUGNUMBER= "327765"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var NUMBER = new Number(1); 21 | 22 | var result = "Failed"; 23 | var exception = "No exception thrown"; 24 | var expect = "Passed"; 25 | 26 | try { 27 | result = new NUMBER(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "NUMBER = new Number(1); result = new NUMBER()" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-019.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-019.js 3 | Corresponds To: 11.2.2-7-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "expression-019"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The new operator"; 13 | var BUGNUMBER= "327765"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | var STRING = new String("hi"); 27 | result = new STRING(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "var STRING = new String(\"hi\"); result = new STRING();" + 36 | " (threw " + exception + ")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testapi/testapiCommon.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | CoreFoundation$(DebugSuffix).lib;JavaScriptCore$(DebugSuffix).lib;WTF$(DebugSuffix).lib;libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;%(AdditionalDependencies) 9 | Console 10 | 11 | 12 | NOMINMAX;_CONSOLE;%(PreprocessorDefinitions) 13 | $(ProjectDir)\..\..\API;$(ConfigurationBuildDir)\include\JavaScriptCore;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories) 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-014.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-014.js 3 | Corresponds To: ecma/Expressions/11.2.2-9-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "expression-014.js"; 11 | var VERSION = "ECMA_1"; 12 | var TITLE = "The new operator"; 13 | var BUGNUMBER= "327765"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var BOOLEAN = new Boolean(); 22 | 23 | 24 | var result = "Failed"; 25 | var exception = "No exception thrown"; 26 | var expect = "Passed"; 27 | 28 | try { 29 | result = new BOOLEAN(); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "BOOLEAN = new Boolean(); result = new BOOLEAN()" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/regexp-literals-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: LexicalConventions/regexp-literals-001.js 3 | * ECMA Section: 7.8.5 4 | * Description: 5 | * 6 | * 7 | * Author: christine@netscape.com 8 | * Date: 11 August 1998 9 | */ 10 | var SECTION = "LexicalConventions/regexp-literals-001.js"; 11 | var VERSION = "ECMA_2"; 12 | var TITLE = "Regular Expression Literals"; 13 | 14 | startTest(); 15 | 16 | // Regular Expression Literals may not be empty; // should be regarded 17 | // as a comment, not a RegExp literal. 18 | 19 | s = //; 20 | 21 | "passed"; 22 | 23 | AddTestCase( 24 | "// should be a comment, not a regular expression literal", 25 | "passed", 26 | String(s)); 27 | 28 | AddTestCase( 29 | "// typeof object should be type of object declared on following line", 30 | "passed", 31 | (typeof s) == "string" ? "passed" : "failed" ); 32 | 33 | AddTestCase( 34 | "// should not return an object of the type RegExp", 35 | "passed", 36 | (typeof s == "object") ? "failed" : "passed" ); 37 | 38 | test(); 39 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-007.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-005.js 3 | Corresponds To: 7.4.1-3-n.js 4 | ECMA Section: 7.4.1 5 | 6 | Description: 7 | 8 | Reserved words cannot be used as identifiers. 9 | 10 | ReservedWord :: 11 | Keyword 12 | FutureReservedWord 13 | NullLiteral 14 | BooleanLiteral 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | */ 19 | var SECTION = "lexical-005"; 20 | var VERSION = "JS1_4"; 21 | var TITLE = "Keywords"; 22 | 23 | startTest(); 24 | writeHeaderToLog( SECTION + " "+ TITLE); 25 | 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("false = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "false = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | -------------------------------------------------------------------------------- /WTF/wtf/text/mac/StringImplMac.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #import "config.h" 22 | #import "StringImpl.h" 23 | 24 | #import "ObjcRuntimeExtras.h" 25 | #import "RetainPtr.h" 26 | 27 | namespace WTF { 28 | 29 | StringImpl::operator NSString *() 30 | { 31 | return CFBridgingRelease(createCFString().leakRef()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-005.js 3 | Corresponds To: 7.4.1-2.js 4 | ECMA Section: 7.4.1 5 | 6 | Description: 7 | 8 | Reserved words cannot be used as identifiers. 9 | 10 | ReservedWord :: 11 | Keyword 12 | FutureReservedWord 13 | NullLiteral 14 | BooleanLiteral 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | 19 | */ 20 | var SECTION = "lexical-005"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Keywords"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | 31 | var result = "Failed"; 32 | var exception = "No exception thrown"; 33 | var expect = "Passed"; 34 | 35 | try { 36 | eval("true = false;"); 37 | } catch ( e ) { 38 | result = expect; 39 | exception = e.toString(); 40 | } 41 | 42 | testcases[tc++] = new TestCase( 43 | SECTION, 44 | "true = false" + 45 | " (threw " + exception +")", 46 | expect, 47 | result ); 48 | 49 | test(); 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-001 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * Call error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-001"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: CallError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | Call_1(); 22 | 23 | test(); 24 | 25 | function Call_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | Math(); 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "Math() [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-006.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-006.js 3 | Corresponds to: 11.2.2-1-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | http://scopus/bugsplat/show_bug.cgi?id=327765 8 | 9 | Author: christine@netscape.com 10 | Date: 12 november 1997 11 | */ 12 | var SECTION = "expression-006.js"; 13 | var VERSION = "JS1_4"; 14 | var TITLE = "The new operator"; 15 | var BUGNUMBER="327765"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | var OBJECT = new Object(); 29 | result = new OBJECT(); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "OBJECT = new Object; result = new OBJECT()" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/global-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: global-002 3 | Corresponds To: ecma/GlobalObject/15.1-2-n.js 4 | ECMA Section: The global object 5 | Description: 6 | 7 | The global object does not have a [[Construct]] property; it is not 8 | possible to use the global object as a constructor with the new operator. 9 | 10 | 11 | Author: christine@netscape.com 12 | Date: 12 november 1997 13 | */ 14 | var SECTION = "global-002"; 15 | var VERSION = "JS1_4"; 16 | var TITLE = "The Global Object"; 17 | 18 | startTest(); 19 | writeHeaderToLog( SECTION + " "+ TITLE); 20 | 21 | var tc = 0; 22 | var testcases = new Array(); 23 | 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | result = this(); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "result = this()" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-048.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-048.js 3 | Corresponds To: 7.8.1-1.js 4 | ECMA Section: 7.8.1 Rules of Automatic Semicolon Insertion 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 15 september 1997 8 | */ 9 | 10 | var SECTION = "lexical-048"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The Rules of Automatic Semicolon Insertion"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | var counter = 0; 26 | eval( "for ( counter = 0;\ncounter <= 1\ncounter++ ) {\nresult += \": got inside for loop\")"); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "line breaks within a for expression" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | 42 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/global-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: global-001 3 | Corresponds To: ecma/GlobalObject/15.1-1-n.js 4 | ECMA Section: The global object 5 | Description: 6 | 7 | The global object does not have a [[Construct]] property; it is not 8 | possible to use the global object as a constructor with the new operator. 9 | 10 | 11 | Author: christine@netscape.com 12 | Date: 12 november 1997 13 | */ 14 | var SECTION = "global-001"; 15 | var VERSION = "ECMA_1"; 16 | var TITLE = "The Global Object"; 17 | 18 | startTest(); 19 | writeHeaderToLog( SECTION + " "+ TITLE); 20 | 21 | var tc = 0; 22 | var testcases = new Array(); 23 | 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | result = new this(); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "result = new this()" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-050.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-050.js 3 | Corresponds to: 7.8.2-1-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-050"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | eval("{ 1 2 } 3"); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "{ 1 2 } 3" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-012.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-012.js 3 | Corresponds To: ecma/Expressions/11.2.2-6-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | http://scopus/bugsplat/show_bug.cgi?id=327765 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "expression-012"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The new operator"; 13 | var BUGNUMBER= "327765"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var STRING = new String("hi"); 22 | var result = "Failed"; 23 | var exception = "No exception thrown"; 24 | var expect = "Passed"; 25 | 26 | try { 27 | result = new STRING(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "STRING = new String(\"hi\"); result = new STRING()" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /WTF/WTF.vcxproj/copy-files.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | setlocal 4 | REM limit path to DOS-only for this file to avoid confusion between DOS rmdir and Cygwin's variant 5 | set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem 6 | set PrivateHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\private 7 | 8 | if "%1" EQU "clean" goto :clean 9 | if "%1" EQU "rebuild" call :clean 10 | 11 | for %%d in ( 12 | wtf 13 | wtf\dtoa 14 | wtf\gobject 15 | wtf\text 16 | wtf\threads 17 | wtf\unicode 18 | wtf\unicode\icu 19 | wtf\win 20 | ) do ( 21 | mkdir "%PrivateHeadersDirectory%\%%d" 2>NUL 22 | xcopy /y /d ..\%%d\*.h "%PrivateHeadersDirectory%\%%d" >NUL 23 | ) 24 | 25 | echo Copying other files... 26 | for %%f in ( 27 | ..\JavaScriptCore\create_hash_table 28 | wtf\text\AtomicString.cpp 29 | wtf\text\StringBuilder.cpp 30 | wtf\text\StringImpl.cpp 31 | wtf\text\WTFString.cpp 32 | ) do ( 33 | echo F | xcopy /y /d ..\%%f "%PrivateHeadersDirectory%\%%f" >NUL 34 | ) 35 | 36 | goto :EOF 37 | 38 | :clean 39 | 40 | echo Deleting copied files... 41 | if exist "%PrivateHeadersDirectory%" rmdir /s /q "%PrivateHeadersDirectory%" >NUL 42 | endlocal 43 | 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-004.js 3 | Corresponds To: ecma/LexicalExpressions/7.4.1-1-n.js 4 | ECMA Section: 7.4.1 5 | 6 | Description: 7 | 8 | Reserved words cannot be used as identifiers. 9 | 10 | ReservedWord :: 11 | Keyword 12 | FutureReservedWord 13 | NullLiteral 14 | BooleanLiteral 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | 19 | */ 20 | var SECTION = "lexical-004"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Keywords"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("var null = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "var null = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-004 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * ToObject error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-004"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: ToObjectError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | ToObject_1(); 22 | 23 | test(); 24 | 25 | function ToObject_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = foo["bar"]; 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "foo[\"bar\"] [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-005 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * ToObject error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-005"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: ToObjectError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | ToObject_1(); 22 | 23 | test(); 24 | 25 | function ToObject_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = foo["bar"]; 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "foo[\"bar\"] [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-008 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * SyntaxError. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-008"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | Syntax_1(); 22 | 23 | test(); 24 | 25 | function Syntax_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = eval("continue;"); 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "eval(\"continue\") [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-002 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * Construct error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-002"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: ConstructError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | Construct_1(); 22 | 23 | test(); 24 | 25 | function Construct_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = new Math(); 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "new Math() [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-051.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-051.js 3 | Corresponds to: 7.8.2-3-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-051"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | eval("for (a; b\n) result += \": got to inner loop\";") 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "for (a; b\n)" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/FunctionObjects/apply-001-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | print ("STATUS: f.apply crash test."); 26 | 27 | print ("BUGNUMBER: 21836"); 28 | 29 | function f () 30 | { 31 | } 32 | 33 | test (); 34 | 35 | function test () 36 | { 37 | f.apply(2,2); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/RegExp/regress-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: RegExp/regress-001.js 3 | * ECMA Section: N/A 4 | * Description: Regression test case: 5 | * JS regexp anchoring on empty match bug 6 | * http://bugzilla.mozilla.org/show_bug.cgi?id=2157 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 19 February 1999 10 | */ 11 | var SECTION = "RegExp/hex-001.js"; 12 | var VERSION = "ECMA_2"; 13 | var TITLE = "JS regexp anchoring on empty match bug"; 14 | var BUGNUMBER = "http://bugzilla.mozilla.org/show_bug.cgi?id=2157"; 15 | 16 | startTest(); 17 | 18 | AddRegExpCases( /a||b/(''), 19 | "//a||b/('')", 20 | 1, 21 | [''] ); 22 | 23 | test(); 24 | 25 | function AddRegExpCases( regexp, str_regexp, length, matches_array ) { 26 | 27 | AddTestCase( 28 | "( " + str_regexp + " ).length", 29 | regexp.length, 30 | regexp.length ); 31 | 32 | 33 | for ( var matches = 0; matches < matches_array.length; matches++ ) { 34 | AddTestCase( 35 | "( " + str_regexp + " )[" + matches +"]", 36 | matches_array[matches], 37 | regexp[matches] ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-011-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | print ("Undefined throw test."); 30 | 31 | throw (void 0); 32 | 33 | print ("FAILED!: Should have exited with uncaught exception."); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-047.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-047.js 3 | Corresponds To: 7.8.1-7-n.js 4 | ECMA Section: 7.8.1 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 15 september 1997 8 | */ 9 | 10 | var SECTION = "lexical-047"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "for loops"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | var counter = 0; 26 | eval("for ( counter = 0\n" 27 | + "counter <= 1\n" 28 | + "counter++ )\n" 29 | + "{\n" 30 | + "result += \": got to inner loop\";\n" 31 | + "}\n"); 32 | 33 | } catch ( e ) { 34 | result = expect; 35 | exception = e.toString(); 36 | } 37 | 38 | testcases[tc++] = new TestCase( 39 | SECTION, 40 | "line breaks within a for expression" + 41 | " (threw " + exception +")", 42 | expect, 43 | result ); 44 | 45 | test(); 46 | 47 | 48 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-001.js 3 | Corresponds To: 12.6.2-9-n.js 4 | ECMA Section: 12.6.2 The for Statement 5 | 6 | 1. first expression is not present. 7 | 2. second expression is not present 8 | 3. third expression is not present 9 | 10 | 11 | Author: christine@netscape.com 12 | Date: 15 september 1997 13 | */ 14 | 15 | var SECTION = "statement-001.js"; 16 | // var SECTION = "12.6.2-9-n"; 17 | var VERSION = "ECMA_1"; 18 | var TITLE = "The for statment"; 19 | 20 | startTest(); 21 | writeHeaderToLog( SECTION + " "+ TITLE); 22 | 23 | var testcases = new Array(); 24 | var tc = 0; 25 | 26 | var result = "Failed"; 27 | var exception = "No exception thrown"; 28 | var expect = "Passed"; 29 | 30 | try { 31 | eval("for (i) {\n}"); 32 | } catch ( e ) { 33 | result = expect; 34 | exception = e.toString(); 35 | } 36 | 37 | testcases[tc++] = new TestCase( 38 | SECTION, 39 | "for(i) {}" + 40 | " (threw " + exception +")", 41 | expect, 42 | result ); 43 | 44 | test(); 45 | -------------------------------------------------------------------------------- /WTF/wtf/Noncopyable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_Noncopyable_h 22 | #define WTF_Noncopyable_h 23 | 24 | #include 25 | 26 | #define WTF_MAKE_NONCOPYABLE(ClassName) \ 27 | private: \ 28 | ClassName(const ClassName&) WTF_DELETED_FUNCTION; \ 29 | ClassName& operator=(const ClassName&) WTF_DELETED_FUNCTION; \ 30 | 31 | #endif // WTF_Noncopyable_h 32 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-039.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-039 3 | Corresponds To: 7.5-2-n.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-039"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | eval("var 0abc;"); 29 | } catch ( e ) { 30 | result = expect; 31 | exception = e.toString(); 32 | } 33 | 34 | testcases[tc++] = new TestCase( 35 | SECTION, 36 | "var 0abc" + 37 | " (threw " + exception +")", 38 | expect, 39 | result ); 40 | 41 | test(); 42 | 43 | 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-040.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-040.js 3 | Corresponds To: 7.5-2.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-040"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | eval("var 1abc;"); 29 | } catch ( e ) { 30 | result = expect; 31 | exception = e.toString(); 32 | } 33 | 34 | testcases[tc++] = new TestCase( 35 | SECTION, 36 | "var 1abc" + 37 | " (threw " + exception +")", 38 | expect, 39 | result ); 40 | 41 | test(); 42 | 43 | 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-006.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-006.js 3 | Corresponds To: 12.6.3-9-n.js 4 | ECMA Section: 12.6.3 The for...in Statement 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 11 september 1997 9 | */ 10 | var SECTION = "statement-006"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The for..in statment"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | var o = new MyObject(); 26 | var result = 0; 27 | for ( var o in foo) { 28 | result += this[o]; 29 | } 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "object is not defined" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | function MyObject() { 45 | this.value = 2; 46 | this[0] = 4; 47 | return this; 48 | } -------------------------------------------------------------------------------- /JavaScriptCore/parser/Keywords.table: -------------------------------------------------------------------------------- 1 | # Main keywords. 2 | @begin mainTable 47 3 | 4 | # Types. 5 | null NULLTOKEN 6 | true TRUETOKEN 7 | false FALSETOKEN 8 | 9 | # Keywords. 10 | break BREAK 11 | case CASE 12 | catch CATCH 13 | const CONSTTOKEN 14 | default DEFAULT 15 | finally FINALLY 16 | for FOR 17 | instanceof INSTANCEOF 18 | new NEW 19 | var VAR 20 | continue CONTINUE 21 | function FUNCTION 22 | return RETURN 23 | void VOIDTOKEN 24 | delete DELETETOKEN 25 | if IF 26 | this THISTOKEN 27 | do DO 28 | while WHILE 29 | else ELSE 30 | in INTOKEN 31 | switch SWITCH 32 | throw THROW 33 | try TRY 34 | typeof TYPEOF 35 | with WITH 36 | debugger DEBUGGER 37 | 38 | # Reserved for future use. 39 | class RESERVED 40 | enum RESERVED 41 | export RESERVED 42 | extends RESERVED 43 | import RESERVED 44 | super RESERVED 45 | 46 | # Reserved for future use in strict code. 47 | implements RESERVED_IF_STRICT 48 | interface RESERVED_IF_STRICT 49 | let RESERVED_IF_STRICT 50 | package RESERVED_IF_STRICT 51 | private RESERVED_IF_STRICT 52 | protected RESERVED_IF_STRICT 53 | public RESERVED_IF_STRICT 54 | static RESERVED_IF_STRICT 55 | yield RESERVED_IF_STRICT 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-004.js 3 | Corresponds To: 12.6.3-1.js 4 | ECMA Section: 12.6.3 The for...in Statement 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 11 september 1997 8 | */ 9 | var SECTION = "statement-004"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The for..in statment"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var testcases = new Array(); 17 | var tc = 0; 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | var o = new MyObject(); 25 | 26 | eval("for ( \"a\" in o) {\n" 27 | + "result += this[p];\n" 28 | + "}"); 29 | 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "bad left-hand side expression" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | 45 | function MyObject() { 46 | this.value = 2; 47 | this[0] = 4; 48 | return this; 49 | } 50 | -------------------------------------------------------------------------------- /JavaScriptCore/runtime/JSDestructibleObject.h: -------------------------------------------------------------------------------- 1 | #ifndef JSDestructibleObject_h 2 | #define JSDestructibleObject_h 3 | 4 | #include "JSObject.h" 5 | 6 | namespace JSC { 7 | 8 | struct ClassInfo; 9 | 10 | class JSDestructibleObject : public JSNonFinalObject { 11 | public: 12 | typedef JSNonFinalObject Base; 13 | 14 | static const bool needsDestruction = true; 15 | 16 | const ClassInfo* classInfo() const { return m_classInfo; } 17 | 18 | static ptrdiff_t classInfoOffset() { return OBJECT_OFFSETOF(JSDestructibleObject, m_classInfo); } 19 | 20 | protected: 21 | JSDestructibleObject(VM& vm, Structure* structure, Butterfly* butterfly = 0) 22 | : JSNonFinalObject(vm, structure, butterfly) 23 | , m_classInfo(structure->classInfo()) 24 | { 25 | ASSERT(m_classInfo); 26 | } 27 | 28 | private: 29 | const ClassInfo* m_classInfo; 30 | }; 31 | 32 | inline const ClassInfo* JSCell::classInfo() const 33 | { 34 | if (MarkedBlock::blockFor(this)->destructorType() == MarkedBlock::Normal) 35 | return static_cast(this)->classInfo(); 36 | #if ENABLE(GC_VALIDATION) 37 | return m_structure.unvalidatedGet()->classInfo(); 38 | #else 39 | return m_structure->classInfo(); 40 | #endif 41 | } 42 | 43 | } // namespace JSC 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-010-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | print ("Null throw test."); 30 | print ("BUGNUMBER: 21799"); 31 | 32 | throw null; 33 | 34 | print ("FAILED!: Should have exited with uncaught exception."); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-052.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-052.js 3 | Corresponds to: 7.8.2-4-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-052"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | MyFunction(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "calling return indirectly" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | function MyFunction() { 42 | var s = "return"; 43 | eval(s); 44 | } 45 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-054.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-054.js 3 | Corresponds to: 7.8.2-7-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-054"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | a=0; 27 | b=1; 28 | c=2; 29 | d=3; 30 | eval("if (a > b)\nelse c = d"); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "if (a > b)\nelse c = d" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/js1_3/template.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: switch_1.js 3 | Section: 4 | Description: 5 | 6 | http://scopus.mcom.com/bugsplat/show_bug.cgi?id=315767 7 | 8 | Verify that switches do not use strict equality in 9 | versions of JavaScript < 1.4 10 | 11 | Author: christine@netscape.com 12 | Date: 12 november 1997 13 | */ 14 | // onerror = err; 15 | 16 | var SECTION = "script_1; 17 | var VERSION = "JS1_3"; 18 | var TITLE = "NativeScript"; 19 | var BUGNUMBER="31567"; 20 | 21 | startTest(); 22 | writeHeaderToLog( SECTION + " "+ TITLE); 23 | 24 | var tc = 0; 25 | var testcases = new Array(); 26 | 27 | 28 | testcases[tc++] = new TestCase( SECTION, 29 | 30 | 31 | test(); 32 | function test() { 33 | for ( tc=0; tc < testcases.length; tc++ ) { 34 | testcases[tc].passed = writeTestCaseResult( 35 | testcases[tc].expect, 36 | testcases[tc].actual, 37 | testcases[tc].description +" = "+ 38 | testcases[tc].actual ); 39 | 40 | testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; 41 | } 42 | stopTest(); 43 | return ( testcases ); 44 | } 45 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-053.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-053.js 3 | Corresponds to: 7.8.2-7-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-053"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | a = true 27 | b = false 28 | 29 | eval('if (a > b)\nelse result += ": got to else statement"'); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "calling return indirectly" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-005.js 3 | Corresponds To: 12.6.3-8-n.js 4 | ECMA Section: 12.6.3 The for...in Statement 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 11 september 1997 8 | */ 9 | var SECTION = "statement-005"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The for..in statment"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var testcases = new Array(); 17 | var tc = 0; 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | var o = new MyObject(); 25 | result = 0; 26 | 27 | eval("for (1 in o) {\n" 28 | + "result += this[p];" 29 | + "}\n"); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "bad left-hand side expression" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | function MyObject() { 45 | this.value = 2; 46 | this[0] = 4; 47 | return this; 48 | } 49 | -------------------------------------------------------------------------------- /WTF/wtf/efl/RefPtrEfl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Samsung Electronics 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef RefPtrEfl_h 21 | #define RefPtrEfl_h 22 | 23 | #include 24 | 25 | #if USE(EO) 26 | typedef struct _Eo_Opaque Evas_Object; 27 | #else 28 | typedef struct _Evas_Object Evas_Object; 29 | #endif 30 | 31 | namespace WTF { 32 | 33 | template<> void refIfNotNull(Evas_Object* ptr); 34 | template<> void derefIfNotNull(Evas_Object* ptr); 35 | 36 | } 37 | 38 | #endif // RefPtrEfl_h 39 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | _CONSOLE;__STD_C;%(PreprocessorDefinitions) 9 | $(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\JavaScriptCore\DerivedSources;..\..\;..\..\os-win32;..\..\assembler;..\..\API;..\..\parser;..\..\heap;..\..\runtime;..\..\bytecode;..\..\interpreter;..\..\debugger;..\..\bytecompiler;..\..\profiler;..\..\jit;$(WebKit_Libraries)\include;%(AdditionalIncludeDirectories) 10 | 11 | 12 | JavaScriptCore$(DebugSuffix).lib;libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;WTF$(DebugSuffix).lib;winmm.lib;user32.lib;%(AdditionalDependencies) 13 | Console 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /JavaScriptCore/runtime/PropertySlot.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005, 2008 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #include "config.h" 22 | #include "PropertySlot.h" 23 | 24 | #include "GetterSetter.h" 25 | #include "JSCJSValueInlines.h" 26 | 27 | namespace JSC { 28 | 29 | JSValue PropertySlot::functionGetter(ExecState* exec) const 30 | { 31 | ASSERT(m_thisValue); 32 | return callGetter(exec, m_thisValue, m_data.getter.getterSetter); 33 | } 34 | 35 | } // namespace JSC 36 | -------------------------------------------------------------------------------- /JavaScriptCore/PlatformGTK.cmake: -------------------------------------------------------------------------------- 1 | configure_file(javascriptcoregtk.pc.in ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-3.0.pc @ONLY) 2 | configure_file(JavaScriptCore.gir.in ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir @ONLY) 3 | 4 | add_custom_command( 5 | OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib 6 | DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir 7 | COMMAND ${INTROSPECTION_COMPILER} ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib 8 | ) 9 | 10 | ADD_TYPELIB(${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib) 11 | 12 | install(FILES "${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-3.0.pc" 13 | DESTINATION "${LIB_INSTALL_DIR}/pkgconfig" 14 | ) 15 | 16 | install(FILES API/JavaScript.h 17 | API/JSBase.h 18 | API/JSContextRef.h 19 | API/JSObjectRef.h 20 | API/JSStringRef.h 21 | API/JSValueRef.h 22 | API/WebKitAvailability.h 23 | DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/JavaScriptCore" 24 | ) 25 | 26 | install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir 27 | DESTINATION ${INTROSPECTION_INSTALL_GIRDIR} 28 | ) 29 | install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib 30 | DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR} 31 | ) 32 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/FunctionObjects/call-1.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: call-1.js 3 | Section: Function.prototype.call 4 | Description: 5 | 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "call-1"; 11 | var VERSION = "ECMA_2"; 12 | var TITLE = "Function.prototype.call"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | 21 | testcases[tc++] = new TestCase( SECTION, 22 | "ToString.call( this, this )", 23 | GLOBAL, 24 | ToString.call( this, this ) ); 25 | 26 | testcases[tc++] = new TestCase( SECTION, 27 | "ToString.call( Boolean, Boolean.prototype )", 28 | "false", 29 | ToString.call( Boolean, Boolean.prototype ) ); 30 | 31 | testcases[tc++] = new TestCase( SECTION, 32 | "ToString.call( Boolean, Boolean.prototype.valueOf() )", 33 | "false", 34 | ToString.call( Boolean, Boolean.prototype.valueOf() ) ); 35 | 36 | test(); 37 | 38 | function ToString( obj ) { 39 | return obj +""; 40 | } -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/build-generated-files.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | NUMCPUS=`../../../Tools/Scripts/num-cpus` 4 | 5 | XSRCROOT="`pwd`/.." 6 | XSRCROOT=`realpath "$XSRCROOT"` 7 | # Do a little dance to get the path into 8.3 form to make it safe for gnu make 8 | # http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 9 | XSRCROOT=`cygpath -m "$XSRCROOT"` 10 | XSRCROOT=`cygpath -u "$XSRCROOT"` 11 | export XSRCROOT 12 | export SOURCE_ROOT=$XSRCROOT 13 | XDSTROOT="$1" 14 | export XDSTROOT 15 | # Do a little dance to get the path into 8.3 form to make it safe for gnu make 16 | # http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 17 | XDSTROOT=`cygpath -m -s "$XDSTROOT"` 18 | XDSTROOT=`cygpath -u "$XDSTROOT"` 19 | export XDSTROOT 20 | 21 | SDKROOT="$2" 22 | export SDKROOT 23 | # Do a little dance to get the path into 8.3 form to make it safe for gnu make 24 | # http://bugzilla.opendarwin.org/show_bug.cgi?id=8173 25 | SDKROOT=`cygpath -m -s "$SDKROOT"` 26 | SDKROOT=`cygpath -u "$SDKROOT"` 27 | export SDKROOT 28 | 29 | export BUILT_PRODUCTS_DIR="$XDSTROOT/obj${3}/JavaScriptCore" 30 | 31 | mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources" 32 | cd "${BUILT_PRODUCTS_DIR}/DerivedSources" 33 | 34 | export JavaScriptCore="${XSRCROOT}" 35 | export DFTABLES_EXTENSION=".exe" 36 | make -f "$JavaScriptCore/DerivedSources.make" -j ${NUMCPUS} || exit 1 37 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-049.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-049 3 | Corresponds To: 7.8.1-1.js 4 | ECMA Section: 7.8.1 Rules of Automatic Semicolon Insertioin 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 15 september 1997 8 | */ 9 | var SECTION = "lexical-049"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The Rules of Automatic Semicolon Insertion"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | var counter = 0; 25 | eval("for ( counter = 0\n" 26 | + "counter <= 1;\n" 27 | + "counter++ )\n" 28 | + "{\n" 29 | + "result += \": got inside for loop\";\n" 30 | + "}\n"); 31 | 32 | } catch ( e ) { 33 | result = expect; 34 | exception = e.toString(); 35 | } 36 | 37 | testcases[tc++] = new TestCase( 38 | SECTION, 39 | "line breaks within a for expression" + 40 | " (threw " + exception +")", 41 | expect, 42 | result ); 43 | 44 | test(); 45 | 46 | 47 | -------------------------------------------------------------------------------- /WTF/wtf/unicode/icu/UnicodeIcu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 George Staikos 3 | * Copyright (C) 2006 Alexey Proskuryakov 4 | * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public License 17 | * along with this library; see the file COPYING.LIB. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef WTF_UNICODE_ICU_H 24 | #define WTF_UNICODE_ICU_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #endif // WTF_UNICODE_ICU_H 33 | -------------------------------------------------------------------------------- /JavaScriptCore-iOS-Static.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // JavaScriptCore-iOS-Static.xcconfig 3 | // JavaScriptCore 4 | // 5 | // Created by Martijn The on 1/17/14. 6 | // 7 | // 8 | 9 | #include "JavaScriptCore/Configurations/JavaScriptCore.xcconfig" 10 | 11 | ARCHS = armv7 armv7s arm64; 12 | ONLY_ACTIVE_ARCH = NO; 13 | SDKROOT = iphoneos; 14 | VALID_ARCHS = arm64 armv7 i386; 15 | BUILD_VARIANTS = normal; 16 | IPHONEOS_DEPLOYMENT_TARGET = 5.1; 17 | STRIP_INSTALLED_PRODUCT = YES; 18 | OTHER_LDFLAGS = ; 19 | PRODUCT_NAME = JavaScriptCore; 20 | HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" "${SOURCE_ROOT}/../WTF/" $(HEADER_SEARCH_PATHS); 21 | LIBRARY_SEARCH_PATHS = "${SOURCE_ROOT}/../Build/"; 22 | 23 | SECTORDER_FLAGS = ; 24 | SECTORDER_FLAGS_iphoneos = ; 25 | 26 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 27 | GCC_OPTIMIZATION_LEVEL = 3; 28 | GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) HAVE_DTRACE=$(HAVE_DTRACE) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST HAVE_HEADER_DETECTION_H JSC_OBJC_API_ENABLED=0 JSC_OBJC_API_AVAILABLE_MAC_OS_X_1080 $(FEATURE_DEFINES) $(GCC_PREPROCESSOR_DEFINITIONS) __MAC_OS_X_VERSION_MIN_REQUIRED=0 ENABLE_YARR_JIT=0; 29 | 30 | ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR=0; // Requires XPC 31 | 32 | PRIVATE_HEADERS_FOLDER_PATH = /dev/null; 33 | PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; 34 | 35 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-041.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-041.js 3 | Corresponds To: 7.5-8-n.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-041"; 14 | var VERSION = "ECMA_1"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | startTest(); 20 | writeHeaderToLog( SECTION + " "+ TITLE); 21 | 22 | var tc = 0; 23 | var testcases = new Array(); 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | eval("var @abc;"); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "var @abc" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | 45 | 46 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-042.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-042.js 3 | Corresponds To: 7.5-9-n.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-042"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | startTest(); 21 | writeHeaderToLog( SECTION + " "+ TITLE); 22 | 23 | var tc = 0; 24 | var testcases = new Array(); 25 | 26 | var result = "Failed"; 27 | var exception = "No exception thrown"; 28 | var expect = "Passed"; 29 | 30 | try { 31 | eval("var 123;"); 32 | } catch ( e ) { 33 | result = expect; 34 | exception = e.toString(); 35 | } 36 | 37 | testcases[tc++] = new TestCase( 38 | SECTION, 39 | "var 123" + 40 | " (threw " + exception +")", 41 | expect, 42 | result ); 43 | 44 | test(); 45 | 46 | 47 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-004.js 3 | Corresponds To: 11.2.1-4-n.js 4 | ECMA Section: 11.2.1 Property Accessors 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 09 september 1998 9 | */ 10 | var SECTION = "expression-004"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "Property Accessors"; 13 | writeHeaderToLog( SECTION + " "+TITLE ); 14 | startTest(); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var OBJECT = new Property( "null", null, "null", 0 ); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | result = OBJECT.value.toString(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "Get the toString value of an object whose value is null "+ 35 | "(threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | function Property( object, value, string, number ) { 42 | this.object = object; 43 | this.string = String(value); 44 | this.number = Number(value); 45 | this.value = value; 46 | } 47 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/FunExpr/fe-001-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | printStatus ("Function Expression test."); 31 | 32 | var x = function f(){return "inner";}(); 33 | var y = f(); 34 | reportFailure ("Previous statement should have thrown a ReferenceError"); 35 | 36 | exitFunc ("test"); 37 | } 38 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/FunExpr/fe-001.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | if (1) function f() {return 1;} 26 | if (0) function f() {return 0;} 27 | 28 | function test() 29 | { 30 | enterFunc ("test"); 31 | 32 | printStatus ("Function Expression Statements basic test."); 33 | 34 | reportCompare (1, f(), "Both functions were defined."); 35 | 36 | exitFunc ("test"); 37 | } 38 | 39 | test(); 40 | -------------------------------------------------------------------------------- /JavaScriptCore/runtime/StringRecursionChecker.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | */ 19 | 20 | #include "config.h" 21 | #include "StringRecursionChecker.h" 22 | 23 | #include "Error.h" 24 | #include "ExceptionHelpers.h" 25 | #include "Operations.h" 26 | 27 | namespace JSC { 28 | 29 | JSValue StringRecursionChecker::throwStackOverflowError() 30 | { 31 | return m_exec->vm().throwException(m_exec, createStackOverflowError(m_exec)); 32 | } 33 | 34 | JSValue StringRecursionChecker::emptyString() 35 | { 36 | return jsEmptyString(m_exec); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/date-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: date-004.js 3 | Corresponds To: 15.9.5.4-2-n.js 4 | ECMA Section: 15.9.5.4-1 Date.prototype.getTime 5 | Description: 6 | 7 | 1. If the this value is not an object whose [[Class]] property is "Date", 8 | generate a runtime error. 9 | 2. Return this time value. 10 | Author: christine@netscape.com 11 | Date: 12 november 1997 12 | */ 13 | var SECTION = "date-004"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Date.prototype.getTime"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | var MYDATE = new MyDate(); 29 | result = MYDATE.getTime(); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "MYDATE = new MyDate(); MYDATE.getTime()" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | function MyDate( value ) { 45 | this.value = value; 46 | this.getTime = Date.prototype.getTime; 47 | } 48 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-009 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * Regression test for nested try blocks. 7 | * 8 | * http://scopus.mcom.com/bugsplat/show_bug.cgi?id=312964 9 | * 10 | * Author: christine@netscape.com 11 | * Date: 31 August 1998 12 | */ 13 | var SECTION = "exception-009"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError"; 16 | var BUGNUMBER= "312964"; 17 | 18 | startTest(); 19 | writeHeaderToLog( SECTION + " "+ TITLE); 20 | 21 | var tc = 0; 22 | var testcases = new Array(); 23 | 24 | try { 25 | expect = "passed: no exception thrown"; 26 | result = expect; 27 | Nested_1(); 28 | } catch ( e ) { 29 | result = "failed: threw " + e; 30 | } finally { 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "nested try", 34 | expect, 35 | result ); 36 | } 37 | 38 | 39 | test(); 40 | 41 | function Nested_1() { 42 | try { 43 | try { 44 | } catch (a) { 45 | } finally { 46 | } 47 | } catch (b) { 48 | } finally { 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-28686.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printBugNumber (28686); 32 | 33 | var str = 'foo "bar" baz'; 34 | reportCompare ('foo \\"bar\\" baz', str.replace(/([\'\"])/g, "\\$1"), 35 | "str.replace failed."); 36 | 37 | exitFunc ("test"); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ..\;..\tools\;..\runtime\;..\llint\;..\jit\;..\disassembler\;..\heap\;..\debugger\;..\assembler\;..\profiler\;..\yarr\;..\interpreter\;..\bytecode\;..\dfg\;..\bytecompiler\;..\parser\;..\API\;..\ftl\;..\bindings\;..\inspector\;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\JavaScriptCore\DerivedSources\;$(ConfigurationBuildDir)\include\;$(ConfigurationBuildDir)\include\JavaScriptCore\;$(ConfigurationBuildDir)\include\private\;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories) 9 | ICUVersion.h;%(ForcedIncludeFiles) 10 | 11 | 12 | winmm.lib;libicuin$(DebugSuffix).lib;libicuuc$(DebugSuffix).lib;WTF$(DebugSuffix).lib;%(AdditionalDependencies) 13 | 14 | 15 | Console 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-002-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printStatus ("Non-character escapes in identifiers negative test."); 32 | printBugNumber (23607); 33 | 34 | reportCompare ("error", eval("\u0020 = 5"), 35 | "Non-character escapes in identifiers negative test."); 36 | 37 | exitFunc ("test"); 38 | } 39 | -------------------------------------------------------------------------------- /JavaScriptCore/runtime/JSAPIValueWrapper.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2002 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 | * Copyright (C) 2004, 2007, 2008 Apple Inc. All rights reserved. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public License 17 | * along with this library; see the file COPYING.LIB. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #include "config.h" 24 | #include "JSAPIValueWrapper.h" 25 | 26 | #include "NumberObject.h" 27 | 28 | namespace JSC { 29 | 30 | STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSAPIValueWrapper); 31 | 32 | const ClassInfo JSAPIValueWrapper::s_info = { "API Wrapper", 0, 0, 0, CREATE_METHOD_TABLE(JSAPIValueWrapper) }; 33 | 34 | } // namespace JSC 35 | -------------------------------------------------------------------------------- /WTF/wtf/blackberry/MainThreadBlackBerry.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009, 2010, 2011 Research In Motion Limited. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include "config.h" 20 | #include "MainThread.h" 21 | 22 | #include 23 | #include 24 | 25 | namespace WTF { 26 | 27 | void initializeMainThreadPlatform() 28 | { 29 | } 30 | 31 | void scheduleDispatchFunctionsOnMainThread() 32 | { 33 | BlackBerry::Platform::webKitThreadMessageClient()->dispatchMessage(BlackBerry::Platform::createFunctionCallMessage(dispatchFunctionsFromMainThread)); 34 | } 35 | 36 | } // namespace WTF 37 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-001.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printStatus ("Unicode format-control character (Category Cf) test."); 32 | printBugNumber (23610); 33 | 34 | reportCompare ("no error", eval('"no\u200E error"'), 35 | "Unicode format-control character test (Category Cf.)"); 36 | 37 | exitFunc ("test"); 38 | } 39 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-24712.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printBugNumber (24712); 32 | 33 | var re = /([\S]+([ \t]+[\S]+)*)[ \t]*=[ \t]*[\S]+/; 34 | var result = re.exec("Course_Creator = Test"); 35 | 36 | if (!result) 37 | reportFailure ("exec() returned null."); 38 | 39 | exitFunc ("test"); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-016.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-016 3 | Corresponds To: 7.4.3-9-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-016"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("class = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "class = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | -------------------------------------------------------------------------------- /JavaScriptCore/inspector/protocol/InspectorDomain.json: -------------------------------------------------------------------------------- 1 | { 2 | "domain": "Inspector", 3 | "types": [], 4 | "commands": [ 5 | { 6 | "name": "enable", 7 | "description": "Enables inspector domain notifications." 8 | }, 9 | { 10 | "name": "disable", 11 | "description": "Disables inspector domain notifications." 12 | } 13 | ], 14 | "events": [ 15 | { 16 | "name": "evaluateForTestInFrontend", 17 | "parameters": [ 18 | { "name": "testCallId", "type": "integer" }, 19 | { "name": "script", "type": "string" } 20 | ] 21 | }, 22 | { 23 | "name": "inspect", 24 | "parameters": [ 25 | { "name": "object", "$ref": "Runtime.RemoteObject" }, 26 | { "name": "hints", "type": "object" } 27 | ] 28 | }, 29 | { 30 | "name": "detached", 31 | "description": "Fired when remote debugging connection is about to be terminated. Contains detach reason.", 32 | "parameters": [ 33 | { "name": "reason", "type": "string", "description": "The reason why connection has been terminated." } 34 | ] 35 | }, 36 | { 37 | "name": "targetCrashed", 38 | "description": "Fired when debugging target has crashed" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-010.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-010.js 3 | Corresponds To: 7.4.3-3-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-010"; 21 | var VERSION = "ECMA_1"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("export = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "export = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-017.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-017.js 3 | Corresponds To: 7.4.3-10-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-017"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("do = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "do = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-023.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-023.js 3 | Corresponds To: 7.4.3-16-n.js 4 | ECMA Section: 7.4.3 5 | Description: 6 | The following words are used as keywords in proposed extensions and are 7 | therefore reserved to allow for the possibility of future adoption of 8 | those extensions. 9 | 10 | FutureReservedWord :: one of 11 | case debugger export super 12 | catch default extends switch 13 | class do finally throw 14 | const enum import try 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | */ 19 | var SECTION = "lexical-023.js"; 20 | var VERSION = "ECMA_1"; 21 | var TITLE = "Future Reserved Words"; 22 | 23 | startTest(); 24 | writeHeaderToLog( SECTION + " "+ TITLE); 25 | 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("try = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "try = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-008.js 3 | Corresponds To: 7.4.3-1-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-008.js"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("case = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "case = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-009 3 | Corresponds To: 7.4.3-2-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-009"; 21 | var VERSION = "ECMA_1"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("debugger = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "debugger = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-011.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-011.js 3 | Corresponds To: 7.4.3-4-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-011"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("super = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "super = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-012.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-012.js 3 | Corresponds To: 7.4.3-5-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-012"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("catch = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "catch = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-013.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-013.js 3 | Corresponds To: 7.4.3-6-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-013"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("default = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "default = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-015.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-015.js 3 | Corresponds To: 7.4.3-8-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-015"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("switch = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "switch = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-018.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-018 3 | Corresponds To: 7.4.3-11-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-018"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("finally = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "finally = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-019.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-019.js 3 | Corresponds To: 7.4.3-12-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-019"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("throw = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "throw = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-020.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-020.js 3 | Corresponds To 7.4.3-13-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-020"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("const = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "const = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/boolean-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: boolean-001.js 3 | Description: Corresponds to ecma/Boolean/15.6.4.2-4-n.js 4 | 5 | The toString function is not generic; it generates 6 | a runtime error if its this value is not a Boolean 7 | object. Therefore it cannot be transferred to other 8 | kinds of objects for use as a method. 9 | 10 | Author: christine@netscape.com 11 | Date: june 27, 1997 12 | */ 13 | var SECTION = "boolean-001.js"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Boolean.prototype.toString()"; 16 | startTest(); 17 | writeHeaderToLog( SECTION +" "+ TITLE ); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | var exception = "No exception thrown"; 23 | var result = "Failed"; 24 | 25 | var TO_STRING = Boolean.prototype.toString; 26 | 27 | try { 28 | var s = new String("Not a Boolean"); 29 | s.toString = TO_STRING; 30 | s.toString(); 31 | } catch ( e ) { 32 | result = "Passed!"; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "Assigning Boolean.prototype.toString to a String object "+ 39 | "(threw " +exception +")", 40 | "Passed!", 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-014.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-014.js 3 | Corresponds To: 7.4.3-7-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-014.js"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("extends = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "extends = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-021.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-021.js 3 | Corresponds To: 7.4.3-14-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-021.js"; 21 | var VERSION = "ECMA_1"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("enum = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "enum = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | --------------------------------------------------------------------------------