From cad810f21b803229eb11403f9209855525a25d57 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 6 May 2011 11:45:16 +0100 Subject: Merge WebKit at r75315: Initial merge by git. Change-Id: I570314b346ce101c935ed22a626b48c2af266b84 --- Source/JavaScriptCore/API/APICast.h | 153 + Source/JavaScriptCore/API/APIShims.h | 101 + Source/JavaScriptCore/API/JSBase.cpp | 113 + Source/JavaScriptCore/API/JSBase.h | 132 + Source/JavaScriptCore/API/JSBasePrivate.h | 52 + .../JavaScriptCore/API/JSCallbackConstructor.cpp | 89 + Source/JavaScriptCore/API/JSCallbackConstructor.h | 60 + Source/JavaScriptCore/API/JSCallbackFunction.cpp | 80 + Source/JavaScriptCore/API/JSCallbackFunction.h | 58 + Source/JavaScriptCore/API/JSCallbackObject.cpp | 42 + Source/JavaScriptCore/API/JSCallbackObject.h | 201 + .../JavaScriptCore/API/JSCallbackObjectFunctions.h | 607 + Source/JavaScriptCore/API/JSClassRef.cpp | 266 + Source/JavaScriptCore/API/JSClassRef.h | 122 + Source/JavaScriptCore/API/JSContextRef.cpp | 175 + Source/JavaScriptCore/API/JSContextRef.h | 132 + Source/JavaScriptCore/API/JSContextRefPrivate.h | 53 + Source/JavaScriptCore/API/JSObjectRef.cpp | 544 + Source/JavaScriptCore/API/JSObjectRef.h | 694 + Source/JavaScriptCore/API/JSObjectRefPrivate.h | 74 + Source/JavaScriptCore/API/JSProfilerPrivate.cpp | 46 + Source/JavaScriptCore/API/JSProfilerPrivate.h | 63 + Source/JavaScriptCore/API/JSRetainPtr.h | 208 + Source/JavaScriptCore/API/JSStringRef.cpp | 112 + Source/JavaScriptCore/API/JSStringRef.h | 145 + Source/JavaScriptCore/API/JSStringRefBSTR.cpp | 42 + Source/JavaScriptCore/API/JSStringRefBSTR.h | 62 + Source/JavaScriptCore/API/JSStringRefCF.cpp | 57 + Source/JavaScriptCore/API/JSStringRefCF.h | 60 + Source/JavaScriptCore/API/JSValueRef.cpp | 334 + Source/JavaScriptCore/API/JSValueRef.h | 301 + .../API/JSWeakObjectMapRefInternal.h | 68 + .../API/JSWeakObjectMapRefPrivate.cpp | 83 + .../JavaScriptCore/API/JSWeakObjectMapRefPrivate.h | 95 + Source/JavaScriptCore/API/JavaScript.h | 36 + Source/JavaScriptCore/API/JavaScriptCore.h | 32 + Source/JavaScriptCore/API/OpaqueJSString.cpp | 55 + Source/JavaScriptCore/API/OpaqueJSString.h | 81 + Source/JavaScriptCore/API/WebKitAvailability.h | 904 + Source/JavaScriptCore/API/tests/JSNode.c | 196 + Source/JavaScriptCore/API/tests/JSNode.h | 37 + Source/JavaScriptCore/API/tests/JSNodeList.c | 123 + Source/JavaScriptCore/API/tests/JSNodeList.h | 34 + Source/JavaScriptCore/API/tests/Node.c | 85 + Source/JavaScriptCore/API/tests/Node.h | 50 + Source/JavaScriptCore/API/tests/NodeList.c | 81 + Source/JavaScriptCore/API/tests/NodeList.h | 42 + Source/JavaScriptCore/API/tests/minidom.c | 126 + Source/JavaScriptCore/API/tests/minidom.html | 9 + Source/JavaScriptCore/API/tests/minidom.js | 110 + Source/JavaScriptCore/API/tests/testapi.c | 1458 + Source/JavaScriptCore/API/tests/testapi.js | 251 + Source/JavaScriptCore/AUTHORS | 2 + Source/JavaScriptCore/AllInOneFile.cpp | 0 Source/JavaScriptCore/Android.mk | 253 + Source/JavaScriptCore/Android.v8.wtf.mk | 87 + Source/JavaScriptCore/CMakeLists.txt | 258 + Source/JavaScriptCore/CMakeListsEfl.txt | 20 + Source/JavaScriptCore/CMakeListsWinCE.txt | 5 + Source/JavaScriptCore/COPYING.LIB | 488 + Source/JavaScriptCore/ChangeLog | 18229 +++++++++ Source/JavaScriptCore/ChangeLog-2002-12-03 | 2271 ++ Source/JavaScriptCore/ChangeLog-2003-10-25 | 1483 + Source/JavaScriptCore/ChangeLog-2007-10-14 | 26221 ++++++++++++ Source/JavaScriptCore/ChangeLog-2008-08-10 | 31482 +++++++++++++++ Source/JavaScriptCore/ChangeLog-2009-06-16 | 39978 +++++++++++++++++++ Source/JavaScriptCore/ChangeLog-2010-05-24 | 28211 +++++++++++++ Source/JavaScriptCore/Configurations/Base.xcconfig | 141 + .../Configurations/DebugRelease.xcconfig | 50 + .../Configurations/FeatureDefines.xcconfig | 124 + .../Configurations/JavaScriptCore.xcconfig | 53 + .../JavaScriptCore/Configurations/Version.xcconfig | 58 + Source/JavaScriptCore/DerivedSources.make | 82 + Source/JavaScriptCore/DerivedSources.pro | 100 + .../ForwardingHeaders/JavaScriptCore/APICast.h | 1 + .../ForwardingHeaders/JavaScriptCore/JSBase.h | 1 + .../JavaScriptCore/JSContextRef.h | 1 + .../ForwardingHeaders/JavaScriptCore/JSObjectRef.h | 1 + .../ForwardingHeaders/JavaScriptCore/JSRetainPtr.h | 1 + .../ForwardingHeaders/JavaScriptCore/JSStringRef.h | 1 + .../JavaScriptCore/JSStringRefCF.h | 1 + .../ForwardingHeaders/JavaScriptCore/JSValueRef.h | 1 + .../ForwardingHeaders/JavaScriptCore/JavaScript.h | 1 + .../JavaScriptCore/JavaScriptCore.h | 1 + .../JavaScriptCore/OpaqueJSString.h | 1 + .../JavaScriptCore/WebKitAvailability.h | 1 + Source/JavaScriptCore/GNUmakefile.am | 696 + Source/JavaScriptCore/Info.plist | 24 + .../JavaScriptCore.JSVALUE32_64only.exp | 2 + .../JavaScriptCore.JSVALUE32only.exp | 2 + .../JavaScriptCore.JSVALUE64only.exp | 2 + Source/JavaScriptCore/JavaScriptCore.exp | 595 + .../JavaScriptCore.gyp/JavaScriptCore.gyp | 216 + Source/JavaScriptCore/JavaScriptCore.gypi | 504 + Source/JavaScriptCore/JavaScriptCore.order | 2135 + Source/JavaScriptCore/JavaScriptCore.pri | 111 + Source/JavaScriptCore/JavaScriptCore.pro | 226 + .../JavaScriptCore.vcproj/JavaScriptCore.make | 38 + .../JavaScriptCore.resources/Info.plist | 24 + .../JavaScriptCore.vcproj/JavaScriptCore.sln | 95 + .../JavaScriptCore/JavaScriptCore.def | 361 + .../JavaScriptCore/JavaScriptCore.rc | 47 + .../JavaScriptCore/JavaScriptCore.vcproj | 1968 + .../JavaScriptCore/JavaScriptCoreCF.vsprops | 11 + .../JavaScriptCore/JavaScriptCoreCFLite.vsprops | 11 + .../JavaScriptCore/JavaScriptCoreCommon.vsprops | 20 + .../JavaScriptCore/JavaScriptCoreGenerated.make | 58 + .../JavaScriptCore/JavaScriptCoreGenerated.vcproj | 100 + .../JavaScriptCoreGeneratedCommon.vsprops | 15 + .../JavaScriptCorePGOOptimize.vsprops | 15 + .../JavaScriptCore/JavaScriptCorePostBuild.cmd | 1 + .../JavaScriptCore/JavaScriptCorePreBuild.cmd | 8 + .../JavaScriptCore/JavaScriptCorePreLink.cmd | 9 + .../JavaScriptCore/build-generated-files.sh | 47 + .../JavaScriptCore/react-to-vsprops-changes.py | 37 + .../JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln | 83 + .../JavaScriptCore.vcproj/WTF/WTF.vcproj | 978 + .../JavaScriptCore.vcproj/WTF/WTFCommon.vsprops | 20 + .../JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd | 1 + .../JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd | 6 + .../JavaScriptCore.vcproj/jsc/jsc.vcproj | 473 + .../JavaScriptCore.vcproj/jsc/jscCommon.vsprops | 20 + .../JavaScriptCore.vcproj/jsc/jscPostBuild.cmd | 25 + .../JavaScriptCore.vcproj/jsc/jscPreBuild.cmd | 6 + .../JavaScriptCore.vcproj/jsc/jscPreLink.cmd | 9 + .../JavaScriptCore.vcproj/testapi/testapi.vcproj | 448 + .../testapi/testapiCommon.vsprops | 20 + .../testapi/testapiPostBuild.cmd | 3 + .../testapi/testapiPreBuild.cmd | 6 + .../testapi/testapiPreLink.cmd | 9 + .../JavaScriptCore.xcodeproj/project.pbxproj | 3197 ++ Source/JavaScriptCore/JavaScriptCorePrefix.h | 36 + Source/JavaScriptCore/Makefile | 2 + Source/JavaScriptCore/THANKS | 8 + Source/JavaScriptCore/assembler/ARMAssembler.cpp | 378 + Source/JavaScriptCore/assembler/ARMAssembler.h | 948 + Source/JavaScriptCore/assembler/ARMv7Assembler.cpp | 41 + Source/JavaScriptCore/assembler/ARMv7Assembler.h | 2358 ++ .../assembler/AbstractMacroAssembler.h | 549 + Source/JavaScriptCore/assembler/AssemblerBuffer.h | 173 + .../assembler/AssemblerBufferWithConstantPool.h | 317 + Source/JavaScriptCore/assembler/CodeLocation.h | 184 + Source/JavaScriptCore/assembler/LinkBuffer.h | 350 + Source/JavaScriptCore/assembler/MIPSAssembler.h | 984 + Source/JavaScriptCore/assembler/MacroAssembler.h | 347 + .../JavaScriptCore/assembler/MacroAssemblerARM.cpp | 99 + .../JavaScriptCore/assembler/MacroAssemblerARM.h | 1044 + .../JavaScriptCore/assembler/MacroAssemblerARMv7.h | 1374 + .../assembler/MacroAssemblerCodeRef.h | 192 + .../JavaScriptCore/assembler/MacroAssemblerMIPS.h | 1873 + .../JavaScriptCore/assembler/MacroAssemblerX86.h | 203 + .../assembler/MacroAssemblerX86Common.h | 1092 + .../assembler/MacroAssemblerX86_64.h | 460 + Source/JavaScriptCore/assembler/RepatchBuffer.h | 134 + Source/JavaScriptCore/assembler/X86Assembler.h | 2100 + Source/JavaScriptCore/bytecode/CodeBlock.cpp | 1708 + Source/JavaScriptCore/bytecode/CodeBlock.h | 691 + Source/JavaScriptCore/bytecode/EvalCodeCache.h | 78 + Source/JavaScriptCore/bytecode/Instruction.h | 169 + Source/JavaScriptCore/bytecode/JumpTable.cpp | 47 + Source/JavaScriptCore/bytecode/JumpTable.h | 103 + Source/JavaScriptCore/bytecode/Opcode.cpp | 191 + Source/JavaScriptCore/bytecode/Opcode.h | 276 + Source/JavaScriptCore/bytecode/SamplingTool.cpp | 406 + Source/JavaScriptCore/bytecode/SamplingTool.h | 414 + .../JavaScriptCore/bytecode/StructureStubInfo.cpp | 80 + Source/JavaScriptCore/bytecode/StructureStubInfo.h | 185 + .../bytecompiler/BytecodeGenerator.cpp | 2233 ++ .../bytecompiler/BytecodeGenerator.h | 588 + Source/JavaScriptCore/bytecompiler/Label.h | 90 + Source/JavaScriptCore/bytecompiler/LabelScope.h | 79 + .../JavaScriptCore/bytecompiler/NodesCodegen.cpp | 2076 + Source/JavaScriptCore/bytecompiler/RegisterID.h | 121 + Source/JavaScriptCore/config.h | 99 + Source/JavaScriptCore/create_hash_table | 296 + Source/JavaScriptCore/create_jit_stubs | 85 + Source/JavaScriptCore/create_regex_tables | 112 + Source/JavaScriptCore/debugger/Debugger.cpp | 119 + Source/JavaScriptCore/debugger/Debugger.h | 65 + .../JavaScriptCore/debugger/DebuggerActivation.cpp | 104 + .../JavaScriptCore/debugger/DebuggerActivation.h | 66 + .../JavaScriptCore/debugger/DebuggerCallFrame.cpp | 106 + Source/JavaScriptCore/debugger/DebuggerCallFrame.h | 67 + Source/JavaScriptCore/docs/make-bytecode-docs.pl | 43 + Source/JavaScriptCore/headers.pri | 9 + Source/JavaScriptCore/icu/LICENSE | 25 + Source/JavaScriptCore/icu/README | 4 + Source/JavaScriptCore/icu/unicode/parseerr.h | 88 + Source/JavaScriptCore/icu/unicode/platform.h | 267 + Source/JavaScriptCore/icu/unicode/putil.h | 180 + Source/JavaScriptCore/icu/unicode/uchar.h | 2798 ++ Source/JavaScriptCore/icu/unicode/ucnv.h | 1817 + Source/JavaScriptCore/icu/unicode/ucnv_err.h | 456 + Source/JavaScriptCore/icu/unicode/ucol.h | 1219 + Source/JavaScriptCore/icu/unicode/uconfig.h | 186 + Source/JavaScriptCore/icu/unicode/uenum.h | 129 + Source/JavaScriptCore/icu/unicode/uiter.h | 707 + Source/JavaScriptCore/icu/unicode/uloc.h | 917 + Source/JavaScriptCore/icu/unicode/umachine.h | 371 + Source/JavaScriptCore/icu/unicode/unorm.h | 575 + Source/JavaScriptCore/icu/unicode/urename.h | 1468 + Source/JavaScriptCore/icu/unicode/uset.h | 745 + Source/JavaScriptCore/icu/unicode/ustring.h | 1320 + Source/JavaScriptCore/icu/unicode/utf.h | 221 + Source/JavaScriptCore/icu/unicode/utf16.h | 605 + Source/JavaScriptCore/icu/unicode/utf8.h | 627 + Source/JavaScriptCore/icu/unicode/utf_old.h | 1 + Source/JavaScriptCore/icu/unicode/utypes.h | 745 + Source/JavaScriptCore/icu/unicode/uversion.h | 216 + Source/JavaScriptCore/interpreter/CachedCall.h | 76 + Source/JavaScriptCore/interpreter/CallFrame.cpp | 53 + Source/JavaScriptCore/interpreter/CallFrame.h | 167 + .../JavaScriptCore/interpreter/CallFrameClosure.h | 60 + Source/JavaScriptCore/interpreter/Interpreter.cpp | 4921 +++ Source/JavaScriptCore/interpreter/Interpreter.h | 170 + Source/JavaScriptCore/interpreter/Register.h | 218 + Source/JavaScriptCore/interpreter/RegisterFile.cpp | 93 + Source/JavaScriptCore/interpreter/RegisterFile.h | 211 + Source/JavaScriptCore/jit/ExecutableAllocator.cpp | 128 + Source/JavaScriptCore/jit/ExecutableAllocator.h | 362 + .../jit/ExecutableAllocatorFixedVMPool.cpp | 470 + Source/JavaScriptCore/jit/JIT.cpp | 670 + Source/JavaScriptCore/jit/JIT.h | 1046 + Source/JavaScriptCore/jit/JITArithmetic.cpp | 1244 + Source/JavaScriptCore/jit/JITArithmetic32_64.cpp | 1424 + Source/JavaScriptCore/jit/JITCall.cpp | 261 + Source/JavaScriptCore/jit/JITCall32_64.cpp | 356 + Source/JavaScriptCore/jit/JITCode.h | 117 + Source/JavaScriptCore/jit/JITInlineMethods.h | 809 + Source/JavaScriptCore/jit/JITOpcodes.cpp | 1775 + Source/JavaScriptCore/jit/JITOpcodes32_64.cpp | 1834 + Source/JavaScriptCore/jit/JITPropertyAccess.cpp | 1101 + .../JavaScriptCore/jit/JITPropertyAccess32_64.cpp | 1186 + Source/JavaScriptCore/jit/JITStubCall.h | 237 + Source/JavaScriptCore/jit/JITStubs.cpp | 3638 ++ Source/JavaScriptCore/jit/JITStubs.h | 416 + Source/JavaScriptCore/jit/JSInterfaceJIT.h | 292 + Source/JavaScriptCore/jit/SpecializedThunkJIT.h | 165 + Source/JavaScriptCore/jit/ThunkGenerators.cpp | 162 + Source/JavaScriptCore/jit/ThunkGenerators.h | 45 + Source/JavaScriptCore/jsc.cpp | 568 + Source/JavaScriptCore/jsc.pro | 41 + Source/JavaScriptCore/make-generated-sources.sh | 12 + Source/JavaScriptCore/os-win32/WinMain.cpp | 81 + Source/JavaScriptCore/os-win32/inttypes.h | 261 + Source/JavaScriptCore/os-win32/stdbool.h | 45 + Source/JavaScriptCore/os-win32/stdint.h | 67 + Source/JavaScriptCore/parser/ASTBuilder.h | 967 + Source/JavaScriptCore/parser/JSParser.cpp | 1907 + Source/JavaScriptCore/parser/JSParser.h | 164 + Source/JavaScriptCore/parser/Keywords.table | 72 + Source/JavaScriptCore/parser/Lexer.cpp | 1196 + Source/JavaScriptCore/parser/Lexer.h | 158 + Source/JavaScriptCore/parser/NodeConstructors.h | 908 + Source/JavaScriptCore/parser/NodeInfo.h | 63 + Source/JavaScriptCore/parser/Nodes.cpp | 196 + Source/JavaScriptCore/parser/Nodes.h | 1617 + Source/JavaScriptCore/parser/Parser.cpp | 85 + Source/JavaScriptCore/parser/Parser.h | 128 + Source/JavaScriptCore/parser/ParserArena.cpp | 125 + Source/JavaScriptCore/parser/ParserArena.h | 130 + Source/JavaScriptCore/parser/ResultType.h | 182 + Source/JavaScriptCore/parser/SourceCode.h | 92 + Source/JavaScriptCore/parser/SourceProvider.h | 87 + Source/JavaScriptCore/parser/SyntaxChecker.h | 217 + Source/JavaScriptCore/pcre/AUTHORS | 12 + Source/JavaScriptCore/pcre/COPYING | 35 + Source/JavaScriptCore/pcre/dftables | 273 + Source/JavaScriptCore/pcre/pcre.h | 68 + Source/JavaScriptCore/pcre/pcre.pri | 12 + Source/JavaScriptCore/pcre/pcre_compile.cpp | 2708 ++ Source/JavaScriptCore/pcre/pcre_exec.cpp | 2177 + Source/JavaScriptCore/pcre/pcre_internal.h | 455 + Source/JavaScriptCore/pcre/pcre_tables.cpp | 72 + .../JavaScriptCore/pcre/pcre_ucp_searchfuncs.cpp | 99 + Source/JavaScriptCore/pcre/pcre_xclass.cpp | 115 + Source/JavaScriptCore/pcre/ucpinternal.h | 126 + Source/JavaScriptCore/pcre/ucptable.cpp | 2968 ++ Source/JavaScriptCore/profiler/CallIdentifier.h | 100 + Source/JavaScriptCore/profiler/Profile.cpp | 136 + Source/JavaScriptCore/profiler/Profile.h | 72 + .../JavaScriptCore/profiler/ProfileGenerator.cpp | 181 + Source/JavaScriptCore/profiler/ProfileGenerator.h | 79 + Source/JavaScriptCore/profiler/ProfileNode.cpp | 351 + Source/JavaScriptCore/profiler/ProfileNode.h | 172 + Source/JavaScriptCore/profiler/Profiler.cpp | 172 + Source/JavaScriptCore/profiler/Profiler.h | 77 + Source/JavaScriptCore/profiler/ProfilerServer.h | 35 + Source/JavaScriptCore/profiler/ProfilerServer.mm | 115 + Source/JavaScriptCore/qt/ChangeLog | 447 + Source/JavaScriptCore/qt/api/QtScript.pro | 51 + Source/JavaScriptCore/qt/api/qscriptconverter_p.h | 146 + Source/JavaScriptCore/qt/api/qscriptengine.cpp | 426 + Source/JavaScriptCore/qt/api/qscriptengine.h | 82 + Source/JavaScriptCore/qt/api/qscriptengine_p.cpp | 167 + Source/JavaScriptCore/qt/api/qscriptengine_p.h | 259 + Source/JavaScriptCore/qt/api/qscriptfunction.cpp | 145 + Source/JavaScriptCore/qt/api/qscriptfunction_p.h | 57 + .../qt/api/qscriptoriginalglobalobject_p.h | 209 + Source/JavaScriptCore/qt/api/qscriptprogram.cpp | 136 + Source/JavaScriptCore/qt/api/qscriptprogram.h | 53 + Source/JavaScriptCore/qt/api/qscriptprogram_p.h | 133 + Source/JavaScriptCore/qt/api/qscriptstring.cpp | 131 + Source/JavaScriptCore/qt/api/qscriptstring.h | 58 + Source/JavaScriptCore/qt/api/qscriptstring_p.h | 124 + .../qt/api/qscriptsyntaxcheckresult.cpp | 148 + .../qt/api/qscriptsyntaxcheckresult.h | 50 + .../qt/api/qscriptsyntaxcheckresult_p.h | 73 + Source/JavaScriptCore/qt/api/qscriptvalue.cpp | 802 + Source/JavaScriptCore/qt/api/qscriptvalue.h | 140 + Source/JavaScriptCore/qt/api/qscriptvalue_p.h | 1220 + .../JavaScriptCore/qt/api/qscriptvalueiterator.cpp | 226 + .../JavaScriptCore/qt/api/qscriptvalueiterator.h | 63 + .../JavaScriptCore/qt/api/qscriptvalueiterator_p.h | 172 + Source/JavaScriptCore/qt/api/qtscriptglobal.h | 43 + Source/JavaScriptCore/qt/benchmarks/benchmarks.pri | 19 + Source/JavaScriptCore/qt/benchmarks/benchmarks.pro | 4 + .../qt/benchmarks/qscriptengine/qscriptengine.pro | 13 + .../benchmarks/qscriptengine/tst_qscriptengine.cpp | 142 + .../qt/benchmarks/qscriptvalue/qscriptvalue.pro | 9 + .../benchmarks/qscriptvalue/tst_qscriptvalue.cpp | 442 + .../qt/tests/qscriptengine/qscriptengine.pro | 8 + .../qt/tests/qscriptengine/tst_qscriptengine.cpp | 734 + .../qt/tests/qscriptstring/qscriptstring.pro | 7 + .../qt/tests/qscriptstring/tst_qscriptstring.cpp | 175 + .../qt/tests/qscriptvalue/qscriptvalue.pro | 15 + .../qt/tests/qscriptvalue/tst_qscriptvalue.cpp | 1296 + .../qt/tests/qscriptvalue/tst_qscriptvalue.h | 143 + .../tst_qscriptvalue_generated_comparison.cpp | 1799 + .../tst_qscriptvalue_generated_init.cpp | 169 + .../tst_qscriptvalue_generated_istype.cpp | 622 + .../tst_qscriptvalue_generated_totype.cpp | 1786 + .../qscriptvalueiterator/qscriptvalueiterator.pro | 7 + .../tst_qscriptvalueiterator.cpp | 531 + Source/JavaScriptCore/qt/tests/tests.pri | 19 + Source/JavaScriptCore/qt/tests/tests.pro | 5 + Source/JavaScriptCore/runtime/ArgList.cpp | 79 + Source/JavaScriptCore/runtime/ArgList.h | 245 + Source/JavaScriptCore/runtime/Arguments.cpp | 352 + Source/JavaScriptCore/runtime/Arguments.h | 255 + Source/JavaScriptCore/runtime/ArrayConstructor.cpp | 100 + Source/JavaScriptCore/runtime/ArrayConstructor.h | 40 + Source/JavaScriptCore/runtime/ArrayPrototype.cpp | 1098 + Source/JavaScriptCore/runtime/ArrayPrototype.h | 50 + .../runtime/BatchedTransitionOptimizer.h | 55 + .../JavaScriptCore/runtime/BooleanConstructor.cpp | 79 + Source/JavaScriptCore/runtime/BooleanConstructor.h | 44 + Source/JavaScriptCore/runtime/BooleanObject.cpp | 35 + Source/JavaScriptCore/runtime/BooleanObject.h | 51 + Source/JavaScriptCore/runtime/BooleanPrototype.cpp | 86 + Source/JavaScriptCore/runtime/BooleanPrototype.h | 35 + .../runtime/CachedTranscendentalFunction.h | 103 + Source/JavaScriptCore/runtime/CallData.cpp | 41 + Source/JavaScriptCore/runtime/CallData.h | 65 + Source/JavaScriptCore/runtime/ClassInfo.h | 62 + Source/JavaScriptCore/runtime/Collector.cpp | 1100 + Source/JavaScriptCore/runtime/Collector.h | 336 + .../JavaScriptCore/runtime/CollectorHeapIterator.h | 140 + .../JavaScriptCore/runtime/CommonIdentifiers.cpp | 40 + Source/JavaScriptCore/runtime/CommonIdentifiers.h | 106 + Source/JavaScriptCore/runtime/Completion.cpp | 76 + Source/JavaScriptCore/runtime/Completion.h | 63 + Source/JavaScriptCore/runtime/ConstructData.cpp | 42 + Source/JavaScriptCore/runtime/ConstructData.h | 64 + Source/JavaScriptCore/runtime/DateConstructor.cpp | 203 + Source/JavaScriptCore/runtime/DateConstructor.h | 43 + Source/JavaScriptCore/runtime/DateConversion.cpp | 105 + Source/JavaScriptCore/runtime/DateConversion.h | 63 + Source/JavaScriptCore/runtime/DateInstance.cpp | 87 + Source/JavaScriptCore/runtime/DateInstance.h | 82 + Source/JavaScriptCore/runtime/DateInstanceCache.h | 94 + Source/JavaScriptCore/runtime/DatePrototype.cpp | 1094 + Source/JavaScriptCore/runtime/DatePrototype.h | 52 + Source/JavaScriptCore/runtime/Error.cpp | 211 + Source/JavaScriptCore/runtime/Error.h | 78 + Source/JavaScriptCore/runtime/ErrorConstructor.cpp | 68 + Source/JavaScriptCore/runtime/ErrorConstructor.h | 42 + Source/JavaScriptCore/runtime/ErrorInstance.cpp | 54 + Source/JavaScriptCore/runtime/ErrorInstance.h | 53 + Source/JavaScriptCore/runtime/ErrorPrototype.cpp | 65 + Source/JavaScriptCore/runtime/ErrorPrototype.h | 37 + Source/JavaScriptCore/runtime/ExceptionHelpers.cpp | 145 + Source/JavaScriptCore/runtime/ExceptionHelpers.h | 62 + Source/JavaScriptCore/runtime/Executable.cpp | 313 + Source/JavaScriptCore/runtime/Executable.h | 410 + .../JavaScriptCore/runtime/FunctionConstructor.cpp | 119 + .../JavaScriptCore/runtime/FunctionConstructor.h | 44 + .../JavaScriptCore/runtime/FunctionPrototype.cpp | 150 + Source/JavaScriptCore/runtime/FunctionPrototype.h | 46 + .../JavaScriptCore/runtime/GCActivityCallback.cpp | 54 + Source/JavaScriptCore/runtime/GCActivityCallback.h | 72 + .../runtime/GCActivityCallbackCF.cpp | 98 + Source/JavaScriptCore/runtime/GCHandle.cpp | 86 + Source/JavaScriptCore/runtime/GCHandle.h | 116 + Source/JavaScriptCore/runtime/GetterSetter.cpp | 46 + Source/JavaScriptCore/runtime/GetterSetter.h | 74 + .../JavaScriptCore/runtime/GlobalEvalFunction.cpp | 48 + Source/JavaScriptCore/runtime/GlobalEvalFunction.h | 54 + Source/JavaScriptCore/runtime/Identifier.cpp | 312 + Source/JavaScriptCore/runtime/Identifier.h | 148 + .../JavaScriptCore/runtime/InitializeThreading.cpp | 78 + .../JavaScriptCore/runtime/InitializeThreading.h | 40 + Source/JavaScriptCore/runtime/InternalFunction.cpp | 77 + Source/JavaScriptCore/runtime/InternalFunction.h | 70 + .../JavaScriptCore/runtime/JSAPIValueWrapper.cpp | 31 + Source/JavaScriptCore/runtime/JSAPIValueWrapper.h | 62 + Source/JavaScriptCore/runtime/JSActivation.cpp | 223 + Source/JavaScriptCore/runtime/JSActivation.h | 115 + Source/JavaScriptCore/runtime/JSArray.cpp | 1322 + Source/JavaScriptCore/runtime/JSArray.h | 284 + Source/JavaScriptCore/runtime/JSByteArray.cpp | 116 + Source/JavaScriptCore/runtime/JSByteArray.h | 116 + Source/JavaScriptCore/runtime/JSCell.cpp | 217 + Source/JavaScriptCore/runtime/JSCell.h | 376 + Source/JavaScriptCore/runtime/JSFunction.cpp | 343 + Source/JavaScriptCore/runtime/JSFunction.h | 123 + Source/JavaScriptCore/runtime/JSGlobalData.cpp | 365 + Source/JavaScriptCore/runtime/JSGlobalData.h | 269 + Source/JavaScriptCore/runtime/JSGlobalObject.cpp | 476 + Source/JavaScriptCore/runtime/JSGlobalObject.h | 484 + .../runtime/JSGlobalObjectFunctions.cpp | 600 + .../runtime/JSGlobalObjectFunctions.h | 62 + Source/JavaScriptCore/runtime/JSImmediate.cpp | 26 + Source/JavaScriptCore/runtime/JSImmediate.h | 568 + Source/JavaScriptCore/runtime/JSLock.cpp | 260 + Source/JavaScriptCore/runtime/JSLock.h | 106 + Source/JavaScriptCore/runtime/JSNotAnObject.cpp | 122 + Source/JavaScriptCore/runtime/JSNotAnObject.h | 79 + Source/JavaScriptCore/runtime/JSNumberCell.cpp | 38 + Source/JavaScriptCore/runtime/JSNumberCell.h | 171 + Source/JavaScriptCore/runtime/JSONObject.cpp | 877 + Source/JavaScriptCore/runtime/JSONObject.h | 61 + Source/JavaScriptCore/runtime/JSObject.cpp | 722 + Source/JavaScriptCore/runtime/JSObject.h | 771 + .../runtime/JSObjectWithGlobalObject.cpp | 46 + .../runtime/JSObjectWithGlobalObject.h | 58 + .../runtime/JSPropertyNameIterator.cpp | 108 + .../runtime/JSPropertyNameIterator.h | 109 + .../JavaScriptCore/runtime/JSStaticScopeObject.cpp | 82 + .../JavaScriptCore/runtime/JSStaticScopeObject.h | 72 + Source/JavaScriptCore/runtime/JSString.cpp | 328 + Source/JavaScriptCore/runtime/JSString.h | 647 + Source/JavaScriptCore/runtime/JSStringBuilder.h | 134 + Source/JavaScriptCore/runtime/JSType.h | 44 + Source/JavaScriptCore/runtime/JSTypeInfo.h | 80 + Source/JavaScriptCore/runtime/JSValue.cpp | 197 + Source/JavaScriptCore/runtime/JSValue.h | 770 + Source/JavaScriptCore/runtime/JSVariableObject.cpp | 71 + Source/JavaScriptCore/runtime/JSVariableObject.h | 169 + Source/JavaScriptCore/runtime/JSWrapperObject.cpp | 36 + Source/JavaScriptCore/runtime/JSWrapperObject.h | 69 + Source/JavaScriptCore/runtime/JSZombie.cpp | 48 + Source/JavaScriptCore/runtime/JSZombie.h | 77 + Source/JavaScriptCore/runtime/LiteralParser.cpp | 462 + Source/JavaScriptCore/runtime/LiteralParser.h | 110 + Source/JavaScriptCore/runtime/Lookup.cpp | 96 + Source/JavaScriptCore/runtime/Lookup.h | 338 + Source/JavaScriptCore/runtime/MarkStack.cpp | 40 + Source/JavaScriptCore/runtime/MarkStack.h | 190 + Source/JavaScriptCore/runtime/MarkStackPosix.cpp | 43 + Source/JavaScriptCore/runtime/MarkStackSymbian.cpp | 38 + Source/JavaScriptCore/runtime/MarkStackWin.cpp | 44 + Source/JavaScriptCore/runtime/MathObject.cpp | 241 + Source/JavaScriptCore/runtime/MathObject.h | 49 + Source/JavaScriptCore/runtime/MemoryStatistics.cpp | 55 + Source/JavaScriptCore/runtime/MemoryStatistics.h | 46 + .../runtime/NativeErrorConstructor.cpp | 71 + .../runtime/NativeErrorConstructor.h | 51 + .../runtime/NativeErrorPrototype.cpp | 42 + .../JavaScriptCore/runtime/NativeErrorPrototype.h | 36 + .../JavaScriptCore/runtime/NativeFunctionWrapper.h | 39 + .../JavaScriptCore/runtime/NumberConstructor.cpp | 129 + Source/JavaScriptCore/runtime/NumberConstructor.h | 59 + Source/JavaScriptCore/runtime/NumberObject.cpp | 51 + Source/JavaScriptCore/runtime/NumberObject.h | 52 + Source/JavaScriptCore/runtime/NumberPrototype.cpp | 310 + Source/JavaScriptCore/runtime/NumberPrototype.h | 35 + Source/JavaScriptCore/runtime/NumericStrings.h | 98 + .../JavaScriptCore/runtime/ObjectConstructor.cpp | 320 + Source/JavaScriptCore/runtime/ObjectConstructor.h | 41 + Source/JavaScriptCore/runtime/ObjectPrototype.cpp | 165 + Source/JavaScriptCore/runtime/ObjectPrototype.h | 43 + Source/JavaScriptCore/runtime/Operations.cpp | 111 + Source/JavaScriptCore/runtime/Operations.h | 489 + .../JavaScriptCore/runtime/PropertyDescriptor.cpp | 195 + Source/JavaScriptCore/runtime/PropertyDescriptor.h | 80 + .../JavaScriptCore/runtime/PropertyMapHashTable.h | 90 + .../JavaScriptCore/runtime/PropertyNameArray.cpp | 53 + Source/JavaScriptCore/runtime/PropertyNameArray.h | 99 + Source/JavaScriptCore/runtime/PropertySlot.cpp | 40 + Source/JavaScriptCore/runtime/PropertySlot.h | 268 + Source/JavaScriptCore/runtime/Protect.h | 215 + .../JavaScriptCore/runtime/PrototypeFunction.cpp | 57 + Source/JavaScriptCore/runtime/PrototypeFunction.h | 45 + Source/JavaScriptCore/runtime/PutPropertySlot.h | 80 + Source/JavaScriptCore/runtime/RegExp.cpp | 248 + Source/JavaScriptCore/runtime/RegExp.h | 86 + Source/JavaScriptCore/runtime/RegExpCache.cpp | 77 + Source/JavaScriptCore/runtime/RegExpCache.h | 68 + .../JavaScriptCore/runtime/RegExpConstructor.cpp | 361 + Source/JavaScriptCore/runtime/RegExpConstructor.h | 133 + Source/JavaScriptCore/runtime/RegExpKey.h | 120 + Source/JavaScriptCore/runtime/RegExpMatchesArray.h | 94 + Source/JavaScriptCore/runtime/RegExpObject.cpp | 177 + Source/JavaScriptCore/runtime/RegExpObject.h | 87 + Source/JavaScriptCore/runtime/RegExpPrototype.cpp | 127 + Source/JavaScriptCore/runtime/RegExpPrototype.h | 36 + Source/JavaScriptCore/runtime/RopeImpl.cpp | 62 + Source/JavaScriptCore/runtime/RopeImpl.h | 97 + Source/JavaScriptCore/runtime/ScopeChain.cpp | 68 + Source/JavaScriptCore/runtime/ScopeChain.h | 242 + Source/JavaScriptCore/runtime/ScopeChainMark.h | 36 + Source/JavaScriptCore/runtime/SmallStrings.cpp | 142 + Source/JavaScriptCore/runtime/SmallStrings.h | 78 + .../runtime/StrictEvalActivation.cpp | 51 + .../JavaScriptCore/runtime/StrictEvalActivation.h | 43 + .../JavaScriptCore/runtime/StringConstructor.cpp | 96 + Source/JavaScriptCore/runtime/StringConstructor.h | 40 + Source/JavaScriptCore/runtime/StringObject.cpp | 99 + Source/JavaScriptCore/runtime/StringObject.h | 69 + .../StringObjectThatMasqueradesAsUndefined.h | 57 + Source/JavaScriptCore/runtime/StringPrototype.cpp | 1155 + Source/JavaScriptCore/runtime/StringPrototype.h | 43 + Source/JavaScriptCore/runtime/Structure.cpp | 1270 + Source/JavaScriptCore/runtime/Structure.h | 296 + Source/JavaScriptCore/runtime/StructureChain.cpp | 49 + Source/JavaScriptCore/runtime/StructureChain.h | 53 + .../runtime/StructureTransitionTable.h | 71 + Source/JavaScriptCore/runtime/SymbolTable.h | 133 + Source/JavaScriptCore/runtime/Terminator.h | 47 + Source/JavaScriptCore/runtime/TimeoutChecker.cpp | 158 + Source/JavaScriptCore/runtime/TimeoutChecker.h | 86 + Source/JavaScriptCore/runtime/Tracing.d | 40 + Source/JavaScriptCore/runtime/Tracing.h | 50 + Source/JavaScriptCore/runtime/UString.cpp | 366 + Source/JavaScriptCore/runtime/UString.h | 263 + Source/JavaScriptCore/runtime/UStringBuilder.h | 43 + Source/JavaScriptCore/runtime/UStringConcatenate.h | 125 + Source/JavaScriptCore/runtime/WeakGCMap.h | 123 + Source/JavaScriptCore/runtime/WeakGCPtr.h | 153 + Source/JavaScriptCore/runtime/WeakRandom.h | 86 + Source/JavaScriptCore/shell/CMakeLists.txt | 25 + Source/JavaScriptCore/shell/CMakeListsEfl.txt | 8 + Source/JavaScriptCore/shell/CMakeListsWinCE.txt | 3 + .../JavaScriptCore/tests/mozilla/Getopt/Mixed.pm | 754 + Source/JavaScriptCore/tests/mozilla/Makefile | 3 + .../tests/mozilla/README-jsDriver.html | 344 + .../tests/mozilla/ecma/Array/15.4-1.js | 126 + .../tests/mozilla/ecma/Array/15.4-2.js | 83 + .../tests/mozilla/ecma/Array/15.4.1.1.js | 88 + .../tests/mozilla/ecma/Array/15.4.1.2.js | 98 + .../tests/mozilla/ecma/Array/15.4.1.3.js | 86 + .../tests/mozilla/ecma/Array/15.4.1.js | 133 + .../tests/mozilla/ecma/Array/15.4.2.1-1.js | 92 + .../tests/mozilla/ecma/Array/15.4.2.1-2.js | 83 + .../tests/mozilla/ecma/Array/15.4.2.1-3.js | 112 + .../tests/mozilla/ecma/Array/15.4.2.2-1.js | 124 + .../tests/mozilla/ecma/Array/15.4.2.2-2.js | 89 + .../tests/mozilla/ecma/Array/15.4.2.3.js | 74 + .../tests/mozilla/ecma/Array/15.4.3.1-2.js | 66 + .../tests/mozilla/ecma/Array/15.4.3.2.js | 57 + .../tests/mozilla/ecma/Array/15.4.3.js | 63 + .../tests/mozilla/ecma/Array/15.4.4.1.js | 57 + .../tests/mozilla/ecma/Array/15.4.4.2.js | 83 + .../tests/mozilla/ecma/Array/15.4.4.3-1.js | 159 + .../tests/mozilla/ecma/Array/15.4.4.4-1.js | 272 + .../tests/mozilla/ecma/Array/15.4.4.4-2.js | 163 + .../tests/mozilla/ecma/Array/15.4.4.5-1.js | 223 + .../tests/mozilla/ecma/Array/15.4.4.5-2.js | 224 + .../tests/mozilla/ecma/Array/15.4.4.5-3.js | 181 + .../tests/mozilla/ecma/Array/15.4.4.js | 77 + .../tests/mozilla/ecma/Array/15.4.5.1-1.js | 172 + .../tests/mozilla/ecma/Array/15.4.5.1-2.js | 150 + .../tests/mozilla/ecma/Array/15.4.5.2-1.js | 93 + .../tests/mozilla/ecma/Array/15.4.5.2-2.js | 123 + .../tests/mozilla/ecma/Boolean/15.6.1.js | 96 + .../tests/mozilla/ecma/Boolean/15.6.2.js | 160 + .../tests/mozilla/ecma/Boolean/15.6.3.1-1.js | 72 + .../tests/mozilla/ecma/Boolean/15.6.3.1-2.js | 69 + .../tests/mozilla/ecma/Boolean/15.6.3.1-3.js | 69 + .../tests/mozilla/ecma/Boolean/15.6.3.1-4.js | 79 + .../tests/mozilla/ecma/Boolean/15.6.3.1-5.js | 61 + .../tests/mozilla/ecma/Boolean/15.6.3.1.js | 72 + .../tests/mozilla/ecma/Boolean/15.6.3.js | 67 + .../tests/mozilla/ecma/Boolean/15.6.4-1.js | 73 + .../tests/mozilla/ecma/Boolean/15.6.4-2.js | 67 + .../tests/mozilla/ecma/Boolean/15.6.4.1.js | 65 + .../tests/mozilla/ecma/Boolean/15.6.4.2-1.js | 97 + .../tests/mozilla/ecma/Boolean/15.6.4.2-2.js | 79 + .../tests/mozilla/ecma/Boolean/15.6.4.2-3.js | 67 + .../tests/mozilla/ecma/Boolean/15.6.4.2-4-n.js | 70 + .../tests/mozilla/ecma/Boolean/15.6.4.3-1.js | 91 + .../tests/mozilla/ecma/Boolean/15.6.4.3-2.js | 67 + .../tests/mozilla/ecma/Boolean/15.6.4.3-3.js | 71 + .../tests/mozilla/ecma/Boolean/15.6.4.3-4-n.js | 71 + .../tests/mozilla/ecma/Boolean/15.6.4.3.js | 97 + .../tests/mozilla/ecma/Boolean/15.6.4.js | 77 + .../tests/mozilla/ecma/Date/15.9.1.1-1.js | 87 + .../tests/mozilla/ecma/Date/15.9.1.1-2.js | 82 + .../tests/mozilla/ecma/Date/15.9.2.1.js | 108 + .../tests/mozilla/ecma/Date/15.9.2.2-1.js | 105 + .../tests/mozilla/ecma/Date/15.9.2.2-2.js | 99 + .../tests/mozilla/ecma/Date/15.9.2.2-3.js | 92 + .../tests/mozilla/ecma/Date/15.9.2.2-4.js | 85 + .../tests/mozilla/ecma/Date/15.9.2.2-5.js | 78 + .../tests/mozilla/ecma/Date/15.9.2.2-6.js | 72 + .../tests/mozilla/ecma/Date/15.9.3.1-1.js | 274 + .../tests/mozilla/ecma/Date/15.9.3.1-2.js | 231 + .../tests/mozilla/ecma/Date/15.9.3.1-3.js | 209 + .../tests/mozilla/ecma/Date/15.9.3.1-4.js | 193 + .../tests/mozilla/ecma/Date/15.9.3.1-5.js | 170 + .../tests/mozilla/ecma/Date/15.9.3.2-1.js | 241 + .../tests/mozilla/ecma/Date/15.9.3.2-2.js | 219 + .../tests/mozilla/ecma/Date/15.9.3.2-3.js | 205 + .../tests/mozilla/ecma/Date/15.9.3.2-4.js | 188 + .../tests/mozilla/ecma/Date/15.9.3.2-5.js | 170 + .../tests/mozilla/ecma/Date/15.9.3.8-1.js | 300 + .../tests/mozilla/ecma/Date/15.9.3.8-2.js | 275 + .../tests/mozilla/ecma/Date/15.9.3.8-3.js | 253 + .../tests/mozilla/ecma/Date/15.9.3.8-4.js | 222 + .../tests/mozilla/ecma/Date/15.9.3.8-5.js | 190 + .../tests/mozilla/ecma/Date/15.9.4.2-1.js | 63 + .../tests/mozilla/ecma/Date/15.9.4.2.js | 213 + .../tests/mozilla/ecma/Date/15.9.4.3.js | 209 + .../tests/mozilla/ecma/Date/15.9.5.1.js | 59 + .../tests/mozilla/ecma/Date/15.9.5.10-1.js | 115 + .../tests/mozilla/ecma/Date/15.9.5.10-10.js | 102 + .../tests/mozilla/ecma/Date/15.9.5.10-11.js | 101 + .../tests/mozilla/ecma/Date/15.9.5.10-12.js | 100 + .../tests/mozilla/ecma/Date/15.9.5.10-13.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.10-2.js | 110 + .../tests/mozilla/ecma/Date/15.9.5.10-3.js | 109 + .../tests/mozilla/ecma/Date/15.9.5.10-4.js | 107 + .../tests/mozilla/ecma/Date/15.9.5.10-5.js | 107 + .../tests/mozilla/ecma/Date/15.9.5.10-6.js | 106 + .../tests/mozilla/ecma/Date/15.9.5.10-7.js | 105 + .../tests/mozilla/ecma/Date/15.9.5.10-8.js | 104 + .../tests/mozilla/ecma/Date/15.9.5.10-9.js | 103 + .../tests/mozilla/ecma/Date/15.9.5.11-1.js | 99 + .../tests/mozilla/ecma/Date/15.9.5.11-2.js | 96 + .../tests/mozilla/ecma/Date/15.9.5.11-3.js | 95 + .../tests/mozilla/ecma/Date/15.9.5.11-4.js | 95 + .../tests/mozilla/ecma/Date/15.9.5.11-5.js | 95 + .../tests/mozilla/ecma/Date/15.9.5.11-6.js | 96 + .../tests/mozilla/ecma/Date/15.9.5.11-7.js | 98 + .../tests/mozilla/ecma/Date/15.9.5.12-1.js | 110 + .../tests/mozilla/ecma/Date/15.9.5.12-2.js | 104 + .../tests/mozilla/ecma/Date/15.9.5.12-3.js | 103 + .../tests/mozilla/ecma/Date/15.9.5.12-4.js | 102 + .../tests/mozilla/ecma/Date/15.9.5.12-5.js | 101 + .../tests/mozilla/ecma/Date/15.9.5.12-6.js | 100 + .../tests/mozilla/ecma/Date/15.9.5.12-7.js | 98 + .../tests/mozilla/ecma/Date/15.9.5.12-8.js | 95 + .../tests/mozilla/ecma/Date/15.9.5.13-1.js | 78 + .../tests/mozilla/ecma/Date/15.9.5.13-2.js | 75 + .../tests/mozilla/ecma/Date/15.9.5.13-3.js | 75 + .../tests/mozilla/ecma/Date/15.9.5.13-4.js | 75 + .../tests/mozilla/ecma/Date/15.9.5.13-5.js | 75 + .../tests/mozilla/ecma/Date/15.9.5.13-6.js | 78 + .../tests/mozilla/ecma/Date/15.9.5.13-7.js | 80 + .../tests/mozilla/ecma/Date/15.9.5.13-8.js | 95 + .../tests/mozilla/ecma/Date/15.9.5.14.js | 96 + .../tests/mozilla/ecma/Date/15.9.5.15.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.16.js | 96 + .../tests/mozilla/ecma/Date/15.9.5.17.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.18.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.19.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.2-1.js | 152 + .../tests/mozilla/ecma/Date/15.9.5.2-2-n.js | 77 + .../tests/mozilla/ecma/Date/15.9.5.2.js | 152 + .../tests/mozilla/ecma/Date/15.9.5.20.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.21-1.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.21-2.js | 95 + .../tests/mozilla/ecma/Date/15.9.5.21-3.js | 78 + .../tests/mozilla/ecma/Date/15.9.5.21-4.js | 78 + .../tests/mozilla/ecma/Date/15.9.5.21-5.js | 78 + .../tests/mozilla/ecma/Date/15.9.5.21-6.js | 79 + .../tests/mozilla/ecma/Date/15.9.5.21-7.js | 78 + .../tests/mozilla/ecma/Date/15.9.5.21-8.js | 86 + .../tests/mozilla/ecma/Date/15.9.5.22-1.js | 100 + .../tests/mozilla/ecma/Date/15.9.5.22-2.js | 99 + .../tests/mozilla/ecma/Date/15.9.5.22-3.js | 98 + .../tests/mozilla/ecma/Date/15.9.5.22-4.js | 97 + .../tests/mozilla/ecma/Date/15.9.5.22-5.js | 96 + .../tests/mozilla/ecma/Date/15.9.5.22-6.js | 95 + .../tests/mozilla/ecma/Date/15.9.5.22-7.js | 93 + .../tests/mozilla/ecma/Date/15.9.5.22-8.js | 90 + .../tests/mozilla/ecma/Date/15.9.5.23-1.js | 157 + .../tests/mozilla/ecma/Date/15.9.5.23-10.js | 156 + .../tests/mozilla/ecma/Date/15.9.5.23-11.js | 155 + .../tests/mozilla/ecma/Date/15.9.5.23-12.js | 153 + .../tests/mozilla/ecma/Date/15.9.5.23-13.js | 150 + .../tests/mozilla/ecma/Date/15.9.5.23-14.js | 148 + .../tests/mozilla/ecma/Date/15.9.5.23-15.js | 144 + .../tests/mozilla/ecma/Date/15.9.5.23-16.js | 143 + .../tests/mozilla/ecma/Date/15.9.5.23-17.js | 142 + .../tests/mozilla/ecma/Date/15.9.5.23-18.js | 139 + .../tests/mozilla/ecma/Date/15.9.5.23-2.js | 111 + .../tests/mozilla/ecma/Date/15.9.5.23-3-n.js | 70 + .../tests/mozilla/ecma/Date/15.9.5.23-4.js | 122 + .../tests/mozilla/ecma/Date/15.9.5.23-5.js | 122 + .../tests/mozilla/ecma/Date/15.9.5.23-6.js | 122 + .../tests/mozilla/ecma/Date/15.9.5.23-7.js | 122 + .../tests/mozilla/ecma/Date/15.9.5.23-8.js | 111 + .../tests/mozilla/ecma/Date/15.9.5.23-9.js | 112 + .../tests/mozilla/ecma/Date/15.9.5.24-1.js | 151 + .../tests/mozilla/ecma/Date/15.9.5.24-2.js | 150 + .../tests/mozilla/ecma/Date/15.9.5.24-3.js | 149 + .../tests/mozilla/ecma/Date/15.9.5.24-4.js | 148 + .../tests/mozilla/ecma/Date/15.9.5.24-5.js | 141 + .../tests/mozilla/ecma/Date/15.9.5.24-6.js | 140 + .../tests/mozilla/ecma/Date/15.9.5.24-7.js | 139 + .../tests/mozilla/ecma/Date/15.9.5.24-8.js | 135 + .../tests/mozilla/ecma/Date/15.9.5.25-1.js | 190 + .../tests/mozilla/ecma/Date/15.9.5.26-1.js | 203 + .../tests/mozilla/ecma/Date/15.9.5.27-1.js | 202 + .../tests/mozilla/ecma/Date/15.9.5.28-1.js | 216 + .../tests/mozilla/ecma/Date/15.9.5.29-1.js | 210 + .../tests/mozilla/ecma/Date/15.9.5.3-1-n.js | 73 + .../tests/mozilla/ecma/Date/15.9.5.3-2.js | 107 + .../tests/mozilla/ecma/Date/15.9.5.30-1.js | 215 + .../tests/mozilla/ecma/Date/15.9.5.31-1.js | 212 + .../tests/mozilla/ecma/Date/15.9.5.32-1.js | 157 + .../tests/mozilla/ecma/Date/15.9.5.33-1.js | 156 + .../tests/mozilla/ecma/Date/15.9.5.34-1.js | 220 + .../tests/mozilla/ecma/Date/15.9.5.35-1.js | 143 + .../tests/mozilla/ecma/Date/15.9.5.36-1.js | 245 + .../tests/mozilla/ecma/Date/15.9.5.36-2.js | 231 + .../tests/mozilla/ecma/Date/15.9.5.36-3.js | 218 + .../tests/mozilla/ecma/Date/15.9.5.36-4.js | 205 + .../tests/mozilla/ecma/Date/15.9.5.36-5.js | 192 + .../tests/mozilla/ecma/Date/15.9.5.36-6.js | 179 + .../tests/mozilla/ecma/Date/15.9.5.36-7.js | 164 + .../tests/mozilla/ecma/Date/15.9.5.37-1.js | 235 + .../tests/mozilla/ecma/Date/15.9.5.37-2.js | 209 + .../tests/mozilla/ecma/Date/15.9.5.37-3.js | 195 + .../tests/mozilla/ecma/Date/15.9.5.37-4.js | 177 + .../tests/mozilla/ecma/Date/15.9.5.37-5.js | 160 + .../tests/mozilla/ecma/Date/15.9.5.4-1.js | 96 + .../tests/mozilla/ecma/Date/15.9.5.4-2-n.js | 67 + .../tests/mozilla/ecma/Date/15.9.5.5.js | 123 + .../tests/mozilla/ecma/Date/15.9.5.6.js | 114 + .../tests/mozilla/ecma/Date/15.9.5.7.js | 114 + .../tests/mozilla/ecma/Date/15.9.5.8.js | 120 + .../tests/mozilla/ecma/Date/15.9.5.9.js | 120 + .../tests/mozilla/ecma/Date/15.9.5.js | 81 + .../mozilla/ecma/ExecutionContexts/10.1.3-1.js | 107 + .../tests/mozilla/ecma/ExecutionContexts/10.1.3.js | 160 + .../mozilla/ecma/ExecutionContexts/10.1.4-1.js | 100 + .../mozilla/ecma/ExecutionContexts/10.1.4-10.js | 94 + .../mozilla/ecma/ExecutionContexts/10.1.4-2.js | 102 + .../mozilla/ecma/ExecutionContexts/10.1.4-3.js | 98 + .../mozilla/ecma/ExecutionContexts/10.1.4-4.js | 101 + .../mozilla/ecma/ExecutionContexts/10.1.4-5.js | 101 + .../mozilla/ecma/ExecutionContexts/10.1.4-6.js | 83 + .../mozilla/ecma/ExecutionContexts/10.1.4-7.js | 100 + .../mozilla/ecma/ExecutionContexts/10.1.4-8.js | 101 + .../mozilla/ecma/ExecutionContexts/10.1.4-9.js | 98 + .../mozilla/ecma/ExecutionContexts/10.1.5-1.js | 118 + .../mozilla/ecma/ExecutionContexts/10.1.5-2.js | 101 + .../mozilla/ecma/ExecutionContexts/10.1.5-3.js | 119 + .../mozilla/ecma/ExecutionContexts/10.1.5-4.js | 94 + .../tests/mozilla/ecma/ExecutionContexts/10.1.6.js | 124 + .../mozilla/ecma/ExecutionContexts/10.1.8-1.js | 132 + .../mozilla/ecma/ExecutionContexts/10.1.8-2.js | 117 + .../tests/mozilla/ecma/ExecutionContexts/10.2.1.js | 82 + .../mozilla/ecma/ExecutionContexts/10.2.2-1.js | 119 + .../mozilla/ecma/ExecutionContexts/10.2.2-2.js | 105 + .../mozilla/ecma/ExecutionContexts/10.2.3-1.js | 83 + .../mozilla/ecma/ExecutionContexts/10.2.3-2.js | 89 + .../tests/mozilla/ecma/Expressions/11.1.1.js | 135 + .../tests/mozilla/ecma/Expressions/11.10-1.js | 270 + .../tests/mozilla/ecma/Expressions/11.10-2.js | 269 + .../tests/mozilla/ecma/Expressions/11.10-3.js | 268 + .../tests/mozilla/ecma/Expressions/11.12-1.js | 86 + .../tests/mozilla/ecma/Expressions/11.12-2-n.js | 71 + .../tests/mozilla/ecma/Expressions/11.12-3.js | 71 + .../tests/mozilla/ecma/Expressions/11.12-4.js | 71 + .../tests/mozilla/ecma/Expressions/11.13.1.js | 70 + .../tests/mozilla/ecma/Expressions/11.13.2-1.js | 122 + .../tests/mozilla/ecma/Expressions/11.13.2-2.js | 136 + .../tests/mozilla/ecma/Expressions/11.13.2-3.js | 149 + .../tests/mozilla/ecma/Expressions/11.13.2-4.js | 137 + .../tests/mozilla/ecma/Expressions/11.13.2-5.js | 137 + .../tests/mozilla/ecma/Expressions/11.13.js | 86 + .../tests/mozilla/ecma/Expressions/11.14-1.js | 73 + .../tests/mozilla/ecma/Expressions/11.2.1-1.js | 268 + .../tests/mozilla/ecma/Expressions/11.2.1-2.js | 124 + .../tests/mozilla/ecma/Expressions/11.2.1-3-n.js | 120 + .../tests/mozilla/ecma/Expressions/11.2.1-4-n.js | 120 + .../tests/mozilla/ecma/Expressions/11.2.1-5.js | 124 + .../tests/mozilla/ecma/Expressions/11.2.2-1-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.2-1.js | 99 + .../tests/mozilla/ecma/Expressions/11.2.2-10-n.js | 96 + .../tests/mozilla/ecma/Expressions/11.2.2-11.js | 99 + .../tests/mozilla/ecma/Expressions/11.2.2-2-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.2-3-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.2-4-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.2-5-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.2-6-n.js | 81 + .../tests/mozilla/ecma/Expressions/11.2.2-7-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.2-8-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.2-9-n.js | 98 + .../tests/mozilla/ecma/Expressions/11.2.3-1.js | 121 + .../tests/mozilla/ecma/Expressions/11.2.3-2-n.js | 90 + .../tests/mozilla/ecma/Expressions/11.2.3-3-n.js | 81 + .../tests/mozilla/ecma/Expressions/11.2.3-4-n.js | 81 + .../tests/mozilla/ecma/Expressions/11.2.3-5.js | 81 + .../tests/mozilla/ecma/Expressions/11.3.1.js | 154 + .../tests/mozilla/ecma/Expressions/11.3.2.js | 154 + .../tests/mozilla/ecma/Expressions/11.4.1.js | 95 + .../tests/mozilla/ecma/Expressions/11.4.2.js | 85 + .../tests/mozilla/ecma/Expressions/11.4.3.js | 109 + .../tests/mozilla/ecma/Expressions/11.4.4.js | 156 + .../tests/mozilla/ecma/Expressions/11.4.5.js | 154 + .../tests/mozilla/ecma/Expressions/11.4.6.js | 299 + .../tests/mozilla/ecma/Expressions/11.4.8.js | 215 + .../tests/mozilla/ecma/Expressions/11.4.9.js | 90 + .../tests/mozilla/ecma/Expressions/11.5.1.js | 115 + .../tests/mozilla/ecma/Expressions/11.5.2.js | 154 + .../tests/mozilla/ecma/Expressions/11.5.3.js | 160 + .../tests/mozilla/ecma/Expressions/11.6.1-1.js | 211 + .../tests/mozilla/ecma/Expressions/11.6.1-2.js | 203 + .../tests/mozilla/ecma/Expressions/11.6.1-3.js | 181 + .../tests/mozilla/ecma/Expressions/11.6.2-1.js | 199 + .../tests/mozilla/ecma/Expressions/11.6.3.js | 116 + .../tests/mozilla/ecma/Expressions/11.7.1.js | 229 + .../tests/mozilla/ecma/Expressions/11.7.2.js | 246 + .../tests/mozilla/ecma/Expressions/11.7.3.js | 230 + .../tests/mozilla/ecma/Expressions/11.8.1.js | 121 + .../tests/mozilla/ecma/Expressions/11.8.2.js | 122 + .../tests/mozilla/ecma/Expressions/11.8.3.js | 120 + .../tests/mozilla/ecma/Expressions/11.8.4.js | 122 + .../tests/mozilla/ecma/Expressions/11.9.1.js | 162 + .../tests/mozilla/ecma/Expressions/11.9.2.js | 161 + .../tests/mozilla/ecma/Expressions/11.9.3.js | 161 + .../mozilla/ecma/FunctionObjects/15.3.1.1-1.js | 90 + .../mozilla/ecma/FunctionObjects/15.3.1.1-2.js | 118 + .../mozilla/ecma/FunctionObjects/15.3.1.1-3.js | 96 + .../mozilla/ecma/FunctionObjects/15.3.2.1-1.js | 94 + .../mozilla/ecma/FunctionObjects/15.3.2.1-2.js | 111 + .../mozilla/ecma/FunctionObjects/15.3.2.1-3.js | 96 + .../mozilla/ecma/FunctionObjects/15.3.3.1-1.js | 62 + .../mozilla/ecma/FunctionObjects/15.3.3.1-2.js | 70 + .../mozilla/ecma/FunctionObjects/15.3.3.1-3.js | 79 + .../mozilla/ecma/FunctionObjects/15.3.3.1-4.js | 70 + .../tests/mozilla/ecma/FunctionObjects/15.3.3.2.js | 60 + .../tests/mozilla/ecma/FunctionObjects/15.3.4-1.js | 80 + .../tests/mozilla/ecma/FunctionObjects/15.3.4.1.js | 62 + .../tests/mozilla/ecma/FunctionObjects/15.3.4.js | 79 + .../tests/mozilla/ecma/FunctionObjects/15.3.5-1.js | 118 + .../tests/mozilla/ecma/FunctionObjects/15.3.5-2.js | 92 + .../tests/mozilla/ecma/FunctionObjects/15.3.5.1.js | 80 + .../tests/mozilla/ecma/FunctionObjects/15.3.5.3.js | 75 + .../tests/mozilla/ecma/GlobalObject/15.1-1-n.js | 65 + .../tests/mozilla/ecma/GlobalObject/15.1-2-n.js | 63 + .../tests/mozilla/ecma/GlobalObject/15.1.1.1.js | 65 + .../tests/mozilla/ecma/GlobalObject/15.1.1.2.js | 66 + .../tests/mozilla/ecma/GlobalObject/15.1.2.1-1.js | 91 + .../tests/mozilla/ecma/GlobalObject/15.1.2.1-2.js | 66 + .../tests/mozilla/ecma/GlobalObject/15.1.2.2-1.js | 291 + .../tests/mozilla/ecma/GlobalObject/15.1.2.2-2.js | 232 + .../tests/mozilla/ecma/GlobalObject/15.1.2.3-1.js | 444 + .../tests/mozilla/ecma/GlobalObject/15.1.2.3-2.js | 295 + .../tests/mozilla/ecma/GlobalObject/15.1.2.4.js | 206 + .../tests/mozilla/ecma/GlobalObject/15.1.2.5-1.js | 207 + .../tests/mozilla/ecma/GlobalObject/15.1.2.5-2.js | 184 + .../tests/mozilla/ecma/GlobalObject/15.1.2.5-3.js | 207 + .../tests/mozilla/ecma/GlobalObject/15.1.2.6.js | 127 + .../tests/mozilla/ecma/GlobalObject/15.1.2.7.js | 131 + .../tests/mozilla/ecma/LexicalConventions/7.1-1.js | 86 + .../tests/mozilla/ecma/LexicalConventions/7.1-2.js | 74 + .../tests/mozilla/ecma/LexicalConventions/7.1-3.js | 92 + .../tests/mozilla/ecma/LexicalConventions/7.2-1.js | 75 + .../mozilla/ecma/LexicalConventions/7.2-2-n.js | 80 + .../mozilla/ecma/LexicalConventions/7.2-3-n.js | 83 + .../mozilla/ecma/LexicalConventions/7.2-4-n.js | 82 + .../mozilla/ecma/LexicalConventions/7.2-5-n.js | 85 + .../tests/mozilla/ecma/LexicalConventions/7.2-6.js | 70 + .../tests/mozilla/ecma/LexicalConventions/7.3-1.js | 79 + .../mozilla/ecma/LexicalConventions/7.3-10.js | 67 + .../mozilla/ecma/LexicalConventions/7.3-11.js | 66 + .../mozilla/ecma/LexicalConventions/7.3-12.js | 66 + .../mozilla/ecma/LexicalConventions/7.3-13-n.js | 66 + .../tests/mozilla/ecma/LexicalConventions/7.3-2.js | 67 + .../tests/mozilla/ecma/LexicalConventions/7.3-3.js | 67 + .../tests/mozilla/ecma/LexicalConventions/7.3-4.js | 67 + .../tests/mozilla/ecma/LexicalConventions/7.3-5.js | 66 + .../tests/mozilla/ecma/LexicalConventions/7.3-6.js | 68 + .../tests/mozilla/ecma/LexicalConventions/7.3-7.js | 68 + .../tests/mozilla/ecma/LexicalConventions/7.3-8.js | 67 + .../tests/mozilla/ecma/LexicalConventions/7.3-9.js | 66 + .../mozilla/ecma/LexicalConventions/7.4.1-1-n.js | 71 + .../mozilla/ecma/LexicalConventions/7.4.1-2-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.1-3-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.2-1-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-10-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-11-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-12-n.js | 77 + .../mozilla/ecma/LexicalConventions/7.4.2-13-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-14-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-15-n.js | 77 + .../mozilla/ecma/LexicalConventions/7.4.2-16-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-2-n.js | 75 + .../mozilla/ecma/LexicalConventions/7.4.2-3-n.js | 75 + .../mozilla/ecma/LexicalConventions/7.4.2-4-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-5-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-6-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.2-7-n.js | 73 + .../mozilla/ecma/LexicalConventions/7.4.2-8-n.js | 73 + .../mozilla/ecma/LexicalConventions/7.4.2-9-n.js | 76 + .../mozilla/ecma/LexicalConventions/7.4.3-1-n.js | 71 + .../mozilla/ecma/LexicalConventions/7.4.3-10-n.js | 71 + .../mozilla/ecma/LexicalConventions/7.4.3-11-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.3-12-n.js | 72 + .../mozilla/ecma/LexicalConventions/7.4.3-13-n.js | 72 + .../mozilla/ecma/LexicalConventions/7.4.3-14-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.3-15-n.js | 72 + .../mozilla/ecma/LexicalConventions/7.4.3-16-n.js | 69 + .../mozilla/ecma/LexicalConventions/7.4.3-2-n.js | 72 + .../mozilla/ecma/LexicalConventions/7.4.3-3-n.js | 72 + .../mozilla/ecma/LexicalConventions/7.4.3-4-n.js | 72 + .../mozilla/ecma/LexicalConventions/7.4.3-5-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.3-6-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.3-7-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.3-8-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.4.3-9-n.js | 70 + .../tests/mozilla/ecma/LexicalConventions/7.5-1.js | 65 + .../mozilla/ecma/LexicalConventions/7.5-10-n.js | 70 + .../mozilla/ecma/LexicalConventions/7.5-2-n.js | 65 + .../mozilla/ecma/LexicalConventions/7.5-3-n.js | 65 + .../mozilla/ecma/LexicalConventions/7.5-4-n.js | 65 + .../mozilla/ecma/LexicalConventions/7.5-5-n.js | 65 + .../tests/mozilla/ecma/LexicalConventions/7.5-6.js | 65 + .../tests/mozilla/ecma/LexicalConventions/7.5-7.js | 65 + .../mozilla/ecma/LexicalConventions/7.5-8-n.js | 65 + .../mozilla/ecma/LexicalConventions/7.5-9-n.js | 70 + .../tests/mozilla/ecma/LexicalConventions/7.6.js | 309 + .../tests/mozilla/ecma/LexicalConventions/7.7.1.js | 72 + .../tests/mozilla/ecma/LexicalConventions/7.7.2.js | 75 + .../mozilla/ecma/LexicalConventions/7.7.3-1.js | 197 + .../mozilla/ecma/LexicalConventions/7.7.3-2.js | 93 + .../tests/mozilla/ecma/LexicalConventions/7.7.3.js | 337 + .../tests/mozilla/ecma/LexicalConventions/7.7.4.js | 275 + .../mozilla/ecma/LexicalConventions/7.8.2-n.js | 48 + .../tests/mozilla/ecma/Math/15.8-1.js | 84 + .../tests/mozilla/ecma/Math/15.8-2-n.js | 83 + .../tests/mozilla/ecma/Math/15.8-3-n.js | 81 + .../tests/mozilla/ecma/Math/15.8.1.1-1.js | 62 + .../tests/mozilla/ecma/Math/15.8.1.1-2.js | 65 + .../tests/mozilla/ecma/Math/15.8.1.2-1.js | 62 + .../tests/mozilla/ecma/Math/15.8.1.2-2.js | 63 + .../tests/mozilla/ecma/Math/15.8.1.3-1.js | 63 + .../tests/mozilla/ecma/Math/15.8.1.3-2.js | 69 + .../tests/mozilla/ecma/Math/15.8.1.4-1.js | 64 + .../tests/mozilla/ecma/Math/15.8.1.4-2.js | 65 + .../tests/mozilla/ecma/Math/15.8.1.5-1.js | 67 + .../tests/mozilla/ecma/Math/15.8.1.5-2.js | 66 + .../tests/mozilla/ecma/Math/15.8.1.6-1.js | 63 + .../tests/mozilla/ecma/Math/15.8.1.6-2.js | 64 + .../tests/mozilla/ecma/Math/15.8.1.7-1.js | 64 + .../tests/mozilla/ecma/Math/15.8.1.7-2.js | 64 + .../tests/mozilla/ecma/Math/15.8.1.8-1.js | 64 + .../tests/mozilla/ecma/Math/15.8.1.8-2.js | 63 + .../tests/mozilla/ecma/Math/15.8.1.8-3.js | 61 + .../tests/mozilla/ecma/Math/15.8.1.js | 86 + .../tests/mozilla/ecma/Math/15.8.2.1.js | 103 + .../tests/mozilla/ecma/Math/15.8.2.10.js | 86 + .../tests/mozilla/ecma/Math/15.8.2.11.js | 98 + .../tests/mozilla/ecma/Math/15.8.2.12.js | 96 + .../tests/mozilla/ecma/Math/15.8.2.13.js | 132 + .../tests/mozilla/ecma/Math/15.8.2.14.js | 83 + .../tests/mozilla/ecma/Math/15.8.2.15.js | 113 + .../tests/mozilla/ecma/Math/15.8.2.16.js | 78 + .../tests/mozilla/ecma/Math/15.8.2.17.js | 99 + .../tests/mozilla/ecma/Math/15.8.2.18.js | 98 + .../tests/mozilla/ecma/Math/15.8.2.2.js | 86 + .../tests/mozilla/ecma/Math/15.8.2.3.js | 90 + .../tests/mozilla/ecma/Math/15.8.2.4.js | 88 + .../tests/mozilla/ecma/Math/15.8.2.5.js | 105 + .../tests/mozilla/ecma/Math/15.8.2.6.js | 108 + .../tests/mozilla/ecma/Math/15.8.2.7.js | 111 + .../tests/mozilla/ecma/Math/15.8.2.8.js | 84 + .../tests/mozilla/ecma/Math/15.8.2.9.js | 105 + .../tests/mozilla/ecma/NativeObjects/15-1.js | 95 + .../tests/mozilla/ecma/NativeObjects/15-2.js | 78 + .../tests/mozilla/ecma/Number/15.7.1.js | 90 + .../tests/mozilla/ecma/Number/15.7.2.js | 173 + .../tests/mozilla/ecma/Number/15.7.3.1-1.js | 68 + .../tests/mozilla/ecma/Number/15.7.3.1-2.js | 75 + .../tests/mozilla/ecma/Number/15.7.3.1-3.js | 70 + .../tests/mozilla/ecma/Number/15.7.3.2-1.js | 63 + .../tests/mozilla/ecma/Number/15.7.3.2-2.js | 64 + .../tests/mozilla/ecma/Number/15.7.3.2-3.js | 66 + .../tests/mozilla/ecma/Number/15.7.3.2-4.js | 66 + .../tests/mozilla/ecma/Number/15.7.3.3-1.js | 64 + .../tests/mozilla/ecma/Number/15.7.3.3-2.js | 66 + .../tests/mozilla/ecma/Number/15.7.3.3-3.js | 67 + .../tests/mozilla/ecma/Number/15.7.3.3-4.js | 69 + .../tests/mozilla/ecma/Number/15.7.3.4-1.js | 63 + .../tests/mozilla/ecma/Number/15.7.3.4-2.js | 67 + .../tests/mozilla/ecma/Number/15.7.3.4-3.js | 71 + .../tests/mozilla/ecma/Number/15.7.3.4-4.js | 71 + .../tests/mozilla/ecma/Number/15.7.3.5-1.js | 61 + .../tests/mozilla/ecma/Number/15.7.3.5-2.js | 72 + .../tests/mozilla/ecma/Number/15.7.3.5-3.js | 67 + .../tests/mozilla/ecma/Number/15.7.3.5-4.js | 68 + .../tests/mozilla/ecma/Number/15.7.3.6-1.js | 60 + .../tests/mozilla/ecma/Number/15.7.3.6-2.js | 64 + .../tests/mozilla/ecma/Number/15.7.3.6-3.js | 68 + .../tests/mozilla/ecma/Number/15.7.3.6-4.js | 66 + .../tests/mozilla/ecma/Number/15.7.3.js | 68 + .../tests/mozilla/ecma/Number/15.7.4-1.js | 63 + .../tests/mozilla/ecma/Number/15.7.4.1.js | 64 + .../tests/mozilla/ecma/Number/15.7.4.2-1.js | 80 + .../tests/mozilla/ecma/Number/15.7.4.2-2-n.js | 70 + .../tests/mozilla/ecma/Number/15.7.4.2-3-n.js | 68 + .../tests/mozilla/ecma/Number/15.7.4.2-4.js | 68 + .../tests/mozilla/ecma/Number/15.7.4.3-1.js | 72 + .../tests/mozilla/ecma/Number/15.7.4.3-2.js | 63 + .../tests/mozilla/ecma/Number/15.7.4.3-3-n.js | 66 + .../tests/mozilla/ecma/Number/15.7.4.js | 86 + .../tests/mozilla/ecma/ObjectObjects/15.2.1.1.js | 151 + .../tests/mozilla/ecma/ObjectObjects/15.2.1.2.js | 85 + .../tests/mozilla/ecma/ObjectObjects/15.2.2.1.js | 139 + .../tests/mozilla/ecma/ObjectObjects/15.2.2.2.js | 81 + .../tests/mozilla/ecma/ObjectObjects/15.2.3-1.js | 65 + .../tests/mozilla/ecma/ObjectObjects/15.2.3.1-1.js | 68 + .../tests/mozilla/ecma/ObjectObjects/15.2.3.1-2.js | 70 + .../tests/mozilla/ecma/ObjectObjects/15.2.3.1-3.js | 69 + .../tests/mozilla/ecma/ObjectObjects/15.2.3.1-4.js | 70 + .../tests/mozilla/ecma/ObjectObjects/15.2.3.js | 68 + .../tests/mozilla/ecma/ObjectObjects/15.2.4.1.js | 63 + .../tests/mozilla/ecma/ObjectObjects/15.2.4.2.js | 128 + .../tests/mozilla/ecma/ObjectObjects/15.2.4.3.js | 115 + .../tests/mozilla/ecma/ObjectObjects/15.2.4.js | 60 + .../tests/mozilla/ecma/SourceText/6-1.js | 124 + .../tests/mozilla/ecma/SourceText/6-2.js | 129 + .../tests/mozilla/ecma/Statements/12.10-1.js | 151 + .../tests/mozilla/ecma/Statements/12.10.js | 64 + .../tests/mozilla/ecma/Statements/12.2-1.js | 70 + .../tests/mozilla/ecma/Statements/12.5-1.js | 98 + .../tests/mozilla/ecma/Statements/12.5-2.js | 96 + .../tests/mozilla/ecma/Statements/12.6.1-1.js | 68 + .../tests/mozilla/ecma/Statements/12.6.2-1.js | 75 + .../tests/mozilla/ecma/Statements/12.6.2-2.js | 76 + .../tests/mozilla/ecma/Statements/12.6.2-3.js | 67 + .../tests/mozilla/ecma/Statements/12.6.2-4.js | 66 + .../tests/mozilla/ecma/Statements/12.6.2-5.js | 71 + .../tests/mozilla/ecma/Statements/12.6.2-6.js | 75 + .../tests/mozilla/ecma/Statements/12.6.2-7.js | 72 + .../tests/mozilla/ecma/Statements/12.6.2-8.js | 69 + .../tests/mozilla/ecma/Statements/12.6.2-9-n.js | 65 + .../tests/mozilla/ecma/Statements/12.6.3-1.js | 71 + .../tests/mozilla/ecma/Statements/12.6.3-10.js | 112 + .../tests/mozilla/ecma/Statements/12.6.3-11.js | 93 + .../tests/mozilla/ecma/Statements/12.6.3-12.js | 100 + .../tests/mozilla/ecma/Statements/12.6.3-19.js | 114 + .../tests/mozilla/ecma/Statements/12.6.3-2.js | 66 + .../tests/mozilla/ecma/Statements/12.6.3-3.js | 70 + .../tests/mozilla/ecma/Statements/12.6.3-4.js | 193 + .../tests/mozilla/ecma/Statements/12.6.3-5-n.js | 102 + .../tests/mozilla/ecma/Statements/12.6.3-6-n.js | 102 + .../tests/mozilla/ecma/Statements/12.6.3-7-n.js | 102 + .../tests/mozilla/ecma/Statements/12.6.3-8-n.js | 102 + .../tests/mozilla/ecma/Statements/12.6.3-9-n.js | 102 + .../tests/mozilla/ecma/Statements/12.7-1-n.js | 67 + .../tests/mozilla/ecma/Statements/12.8-1-n.js | 69 + .../tests/mozilla/ecma/Statements/12.9-1-n.js | 64 + .../tests/mozilla/ecma/String/15.5.1.js | 137 + .../tests/mozilla/ecma/String/15.5.2.js | 112 + .../tests/mozilla/ecma/String/15.5.3.1-1.js | 73 + .../tests/mozilla/ecma/String/15.5.3.1-2.js | 70 + .../tests/mozilla/ecma/String/15.5.3.1-3.js | 67 + .../tests/mozilla/ecma/String/15.5.3.1-4.js | 68 + .../tests/mozilla/ecma/String/15.5.3.2-1.js | 195 + .../tests/mozilla/ecma/String/15.5.3.2-2.js | 80 + .../tests/mozilla/ecma/String/15.5.3.2-3.js | 122 + .../tests/mozilla/ecma/String/15.5.3.js | 74 + .../tests/mozilla/ecma/String/15.5.4.1.js | 66 + .../tests/mozilla/ecma/String/15.5.4.10-1.js | 218 + .../tests/mozilla/ecma/String/15.5.4.11-1.js | 514 + .../tests/mozilla/ecma/String/15.5.4.11-2.js | 633 + .../tests/mozilla/ecma/String/15.5.4.11-3.js | 509 + .../tests/mozilla/ecma/String/15.5.4.11-4.js | 508 + .../tests/mozilla/ecma/String/15.5.4.11-5.js | 514 + .../tests/mozilla/ecma/String/15.5.4.11-6.js | 511 + .../tests/mozilla/ecma/String/15.5.4.12-1.js | 527 + .../tests/mozilla/ecma/String/15.5.4.12-2.js | 514 + .../tests/mozilla/ecma/String/15.5.4.12-3.js | 556 + .../tests/mozilla/ecma/String/15.5.4.12-4.js | 511 + .../tests/mozilla/ecma/String/15.5.4.12-5.js | 523 + .../tests/mozilla/ecma/String/15.5.4.2-1.js | 70 + .../tests/mozilla/ecma/String/15.5.4.2-2-n.js | 74 + .../tests/mozilla/ecma/String/15.5.4.2-3.js | 87 + .../tests/mozilla/ecma/String/15.5.4.2.js | 92 + .../tests/mozilla/ecma/String/15.5.4.3-1.js | 70 + .../tests/mozilla/ecma/String/15.5.4.3-2.js | 89 + .../tests/mozilla/ecma/String/15.5.4.3-3-n.js | 72 + .../tests/mozilla/ecma/String/15.5.4.4-1.js | 87 + .../tests/mozilla/ecma/String/15.5.4.4-2.js | 141 + .../tests/mozilla/ecma/String/15.5.4.4-3.js | 117 + .../tests/mozilla/ecma/String/15.5.4.4-4.js | 159 + .../tests/mozilla/ecma/String/15.5.4.5-1.js | 89 + .../tests/mozilla/ecma/String/15.5.4.5-2.js | 128 + .../tests/mozilla/ecma/String/15.5.4.5-3.js | 136 + .../tests/mozilla/ecma/String/15.5.4.5-4.js | 80 + .../tests/mozilla/ecma/String/15.5.4.5-5.js | 111 + .../tests/mozilla/ecma/String/15.5.4.5-6.js | 97 + .../tests/mozilla/ecma/String/15.5.4.6-1.js | 158 + .../tests/mozilla/ecma/String/15.5.4.6-2.js | 259 + .../tests/mozilla/ecma/String/15.5.4.7-1.js | 221 + .../tests/mozilla/ecma/String/15.5.4.7-2.js | 220 + .../tests/mozilla/ecma/String/15.5.4.7-3.js | 166 + .../tests/mozilla/ecma/String/15.5.4.8-1.js | 234 + .../tests/mozilla/ecma/String/15.5.4.8-2.js | 248 + .../tests/mozilla/ecma/String/15.5.4.8-3.js | 205 + .../tests/mozilla/ecma/String/15.5.4.9-1.js | 202 + .../tests/mozilla/ecma/String/15.5.4.js | 74 + .../tests/mozilla/ecma/String/15.5.5.1.js | 90 + .../tests/mozilla/ecma/TypeConversion/9.2.js | 111 + .../tests/mozilla/ecma/TypeConversion/9.3-1.js | 96 + .../tests/mozilla/ecma/TypeConversion/9.3.1-1.js | 323 + .../tests/mozilla/ecma/TypeConversion/9.3.1-2.js | 89 + .../tests/mozilla/ecma/TypeConversion/9.3.1-3.js | 726 + .../tests/mozilla/ecma/TypeConversion/9.3.js | 89 + .../tests/mozilla/ecma/TypeConversion/9.4-1.js | 120 + .../tests/mozilla/ecma/TypeConversion/9.4-2.js | 120 + .../tests/mozilla/ecma/TypeConversion/9.5-2.js | 171 + .../tests/mozilla/ecma/TypeConversion/9.6.js | 139 + .../tests/mozilla/ecma/TypeConversion/9.7.js | 158 + .../tests/mozilla/ecma/TypeConversion/9.8.1.js | 166 + .../tests/mozilla/ecma/TypeConversion/9.9-1.js | 143 + .../JavaScriptCore/tests/mozilla/ecma/Types/8.1.js | 71 + .../JavaScriptCore/tests/mozilla/ecma/Types/8.4.js | 125 + .../tests/mozilla/ecma/Types/8.6.2.1-1.js | 105 + .../JavaScriptCore/tests/mozilla/ecma/browser.js | 80 + Source/JavaScriptCore/tests/mozilla/ecma/jsref.js | 669 + Source/JavaScriptCore/tests/mozilla/ecma/shell.js | 712 + .../tests/mozilla/ecma_2/Exceptions/boolean-001.js | 43 + .../tests/mozilla/ecma_2/Exceptions/boolean-002.js | 47 + .../tests/mozilla/ecma_2/Exceptions/date-001.js | 57 + .../tests/mozilla/ecma_2/Exceptions/date-002.js | 51 + .../tests/mozilla/ecma_2/Exceptions/date-003.js | 53 + .../tests/mozilla/ecma_2/Exceptions/date-004.js | 47 + .../mozilla/ecma_2/Exceptions/exception-001.js | 42 + .../mozilla/ecma_2/Exceptions/exception-002.js | 42 + .../mozilla/ecma_2/Exceptions/exception-003.js | 46 + .../mozilla/ecma_2/Exceptions/exception-004.js | 42 + .../mozilla/ecma_2/Exceptions/exception-005.js | 42 + .../mozilla/ecma_2/Exceptions/exception-006.js | 53 + .../mozilla/ecma_2/Exceptions/exception-007.js | 54 + .../mozilla/ecma_2/Exceptions/exception-008.js | 41 + .../mozilla/ecma_2/Exceptions/exception-009.js | 50 + .../mozilla/ecma_2/Exceptions/exception-010-n.js | 36 + .../mozilla/ecma_2/Exceptions/exception-011-n.js | 35 + .../mozilla/ecma_2/Exceptions/expression-001.js | 47 + .../mozilla/ecma_2/Exceptions/expression-002.js | 57 + .../mozilla/ecma_2/Exceptions/expression-003.js | 52 + .../mozilla/ecma_2/Exceptions/expression-004.js | 46 + .../mozilla/ecma_2/Exceptions/expression-005.js | 38 + .../mozilla/ecma_2/Exceptions/expression-006.js | 43 + .../mozilla/ecma_2/Exceptions/expression-007.js | 41 + .../mozilla/ecma_2/Exceptions/expression-008.js | 38 + .../mozilla/ecma_2/Exceptions/expression-009.js | 39 + .../mozilla/ecma_2/Exceptions/expression-010.js | 40 + .../mozilla/ecma_2/Exceptions/expression-011.js | 40 + .../mozilla/ecma_2/Exceptions/expression-012.js | 41 + .../mozilla/ecma_2/Exceptions/expression-013.js | 41 + .../mozilla/ecma_2/Exceptions/expression-014.js | 43 + .../mozilla/ecma_2/Exceptions/expression-015.js | 37 + .../mozilla/ecma_2/Exceptions/expression-016.js | 37 + .../mozilla/ecma_2/Exceptions/expression-017.js | 37 + .../mozilla/ecma_2/Exceptions/expression-019.js | 41 + .../mozilla/ecma_2/Exceptions/function-001.js | 64 + .../tests/mozilla/ecma_2/Exceptions/global-001.js | 43 + .../tests/mozilla/ecma_2/Exceptions/global-002.js | 43 + .../tests/mozilla/ecma_2/Exceptions/lexical-001.js | 49 + .../tests/mozilla/ecma_2/Exceptions/lexical-002.js | 49 + .../tests/mozilla/ecma_2/Exceptions/lexical-003.js | 41 + .../tests/mozilla/ecma_2/Exceptions/lexical-004.js | 49 + .../tests/mozilla/ecma_2/Exceptions/lexical-005.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-006.js | 55 + .../tests/mozilla/ecma_2/Exceptions/lexical-007.js | 48 + .../tests/mozilla/ecma_2/Exceptions/lexical-008.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-009.js | 49 + .../tests/mozilla/ecma_2/Exceptions/lexical-010.js | 48 + .../tests/mozilla/ecma_2/Exceptions/lexical-011.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-012.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-013.js | 49 + .../tests/mozilla/ecma_2/Exceptions/lexical-014.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-015.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-016.js | 48 + .../tests/mozilla/ecma_2/Exceptions/lexical-017.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-018.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-019.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-020.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-021.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-022.js | 50 + .../tests/mozilla/ecma_2/Exceptions/lexical-023.js | 49 + .../tests/mozilla/ecma_2/Exceptions/lexical-024.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-025.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-026.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-027.js | 58 + .../tests/mozilla/ecma_2/Exceptions/lexical-028.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-029.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-030.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-031.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-032.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-033.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-034.js | 55 + .../tests/mozilla/ecma_2/Exceptions/lexical-035.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-036.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-037.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-038.js | 56 + .../tests/mozilla/ecma_2/Exceptions/lexical-039.js | 43 + .../tests/mozilla/ecma_2/Exceptions/lexical-040.js | 43 + .../tests/mozilla/ecma_2/Exceptions/lexical-041.js | 45 + .../tests/mozilla/ecma_2/Exceptions/lexical-042.js | 46 + .../tests/mozilla/ecma_2/Exceptions/lexical-047.js | 47 + .../tests/mozilla/ecma_2/Exceptions/lexical-048.js | 41 + .../tests/mozilla/ecma_2/Exceptions/lexical-049.js | 46 + .../tests/mozilla/ecma_2/Exceptions/lexical-050.js | 42 + .../tests/mozilla/ecma_2/Exceptions/lexical-051.js | 42 + .../tests/mozilla/ecma_2/Exceptions/lexical-052.js | 44 + .../tests/mozilla/ecma_2/Exceptions/lexical-053.js | 42 + .../tests/mozilla/ecma_2/Exceptions/lexical-054.js | 43 + .../tests/mozilla/ecma_2/Exceptions/number-001.js | 52 + .../tests/mozilla/ecma_2/Exceptions/number-002.js | 45 + .../tests/mozilla/ecma_2/Exceptions/number-003.js | 47 + .../mozilla/ecma_2/Exceptions/statement-001.js | 44 + .../mozilla/ecma_2/Exceptions/statement-002.js | 66 + .../mozilla/ecma_2/Exceptions/statement-003.js | 77 + .../mozilla/ecma_2/Exceptions/statement-004.js | 49 + .../mozilla/ecma_2/Exceptions/statement-005.js | 48 + .../mozilla/ecma_2/Exceptions/statement-006.js | 48 + .../mozilla/ecma_2/Exceptions/statement-007.js | 39 + .../mozilla/ecma_2/Exceptions/statement-008.js | 39 + .../mozilla/ecma_2/Exceptions/statement-009.js | 38 + .../tests/mozilla/ecma_2/Exceptions/string-001.js | 50 + .../tests/mozilla/ecma_2/Exceptions/string-002.js | 49 + .../ecma_2/Expressions/StrictEquality-001.js | 70 + .../mozilla/ecma_2/Expressions/instanceof-001.js | 117 + .../mozilla/ecma_2/Expressions/instanceof-002.js | 124 + .../mozilla/ecma_2/Expressions/instanceof-003-n.js | 93 + .../mozilla/ecma_2/Expressions/instanceof-004-n.js | 92 + .../mozilla/ecma_2/Expressions/instanceof-005-n.js | 84 + .../mozilla/ecma_2/Expressions/instanceof-006.js | 83 + .../mozilla/ecma_2/FunctionObjects/apply-001-n.js | 39 + .../tests/mozilla/ecma_2/FunctionObjects/call-1.js | 40 + .../ecma_2/LexicalConventions/keywords-001.js | 31 + .../LexicalConventions/regexp-literals-001.js | 38 + .../LexicalConventions/regexp-literals-002.js | 22 + .../tests/mozilla/ecma_2/RegExp/constructor-001.js | 66 + .../tests/mozilla/ecma_2/RegExp/exec-001.js | 34 + .../tests/mozilla/ecma_2/RegExp/exec-002.js | 182 + .../tests/mozilla/ecma_2/RegExp/function-001.js | 66 + .../tests/mozilla/ecma_2/RegExp/hex-001.js | 63 + .../tests/mozilla/ecma_2/RegExp/multiline-001.js | 62 + .../tests/mozilla/ecma_2/RegExp/octal-001.js | 72 + .../tests/mozilla/ecma_2/RegExp/octal-002.js | 87 + .../tests/mozilla/ecma_2/RegExp/octal-003.js | 81 + .../tests/mozilla/ecma_2/RegExp/properties-001.js | 85 + .../tests/mozilla/ecma_2/RegExp/properties-002.js | 125 + .../mozilla/ecma_2/RegExp/regexp-enumerate-001.js | 98 + .../tests/mozilla/ecma_2/RegExp/regress-001.js | 39 + .../tests/mozilla/ecma_2/RegExp/unicode-001.js | 53 + .../tests/mozilla/ecma_2/Statements/dowhile-001.js | 41 + .../tests/mozilla/ecma_2/Statements/dowhile-002.js | 68 + .../tests/mozilla/ecma_2/Statements/dowhile-003.js | 60 + .../tests/mozilla/ecma_2/Statements/dowhile-004.js | 64 + .../tests/mozilla/ecma_2/Statements/dowhile-005.js | 70 + .../tests/mozilla/ecma_2/Statements/dowhile-006.js | 86 + .../tests/mozilla/ecma_2/Statements/dowhile-007.js | 94 + .../tests/mozilla/ecma_2/Statements/forin-001.js | 294 + .../tests/mozilla/ecma_2/Statements/forin-002.js | 73 + .../tests/mozilla/ecma_2/Statements/if-001.js | 39 + .../tests/mozilla/ecma_2/Statements/label-001.js | 39 + .../tests/mozilla/ecma_2/Statements/label-002.js | 53 + .../tests/mozilla/ecma_2/Statements/switch-001.js | 64 + .../tests/mozilla/ecma_2/Statements/switch-002.js | 60 + .../tests/mozilla/ecma_2/Statements/switch-003.js | 54 + .../tests/mozilla/ecma_2/Statements/switch-004.js | 91 + .../tests/mozilla/ecma_2/Statements/try-001.js | 82 + .../tests/mozilla/ecma_2/Statements/try-003.js | 79 + .../tests/mozilla/ecma_2/Statements/try-004.js | 51 + .../tests/mozilla/ecma_2/Statements/try-005.js | 54 + .../tests/mozilla/ecma_2/Statements/try-006.js | 84 + .../tests/mozilla/ecma_2/Statements/try-007.js | 89 + .../tests/mozilla/ecma_2/Statements/try-008.js | 56 + .../tests/mozilla/ecma_2/Statements/try-009.js | 63 + .../tests/mozilla/ecma_2/Statements/try-010.js | 70 + .../tests/mozilla/ecma_2/Statements/try-012.js | 92 + .../tests/mozilla/ecma_2/Statements/while-001.js | 39 + .../tests/mozilla/ecma_2/Statements/while-002.js | 83 + .../tests/mozilla/ecma_2/Statements/while-003.js | 84 + .../tests/mozilla/ecma_2/Statements/while-004.js | 214 + .../tests/mozilla/ecma_2/String/match-001.js | 100 + .../tests/mozilla/ecma_2/String/match-002.js | 168 + .../tests/mozilla/ecma_2/String/match-003.js | 126 + .../tests/mozilla/ecma_2/String/match-004.js | 167 + .../tests/mozilla/ecma_2/String/replace-001.js | 60 + .../tests/mozilla/ecma_2/String/split-001.js | 106 + .../tests/mozilla/ecma_2/String/split-002.js | 264 + .../tests/mozilla/ecma_2/String/split-003.js | 117 + .../JavaScriptCore/tests/mozilla/ecma_2/browser.js | 83 + .../mozilla/ecma_2/instanceof/instanceof-001.js | 31 + .../mozilla/ecma_2/instanceof/instanceof-002.js | 61 + .../mozilla/ecma_2/instanceof/instanceof-003.js | 57 + .../mozilla/ecma_2/instanceof/regress-7635.js | 70 + .../JavaScriptCore/tests/mozilla/ecma_2/jsref.js | 629 + .../JavaScriptCore/tests/mozilla/ecma_2/shell.js | 216 + .../tests/mozilla/ecma_2/template.js | 39 + .../tests/mozilla/ecma_3/Array/15.4.4.3-1.js | 66 + .../tests/mozilla/ecma_3/Array/15.4.4.4-001.js | 148 + .../tests/mozilla/ecma_3/Array/regress-101488.js | 151 + .../tests/mozilla/ecma_3/Array/regress-130451.js | 214 + .../tests/mozilla/ecma_3/Date/15.9.5.3.js | 149 + .../tests/mozilla/ecma_3/Date/15.9.5.4.js | 194 + .../tests/mozilla/ecma_3/Date/15.9.5.5.js | 94 + .../tests/mozilla/ecma_3/Date/15.9.5.6.js | 149 + .../tests/mozilla/ecma_3/Date/15.9.5.7.js | 211 + .../tests/mozilla/ecma_3/Date/shell.js | 676 + .../tests/mozilla/ecma_3/Exceptions/15.11.1.1.js | 132 + .../tests/mozilla/ecma_3/Exceptions/15.11.4.4-1.js | 169 + .../mozilla/ecma_3/Exceptions/15.11.7.6-001.js | 125 + .../mozilla/ecma_3/Exceptions/15.11.7.6-002.js | 120 + .../mozilla/ecma_3/Exceptions/15.11.7.6-003.js | 120 + .../tests/mozilla/ecma_3/Exceptions/binding-001.js | 106 + .../mozilla/ecma_3/Exceptions/regress-181654.js | 150 + .../mozilla/ecma_3/Exceptions/regress-181914.js | 189 + .../mozilla/ecma_3/Exceptions/regress-58946.js | 56 + .../mozilla/ecma_3/Exceptions/regress-95101.js | 97 + .../mozilla/ecma_3/ExecutionContexts/10.1.3-1.js | 196 + .../mozilla/ecma_3/ExecutionContexts/10.1.3-2.js | 157 + .../mozilla/ecma_3/ExecutionContexts/10.1.3.js | 55 + .../mozilla/ecma_3/ExecutionContexts/10.1.4-1.js | 58 + .../ecma_3/ExecutionContexts/regress-23346.js | 53 + .../tests/mozilla/ecma_3/Expressions/11.6.1-1.js | 171 + .../tests/mozilla/ecma_3/Expressions/11.9.6-1.js | 208 + .../tests/mozilla/ecma_3/FunExpr/fe-001-n.js | 37 + .../tests/mozilla/ecma_3/FunExpr/fe-001.js | 39 + .../tests/mozilla/ecma_3/FunExpr/fe-002.js | 43 + .../tests/mozilla/ecma_3/Function/15.3.4.3-1.js | 205 + .../tests/mozilla/ecma_3/Function/15.3.4.4-1.js | 180 + .../tests/mozilla/ecma_3/Function/arguments-001.js | 148 + .../tests/mozilla/ecma_3/Function/call-001.js | 131 + .../mozilla/ecma_3/Function/regress-104584.js | 56 + .../mozilla/ecma_3/Function/regress-131964.js | 191 + .../mozilla/ecma_3/Function/regress-137181.js | 108 + .../mozilla/ecma_3/Function/regress-193555.js | 131 + .../tests/mozilla/ecma_3/Function/regress-49286.js | 116 + .../tests/mozilla/ecma_3/Function/regress-58274.js | 221 + .../tests/mozilla/ecma_3/Function/regress-85880.js | 152 + .../tests/mozilla/ecma_3/Function/regress-94506.js | 142 + .../tests/mozilla/ecma_3/Function/regress-97921.js | 131 + .../tests/mozilla/ecma_3/Function/scope-001.js | 249 + .../tests/mozilla/ecma_3/Function/scope-002.js | 224 + .../tests/mozilla/ecma_3/Number/15.7.4.5-1.js | 124 + .../tests/mozilla/ecma_3/Number/15.7.4.6-1.js | 113 + .../tests/mozilla/ecma_3/Number/15.7.4.7-1.js | 118 + .../ecma_3/NumberFormatting/tostring-001.js | 42 + .../tests/mozilla/ecma_3/Object/8.6.2.6-001.js | 108 + .../tests/mozilla/ecma_3/Object/class-001.js | 128 + .../tests/mozilla/ecma_3/Object/class-002.js | 124 + .../tests/mozilla/ecma_3/Object/class-003.js | 118 + .../tests/mozilla/ecma_3/Object/class-004.js | 117 + .../tests/mozilla/ecma_3/Object/class-005.js | 102 + .../tests/mozilla/ecma_3/Object/regress-72773.js | 75 + .../mozilla/ecma_3/Object/regress-79129-001.js | 58 + .../tests/mozilla/ecma_3/Object/shell.js | 81 + .../tests/mozilla/ecma_3/Operators/11.13.1-001.js | 147 + .../tests/mozilla/ecma_3/Operators/11.4.1-001.js | 115 + .../tests/mozilla/ecma_3/RegExp/15.10.2-1.js | 176 + .../tests/mozilla/ecma_3/RegExp/15.10.3.1-1.js | 115 + .../tests/mozilla/ecma_3/RegExp/15.10.3.1-2.js | 123 + .../tests/mozilla/ecma_3/RegExp/15.10.4.1-1.js | 111 + .../tests/mozilla/ecma_3/RegExp/15.10.4.1-2.js | 117 + .../tests/mozilla/ecma_3/RegExp/15.10.4.1-3.js | 124 + .../tests/mozilla/ecma_3/RegExp/15.10.4.1-4.js | 130 + .../tests/mozilla/ecma_3/RegExp/15.10.4.1-5-n.js | 113 + .../tests/mozilla/ecma_3/RegExp/15.10.6.2-1.js | 119 + .../tests/mozilla/ecma_3/RegExp/15.10.6.2-2.js | 362 + .../tests/mozilla/ecma_3/RegExp/octal-001.js | 131 + .../tests/mozilla/ecma_3/RegExp/octal-002.js | 213 + .../tests/mozilla/ecma_3/RegExp/perlstress-001.js | 3225 ++ .../tests/mozilla/ecma_3/RegExp/perlstress-002.js | 1837 + .../tests/mozilla/ecma_3/RegExp/regress-100199.js | 286 + .../tests/mozilla/ecma_3/RegExp/regress-103087.js | 155 + .../tests/mozilla/ecma_3/RegExp/regress-105972.js | 136 + .../tests/mozilla/ecma_3/RegExp/regress-119909.js | 86 + .../tests/mozilla/ecma_3/RegExp/regress-122076.js | 103 + .../tests/mozilla/ecma_3/RegExp/regress-123437.js | 107 + .../tests/mozilla/ecma_3/RegExp/regress-165353.js | 117 + .../tests/mozilla/ecma_3/RegExp/regress-169497.js | 100 + .../tests/mozilla/ecma_3/RegExp/regress-169534.js | 90 + .../tests/mozilla/ecma_3/RegExp/regress-187133.js | 137 + .../tests/mozilla/ecma_3/RegExp/regress-188206.js | 282 + .../tests/mozilla/ecma_3/RegExp/regress-191479.js | 193 + .../tests/mozilla/ecma_3/RegExp/regress-202564.js | 96 + .../tests/mozilla/ecma_3/RegExp/regress-209067.js | 1101 + .../tests/mozilla/ecma_3/RegExp/regress-209919.js | 169 + .../tests/mozilla/ecma_3/RegExp/regress-216591.js | 112 + .../mozilla/ecma_3/RegExp/regress-220367-001.js | 99 + .../mozilla/ecma_3/RegExp/regress-220367-002.js | 107 + .../tests/mozilla/ecma_3/RegExp/regress-24712.js | 42 + .../tests/mozilla/ecma_3/RegExp/regress-28686.js | 39 + .../tests/mozilla/ecma_3/RegExp/regress-31316.js | 75 + .../tests/mozilla/ecma_3/RegExp/regress-57572.js | 129 + .../tests/mozilla/ecma_3/RegExp/regress-57631.js | 128 + .../tests/mozilla/ecma_3/RegExp/regress-67773.js | 190 + .../tests/mozilla/ecma_3/RegExp/regress-72964.js | 100 + .../tests/mozilla/ecma_3/RegExp/regress-76683.js | 93 + .../tests/mozilla/ecma_3/RegExp/regress-78156.js | 102 + .../tests/mozilla/ecma_3/RegExp/regress-85721.js | 271 + .../tests/mozilla/ecma_3/RegExp/regress-87231.js | 124 + .../tests/mozilla/ecma_3/RegExp/regress-98306.js | 77 + .../tests/mozilla/ecma_3/RegExp/shell.js | 230 + .../mozilla/ecma_3/Statements/regress-121744.js | 212 + .../mozilla/ecma_3/Statements/regress-131348.js | 179 + .../mozilla/ecma_3/Statements/regress-157509.js | 106 + .../mozilla/ecma_3/Statements/regress-194364.js | 134 + .../mozilla/ecma_3/Statements/regress-74474-001.js | 118 + .../mozilla/ecma_3/Statements/regress-74474-002.js | 9076 +++++ .../mozilla/ecma_3/Statements/regress-74474-003.js | 9078 +++++ .../mozilla/ecma_3/Statements/regress-83532-001.js | 48 + .../mozilla/ecma_3/Statements/regress-83532-002.js | 51 + .../tests/mozilla/ecma_3/Statements/switch-001.js | 122 + .../tests/mozilla/ecma_3/String/regress-104375.js | 95 + .../tests/mozilla/ecma_3/String/regress-189898.js | 152 + .../tests/mozilla/ecma_3/String/regress-83293.js | 193 + .../tests/mozilla/ecma_3/Unicode/uc-001-n.js | 44 + .../tests/mozilla/ecma_3/Unicode/uc-001.js | 38 + .../tests/mozilla/ecma_3/Unicode/uc-002-n.js | 38 + .../tests/mozilla/ecma_3/Unicode/uc-002.js | 42 + .../tests/mozilla/ecma_3/Unicode/uc-003.js | 53 + .../tests/mozilla/ecma_3/Unicode/uc-004.js | 47 + .../tests/mozilla/ecma_3/Unicode/uc-005.js | 271 + .../JavaScriptCore/tests/mozilla/ecma_3/shell.js | 180 + Source/JavaScriptCore/tests/mozilla/expected.html | 461 + .../JavaScriptCore/tests/mozilla/importList.html | 69 + .../JavaScriptCore/tests/mozilla/js1_1/browser.js | 80 + Source/JavaScriptCore/tests/mozilla/js1_1/jsref.js | 170 + .../tests/mozilla/js1_1/regress/function-001.js | 76 + Source/JavaScriptCore/tests/mozilla/js1_1/shell.js | 143 + .../tests/mozilla/js1_2/Array/array_split_1.js | 72 + .../tests/mozilla/js1_2/Array/general1.js | 62 + .../tests/mozilla/js1_2/Array/general2.js | 78 + .../tests/mozilla/js1_2/Array/slice.js | 123 + .../tests/mozilla/js1_2/Array/splice1.js | 152 + .../tests/mozilla/js1_2/Array/splice2.js | 150 + .../tests/mozilla/js1_2/Array/tostring_1.js | 138 + .../tests/mozilla/js1_2/Array/tostring_2.js | 96 + .../tests/mozilla/js1_2/Objects/toString-001.js | 117 + .../tests/mozilla/js1_2/String/charCodeAt.js | 71 + .../tests/mozilla/js1_2/String/concat.js | 96 + .../tests/mozilla/js1_2/String/match.js | 62 + .../tests/mozilla/js1_2/String/slice.js | 123 + .../JavaScriptCore/tests/mozilla/js1_2/browser.js | 83 + .../mozilla/js1_2/function/Function_object.js | 85 + .../tests/mozilla/js1_2/function/Number.js | 98 + .../tests/mozilla/js1_2/function/String.js | 99 + .../tests/mozilla/js1_2/function/definition-1.js | 73 + .../tests/mozilla/js1_2/function/function-001-n.js | 74 + .../tests/mozilla/js1_2/function/length.js | 93 + .../tests/mozilla/js1_2/function/nesting-1.js | 61 + .../tests/mozilla/js1_2/function/nesting.js | 83 + .../tests/mozilla/js1_2/function/regexparg-1.js | 98 + .../tests/mozilla/js1_2/function/regexparg-2-n.js | 66 + .../tests/mozilla/js1_2/function/tostring-1.js | 143 + .../tests/mozilla/js1_2/function/tostring-2.js | 185 + Source/JavaScriptCore/tests/mozilla/js1_2/jsref.js | 215 + .../tests/mozilla/js1_2/operator/equality.js | 72 + .../tests/mozilla/js1_2/operator/strictEquality.js | 92 + .../mozilla/js1_2/regexp/RegExp_dollar_number.js | 108 + .../tests/mozilla/js1_2/regexp/RegExp_input.js | 102 + .../mozilla/js1_2/regexp/RegExp_input_as_array.js | 102 + .../tests/mozilla/js1_2/regexp/RegExp_lastIndex.js | 83 + .../tests/mozilla/js1_2/regexp/RegExp_lastMatch.js | 85 + .../js1_2/regexp/RegExp_lastMatch_as_array.js | 85 + .../tests/mozilla/js1_2/regexp/RegExp_lastParen.js | 100 + .../js1_2/regexp/RegExp_lastParen_as_array.js | 100 + .../mozilla/js1_2/regexp/RegExp_leftContext.js | 90 + .../js1_2/regexp/RegExp_leftContext_as_array.js | 90 + .../tests/mozilla/js1_2/regexp/RegExp_multiline.js | 129 + .../js1_2/regexp/RegExp_multiline_as_array.js | 129 + .../tests/mozilla/js1_2/regexp/RegExp_object.js | 88 + .../mozilla/js1_2/regexp/RegExp_rightContext.js | 90 + .../js1_2/regexp/RegExp_rightContext_as_array.js | 90 + .../tests/mozilla/js1_2/regexp/alphanumeric.js | 129 + .../tests/mozilla/js1_2/regexp/asterisk.js | 105 + .../tests/mozilla/js1_2/regexp/backslash.js | 79 + .../tests/mozilla/js1_2/regexp/backspace.js | 79 + .../tests/mozilla/js1_2/regexp/beginLine.js | 80 + .../tests/mozilla/js1_2/regexp/character_class.js | 107 + .../tests/mozilla/js1_2/regexp/compile.js | 94 + .../mozilla/js1_2/regexp/control_characters.js | 71 + .../tests/mozilla/js1_2/regexp/digit.js | 119 + .../tests/mozilla/js1_2/regexp/dot.js | 95 + .../tests/mozilla/js1_2/regexp/endLine.js | 80 + .../tests/mozilla/js1_2/regexp/everything.js | 80 + .../tests/mozilla/js1_2/regexp/exec.js | 77 + .../tests/mozilla/js1_2/regexp/flags.js | 84 + .../tests/mozilla/js1_2/regexp/global.js | 95 + .../tests/mozilla/js1_2/regexp/hexadecimal.js | 108 + .../tests/mozilla/js1_2/regexp/ignoreCase.js | 111 + .../tests/mozilla/js1_2/regexp/interval.js | 115 + .../tests/mozilla/js1_2/regexp/octal.js | 108 + .../tests/mozilla/js1_2/regexp/parentheses.js | 107 + .../tests/mozilla/js1_2/regexp/plus.js | 87 + .../tests/mozilla/js1_2/regexp/question_mark.js | 99 + .../tests/mozilla/js1_2/regexp/regress-6359.js | 68 + .../tests/mozilla/js1_2/regexp/regress-9141.js | 86 + .../tests/mozilla/js1_2/regexp/simple_form.js | 90 + .../tests/mozilla/js1_2/regexp/source.js | 87 + .../mozilla/js1_2/regexp/special_characters.js | 157 + .../tests/mozilla/js1_2/regexp/string_replace.js | 80 + .../tests/mozilla/js1_2/regexp/string_search.js | 87 + .../tests/mozilla/js1_2/regexp/string_split.js | 91 + .../tests/mozilla/js1_2/regexp/test.js | 87 + .../tests/mozilla/js1_2/regexp/toString.js | 75 + .../tests/mozilla/js1_2/regexp/vertical_bar.js | 95 + .../tests/mozilla/js1_2/regexp/whitespace.js | 122 + .../tests/mozilla/js1_2/regexp/word_boundary.js | 119 + .../tests/mozilla/js1_2/regress/regress-144834.js | 76 + .../tests/mozilla/js1_2/regress/regress-7703.js | 83 + Source/JavaScriptCore/tests/mozilla/js1_2/shell.js | 147 + .../tests/mozilla/js1_2/statements/break.js | 162 + .../tests/mozilla/js1_2/statements/continue.js | 175 + .../tests/mozilla/js1_2/statements/do_while.js | 68 + .../tests/mozilla/js1_2/statements/switch.js | 127 + .../tests/mozilla/js1_2/statements/switch2.js | 188 + .../tests/mozilla/js1_2/version120/boolean-001.js | 73 + .../mozilla/js1_2/version120/regress-99663.js | 172 + .../tests/mozilla/js1_2/version120/shell.js | 24 + .../tests/mozilla/js1_3/Boolean/boolean-001.js | 73 + .../tests/mozilla/js1_3/Script/delete-001.js | 79 + .../tests/mozilla/js1_3/Script/function-001-n.js | 74 + .../tests/mozilla/js1_3/Script/function-002.js | 75 + .../tests/mozilla/js1_3/Script/in-001.js | 52 + .../tests/mozilla/js1_3/Script/new-001.js | 120 + .../tests/mozilla/js1_3/Script/script-001.js | 159 + .../tests/mozilla/js1_3/Script/switch-001.js | 80 + .../tests/mozilla/js1_3/inherit/proto_1.js | 166 + .../tests/mozilla/js1_3/inherit/proto_10.js | 152 + .../tests/mozilla/js1_3/inherit/proto_11.js | 115 + .../tests/mozilla/js1_3/inherit/proto_12.js | 142 + .../tests/mozilla/js1_3/inherit/proto_2.js | 122 + .../tests/mozilla/js1_3/inherit/proto_3.js | 103 + .../tests/mozilla/js1_3/inherit/proto_4.js | 156 + .../tests/mozilla/js1_3/inherit/proto_5.js | 146 + .../tests/mozilla/js1_3/inherit/proto_6.js | 171 + .../tests/mozilla/js1_3/inherit/proto_7.js | 125 + .../tests/mozilla/js1_3/inherit/proto_8.js | 123 + .../tests/mozilla/js1_3/inherit/proto_9.js | 101 + Source/JavaScriptCore/tests/mozilla/js1_3/jsref.js | 198 + .../tests/mozilla/js1_3/regress/delete-001.js | 79 + .../tests/mozilla/js1_3/regress/function-001-n.js | 74 + .../tests/mozilla/js1_3/regress/function-002.js | 75 + .../tests/mozilla/js1_3/regress/in-001.js | 66 + .../tests/mozilla/js1_3/regress/new-001.js | 120 + .../tests/mozilla/js1_3/regress/switch-001.js | 80 + Source/JavaScriptCore/tests/mozilla/js1_3/shell.js | 163 + .../JavaScriptCore/tests/mozilla/js1_3/template.js | 44 + .../tests/mozilla/js1_4/Eval/eval-001.js | 75 + .../tests/mozilla/js1_4/Eval/eval-002.js | 80 + .../tests/mozilla/js1_4/Eval/eval-003.js | 85 + .../tests/mozilla/js1_4/Functions/function-001.js | 106 + .../tests/mozilla/js1_4/Regress/date-001-n.js | 55 + .../tests/mozilla/js1_4/Regress/function-001.js | 79 + .../tests/mozilla/js1_4/Regress/function-002.js | 123 + .../tests/mozilla/js1_4/Regress/function-003.js | 77 + .../tests/mozilla/js1_4/Regress/function-004-n.js | 51 + .../tests/mozilla/js1_4/Regress/regress-7224.js | 72 + .../tests/mozilla/js1_4/Regress/toString-001-n.js | 53 + .../JavaScriptCore/tests/mozilla/js1_4/browser.js | 80 + Source/JavaScriptCore/tests/mozilla/js1_4/jsref.js | 169 + Source/JavaScriptCore/tests/mozilla/js1_4/shell.js | 138 + .../tests/mozilla/js1_5/Array/array-001.js | 101 + .../tests/mozilla/js1_5/Array/regress-101964.js | 98 + .../tests/mozilla/js1_5/Array/regress-107138.js | 190 + .../tests/mozilla/js1_5/Array/regress-108440.js | 103 + .../tests/mozilla/js1_5/Array/regress-154338.js | 119 + .../tests/mozilla/js1_5/Array/regress-157652.js | 136 + .../tests/mozilla/js1_5/Array/regress-178722.js | 175 + .../tests/mozilla/js1_5/Array/regress-94257.js | 99 + .../mozilla/js1_5/Exceptions/catchguard-001-n.js | 57 + .../mozilla/js1_5/Exceptions/catchguard-001.js | 64 + .../mozilla/js1_5/Exceptions/catchguard-002-n.js | 46 + .../mozilla/js1_5/Exceptions/catchguard-002.js | 60 + .../mozilla/js1_5/Exceptions/catchguard-003-n.js | 53 + .../mozilla/js1_5/Exceptions/catchguard-003.js | 69 + .../tests/mozilla/js1_5/Exceptions/errstack-001.js | 274 + .../mozilla/js1_5/Exceptions/regress-121658.js | 152 + .../mozilla/js1_5/Exceptions/regress-123002.js | 129 + .../mozilla/js1_5/Exceptions/regress-50447.js | 146 + .../mozilla/js1_5/Expressions/regress-192288.js | 114 + .../js1_5/Expressions/regress-96526-argsub.js | 120 + .../js1_5/Expressions/regress-96526-delelem.js | 120 + .../js1_5/Expressions/regress-96526-noargsub.js | 120 + .../tests/mozilla/js1_5/Expressions/shell.js | 113 + .../tests/mozilla/js1_5/GetSet/getset-001.js | 72 + .../tests/mozilla/js1_5/GetSet/getset-002.js | 68 + .../tests/mozilla/js1_5/GetSet/getset-003.js | 190 + .../tests/mozilla/js1_5/GetSet/getset-004.js | 190 + .../tests/mozilla/js1_5/GetSet/getset-005.js | 199 + .../tests/mozilla/js1_5/GetSet/getset-006.js | 173 + .../js1_5/LexicalConventions/lexical-001.js | 161 + .../js1_5/LexicalConventions/regress-177314.js | 105 + .../tests/mozilla/js1_5/Object/regress-137000.js | 235 + .../tests/mozilla/js1_5/Object/regress-192105.js | 178 + .../mozilla/js1_5/Object/regress-90596-001.js | 278 + .../mozilla/js1_5/Object/regress-90596-002.js | 278 + .../mozilla/js1_5/Object/regress-90596-003.js | 290 + .../mozilla/js1_5/Object/regress-96284-001.js | 161 + .../mozilla/js1_5/Object/regress-96284-002.js | 161 + .../tests/mozilla/js1_5/Regress/regress-102725.js | 77 + .../tests/mozilla/js1_5/Regress/regress-103602.js | 162 + .../tests/mozilla/js1_5/Regress/regress-104077.js | 635 + .../tests/mozilla/js1_5/Regress/regress-110286.js | 151 + .../tests/mozilla/js1_5/Regress/regress-111557.js | 10960 +++++ .../tests/mozilla/js1_5/Regress/regress-114491.js | 101 + .../tests/mozilla/js1_5/Regress/regress-114493.js | 109 + .../tests/mozilla/js1_5/Regress/regress-118849.js | 181 + .../tests/mozilla/js1_5/Regress/regress-127557.js | 113 + .../mozilla/js1_5/Regress/regress-131510-001.js | 68 + .../tests/mozilla/js1_5/Regress/regress-140974.js | 135 + .../tests/mozilla/js1_5/Regress/regress-146596.js | 154 + .../tests/mozilla/js1_5/Regress/regress-152646.js | 121 + .../tests/mozilla/js1_5/Regress/regress-156354.js | 126 + .../tests/mozilla/js1_5/Regress/regress-159334.js | 124 + .../tests/mozilla/js1_5/Regress/regress-168347.js | 215 + .../tests/mozilla/js1_5/Regress/regress-170193.js | 106 + .../tests/mozilla/js1_5/Regress/regress-172699.js | 94 + .../tests/mozilla/js1_5/Regress/regress-179524.js | 363 + .../tests/mozilla/js1_5/Regress/regress-185165.js | 96 + .../tests/mozilla/js1_5/Regress/regress-191633.js | 102 + .../tests/mozilla/js1_5/Regress/regress-191668.js | 99 + .../tests/mozilla/js1_5/Regress/regress-192414.js | 117 + .../tests/mozilla/js1_5/Regress/regress-192465.js | 152 + .../tests/mozilla/js1_5/Regress/regress-193418.js | 99 + .../tests/mozilla/js1_5/Regress/regress-203402.js | 90 + .../tests/mozilla/js1_5/Regress/regress-203841.js | 159 + .../tests/mozilla/js1_5/Regress/regress-204210.js | 143 + .../tests/mozilla/js1_5/Regress/regress-210682.js | 96 + .../tests/mozilla/js1_5/Regress/regress-216320.js | 1033 + .../tests/mozilla/js1_5/Regress/regress-31255.js | 108 + .../tests/mozilla/js1_5/Regress/regress-39309.js | 105 + .../tests/mozilla/js1_5/Regress/regress-44009.js | 63 + .../tests/mozilla/js1_5/Regress/regress-57043.js | 88 + .../mozilla/js1_5/Regress/regress-68498-001.js | 56 + .../mozilla/js1_5/Regress/regress-68498-002.js | 80 + .../mozilla/js1_5/Regress/regress-68498-003.js | 84 + .../mozilla/js1_5/Regress/regress-68498-004.js | 112 + .../tests/mozilla/js1_5/Regress/regress-69607.js | 53 + .../tests/mozilla/js1_5/Regress/regress-71107.js | 60 + .../tests/mozilla/js1_5/Regress/regress-76054.js | 139 + .../tests/mozilla/js1_5/Regress/regress-80981.js | 3137 ++ .../tests/mozilla/js1_5/Regress/regress-82306.js | 59 + .../tests/mozilla/js1_5/Regress/regress-89443.js | 2130 + .../tests/mozilla/js1_5/Regress/regress-89474.js | 62 + .../tests/mozilla/js1_5/Regress/regress-90445.js | 306 + .../tests/mozilla/js1_5/Regress/regress-96128-n.js | 64 + .../mozilla/js1_5/Regress/regress-96526-001.js | 530 + .../mozilla/js1_5/Regress/regress-96526-002.js | 56 + .../mozilla/js1_5/Regress/regress-96526-003.js | 4431 ++ .../tests/mozilla/js1_5/Scope/regress-154693.js | 96 + .../tests/mozilla/js1_5/Scope/regress-181834.js | 178 + .../tests/mozilla/js1_5/Scope/regress-184107.js | 124 + .../tests/mozilla/js1_5/Scope/regress-185485.js | 158 + .../tests/mozilla/js1_5/Scope/regress-191276.js | 123 + .../tests/mozilla/js1_5/Scope/regress-192226.js | 120 + .../mozilla/js1_5/Scope/regress-202678-001.js | 131 + .../mozilla/js1_5/Scope/regress-202678-002.js | 132 + .../mozilla/js1_5/Scope/regress-208496-001.js | 169 + .../mozilla/js1_5/Scope/regress-208496-002.js | 161 + .../tests/mozilla/js1_5/Scope/regress-220362.js | 111 + .../tests/mozilla/js1_5/Scope/regress-220584.js | 132 + .../tests/mozilla/js1_5/Scope/regress-77578-001.js | 154 + .../tests/mozilla/js1_5/Scope/scope-001.js | 110 + .../tests/mozilla/js1_5/Scope/scope-002.js | 121 + .../tests/mozilla/js1_5/Scope/scope-003.js | 122 + .../tests/mozilla/js1_5/Scope/scope-004.js | 204 + .../tests/mozilla/js1_5/String/regress-107771.js | 104 + .../tests/mozilla/js1_5/String/regress-179068.js | 154 + Source/JavaScriptCore/tests/mozilla/js1_5/shell.js | 180 + .../tests/mozilla/js1_6/Array/browser.js | 1 + .../tests/mozilla/js1_6/Array/regress-290592.js | 693 + .../tests/mozilla/js1_6/Array/regress-304828.js | 270 + .../tests/mozilla/js1_6/Array/regress-305002.js | 56 + .../tests/mozilla/js1_6/Array/regress-310425-01.js | 58 + .../tests/mozilla/js1_6/Array/regress-310425-02.js | 48 + .../tests/mozilla/js1_6/Array/regress-320887.js | 55 + .../tests/mozilla/js1_6/Array/shell.js | 1 + Source/JavaScriptCore/tests/mozilla/js1_6/README | 1 + .../tests/mozilla/js1_6/Regress/browser.js | 1 + .../tests/mozilla/js1_6/Regress/regress-301574.js | 67 + .../tests/mozilla/js1_6/Regress/regress-309242.js | 75 + .../mozilla/js1_6/Regress/regress-311157-01.js | 55 + .../mozilla/js1_6/Regress/regress-311157-02.js | 55 + .../tests/mozilla/js1_6/Regress/regress-314887.js | 51 + .../tests/mozilla/js1_6/Regress/regress-320172.js | 56 + .../tests/mozilla/js1_6/Regress/shell.js | 1 + .../tests/mozilla/js1_6/String/browser.js | 1 + .../tests/mozilla/js1_6/String/regress-306591.js | 95 + .../tests/mozilla/js1_6/String/shell.js | 1 + .../JavaScriptCore/tests/mozilla/js1_6/browser.js | 147 + Source/JavaScriptCore/tests/mozilla/js1_6/shell.js | 477 + .../JavaScriptCore/tests/mozilla/js1_6/template.js | 57 + Source/JavaScriptCore/tests/mozilla/jsDriver.pl | 1335 + Source/JavaScriptCore/tests/mozilla/menufoot.html | 8 + Source/JavaScriptCore/tests/mozilla/menuhead.html | 138 + Source/JavaScriptCore/tests/mozilla/mkhtml.pl | 84 + Source/JavaScriptCore/tests/mozilla/mklistpage.pl | 261 + Source/JavaScriptCore/tests/mozilla/runtests.pl | 495 + Source/JavaScriptCore/tests/mozilla/template.js | 55 + .../tests/perf/bench-allocate-nonretained.js | 6 + .../tests/perf/bench-allocate-retained.js | 10 + Source/JavaScriptCore/wscript | 84 + Source/JavaScriptCore/wtf/ASCIICType.h | 179 + Source/JavaScriptCore/wtf/AVLTree.h | 960 + Source/JavaScriptCore/wtf/AlwaysInline.h | 75 + Source/JavaScriptCore/wtf/Assertions.cpp | 249 + Source/JavaScriptCore/wtf/Assertions.h | 336 + Source/JavaScriptCore/wtf/Atomics.h | 117 + Source/JavaScriptCore/wtf/Bitmap.h | 131 + Source/JavaScriptCore/wtf/BumpPointerAllocator.h | 250 + Source/JavaScriptCore/wtf/ByteArray.cpp | 39 + Source/JavaScriptCore/wtf/ByteArray.h | 104 + Source/JavaScriptCore/wtf/CMakeLists.txt | 154 + Source/JavaScriptCore/wtf/CMakeListsEfl.txt | 46 + Source/JavaScriptCore/wtf/CMakeListsWinCE.txt | 27 + .../JavaScriptCore/wtf/CONTRIBUTORS.pthreads-win32 | 137 + Source/JavaScriptCore/wtf/Complex.h | 49 + Source/JavaScriptCore/wtf/CrossThreadRefCounted.h | 174 + Source/JavaScriptCore/wtf/CurrentTime.cpp | 297 + Source/JavaScriptCore/wtf/CurrentTime.h | 68 + Source/JavaScriptCore/wtf/DateMath.cpp | 1154 + Source/JavaScriptCore/wtf/DateMath.h | 231 + Source/JavaScriptCore/wtf/DecimalNumber.cpp | 199 + Source/JavaScriptCore/wtf/DecimalNumber.h | 108 + Source/JavaScriptCore/wtf/Decoder.h | 57 + Source/JavaScriptCore/wtf/Deque.h | 678 + Source/JavaScriptCore/wtf/DisallowCType.h | 74 + Source/JavaScriptCore/wtf/Encoder.h | 57 + Source/JavaScriptCore/wtf/FastAllocBase.h | 416 + Source/JavaScriptCore/wtf/FastMalloc.cpp | 4523 +++ Source/JavaScriptCore/wtf/FastMalloc.h | 241 + Source/JavaScriptCore/wtf/FixedArray.h | 58 + Source/JavaScriptCore/wtf/Forward.h | 64 + Source/JavaScriptCore/wtf/GetPtr.h | 33 + Source/JavaScriptCore/wtf/HashCountedSet.h | 228 + Source/JavaScriptCore/wtf/HashFunctions.h | 183 + Source/JavaScriptCore/wtf/HashIterators.h | 216 + Source/JavaScriptCore/wtf/HashMap.h | 410 + Source/JavaScriptCore/wtf/HashSet.h | 259 + Source/JavaScriptCore/wtf/HashTable.cpp | 69 + Source/JavaScriptCore/wtf/HashTable.h | 1179 + Source/JavaScriptCore/wtf/HashTraits.h | 115 + Source/JavaScriptCore/wtf/ListHashSet.h | 617 + Source/JavaScriptCore/wtf/ListRefPtr.h | 70 + Source/JavaScriptCore/wtf/Locker.h | 47 + Source/JavaScriptCore/wtf/MD5.cpp | 308 + Source/JavaScriptCore/wtf/MD5.h | 61 + Source/JavaScriptCore/wtf/MainThread.cpp | 239 + Source/JavaScriptCore/wtf/MainThread.h | 71 + Source/JavaScriptCore/wtf/MallocZoneSupport.h | 65 + Source/JavaScriptCore/wtf/MathExtras.h | 215 + Source/JavaScriptCore/wtf/MessageQueue.h | 218 + Source/JavaScriptCore/wtf/NonCopyingSort.h | 89 + Source/JavaScriptCore/wtf/Noncopyable.h | 63 + Source/JavaScriptCore/wtf/NotFound.h | 37 + Source/JavaScriptCore/wtf/NullPtr.cpp | 35 + Source/JavaScriptCore/wtf/NullPtr.h | 52 + Source/JavaScriptCore/wtf/OSAllocator.h | 100 + Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp | 121 + Source/JavaScriptCore/wtf/OSAllocatorSymbian.cpp | 56 + Source/JavaScriptCore/wtf/OSAllocatorWin.cpp | 80 + Source/JavaScriptCore/wtf/OwnArrayPtr.h | 179 + Source/JavaScriptCore/wtf/OwnArrayPtrCommon.h | 40 + Source/JavaScriptCore/wtf/OwnFastMallocPtr.h | 52 + Source/JavaScriptCore/wtf/OwnPtr.h | 178 + Source/JavaScriptCore/wtf/OwnPtrCommon.h | 84 + Source/JavaScriptCore/wtf/PageAllocation.h | 122 + .../JavaScriptCore/wtf/PageAllocationAligned.cpp | 87 + Source/JavaScriptCore/wtf/PageAllocationAligned.h | 70 + Source/JavaScriptCore/wtf/PageBlock.cpp | 84 + Source/JavaScriptCore/wtf/PageBlock.h | 83 + Source/JavaScriptCore/wtf/PageReservation.h | 141 + Source/JavaScriptCore/wtf/PassOwnArrayPtr.h | 219 + Source/JavaScriptCore/wtf/PassOwnPtr.h | 218 + Source/JavaScriptCore/wtf/PassRefPtr.h | 313 + Source/JavaScriptCore/wtf/Platform.h | 1149 + Source/JavaScriptCore/wtf/PossiblyNull.h | 59 + Source/JavaScriptCore/wtf/RandomNumber.cpp | 123 + Source/JavaScriptCore/wtf/RandomNumber.h | 39 + Source/JavaScriptCore/wtf/RandomNumberSeed.h | 81 + Source/JavaScriptCore/wtf/RefCounted.h | 169 + .../JavaScriptCore/wtf/RefCountedLeakCounter.cpp | 100 + Source/JavaScriptCore/wtf/RefCountedLeakCounter.h | 48 + Source/JavaScriptCore/wtf/RefPtr.h | 231 + Source/JavaScriptCore/wtf/RefPtrHashMap.h | 336 + Source/JavaScriptCore/wtf/RetainPtr.h | 257 + Source/JavaScriptCore/wtf/SegmentedVector.h | 255 + Source/JavaScriptCore/wtf/SizeLimits.cpp | 57 + Source/JavaScriptCore/wtf/StackBounds.cpp | 283 + Source/JavaScriptCore/wtf/StackBounds.h | 114 + Source/JavaScriptCore/wtf/StaticConstructors.h | 80 + Source/JavaScriptCore/wtf/StdLibExtras.h | 119 + Source/JavaScriptCore/wtf/StringExtras.cpp | 62 + Source/JavaScriptCore/wtf/StringExtras.h | 127 + Source/JavaScriptCore/wtf/StringHasher.h | 170 + Source/JavaScriptCore/wtf/TCPackedCache.h | 234 + Source/JavaScriptCore/wtf/TCPageMap.h | 316 + Source/JavaScriptCore/wtf/TCSpinLock.h | 284 + Source/JavaScriptCore/wtf/TCSystemAlloc.cpp | 521 + Source/JavaScriptCore/wtf/TCSystemAlloc.h | 75 + .../JavaScriptCore/wtf/ThreadFunctionInvocation.h | 49 + .../wtf/ThreadIdentifierDataPthreads.cpp | 97 + .../wtf/ThreadIdentifierDataPthreads.h | 77 + Source/JavaScriptCore/wtf/ThreadSafeShared.h | 148 + Source/JavaScriptCore/wtf/ThreadSpecific.h | 329 + Source/JavaScriptCore/wtf/ThreadSpecificWin.cpp | 54 + Source/JavaScriptCore/wtf/Threading.cpp | 98 + Source/JavaScriptCore/wtf/Threading.h | 118 + Source/JavaScriptCore/wtf/ThreadingNone.cpp | 63 + Source/JavaScriptCore/wtf/ThreadingPrimitives.h | 155 + Source/JavaScriptCore/wtf/ThreadingPthreads.cpp | 388 + Source/JavaScriptCore/wtf/ThreadingWin.cpp | 487 + Source/JavaScriptCore/wtf/TypeTraits.cpp | 142 + Source/JavaScriptCore/wtf/TypeTraits.h | 386 + Source/JavaScriptCore/wtf/UnusedParam.h | 37 + Source/JavaScriptCore/wtf/VMTags.h | 90 + Source/JavaScriptCore/wtf/ValueCheck.h | 53 + Source/JavaScriptCore/wtf/Vector.h | 1157 + Source/JavaScriptCore/wtf/VectorTraits.h | 103 + Source/JavaScriptCore/wtf/WTFThreadData.cpp | 58 + Source/JavaScriptCore/wtf/WTFThreadData.h | 168 + .../JavaScriptCore/wtf/android/AndroidThreading.h | 39 + .../wtf/android/MainThreadAndroid.cpp | 42 + Source/JavaScriptCore/wtf/brew/MainThreadBrew.cpp | 45 + Source/JavaScriptCore/wtf/brew/OwnPtrBrew.cpp | 81 + Source/JavaScriptCore/wtf/brew/RefPtrBrew.h | 59 + Source/JavaScriptCore/wtf/brew/ShellBrew.h | 70 + Source/JavaScriptCore/wtf/brew/StringBrew.cpp | 43 + Source/JavaScriptCore/wtf/brew/SystemMallocBrew.h | 65 + .../wtf/chromium/ChromiumThreading.h | 44 + .../wtf/chromium/MainThreadChromium.cpp | 73 + Source/JavaScriptCore/wtf/dtoa.cpp | 1831 + Source/JavaScriptCore/wtf/dtoa.h | 51 + Source/JavaScriptCore/wtf/efl/MainThreadEfl.cpp | 57 + Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp | 71 + Source/JavaScriptCore/wtf/gobject/GOwnPtr.h | 143 + Source/JavaScriptCore/wtf/gobject/GRefPtr.cpp | 86 + Source/JavaScriptCore/wtf/gobject/GRefPtr.h | 229 + Source/JavaScriptCore/wtf/gobject/GTypedefs.h | 98 + Source/JavaScriptCore/wtf/gtk/MainThreadGtk.cpp | 52 + Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp | 248 + .../JavaScriptCore/wtf/haiku/MainThreadHaiku.cpp | 48 + Source/JavaScriptCore/wtf/haiku/StringHaiku.cpp | 51 + Source/JavaScriptCore/wtf/mac/MainThreadMac.mm | 144 + Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp | 77 + Source/JavaScriptCore/wtf/qt/StringQt.cpp | 73 + Source/JavaScriptCore/wtf/qt/ThreadingQt.cpp | 288 + Source/JavaScriptCore/wtf/text/AtomicString.cpp | 389 + Source/JavaScriptCore/wtf/text/AtomicString.h | 185 + Source/JavaScriptCore/wtf/text/AtomicStringHash.h | 62 + Source/JavaScriptCore/wtf/text/AtomicStringImpl.h | 38 + Source/JavaScriptCore/wtf/text/CString.cpp | 104 + Source/JavaScriptCore/wtf/text/CString.h | 87 + Source/JavaScriptCore/wtf/text/StringBuffer.h | 86 + Source/JavaScriptCore/wtf/text/StringBuilder.cpp | 172 + Source/JavaScriptCore/wtf/text/StringBuilder.h | 139 + Source/JavaScriptCore/wtf/text/StringConcatenate.h | 493 + Source/JavaScriptCore/wtf/text/StringHash.h | 194 + Source/JavaScriptCore/wtf/text/StringImpl.cpp | 1073 + Source/JavaScriptCore/wtf/text/StringImpl.h | 408 + Source/JavaScriptCore/wtf/text/StringImplBase.h | 103 + Source/JavaScriptCore/wtf/text/StringStatics.cpp | 80 + Source/JavaScriptCore/wtf/text/TextPosition.h | 150 + Source/JavaScriptCore/wtf/text/WTFString.cpp | 1003 + Source/JavaScriptCore/wtf/text/WTFString.h | 502 + Source/JavaScriptCore/wtf/unicode/Collator.h | 67 + .../JavaScriptCore/wtf/unicode/CollatorDefault.cpp | 75 + Source/JavaScriptCore/wtf/unicode/UTF8.cpp | 401 + Source/JavaScriptCore/wtf/unicode/UTF8.h | 80 + Source/JavaScriptCore/wtf/unicode/Unicode.h | 44 + .../wtf/unicode/UnicodeMacrosFromICU.h | 100 + .../wtf/unicode/brew/UnicodeBrew.cpp | 181 + .../JavaScriptCore/wtf/unicode/brew/UnicodeBrew.h | 194 + .../wtf/unicode/glib/UnicodeGLib.cpp | 192 + .../JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h | 243 + .../JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp | 149 + Source/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h | 235 + Source/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h | 375 + .../wtf/unicode/wince/UnicodeWinCE.cpp | 181 + .../wtf/unicode/wince/UnicodeWinCE.h | 177 + Source/JavaScriptCore/wtf/url/api/ParsedURL.cpp | 90 + Source/JavaScriptCore/wtf/url/api/ParsedURL.h | 62 + Source/JavaScriptCore/wtf/url/api/URLString.h | 55 + Source/JavaScriptCore/wtf/url/src/RawURLBuffer.h | 71 + Source/JavaScriptCore/wtf/url/src/URLBuffer.h | 136 + .../wtf/url/src/URLCharacterTypes.cpp | 173 + .../JavaScriptCore/wtf/url/src/URLCharacterTypes.h | 61 + Source/JavaScriptCore/wtf/url/src/URLComponent.h | 77 + Source/JavaScriptCore/wtf/url/src/URLEscape.cpp | 39 + Source/JavaScriptCore/wtf/url/src/URLEscape.h | 49 + Source/JavaScriptCore/wtf/url/src/URLParser.h | 575 + .../wtf/url/src/URLQueryCanonicalizer.h | 107 + Source/JavaScriptCore/wtf/url/src/URLSegments.cpp | 110 + Source/JavaScriptCore/wtf/url/src/URLSegments.h | 105 + Source/JavaScriptCore/wtf/url/wtfurl.gyp | 58 + Source/JavaScriptCore/wtf/win/MainThreadWin.cpp | 90 + Source/JavaScriptCore/wtf/win/OwnPtrWin.cpp | 76 + Source/JavaScriptCore/wtf/wince/FastMallocWinCE.h | 175 + Source/JavaScriptCore/wtf/wince/MemoryManager.cpp | 171 + Source/JavaScriptCore/wtf/wince/MemoryManager.h | 80 + Source/JavaScriptCore/wtf/wince/mt19937ar.c | 170 + Source/JavaScriptCore/wtf/wtf.pri | 51 + Source/JavaScriptCore/wtf/wx/MainThreadWx.cpp | 66 + Source/JavaScriptCore/wtf/wx/StringWx.cpp | 75 + Source/JavaScriptCore/yarr/RegexInterpreter.cpp | 1891 + Source/JavaScriptCore/yarr/RegexInterpreter.h | 381 + Source/JavaScriptCore/yarr/RegexJIT.cpp | 2213 + Source/JavaScriptCore/yarr/RegexJIT.h | 90 + Source/JavaScriptCore/yarr/RegexParser.h | 887 + Source/JavaScriptCore/yarr/RegexPattern.cpp | 991 + Source/JavaScriptCore/yarr/RegexPattern.h | 424 + 1928 files changed, 535558 insertions(+) create mode 100644 Source/JavaScriptCore/API/APICast.h create mode 100644 Source/JavaScriptCore/API/APIShims.h create mode 100644 Source/JavaScriptCore/API/JSBase.cpp create mode 100644 Source/JavaScriptCore/API/JSBase.h create mode 100644 Source/JavaScriptCore/API/JSBasePrivate.h create mode 100644 Source/JavaScriptCore/API/JSCallbackConstructor.cpp create mode 100644 Source/JavaScriptCore/API/JSCallbackConstructor.h create mode 100644 Source/JavaScriptCore/API/JSCallbackFunction.cpp create mode 100644 Source/JavaScriptCore/API/JSCallbackFunction.h create mode 100644 Source/JavaScriptCore/API/JSCallbackObject.cpp create mode 100644 Source/JavaScriptCore/API/JSCallbackObject.h create mode 100644 Source/JavaScriptCore/API/JSCallbackObjectFunctions.h create mode 100644 Source/JavaScriptCore/API/JSClassRef.cpp create mode 100644 Source/JavaScriptCore/API/JSClassRef.h create mode 100644 Source/JavaScriptCore/API/JSContextRef.cpp create mode 100644 Source/JavaScriptCore/API/JSContextRef.h create mode 100644 Source/JavaScriptCore/API/JSContextRefPrivate.h create mode 100644 Source/JavaScriptCore/API/JSObjectRef.cpp create mode 100644 Source/JavaScriptCore/API/JSObjectRef.h create mode 100644 Source/JavaScriptCore/API/JSObjectRefPrivate.h create mode 100644 Source/JavaScriptCore/API/JSProfilerPrivate.cpp create mode 100644 Source/JavaScriptCore/API/JSProfilerPrivate.h create mode 100644 Source/JavaScriptCore/API/JSRetainPtr.h create mode 100644 Source/JavaScriptCore/API/JSStringRef.cpp create mode 100644 Source/JavaScriptCore/API/JSStringRef.h create mode 100644 Source/JavaScriptCore/API/JSStringRefBSTR.cpp create mode 100644 Source/JavaScriptCore/API/JSStringRefBSTR.h create mode 100644 Source/JavaScriptCore/API/JSStringRefCF.cpp create mode 100644 Source/JavaScriptCore/API/JSStringRefCF.h create mode 100644 Source/JavaScriptCore/API/JSValueRef.cpp create mode 100644 Source/JavaScriptCore/API/JSValueRef.h create mode 100644 Source/JavaScriptCore/API/JSWeakObjectMapRefInternal.h create mode 100644 Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp create mode 100644 Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h create mode 100644 Source/JavaScriptCore/API/JavaScript.h create mode 100644 Source/JavaScriptCore/API/JavaScriptCore.h create mode 100644 Source/JavaScriptCore/API/OpaqueJSString.cpp create mode 100644 Source/JavaScriptCore/API/OpaqueJSString.h create mode 100644 Source/JavaScriptCore/API/WebKitAvailability.h create mode 100644 Source/JavaScriptCore/API/tests/JSNode.c create mode 100644 Source/JavaScriptCore/API/tests/JSNode.h create mode 100644 Source/JavaScriptCore/API/tests/JSNodeList.c create mode 100644 Source/JavaScriptCore/API/tests/JSNodeList.h create mode 100644 Source/JavaScriptCore/API/tests/Node.c create mode 100644 Source/JavaScriptCore/API/tests/Node.h create mode 100644 Source/JavaScriptCore/API/tests/NodeList.c create mode 100644 Source/JavaScriptCore/API/tests/NodeList.h create mode 100644 Source/JavaScriptCore/API/tests/minidom.c create mode 100644 Source/JavaScriptCore/API/tests/minidom.html create mode 100644 Source/JavaScriptCore/API/tests/minidom.js create mode 100644 Source/JavaScriptCore/API/tests/testapi.c create mode 100644 Source/JavaScriptCore/API/tests/testapi.js create mode 100644 Source/JavaScriptCore/AUTHORS create mode 100644 Source/JavaScriptCore/AllInOneFile.cpp create mode 100644 Source/JavaScriptCore/Android.mk create mode 100644 Source/JavaScriptCore/Android.v8.wtf.mk create mode 100644 Source/JavaScriptCore/CMakeLists.txt create mode 100644 Source/JavaScriptCore/CMakeListsEfl.txt create mode 100644 Source/JavaScriptCore/CMakeListsWinCE.txt create mode 100644 Source/JavaScriptCore/COPYING.LIB create mode 100644 Source/JavaScriptCore/ChangeLog create mode 100644 Source/JavaScriptCore/ChangeLog-2002-12-03 create mode 100644 Source/JavaScriptCore/ChangeLog-2003-10-25 create mode 100644 Source/JavaScriptCore/ChangeLog-2007-10-14 create mode 100644 Source/JavaScriptCore/ChangeLog-2008-08-10 create mode 100644 Source/JavaScriptCore/ChangeLog-2009-06-16 create mode 100644 Source/JavaScriptCore/ChangeLog-2010-05-24 create mode 100644 Source/JavaScriptCore/Configurations/Base.xcconfig create mode 100644 Source/JavaScriptCore/Configurations/DebugRelease.xcconfig create mode 100644 Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig create mode 100644 Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig create mode 100644 Source/JavaScriptCore/Configurations/Version.xcconfig create mode 100644 Source/JavaScriptCore/DerivedSources.make create mode 100644 Source/JavaScriptCore/DerivedSources.pro create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/APICast.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSBase.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSContextRef.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSObjectRef.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSRetainPtr.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRef.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JSValueRef.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScript.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/OpaqueJSString.h create mode 100644 Source/JavaScriptCore/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h create mode 100644 Source/JavaScriptCore/GNUmakefile.am create mode 100644 Source/JavaScriptCore/Info.plist create mode 100644 Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp create mode 100644 Source/JavaScriptCore/JavaScriptCore.JSVALUE32only.exp create mode 100644 Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp create mode 100644 Source/JavaScriptCore/JavaScriptCore.exp create mode 100644 Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp create mode 100644 Source/JavaScriptCore/JavaScriptCore.gypi create mode 100644 Source/JavaScriptCore/JavaScriptCore.order create mode 100644 Source/JavaScriptCore/JavaScriptCore.pri create mode 100644 Source/JavaScriptCore/JavaScriptCore.pro create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.make create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd create mode 100755 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscPreLink.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiPreLink.cmd create mode 100644 Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj create mode 100644 Source/JavaScriptCore/JavaScriptCorePrefix.h create mode 100644 Source/JavaScriptCore/Makefile create mode 100644 Source/JavaScriptCore/THANKS create mode 100644 Source/JavaScriptCore/assembler/ARMAssembler.cpp create mode 100644 Source/JavaScriptCore/assembler/ARMAssembler.h create mode 100644 Source/JavaScriptCore/assembler/ARMv7Assembler.cpp create mode 100644 Source/JavaScriptCore/assembler/ARMv7Assembler.h create mode 100644 Source/JavaScriptCore/assembler/AbstractMacroAssembler.h create mode 100644 Source/JavaScriptCore/assembler/AssemblerBuffer.h create mode 100644 Source/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h create mode 100644 Source/JavaScriptCore/assembler/CodeLocation.h create mode 100644 Source/JavaScriptCore/assembler/LinkBuffer.h create mode 100644 Source/JavaScriptCore/assembler/MIPSAssembler.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssembler.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerARM.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerX86.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h create mode 100644 Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h create mode 100644 Source/JavaScriptCore/assembler/RepatchBuffer.h create mode 100644 Source/JavaScriptCore/assembler/X86Assembler.h create mode 100644 Source/JavaScriptCore/bytecode/CodeBlock.cpp create mode 100644 Source/JavaScriptCore/bytecode/CodeBlock.h create mode 100644 Source/JavaScriptCore/bytecode/EvalCodeCache.h create mode 100644 Source/JavaScriptCore/bytecode/Instruction.h create mode 100644 Source/JavaScriptCore/bytecode/JumpTable.cpp create mode 100644 Source/JavaScriptCore/bytecode/JumpTable.h create mode 100644 Source/JavaScriptCore/bytecode/Opcode.cpp create mode 100644 Source/JavaScriptCore/bytecode/Opcode.h create mode 100644 Source/JavaScriptCore/bytecode/SamplingTool.cpp create mode 100644 Source/JavaScriptCore/bytecode/SamplingTool.h create mode 100644 Source/JavaScriptCore/bytecode/StructureStubInfo.cpp create mode 100644 Source/JavaScriptCore/bytecode/StructureStubInfo.h create mode 100644 Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp create mode 100644 Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h create mode 100644 Source/JavaScriptCore/bytecompiler/Label.h create mode 100644 Source/JavaScriptCore/bytecompiler/LabelScope.h create mode 100644 Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp create mode 100644 Source/JavaScriptCore/bytecompiler/RegisterID.h create mode 100644 Source/JavaScriptCore/config.h create mode 100755 Source/JavaScriptCore/create_hash_table create mode 100644 Source/JavaScriptCore/create_jit_stubs create mode 100644 Source/JavaScriptCore/create_regex_tables create mode 100644 Source/JavaScriptCore/debugger/Debugger.cpp create mode 100644 Source/JavaScriptCore/debugger/Debugger.h create mode 100644 Source/JavaScriptCore/debugger/DebuggerActivation.cpp create mode 100644 Source/JavaScriptCore/debugger/DebuggerActivation.h create mode 100644 Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp create mode 100644 Source/JavaScriptCore/debugger/DebuggerCallFrame.h create mode 100755 Source/JavaScriptCore/docs/make-bytecode-docs.pl create mode 100644 Source/JavaScriptCore/headers.pri create mode 100644 Source/JavaScriptCore/icu/LICENSE create mode 100644 Source/JavaScriptCore/icu/README create mode 100644 Source/JavaScriptCore/icu/unicode/parseerr.h create mode 100644 Source/JavaScriptCore/icu/unicode/platform.h create mode 100644 Source/JavaScriptCore/icu/unicode/putil.h create mode 100644 Source/JavaScriptCore/icu/unicode/uchar.h create mode 100644 Source/JavaScriptCore/icu/unicode/ucnv.h create mode 100644 Source/JavaScriptCore/icu/unicode/ucnv_err.h create mode 100644 Source/JavaScriptCore/icu/unicode/ucol.h create mode 100644 Source/JavaScriptCore/icu/unicode/uconfig.h create mode 100644 Source/JavaScriptCore/icu/unicode/uenum.h create mode 100644 Source/JavaScriptCore/icu/unicode/uiter.h create mode 100644 Source/JavaScriptCore/icu/unicode/uloc.h create mode 100644 Source/JavaScriptCore/icu/unicode/umachine.h create mode 100644 Source/JavaScriptCore/icu/unicode/unorm.h create mode 100644 Source/JavaScriptCore/icu/unicode/urename.h create mode 100644 Source/JavaScriptCore/icu/unicode/uset.h create mode 100644 Source/JavaScriptCore/icu/unicode/ustring.h create mode 100644 Source/JavaScriptCore/icu/unicode/utf.h create mode 100644 Source/JavaScriptCore/icu/unicode/utf16.h create mode 100644 Source/JavaScriptCore/icu/unicode/utf8.h create mode 100644 Source/JavaScriptCore/icu/unicode/utf_old.h create mode 100644 Source/JavaScriptCore/icu/unicode/utypes.h create mode 100644 Source/JavaScriptCore/icu/unicode/uversion.h create mode 100644 Source/JavaScriptCore/interpreter/CachedCall.h create mode 100644 Source/JavaScriptCore/interpreter/CallFrame.cpp create mode 100644 Source/JavaScriptCore/interpreter/CallFrame.h create mode 100644 Source/JavaScriptCore/interpreter/CallFrameClosure.h create mode 100644 Source/JavaScriptCore/interpreter/Interpreter.cpp create mode 100644 Source/JavaScriptCore/interpreter/Interpreter.h create mode 100644 Source/JavaScriptCore/interpreter/Register.h create mode 100644 Source/JavaScriptCore/interpreter/RegisterFile.cpp create mode 100644 Source/JavaScriptCore/interpreter/RegisterFile.h create mode 100644 Source/JavaScriptCore/jit/ExecutableAllocator.cpp create mode 100644 Source/JavaScriptCore/jit/ExecutableAllocator.h create mode 100644 Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp create mode 100644 Source/JavaScriptCore/jit/JIT.cpp create mode 100644 Source/JavaScriptCore/jit/JIT.h create mode 100644 Source/JavaScriptCore/jit/JITArithmetic.cpp create mode 100644 Source/JavaScriptCore/jit/JITArithmetic32_64.cpp create mode 100644 Source/JavaScriptCore/jit/JITCall.cpp create mode 100644 Source/JavaScriptCore/jit/JITCall32_64.cpp create mode 100644 Source/JavaScriptCore/jit/JITCode.h create mode 100644 Source/JavaScriptCore/jit/JITInlineMethods.h create mode 100644 Source/JavaScriptCore/jit/JITOpcodes.cpp create mode 100644 Source/JavaScriptCore/jit/JITOpcodes32_64.cpp create mode 100644 Source/JavaScriptCore/jit/JITPropertyAccess.cpp create mode 100644 Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp create mode 100644 Source/JavaScriptCore/jit/JITStubCall.h create mode 100644 Source/JavaScriptCore/jit/JITStubs.cpp create mode 100644 Source/JavaScriptCore/jit/JITStubs.h create mode 100644 Source/JavaScriptCore/jit/JSInterfaceJIT.h create mode 100644 Source/JavaScriptCore/jit/SpecializedThunkJIT.h create mode 100644 Source/JavaScriptCore/jit/ThunkGenerators.cpp create mode 100644 Source/JavaScriptCore/jit/ThunkGenerators.h create mode 100644 Source/JavaScriptCore/jsc.cpp create mode 100644 Source/JavaScriptCore/jsc.pro create mode 100755 Source/JavaScriptCore/make-generated-sources.sh create mode 100644 Source/JavaScriptCore/os-win32/WinMain.cpp create mode 100644 Source/JavaScriptCore/os-win32/inttypes.h create mode 100644 Source/JavaScriptCore/os-win32/stdbool.h create mode 100644 Source/JavaScriptCore/os-win32/stdint.h create mode 100644 Source/JavaScriptCore/parser/ASTBuilder.h create mode 100644 Source/JavaScriptCore/parser/JSParser.cpp create mode 100644 Source/JavaScriptCore/parser/JSParser.h create mode 100644 Source/JavaScriptCore/parser/Keywords.table create mode 100644 Source/JavaScriptCore/parser/Lexer.cpp create mode 100644 Source/JavaScriptCore/parser/Lexer.h create mode 100644 Source/JavaScriptCore/parser/NodeConstructors.h create mode 100644 Source/JavaScriptCore/parser/NodeInfo.h create mode 100644 Source/JavaScriptCore/parser/Nodes.cpp create mode 100644 Source/JavaScriptCore/parser/Nodes.h create mode 100644 Source/JavaScriptCore/parser/Parser.cpp create mode 100644 Source/JavaScriptCore/parser/Parser.h create mode 100644 Source/JavaScriptCore/parser/ParserArena.cpp create mode 100644 Source/JavaScriptCore/parser/ParserArena.h create mode 100644 Source/JavaScriptCore/parser/ResultType.h create mode 100644 Source/JavaScriptCore/parser/SourceCode.h create mode 100644 Source/JavaScriptCore/parser/SourceProvider.h create mode 100644 Source/JavaScriptCore/parser/SyntaxChecker.h create mode 100644 Source/JavaScriptCore/pcre/AUTHORS create mode 100644 Source/JavaScriptCore/pcre/COPYING create mode 100755 Source/JavaScriptCore/pcre/dftables create mode 100644 Source/JavaScriptCore/pcre/pcre.h create mode 100644 Source/JavaScriptCore/pcre/pcre.pri create mode 100644 Source/JavaScriptCore/pcre/pcre_compile.cpp create mode 100644 Source/JavaScriptCore/pcre/pcre_exec.cpp create mode 100644 Source/JavaScriptCore/pcre/pcre_internal.h create mode 100644 Source/JavaScriptCore/pcre/pcre_tables.cpp create mode 100644 Source/JavaScriptCore/pcre/pcre_ucp_searchfuncs.cpp create mode 100644 Source/JavaScriptCore/pcre/pcre_xclass.cpp create mode 100644 Source/JavaScriptCore/pcre/ucpinternal.h create mode 100644 Source/JavaScriptCore/pcre/ucptable.cpp create mode 100644 Source/JavaScriptCore/profiler/CallIdentifier.h create mode 100644 Source/JavaScriptCore/profiler/Profile.cpp create mode 100644 Source/JavaScriptCore/profiler/Profile.h create mode 100644 Source/JavaScriptCore/profiler/ProfileGenerator.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfileGenerator.h create mode 100644 Source/JavaScriptCore/profiler/ProfileNode.cpp create mode 100644 Source/JavaScriptCore/profiler/ProfileNode.h create mode 100644 Source/JavaScriptCore/profiler/Profiler.cpp create mode 100644 Source/JavaScriptCore/profiler/Profiler.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerServer.h create mode 100644 Source/JavaScriptCore/profiler/ProfilerServer.mm create mode 100644 Source/JavaScriptCore/qt/ChangeLog create mode 100644 Source/JavaScriptCore/qt/api/QtScript.pro create mode 100644 Source/JavaScriptCore/qt/api/qscriptconverter_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptengine.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptengine.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptengine_p.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptengine_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptfunction.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptfunction_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptoriginalglobalobject_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptprogram.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptprogram.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptprogram_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptstring.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptstring.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptstring_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptsyntaxcheckresult.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptsyntaxcheckresult.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptsyntaxcheckresult_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptvalue.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptvalue.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptvalue_p.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptvalueiterator.cpp create mode 100644 Source/JavaScriptCore/qt/api/qscriptvalueiterator.h create mode 100644 Source/JavaScriptCore/qt/api/qscriptvalueiterator_p.h create mode 100644 Source/JavaScriptCore/qt/api/qtscriptglobal.h create mode 100644 Source/JavaScriptCore/qt/benchmarks/benchmarks.pri create mode 100644 Source/JavaScriptCore/qt/benchmarks/benchmarks.pro create mode 100644 Source/JavaScriptCore/qt/benchmarks/qscriptengine/qscriptengine.pro create mode 100644 Source/JavaScriptCore/qt/benchmarks/qscriptengine/tst_qscriptengine.cpp create mode 100644 Source/JavaScriptCore/qt/benchmarks/qscriptvalue/qscriptvalue.pro create mode 100644 Source/JavaScriptCore/qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptengine/qscriptengine.pro create mode 100644 Source/JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptstring/qscriptstring.pro create mode 100644 Source/JavaScriptCore/qt/tests/qscriptstring/tst_qscriptstring.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalue/qscriptvalue.pro create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated_init.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated_istype.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated_totype.cpp create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalueiterator/qscriptvalueiterator.pro create mode 100644 Source/JavaScriptCore/qt/tests/qscriptvalueiterator/tst_qscriptvalueiterator.cpp create mode 100644 Source/JavaScriptCore/qt/tests/tests.pri create mode 100644 Source/JavaScriptCore/qt/tests/tests.pro create mode 100644 Source/JavaScriptCore/runtime/ArgList.cpp create mode 100644 Source/JavaScriptCore/runtime/ArgList.h create mode 100644 Source/JavaScriptCore/runtime/Arguments.cpp create mode 100644 Source/JavaScriptCore/runtime/Arguments.h create mode 100644 Source/JavaScriptCore/runtime/ArrayConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/ArrayConstructor.h create mode 100644 Source/JavaScriptCore/runtime/ArrayPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/ArrayPrototype.h create mode 100644 Source/JavaScriptCore/runtime/BatchedTransitionOptimizer.h create mode 100644 Source/JavaScriptCore/runtime/BooleanConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/BooleanConstructor.h create mode 100644 Source/JavaScriptCore/runtime/BooleanObject.cpp create mode 100644 Source/JavaScriptCore/runtime/BooleanObject.h create mode 100644 Source/JavaScriptCore/runtime/BooleanPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/BooleanPrototype.h create mode 100644 Source/JavaScriptCore/runtime/CachedTranscendentalFunction.h create mode 100644 Source/JavaScriptCore/runtime/CallData.cpp create mode 100644 Source/JavaScriptCore/runtime/CallData.h create mode 100644 Source/JavaScriptCore/runtime/ClassInfo.h create mode 100644 Source/JavaScriptCore/runtime/Collector.cpp create mode 100644 Source/JavaScriptCore/runtime/Collector.h create mode 100644 Source/JavaScriptCore/runtime/CollectorHeapIterator.h create mode 100644 Source/JavaScriptCore/runtime/CommonIdentifiers.cpp create mode 100644 Source/JavaScriptCore/runtime/CommonIdentifiers.h create mode 100644 Source/JavaScriptCore/runtime/Completion.cpp create mode 100644 Source/JavaScriptCore/runtime/Completion.h create mode 100644 Source/JavaScriptCore/runtime/ConstructData.cpp create mode 100644 Source/JavaScriptCore/runtime/ConstructData.h create mode 100644 Source/JavaScriptCore/runtime/DateConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/DateConstructor.h create mode 100644 Source/JavaScriptCore/runtime/DateConversion.cpp create mode 100644 Source/JavaScriptCore/runtime/DateConversion.h create mode 100644 Source/JavaScriptCore/runtime/DateInstance.cpp create mode 100644 Source/JavaScriptCore/runtime/DateInstance.h create mode 100644 Source/JavaScriptCore/runtime/DateInstanceCache.h create mode 100644 Source/JavaScriptCore/runtime/DatePrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/DatePrototype.h create mode 100644 Source/JavaScriptCore/runtime/Error.cpp create mode 100644 Source/JavaScriptCore/runtime/Error.h create mode 100644 Source/JavaScriptCore/runtime/ErrorConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/ErrorConstructor.h create mode 100644 Source/JavaScriptCore/runtime/ErrorInstance.cpp create mode 100644 Source/JavaScriptCore/runtime/ErrorInstance.h create mode 100644 Source/JavaScriptCore/runtime/ErrorPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/ErrorPrototype.h create mode 100644 Source/JavaScriptCore/runtime/ExceptionHelpers.cpp create mode 100644 Source/JavaScriptCore/runtime/ExceptionHelpers.h create mode 100644 Source/JavaScriptCore/runtime/Executable.cpp create mode 100644 Source/JavaScriptCore/runtime/Executable.h create mode 100644 Source/JavaScriptCore/runtime/FunctionConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/FunctionConstructor.h create mode 100644 Source/JavaScriptCore/runtime/FunctionPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/FunctionPrototype.h create mode 100644 Source/JavaScriptCore/runtime/GCActivityCallback.cpp create mode 100644 Source/JavaScriptCore/runtime/GCActivityCallback.h create mode 100644 Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp create mode 100644 Source/JavaScriptCore/runtime/GCHandle.cpp create mode 100644 Source/JavaScriptCore/runtime/GCHandle.h create mode 100644 Source/JavaScriptCore/runtime/GetterSetter.cpp create mode 100644 Source/JavaScriptCore/runtime/GetterSetter.h create mode 100644 Source/JavaScriptCore/runtime/GlobalEvalFunction.cpp create mode 100644 Source/JavaScriptCore/runtime/GlobalEvalFunction.h create mode 100644 Source/JavaScriptCore/runtime/Identifier.cpp create mode 100644 Source/JavaScriptCore/runtime/Identifier.h create mode 100644 Source/JavaScriptCore/runtime/InitializeThreading.cpp create mode 100644 Source/JavaScriptCore/runtime/InitializeThreading.h create mode 100644 Source/JavaScriptCore/runtime/InternalFunction.cpp create mode 100644 Source/JavaScriptCore/runtime/InternalFunction.h create mode 100644 Source/JavaScriptCore/runtime/JSAPIValueWrapper.cpp create mode 100644 Source/JavaScriptCore/runtime/JSAPIValueWrapper.h create mode 100644 Source/JavaScriptCore/runtime/JSActivation.cpp create mode 100644 Source/JavaScriptCore/runtime/JSActivation.h create mode 100644 Source/JavaScriptCore/runtime/JSArray.cpp create mode 100644 Source/JavaScriptCore/runtime/JSArray.h create mode 100644 Source/JavaScriptCore/runtime/JSByteArray.cpp create mode 100644 Source/JavaScriptCore/runtime/JSByteArray.h create mode 100644 Source/JavaScriptCore/runtime/JSCell.cpp create mode 100644 Source/JavaScriptCore/runtime/JSCell.h create mode 100644 Source/JavaScriptCore/runtime/JSFunction.cpp create mode 100644 Source/JavaScriptCore/runtime/JSFunction.h create mode 100644 Source/JavaScriptCore/runtime/JSGlobalData.cpp create mode 100644 Source/JavaScriptCore/runtime/JSGlobalData.h create mode 100644 Source/JavaScriptCore/runtime/JSGlobalObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSGlobalObject.h create mode 100644 Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp create mode 100644 Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h create mode 100644 Source/JavaScriptCore/runtime/JSImmediate.cpp create mode 100644 Source/JavaScriptCore/runtime/JSImmediate.h create mode 100644 Source/JavaScriptCore/runtime/JSLock.cpp create mode 100644 Source/JavaScriptCore/runtime/JSLock.h create mode 100644 Source/JavaScriptCore/runtime/JSNotAnObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSNotAnObject.h create mode 100644 Source/JavaScriptCore/runtime/JSNumberCell.cpp create mode 100644 Source/JavaScriptCore/runtime/JSNumberCell.h create mode 100644 Source/JavaScriptCore/runtime/JSONObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSONObject.h create mode 100644 Source/JavaScriptCore/runtime/JSObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSObject.h create mode 100644 Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h create mode 100644 Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp create mode 100644 Source/JavaScriptCore/runtime/JSPropertyNameIterator.h create mode 100644 Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSStaticScopeObject.h create mode 100644 Source/JavaScriptCore/runtime/JSString.cpp create mode 100644 Source/JavaScriptCore/runtime/JSString.h create mode 100644 Source/JavaScriptCore/runtime/JSStringBuilder.h create mode 100644 Source/JavaScriptCore/runtime/JSType.h create mode 100644 Source/JavaScriptCore/runtime/JSTypeInfo.h create mode 100644 Source/JavaScriptCore/runtime/JSValue.cpp create mode 100644 Source/JavaScriptCore/runtime/JSValue.h create mode 100644 Source/JavaScriptCore/runtime/JSVariableObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSVariableObject.h create mode 100644 Source/JavaScriptCore/runtime/JSWrapperObject.cpp create mode 100644 Source/JavaScriptCore/runtime/JSWrapperObject.h create mode 100644 Source/JavaScriptCore/runtime/JSZombie.cpp create mode 100644 Source/JavaScriptCore/runtime/JSZombie.h create mode 100644 Source/JavaScriptCore/runtime/LiteralParser.cpp create mode 100644 Source/JavaScriptCore/runtime/LiteralParser.h create mode 100644 Source/JavaScriptCore/runtime/Lookup.cpp create mode 100644 Source/JavaScriptCore/runtime/Lookup.h create mode 100644 Source/JavaScriptCore/runtime/MarkStack.cpp create mode 100644 Source/JavaScriptCore/runtime/MarkStack.h create mode 100644 Source/JavaScriptCore/runtime/MarkStackPosix.cpp create mode 100644 Source/JavaScriptCore/runtime/MarkStackSymbian.cpp create mode 100644 Source/JavaScriptCore/runtime/MarkStackWin.cpp create mode 100644 Source/JavaScriptCore/runtime/MathObject.cpp create mode 100644 Source/JavaScriptCore/runtime/MathObject.h create mode 100644 Source/JavaScriptCore/runtime/MemoryStatistics.cpp create mode 100644 Source/JavaScriptCore/runtime/MemoryStatistics.h create mode 100644 Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/NativeErrorConstructor.h create mode 100644 Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/NativeErrorPrototype.h create mode 100644 Source/JavaScriptCore/runtime/NativeFunctionWrapper.h create mode 100644 Source/JavaScriptCore/runtime/NumberConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/NumberConstructor.h create mode 100644 Source/JavaScriptCore/runtime/NumberObject.cpp create mode 100644 Source/JavaScriptCore/runtime/NumberObject.h create mode 100644 Source/JavaScriptCore/runtime/NumberPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/NumberPrototype.h create mode 100644 Source/JavaScriptCore/runtime/NumericStrings.h create mode 100644 Source/JavaScriptCore/runtime/ObjectConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/ObjectConstructor.h create mode 100644 Source/JavaScriptCore/runtime/ObjectPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/ObjectPrototype.h create mode 100644 Source/JavaScriptCore/runtime/Operations.cpp create mode 100644 Source/JavaScriptCore/runtime/Operations.h create mode 100644 Source/JavaScriptCore/runtime/PropertyDescriptor.cpp create mode 100644 Source/JavaScriptCore/runtime/PropertyDescriptor.h create mode 100644 Source/JavaScriptCore/runtime/PropertyMapHashTable.h create mode 100644 Source/JavaScriptCore/runtime/PropertyNameArray.cpp create mode 100644 Source/JavaScriptCore/runtime/PropertyNameArray.h create mode 100644 Source/JavaScriptCore/runtime/PropertySlot.cpp create mode 100644 Source/JavaScriptCore/runtime/PropertySlot.h create mode 100644 Source/JavaScriptCore/runtime/Protect.h create mode 100644 Source/JavaScriptCore/runtime/PrototypeFunction.cpp create mode 100644 Source/JavaScriptCore/runtime/PrototypeFunction.h create mode 100644 Source/JavaScriptCore/runtime/PutPropertySlot.h create mode 100644 Source/JavaScriptCore/runtime/RegExp.cpp create mode 100644 Source/JavaScriptCore/runtime/RegExp.h create mode 100644 Source/JavaScriptCore/runtime/RegExpCache.cpp create mode 100644 Source/JavaScriptCore/runtime/RegExpCache.h create mode 100644 Source/JavaScriptCore/runtime/RegExpConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/RegExpConstructor.h create mode 100644 Source/JavaScriptCore/runtime/RegExpKey.h create mode 100644 Source/JavaScriptCore/runtime/RegExpMatchesArray.h create mode 100644 Source/JavaScriptCore/runtime/RegExpObject.cpp create mode 100644 Source/JavaScriptCore/runtime/RegExpObject.h create mode 100644 Source/JavaScriptCore/runtime/RegExpPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/RegExpPrototype.h create mode 100644 Source/JavaScriptCore/runtime/RopeImpl.cpp create mode 100644 Source/JavaScriptCore/runtime/RopeImpl.h create mode 100644 Source/JavaScriptCore/runtime/ScopeChain.cpp create mode 100644 Source/JavaScriptCore/runtime/ScopeChain.h create mode 100644 Source/JavaScriptCore/runtime/ScopeChainMark.h create mode 100644 Source/JavaScriptCore/runtime/SmallStrings.cpp create mode 100644 Source/JavaScriptCore/runtime/SmallStrings.h create mode 100644 Source/JavaScriptCore/runtime/StrictEvalActivation.cpp create mode 100644 Source/JavaScriptCore/runtime/StrictEvalActivation.h create mode 100644 Source/JavaScriptCore/runtime/StringConstructor.cpp create mode 100644 Source/JavaScriptCore/runtime/StringConstructor.h create mode 100644 Source/JavaScriptCore/runtime/StringObject.cpp create mode 100644 Source/JavaScriptCore/runtime/StringObject.h create mode 100644 Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h create mode 100644 Source/JavaScriptCore/runtime/StringPrototype.cpp create mode 100644 Source/JavaScriptCore/runtime/StringPrototype.h create mode 100644 Source/JavaScriptCore/runtime/Structure.cpp create mode 100644 Source/JavaScriptCore/runtime/Structure.h create mode 100644 Source/JavaScriptCore/runtime/StructureChain.cpp create mode 100644 Source/JavaScriptCore/runtime/StructureChain.h create mode 100644 Source/JavaScriptCore/runtime/StructureTransitionTable.h create mode 100644 Source/JavaScriptCore/runtime/SymbolTable.h create mode 100644 Source/JavaScriptCore/runtime/Terminator.h create mode 100644 Source/JavaScriptCore/runtime/TimeoutChecker.cpp create mode 100644 Source/JavaScriptCore/runtime/TimeoutChecker.h create mode 100644 Source/JavaScriptCore/runtime/Tracing.d create mode 100644 Source/JavaScriptCore/runtime/Tracing.h create mode 100644 Source/JavaScriptCore/runtime/UString.cpp create mode 100644 Source/JavaScriptCore/runtime/UString.h create mode 100644 Source/JavaScriptCore/runtime/UStringBuilder.h create mode 100644 Source/JavaScriptCore/runtime/UStringConcatenate.h create mode 100644 Source/JavaScriptCore/runtime/WeakGCMap.h create mode 100644 Source/JavaScriptCore/runtime/WeakGCPtr.h create mode 100644 Source/JavaScriptCore/runtime/WeakRandom.h create mode 100644 Source/JavaScriptCore/shell/CMakeLists.txt create mode 100644 Source/JavaScriptCore/shell/CMakeListsEfl.txt create mode 100644 Source/JavaScriptCore/shell/CMakeListsWinCE.txt create mode 100644 Source/JavaScriptCore/tests/mozilla/Getopt/Mixed.pm create mode 100644 Source/JavaScriptCore/tests/mozilla/Makefile create mode 100644 Source/JavaScriptCore/tests/mozilla/README-jsDriver.html create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.1.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.1.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.1.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.2.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.2.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.2.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.2.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.2.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.2.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.3.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.5-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.5.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.5.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.5.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Array/15.4.5.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.3.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.3.1-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.3.1-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.3.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.2-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.3-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.3-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Boolean/15.6.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.1.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.1.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.2.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.2.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.2.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.2.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.2.2-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.2.2-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.2.2-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.1-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.1-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.2-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.2-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.8-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.8-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.8-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.8-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.3.8-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.4.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.4.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.4.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-11.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-12.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-13.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.10-9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.11-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.11-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.11-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.11-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.11-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.11-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.11-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.12-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.13-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.14.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.15.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.16.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.17.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.18.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.19.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.2-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.20.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.21-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.22-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-11.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-12.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-13.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-14.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-15.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-16.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-17.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-18.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.23-9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.24-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.25-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.26-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.27-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.28-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.29-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.3-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.30-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.31-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.32-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.33-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.34-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.35-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.36-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.36-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.36-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.36-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.36-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.36-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.36-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.37-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.37-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.37-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.37-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.37-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.4-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Date/15.9.5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.4-9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.5-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.5-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.8-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.1.8-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.2.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.2.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.2.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.2.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ExecutionContexts/10.2.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.1.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.10-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.10-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.10-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.12-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.12-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.12-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.12-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.13.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.13.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.13.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.13.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.13.2-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.13.2-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.13.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.14-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.1-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.1-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.1-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-10-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-11.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-5-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-6-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-7-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-8-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.2-9-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.3-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.3-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.3-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.2.3-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.3.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.3.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.4.9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.5.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.5.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.5.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.6.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.6.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.6.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.6.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.6.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.7.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.7.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.7.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.8.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.8.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.8.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.8.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.9.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.9.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Expressions/11.9.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.1.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.1.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.1.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.2.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.2.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.2.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.3.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.3.1-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.3.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.5.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/FunctionObjects/15.3.5.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.1.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.1.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.5-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/15.1.2.7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.2-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.2-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.2-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.2-5-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.2-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-11.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-12.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-13-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.3-9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.1-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.1-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.1-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-10-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-11-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-12-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-13-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-14-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-15-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-16-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-5-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-6-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-7-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-8-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.2-9-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-10-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-11-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-12-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-13-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-14-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-15-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-16-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-5-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-6-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-7-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-8-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.4.3-9-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-10-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-4-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-5-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-8-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.5-9-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.7.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.7.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.7.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.7.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.7.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.7.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/LexicalConventions/7.8.2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.6-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.6-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.7-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.7-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.8-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.8-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.8-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.11.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.12.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.13.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.14.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.15.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.16.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.17.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.18.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Math/15.8.2.9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/NativeObjects/15-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/NativeObjects/15-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.2-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.3-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.3-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.4-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.4-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.5-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.5-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.6-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.6-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.6-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.6-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.2-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.2-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.2-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.3-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Number/15.7.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.1.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.1.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.2.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.2.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.3.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.3.1-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.4.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.4.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/ObjectObjects/15.2.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/SourceText/6-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/SourceText/6-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.10-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-9-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-11.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-12.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-19.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-5-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-6-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-7-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-8-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-9-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.7-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.8-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Statements/12.9-1-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.1-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.10-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.11-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.11-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.11-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.11-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.11-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.11-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.12-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.12-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.12-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.12-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.12-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.2-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.2-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.3-3-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.4-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.4-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.5-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.5-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.5-5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.5-6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.6-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.6-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.7-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.7-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.7-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.8-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.8-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.8-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.9-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.5.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.3.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.4-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.5-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.8.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/9.9-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Types/8.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Types/8.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/Types/8.6.2.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/jsref.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/boolean-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/boolean-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/date-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/date-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/date-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/date-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-007.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-008.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-009.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-010-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/exception-011-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-007.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-008.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-009.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-010.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-011.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-012.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-013.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-014.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-015.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-016.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-017.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-019.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/function-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/global-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/global-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-007.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-008.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-009.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-010.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-011.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-012.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-013.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-014.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-015.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-016.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-017.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-018.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-019.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-020.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-021.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-022.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-023.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-024.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-025.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-026.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-027.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-028.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-029.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-030.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-031.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-032.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-033.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-034.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-035.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-036.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-037.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-038.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-039.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-040.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-041.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-042.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-047.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-048.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-049.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-050.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-051.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-052.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-053.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/lexical-054.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/number-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/number-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/number-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-007.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-008.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/statement-009.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/string-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/string-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Expressions/StrictEquality-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Expressions/instanceof-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Expressions/instanceof-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Expressions/instanceof-003-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Expressions/instanceof-004-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Expressions/instanceof-005-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Expressions/instanceof-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/FunctionObjects/apply-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/FunctionObjects/call-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/keywords-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/regexp-literals-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/LexicalConventions/regexp-literals-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/constructor-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/exec-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/exec-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/function-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/hex-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/multiline-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/octal-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/octal-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/octal-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/regexp-enumerate-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/regress-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/unicode-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/dowhile-007.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/forin-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/forin-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/if-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/label-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/label-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/switch-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/switch-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/switch-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/switch-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-007.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-008.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-009.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-010.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/try-012.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/while-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/while-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/while-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/while-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/match-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/match-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/match-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/match-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/replace-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/split-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/split-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/String/split-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/instanceof/instanceof-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/instanceof/instanceof-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/instanceof/instanceof-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/instanceof/regress-7635.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/jsref.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_2/template.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Array/15.4.4.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Array/15.4.4.4-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Array/regress-101488.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Array/regress-130451.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Date/15.9.5.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Date/15.9.5.4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Date/15.9.5.5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Date/15.9.5.6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Date/15.9.5.7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Date/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/15.11.1.1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/15.11.4.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/15.11.7.6-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/15.11.7.6-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/15.11.7.6-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/binding-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/regress-181654.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/regress-181914.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/regress-58946.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Exceptions/regress-95101.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/ExecutionContexts/10.1.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/ExecutionContexts/10.1.3-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/ExecutionContexts/10.1.3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/ExecutionContexts/10.1.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/ExecutionContexts/regress-23346.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Expressions/11.6.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Expressions/11.9.6-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/FunExpr/fe-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/FunExpr/fe-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/FunExpr/fe-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/15.3.4.3-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/15.3.4.4-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/arguments-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/call-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-104584.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-131964.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-137181.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-193555.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-49286.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-58274.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-85880.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-94506.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/regress-97921.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/scope-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Function/scope-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Number/15.7.4.5-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Number/15.7.4.6-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Number/15.7.4.7-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/NumberFormatting/tostring-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/8.6.2.6-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/class-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/class-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/class-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/class-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/class-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/regress-72773.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/regress-79129-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Object/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Operators/11.13.1-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Operators/11.4.1-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.3.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.3.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.4.1-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.4.1-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.4.1-3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.4.1-4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.4.1-5-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.6.2-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/15.10.6.2-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/octal-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/octal-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/perlstress-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/perlstress-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-100199.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-103087.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-105972.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-119909.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-122076.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-123437.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-165353.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-169497.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-169534.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-187133.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-188206.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-191479.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-202564.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-209067.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-209919.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-216591.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-220367-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-220367-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-24712.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-28686.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-31316.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-57572.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-57631.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-67773.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-72964.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-76683.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-78156.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-85721.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-87231.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/regress-98306.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-121744.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-131348.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-157509.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-194364.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-74474-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-74474-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-74474-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-83532-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-83532-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/switch-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/String/regress-104375.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/String/regress-189898.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/String/regress-83293.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-002-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/Unicode/uc-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/ecma_3/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/expected.html create mode 100644 Source/JavaScriptCore/tests/mozilla/importList.html create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_1/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_1/jsref.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_1/regress/function-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_1/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/array_split_1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/general1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/general2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/slice.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/splice1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/splice2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/tostring_1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Array/tostring_2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/Objects/toString-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/String/charCodeAt.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/String/concat.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/String/match.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/String/slice.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/Function_object.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/Number.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/String.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/definition-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/function-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/length.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/nesting-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/nesting.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/regexparg-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/regexparg-2-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/tostring-1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/function/tostring-2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/jsref.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/operator/equality.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/operator/strictEquality.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_dollar_number.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_input.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_input_as_array.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_lastIndex.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_lastMatch.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_lastParen.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_leftContext.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_multiline.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_object.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_rightContext.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/alphanumeric.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/asterisk.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/backslash.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/backspace.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/beginLine.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/character_class.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/compile.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/control_characters.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/digit.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/dot.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/endLine.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/everything.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/exec.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/flags.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/global.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/hexadecimal.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/ignoreCase.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/interval.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/octal.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/parentheses.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/plus.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/question_mark.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/regress-6359.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/regress-9141.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/simple_form.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/source.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/special_characters.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/string_replace.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/string_search.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/string_split.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/test.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/toString.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/vertical_bar.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/whitespace.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regexp/word_boundary.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regress/regress-144834.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/regress/regress-7703.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/statements/break.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/statements/continue.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/statements/do_while.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/statements/switch.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/statements/switch2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/version120/boolean-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/version120/regress-99663.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_2/version120/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Boolean/boolean-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Script/delete-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Script/function-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Script/function-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Script/in-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Script/new-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Script/script-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/Script/switch-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_1.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_10.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_11.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_12.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_2.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_3.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_4.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_5.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_6.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_7.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_8.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/inherit/proto_9.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/jsref.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/regress/delete-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/regress/function-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/regress/function-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/regress/in-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/regress/new-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/regress/switch-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_3/template.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Eval/eval-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Eval/eval-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Eval/eval-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Functions/function-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Regress/date-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Regress/function-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Regress/function-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Regress/function-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Regress/function-004-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Regress/regress-7224.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/Regress/toString-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/jsref.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_4/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/array-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/regress-101964.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/regress-107138.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/regress-108440.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/regress-154338.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/regress-157652.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/regress-178722.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Array/regress-94257.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/catchguard-001-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/catchguard-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/catchguard-002-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/catchguard-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/catchguard-003-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/catchguard-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/errstack-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/regress-121658.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/regress-123002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Exceptions/regress-50447.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Expressions/regress-192288.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Expressions/regress-96526-argsub.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Expressions/regress-96526-delelem.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Expressions/regress-96526-noargsub.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Expressions/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/GetSet/getset-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/GetSet/getset-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/GetSet/getset-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/GetSet/getset-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/GetSet/getset-005.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/GetSet/getset-006.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/LexicalConventions/lexical-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/LexicalConventions/regress-177314.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Object/regress-137000.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Object/regress-192105.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Object/regress-90596-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Object/regress-90596-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Object/regress-90596-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Object/regress-96284-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Object/regress-96284-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-102725.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-103602.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-104077.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-110286.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-111557.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-114491.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-114493.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-118849.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-127557.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-131510-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-140974.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-146596.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-152646.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-156354.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-159334.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-168347.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-170193.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-172699.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-179524.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-185165.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-191633.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-191668.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-192414.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-192465.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-193418.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-203402.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-203841.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-204210.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-210682.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-216320.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-31255.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-39309.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-44009.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-57043.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-68498-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-68498-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-68498-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-68498-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-69607.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-71107.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-76054.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-80981.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-82306.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-89443.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-89474.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-90445.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-96128-n.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-96526-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-96526-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Regress/regress-96526-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-154693.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-181834.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-184107.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-185485.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-191276.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-192226.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-202678-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-202678-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-208496-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-208496-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-220362.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-220584.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-77578-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/scope-001.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/scope-002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/scope-003.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/Scope/scope-004.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/String/regress-107771.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/String/regress-179068.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_5/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/regress-290592.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/regress-304828.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/regress-305002.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/regress-310425-01.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/regress-310425-02.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/regress-320887.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Array/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/README create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/regress-301574.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/regress-309242.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/regress-311157-01.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/regress-311157-02.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/regress-314887.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/regress-320172.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/Regress/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/String/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/String/regress-306591.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/String/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/browser.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/shell.js create mode 100644 Source/JavaScriptCore/tests/mozilla/js1_6/template.js create mode 100644 Source/JavaScriptCore/tests/mozilla/jsDriver.pl create mode 100644 Source/JavaScriptCore/tests/mozilla/menufoot.html create mode 100644 Source/JavaScriptCore/tests/mozilla/menuhead.html create mode 100644 Source/JavaScriptCore/tests/mozilla/mkhtml.pl create mode 100644 Source/JavaScriptCore/tests/mozilla/mklistpage.pl create mode 100644 Source/JavaScriptCore/tests/mozilla/runtests.pl create mode 100644 Source/JavaScriptCore/tests/mozilla/template.js create mode 100644 Source/JavaScriptCore/tests/perf/bench-allocate-nonretained.js create mode 100644 Source/JavaScriptCore/tests/perf/bench-allocate-retained.js create mode 100644 Source/JavaScriptCore/wscript create mode 100644 Source/JavaScriptCore/wtf/ASCIICType.h create mode 100644 Source/JavaScriptCore/wtf/AVLTree.h create mode 100644 Source/JavaScriptCore/wtf/AlwaysInline.h create mode 100644 Source/JavaScriptCore/wtf/Assertions.cpp create mode 100644 Source/JavaScriptCore/wtf/Assertions.h create mode 100644 Source/JavaScriptCore/wtf/Atomics.h create mode 100644 Source/JavaScriptCore/wtf/Bitmap.h create mode 100644 Source/JavaScriptCore/wtf/BumpPointerAllocator.h create mode 100644 Source/JavaScriptCore/wtf/ByteArray.cpp create mode 100644 Source/JavaScriptCore/wtf/ByteArray.h create mode 100644 Source/JavaScriptCore/wtf/CMakeLists.txt create mode 100644 Source/JavaScriptCore/wtf/CMakeListsEfl.txt create mode 100644 Source/JavaScriptCore/wtf/CMakeListsWinCE.txt create mode 100644 Source/JavaScriptCore/wtf/CONTRIBUTORS.pthreads-win32 create mode 100644 Source/JavaScriptCore/wtf/Complex.h create mode 100644 Source/JavaScriptCore/wtf/CrossThreadRefCounted.h create mode 100644 Source/JavaScriptCore/wtf/CurrentTime.cpp create mode 100644 Source/JavaScriptCore/wtf/CurrentTime.h create mode 100644 Source/JavaScriptCore/wtf/DateMath.cpp create mode 100644 Source/JavaScriptCore/wtf/DateMath.h create mode 100644 Source/JavaScriptCore/wtf/DecimalNumber.cpp create mode 100644 Source/JavaScriptCore/wtf/DecimalNumber.h create mode 100644 Source/JavaScriptCore/wtf/Decoder.h create mode 100644 Source/JavaScriptCore/wtf/Deque.h create mode 100644 Source/JavaScriptCore/wtf/DisallowCType.h create mode 100644 Source/JavaScriptCore/wtf/Encoder.h create mode 100644 Source/JavaScriptCore/wtf/FastAllocBase.h create mode 100644 Source/JavaScriptCore/wtf/FastMalloc.cpp create mode 100644 Source/JavaScriptCore/wtf/FastMalloc.h create mode 100644 Source/JavaScriptCore/wtf/FixedArray.h create mode 100644 Source/JavaScriptCore/wtf/Forward.h create mode 100644 Source/JavaScriptCore/wtf/GetPtr.h create mode 100644 Source/JavaScriptCore/wtf/HashCountedSet.h create mode 100644 Source/JavaScriptCore/wtf/HashFunctions.h create mode 100644 Source/JavaScriptCore/wtf/HashIterators.h create mode 100644 Source/JavaScriptCore/wtf/HashMap.h create mode 100644 Source/JavaScriptCore/wtf/HashSet.h create mode 100644 Source/JavaScriptCore/wtf/HashTable.cpp create mode 100644 Source/JavaScriptCore/wtf/HashTable.h create mode 100644 Source/JavaScriptCore/wtf/HashTraits.h create mode 100644 Source/JavaScriptCore/wtf/ListHashSet.h create mode 100644 Source/JavaScriptCore/wtf/ListRefPtr.h create mode 100644 Source/JavaScriptCore/wtf/Locker.h create mode 100644 Source/JavaScriptCore/wtf/MD5.cpp create mode 100644 Source/JavaScriptCore/wtf/MD5.h create mode 100644 Source/JavaScriptCore/wtf/MainThread.cpp create mode 100644 Source/JavaScriptCore/wtf/MainThread.h create mode 100644 Source/JavaScriptCore/wtf/MallocZoneSupport.h create mode 100644 Source/JavaScriptCore/wtf/MathExtras.h create mode 100644 Source/JavaScriptCore/wtf/MessageQueue.h create mode 100644 Source/JavaScriptCore/wtf/NonCopyingSort.h create mode 100644 Source/JavaScriptCore/wtf/Noncopyable.h create mode 100644 Source/JavaScriptCore/wtf/NotFound.h create mode 100644 Source/JavaScriptCore/wtf/NullPtr.cpp create mode 100644 Source/JavaScriptCore/wtf/NullPtr.h create mode 100644 Source/JavaScriptCore/wtf/OSAllocator.h create mode 100644 Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp create mode 100644 Source/JavaScriptCore/wtf/OSAllocatorSymbian.cpp create mode 100644 Source/JavaScriptCore/wtf/OSAllocatorWin.cpp create mode 100644 Source/JavaScriptCore/wtf/OwnArrayPtr.h create mode 100644 Source/JavaScriptCore/wtf/OwnArrayPtrCommon.h create mode 100644 Source/JavaScriptCore/wtf/OwnFastMallocPtr.h create mode 100644 Source/JavaScriptCore/wtf/OwnPtr.h create mode 100644 Source/JavaScriptCore/wtf/OwnPtrCommon.h create mode 100644 Source/JavaScriptCore/wtf/PageAllocation.h create mode 100644 Source/JavaScriptCore/wtf/PageAllocationAligned.cpp create mode 100644 Source/JavaScriptCore/wtf/PageAllocationAligned.h create mode 100644 Source/JavaScriptCore/wtf/PageBlock.cpp create mode 100644 Source/JavaScriptCore/wtf/PageBlock.h create mode 100644 Source/JavaScriptCore/wtf/PageReservation.h create mode 100644 Source/JavaScriptCore/wtf/PassOwnArrayPtr.h create mode 100644 Source/JavaScriptCore/wtf/PassOwnPtr.h create mode 100644 Source/JavaScriptCore/wtf/PassRefPtr.h create mode 100644 Source/JavaScriptCore/wtf/Platform.h create mode 100644 Source/JavaScriptCore/wtf/PossiblyNull.h create mode 100644 Source/JavaScriptCore/wtf/RandomNumber.cpp create mode 100644 Source/JavaScriptCore/wtf/RandomNumber.h create mode 100644 Source/JavaScriptCore/wtf/RandomNumberSeed.h create mode 100644 Source/JavaScriptCore/wtf/RefCounted.h create mode 100644 Source/JavaScriptCore/wtf/RefCountedLeakCounter.cpp create mode 100644 Source/JavaScriptCore/wtf/RefCountedLeakCounter.h create mode 100644 Source/JavaScriptCore/wtf/RefPtr.h create mode 100644 Source/JavaScriptCore/wtf/RefPtrHashMap.h create mode 100644 Source/JavaScriptCore/wtf/RetainPtr.h create mode 100644 Source/JavaScriptCore/wtf/SegmentedVector.h create mode 100644 Source/JavaScriptCore/wtf/SizeLimits.cpp create mode 100644 Source/JavaScriptCore/wtf/StackBounds.cpp create mode 100644 Source/JavaScriptCore/wtf/StackBounds.h create mode 100644 Source/JavaScriptCore/wtf/StaticConstructors.h create mode 100644 Source/JavaScriptCore/wtf/StdLibExtras.h create mode 100644 Source/JavaScriptCore/wtf/StringExtras.cpp create mode 100644 Source/JavaScriptCore/wtf/StringExtras.h create mode 100644 Source/JavaScriptCore/wtf/StringHasher.h create mode 100644 Source/JavaScriptCore/wtf/TCPackedCache.h create mode 100644 Source/JavaScriptCore/wtf/TCPageMap.h create mode 100644 Source/JavaScriptCore/wtf/TCSpinLock.h create mode 100644 Source/JavaScriptCore/wtf/TCSystemAlloc.cpp create mode 100644 Source/JavaScriptCore/wtf/TCSystemAlloc.h create mode 100644 Source/JavaScriptCore/wtf/ThreadFunctionInvocation.h create mode 100644 Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp create mode 100644 Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h create mode 100644 Source/JavaScriptCore/wtf/ThreadSafeShared.h create mode 100644 Source/JavaScriptCore/wtf/ThreadSpecific.h create mode 100644 Source/JavaScriptCore/wtf/ThreadSpecificWin.cpp create mode 100644 Source/JavaScriptCore/wtf/Threading.cpp create mode 100644 Source/JavaScriptCore/wtf/Threading.h create mode 100644 Source/JavaScriptCore/wtf/ThreadingNone.cpp create mode 100644 Source/JavaScriptCore/wtf/ThreadingPrimitives.h create mode 100644 Source/JavaScriptCore/wtf/ThreadingPthreads.cpp create mode 100644 Source/JavaScriptCore/wtf/ThreadingWin.cpp create mode 100644 Source/JavaScriptCore/wtf/TypeTraits.cpp create mode 100644 Source/JavaScriptCore/wtf/TypeTraits.h create mode 100644 Source/JavaScriptCore/wtf/UnusedParam.h create mode 100644 Source/JavaScriptCore/wtf/VMTags.h create mode 100644 Source/JavaScriptCore/wtf/ValueCheck.h create mode 100644 Source/JavaScriptCore/wtf/Vector.h create mode 100644 Source/JavaScriptCore/wtf/VectorTraits.h create mode 100644 Source/JavaScriptCore/wtf/WTFThreadData.cpp create mode 100644 Source/JavaScriptCore/wtf/WTFThreadData.h create mode 100644 Source/JavaScriptCore/wtf/android/AndroidThreading.h create mode 100644 Source/JavaScriptCore/wtf/android/MainThreadAndroid.cpp create mode 100644 Source/JavaScriptCore/wtf/brew/MainThreadBrew.cpp create mode 100644 Source/JavaScriptCore/wtf/brew/OwnPtrBrew.cpp create mode 100644 Source/JavaScriptCore/wtf/brew/RefPtrBrew.h create mode 100644 Source/JavaScriptCore/wtf/brew/ShellBrew.h create mode 100644 Source/JavaScriptCore/wtf/brew/StringBrew.cpp create mode 100644 Source/JavaScriptCore/wtf/brew/SystemMallocBrew.h create mode 100644 Source/JavaScriptCore/wtf/chromium/ChromiumThreading.h create mode 100644 Source/JavaScriptCore/wtf/chromium/MainThreadChromium.cpp create mode 100644 Source/JavaScriptCore/wtf/dtoa.cpp create mode 100644 Source/JavaScriptCore/wtf/dtoa.h create mode 100644 Source/JavaScriptCore/wtf/efl/MainThreadEfl.cpp create mode 100644 Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp create mode 100644 Source/JavaScriptCore/wtf/gobject/GOwnPtr.h create mode 100644 Source/JavaScriptCore/wtf/gobject/GRefPtr.cpp create mode 100644 Source/JavaScriptCore/wtf/gobject/GRefPtr.h create mode 100644 Source/JavaScriptCore/wtf/gobject/GTypedefs.h create mode 100644 Source/JavaScriptCore/wtf/gtk/MainThreadGtk.cpp create mode 100644 Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp create mode 100644 Source/JavaScriptCore/wtf/haiku/MainThreadHaiku.cpp create mode 100644 Source/JavaScriptCore/wtf/haiku/StringHaiku.cpp create mode 100644 Source/JavaScriptCore/wtf/mac/MainThreadMac.mm create mode 100644 Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp create mode 100644 Source/JavaScriptCore/wtf/qt/StringQt.cpp create mode 100644 Source/JavaScriptCore/wtf/qt/ThreadingQt.cpp create mode 100644 Source/JavaScriptCore/wtf/text/AtomicString.cpp create mode 100644 Source/JavaScriptCore/wtf/text/AtomicString.h create mode 100644 Source/JavaScriptCore/wtf/text/AtomicStringHash.h create mode 100644 Source/JavaScriptCore/wtf/text/AtomicStringImpl.h create mode 100644 Source/JavaScriptCore/wtf/text/CString.cpp create mode 100644 Source/JavaScriptCore/wtf/text/CString.h create mode 100644 Source/JavaScriptCore/wtf/text/StringBuffer.h create mode 100644 Source/JavaScriptCore/wtf/text/StringBuilder.cpp create mode 100644 Source/JavaScriptCore/wtf/text/StringBuilder.h create mode 100644 Source/JavaScriptCore/wtf/text/StringConcatenate.h create mode 100644 Source/JavaScriptCore/wtf/text/StringHash.h create mode 100644 Source/JavaScriptCore/wtf/text/StringImpl.cpp create mode 100644 Source/JavaScriptCore/wtf/text/StringImpl.h create mode 100644 Source/JavaScriptCore/wtf/text/StringImplBase.h create mode 100644 Source/JavaScriptCore/wtf/text/StringStatics.cpp create mode 100644 Source/JavaScriptCore/wtf/text/TextPosition.h create mode 100644 Source/JavaScriptCore/wtf/text/WTFString.cpp create mode 100644 Source/JavaScriptCore/wtf/text/WTFString.h create mode 100644 Source/JavaScriptCore/wtf/unicode/Collator.h create mode 100644 Source/JavaScriptCore/wtf/unicode/CollatorDefault.cpp create mode 100644 Source/JavaScriptCore/wtf/unicode/UTF8.cpp create mode 100644 Source/JavaScriptCore/wtf/unicode/UTF8.h create mode 100644 Source/JavaScriptCore/wtf/unicode/Unicode.h create mode 100644 Source/JavaScriptCore/wtf/unicode/UnicodeMacrosFromICU.h create mode 100644 Source/JavaScriptCore/wtf/unicode/brew/UnicodeBrew.cpp create mode 100644 Source/JavaScriptCore/wtf/unicode/brew/UnicodeBrew.h create mode 100644 Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.cpp create mode 100644 Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h create mode 100644 Source/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp create mode 100644 Source/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h create mode 100644 Source/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h create mode 100644 Source/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp create mode 100644 Source/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h create mode 100644 Source/JavaScriptCore/wtf/url/api/ParsedURL.cpp create mode 100644 Source/JavaScriptCore/wtf/url/api/ParsedURL.h create mode 100644 Source/JavaScriptCore/wtf/url/api/URLString.h create mode 100644 Source/JavaScriptCore/wtf/url/src/RawURLBuffer.h create mode 100644 Source/JavaScriptCore/wtf/url/src/URLBuffer.h create mode 100644 Source/JavaScriptCore/wtf/url/src/URLCharacterTypes.cpp create mode 100644 Source/JavaScriptCore/wtf/url/src/URLCharacterTypes.h create mode 100644 Source/JavaScriptCore/wtf/url/src/URLComponent.h create mode 100644 Source/JavaScriptCore/wtf/url/src/URLEscape.cpp create mode 100644 Source/JavaScriptCore/wtf/url/src/URLEscape.h create mode 100644 Source/JavaScriptCore/wtf/url/src/URLParser.h create mode 100644 Source/JavaScriptCore/wtf/url/src/URLQueryCanonicalizer.h create mode 100644 Source/JavaScriptCore/wtf/url/src/URLSegments.cpp create mode 100644 Source/JavaScriptCore/wtf/url/src/URLSegments.h create mode 100644 Source/JavaScriptCore/wtf/url/wtfurl.gyp create mode 100644 Source/JavaScriptCore/wtf/win/MainThreadWin.cpp create mode 100644 Source/JavaScriptCore/wtf/win/OwnPtrWin.cpp create mode 100644 Source/JavaScriptCore/wtf/wince/FastMallocWinCE.h create mode 100644 Source/JavaScriptCore/wtf/wince/MemoryManager.cpp create mode 100644 Source/JavaScriptCore/wtf/wince/MemoryManager.h create mode 100644 Source/JavaScriptCore/wtf/wince/mt19937ar.c create mode 100644 Source/JavaScriptCore/wtf/wtf.pri create mode 100644 Source/JavaScriptCore/wtf/wx/MainThreadWx.cpp create mode 100644 Source/JavaScriptCore/wtf/wx/StringWx.cpp create mode 100644 Source/JavaScriptCore/yarr/RegexInterpreter.cpp create mode 100644 Source/JavaScriptCore/yarr/RegexInterpreter.h create mode 100644 Source/JavaScriptCore/yarr/RegexJIT.cpp create mode 100644 Source/JavaScriptCore/yarr/RegexJIT.h create mode 100644 Source/JavaScriptCore/yarr/RegexParser.h create mode 100644 Source/JavaScriptCore/yarr/RegexPattern.cpp create mode 100644 Source/JavaScriptCore/yarr/RegexPattern.h (limited to 'Source/JavaScriptCore') diff --git a/Source/JavaScriptCore/API/APICast.h b/Source/JavaScriptCore/API/APICast.h new file mode 100644 index 0000000..4294d3d --- /dev/null +++ b/Source/JavaScriptCore/API/APICast.h @@ -0,0 +1,153 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef APICast_h +#define APICast_h + +#include "JSAPIValueWrapper.h" +#include "JSGlobalObject.h" +#include "JSValue.h" +#include + +namespace JSC { + class ExecState; + class PropertyNameArray; + class JSGlobalData; + class JSObject; + class JSValue; +} + +typedef const struct OpaqueJSContextGroup* JSContextGroupRef; +typedef const struct OpaqueJSContext* JSContextRef; +typedef struct OpaqueJSContext* JSGlobalContextRef; +typedef struct OpaqueJSPropertyNameAccumulator* JSPropertyNameAccumulatorRef; +typedef const struct OpaqueJSValue* JSValueRef; +typedef struct OpaqueJSValue* JSObjectRef; + +/* Opaque typing convenience methods */ + +inline JSC::ExecState* toJS(JSContextRef c) +{ + ASSERT(c); + return reinterpret_cast(const_cast(c)); +} + +inline JSC::ExecState* toJS(JSGlobalContextRef c) +{ + ASSERT(c); + return reinterpret_cast(c); +} + +inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v) +{ + ASSERT_UNUSED(exec, exec); + ASSERT(v); +#if USE(JSVALUE32_64) + JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); + if (!jsCell) + return JSC::JSValue(); + if (jsCell->isAPIValueWrapper()) + return static_cast(jsCell)->value(); + return jsCell; +#else + return JSC::JSValue::decode(reinterpret_cast(const_cast(v))); +#endif +} + +inline JSC::JSValue toJSForGC(JSC::ExecState* exec, JSValueRef v) +{ + ASSERT_UNUSED(exec, exec); + ASSERT(v); +#if USE(JSVALUE32_64) + JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); + if (!jsCell) + return JSC::JSValue(); + return jsCell; +#else + return JSC::JSValue::decode(reinterpret_cast(const_cast(v))); +#endif +} + +inline JSC::JSObject* toJS(JSObjectRef o) +{ + return reinterpret_cast(o); +} + +inline JSC::PropertyNameArray* toJS(JSPropertyNameAccumulatorRef a) +{ + return reinterpret_cast(a); +} + +inline JSC::JSGlobalData* toJS(JSContextGroupRef g) +{ + return reinterpret_cast(const_cast(g)); +} + +inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v) +{ +#if USE(JSVALUE32_64) + if (!v) + return 0; + if (!v.isCell()) + return reinterpret_cast(JSC::jsAPIValueWrapper(exec, v).asCell()); + return reinterpret_cast(v.asCell()); +#else + UNUSED_PARAM(exec); + return reinterpret_cast(JSC::JSValue::encode(v)); +#endif +} + +inline JSObjectRef toRef(JSC::JSObject* o) +{ + return reinterpret_cast(o); +} + +inline JSObjectRef toRef(const JSC::JSObject* o) +{ + return reinterpret_cast(const_cast(o)); +} + +inline JSContextRef toRef(JSC::ExecState* e) +{ + return reinterpret_cast(e); +} + +inline JSGlobalContextRef toGlobalRef(JSC::ExecState* e) +{ + ASSERT(e == e->lexicalGlobalObject()->globalExec()); + return reinterpret_cast(e); +} + +inline JSPropertyNameAccumulatorRef toRef(JSC::PropertyNameArray* l) +{ + return reinterpret_cast(l); +} + +inline JSContextGroupRef toRef(JSC::JSGlobalData* g) +{ + return reinterpret_cast(g); +} + +#endif // APICast_h diff --git a/Source/JavaScriptCore/API/APIShims.h b/Source/JavaScriptCore/API/APIShims.h new file mode 100644 index 0000000..0b49d70 --- /dev/null +++ b/Source/JavaScriptCore/API/APIShims.h @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef APIShims_h +#define APIShims_h + +#include "CallFrame.h" +#include "GCActivityCallback.h" +#include "JSLock.h" +#include + +namespace JSC { + +class APIEntryShimWithoutLock { +protected: + APIEntryShimWithoutLock(JSGlobalData* globalData, bool registerThread) + : m_globalData(globalData) + , m_entryIdentifierTable(wtfThreadData().setCurrentIdentifierTable(globalData->identifierTable)) + { + if (registerThread) + globalData->heap.registerThread(); + m_globalData->heap.activityCallback()->synchronize(); + m_globalData->timeoutChecker.start(); + } + + ~APIEntryShimWithoutLock() + { + m_globalData->timeoutChecker.stop(); + wtfThreadData().setCurrentIdentifierTable(m_entryIdentifierTable); + } + +private: + JSGlobalData* m_globalData; + IdentifierTable* m_entryIdentifierTable; +}; + +class APIEntryShim : public APIEntryShimWithoutLock { +public: + // Normal API entry + APIEntryShim(ExecState* exec, bool registerThread = true) + : APIEntryShimWithoutLock(&exec->globalData(), registerThread) + , m_lock(exec) + { + } + + // JSPropertyNameAccumulator only has a globalData. + APIEntryShim(JSGlobalData* globalData, bool registerThread = true) + : APIEntryShimWithoutLock(globalData, registerThread) + , m_lock(globalData->isSharedInstance() ? LockForReal : SilenceAssertionsOnly) + { + } + +private: + JSLock m_lock; +}; + +class APICallbackShim { +public: + APICallbackShim(ExecState* exec) + : m_dropAllLocks(exec) + , m_globalData(&exec->globalData()) + { + wtfThreadData().resetCurrentIdentifierTable(); + } + + ~APICallbackShim() + { + m_globalData->heap.activityCallback()->synchronize(); + wtfThreadData().setCurrentIdentifierTable(m_globalData->identifierTable); + } + +private: + JSLock::DropAllLocks m_dropAllLocks; + JSGlobalData* m_globalData; +}; + +} + +#endif diff --git a/Source/JavaScriptCore/API/JSBase.cpp b/Source/JavaScriptCore/API/JSBase.cpp new file mode 100644 index 0000000..c5f1b15 --- /dev/null +++ b/Source/JavaScriptCore/API/JSBase.cpp @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSBase.h" +#include "JSBasePrivate.h" + +#include "APICast.h" +#include "APIShims.h" +#include "Completion.h" +#include "OpaqueJSString.h" +#include "SourceCode.h" +#include +#include +#include +#include +#include +#include +#include + +using namespace JSC; + +JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsThisObject = toJS(thisObject); + + // evaluate sets "this" to the global object if it is NULL + JSGlobalObject* globalObject = exec->dynamicGlobalObject(); + SourceCode source = makeSource(script->ustring(), sourceURL->ustring(), startingLineNumber); + Completion completion = evaluate(globalObject->globalExec(), globalObject->globalScopeChain(), source, jsThisObject); + + if (completion.complType() == Throw) { + if (exception) + *exception = toRef(exec, completion.value()); + return 0; + } + + if (completion.value()) + return toRef(exec, completion.value()); + + // happens, for example, when the only statement is an empty (';') statement + return toRef(exec, jsUndefined()); +} + +bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + SourceCode source = makeSource(script->ustring(), sourceURL->ustring(), startingLineNumber); + Completion completion = checkSyntax(exec->dynamicGlobalObject()->globalExec(), source); + if (completion.complType() == Throw) { + if (exception) + *exception = toRef(exec, completion.value()); + return false; + } + + return true; +} + +void JSGarbageCollect(JSContextRef ctx) +{ + // We used to recommend passing NULL as an argument here, which caused the only heap to be collected. + // As there is no longer a shared heap, the previously recommended usage became a no-op (but the GC + // will happen when the context group is destroyed). + // Because the function argument was originally ignored, some clients may pass their released context here, + // in which case there is a risk of crashing if another thread performs GC on the same heap in between. + if (!ctx) + return; + + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec, false); + + JSGlobalData& globalData = exec->globalData(); + if (!globalData.heap.isBusy()) + globalData.heap.collectAllGarbage(); + + // FIXME: Perhaps we should trigger a second mark and sweep + // once the garbage collector is done if this is called when + // the collector is busy. +} + +void JSReportExtraMemoryCost(JSContextRef ctx, size_t size) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + exec->globalData().heap.reportExtraMemoryCost(size); +} diff --git a/Source/JavaScriptCore/API/JSBase.h b/Source/JavaScriptCore/API/JSBase.h new file mode 100644 index 0000000..2e16720 --- /dev/null +++ b/Source/JavaScriptCore/API/JSBase.h @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSBase_h +#define JSBase_h + +#ifndef __cplusplus +#include +#endif + +/* JavaScript engine interface */ + +/*! @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. */ +typedef const struct OpaqueJSContextGroup* JSContextGroupRef; + +/*! @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state. */ +typedef const struct OpaqueJSContext* JSContextRef; + +/*! @typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext. */ +typedef struct OpaqueJSContext* JSGlobalContextRef; + +/*! @typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript. */ +typedef struct OpaqueJSString* JSStringRef; + +/*! @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior. */ +typedef struct OpaqueJSClass* JSClassRef; + +/*! @typedef JSPropertyNameArrayRef An array of JavaScript property names. */ +typedef struct OpaqueJSPropertyNameArray* JSPropertyNameArrayRef; + +/*! @typedef JSPropertyNameAccumulatorRef An ordered set used to collect the names of a JavaScript object's properties. */ +typedef struct OpaqueJSPropertyNameAccumulator* JSPropertyNameAccumulatorRef; + + +/* JavaScript data types */ + +/*! @typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them. */ +typedef const struct OpaqueJSValue* JSValueRef; + +/*! @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue. */ +typedef struct OpaqueJSValue* JSObjectRef; + +/* JavaScript symbol exports */ + +#undef JS_EXPORT +#if defined(JS_NO_EXPORT) + #define JS_EXPORT +#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) + #define JS_EXPORT __attribute__((visibility("default"))) +#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) + #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) + #define JS_EXPORT __declspec(dllexport) + #else + #define JS_EXPORT __declspec(dllimport) + #endif +#else + #define JS_EXPORT +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Script Evaluation */ + +/*! +@function JSEvaluateScript +@abstract Evaluates a string of JavaScript. +@param ctx The execution context to use. +@param script A JSString containing the script to evaluate. +@param thisObject The object to use as "this," or NULL to use the global object as "this." +@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. +@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result The JSValue that results from evaluating script, or NULL if an exception is thrown. +*/ +JS_EXPORT JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); + +/*! +@function JSCheckScriptSyntax +@abstract Checks for syntax errors in a string of JavaScript. +@param ctx The execution context to use. +@param script A JSString containing the script to check for syntax errors. +@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. +@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. +@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. +@result true if the script is syntactically correct, otherwise false. +*/ +JS_EXPORT bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); + +/*! +@function JSGarbageCollect +@abstract Performs a JavaScript garbage collection. +@param ctx The execution context to use. +@discussion JavaScript values that are on the machine stack, in a register, + protected by JSValueProtect, set as the global object of an execution context, + or reachable from any such value will not be collected. + + During JavaScript execution, you are not required to call this function; the + JavaScript engine will garbage collect as needed. JavaScript values created + within a context group are automatically destroyed when the last reference + to the context group is released. +*/ +JS_EXPORT void JSGarbageCollect(JSContextRef ctx); + +#ifdef __cplusplus +} +#endif + +#endif /* JSBase_h */ diff --git a/Source/JavaScriptCore/API/JSBasePrivate.h b/Source/JavaScriptCore/API/JSBasePrivate.h new file mode 100644 index 0000000..befa316 --- /dev/null +++ b/Source/JavaScriptCore/API/JSBasePrivate.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2008 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSBasePrivate_h +#define JSBasePrivate_h + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! +@function +@abstract Reports an object's non-GC memory payload to the garbage collector. +@param ctx The execution context to use. +@param size The payload's size, in bytes. +@discussion Use this function to notify the garbage collector that a GC object +owns a large non-GC memory region. Calling this function will encourage the +garbage collector to collect soon, hoping to reclaim that large non-GC memory +region. +*/ +JS_EXPORT void JSReportExtraMemoryCost(JSContextRef ctx, size_t size) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +#ifdef __cplusplus +} +#endif + +#endif /* JSBasePrivate_h */ diff --git a/Source/JavaScriptCore/API/JSCallbackConstructor.cpp b/Source/JavaScriptCore/API/JSCallbackConstructor.cpp new file mode 100644 index 0000000..66c6b88 --- /dev/null +++ b/Source/JavaScriptCore/API/JSCallbackConstructor.cpp @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSCallbackConstructor.h" + +#include "APIShims.h" +#include "APICast.h" +#include +#include +#include +#include +#include + +namespace JSC { + +const ClassInfo JSCallbackConstructor::info = { "CallbackConstructor", 0, 0, 0 }; + +JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, NonNullPassRefPtr structure, JSClassRef jsClass, JSObjectCallAsConstructorCallback callback) + : JSObjectWithGlobalObject(globalObject, structure) + , m_class(jsClass) + , m_callback(callback) +{ + if (m_class) + JSClassRetain(jsClass); +} + +JSCallbackConstructor::~JSCallbackConstructor() +{ + if (m_class) + JSClassRelease(m_class); +} + +static EncodedJSValue JSC_HOST_CALL constructJSCallback(ExecState* exec) +{ + JSObject* constructor = exec->callee(); + JSContextRef ctx = toRef(exec); + JSObjectRef constructorRef = toRef(constructor); + + JSObjectCallAsConstructorCallback callback = static_cast(constructor)->callback(); + if (callback) { + int argumentCount = static_cast(exec->argumentCount()); + Vector arguments(argumentCount); + for (int i = 0; i < argumentCount; i++) + arguments[i] = toRef(exec, exec->argument(i)); + + JSValueRef exception = 0; + JSObjectRef result; + { + APICallbackShim callbackShim(exec); + result = callback(ctx, constructorRef, argumentCount, arguments.data(), &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + return JSValue::encode(toJS(result)); + } + + return JSValue::encode(toJS(JSObjectMake(ctx, static_cast(constructor)->classRef(), 0))); +} + +ConstructType JSCallbackConstructor::getConstructData(ConstructData& constructData) +{ + constructData.native.function = constructJSCallback; + return ConstructTypeHost; +} + +} // namespace JSC diff --git a/Source/JavaScriptCore/API/JSCallbackConstructor.h b/Source/JavaScriptCore/API/JSCallbackConstructor.h new file mode 100644 index 0000000..a6d64cc --- /dev/null +++ b/Source/JavaScriptCore/API/JSCallbackConstructor.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSCallbackConstructor_h +#define JSCallbackConstructor_h + +#include "JSObjectRef.h" +#include + +namespace JSC { + +class JSCallbackConstructor : public JSObjectWithGlobalObject { +public: + JSCallbackConstructor(JSGlobalObject*, NonNullPassRefPtr, JSClassRef, JSObjectCallAsConstructorCallback); + virtual ~JSCallbackConstructor(); + JSClassRef classRef() const { return m_class; } + JSObjectCallAsConstructorCallback callback() const { return m_callback; } + static const ClassInfo info; + + static PassRefPtr createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + } + +protected: + static const unsigned StructureFlags = ImplementsHasInstance | JSObject::StructureFlags; + +private: + virtual ConstructType getConstructData(ConstructData&); + virtual const ClassInfo* classInfo() const { return &info; } + + JSClassRef m_class; + JSObjectCallAsConstructorCallback m_callback; +}; + +} // namespace JSC + +#endif // JSCallbackConstructor_h diff --git a/Source/JavaScriptCore/API/JSCallbackFunction.cpp b/Source/JavaScriptCore/API/JSCallbackFunction.cpp new file mode 100644 index 0000000..c488aa6 --- /dev/null +++ b/Source/JavaScriptCore/API/JSCallbackFunction.cpp @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSCallbackFunction.h" + +#include "APIShims.h" +#include "APICast.h" +#include "CodeBlock.h" +#include "ExceptionHelpers.h" +#include "JSFunction.h" +#include "FunctionPrototype.h" +#include +#include +#include + +namespace JSC { + +ASSERT_CLASS_FITS_IN_CELL(JSCallbackFunction); + +const ClassInfo JSCallbackFunction::info = { "CallbackFunction", &InternalFunction::info, 0, 0 }; + +JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const Identifier& name) + : InternalFunction(&exec->globalData(), globalObject, globalObject->callbackFunctionStructure(), name) + , m_callback(callback) +{ +} + +EncodedJSValue JSCallbackFunction::call(ExecState* exec) +{ + JSContextRef execRef = toRef(exec); + JSObjectRef functionRef = toRef(exec->callee()); + JSObjectRef thisObjRef = toRef(exec->hostThisValue().toThisObject(exec)); + + int argumentCount = static_cast(exec->argumentCount()); + Vector arguments(argumentCount); + for (int i = 0; i < argumentCount; i++) + arguments[i] = toRef(exec, exec->argument(i)); + + JSValueRef exception = 0; + JSValueRef result; + { + APICallbackShim callbackShim(exec); + result = static_cast(toJS(functionRef))->m_callback(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + + return JSValue::encode(toJS(exec, result)); +} + +CallType JSCallbackFunction::getCallData(CallData& callData) +{ + callData.native.function = call; + return CallTypeHost; +} + +} // namespace JSC diff --git a/Source/JavaScriptCore/API/JSCallbackFunction.h b/Source/JavaScriptCore/API/JSCallbackFunction.h new file mode 100644 index 0000000..b119b97 --- /dev/null +++ b/Source/JavaScriptCore/API/JSCallbackFunction.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSCallbackFunction_h +#define JSCallbackFunction_h + +#include "InternalFunction.h" +#include "JSObjectRef.h" + +namespace JSC { + +class JSCallbackFunction : public InternalFunction { +public: + JSCallbackFunction(ExecState*, JSGlobalObject*, JSObjectCallAsFunctionCallback, const Identifier& name); + + static const ClassInfo info; + + // InternalFunction mish-mashes constructor and function behavior -- we should + // refactor the code so this override isn't necessary + static PassRefPtr createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); + } + +private: + virtual CallType getCallData(CallData&); + virtual const ClassInfo* classInfo() const { return &info; } + + static EncodedJSValue JSC_HOST_CALL call(ExecState*); + + JSObjectCallAsFunctionCallback m_callback; +}; + +} // namespace JSC + +#endif // JSCallbackFunction_h diff --git a/Source/JavaScriptCore/API/JSCallbackObject.cpp b/Source/JavaScriptCore/API/JSCallbackObject.cpp new file mode 100644 index 0000000..abd2adc --- /dev/null +++ b/Source/JavaScriptCore/API/JSCallbackObject.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2007 Eric Seidel + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSCallbackObject.h" + +#include "Collector.h" +#include + +namespace JSC { + +ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject); +ASSERT_CLASS_FITS_IN_CELL(JSCallbackObject); + +// Define the two types of JSCallbackObjects we support. +template <> const ClassInfo JSCallbackObject::info = { "CallbackObject", 0, 0, 0 }; +template <> const ClassInfo JSCallbackObject::info = { "CallbackGlobalObject", 0, 0, 0 }; + +} // namespace JSC diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h new file mode 100644 index 0000000..83442b2 --- /dev/null +++ b/Source/JavaScriptCore/API/JSCallbackObject.h @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. + * Copyright (C) 2007 Eric Seidel + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSCallbackObject_h +#define JSCallbackObject_h + +#include "JSObjectRef.h" +#include "JSValueRef.h" +#include "JSObject.h" +#include + +namespace JSC { + +struct JSCallbackObjectData { + JSCallbackObjectData(void* privateData, JSClassRef jsClass) + : privateData(privateData) + , jsClass(jsClass) + { + JSClassRetain(jsClass); + } + + ~JSCallbackObjectData() + { + JSClassRelease(jsClass); + } + + JSValue getPrivateProperty(const Identifier& propertyName) const + { + if (!m_privateProperties) + return JSValue(); + return m_privateProperties->getPrivateProperty(propertyName); + } + + void setPrivateProperty(const Identifier& propertyName, JSValue value) + { + if (!m_privateProperties) + m_privateProperties = adoptPtr(new JSPrivatePropertyMap); + m_privateProperties->setPrivateProperty(propertyName, value); + } + + void deletePrivateProperty(const Identifier& propertyName) + { + if (!m_privateProperties) + return; + m_privateProperties->deletePrivateProperty(propertyName); + } + + void markChildren(MarkStack& markStack) + { + if (!m_privateProperties) + return; + m_privateProperties->markChildren(markStack); + } + + void* privateData; + JSClassRef jsClass; + struct JSPrivatePropertyMap { + JSValue getPrivateProperty(const Identifier& propertyName) const + { + PrivatePropertyMap::const_iterator location = m_propertyMap.find(propertyName.impl()); + if (location == m_propertyMap.end()) + return JSValue(); + return location->second; + } + + void setPrivateProperty(const Identifier& propertyName, JSValue value) + { + m_propertyMap.set(propertyName.impl(), value); + } + + void deletePrivateProperty(const Identifier& propertyName) + { + m_propertyMap.remove(propertyName.impl()); + } + + void markChildren(MarkStack& markStack) + { + for (PrivatePropertyMap::iterator ptr = m_propertyMap.begin(); ptr != m_propertyMap.end(); ++ptr) { + if (ptr->second) + markStack.append(ptr->second); + } + } + + private: + typedef HashMap, JSValue, IdentifierRepHash> PrivatePropertyMap; + PrivatePropertyMap m_propertyMap; + }; + OwnPtr m_privateProperties; +}; + + +template +class JSCallbackObject : public Base { +public: + JSCallbackObject(ExecState*, JSGlobalObject*, NonNullPassRefPtr, JSClassRef, void* data); + JSCallbackObject(JSClassRef, NonNullPassRefPtr); + virtual ~JSCallbackObject(); + + void setPrivate(void* data); + void* getPrivate(); + + static const ClassInfo info; + + JSClassRef classRef() const { return m_callbackObjectData->jsClass; } + bool inherits(JSClassRef) const; + + static PassRefPtr createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount); + } + + JSValue getPrivateProperty(const Identifier& propertyName) const + { + return m_callbackObjectData->getPrivateProperty(propertyName); + } + + void setPrivateProperty(const Identifier& propertyName, JSValue value) + { + m_callbackObjectData->setPrivateProperty(propertyName, value); + } + + void deletePrivateProperty(const Identifier& propertyName) + { + m_callbackObjectData->deletePrivateProperty(propertyName); + } + +protected: + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesMarkChildren | OverridesGetPropertyNames | Base::StructureFlags; + +private: + virtual UString className() const; + + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); + + virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); + + virtual bool deleteProperty(ExecState*, const Identifier&); + virtual bool deleteProperty(ExecState*, unsigned); + + virtual bool hasInstance(ExecState* exec, JSValue value, JSValue proto); + + virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); + + virtual double toNumber(ExecState*) const; + virtual UString toString(ExecState*) const; + + virtual ConstructType getConstructData(ConstructData&); + virtual CallType getCallData(CallData&); + virtual const ClassInfo* classInfo() const { return &info; } + + virtual void markChildren(MarkStack& markStack) + { + Base::markChildren(markStack); + m_callbackObjectData->markChildren(markStack); + } + + void init(ExecState*); + + static JSCallbackObject* asCallbackObject(JSValue); + + static EncodedJSValue JSC_HOST_CALL call(ExecState*); + static EncodedJSValue JSC_HOST_CALL construct(ExecState*); + + static JSValue staticValueGetter(ExecState*, JSValue, const Identifier&); + static JSValue staticFunctionGetter(ExecState*, JSValue, const Identifier&); + static JSValue callbackGetter(ExecState*, JSValue, const Identifier&); + + OwnPtr m_callbackObjectData; +}; + +} // namespace JSC + +// include the actual template class implementation +#include "JSCallbackObjectFunctions.h" + +#endif // JSCallbackObject_h diff --git a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h new file mode 100644 index 0000000..de5d842 --- /dev/null +++ b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h @@ -0,0 +1,607 @@ +/* + * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2007 Eric Seidel + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "APIShims.h" +#include "APICast.h" +#include "Error.h" +#include "ExceptionHelpers.h" +#include "JSCallbackFunction.h" +#include "JSClassRef.h" +#include "JSFunction.h" +#include "JSGlobalObject.h" +#include "JSLock.h" +#include "JSObjectRef.h" +#include "JSString.h" +#include "JSStringRef.h" +#include "OpaqueJSString.h" +#include "PropertyNameArray.h" +#include + +namespace JSC { + +template +inline JSCallbackObject* JSCallbackObject::asCallbackObject(JSValue value) +{ + ASSERT(asObject(value)->inherits(&info)); + return static_cast(asObject(value)); +} + +template +JSCallbackObject::JSCallbackObject(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr structure, JSClassRef jsClass, void* data) + : Base(globalObject, structure) + , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass))) +{ + init(exec); +} + +// Global object constructor. +// FIXME: Move this into a separate JSGlobalCallbackObject class derived from this one. +template +JSCallbackObject::JSCallbackObject(JSClassRef jsClass, NonNullPassRefPtr structure) + : Base(structure) + , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass))) +{ + ASSERT(Base::isGlobalObject()); + init(static_cast(this)->globalExec()); +} + +template +void JSCallbackObject::init(ExecState* exec) +{ + ASSERT(exec); + + Vector initRoutines; + JSClassRef jsClass = classRef(); + do { + if (JSObjectInitializeCallback initialize = jsClass->initialize) + initRoutines.append(initialize); + } while ((jsClass = jsClass->parentClass)); + + // initialize from base to derived + for (int i = static_cast(initRoutines.size()) - 1; i >= 0; i--) { + APICallbackShim callbackShim(exec); + JSObjectInitializeCallback initialize = initRoutines[i]; + initialize(toRef(exec), toRef(this)); + } +} + +template +JSCallbackObject::~JSCallbackObject() +{ + JSObjectRef thisRef = toRef(this); + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) + if (JSObjectFinalizeCallback finalize = jsClass->finalize) + finalize(thisRef); +} + +template +UString JSCallbackObject::className() const +{ + UString thisClassName = classRef()->className(); + if (!thisClassName.isEmpty()) + return thisClassName; + + return Base::className(); +} + +template +bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + JSContextRef ctx = toRef(exec); + JSObjectRef thisRef = toRef(this); + RefPtr propertyNameRef; + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { + // optional optimization to bypass getProperty in cases when we only need to know if the property exists + if (JSObjectHasPropertyCallback hasProperty = jsClass->hasProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.ustring()); + APICallbackShim callbackShim(exec); + if (hasProperty(ctx, thisRef, propertyNameRef.get())) { + slot.setCustom(this, callbackGetter); + return true; + } + } else if (JSObjectGetPropertyCallback getProperty = jsClass->getProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.ustring()); + JSValueRef exception = 0; + JSValueRef value; + { + APICallbackShim callbackShim(exec); + value = getProperty(ctx, thisRef, propertyNameRef.get(), &exception); + } + if (exception) { + throwError(exec, toJS(exec, exception)); + slot.setValue(jsUndefined()); + return true; + } + if (value) { + slot.setValue(toJS(exec, value)); + return true; + } + } + + if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { + if (staticValues->contains(propertyName.impl())) { + slot.setCustom(this, staticValueGetter); + return true; + } + } + + if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { + if (staticFunctions->contains(propertyName.impl())) { + slot.setCustom(this, staticFunctionGetter); + return true; + } + } + } + + return Base::getOwnPropertySlot(exec, propertyName, slot); +} + +template +bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) +{ + return getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot); +} + +template +bool JSCallbackObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + PropertySlot slot; + if (getOwnPropertySlot(exec, propertyName, slot)) { + // Ideally we should return an access descriptor, but returning a value descriptor is better than nothing. + JSValue value = slot.getValue(exec, propertyName); + if (!exec->hadException()) + descriptor.setValue(value); + // We don't know whether the property is configurable, but assume it is. + descriptor.setConfigurable(true); + // We don't know whether the property is enumerable (we could call getOwnPropertyNames() to find out), but assume it isn't. + descriptor.setEnumerable(false); + return true; + } + + return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor); +} + +template +void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) +{ + JSContextRef ctx = toRef(exec); + JSObjectRef thisRef = toRef(this); + RefPtr propertyNameRef; + JSValueRef valueRef = toRef(exec, value); + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { + if (JSObjectSetPropertyCallback setProperty = jsClass->setProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.ustring()); + JSValueRef exception = 0; + bool result; + { + APICallbackShim callbackShim(exec); + result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + if (result || exception) + return; + } + + if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { + if (StaticValueEntry* entry = staticValues->get(propertyName.impl())) { + if (entry->attributes & kJSPropertyAttributeReadOnly) + return; + if (JSObjectSetPropertyCallback setProperty = entry->setProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.ustring()); + JSValueRef exception = 0; + bool result; + { + APICallbackShim callbackShim(exec); + result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + if (result || exception) + return; + } else + throwError(exec, createReferenceError(exec, "Attempt to set a property that is not settable.")); + } + } + + if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { + if (StaticFunctionEntry* entry = staticFunctions->get(propertyName.impl())) { + if (entry->attributes & kJSPropertyAttributeReadOnly) + return; + JSCallbackObject::putDirect(propertyName, value); // put as override property + return; + } + } + } + + return Base::put(exec, propertyName, value, slot); +} + +template +bool JSCallbackObject::deleteProperty(ExecState* exec, const Identifier& propertyName) +{ + JSContextRef ctx = toRef(exec); + JSObjectRef thisRef = toRef(this); + RefPtr propertyNameRef; + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { + if (JSObjectDeletePropertyCallback deleteProperty = jsClass->deleteProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.ustring()); + JSValueRef exception = 0; + bool result; + { + APICallbackShim callbackShim(exec); + result = deleteProperty(ctx, thisRef, propertyNameRef.get(), &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + if (result || exception) + return true; + } + + if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { + if (StaticValueEntry* entry = staticValues->get(propertyName.impl())) { + if (entry->attributes & kJSPropertyAttributeDontDelete) + return false; + return true; + } + } + + if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { + if (StaticFunctionEntry* entry = staticFunctions->get(propertyName.impl())) { + if (entry->attributes & kJSPropertyAttributeDontDelete) + return false; + return true; + } + } + } + + return Base::deleteProperty(exec, propertyName); +} + +template +bool JSCallbackObject::deleteProperty(ExecState* exec, unsigned propertyName) +{ + return deleteProperty(exec, Identifier::from(exec, propertyName)); +} + +template +ConstructType JSCallbackObject::getConstructData(ConstructData& constructData) +{ + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { + if (jsClass->callAsConstructor) { + constructData.native.function = construct; + return ConstructTypeHost; + } + } + return ConstructTypeNone; +} + +template +EncodedJSValue JSCallbackObject::construct(ExecState* exec) +{ + JSObject* constructor = exec->callee(); + JSContextRef execRef = toRef(exec); + JSObjectRef constructorRef = toRef(constructor); + + for (JSClassRef jsClass = static_cast*>(constructor)->classRef(); jsClass; jsClass = jsClass->parentClass) { + if (JSObjectCallAsConstructorCallback callAsConstructor = jsClass->callAsConstructor) { + int argumentCount = static_cast(exec->argumentCount()); + Vector arguments(argumentCount); + for (int i = 0; i < argumentCount; i++) + arguments[i] = toRef(exec, exec->argument(i)); + JSValueRef exception = 0; + JSObject* result; + { + APICallbackShim callbackShim(exec); + result = toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), &exception)); + } + if (exception) + throwError(exec, toJS(exec, exception)); + return JSValue::encode(result); + } + } + + ASSERT_NOT_REACHED(); // getConstructData should prevent us from reaching here + return JSValue::encode(JSValue()); +} + +template +bool JSCallbackObject::hasInstance(ExecState* exec, JSValue value, JSValue) +{ + JSContextRef execRef = toRef(exec); + JSObjectRef thisRef = toRef(this); + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { + if (JSObjectHasInstanceCallback hasInstance = jsClass->hasInstance) { + JSValueRef valueRef = toRef(exec, value); + JSValueRef exception = 0; + bool result; + { + APICallbackShim callbackShim(exec); + result = hasInstance(execRef, thisRef, valueRef, &exception); + } + if (exception) + throwError(exec, toJS(exec, exception)); + return result; + } + } + return false; +} + +template +CallType JSCallbackObject::getCallData(CallData& callData) +{ + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { + if (jsClass->callAsFunction) { + callData.native.function = call; + return CallTypeHost; + } + } + return CallTypeNone; +} + +template +EncodedJSValue JSCallbackObject::call(ExecState* exec) +{ + JSContextRef execRef = toRef(exec); + JSObjectRef functionRef = toRef(exec->callee()); + JSObjectRef thisObjRef = toRef(exec->hostThisValue().toThisObject(exec)); + + for (JSClassRef jsClass = static_cast*>(toJS(functionRef))->classRef(); jsClass; jsClass = jsClass->parentClass) { + if (JSObjectCallAsFunctionCallback callAsFunction = jsClass->callAsFunction) { + int argumentCount = static_cast(exec->argumentCount()); + Vector arguments(argumentCount); + for (int i = 0; i < argumentCount; i++) + arguments[i] = toRef(exec, exec->argument(i)); + JSValueRef exception = 0; + JSValue result; + { + APICallbackShim callbackShim(exec); + result = toJS(exec, callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception)); + } + if (exception) + throwError(exec, toJS(exec, exception)); + return JSValue::encode(result); + } + } + + ASSERT_NOT_REACHED(); // getCallData should prevent us from reaching here + return JSValue::encode(JSValue()); +} + +template +void JSCallbackObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) +{ + JSContextRef execRef = toRef(exec); + JSObjectRef thisRef = toRef(this); + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { + if (JSObjectGetPropertyNamesCallback getPropertyNames = jsClass->getPropertyNames) { + APICallbackShim callbackShim(exec); + getPropertyNames(execRef, thisRef, toRef(&propertyNames)); + } + + if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { + typedef OpaqueJSClassStaticValuesTable::const_iterator iterator; + iterator end = staticValues->end(); + for (iterator it = staticValues->begin(); it != end; ++it) { + StringImpl* name = it->first.get(); + StaticValueEntry* entry = it->second; + if (entry->getProperty && (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties))) + propertyNames.add(Identifier(exec, name)); + } + } + + if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { + typedef OpaqueJSClassStaticFunctionsTable::const_iterator iterator; + iterator end = staticFunctions->end(); + for (iterator it = staticFunctions->begin(); it != end; ++it) { + StringImpl* name = it->first.get(); + StaticFunctionEntry* entry = it->second; + if (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties)) + propertyNames.add(Identifier(exec, name)); + } + } + } + + Base::getOwnPropertyNames(exec, propertyNames, mode); +} + +template +double JSCallbackObject::toNumber(ExecState* exec) const +{ + // We need this check to guard against the case where this object is rhs of + // a binary expression where lhs threw an exception in its conversion to + // primitive + if (exec->hadException()) + return NaN; + JSContextRef ctx = toRef(exec); + JSObjectRef thisRef = toRef(this); + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) + if (JSObjectConvertToTypeCallback convertToType = jsClass->convertToType) { + JSValueRef exception = 0; + JSValueRef value; + { + APICallbackShim callbackShim(exec); + value = convertToType(ctx, thisRef, kJSTypeNumber, &exception); + } + if (exception) { + throwError(exec, toJS(exec, exception)); + return 0; + } + + double dValue; + if (value) + return toJS(exec, value).getNumber(dValue) ? dValue : NaN; + } + + return Base::toNumber(exec); +} + +template +UString JSCallbackObject::toString(ExecState* exec) const +{ + JSContextRef ctx = toRef(exec); + JSObjectRef thisRef = toRef(this); + + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) + if (JSObjectConvertToTypeCallback convertToType = jsClass->convertToType) { + JSValueRef exception = 0; + JSValueRef value; + { + APICallbackShim callbackShim(exec); + value = convertToType(ctx, thisRef, kJSTypeString, &exception); + } + if (exception) { + throwError(exec, toJS(exec, exception)); + return ""; + } + if (value) + return toJS(exec, value).getString(exec); + } + + return Base::toString(exec); +} + +template +void JSCallbackObject::setPrivate(void* data) +{ + m_callbackObjectData->privateData = data; +} + +template +void* JSCallbackObject::getPrivate() +{ + return m_callbackObjectData->privateData; +} + +template +bool JSCallbackObject::inherits(JSClassRef c) const +{ + for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) + if (jsClass == c) + return true; + + return false; +} + +template +JSValue JSCallbackObject::staticValueGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) +{ + JSCallbackObject* thisObj = asCallbackObject(slotBase); + + JSObjectRef thisRef = toRef(thisObj); + RefPtr propertyNameRef; + + for (JSClassRef jsClass = thisObj->classRef(); jsClass; jsClass = jsClass->parentClass) + if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) + if (StaticValueEntry* entry = staticValues->get(propertyName.impl())) + if (JSObjectGetPropertyCallback getProperty = entry->getProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.ustring()); + JSValueRef exception = 0; + JSValueRef value; + { + APICallbackShim callbackShim(exec); + value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); + } + if (exception) { + throwError(exec, toJS(exec, exception)); + return jsUndefined(); + } + if (value) + return toJS(exec, value); + } + + return throwError(exec, createReferenceError(exec, "Static value property defined with NULL getProperty callback.")); +} + +template +JSValue JSCallbackObject::staticFunctionGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) +{ + JSCallbackObject* thisObj = asCallbackObject(slotBase); + + // Check for cached or override property. + PropertySlot slot2(thisObj); + if (thisObj->Base::getOwnPropertySlot(exec, propertyName, slot2)) + return slot2.getValue(exec, propertyName); + + for (JSClassRef jsClass = thisObj->classRef(); jsClass; jsClass = jsClass->parentClass) { + if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { + if (StaticFunctionEntry* entry = staticFunctions->get(propertyName.impl())) { + if (JSObjectCallAsFunctionCallback callAsFunction = entry->callAsFunction) { + + JSObject* o = new (exec) JSCallbackFunction(exec, asGlobalObject(thisObj->getAnonymousValue(0)), callAsFunction, propertyName); + thisObj->putDirect(propertyName, o, entry->attributes); + return o; + } + } + } + } + + return throwError(exec, createReferenceError(exec, "Static function property defined with NULL callAsFunction callback.")); +} + +template +JSValue JSCallbackObject::callbackGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) +{ + JSCallbackObject* thisObj = asCallbackObject(slotBase); + + JSObjectRef thisRef = toRef(thisObj); + RefPtr propertyNameRef; + + for (JSClassRef jsClass = thisObj->classRef(); jsClass; jsClass = jsClass->parentClass) + if (JSObjectGetPropertyCallback getProperty = jsClass->getProperty) { + if (!propertyNameRef) + propertyNameRef = OpaqueJSString::create(propertyName.ustring()); + JSValueRef exception = 0; + JSValueRef value; + { + APICallbackShim callbackShim(exec); + value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); + } + if (exception) { + throwError(exec, toJS(exec, exception)); + return jsUndefined(); + } + if (value) + return toJS(exec, value); + } + + return throwError(exec, createReferenceError(exec, "hasProperty callback returned true for a property that doesn't exist.")); +} + +} // namespace JSC diff --git a/Source/JavaScriptCore/API/JSClassRef.cpp b/Source/JavaScriptCore/API/JSClassRef.cpp new file mode 100644 index 0000000..decf493 --- /dev/null +++ b/Source/JavaScriptCore/API/JSClassRef.cpp @@ -0,0 +1,266 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSClassRef.h" + +#include "APICast.h" +#include "JSCallbackObject.h" +#include "JSObjectRef.h" +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace JSC; +using namespace WTF::Unicode; + +const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +static inline UString tryCreateStringFromUTF8(const char* string) +{ + if (!string) + return UString(); + + size_t length = strlen(string); + Vector buffer(length); + UChar* p = buffer.data(); + if (conversionOK != convertUTF8ToUTF16(&string, string + length, &p, p + length)) + return UString(); + + return UString(buffer.data(), p - buffer.data()); +} + +OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* protoClass) + : parentClass(definition->parentClass) + , prototypeClass(0) + , initialize(definition->initialize) + , finalize(definition->finalize) + , hasProperty(definition->hasProperty) + , getProperty(definition->getProperty) + , setProperty(definition->setProperty) + , deleteProperty(definition->deleteProperty) + , getPropertyNames(definition->getPropertyNames) + , callAsFunction(definition->callAsFunction) + , callAsConstructor(definition->callAsConstructor) + , hasInstance(definition->hasInstance) + , convertToType(definition->convertToType) + , m_className(tryCreateStringFromUTF8(definition->className)) + , m_staticValues(0) + , m_staticFunctions(0) +{ + initializeThreading(); + + if (const JSStaticValue* staticValue = definition->staticValues) { + m_staticValues = new OpaqueJSClassStaticValuesTable(); + while (staticValue->name) { + UString valueName = tryCreateStringFromUTF8(staticValue->name); + if (!valueName.isNull()) { + // Use a local variable here to sidestep an RVCT compiler bug. + StaticValueEntry* entry = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes); + StringImpl* impl = valueName.impl(); + impl->ref(); + m_staticValues->add(impl, entry); + } + ++staticValue; + } + } + + if (const JSStaticFunction* staticFunction = definition->staticFunctions) { + m_staticFunctions = new OpaqueJSClassStaticFunctionsTable(); + while (staticFunction->name) { + UString functionName = tryCreateStringFromUTF8(staticFunction->name); + if (!functionName.isNull()) { + // Use a local variable here to sidestep an RVCT compiler bug. + StaticFunctionEntry* entry = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes); + StringImpl* impl = functionName.impl(); + impl->ref(); + m_staticFunctions->add(impl, entry); + } + ++staticFunction; + } + } + + if (protoClass) + prototypeClass = JSClassRetain(protoClass); +} + +OpaqueJSClass::~OpaqueJSClass() +{ + // The empty string is shared across threads & is an identifier, in all other cases we should have done a deep copy in className(), below. + ASSERT(!m_className.length() || !m_className.impl()->isIdentifier()); + + if (m_staticValues) { + OpaqueJSClassStaticValuesTable::const_iterator end = m_staticValues->end(); + for (OpaqueJSClassStaticValuesTable::const_iterator it = m_staticValues->begin(); it != end; ++it) { + ASSERT(!it->first->isIdentifier()); + delete it->second; + } + delete m_staticValues; + } + + if (m_staticFunctions) { + OpaqueJSClassStaticFunctionsTable::const_iterator end = m_staticFunctions->end(); + for (OpaqueJSClassStaticFunctionsTable::const_iterator it = m_staticFunctions->begin(); it != end; ++it) { + ASSERT(!it->first->isIdentifier()); + delete it->second; + } + delete m_staticFunctions; + } + + if (prototypeClass) + JSClassRelease(prototypeClass); +} + +PassRefPtr OpaqueJSClass::createNoAutomaticPrototype(const JSClassDefinition* definition) +{ + return adoptRef(new OpaqueJSClass(definition, 0)); +} + +static void clearReferenceToPrototype(JSObjectRef prototype) +{ + OpaqueJSClassContextData* jsClassData = static_cast(JSObjectGetPrivate(prototype)); + ASSERT(jsClassData); + jsClassData->cachedPrototype.clear(toJS(prototype)); +} + +PassRefPtr OpaqueJSClass::create(const JSClassDefinition* clientDefinition) +{ + JSClassDefinition definition = *clientDefinition; // Avoid modifying client copy. + + JSClassDefinition protoDefinition = kJSClassDefinitionEmpty; + protoDefinition.finalize = clearReferenceToPrototype; + swap(definition.staticFunctions, protoDefinition.staticFunctions); // Move static functions to the prototype. + + // We are supposed to use JSClassRetain/Release but since we know that we currently have + // the only reference to this class object we cheat and use a RefPtr instead. + RefPtr protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0)); + return adoptRef(new OpaqueJSClass(&definition, protoClass.get())); +} + +OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) + : m_class(jsClass) +{ + if (jsClass->m_staticValues) { + staticValues = new OpaqueJSClassStaticValuesTable; + OpaqueJSClassStaticValuesTable::const_iterator end = jsClass->m_staticValues->end(); + for (OpaqueJSClassStaticValuesTable::const_iterator it = jsClass->m_staticValues->begin(); it != end; ++it) { + ASSERT(!it->first->isIdentifier()); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticValueEntry* entry = new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes); + staticValues->add(StringImpl::create(it->first->characters(), it->first->length()), entry); + } + } else + staticValues = 0; + + if (jsClass->m_staticFunctions) { + staticFunctions = new OpaqueJSClassStaticFunctionsTable; + OpaqueJSClassStaticFunctionsTable::const_iterator end = jsClass->m_staticFunctions->end(); + for (OpaqueJSClassStaticFunctionsTable::const_iterator it = jsClass->m_staticFunctions->begin(); it != end; ++it) { + ASSERT(!it->first->isIdentifier()); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticFunctionEntry* entry = new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes); + staticFunctions->add(StringImpl::create(it->first->characters(), it->first->length()), entry); + } + + } else + staticFunctions = 0; +} + +OpaqueJSClassContextData::~OpaqueJSClassContextData() +{ + if (staticValues) { + deleteAllValues(*staticValues); + delete staticValues; + } + + if (staticFunctions) { + deleteAllValues(*staticFunctions); + delete staticFunctions; + } +} + +OpaqueJSClassContextData& OpaqueJSClass::contextData(ExecState* exec) +{ + OpaqueJSClassContextData*& contextData = exec->globalData().opaqueJSClassData.add(this, 0).first->second; + if (!contextData) + contextData = new OpaqueJSClassContextData(this); + return *contextData; +} + +UString OpaqueJSClass::className() +{ + // Make a deep copy, so that the caller has no chance to put the original into IdentifierTable. + return UString(m_className.characters(), m_className.length()); +} + +OpaqueJSClassStaticValuesTable* OpaqueJSClass::staticValues(JSC::ExecState* exec) +{ + OpaqueJSClassContextData& jsClassData = contextData(exec); + return jsClassData.staticValues; +} + +OpaqueJSClassStaticFunctionsTable* OpaqueJSClass::staticFunctions(JSC::ExecState* exec) +{ + OpaqueJSClassContextData& jsClassData = contextData(exec); + return jsClassData.staticFunctions; +} + +/*! +// Doc here in case we make this public. (Hopefully we won't.) +@function + @abstract Returns the prototype that will be used when constructing an object with a given class. + @param ctx The execution context to use. + @param jsClass A JSClass whose prototype you want to get. + @result The JSObject prototype that was automatically generated for jsClass, or NULL if no prototype was automatically generated. This is the prototype that will be used when constructing an object using jsClass. +*/ +JSObject* OpaqueJSClass::prototype(ExecState* exec) +{ + /* Class (C++) and prototype (JS) inheritance are parallel, so: + * (C++) | (JS) + * ParentClass | ParentClassPrototype + * ^ | ^ + * | | | + * DerivedClass | DerivedClassPrototype + */ + + if (!prototypeClass) + return 0; + + OpaqueJSClassContextData& jsClassData = contextData(exec); + + if (!jsClassData.cachedPrototype) { + // Recursive, but should be good enough for our purposes + jsClassData.cachedPrototype = new (exec) JSCallbackObject(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), prototypeClass, &jsClassData); // set jsClassData as the object's private data, so it can clear our reference on destruction + if (parentClass) { + if (JSObject* prototype = parentClass->prototype(exec)) + jsClassData.cachedPrototype->setPrototype(prototype); + } + } + return jsClassData.cachedPrototype.get(); +} diff --git a/Source/JavaScriptCore/API/JSClassRef.h b/Source/JavaScriptCore/API/JSClassRef.h new file mode 100644 index 0000000..5062093 --- /dev/null +++ b/Source/JavaScriptCore/API/JSClassRef.h @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSClassRef_h +#define JSClassRef_h + +#include "JSObjectRef.h" + +#include +#include +#include +#include +#include + +struct StaticValueEntry : FastAllocBase { + StaticValueEntry(JSObjectGetPropertyCallback _getProperty, JSObjectSetPropertyCallback _setProperty, JSPropertyAttributes _attributes) + : getProperty(_getProperty), setProperty(_setProperty), attributes(_attributes) + { + } + + JSObjectGetPropertyCallback getProperty; + JSObjectSetPropertyCallback setProperty; + JSPropertyAttributes attributes; +}; + +struct StaticFunctionEntry : FastAllocBase { + StaticFunctionEntry(JSObjectCallAsFunctionCallback _callAsFunction, JSPropertyAttributes _attributes) + : callAsFunction(_callAsFunction), attributes(_attributes) + { + } + + JSObjectCallAsFunctionCallback callAsFunction; + JSPropertyAttributes attributes; +}; + +typedef HashMap, StaticValueEntry*> OpaqueJSClassStaticValuesTable; +typedef HashMap, StaticFunctionEntry*> OpaqueJSClassStaticFunctionsTable; + +struct OpaqueJSClass; + +// An OpaqueJSClass (JSClass) is created without a context, so it can be used with any context, even across context groups. +// This structure holds data members that vary across context groups. +struct OpaqueJSClassContextData : Noncopyable { + OpaqueJSClassContextData(OpaqueJSClass*); + ~OpaqueJSClassContextData(); + + // It is necessary to keep OpaqueJSClass alive because of the following rare scenario: + // 1. A class is created and used, so its context data is stored in JSGlobalData hash map. + // 2. The class is released, and when all JS objects that use it are collected, OpaqueJSClass + // is deleted (that's the part prevented by this RefPtr). + // 3. Another class is created at the same address. + // 4. When it is used, the old context data is found in JSGlobalData and used. + RefPtr m_class; + + OpaqueJSClassStaticValuesTable* staticValues; + OpaqueJSClassStaticFunctionsTable* staticFunctions; + JSC::WeakGCPtr cachedPrototype; +}; + +struct OpaqueJSClass : public ThreadSafeShared { + static PassRefPtr create(const JSClassDefinition*); + static PassRefPtr createNoAutomaticPrototype(const JSClassDefinition*); + ~OpaqueJSClass(); + + JSC::UString className(); + OpaqueJSClassStaticValuesTable* staticValues(JSC::ExecState*); + OpaqueJSClassStaticFunctionsTable* staticFunctions(JSC::ExecState*); + JSC::JSObject* prototype(JSC::ExecState*); + + OpaqueJSClass* parentClass; + OpaqueJSClass* prototypeClass; + + JSObjectInitializeCallback initialize; + JSObjectFinalizeCallback finalize; + JSObjectHasPropertyCallback hasProperty; + JSObjectGetPropertyCallback getProperty; + JSObjectSetPropertyCallback setProperty; + JSObjectDeletePropertyCallback deleteProperty; + JSObjectGetPropertyNamesCallback getPropertyNames; + JSObjectCallAsFunctionCallback callAsFunction; + JSObjectCallAsConstructorCallback callAsConstructor; + JSObjectHasInstanceCallback hasInstance; + JSObjectConvertToTypeCallback convertToType; + +private: + friend struct OpaqueJSClassContextData; + + OpaqueJSClass(); + OpaqueJSClass(const OpaqueJSClass&); + OpaqueJSClass(const JSClassDefinition*, OpaqueJSClass* protoClass); + + OpaqueJSClassContextData& contextData(JSC::ExecState*); + + // UStrings in these data members should not be put into any IdentifierTable. + JSC::UString m_className; + OpaqueJSClassStaticValuesTable* m_staticValues; + OpaqueJSClassStaticFunctionsTable* m_staticFunctions; +}; + +#endif // JSClassRef_h diff --git a/Source/JavaScriptCore/API/JSContextRef.cpp b/Source/JavaScriptCore/API/JSContextRef.cpp new file mode 100644 index 0000000..ccab953 --- /dev/null +++ b/Source/JavaScriptCore/API/JSContextRef.cpp @@ -0,0 +1,175 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSContextRef.h" +#include "JSContextRefPrivate.h" + +#include "APICast.h" +#include "InitializeThreading.h" +#include "JSCallbackObject.h" +#include "JSClassRef.h" +#include "JSGlobalObject.h" +#include "JSObject.h" +#include + +#if OS(DARWIN) +#include + +static const int32_t webkitFirstVersionWithConcurrentGlobalContexts = 0x2100500; // 528.5.0 +#endif + +using namespace JSC; + +JSContextGroupRef JSContextGroupCreate() +{ + initializeThreading(); + return toRef(JSGlobalData::createContextGroup(ThreadStackTypeSmall).leakRef()); +} + +JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) +{ + toJS(group)->ref(); + return group; +} + +void JSContextGroupRelease(JSContextGroupRef group) +{ + toJS(group)->deref(); +} + +JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) +{ + initializeThreading(); +#if OS(DARWIN) + // When running on Tiger or Leopard, or if the application was linked before JSGlobalContextCreate was changed + // to use a unique JSGlobalData, we use a shared one for compatibility. +#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) + if (NSVersionOfLinkTimeLibrary("JavaScriptCore") <= webkitFirstVersionWithConcurrentGlobalContexts) { +#else + { +#endif + JSLock lock(LockForReal); + return JSGlobalContextCreateInGroup(toRef(&JSGlobalData::sharedInstance()), globalObjectClass); + } +#endif // OS(DARWIN) + + return JSGlobalContextCreateInGroup(0, globalObjectClass); +} + +JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass) +{ + initializeThreading(); + + JSLock lock(LockForReal); + RefPtr globalData = group ? PassRefPtr(toJS(group)) : JSGlobalData::createContextGroup(ThreadStackTypeSmall); + + APIEntryShim entryShim(globalData.get(), false); + +#if ENABLE(JSC_MULTIPLE_THREADS) + globalData->makeUsableFromMultipleThreads(); +#endif + + if (!globalObjectClass) { + JSGlobalObject* globalObject = new (globalData.get()) JSGlobalObject; + return JSGlobalContextRetain(toGlobalRef(globalObject->globalExec())); + } + + JSGlobalObject* globalObject = new (globalData.get()) JSCallbackObject(globalObjectClass, JSCallbackObject::createStructure(jsNull())); + ExecState* exec = globalObject->globalExec(); + JSValue prototype = globalObjectClass->prototype(exec); + if (!prototype) + prototype = jsNull(); + globalObject->resetPrototype(prototype); + return JSGlobalContextRetain(toGlobalRef(exec)); +} + +JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSGlobalData& globalData = exec->globalData(); + gcProtect(exec->dynamicGlobalObject()); + globalData.ref(); + return ctx; +} + +void JSGlobalContextRelease(JSGlobalContextRef ctx) +{ + ExecState* exec = toJS(ctx); + JSLock lock(exec); + + JSGlobalData& globalData = exec->globalData(); + JSGlobalObject* dgo = exec->dynamicGlobalObject(); + IdentifierTable* savedIdentifierTable = wtfThreadData().setCurrentIdentifierTable(globalData.identifierTable); + + // One reference is held by JSGlobalObject, another added by JSGlobalContextRetain(). + bool releasingContextGroup = globalData.refCount() == 2; + bool releasingGlobalObject = Heap::heap(dgo)->unprotect(dgo); + // If this is the last reference to a global data, it should also + // be the only remaining reference to the global object too! + ASSERT(!releasingContextGroup || releasingGlobalObject); + + // An API 'JSGlobalContextRef' retains two things - a global object and a + // global data (or context group, in API terminology). + // * If this is the last reference to any contexts in the given context group, + // call destroy on the heap (the global data is being freed). + // * If this was the last reference to the global object, then unprotecting + // it may release a lot of GC memory - run the garbage collector now. + // * If there are more references remaining the the global object, then do nothing + // (specifically that is more protects, which we assume come from other JSGlobalContextRefs). + if (releasingContextGroup) + globalData.heap.destroy(); + else if (releasingGlobalObject) + globalData.heap.collectAllGarbage(); + + globalData.deref(); + + wtfThreadData().setCurrentIdentifierTable(savedIdentifierTable); +} + +JSObjectRef JSContextGetGlobalObject(JSContextRef ctx) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + // It is necessary to call toThisObject to get the wrapper object when used with WebCore. + return toRef(exec->lexicalGlobalObject()->toThisObject(exec)); +} + +JSContextGroupRef JSContextGetGroup(JSContextRef ctx) +{ + ExecState* exec = toJS(ctx); + return toRef(&exec->globalData()); +} + +JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + return toGlobalRef(exec->lexicalGlobalObject()->globalExec()); +} diff --git a/Source/JavaScriptCore/API/JSContextRef.h b/Source/JavaScriptCore/API/JSContextRef.h new file mode 100644 index 0000000..c5c8a71 --- /dev/null +++ b/Source/JavaScriptCore/API/JSContextRef.h @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSContextRef_h +#define JSContextRef_h + +#include +#include +#include + +#ifndef __cplusplus +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! +@function +@abstract Creates a JavaScript context group. +@discussion A JSContextGroup associates JavaScript contexts with one another. + Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging + JavaScript objects between contexts in different groups will produce undefined behavior. + When objects from the same context group are used in multiple threads, explicit + synchronization is required. +@result The created JSContextGroup. +*/ +JS_EXPORT JSContextGroupRef JSContextGroupCreate() AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! +@function +@abstract Retains a JavaScript context group. +@param group The JSContextGroup to retain. +@result A JSContextGroup that is the same as group. +*/ +JS_EXPORT JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! +@function +@abstract Releases a JavaScript context group. +@param group The JSContextGroup to release. +*/ +JS_EXPORT void JSContextGroupRelease(JSContextGroupRef group) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! +@function +@abstract Creates a global JavaScript execution context. +@discussion JSGlobalContextCreate allocates a global object and populates it with all the + built-in JavaScript objects, such as Object, Function, String, and Array. + + In WebKit version 4.0 and later, the context is created in a unique context group. + Therefore, scripts may execute in it concurrently with scripts executing in other contexts. + However, you may not use values created in the context in other contexts. +@param globalObjectClass The class to use when creating the global object. Pass + NULL to use the default object class. +@result A JSGlobalContext with a global object of class globalObjectClass. +*/ +JS_EXPORT JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER; + +/*! +@function +@abstract Creates a global JavaScript execution context in the context group provided. +@discussion JSGlobalContextCreateInGroup allocates a global object and populates it with + all the built-in JavaScript objects, such as Object, Function, String, and Array. +@param globalObjectClass The class to use when creating the global object. Pass + NULL to use the default object class. +@param group The context group to use. The created global context retains the group. + Pass NULL to create a unique group for the context. +@result A JSGlobalContext with a global object of class globalObjectClass and a context + group equal to group. +*/ +JS_EXPORT JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! +@function +@abstract Retains a global JavaScript execution context. +@param ctx The JSGlobalContext to retain. +@result A JSGlobalContext that is the same as ctx. +*/ +JS_EXPORT JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx); + +/*! +@function +@abstract Releases a global JavaScript execution context. +@param ctx The JSGlobalContext to release. +*/ +JS_EXPORT void JSGlobalContextRelease(JSGlobalContextRef ctx); + +/*! +@function +@abstract Gets the global object of a JavaScript execution context. +@param ctx The JSContext whose global object you want to get. +@result ctx's global object. +*/ +JS_EXPORT JSObjectRef JSContextGetGlobalObject(JSContextRef ctx); + +/*! +@function +@abstract Gets the context group to which a JavaScript execution context belongs. +@param ctx The JSContext whose group you want to get. +@result ctx's group. +*/ +JS_EXPORT JSContextGroupRef JSContextGetGroup(JSContextRef ctx) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +#ifdef __cplusplus +} +#endif + +#endif /* JSContextRef_h */ diff --git a/Source/JavaScriptCore/API/JSContextRefPrivate.h b/Source/JavaScriptCore/API/JSContextRefPrivate.h new file mode 100644 index 0000000..ff014ec --- /dev/null +++ b/Source/JavaScriptCore/API/JSContextRefPrivate.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2009 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSContextRefPrivate_h +#define JSContextRefPrivate_h + +#include +#include +#include + +#ifndef __cplusplus +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! +@function +@abstract Gets the global context of a JavaScript execution context. +@param ctx The JSContext whose global context you want to get. +@result ctx's global context. +*/ +JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx); + +#ifdef __cplusplus +} +#endif + +#endif /* JSContextRefPrivate_h */ diff --git a/Source/JavaScriptCore/API/JSObjectRef.cpp b/Source/JavaScriptCore/API/JSObjectRef.cpp new file mode 100644 index 0000000..4198ca8 --- /dev/null +++ b/Source/JavaScriptCore/API/JSObjectRef.cpp @@ -0,0 +1,544 @@ +/* + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSObjectRef.h" +#include "JSObjectRefPrivate.h" + +#include "APICast.h" +#include "CodeBlock.h" +#include "DateConstructor.h" +#include "ErrorConstructor.h" +#include "FunctionConstructor.h" +#include "Identifier.h" +#include "InitializeThreading.h" +#include "JSArray.h" +#include "JSCallbackConstructor.h" +#include "JSCallbackFunction.h" +#include "JSCallbackObject.h" +#include "JSClassRef.h" +#include "JSFunction.h" +#include "JSGlobalObject.h" +#include "JSObject.h" +#include "JSRetainPtr.h" +#include "JSString.h" +#include "JSValueRef.h" +#include "ObjectPrototype.h" +#include "PropertyNameArray.h" +#include "RegExpConstructor.h" + +using namespace JSC; + +JSClassRef JSClassCreate(const JSClassDefinition* definition) +{ + initializeThreading(); + RefPtr jsClass = (definition->attributes & kJSClassAttributeNoAutomaticPrototype) + ? OpaqueJSClass::createNoAutomaticPrototype(definition) + : OpaqueJSClass::create(definition); + + return jsClass.release().leakRef(); +} + +JSClassRef JSClassRetain(JSClassRef jsClass) +{ + jsClass->ref(); + return jsClass; +} + +void JSClassRelease(JSClassRef jsClass) +{ + jsClass->deref(); +} + +JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + if (!jsClass) + return toRef(new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure())); // slightly more efficient + + JSCallbackObject* object = new (exec) JSCallbackObject(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), jsClass, data); + if (JSObject* prototype = jsClass->prototype(exec)) + object->setPrototype(prototype); + + return toRef(object); +} + +JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous"); + + return toRef(new (exec) JSCallbackFunction(exec, exec->lexicalGlobalObject(), callAsFunction, nameID)); +} + +JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsPrototype = jsClass ? jsClass->prototype(exec) : 0; + if (!jsPrototype) + jsPrototype = exec->lexicalGlobalObject()->objectPrototype(); + + JSCallbackConstructor* constructor = new (exec) JSCallbackConstructor(exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackConstructorStructure(), jsClass, callAsConstructor); + constructor->putDirect(exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly); + return toRef(constructor); +} + +JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous"); + + MarkedArgumentBuffer args; + for (unsigned i = 0; i < parameterCount; i++) + args.append(jsString(exec, parameterNames[i]->ustring())); + args.append(jsString(exec, body->ustring())); + + JSObject* result = constructFunction(exec, args, nameID, sourceURL->ustring(), startingLineNumber); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + result = 0; + } + return toRef(result); +} + +JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* result; + if (argumentCount) { + MarkedArgumentBuffer argList; + for (size_t i = 0; i < argumentCount; ++i) + argList.append(toJS(exec, arguments[i])); + + result = constructArray(exec, argList); + } else + result = constructEmptyArray(exec); + + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + result = 0; + } + + return toRef(result); +} + +JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + MarkedArgumentBuffer argList; + for (size_t i = 0; i < argumentCount; ++i) + argList.append(toJS(exec, arguments[i])); + + JSObject* result = constructDate(exec, argList); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + result = 0; + } + + return toRef(result); +} + +JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue message = argumentCount ? toJS(exec, arguments[0]) : jsUndefined(); + Structure* errorStructure = exec->lexicalGlobalObject()->errorStructure(); + JSObject* result = ErrorInstance::create(exec, errorStructure, message); + + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + result = 0; + } + + return toRef(result); +} + +JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + MarkedArgumentBuffer argList; + for (size_t i = 0; i < argumentCount; ++i) + argList.append(toJS(exec, arguments[i])); + + JSObject* result = constructRegExp(exec, argList); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + result = 0; + } + + return toRef(result); +} + +JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + return toRef(exec, jsObject->prototype()); +} + +void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + JSValue jsValue = toJS(exec, value); + + jsObject->setPrototypeWithCycleCheck(jsValue.isObject() ? jsValue : jsNull()); +} + +bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + + return jsObject->hasProperty(exec, propertyName->identifier(&exec->globalData())); +} + +JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + + JSValue jsValue = jsObject->get(exec, propertyName->identifier(&exec->globalData())); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + } + return toRef(exec, jsValue); +} + +void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + Identifier name(propertyName->identifier(&exec->globalData())); + JSValue jsValue = toJS(exec, value); + + if (attributes && !jsObject->hasProperty(exec, name)) + jsObject->putWithAttributes(exec, name, jsValue, attributes); + else { + PutPropertySlot slot; + jsObject->put(exec, name, jsValue, slot); + } + + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + } +} + +JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + + JSValue jsValue = jsObject->get(exec, propertyIndex); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + } + return toRef(exec, jsValue); +} + + +void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + JSValue jsValue = toJS(exec, value); + + jsObject->put(exec, propertyIndex, jsValue); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + } +} + +bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + + bool result = jsObject->deleteProperty(exec, propertyName->identifier(&exec->globalData())); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + } + return result; +} + +void* JSObjectGetPrivate(JSObjectRef object) +{ + JSObject* jsObject = toJS(object); + + if (jsObject->inherits(&JSCallbackObject::info)) + return static_cast*>(jsObject)->getPrivate(); + else if (jsObject->inherits(&JSCallbackObject::info)) + return static_cast*>(jsObject)->getPrivate(); + + return 0; +} + +bool JSObjectSetPrivate(JSObjectRef object, void* data) +{ + JSObject* jsObject = toJS(object); + + if (jsObject->inherits(&JSCallbackObject::info)) { + static_cast*>(jsObject)->setPrivate(data); + return true; + } else if (jsObject->inherits(&JSCallbackObject::info)) { + static_cast*>(jsObject)->setPrivate(data); + return true; + } + + return false; +} + +JSValueRef JSObjectGetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + JSObject* jsObject = toJS(object); + JSValue result; + Identifier name(propertyName->identifier(&exec->globalData())); + if (jsObject->inherits(&JSCallbackObject::info)) + result = static_cast*>(jsObject)->getPrivateProperty(name); + else if (jsObject->inherits(&JSCallbackObject::info)) + result = static_cast*>(jsObject)->getPrivateProperty(name); + return toRef(exec, result); +} + +bool JSObjectSetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + JSObject* jsObject = toJS(object); + JSValue jsValue = value ? toJS(exec, value) : JSValue(); + Identifier name(propertyName->identifier(&exec->globalData())); + if (jsObject->inherits(&JSCallbackObject::info)) { + static_cast*>(jsObject)->setPrivateProperty(name, jsValue); + return true; + } + if (jsObject->inherits(&JSCallbackObject::info)) { + static_cast*>(jsObject)->setPrivateProperty(name, jsValue); + return true; + } + return false; +} + +bool JSObjectDeletePrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + JSObject* jsObject = toJS(object); + Identifier name(propertyName->identifier(&exec->globalData())); + if (jsObject->inherits(&JSCallbackObject::info)) { + static_cast*>(jsObject)->deletePrivateProperty(name); + return true; + } + if (jsObject->inherits(&JSCallbackObject::info)) { + static_cast*>(jsObject)->deletePrivateProperty(name); + return true; + } + return false; +} + +bool JSObjectIsFunction(JSContextRef, JSObjectRef object) +{ + CallData callData; + return toJS(object)->getCallData(callData) != CallTypeNone; +} + +JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + JSObject* jsThisObject = toJS(thisObject); + + if (!jsThisObject) + jsThisObject = exec->globalThisValue(); + + MarkedArgumentBuffer argList; + for (size_t i = 0; i < argumentCount; i++) + argList.append(toJS(exec, arguments[i])); + + CallData callData; + CallType callType = jsObject->getCallData(callData); + if (callType == CallTypeNone) + return 0; + + JSValueRef result = toRef(exec, call(exec, jsObject, callType, callData, jsThisObject, argList)); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + result = 0; + } + return result; +} + +bool JSObjectIsConstructor(JSContextRef, JSObjectRef object) +{ + JSObject* jsObject = toJS(object); + ConstructData constructData; + return jsObject->getConstructData(constructData) != ConstructTypeNone; +} + +JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSObject* jsObject = toJS(object); + + ConstructData constructData; + ConstructType constructType = jsObject->getConstructData(constructData); + if (constructType == ConstructTypeNone) + return 0; + + MarkedArgumentBuffer argList; + for (size_t i = 0; i < argumentCount; i++) + argList.append(toJS(exec, arguments[i])); + JSObjectRef result = toRef(construct(exec, jsObject, constructType, constructData, argList)); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + result = 0; + } + return result; +} + +struct OpaqueJSPropertyNameArray : FastAllocBase { + OpaqueJSPropertyNameArray(JSGlobalData* globalData) + : refCount(0) + , globalData(globalData) + { + } + + unsigned refCount; + JSGlobalData* globalData; + Vector > array; +}; + +JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object) +{ + JSObject* jsObject = toJS(object); + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSGlobalData* globalData = &exec->globalData(); + + JSPropertyNameArrayRef propertyNames = new OpaqueJSPropertyNameArray(globalData); + PropertyNameArray array(globalData); + jsObject->getPropertyNames(exec, array); + + size_t size = array.size(); + propertyNames->array.reserveInitialCapacity(size); + for (size_t i = 0; i < size; ++i) + propertyNames->array.append(JSRetainPtr(Adopt, OpaqueJSString::create(array[i].ustring()).leakRef())); + + return JSPropertyNameArrayRetain(propertyNames); +} + +JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array) +{ + ++array->refCount; + return array; +} + +void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array) +{ + if (--array->refCount == 0) { + APIEntryShim entryShim(array->globalData, false); + delete array; + } +} + +size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array) +{ + return array->array.size(); +} + +JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index) +{ + return array->array[static_cast(index)].get(); +} + +void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStringRef propertyName) +{ + PropertyNameArray* propertyNames = toJS(array); + APIEntryShim entryShim(propertyNames->globalData()); + propertyNames->add(propertyName->identifier(propertyNames->globalData())); +} diff --git a/Source/JavaScriptCore/API/JSObjectRef.h b/Source/JavaScriptCore/API/JSObjectRef.h new file mode 100644 index 0000000..3e8b0eb --- /dev/null +++ b/Source/JavaScriptCore/API/JSObjectRef.h @@ -0,0 +1,694 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSObjectRef_h +#define JSObjectRef_h + +#include +#include +#include + +#ifndef __cplusplus +#include +#endif +#include /* for size_t */ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! +@enum JSPropertyAttribute +@constant kJSPropertyAttributeNone Specifies that a property has no special attributes. +@constant kJSPropertyAttributeReadOnly Specifies that a property is read-only. +@constant kJSPropertyAttributeDontEnum Specifies that a property should not be enumerated by JSPropertyEnumerators and JavaScript for...in loops. +@constant kJSPropertyAttributeDontDelete Specifies that the delete operation should fail on a property. +*/ +enum { + kJSPropertyAttributeNone = 0, + kJSPropertyAttributeReadOnly = 1 << 1, + kJSPropertyAttributeDontEnum = 1 << 2, + kJSPropertyAttributeDontDelete = 1 << 3 +}; + +/*! +@typedef JSPropertyAttributes +@abstract A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together. +*/ +typedef unsigned JSPropertyAttributes; + +/*! +@enum JSClassAttribute +@constant kJSClassAttributeNone Specifies that a class has no special attributes. +@constant kJSClassAttributeNoAutomaticPrototype Specifies that a class should not automatically generate a shared prototype for its instance objects. Use kJSClassAttributeNoAutomaticPrototype in combination with JSObjectSetPrototype to manage prototypes manually. +*/ +enum { + kJSClassAttributeNone = 0, + kJSClassAttributeNoAutomaticPrototype = 1 << 1 +}; + +/*! +@typedef JSClassAttributes +@abstract A set of JSClassAttributes. Combine multiple attributes by logically ORing them together. +*/ +typedef unsigned JSClassAttributes; + +/*! +@typedef JSObjectInitializeCallback +@abstract The callback invoked when an object is first created. +@param ctx The execution context to use. +@param object The JSObject being created. +@discussion If you named your function Initialize, you would declare it like this: + +void Initialize(JSContextRef ctx, JSObjectRef object); + +Unlike the other object callbacks, the initialize callback is called on the least +derived class (the parent class) first, and the most derived class last. +*/ +typedef void +(*JSObjectInitializeCallback) (JSContextRef ctx, JSObjectRef object); + +/*! +@typedef JSObjectFinalizeCallback +@abstract The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread. +@param object The JSObject being finalized. +@discussion If you named your function Finalize, you would declare it like this: + +void Finalize(JSObjectRef object); + +The finalize callback is called on the most derived class first, and the least +derived class (the parent class) last. + +You must not call any function that may cause a garbage collection or an allocation +of a garbage collected object from within a JSObjectFinalizeCallback. This includes +all functions that have a JSContextRef parameter. +*/ +typedef void +(*JSObjectFinalizeCallback) (JSObjectRef object); + +/*! +@typedef JSObjectHasPropertyCallback +@abstract The callback invoked when determining whether an object has a property. +@param ctx The execution context to use. +@param object The JSObject to search for the property. +@param propertyName A JSString containing the name of the property look up. +@result true if object has the property, otherwise false. +@discussion If you named your function HasProperty, you would declare it like this: + +bool HasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); + +If this function returns false, the hasProperty request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain. + +This callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value would be expensive. + +If this callback is NULL, the getProperty callback will be used to service hasProperty requests. +*/ +typedef bool +(*JSObjectHasPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); + +/*! +@typedef JSObjectGetPropertyCallback +@abstract The callback invoked when getting a property's value. +@param ctx The execution context to use. +@param object The JSObject to search for the property. +@param propertyName A JSString containing the name of the property to get. +@param exception A pointer to a JSValueRef in which to return an exception, if any. +@result The property's value if object has the property, otherwise NULL. +@discussion If you named your function GetProperty, you would declare it like this: + +JSValueRef GetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); + +If this function returns NULL, the get request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain. +*/ +typedef JSValueRef +(*JSObjectGetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); + +/*! +@typedef JSObjectSetPropertyCallback +@abstract The callback invoked when setting a property's value. +@param ctx The execution context to use. +@param object The JSObject on which to set the property's value. +@param propertyName A JSString containing the name of the property to set. +@param value A JSValue to use as the property's value. +@param exception A pointer to a JSValueRef in which to return an exception, if any. +@result true if the property was set, otherwise false. +@discussion If you named your function SetProperty, you would declare it like this: + +bool SetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); + +If this function returns false, the set request forwards to object's statically declared properties, then its parent class chain (which includes the default object class). +*/ +typedef bool +(*JSObjectSetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception); + +/*! +@typedef JSObjectDeletePropertyCallback +@abstract The callback invoked when deleting a property. +@param ctx The execution context to use. +@param object The JSObject in which to delete the property. +@param propertyName A JSString containing the name of the property to delete. +@param exception A pointer to a JSValueRef in which to return an exception, if any. +@result true if propertyName was successfully deleted, otherwise false. +@discussion If you named your function DeleteProperty, you would declare it like this: + +bool DeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); + +If this function returns false, the delete request forwards to object's statically declared properties, then its parent class chain (which includes the default object class). +*/ +typedef bool +(*JSObjectDeletePropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); + +/*! +@typedef JSObjectGetPropertyNamesCallback +@abstract The callback invoked when collecting the names of an object's properties. +@param ctx The execution context to use. +@param object The JSObject whose property names are being collected. +@param accumulator A JavaScript property name accumulator in which to accumulate the names of object's properties. +@discussion If you named your function GetPropertyNames, you would declare it like this: + +void GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); + +Property name accumulators are used by JSObjectCopyPropertyNames and JavaScript for...in loops. + +Use JSPropertyNameAccumulatorAddName to add property names to accumulator. A class's getPropertyNames callback only needs to provide the names of properties that the class vends through a custom getProperty or setProperty callback. Other properties, including statically declared properties, properties vended by other classes, and properties belonging to object's prototype, are added independently. +*/ +typedef void +(*JSObjectGetPropertyNamesCallback) (JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); + +/*! +@typedef JSObjectCallAsFunctionCallback +@abstract The callback invoked when an object is called as a function. +@param ctx The execution context to use. +@param function A JSObject that is the function being called. +@param thisObject A JSObject that is the 'this' variable in the function's scope. +@param argumentCount An integer count of the number of arguments in arguments. +@param arguments A JSValue array of the arguments passed to the function. +@param exception A pointer to a JSValueRef in which to return an exception, if any. +@result A JSValue that is the function's return value. +@discussion If you named your function CallAsFunction, you would declare it like this: + +JSValueRef CallAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +If your callback were invoked by the JavaScript expression 'myObject.myFunction()', function would be set to myFunction, and thisObject would be set to myObject. + +If this callback is NULL, calling your object as a function will throw an exception. +*/ +typedef JSValueRef +(*JSObjectCallAsFunctionCallback) (JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +/*! +@typedef JSObjectCallAsConstructorCallback +@abstract The callback invoked when an object is used as a constructor in a 'new' expression. +@param ctx The execution context to use. +@param constructor A JSObject that is the constructor being called. +@param argumentCount An integer count of the number of arguments in arguments. +@param arguments A JSValue array of the arguments passed to the function. +@param exception A pointer to a JSValueRef in which to return an exception, if any. +@result A JSObject that is the constructor's return value. +@discussion If you named your function CallAsConstructor, you would declare it like this: + +JSObjectRef CallAsConstructor(JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +If your callback were invoked by the JavaScript expression 'new myConstructor()', constructor would be set to myConstructor. + +If this callback is NULL, using your object as a constructor in a 'new' expression will throw an exception. +*/ +typedef JSObjectRef +(*JSObjectCallAsConstructorCallback) (JSContextRef ctx, JSObjectRef constructor, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +/*! +@typedef JSObjectHasInstanceCallback +@abstract hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression. +@param ctx The execution context to use. +@param constructor The JSObject that is the target of the 'instanceof' expression. +@param possibleInstance The JSValue being tested to determine if it is an instance of constructor. +@param exception A pointer to a JSValueRef in which to return an exception, if any. +@result true if possibleInstance is an instance of constructor, otherwise false. +@discussion If you named your function HasInstance, you would declare it like this: + +bool HasInstance(JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception); + +If your callback were invoked by the JavaScript expression 'someValue instanceof myObject', constructor would be set to myObject and possibleInstance would be set to someValue. + +If this callback is NULL, 'instanceof' expressions that target your object will return false. + +Standard JavaScript practice calls for objects that implement the callAsConstructor callback to implement the hasInstance callback as well. +*/ +typedef bool +(*JSObjectHasInstanceCallback) (JSContextRef ctx, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception); + +/*! +@typedef JSObjectConvertToTypeCallback +@abstract The callback invoked when converting an object to a particular JavaScript type. +@param ctx The execution context to use. +@param object The JSObject to convert. +@param type A JSType specifying the JavaScript type to convert to. +@param exception A pointer to a JSValueRef in which to return an exception, if any. +@result The objects's converted value, or NULL if the object was not converted. +@discussion If you named your function ConvertToType, you would declare it like this: + +JSValueRef ConvertToType(JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception); + +If this function returns false, the conversion request forwards to object's parent class chain (which includes the default object class). + +This function is only invoked when converting an object to number or string. An object converted to boolean is 'true.' An object converted to object is itself. +*/ +typedef JSValueRef +(*JSObjectConvertToTypeCallback) (JSContextRef ctx, JSObjectRef object, JSType type, JSValueRef* exception); + +/*! +@struct JSStaticValue +@abstract This structure describes a statically declared value property. +@field name A null-terminated UTF8 string containing the property's name. +@field getProperty A JSObjectGetPropertyCallback to invoke when getting the property's value. +@field setProperty A JSObjectSetPropertyCallback to invoke when setting the property's value. May be NULL if the ReadOnly attribute is set. +@field attributes A logically ORed set of JSPropertyAttributes to give to the property. +*/ +typedef struct { + const char* const name; + JSObjectGetPropertyCallback getProperty; + JSObjectSetPropertyCallback setProperty; + JSPropertyAttributes attributes; +} JSStaticValue; + +/*! +@struct JSStaticFunction +@abstract This structure describes a statically declared function property. +@field name A null-terminated UTF8 string containing the property's name. +@field callAsFunction A JSObjectCallAsFunctionCallback to invoke when the property is called as a function. +@field attributes A logically ORed set of JSPropertyAttributes to give to the property. +*/ +typedef struct { + const char* const name; + JSObjectCallAsFunctionCallback callAsFunction; + JSPropertyAttributes attributes; +} JSStaticFunction; + +/*! +@struct JSClassDefinition +@abstract This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL. +@field version The version number of this structure. The current version is 0. +@field attributes A logically ORed set of JSClassAttributes to give to the class. +@field className A null-terminated UTF8 string containing the class's name. +@field parentClass A JSClass to set as the class's parent class. Pass NULL use the default object class. +@field staticValues A JSStaticValue array containing the class's statically declared value properties. Pass NULL to specify no statically declared value properties. The array must be terminated by a JSStaticValue whose name field is NULL. +@field staticFunctions A JSStaticFunction array containing the class's statically declared function properties. Pass NULL to specify no statically declared function properties. The array must be terminated by a JSStaticFunction whose name field is NULL. +@field initialize The callback invoked when an object is first created. Use this callback to initialize the object. +@field finalize The callback invoked when an object is finalized (prepared for garbage collection). Use this callback to release resources allocated for the object, and perform other cleanup. +@field hasProperty The callback invoked when determining whether an object has a property. If this field is NULL, getProperty is called instead. The hasProperty callback enables optimization in cases where only a property's existence needs to be known, not its value, and computing its value is expensive. +@field getProperty The callback invoked when getting a property's value. +@field setProperty The callback invoked when setting a property's value. +@field deleteProperty The callback invoked when deleting a property. +@field getPropertyNames The callback invoked when collecting the names of an object's properties. +@field callAsFunction The callback invoked when an object is called as a function. +@field hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression. +@field callAsConstructor The callback invoked when an object is used as a constructor in a 'new' expression. +@field convertToType The callback invoked when converting an object to a particular JavaScript type. +@discussion The staticValues and staticFunctions arrays are the simplest and most efficient means for vending custom properties. Statically declared properties autmatically service requests like getProperty, setProperty, and getPropertyNames. Property access callbacks are required only to implement unusual properties, like array indexes, whose names are not known at compile-time. + +If you named your getter function "GetX" and your setter function "SetX", you would declare a JSStaticValue array containing "X" like this: + +JSStaticValue StaticValueArray[] = { + { "X", GetX, SetX, kJSPropertyAttributeNone }, + { 0, 0, 0, 0 } +}; + +Standard JavaScript practice calls for storing function objects in prototypes, so they can be shared. The default JSClass created by JSClassCreate follows this idiom, instantiating objects with a shared, automatically generating prototype containing the class's function objects. The kJSClassAttributeNoAutomaticPrototype attribute specifies that a JSClass should not automatically generate such a prototype. The resulting JSClass instantiates objects with the default object prototype, and gives each instance object its own copy of the class's function objects. + +A NULL callback specifies that the default object callback should substitute, except in the case of hasProperty, where it specifies that getProperty should substitute. +*/ +typedef struct { + int version; /* current (and only) version is 0 */ + JSClassAttributes attributes; + + const char* className; + JSClassRef parentClass; + + const JSStaticValue* staticValues; + const JSStaticFunction* staticFunctions; + + JSObjectInitializeCallback initialize; + JSObjectFinalizeCallback finalize; + JSObjectHasPropertyCallback hasProperty; + JSObjectGetPropertyCallback getProperty; + JSObjectSetPropertyCallback setProperty; + JSObjectDeletePropertyCallback deleteProperty; + JSObjectGetPropertyNamesCallback getPropertyNames; + JSObjectCallAsFunctionCallback callAsFunction; + JSObjectCallAsConstructorCallback callAsConstructor; + JSObjectHasInstanceCallback hasInstance; + JSObjectConvertToTypeCallback convertToType; +} JSClassDefinition; + +/*! +@const kJSClassDefinitionEmpty +@abstract A JSClassDefinition structure of the current version, filled with NULL pointers and having no attributes. +@discussion Use this constant as a convenience when creating class definitions. For example, to create a class definition with only a finalize method: + +JSClassDefinition definition = kJSClassDefinitionEmpty; +definition.finalize = Finalize; +*/ +JS_EXPORT extern const JSClassDefinition kJSClassDefinitionEmpty; + +/*! +@function +@abstract Creates a JavaScript class suitable for use with JSObjectMake. +@param definition A JSClassDefinition that defines the class. +@result A JSClass with the given definition. Ownership follows the Create Rule. +*/ +JS_EXPORT JSClassRef JSClassCreate(const JSClassDefinition* definition); + +/*! +@function +@abstract Retains a JavaScript class. +@param jsClass The JSClass to retain. +@result A JSClass that is the same as jsClass. +*/ +JS_EXPORT JSClassRef JSClassRetain(JSClassRef jsClass); + +/*! +@function +@abstract Releases a JavaScript class. +@param jsClass The JSClass to release. +*/ +JS_EXPORT void JSClassRelease(JSClassRef jsClass); + +/*! +@function +@abstract Creates a JavaScript object. +@param ctx The execution context to use. +@param jsClass The JSClass to assign to the object. Pass NULL to use the default object class. +@param data A void* to set as the object's private data. Pass NULL to specify no private data. +@result A JSObject with the given class and private data. +@discussion The default object class does not allocate storage for private data, so you must provide a non-NULL jsClass to JSObjectMake if you want your object to be able to store private data. + +data is set on the created object before the intialize methods in its class chain are called. This enables the initialize methods to retrieve and manipulate data through JSObjectGetPrivate. +*/ +JS_EXPORT JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data); + +/*! +@function +@abstract Convenience method for creating a JavaScript function with a given callback as its implementation. +@param ctx The execution context to use. +@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. +@param callAsFunction The JSObjectCallAsFunctionCallback to invoke when the function is called. +@result A JSObject that is a function. The object's prototype will be the default function prototype. +*/ +JS_EXPORT JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction); + +/*! +@function +@abstract Convenience method for creating a JavaScript constructor. +@param ctx The execution context to use. +@param jsClass A JSClass that is the class your constructor will assign to the objects its constructs. jsClass will be used to set the constructor's .prototype property, and to evaluate 'instanceof' expressions. Pass NULL to use the default object class. +@param callAsConstructor A JSObjectCallAsConstructorCallback to invoke when your constructor is used in a 'new' expression. Pass NULL to use the default object constructor. +@result A JSObject that is a constructor. The object's prototype will be the default object prototype. +@discussion The default object constructor takes no arguments and constructs an object of class jsClass with no private data. +*/ +JS_EXPORT JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor); + +/*! + @function + @abstract Creates a JavaScript Array object. + @param ctx The execution context to use. + @param argumentCount An integer count of the number of arguments in arguments. + @param arguments A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0. + @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. + @result A JSObject that is an Array. + @discussion The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument + is supplied, this function returns an array with one element. + */ +JS_EXPORT JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! + @function + @abstract Creates a JavaScript Date object, as if by invoking the built-in Date constructor. + @param ctx The execution context to use. + @param argumentCount An integer count of the number of arguments in arguments. + @param arguments A JSValue array of arguments to pass to the Date Constructor. Pass NULL if argumentCount is 0. + @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. + @result A JSObject that is a Date. + */ +JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! + @function + @abstract Creates a JavaScript Error object, as if by invoking the built-in Error constructor. + @param ctx The execution context to use. + @param argumentCount An integer count of the number of arguments in arguments. + @param arguments A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0. + @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. + @result A JSObject that is a Error. + */ +JS_EXPORT JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! + @function + @abstract Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor. + @param ctx The execution context to use. + @param argumentCount An integer count of the number of arguments in arguments. + @param arguments A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0. + @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. + @result A JSObject that is a RegExp. + */ +JS_EXPORT JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) AVAILABLE_IN_WEBKIT_VERSION_4_0; + +/*! +@function +@abstract Creates a function with a given script as its body. +@param ctx The execution context to use. +@param name A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. +@param parameterCount An integer count of the number of parameter names in parameterNames. +@param parameterNames A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0. +@param body A JSString containing the script to use as the function's body. +@param sourceURL A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. +@param startingLineNumber An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. +@param exception A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. +@result A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object's prototype will be the default function prototype. +@discussion Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution. +*/ +JS_EXPORT JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception); + +/*! +@function +@abstract Gets an object's prototype. +@param ctx The execution context to use. +@param object A JSObject whose prototype you want to get. +@result A JSValue that is the object's prototype. +*/ +JS_EXPORT JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object); + +/*! +@function +@abstract Sets an object's prototype. +@param ctx The execution context to use. +@param object The JSObject whose prototype you want to set. +@param value A JSValue to set as the object's prototype. +*/ +JS_EXPORT void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value); + +/*! +@function +@abstract Tests whether an object has a given property. +@param object The JSObject to test. +@param propertyName A JSString containing the property's name. +@result true if the object has a property whose name matches propertyName, otherwise false. +*/ +JS_EXPORT bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); + +/*! +@function +@abstract Gets a property from an object. +@param ctx The execution context to use. +@param object The JSObject whose property you want to get. +@param propertyName A JSString containing the property's name. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result The property's value if object has the property, otherwise the undefined value. +*/ +JS_EXPORT JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); + +/*! +@function +@abstract Sets a property on an object. +@param ctx The execution context to use. +@param object The JSObject whose property you want to set. +@param propertyName A JSString containing the property's name. +@param value A JSValue to use as the property's value. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@param attributes A logically ORed set of JSPropertyAttributes to give to the property. +*/ +JS_EXPORT void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception); + +/*! +@function +@abstract Deletes a property from an object. +@param ctx The execution context to use. +@param object The JSObject whose property you want to delete. +@param propertyName A JSString containing the property's name. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set). +*/ +JS_EXPORT bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception); + +/*! +@function +@abstract Gets a property from an object by numeric index. +@param ctx The execution context to use. +@param object The JSObject whose property you want to get. +@param propertyIndex An integer value that is the property's name. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result The property's value if object has the property, otherwise the undefined value. +@discussion Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties. +*/ +JS_EXPORT JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception); + +/*! +@function +@abstract Sets a property on an object by numeric index. +@param ctx The execution context to use. +@param object The JSObject whose property you want to set. +@param propertyIndex The property's name as a number. +@param value A JSValue to use as the property's value. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@discussion Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties. +*/ +JS_EXPORT void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception); + +/*! +@function +@abstract Gets an object's private data. +@param object A JSObject whose private data you want to get. +@result A void* that is the object's private data, if the object has private data, otherwise NULL. +*/ +JS_EXPORT void* JSObjectGetPrivate(JSObjectRef object); + +/*! +@function +@abstract Sets a pointer to private data on an object. +@param object The JSObject whose private data you want to set. +@param data A void* to set as the object's private data. +@result true if object can store private data, otherwise false. +@discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data. +*/ +JS_EXPORT bool JSObjectSetPrivate(JSObjectRef object, void* data); + +/*! +@function +@abstract Tests whether an object can be called as a function. +@param ctx The execution context to use. +@param object The JSObject to test. +@result true if the object can be called as a function, otherwise false. +*/ +JS_EXPORT bool JSObjectIsFunction(JSContextRef ctx, JSObjectRef object); + +/*! +@function +@abstract Calls an object as a function. +@param ctx The execution context to use. +@param object The JSObject to call as a function. +@param thisObject The object to use as "this," or NULL to use the global object as "this." +@param argumentCount An integer count of the number of arguments in arguments. +@param arguments A JSValue array of arguments to pass to the function. Pass NULL if argumentCount is 0. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result The JSValue that results from calling object as a function, or NULL if an exception is thrown or object is not a function. +*/ +JS_EXPORT JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +/*! +@function +@abstract Tests whether an object can be called as a constructor. +@param ctx The execution context to use. +@param object The JSObject to test. +@result true if the object can be called as a constructor, otherwise false. +*/ +JS_EXPORT bool JSObjectIsConstructor(JSContextRef ctx, JSObjectRef object); + +/*! +@function +@abstract Calls an object as a constructor. +@param ctx The execution context to use. +@param object The JSObject to call as a constructor. +@param argumentCount An integer count of the number of arguments in arguments. +@param arguments A JSValue array of arguments to pass to the constructor. Pass NULL if argumentCount is 0. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor. +*/ +JS_EXPORT JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +/*! +@function +@abstract Gets the names of an object's enumerable properties. +@param ctx The execution context to use. +@param object The object whose property names you want to get. +@result A JSPropertyNameArray containing the names object's enumerable properties. Ownership follows the Create Rule. +*/ +JS_EXPORT JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object); + +/*! +@function +@abstract Retains a JavaScript property name array. +@param array The JSPropertyNameArray to retain. +@result A JSPropertyNameArray that is the same as array. +*/ +JS_EXPORT JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array); + +/*! +@function +@abstract Releases a JavaScript property name array. +@param array The JSPropetyNameArray to release. +*/ +JS_EXPORT void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array); + +/*! +@function +@abstract Gets a count of the number of items in a JavaScript property name array. +@param array The array from which to retrieve the count. +@result An integer count of the number of names in array. +*/ +JS_EXPORT size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array); + +/*! +@function +@abstract Gets a property name at a given index in a JavaScript property name array. +@param array The array from which to retrieve the property name. +@param index The index of the property name to retrieve. +@result A JSStringRef containing the property name. +*/ +JS_EXPORT JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index); + +/*! +@function +@abstract Adds a property name to a JavaScript property name accumulator. +@param accumulator The accumulator object to which to add the property name. +@param propertyName The property name to add. +*/ +JS_EXPORT void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef accumulator, JSStringRef propertyName); + +#ifdef __cplusplus +} +#endif + +#endif /* JSObjectRef_h */ diff --git a/Source/JavaScriptCore/API/JSObjectRefPrivate.h b/Source/JavaScriptCore/API/JSObjectRefPrivate.h new file mode 100644 index 0000000..32e80ab --- /dev/null +++ b/Source/JavaScriptCore/API/JSObjectRefPrivate.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSObjectRefPrivate_h +#define JSObjectRefPrivate_h + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + @function + @abstract Sets a private property on an object. This private property cannot be accessed from within JavaScript. + @param ctx The execution context to use. + @param object The JSObject whose private property you want to set. + @param propertyName A JSString containing the property's name. + @param value A JSValue to use as the property's value. This may be NULL. + @result true if object can store private data, otherwise false. + @discussion This API allows you to store JS values directly an object in a way that will be ensure that they are kept alive without exposing them to JavaScript code and without introducing the reference cycles that may occur when using JSValueProtect. + + The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private properties. + */ +JS_EXPORT bool JSObjectSetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value); + +/*! + @function + @abstract Gets a private property from an object. + @param ctx The execution context to use. + @param object The JSObject whose private property you want to get. + @param propertyName A JSString containing the property's name. + @result The property's value if object has the property, otherwise NULL. + */ +JS_EXPORT JSValueRef JSObjectGetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); + +/*! + @function + @abstract Deletes a private property from an object. + @param ctx The execution context to use. + @param object The JSObject whose private property you want to delete. + @param propertyName A JSString containing the property's name. + @result true if object can store private data, otherwise false. + @discussion The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data. + */ +JS_EXPORT bool JSObjectDeletePrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName); + +#ifdef __cplusplus +} +#endif + +#endif // JSObjectRefPrivate_h diff --git a/Source/JavaScriptCore/API/JSProfilerPrivate.cpp b/Source/JavaScriptCore/API/JSProfilerPrivate.cpp new file mode 100644 index 0000000..ea277f0 --- /dev/null +++ b/Source/JavaScriptCore/API/JSProfilerPrivate.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSProfilerPrivate.h" + +#include "APICast.h" +#include "OpaqueJSString.h" +#include "Profiler.h" + +using namespace JSC; + +void JSStartProfiling(JSContextRef ctx, JSStringRef title) +{ + Profiler::profiler()->startProfiling(toJS(ctx), title->ustring()); +} + +void JSEndProfiling(JSContextRef ctx, JSStringRef title) +{ + ExecState* exec = toJS(ctx); + Profiler* profiler = Profiler::profiler(); + profiler->stopProfiling(exec, title->ustring()); +} + diff --git a/Source/JavaScriptCore/API/JSProfilerPrivate.h b/Source/JavaScriptCore/API/JSProfilerPrivate.h new file mode 100644 index 0000000..b3fe533 --- /dev/null +++ b/Source/JavaScriptCore/API/JSProfilerPrivate.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSProfiler_h +#define JSProfiler_h + +#include + +#ifndef __cplusplus +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! +@function JSStartProfiling +@abstract Enables the profler. +@param ctx The execution context to use. +@param title The title of the profile. +@result The profiler is turned on. +*/ +JS_EXPORT void JSStartProfiling(JSContextRef ctx, JSStringRef title); + +/*! +@function JSEndProfiling +@abstract Disables the profler. +@param ctx The execution context to use. +@param title The title of the profile. +@result The profiler is turned off. If there is no name, the most recently started + profile is stopped. If the name does not match any profile then no profile + is stopped. +*/ +JS_EXPORT void JSEndProfiling(JSContextRef ctx, JSStringRef title); + +#ifdef __cplusplus +} +#endif + +#endif /* JSProfiler_h */ diff --git a/Source/JavaScriptCore/API/JSRetainPtr.h b/Source/JavaScriptCore/API/JSRetainPtr.h new file mode 100644 index 0000000..a884f38 --- /dev/null +++ b/Source/JavaScriptCore/API/JSRetainPtr.h @@ -0,0 +1,208 @@ +/* + * Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSRetainPtr_h +#define JSRetainPtr_h + +#include +#include + +inline void JSRetain(JSStringRef string) { JSStringRetain(string); } +inline void JSRelease(JSStringRef string) { JSStringRelease(string); } + +enum AdoptTag { Adopt }; + +template class JSRetainPtr { +public: + JSRetainPtr() : m_ptr(0) { } + JSRetainPtr(T ptr) : m_ptr(ptr) { if (ptr) JSRetain(ptr); } + JSRetainPtr(AdoptTag, T ptr) : m_ptr(ptr) { } + JSRetainPtr(const JSRetainPtr&); + template JSRetainPtr(const JSRetainPtr&); + ~JSRetainPtr(); + + T get() const { return m_ptr; } + + void clear(); + T leakRef(); + + T operator->() const { return m_ptr; } + + bool operator!() const { return !m_ptr; } + + // This conversion operator allows implicit conversion to bool but not to other integer types. + typedef T JSRetainPtr::*UnspecifiedBoolType; + operator UnspecifiedBoolType() const { return m_ptr ? &JSRetainPtr::m_ptr : 0; } + + JSRetainPtr& operator=(const JSRetainPtr&); + template JSRetainPtr& operator=(const JSRetainPtr&); + JSRetainPtr& operator=(T); + template JSRetainPtr& operator=(U*); + + void adopt(T); + + void swap(JSRetainPtr&); + + // FIXME: Remove releaseRef once we change all callers to call leakRef instead. + T releaseRef() { return leakRef(); } + +private: + T m_ptr; +}; + +template inline JSRetainPtr::JSRetainPtr(const JSRetainPtr& o) + : m_ptr(o.m_ptr) +{ + if (m_ptr) + JSRetain(m_ptr); +} + +template template inline JSRetainPtr::JSRetainPtr(const JSRetainPtr& o) + : m_ptr(o.get()) +{ + if (m_ptr) + JSRetain(m_ptr); +} + +template inline JSRetainPtr::~JSRetainPtr() +{ + if (m_ptr) + JSRelease(m_ptr); +} + +template inline void JSRetainPtr::clear() +{ + if (T ptr = m_ptr) { + m_ptr = 0; + JSRelease(ptr); + } +} + +template inline T JSRetainPtr::leakRef() +{ + T ptr = m_ptr; + m_ptr = 0; + return ptr; +} + +template inline JSRetainPtr& JSRetainPtr::operator=(const JSRetainPtr& o) +{ + T optr = o.get(); + if (optr) + JSRetain(optr); + T ptr = m_ptr; + m_ptr = optr; + if (ptr) + JSRelease(ptr); + return *this; +} + +template template inline JSRetainPtr& JSRetainPtr::operator=(const JSRetainPtr& o) +{ + T optr = o.get(); + if (optr) + JSRetain(optr); + T ptr = m_ptr; + m_ptr = optr; + if (ptr) + JSRelease(ptr); + return *this; +} + +template inline JSRetainPtr& JSRetainPtr::operator=(T optr) +{ + if (optr) + JSRetain(optr); + T ptr = m_ptr; + m_ptr = optr; + if (ptr) + JSRelease(ptr); + return *this; +} + +template inline void JSRetainPtr::adopt(T optr) +{ + T ptr = m_ptr; + m_ptr = optr; + if (ptr) + JSRelease(ptr); +} + +template template inline JSRetainPtr& JSRetainPtr::operator=(U* optr) +{ + if (optr) + JSRetain(optr); + T ptr = m_ptr; + m_ptr = optr; + if (ptr) + JSRelease(ptr); + return *this; +} + +template inline void JSRetainPtr::swap(JSRetainPtr& o) +{ + std::swap(m_ptr, o.m_ptr); +} + +template inline void swap(JSRetainPtr& a, JSRetainPtr& b) +{ + a.swap(b); +} + +template inline bool operator==(const JSRetainPtr& a, const JSRetainPtr& b) +{ + return a.get() == b.get(); +} + +template inline bool operator==(const JSRetainPtr& a, U* b) +{ + return a.get() == b; +} + +template inline bool operator==(T* a, const JSRetainPtr& b) +{ + return a == b.get(); +} + +template inline bool operator!=(const JSRetainPtr& a, const JSRetainPtr& b) +{ + return a.get() != b.get(); +} + +template inline bool operator!=(const JSRetainPtr& a, U* b) +{ + return a.get() != b; +} + +template inline bool operator!=(T* a, const JSRetainPtr& b) +{ + return a != b.get(); +} + + +#endif // JSRetainPtr_h diff --git a/Source/JavaScriptCore/API/JSStringRef.cpp b/Source/JavaScriptCore/API/JSStringRef.cpp new file mode 100644 index 0000000..ea31da6 --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRef.cpp @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSStringRef.h" + +#include "InitializeThreading.h" +#include "OpaqueJSString.h" +#include + +using namespace JSC; +using namespace WTF::Unicode; + +JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars) +{ + initializeThreading(); + return OpaqueJSString::create(chars, numChars).leakRef(); +} + +JSStringRef JSStringCreateWithUTF8CString(const char* string) +{ + initializeThreading(); + if (string) { + size_t length = strlen(string); + Vector buffer(length); + UChar* p = buffer.data(); + if (conversionOK == convertUTF8ToUTF16(&string, string + length, &p, p + length)) + return OpaqueJSString::create(buffer.data(), p - buffer.data()).leakRef(); + } + + // Null string. + return OpaqueJSString::create().leakRef(); +} + +JSStringRef JSStringRetain(JSStringRef string) +{ + string->ref(); + return string; +} + +void JSStringRelease(JSStringRef string) +{ + string->deref(); +} + +size_t JSStringGetLength(JSStringRef string) +{ + return string->length(); +} + +const JSChar* JSStringGetCharactersPtr(JSStringRef string) +{ + return string->characters(); +} + +size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string) +{ + // Any UTF8 character > 3 bytes encodes as a UTF16 surrogate pair. + return string->length() * 3 + 1; // + 1 for terminating '\0' +} + +size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize) +{ + if (!bufferSize) + return 0; + + char* p = buffer; + const UChar* d = string->characters(); + ConversionResult result = convertUTF16ToUTF8(&d, d + string->length(), &p, p + bufferSize - 1, true); + *p++ = '\0'; + if (result != conversionOK && result != targetExhausted) + return 0; + + return p - buffer; +} + +bool JSStringIsEqual(JSStringRef a, JSStringRef b) +{ + unsigned len = a->length(); + return len == b->length() && 0 == memcmp(a->characters(), b->characters(), len * sizeof(UChar)); +} + +bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b) +{ + JSStringRef bBuf = JSStringCreateWithUTF8CString(b); + bool result = JSStringIsEqual(a, bBuf); + JSStringRelease(bBuf); + + return result; +} diff --git a/Source/JavaScriptCore/API/JSStringRef.h b/Source/JavaScriptCore/API/JSStringRef.h new file mode 100644 index 0000000..c5c1544 --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRef.h @@ -0,0 +1,145 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSStringRef_h +#define JSStringRef_h + +#include + +#ifndef __cplusplus +#include +#endif +#include /* for size_t */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(WIN32) && !defined(_WIN32) && !defined(__WINSCW__) \ + && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */ +/*! +@typedef JSChar +@abstract A Unicode character. +*/ + typedef unsigned short JSChar; +#else + typedef wchar_t JSChar; +#endif + +/*! +@function +@abstract Creates a JavaScript string from a buffer of Unicode characters. +@param chars The buffer of Unicode characters to copy into the new JSString. +@param numChars The number of characters to copy from the buffer pointed to by chars. +@result A JSString containing chars. Ownership follows the Create Rule. +*/ +JS_EXPORT JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars); +/*! +@function +@abstract Creates a JavaScript string from a null-terminated UTF8 string. +@param string The null-terminated UTF8 string to copy into the new JSString. +@result A JSString containing string. Ownership follows the Create Rule. +*/ +JS_EXPORT JSStringRef JSStringCreateWithUTF8CString(const char* string); + +/*! +@function +@abstract Retains a JavaScript string. +@param string The JSString to retain. +@result A JSString that is the same as string. +*/ +JS_EXPORT JSStringRef JSStringRetain(JSStringRef string); +/*! +@function +@abstract Releases a JavaScript string. +@param string The JSString to release. +*/ +JS_EXPORT void JSStringRelease(JSStringRef string); + +/*! +@function +@abstract Returns the number of Unicode characters in a JavaScript string. +@param string The JSString whose length (in Unicode characters) you want to know. +@result The number of Unicode characters stored in string. +*/ +JS_EXPORT size_t JSStringGetLength(JSStringRef string); +/*! +@function +@abstract Returns a pointer to the Unicode character buffer that + serves as the backing store for a JavaScript string. +@param string The JSString whose backing store you want to access. +@result A pointer to the Unicode character buffer that serves as string's + backing store, which will be deallocated when string is deallocated. +*/ +JS_EXPORT const JSChar* JSStringGetCharactersPtr(JSStringRef string); + +/*! +@function +@abstract Returns the maximum number of bytes a JavaScript string will + take up if converted into a null-terminated UTF8 string. +@param string The JSString whose maximum converted size (in bytes) you + want to know. +@result The maximum number of bytes that could be required to convert string into a + null-terminated UTF8 string. The number of bytes that the conversion actually ends + up requiring could be less than this, but never more. +*/ +JS_EXPORT size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string); +/*! +@function +@abstract Converts a JavaScript string into a null-terminated UTF8 string, + and copies the result into an external byte buffer. +@param string The source JSString. +@param buffer The destination byte buffer into which to copy a null-terminated + UTF8 representation of string. On return, buffer contains a UTF8 string + representation of string. If bufferSize is too small, buffer will contain only + partial results. If buffer is not at least bufferSize bytes in size, + behavior is undefined. +@param bufferSize The size of the external buffer in bytes. +@result The number of bytes written into buffer (including the null-terminator byte). +*/ +JS_EXPORT size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize); + +/*! +@function +@abstract Tests whether two JavaScript strings match. +@param a The first JSString to test. +@param b The second JSString to test. +@result true if the two strings match, otherwise false. +*/ +JS_EXPORT bool JSStringIsEqual(JSStringRef a, JSStringRef b); +/*! +@function +@abstract Tests whether a JavaScript string matches a null-terminated UTF8 string. +@param a The JSString to test. +@param b The null-terminated UTF8 string to test. +@result true if the two strings match, otherwise false. +*/ +JS_EXPORT bool JSStringIsEqualToUTF8CString(JSStringRef a, const char* b); + +#ifdef __cplusplus +} +#endif + +#endif /* JSStringRef_h */ diff --git a/Source/JavaScriptCore/API/JSStringRefBSTR.cpp b/Source/JavaScriptCore/API/JSStringRefBSTR.cpp new file mode 100644 index 0000000..70f4254 --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRefBSTR.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSStringRefBSTR.h" + +#include "JSStringRef.h" + +JSStringRef JSStringCreateWithBSTR(BSTR string) +{ + return JSStringCreateWithCharacters(string ? string : L"", string ? SysStringLen(string) : 0); +} + +BSTR JSStringCopyBSTR(const JSStringRef string) +{ + return SysAllocStringLen(JSStringGetCharactersPtr(string), JSStringGetLength(string)); +} diff --git a/Source/JavaScriptCore/API/JSStringRefBSTR.h b/Source/JavaScriptCore/API/JSStringRefBSTR.h new file mode 100644 index 0000000..59f19b7 --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRefBSTR.h @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSStringRefBSTR_h +#define JSStringRefBSTR_h + +#include "JSBase.h" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* COM convenience methods */ + +/*! +@function +@abstract Creates a JavaScript string from a BSTR. +@param string The BSTR to copy into the new JSString. +@result A JSString containing string. Ownership follows the Create Rule. +*/ +JS_EXPORT JSStringRef JSStringCreateWithBSTR(const BSTR string); + +/*! +@function +@abstract Creates a BSTR from a JavaScript string. +@param string The JSString to copy into the new BSTR. +@result A BSTR containing string. Ownership follows the Create Rule. +*/ +JS_EXPORT BSTR JSStringCopyBSTR(const JSStringRef string); + +#ifdef __cplusplus +} +#endif + +#endif /* JSStringRefBSTR_h */ diff --git a/Source/JavaScriptCore/API/JSStringRefCF.cpp b/Source/JavaScriptCore/API/JSStringRefCF.cpp new file mode 100644 index 0000000..e0961d0 --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRefCF.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSStringRefCF.h" + +#include "APICast.h" +#include "InitializeThreading.h" +#include "JSStringRef.h" +#include "OpaqueJSString.h" +#include +#include +#include + +JSStringRef JSStringCreateWithCFString(CFStringRef string) +{ + JSC::initializeThreading(); + + // We cannot use CFIndex here since CFStringGetLength can return values larger than + // it can hold. () + size_t length = CFStringGetLength(string); + if (length) { + OwnArrayPtr buffer(new UniChar[length]); + CFStringGetCharacters(string, CFRangeMake(0, length), buffer.get()); + COMPILE_ASSERT(sizeof(UniChar) == sizeof(UChar), unichar_and_uchar_must_be_same_size); + return OpaqueJSString::create(reinterpret_cast(buffer.get()), length).leakRef(); + } else { + return OpaqueJSString::create(0, 0).leakRef(); + } +} + +CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string) +{ + return CFStringCreateWithCharacters(alloc, reinterpret_cast(string->characters()), string->length()); +} diff --git a/Source/JavaScriptCore/API/JSStringRefCF.h b/Source/JavaScriptCore/API/JSStringRefCF.h new file mode 100644 index 0000000..a424765 --- /dev/null +++ b/Source/JavaScriptCore/API/JSStringRefCF.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSStringRefCF_h +#define JSStringRefCF_h + +#include "JSBase.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* CFString convenience methods */ + +/*! +@function +@abstract Creates a JavaScript string from a CFString. +@discussion This function is optimized to take advantage of cases when + CFStringGetCharactersPtr returns a valid pointer. +@param string The CFString to copy into the new JSString. +@result A JSString containing string. Ownership follows the Create Rule. +*/ +JS_EXPORT JSStringRef JSStringCreateWithCFString(CFStringRef string); +/*! +@function +@abstract Creates a CFString from a JavaScript string. +@param alloc The alloc parameter to pass to CFStringCreate. +@param string The JSString to copy into the new CFString. +@result A CFString containing string. Ownership follows the Create Rule. +*/ +JS_EXPORT CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string); + +#ifdef __cplusplus +} +#endif + +#endif /* JSStringRefCF_h */ diff --git a/Source/JavaScriptCore/API/JSValueRef.cpp b/Source/JavaScriptCore/API/JSValueRef.cpp new file mode 100644 index 0000000..faf4712 --- /dev/null +++ b/Source/JavaScriptCore/API/JSValueRef.cpp @@ -0,0 +1,334 @@ +/* + * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSValueRef.h" + +#include "APICast.h" +#include "APIShims.h" +#include "JSCallbackObject.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include // for std::min + +using namespace JSC; + +::JSType JSValueGetType(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + + if (jsValue.isUndefined()) + return kJSTypeUndefined; + if (jsValue.isNull()) + return kJSTypeNull; + if (jsValue.isBoolean()) + return kJSTypeBoolean; + if (jsValue.isNumber()) + return kJSTypeNumber; + if (jsValue.isString()) + return kJSTypeString; + ASSERT(jsValue.isObject()); + return kJSTypeObject; +} + +bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + return jsValue.isUndefined(); +} + +bool JSValueIsNull(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + return jsValue.isNull(); +} + +bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + return jsValue.isBoolean(); +} + +bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + return jsValue.isNumber(); +} + +bool JSValueIsString(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + return jsValue.isString(); +} + +bool JSValueIsObject(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + return jsValue.isObject(); +} + +bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + + if (JSObject* o = jsValue.getObject()) { + if (o->inherits(&JSCallbackObject::info)) + return static_cast*>(o)->inherits(jsClass); + else if (o->inherits(&JSCallbackObject::info)) + return static_cast*>(o)->inherits(jsClass); + } + return false; +} + +bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsA = toJS(exec, a); + JSValue jsB = toJS(exec, b); + + bool result = JSValue::equal(exec, jsA, jsB); // false if an exception is thrown + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + } + return result; +} + +bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsA = toJS(exec, a); + JSValue jsB = toJS(exec, b); + + return JSValue::strictEqual(exec, jsA, jsB); +} + +bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + + JSObject* jsConstructor = toJS(constructor); + if (!jsConstructor->structure()->typeInfo().implementsHasInstance()) + return false; + bool result = jsConstructor->hasInstance(exec, jsValue, jsConstructor->get(exec, exec->propertyNames().prototype)); // false if an exception is thrown + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + } + return result; +} + +JSValueRef JSValueMakeUndefined(JSContextRef ctx) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + return toRef(exec, jsUndefined()); +} + +JSValueRef JSValueMakeNull(JSContextRef ctx) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + return toRef(exec, jsNull()); +} + +JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + return toRef(exec, jsBoolean(value)); +} + +JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + // Our JSValue representation relies on a standard bit pattern for NaN. NaNs + // generated internally to JavaScriptCore naturally have that representation, + // but an external NaN might not. + if (isnan(value)) + value = NaN; + + return toRef(exec, jsNumber(value)); +} + +JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + return toRef(exec, jsString(exec, string->ustring())); +} + +JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + LiteralParser parser(exec, string->ustring(), LiteralParser::StrictJSON); + return toRef(exec, parser.tryLiteralParse()); +} + +JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsigned indent, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + JSValue value = toJS(exec, apiValue); + UString result = JSONStringify(exec, value, indent); + if (exception) + *exception = 0; + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + return 0; + } + return OpaqueJSString::create(result).leakRef(); +} + +bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + return jsValue.toBoolean(exec); +} + +double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + + double number = jsValue.toNumber(exec); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + number = NaN; + } + return number; +} + +JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + + RefPtr stringRef(OpaqueJSString::create(jsValue.toString(exec))); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + stringRef.clear(); + } + return stringRef.release().leakRef(); +} + +JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJS(exec, value); + + JSObjectRef objectRef = toRef(jsValue.toObject(exec)); + if (exec->hadException()) { + if (exception) + *exception = toRef(exec, exec->exception()); + exec->clearException(); + objectRef = 0; + } + return objectRef; +} + +void JSValueProtect(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJSForGC(exec, value); + gcProtect(jsValue); +} + +void JSValueUnprotect(JSContextRef ctx, JSValueRef value) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + + JSValue jsValue = toJSForGC(exec, value); + gcUnprotect(jsValue); +} diff --git a/Source/JavaScriptCore/API/JSValueRef.h b/Source/JavaScriptCore/API/JSValueRef.h new file mode 100644 index 0000000..4186db8 --- /dev/null +++ b/Source/JavaScriptCore/API/JSValueRef.h @@ -0,0 +1,301 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSValueRef_h +#define JSValueRef_h + +#include +#include + +#ifndef __cplusplus +#include +#endif + +/*! +@enum JSType +@abstract A constant identifying the type of a JSValue. +@constant kJSTypeUndefined The unique undefined value. +@constant kJSTypeNull The unique null value. +@constant kJSTypeBoolean A primitive boolean value, one of true or false. +@constant kJSTypeNumber A primitive number value. +@constant kJSTypeString A primitive string value. +@constant kJSTypeObject An object value (meaning that this JSValueRef is a JSObjectRef). +*/ +typedef enum { + kJSTypeUndefined, + kJSTypeNull, + kJSTypeBoolean, + kJSTypeNumber, + kJSTypeString, + kJSTypeObject +} JSType; + +#ifdef __cplusplus +extern "C" { +#endif + +/*! +@function +@abstract Returns a JavaScript value's type. +@param ctx The execution context to use. +@param value The JSValue whose type you want to obtain. +@result A value of type JSType that identifies value's type. +*/ +JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Tests whether a JavaScript value's type is the undefined type. +@param ctx The execution context to use. +@param value The JSValue to test. +@result true if value's type is the undefined type, otherwise false. +*/ +JS_EXPORT bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Tests whether a JavaScript value's type is the null type. +@param ctx The execution context to use. +@param value The JSValue to test. +@result true if value's type is the null type, otherwise false. +*/ +JS_EXPORT bool JSValueIsNull(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Tests whether a JavaScript value's type is the boolean type. +@param ctx The execution context to use. +@param value The JSValue to test. +@result true if value's type is the boolean type, otherwise false. +*/ +JS_EXPORT bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Tests whether a JavaScript value's type is the number type. +@param ctx The execution context to use. +@param value The JSValue to test. +@result true if value's type is the number type, otherwise false. +*/ +JS_EXPORT bool JSValueIsNumber(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Tests whether a JavaScript value's type is the string type. +@param ctx The execution context to use. +@param value The JSValue to test. +@result true if value's type is the string type, otherwise false. +*/ +JS_EXPORT bool JSValueIsString(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Tests whether a JavaScript value's type is the object type. +@param ctx The execution context to use. +@param value The JSValue to test. +@result true if value's type is the object type, otherwise false. +*/ +JS_EXPORT bool JSValueIsObject(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Tests whether a JavaScript value is an object with a given class in its class chain. +@param ctx The execution context to use. +@param value The JSValue to test. +@param jsClass The JSClass to test against. +@result true if value is an object and has jsClass in its class chain, otherwise false. +*/ +JS_EXPORT bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass); + +/* Comparing values */ + +/*! +@function +@abstract Tests whether two JavaScript values are equal, as compared by the JS == operator. +@param ctx The execution context to use. +@param a The first value to test. +@param b The second value to test. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result true if the two values are equal, false if they are not equal or an exception is thrown. +*/ +JS_EXPORT bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception); + +/*! +@function +@abstract Tests whether two JavaScript values are strict equal, as compared by the JS === operator. +@param ctx The execution context to use. +@param a The first value to test. +@param b The second value to test. +@result true if the two values are strict equal, otherwise false. +*/ +JS_EXPORT bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b); + +/*! +@function +@abstract Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator. +@param ctx The execution context to use. +@param value The JSValue to test. +@param constructor The constructor to test against. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result true if value is an object constructed by constructor, as compared by the JS instanceof operator, otherwise false. +*/ +JS_EXPORT bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception); + +/* Creating values */ + +/*! +@function +@abstract Creates a JavaScript value of the undefined type. +@param ctx The execution context to use. +@result The unique undefined value. +*/ +JS_EXPORT JSValueRef JSValueMakeUndefined(JSContextRef ctx); + +/*! +@function +@abstract Creates a JavaScript value of the null type. +@param ctx The execution context to use. +@result The unique null value. +*/ +JS_EXPORT JSValueRef JSValueMakeNull(JSContextRef ctx); + +/*! +@function +@abstract Creates a JavaScript value of the boolean type. +@param ctx The execution context to use. +@param boolean The bool to assign to the newly created JSValue. +@result A JSValue of the boolean type, representing the value of boolean. +*/ +JS_EXPORT JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean); + +/*! +@function +@abstract Creates a JavaScript value of the number type. +@param ctx The execution context to use. +@param number The double to assign to the newly created JSValue. +@result A JSValue of the number type, representing the value of number. +*/ +JS_EXPORT JSValueRef JSValueMakeNumber(JSContextRef ctx, double number); + +/*! +@function +@abstract Creates a JavaScript value of the string type. +@param ctx The execution context to use. +@param string The JSString to assign to the newly created JSValue. The + newly created JSValue retains string, and releases it upon garbage collection. +@result A JSValue of the string type, representing the value of string. +*/ +JS_EXPORT JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string); + +/* Converting to and from JSON formatted strings */ + +/*! + @function + @abstract Creates a JavaScript value from a JSON formatted string. + @param ctx The execution context to use. + @param string The JSString containing the JSON string to be parsed. + @result A JSValue containing the parsed value, or NULL if the input is invalid. + */ +JS_EXPORT JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) AVAILABLE_AFTER_WEBKIT_VERSION_4_0; + +/*! + @function + @abstract Creates a JavaScript string containing the JSON serialized representation of a JS value. + @param ctx The execution context to use. + @param value The value to serialize. + @param indent The number of spaces to indent when nesting. If 0, the resulting JSON will not contains newlines. The size of the indent is clamped to 10 spaces. + @param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. + @result A JSString with the result of serialization, or NULL if an exception is thrown. + */ +JS_EXPORT JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef value, unsigned indent, JSValueRef* exception) AVAILABLE_AFTER_WEBKIT_VERSION_4_0; + +/* Converting to primitive values */ + +/*! +@function +@abstract Converts a JavaScript value to boolean and returns the resulting boolean. +@param ctx The execution context to use. +@param value The JSValue to convert. +@result The boolean result of conversion. +*/ +JS_EXPORT bool JSValueToBoolean(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Converts a JavaScript value to number and returns the resulting number. +@param ctx The execution context to use. +@param value The JSValue to convert. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result The numeric result of conversion, or NaN if an exception is thrown. +*/ +JS_EXPORT double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception); + +/*! +@function +@abstract Converts a JavaScript value to string and copies the result into a JavaScript string. +@param ctx The execution context to use. +@param value The JSValue to convert. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result A JSString with the result of conversion, or NULL if an exception is thrown. Ownership follows the Create Rule. +*/ +JS_EXPORT JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception); + +/*! +@function +@abstract Converts a JavaScript value to object and returns the resulting object. +@param ctx The execution context to use. +@param value The JSValue to convert. +@param exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. +@result The JSObject result of conversion, or NULL if an exception is thrown. +*/ +JS_EXPORT JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception); + +/* Garbage collection */ +/*! +@function +@abstract Protects a JavaScript value from garbage collection. +@param ctx The execution context to use. +@param value The JSValue to protect. +@discussion Use this method when you want to store a JSValue in a global or on the heap, where the garbage collector will not be able to discover your reference to it. + +A value may be protected multiple times and must be unprotected an equal number of times before becoming eligible for garbage collection. +*/ +JS_EXPORT void JSValueProtect(JSContextRef ctx, JSValueRef value); + +/*! +@function +@abstract Unprotects a JavaScript value from garbage collection. +@param ctx The execution context to use. +@param value The JSValue to unprotect. +@discussion A value may be protected multiple times and must be unprotected an + equal number of times before becoming eligible for garbage collection. +*/ +JS_EXPORT void JSValueUnprotect(JSContextRef ctx, JSValueRef value); + +#ifdef __cplusplus +} +#endif + +#endif /* JSValueRef_h */ diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefInternal.h b/Source/JavaScriptCore/API/JSWeakObjectMapRefInternal.h new file mode 100644 index 0000000..64e1f4d --- /dev/null +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefInternal.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSWeakObjectMapRefInternal_h +#define JSWeakObjectMapRefInternal_h + +#include "WeakGCMap.h" +#include + +namespace JSC { + +class JSObject; + +} + +typedef void (*JSWeakMapDestroyedCallback)(struct OpaqueJSWeakObjectMap*, void*); + +typedef JSC::WeakGCMap WeakMapType; + +struct OpaqueJSWeakObjectMap : public RefCounted { +public: + static PassRefPtr create(void* data, JSWeakMapDestroyedCallback callback) + { + return adoptRef(new OpaqueJSWeakObjectMap(data, callback)); + } + + WeakMapType& map() { return m_map; } + + ~OpaqueJSWeakObjectMap() + { + m_callback(this, m_data); + } + +private: + OpaqueJSWeakObjectMap(void* data, JSWeakMapDestroyedCallback callback) + : m_data(data) + , m_callback(callback) + { + } + WeakMapType m_map; + void* m_data; + JSWeakMapDestroyedCallback m_callback; +}; + + +#endif // JSWeakObjectMapInternal_h diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp new file mode 100644 index 0000000..8182075 --- /dev/null +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "JSWeakObjectMapRefPrivate.h" + +#include "APICast.h" +#include "APIShims.h" +#include "JSCallbackObject.h" +#include "JSValue.h" +#include "JSWeakObjectMapRefInternal.h" +#include +#include + +using namespace WTF; +using namespace JSC; + +#ifdef __cplusplus +extern "C" { +#endif + +JSWeakObjectMapRef JSWeakObjectMapCreate(JSContextRef context, void* privateData, JSWeakMapDestroyedCallback callback) +{ + ExecState* exec = toJS(context); + APIEntryShim entryShim(exec); + RefPtr map = OpaqueJSWeakObjectMap::create(privateData, callback); + exec->lexicalGlobalObject()->registerWeakMap(map.get()); + return map.get(); +} + +void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + JSObject* obj = toJS(object); + if (!obj) + return; + ASSERT(obj->inherits(&JSCallbackObject::info) || obj->inherits(&JSCallbackObject::info)); + map->map().set(key, obj); +} + +JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + return toRef(static_cast(map->map().get(key))); +} + +bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object) +{ + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); + JSObject* obj = toJS(object); + if (map->map().uncheckedRemove(key, obj)) + return true; + return false; +} + +#ifdef __cplusplus +} +#endif diff --git a/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h new file mode 100644 index 0000000..d36111c --- /dev/null +++ b/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSWeakObjectMapRefPrivate_h +#define JSWeakObjectMapRefPrivate_h + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! @typedef JSWeakObjectMapRef A weak map for storing JSObjectRefs */ +typedef struct OpaqueJSWeakObjectMap* JSWeakObjectMapRef; + +/*! + @typedef JSWeakMapDestroyedCallback + @abstract The callback invoked when a JSWeakObjectMapRef is being destroyed. + @param map The map that is being destroyed. + @param data The private data (if any) that was associated with the map instance. + */ +typedef void (*JSWeakMapDestroyedCallback)(JSWeakObjectMapRef map, void* data); + +/*! + @function + @abstract Creates a weak value map that can be used to reference user defined objects without preventing them from being collected. + @param ctx The execution context to use. + @param data A void* to set as the map's private data. Pass NULL to specify no private data. + @param destructor A function to call when the weak map is destroyed. + @result A JSWeakObjectMapRef bound to the given context, data and destructor. + @discussion The JSWeakObjectMapRef can be used as a storage mechanism to hold custom JS objects without forcing those objects to + remain live as JSValueProtect would. Any objects that are intended to be stored in a weak map must be user defined objects that + remove themselves from the map in their finalizer. + */ +JS_EXPORT JSWeakObjectMapRef JSWeakObjectMapCreate(JSContextRef ctx, void* data, JSWeakMapDestroyedCallback destructor); + +/*! + @function + @abstract Associates a JSObjectRef with the given key in a JSWeakObjectMap. + @param ctx The execution context to use. + @param map The map to operate on. + @param key The key to associate a weak reference with. + @param object The user defined object to associate with the key. + */ +JS_EXPORT void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef); + +/*! + @function + @abstract Retrieves the JSObjectRef associated with a key. + @param ctx The execution context to use. + @param map The map to query. + @param key The key to search for. + @result Either the live object associated with the provided key, or NULL. + */ +JS_EXPORT JSObjectRef JSWeakObjectMapGet(JSContextRef ctx, JSWeakObjectMapRef map, void* key); + +/*! + @function + @abstract Clears the association between a key and an object in a JSWeakObjectMapRef + @param ctx The execution context to use. + @param map The map to clear the key association from. + @param key The key to use. + @param object The old object value. + @result Returns true if the key/object association was present in map, and has been removed. + */ +JS_EXPORT bool JSWeakObjectMapClear(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object); + +#ifdef __cplusplus +} +#endif + +#endif // JSWeakObjectMapPrivate_h diff --git a/Source/JavaScriptCore/API/JavaScript.h b/Source/JavaScriptCore/API/JavaScript.h new file mode 100644 index 0000000..f8d92d8 --- /dev/null +++ b/Source/JavaScriptCore/API/JavaScript.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2006 Apple Inc. All rights reserved. + * Copyright (C) 2008 Alp Toker + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JavaScript_h +#define JavaScript_h + +#include +#include +#include +#include +#include + +#endif /* JavaScript_h */ diff --git a/Source/JavaScriptCore/API/JavaScriptCore.h b/Source/JavaScriptCore/API/JavaScriptCore.h new file mode 100644 index 0000000..87d6018 --- /dev/null +++ b/Source/JavaScriptCore/API/JavaScriptCore.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JavaScriptCore_h +#define JavaScriptCore_h + +#include +#include + +#endif /* JavaScriptCore_h */ diff --git a/Source/JavaScriptCore/API/OpaqueJSString.cpp b/Source/JavaScriptCore/API/OpaqueJSString.cpp new file mode 100644 index 0000000..9a116e6 --- /dev/null +++ b/Source/JavaScriptCore/API/OpaqueJSString.cpp @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "OpaqueJSString.h" + +#include +#include +#include + +using namespace JSC; + +PassRefPtr OpaqueJSString::create(const UString& ustring) +{ + if (!ustring.isNull()) + return adoptRef(new OpaqueJSString(ustring.characters(), ustring.length())); + return 0; +} + +UString OpaqueJSString::ustring() const +{ + if (this && m_characters) + return UString(m_characters, m_length); + return UString(); +} + +Identifier OpaqueJSString::identifier(JSGlobalData* globalData) const +{ + if (!this || !m_characters) + return Identifier(globalData, static_cast(0)); + + return Identifier(globalData, m_characters, m_length); +} diff --git a/Source/JavaScriptCore/API/OpaqueJSString.h b/Source/JavaScriptCore/API/OpaqueJSString.h new file mode 100644 index 0000000..473c815 --- /dev/null +++ b/Source/JavaScriptCore/API/OpaqueJSString.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2008 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef OpaqueJSString_h +#define OpaqueJSString_h + +#include + +namespace JSC { + class Identifier; + class JSGlobalData; +} + +struct OpaqueJSString : public ThreadSafeShared { + + static PassRefPtr create() // null + { + return adoptRef(new OpaqueJSString); + } + + static PassRefPtr create(const UChar* characters, unsigned length) + { + return adoptRef(new OpaqueJSString(characters, length)); + } + + static PassRefPtr create(const JSC::UString&); + + UChar* characters() { return this ? m_characters : 0; } + unsigned length() { return this ? m_length : 0; } + + JSC::UString ustring() const; + JSC::Identifier identifier(JSC::JSGlobalData*) const; + +private: + friend class WTF::ThreadSafeShared; + + OpaqueJSString() + : m_characters(0) + , m_length(0) + { + } + + OpaqueJSString(const UChar* characters, unsigned length) + : m_length(length) + { + m_characters = new UChar[length]; + memcpy(m_characters, characters, length * sizeof(UChar)); + } + + ~OpaqueJSString() + { + delete[] m_characters; + } + + UChar* m_characters; + unsigned m_length; +}; + +#endif diff --git a/Source/JavaScriptCore/API/WebKitAvailability.h b/Source/JavaScriptCore/API/WebKitAvailability.h new file mode 100644 index 0000000..0e4f091 --- /dev/null +++ b/Source/JavaScriptCore/API/WebKitAvailability.h @@ -0,0 +1,904 @@ +/* + * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __WebKitAvailability__ +#define __WebKitAvailability__ + +/* The structure of this header is based on AvailabilityMacros.h. The major difference is that the availability + macros are defined in terms of WebKit version numbers rather than Mac OS X system version numbers, as WebKit + releases span multiple versions of Mac OS X. +*/ + +#define WEBKIT_VERSION_1_0 0x0100 +#define WEBKIT_VERSION_1_1 0x0110 +#define WEBKIT_VERSION_1_2 0x0120 +#define WEBKIT_VERSION_1_3 0x0130 +#define WEBKIT_VERSION_2_0 0x0200 +#define WEBKIT_VERSION_3_0 0x0300 +#define WEBKIT_VERSION_3_1 0x0310 +#define WEBKIT_VERSION_4_0 0x0400 +#define WEBKIT_VERSION_LATEST 0x9999 + +#ifdef __APPLE__ +#include +#else +/* + * For non-Mac platforms, require the newest version. + */ +#define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST +/* + * only certain compilers support __attribute__((deprecated)) + */ +#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) + #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) +#else + #define DEPRECATED_ATTRIBUTE +#endif +#endif + +/* The versions of GCC that shipped with Xcode prior to 3.0 (GCC build number < 5400) did not support attributes on methods. + If we are building with one of these versions, we need to omit the attribute. We achieve this by wrapping the annotation + in WEBKIT_OBJC_METHOD_ANNOTATION, which will remove the annotation when an old version of GCC is in use and will otherwise + expand to the annotation. The same is needed for protocol methods. +*/ +#if defined(__APPLE_CC__) && __APPLE_CC__ < 5400 + #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) +#else + #define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION +#endif + + +/* If minimum WebKit version is not specified, assume the version that shipped with the target Mac OS X version */ +#ifndef WEBKIT_VERSION_MIN_REQUIRED + #if !defined(MAC_OS_X_VERSION_10_2) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2 + #error WebKit was not available prior to Mac OS X 10.2 + #elif !defined(MAC_OS_X_VERSION_10_3) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 + /* WebKit 1.0 is the only version available on Mac OS X 10.2. */ + #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_0 + #elif !defined(MAC_OS_X_VERSION_10_4) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 + /* WebKit 1.1 is the version that shipped on Mac OS X 10.3. */ + #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_1_1 + #elif !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 + /* WebKit 2.0 is the version that shipped on Mac OS X 10.4. */ + #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_2_0 + #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 + /* WebKit 3.0 is the version that shipped on Mac OS X 10.5. */ + #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_3_0 + #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 + /* WebKit 4.0 is the version that shipped on Mac OS X 10.6. */ + #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_4_0 + #else + #define WEBKIT_VERSION_MIN_REQUIRED WEBKIT_VERSION_LATEST + #endif +#endif + + +/* If maximum WebKit version is not specified, assume largerof(latest, minimum) */ +#ifndef WEBKIT_VERSION_MAX_ALLOWED + #if WEBKIT_VERSION_MIN_REQUIRED > WEBKIT_VERSION_LATEST + #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_MIN_REQUIRED + #else + #define WEBKIT_VERSION_MAX_ALLOWED WEBKIT_VERSION_LATEST + #endif +#endif + + +/* Sanity check the configured values */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_MIN_REQUIRED + #error WEBKIT_VERSION_MAX_ALLOWED must be >= WEBKIT_VERSION_MIN_REQUIRED +#endif +#if WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_0 + #error WEBKIT_VERSION_MIN_REQUIRED must be >= WEBKIT_VERSION_1_0 +#endif + + + + + + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER + * + * Used on functions introduced in WebKit 1.0 + */ +#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED + * + * Used on functions introduced in WebKit 1.0, + * and deprecated in WebKit 1.0 + */ +#define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE + +/* + * DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER + * + * Used on types deprecated in WebKit 1.0 + */ +#define DEPRECATED_IN_WEBKIT_VERSION_1_0_AND_LATER DEPRECATED_ATTRIBUTE + + + + + + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER + * + * Used on declarations introduced in WebKit 1.1 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_1 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_1 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED + * + * Used on declarations introduced in WebKit 1.1, + * and deprecated in WebKit 1.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated in WebKit 1.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER + * + * Used on types deprecated in WebKit 1.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_1 + #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_IN_WEBKIT_VERSION_1_1_AND_LATER +#endif + + + + + + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER + * + * Used on declarations introduced in WebKit 1.2 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_2 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_2 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED + * + * Used on declarations introduced in WebKit 1.2, + * and deprecated in WebKit 1.2 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated in WebKit 1.2 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 + * + * Used on declarations introduced in WebKit 1.1, + * but later deprecated in WebKit 1.2 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_2 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER + * + * Used on types deprecated in WebKit 1.2 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_2 + #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_IN_WEBKIT_VERSION_1_2_AND_LATER +#endif + + + + + + +/* + * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER + * + * Used on declarations introduced in WebKit 1.3 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_1_3 + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_1_3 + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED + * + * Used on declarations introduced in WebKit 1.3, + * and deprecated in WebKit 1.3 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated in WebKit 1.3 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 + * + * Used on declarations introduced in WebKit 1.1, + * but later deprecated in WebKit 1.3 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 + * + * Used on declarations introduced in WebKit 1.2, + * but later deprecated in WebKit 1.3 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_1_3 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER + * + * Used on types deprecated in WebKit 1.3 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_1_3 + #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_IN_WEBKIT_VERSION_1_3_AND_LATER +#endif + + + + + + +/* + * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER + * + * Used on declarations introduced in WebKit 2.0 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_2_0 + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_2_0 + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED + * + * Used on declarations introduced in WebKit 2.0, + * and deprecated in WebKit 2.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated in WebKit 2.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 + * + * Used on declarations introduced in WebKit 1.1, + * but later deprecated in WebKit 2.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 + * + * Used on declarations introduced in WebKit 1.2, + * but later deprecated in WebKit 2.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 + * + * Used on declarations introduced in WebKit 1.3, + * but later deprecated in WebKit 2.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_2_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER +#endif + +/* + * DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER + * + * Used on types deprecated in WebKit 2.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_2_0 + #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_IN_WEBKIT_VERSION_2_0_AND_LATER +#endif + + + + + + +/* + * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER + * + * Used on declarations introduced in WebKit 3.0 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED + * + * Used on declarations introduced in WebKit 3.0, + * and deprecated in WebKit 3.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated in WebKit 3.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 + * + * Used on declarations introduced in WebKit 1.1, + * but later deprecated in WebKit 3.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 + * + * Used on declarations introduced in WebKit 1.2, + * but later deprecated in WebKit 3.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 + * + * Used on declarations introduced in WebKit 1.3, + * but later deprecated in WebKit 3.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 + * + * Used on declarations introduced in WebKit 2.0, + * but later deprecated in WebKit 3.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER +#endif + +/* + * DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER + * + * Used on types deprecated in WebKit 3.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_0 + #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_IN_WEBKIT_VERSION_3_0_AND_LATER +#endif + + + + + + +/* + * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER + * + * Used on declarations introduced in WebKit 3.1 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED + * + * Used on declarations introduced in WebKit 3.1, + * and deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 + * + * Used on declarations introduced in WebKit 1.1, + * but later deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 + * + * Used on declarations introduced in WebKit 1.2, + * but later deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 + * + * Used on declarations introduced in WebKit 1.3, + * but later deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 + * + * Used on declarations introduced in WebKit 2.0, + * but later deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 + * + * Used on declarations introduced in WebKit 3.0, + * but later deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_3_1 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER +#endif + +/* + * DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER + * + * Used on types deprecated in WebKit 3.1 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_3_1 + #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_IN_WEBKIT_VERSION_3_1_AND_LATER +#endif + + + + + + +/* + * AVAILABLE_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 4.0 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_4_0 + #define AVAILABLE_IN_WEBKIT_VERSION_4_0 UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_4_0 + #define AVAILABLE_IN_WEBKIT_VERSION_4_0 WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_IN_WEBKIT_VERSION_4_0 +#endif + +/* + * AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED + * + * Used on declarations introduced in WebKit 4.0, + * and deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_IN_WEBKIT_VERSION_4_0_BUT_DEPRECATED AVAILABLE_IN_WEBKIT_VERSION_4_0 +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.1, + * but later deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.2, + * but later deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.3, + * but later deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 2.0, + * but later deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 3.0, + * but later deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 3.1, + * but later deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_IN_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER +#endif + +/* + * DEPRECATED_IN_WEBKIT_VERSION_4_0 + * + * Used on types deprecated in WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_4_0 + #define DEPRECATED_IN_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_IN_WEBKIT_VERSION_4_0 +#endif + + + + + + +/* + * AVAILABLE_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced after WebKit 4.0 + */ +#if WEBKIT_VERSION_MAX_ALLOWED < WEBKIT_VERSION_LATEST + #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 UNAVAILABLE_ATTRIBUTE +#elif WEBKIT_VERSION_MIN_REQUIRED < WEBKIT_VERSION_LATEST + #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 WEAK_IMPORT_ATTRIBUTE +#else + #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0 +#endif + +/* + * AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED + * + * Used on declarations introduced after WebKit 4.0, + * and deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_AFTER_WEBKIT_VERSION_4_0_BUT_DEPRECATED AVAILABLE_AFTER_WEBKIT_VERSION_4_0 +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.0, + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.1, + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.2, + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_2_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 1.3, + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_1_3_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 2.0, + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_2_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 3.0, + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 3.1, + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_3_1_AND_LATER +#endif + +/* + * AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on declarations introduced in WebKit 4.0 + * but later deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER_BUT_DEPRECATED_AFTER_WEBKIT_VERSION_4_0 AVAILABLE_WEBKIT_VERSION_4_0_AND_LATER +#endif + +/* + * DEPRECATED_AFTER_WEBKIT_VERSION_4_0 + * + * Used on types deprecated after WebKit 4.0 + */ +#if WEBKIT_VERSION_MIN_REQUIRED >= WEBKIT_VERSION_LATEST + #define DEPRECATED_AFTER_WEBKIT_VERSION_4_0 DEPRECATED_ATTRIBUTE +#else + #define DEPRECATED_AFTER_WEBKIT_VERSION_4_0 +#endif + + +#endif /* __WebKitAvailability__ */ diff --git a/Source/JavaScriptCore/API/tests/JSNode.c b/Source/JavaScriptCore/API/tests/JSNode.c new file mode 100644 index 0000000..d9ac0a9 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/JSNode.c @@ -0,0 +1,196 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "JSNode.h" +#include "JSNodeList.h" +#include "JSObjectRef.h" +#include "JSStringRef.h" +#include "JSValueRef.h" +#include "Node.h" +#include "NodeList.h" +#include "UnusedParam.h" +#include + +static JSValueRef JSNode_appendChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + UNUSED_PARAM(function); + + /* Example of throwing a type error for invalid values */ + if (!JSValueIsObjectOfClass(context, thisObject, JSNode_class(context))) { + JSStringRef message = JSStringCreateWithUTF8CString("TypeError: appendChild can only be called on nodes"); + *exception = JSValueMakeString(context, message); + JSStringRelease(message); + } else if (argumentCount < 1 || !JSValueIsObjectOfClass(context, arguments[0], JSNode_class(context))) { + JSStringRef message = JSStringCreateWithUTF8CString("TypeError: first argument to appendChild must be a node"); + *exception = JSValueMakeString(context, message); + JSStringRelease(message); + } else { + Node* node = JSObjectGetPrivate(thisObject); + Node* child = JSObjectGetPrivate(JSValueToObject(context, arguments[0], NULL)); + + Node_appendChild(node, child); + } + + return JSValueMakeUndefined(context); +} + +static JSValueRef JSNode_removeChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + UNUSED_PARAM(function); + + /* Example of ignoring invalid values */ + if (argumentCount > 0) { + if (JSValueIsObjectOfClass(context, thisObject, JSNode_class(context))) { + if (JSValueIsObjectOfClass(context, arguments[0], JSNode_class(context))) { + Node* node = JSObjectGetPrivate(thisObject); + Node* child = JSObjectGetPrivate(JSValueToObject(context, arguments[0], exception)); + + Node_removeChild(node, child); + } + } + } + + return JSValueMakeUndefined(context); +} + +static JSValueRef JSNode_replaceChild(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + UNUSED_PARAM(function); + + if (argumentCount > 1) { + if (JSValueIsObjectOfClass(context, thisObject, JSNode_class(context))) { + if (JSValueIsObjectOfClass(context, arguments[0], JSNode_class(context))) { + if (JSValueIsObjectOfClass(context, arguments[1], JSNode_class(context))) { + Node* node = JSObjectGetPrivate(thisObject); + Node* newChild = JSObjectGetPrivate(JSValueToObject(context, arguments[0], exception)); + Node* oldChild = JSObjectGetPrivate(JSValueToObject(context, arguments[1], exception)); + + Node_replaceChild(node, newChild, oldChild); + } + } + } + } + + return JSValueMakeUndefined(context); +} + +static JSStaticFunction JSNode_staticFunctions[] = { + { "appendChild", JSNode_appendChild, kJSPropertyAttributeDontDelete }, + { "removeChild", JSNode_removeChild, kJSPropertyAttributeDontDelete }, + { "replaceChild", JSNode_replaceChild, kJSPropertyAttributeDontDelete }, + { 0, 0, 0 } +}; + +static JSValueRef JSNode_getNodeType(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) +{ + UNUSED_PARAM(propertyName); + UNUSED_PARAM(exception); + + Node* node = JSObjectGetPrivate(object); + if (node) { + JSStringRef nodeType = JSStringCreateWithUTF8CString(node->nodeType); + JSValueRef value = JSValueMakeString(context, nodeType); + JSStringRelease(nodeType); + return value; + } + + return NULL; +} + +static JSValueRef JSNode_getChildNodes(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + UNUSED_PARAM(propertyName); + UNUSED_PARAM(exception); + + Node* node = JSObjectGetPrivate(thisObject); + ASSERT(node); + return JSNodeList_new(context, NodeList_new(node)); +} + +static JSValueRef JSNode_getFirstChild(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) +{ + UNUSED_PARAM(object); + UNUSED_PARAM(propertyName); + UNUSED_PARAM(exception); + + return JSValueMakeUndefined(context); +} + +static JSStaticValue JSNode_staticValues[] = { + { "nodeType", JSNode_getNodeType, NULL, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, + { "childNodes", JSNode_getChildNodes, NULL, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, + { "firstChild", JSNode_getFirstChild, NULL, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, + { 0, 0, 0, 0 } +}; + +static void JSNode_initialize(JSContextRef context, JSObjectRef object) +{ + UNUSED_PARAM(context); + + Node* node = JSObjectGetPrivate(object); + ASSERT(node); + + Node_ref(node); +} + +static void JSNode_finalize(JSObjectRef object) +{ + Node* node = JSObjectGetPrivate(object); + ASSERT(node); + + Node_deref(node); +} + +JSClassRef JSNode_class(JSContextRef context) +{ + UNUSED_PARAM(context); + + static JSClassRef jsClass; + if (!jsClass) { + JSClassDefinition definition = kJSClassDefinitionEmpty; + definition.staticValues = JSNode_staticValues; + definition.staticFunctions = JSNode_staticFunctions; + definition.initialize = JSNode_initialize; + definition.finalize = JSNode_finalize; + + jsClass = JSClassCreate(&definition); + } + return jsClass; +} + +JSObjectRef JSNode_new(JSContextRef context, Node* node) +{ + return JSObjectMake(context, JSNode_class(context), node); +} + +JSObjectRef JSNode_construct(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + UNUSED_PARAM(object); + UNUSED_PARAM(argumentCount); + UNUSED_PARAM(arguments); + UNUSED_PARAM(exception); + + return JSNode_new(context, Node_new()); +} diff --git a/Source/JavaScriptCore/API/tests/JSNode.h b/Source/JavaScriptCore/API/tests/JSNode.h new file mode 100644 index 0000000..7725733 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/JSNode.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSNode_h +#define JSNode_h + +#include "JSBase.h" +#include "Node.h" +#include + +extern JSObjectRef JSNode_new(JSContextRef context, Node* node); +extern JSClassRef JSNode_class(JSContextRef context); +extern JSObjectRef JSNode_construct(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +#endif /* JSNode_h */ diff --git a/Source/JavaScriptCore/API/tests/JSNodeList.c b/Source/JavaScriptCore/API/tests/JSNodeList.c new file mode 100644 index 0000000..bc4a8ad --- /dev/null +++ b/Source/JavaScriptCore/API/tests/JSNodeList.c @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "JSNode.h" +#include "JSNodeList.h" +#include "JSObjectRef.h" +#include "JSValueRef.h" +#include "UnusedParam.h" +#include + +static JSValueRef JSNodeList_item(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + UNUSED_PARAM(object); + + if (argumentCount > 0) { + NodeList* nodeList = JSObjectGetPrivate(thisObject); + ASSERT(nodeList); + Node* node = NodeList_item(nodeList, (unsigned)JSValueToNumber(context, arguments[0], exception)); + if (node) + return JSNode_new(context, node); + } + + return JSValueMakeUndefined(context); +} + +static JSStaticFunction JSNodeList_staticFunctions[] = { + { "item", JSNodeList_item, kJSPropertyAttributeDontDelete }, + { 0, 0, 0 } +}; + +static JSValueRef JSNodeList_length(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + UNUSED_PARAM(propertyName); + UNUSED_PARAM(exception); + + NodeList* nodeList = JSObjectGetPrivate(thisObject); + ASSERT(nodeList); + return JSValueMakeNumber(context, NodeList_length(nodeList)); +} + +static JSStaticValue JSNodeList_staticValues[] = { + { "length", JSNodeList_length, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, + { 0, 0, 0, 0 } +}; + +static JSValueRef JSNodeList_getProperty(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +{ + NodeList* nodeList = JSObjectGetPrivate(thisObject); + ASSERT(nodeList); + double index = JSValueToNumber(context, JSValueMakeString(context, propertyName), exception); + unsigned uindex = (unsigned)index; + if (uindex == index) { /* false for NaN */ + Node* node = NodeList_item(nodeList, uindex); + if (node) + return JSNode_new(context, node); + } + + return NULL; +} + +static void JSNodeList_initialize(JSContextRef context, JSObjectRef thisObject) +{ + UNUSED_PARAM(context); + + NodeList* nodeList = JSObjectGetPrivate(thisObject); + ASSERT(nodeList); + + NodeList_ref(nodeList); +} + +static void JSNodeList_finalize(JSObjectRef thisObject) +{ + NodeList* nodeList = JSObjectGetPrivate(thisObject); + ASSERT(nodeList); + + NodeList_deref(nodeList); +} + +static JSClassRef JSNodeList_class(JSContextRef context) +{ + UNUSED_PARAM(context); + + static JSClassRef jsClass; + if (!jsClass) { + JSClassDefinition definition = kJSClassDefinitionEmpty; + definition.staticValues = JSNodeList_staticValues; + definition.staticFunctions = JSNodeList_staticFunctions; + definition.getProperty = JSNodeList_getProperty; + definition.initialize = JSNodeList_initialize; + definition.finalize = JSNodeList_finalize; + + jsClass = JSClassCreate(&definition); + } + + return jsClass; +} + +JSObjectRef JSNodeList_new(JSContextRef context, NodeList* nodeList) +{ + return JSObjectMake(context, JSNodeList_class(context), nodeList); +} diff --git a/Source/JavaScriptCore/API/tests/JSNodeList.h b/Source/JavaScriptCore/API/tests/JSNodeList.h new file mode 100644 index 0000000..f930914 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/JSNodeList.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef JSNodeList_h +#define JSNodeList_h + +#include "JSBase.h" +#include "NodeList.h" + +extern JSObjectRef JSNodeList_new(JSContextRef, NodeList*); + +#endif /* JSNodeList_h */ diff --git a/Source/JavaScriptCore/API/tests/Node.c b/Source/JavaScriptCore/API/tests/Node.c new file mode 100644 index 0000000..913da0a --- /dev/null +++ b/Source/JavaScriptCore/API/tests/Node.c @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "Node.h" +#include +#include + +Node* Node_new(void) +{ + Node* node = (Node*)malloc(sizeof(Node)); + node->refCount = 0; + node->nodeType = "Node"; + node->childNodesTail = NULL; + + return node; +} + +void Node_appendChild(Node* node, Node* child) +{ + Node_ref(child); + NodeLink* nodeLink = (NodeLink*)malloc(sizeof(NodeLink)); + nodeLink->node = child; + nodeLink->prev = node->childNodesTail; + node->childNodesTail = nodeLink; +} + +void Node_removeChild(Node* node, Node* child) +{ + /* Linear search from tail -- good enough for our purposes here */ + NodeLink* current; + NodeLink** currentHandle; + for (currentHandle = &node->childNodesTail, current = *currentHandle; current; currentHandle = ¤t->prev, current = *currentHandle) { + if (current->node == child) { + Node_deref(current->node); + *currentHandle = current->prev; + free(current); + break; + } + } +} + +void Node_replaceChild(Node* node, Node* newChild, Node* oldChild) +{ + /* Linear search from tail -- good enough for our purposes here */ + NodeLink* current; + for (current = node->childNodesTail; current; current = current->prev) { + if (current->node == oldChild) { + Node_deref(current->node); + current->node = newChild; + } + } +} + +void Node_ref(Node* node) +{ + ++node->refCount; +} + +void Node_deref(Node* node) +{ + if (--node->refCount == 0) + free(node); +} diff --git a/Source/JavaScriptCore/API/tests/Node.h b/Source/JavaScriptCore/API/tests/Node.h new file mode 100644 index 0000000..e9250b3 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/Node.h @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef Node_h +#define Node_h + +typedef struct __Node Node; +typedef struct __NodeLink NodeLink; + +struct __NodeLink { + Node* node; + NodeLink* prev; +}; + +struct __Node { + unsigned refCount; + const char* nodeType; + NodeLink* childNodesTail; +}; + +extern Node* Node_new(void); +extern void Node_ref(Node* node); +extern void Node_deref(Node* node); +extern void Node_appendChild(Node* node, Node* child); +extern void Node_removeChild(Node* node, Node* child); +extern void Node_replaceChild(Node* node, Node* newChild, Node* oldChild); + +#endif /* Node_h */ diff --git a/Source/JavaScriptCore/API/tests/NodeList.c b/Source/JavaScriptCore/API/tests/NodeList.c new file mode 100644 index 0000000..ae4c170 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/NodeList.c @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "NodeList.h" + +#include + +extern NodeList* NodeList_new(Node* parentNode) +{ + Node_ref(parentNode); + + NodeList* nodeList = (NodeList*)malloc(sizeof(NodeList)); + nodeList->parentNode = parentNode; + nodeList->refCount = 0; + return nodeList; +} + +extern unsigned NodeList_length(NodeList* nodeList) +{ + /* Linear count from tail -- good enough for our purposes here */ + unsigned i = 0; + NodeLink* n = nodeList->parentNode->childNodesTail; + while (n) { + n = n->prev; + ++i; + } + + return i; +} + +extern Node* NodeList_item(NodeList* nodeList, unsigned index) +{ + unsigned length = NodeList_length(nodeList); + if (index >= length) + return NULL; + + /* Linear search from tail -- good enough for our purposes here */ + NodeLink* n = nodeList->parentNode->childNodesTail; + unsigned i = 0; + unsigned count = length - 1 - index; + while (i < count) { + ++i; + n = n->prev; + } + return n->node; +} + +extern void NodeList_ref(NodeList* nodeList) +{ + ++nodeList->refCount; +} + +extern void NodeList_deref(NodeList* nodeList) +{ + if (--nodeList->refCount == 0) { + Node_deref(nodeList->parentNode); + free(nodeList); + } +} diff --git a/Source/JavaScriptCore/API/tests/NodeList.h b/Source/JavaScriptCore/API/tests/NodeList.h new file mode 100644 index 0000000..25b95bf --- /dev/null +++ b/Source/JavaScriptCore/API/tests/NodeList.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef NodeList_h +#define NodeList_h + +#include "Node.h" + +typedef struct { + unsigned refCount; + Node* parentNode; +} NodeList; + +extern NodeList* NodeList_new(Node* parentNode); +extern unsigned NodeList_length(NodeList*); +extern Node* NodeList_item(NodeList*, unsigned); +extern void NodeList_ref(NodeList*); +extern void NodeList_deref(NodeList*); + +#endif /* NodeList_h */ diff --git a/Source/JavaScriptCore/API/tests/minidom.c b/Source/JavaScriptCore/API/tests/minidom.c new file mode 100644 index 0000000..43ae2c1 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/minidom.c @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2007 Alp Toker + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "JSContextRef.h" +#include "JSNode.h" +#include "JSObjectRef.h" +#include "JSStringRef.h" +#include +#include +#include +#include + +static char* createStringWithContentsOfFile(const char* fileName); +static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +int main(int argc, char* argv[]) +{ + const char *scriptPath = "minidom.js"; + if (argc > 1) { + scriptPath = argv[1]; + } + + JSGlobalContextRef context = JSGlobalContextCreateInGroup(NULL, NULL); + JSObjectRef globalObject = JSContextGetGlobalObject(context); + + JSStringRef printIString = JSStringCreateWithUTF8CString("print"); + JSObjectSetProperty(context, globalObject, printIString, JSObjectMakeFunctionWithCallback(context, printIString, print), kJSPropertyAttributeNone, NULL); + JSStringRelease(printIString); + + JSStringRef node = JSStringCreateWithUTF8CString("Node"); + JSObjectSetProperty(context, globalObject, node, JSObjectMakeConstructor(context, JSNode_class(context), JSNode_construct), kJSPropertyAttributeNone, NULL); + JSStringRelease(node); + + char* scriptUTF8 = createStringWithContentsOfFile(scriptPath); + JSStringRef script = JSStringCreateWithUTF8CString(scriptUTF8); + JSValueRef exception; + JSValueRef result = JSEvaluateScript(context, script, NULL, NULL, 1, &exception); + if (result) + printf("PASS: Test script executed successfully.\n"); + else { + printf("FAIL: Test script threw exception:\n"); + JSStringRef exceptionIString = JSValueToStringCopy(context, exception, NULL); + size_t exceptionUTF8Size = JSStringGetMaximumUTF8CStringSize(exceptionIString); + char* exceptionUTF8 = (char*)malloc(exceptionUTF8Size); + JSStringGetUTF8CString(exceptionIString, exceptionUTF8, exceptionUTF8Size); + printf("%s\n", exceptionUTF8); + free(exceptionUTF8); + JSStringRelease(exceptionIString); + } + JSStringRelease(script); + free(scriptUTF8); + + globalObject = 0; + JSGlobalContextRelease(context); + printf("PASS: Program exited normally.\n"); + return 0; +} + +static JSValueRef print(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) +{ + UNUSED_PARAM(object); + UNUSED_PARAM(thisObject); + + if (argumentCount > 0) { + JSStringRef string = JSValueToStringCopy(context, arguments[0], exception); + size_t numChars = JSStringGetMaximumUTF8CStringSize(string); + char stringUTF8[numChars]; + JSStringGetUTF8CString(string, stringUTF8, numChars); + printf("%s\n", stringUTF8); + } + + return JSValueMakeUndefined(context); +} + +static char* createStringWithContentsOfFile(const char* fileName) +{ + char* buffer; + + size_t buffer_size = 0; + size_t buffer_capacity = 1024; + buffer = (char*)malloc(buffer_capacity); + + FILE* f = fopen(fileName, "r"); + if (!f) { + fprintf(stderr, "Could not open file: %s\n", fileName); + return 0; + } + + while (!feof(f) && !ferror(f)) { + buffer_size += fread(buffer + buffer_size, 1, buffer_capacity - buffer_size, f); + if (buffer_size == buffer_capacity) { /* guarantees space for trailing '\0' */ + buffer_capacity *= 2; + buffer = (char*)realloc(buffer, buffer_capacity); + ASSERT(buffer); + } + + ASSERT(buffer_size < buffer_capacity); + } + fclose(f); + buffer[buffer_size] = '\0'; + + return buffer; +} diff --git a/Source/JavaScriptCore/API/tests/minidom.html b/Source/JavaScriptCore/API/tests/minidom.html new file mode 100644 index 0000000..7ea4747 --- /dev/null +++ b/Source/JavaScriptCore/API/tests/minidom.html @@ -0,0 +1,9 @@ + + + + + + +

+
+
diff --git a/Source/JavaScriptCore/API/tests/minidom.js b/Source/JavaScriptCore/API/tests/minidom.js
new file mode 100644
index 0000000..4808960
--- /dev/null
+++ b/Source/JavaScriptCore/API/tests/minidom.js
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+function shouldBe(a, b)
+{
+    var evalA;
+    try {
+        evalA = eval(a);
+    } catch(e) {
+        evalA = e;
+    }
+    
+    if (evalA == b || isNaN(evalA) && typeof evalA == 'number' && isNaN(b) && typeof b == 'number')
+        print("PASS: " + a + " should be " + b + " and is.", "green");
+    else
+        print("__FAIL__: " + a + " should be " + b + " but instead is " + evalA + ".", "red");
+}
+
+function test()
+{
+    print("Node is " + Node);
+    for (var p in Node)
+        print(p + ": " + Node[p]);
+    
+    node = new Node();
+    print("node is " + node);
+    for (var p in node)
+        print(p + ": " + node[p]);
+
+    child1 = new Node();
+    child2 = new Node();
+    child3 = new Node();
+    
+    node.appendChild(child1);
+    node.appendChild(child2);
+
+    var childNodes = node.childNodes;
+    
+    for (var i = 0; i < childNodes.length + 1; i++) {
+        print("item " + i + ": " + childNodes.item(i));
+    }
+    
+    for (var i = 0; i < childNodes.length + 1; i++) {
+        print(i + ": " + childNodes[i]);
+    }
+
+    node.removeChild(child1);
+    node.replaceChild(child3, child2);
+    
+    for (var i = 0; i < childNodes.length + 1; i++) {
+        print("item " + i + ": " + childNodes.item(i));
+    }
+
+    for (var i = 0; i < childNodes.length + 1; i++) {
+        print(i + ": " + childNodes[i]);
+    }
+
+    try {
+        node.appendChild(null);
+    } catch(e) {
+        print("caught: " + e);
+    }
+    
+    try {
+        var o = new Object();
+        o.appendChild = node.appendChild;
+        o.appendChild(node);
+    } catch(e) {
+        print("caught: " + e);
+    }
+    
+    try {
+        node.appendChild();
+    } catch(e) {
+        print("caught: " + e);
+    }
+    
+    oldNodeType = node.nodeType;
+    node.nodeType = 1;
+    shouldBe("node.nodeType", oldNodeType);
+    
+    shouldBe("node instanceof Node", true);
+    shouldBe("new Object() instanceof Node", false);
+    
+    print(Node);
+}
+
+test();
diff --git a/Source/JavaScriptCore/API/tests/testapi.c b/Source/JavaScriptCore/API/tests/testapi.c
new file mode 100644
index 0000000..1ecfc7e
--- /dev/null
+++ b/Source/JavaScriptCore/API/tests/testapi.c
@@ -0,0 +1,1458 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "JavaScriptCore.h"
+#include "JSBasePrivate.h"
+#include "JSContextRefPrivate.h"
+#include "JSObjectRefPrivate.h"
+#include 
+#define ASSERT_DISABLED 0
+#include 
+#include 
+
+#if COMPILER(MSVC)
+
+#include 
+
+static double nan(const char*)
+{
+    return std::numeric_limits::quiet_NaN();
+}
+
+#endif
+
+static JSGlobalContextRef context;
+static int failed;
+static void assertEqualsAsBoolean(JSValueRef value, bool expectedValue)
+{
+    if (JSValueToBoolean(context, value) != expectedValue) {
+        fprintf(stderr, "assertEqualsAsBoolean failed: %p, %d\n", value, expectedValue);
+        failed = 1;
+    }
+}
+
+static void assertEqualsAsNumber(JSValueRef value, double expectedValue)
+{
+    double number = JSValueToNumber(context, value, NULL);
+
+    // FIXME  - On i386 the isnan(double) macro tries to map to the isnan(float) function,
+    // causing a build break with -Wshorten-64-to-32 enabled.  The issue is known by the appropriate team.
+    // After that's resolved, we can remove these casts
+    if (number != expectedValue && !(isnan((float)number) && isnan((float)expectedValue))) {
+        fprintf(stderr, "assertEqualsAsNumber failed: %p, %lf\n", value, expectedValue);
+        failed = 1;
+    }
+}
+
+static void assertEqualsAsUTF8String(JSValueRef value, const char* expectedValue)
+{
+    JSStringRef valueAsString = JSValueToStringCopy(context, value, NULL);
+
+    size_t jsSize = JSStringGetMaximumUTF8CStringSize(valueAsString);
+    char* jsBuffer = (char*)malloc(jsSize);
+    JSStringGetUTF8CString(valueAsString, jsBuffer, jsSize);
+    
+    unsigned i;
+    for (i = 0; jsBuffer[i]; i++) {
+        if (jsBuffer[i] != expectedValue[i]) {
+            fprintf(stderr, "assertEqualsAsUTF8String failed at character %d: %c(%d) != %c(%d)\n", i, jsBuffer[i], jsBuffer[i], expectedValue[i], expectedValue[i]);
+            failed = 1;
+        }
+    }
+
+    if (jsSize < strlen(jsBuffer) + 1) {
+        fprintf(stderr, "assertEqualsAsUTF8String failed: jsSize was too small\n");
+        failed = 1;
+    }
+
+    free(jsBuffer);
+    JSStringRelease(valueAsString);
+}
+
+static void assertEqualsAsCharactersPtr(JSValueRef value, const char* expectedValue)
+{
+    JSStringRef valueAsString = JSValueToStringCopy(context, value, NULL);
+
+    size_t jsLength = JSStringGetLength(valueAsString);
+    const JSChar* jsBuffer = JSStringGetCharactersPtr(valueAsString);
+
+    CFStringRef expectedValueAsCFString = CFStringCreateWithCString(kCFAllocatorDefault, 
+                                                                    expectedValue,
+                                                                    kCFStringEncodingUTF8);    
+    CFIndex cfLength = CFStringGetLength(expectedValueAsCFString);
+    UniChar* cfBuffer = (UniChar*)malloc(cfLength * sizeof(UniChar));
+    CFStringGetCharacters(expectedValueAsCFString, CFRangeMake(0, cfLength), cfBuffer);
+    CFRelease(expectedValueAsCFString);
+
+    if (memcmp(jsBuffer, cfBuffer, cfLength * sizeof(UniChar)) != 0) {
+        fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsBuffer != cfBuffer\n");
+        failed = 1;
+    }
+    
+    if (jsLength != (size_t)cfLength) {
+        fprintf(stderr, "assertEqualsAsCharactersPtr failed: jsLength(%ld) != cfLength(%ld)\n", jsLength, cfLength);
+        failed = 1;
+    }
+
+    free(cfBuffer);
+    JSStringRelease(valueAsString);
+}
+
+static bool timeZoneIsPST()
+{
+    char timeZoneName[70];
+    struct tm gtm;
+    memset(>m, 0, sizeof(gtm));
+    strftime(timeZoneName, sizeof(timeZoneName), "%Z", >m);
+
+    return 0 == strcmp("PST", timeZoneName);
+}
+
+static JSValueRef jsGlobalValue; // non-stack value for testing JSValueProtect()
+
+/* MyObject pseudo-class */
+
+static bool MyObject_hasProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(object);
+
+    if (JSStringIsEqualToUTF8CString(propertyName, "alwaysOne")
+        || JSStringIsEqualToUTF8CString(propertyName, "cantFind")
+        || JSStringIsEqualToUTF8CString(propertyName, "throwOnGet")
+        || JSStringIsEqualToUTF8CString(propertyName, "myPropertyName")
+        || JSStringIsEqualToUTF8CString(propertyName, "hasPropertyLie")
+        || JSStringIsEqualToUTF8CString(propertyName, "0")) {
+        return true;
+    }
+    
+    return false;
+}
+
+static JSValueRef MyObject_getProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(object);
+    
+    if (JSStringIsEqualToUTF8CString(propertyName, "alwaysOne")) {
+        return JSValueMakeNumber(context, 1);
+    }
+    
+    if (JSStringIsEqualToUTF8CString(propertyName, "myPropertyName")) {
+        return JSValueMakeNumber(context, 1);
+    }
+
+    if (JSStringIsEqualToUTF8CString(propertyName, "cantFind")) {
+        return JSValueMakeUndefined(context);
+    }
+    
+    if (JSStringIsEqualToUTF8CString(propertyName, "hasPropertyLie")) {
+        return 0;
+    }
+
+    if (JSStringIsEqualToUTF8CString(propertyName, "throwOnGet")) {
+        return JSEvaluateScript(context, JSStringCreateWithUTF8CString("throw 'an exception'"), object, JSStringCreateWithUTF8CString("test script"), 1, exception);
+    }
+
+    if (JSStringIsEqualToUTF8CString(propertyName, "0")) {
+        *exception = JSValueMakeNumber(context, 1);
+        return JSValueMakeNumber(context, 1);
+    }
+    
+    return JSValueMakeNull(context);
+}
+
+static bool MyObject_setProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(value);
+    UNUSED_PARAM(exception);
+
+    if (JSStringIsEqualToUTF8CString(propertyName, "cantSet"))
+        return true; // pretend we set the property in order to swallow it
+    
+    if (JSStringIsEqualToUTF8CString(propertyName, "throwOnSet")) {
+        JSEvaluateScript(context, JSStringCreateWithUTF8CString("throw 'an exception'"), object, JSStringCreateWithUTF8CString("test script"), 1, exception);
+    }
+    
+    return false;
+}
+
+static bool MyObject_deleteProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(object);
+    
+    if (JSStringIsEqualToUTF8CString(propertyName, "cantDelete"))
+        return true;
+    
+    if (JSStringIsEqualToUTF8CString(propertyName, "throwOnDelete")) {
+        JSEvaluateScript(context, JSStringCreateWithUTF8CString("throw 'an exception'"), object, JSStringCreateWithUTF8CString("test script"), 1, exception);
+        return false;
+    }
+
+    return false;
+}
+
+static void MyObject_getPropertyNames(JSContextRef context, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(object);
+    
+    JSStringRef propertyName;
+    
+    propertyName = JSStringCreateWithUTF8CString("alwaysOne");
+    JSPropertyNameAccumulatorAddName(propertyNames, propertyName);
+    JSStringRelease(propertyName);
+    
+    propertyName = JSStringCreateWithUTF8CString("myPropertyName");
+    JSPropertyNameAccumulatorAddName(propertyNames, propertyName);
+    JSStringRelease(propertyName);
+}
+
+static JSValueRef MyObject_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(thisObject);
+    UNUSED_PARAM(exception);
+
+    if (argumentCount > 0 && JSValueIsString(context, arguments[0]) && JSStringIsEqualToUTF8CString(JSValueToStringCopy(context, arguments[0], 0), "throwOnCall")) {
+        JSEvaluateScript(context, JSStringCreateWithUTF8CString("throw 'an exception'"), object, JSStringCreateWithUTF8CString("test script"), 1, exception);
+        return JSValueMakeUndefined(context);
+    }
+
+    if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(context, 0)))
+        return JSValueMakeNumber(context, 1);
+    
+    return JSValueMakeUndefined(context);
+}
+
+static JSObjectRef MyObject_callAsConstructor(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(object);
+
+    if (argumentCount > 0 && JSValueIsString(context, arguments[0]) && JSStringIsEqualToUTF8CString(JSValueToStringCopy(context, arguments[0], 0), "throwOnConstruct")) {
+        JSEvaluateScript(context, JSStringCreateWithUTF8CString("throw 'an exception'"), object, JSStringCreateWithUTF8CString("test script"), 1, exception);
+        return object;
+    }
+
+    if (argumentCount > 0 && JSValueIsStrictEqual(context, arguments[0], JSValueMakeNumber(context, 0)))
+        return JSValueToObject(context, JSValueMakeNumber(context, 1), exception);
+    
+    return JSValueToObject(context, JSValueMakeNumber(context, 0), exception);
+}
+
+static bool MyObject_hasInstance(JSContextRef context, JSObjectRef constructor, JSValueRef possibleValue, JSValueRef* exception)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(constructor);
+
+    if (JSValueIsString(context, possibleValue) && JSStringIsEqualToUTF8CString(JSValueToStringCopy(context, possibleValue, 0), "throwOnHasInstance")) {
+        JSEvaluateScript(context, JSStringCreateWithUTF8CString("throw 'an exception'"), constructor, JSStringCreateWithUTF8CString("test script"), 1, exception);
+        return false;
+    }
+
+    JSStringRef numberString = JSStringCreateWithUTF8CString("Number");
+    JSObjectRef numberConstructor = JSValueToObject(context, JSObjectGetProperty(context, JSContextGetGlobalObject(context), numberString, exception), exception);
+    JSStringRelease(numberString);
+
+    return JSValueIsInstanceOfConstructor(context, possibleValue, numberConstructor, exception);
+}
+
+static JSValueRef MyObject_convertToType(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception)
+{
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(exception);
+    
+    switch (type) {
+    case kJSTypeNumber:
+        return JSValueMakeNumber(context, 1);
+    case kJSTypeString:
+        {
+            JSStringRef string = JSStringCreateWithUTF8CString("MyObjectAsString");
+            JSValueRef result = JSValueMakeString(context, string);
+            JSStringRelease(string);
+            return result;
+        }
+    default:
+        break;
+    }
+
+    // string conversion -- forward to default object class
+    return JSValueMakeNull(context);
+}
+
+static JSStaticValue evilStaticValues[] = {
+    { "nullGetSet", 0, 0, kJSPropertyAttributeNone },
+    { 0, 0, 0, 0 }
+};
+
+static JSStaticFunction evilStaticFunctions[] = {
+    { "nullCall", 0, kJSPropertyAttributeNone },
+    { 0, 0, 0 }
+};
+
+JSClassDefinition MyObject_definition = {
+    0,
+    kJSClassAttributeNone,
+    
+    "MyObject",
+    NULL,
+    
+    evilStaticValues,
+    evilStaticFunctions,
+    
+    NULL,
+    NULL,
+    MyObject_hasProperty,
+    MyObject_getProperty,
+    MyObject_setProperty,
+    MyObject_deleteProperty,
+    MyObject_getPropertyNames,
+    MyObject_callAsFunction,
+    MyObject_callAsConstructor,
+    MyObject_hasInstance,
+    MyObject_convertToType,
+};
+
+static JSClassRef MyObject_class(JSContextRef context)
+{
+    UNUSED_PARAM(context);
+
+    static JSClassRef jsClass;
+    if (!jsClass)
+        jsClass = JSClassCreate(&MyObject_definition);
+    
+    return jsClass;
+}
+
+static bool EvilExceptionObject_hasInstance(JSContextRef context, JSObjectRef constructor, JSValueRef possibleValue, JSValueRef* exception)
+{
+    UNUSED_PARAM(context);
+    UNUSED_PARAM(constructor);
+    
+    JSStringRef hasInstanceName = JSStringCreateWithUTF8CString("hasInstance");
+    JSValueRef hasInstance = JSObjectGetProperty(context, constructor, hasInstanceName, exception);
+    JSStringRelease(hasInstanceName);
+    if (!hasInstance)
+        return false;
+    JSObjectRef function = JSValueToObject(context, hasInstance, exception);
+    JSValueRef result = JSObjectCallAsFunction(context, function, constructor, 1, &possibleValue, exception);
+    return result && JSValueToBoolean(context, result);
+}
+
+static JSValueRef EvilExceptionObject_convertToType(JSContextRef context, JSObjectRef object, JSType type, JSValueRef* exception)
+{
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(exception);
+    JSStringRef funcName;
+    switch (type) {
+    case kJSTypeNumber:
+        funcName = JSStringCreateWithUTF8CString("toNumber");
+        break;
+    case kJSTypeString:
+        funcName = JSStringCreateWithUTF8CString("toStringExplicit");
+        break;
+    default:
+        return JSValueMakeNull(context);
+        break;
+    }
+    
+    JSValueRef func = JSObjectGetProperty(context, object, funcName, exception);
+    JSStringRelease(funcName);    
+    JSObjectRef function = JSValueToObject(context, func, exception);
+    if (!function)
+        return JSValueMakeNull(context);
+    JSValueRef value = JSObjectCallAsFunction(context, function, object, 0, NULL, exception);
+    if (!value) {
+        JSStringRef errorString = JSStringCreateWithUTF8CString("convertToType failed"); 
+        JSValueRef errorStringRef = JSValueMakeString(context, errorString);
+        JSStringRelease(errorString);
+        return errorStringRef;
+    }
+    return value;
+}
+
+JSClassDefinition EvilExceptionObject_definition = {
+    0,
+    kJSClassAttributeNone,
+
+    "EvilExceptionObject",
+    NULL,
+
+    NULL,
+    NULL,
+
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    EvilExceptionObject_hasInstance,
+    EvilExceptionObject_convertToType,
+};
+
+static JSClassRef EvilExceptionObject_class(JSContextRef context)
+{
+    UNUSED_PARAM(context);
+    
+    static JSClassRef jsClass;
+    if (!jsClass)
+        jsClass = JSClassCreate(&EvilExceptionObject_definition);
+    
+    return jsClass;
+}
+
+JSClassDefinition EmptyObject_definition = {
+    0,
+    kJSClassAttributeNone,
+    
+    NULL,
+    NULL,
+    
+    NULL,
+    NULL,
+    
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+};
+
+static JSClassRef EmptyObject_class(JSContextRef context)
+{
+    UNUSED_PARAM(context);
+    
+    static JSClassRef jsClass;
+    if (!jsClass)
+        jsClass = JSClassCreate(&EmptyObject_definition);
+    
+    return jsClass;
+}
+
+
+static JSValueRef Base_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(propertyName);
+    UNUSED_PARAM(exception);
+
+    return JSValueMakeNumber(ctx, 1); // distinguish base get form derived get
+}
+
+static bool Base_set(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+{
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(propertyName);
+    UNUSED_PARAM(value);
+
+    *exception = JSValueMakeNumber(ctx, 1); // distinguish base set from derived set
+    return true;
+}
+
+static JSValueRef Base_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(function);
+    UNUSED_PARAM(thisObject);
+    UNUSED_PARAM(argumentCount);
+    UNUSED_PARAM(arguments);
+    UNUSED_PARAM(exception);
+    
+    return JSValueMakeNumber(ctx, 1); // distinguish base call from derived call
+}
+
+static JSStaticFunction Base_staticFunctions[] = {
+    { "baseProtoDup", NULL, kJSPropertyAttributeNone },
+    { "baseProto", Base_callAsFunction, kJSPropertyAttributeNone },
+    { 0, 0, 0 }
+};
+
+static JSStaticValue Base_staticValues[] = {
+    { "baseDup", Base_get, Base_set, kJSPropertyAttributeNone },
+    { "baseOnly", Base_get, Base_set, kJSPropertyAttributeNone },
+    { 0, 0, 0, 0 }
+};
+
+static bool TestInitializeFinalize;
+static void Base_initialize(JSContextRef context, JSObjectRef object)
+{
+    UNUSED_PARAM(context);
+
+    if (TestInitializeFinalize) {
+        ASSERT((void*)1 == JSObjectGetPrivate(object));
+        JSObjectSetPrivate(object, (void*)2);
+    }
+}
+
+static unsigned Base_didFinalize;
+static void Base_finalize(JSObjectRef object)
+{
+    UNUSED_PARAM(object);
+    if (TestInitializeFinalize) {
+        ASSERT((void*)4 == JSObjectGetPrivate(object));
+        Base_didFinalize = true;
+    }
+}
+
+static JSClassRef Base_class(JSContextRef context)
+{
+    UNUSED_PARAM(context);
+
+    static JSClassRef jsClass;
+    if (!jsClass) {
+        JSClassDefinition definition = kJSClassDefinitionEmpty;
+        definition.staticValues = Base_staticValues;
+        definition.staticFunctions = Base_staticFunctions;
+        definition.initialize = Base_initialize;
+        definition.finalize = Base_finalize;
+        jsClass = JSClassCreate(&definition);
+    }
+    return jsClass;
+}
+
+static JSValueRef Derived_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(propertyName);
+    UNUSED_PARAM(exception);
+
+    return JSValueMakeNumber(ctx, 2); // distinguish base get form derived get
+}
+
+static bool Derived_set(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+{
+    UNUSED_PARAM(ctx);
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(propertyName);
+    UNUSED_PARAM(value);
+
+    *exception = JSValueMakeNumber(ctx, 2); // distinguish base set from derived set
+    return true;
+}
+
+static JSValueRef Derived_callAsFunction(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(function);
+    UNUSED_PARAM(thisObject);
+    UNUSED_PARAM(argumentCount);
+    UNUSED_PARAM(arguments);
+    UNUSED_PARAM(exception);
+    
+    return JSValueMakeNumber(ctx, 2); // distinguish base call from derived call
+}
+
+static JSStaticFunction Derived_staticFunctions[] = {
+    { "protoOnly", Derived_callAsFunction, kJSPropertyAttributeNone },
+    { "protoDup", NULL, kJSPropertyAttributeNone },
+    { "baseProtoDup", Derived_callAsFunction, kJSPropertyAttributeNone },
+    { 0, 0, 0 }
+};
+
+static JSStaticValue Derived_staticValues[] = {
+    { "derivedOnly", Derived_get, Derived_set, kJSPropertyAttributeNone },
+    { "protoDup", Derived_get, Derived_set, kJSPropertyAttributeNone },
+    { "baseDup", Derived_get, Derived_set, kJSPropertyAttributeNone },
+    { 0, 0, 0, 0 }
+};
+
+static void Derived_initialize(JSContextRef context, JSObjectRef object)
+{
+    UNUSED_PARAM(context);
+
+    if (TestInitializeFinalize) {
+        ASSERT((void*)2 == JSObjectGetPrivate(object));
+        JSObjectSetPrivate(object, (void*)3);
+    }
+}
+
+static void Derived_finalize(JSObjectRef object)
+{
+    if (TestInitializeFinalize) {
+        ASSERT((void*)3 == JSObjectGetPrivate(object));
+        JSObjectSetPrivate(object, (void*)4);
+    }
+}
+
+static JSClassRef Derived_class(JSContextRef context)
+{
+    static JSClassRef jsClass;
+    if (!jsClass) {
+        JSClassDefinition definition = kJSClassDefinitionEmpty;
+        definition.parentClass = Base_class(context);
+        definition.staticValues = Derived_staticValues;
+        definition.staticFunctions = Derived_staticFunctions;
+        definition.initialize = Derived_initialize;
+        definition.finalize = Derived_finalize;
+        jsClass = JSClassCreate(&definition);
+    }
+    return jsClass;
+}
+
+static JSClassRef Derived2_class(JSContextRef context)
+{
+    static JSClassRef jsClass;
+    if (!jsClass) {
+        JSClassDefinition definition = kJSClassDefinitionEmpty;
+        definition.parentClass = Derived_class(context);
+        jsClass = JSClassCreate(&definition);
+    }
+    return jsClass;
+}
+
+static JSValueRef print_callAsFunction(JSContextRef ctx, JSObjectRef functionObject, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(functionObject);
+    UNUSED_PARAM(thisObject);
+    UNUSED_PARAM(exception);
+
+    ASSERT(JSContextGetGlobalContext(ctx) == context);
+    
+    if (argumentCount > 0) {
+        JSStringRef string = JSValueToStringCopy(ctx, arguments[0], NULL);
+        size_t sizeUTF8 = JSStringGetMaximumUTF8CStringSize(string);
+        char* stringUTF8 = (char*)malloc(sizeUTF8);
+        JSStringGetUTF8CString(string, stringUTF8, sizeUTF8);
+        printf("%s\n", stringUTF8);
+        free(stringUTF8);
+        JSStringRelease(string);
+    }
+    
+    return JSValueMakeUndefined(ctx);
+}
+
+static JSObjectRef myConstructor_callAsConstructor(JSContextRef context, JSObjectRef constructorObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(constructorObject);
+    UNUSED_PARAM(exception);
+    
+    JSObjectRef result = JSObjectMake(context, NULL, NULL);
+    if (argumentCount > 0) {
+        JSStringRef value = JSStringCreateWithUTF8CString("value");
+        JSObjectSetProperty(context, result, value, arguments[0], kJSPropertyAttributeNone, NULL);
+        JSStringRelease(value);
+    }
+    
+    return result;
+}
+
+
+static void globalObject_initialize(JSContextRef context, JSObjectRef object)
+{
+    UNUSED_PARAM(object);
+    // Ensure that an execution context is passed in
+    ASSERT(context);
+
+    // Ensure that the global object is set to the object that we were passed
+    JSObjectRef globalObject = JSContextGetGlobalObject(context);
+    ASSERT(globalObject);
+    ASSERT(object == globalObject);
+
+    // Ensure that the standard global properties have been set on the global object
+    JSStringRef array = JSStringCreateWithUTF8CString("Array");
+    JSObjectRef arrayConstructor = JSValueToObject(context, JSObjectGetProperty(context, globalObject, array, NULL), NULL);
+    JSStringRelease(array);
+
+    UNUSED_PARAM(arrayConstructor);
+    ASSERT(arrayConstructor);
+}
+
+static JSValueRef globalObject_get(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+{
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(propertyName);
+    UNUSED_PARAM(exception);
+
+    return JSValueMakeNumber(ctx, 3);
+}
+
+static bool globalObject_set(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+{
+    UNUSED_PARAM(object);
+    UNUSED_PARAM(propertyName);
+    UNUSED_PARAM(value);
+
+    *exception = JSValueMakeNumber(ctx, 3);
+    return true;
+}
+
+static JSValueRef globalObject_call(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(function);
+    UNUSED_PARAM(thisObject);
+    UNUSED_PARAM(argumentCount);
+    UNUSED_PARAM(arguments);
+    UNUSED_PARAM(exception);
+
+    return JSValueMakeNumber(ctx, 3);
+}
+
+static JSValueRef functionGC(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    UNUSED_PARAM(function);
+    UNUSED_PARAM(thisObject);
+    UNUSED_PARAM(argumentCount);
+    UNUSED_PARAM(arguments);
+    UNUSED_PARAM(exception);
+    JSGarbageCollect(context);
+    return JSValueMakeUndefined(context);
+}
+
+static JSStaticValue globalObject_staticValues[] = {
+    { "globalStaticValue", globalObject_get, globalObject_set, kJSPropertyAttributeNone },
+    { 0, 0, 0, 0 }
+};
+
+static JSStaticFunction globalObject_staticFunctions[] = {
+    { "globalStaticFunction", globalObject_call, kJSPropertyAttributeNone },
+    { "gc", functionGC, kJSPropertyAttributeNone },
+    { 0, 0, 0 }
+};
+
+static char* createStringWithContentsOfFile(const char* fileName);
+
+static void testInitializeFinalize()
+{
+    JSObjectRef o = JSObjectMake(context, Derived_class(context), (void*)1);
+    UNUSED_PARAM(o);
+    ASSERT(JSObjectGetPrivate(o) == (void*)3);
+}
+
+static JSValueRef jsNumberValue =  NULL;
+
+static JSObjectRef aHeapRef = NULL;
+
+static void makeGlobalNumberValue(JSContextRef context) {
+    JSValueRef v = JSValueMakeNumber(context, 420);
+    JSValueProtect(context, v);
+    jsNumberValue = v;
+    v = NULL;
+}
+
+static bool assertTrue(bool value, const char* message)
+{
+    if (!value) {
+        if (message)
+            fprintf(stderr, "assertTrue failed: '%s'\n", message);
+        else
+            fprintf(stderr, "assertTrue failed.\n");
+        failed = 1;
+    }
+    return value;
+}
+
+static bool checkForCycleInPrototypeChain()
+{
+    bool result = true;
+    JSGlobalContextRef context = JSGlobalContextCreate(0);
+    JSObjectRef object1 = JSObjectMake(context, /* jsClass */ 0, /* data */ 0);
+    JSObjectRef object2 = JSObjectMake(context, /* jsClass */ 0, /* data */ 0);
+    JSObjectRef object3 = JSObjectMake(context, /* jsClass */ 0, /* data */ 0);
+
+    JSObjectSetPrototype(context, object1, JSValueMakeNull(context));
+    ASSERT(JSValueIsNull(context, JSObjectGetPrototype(context, object1)));
+
+    // object1 -> object1
+    JSObjectSetPrototype(context, object1, object1);
+    result &= assertTrue(JSValueIsNull(context, JSObjectGetPrototype(context, object1)), "It is possible to assign self as a prototype");
+
+    // object1 -> object2 -> object1
+    JSObjectSetPrototype(context, object2, object1);
+    ASSERT(JSValueIsStrictEqual(context, JSObjectGetPrototype(context, object2), object1));
+    JSObjectSetPrototype(context, object1, object2);
+    result &= assertTrue(JSValueIsNull(context, JSObjectGetPrototype(context, object1)), "It is possible to close a prototype chain cycle");
+
+    // object1 -> object2 -> object3 -> object1
+    JSObjectSetPrototype(context, object2, object3);
+    ASSERT(JSValueIsStrictEqual(context, JSObjectGetPrototype(context, object2), object3));
+    JSObjectSetPrototype(context, object1, object2);
+    ASSERT(JSValueIsStrictEqual(context, JSObjectGetPrototype(context, object1), object2));
+    JSObjectSetPrototype(context, object3, object1);
+    result &= assertTrue(!JSValueIsStrictEqual(context, JSObjectGetPrototype(context, object3), object1), "It is possible to close a prototype chain cycle");
+
+    JSValueRef exception;
+    JSStringRef code = JSStringCreateWithUTF8CString("o = { }; p = { }; o.__proto__ = p; p.__proto__ = o");
+    JSStringRef file = JSStringCreateWithUTF8CString("");
+    result &= assertTrue(!JSEvaluateScript(context, code, /* thisObject*/ 0, file, 1, &exception)
+                         , "An exception should be thrown");
+
+    JSStringRelease(code);
+    JSStringRelease(file);
+    JSGlobalContextRelease(context);
+    return result;
+}
+
+int main(int argc, char* argv[])
+{
+    const char *scriptPath = "testapi.js";
+    if (argc > 1) {
+        scriptPath = argv[1];
+    }
+    
+    // Test garbage collection with a fresh context
+    context = JSGlobalContextCreateInGroup(NULL, NULL);
+    TestInitializeFinalize = true;
+    testInitializeFinalize();
+    JSGlobalContextRelease(context);
+    TestInitializeFinalize = false;
+
+    ASSERT(Base_didFinalize);
+
+    JSClassDefinition globalObjectClassDefinition = kJSClassDefinitionEmpty;
+    globalObjectClassDefinition.initialize = globalObject_initialize;
+    globalObjectClassDefinition.staticValues = globalObject_staticValues;
+    globalObjectClassDefinition.staticFunctions = globalObject_staticFunctions;
+    globalObjectClassDefinition.attributes = kJSClassAttributeNoAutomaticPrototype;
+    JSClassRef globalObjectClass = JSClassCreate(&globalObjectClassDefinition);
+    context = JSGlobalContextCreateInGroup(NULL, globalObjectClass);
+
+    JSGlobalContextRetain(context);
+    JSGlobalContextRelease(context);
+    ASSERT(JSContextGetGlobalContext(context) == context);
+    
+    JSReportExtraMemoryCost(context, 0);
+    JSReportExtraMemoryCost(context, 1);
+    JSReportExtraMemoryCost(context, 1024);
+
+    JSObjectRef globalObject = JSContextGetGlobalObject(context);
+    ASSERT(JSValueIsObject(context, globalObject));
+    
+    JSValueRef jsUndefined = JSValueMakeUndefined(context);
+    JSValueRef jsNull = JSValueMakeNull(context);
+    JSValueRef jsTrue = JSValueMakeBoolean(context, true);
+    JSValueRef jsFalse = JSValueMakeBoolean(context, false);
+    JSValueRef jsZero = JSValueMakeNumber(context, 0);
+    JSValueRef jsOne = JSValueMakeNumber(context, 1);
+    JSValueRef jsOneThird = JSValueMakeNumber(context, 1.0 / 3.0);
+    JSObjectRef jsObjectNoProto = JSObjectMake(context, NULL, NULL);
+    JSObjectSetPrototype(context, jsObjectNoProto, JSValueMakeNull(context));
+
+    // FIXME: test funny utf8 characters
+    JSStringRef jsEmptyIString = JSStringCreateWithUTF8CString("");
+    JSValueRef jsEmptyString = JSValueMakeString(context, jsEmptyIString);
+    
+    JSStringRef jsOneIString = JSStringCreateWithUTF8CString("1");
+    JSValueRef jsOneString = JSValueMakeString(context, jsOneIString);
+
+    UniChar singleUniChar = 65; // Capital A
+    CFMutableStringRef cfString = 
+        CFStringCreateMutableWithExternalCharactersNoCopy(kCFAllocatorDefault,
+                                                          &singleUniChar,
+                                                          1,
+                                                          1,
+                                                          kCFAllocatorNull);
+
+    JSStringRef jsCFIString = JSStringCreateWithCFString(cfString);
+    JSValueRef jsCFString = JSValueMakeString(context, jsCFIString);
+    
+    CFStringRef cfEmptyString = CFStringCreateWithCString(kCFAllocatorDefault, "", kCFStringEncodingUTF8);
+    
+    JSStringRef jsCFEmptyIString = JSStringCreateWithCFString(cfEmptyString);
+    JSValueRef jsCFEmptyString = JSValueMakeString(context, jsCFEmptyIString);
+
+    CFIndex cfStringLength = CFStringGetLength(cfString);
+    UniChar* buffer = (UniChar*)malloc(cfStringLength * sizeof(UniChar));
+    CFStringGetCharacters(cfString, 
+                          CFRangeMake(0, cfStringLength), 
+                          buffer);
+    JSStringRef jsCFIStringWithCharacters = JSStringCreateWithCharacters((JSChar*)buffer, cfStringLength);
+    JSValueRef jsCFStringWithCharacters = JSValueMakeString(context, jsCFIStringWithCharacters);
+    
+    JSStringRef jsCFEmptyIStringWithCharacters = JSStringCreateWithCharacters((JSChar*)buffer, CFStringGetLength(cfEmptyString));
+    free(buffer);
+    JSValueRef jsCFEmptyStringWithCharacters = JSValueMakeString(context, jsCFEmptyIStringWithCharacters);
+
+    ASSERT(JSValueGetType(context, jsUndefined) == kJSTypeUndefined);
+    ASSERT(JSValueGetType(context, jsNull) == kJSTypeNull);
+    ASSERT(JSValueGetType(context, jsTrue) == kJSTypeBoolean);
+    ASSERT(JSValueGetType(context, jsFalse) == kJSTypeBoolean);
+    ASSERT(JSValueGetType(context, jsZero) == kJSTypeNumber);
+    ASSERT(JSValueGetType(context, jsOne) == kJSTypeNumber);
+    ASSERT(JSValueGetType(context, jsOneThird) == kJSTypeNumber);
+    ASSERT(JSValueGetType(context, jsEmptyString) == kJSTypeString);
+    ASSERT(JSValueGetType(context, jsOneString) == kJSTypeString);
+    ASSERT(JSValueGetType(context, jsCFString) == kJSTypeString);
+    ASSERT(JSValueGetType(context, jsCFStringWithCharacters) == kJSTypeString);
+    ASSERT(JSValueGetType(context, jsCFEmptyString) == kJSTypeString);
+    ASSERT(JSValueGetType(context, jsCFEmptyStringWithCharacters) == kJSTypeString);
+
+    JSObjectRef myObject = JSObjectMake(context, MyObject_class(context), NULL);
+    JSStringRef myObjectIString = JSStringCreateWithUTF8CString("MyObject");
+    JSObjectSetProperty(context, globalObject, myObjectIString, myObject, kJSPropertyAttributeNone, NULL);
+    JSStringRelease(myObjectIString);
+    
+    JSObjectRef EvilExceptionObject = JSObjectMake(context, EvilExceptionObject_class(context), NULL);
+    JSStringRef EvilExceptionObjectIString = JSStringCreateWithUTF8CString("EvilExceptionObject");
+    JSObjectSetProperty(context, globalObject, EvilExceptionObjectIString, EvilExceptionObject, kJSPropertyAttributeNone, NULL);
+    JSStringRelease(EvilExceptionObjectIString);
+    
+    JSObjectRef EmptyObject = JSObjectMake(context, EmptyObject_class(context), NULL);
+    JSStringRef EmptyObjectIString = JSStringCreateWithUTF8CString("EmptyObject");
+    JSObjectSetProperty(context, globalObject, EmptyObjectIString, EmptyObject, kJSPropertyAttributeNone, NULL);
+    JSStringRelease(EmptyObjectIString);
+    
+    JSStringRef lengthStr = JSStringCreateWithUTF8CString("length");
+    JSObjectRef aStackRef = JSObjectMakeArray(context, 0, 0, 0);
+    aHeapRef = aStackRef;
+    JSObjectSetProperty(context, aHeapRef, lengthStr, JSValueMakeNumber(context, 10), 0, 0);
+    JSStringRef privatePropertyName = JSStringCreateWithUTF8CString("privateProperty");
+    if (!JSObjectSetPrivateProperty(context, myObject, privatePropertyName, aHeapRef)) {
+        printf("FAIL: Could not set private property.\n");
+        failed = 1;
+    } else
+        printf("PASS: Set private property.\n");
+    aStackRef = 0;
+    if (JSObjectSetPrivateProperty(context, aHeapRef, privatePropertyName, aHeapRef)) {
+        printf("FAIL: JSObjectSetPrivateProperty should fail on non-API objects.\n");
+        failed = 1;
+    } else
+        printf("PASS: Did not allow JSObjectSetPrivateProperty on a non-API object.\n");
+    if (JSObjectGetPrivateProperty(context, myObject, privatePropertyName) != aHeapRef) {
+        printf("FAIL: Could not retrieve private property.\n");
+        failed = 1;
+    } else
+        printf("PASS: Retrieved private property.\n");
+    if (JSObjectGetPrivateProperty(context, aHeapRef, privatePropertyName)) {
+        printf("FAIL: JSObjectGetPrivateProperty should return NULL when called on a non-API object.\n");
+        failed = 1;
+    } else
+        printf("PASS: JSObjectGetPrivateProperty return NULL.\n");
+
+    if (JSObjectGetProperty(context, myObject, privatePropertyName, 0) == aHeapRef) {
+        printf("FAIL: Accessed private property through ordinary property lookup.\n");
+        failed = 1;
+    } else
+        printf("PASS: Cannot access private property through ordinary property lookup.\n");
+
+    JSGarbageCollect(context);
+
+    for (int i = 0; i < 10000; i++)
+        JSObjectMake(context, 0, 0);
+
+    aHeapRef = JSValueToObject(context, JSObjectGetPrivateProperty(context, myObject, privatePropertyName), 0);
+    if (JSValueToNumber(context, JSObjectGetProperty(context, aHeapRef, lengthStr, 0), 0) != 10) {
+        printf("FAIL: Private property has been collected.\n");
+        failed = 1;
+    } else
+        printf("PASS: Private property does not appear to have been collected.\n");
+    JSStringRelease(lengthStr);
+
+    if (!JSObjectSetPrivateProperty(context, myObject, privatePropertyName, 0)) {
+        printf("FAIL: Could not set private property to NULL.\n");
+        failed = 1;
+    } else
+        printf("PASS: Set private property to NULL.\n");
+    if (JSObjectGetPrivateProperty(context, myObject, privatePropertyName)) {
+        printf("FAIL: Could not retrieve private property.\n");
+        failed = 1;
+    } else
+        printf("PASS: Retrieved private property.\n");
+
+    JSStringRef validJSON = JSStringCreateWithUTF8CString("{\"aProperty\":true}");
+    JSValueRef jsonObject = JSValueMakeFromJSONString(context, validJSON);
+    JSStringRelease(validJSON);
+    if (!JSValueIsObject(context, jsonObject)) {
+        printf("FAIL: Did not parse valid JSON correctly\n");
+        failed = 1;
+    } else
+        printf("PASS: Parsed valid JSON string.\n");
+    JSStringRef propertyName = JSStringCreateWithUTF8CString("aProperty");
+    assertEqualsAsBoolean(JSObjectGetProperty(context, JSValueToObject(context, jsonObject, 0), propertyName, 0), true);
+    JSStringRelease(propertyName);
+    JSStringRef invalidJSON = JSStringCreateWithUTF8CString("fail!");
+    if (JSValueMakeFromJSONString(context, invalidJSON)) {
+        printf("FAIL: Should return null for invalid JSON data\n");
+        failed = 1;
+    } else
+        printf("PASS: Correctly returned null for invalid JSON data.\n");
+    JSValueRef exception;
+    JSStringRef str = JSValueCreateJSONString(context, jsonObject, 0, 0);
+    if (!JSStringIsEqualToUTF8CString(str, "{\"aProperty\":true}")) {
+        printf("FAIL: Did not correctly serialise with indent of 0.\n");
+        failed = 1;
+    } else
+        printf("PASS: Correctly serialised with indent of 0.\n");
+    JSStringRelease(str);
+
+    str = JSValueCreateJSONString(context, jsonObject, 4, 0);
+    if (!JSStringIsEqualToUTF8CString(str, "{\n    \"aProperty\": true\n}")) {
+        printf("FAIL: Did not correctly serialise with indent of 4.\n");
+        failed = 1;
+    } else
+        printf("PASS: Correctly serialised with indent of 4.\n");
+    JSStringRelease(str);
+    JSStringRef src = JSStringCreateWithUTF8CString("({get a(){ throw '';}})");
+    JSValueRef unstringifiableObj = JSEvaluateScript(context, src, NULL, NULL, 1, NULL);
+    
+    str = JSValueCreateJSONString(context, unstringifiableObj, 4, 0);
+    if (str) {
+        printf("FAIL: Didn't return null when attempting to serialize unserializable value.\n");
+        JSStringRelease(str);
+        failed = 1;
+    } else
+        printf("PASS: returned null when attempting to serialize unserializable value.\n");
+    
+    str = JSValueCreateJSONString(context, unstringifiableObj, 4, &exception);
+    if (str) {
+        printf("FAIL: Didn't return null when attempting to serialize unserializable value.\n");
+        JSStringRelease(str);
+        failed = 1;
+    } else
+        printf("PASS: returned null when attempting to serialize unserializable value.\n");
+    if (!exception) {
+        printf("FAIL: Did not set exception on serialisation error\n");
+        failed = 1;
+    } else
+        printf("PASS: set exception on serialisation error\n");
+    // Conversions that throw exceptions
+    exception = NULL;
+    ASSERT(NULL == JSValueToObject(context, jsNull, &exception));
+    ASSERT(exception);
+    
+    exception = NULL;
+    // FIXME  - On i386 the isnan(double) macro tries to map to the isnan(float) function,
+    // causing a build break with -Wshorten-64-to-32 enabled.  The issue is known by the appropriate team.
+    // After that's resolved, we can remove these casts
+    ASSERT(isnan((float)JSValueToNumber(context, jsObjectNoProto, &exception)));
+    ASSERT(exception);
+
+    exception = NULL;
+    ASSERT(!JSValueToStringCopy(context, jsObjectNoProto, &exception));
+    ASSERT(exception);
+    
+    ASSERT(JSValueToBoolean(context, myObject));
+    
+    exception = NULL;
+    ASSERT(!JSValueIsEqual(context, jsObjectNoProto, JSValueMakeNumber(context, 1), &exception));
+    ASSERT(exception);
+    
+    exception = NULL;
+    JSObjectGetPropertyAtIndex(context, myObject, 0, &exception);
+    ASSERT(1 == JSValueToNumber(context, exception, NULL));
+
+    assertEqualsAsBoolean(jsUndefined, false);
+    assertEqualsAsBoolean(jsNull, false);
+    assertEqualsAsBoolean(jsTrue, true);
+    assertEqualsAsBoolean(jsFalse, false);
+    assertEqualsAsBoolean(jsZero, false);
+    assertEqualsAsBoolean(jsOne, true);
+    assertEqualsAsBoolean(jsOneThird, true);
+    assertEqualsAsBoolean(jsEmptyString, false);
+    assertEqualsAsBoolean(jsOneString, true);
+    assertEqualsAsBoolean(jsCFString, true);
+    assertEqualsAsBoolean(jsCFStringWithCharacters, true);
+    assertEqualsAsBoolean(jsCFEmptyString, false);
+    assertEqualsAsBoolean(jsCFEmptyStringWithCharacters, false);
+    
+    assertEqualsAsNumber(jsUndefined, nan(""));
+    assertEqualsAsNumber(jsNull, 0);
+    assertEqualsAsNumber(jsTrue, 1);
+    assertEqualsAsNumber(jsFalse, 0);
+    assertEqualsAsNumber(jsZero, 0);
+    assertEqualsAsNumber(jsOne, 1);
+    assertEqualsAsNumber(jsOneThird, 1.0 / 3.0);
+    assertEqualsAsNumber(jsEmptyString, 0);
+    assertEqualsAsNumber(jsOneString, 1);
+    assertEqualsAsNumber(jsCFString, nan(""));
+    assertEqualsAsNumber(jsCFStringWithCharacters, nan(""));
+    assertEqualsAsNumber(jsCFEmptyString, 0);
+    assertEqualsAsNumber(jsCFEmptyStringWithCharacters, 0);
+    ASSERT(sizeof(JSChar) == sizeof(UniChar));
+    
+    assertEqualsAsCharactersPtr(jsUndefined, "undefined");
+    assertEqualsAsCharactersPtr(jsNull, "null");
+    assertEqualsAsCharactersPtr(jsTrue, "true");
+    assertEqualsAsCharactersPtr(jsFalse, "false");
+    assertEqualsAsCharactersPtr(jsZero, "0");
+    assertEqualsAsCharactersPtr(jsOne, "1");
+    assertEqualsAsCharactersPtr(jsOneThird, "0.3333333333333333");
+    assertEqualsAsCharactersPtr(jsEmptyString, "");
+    assertEqualsAsCharactersPtr(jsOneString, "1");
+    assertEqualsAsCharactersPtr(jsCFString, "A");
+    assertEqualsAsCharactersPtr(jsCFStringWithCharacters, "A");
+    assertEqualsAsCharactersPtr(jsCFEmptyString, "");
+    assertEqualsAsCharactersPtr(jsCFEmptyStringWithCharacters, "");
+    
+    assertEqualsAsUTF8String(jsUndefined, "undefined");
+    assertEqualsAsUTF8String(jsNull, "null");
+    assertEqualsAsUTF8String(jsTrue, "true");
+    assertEqualsAsUTF8String(jsFalse, "false");
+    assertEqualsAsUTF8String(jsZero, "0");
+    assertEqualsAsUTF8String(jsOne, "1");
+    assertEqualsAsUTF8String(jsOneThird, "0.3333333333333333");
+    assertEqualsAsUTF8String(jsEmptyString, "");
+    assertEqualsAsUTF8String(jsOneString, "1");
+    assertEqualsAsUTF8String(jsCFString, "A");
+    assertEqualsAsUTF8String(jsCFStringWithCharacters, "A");
+    assertEqualsAsUTF8String(jsCFEmptyString, "");
+    assertEqualsAsUTF8String(jsCFEmptyStringWithCharacters, "");
+    
+    ASSERT(JSValueIsStrictEqual(context, jsTrue, jsTrue));
+    ASSERT(!JSValueIsStrictEqual(context, jsOne, jsOneString));
+
+    ASSERT(JSValueIsEqual(context, jsOne, jsOneString, NULL));
+    ASSERT(!JSValueIsEqual(context, jsTrue, jsFalse, NULL));
+    
+    CFStringRef cfJSString = JSStringCopyCFString(kCFAllocatorDefault, jsCFIString);
+    CFStringRef cfJSEmptyString = JSStringCopyCFString(kCFAllocatorDefault, jsCFEmptyIString);
+    ASSERT(CFEqual(cfJSString, cfString));
+    ASSERT(CFEqual(cfJSEmptyString, cfEmptyString));
+    CFRelease(cfJSString);
+    CFRelease(cfJSEmptyString);
+
+    CFRelease(cfString);
+    CFRelease(cfEmptyString);
+    
+    jsGlobalValue = JSObjectMake(context, NULL, NULL);
+    makeGlobalNumberValue(context);
+    JSValueProtect(context, jsGlobalValue);
+    JSGarbageCollect(context);
+    ASSERT(JSValueIsObject(context, jsGlobalValue));
+    JSValueUnprotect(context, jsGlobalValue);
+    JSValueUnprotect(context, jsNumberValue);
+
+    JSStringRef goodSyntax = JSStringCreateWithUTF8CString("x = 1;");
+    JSStringRef badSyntax = JSStringCreateWithUTF8CString("x := 1;");
+    ASSERT(JSCheckScriptSyntax(context, goodSyntax, NULL, 0, NULL));
+    ASSERT(!JSCheckScriptSyntax(context, badSyntax, NULL, 0, NULL));
+
+    JSValueRef result;
+    JSValueRef v;
+    JSObjectRef o;
+    JSStringRef string;
+
+    result = JSEvaluateScript(context, goodSyntax, NULL, NULL, 1, NULL);
+    ASSERT(result);
+    ASSERT(JSValueIsEqual(context, result, jsOne, NULL));
+
+    exception = NULL;
+    result = JSEvaluateScript(context, badSyntax, NULL, NULL, 1, &exception);
+    ASSERT(!result);
+    ASSERT(JSValueIsObject(context, exception));
+    
+    JSStringRef array = JSStringCreateWithUTF8CString("Array");
+    JSObjectRef arrayConstructor = JSValueToObject(context, JSObjectGetProperty(context, globalObject, array, NULL), NULL);
+    JSStringRelease(array);
+    result = JSObjectCallAsConstructor(context, arrayConstructor, 0, NULL, NULL);
+    ASSERT(result);
+    ASSERT(JSValueIsObject(context, result));
+    ASSERT(JSValueIsInstanceOfConstructor(context, result, arrayConstructor, NULL));
+    ASSERT(!JSValueIsInstanceOfConstructor(context, JSValueMakeNull(context), arrayConstructor, NULL));
+
+    o = JSValueToObject(context, result, NULL);
+    exception = NULL;
+    ASSERT(JSValueIsUndefined(context, JSObjectGetPropertyAtIndex(context, o, 0, &exception)));
+    ASSERT(!exception);
+    
+    JSObjectSetPropertyAtIndex(context, o, 0, JSValueMakeNumber(context, 1), &exception);
+    ASSERT(!exception);
+    
+    exception = NULL;
+    ASSERT(1 == JSValueToNumber(context, JSObjectGetPropertyAtIndex(context, o, 0, &exception), &exception));
+    ASSERT(!exception);
+
+    JSStringRef functionBody;
+    JSObjectRef function;
+    
+    exception = NULL;
+    functionBody = JSStringCreateWithUTF8CString("rreturn Array;");
+    JSStringRef line = JSStringCreateWithUTF8CString("line");
+    ASSERT(!JSObjectMakeFunction(context, NULL, 0, NULL, functionBody, NULL, 1, &exception));
+    ASSERT(JSValueIsObject(context, exception));
+    v = JSObjectGetProperty(context, JSValueToObject(context, exception, NULL), line, NULL);
+    assertEqualsAsNumber(v, 1);
+    JSStringRelease(functionBody);
+    JSStringRelease(line);
+
+    exception = NULL;
+    functionBody = JSStringCreateWithUTF8CString("return Array;");
+    function = JSObjectMakeFunction(context, NULL, 0, NULL, functionBody, NULL, 1, &exception);
+    JSStringRelease(functionBody);
+    ASSERT(!exception);
+    ASSERT(JSObjectIsFunction(context, function));
+    v = JSObjectCallAsFunction(context, function, NULL, 0, NULL, NULL);
+    ASSERT(v);
+    ASSERT(JSValueIsEqual(context, v, arrayConstructor, NULL));
+    
+    exception = NULL;
+    function = JSObjectMakeFunction(context, NULL, 0, NULL, jsEmptyIString, NULL, 0, &exception);
+    ASSERT(!exception);
+    v = JSObjectCallAsFunction(context, function, NULL, 0, NULL, &exception);
+    ASSERT(v && !exception);
+    ASSERT(JSValueIsUndefined(context, v));
+    
+    exception = NULL;
+    v = NULL;
+    JSStringRef foo = JSStringCreateWithUTF8CString("foo");
+    JSStringRef argumentNames[] = { foo };
+    functionBody = JSStringCreateWithUTF8CString("return foo;");
+    function = JSObjectMakeFunction(context, foo, 1, argumentNames, functionBody, NULL, 1, &exception);
+    ASSERT(function && !exception);
+    JSValueRef arguments[] = { JSValueMakeNumber(context, 2) };
+    v = JSObjectCallAsFunction(context, function, NULL, 1, arguments, &exception);
+    JSStringRelease(foo);
+    JSStringRelease(functionBody);
+    
+    string = JSValueToStringCopy(context, function, NULL);
+    assertEqualsAsUTF8String(JSValueMakeString(context, string), "function foo(foo) { return foo;\n}");
+    JSStringRelease(string);
+
+    JSStringRef print = JSStringCreateWithUTF8CString("print");
+    JSObjectRef printFunction = JSObjectMakeFunctionWithCallback(context, print, print_callAsFunction);
+    JSObjectSetProperty(context, globalObject, print, printFunction, kJSPropertyAttributeNone, NULL); 
+    JSStringRelease(print);
+    
+    ASSERT(!JSObjectSetPrivate(printFunction, (void*)1));
+    ASSERT(!JSObjectGetPrivate(printFunction));
+
+    JSStringRef myConstructorIString = JSStringCreateWithUTF8CString("MyConstructor");
+    JSObjectRef myConstructor = JSObjectMakeConstructor(context, NULL, myConstructor_callAsConstructor);
+    JSObjectSetProperty(context, globalObject, myConstructorIString, myConstructor, kJSPropertyAttributeNone, NULL);
+    JSStringRelease(myConstructorIString);
+    
+    ASSERT(!JSObjectSetPrivate(myConstructor, (void*)1));
+    ASSERT(!JSObjectGetPrivate(myConstructor));
+    
+    string = JSStringCreateWithUTF8CString("Base");
+    JSObjectRef baseConstructor = JSObjectMakeConstructor(context, Base_class(context), NULL);
+    JSObjectSetProperty(context, globalObject, string, baseConstructor, kJSPropertyAttributeNone, NULL);
+    JSStringRelease(string);
+    
+    string = JSStringCreateWithUTF8CString("Derived");
+    JSObjectRef derivedConstructor = JSObjectMakeConstructor(context, Derived_class(context), NULL);
+    JSObjectSetProperty(context, globalObject, string, derivedConstructor, kJSPropertyAttributeNone, NULL);
+    JSStringRelease(string);
+    
+    string = JSStringCreateWithUTF8CString("Derived2");
+    JSObjectRef derived2Constructor = JSObjectMakeConstructor(context, Derived2_class(context), NULL);
+    JSObjectSetProperty(context, globalObject, string, derived2Constructor, kJSPropertyAttributeNone, NULL);
+    JSStringRelease(string);
+
+    o = JSObjectMake(context, NULL, NULL);
+    JSObjectSetProperty(context, o, jsOneIString, JSValueMakeNumber(context, 1), kJSPropertyAttributeNone, NULL);
+    JSObjectSetProperty(context, o, jsCFIString,  JSValueMakeNumber(context, 1), kJSPropertyAttributeDontEnum, NULL);
+    JSPropertyNameArrayRef nameArray = JSObjectCopyPropertyNames(context, o);
+    size_t expectedCount = JSPropertyNameArrayGetCount(nameArray);
+    size_t count;
+    for (count = 0; count < expectedCount; ++count)
+        JSPropertyNameArrayGetNameAtIndex(nameArray, count);
+    JSPropertyNameArrayRelease(nameArray);
+    ASSERT(count == 1); // jsCFString should not be enumerated
+
+    JSValueRef argumentsArrayValues[] = { JSValueMakeNumber(context, 10), JSValueMakeNumber(context, 20) };
+    o = JSObjectMakeArray(context, sizeof(argumentsArrayValues) / sizeof(JSValueRef), argumentsArrayValues, NULL);
+    string = JSStringCreateWithUTF8CString("length");
+    v = JSObjectGetProperty(context, o, string, NULL);
+    assertEqualsAsNumber(v, 2);
+    v = JSObjectGetPropertyAtIndex(context, o, 0, NULL);
+    assertEqualsAsNumber(v, 10);
+    v = JSObjectGetPropertyAtIndex(context, o, 1, NULL);
+    assertEqualsAsNumber(v, 20);
+
+    o = JSObjectMakeArray(context, 0, NULL, NULL);
+    v = JSObjectGetProperty(context, o, string, NULL);
+    assertEqualsAsNumber(v, 0);
+    JSStringRelease(string);
+
+    JSValueRef argumentsDateValues[] = { JSValueMakeNumber(context, 0) };
+    o = JSObjectMakeDate(context, 1, argumentsDateValues, NULL);
+    if (timeZoneIsPST())
+        assertEqualsAsUTF8String(o, "Wed Dec 31 1969 16:00:00 GMT-0800 (PST)");
+
+    string = JSStringCreateWithUTF8CString("an error message");
+    JSValueRef argumentsErrorValues[] = { JSValueMakeString(context, string) };
+    o = JSObjectMakeError(context, 1, argumentsErrorValues, NULL);
+    assertEqualsAsUTF8String(o, "Error: an error message");
+    JSStringRelease(string);
+
+    string = JSStringCreateWithUTF8CString("foo");
+    JSStringRef string2 = JSStringCreateWithUTF8CString("gi");
+    JSValueRef argumentsRegExpValues[] = { JSValueMakeString(context, string), JSValueMakeString(context, string2) };
+    o = JSObjectMakeRegExp(context, 2, argumentsRegExpValues, NULL);
+    assertEqualsAsUTF8String(o, "/foo/gi");
+    JSStringRelease(string);
+    JSStringRelease(string2);
+
+    JSClassDefinition nullDefinition = kJSClassDefinitionEmpty;
+    nullDefinition.attributes = kJSClassAttributeNoAutomaticPrototype;
+    JSClassRef nullClass = JSClassCreate(&nullDefinition);
+    JSClassRelease(nullClass);
+    
+    nullDefinition = kJSClassDefinitionEmpty;
+    nullClass = JSClassCreate(&nullDefinition);
+    JSClassRelease(nullClass);
+
+    functionBody = JSStringCreateWithUTF8CString("return this;");
+    function = JSObjectMakeFunction(context, NULL, 0, NULL, functionBody, NULL, 1, NULL);
+    JSStringRelease(functionBody);
+    v = JSObjectCallAsFunction(context, function, NULL, 0, NULL, NULL);
+    ASSERT(JSValueIsEqual(context, v, globalObject, NULL));
+    v = JSObjectCallAsFunction(context, function, o, 0, NULL, NULL);
+    ASSERT(JSValueIsEqual(context, v, o, NULL));
+
+    functionBody = JSStringCreateWithUTF8CString("return eval(\"this\");");
+    function = JSObjectMakeFunction(context, NULL, 0, NULL, functionBody, NULL, 1, NULL);
+    JSStringRelease(functionBody);
+    v = JSObjectCallAsFunction(context, function, NULL, 0, NULL, NULL);
+    ASSERT(JSValueIsEqual(context, v, globalObject, NULL));
+    v = JSObjectCallAsFunction(context, function, o, 0, NULL, NULL);
+    ASSERT(JSValueIsEqual(context, v, o, NULL));
+
+    JSStringRef script = JSStringCreateWithUTF8CString("this;");
+    v = JSEvaluateScript(context, script, NULL, NULL, 1, NULL);
+    ASSERT(JSValueIsEqual(context, v, globalObject, NULL));
+    v = JSEvaluateScript(context, script, o, NULL, 1, NULL);
+    ASSERT(JSValueIsEqual(context, v, o, NULL));
+    JSStringRelease(script);
+
+    script = JSStringCreateWithUTF8CString("eval(this);");
+    v = JSEvaluateScript(context, script, NULL, NULL, 1, NULL);
+    ASSERT(JSValueIsEqual(context, v, globalObject, NULL));
+    v = JSEvaluateScript(context, script, o, NULL, 1, NULL);
+    ASSERT(JSValueIsEqual(context, v, o, NULL));
+    JSStringRelease(script);
+
+    // Verify that creating a constructor for a class with no static functions does not trigger
+    // an assert inside putDirect or lead to a crash during GC. 
+    nullDefinition = kJSClassDefinitionEmpty;
+    nullClass = JSClassCreate(&nullDefinition);
+    myConstructor = JSObjectMakeConstructor(context, nullClass, 0);
+    JSClassRelease(nullClass);
+
+    char* scriptUTF8 = createStringWithContentsOfFile(scriptPath);
+    if (!scriptUTF8) {
+        printf("FAIL: Test script could not be loaded.\n");
+        failed = 1;
+    } else {
+        script = JSStringCreateWithUTF8CString(scriptUTF8);
+        result = JSEvaluateScript(context, script, NULL, NULL, 1, &exception);
+        if (result && JSValueIsUndefined(context, result))
+            printf("PASS: Test script executed successfully.\n");
+        else {
+            printf("FAIL: Test script returned unexpected value:\n");
+            JSStringRef exceptionIString = JSValueToStringCopy(context, exception, NULL);
+            CFStringRef exceptionCF = JSStringCopyCFString(kCFAllocatorDefault, exceptionIString);
+            CFShow(exceptionCF);
+            CFRelease(exceptionCF);
+            JSStringRelease(exceptionIString);
+            failed = 1;
+        }
+        JSStringRelease(script);
+        free(scriptUTF8);
+    }
+
+    // Clear out local variables pointing at JSObjectRefs to allow their values to be collected
+    function = NULL;
+    v = NULL;
+    o = NULL;
+    globalObject = NULL;
+    myConstructor = NULL;
+
+    JSStringRelease(jsEmptyIString);
+    JSStringRelease(jsOneIString);
+    JSStringRelease(jsCFIString);
+    JSStringRelease(jsCFEmptyIString);
+    JSStringRelease(jsCFIStringWithCharacters);
+    JSStringRelease(jsCFEmptyIStringWithCharacters);
+    JSStringRelease(goodSyntax);
+    JSStringRelease(badSyntax);
+
+    JSGlobalContextRelease(context);
+    JSClassRelease(globalObjectClass);
+
+    // Test for an infinite prototype chain that used to be created. This test
+    // passes if the call to JSObjectHasProperty() does not hang.
+
+    JSClassDefinition prototypeLoopClassDefinition = kJSClassDefinitionEmpty;
+    prototypeLoopClassDefinition.staticFunctions = globalObject_staticFunctions;
+    JSClassRef prototypeLoopClass = JSClassCreate(&prototypeLoopClassDefinition);
+    JSGlobalContextRef prototypeLoopContext = JSGlobalContextCreateInGroup(NULL, prototypeLoopClass);
+
+    JSStringRef nameProperty = JSStringCreateWithUTF8CString("name");
+    JSObjectHasProperty(prototypeLoopContext, JSContextGetGlobalObject(prototypeLoopContext), nameProperty);
+
+    JSGlobalContextRelease(prototypeLoopContext);
+    JSClassRelease(prototypeLoopClass);
+
+    printf("PASS: Infinite prototype chain does not occur.\n");
+
+    if (checkForCycleInPrototypeChain())
+        printf("PASS: A cycle in a prototype chain can't be created.\n");
+    else {
+        printf("FAIL: A cycle in a prototype chain can be created.\n");
+        failed = true;
+    }
+
+    if (failed) {
+        printf("FAIL: Some tests failed.\n");
+        return 1;
+    }
+
+    printf("PASS: Program exited normally.\n");
+    return 0;
+}
+
+static char* createStringWithContentsOfFile(const char* fileName)
+{
+    char* buffer;
+    
+    size_t buffer_size = 0;
+    size_t buffer_capacity = 1024;
+    buffer = (char*)malloc(buffer_capacity);
+    
+    FILE* f = fopen(fileName, "r");
+    if (!f) {
+        fprintf(stderr, "Could not open file: %s\n", fileName);
+        return 0;
+    }
+    
+    while (!feof(f) && !ferror(f)) {
+        buffer_size += fread(buffer + buffer_size, 1, buffer_capacity - buffer_size, f);
+        if (buffer_size == buffer_capacity) { // guarantees space for trailing '\0'
+            buffer_capacity *= 2;
+            buffer = (char*)realloc(buffer, buffer_capacity);
+            ASSERT(buffer);
+        }
+        
+        ASSERT(buffer_size < buffer_capacity);
+    }
+    fclose(f);
+    buffer[buffer_size] = '\0';
+    
+    return buffer;
+}
diff --git a/Source/JavaScriptCore/API/tests/testapi.js b/Source/JavaScriptCore/API/tests/testapi.js
new file mode 100644
index 0000000..15c9e50
--- /dev/null
+++ b/Source/JavaScriptCore/API/tests/testapi.js
@@ -0,0 +1,251 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+function bludgeonArguments() { if (0) arguments; return function g() {} }
+h = bludgeonArguments();
+gc();
+
+var failed = false;
+function pass(msg)
+{
+    print("PASS: " + msg, "green");
+}
+
+function fail(msg)
+{
+    print("FAIL: " + msg, "red");
+    failed = true;
+}
+
+function shouldBe(a, b)
+{
+    var evalA;
+    try {
+        evalA = eval(a);
+    } catch(e) {
+        evalA = e;
+    }
+    
+    if (evalA == b || isNaN(evalA) && typeof evalA == 'number' && isNaN(b) && typeof b == 'number')
+        pass(a + " should be " + b + " and is.");
+    else
+        fail(a + " should be " + b + " but instead is " + evalA + ".");
+}
+
+function shouldThrow(a)
+{
+    var evalA;
+    try {
+        eval(a);
+    } catch(e) {
+        pass(a + " threw: " + e);
+        return;
+    }
+
+    fail(a + " did not throw an exception.");
+}
+
+function globalStaticFunction()
+{
+    return 4;
+}
+
+shouldBe("globalStaticValue", 3);
+shouldBe("globalStaticFunction()", 4);
+
+shouldBe("typeof MyObject", "function"); // our object implements 'call'
+MyObject.cantFind = 1;
+shouldBe("MyObject.cantFind", undefined);
+MyObject.regularType = 1;
+shouldBe("MyObject.regularType", 1);
+MyObject.alwaysOne = 2;
+shouldBe("MyObject.alwaysOne", 1);
+MyObject.cantDelete = 1;
+delete MyObject.cantDelete;
+shouldBe("MyObject.cantDelete", 1);
+shouldBe("delete MyObject.throwOnDelete", "an exception");
+MyObject.cantSet = 1;
+shouldBe("MyObject.cantSet", undefined);
+shouldBe("MyObject.throwOnGet", "an exception");
+shouldBe("MyObject.throwOnSet = 5", "an exception");
+shouldBe("MyObject('throwOnCall')", "an exception");
+shouldBe("new MyObject('throwOnConstruct')", "an exception");
+shouldBe("'throwOnHasInstance' instanceof MyObject", "an exception");
+
+var foundMyPropertyName = false;
+var foundRegularType = false;
+for (var p in MyObject) {
+    if (p == "myPropertyName")
+        foundMyPropertyName = true;
+    if (p == "regularType")
+        foundRegularType = true;
+}
+
+if (foundMyPropertyName)
+    pass("MyObject.myPropertyName was enumerated");
+else
+    fail("MyObject.myPropertyName was not enumerated");
+
+if (foundRegularType)
+    pass("MyObject.regularType was enumerated");
+else
+    fail("MyObject.regularType was not enumerated");
+
+var alwaysOneDescriptor = Object.getOwnPropertyDescriptor(MyObject, "alwaysOne");
+shouldBe('typeof alwaysOneDescriptor', "object");
+shouldBe('alwaysOneDescriptor.value', MyObject.alwaysOne);
+shouldBe('alwaysOneDescriptor.configurable', true);
+shouldBe('alwaysOneDescriptor.enumerable', false); // Actually it is.
+var cantFindDescriptor = Object.getOwnPropertyDescriptor(MyObject, "cantFind");
+shouldBe('typeof cantFindDescriptor', "object");
+shouldBe('cantFindDescriptor.value', MyObject.cantFind);
+shouldBe('cantFindDescriptor.configurable', true);
+shouldBe('cantFindDescriptor.enumerable', false);
+try {
+    // If getOwnPropertyDescriptor() returned an access descriptor, this wouldn't throw.
+    Object.getOwnPropertyDescriptor(MyObject, "throwOnGet");
+} catch (e) {
+    pass("getting property descriptor of throwOnGet threw exception");
+}
+var myPropertyNameDescriptor = Object.getOwnPropertyDescriptor(MyObject, "myPropertyName");
+shouldBe('typeof myPropertyNameDescriptor', "object");
+shouldBe('myPropertyNameDescriptor.value', MyObject.myPropertyName);
+shouldBe('myPropertyNameDescriptor.configurable', true);
+shouldBe('myPropertyNameDescriptor.enumerable', false); // Actually it is.
+try {
+    // if getOwnPropertyDescriptor() returned an access descriptor, this wouldn't throw.
+    Object.getOwnPropertyDescriptor(MyObject, "hasPropertyLie");
+} catch (e) {
+    pass("getting property descriptor of hasPropertyLie threw exception");
+}
+shouldBe('Object.getOwnPropertyDescriptor(MyObject, "doesNotExist")', undefined);
+
+myObject = new MyObject();
+
+shouldBe("delete MyObject.regularType", true);
+shouldBe("MyObject.regularType", undefined);
+shouldBe("MyObject(0)", 1);
+shouldBe("MyObject()", undefined);
+shouldBe("typeof myObject", "object");
+shouldBe("MyObject ? 1 : 0", true); // toBoolean
+shouldBe("+MyObject", 1); // toNumber
+shouldBe("(MyObject.toString())", "[object MyObject]"); // toString
+shouldBe("String(MyObject)", "MyObjectAsString"); // type conversion to string
+shouldBe("MyObject - 0", 1); // toNumber
+
+shouldBe("typeof MyConstructor", "object");
+constructedObject = new MyConstructor(1);
+shouldBe("typeof constructedObject", "object");
+shouldBe("constructedObject.value", 1);
+shouldBe("myObject instanceof MyObject", true);
+shouldBe("(new Object()) instanceof MyObject", false);
+
+shouldThrow("MyObject.nullGetSet = 1");
+shouldThrow("MyObject.nullGetSet");
+shouldThrow("MyObject.nullCall()");
+shouldThrow("MyObject.hasPropertyLie");
+
+derived = new Derived();
+
+shouldBe("derived instanceof Derived", true);
+shouldBe("derived instanceof Base", true);
+
+// base properties and functions return 1 when called/gotten; derived, 2
+shouldBe("derived.baseProtoDup()", 2);
+shouldBe("derived.baseProto()", 1);
+shouldBe("derived.baseDup", 2);
+shouldBe("derived.baseOnly", 1);
+shouldBe("derived.protoOnly()", 2);
+shouldBe("derived.protoDup", 2);
+shouldBe("derived.derivedOnly", 2)
+
+// base properties throw 1 when set; derived, 2
+shouldBe("derived.baseDup = 0", 2);
+shouldBe("derived.baseOnly = 0", 1);
+shouldBe("derived.derivedOnly = 0", 2)
+shouldBe("derived.protoDup = 0", 2);
+
+derived2 = new Derived2();
+
+shouldBe("derived2 instanceof Derived2", true);
+shouldBe("derived2 instanceof Derived", true);
+shouldBe("derived2 instanceof Base", true);
+
+// base properties and functions return 1 when called/gotten; derived, 2
+shouldBe("derived2.baseProtoDup()", 2);
+shouldBe("derived2.baseProto()", 1);
+shouldBe("derived2.baseDup", 2);
+shouldBe("derived2.baseOnly", 1);
+shouldBe("derived2.protoOnly()", 2);
+shouldBe("derived2.protoDup", 2);
+shouldBe("derived2.derivedOnly", 2)
+
+// base properties throw 1 when set; derived, 2
+shouldBe("derived2.baseDup = 0", 2);
+shouldBe("derived2.baseOnly = 0", 1);
+shouldBe("derived2.derivedOnly = 0", 2)
+shouldBe("derived2.protoDup = 0", 2);
+
+shouldBe('Object.getOwnPropertyDescriptor(derived, "baseProto")', undefined);
+shouldBe('Object.getOwnPropertyDescriptor(derived, "baseProtoDup")', undefined);
+var baseDupDescriptor = Object.getOwnPropertyDescriptor(derived, "baseDup");
+shouldBe('typeof baseDupDescriptor', "object");
+shouldBe('baseDupDescriptor.value', derived.baseDup);
+shouldBe('baseDupDescriptor.configurable', true);
+shouldBe('baseDupDescriptor.enumerable', false);
+var baseOnlyDescriptor = Object.getOwnPropertyDescriptor(derived, "baseOnly");
+shouldBe('typeof baseOnlyDescriptor', "object");
+shouldBe('baseOnlyDescriptor.value', derived.baseOnly);
+shouldBe('baseOnlyDescriptor.configurable', true);
+shouldBe('baseOnlyDescriptor.enumerable', false);
+shouldBe('Object.getOwnPropertyDescriptor(derived, "protoOnly")', undefined);
+var protoDupDescriptor = Object.getOwnPropertyDescriptor(derived, "protoDup");
+shouldBe('typeof protoDupDescriptor', "object");
+shouldBe('protoDupDescriptor.value', derived.protoDup);
+shouldBe('protoDupDescriptor.configurable', true);
+shouldBe('protoDupDescriptor.enumerable', false);
+var derivedOnlyDescriptor = Object.getOwnPropertyDescriptor(derived, "derivedOnly");
+shouldBe('typeof derivedOnlyDescriptor', "object");
+shouldBe('derivedOnlyDescriptor.value', derived.derivedOnly);
+shouldBe('derivedOnlyDescriptor.configurable', true);
+shouldBe('derivedOnlyDescriptor.enumerable', false);
+
+shouldBe("undefined instanceof MyObject", false);
+EvilExceptionObject.hasInstance = function f() { return f(); };
+EvilExceptionObject.__proto__ = undefined;
+shouldThrow("undefined instanceof EvilExceptionObject");
+EvilExceptionObject.hasInstance = function () { return true; };
+shouldBe("undefined instanceof EvilExceptionObject", true);
+
+EvilExceptionObject.toNumber = function f() { return f(); }
+shouldThrow("EvilExceptionObject*5");
+EvilExceptionObject.toStringExplicit = function f() { return f(); }
+shouldThrow("String(EvilExceptionObject)");
+
+shouldBe("EmptyObject", "[object CallbackObject]");
+
+if (failed)
+    throw "Some tests failed";
+
diff --git a/Source/JavaScriptCore/AUTHORS b/Source/JavaScriptCore/AUTHORS
new file mode 100644
index 0000000..e50da8c
--- /dev/null
+++ b/Source/JavaScriptCore/AUTHORS
@@ -0,0 +1,2 @@
+Harri Porten (porten@kde.org)
+Peter Kelly (pmk@post.com)
diff --git a/Source/JavaScriptCore/AllInOneFile.cpp b/Source/JavaScriptCore/AllInOneFile.cpp
new file mode 100644
index 0000000..e69de29
diff --git a/Source/JavaScriptCore/Android.mk b/Source/JavaScriptCore/Android.mk
new file mode 100644
index 0000000..d72b686
--- /dev/null
+++ b/Source/JavaScriptCore/Android.mk
@@ -0,0 +1,253 @@
+##
+## Copyright 2009, The Android Open Source Project
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions
+## are met:
+##  * Redistributions of source code must retain the above copyright
+##    notice, this list of conditions and the following disclaimer.
+##  * Redistributions in binary form must reproduce the above copyright
+##    notice, this list of conditions and the following disclaimer in the
+##    documentation and/or other materials provided with the distribution.
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+##
+
+LOCAL_SRC_FILES := \
+	API/JSValueRef.cpp \
+	API/JSCallbackObject.cpp \
+	API/OpaqueJSString.cpp \
+	\
+	assembler/ARMv7Assembler.cpp \
+	\
+	bytecode/CodeBlock.cpp \
+	bytecode/JumpTable.cpp \
+	bytecode/Opcode.cpp \
+	bytecode/SamplingTool.cpp \
+	bytecode/StructureStubInfo.cpp \
+	\
+	bytecompiler/BytecodeGenerator.cpp \
+	bytecompiler/NodesCodegen.cpp \
+	\
+	debugger/Debugger.cpp \
+	debugger/DebuggerActivation.cpp \
+	debugger/DebuggerCallFrame.cpp \
+	\
+	interpreter/CallFrame.cpp \
+	interpreter/Interpreter.cpp \
+	interpreter/RegisterFile.cpp \
+	\
+	jit/ExecutableAllocator.cpp\
+	jit/ExecutableAllocatorFixedVMPool.cpp \
+	jit/JIT.cpp \
+	jit/JITArithmetic.cpp \
+	jit/JITArithmetic32_64.cpp \
+	jit/JITCall.cpp \
+	jit/JITCall32_64.cpp \
+	jit/JITOpcodes.cpp \
+	jit/JITPropertyAccess.cpp \
+	jit/JITStubs.cpp \
+	jit/ThunkGenerators.cpp \
+	\
+	parser/JSParser.cpp \
+	parser/Lexer.cpp \
+	parser/Nodes.cpp \
+	parser/Parser.cpp \
+	parser/ParserArena.cpp \
+	\
+	pcre/pcre_compile.cpp \
+	pcre/pcre_exec.cpp \
+	pcre/pcre_tables.cpp \
+	pcre/pcre_ucp_searchfuncs.cpp \
+	pcre/pcre_xclass.cpp \
+	\
+	profiler/Profile.cpp \
+	profiler/ProfileGenerator.cpp \
+	profiler/ProfileNode.cpp \
+	profiler/Profiler.cpp \
+	\
+	runtime/ArgList.cpp \
+	runtime/Arguments.cpp \
+	runtime/ArrayConstructor.cpp \
+	runtime/ArrayPrototype.cpp \
+	runtime/BooleanConstructor.cpp \
+	runtime/BooleanObject.cpp \
+	runtime/BooleanPrototype.cpp \
+	runtime/CallData.cpp \
+	runtime/Collector.cpp \
+	runtime/CommonIdentifiers.cpp \
+	runtime/Completion.cpp \
+	runtime/ConstructData.cpp \
+	runtime/DateConstructor.cpp \
+	runtime/DateConversion.cpp \
+	runtime/DateInstance.cpp \
+	runtime/DatePrototype.cpp \
+	runtime/Error.cpp \
+	runtime/ErrorConstructor.cpp \
+	runtime/ErrorInstance.cpp \
+	runtime/ErrorPrototype.cpp \
+	runtime/ExceptionHelpers.cpp \
+	runtime/Executable.cpp \
+	runtime/FunctionConstructor.cpp \
+	runtime/FunctionPrototype.cpp \
+	runtime/GCActivityCallback.cpp \
+	runtime/GCHandle.cpp \
+	runtime/GetterSetter.cpp \
+	runtime/GlobalEvalFunction.cpp \
+	runtime/Identifier.cpp \
+	runtime/InitializeThreading.cpp \
+	runtime/InternalFunction.cpp \
+	runtime/JSAPIValueWrapper.cpp \
+	runtime/JSActivation.cpp \
+	runtime/JSArray.cpp \
+	runtime/JSByteArray.cpp \
+	runtime/JSCell.cpp \
+	runtime/JSFunction.cpp \
+	runtime/JSGlobalData.cpp \
+	runtime/JSGlobalObject.cpp \
+	runtime/JSGlobalObjectFunctions.cpp \
+	runtime/JSImmediate.cpp \
+	runtime/JSLock.cpp \
+	runtime/JSNotAnObject.cpp \
+	runtime/JSNumberCell.cpp \
+	runtime/JSONObject.cpp \
+	runtime/JSObject.cpp \
+	runtime/JSObjectWithGlobalObject.cpp \
+	runtime/JSPropertyNameIterator.cpp \
+	runtime/JSStaticScopeObject.cpp \
+	runtime/JSString.cpp \
+	runtime/JSValue.cpp \
+	runtime/JSVariableObject.cpp \
+	runtime/JSWrapperObject.cpp \
+	runtime/LiteralParser.cpp \
+	runtime/Lookup.cpp \
+	runtime/MarkStack.cpp \
+	runtime/MarkStackPosix.cpp \
+	runtime/MathObject.cpp \
+	runtime/NativeErrorConstructor.cpp \
+	runtime/NativeErrorPrototype.cpp \
+	runtime/NumberConstructor.cpp \
+	runtime/NumberObject.cpp \
+	runtime/NumberPrototype.cpp \
+	runtime/ObjectConstructor.cpp \
+	runtime/ObjectPrototype.cpp \
+	runtime/Operations.cpp \
+	runtime/PropertyDescriptor.cpp \
+	runtime/PropertyNameArray.cpp \
+	runtime/PropertySlot.cpp \
+	runtime/PrototypeFunction.cpp \
+	runtime/RegExp.cpp \
+	runtime/RegExpCache.cpp \
+	runtime/RegExpConstructor.cpp \
+	runtime/RegExpObject.cpp \
+	runtime/RegExpPrototype.cpp \
+	runtime/RopeImpl.cpp \
+	runtime/ScopeChain.cpp \
+	runtime/SmallStrings.cpp \
+	runtime/StrictEvalActivation.cpp \
+	runtime/StringConstructor.cpp \
+	runtime/StringObject.cpp \
+	runtime/StringPrototype.cpp \
+	runtime/Structure.cpp \
+	runtime/StructureChain.cpp \
+	runtime/TimeoutChecker.cpp \
+	runtime/UString.cpp \
+	\
+	wtf/Assertions.cpp \
+	wtf/ByteArray.cpp \
+	wtf/CurrentTime.cpp \
+	wtf/DateMath.cpp \
+	wtf/DecimalNumber.cpp \
+	wtf/FastMalloc.cpp \
+	wtf/HashTable.cpp \
+	wtf/MD5.cpp \
+	wtf/MainThread.cpp \
+	wtf/OSAllocatorPosix.cpp \
+	wtf/PageAllocationAligned.cpp\
+	wtf/PageBlock.cpp\
+	wtf/RandomNumber.cpp \
+	wtf/RefCountedLeakCounter.cpp \
+	wtf/StackBounds.cpp \
+	wtf/TCSystemAlloc.cpp \
+	wtf/ThreadIdentifierDataPthreads.cpp \
+	wtf/Threading.cpp \
+	wtf/ThreadingPthreads.cpp \
+	wtf/TypeTraits.cpp \
+	wtf/WTFThreadData.cpp \
+	wtf/dtoa.cpp \
+	\
+	wtf/android/MainThreadAndroid.cpp \
+	\
+	wtf/text/AtomicString.cpp \
+	wtf/text/CString.cpp \
+	wtf/text/StringBuilder.cpp \
+	wtf/text/StringImpl.cpp \
+	wtf/text/StringStatics.cpp \
+	wtf/text/WTFString.cpp \
+	\
+	wtf/unicode/CollatorDefault.cpp \
+	wtf/unicode/UTF8.cpp \
+	\
+	wtf/unicode/icu/CollatorICU.cpp \
+	\
+<<<<<<< HEAD:JavaScriptCore/Android.mk
+	wtf/url/src/URLCharacterTypes.cpp \
+	wtf/url/src/URLEscape.cpp \
+	wtf/url/src/URLSegments.cpp \
+	\
+	yarr/RegexCompiler.cpp \
+=======
+	yarr/RegexPattern.cpp \
+>>>>>>> webkit.org at r75315:Source/JavaScriptCore/Android.mk
+	yarr/RegexInterpreter.cpp \
+	yarr/RegexJIT.cpp
+
+# generated headers
+JSC_OBJECTS := $(addprefix $(intermediates)/runtime/, \
+				ArrayPrototype.lut.h \
+				DatePrototype.lut.h \
+				JSONObject.lut.h \
+				MathObject.lut.h \
+				NumberConstructor.lut.h \
+				RegExpConstructor.lut.h \
+				RegExpObject.lut.h \
+				StringPrototype.lut.h \
+			)
+$(JSC_OBJECTS): PRIVATE_PATH := $(LOCAL_PATH)
+$(JSC_OBJECTS): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@
+$(JSC_OBJECTS): $(LOCAL_PATH)/create_hash_table
+$(JSC_OBJECTS): $(intermediates)/%.lut.h : $(LOCAL_PATH)/%.cpp
+	$(transform-generated-source)
+
+
+LEXER_HEADER := $(intermediates)/Lexer.lut.h
+$(LEXER_HEADER): PRIVATE_PATH := $(LOCAL_PATH)
+$(LEXER_HEADER): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@
+$(LEXER_HEADER): $(LOCAL_PATH)/create_hash_table
+$(LEXER_HEADER): $(intermediates)/%.lut.h : $(LOCAL_PATH)/parser/Keywords.table
+	$(transform-generated-source)
+
+CHARTABLES := $(intermediates)/chartables.c
+$(CHARTABLES): PRIVATE_PATH := $(LOCAL_PATH)
+$(CHARTABLES): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/pcre/dftables $@
+$(CHARTABLES): $(LOCAL_PATH)/pcre/dftables
+$(CHARTABLES): $(LOCAL_PATH)/pcre/pcre_internal.h
+	$(transform-generated-source)
+
+REGEXP_JIT_TABLES := $(intermediates)/RegExpJitTables.h
+$(REGEXP_JIT_TABLES): PRIVATE_PATH := $(LOCAL_PATH)
+$(REGEXP_JIT_TABLES): PRIVATE_CUSTOM_TOOL = python $(PRIVATE_PATH)/create_regex_tables > $@
+$(REGEXP_JIT_TABLES): $(LOCAL_PATH)/create_regex_tables
+	$(transform-generated-source)
+
+LOCAL_GENERATED_SOURCES += $(JSC_OBJECTS) $(LEXER_HEADER) $(CHARTABLES) $(REGEXP_JIT_TABLES)
diff --git a/Source/JavaScriptCore/Android.v8.wtf.mk b/Source/JavaScriptCore/Android.v8.wtf.mk
new file mode 100644
index 0000000..340ed90
--- /dev/null
+++ b/Source/JavaScriptCore/Android.v8.wtf.mk
@@ -0,0 +1,87 @@
+##
+## Copyright 2009, The Android Open Source Project
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions
+## are met:
+##  * Redistributions of source code must retain the above copyright
+##    notice, this list of conditions and the following disclaimer.
+##  * Redistributions in binary form must reproduce the above copyright
+##    notice, this list of conditions and the following disclaimer in the
+##    documentation and/or other materials provided with the distribution.
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+##
+
+# wtf source files
+
+LOCAL_SRC_FILES := \
+	pcre/pcre_compile.cpp \
+	pcre/pcre_exec.cpp \
+	pcre/pcre_tables.cpp \
+	pcre/pcre_ucp_searchfuncs.cpp \
+	pcre/pcre_xclass.cpp \
+	\
+	wtf/Assertions.cpp \
+	wtf/ByteArray.cpp \
+	wtf/CurrentTime.cpp \
+	wtf/DateMath.cpp \
+	wtf/DecimalNumber.cpp \
+	wtf/FastMalloc.cpp \
+	wtf/HashTable.cpp \
+	wtf/MD5.cpp \
+	wtf/MainThread.cpp \
+	wtf/OSAllocatorPosix.cpp \
+	wtf/PageAllocationAligned.cpp \
+	wtf/PageBlock.cpp \
+	wtf/RandomNumber.cpp \
+	wtf/RefCountedLeakCounter.cpp \
+	wtf/StackBounds.cpp \
+	wtf/TCSystemAlloc.cpp \
+	wtf/ThreadIdentifierDataPthreads.cpp \
+	wtf/Threading.cpp \
+	wtf/ThreadingPthreads.cpp \
+	wtf/WTFThreadData.cpp \
+	\
+	wtf/TypeTraits.cpp \
+	wtf/dtoa.cpp \
+	\
+	wtf/android/MainThreadAndroid.cpp \
+	\
+	wtf/text/AtomicString.cpp \
+	wtf/text/CString.cpp \
+	wtf/text/StringBuilder.cpp \
+	wtf/text/StringImpl.cpp \
+	wtf/text/StringStatics.cpp \
+	wtf/text/WTFString.cpp \
+	\
+	wtf/unicode/CollatorDefault.cpp \
+	wtf/unicode/UTF8.cpp \
+	\
+	wtf/unicode/icu/CollatorICU.cpp \
+	\
+	wtf/url/src/URLCharacterTypes.cpp \
+	wtf/url/src/URLEscape.cpp \
+	wtf/url/src/URLSegments.cpp
+
+CHARTABLES := $(intermediates)/chartables.c
+$(CHARTABLES): PRIVATE_PATH := $(LOCAL_PATH)
+$(CHARTABLES): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/pcre/dftables $@
+$(CHARTABLES): $(LOCAL_PATH)/pcre/dftables
+$(CHARTABLES): $(LOCAL_PATH)/pcre/pcre_internal.h
+	$(transform-generated-source)
+
+$(intermediates)/pcre/pcre_tables.o : $(CHARTABLES)
+
+# We do not add $(CHARTABLES) to LOCAL_GENERATED_SOURCES because the chartables.c file
+# is explicitly #included in pcre_tables.cpp.
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
new file mode 100644
index 0000000..f8b4d1e
--- /dev/null
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -0,0 +1,258 @@
+SET(JavaScriptCore_INCLUDE_DIRECTORIES
+    "${CMAKE_BINARY_DIR}"
+    "${JAVASCRIPTCORE_DIR}"
+    "${JAVASCRIPTCORE_DIR}/API"
+    "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
+    "${JAVASCRIPTCORE_DIR}/assembler"
+    "${JAVASCRIPTCORE_DIR}/bytecode"
+    "${JAVASCRIPTCORE_DIR}/bytecompiler"
+    "${JAVASCRIPTCORE_DIR}/debugger"
+    "${JAVASCRIPTCORE_DIR}/interpreter"
+    "${JAVASCRIPTCORE_DIR}/jit"
+    "${JAVASCRIPTCORE_DIR}/parser"
+    "${JAVASCRIPTCORE_DIR}/pcre"
+    "${JAVASCRIPTCORE_DIR}/profiler"
+    "${JAVASCRIPTCORE_DIR}/runtime"
+    "${JAVASCRIPTCORE_DIR}/yarr"
+    "${WTF_INCLUDE_DIRECTORIES}"
+    "${CMAKE_SOURCE_DIR}"
+)
+
+SET(JavaScriptCore_SOURCES
+    API/JSBase.cpp
+    API/JSCallbackConstructor.cpp
+    API/JSCallbackFunction.cpp
+    API/JSCallbackObject.cpp
+    API/JSClassRef.cpp
+    API/JSContextRef.cpp
+    API/JSObjectRef.cpp
+    API/JSProfilerPrivate.cpp
+    API/JSStringRef.cpp
+    API/JSValueRef.cpp
+    API/JSWeakObjectMapRefPrivate.cpp
+    API/OpaqueJSString.cpp
+
+    bytecode/CodeBlock.cpp
+    bytecode/JumpTable.cpp
+    bytecode/Opcode.cpp
+    bytecode/SamplingTool.cpp
+    bytecode/StructureStubInfo.cpp
+
+    bytecompiler/BytecodeGenerator.cpp
+    bytecompiler/NodesCodegen.cpp
+
+    debugger/Debugger.cpp
+    debugger/DebuggerActivation.cpp
+    debugger/DebuggerCallFrame.cpp
+
+    interpreter/CallFrame.cpp
+    interpreter/Interpreter.cpp
+    interpreter/RegisterFile.cpp
+
+    jit/ExecutableAllocator.cpp
+    jit/JITArithmetic32_64.cpp
+    jit/JITArithmetic.cpp
+    jit/JITCall32_64.cpp
+    jit/JITCall.cpp
+    jit/JIT.cpp
+    jit/JITOpcodes32_64.cpp
+    jit/JITOpcodes.cpp
+    jit/JITPropertyAccess32_64.cpp
+    jit/JITPropertyAccess.cpp
+    jit/JITStubs.cpp
+    jit/ThunkGenerators.cpp
+
+    parser/JSParser.cpp
+    parser/Lexer.cpp
+    parser/Nodes.cpp
+    parser/Parser.cpp
+    parser/ParserArena.cpp
+
+    pcre/pcre_compile.cpp
+    pcre/pcre_exec.cpp
+    pcre/pcre_tables.cpp
+    pcre/pcre_ucp_searchfuncs.cpp
+    pcre/pcre_xclass.cpp
+
+    profiler/Profile.cpp
+    profiler/ProfileGenerator.cpp
+    profiler/ProfileNode.cpp
+    profiler/Profiler.cpp
+
+    runtime/ArgList.cpp
+    runtime/Arguments.cpp
+    runtime/ArrayConstructor.cpp
+    runtime/ArrayPrototype.cpp
+    runtime/BooleanConstructor.cpp
+    runtime/BooleanObject.cpp
+    runtime/BooleanPrototype.cpp
+    runtime/CallData.cpp
+    runtime/Collector.cpp
+    runtime/CommonIdentifiers.cpp
+    runtime/Completion.cpp
+    runtime/ConstructData.cpp
+    runtime/DateConstructor.cpp
+    runtime/DateConversion.cpp
+    runtime/DateInstance.cpp
+    runtime/DatePrototype.cpp
+    runtime/Error.cpp
+    runtime/ErrorConstructor.cpp
+    runtime/ErrorInstance.cpp
+    runtime/ErrorPrototype.cpp
+    runtime/ExceptionHelpers.cpp
+    runtime/Executable.cpp
+    runtime/FunctionConstructor.cpp
+    runtime/FunctionPrototype.cpp
+    runtime/GCActivityCallback.cpp
+    runtime/GCHandle.cpp
+    runtime/GetterSetter.cpp
+    runtime/GlobalEvalFunction.cpp
+    runtime/Identifier.cpp
+    runtime/InitializeThreading.cpp
+    runtime/InternalFunction.cpp
+    runtime/JSActivation.cpp
+    runtime/JSAPIValueWrapper.cpp
+    runtime/JSArray.cpp
+    runtime/JSByteArray.cpp
+    runtime/JSCell.cpp
+    runtime/JSFunction.cpp
+    runtime/JSGlobalData.cpp
+    runtime/JSGlobalObject.cpp
+    runtime/JSGlobalObjectFunctions.cpp
+    runtime/JSImmediate.cpp
+    runtime/JSLock.cpp
+    runtime/JSNotAnObject.cpp
+    runtime/JSNumberCell.cpp
+    runtime/JSObject.cpp
+    runtime/JSObjectWithGlobalObject.cpp
+    runtime/JSONObject.cpp
+    runtime/JSPropertyNameIterator.cpp
+    runtime/JSStaticScopeObject.cpp
+    runtime/JSString.cpp
+    runtime/JSValue.cpp
+    runtime/JSVariableObject.cpp
+    runtime/JSWrapperObject.cpp
+    runtime/JSZombie.cpp
+    runtime/LiteralParser.cpp
+    runtime/Lookup.cpp
+    runtime/MarkStack.cpp
+    runtime/MathObject.cpp
+    runtime/NativeErrorConstructor.cpp
+    runtime/NativeErrorPrototype.cpp
+    runtime/NumberConstructor.cpp
+    runtime/NumberObject.cpp
+    runtime/NumberPrototype.cpp
+    runtime/ObjectConstructor.cpp
+    runtime/ObjectPrototype.cpp
+    runtime/Operations.cpp
+    runtime/PropertyDescriptor.cpp
+    runtime/PropertyNameArray.cpp
+    runtime/PropertySlot.cpp
+    runtime/PrototypeFunction.cpp
+    runtime/RegExp.cpp
+    runtime/RegExpCache.cpp
+    runtime/RegExpConstructor.cpp
+    runtime/RegExpObject.cpp
+    runtime/RegExpPrototype.cpp
+    runtime/RopeImpl.cpp
+    runtime/ScopeChain.cpp
+    runtime/SmallStrings.cpp
+    runtime/StrictEvalActivation.cpp
+    runtime/StringConstructor.cpp
+    runtime/StringObject.cpp
+    runtime/StringPrototype.cpp
+    runtime/Structure.cpp
+    runtime/StructureChain.cpp
+    runtime/TimeoutChecker.cpp
+    runtime/UString.cpp
+
+    yarr/RegexPattern.cpp
+    yarr/RegexInterpreter.cpp
+    yarr/RegexJIT.cpp
+
+    wtf/DateMath.cpp
+    wtf/PageAllocationAligned.cpp
+    wtf/PageBlock.cpp
+)
+SET(JavaScriptCore_HEADERS )
+
+SET(JavaScriptCore_LUT_FILES
+    runtime/ArrayPrototype.cpp
+    runtime/DatePrototype.cpp
+    runtime/JSONObject.cpp
+    runtime/MathObject.cpp
+    runtime/NumberConstructor.cpp
+    runtime/RegExpConstructor.cpp
+    runtime/RegExpObject.cpp
+    runtime/StringPrototype.cpp
+)
+
+SET(JavaScriptCore_LIBRARIES
+    ${WTF_LIBRARY_NAME}
+)
+
+
+# GENERATOR 1-A: LUT creator
+FOREACH (_file ${JavaScriptCore_LUT_FILES})
+    GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
+    GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_DIR}/${_name}.lut.h)
+    LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_DIR}/${_name}.lut.h)
+ENDFOREACH ()
+
+
+# GENERATOR 1-B: particular LUT creator (for 1 file only)
+GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
+LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_DIR}/Lexer.lut.h)
+
+# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
+ADD_CUSTOM_COMMAND(
+    OUTPUT ${DERIVED_SOURCES_DIR}/chartables.c
+    MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/pcre/dftables
+    COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/pcre/dftables --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${DERIVED_SOURCES_DIR}/chartables.c
+    VERBATIM)
+ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/pcre/pcre_tables.cpp ${DERIVED_SOURCES_DIR}/chartables.c)
+
+
+#GENERATOR: "RegExpJitTables.h": tables used by Yarr
+ADD_CUSTOM_COMMAND(
+    OUTPUT ${DERIVED_SOURCES_DIR}/RegExpJitTables.h
+    MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
+    COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_DIR}/RegExpJitTables.h
+    VERBATIM)
+ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/RegexPattern.cpp ${DERIVED_SOURCES_DIR}/RegExpJitTables.h)
+
+
+
+IF (WTF_CPU_ARM)
+    LIST(APPEND JavaScriptCore_SOURCES
+        assembler/ARMAssembler.cpp
+        assembler/MacroAssemblerARM.cpp
+    )
+ELSEIF (WTF_CPU_MIPS)
+ELSEIF (WTF_CPU_X86)
+ELSEIF (WTF_CPU_X86_64)
+ELSE ()
+    MESSAGE(FATAL_ERROR "Unknown CPU")
+ENDIF ()
+
+
+INCLUDE_IF_EXISTS(${JAVASCRIPTCORE_DIR}/CMakeLists${PORT}.txt)
+
+
+ADD_SUBDIRECTORY(wtf)
+ADD_SUBDIRECTORY(shell)
+
+WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
+INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
+ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
+ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
+TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
+
+IF (JavaScriptCore_LINK_FLAGS)
+    ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
+ENDIF ()
+
+IF (SHARED_CORE)
+    SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
+    INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION lib)
+ENDIF ()
diff --git a/Source/JavaScriptCore/CMakeListsEfl.txt b/Source/JavaScriptCore/CMakeListsEfl.txt
new file mode 100644
index 0000000..9d3c71e
--- /dev/null
+++ b/Source/JavaScriptCore/CMakeListsEfl.txt
@@ -0,0 +1,20 @@
+LIST(APPEND JavaScriptCore_SOURCES
+    jit/ExecutableAllocatorFixedVMPool.cpp
+    jit/ExecutableAllocator.cpp
+    runtime/MarkStackPosix.cpp
+    wtf/OSAllocatorPosix.cpp
+)
+
+LIST(APPEND JavaScriptCore_LIBRARIES
+    ${ICU_I18N_LIBRARIES}
+)
+
+IF (ENABLE_GLIB_SUPPORT)
+  LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
+    ${JAVASCRIPTCORE_DIR}/wtf/gobject
+  )
+ENDIF ()
+
+LIST(APPEND JavaScriptCore_LINK_FLAGS
+    ${ECORE_LDFLAGS}
+)
diff --git a/Source/JavaScriptCore/CMakeListsWinCE.txt b/Source/JavaScriptCore/CMakeListsWinCE.txt
new file mode 100644
index 0000000..666b1c7
--- /dev/null
+++ b/Source/JavaScriptCore/CMakeListsWinCE.txt
@@ -0,0 +1,5 @@
+LIST(APPEND JavaScriptCore_SOURCES
+    jit/ExecutableAllocator.cpp
+
+    runtime/MarkStackWin.cpp
+)
diff --git a/Source/JavaScriptCore/COPYING.LIB b/Source/JavaScriptCore/COPYING.LIB
new file mode 100644
index 0000000..87c4a33
--- /dev/null
+++ b/Source/JavaScriptCore/COPYING.LIB
@@ -0,0 +1,488 @@
+
+
+NOTE! The LGPL below is copyrighted by the Free Software Foundation, but 
+the instance of code that it refers to (the kde libraries) are copyrighted 
+by the authors who actually wrote it.
+				   
+---------------------------------------------------------------------------
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+                    51 Franklin Street, Fifth Floor
+                    Boston, MA 02110-1301, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+		  GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    
+    Copyright (C)   
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  , 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
new file mode 100644
index 0000000..54ac1e9
--- /dev/null
+++ b/Source/JavaScriptCore/ChangeLog
@@ -0,0 +1,18229 @@
+2011-01-07  Gavin Barraclough  
+
+        Reviewed by Geoff Garen.
+
+        Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
+
+        Fix for win32.  The base of the stack is stored in the "deallocation stack" field of the
+        Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
+        for more information!
+
+        * wtf/StackBounds.cpp:
+        (WTF::StackBounds::initialize):
+
+2011-01-07  Adam Roben  
+
+        Update react-to-vsprops-changes.py after r74855
+
+        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
+
+2011-01-07  Carlos Garcia Campos  
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Port scrollbar painting to GtkStyleContext
+        https://bugs.webkit.org/show_bug.cgi?id=52051
+
+        * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
+        declaration.
+
+2011-01-07  Daniel Bates  
+
+        Reviewed by Martin Robinson.
+
+        Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode
+        https://bugs.webkit.org/show_bug.cgi?id=52034
+
+        Derived from a patch by Eli Fidler.
+
+        RVCT 4 or greater in GNU mode supports the computed goto GNU language extension
+        as per .
+
+        * pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead
+        of hardcoding the GCC compiler.
+        * wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000.
+
+2011-01-06  Gavin Barraclough  
+
+        Reviewed by Geoff Garen.
+
+        Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
+
+        The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
+        destructor early, in order to release wrappers once we know we no longer intend to use them.
+        Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
+        lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
+        A sequence of events that triggers the bug would look like this:
+
+        (1) Create a DOMWrapperWorld.
+        (2) Register a timer in the world.
+        (3) Call unregisterWorld() on the world.
+        (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
+        (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
+            called forgetWorld() none exists.
+        (6) Attempt to add a wrapper to a NULL map.
+
+        Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
+
+        * runtime/WeakGCMap.h:
+        (JSC::WeakGCMap::clear):
+
+2011-01-06  Gavin Barraclough  
+
+        Reviewed by Darin Adler.
+
+        Bug 52021 - zeroDouble broken on ARMv7
+
+        The bug here is that zeroDouble was working incorrectly,
+        leading to op_loop_if_true failing - specifically in the
+        case where the value being checked is 0.0 encoded as a
+        double (rather than an integer immediate).
+
+        Additionally this patch removes a redundant duplicate compare
+        in some (many) case.
+
+        * assembler/ARMv7Assembler.h:
+        (JSC::ARMv7Assembler::vcmp_F64):
+        (JSC::ARMv7Assembler::vcmpz_F64):
+        * assembler/MacroAssemblerARM.h:
+        (JSC::MacroAssemblerARM::branchDoubleNonZero):
+        (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
+        * assembler/MacroAssemblerARMv7.h:
+        (JSC::MacroAssemblerARMv7::branchDouble):
+        (JSC::MacroAssemblerARMv7::branchDoubleNonZero):
+        (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
+        (JSC::MacroAssemblerARMv7::compare32):
+        * assembler/MacroAssemblerMIPS.h:
+        (JSC::MacroAssemblerMIPS::branchDoubleNonZero):
+        (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
+        * assembler/MacroAssemblerX86Common.h:
+        (JSC::MacroAssemblerX86Common::branchDoubleNonZero):
+        (JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN):
+        * jit/JITOpcodes32_64.cpp:
+        (JSC::JIT::emit_op_jfalse):
+        (JSC::JIT::emit_op_jtrue):
+
+2011-01-06  Michael Saboff  
+
+        Reviewed by Gavin Barraclough.
+
+        Added debug code to compare the results of JIT regexp with 
+        interpreted regexp and displays discrepencies.  This debug code is
+        controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and
+        is only valid if ENABLE_YARR_JIT is enabled.
+
+        Fixed a discovered problem in RegExp::printTraceData, changing
+        m_pattern to the getter pattern().
+        Also deleted an extraneous semicolon.
+
+        Enhancement: Add Regexp Debug Compare between JIT and Interpreter
+        https://bugs.webkit.org/show_bug.cgi?id=51834
+
+        * runtime/RegExp.cpp:
+        (JSC::RegExp::compile):
+        (JSC::RegExp::match):
+        (JSC::RegExp::printTraceData):
+        * wtf/Platform.h:
+
+2011-01-06  Patrick Gansterer  
+
+        Reviewed by Eric Seidel.
+
+        [WINCE] Remove JSC::g_stackBase
+        https://bugs.webkit.org/show_bug.cgi?id=51779
+
+        * wtf/StackBounds.cpp:
+
+2011-01-06  Joone Hur  
+
+        Reviewed by Eric Seidel.
+
+        WML Parser should treat line/column number in a consistent way
+        https://bugs.webkit.org/show_bug.cgi?id=51601
+
+        Add the equality operators to TextPosition class.
+
+        * wtf/text/TextPosition.h:
+        (WTF::TextPosition::operator==): Added.
+        (WTF::TextPosition::operator!=): Added.
+        (WTF::TextPosition::belowRangePosition): Use belowBase() instead of base().
+        (WTF::ZeroBasedNumber::operator==): Added.
+        (WTF::ZeroBasedNumber::operator!=): Added.
+        (WTF::OneBasedNumber::operator==): Added.
+        (WTF::OneBasedNumber::operator!=): Added.
+
+2011-01-06  Patrick Gansterer  
+
+        Reviewed by Gavin Barraclough.
+
+        [WINCE] Determine stack extent
+        https://bugs.webkit.org/show_bug.cgi?id=26276
+
+        Scan the stack for writeable pages and use the limits.
+
+        * wtf/StackBounds.cpp:
+        (WTF::detectGrowingDownward):
+        (WTF::isPageWritable):
+        (WTF::getLowerStackBound):
+        (WTF::getUpperStackBound):
+        (WTF::StackBounds::initialize):
+
+2011-01-05  Steve Falkenburg  
+
+        Windows build fix.
+
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
+
+2011-01-05  Steve Falkenburg  
+
+        Reviewed by Darin Adler.
+
+        Debug and Release builds on Windows clobber each other
+        https://bugs.webkit.org/show_bug.cgi?id=49185
+        
+        Changes the structure of WebKitBuild build products directory so we
+        completely separate each build configuration into independent directories.
+        
+        Although we previously had per-configuration directories for obj, this change adds
+        per-configuration directories for bin, lib, obj, and include. Each configuration's
+        build products are stored within a directory inside of WebKitBuild.
+        
+        Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
+        defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
+        
+        For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
+        for proper operation of the instrumentation/optimization scripts.
+
+        * JavaScriptCore.vcproj/JavaScriptCore.make:
+        * JavaScriptCore.vcproj/JavaScriptCore.sln:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
+        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
+        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
+        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
+        * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
+        * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
+        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
+        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
+        * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
+        * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
+        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
+        * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
+        * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
+
+2011-01-05  Brent Fulgham  
+
+        Unreviewed build fix.
+
+        * wtf/Encoder.h: Add  include for systems that
+        do not natively know about uint8_t, etc.
+
+2011-01-05  Patrick Gansterer  
+
+        Reviewed by Andreas Kling.
+
+        [CMake] Fix the usage of SOURCE_GROUP
+        https://bugs.webkit.org/show_bug.cgi?id=51739
+
+        * CMakeLists.txt:
+
+2011-01-05  Andras Becsi  
+
+        Reviewed by Csaba Osztrogonác.
+
+        [Qt][V8] Fix the build after recent changes.
+
+        * pcre/pcre.pri: Correct the path after Source was introduced.
+
+2011-01-04  Steve Falkenburg  
+
+        Build fix. Update path to FindSafari after source code reorganization.
+
+        * JavaScriptCore.vcproj/JavaScriptCore.sln:
+
+2011-01-04  Daniel Bates  
+
+        Fix the Android build after changeset 74975 
+        (https://bugs.webkit.org/show_bug.cgi?id=51855).
+
+        * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
+        (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
+
+2011-01-04  Martin Robinson  
+
+        Try to fix the EFL build.
+
+        * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
+
+2011-01-04  James Robinson  
+
+        Reviewed by Darin Adler.
+
+        StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
+        https://bugs.webkit.org/show_bug.cgi?id=51881
+
+        The StackBounds class is only used by JavaScriptCore.
+
+        * wtf/WTFThreadData.cpp:
+        (WTF::WTFThreadData::WTFThreadData):
+        * wtf/WTFThreadData.h:
+        (WTF::WTFThreadData::resetCurrentIdentifierTable):
+
+2011-01-03  Martin Robinson  
+
+        Reviewed by Darin Adler.
+
+        Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
+        https://bugs.webkit.org/show_bug.cgi?id=51846
+
+        * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
+        * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
+        (JSC::ExecutableAllocator::cacheFlush): Ditto.
+        * wtf/PlatformRefPtr.h: Removed.
+        * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
+        (WTF::randomNumber): Ditto.
+        * wtf/brew/RefPtrBrew.h: Ditto.
+        (WTF::refIfNotNull): Added.
+        (WTF::derefIfNotNull): Added.
+        * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
+        (WTF::createRefPtrInstance): Modified to return a RefPtr.
+        * wtf/gobject/GRefPtr.cpp: 
+        (WTF::refGPtr): Moved from PlatformRefPtr here.
+        (WTF::derefGPtr): Ditto.
+        * wtf/gobject/GRefPtr.h: Ditto.
+        (WTF::GRefPtr::GRefPtr): Ditto.
+        (WTF::GRefPtr::~GRefPtr): Ditto.
+        (WTF::GRefPtr::clear): Ditto.
+        (WTF::GRefPtr::isHashTableDeletedValue): Ditto.
+        (WTF::GRefPtr::get): Ditto.
+        (WTF::GRefPtr::operator*): Ditto.
+        (WTF::GRefPtr::operator->): Ditto.
+        (WTF::GRefPtr::operator!): Ditto.
+        (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
+        (WTF::GRefPtr::hashTableDeletedValue): Ditto.
+        (WTF::::operator): Ditto.
+        (WTF::::swap): Ditto.
+        (WTF::swap): Ditto.
+        (WTF::operator==): Ditto.
+        (WTF::operator!=): Ditto.
+        (WTF::static_pointer_cast): Ditto.
+        (WTF::const_pointer_cast): Ditto.
+        (WTF::getPtr): Ditto.
+        (WTF::adoptGRef): Ditto.
+        (WTF::refGPtr): Ditto.
+        (WTF::derefGPtr): Ditto.
+
+2011-01-04  Daniel Bates  
+
+        Reviewed by Adam Roben.
+
+        LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
+        https://bugs.webkit.org/show_bug.cgi?id=51860
+
+        * wtf/ThreadingWin.cpp:
+        (WTF::createThreadInternal):
+
+2011-01-04  Laszlo Gombos  
+
+        Reviewed by Ariya Hidayat.
+
+        [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
+        https://bugs.webkit.org/show_bug.cgi?id=31273
+
+        On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
+        are included before platform headers. On all other platforms continue to use
+        INCLUDEPATH (as before). This is a continuation of r65877.
+
+        No new tests as there is no new functionality.
+
+        * JavaScriptCore.pri:
+
+2011-01-04  Darin Adler  
+
+        Try to fix Windows build.
+
+        * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
+        of conditional includes.
+        (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
+        (WTF::createThreadInternal): Tweaked #if to not need separate macro.
+
+2011-01-04  Daniel Bates  
+
+        Reviewed by Adam Roben.
+
+        Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
+        https://bugs.webkit.org/show_bug.cgi?id=51855
+
+        Both the Apple Windows and Android ports implement a similar adapter structure,
+        called ThreadFunctionInvocation and ThreadData respectively, as part of
+        their thread creation process. Instead, we should share such an adapter
+        structure and remove duplicate code.
+
+        * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
+        * wtf/ThreadFunctionInvocation.h: Added.
+        (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
+        * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
+        (WTF::runThreadWithRegistration):
+        (WTF::createThreadInternal): 
+        * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
+        it can be shared with the Android implementation of createThreadInternal().
+        (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
+
+2011-01-04  Daniel Bates  
+
+        Reviewed by Darin Adler.
+
+        Use __builtin_expect when compiling using RVCT in GNU mode
+        https://bugs.webkit.org/show_bug.cgi?id=51866
+
+        Derived from a patch by Dave Tapuska.
+
+        * wtf/AlwaysInline.h:
+
+2011-01-03  Darin Adler  
+
+        Reviewed by Brady Eidson.
+
+        * wtf/Forward.h: Added Decoder and Encoder.
+
+2011-01-03  Brady Eidson  
+
+        Reviewed by Darin Adler.
+
+        Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
+
+        Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
+
+        * GNUmakefile.am:
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * wtf/CMakeLists.txt:
+
+        * wtf/Decoder.h: Added.
+        * wtf/Encoder.h: Added.
+
+2011-01-03  Laszlo Gombos  
+
+        Unreviewed build fix.
+
+        [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
+
+        This fix is required for builds where HAVE(NULLPTR) is false
+        (e.g. some MSVC and Symbian builds).
+
+        * wtf/wtf.pri:
+
+2011-01-02  Dan Bernstein  
+
+        Rubber-stamped by Simon Fraser.
+
+         Update copyright strings
+
+        * Info.plist:
+
+2011-01-02  Csaba Osztrogonác  
+
+        Fix GTK+ build after r74855.
+
+        Reviewed by Xan Lopez.
+
+        * GNUmakefile.am: Fix include pathes.
+
+2011-01-02  Adam Barth  
+
+        One more .. missing in the Qt build.
+
+        * jsc.pro:
+
+2011-01-02  Xan Lopez  
+
+        Fix GTK+ build.
+
+        * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
+        that anyone can include its headers without adding the prefix
+        'Source/'.
+
+2011-01-02  Carl Lobo  
+
+        Reviewed by Adam Barth.
+
+        Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
+        https://bugs.webkit.org/show_bug.cgi?id=51797
+
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
+        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
+
+2011-01-01  Adam Barth  
+
+        Fix relative include paths in an attempt to fix the Qt build.
+
+        * JavaScriptCore.pri:
+        * JavaScriptCore.pro:
+
+2011-01-01  Adam Barth  
+
+        Another speculative build fix for GTK.
+
+        * GNUmakefile.am:
+
+2011-01-01  Adam Barth  
+
+        Speculative build fix for GTK.  Update the paths in GNUmakefile to
+        include "Source".
+
+        * GNUmakefile.am:
+
+2011-01-01  Adam Barth  
+
+        Update relative paths in JavaScriptCore.gyp to account for the extra
+        level of directories.
+
+        * JavaScriptCore.gyp/JavaScriptCore.gyp:
+
+2010-12-31  Patrick Gansterer  
+
+        Reviewed by Darin Adler.
+
+        Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
+        https://bugs.webkit.org/show_bug.cgi?id=50517
+
+        This change shows about 2% performance win on the xml-parser benchmark.
+
+        * wtf/text/AtomicString.cpp:
+        (WTF::HashAndUTF8CharactersTranslator::equal):
+
+2010-12-30  Patrick Gansterer  
+
+        Reviewed by Ariya Hidayat.
+
+        [CMake] Add WTF_HEADERS
+        https://bugs.webkit.org/show_bug.cgi?id=51741
+
+        Add the WTF headers to show them in Visual Studio.
+
+        * wtf/CMakeLists.txt:
+        * wtf/CMakeListsWinCE.txt:
+
+2010-12-30  Konstantin Tokarev  
+
+        Reviewed by David Kilzer.
+
+        [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
+        used
+        https://bugs.webkit.org/show_bug.cgi?id=51672
+
+        * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
+
+2010-12-30  Patrick Gansterer  
+
+        Reviewed by Darin Adler.
+
+        Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=51743
+
+        Most of the ifdefs belong to windows and not to the MSVC compiler.
+
+        * wtf/FastMalloc.cpp:
+
+2010-12-29  Gavin Barraclough  
+
+        Reviewed by Sam Weinig.
+
+        Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
+
+        * parser/Lexer.cpp:
+        (JSC::Lexer::parseString):
+
+2010-12-29  Helder Correia  
+
+        Reviewed by Eric Seidel.
+
+         and  are not valid JSON whitespace characters
+        https://bugs.webkit.org/show_bug.cgi?id=51671
+
+        Vertical Tab and Form Feed are not allowed white spaces by the JSON
+        RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
+
+        Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
+               ietestcenter/Javascript/15.12.1.1-0-3.html
+
+        * runtime/LiteralParser.cpp:
+        (JSC::isJSONWhiteSpace):
+        (JSC::LiteralParser::Lexer::lex):
+
+2010-12-28  Helder Correia  
+
+        Reviewed by Eric Seidel.
+
+        JSON.stringify must exist as a function taking 3 parameters
+        https://bugs.webkit.org/show_bug.cgi?id=51667
+
+        The reported function length is 1 instead.
+
+        Test: ietestcenter/Javascript/15.12.3-0-2.html
+
+        * runtime/JSONObject.cpp:
+
+2010-12-28  Helder Correia  
+
+        Reviewed by Sam Weinig.
+
+        JSON.parse must exist as a function taking 2 parameters
+        https://bugs.webkit.org/show_bug.cgi?id=51666
+
+        Support for revivers was introduced in bug 26591, but the function
+        length has since remained unchanged.
+
+        Test: ietestcenter/Javascript/15.12.2-0-2.html
+
+        * runtime/JSONObject.cpp:
+
+2010-12-27  Jake Helfert  
+
+        Reviewed and reworked by Darin Adler.
+
+        Building WebKit with Visual Studio 2010 fails due
+        to ambiguous assignment operator errors.
+        https://bugs.webkit.org/show_bug.cgi?id=51116
+
+        * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
+        Platform.h HAVE macro, and included the Visual Studio 2010 compiler
+        as one of the ones that has nullptr.
+        * wtf/NullPtr.cpp: Updated condition to match.
+        
+        * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
+        overload if we are compiling in loose mode and the compiler has
+        nullptr, because assignment of 0 will otherwise encounter
+        ambiguitity with this overload and the overload for loose mode
+        that takes a raw pointer. The conditional can be removed when we
+        get rid of loose mode.
+        * wtf/PassOwnPtr.h: Ditto.
+
+        * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
+        if the compiler has nullptr, because assignment of 0 would be
+        ambiguous with the overload that takes a raw pointer. The conditional
+        can be removed if we ever decide we no longer need to support
+        assigning 0, but might need a way to catch that usage on older compilers.
+        * wtf/RefPtr.h: Ditto.
+        * wtf/RetainPtr.h: Ditto
+
+        * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
+        accidentally omitted when the file was first added.
+
+2010-12-26  Xan Lopez  
+
+        Reviewed by Eric Seidel.
+
+        [GTK] Add standalone target for JSC
+        https://bugs.webkit.org/show_bug.cgi?id=51607
+
+        * GNUmakefile.am: add convenience target to only build jsc and its
+        dependencies.
+
+2010-12-24  Patrick Gansterer  
+
+        Reviewed by Eric Seidel.
+
+        [WINCE] Add CPU(MIPS) detection
+        https://bugs.webkit.org/show_bug.cgi?id=51342
+
+        WinCE usually defines MIPS and _MIPS_.
+
+        * wtf/Platform.h:
+
+2010-12-23  Gavin Barraclough  
+
+        Reviewed by Sam Weinig.
+
+        Rename RegexCompiler.cpp to RegexPattern.cpp.
+        Implicitly call compileRegex from RegexPattern's constructor.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * JavaScriptCore.gypi:
+        * JavaScriptCore.pro:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * runtime/RegExp.cpp:
+        (JSC::RegExp::compile):
+        * yarr/RegexCompiler.cpp: Removed.
+        * yarr/RegexCompiler.h: Removed.
+        * yarr/RegexInterpreter.cpp:
+        * yarr/RegexJIT.cpp:
+        * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
+        (JSC::Yarr::compileRegex):
+        (JSC::Yarr::RegexPattern::RegexPattern):
+        * yarr/RegexPattern.h:
+
+2010-12-23  Patrick Gansterer  
+
+        Unreviewed build fix for WinCE after r74360.
+
+        Move the OS(WINDOWS) section after the OS(WINCE) section
+        and add missing argument to the getStackMax call.
+
+        * wtf/StackBounds.cpp:
+        (WTF::StackBounds::initialize):
+
+2010-12-22  Laszlo Gombos  
+
+        Unreviewed build fix.
+
+        [Symbian] Make sure OSAllocatorSymbian builds
+
+        This patch only addresses the build problem.
+
+        https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
+        (re)implementation of the Symbian allocator.
+
+        * wtf/OSAllocatorSymbian.cpp:
+        (WTF::OSAllocator::reserveUncommitted):
+        (WTF::OSAllocator::reserveAndCommit):
+        (WTF::OSAllocator::commit):
+
+2010-12-22  Dan Bernstein  
+
+        Changed WebKitTools to Tools.
+
+        * JavaScriptCore.vcproj/JavaScriptCore.sln:
+
+2010-12-22  Dan Bernstein  
+
+        Rubber-stamped by Mark Rowe.
+
+        Changed WebKitTools to Tools in script build phases.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2010-12-22  Andrei Popescu  
+
+        Unreviewed build fix.
+
+        Fix Chromium Linux shared library build.
+        [Chromium] r74431 broke the Chromium Linux shared library build
+        https://bugs.webkit.org/show_bug.cgi?id=51462
+
+        * JavaScriptCore.gyp/JavaScriptCore.gyp:
+        * JavaScriptCore.gypi:
+
+2010-12-21  Sheriff Bot  
+
+        Unreviewed, rolling out r74462.
+        http://trac.webkit.org/changeset/74462
+        https://bugs.webkit.org/show_bug.cgi?id=51449
+
+        broke chromium win (Requested by tonyg-cr on #webkit).
+
+        * JavaScriptCore.gypi:
+
+2010-12-21  Tony Gentilcore  
+
+        Unreviewed build fix.
+
+        [chromium] Build fix after r74431
+        https://bugs.webkit.org/show_bug.cgi?id=51447
+
+        * JavaScriptCore.gypi:
+
+2010-12-21  Gavin Barraclough  
+
+        Windows build fix.
+
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-12-21  Gavin Barraclough  
+
+        Windows build fix.
+
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-12-21  Gavin Barraclough  
+
+        Speculative build fix.
+
+        * jit/ExecutableAllocator.cpp:
+        (JSC::ExecutableAllocator::underMemoryPressure):
+
+2010-12-21  Gavin Barraclough  
+
+        Reviewed by Oliver Hunt.
+
+        Bug 26276 - Need a mechanism to determine stack extent
+
+        This patch adds accurate stack size calculation for:
+            DARWIN, QNX, UNIX
+        We still need to fix:
+            WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
+
+        * wtf/StackBounds.cpp:
+        (WTF::StackBounds::initialize):
+
+2010-12-21  Gavin Barraclough  
+
+         Reviewed by Geoff Garen.
+ 
+         CRASH running out of executable memory, loading io9.com
+        https://bugs.webkit.org/show_bug.cgi?id=51443
+
+        The problem here is that each page uses a reasonable amount of memory, (~4Mb),
+        and that when miultiple pages are open we keep all JIT code for all functions
+        in all pages alive.
+
+        Add a check to detect high memory pressure situations in the executable allocator
+        (>50% of available memory allocated), and upon a top level entry into JSC (no code
+        running on the stack) in this situation throw away all JIT code.
+
+        * JavaScriptCore.exp:
+        * debugger/Debugger.cpp:
+        (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
+        * jit/ExecutableAllocator.h:
+        * jit/ExecutableAllocatorFixedVMPool.cpp:
+        (JSC::ExecutablePool::systemAlloc): Count allocations.
+        (JSC::ExecutablePool::systemRelease): Count deallocations.
+        (JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
+        * jit/ExecutableAllocatorPosix.cpp:
+        (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
+        * jit/ExecutableAllocatorWin.cpp:
+        (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
+        * runtime/Executable.cpp:
+        (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
+        * runtime/Executable.h:
+        * runtime/JSGlobalData.cpp:
+        (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
+        * runtime/JSGlobalData.h:
+        * runtime/JSGlobalObject.h:
+        (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
+
+2010-12-21  Gavin Barraclough  
+
+        Reviewed by Geoff Garen.
+
+         JIT executable memory excessive usage due to regex caching
+        https://bugs.webkit.org/show_bug.cgi?id=51434
+
+        Reduce the amount of memory the RegExpCache can hold on to on iOS.
+        Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
+        ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
+        memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
+        entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
+        from RegExp objects. This helps in two ways (1) it increases the probability that
+        RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
+        up holding on to a large ExecutablePool containing a translation of JS code.
+        (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
+        same pool, but large RegExp patterns are less common).
+
+        * runtime/JSGlobalData.h:
+        * runtime/RegExpCache.h:
+        * yarr/RegexJIT.cpp:
+        (JSC::Yarr::RegexGenerator::compile):
+
+2010-12-21  Gavin Barraclough  
+
+        Windows build fix.
+
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-12-21  Gavin Barraclough  
+
+        Eeeep! build fix!
+
+        * wtf/OSAllocator.h:
+        (WTF::OSAllocator::decommitAndRelease):
+
+2010-12-21  Gavin Barraclough  
+
+        Ooops, fixed typo in comment.
+
+        * wtf/OSAllocator.h:
+
+2010-12-21  Geoffrey Garen  
+
+        Reviewed by Gavin Barraclough & Oliver Hunt.
+
+        Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
+        https://bugs.webkit.org/show_bug.cgi?id=51359
+        
+        I think this patch fixes  [5.0.1] WER crash in
+        Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * JavaScriptCore.gypi:
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
+
+        * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
+        PageAllocationAligned.
+
+        * runtime/Collector.cpp:
+        (JSC::Heap::destroy):
+        (JSC::Heap::allocateBlock):
+        (JSC::Heap::freeBlock):
+        (JSC::Heap::addWeakGCHandle):
+        * runtime/Collector.h: Switched from AlignedMemoryAllocator to
+        PageAllocationAligned.
+
+        * runtime/GCHandle.cpp:
+        * runtime/GCHandle.h: Ditto.
+
+        * wtf/PageAllocation.h:
+        (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
+        functions. Supplanted by PageAllocationAligned.
+
+        * wtf/PageAllocationAligned.cpp: Added.
+        (WTF::PageAllocationAligned::allocate):
+        (WTF::PageAllocationAligned::deallocate):
+        * wtf/PageAllocationAligned.h: Added.
+        (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
+        class for doing aligned memory allocation. This class properly matches
+        allocation and deallocation library calls, fixing a long-standing bug
+        in PageAllocation.
+
+        * wtf/Platform.h: Removed some defunction VM platform defines.
+
+        * wtf/wtf.pri: Updated build files.
+
+2010-12-21  Oliver Hunt  
+
+        Reviewed by Gavin Barraclough.
+
+        ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
+        https://bugs.webkit.org/show_bug.cgi?id=49006
+
+        This problem was caused by having a parameter named 'arguments'.
+        The fix is to treat parameters named 'arguments' as shadowing
+        the actual arguments property, and so logically turn the function
+        into one that doesn't "use" arguments.
+
+        This required a bit of fiddling in the parser to ensure we correctly
+        propagate the 'feature' of shadowing is set correctly.
+
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::createArgumentsIfNecessary):
+          Change assertion to an early return as we may now reference
+          a property named 'arguments' without being in a function that
+          has the ArgumentsFeature
+        * parser/JSParser.cpp:
+        (JSC::JSParser::Scope::Scope):
+        (JSC::JSParser::Scope::declareParameter):
+        (JSC::JSParser::Scope::shadowsArguments):
+        (JSC::JSParser::parseProgram):
+        (JSC::JSParser::parseFormalParameters):
+        (JSC::JSParser::parseFunctionInfo):
+        * parser/Nodes.h:
+        (JSC::ScopeNode::usesArguments):
+
+2010-12-21  Daniel Bates  
+
+        Reviewed by Eric Seidel and Darin Adler.
+
+        Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
+        https://bugs.webkit.org/show_bug.cgi?id=51367
+
+        Inspired by a patch by George Staikos.
+
+        * wtf/DateMath.cpp:
+        (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
+        of type OwnPtrArray.
+        * wtf/DateMath.h: Change timeZone to type OwnArrayPtr; Removed destructor since it is no longer needed.
+        (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
+        (JSC::GregorianDateTime::operator tm): Ditto.
+        (JSC::GregorianDateTime::copyFrom): Ditto.
+
+2010-12-21  Sheriff Bot  
+
+        Unreviewed, rolling out r74402.
+        http://trac.webkit.org/changeset/74402
+        https://bugs.webkit.org/show_bug.cgi?id=51402
+
+        This patch broke the Windows 7 Release Layout Tests (Requested
+        by jessieberlin on #webkit).
+
+        * wtf/StackBounds.cpp:
+        (WTF::estimateStackBound):
+        (WTF::StackBounds::initialize):
+
+2010-12-21  Peter Varga  
+
+        Reviewed by Csaba Osztrogonác.
+
+        Unify the name of parentheses in YARR: rename parenthesis to
+        parentheses.
+
+        * yarr/RegexCompiler.cpp:
+        (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
+
+2010-12-21  Laszlo Gombos  
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Set BUILDING_QT__ consistently
+        https://bugs.webkit.org/show_bug.cgi?id=51341
+
+        * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
+        is already defined in WebKit.pri.
+
+2010-12-20  Gavin Barraclough  
+
+        Reviewed by Oliver Hunt.
+
+        Bug 26276 - Need a mechanism to determine stack extent
+
+        This patch adds accurate stack size calculation for:
+            DARWIN, WINDOWS, QNX, UNIX
+        We still need to fix:
+            SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
+
+        * wtf/StackBounds.cpp:
+        (WTF::StackBounds::initialize):
+
+2010-12-20  Gavin Barraclough  
+
+        PPC build fix; stop using std::swap on PageAllocation/PageReservation,
+        this was failing on some compilers since the lack of default construction
+        for the m_executable/m_writable fields meant the value being swapped may
+        not have been fully initialized.
+
+        * wtf/PageAllocation.h:
+        (WTF::PageAllocation::deallocate):
+        * wtf/PageBlock.h:
+        * wtf/PageReservation.h:
+        (WTF::PageReservation::deallocate):
+
+2010-12-20  Oliver Hunt  
+
+        Reviewed by Geoffrey Garen.
+
+        |delete name| in strict mode code should be an early error
+        https://bugs.webkit.org/show_bug.cgi?id=50431
+
+        Disallow the |delete IDENTIFIER| production in strict mode, and removed
+        a bunch of now unnecessary code.
+
+        * parser/JSParser.cpp:
+        (JSC::JSParser::Scope::collectFreeVariables):
+        (JSC::jsParse):
+        (JSC::JSParser::parseProgram):
+        (JSC::JSParser::parseUnaryExpression):
+        * parser/JSParser.h:
+        * parser/Parser.cpp:
+        (JSC::Parser::parse):
+        * parser/Parser.h:
+        (JSC::Parser::parse):
+
+2010-12-20  Gavin Barraclough  
+
+        Reviewed by Olver Hunt.
+
+        Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
+
+        The current implementation of recursion limit checking is not safe on smaller stacks.
+        Switch to using a common mechanism, shared with the parser, to check recursion limits.
+
+        Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
+        footprint on the stack, at just under 1k on x86-64.  Given this, the default recursion
+        check (requiring 4k of available space to recurse) seems reasonable.
+
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::BytecodeGenerator):
+        * bytecompiler/BytecodeGenerator.h:
+        (JSC::BytecodeGenerator::emitNode):
+        (JSC::BytecodeGenerator::emitNodeInConditionContext):
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::BinaryOpNode::emitStrcat):
+
+2010-12-20  Tony Gentilcore  
+
+        Unreviewed build fix.
+
+        Include pthread to fix chromium mac build (broken by r74360)
+        https://bugs.webkit.org/show_bug.cgi?id=51356
+
+        * wtf/StackBounds.cpp:
+
+2010-12-20  Xan Lopez  
+
+        Reviewed by Gustavo Noronha.
+
+        * GNUmakefile.am: add missing files.
+
+2010-12-18  Gavin Barraclough  
+
+        Reviewed by Oliver Hunt.
+
+        Bug 26276 - Need a mechanism to determine stack extent
+
+        This patch adds a class 'StackBounds', to hold information about the machine stack.
+        The implementation of this class broadly adheres to the current implmentation of
+        stack limit checking, and as such does not solve the problem of determining stack
+        extent, but gives us a common place to do so.
+
+        Currently two mechanism are provided to determine the stack origin (the point the
+        stack is growing away from). currentThreadStackBase() in Collector provides a
+        more accurate determination of the stack origin, so use this to calculate
+        StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
+        as such can be removed.  Cache the StackBounds on WTFThreadData such that they
+        need only be determined once per thread, and for non-API contexts cache this
+        information in JSGlobalData, to save a thread-specific access.
+
+        For the time being retain the estimate of stack size used by JSC's parser
+        (128 * sizeof(void*) * 1024), with a view to replacing this with something more
+        accurate in the near future.
+
+        * parser/JSParser.cpp:
+        (JSC::JSParser::canRecurse):
+        (JSC::JSParser::JSParser):
+            Change to use StackBounds.
+        * runtime/Collector.cpp:
+        (JSC::Heap::registerThread):
+        (JSC::Heap::markCurrentThreadConservativelyInternal):
+            Change to use StackBounds, cached on JSGlobalData.
+        * runtime/JSGlobalData.cpp:
+        (JSC::JSGlobalData::JSGlobalData):
+        * runtime/JSGlobalData.h:
+        (JSC::JSGlobalData::stack):
+            Add a cached copy of StackBounds.
+        * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
+        (WTF::estimateStackBound):
+        (WTF::StackBounds::initialize):
+        (WTF::getStackMax):
+            Copy code from Collector.cpp to determine stack origin.
+        * wtf/StackBounds.h: Added.
+        (WTF::StackBounds::StackBounds):
+            No argument constructor; returns a null StackBounds.
+        (WTF::StackBounds::currentThreadStackBounds):
+            Returns a StackBounds object representing the stack limits
+            of the current thread.
+        (WTF::StackBounds::origin):
+            Returns to stack origin (the point the stack is growing away
+            from; the highest extent of the stack on machines where the
+            stack grows downwards.
+        (WTF::StackBounds::recursionLimit):
+            Returns a limit value that is 'a comfortable distance from
+            the end of the stack'. Our concept of this is currently 1 page
+            away from the end, however the default value may be tuned in
+            the future, and clients may override passing a larger delta;
+            should only be called on StackBounds object representing the
+            stack of the thread this method is called on (checked by
+            checkConsistency).
+        (WTF::StackBounds::recursionCheck):
+            Checks whether we are currently 'a comfortable distance from
+            the end of the stack'. Our concept of this is currently 1 page
+            away from the end, however the default value may be tuned in
+            the future, and clients may override passing a larger delta
+            to apply when checking, if they wish to do so. This method
+            should only be called on StackBounds object representing the
+            stack of the thread this method is called on (checked by
+            checkConsistency).
+        (WTF::StackBounds::current):
+            Approximate current stack position. On machines where the stack
+            is growing downwards this is the lowest address that might need
+            conservative collection.
+        (WTF::StackBounds::isGrowingDownward):
+            True for all platforms other than WINCE, which has to check.
+        (WTF::StackBounds::checkConsistency):
+            This is called in methods that shoulds only be operating on a
+            valid set of bounds; as such we expect m_origin != m_bounds
+            (i.e. stack size != zero) - we're really testing that this
+            object is not null (the constructor initializes both fields
+            to zero).  Also checks that current() is within the stack's
+            bounds.
+        * wtf/WTFThreadData.cpp:
+        (WTF::WTFThreadData::WTFThreadData):
+        * wtf/WTFThreadData.h:
+        (WTF::WTFThreadData::stack):
+            Add the StackBounds member variable.
+
+2010-12-17  Geoffrey Garen  
+
+        Reviewed by Sam Weinig.
+
+        Factored common page set management into a new PageBlock base class
+        https://bugs.webkit.org/show_bug.cgi?id=51285
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * JavaScriptCore.gypi:
+        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * interpreter/RegisterFile.h:
+        (JSC::RegisterFile::RegisterFile):
+        * jit/ExecutableAllocator.cpp:
+        (JSC::ExecutableAllocator::intializePageSize):
+        * wtf/PageAllocation.cpp: Removed.
+        * wtf/PageAllocation.h:
+        (WTF::PageAllocation::deallocate):
+        (WTF::PageAllocation::PageAllocation):
+        * wtf/PageReservation.h:
+        (WTF::PageReservation::commit):
+        (WTF::PageReservation::decommit):
+        (WTF::PageReservation::deallocate):
+        (WTF::PageReservation::PageReservation):
+        * wtf/wtf.pri:
+
+2010-12-17  Michael Saboff  
+
+        Reviewed by Oliver Hunt.
+
+        RegExp Jit'ed expression crashes clicking link on yelp.com
+        https://bugs.webkit.org/show_bug.cgi?id=51284
+
+        When transitioning between an non-repeating beginning of line
+        anchored expression and the remaining refactored repeating 
+        expression, we should not clear any residual datalabel in 
+        state's m_backtrack.  It will be resolved and cleared in subsequent
+        code when linkAlternativeBacktracks() is called for the repeating
+        alternative(s).
+
+        * yarr/RegexJIT.cpp:
+        (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
+        (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
+
+2010-12-17  Dan Bernstein  
+
+        Rubber-stamped by Mark Rowe.
+
+        Updated for the renaming of WebKitTools to Tools
+
+        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
+
+2010-12-17  Ariya Hidayat  
+
+        Reviewed by Oliver Hunt.
+
+        [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
+        https://bugs.webkit.org/show_bug.cgi?id=51268
+
+        * parser/JSParser.cpp:
+        (JSC::JSParser::parseAssignmentExpression):
+
+2010-12-17  Geoffrey Garen  
+
+        Reviewed by Oliver Hunt.
+
+        Removed RChunk from PageAllocation/PageReservation, since it's now unused.
+        https://bugs.webkit.org/show_bug.cgi?id=51276
+
+        * wtf/PageAllocation.h:
+        (WTF::PageAllocation::PageAllocation):
+        * wtf/PageReservation.h:
+        (WTF::PageReservation::PageReservation):
+
+2010-12-17  Oliver Hunt  
+
+        Reviewed by Gavin Barraclough.
+
+        Incorrect encoding of some constants in ARMv7 JIT
+        https://bugs.webkit.org/show_bug.cgi?id=51273
+        
+
+        When using immediate encoding 3 we need to write the byte
+        that holds a duplicated value.
+
+        * assembler/ARMv7Assembler.h:
+        (JSC::ARMThumbImmediate::makeEncodedImm):
+
+2010-12-16  Evan Martin  
+
+        Reviewed by Darin Fisher.
+
+        [chromium] useless warnings when building on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=50985
+
+        Disable some compiler warnings that aren't indicative of real problems.
+
+        * JavaScriptCore.gyp/JavaScriptCore.gyp:
+
+2010-12-16  Pratik Solanki  
+
+        Reviewed by Geoffrey Garen.
+
+        https://bugs.webkit.org/show_bug.cgi?id=51166
+        ExecutableAllocator::cacheFlush should call sys_cache_control
+
+        * jit/ExecutableAllocator.h:
+        (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
+        sys_cache_control(kCacheFunctionPrepareForExecution,...).
+
+2010-12-16  Ariya Hidayat  
+
+        Reviewed by Andreas Kling.
+
+        [JSC] Const correctness in ASTBuilder and SyntaxChecker
+        https://bugs.webkit.org/show_bug.cgi?id=51141
+
+        * parser/ASTBuilder.h:
+        (JSC::ASTBuilder::getName):
+        (JSC::ASTBuilder::getType):
+        (JSC::ASTBuilder::isResolve):
+        * parser/SyntaxChecker.h:
+        (JSC::SyntaxChecker::operatorStackPop):
+
+2010-12-15  Kenneth Russell  
+
+        Reviewed by James Robinson.
+
+        Web Audio API: port FFTFrame to MKL
+        https://bugs.webkit.org/show_bug.cgi?id=50986
+
+        Fixed bug in log2 emulation function provided for Windows port of
+        Web Audio API.
+
+        * wtf/MathExtras.h:
+        (log2):
+
+2010-12-14  Mark Rowe  
+
+        Reviewed by Sam Weinig.
+
+         Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading