├── API ├── APICast.h ├── APIShims.h ├── JSBase.cpp ├── JSBase.h ├── JSBasePrivate.h ├── JSCallbackConstructor.cpp ├── JSCallbackConstructor.h ├── JSCallbackFunction.cpp ├── JSCallbackFunction.h ├── JSCallbackObject.cpp ├── JSCallbackObject.h ├── JSCallbackObjectFunctions.h ├── JSClassRef.cpp ├── JSClassRef.h ├── JSContextRef.cpp ├── JSContextRef.h ├── JSContextRefPrivate.h ├── JSObjectRef.cpp ├── JSObjectRef.h ├── JSObjectRefPrivate.h ├── JSProfilerPrivate.cpp ├── JSProfilerPrivate.h ├── JSRetainPtr.h ├── JSStringRef.cpp ├── JSStringRef.h ├── JSStringRefBSTR.cpp ├── JSStringRefBSTR.h ├── JSStringRefCF.cpp ├── JSStringRefCF.h ├── JSValueRef.cpp ├── JSValueRef.h ├── JSWeakObjectMapRefInternal.h ├── JSWeakObjectMapRefPrivate.cpp ├── JSWeakObjectMapRefPrivate.h ├── JavaScript.h ├── JavaScriptCore.h ├── OpaqueJSString.cpp ├── OpaqueJSString.h ├── WebKitAvailability.h └── tests │ ├── JSNode.c │ ├── JSNode.h │ ├── JSNodeList.c │ ├── JSNodeList.h │ ├── Node.c │ ├── Node.h │ ├── NodeList.c │ ├── NodeList.h │ ├── minidom.c │ ├── minidom.html │ ├── minidom.js │ ├── testapi.c │ └── testapi.js ├── AUTHORS ├── AllInOneFile.cpp ├── Android.mk ├── Android.v8.wtf.mk ├── COPYING.LIB ├── DerivedSources.make ├── DerivedSources.pro ├── DerivedSources └── JavaScriptCore │ ├── ArrayPrototype.lut.h │ ├── DatePrototype.lut.h │ ├── Grammar.cpp │ ├── Grammar.h │ ├── JSONObject.lut.h │ ├── Lexer.lut.h │ ├── MathObject.lut.h │ ├── NumberConstructor.lut.h │ ├── RegExpConstructor.lut.h │ ├── RegExpJitTables.h │ ├── RegExpObject.lut.h │ ├── StringPrototype.lut.h │ └── chartables.c ├── ForwardingHeaders └── JavaScriptCore │ ├── APICast.h │ ├── JSBase.h │ ├── JSContextRef.h │ ├── JSObjectRef.h │ ├── JSRetainPtr.h │ ├── JSStringRef.h │ ├── JSStringRefCF.h │ ├── JSValueRef.h │ ├── JavaScript.h │ ├── JavaScriptCore.h │ ├── OpaqueJSString.h │ └── WebKitAvailability.h ├── GNUmakefile.am ├── Info.plist ├── JavaScriptCore.exp ├── JavaScriptCore.gyp └── JavaScriptCore.gyp ├── JavaScriptCore.gypi ├── JavaScriptCore.order ├── JavaScriptCore.pri ├── JavaScriptCore.pro ├── JavaScriptCore ├── JavaScriptCore.xcodeproj │ └── project.pbxproj └── JavaScriptCore_Prefix.pch ├── JavaScriptCorePrefix.h ├── JavaScriptCoreSources.bkl ├── Makefile ├── THANKS ├── assembler ├── ARMAssembler.cpp ├── ARMAssembler.h ├── ARMv7Assembler.cpp ├── ARMv7Assembler.h ├── AbstractMacroAssembler.h ├── AssemblerBuffer.h ├── AssemblerBufferWithConstantPool.h ├── CodeLocation.h ├── LinkBuffer.h ├── MIPSAssembler.h ├── MacroAssembler.h ├── MacroAssemblerARM.cpp ├── MacroAssemblerARM.h ├── MacroAssemblerARMv7.h ├── MacroAssemblerCodeRef.h ├── MacroAssemblerMIPS.h ├── MacroAssemblerX86.h ├── MacroAssemblerX86Common.h ├── MacroAssemblerX86_64.h ├── RepatchBuffer.h └── X86Assembler.h ├── bytecode ├── CodeBlock.cpp ├── CodeBlock.h ├── EvalCodeCache.h ├── Instruction.h ├── JumpTable.cpp ├── JumpTable.h ├── Opcode.cpp ├── Opcode.h ├── SamplingTool.cpp ├── SamplingTool.h ├── StructureStubInfo.cpp └── StructureStubInfo.h ├── bytecompiler ├── BytecodeGenerator.cpp ├── BytecodeGenerator.h ├── Label.h ├── LabelScope.h ├── NodesCodegen.cpp └── RegisterID.h ├── config.h ├── create_hash_table ├── create_jit_stubs ├── create_regex_tables ├── debugger ├── Debugger.cpp ├── Debugger.h ├── DebuggerActivation.cpp ├── DebuggerActivation.h ├── DebuggerCallFrame.cpp └── DebuggerCallFrame.h ├── docs └── make-bytecode-docs.pl ├── headers.pri ├── icu ├── LICENSE ├── README └── unicode │ ├── parseerr.h │ ├── platform.h │ ├── putil.h │ ├── uchar.h │ ├── ucnv.h │ ├── ucnv_err.h │ ├── ucol.h │ ├── uconfig.h │ ├── uenum.h │ ├── uiter.h │ ├── uloc.h │ ├── umachine.h │ ├── unorm.h │ ├── urename.h │ ├── uset.h │ ├── ustring.h │ ├── utf.h │ ├── utf16.h │ ├── utf8.h │ ├── utf_old.h │ ├── utypes.h │ └── uversion.h ├── interpreter ├── CachedCall.h ├── CallFrame.cpp ├── CallFrame.h ├── CallFrameClosure.h ├── Interpreter.cpp ├── Interpreter.h ├── Register.h ├── RegisterFile.cpp └── RegisterFile.h ├── jit ├── ExecutableAllocator.cpp ├── ExecutableAllocator.h ├── ExecutableAllocatorFixedVMPool.cpp ├── ExecutableAllocatorPosix.cpp ├── ExecutableAllocatorSymbian.cpp ├── ExecutableAllocatorWin.cpp ├── JIT.cpp ├── JIT.h ├── JITArithmetic.cpp ├── JITArithmetic32_64.cpp ├── JITCall.cpp ├── JITCode.h ├── JITInlineMethods.h ├── JITOpcodes.cpp ├── JITOpcodes32_64.cpp ├── JITPropertyAccess.cpp ├── JITPropertyAccess32_64.cpp ├── JITStubCall.h ├── JITStubs.cpp ├── JITStubs.h ├── JSInterfaceJIT.h ├── SpecializedThunkJIT.h ├── ThunkGenerators.cpp └── ThunkGenerators.h ├── jsc.cpp ├── jsc.pro ├── jscore.bkl ├── make-generated-sources.sh ├── os-win32 ├── WinMain.cpp ├── stdbool.h └── stdint.h ├── parser ├── Grammar.y ├── Keywords.table ├── Lexer.cpp ├── Lexer.h ├── NodeConstructors.h ├── NodeInfo.h ├── Nodes.cpp ├── Nodes.h ├── Parser.cpp ├── Parser.h ├── ParserArena.cpp ├── ParserArena.h ├── ResultType.h ├── SourceCode.h └── SourceProvider.h ├── pcre ├── AUTHORS ├── COPYING ├── dftables ├── pcre.h ├── pcre.pri ├── pcre_compile.cpp ├── pcre_exec.cpp ├── pcre_internal.h ├── pcre_tables.cpp ├── pcre_ucp_searchfuncs.cpp ├── pcre_xclass.cpp ├── ucpinternal.h └── ucptable.cpp ├── profiler ├── CallIdentifier.h ├── Profile.cpp ├── Profile.h ├── ProfileGenerator.cpp ├── ProfileGenerator.h ├── ProfileNode.cpp ├── ProfileNode.h ├── Profiler.cpp ├── Profiler.h ├── ProfilerServer.h └── ProfilerServer.mm ├── qt ├── api │ ├── QtScript.pro │ ├── qscriptconverter_p.h │ ├── qscriptengine.cpp │ ├── qscriptengine.h │ ├── qscriptengine_p.cpp │ ├── qscriptengine_p.h │ ├── qscriptprogram.cpp │ ├── qscriptprogram.h │ ├── qscriptprogram_p.h │ ├── qscriptstring.cpp │ ├── qscriptstring.h │ ├── qscriptstring_p.h │ ├── qscriptsyntaxcheckresult.cpp │ ├── qscriptsyntaxcheckresult.h │ ├── qscriptsyntaxcheckresult_p.h │ ├── qscriptvalue.cpp │ ├── qscriptvalue.h │ ├── qscriptvalue_p.h │ └── qtscriptglobal.h └── tests │ ├── qscriptengine │ ├── qscriptengine.pro │ └── tst_qscriptengine.cpp │ ├── qscriptstring │ ├── qscriptstring.pro │ └── tst_qscriptstring.cpp │ ├── qscriptvalue │ ├── qscriptvalue.pro │ ├── tst_qscriptvalue.cpp │ ├── tst_qscriptvalue.h │ └── tst_qscriptvalue_generated.cpp │ ├── tests.pri │ └── tests.pro ├── runtime ├── ArgList.cpp ├── ArgList.h ├── Arguments.cpp ├── Arguments.h ├── ArrayConstructor.cpp ├── ArrayConstructor.h ├── ArrayPrototype.cpp ├── ArrayPrototype.h ├── BatchedTransitionOptimizer.h ├── BooleanConstructor.cpp ├── BooleanConstructor.h ├── BooleanObject.cpp ├── BooleanObject.h ├── BooleanPrototype.cpp ├── BooleanPrototype.h ├── CachedTranscendentalFunction.h ├── CallData.cpp ├── CallData.h ├── ClassInfo.h ├── Collector.cpp ├── Collector.h ├── CollectorHeapIterator.h ├── CommonIdentifiers.cpp ├── CommonIdentifiers.h ├── Completion.cpp ├── Completion.h ├── ConstructData.cpp ├── ConstructData.h ├── DateConstructor.cpp ├── DateConstructor.h ├── DateConversion.cpp ├── DateConversion.h ├── DateInstance.cpp ├── DateInstance.h ├── DateInstanceCache.h ├── DatePrototype.cpp ├── DatePrototype.h ├── Error.cpp ├── Error.h ├── ErrorConstructor.cpp ├── ErrorConstructor.h ├── ErrorInstance.cpp ├── ErrorInstance.h ├── ErrorPrototype.cpp ├── ErrorPrototype.h ├── ExceptionHelpers.cpp ├── ExceptionHelpers.h ├── Executable.cpp ├── Executable.h ├── FunctionConstructor.cpp ├── FunctionConstructor.h ├── FunctionPrototype.cpp ├── FunctionPrototype.h ├── GetterSetter.cpp ├── GetterSetter.h ├── GlobalEvalFunction.cpp ├── GlobalEvalFunction.h ├── Identifier.cpp ├── Identifier.h ├── InitializeThreading.cpp ├── InitializeThreading.h ├── InternalFunction.cpp ├── InternalFunction.h ├── JSAPIValueWrapper.cpp ├── JSAPIValueWrapper.h ├── JSActivation.cpp ├── JSActivation.h ├── JSArray.cpp ├── JSArray.h ├── JSByteArray.cpp ├── JSByteArray.h ├── JSCell.cpp ├── JSCell.h ├── JSFunction.cpp ├── JSFunction.h ├── JSGlobalData.cpp ├── JSGlobalData.h ├── JSGlobalObject.cpp ├── JSGlobalObject.h ├── JSGlobalObjectFunctions.cpp ├── JSGlobalObjectFunctions.h ├── JSImmediate.cpp ├── JSImmediate.h ├── JSLock.cpp ├── JSLock.h ├── JSNotAnObject.cpp ├── JSNotAnObject.h ├── JSNumberCell.cpp ├── JSNumberCell.h ├── JSONObject.cpp ├── JSONObject.h ├── JSObject.cpp ├── JSObject.h ├── JSPropertyNameIterator.cpp ├── JSPropertyNameIterator.h ├── JSStaticScopeObject.cpp ├── JSStaticScopeObject.h ├── JSString.cpp ├── JSString.h ├── JSStringBuilder.h ├── JSType.h ├── JSTypeInfo.h ├── JSValue.cpp ├── JSValue.h ├── JSVariableObject.cpp ├── JSVariableObject.h ├── JSWrapperObject.cpp ├── JSWrapperObject.h ├── JSZombie.cpp ├── JSZombie.h ├── LiteralParser.cpp ├── LiteralParser.h ├── Lookup.cpp ├── Lookup.h ├── MarkStack.cpp ├── MarkStack.h ├── MarkStackNone.cpp ├── MarkStackPosix.cpp ├── MarkStackSymbian.cpp ├── MarkStackWin.cpp ├── MathObject.cpp ├── MathObject.h ├── NativeErrorConstructor.cpp ├── NativeErrorConstructor.h ├── NativeErrorPrototype.cpp ├── NativeErrorPrototype.h ├── NativeFunctionWrapper.h ├── NumberConstructor.cpp ├── NumberConstructor.h ├── NumberObject.cpp ├── NumberObject.h ├── NumberPrototype.cpp ├── NumberPrototype.h ├── NumericStrings.h ├── ObjectConstructor.cpp ├── ObjectConstructor.h ├── ObjectPrototype.cpp ├── ObjectPrototype.h ├── Operations.cpp ├── Operations.h ├── PropertyDescriptor.cpp ├── PropertyDescriptor.h ├── PropertyMapHashTable.h ├── PropertyNameArray.cpp ├── PropertyNameArray.h ├── PropertySlot.cpp ├── PropertySlot.h ├── Protect.h ├── PrototypeFunction.cpp ├── PrototypeFunction.h ├── PutPropertySlot.h ├── RegExp.cpp ├── RegExp.h ├── RegExpCache.cpp ├── RegExpCache.h ├── RegExpConstructor.cpp ├── RegExpConstructor.h ├── RegExpKey.h ├── RegExpMatchesArray.h ├── RegExpObject.cpp ├── RegExpObject.h ├── RegExpPrototype.cpp ├── RegExpPrototype.h ├── RopeImpl.cpp ├── RopeImpl.h ├── ScopeChain.cpp ├── ScopeChain.h ├── ScopeChainMark.h ├── SmallStrings.cpp ├── SmallStrings.h ├── StringBuilder.h ├── StringConstructor.cpp ├── StringConstructor.h ├── StringObject.cpp ├── StringObject.h ├── StringObjectThatMasqueradesAsUndefined.h ├── StringPrototype.cpp ├── StringPrototype.h ├── Structure.cpp ├── Structure.h ├── StructureChain.cpp ├── StructureChain.h ├── StructureTransitionTable.h ├── SymbolTable.h ├── Terminator.h ├── TimeoutChecker.cpp ├── TimeoutChecker.h ├── Tracing.d ├── Tracing.h ├── UString.cpp ├── UString.h ├── UStringImpl.h ├── WeakGCMap.h ├── WeakGCPtr.h └── WeakRandom.h ├── tests ├── mozilla │ ├── Getopt │ │ └── Mixed.pm │ ├── Makefile │ ├── README-jsDriver.html │ ├── ecma │ │ ├── Array │ │ │ ├── 15.4-1.js │ │ │ ├── 15.4-2.js │ │ │ ├── 15.4.1.1.js │ │ │ ├── 15.4.1.2.js │ │ │ ├── 15.4.1.3.js │ │ │ ├── 15.4.1.js │ │ │ ├── 15.4.2.1-1.js │ │ │ ├── 15.4.2.1-2.js │ │ │ ├── 15.4.2.1-3.js │ │ │ ├── 15.4.2.2-1.js │ │ │ ├── 15.4.2.2-2.js │ │ │ ├── 15.4.2.3.js │ │ │ ├── 15.4.3.1-2.js │ │ │ ├── 15.4.3.2.js │ │ │ ├── 15.4.3.js │ │ │ ├── 15.4.4.1.js │ │ │ ├── 15.4.4.2.js │ │ │ ├── 15.4.4.3-1.js │ │ │ ├── 15.4.4.4-1.js │ │ │ ├── 15.4.4.4-2.js │ │ │ ├── 15.4.4.5-1.js │ │ │ ├── 15.4.4.5-2.js │ │ │ ├── 15.4.4.5-3.js │ │ │ ├── 15.4.4.js │ │ │ ├── 15.4.5.1-1.js │ │ │ ├── 15.4.5.1-2.js │ │ │ ├── 15.4.5.2-1.js │ │ │ └── 15.4.5.2-2.js │ │ ├── Boolean │ │ │ ├── 15.6.1.js │ │ │ ├── 15.6.2.js │ │ │ ├── 15.6.3.1-1.js │ │ │ ├── 15.6.3.1-2.js │ │ │ ├── 15.6.3.1-3.js │ │ │ ├── 15.6.3.1-4.js │ │ │ ├── 15.6.3.1-5.js │ │ │ ├── 15.6.3.1.js │ │ │ ├── 15.6.3.js │ │ │ ├── 15.6.4-1.js │ │ │ ├── 15.6.4-2.js │ │ │ ├── 15.6.4.1.js │ │ │ ├── 15.6.4.2-1.js │ │ │ ├── 15.6.4.2-2.js │ │ │ ├── 15.6.4.2-3.js │ │ │ ├── 15.6.4.2-4-n.js │ │ │ ├── 15.6.4.3-1.js │ │ │ ├── 15.6.4.3-2.js │ │ │ ├── 15.6.4.3-3.js │ │ │ ├── 15.6.4.3-4-n.js │ │ │ ├── 15.6.4.3.js │ │ │ └── 15.6.4.js │ │ ├── Date │ │ │ ├── 15.9.1.1-1.js │ │ │ ├── 15.9.1.1-2.js │ │ │ ├── 15.9.2.1.js │ │ │ ├── 15.9.2.2-1.js │ │ │ ├── 15.9.2.2-2.js │ │ │ ├── 15.9.2.2-3.js │ │ │ ├── 15.9.2.2-4.js │ │ │ ├── 15.9.2.2-5.js │ │ │ ├── 15.9.2.2-6.js │ │ │ ├── 15.9.3.1-1.js │ │ │ ├── 15.9.3.1-2.js │ │ │ ├── 15.9.3.1-3.js │ │ │ ├── 15.9.3.1-4.js │ │ │ ├── 15.9.3.1-5.js │ │ │ ├── 15.9.3.2-1.js │ │ │ ├── 15.9.3.2-2.js │ │ │ ├── 15.9.3.2-3.js │ │ │ ├── 15.9.3.2-4.js │ │ │ ├── 15.9.3.2-5.js │ │ │ ├── 15.9.3.8-1.js │ │ │ ├── 15.9.3.8-2.js │ │ │ ├── 15.9.3.8-3.js │ │ │ ├── 15.9.3.8-4.js │ │ │ ├── 15.9.3.8-5.js │ │ │ ├── 15.9.4.2-1.js │ │ │ ├── 15.9.4.2.js │ │ │ ├── 15.9.4.3.js │ │ │ ├── 15.9.5.1.js │ │ │ ├── 15.9.5.10-1.js │ │ │ ├── 15.9.5.10-10.js │ │ │ ├── 15.9.5.10-11.js │ │ │ ├── 15.9.5.10-12.js │ │ │ ├── 15.9.5.10-13.js │ │ │ ├── 15.9.5.10-2.js │ │ │ ├── 15.9.5.10-3.js │ │ │ ├── 15.9.5.10-4.js │ │ │ ├── 15.9.5.10-5.js │ │ │ ├── 15.9.5.10-6.js │ │ │ ├── 15.9.5.10-7.js │ │ │ ├── 15.9.5.10-8.js │ │ │ ├── 15.9.5.10-9.js │ │ │ ├── 15.9.5.11-1.js │ │ │ ├── 15.9.5.11-2.js │ │ │ ├── 15.9.5.11-3.js │ │ │ ├── 15.9.5.11-4.js │ │ │ ├── 15.9.5.11-5.js │ │ │ ├── 15.9.5.11-6.js │ │ │ ├── 15.9.5.11-7.js │ │ │ ├── 15.9.5.12-1.js │ │ │ ├── 15.9.5.12-2.js │ │ │ ├── 15.9.5.12-3.js │ │ │ ├── 15.9.5.12-4.js │ │ │ ├── 15.9.5.12-5.js │ │ │ ├── 15.9.5.12-6.js │ │ │ ├── 15.9.5.12-7.js │ │ │ ├── 15.9.5.12-8.js │ │ │ ├── 15.9.5.13-1.js │ │ │ ├── 15.9.5.13-2.js │ │ │ ├── 15.9.5.13-3.js │ │ │ ├── 15.9.5.13-4.js │ │ │ ├── 15.9.5.13-5.js │ │ │ ├── 15.9.5.13-6.js │ │ │ ├── 15.9.5.13-7.js │ │ │ ├── 15.9.5.13-8.js │ │ │ ├── 15.9.5.14.js │ │ │ ├── 15.9.5.15.js │ │ │ ├── 15.9.5.16.js │ │ │ ├── 15.9.5.17.js │ │ │ ├── 15.9.5.18.js │ │ │ ├── 15.9.5.19.js │ │ │ ├── 15.9.5.2-1.js │ │ │ ├── 15.9.5.2-2-n.js │ │ │ ├── 15.9.5.2.js │ │ │ ├── 15.9.5.20.js │ │ │ ├── 15.9.5.21-1.js │ │ │ ├── 15.9.5.21-2.js │ │ │ ├── 15.9.5.21-3.js │ │ │ ├── 15.9.5.21-4.js │ │ │ ├── 15.9.5.21-5.js │ │ │ ├── 15.9.5.21-6.js │ │ │ ├── 15.9.5.21-7.js │ │ │ ├── 15.9.5.21-8.js │ │ │ ├── 15.9.5.22-1.js │ │ │ ├── 15.9.5.22-2.js │ │ │ ├── 15.9.5.22-3.js │ │ │ ├── 15.9.5.22-4.js │ │ │ ├── 15.9.5.22-5.js │ │ │ ├── 15.9.5.22-6.js │ │ │ ├── 15.9.5.22-7.js │ │ │ ├── 15.9.5.22-8.js │ │ │ ├── 15.9.5.23-1.js │ │ │ ├── 15.9.5.23-10.js │ │ │ ├── 15.9.5.23-11.js │ │ │ ├── 15.9.5.23-12.js │ │ │ ├── 15.9.5.23-13.js │ │ │ ├── 15.9.5.23-14.js │ │ │ ├── 15.9.5.23-15.js │ │ │ ├── 15.9.5.23-16.js │ │ │ ├── 15.9.5.23-17.js │ │ │ ├── 15.9.5.23-18.js │ │ │ ├── 15.9.5.23-2.js │ │ │ ├── 15.9.5.23-3-n.js │ │ │ ├── 15.9.5.23-4.js │ │ │ ├── 15.9.5.23-5.js │ │ │ ├── 15.9.5.23-6.js │ │ │ ├── 15.9.5.23-7.js │ │ │ ├── 15.9.5.23-8.js │ │ │ ├── 15.9.5.23-9.js │ │ │ ├── 15.9.5.24-1.js │ │ │ ├── 15.9.5.24-2.js │ │ │ ├── 15.9.5.24-3.js │ │ │ ├── 15.9.5.24-4.js │ │ │ ├── 15.9.5.24-5.js │ │ │ ├── 15.9.5.24-6.js │ │ │ ├── 15.9.5.24-7.js │ │ │ ├── 15.9.5.24-8.js │ │ │ ├── 15.9.5.25-1.js │ │ │ ├── 15.9.5.26-1.js │ │ │ ├── 15.9.5.27-1.js │ │ │ ├── 15.9.5.28-1.js │ │ │ ├── 15.9.5.29-1.js │ │ │ ├── 15.9.5.3-1-n.js │ │ │ ├── 15.9.5.3-2.js │ │ │ ├── 15.9.5.30-1.js │ │ │ ├── 15.9.5.31-1.js │ │ │ ├── 15.9.5.32-1.js │ │ │ ├── 15.9.5.33-1.js │ │ │ ├── 15.9.5.34-1.js │ │ │ ├── 15.9.5.35-1.js │ │ │ ├── 15.9.5.36-1.js │ │ │ ├── 15.9.5.36-2.js │ │ │ ├── 15.9.5.36-3.js │ │ │ ├── 15.9.5.36-4.js │ │ │ ├── 15.9.5.36-5.js │ │ │ ├── 15.9.5.36-6.js │ │ │ ├── 15.9.5.36-7.js │ │ │ ├── 15.9.5.37-1.js │ │ │ ├── 15.9.5.37-2.js │ │ │ ├── 15.9.5.37-3.js │ │ │ ├── 15.9.5.37-4.js │ │ │ ├── 15.9.5.37-5.js │ │ │ ├── 15.9.5.4-1.js │ │ │ ├── 15.9.5.4-2-n.js │ │ │ ├── 15.9.5.5.js │ │ │ ├── 15.9.5.6.js │ │ │ ├── 15.9.5.7.js │ │ │ ├── 15.9.5.8.js │ │ │ ├── 15.9.5.9.js │ │ │ └── 15.9.5.js │ │ ├── ExecutionContexts │ │ │ ├── 10.1.3-1.js │ │ │ ├── 10.1.3.js │ │ │ ├── 10.1.4-1.js │ │ │ ├── 10.1.4-10.js │ │ │ ├── 10.1.4-2.js │ │ │ ├── 10.1.4-3.js │ │ │ ├── 10.1.4-4.js │ │ │ ├── 10.1.4-5.js │ │ │ ├── 10.1.4-6.js │ │ │ ├── 10.1.4-7.js │ │ │ ├── 10.1.4-8.js │ │ │ ├── 10.1.4-9.js │ │ │ ├── 10.1.5-1.js │ │ │ ├── 10.1.5-2.js │ │ │ ├── 10.1.5-3.js │ │ │ ├── 10.1.5-4.js │ │ │ ├── 10.1.6.js │ │ │ ├── 10.1.8-1.js │ │ │ ├── 10.1.8-2.js │ │ │ ├── 10.2.1.js │ │ │ ├── 10.2.2-1.js │ │ │ ├── 10.2.2-2.js │ │ │ ├── 10.2.3-1.js │ │ │ └── 10.2.3-2.js │ │ ├── Expressions │ │ │ ├── 11.1.1.js │ │ │ ├── 11.10-1.js │ │ │ ├── 11.10-2.js │ │ │ ├── 11.10-3.js │ │ │ ├── 11.12-1.js │ │ │ ├── 11.12-2-n.js │ │ │ ├── 11.12-3.js │ │ │ ├── 11.12-4.js │ │ │ ├── 11.13.1.js │ │ │ ├── 11.13.2-1.js │ │ │ ├── 11.13.2-2.js │ │ │ ├── 11.13.2-3.js │ │ │ ├── 11.13.2-4.js │ │ │ ├── 11.13.2-5.js │ │ │ ├── 11.13.js │ │ │ ├── 11.14-1.js │ │ │ ├── 11.2.1-1.js │ │ │ ├── 11.2.1-2.js │ │ │ ├── 11.2.1-3-n.js │ │ │ ├── 11.2.1-4-n.js │ │ │ ├── 11.2.1-5.js │ │ │ ├── 11.2.2-1-n.js │ │ │ ├── 11.2.2-1.js │ │ │ ├── 11.2.2-10-n.js │ │ │ ├── 11.2.2-11.js │ │ │ ├── 11.2.2-2-n.js │ │ │ ├── 11.2.2-3-n.js │ │ │ ├── 11.2.2-4-n.js │ │ │ ├── 11.2.2-5-n.js │ │ │ ├── 11.2.2-6-n.js │ │ │ ├── 11.2.2-7-n.js │ │ │ ├── 11.2.2-8-n.js │ │ │ ├── 11.2.2-9-n.js │ │ │ ├── 11.2.3-1.js │ │ │ ├── 11.2.3-2-n.js │ │ │ ├── 11.2.3-3-n.js │ │ │ ├── 11.2.3-4-n.js │ │ │ ├── 11.2.3-5.js │ │ │ ├── 11.3.1.js │ │ │ ├── 11.3.2.js │ │ │ ├── 11.4.1.js │ │ │ ├── 11.4.2.js │ │ │ ├── 11.4.3.js │ │ │ ├── 11.4.4.js │ │ │ ├── 11.4.5.js │ │ │ ├── 11.4.6.js │ │ │ ├── 11.4.8.js │ │ │ ├── 11.4.9.js │ │ │ ├── 11.5.1.js │ │ │ ├── 11.5.2.js │ │ │ ├── 11.5.3.js │ │ │ ├── 11.6.1-1.js │ │ │ ├── 11.6.1-2.js │ │ │ ├── 11.6.1-3.js │ │ │ ├── 11.6.2-1.js │ │ │ ├── 11.6.3.js │ │ │ ├── 11.7.1.js │ │ │ ├── 11.7.2.js │ │ │ ├── 11.7.3.js │ │ │ ├── 11.8.1.js │ │ │ ├── 11.8.2.js │ │ │ ├── 11.8.3.js │ │ │ ├── 11.8.4.js │ │ │ ├── 11.9.1.js │ │ │ ├── 11.9.2.js │ │ │ └── 11.9.3.js │ │ ├── FunctionObjects │ │ │ ├── 15.3.1.1-1.js │ │ │ ├── 15.3.1.1-2.js │ │ │ ├── 15.3.1.1-3.js │ │ │ ├── 15.3.2.1-1.js │ │ │ ├── 15.3.2.1-2.js │ │ │ ├── 15.3.2.1-3.js │ │ │ ├── 15.3.3.1-1.js │ │ │ ├── 15.3.3.1-2.js │ │ │ ├── 15.3.3.1-3.js │ │ │ ├── 15.3.3.1-4.js │ │ │ ├── 15.3.3.2.js │ │ │ ├── 15.3.4-1.js │ │ │ ├── 15.3.4.1.js │ │ │ ├── 15.3.4.js │ │ │ ├── 15.3.5-1.js │ │ │ ├── 15.3.5-2.js │ │ │ ├── 15.3.5.1.js │ │ │ └── 15.3.5.3.js │ │ ├── GlobalObject │ │ │ ├── 15.1-1-n.js │ │ │ ├── 15.1-2-n.js │ │ │ ├── 15.1.1.1.js │ │ │ ├── 15.1.1.2.js │ │ │ ├── 15.1.2.1-1.js │ │ │ ├── 15.1.2.1-2.js │ │ │ ├── 15.1.2.2-1.js │ │ │ ├── 15.1.2.2-2.js │ │ │ ├── 15.1.2.3-1.js │ │ │ ├── 15.1.2.3-2.js │ │ │ ├── 15.1.2.4.js │ │ │ ├── 15.1.2.5-1.js │ │ │ ├── 15.1.2.5-2.js │ │ │ ├── 15.1.2.5-3.js │ │ │ ├── 15.1.2.6.js │ │ │ └── 15.1.2.7.js │ │ ├── LexicalConventions │ │ │ ├── 7.1-1.js │ │ │ ├── 7.1-2.js │ │ │ ├── 7.1-3.js │ │ │ ├── 7.2-1.js │ │ │ ├── 7.2-2-n.js │ │ │ ├── 7.2-3-n.js │ │ │ ├── 7.2-4-n.js │ │ │ ├── 7.2-5-n.js │ │ │ ├── 7.2-6.js │ │ │ ├── 7.3-1.js │ │ │ ├── 7.3-10.js │ │ │ ├── 7.3-11.js │ │ │ ├── 7.3-12.js │ │ │ ├── 7.3-13-n.js │ │ │ ├── 7.3-2.js │ │ │ ├── 7.3-3.js │ │ │ ├── 7.3-4.js │ │ │ ├── 7.3-5.js │ │ │ ├── 7.3-6.js │ │ │ ├── 7.3-7.js │ │ │ ├── 7.3-8.js │ │ │ ├── 7.3-9.js │ │ │ ├── 7.4.1-1-n.js │ │ │ ├── 7.4.1-2-n.js │ │ │ ├── 7.4.1-3-n.js │ │ │ ├── 7.4.2-1-n.js │ │ │ ├── 7.4.2-10-n.js │ │ │ ├── 7.4.2-11-n.js │ │ │ ├── 7.4.2-12-n.js │ │ │ ├── 7.4.2-13-n.js │ │ │ ├── 7.4.2-14-n.js │ │ │ ├── 7.4.2-15-n.js │ │ │ ├── 7.4.2-16-n.js │ │ │ ├── 7.4.2-2-n.js │ │ │ ├── 7.4.2-3-n.js │ │ │ ├── 7.4.2-4-n.js │ │ │ ├── 7.4.2-5-n.js │ │ │ ├── 7.4.2-6-n.js │ │ │ ├── 7.4.2-7-n.js │ │ │ ├── 7.4.2-8-n.js │ │ │ ├── 7.4.2-9-n.js │ │ │ ├── 7.4.3-1-n.js │ │ │ ├── 7.4.3-10-n.js │ │ │ ├── 7.4.3-11-n.js │ │ │ ├── 7.4.3-12-n.js │ │ │ ├── 7.4.3-13-n.js │ │ │ ├── 7.4.3-14-n.js │ │ │ ├── 7.4.3-15-n.js │ │ │ ├── 7.4.3-16-n.js │ │ │ ├── 7.4.3-2-n.js │ │ │ ├── 7.4.3-3-n.js │ │ │ ├── 7.4.3-4-n.js │ │ │ ├── 7.4.3-5-n.js │ │ │ ├── 7.4.3-6-n.js │ │ │ ├── 7.4.3-7-n.js │ │ │ ├── 7.4.3-8-n.js │ │ │ ├── 7.4.3-9-n.js │ │ │ ├── 7.5-1.js │ │ │ ├── 7.5-10-n.js │ │ │ ├── 7.5-2-n.js │ │ │ ├── 7.5-3-n.js │ │ │ ├── 7.5-4-n.js │ │ │ ├── 7.5-5-n.js │ │ │ ├── 7.5-6.js │ │ │ ├── 7.5-7.js │ │ │ ├── 7.5-8-n.js │ │ │ ├── 7.5-9-n.js │ │ │ ├── 7.6.js │ │ │ ├── 7.7.1.js │ │ │ ├── 7.7.2.js │ │ │ ├── 7.7.3-1.js │ │ │ ├── 7.7.3-2.js │ │ │ ├── 7.7.3.js │ │ │ ├── 7.7.4.js │ │ │ └── 7.8.2-n.js │ │ ├── Math │ │ │ ├── 15.8-1.js │ │ │ ├── 15.8-2-n.js │ │ │ ├── 15.8-3-n.js │ │ │ ├── 15.8.1.1-1.js │ │ │ ├── 15.8.1.1-2.js │ │ │ ├── 15.8.1.2-1.js │ │ │ ├── 15.8.1.2-2.js │ │ │ ├── 15.8.1.3-1.js │ │ │ ├── 15.8.1.3-2.js │ │ │ ├── 15.8.1.4-1.js │ │ │ ├── 15.8.1.4-2.js │ │ │ ├── 15.8.1.5-1.js │ │ │ ├── 15.8.1.5-2.js │ │ │ ├── 15.8.1.6-1.js │ │ │ ├── 15.8.1.6-2.js │ │ │ ├── 15.8.1.7-1.js │ │ │ ├── 15.8.1.7-2.js │ │ │ ├── 15.8.1.8-1.js │ │ │ ├── 15.8.1.8-2.js │ │ │ ├── 15.8.1.8-3.js │ │ │ ├── 15.8.1.js │ │ │ ├── 15.8.2.1.js │ │ │ ├── 15.8.2.10.js │ │ │ ├── 15.8.2.11.js │ │ │ ├── 15.8.2.12.js │ │ │ ├── 15.8.2.13.js │ │ │ ├── 15.8.2.14.js │ │ │ ├── 15.8.2.15.js │ │ │ ├── 15.8.2.16.js │ │ │ ├── 15.8.2.17.js │ │ │ ├── 15.8.2.18.js │ │ │ ├── 15.8.2.2.js │ │ │ ├── 15.8.2.3.js │ │ │ ├── 15.8.2.4.js │ │ │ ├── 15.8.2.5.js │ │ │ ├── 15.8.2.6.js │ │ │ ├── 15.8.2.7.js │ │ │ ├── 15.8.2.8.js │ │ │ └── 15.8.2.9.js │ │ ├── NativeObjects │ │ │ ├── 15-1.js │ │ │ └── 15-2.js │ │ ├── Number │ │ │ ├── 15.7.1.js │ │ │ ├── 15.7.2.js │ │ │ ├── 15.7.3.1-1.js │ │ │ ├── 15.7.3.1-2.js │ │ │ ├── 15.7.3.1-3.js │ │ │ ├── 15.7.3.2-1.js │ │ │ ├── 15.7.3.2-2.js │ │ │ ├── 15.7.3.2-3.js │ │ │ ├── 15.7.3.2-4.js │ │ │ ├── 15.7.3.3-1.js │ │ │ ├── 15.7.3.3-2.js │ │ │ ├── 15.7.3.3-3.js │ │ │ ├── 15.7.3.3-4.js │ │ │ ├── 15.7.3.4-1.js │ │ │ ├── 15.7.3.4-2.js │ │ │ ├── 15.7.3.4-3.js │ │ │ ├── 15.7.3.4-4.js │ │ │ ├── 15.7.3.5-1.js │ │ │ ├── 15.7.3.5-2.js │ │ │ ├── 15.7.3.5-3.js │ │ │ ├── 15.7.3.5-4.js │ │ │ ├── 15.7.3.6-1.js │ │ │ ├── 15.7.3.6-2.js │ │ │ ├── 15.7.3.6-3.js │ │ │ ├── 15.7.3.6-4.js │ │ │ ├── 15.7.3.js │ │ │ ├── 15.7.4-1.js │ │ │ ├── 15.7.4.1.js │ │ │ ├── 15.7.4.2-1.js │ │ │ ├── 15.7.4.2-2-n.js │ │ │ ├── 15.7.4.2-3-n.js │ │ │ ├── 15.7.4.2-4.js │ │ │ ├── 15.7.4.3-1.js │ │ │ ├── 15.7.4.3-2.js │ │ │ ├── 15.7.4.3-3-n.js │ │ │ └── 15.7.4.js │ │ ├── ObjectObjects │ │ │ ├── 15.2.1.1.js │ │ │ ├── 15.2.1.2.js │ │ │ ├── 15.2.2.1.js │ │ │ ├── 15.2.2.2.js │ │ │ ├── 15.2.3-1.js │ │ │ ├── 15.2.3.1-1.js │ │ │ ├── 15.2.3.1-2.js │ │ │ ├── 15.2.3.1-3.js │ │ │ ├── 15.2.3.1-4.js │ │ │ ├── 15.2.3.js │ │ │ ├── 15.2.4.1.js │ │ │ ├── 15.2.4.2.js │ │ │ ├── 15.2.4.3.js │ │ │ └── 15.2.4.js │ │ ├── SourceText │ │ │ ├── 6-1.js │ │ │ └── 6-2.js │ │ ├── Statements │ │ │ ├── 12.10-1.js │ │ │ ├── 12.10.js │ │ │ ├── 12.2-1.js │ │ │ ├── 12.5-1.js │ │ │ ├── 12.5-2.js │ │ │ ├── 12.6.1-1.js │ │ │ ├── 12.6.2-1.js │ │ │ ├── 12.6.2-2.js │ │ │ ├── 12.6.2-3.js │ │ │ ├── 12.6.2-4.js │ │ │ ├── 12.6.2-5.js │ │ │ ├── 12.6.2-6.js │ │ │ ├── 12.6.2-7.js │ │ │ ├── 12.6.2-8.js │ │ │ ├── 12.6.2-9-n.js │ │ │ ├── 12.6.3-1.js │ │ │ ├── 12.6.3-10.js │ │ │ ├── 12.6.3-11.js │ │ │ ├── 12.6.3-12.js │ │ │ ├── 12.6.3-19.js │ │ │ ├── 12.6.3-2.js │ │ │ ├── 12.6.3-3.js │ │ │ ├── 12.6.3-4.js │ │ │ ├── 12.6.3-5-n.js │ │ │ ├── 12.6.3-6-n.js │ │ │ ├── 12.6.3-7-n.js │ │ │ ├── 12.6.3-8-n.js │ │ │ ├── 12.6.3-9-n.js │ │ │ ├── 12.7-1-n.js │ │ │ ├── 12.8-1-n.js │ │ │ └── 12.9-1-n.js │ │ ├── String │ │ │ ├── 15.5.1.js │ │ │ ├── 15.5.2.js │ │ │ ├── 15.5.3.1-1.js │ │ │ ├── 15.5.3.1-2.js │ │ │ ├── 15.5.3.1-3.js │ │ │ ├── 15.5.3.1-4.js │ │ │ ├── 15.5.3.2-1.js │ │ │ ├── 15.5.3.2-2.js │ │ │ ├── 15.5.3.2-3.js │ │ │ ├── 15.5.3.js │ │ │ ├── 15.5.4.1.js │ │ │ ├── 15.5.4.10-1.js │ │ │ ├── 15.5.4.11-1.js │ │ │ ├── 15.5.4.11-2.js │ │ │ ├── 15.5.4.11-3.js │ │ │ ├── 15.5.4.11-4.js │ │ │ ├── 15.5.4.11-5.js │ │ │ ├── 15.5.4.11-6.js │ │ │ ├── 15.5.4.12-1.js │ │ │ ├── 15.5.4.12-2.js │ │ │ ├── 15.5.4.12-3.js │ │ │ ├── 15.5.4.12-4.js │ │ │ ├── 15.5.4.12-5.js │ │ │ ├── 15.5.4.2-1.js │ │ │ ├── 15.5.4.2-2-n.js │ │ │ ├── 15.5.4.2-3.js │ │ │ ├── 15.5.4.2.js │ │ │ ├── 15.5.4.3-1.js │ │ │ ├── 15.5.4.3-2.js │ │ │ ├── 15.5.4.3-3-n.js │ │ │ ├── 15.5.4.4-1.js │ │ │ ├── 15.5.4.4-2.js │ │ │ ├── 15.5.4.4-3.js │ │ │ ├── 15.5.4.4-4.js │ │ │ ├── 15.5.4.5-1.js │ │ │ ├── 15.5.4.5-2.js │ │ │ ├── 15.5.4.5-3.js │ │ │ ├── 15.5.4.5-4.js │ │ │ ├── 15.5.4.5-5.js │ │ │ ├── 15.5.4.5-6.js │ │ │ ├── 15.5.4.6-1.js │ │ │ ├── 15.5.4.6-2.js │ │ │ ├── 15.5.4.7-1.js │ │ │ ├── 15.5.4.7-2.js │ │ │ ├── 15.5.4.7-3.js │ │ │ ├── 15.5.4.8-1.js │ │ │ ├── 15.5.4.8-2.js │ │ │ ├── 15.5.4.8-3.js │ │ │ ├── 15.5.4.9-1.js │ │ │ ├── 15.5.4.js │ │ │ └── 15.5.5.1.js │ │ ├── TypeConversion │ │ │ ├── 9.2.js │ │ │ ├── 9.3-1.js │ │ │ ├── 9.3.1-1.js │ │ │ ├── 9.3.1-2.js │ │ │ ├── 9.3.1-3.js │ │ │ ├── 9.3.js │ │ │ ├── 9.4-1.js │ │ │ ├── 9.4-2.js │ │ │ ├── 9.5-2.js │ │ │ ├── 9.6.js │ │ │ ├── 9.7.js │ │ │ ├── 9.8.1.js │ │ │ └── 9.9-1.js │ │ ├── Types │ │ │ ├── 8.1.js │ │ │ ├── 8.4.js │ │ │ └── 8.6.2.1-1.js │ │ ├── browser.js │ │ ├── jsref.js │ │ └── shell.js │ ├── ecma_2 │ │ ├── Exceptions │ │ │ ├── boolean-001.js │ │ │ ├── boolean-002.js │ │ │ ├── date-001.js │ │ │ ├── date-002.js │ │ │ ├── date-003.js │ │ │ ├── date-004.js │ │ │ ├── exception-001.js │ │ │ ├── exception-002.js │ │ │ ├── exception-003.js │ │ │ ├── exception-004.js │ │ │ ├── exception-005.js │ │ │ ├── exception-006.js │ │ │ ├── exception-007.js │ │ │ ├── exception-008.js │ │ │ ├── exception-009.js │ │ │ ├── exception-010-n.js │ │ │ ├── exception-011-n.js │ │ │ ├── expression-001.js │ │ │ ├── expression-002.js │ │ │ ├── expression-003.js │ │ │ ├── expression-004.js │ │ │ ├── expression-005.js │ │ │ ├── expression-006.js │ │ │ ├── expression-007.js │ │ │ ├── expression-008.js │ │ │ ├── expression-009.js │ │ │ ├── expression-010.js │ │ │ ├── expression-011.js │ │ │ ├── expression-012.js │ │ │ ├── expression-013.js │ │ │ ├── expression-014.js │ │ │ ├── expression-015.js │ │ │ ├── expression-016.js │ │ │ ├── expression-017.js │ │ │ ├── expression-019.js │ │ │ ├── function-001.js │ │ │ ├── global-001.js │ │ │ ├── global-002.js │ │ │ ├── lexical-001.js │ │ │ ├── lexical-002.js │ │ │ ├── lexical-003.js │ │ │ ├── lexical-004.js │ │ │ ├── lexical-005.js │ │ │ ├── lexical-006.js │ │ │ ├── lexical-007.js │ │ │ ├── lexical-008.js │ │ │ ├── lexical-009.js │ │ │ ├── lexical-010.js │ │ │ ├── lexical-011.js │ │ │ ├── lexical-012.js │ │ │ ├── lexical-013.js │ │ │ ├── lexical-014.js │ │ │ ├── lexical-015.js │ │ │ ├── lexical-016.js │ │ │ ├── lexical-017.js │ │ │ ├── lexical-018.js │ │ │ ├── lexical-019.js │ │ │ ├── lexical-020.js │ │ │ ├── lexical-021.js │ │ │ ├── lexical-022.js │ │ │ ├── lexical-023.js │ │ │ ├── lexical-024.js │ │ │ ├── lexical-025.js │ │ │ ├── lexical-026.js │ │ │ ├── lexical-027.js │ │ │ ├── lexical-028.js │ │ │ ├── lexical-029.js │ │ │ ├── lexical-030.js │ │ │ ├── lexical-031.js │ │ │ ├── lexical-032.js │ │ │ ├── lexical-033.js │ │ │ ├── lexical-034.js │ │ │ ├── lexical-035.js │ │ │ ├── lexical-036.js │ │ │ ├── lexical-037.js │ │ │ ├── lexical-038.js │ │ │ ├── lexical-039.js │ │ │ ├── lexical-040.js │ │ │ ├── lexical-041.js │ │ │ ├── lexical-042.js │ │ │ ├── lexical-047.js │ │ │ ├── lexical-048.js │ │ │ ├── lexical-049.js │ │ │ ├── lexical-050.js │ │ │ ├── lexical-051.js │ │ │ ├── lexical-052.js │ │ │ ├── lexical-053.js │ │ │ ├── lexical-054.js │ │ │ ├── number-001.js │ │ │ ├── number-002.js │ │ │ ├── number-003.js │ │ │ ├── statement-001.js │ │ │ ├── statement-002.js │ │ │ ├── statement-003.js │ │ │ ├── statement-004.js │ │ │ ├── statement-005.js │ │ │ ├── statement-006.js │ │ │ ├── statement-007.js │ │ │ ├── statement-008.js │ │ │ ├── statement-009.js │ │ │ ├── string-001.js │ │ │ └── string-002.js │ │ ├── Expressions │ │ │ ├── StrictEquality-001.js │ │ │ ├── instanceof-001.js │ │ │ ├── instanceof-002.js │ │ │ ├── instanceof-003-n.js │ │ │ ├── instanceof-004-n.js │ │ │ ├── instanceof-005-n.js │ │ │ └── instanceof-006.js │ │ ├── FunctionObjects │ │ │ ├── apply-001-n.js │ │ │ └── call-1.js │ │ ├── LexicalConventions │ │ │ ├── keywords-001.js │ │ │ ├── regexp-literals-001.js │ │ │ └── regexp-literals-002.js │ │ ├── RegExp │ │ │ ├── constructor-001.js │ │ │ ├── exec-001.js │ │ │ ├── exec-002.js │ │ │ ├── function-001.js │ │ │ ├── hex-001.js │ │ │ ├── multiline-001.js │ │ │ ├── octal-001.js │ │ │ ├── octal-002.js │ │ │ ├── octal-003.js │ │ │ ├── properties-001.js │ │ │ ├── properties-002.js │ │ │ ├── regexp-enumerate-001.js │ │ │ ├── regress-001.js │ │ │ └── unicode-001.js │ │ ├── Statements │ │ │ ├── dowhile-001.js │ │ │ ├── dowhile-002.js │ │ │ ├── dowhile-003.js │ │ │ ├── dowhile-004.js │ │ │ ├── dowhile-005.js │ │ │ ├── dowhile-006.js │ │ │ ├── dowhile-007.js │ │ │ ├── forin-001.js │ │ │ ├── forin-002.js │ │ │ ├── if-001.js │ │ │ ├── label-001.js │ │ │ ├── label-002.js │ │ │ ├── switch-001.js │ │ │ ├── switch-002.js │ │ │ ├── switch-003.js │ │ │ ├── switch-004.js │ │ │ ├── try-001.js │ │ │ ├── try-003.js │ │ │ ├── try-004.js │ │ │ ├── try-005.js │ │ │ ├── try-006.js │ │ │ ├── try-007.js │ │ │ ├── try-008.js │ │ │ ├── try-009.js │ │ │ ├── try-010.js │ │ │ ├── try-012.js │ │ │ ├── while-001.js │ │ │ ├── while-002.js │ │ │ ├── while-003.js │ │ │ └── while-004.js │ │ ├── String │ │ │ ├── match-001.js │ │ │ ├── match-002.js │ │ │ ├── match-003.js │ │ │ ├── match-004.js │ │ │ ├── replace-001.js │ │ │ ├── split-001.js │ │ │ ├── split-002.js │ │ │ └── split-003.js │ │ ├── browser.js │ │ ├── instanceof │ │ │ ├── instanceof-001.js │ │ │ ├── instanceof-002.js │ │ │ ├── instanceof-003.js │ │ │ └── regress-7635.js │ │ ├── jsref.js │ │ ├── shell.js │ │ └── template.js │ ├── ecma_3 │ │ ├── Array │ │ │ ├── 15.4.4.3-1.js │ │ │ ├── 15.4.4.4-001.js │ │ │ ├── regress-101488.js │ │ │ └── regress-130451.js │ │ ├── Date │ │ │ ├── 15.9.5.3.js │ │ │ ├── 15.9.5.4.js │ │ │ ├── 15.9.5.5.js │ │ │ ├── 15.9.5.6.js │ │ │ ├── 15.9.5.7.js │ │ │ └── shell.js │ │ ├── Exceptions │ │ │ ├── 15.11.1.1.js │ │ │ ├── 15.11.4.4-1.js │ │ │ ├── 15.11.7.6-001.js │ │ │ ├── 15.11.7.6-002.js │ │ │ ├── 15.11.7.6-003.js │ │ │ ├── binding-001.js │ │ │ ├── regress-181654.js │ │ │ ├── regress-181914.js │ │ │ ├── regress-58946.js │ │ │ └── regress-95101.js │ │ ├── ExecutionContexts │ │ │ ├── 10.1.3-1.js │ │ │ ├── 10.1.3-2.js │ │ │ ├── 10.1.3.js │ │ │ ├── 10.1.4-1.js │ │ │ └── regress-23346.js │ │ ├── Expressions │ │ │ ├── 11.6.1-1.js │ │ │ └── 11.9.6-1.js │ │ ├── FunExpr │ │ │ ├── fe-001-n.js │ │ │ ├── fe-001.js │ │ │ └── fe-002.js │ │ ├── Function │ │ │ ├── 15.3.4.3-1.js │ │ │ ├── 15.3.4.4-1.js │ │ │ ├── arguments-001.js │ │ │ ├── call-001.js │ │ │ ├── regress-104584.js │ │ │ ├── regress-131964.js │ │ │ ├── regress-137181.js │ │ │ ├── regress-193555.js │ │ │ ├── regress-49286.js │ │ │ ├── regress-58274.js │ │ │ ├── regress-85880.js │ │ │ ├── regress-94506.js │ │ │ ├── regress-97921.js │ │ │ ├── scope-001.js │ │ │ └── scope-002.js │ │ ├── Number │ │ │ ├── 15.7.4.5-1.js │ │ │ ├── 15.7.4.6-1.js │ │ │ └── 15.7.4.7-1.js │ │ ├── NumberFormatting │ │ │ └── tostring-001.js │ │ ├── Object │ │ │ ├── 8.6.2.6-001.js │ │ │ ├── class-001.js │ │ │ ├── class-002.js │ │ │ ├── class-003.js │ │ │ ├── class-004.js │ │ │ ├── class-005.js │ │ │ ├── regress-72773.js │ │ │ ├── regress-79129-001.js │ │ │ └── shell.js │ │ ├── Operators │ │ │ ├── 11.13.1-001.js │ │ │ └── 11.4.1-001.js │ │ ├── RegExp │ │ │ ├── 15.10.2-1.js │ │ │ ├── 15.10.3.1-1.js │ │ │ ├── 15.10.3.1-2.js │ │ │ ├── 15.10.4.1-1.js │ │ │ ├── 15.10.4.1-2.js │ │ │ ├── 15.10.4.1-3.js │ │ │ ├── 15.10.4.1-4.js │ │ │ ├── 15.10.4.1-5-n.js │ │ │ ├── 15.10.6.2-1.js │ │ │ ├── 15.10.6.2-2.js │ │ │ ├── octal-001.js │ │ │ ├── octal-002.js │ │ │ ├── perlstress-001.js │ │ │ ├── perlstress-002.js │ │ │ ├── regress-100199.js │ │ │ ├── regress-103087.js │ │ │ ├── regress-105972.js │ │ │ ├── regress-119909.js │ │ │ ├── regress-122076.js │ │ │ ├── regress-123437.js │ │ │ ├── regress-165353.js │ │ │ ├── regress-169497.js │ │ │ ├── regress-169534.js │ │ │ ├── regress-187133.js │ │ │ ├── regress-188206.js │ │ │ ├── regress-191479.js │ │ │ ├── regress-202564.js │ │ │ ├── regress-209067.js │ │ │ ├── regress-209919.js │ │ │ ├── regress-216591.js │ │ │ ├── regress-220367-001.js │ │ │ ├── regress-220367-002.js │ │ │ ├── regress-24712.js │ │ │ ├── regress-28686.js │ │ │ ├── regress-31316.js │ │ │ ├── regress-57572.js │ │ │ ├── regress-57631.js │ │ │ ├── regress-67773.js │ │ │ ├── regress-72964.js │ │ │ ├── regress-76683.js │ │ │ ├── regress-78156.js │ │ │ ├── regress-85721.js │ │ │ ├── regress-87231.js │ │ │ ├── regress-98306.js │ │ │ └── shell.js │ │ ├── Statements │ │ │ ├── regress-121744.js │ │ │ ├── regress-131348.js │ │ │ ├── regress-157509.js │ │ │ ├── regress-194364.js │ │ │ ├── regress-74474-001.js │ │ │ ├── regress-74474-002.js │ │ │ ├── regress-74474-003.js │ │ │ ├── regress-83532-001.js │ │ │ ├── regress-83532-002.js │ │ │ └── switch-001.js │ │ ├── String │ │ │ ├── regress-104375.js │ │ │ ├── regress-189898.js │ │ │ └── regress-83293.js │ │ ├── Unicode │ │ │ ├── uc-001-n.js │ │ │ ├── uc-001.js │ │ │ ├── uc-002-n.js │ │ │ ├── uc-002.js │ │ │ ├── uc-003.js │ │ │ ├── uc-004.js │ │ │ └── uc-005.js │ │ └── shell.js │ ├── expected.html │ ├── importList.html │ ├── js1_1 │ │ ├── browser.js │ │ ├── jsref.js │ │ ├── regress │ │ │ └── function-001.js │ │ └── shell.js │ ├── js1_2 │ │ ├── Array │ │ │ ├── array_split_1.js │ │ │ ├── general1.js │ │ │ ├── general2.js │ │ │ ├── slice.js │ │ │ ├── splice1.js │ │ │ ├── splice2.js │ │ │ ├── tostring_1.js │ │ │ └── tostring_2.js │ │ ├── Objects │ │ │ └── toString-001.js │ │ ├── String │ │ │ ├── charCodeAt.js │ │ │ ├── concat.js │ │ │ ├── match.js │ │ │ └── slice.js │ │ ├── browser.js │ │ ├── function │ │ │ ├── Function_object.js │ │ │ ├── Number.js │ │ │ ├── String.js │ │ │ ├── definition-1.js │ │ │ ├── function-001-n.js │ │ │ ├── length.js │ │ │ ├── nesting-1.js │ │ │ ├── nesting.js │ │ │ ├── regexparg-1.js │ │ │ ├── regexparg-2-n.js │ │ │ ├── tostring-1.js │ │ │ └── tostring-2.js │ │ ├── jsref.js │ │ ├── operator │ │ │ ├── equality.js │ │ │ └── strictEquality.js │ │ ├── regexp │ │ │ ├── RegExp_dollar_number.js │ │ │ ├── RegExp_input.js │ │ │ ├── RegExp_input_as_array.js │ │ │ ├── RegExp_lastIndex.js │ │ │ ├── RegExp_lastMatch.js │ │ │ ├── RegExp_lastMatch_as_array.js │ │ │ ├── RegExp_lastParen.js │ │ │ ├── RegExp_lastParen_as_array.js │ │ │ ├── RegExp_leftContext.js │ │ │ ├── RegExp_leftContext_as_array.js │ │ │ ├── RegExp_multiline.js │ │ │ ├── RegExp_multiline_as_array.js │ │ │ ├── RegExp_object.js │ │ │ ├── RegExp_rightContext.js │ │ │ ├── RegExp_rightContext_as_array.js │ │ │ ├── alphanumeric.js │ │ │ ├── asterisk.js │ │ │ ├── backslash.js │ │ │ ├── backspace.js │ │ │ ├── beginLine.js │ │ │ ├── character_class.js │ │ │ ├── compile.js │ │ │ ├── control_characters.js │ │ │ ├── digit.js │ │ │ ├── dot.js │ │ │ ├── endLine.js │ │ │ ├── everything.js │ │ │ ├── exec.js │ │ │ ├── flags.js │ │ │ ├── global.js │ │ │ ├── hexadecimal.js │ │ │ ├── ignoreCase.js │ │ │ ├── interval.js │ │ │ ├── octal.js │ │ │ ├── parentheses.js │ │ │ ├── plus.js │ │ │ ├── question_mark.js │ │ │ ├── regress-6359.js │ │ │ ├── regress-9141.js │ │ │ ├── simple_form.js │ │ │ ├── source.js │ │ │ ├── special_characters.js │ │ │ ├── string_replace.js │ │ │ ├── string_search.js │ │ │ ├── string_split.js │ │ │ ├── test.js │ │ │ ├── toString.js │ │ │ ├── vertical_bar.js │ │ │ ├── whitespace.js │ │ │ └── word_boundary.js │ │ ├── regress │ │ │ ├── regress-144834.js │ │ │ └── regress-7703.js │ │ ├── shell.js │ │ ├── statements │ │ │ ├── break.js │ │ │ ├── continue.js │ │ │ ├── do_while.js │ │ │ ├── switch.js │ │ │ └── switch2.js │ │ └── version120 │ │ │ ├── boolean-001.js │ │ │ ├── regress-99663.js │ │ │ └── shell.js │ ├── js1_3 │ │ ├── Boolean │ │ │ └── boolean-001.js │ │ ├── Script │ │ │ ├── delete-001.js │ │ │ ├── function-001-n.js │ │ │ ├── function-002.js │ │ │ ├── in-001.js │ │ │ ├── new-001.js │ │ │ ├── script-001.js │ │ │ └── switch-001.js │ │ ├── inherit │ │ │ ├── proto_1.js │ │ │ ├── proto_10.js │ │ │ ├── proto_11.js │ │ │ ├── proto_12.js │ │ │ ├── proto_2.js │ │ │ ├── proto_3.js │ │ │ ├── proto_4.js │ │ │ ├── proto_5.js │ │ │ ├── proto_6.js │ │ │ ├── proto_7.js │ │ │ ├── proto_8.js │ │ │ └── proto_9.js │ │ ├── jsref.js │ │ ├── regress │ │ │ ├── delete-001.js │ │ │ ├── function-001-n.js │ │ │ ├── function-002.js │ │ │ ├── in-001.js │ │ │ ├── new-001.js │ │ │ └── switch-001.js │ │ ├── shell.js │ │ └── template.js │ ├── js1_4 │ │ ├── Eval │ │ │ ├── eval-001.js │ │ │ ├── eval-002.js │ │ │ └── eval-003.js │ │ ├── Functions │ │ │ └── function-001.js │ │ ├── Regress │ │ │ ├── date-001-n.js │ │ │ ├── function-001.js │ │ │ ├── function-002.js │ │ │ ├── function-003.js │ │ │ ├── function-004-n.js │ │ │ ├── regress-7224.js │ │ │ └── toString-001-n.js │ │ ├── browser.js │ │ ├── jsref.js │ │ └── shell.js │ ├── js1_5 │ │ ├── Array │ │ │ ├── array-001.js │ │ │ ├── regress-101964.js │ │ │ ├── regress-107138.js │ │ │ ├── regress-108440.js │ │ │ ├── regress-154338.js │ │ │ ├── regress-157652.js │ │ │ ├── regress-178722.js │ │ │ └── regress-94257.js │ │ ├── Exceptions │ │ │ ├── catchguard-001-n.js │ │ │ ├── catchguard-001.js │ │ │ ├── catchguard-002-n.js │ │ │ ├── catchguard-002.js │ │ │ ├── catchguard-003-n.js │ │ │ ├── catchguard-003.js │ │ │ ├── errstack-001.js │ │ │ ├── regress-121658.js │ │ │ ├── regress-123002.js │ │ │ └── regress-50447.js │ │ ├── Expressions │ │ │ ├── regress-192288.js │ │ │ ├── regress-96526-argsub.js │ │ │ ├── regress-96526-delelem.js │ │ │ ├── regress-96526-noargsub.js │ │ │ └── shell.js │ │ ├── GetSet │ │ │ ├── getset-001.js │ │ │ ├── getset-002.js │ │ │ ├── getset-003.js │ │ │ ├── getset-004.js │ │ │ ├── getset-005.js │ │ │ └── getset-006.js │ │ ├── LexicalConventions │ │ │ ├── lexical-001.js │ │ │ └── regress-177314.js │ │ ├── Object │ │ │ ├── regress-137000.js │ │ │ ├── regress-192105.js │ │ │ ├── regress-90596-001.js │ │ │ ├── regress-90596-002.js │ │ │ ├── regress-90596-003.js │ │ │ ├── regress-96284-001.js │ │ │ └── regress-96284-002.js │ │ ├── Regress │ │ │ ├── regress-102725.js │ │ │ ├── regress-103602.js │ │ │ ├── regress-104077.js │ │ │ ├── regress-110286.js │ │ │ ├── regress-111557.js │ │ │ ├── regress-114491.js │ │ │ ├── regress-114493.js │ │ │ ├── regress-118849.js │ │ │ ├── regress-127557.js │ │ │ ├── regress-131510-001.js │ │ │ ├── regress-140974.js │ │ │ ├── regress-146596.js │ │ │ ├── regress-152646.js │ │ │ ├── regress-156354.js │ │ │ ├── regress-159334.js │ │ │ ├── regress-168347.js │ │ │ ├── regress-170193.js │ │ │ ├── regress-172699.js │ │ │ ├── regress-179524.js │ │ │ ├── regress-185165.js │ │ │ ├── regress-191633.js │ │ │ ├── regress-191668.js │ │ │ ├── regress-192414.js │ │ │ ├── regress-192465.js │ │ │ ├── regress-193418.js │ │ │ ├── regress-203402.js │ │ │ ├── regress-203841.js │ │ │ ├── regress-204210.js │ │ │ ├── regress-210682.js │ │ │ ├── regress-216320.js │ │ │ ├── regress-31255.js │ │ │ ├── regress-39309.js │ │ │ ├── regress-44009.js │ │ │ ├── regress-57043.js │ │ │ ├── regress-68498-001.js │ │ │ ├── regress-68498-002.js │ │ │ ├── regress-68498-003.js │ │ │ ├── regress-68498-004.js │ │ │ ├── regress-69607.js │ │ │ ├── regress-71107.js │ │ │ ├── regress-76054.js │ │ │ ├── regress-80981.js │ │ │ ├── regress-82306.js │ │ │ ├── regress-89443.js │ │ │ ├── regress-89474.js │ │ │ ├── regress-90445.js │ │ │ ├── regress-96128-n.js │ │ │ ├── regress-96526-001.js │ │ │ ├── regress-96526-002.js │ │ │ └── regress-96526-003.js │ │ ├── Scope │ │ │ ├── regress-154693.js │ │ │ ├── regress-181834.js │ │ │ ├── regress-184107.js │ │ │ ├── regress-185485.js │ │ │ ├── regress-191276.js │ │ │ ├── regress-192226.js │ │ │ ├── regress-202678-001.js │ │ │ ├── regress-202678-002.js │ │ │ ├── regress-208496-001.js │ │ │ ├── regress-208496-002.js │ │ │ ├── regress-220362.js │ │ │ ├── regress-220584.js │ │ │ ├── regress-77578-001.js │ │ │ ├── scope-001.js │ │ │ ├── scope-002.js │ │ │ ├── scope-003.js │ │ │ └── scope-004.js │ │ ├── String │ │ │ ├── regress-107771.js │ │ │ └── regress-179068.js │ │ └── shell.js │ ├── js1_6 │ │ ├── Array │ │ │ ├── browser.js │ │ │ ├── regress-290592.js │ │ │ ├── regress-304828.js │ │ │ ├── regress-305002.js │ │ │ ├── regress-310425-01.js │ │ │ ├── regress-310425-02.js │ │ │ ├── regress-320887.js │ │ │ └── shell.js │ │ ├── README │ │ ├── Regress │ │ │ ├── browser.js │ │ │ ├── regress-301574.js │ │ │ ├── regress-309242.js │ │ │ ├── regress-311157-01.js │ │ │ ├── regress-311157-02.js │ │ │ ├── regress-314887.js │ │ │ ├── regress-320172.js │ │ │ └── shell.js │ │ ├── String │ │ │ ├── browser.js │ │ │ ├── regress-306591.js │ │ │ └── shell.js │ │ ├── browser.js │ │ ├── shell.js │ │ └── template.js │ ├── jsDriver.pl │ ├── menufoot.html │ ├── menuhead.html │ ├── mkhtml.pl │ ├── mklistpage.pl │ ├── runtests.pl │ └── template.js └── perf │ ├── bench-allocate-nonretained.js │ └── bench-allocate-retained.js ├── wscript ├── wtf ├── ASCIICType.h ├── AVLTree.h ├── AlwaysInline.h ├── Assertions.cpp ├── Assertions.h ├── Atomics.h ├── ByteArray.cpp ├── ByteArray.h ├── CONTRIBUTORS.pthreads-win32 ├── Complex.h ├── CrossThreadRefCounted.h ├── CurrentTime.cpp ├── CurrentTime.h ├── DateMath.cpp ├── DateMath.h ├── Deque.h ├── DisallowCType.h ├── FastAllocBase.h ├── FastMalloc.cpp ├── FastMalloc.h ├── Forward.h ├── GetPtr.h ├── HashCountedSet.h ├── HashFunctions.h ├── HashIterators.h ├── HashMap.h ├── HashSet.h ├── HashTable.cpp ├── HashTable.h ├── HashTraits.h ├── ListHashSet.h ├── ListRefPtr.h ├── Locker.h ├── MD5.cpp ├── MD5.h ├── MainThread.cpp ├── MainThread.h ├── MallocZoneSupport.h ├── MathExtras.h ├── MessageQueue.h ├── Noncopyable.h ├── NotFound.h ├── OwnArrayPtr.h ├── OwnFastMallocPtr.h ├── OwnPtr.h ├── OwnPtrCommon.h ├── PassOwnPtr.h ├── PassRefPtr.h ├── Platform.h ├── PossiblyNull.h ├── RandomNumber.cpp ├── RandomNumber.h ├── RandomNumberSeed.h ├── RefCounted.h ├── RefCountedLeakCounter.cpp ├── RefCountedLeakCounter.h ├── RefPtr.h ├── RefPtrHashMap.h ├── RetainPtr.h ├── SegmentedVector.h ├── StaticConstructors.h ├── StdLibExtras.h ├── StringExtras.cpp ├── StringExtras.h ├── StringHashFunctions.h ├── TCPackedCache.h ├── TCPageMap.h ├── TCSpinLock.h ├── TCSystemAlloc.cpp ├── TCSystemAlloc.h ├── ThreadIdentifierDataPthreads.cpp ├── ThreadIdentifierDataPthreads.h ├── ThreadSafeShared.h ├── ThreadSpecific.h ├── ThreadSpecificWin.cpp ├── Threading.cpp ├── Threading.h ├── ThreadingNone.cpp ├── ThreadingPrimitives.h ├── ThreadingPthreads.cpp ├── ThreadingWin.cpp ├── TypeTraits.cpp ├── TypeTraits.h ├── UnusedParam.h ├── VMTags.h ├── ValueCheck.h ├── Vector.h ├── Vector3.h ├── VectorTraits.h ├── WTFThreadData.cpp ├── WTFThreadData.h ├── android │ ├── AndroidThreading.h │ └── MainThreadAndroid.cpp ├── brew │ ├── MainThreadBrew.cpp │ ├── OwnPtrBrew.cpp │ ├── ShellBrew.h │ └── SystemMallocBrew.h ├── chromium │ ├── ChromiumThreading.h │ └── MainThreadChromium.cpp ├── dtoa.cpp ├── dtoa.h ├── efl │ └── MainThreadEfl.cpp ├── gobject │ ├── GOwnPtr.cpp │ ├── GOwnPtr.h │ ├── GRefPtr.cpp │ └── GRefPtr.h ├── gtk │ ├── MainThreadGtk.cpp │ └── ThreadingGtk.cpp ├── haiku │ └── MainThreadHaiku.cpp ├── iphone │ ├── WebCoreThread.cpp │ └── WebCoreThread.h ├── mac │ └── MainThreadMac.mm ├── qt │ ├── MainThreadQt.cpp │ ├── StringQt.cpp │ └── ThreadingQt.cpp ├── symbian │ ├── BlockAllocatorSymbian.cpp │ └── BlockAllocatorSymbian.h ├── text │ ├── AtomicString.cpp │ ├── AtomicString.h │ ├── AtomicStringImpl.h │ ├── CString.cpp │ ├── CString.h │ ├── StringBuffer.h │ ├── StringHash.h │ ├── StringImpl.cpp │ ├── StringImpl.h │ ├── StringImplBase.h │ ├── StringStatics.cpp │ ├── WTFString.cpp │ └── WTFString.h ├── unicode │ ├── Collator.h │ ├── CollatorDefault.cpp │ ├── UTF8.cpp │ ├── UTF8.h │ ├── Unicode.h │ ├── glib │ │ ├── UnicodeGLib.cpp │ │ ├── UnicodeGLib.h │ │ └── UnicodeMacrosFromICU.h │ ├── icu │ │ ├── CollatorICU.cpp │ │ └── UnicodeIcu.h │ ├── qt4 │ │ └── UnicodeQt4.h │ └── wince │ │ ├── UnicodeWince.cpp │ │ └── UnicodeWince.h ├── url │ ├── src │ │ ├── URLComponent.h │ │ ├── URLSegments.cpp │ │ └── URLSegments.h │ └── wtfurl.gyp ├── win │ ├── MainThreadWin.cpp │ └── OwnPtrWin.cpp ├── wince │ ├── FastMallocWince.h │ ├── MemoryManager.cpp │ ├── MemoryManager.h │ └── mt19937ar.c └── wx │ └── MainThreadWx.cpp └── yarr ├── RegexCompiler.cpp ├── RegexCompiler.h ├── RegexInterpreter.cpp ├── RegexInterpreter.h ├── RegexJIT.cpp ├── RegexJIT.h ├── RegexParser.h └── RegexPattern.h /API/tests/minidom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

 8 | 
 9 | 
10 | 


--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | Harri Porten (porten@kde.org)
2 | Peter Kelly (pmk@post.com)
3 | 


--------------------------------------------------------------------------------
/AllInOneFile.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/AllInOneFile.cpp


--------------------------------------------------------------------------------
/DerivedSources/JavaScriptCore/JSONObject.lut.h:
--------------------------------------------------------------------------------
 1 | // Automatically generated from ../../runtime/JSONObject.cpp using ../../create_hash_table. DO NOT EDIT!
 2 | 
 3 | #include "Lookup.h"
 4 | 
 5 | namespace JSC {
 6 | #if ENABLE(JIT)
 7 | #define THUNK_GENERATOR(generator) , generator
 8 | #else
 9 | #define THUNK_GENERATOR(generator)
10 | #endif
11 | 
12 | static const struct HashTableValue jsonTableValues[3] = {
13 |    { "parse", DontEnum|Function, (intptr_t)static_cast(JSONProtoFuncParse), (intptr_t)1 THUNK_GENERATOR(0) },
14 |    { "stringify", DontEnum|Function, (intptr_t)static_cast(JSONProtoFuncStringify), (intptr_t)1 THUNK_GENERATOR(0) },
15 |    { 0, 0, 0, 0 THUNK_GENERATOR(0) }
16 | };
17 | 
18 | #undef THUNK_GENERATOR
19 | extern JSC_CONST_HASHTABLE HashTable jsonTable =
20 |     { 4, 3, jsonTableValues, 0 };
21 | } // namespace
22 | 


--------------------------------------------------------------------------------
/DerivedSources/JavaScriptCore/NumberConstructor.lut.h:
--------------------------------------------------------------------------------
 1 | // Automatically generated from ../../runtime/NumberConstructor.cpp using ../../create_hash_table. DO NOT EDIT!
 2 | 
 3 | #include "Lookup.h"
 4 | 
 5 | namespace JSC {
 6 | #if ENABLE(JIT)
 7 | #define THUNK_GENERATOR(generator) , generator
 8 | #else
 9 | #define THUNK_GENERATOR(generator)
10 | #endif
11 | 
12 | static const struct HashTableValue numberTableValues[6] = {
13 |    { "NaN", DontEnum|DontDelete|ReadOnly, (intptr_t)static_cast(numberConstructorNaNValue), (intptr_t)0 THUNK_GENERATOR(0) },
14 |    { "NEGATIVE_INFINITY", DontEnum|DontDelete|ReadOnly, (intptr_t)static_cast(numberConstructorNegInfinity), (intptr_t)0 THUNK_GENERATOR(0) },
15 |    { "POSITIVE_INFINITY", DontEnum|DontDelete|ReadOnly, (intptr_t)static_cast(numberConstructorPosInfinity), (intptr_t)0 THUNK_GENERATOR(0) },
16 |    { "MAX_VALUE", DontEnum|DontDelete|ReadOnly, (intptr_t)static_cast(numberConstructorMaxValue), (intptr_t)0 THUNK_GENERATOR(0) },
17 |    { "MIN_VALUE", DontEnum|DontDelete|ReadOnly, (intptr_t)static_cast(numberConstructorMinValue), (intptr_t)0 THUNK_GENERATOR(0) },
18 |    { 0, 0, 0, 0 THUNK_GENERATOR(0) }
19 | };
20 | 
21 | #undef THUNK_GENERATOR
22 | extern JSC_CONST_HASHTABLE HashTable numberTable =
23 |     { 16, 15, numberTableValues, 0 };
24 | } // namespace
25 | 


--------------------------------------------------------------------------------
/DerivedSources/JavaScriptCore/RegExpObject.lut.h:
--------------------------------------------------------------------------------
 1 | // Automatically generated from ../../runtime/RegExpObject.cpp using ../../create_hash_table. DO NOT EDIT!
 2 | 
 3 | #include "Lookup.h"
 4 | 
 5 | namespace JSC {
 6 | #if ENABLE(JIT)
 7 | #define THUNK_GENERATOR(generator) , generator
 8 | #else
 9 | #define THUNK_GENERATOR(generator)
10 | #endif
11 | 
12 | static const struct HashTableValue regExpTableValues[6] = {
13 |    { "global", DontDelete|ReadOnly|DontEnum, (intptr_t)static_cast(regExpObjectGlobal), (intptr_t)0 THUNK_GENERATOR(0) },
14 |    { "ignoreCase", DontDelete|ReadOnly|DontEnum, (intptr_t)static_cast(regExpObjectIgnoreCase), (intptr_t)0 THUNK_GENERATOR(0) },
15 |    { "multiline", DontDelete|ReadOnly|DontEnum, (intptr_t)static_cast(regExpObjectMultiline), (intptr_t)0 THUNK_GENERATOR(0) },
16 |    { "source", DontDelete|ReadOnly|DontEnum, (intptr_t)static_cast(regExpObjectSource), (intptr_t)0 THUNK_GENERATOR(0) },
17 |    { "lastIndex", DontDelete|DontEnum, (intptr_t)static_cast(regExpObjectLastIndex), (intptr_t)setRegExpObjectLastIndex THUNK_GENERATOR(0) },
18 |    { 0, 0, 0, 0 THUNK_GENERATOR(0) }
19 | };
20 | 
21 | #undef THUNK_GENERATOR
22 | extern JSC_CONST_HASHTABLE HashTable regExpTable =
23 |     { 17, 15, regExpTableValues, 0 };
24 | } // namespace
25 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/APICast.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JSBase.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JSContextRef.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JSObjectRef.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JSRetainPtr.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JSStringRef.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JSStringRefCF.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JSValueRef.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JavaScript.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/JavaScriptCore.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/OpaqueJSString.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/ForwardingHeaders/JavaScriptCore/WebKitAvailability.h:
--------------------------------------------------------------------------------
1 | #include 
2 | 


--------------------------------------------------------------------------------
/Info.plist:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 
 5 | 	CFBundleDevelopmentRegion
 6 | 	English
 7 | 	CFBundleExecutable
 8 | 	${PRODUCT_NAME}
 9 | 	CFBundleGetInfoString
10 | 	${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies.
11 | 	CFBundleIdentifier
12 | 	com.apple.${PRODUCT_NAME}
13 | 	CFBundleInfoDictionaryVersion
14 | 	6.0
15 | 	CFBundleName
16 | 	${PRODUCT_NAME}
17 | 	CFBundlePackageType
18 | 	FMWK
19 | 	CFBundleShortVersionString
20 | 	${SHORT_VERSION_STRING}
21 | 	CFBundleVersion
22 | 	${BUNDLE_VERSION}
23 | 
24 | 
25 | 


--------------------------------------------------------------------------------
/JavaScriptCore/JavaScriptCore_Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project.
3 | //
4 | 
5 | #ifdef __OBJC__
6 |     #import 
7 | #endif
8 | 


--------------------------------------------------------------------------------
/JavaScriptCorePrefix.h:
--------------------------------------------------------------------------------
 1 | #ifdef __cplusplus
 2 | #define NULL __null
 3 | #else
 4 | #define NULL ((void *)0)
 5 | #endif
 6 | 
 7 | #include 
 8 | #include 
 9 | #include 
10 | #include 
11 | #include 
12 | #include 
13 | #include 
14 | #include 
15 | #include 
16 | #include 
17 | #include 
18 | #include 
19 | #include 
20 | 
21 | #ifdef __cplusplus
22 | 
23 | #include 
24 | #include 
25 | 
26 | #endif
27 | 
28 | #ifdef __cplusplus
29 | #define new ("if you use new/delete make sure to include config.h at the top of the file"()) 
30 | #define delete ("if you use new/delete make sure to include config.h at the top of the file"()) 
31 | #endif
32 | 
33 | /* Work around bug with C++ library that screws up Objective-C++ when exception support is disabled. */
34 | #undef try
35 | #undef catch
36 | 


--------------------------------------------------------------------------------
/JavaScriptCoreSources.bkl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/JavaScriptCoreSources.bkl


--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | OTHER_OPTIONS = -target All
2 | include ../Makefile.shared
3 | 


--------------------------------------------------------------------------------
/THANKS:
--------------------------------------------------------------------------------
1 | 
2 | I would like to thank the following people for their help:
3 | 
4 | Richard Moore  - for filling the Math object with some life
5 | Daegeun Lee  - for pointing out some bugs and providing
6 |                                   much code for the String and Date object.
7 | Marco Pinelli  - for his patches
8 | Christian Kirsch  - for his contribution to the Date object
9 | 


--------------------------------------------------------------------------------
/docs/make-bytecode-docs.pl:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/perl -w
 2 | 
 3 | use strict;
 4 | 
 5 | open MACHINE, "<" . $ARGV[0];
 6 | open OUTPUT, ">" . $ARGV[1];
 7 | 
 8 | my @undocumented = ();
 9 | 
10 | print OUTPUT "\n";
11 | 
12 | while () {
13 |     if (/^ *DEFINE_OPCODE/) {
14 |         chomp;
15 |         s/^ *DEFINE_OPCODE\(op_//;
16 |         s/\).*$//;
17 |         my $opcode = $_;
18 |         $_ = ;
19 |         chomp;
20 |         if (m|/\* |) {
21 |             my $format = $_;
22 |             $format =~ s|.* /\* ||;
23 |             my $doc = "";
24 |             while () {
25 |                 if (m|\*/|) {
26 |                     last;
27 |                 }
28 |                 $doc .= $_ . " ";
29 |             }
30 | 
31 |             print OUTPUT "

${opcode}

\n

Format: \n${format}\n

\n

\n${doc}\n

\n"; 32 | } else { 33 | push @undocumented, $opcode; 34 | } 35 | } 36 | } 37 | 38 | close OUTPUT; 39 | 40 | for my $undoc (@undocumented) { 41 | print "UNDOCUMENTED: ${undoc}\n"; 42 | } 43 | -------------------------------------------------------------------------------- /headers.pri: -------------------------------------------------------------------------------- 1 | JS_API_HEADERS += \ 2 | JSBase.h \ 3 | JSContextRef.h \ 4 | JSObjectRef.h \ 5 | JSStringRef.h \ 6 | JSStringRefCF.h \ 7 | JSStringRefBSTR.h \ 8 | JSValueRef.h \ 9 | JavaScriptCore.h 10 | -------------------------------------------------------------------------------- /icu/README: -------------------------------------------------------------------------------- 1 | The headers in this directory are for compiling on Mac OS X 10.4. 2 | The Mac OS X 10.4 release includes the ICU binary, but not ICU headers. 3 | For other platforms, installed ICU headers should be used rather than these. 4 | They are specific to Mac OS X 10.4. 5 | -------------------------------------------------------------------------------- /icu/unicode/ucol.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/icu/unicode/ucol.h -------------------------------------------------------------------------------- /icu/unicode/utf_old.h: -------------------------------------------------------------------------------- 1 | /* This file is intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /jsc.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = jsc 3 | DESTDIR = . 4 | SOURCES = jsc.cpp 5 | QT -= gui 6 | CONFIG -= app_bundle 7 | CONFIG += building-libs 8 | win32-*: CONFIG += console 9 | win32-msvc*: CONFIG += exceptions_off stl_off 10 | 11 | isEmpty(OUTPUT_DIR): OUTPUT_DIR= .. 12 | include($$PWD/../WebKit.pri) 13 | 14 | CONFIG += link_pkgconfig 15 | 16 | QMAKE_RPATHDIR += $$OUTPUT_DIR/lib 17 | 18 | CONFIG(debug, debug|release) { 19 | OBJECTS_DIR = obj/debug 20 | } else { # Release 21 | OBJECTS_DIR = obj/release 22 | } 23 | OBJECTS_DIR_WTR = $$OBJECTS_DIR$${QMAKE_DIR_SEP} 24 | include($$PWD/JavaScriptCore.pri) 25 | addJavaScriptCoreLib(.) 26 | 27 | symbian { 28 | TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices 29 | } 30 | 31 | mac { 32 | LIBS_PRIVATE += -framework AppKit 33 | } -------------------------------------------------------------------------------- /jscore.bkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/jscore.bkl -------------------------------------------------------------------------------- /make-generated-sources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export SRCROOT=$PWD 4 | export WebCore=$PWD 5 | export CREATE_HASH_TABLE="$SRCROOT/create_hash_table" 6 | export CREATE_REGEXP_TABLES="$SRCROOT/create_regex_tables" 7 | 8 | mkdir -p DerivedSources/JavaScriptCore 9 | cd DerivedSources/JavaScriptCore 10 | 11 | make -f ../../DerivedSources.make JavaScriptCore=../.. BUILT_PRODUCTS_DIR=../.. 12 | cd ../.. 13 | -------------------------------------------------------------------------------- /os-win32/stdbool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005, 2006 Apple Computer, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef STDBOOL_WIN32_H 22 | #define STDBOOL_WIN32_H 23 | 24 | #if !COMPILER(MSVC) 25 | #error "This stdbool.h file should only be compiled with MSVC" 26 | #endif 27 | 28 | #ifndef __cplusplus 29 | 30 | typedef unsigned char bool; 31 | 32 | #define true 1 33 | #define false 0 34 | 35 | #ifndef CASSERT 36 | #define CASSERT(exp, name) typedef int dummy##name [(exp) ? 1 : -1]; 37 | #endif 38 | 39 | CASSERT(sizeof(bool) == 1, bool_is_one_byte) 40 | CASSERT(true, true_is_true) 41 | CASSERT(!false, false_is_false) 42 | 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /pcre/AUTHORS: -------------------------------------------------------------------------------- 1 | Originally written by: Philip Hazel 2 | Email local part: ph10 3 | Email domain: cam.ac.uk 4 | 5 | University of Cambridge Computing Service, 6 | Cambridge, England. Phone: +44 1223 334714. 7 | 8 | Copyright (c) 1997-2005 University of Cambridge. All rights reserved. 9 | 10 | Adapted for JavaScriptCore and WebKit by Apple Inc. 11 | 12 | Copyright (c) 2005, 2006, 2007 Apple Inc. All rights reserved. 13 | -------------------------------------------------------------------------------- /pcre/pcre.pri: -------------------------------------------------------------------------------- 1 | # Perl Compatible Regular Expressions - Qt4 build info 2 | VPATH += $$PWD 3 | INCLUDEPATH += $$PWD $$OUTPUT_DIR/JavaScriptCore/tmp 4 | DEPENDPATH += $$PWD 5 | 6 | SOURCES += \ 7 | pcre_compile.cpp \ 8 | pcre_exec.cpp \ 9 | pcre_tables.cpp \ 10 | pcre_ucp_searchfuncs.cpp \ 11 | pcre_xclass.cpp 12 | 13 | -------------------------------------------------------------------------------- /qt/api/QtScript.pro: -------------------------------------------------------------------------------- 1 | TARGET = QtScript 2 | TEMPLATE = lib 3 | QT = core 4 | 5 | INCLUDEPATH += $$PWD 6 | 7 | CONFIG += building-libs 8 | 9 | isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = ../../generated 10 | CONFIG(debug, debug|release) { 11 | OBJECTS_DIR = obj/debug 12 | } else { # Release 13 | OBJECTS_DIR = obj/release 14 | } 15 | 16 | isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../.. 17 | include($$PWD/../../../WebKit.pri) 18 | 19 | include($$PWD/../../JavaScriptCore.pri) 20 | addJavaScriptCoreLib(../..) 21 | 22 | INCLUDEPATH += $$PWD/../../API 23 | 24 | SOURCES += $$PWD/qscriptengine.cpp \ 25 | $$PWD/qscriptengine_p.cpp \ 26 | $$PWD/qscriptvalue.cpp \ 27 | $$PWD/qscriptstring.cpp \ 28 | $$PWD/qscriptprogram.cpp \ 29 | $$PWD/qscriptsyntaxcheckresult.cpp \ 30 | 31 | HEADERS += $$PWD/qtscriptglobal.h \ 32 | $$PWD/qscriptengine.h \ 33 | $$PWD/qscriptengine_p.h \ 34 | $$PWD/qscriptvalue.h \ 35 | $$PWD/qscriptvalue_p.h \ 36 | $$PWD/qscriptconverter_p.h \ 37 | $$PWD/qscriptstring.h \ 38 | $$PWD/qscriptstring_p.h \ 39 | $$PWD/qscriptprogram.h \ 40 | $$PWD/qscriptprogram_p.h \ 41 | $$PWD/qscriptsyntaxcheckresult.h \ 42 | 43 | 44 | !static: DEFINES += QT_MAKEDLL 45 | 46 | DESTDIR = $$OUTPUT_DIR/lib 47 | -------------------------------------------------------------------------------- /qt/api/qtscriptglobal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License as published by the Free Software Foundation; either 7 | version 2 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef qtscriptglobal_h 21 | #define qtscriptglobal_h 22 | 23 | #include 24 | 25 | #if defined(QT_MAKEDLL) /* create a Qt DLL library */ 26 | # if defined(QT_BUILD_JAVASCRIPT_LIB) 27 | # define Q_JAVASCRIPT_EXPORT Q_DECL_EXPORT 28 | # else 29 | # define Q_JAVASCRIPT_EXPORT Q_DECL_IMPORT 30 | # endif 31 | #elif defined(QT_DLL) /* use a Qt DLL library */ 32 | # define Q_JAVASCRIPT_EXPORT 33 | #endif 34 | 35 | #if !defined(Q_JAVASCRIPT_EXPORT) 36 | # if defined(QT_SHARED) 37 | # define Q_JAVASCRIPT_EXPORT Q_DECL_EXPORT 38 | # else 39 | # define Q_JAVASCRIPT_EXPORT 40 | # endif 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /qt/tests/qscriptengine/qscriptengine.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = tst_qscriptengine 3 | QT += testlib 4 | isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 5 | include(../tests.pri) 6 | 7 | SOURCES += tst_qscriptengine.cpp 8 | 9 | -------------------------------------------------------------------------------- /qt/tests/qscriptstring/qscriptstring.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = tst_qscriptstring 3 | QT += testlib 4 | include(../tests.pri) 5 | 6 | SOURCES += tst_qscriptstring.cpp 7 | 8 | -------------------------------------------------------------------------------- /qt/tests/qscriptvalue/qscriptvalue.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = tst_qscriptvalue 3 | QT += testlib 4 | isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../../.. 5 | include(../tests.pri) 6 | 7 | SOURCES += \ 8 | tst_qscriptvalue.cpp \ 9 | tst_qscriptvalue_generated.cpp 10 | 11 | HEADERS += \ 12 | tst_qscriptvalue.h 13 | -------------------------------------------------------------------------------- /qt/tests/tests.pri: -------------------------------------------------------------------------------- 1 | QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR 2 | QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR 3 | mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) { 4 | LIBS += -framework QtScript 5 | QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH 6 | } else { 7 | win32-*|wince* { 8 | LIBS += -lQtScript$${QT_MAJOR_VERSION} 9 | } else { 10 | LIBS += -lQtScript 11 | } 12 | } 13 | 14 | CONFIG(release, debug|release) { 15 | DEFINES += NDEBUG 16 | } 17 | 18 | INCLUDEPATH += $$PWD/../api 19 | 20 | -------------------------------------------------------------------------------- /qt/tests/tests.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | SUBDIRS = qscriptengine \ 3 | qscriptvalue \ 4 | qscriptstring 5 | -------------------------------------------------------------------------------- /runtime/ArrayConstructor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef ArrayConstructor_h 22 | #define ArrayConstructor_h 23 | 24 | #include "InternalFunction.h" 25 | 26 | namespace JSC { 27 | 28 | class ArrayPrototype; 29 | 30 | class ArrayConstructor : public InternalFunction { 31 | public: 32 | ArrayConstructor(ExecState*, NonNullPassRefPtr, ArrayPrototype*, Structure*); 33 | 34 | virtual ConstructType getConstructData(ConstructData&); 35 | virtual CallType getCallData(CallData&); 36 | }; 37 | 38 | } // namespace JSC 39 | 40 | #endif // ArrayConstructor_h 41 | -------------------------------------------------------------------------------- /runtime/BooleanObject.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2003, 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #include "config.h" 22 | #include "BooleanObject.h" 23 | 24 | namespace JSC { 25 | 26 | ASSERT_CLASS_FITS_IN_CELL(BooleanObject); 27 | 28 | const ClassInfo BooleanObject::info = { "Boolean", 0, 0, 0 }; 29 | 30 | BooleanObject::BooleanObject(NonNullPassRefPtr structure) 31 | : JSWrapperObject(structure) 32 | { 33 | } 34 | 35 | } // namespace JSC 36 | -------------------------------------------------------------------------------- /runtime/BooleanPrototype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef BooleanPrototype_h 22 | #define BooleanPrototype_h 23 | 24 | #include "BooleanObject.h" 25 | 26 | namespace JSC { 27 | 28 | class BooleanPrototype : public BooleanObject { 29 | public: 30 | BooleanPrototype(ExecState*, NonNullPassRefPtr, Structure* prototypeFunctionStructure); 31 | }; 32 | 33 | } // namespace JSC 34 | 35 | #endif // BooleanPrototype_h 36 | -------------------------------------------------------------------------------- /runtime/CommonIdentifiers.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2003, 2007, 2009 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #include "config.h" 22 | #include "CommonIdentifiers.h" 23 | 24 | namespace JSC { 25 | 26 | static const char* const nullCString = 0; 27 | 28 | #define INITIALIZE_PROPERTY_NAME(name) , name(globalData, #name) 29 | 30 | CommonIdentifiers::CommonIdentifiers(JSGlobalData* globalData) 31 | : nullIdentifier(globalData, nullCString) 32 | , emptyIdentifier(globalData, "") 33 | , underscoreProto(globalData, "__proto__") 34 | , thisIdentifier(globalData, "this") 35 | JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PROPERTY_NAME) 36 | { 37 | } 38 | 39 | } // namespace JSC 40 | -------------------------------------------------------------------------------- /runtime/DateConstructor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef DateConstructor_h 22 | #define DateConstructor_h 23 | 24 | #include "InternalFunction.h" 25 | 26 | namespace JSC { 27 | 28 | class DatePrototype; 29 | 30 | class DateConstructor : public InternalFunction { 31 | public: 32 | DateConstructor(ExecState*, NonNullPassRefPtr, Structure* prototypeFunctionStructure, DatePrototype*); 33 | 34 | private: 35 | virtual ConstructType getConstructData(ConstructData&); 36 | virtual CallType getCallData(CallData&); 37 | }; 38 | 39 | JSObject* constructDate(ExecState*, const ArgList&); 40 | 41 | } // namespace JSC 42 | 43 | #endif // DateConstructor_h 44 | -------------------------------------------------------------------------------- /runtime/ErrorInstance.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2003, 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #include "config.h" 22 | #include "ErrorInstance.h" 23 | 24 | namespace JSC { 25 | 26 | const ClassInfo ErrorInstance::info = { "Error", 0, 0, 0 }; 27 | 28 | ErrorInstance::ErrorInstance(NonNullPassRefPtr structure) 29 | : JSObject(structure) 30 | { 31 | } 32 | 33 | } // namespace JSC 34 | -------------------------------------------------------------------------------- /runtime/ErrorInstance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef ErrorInstance_h 22 | #define ErrorInstance_h 23 | 24 | #include "JSObject.h" 25 | 26 | namespace JSC { 27 | 28 | class ErrorInstance : public JSObject { 29 | public: 30 | explicit ErrorInstance(NonNullPassRefPtr); 31 | 32 | virtual const ClassInfo* classInfo() const { return &info; } 33 | static const ClassInfo info; 34 | }; 35 | 36 | } // namespace JSC 37 | 38 | #endif // ErrorInstance_h 39 | -------------------------------------------------------------------------------- /runtime/ErrorPrototype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef ErrorPrototype_h 22 | #define ErrorPrototype_h 23 | 24 | #include "ErrorInstance.h" 25 | 26 | namespace JSC { 27 | 28 | class ObjectPrototype; 29 | 30 | class ErrorPrototype : public ErrorInstance { 31 | public: 32 | ErrorPrototype(ExecState*, NonNullPassRefPtr, Structure* prototypeFunctionStructure); 33 | }; 34 | 35 | } // namespace JSC 36 | 37 | #endif // ErrorPrototype_h 38 | -------------------------------------------------------------------------------- /runtime/GetterSetter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2002 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 | * Copyright (C) 2004, 2007, 2008, 2009 Apple Inc. All rights reserved. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public License 17 | * along with this library; see the file COPYING.LIB. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #include "config.h" 24 | #include "GetterSetter.h" 25 | 26 | #include "JSObject.h" 27 | #include 28 | 29 | namespace JSC { 30 | 31 | void GetterSetter::markChildren(MarkStack& markStack) 32 | { 33 | JSCell::markChildren(markStack); 34 | 35 | if (m_getter) 36 | markStack.append(m_getter); 37 | if (m_setter) 38 | markStack.append(m_setter); 39 | } 40 | 41 | bool GetterSetter::isGetterSetter() const 42 | { 43 | return true; 44 | } 45 | 46 | } // namespace JSC 47 | -------------------------------------------------------------------------------- /runtime/JSAPIValueWrapper.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2002 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 | * Copyright (C) 2004, 2007, 2008 Apple Inc. All rights reserved. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public License 17 | * along with this library; see the file COPYING.LIB. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #include "config.h" 24 | #include "JSAPIValueWrapper.h" 25 | 26 | #include "NumberObject.h" 27 | #include "UString.h" 28 | 29 | namespace JSC { 30 | 31 | } // namespace JSC 32 | -------------------------------------------------------------------------------- /runtime/JSImmediate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2003-2006, 2008 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #include "config.h" 22 | #include "JSImmediate.h" 23 | 24 | namespace JSC { 25 | 26 | } // namespace JSC 27 | -------------------------------------------------------------------------------- /runtime/JSType.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef JSType_h 22 | #define JSType_h 23 | 24 | namespace JSC { 25 | 26 | /** 27 | * Primitive types 28 | */ 29 | enum JSType { 30 | UnspecifiedType = 0, 31 | UndefinedType = 1, 32 | BooleanType = 2, 33 | NumberType = 3, 34 | NullType = 4, 35 | StringType = 5, 36 | // The CompoundType value must come before any JSType that may have children 37 | CompoundType = 6, 38 | ObjectType = 7, 39 | GetterSetterType = 8 40 | }; 41 | 42 | } // namespace JSC 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /runtime/JSWrapperObject.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Maks Orlovich 3 | * Copyright (C) 2006, 2009 Apple, Inc. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public License 16 | * along with this library; see the file COPYING.LIB. If not, write to 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | */ 21 | 22 | #include "config.h" 23 | #include "JSWrapperObject.h" 24 | 25 | namespace JSC { 26 | 27 | ASSERT_CLASS_FITS_IN_CELL(JSWrapperObject); 28 | 29 | void JSWrapperObject::markChildren(MarkStack& markStack) 30 | { 31 | JSObject::markChildren(markStack); 32 | if (m_internalValue) 33 | markStack.append(m_internalValue); 34 | } 35 | 36 | } // namespace JSC 37 | -------------------------------------------------------------------------------- /runtime/MarkStackSymbian.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License as published by the Free Software Foundation; either 7 | version 2 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public License 15 | along with this library; see the file COPYING.LIB. If not, write to 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #include "config.h" 21 | #include "MarkStack.h" 22 | 23 | #if OS(SYMBIAN) 24 | 25 | #include 26 | 27 | namespace JSC { 28 | 29 | void MarkStack::initializePagesize() 30 | { 31 | TInt page_size; 32 | UserHal::PageSizeInBytes(page_size); 33 | MarkStack::s_pageSize = page_size; 34 | } 35 | 36 | void* MarkStack::allocateStack(size_t size) 37 | { 38 | return fastMalloc(size); 39 | } 40 | 41 | void MarkStack::releaseStack(void* addr, size_t size) 42 | { 43 | return fastFree(addr); 44 | } 45 | 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /runtime/NativeErrorPrototype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef NativeErrorPrototype_h 22 | #define NativeErrorPrototype_h 23 | 24 | #include "JSObject.h" 25 | 26 | namespace JSC { 27 | class NativeErrorConstructor; 28 | 29 | class NativeErrorPrototype : public JSObject { 30 | public: 31 | NativeErrorPrototype(ExecState*, NonNullPassRefPtr, const UString&, NativeErrorConstructor*); 32 | }; 33 | 34 | } // namespace JSC 35 | 36 | #endif // NativeErrorPrototype_h 37 | -------------------------------------------------------------------------------- /runtime/NumberPrototype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef NumberPrototype_h 22 | #define NumberPrototype_h 23 | 24 | #include "NumberObject.h" 25 | 26 | namespace JSC { 27 | 28 | class NumberPrototype : public NumberObject { 29 | public: 30 | NumberPrototype(ExecState*, NonNullPassRefPtr, Structure* prototypeFunctionStructure); 31 | }; 32 | 33 | } // namespace JSC 34 | 35 | #endif // NumberPrototype_h 36 | -------------------------------------------------------------------------------- /runtime/ObjectConstructor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef ObjectConstructor_h 22 | #define ObjectConstructor_h 23 | 24 | #include "InternalFunction.h" 25 | 26 | namespace JSC { 27 | 28 | class ObjectPrototype; 29 | 30 | class ObjectConstructor : public InternalFunction { 31 | public: 32 | ObjectConstructor(ExecState*, NonNullPassRefPtr, ObjectPrototype*, Structure* prototypeFunctionStructure); 33 | 34 | private: 35 | virtual ConstructType getConstructData(ConstructData&); 36 | virtual CallType getCallData(CallData&); 37 | }; 38 | 39 | } // namespace JSC 40 | 41 | #endif // ObjectConstructor_h 42 | -------------------------------------------------------------------------------- /runtime/RegExpPrototype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2003, 2007, 2008 Apple Inc. All Rights Reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef RegExpPrototype_h 22 | #define RegExpPrototype_h 23 | 24 | #include "JSObject.h" 25 | 26 | namespace JSC { 27 | 28 | class RegExpPrototype : public JSObject { 29 | public: 30 | RegExpPrototype(ExecState*, NonNullPassRefPtr, Structure* prototypeFunctionStructure); 31 | 32 | virtual const ClassInfo* classInfo() const { return &info; } 33 | static const ClassInfo info; 34 | }; 35 | 36 | } // namespace JSC 37 | 38 | #endif // RegExpPrototype_h 39 | -------------------------------------------------------------------------------- /runtime/ScopeChainMark.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2003, 2006, 2008, 2009 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef ScopeChainMark_h 22 | #define ScopeChainMark_h 23 | 24 | #include "ScopeChain.h" 25 | 26 | namespace JSC { 27 | 28 | inline void ScopeChain::markAggregate(MarkStack& markStack) const 29 | { 30 | for (ScopeChainNode* n = m_node; n; n = n->next) 31 | markStack.append(n->object); 32 | } 33 | 34 | } // namespace JSC 35 | 36 | #endif // ScopeChainMark_h 37 | -------------------------------------------------------------------------------- /runtime/StringConstructor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 | * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | * 19 | */ 20 | 21 | #ifndef StringConstructor_h 22 | #define StringConstructor_h 23 | 24 | #include "InternalFunction.h" 25 | 26 | namespace JSC { 27 | 28 | class StringPrototype; 29 | 30 | class StringConstructor : public InternalFunction { 31 | public: 32 | StringConstructor(ExecState*, NonNullPassRefPtr, Structure* prototypeFunctionStructure, StringPrototype*); 33 | 34 | virtual ConstructType getConstructData(ConstructData&); 35 | virtual CallType getCallData(CallData&); 36 | }; 37 | 38 | } // namespace JSC 39 | 40 | #endif // StringConstructor_h 41 | -------------------------------------------------------------------------------- /runtime/UStringImpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 | * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 | * Copyright (C) 2009 Google Inc. All rights reserved. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public License 17 | * along with this library; see the file COPYING.LIB. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef UStringImpl_h 24 | #define UStringImpl_h 25 | 26 | // FIXME: Remove this redundant name! 27 | #include 28 | namespace JSC { typedef WebCore::StringImpl UStringImpl; } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /tests/mozilla/Makefile: -------------------------------------------------------------------------------- 1 | testmenu: 2 | exec perl mklistpage.pl > menubody.html 3 | cat menuhead.html menubody.html menufoot.html > menu.html 4 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/boolean-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: boolean-001.js 3 | Description: Corresponds to ecma/Boolean/15.6.4.2-4-n.js 4 | 5 | The toString function is not generic; it generates 6 | a runtime error if its this value is not a Boolean 7 | object. Therefore it cannot be transferred to other 8 | kinds of objects for use as a method. 9 | 10 | Author: christine@netscape.com 11 | Date: june 27, 1997 12 | */ 13 | var SECTION = "boolean-001.js"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Boolean.prototype.toString()"; 16 | startTest(); 17 | writeHeaderToLog( SECTION +" "+ TITLE ); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | var exception = "No exception thrown"; 23 | var result = "Failed"; 24 | 25 | var TO_STRING = Boolean.prototype.toString; 26 | 27 | try { 28 | var s = new String("Not a Boolean"); 29 | s.toString = TO_STRING; 30 | s.toString(); 31 | } catch ( e ) { 32 | result = "Passed!"; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "Assigning Boolean.prototype.toString to a String object "+ 39 | "(threw " +exception +")", 40 | "Passed!", 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/boolean-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: boolean-001.js 3 | Description: Corresponds to ecma/Boolean/15.6.4.3-4-n.js 4 | 5 | 15.6.4.3 Boolean.prototype.valueOf() 6 | Returns this boolean value. 7 | 8 | The valueOf function is not generic; it generates 9 | a runtime error if its this value is not a Boolean 10 | object. Therefore it cannot be transferred to other 11 | kinds of objects for use as a method. 12 | 13 | Author: christine@netscape.com 14 | Date: 09 september 1998 15 | */ 16 | var SECTION = "boolean-002.js"; 17 | var VERSION = "JS1_4"; 18 | var TITLE = "Boolean.prototype.valueOf()"; 19 | startTest(); 20 | writeHeaderToLog( SECTION +" "+ TITLE ); 21 | 22 | var tc = 0; 23 | var testcases = new Array(); 24 | 25 | var exception = "No exception thrown"; 26 | var result = "Failed"; 27 | 28 | var VALUE_OF = Boolean.prototype.valueOf; 29 | 30 | try { 31 | var s = new String("Not a Boolean"); 32 | s.valueOf = VALUE_0F; 33 | s.valueOf(); 34 | } catch ( e ) { 35 | result = "Passed!"; 36 | exception = e.toString(); 37 | } 38 | 39 | testcases[tc++] = new TestCase( 40 | SECTION, 41 | "Assigning Boolean.prototype.valueOf to a String object "+ 42 | "(threw " +exception +")", 43 | "Passed!", 44 | result ); 45 | 46 | test(); 47 | 48 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/date-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: date-002.js 3 | Corresponds To: 15.9.5.23-3-n.js 4 | ECMA Section: 15.9.5.23 5 | Description: Date.prototype.setTime 6 | 7 | 1. If the this value is not a Date object, generate a runtime error. 8 | 2. Call ToNumber(time). 9 | 3. Call TimeClip(Result(1)). 10 | 4. Set the [[Value]] property of the this value to Result(2). 11 | 5. Return the value of the [[Value]] property of the this value. 12 | 13 | Author: christine@netscape.com 14 | Date: 12 november 1997 15 | */ 16 | var SECTION = "date-002"; 17 | var VERSION = "JS1_4"; 18 | var TITLE = "Date.prototype.setTime()"; 19 | 20 | startTest(); 21 | writeHeaderToLog( SECTION + " "+ TITLE); 22 | 23 | var tc = 0; 24 | var testcases = new Array(); 25 | 26 | var result = "Failed"; 27 | var exception = "No exception thrown"; 28 | var expect = "Passed"; 29 | 30 | try { 31 | var MYDATE = new MyDate(); 32 | result = MYDATE.setTime(0); 33 | } catch ( e ) { 34 | result = expect; 35 | exception = e.toString(); 36 | } 37 | 38 | testcases[tc++] = new TestCase( 39 | SECTION, 40 | "MYDATE = new MyDate(); MYDATE.setTime(0)" + 41 | " (threw " + exception +")", 42 | expect, 43 | result ); 44 | 45 | test(); 46 | 47 | function MyDate(value) { 48 | this.value = value; 49 | this.setTime = Date.prototype.setTime; 50 | return this; 51 | } 52 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/date-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: date-004.js 3 | Corresponds To: 15.9.5.4-2-n.js 4 | ECMA Section: 15.9.5.4-1 Date.prototype.getTime 5 | Description: 6 | 7 | 1. If the this value is not an object whose [[Class]] property is "Date", 8 | generate a runtime error. 9 | 2. Return this time value. 10 | Author: christine@netscape.com 11 | Date: 12 november 1997 12 | */ 13 | var SECTION = "date-004"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Date.prototype.getTime"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | var MYDATE = new MyDate(); 29 | result = MYDATE.getTime(); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "MYDATE = new MyDate(); MYDATE.getTime()" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | function MyDate( value ) { 45 | this.value = value; 46 | this.getTime = Date.prototype.getTime; 47 | } 48 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-001 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * Call error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-001"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: CallError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | Call_1(); 22 | 23 | test(); 24 | 25 | function Call_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | Math(); 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "Math() [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-002 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * Construct error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-002"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: ConstructError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | Construct_1(); 22 | 23 | test(); 24 | 25 | function Construct_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = new Math(); 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "new Math() [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-003.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-003 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * Target error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-003"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: TargetError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | Target_1(); 22 | 23 | test(); 24 | 25 | function Target_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | string = new String("hi"); 31 | string.toString = Boolean.prototype.toString; 32 | string.toString(); 33 | } catch ( e ) { 34 | result = "passed: threw exception", 35 | exception = e.toString(); 36 | } finally { 37 | testcases[tc++] = new TestCase( 38 | SECTION, 39 | "string = new String(\"hi\");"+ 40 | "string.toString = Boolean.prototype.toString" + 41 | "string.toString() [ exception is " + exception +" ]", 42 | "passed: threw exception", 43 | result ); 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-004 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * ToObject error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-004"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: ToObjectError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | ToObject_1(); 22 | 23 | test(); 24 | 25 | function ToObject_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = foo["bar"]; 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "foo[\"bar\"] [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-005 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * ToObject error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-005"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: ToObjectError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | ToObject_1(); 22 | 23 | test(); 24 | 25 | function ToObject_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = foo["bar"]; 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "foo[\"bar\"] [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-006.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-006 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * ToPrimitive error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-006"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: TypeError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | ToPrimitive_1(); 22 | 23 | test(); 24 | 25 | 26 | /** 27 | * Getting the [[DefaultValue]] of any instances of MyObject 28 | * should result in a runtime error in ToPrimitive. 29 | */ 30 | 31 | function MyObject() { 32 | this.toString = void 0; 33 | this.valueOf = void 0; 34 | } 35 | 36 | function ToPrimitive_1() { 37 | result = "failed: no exception thrown"; 38 | exception = null; 39 | 40 | try { 41 | result = new MyObject() + new MyObject(); 42 | } catch ( e ) { 43 | result = "passed: threw exception", 44 | exception = e.toString(); 45 | } finally { 46 | testcases[tc++] = new TestCase( 47 | SECTION, 48 | "new MyObject() + new MyObject() [ exception is " + exception +" ]", 49 | "passed: threw exception", 50 | result ); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-007.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-007 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * DefaultValue error. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-007"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: TypeError"; 14 | var BUGNUMBER="318250"; 15 | 16 | startTest(); 17 | writeHeaderToLog( SECTION + " "+ TITLE); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | DefaultValue_1(); 23 | 24 | test(); 25 | 26 | 27 | /** 28 | * Getting the [[DefaultValue]] of any instances of MyObject 29 | * should result in a runtime error in ToPrimitive. 30 | */ 31 | 32 | function MyObject() { 33 | this.toString = void 0; 34 | this.valueOf = new Object(); 35 | } 36 | 37 | function DefaultValue_1() { 38 | result = "failed: no exception thrown"; 39 | exception = null; 40 | 41 | try { 42 | result = new MyObject() + new MyObject(); 43 | } catch ( e ) { 44 | result = "passed: threw exception", 45 | exception = e.toString(); 46 | } finally { 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "new MyObject() + new MyObject() [ exception is " + exception +" ]", 50 | "passed: threw exception", 51 | result ); 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-008 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * SyntaxError. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 31 August 1998 10 | */ 11 | var SECTION = "exception-008"; 12 | var VERSION = "js1_4"; 13 | var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | Syntax_1(); 22 | 23 | test(); 24 | 25 | function Syntax_1() { 26 | result = "failed: no exception thrown"; 27 | exception = null; 28 | 29 | try { 30 | result = eval("continue;"); 31 | } catch ( e ) { 32 | result = "passed: threw exception", 33 | exception = e.toString(); 34 | } finally { 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "eval(\"continue\") [ exception is " + exception +" ]", 38 | "passed: threw exception", 39 | result ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: exception-009 3 | * ECMA Section: 4 | * Description: Tests for JavaScript Standard Exceptions 5 | * 6 | * Regression test for nested try blocks. 7 | * 8 | * http://scopus.mcom.com/bugsplat/show_bug.cgi?id=312964 9 | * 10 | * Author: christine@netscape.com 11 | * Date: 31 August 1998 12 | */ 13 | var SECTION = "exception-009"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError"; 16 | var BUGNUMBER= "312964"; 17 | 18 | startTest(); 19 | writeHeaderToLog( SECTION + " "+ TITLE); 20 | 21 | var tc = 0; 22 | var testcases = new Array(); 23 | 24 | try { 25 | expect = "passed: no exception thrown"; 26 | result = expect; 27 | Nested_1(); 28 | } catch ( e ) { 29 | result = "failed: threw " + e; 30 | } finally { 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "nested try", 34 | expect, 35 | result ); 36 | } 37 | 38 | 39 | test(); 40 | 41 | function Nested_1() { 42 | try { 43 | try { 44 | } catch (a) { 45 | } finally { 46 | } 47 | } catch (b) { 48 | } finally { 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-010-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | print ("Null throw test."); 30 | print ("BUGNUMBER: 21799"); 31 | 32 | throw null; 33 | 34 | print ("FAILED!: Should have exited with uncaught exception."); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/exception-011-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | print ("Undefined throw test."); 30 | 31 | throw (void 0); 32 | 33 | print ("FAILED!: Should have exited with uncaught exception."); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-003.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expressions-003.js 3 | Corresponds to: ecma/Expressions/11.2.1-3-n.js 4 | ECMA Section: 11.2.1 Property Accessors 5 | Description: 6 | 7 | Try to access properties of an object whose value is undefined. 8 | 9 | Author: christine@netscape.com 10 | Date: 09 september 1998 11 | */ 12 | var SECTION = "expressions-003.js"; 13 | var VERSION = "JS1_4"; 14 | var TITLE = "Property Accessors"; 15 | writeHeaderToLog( SECTION + " "+TITLE ); 16 | 17 | startTest(); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | // try to access properties of primitive types 23 | 24 | OBJECT = new Property( "undefined", void 0, "undefined", NaN ); 25 | 26 | var result = "Failed"; 27 | var exception = "No exception thrown"; 28 | var expect = "Passed"; 29 | 30 | try { 31 | result = OBJECT.value.toString(); 32 | } catch ( e ) { 33 | result = expect; 34 | exception = e.toString(); 35 | } 36 | 37 | 38 | testcases[tc++] = new TestCase( 39 | SECTION, 40 | "Get the toString value of an object whose value is undefined "+ 41 | "(threw " + exception +")", 42 | expect, 43 | result ); 44 | 45 | test(); 46 | 47 | function Property( object, value, string, number ) { 48 | this.object = object; 49 | this.string = String(value); 50 | this.number = Number(value); 51 | this.value = value; 52 | } -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-004.js 3 | Corresponds To: 11.2.1-4-n.js 4 | ECMA Section: 11.2.1 Property Accessors 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 09 september 1998 9 | */ 10 | var SECTION = "expression-004"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "Property Accessors"; 13 | writeHeaderToLog( SECTION + " "+TITLE ); 14 | startTest(); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var OBJECT = new Property( "null", null, "null", 0 ); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | result = OBJECT.value.toString(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "Get the toString value of an object whose value is null "+ 35 | "(threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | function Property( object, value, string, number ) { 42 | this.object = object; 43 | this.string = String(value); 44 | this.number = Number(value); 45 | this.value = value; 46 | } 47 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-005.js 3 | Corresponds To: 11.2.2-10-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | 11 | var SECTION = "expression-005"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "The new operator"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var expect = "Passed"; 23 | var exception = "No exception thrown"; 24 | 25 | try { 26 | result = new Math(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "result= new Math() (threw " + exception + ")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-006.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-006.js 3 | Corresponds to: 11.2.2-1-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | http://scopus/bugsplat/show_bug.cgi?id=327765 8 | 9 | Author: christine@netscape.com 10 | Date: 12 november 1997 11 | */ 12 | var SECTION = "expression-006.js"; 13 | var VERSION = "JS1_4"; 14 | var TITLE = "The new operator"; 15 | var BUGNUMBER="327765"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | var OBJECT = new Object(); 29 | result = new OBJECT(); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "OBJECT = new Object; result = new OBJECT()" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-007.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-007.js 3 | Corresponds To: 11.2.2-2-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | 8 | Author: christine@netscape.com 9 | Date: 12 november 1997 10 | */ 11 | var SECTION = "expression-007"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "The new operator"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | UNDEFINED = void 0; 27 | result = new UNDEFINED(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "UNDEFINED = void 0; result = new UNDEFINED()" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-008 3 | Corresponds To: 11.2.2-3-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-008"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var NULL = null; 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | result = new NULL(); 26 | } catch ( e ) { 27 | result = expect; 28 | exception = e.toString(); 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "NULL = null; result = new NULL()" + 34 | " (threw " + exception +")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-009 3 | Corresponds to: ecma/Expressions/11.2.2-4-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-009"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var STRING = ""; 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | result = new STRING(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "STRING = ''; result = new STRING()" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-010.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-010.js 3 | Corresponds To: 11.2.2-5-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-010"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var NUMBER = 0; 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | result = new NUMBER(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "NUMBER=0, result = new NUMBER()" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-011.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-011.js 3 | Corresponds To: ecma/Expressions/11.2.2-6-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-011"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var BOOLEAN = true; 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | var OBJECT = new BOOLEAN(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "BOOLEAN = true; result = new BOOLEAN()" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-012.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-012.js 3 | Corresponds To: ecma/Expressions/11.2.2-6-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | http://scopus/bugsplat/show_bug.cgi?id=327765 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "expression-012"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The new operator"; 13 | var BUGNUMBER= "327765"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var STRING = new String("hi"); 22 | var result = "Failed"; 23 | var exception = "No exception thrown"; 24 | var expect = "Passed"; 25 | 26 | try { 27 | result = new STRING(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "STRING = new String(\"hi\"); result = new STRING()" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-013.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-013.js 3 | Corresponds To: ecma/Expressions/11.2.2-8-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-013"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The new operator"; 12 | var BUGNUMBER= "327765"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var NUMBER = new Number(1); 21 | 22 | var result = "Failed"; 23 | var exception = "No exception thrown"; 24 | var expect = "Passed"; 25 | 26 | try { 27 | result = new NUMBER(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "NUMBER = new Number(1); result = new NUMBER()" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-014.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-014.js 3 | Corresponds To: ecma/Expressions/11.2.2-9-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "expression-014.js"; 11 | var VERSION = "ECMA_1"; 12 | var TITLE = "The new operator"; 13 | var BUGNUMBER= "327765"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var BOOLEAN = new Boolean(); 22 | 23 | 24 | var result = "Failed"; 25 | var exception = "No exception thrown"; 26 | var expect = "Passed"; 27 | 28 | try { 29 | result = new BOOLEAN(); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "BOOLEAN = new Boolean(); result = new BOOLEAN()" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-015.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-015.js 3 | Corresponds To: ecma/Expressions/11.2.3-2-n.js 4 | ECMA Section: 11.2.3. Function Calls 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-015"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "Function Calls"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | eval("result = 3.valueOf();"); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "3.valueOf()" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-016.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-016.js 3 | Corresponds To: ecma/Expressions/11.2.3-3-n.js 4 | ECMA Section: 11.2.3. Function Calls 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-016"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "Function Calls"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | result = (void 0).valueOf(); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "(void 0).valueOf()" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-017.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-07.js 3 | Corresponds To: ecma/Expressions/11.2.3-4-n.js 4 | ECMA Section: 11.2.3. Function Calls 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "expression-017"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "Function Calls"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | result = nullvalueOf(); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "null.valueOf()" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/expression-019.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: expression-019.js 3 | Corresponds To: 11.2.2-7-n.js 4 | ECMA Section: 11.2.2. The new operator 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "expression-019"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The new operator"; 13 | var BUGNUMBER= "327765"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | var STRING = new String("hi"); 27 | result = new STRING(); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "var STRING = new String(\"hi\"); result = new STRING();" + 36 | " (threw " + exception + ")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/global-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: global-001 3 | Corresponds To: ecma/GlobalObject/15.1-1-n.js 4 | ECMA Section: The global object 5 | Description: 6 | 7 | The global object does not have a [[Construct]] property; it is not 8 | possible to use the global object as a constructor with the new operator. 9 | 10 | 11 | Author: christine@netscape.com 12 | Date: 12 november 1997 13 | */ 14 | var SECTION = "global-001"; 15 | var VERSION = "ECMA_1"; 16 | var TITLE = "The Global Object"; 17 | 18 | startTest(); 19 | writeHeaderToLog( SECTION + " "+ TITLE); 20 | 21 | var tc = 0; 22 | var testcases = new Array(); 23 | 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | result = new this(); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "result = new this()" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/global-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: global-002 3 | Corresponds To: ecma/GlobalObject/15.1-2-n.js 4 | ECMA Section: The global object 5 | Description: 6 | 7 | The global object does not have a [[Construct]] property; it is not 8 | possible to use the global object as a constructor with the new operator. 9 | 10 | 11 | Author: christine@netscape.com 12 | Date: 12 november 1997 13 | */ 14 | var SECTION = "global-002"; 15 | var VERSION = "JS1_4"; 16 | var TITLE = "The Global Object"; 17 | 18 | startTest(); 19 | writeHeaderToLog( SECTION + " "+ TITLE); 20 | 21 | var tc = 0; 22 | var testcases = new Array(); 23 | 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | result = this(); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "result = this()" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-003.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-003.js 3 | Corresponds To: 7.3-13-n.js 4 | ECMA Section: 7.3 Comments 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | 10 | */ 11 | var SECTION = "lexical-003.js"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Comments"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | 22 | var result = "Failed"; 23 | var exception = "No exception thrown"; 24 | var expect = "Passed"; 25 | 26 | try { 27 | eval("/*\n/* nested comment */\n*/\n"); 28 | } catch ( e ) { 29 | result = expect; 30 | exception = e.toString(); 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "/*/*nested comment*/ */" + 36 | " (threw " + exception +")", 37 | expect, 38 | result ); 39 | 40 | test(); 41 | 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-004.js 3 | Corresponds To: ecma/LexicalExpressions/7.4.1-1-n.js 4 | ECMA Section: 7.4.1 5 | 6 | Description: 7 | 8 | Reserved words cannot be used as identifiers. 9 | 10 | ReservedWord :: 11 | Keyword 12 | FutureReservedWord 13 | NullLiteral 14 | BooleanLiteral 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | 19 | */ 20 | var SECTION = "lexical-004"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Keywords"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("var null = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "var null = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-005.js 3 | Corresponds To: 7.4.1-2.js 4 | ECMA Section: 7.4.1 5 | 6 | Description: 7 | 8 | Reserved words cannot be used as identifiers. 9 | 10 | ReservedWord :: 11 | Keyword 12 | FutureReservedWord 13 | NullLiteral 14 | BooleanLiteral 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | 19 | */ 20 | var SECTION = "lexical-005"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Keywords"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | 31 | var result = "Failed"; 32 | var exception = "No exception thrown"; 33 | var expect = "Passed"; 34 | 35 | try { 36 | eval("true = false;"); 37 | } catch ( e ) { 38 | result = expect; 39 | exception = e.toString(); 40 | } 41 | 42 | testcases[tc++] = new TestCase( 43 | SECTION, 44 | "true = false" + 45 | " (threw " + exception +")", 46 | expect, 47 | result ); 48 | 49 | test(); 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-007.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-005.js 3 | Corresponds To: 7.4.1-3-n.js 4 | ECMA Section: 7.4.1 5 | 6 | Description: 7 | 8 | Reserved words cannot be used as identifiers. 9 | 10 | ReservedWord :: 11 | Keyword 12 | FutureReservedWord 13 | NullLiteral 14 | BooleanLiteral 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | */ 19 | var SECTION = "lexical-005"; 20 | var VERSION = "JS1_4"; 21 | var TITLE = "Keywords"; 22 | 23 | startTest(); 24 | writeHeaderToLog( SECTION + " "+ TITLE); 25 | 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("false = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "false = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-008.js 3 | Corresponds To: 7.4.3-1-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-008.js"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("case = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "case = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-009 3 | Corresponds To: 7.4.3-2-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-009"; 21 | var VERSION = "ECMA_1"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("debugger = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "debugger = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-010.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-010.js 3 | Corresponds To: 7.4.3-3-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-010"; 21 | var VERSION = "ECMA_1"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("export = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "export = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-011.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-011.js 3 | Corresponds To: 7.4.3-4-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-011"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("super = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "super = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-012.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-012.js 3 | Corresponds To: 7.4.3-5-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-012"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("catch = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "catch = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-013.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-013.js 3 | Corresponds To: 7.4.3-6-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-013"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("default = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "default = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-014.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-014.js 3 | Corresponds To: 7.4.3-7-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-014.js"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("extends = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "extends = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-015.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-015.js 3 | Corresponds To: 7.4.3-8-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-015"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("switch = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "switch = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-016.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-016 3 | Corresponds To: 7.4.3-9-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-016"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("class = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "class = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-017.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-017.js 3 | Corresponds To: 7.4.3-10-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-017"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("do = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "do = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-018.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-018 3 | Corresponds To: 7.4.3-11-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-018"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("finally = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "finally = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-019.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-019.js 3 | Corresponds To: 7.4.3-12-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-019"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("throw = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "throw = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-020.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-020.js 3 | Corresponds To 7.4.3-13-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-020"; 21 | var VERSION = "JS1_4"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("const = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "const = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-021.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-021.js 3 | Corresponds To: 7.4.3-14-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-021.js"; 21 | var VERSION = "ECMA_1"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("enum = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "enum = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-022.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-022 3 | Corresponds To 7.4.3-15-n.js 4 | ECMA Section: 7.4.3 5 | 6 | Description: 7 | The following words are used as keywords in proposed extensions and are 8 | therefore reserved to allow for the possibility of future adoption of 9 | those extensions. 10 | 11 | FutureReservedWord :: one of 12 | case debugger export super 13 | catch default extends switch 14 | class do finally throw 15 | const enum import try 16 | 17 | Author: christine@netscape.com 18 | Date: 12 november 1997 19 | */ 20 | var SECTION = "lexical-022.js"; 21 | var VERSION = "ECMA_1"; 22 | var TITLE = "Future Reserved Words"; 23 | 24 | startTest(); 25 | writeHeaderToLog( SECTION + " "+ TITLE); 26 | 27 | var tc = 0; 28 | var testcases = new Array(); 29 | 30 | var result = "Failed"; 31 | var exception = "No exception thrown"; 32 | var expect = "Passed"; 33 | 34 | try { 35 | eval("import = true;"); 36 | } catch ( e ) { 37 | result = expect; 38 | exception = e.toString(); 39 | } 40 | 41 | testcases[tc++] = new TestCase( 42 | SECTION, 43 | "import = true" + 44 | " (threw " + exception +")", 45 | expect, 46 | result ); 47 | 48 | test(); 49 | 50 | 51 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-023.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-023.js 3 | Corresponds To: 7.4.3-16-n.js 4 | ECMA Section: 7.4.3 5 | Description: 6 | The following words are used as keywords in proposed extensions and are 7 | therefore reserved to allow for the possibility of future adoption of 8 | those extensions. 9 | 10 | FutureReservedWord :: one of 11 | case debugger export super 12 | catch default extends switch 13 | class do finally throw 14 | const enum import try 15 | 16 | Author: christine@netscape.com 17 | Date: 12 november 1997 18 | */ 19 | var SECTION = "lexical-023.js"; 20 | var VERSION = "ECMA_1"; 21 | var TITLE = "Future Reserved Words"; 22 | 23 | startTest(); 24 | writeHeaderToLog( SECTION + " "+ TITLE); 25 | 26 | var tc = 0; 27 | var testcases = new Array(); 28 | 29 | var result = "Failed"; 30 | var exception = "No exception thrown"; 31 | var expect = "Passed"; 32 | 33 | try { 34 | eval("try = true;"); 35 | } catch ( e ) { 36 | result = expect; 37 | exception = e.toString(); 38 | } 39 | 40 | testcases[tc++] = new TestCase( 41 | SECTION, 42 | "try = true" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-024.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-024 3 | Corresponds To: 7.4.2-1-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-024"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("var break;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "var break" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-025.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-025.js 3 | Corresponds To 7.4.2-2-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-025"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("var for;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "var for" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-026.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-026.js 3 | Corresponds To: 7.4.2-3-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-026"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("var new;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "var new" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-031.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-031.js 3 | Corresponds To: 7.4.2-8-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-031"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("var return;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "var return" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-032.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-032.js 3 | Corresponds To: 7.4.2-9-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-032"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("delete = true;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "delete = true" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-033.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-033.js 3 | Corresponds To: 7.4.2-10.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-033"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("if = true;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "if = true" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-034.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: 7.4.2-11-n.js 3 | ECMA Section: 7.4.2 4 | 5 | Description: 6 | The following tokens are ECMAScript keywords and may not be used as 7 | identifiers in ECMAScript programs. 8 | 9 | Syntax 10 | 11 | Keyword :: one of 12 | break for new var 13 | continue function return void 14 | delete if this while 15 | else in typeof with 16 | 17 | This test verifies that the keyword cannot be used as an identifier. 18 | Functioinal tests of the keyword may be found in the section corresponding 19 | to the function of the keyword. 20 | 21 | Author: christine@netscape.com 22 | Date: 12 november 1997 23 | 24 | */ 25 | var SECTION = "lexical-034"; 26 | var VERSION = "JS1_4"; 27 | var TITLE = "Keywords"; 28 | 29 | startTest(); 30 | writeHeaderToLog( SECTION + " "+ TITLE); 31 | 32 | var tc = 0; 33 | var testcases = new Array(); 34 | 35 | var result = "Failed"; 36 | var exception = "No exception thrown"; 37 | var expect = "Passed"; 38 | 39 | try { 40 | eval("this = true"); 41 | } catch ( e ) { 42 | result = expect; 43 | exception = e.toString(); 44 | } 45 | 46 | testcases[tc++] = new TestCase( 47 | SECTION, 48 | "this = true" + 49 | " (threw " + exception +")", 50 | expect, 51 | result ); 52 | 53 | test(); 54 | 55 | 56 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-035.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-035.js 3 | Correpsonds To: 7.4.2-12-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-035"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("var while"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "var while" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-036.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-036.js 3 | Corresponds To: 7.4.2-13-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-036"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("else = true;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "else = true" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-037.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-037.js 3 | Corresponds To: 7.4.2-14-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-028"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("var in;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "var in" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-038.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-038.js 3 | Corresponds To: 7.4.2-15-n.js 4 | ECMA Section: 7.4.2 5 | 6 | Description: 7 | The following tokens are ECMAScript keywords and may not be used as 8 | identifiers in ECMAScript programs. 9 | 10 | Syntax 11 | 12 | Keyword :: one of 13 | break for new var 14 | continue function return void 15 | delete if this while 16 | else in typeof with 17 | 18 | This test verifies that the keyword cannot be used as an identifier. 19 | Functioinal tests of the keyword may be found in the section corresponding 20 | to the function of the keyword. 21 | 22 | Author: christine@netscape.com 23 | Date: 12 november 1997 24 | 25 | */ 26 | var SECTION = "lexical-038"; 27 | var VERSION = "JS1_4"; 28 | var TITLE = "Keywords"; 29 | 30 | startTest(); 31 | writeHeaderToLog( SECTION + " "+ TITLE); 32 | 33 | var tc = 0; 34 | var testcases = new Array(); 35 | 36 | var result = "Failed"; 37 | var exception = "No exception thrown"; 38 | var expect = "Passed"; 39 | 40 | try { 41 | eval("typeof = true;"); 42 | } catch ( e ) { 43 | result = expect; 44 | exception = e.toString(); 45 | } 46 | 47 | testcases[tc++] = new TestCase( 48 | SECTION, 49 | "typeof = true" + 50 | " (threw " + exception +")", 51 | expect, 52 | result ); 53 | 54 | test(); 55 | 56 | 57 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-039.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-039 3 | Corresponds To: 7.5-2-n.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-039"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | eval("var 0abc;"); 29 | } catch ( e ) { 30 | result = expect; 31 | exception = e.toString(); 32 | } 33 | 34 | testcases[tc++] = new TestCase( 35 | SECTION, 36 | "var 0abc" + 37 | " (threw " + exception +")", 38 | expect, 39 | result ); 40 | 41 | test(); 42 | 43 | 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-040.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-040.js 3 | Corresponds To: 7.5-2.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-040"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var result = "Failed"; 24 | var exception = "No exception thrown"; 25 | var expect = "Passed"; 26 | 27 | try { 28 | eval("var 1abc;"); 29 | } catch ( e ) { 30 | result = expect; 31 | exception = e.toString(); 32 | } 33 | 34 | testcases[tc++] = new TestCase( 35 | SECTION, 36 | "var 1abc" + 37 | " (threw " + exception +")", 38 | expect, 39 | result ); 40 | 41 | test(); 42 | 43 | 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-041.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-041.js 3 | Corresponds To: 7.5-8-n.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-041"; 14 | var VERSION = "ECMA_1"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | startTest(); 20 | writeHeaderToLog( SECTION + " "+ TITLE); 21 | 22 | var tc = 0; 23 | var testcases = new Array(); 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | eval("var @abc;"); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "var @abc" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | 45 | 46 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-042.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-042.js 3 | Corresponds To: 7.5-9-n.js 4 | ECMA Section: 7.5 Identifiers 5 | Description: Identifiers are of unlimited length 6 | - can contain letters, a decimal digit, _, or $ 7 | - the first character cannot be a decimal digit 8 | - identifiers are case sensitive 9 | 10 | Author: christine@netscape.com 11 | Date: 11 september 1997 12 | */ 13 | var SECTION = "lexical-042"; 14 | var VERSION = "JS1_4"; 15 | var TITLE = "Identifiers"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | startTest(); 21 | writeHeaderToLog( SECTION + " "+ TITLE); 22 | 23 | var tc = 0; 24 | var testcases = new Array(); 25 | 26 | var result = "Failed"; 27 | var exception = "No exception thrown"; 28 | var expect = "Passed"; 29 | 30 | try { 31 | eval("var 123;"); 32 | } catch ( e ) { 33 | result = expect; 34 | exception = e.toString(); 35 | } 36 | 37 | testcases[tc++] = new TestCase( 38 | SECTION, 39 | "var 123" + 40 | " (threw " + exception +")", 41 | expect, 42 | result ); 43 | 44 | test(); 45 | 46 | 47 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-047.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-047.js 3 | Corresponds To: 7.8.1-7-n.js 4 | ECMA Section: 7.8.1 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 15 september 1997 8 | */ 9 | 10 | var SECTION = "lexical-047"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "for loops"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | var counter = 0; 26 | eval("for ( counter = 0\n" 27 | + "counter <= 1\n" 28 | + "counter++ )\n" 29 | + "{\n" 30 | + "result += \": got to inner loop\";\n" 31 | + "}\n"); 32 | 33 | } catch ( e ) { 34 | result = expect; 35 | exception = e.toString(); 36 | } 37 | 38 | testcases[tc++] = new TestCase( 39 | SECTION, 40 | "line breaks within a for expression" + 41 | " (threw " + exception +")", 42 | expect, 43 | result ); 44 | 45 | test(); 46 | 47 | 48 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-048.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-048.js 3 | Corresponds To: 7.8.1-1.js 4 | ECMA Section: 7.8.1 Rules of Automatic Semicolon Insertion 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 15 september 1997 8 | */ 9 | 10 | var SECTION = "lexical-048"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The Rules of Automatic Semicolon Insertion"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | var counter = 0; 26 | eval( "for ( counter = 0;\ncounter <= 1\ncounter++ ) {\nresult += \": got inside for loop\")"); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "line breaks within a for expression" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-049.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-049 3 | Corresponds To: 7.8.1-1.js 4 | ECMA Section: 7.8.1 Rules of Automatic Semicolon Insertioin 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 15 september 1997 8 | */ 9 | var SECTION = "lexical-049"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The Rules of Automatic Semicolon Insertion"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | var counter = 0; 25 | eval("for ( counter = 0\n" 26 | + "counter <= 1;\n" 27 | + "counter++ )\n" 28 | + "{\n" 29 | + "result += \": got inside for loop\";\n" 30 | + "}\n"); 31 | 32 | } catch ( e ) { 33 | result = expect; 34 | exception = e.toString(); 35 | } 36 | 37 | testcases[tc++] = new TestCase( 38 | SECTION, 39 | "line breaks within a for expression" + 40 | " (threw " + exception +")", 41 | expect, 42 | result ); 43 | 44 | test(); 45 | 46 | 47 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-050.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-050.js 3 | Corresponds to: 7.8.2-1-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-050"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | eval("{ 1 2 } 3"); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "{ 1 2 } 3" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-051.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-051.js 3 | Corresponds to: 7.8.2-3-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-051"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | eval("for (a; b\n) result += \": got to inner loop\";") 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "for (a; b\n)" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-052.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-052.js 3 | Corresponds to: 7.8.2-4-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-052"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | MyFunction(); 27 | } catch ( e ) { 28 | result = expect; 29 | exception = e.toString(); 30 | } 31 | 32 | testcases[tc++] = new TestCase( 33 | SECTION, 34 | "calling return indirectly" + 35 | " (threw " + exception +")", 36 | expect, 37 | result ); 38 | 39 | test(); 40 | 41 | function MyFunction() { 42 | var s = "return"; 43 | eval(s); 44 | } 45 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-053.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-053.js 3 | Corresponds to: 7.8.2-7-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-053"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | a = true 27 | b = false 28 | 29 | eval('if (a > b)\nelse result += ": got to else statement"'); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "calling return indirectly" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/lexical-054.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: lexical-054.js 3 | Corresponds to: 7.8.2-7-n.js 4 | ECMA Section: 7.8.2 Examples of Automatic Semicolon Insertion 5 | Description: compare some specific examples of the automatic 6 | insertion rules in the EMCA specification. 7 | Author: christine@netscape.com 8 | Date: 15 september 1997 9 | */ 10 | 11 | var SECTION = "lexical-054"; 12 | var VERSION = "JS1_4"; 13 | var TITLE = "Examples of Automatic Semicolon Insertion"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | var result = "Failed"; 22 | var exception = "No exception thrown"; 23 | var expect = "Passed"; 24 | 25 | try { 26 | a=0; 27 | b=1; 28 | c=2; 29 | d=3; 30 | eval("if (a > b)\nelse c = d"); 31 | } catch ( e ) { 32 | result = expect; 33 | exception = e.toString(); 34 | } 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "if (a > b)\nelse c = d" + 39 | " (threw " + exception +")", 40 | expect, 41 | result ); 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/number-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: number-002.js 3 | Corresponds To: ecma/Number/15.7.4.3-2-n.js 4 | ECMA Section: 15.7.4.3.1 Number.prototype.valueOf() 5 | Description: 6 | Returns this number value. 7 | 8 | The valueOf function is not generic; it generates a runtime error if its 9 | this value is not a Number object. Therefore it cannot be transferred to 10 | other kinds of objects for use as a method. 11 | 12 | Author: christine@netscape.com 13 | Date: 16 september 1997 14 | */ 15 | var SECTION = "number-002"; 16 | var VERSION = "JS1_4"; 17 | var TITLE = "Exceptions for Number.valueOf()"; 18 | 19 | startTest(); 20 | writeHeaderToLog( SECTION + " Number.prototype.valueOf()"); 21 | 22 | var testcases = new Array(); 23 | var tc = 0; 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | object= new Object(); 31 | object.toString = Number.prototype.valueOf; 32 | result = object.toString(); 33 | } catch ( e ) { 34 | result = expect; 35 | exception = e.toString(); 36 | } 37 | 38 | testcases[tc++] = new TestCase( 39 | SECTION, 40 | "object = new Object(); object.valueOf = Number.prototype.valueOf; object.valueOf()" + 41 | " (threw " + exception +")", 42 | expect, 43 | result ); 44 | 45 | test(); 46 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/number-003.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: number-003.js 3 | Corresponds To: 15.7.4.3-3.js 4 | ECMA Section: 15.7.4.3.1 Number.prototype.valueOf() 5 | Description: 6 | Returns this number value. 7 | 8 | The valueOf function is not generic; it generates a runtime error if its 9 | this value is not a Number object. Therefore it cannot be transferred to 10 | other kinds of objects for use as a method. 11 | 12 | Author: christine@netscape.com 13 | Date: 16 september 1997 14 | */ 15 | var SECTION = "number-003"; 16 | var VERSION = "JS1_4"; 17 | var TITLE = "Exceptions for Number.valueOf()"; 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | startTest(); 23 | writeHeaderToLog( SECTION + " Number.prototype.valueOf()"); 24 | 25 | var result = "Failed"; 26 | var exception = "No exception thrown"; 27 | var expect = "Passed"; 28 | 29 | try { 30 | VALUE_OF = Number.prototype.valueOf; 31 | OBJECT = new String("Infinity"); 32 | OBJECT.valueOf = VALUE_OF; 33 | result = OBJECT.valueOf(); 34 | } catch ( e ) { 35 | result = expect; 36 | exception = e.toString(); 37 | } 38 | 39 | testcases[tc++] = new TestCase( 40 | SECTION, 41 | "Assigning Number.prototype.valueOf as the valueOf of a String object " + 42 | " (threw " + exception +")", 43 | expect, 44 | result ); 45 | 46 | test(); 47 | 48 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/statement-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-001.js 3 | Corresponds To: 12.6.2-9-n.js 4 | ECMA Section: 12.6.2 The for Statement 5 | 6 | 1. first expression is not present. 7 | 2. second expression is not present 8 | 3. third expression is not present 9 | 10 | 11 | Author: christine@netscape.com 12 | Date: 15 september 1997 13 | */ 14 | 15 | var SECTION = "statement-001.js"; 16 | // var SECTION = "12.6.2-9-n"; 17 | var VERSION = "ECMA_1"; 18 | var TITLE = "The for statment"; 19 | 20 | startTest(); 21 | writeHeaderToLog( SECTION + " "+ TITLE); 22 | 23 | var testcases = new Array(); 24 | var tc = 0; 25 | 26 | var result = "Failed"; 27 | var exception = "No exception thrown"; 28 | var expect = "Passed"; 29 | 30 | try { 31 | eval("for (i) {\n}"); 32 | } catch ( e ) { 33 | result = expect; 34 | exception = e.toString(); 35 | } 36 | 37 | testcases[tc++] = new TestCase( 38 | SECTION, 39 | "for(i) {}" + 40 | " (threw " + exception +")", 41 | expect, 42 | result ); 43 | 44 | test(); 45 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/statement-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-004.js 3 | Corresponds To: 12.6.3-1.js 4 | ECMA Section: 12.6.3 The for...in Statement 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 11 september 1997 8 | */ 9 | var SECTION = "statement-004"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The for..in statment"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var testcases = new Array(); 17 | var tc = 0; 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | var o = new MyObject(); 25 | 26 | eval("for ( \"a\" in o) {\n" 27 | + "result += this[p];\n" 28 | + "}"); 29 | 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "bad left-hand side expression" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | 45 | function MyObject() { 46 | this.value = 2; 47 | this[0] = 4; 48 | return this; 49 | } 50 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/statement-005.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-005.js 3 | Corresponds To: 12.6.3-8-n.js 4 | ECMA Section: 12.6.3 The for...in Statement 5 | Description: 6 | Author: christine@netscape.com 7 | Date: 11 september 1997 8 | */ 9 | var SECTION = "statement-005"; 10 | var VERSION = "JS1_4"; 11 | var TITLE = "The for..in statment"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var testcases = new Array(); 17 | var tc = 0; 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | var o = new MyObject(); 25 | result = 0; 26 | 27 | eval("for (1 in o) {\n" 28 | + "result += this[p];" 29 | + "}\n"); 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "bad left-hand side expression" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | function MyObject() { 45 | this.value = 2; 46 | this[0] = 4; 47 | return this; 48 | } 49 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/statement-006.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-006.js 3 | Corresponds To: 12.6.3-9-n.js 4 | ECMA Section: 12.6.3 The for...in Statement 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 11 september 1997 9 | */ 10 | var SECTION = "statement-006"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The for..in statment"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | var o = new MyObject(); 26 | var result = 0; 27 | for ( var o in foo) { 28 | result += this[o]; 29 | } 30 | } catch ( e ) { 31 | result = expect; 32 | exception = e.toString(); 33 | } 34 | 35 | testcases[tc++] = new TestCase( 36 | SECTION, 37 | "object is not defined" + 38 | " (threw " + exception +")", 39 | expect, 40 | result ); 41 | 42 | test(); 43 | 44 | function MyObject() { 45 | this.value = 2; 46 | this[0] = 4; 47 | return this; 48 | } -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/statement-007.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-007.js 3 | Corresponds To: 12.7-1-n.js 4 | ECMA Section: 12.7 The continue statement 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "statement-007"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The continue statment"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | eval("continue;"); 26 | } catch ( e ) { 27 | result = expect; 28 | exception = e.toString(); 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "continue outside of an iteration statement" + 34 | " (threw " + exception +")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/statement-008.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: statement-008.js 3 | Corresponds To: 12.8-1-n.js 4 | ECMA Section: 12.8 The break statement 5 | Description: 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "statement-008"; 11 | var VERSION = "JS1_4"; 12 | var TITLE = "The break in statment"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | var result = "Failed"; 21 | var exception = "No exception thrown"; 22 | var expect = "Passed"; 23 | 24 | try { 25 | eval("break;"); 26 | } catch ( e ) { 27 | result = expect; 28 | exception = e.toString(); 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "break outside of an iteration statement" + 34 | " (threw " + exception +")", 35 | expect, 36 | result ); 37 | 38 | test(); 39 | 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/statement-009.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: 12.9-1-n.js 3 | ECMA Section: 12.9 The return statement 4 | Description: 5 | 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = "12.9-1-n"; 10 | var VERSION = "ECMA_1"; 11 | var TITLE = "The return statment"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " The return statement"); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var result = "Failed"; 20 | var exception = "No exception thrown"; 21 | var expect = "Passed"; 22 | 23 | try { 24 | eval("return;"); 25 | } catch ( e ) { 26 | result = expect; 27 | exception = e.toString(); 28 | } 29 | 30 | testcases[tc++] = new TestCase( 31 | SECTION, 32 | "return outside of a function" + 33 | " (threw " + exception +")", 34 | expect, 35 | result ); 36 | 37 | test(); 38 | 39 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Exceptions/string-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: string-002.js 3 | Corresponds To: 15.5.4.3-3-n.js 4 | ECMA Section: 15.5.4.3 String.prototype.valueOf() 5 | 6 | Description: Returns this string value. 7 | 8 | The valueOf function is not generic; it generates a 9 | runtime error if its this value is not a String object. 10 | Therefore it connot be transferred to the other kinds of 11 | objects for use as a method. 12 | 13 | Author: christine@netscape.com 14 | Date: 1 october 1997 15 | */ 16 | var SECTION = "string-002"; 17 | var VERSION = "JS1_4"; 18 | var TITLE = "String.prototype.valueOf"; 19 | 20 | startTest(); 21 | writeHeaderToLog( SECTION + " "+ TITLE); 22 | 23 | var tc = 0; 24 | var testcases = new Array(); 25 | 26 | var result = "Failed"; 27 | var exception = "No exception thrown"; 28 | var expect = "Passed"; 29 | 30 | try { 31 | var OBJECT =new Object(); 32 | OBJECT.valueOf = String.prototype.valueOf; 33 | result = OBJECT.valueOf(); 34 | } catch ( e ) { 35 | result = expect; 36 | exception = e.toString(); 37 | } 38 | 39 | testcases[tc++] = new TestCase( 40 | SECTION, 41 | "OBJECT = new Object; OBJECT.valueOf = String.prototype.valueOf;"+ 42 | "result = OBJECT.valueOf();" + 43 | " (threw " + exception +")", 44 | expect, 45 | result ); 46 | 47 | test(); 48 | 49 | 50 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/FunctionObjects/apply-001-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | print ("STATUS: f.apply crash test."); 26 | 27 | print ("BUGNUMBER: 21836"); 28 | 29 | function f () 30 | { 31 | } 32 | 33 | test (); 34 | 35 | function test () 36 | { 37 | f.apply(2,2); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/FunctionObjects/call-1.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: call-1.js 3 | Section: Function.prototype.call 4 | Description: 5 | 6 | 7 | Author: christine@netscape.com 8 | Date: 12 november 1997 9 | */ 10 | var SECTION = "call-1"; 11 | var VERSION = "ECMA_2"; 12 | var TITLE = "Function.prototype.call"; 13 | 14 | startTest(); 15 | writeHeaderToLog( SECTION + " "+ TITLE); 16 | 17 | var tc = 0; 18 | var testcases = new Array(); 19 | 20 | 21 | testcases[tc++] = new TestCase( SECTION, 22 | "ToString.call( this, this )", 23 | GLOBAL, 24 | ToString.call( this, this ) ); 25 | 26 | testcases[tc++] = new TestCase( SECTION, 27 | "ToString.call( Boolean, Boolean.prototype )", 28 | "false", 29 | ToString.call( Boolean, Boolean.prototype ) ); 30 | 31 | testcases[tc++] = new TestCase( SECTION, 32 | "ToString.call( Boolean, Boolean.prototype.valueOf() )", 33 | "false", 34 | ToString.call( Boolean, Boolean.prototype.valueOf() ) ); 35 | 36 | test(); 37 | 38 | function ToString( obj ) { 39 | return obj +""; 40 | } -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: 3 | * ECMA Section: 4 | * Description: 5 | * 6 | * 7 | * Author: christine@netscape.com 8 | * Date: 11 August 1998 9 | */ 10 | var SECTION = ""; 11 | var VERSION = "ECMA_2"; 12 | var TITLE = "Keywords"; 13 | 14 | startTest(); 15 | 16 | var result = "failed"; 17 | 18 | try { 19 | eval("super;"); 20 | } 21 | catch (x) { 22 | if (x instanceof SyntaxError) 23 | result = x.name; 24 | } 25 | 26 | AddTestCase( 27 | "using the expression \"super\" shouldn't cause js to crash", 28 | "SyntaxError", 29 | result ); 30 | 31 | test(); 32 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/LexicalConventions/regexp-literals-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: LexicalConventions/regexp-literals-001.js 3 | * ECMA Section: 7.8.5 4 | * Description: 5 | * 6 | * 7 | * Author: christine@netscape.com 8 | * Date: 11 August 1998 9 | */ 10 | var SECTION = "LexicalConventions/regexp-literals-001.js"; 11 | var VERSION = "ECMA_2"; 12 | var TITLE = "Regular Expression Literals"; 13 | 14 | startTest(); 15 | 16 | // Regular Expression Literals may not be empty; // should be regarded 17 | // as a comment, not a RegExp literal. 18 | 19 | s = //; 20 | 21 | "passed"; 22 | 23 | AddTestCase( 24 | "// should be a comment, not a regular expression literal", 25 | "passed", 26 | String(s)); 27 | 28 | AddTestCase( 29 | "// typeof object should be type of object declared on following line", 30 | "passed", 31 | (typeof s) == "string" ? "passed" : "failed" ); 32 | 33 | AddTestCase( 34 | "// should not return an object of the type RegExp", 35 | "passed", 36 | (typeof s == "object") ? "failed" : "passed" ); 37 | 38 | test(); 39 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/LexicalConventions/regexp-literals-002.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: LexicalConventions/regexp-literals-002.js 3 | * ECMA Section: 7.8.5 4 | * Description: Based on ECMA 2 Draft 8 October 1999 5 | * 6 | * Author: christine@netscape.com 7 | * Date: 19 February 1999 8 | */ 9 | var SECTION = "LexicalConventions/regexp-literals-002.js"; 10 | var VERSION = "ECMA_2"; 11 | var TITLE = "Regular Expression Literals"; 12 | 13 | startTest(); 14 | 15 | // A regular expression literal represents an object of type RegExp. 16 | 17 | AddTestCase( 18 | "// A regular expression literal represents an object of type RegExp.", 19 | "true", 20 | (/x*/ instanceof RegExp).toString() ); 21 | 22 | test(); 23 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/RegExp/exec-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: RegExp/exec-001.js 3 | * ECMA Section: 15.7.5.3 4 | * Description: Based on ECMA 2 Draft 7 February 1999 5 | * 6 | * Author: christine@netscape.com 7 | * Date: 19 February 1999 8 | */ 9 | var SECTION = "RegExp/exec-001"; 10 | var VERSION = "ECMA_2"; 11 | var TITLE = "RegExp.prototype.exec(string)"; 12 | 13 | startTest(); 14 | 15 | /* 16 | * for each test case, verify: 17 | * - type of object returned 18 | * - length of the returned array 19 | * - value of lastIndex 20 | * - value of index 21 | * - value of input 22 | * - value of the array indices 23 | */ 24 | 25 | // test cases without subpatterns 26 | // test cases with subpatterns 27 | // global property is true 28 | // global property is false 29 | // test cases in which the exec returns null 30 | 31 | testcases[0] = { expect:"PASSED", actual:"PASSED", description:"NO TESTS EXIST" }; 32 | 33 | test(); 34 | 35 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/RegExp/regress-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: RegExp/regress-001.js 3 | * ECMA Section: N/A 4 | * Description: Regression test case: 5 | * JS regexp anchoring on empty match bug 6 | * http://bugzilla.mozilla.org/show_bug.cgi?id=2157 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 19 February 1999 10 | */ 11 | var SECTION = "RegExp/hex-001.js"; 12 | var VERSION = "ECMA_2"; 13 | var TITLE = "JS regexp anchoring on empty match bug"; 14 | var BUGNUMBER = "http://bugzilla.mozilla.org/show_bug.cgi?id=2157"; 15 | 16 | startTest(); 17 | 18 | AddRegExpCases( /a||b/(''), 19 | "//a||b/('')", 20 | 1, 21 | [''] ); 22 | 23 | test(); 24 | 25 | function AddRegExpCases( regexp, str_regexp, length, matches_array ) { 26 | 27 | AddTestCase( 28 | "( " + str_regexp + " ).length", 29 | regexp.length, 30 | regexp.length ); 31 | 32 | 33 | for ( var matches = 0; matches < matches_array.length; matches++ ) { 34 | AddTestCase( 35 | "( " + str_regexp + " )[" + matches +"]", 36 | matches_array[matches], 37 | regexp[matches] ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Statements/dowhile-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: dowhile-001 3 | * ECMA Section: 4 | * Description: do...while statements 5 | * 6 | * 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 11 August 1998 10 | */ 11 | var SECTION = "dowhile-002"; 12 | var VERSION = "ECMA_2"; 13 | var TITLE = "do...while with a labeled continue statement"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | LabeledContinue( 0, 1 ); 22 | LabeledContinue( 1, 1 ); 23 | LabeledContinue( -1, 1 ); 24 | LabeledContinue( 5, 5 ); 25 | 26 | test(); 27 | 28 | function LabeledContinue( limit, expect ) { 29 | i = 0; 30 | woohoo: 31 | do { 32 | i++; 33 | continue woohoo; 34 | } while ( i < limit ); 35 | 36 | testcases[tc++] = new TestCase( 37 | SECTION, 38 | "do while ( " + i +" < " + limit +" )", 39 | expect, 40 | i ); 41 | } 42 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Statements/if-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: if-001.js 3 | * ECMA Section: 4 | * Description: The if statement 5 | * 6 | * Verify that assignment in the if expression is evaluated correctly. 7 | * Verifies the fix for bug http://scopus/bugsplat/show_bug.cgi?id=148822. 8 | * 9 | * Author: christine@netscape.com 10 | * Date: 28 August 1998 11 | */ 12 | var SECTION = "for-001"; 13 | var VERSION = "ECMA_2"; 14 | var TITLE = "The if statement"; 15 | var BUGNUMBER="148822"; 16 | 17 | startTest(); 18 | writeHeaderToLog( SECTION + " "+ TITLE); 19 | 20 | var tc = 0; 21 | var testcases = new Array(); 22 | 23 | var a = 0; 24 | var b = 0; 25 | var result = "passed"; 26 | 27 | if ( a = b ) { 28 | result = "failed: a = b should return 0"; 29 | } 30 | 31 | testcases[tc++] = new TestCase( 32 | SECTION, 33 | "if ( a = b ), where a and b are both equal to 0", 34 | "passed", 35 | result ); 36 | 37 | 38 | test(); 39 | 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Statements/label-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: label-001.js 3 | * ECMA Section: 4 | * Description: Labeled statements 5 | * 6 | * Labeled break and continue within a for loop. 7 | * 8 | * 9 | * Author: christine@netscape.com 10 | * Date: 11 August 1998 11 | */ 12 | var SECTION = "label-003"; 13 | var VERSION = "ECMA_2"; 14 | var TITLE = "Labeled statements"; 15 | 16 | startTest(); 17 | writeHeaderToLog( SECTION + " "+ TITLE); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | LabelTest(0, 0); 23 | LabelTest(1, 1) 24 | LabelTest(-1, 1000); 25 | LabelTest(false, 0); 26 | LabelTest(true, 1); 27 | 28 | test(); 29 | 30 | function LabelTest( limit, expect) { 31 | woo: for ( var result = 0; result < 1000; result++ ) { if (result == limit) { break woo; } else { continue woo; } }; 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "break out of a labeled for loop: "+ limit, 36 | expect, 37 | result ); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Statements/try-004.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: try-004.js 3 | * ECMA Section: 4 | * Description: The try statement 5 | * 6 | * This test has a try with one catch block but no finally. 7 | * 8 | * Author: christine@netscape.com 9 | * Date: 11 August 1998 10 | */ 11 | var SECTION = "try-004"; 12 | var VERSION = "ECMA_2"; 13 | var TITLE = "The try statement"; 14 | 15 | startTest(); 16 | writeHeaderToLog( SECTION + " "+ TITLE); 17 | 18 | var tc = 0; 19 | var testcases = new Array(); 20 | 21 | TryToCatch( "Math.PI", Math.PI ); 22 | TryToCatch( "Thrower(5)", "Caught 5" ); 23 | TryToCatch( "Thrower(\"some random exception\")", "Caught some random exception" ); 24 | 25 | test(); 26 | 27 | function Thrower( v ) { 28 | throw "Caught " + v; 29 | } 30 | 31 | /** 32 | * Evaluate a string. Catch any exceptions thrown. If no exception is 33 | * expected, verify the result of the evaluation. If an exception is 34 | * expected, verify that we got the right exception. 35 | */ 36 | 37 | function TryToCatch( value, expect ) { 38 | try { 39 | result = eval( value ); 40 | } catch ( e ) { 41 | result = e; 42 | } 43 | 44 | testcases[tc++] = new TestCase( 45 | SECTION, 46 | "eval( " + value +" )", 47 | expect, 48 | result ); 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/Statements/while-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File Name: while-001 3 | * ECMA Section: 4 | * Description: while statement 5 | * 6 | * Verify that the while statement is not executed if the while expression is 7 | * false 8 | * 9 | * Author: christine@netscape.com 10 | * Date: 11 August 1998 11 | */ 12 | var SECTION = "while-001"; 13 | var VERSION = "ECMA_2"; 14 | var TITLE = "while statement"; 15 | 16 | startTest(); 17 | writeHeaderToLog( SECTION + " "+ TITLE); 18 | 19 | var tc = 0; 20 | var testcases = new Array(); 21 | 22 | DoWhile(); 23 | test(); 24 | 25 | function DoWhile() { 26 | result = "pass"; 27 | 28 | while (false) { 29 | result = "fail"; 30 | break; 31 | } 32 | 33 | testcases[tc++] = new TestCase( 34 | SECTION, 35 | "while statement: don't evaluate statement is expression is false", 36 | "pass", 37 | result ); 38 | 39 | } -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/String/replace-001.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/tests/mozilla/ecma_2/String/replace-001.js -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/instanceof/instanceof-001.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: instanceof-1.js 3 | ECMA Section: 4 | Description: instanceof operator 5 | 6 | Author: christine@netscape.com 7 | Date: 12 november 1997 8 | */ 9 | var SECTION = ""; 10 | var VERSION = "ECMA_2"; 11 | var TITLE = "instanceof operator"; 12 | 13 | startTest(); 14 | writeHeaderToLog( SECTION + " "+ TITLE); 15 | 16 | var tc = 0; 17 | var testcases = new Array(); 18 | 19 | var b = new Boolean(); 20 | 21 | testcases[tc++] = new TestCase( SECTION, 22 | "var b = new Boolean(); b instanceof Boolean", 23 | true, 24 | b instanceof Boolean ); 25 | 26 | testcases[tc++] = new TestCase( SECTION, 27 | "b instanceof Object", 28 | true, 29 | b instanceof Object ); 30 | 31 | test(); 32 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_2/template.js: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Netscape Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/NPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is mozilla.org code. 13 | * 14 | * The Initial Developer of the Original Code is Netscape 15 | * Communications Corporation. Portions created by Netscape are 16 | * Copyright (C) 1998 Netscape Communications Corporation. All 17 | * Rights Reserved. 18 | * 19 | * Contributor(s): 20 | */ 21 | 22 | /** 23 | * File Name: template.js 24 | * Reference: ** replace with bugzilla URL or document reference ** 25 | * Description: ** replace with description of test ** 26 | * Author: ** replace with your e-mail address ** 27 | */ 28 | 29 | var SECTION = ""; // if ECMA test, provide section number 30 | var VERSION = "ECMA_2"; // Version of JavaScript or ECMA 31 | var TITLE = ""; // Provide ECMA section title or description 32 | var BUGNUMBER = ""; // Provide URL to bugsplat or bugzilla report 33 | 34 | startTest(); // leave this alone 35 | 36 | 37 | /* Calls to AddTestCase here */ 38 | 39 | test(); // leave this alone 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/FunExpr/fe-001-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | printStatus ("Function Expression test."); 31 | 32 | var x = function f(){return "inner";}(); 33 | var y = f(); 34 | reportFailure ("Previous statement should have thrown a ReferenceError"); 35 | 36 | exitFunc ("test"); 37 | } 38 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/FunExpr/fe-001.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | if (1) function f() {return 1;} 26 | if (0) function f() {return 0;} 27 | 28 | function test() 29 | { 30 | enterFunc ("test"); 31 | 32 | printStatus ("Function Expression Statements basic test."); 33 | 34 | reportCompare (1, f(), "Both functions were defined."); 35 | 36 | exitFunc ("test"); 37 | } 38 | 39 | test(); 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/FunExpr/fe-002.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | function f() 26 | { 27 | return "outer"; 28 | } 29 | 30 | function test() 31 | { 32 | enterFunc ("test"); 33 | printStatus ("Function Expression test."); 34 | 35 | var x = function f(){return "inner";}(); 36 | 37 | reportCompare ("outer", f(), 38 | "Inner function statement should not have been called."); 39 | 40 | exitFunc ("test"); 41 | } 42 | 43 | test(); 44 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/Function/call-001.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/tests/mozilla/ecma_3/Function/call-001.js -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/Function/regress-58274.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/tests/mozilla/ecma_3/Function/regress-58274.js -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/NumberFormatting/tostring-001.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | var n0 = 1e23; 30 | var n1 = 5e22; 31 | var n2 = 1.6e24; 32 | 33 | printStatus ("Number formatting test."); 34 | printBugNumber ("11178"); 35 | 36 | reportCompare ("1e+23", n0.toString(), "1e23 toString()"); 37 | reportCompare ("5e+22", n1.toString(), "5e22 toString()"); 38 | reportCompare ("1.6e+24", n2.toString(), "1.6e24 toString()"); 39 | 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/RegExp/regress-24712.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printBugNumber (24712); 32 | 33 | var re = /([\S]+([ \t]+[\S]+)*)[ \t]*=[ \t]*[\S]+/; 34 | var result = re.exec("Course_Creator = Test"); 35 | 36 | if (!result) 37 | reportFailure ("exec() returned null."); 38 | 39 | exitFunc ("test"); 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/RegExp/regress-28686.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printBugNumber (28686); 32 | 33 | var str = 'foo "bar" baz'; 34 | reportCompare ('foo \\"bar\\" baz', str.replace(/([\'\"])/g, "\\$1"), 35 | "str.replace failed."); 36 | 37 | exitFunc ("test"); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/Unicode/uc-001.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printStatus ("Unicode format-control character (Category Cf) test."); 32 | printBugNumber (23610); 33 | 34 | reportCompare ("no error", eval('"no\u200E error"'), 35 | "Unicode format-control character test (Category Cf.)"); 36 | 37 | exitFunc ("test"); 38 | } 39 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/Unicode/uc-002-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printStatus ("Non-character escapes in identifiers negative test."); 32 | printBugNumber (23607); 33 | 34 | reportCompare ("error", eval("\u0020 = 5"), 35 | "Non-character escapes in identifiers negative test."); 36 | 37 | exitFunc ("test"); 38 | } 39 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/Unicode/uc-002.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | test(); 26 | 27 | function test() 28 | { 29 | enterFunc ("test"); 30 | 31 | printStatus ("Unicode non-breaking space character test."); 32 | printBugNumber (23613); 33 | 34 | reportCompare ("no error", eval("'no'\u00A0+ ' error'"), 35 | "Unicode non-breaking space character test."); 36 | 37 | var str = "\u00A0foo"; 38 | reportCompare (0, str.search(/^\sfoo$/), 39 | "Unicode non-breaking space character regexp test."); 40 | 41 | exitFunc ("test"); 42 | } 43 | -------------------------------------------------------------------------------- /tests/mozilla/ecma_3/Unicode/uc-005.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/tests/mozilla/ecma_3/Unicode/uc-005.js -------------------------------------------------------------------------------- /tests/mozilla/js1_2/regexp/control_characters.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/charlietuna/JavaScriptCore-iOS/087e771e0cee34b4539ea3333d895430f08f1060/tests/mozilla/js1_2/regexp/control_characters.js -------------------------------------------------------------------------------- /tests/mozilla/js1_2/version120/shell.js: -------------------------------------------------------------------------------- 1 | /* 2 | * The contents of this file are subject to the Netscape Public 3 | * License Version 1.1 (the "License"); you may not use this file 4 | * except in compliance with the License. You may obtain a copy of 5 | * the License at http://www.mozilla.org/NPL/ 6 | * 7 | * Software distributed under the License is distributed on an "AS 8 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 | * implied. See the License for the specific language governing 10 | * rights and limitations under the License. 11 | * 12 | * The Original Code is mozilla.org code. 13 | * 14 | * The Initial Developer of the Original Code is Netscape 15 | * Communications Corporation. Portions created by Netscape are 16 | * Copyright (C) 1998 Netscape Communications Corporation. All 17 | * Rights Reserved. 18 | * 19 | * Contributor(s): 20 | */ 21 | 22 | /* all files in this dir need version(120) called before they are *loaded* */ 23 | 24 | version(120); -------------------------------------------------------------------------------- /tests/mozilla/js1_3/template.js: -------------------------------------------------------------------------------- 1 | /** 2 | File Name: switch_1.js 3 | Section: 4 | Description: 5 | 6 | http://scopus.mcom.com/bugsplat/show_bug.cgi?id=315767 7 | 8 | Verify that switches do not use strict equality in 9 | versions of JavaScript < 1.4 10 | 11 | Author: christine@netscape.com 12 | Date: 12 november 1997 13 | */ 14 | // onerror = err; 15 | 16 | var SECTION = "script_1; 17 | var VERSION = "JS1_3"; 18 | var TITLE = "NativeScript"; 19 | var BUGNUMBER="31567"; 20 | 21 | startTest(); 22 | writeHeaderToLog( SECTION + " "+ TITLE); 23 | 24 | var tc = 0; 25 | var testcases = new Array(); 26 | 27 | 28 | testcases[tc++] = new TestCase( SECTION, 29 | 30 | 31 | test(); 32 | function test() { 33 | for ( tc=0; tc < testcases.length; tc++ ) { 34 | testcases[tc].passed = writeTestCaseResult( 35 | testcases[tc].expect, 36 | testcases[tc].actual, 37 | testcases[tc].description +" = "+ 38 | testcases[tc].actual ); 39 | 40 | testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; 41 | } 42 | stopTest(); 43 | return ( testcases ); 44 | } 45 | -------------------------------------------------------------------------------- /tests/mozilla/js1_5/Exceptions/catchguard-002-n.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 | * 3 | * The contents of this file are subject to the Netscape Public 4 | * License Version 1.1 (the "License"); you may not use this file 5 | * except in compliance with the License. You may obtain a copy of 6 | * the License at http://www.mozilla.org/NPL/ 7 | * 8 | * Software distributed under the License is distributed on an "AS 9 | * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 10 | * implied. See the License for the specific language governing 11 | * rights and limitations under the License. 12 | * 13 | * The Original Code is Mozilla Communicator client code, released March 14 | * 31, 1998. 15 | * 16 | * The Initial Developer of the Original Code is Netscape Communications 17 | * Corporation. Portions created by Netscape are 18 | * Copyright (C) 1998 Netscape Communications Corporation. All 19 | * Rights Reserved. 20 | * 21 | * Contributor(s): 22 | * Rob Ginda rginda@netscape.com 23 | */ 24 | 25 | function test() 26 | { 27 | enterFunc ("test"); 28 | 29 | var EXCEPTION_DATA = "String exception"; 30 | var e; 31 | 32 | printStatus ("Catchguard var declaration negative test."); 33 | 34 | try 35 | { 36 | throw EXCEPTION_DATA; 37 | } 38 | catch (var e) 39 | { 40 | 41 | } 42 | 43 | reportFailure ("var in catch clause should have caused an error."); 44 | 45 | exitFunc ("test"); 46 | } 47 | -------------------------------------------------------------------------------- /tests/mozilla/js1_6/Array/browser.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/mozilla/js1_6/Array/shell.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/mozilla/js1_6/README: -------------------------------------------------------------------------------- 1 | JavaScript 1.6 2 | -------------------------------------------------------------------------------- /tests/mozilla/js1_6/Regress/browser.js: -------------------------------------------------------------------------------- 1 | // dummy file 2 | -------------------------------------------------------------------------------- /tests/mozilla/js1_6/Regress/shell.js: -------------------------------------------------------------------------------- 1 | // dummy file 2 | -------------------------------------------------------------------------------- /tests/mozilla/js1_6/String/browser.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/mozilla/js1_6/String/shell.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/mozilla/menufoot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/perf/bench-allocate-nonretained.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | for (var i = 0; i < 500; ++i) { 3 | for (var j = 0; j < 100000; ++j) 4 | var a = {}; 5 | } 6 | })(); 7 | -------------------------------------------------------------------------------- /tests/perf/bench-allocate-retained.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var a = new Array(100000); 3 | for (var i = 0; i < 100000; ++i) 4 | a[i] = {}; 5 | 6 | for (var i = 0; i < 500; ++i) { 7 | for (var j = 0; j < 100000; ++j) 8 | var b = {}; 9 | } 10 | })(); 11 | -------------------------------------------------------------------------------- /wtf/Forward.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_Forward_h 22 | #define WTF_Forward_h 23 | 24 | #include 25 | 26 | namespace WTF { 27 | template class ListRefPtr; 28 | template class OwnArrayPtr; 29 | template class OwnPtr; 30 | template class PassOwnPtr; 31 | template class PassRefPtr; 32 | template class RefPtr; 33 | template class Vector; 34 | } 35 | 36 | using WTF::ListRefPtr; 37 | using WTF::OwnArrayPtr; 38 | using WTF::OwnPtr; 39 | using WTF::PassOwnPtr; 40 | using WTF::PassRefPtr; 41 | using WTF::RefPtr; 42 | using WTF::Vector; 43 | 44 | #endif // WTF_Forward_h 45 | -------------------------------------------------------------------------------- /wtf/GetPtr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Apple Computer, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_GetPtr_h 22 | #define WTF_GetPtr_h 23 | 24 | namespace WTF { 25 | 26 | template inline T* getPtr(T* p) 27 | { 28 | return p; 29 | } 30 | 31 | } // namespace WTF 32 | 33 | #endif // WTF_GetPtr_h 34 | -------------------------------------------------------------------------------- /wtf/UnusedParam.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Apple Computer, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef WTF_UnusedParam_h 22 | #define WTF_UnusedParam_h 23 | 24 | /* don't use this for C++, it should only be used in plain C files or 25 | ObjC methods, where leaving off the parameter name is not allowed. */ 26 | 27 | #define UNUSED_PARAM(x) (void)x 28 | 29 | #endif /* WTF_UnusedParam_h */ 30 | -------------------------------------------------------------------------------- /wtf/gobject/GRefPtr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Martin Robinson 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #include "config.h" 20 | #include "GRefPtr.h" 21 | 22 | #include 23 | 24 | namespace WTF { 25 | 26 | template <> GHashTable* refGPtr(GHashTable* ptr) 27 | { 28 | if (ptr) 29 | g_hash_table_ref(ptr); 30 | return ptr; 31 | } 32 | 33 | template <> void derefGPtr(GHashTable* ptr) 34 | { 35 | g_hash_table_unref(ptr); 36 | } 37 | 38 | } // namespace WTF 39 | -------------------------------------------------------------------------------- /wtf/iphone/WebCoreThread.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 Apple Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 15 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 18 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | 27 | #include "WebCoreThread.h" 28 | 29 | bool (*WebCoreWebThreadIsLockedOrDisabled)(void); 30 | -------------------------------------------------------------------------------- /wtf/text/AtomicStringImpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Apple Computer, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public License 15 | * along with this library; see the file COPYING.LIB. If not, write to 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | * 19 | */ 20 | 21 | #ifndef AtomicStringImpl_h 22 | #define AtomicStringImpl_h 23 | 24 | #include "StringImpl.h" 25 | 26 | // FIXME: This is a temporary layering violation while we move string code to WTF. 27 | // Landing the file moves in one patch, will follow on with patches to change the namespaces. 28 | namespace WebCore { 29 | 30 | class AtomicStringImpl : public StringImpl 31 | { 32 | public: 33 | AtomicStringImpl() : StringImpl(0) {} 34 | }; 35 | 36 | } 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /wtf/unicode/Unicode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 George Staikos 3 | * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. 4 | * Copyright (C) 2007-2009 Torch Mobile, Inc. 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public License 17 | * along with this library; see the file COPYING.LIB. If not, write to 18 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | #ifndef WTF_UNICODE_H 24 | #define WTF_UNICODE_H 25 | 26 | #include 27 | 28 | #if USE(QT4_UNICODE) 29 | #include "qt4/UnicodeQt4.h" 30 | #elif USE(ICU_UNICODE) 31 | #include 32 | #elif USE(GLIB_UNICODE) 33 | #include 34 | #elif USE(WINCE_UNICODE) 35 | #include 36 | #else 37 | #error "Unknown Unicode implementation" 38 | #endif 39 | 40 | COMPILE_ASSERT(sizeof(UChar) == 2, UCharIsTwoBytes); 41 | 42 | #endif // WTF_UNICODE_H 43 | --------------------------------------------------------------------------------