diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore')
46 files changed, 2300 insertions, 959 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index c8bba0f..cd46bf5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,464 @@ +2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> + + Unreviewed make dist build fix. + + * GNUmakefile.am: + +2009-07-13 Drew Wilson <atwilson@google.com> + + Reviewed by David Levin. + + Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs + https://bugs.webkit.org/show_bug.cgi?id=26932 + + Added ENABLE(SHARED_WORKERS) flag (off by default). + + * Configurations/FeatureDefines.xcconfig: + +2009-07-07 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Maciej Stachoviak. + + https://bugs.webkit.org/show_bug.cgi?id=27058 + + Removed superfluous parenthesis around single expression. + Compilers on Symbian platform fail to properly parse and compile. + + * JavaScriptCore/wtf/Platform.h: + +2009-07-13 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Maciej Stachoviak. + + https://bugs.webkit.org/show_bug.cgi?id=27054 + + Renamed Translator to HashTranslator + + Codewarrior compiler (WINSCW) latest b482 cannot resolve typename + mismatch between template declaration and definition + (HashTranslator / Translator) + + * wtf/HashSet.h: + +2009-07-13 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=27053 + + Ambiguity in LabelScope initialization + + Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve + type of "0" unambiguously. Set expression explicitly to + PassRefPtr<Label>::PassRefPtr() + + * bytecompiler/BytecodeGenerator.cpp + +2009-07-11 Simon Fraser <simon.fraser@apple.com> + + Enable support for accelerated compositing and 3d transforms on Leopard. + <https://bugs.webkit.org/show_bug.cgi?id=20166> + <rdar://problem/6120614> + + Reviewed by Oliver Hunt. + + * Configurations/FeatureDefines.xcconfig: + * wtf/Platform.h: + +2009-07-10 Mark Rowe <mrowe@apple.com> + + Second part of the "make Windows happier" dance. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-10 Mark Rowe <mrowe@apple.com> + + Try and make the Windows build happy. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-10 Kevin McCullough <kmccullough@apple.com> + + Reviewed by Geoffrey Garen. + + * debugger/Debugger.h: Made this function virtual for use in WebCore's + WebInspector. + +2009-07-10 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Darin Adler. + + ParserArenaDeletable should override delete + https://bugs.webkit.org/show_bug.cgi?id=26790 + + ParserArenaDeletable overrides new, but it does not override delete. + ParserArenaDeletable must be freed by fastFree + because it is allocated by fastMalloc. + + * parser/NodeConstructors.h: + (JSC::ParserArenaDeletable::operator delete): + * parser/Nodes.h: + +2009-07-10 Adam Roben <aroben@apple.com> + + Sort all our Xcode projects + + Accomplished using sort-Xcode-project-file. + + Requested by Dave Kilzer. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-07-09 Maciej Stachowiak <mjs@apple.com> + + Not reviewed, build fix. + + Windows build fix for the last change. + + * wtf/dtoa.cpp: Forgot to include Vector.h + +2009-07-09 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Darin Adler. + + REGRESSION: crash in edge cases of floating point parsing. + https://bugs.webkit.org/show_bug.cgi?id=27110 + <rdar://problem/7044458> + + Tests: fast/css/number-parsing-crash.html + fast/css/number-parsing-crash.html + fast/js/number-parsing-crash.html + + * wtf/dtoa.cpp: + (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector + with inline capacity + + (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts. + Added an assertion to verify that invariants are maintained. + + All other functions are adapted fairly mechanically to the above changes. + (WTF::BigInt::clear): + (WTF::BigInt::size): + (WTF::BigInt::resize): + (WTF::BigInt::words): + (WTF::BigInt::append): + (WTF::multadd): + (WTF::s2b): + (WTF::i2b): + (WTF::mult): + (WTF::cmp): + (WTF::diff): + (WTF::b2d): + (WTF::d2b): + (WTF::ratio): + (WTF::strtod): + (WTF::quorem): + (WTF::dtoa): + +2009-07-09 Drew Wilson <atwilson@google.com> + + Reviewed by Alexey Proskuryakov. + + Turned on CHANNEL_MESSAGING by default because the MessageChannel API + can now be implemented for Web Workers and is reasonably stable. + + * Configurations/FeatureDefines.xcconfig: + +2009-07-09 Oliver Hunt <oliver@apple.com> + + Reviewed by NOBODY (Build fix). + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2009-07-09 Oliver Hunt <oliver@apple.com> + + Reviewed by Darin Adler. + + Bug 27016 - Interpreter crashes due to invalid array indexes + <https://bugs.webkit.org/show_bug.cgi?id=27016> + + Unsigned vs signed conversions results in incorrect behaviour in + 64bit interpreter builds. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2009-07-09 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Fisher. + + [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build. + https://bugs.webkit.org/show_bug.cgi?id=27135 + + * JavaScriptCore.gypi: Added. + +2009-07-09 Joe Mason <joe.mason@torchmobile.com> + + Reviewed by George Staikos. + + Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com> + + https://bugs.webkit.org/show_bug.cgi?id=27031 + Add an override for deleteOwnedPtr(HDC) on Windows + + * wtf/OwnPtrCommon.h: + * wtf/OwnPtrWin.cpp: + (WTF::deleteOwnedPtr): + +2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Darin Adler. + + Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc + on SYMBIAN. + + https://bugs.webkit.org/show_bug.cgi?id=27026 + + Based on Norbert Leser's work. + + * jsc.cpp: + (printUsageStatement): + (parseArguments): + * wtf/Platform.h: + +2009-07-07 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Sam Weinig. + + Stop loading constants into the register file. + + Instead, use high register values (highest bit bar the sign bit set) to indicate + constants in the instruction stream, and when we encounter such a value load it + directly from the CodeBlock. + + Since constants are no longer copied into the register file, this patch renders + the 'unexpected constant' mechanism redundant, and removes it. + + 2% improvement, thanks to Sam Weinig. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::mark): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isTemporaryRegisterIndex): + (JSC::CodeBlock::constantRegister): + (JSC::CodeBlock::isConstantRegisterIndex): + (JSC::CodeBlock::getConstant): + (JSC::ExecState::r): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::preserveLastVar): + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::addConstantValue): + (JSC::BytecodeGenerator::emitEqualityOp): + (JSC::BytecodeGenerator::emitLoad): + (JSC::BytecodeGenerator::emitResolveBase): + (JSC::BytecodeGenerator::emitResolveWithBase): + (JSC::BytecodeGenerator::emitNewError): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNode): + * interpreter/CallFrame.h: + (JSC::ExecState::noCaller): + (JSC::ExecState::hasHostCallFrameFlag): + (JSC::ExecState::addHostCallFrameFlag): + (JSC::ExecState::removeHostCallFrameFlag): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolve): + (JSC::Interpreter::resolveSkip): + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::resolveBase): + (JSC::Interpreter::resolveBaseAndProperty): + (JSC::Interpreter::resolveBaseAndFunc): + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::throwException): + (JSC::Interpreter::createExceptionScope): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveArguments): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoadDouble): + (JSC::JIT::emitLoadInt32ToDouble): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_error): + (JSC::JIT::emit_op_enter): + (JSC::JIT::emit_op_enter_with_activation): + * parser/Nodes.cpp: + (JSC::DeleteResolveNode::emitBytecode): + (JSC::DeleteValueNode::emitBytecode): + (JSC::PrefixResolveNode::emitBytecode): + * runtime/JSActivation.cpp: + (JSC::JSActivation::JSActivation): + * wtf/Platform.h: + +2009-07-07 Mark Rowe <mrowe@apple.com> + + Reviewed by Darin Adler. + + Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>. + Bug 27025: Crashes and regression test failures related to regexps in 64-bit + + For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but + neglects to save and restore it. The change in handling of the output vector in r45545 + altered code generation so that the RegExp::match was now storing important data in rbx, + which caused crashes and bogus results when it was clobbered. + + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): Save rbx. + (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx. + +2009-07-06 Ada Chan <adachan@apple.com> + + Reviewed by Darin Adler and Mark Rowe. + + Decommitted spans are added to the list of normal spans rather than + the returned spans in TCMalloc_PageHeap::Delete(). + https://bugs.webkit.org/show_bug.cgi?id=26998 + + In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in + the process of merging with neighboring spans that are also decommitted. + The merged span needs to be placed in the list of returned spans (spans + whose memory has been returned to the system). Right now it's always added + to the list of the normal spans which can theoretically cause thrashing. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::Delete): + +2009-07-05 Lars Knoll <lars.knoll@nokia.com> + + Reviewed by Maciej Stachowiak. + + https://bugs.webkit.org/show_bug.cgi?id=26843 + + Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian. + + The Metrowerks compiler on the Symbian platform moves the globally + defined Hashtables into read-only memory, despite one of the members + being mutable. This causes crashes at run-time due to write access to + read-only memory. + + Avoid the use of const with this compiler by introducing the + JSC_CONST_HASHTABLE macro. + + Based on idea by Norbert Leser. + + * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW. + * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables. + * runtime/JSGlobalData.cpp: Import various global hashtables via the macro. + +2009-07-04 Dan Bernstein <mitz@apple.com> + + - debug build fix + + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::getLastParen): + +2009-07-03 Yong Li <yong.li@torchmobile.com> + + Reviewed by Maciej Stachowiak (and revised slightly) + + RegExp::match to be optimized + https://bugs.webkit.org/show_bug.cgi?id=26957 + + Allow regexp matching to use Vectors with inline capacity instead of + allocating a new ovector buffer every time. + + ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall. + + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/RegExp.h: + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate): + (JSC::RegExpConstructorPrivate::lastOvector): + (JSC::RegExpConstructorPrivate::tempOvector): + (JSC::RegExpConstructorPrivate::changeLastOvector): + (JSC::RegExpConstructor::performMatch): + (JSC::RegExpMatchesArray::RegExpMatchesArray): + (JSC::RegExpMatchesArray::fillArrayInstance): + (JSC::RegExpConstructor::getBackref): + (JSC::RegExpConstructor::getLastParen): + (JSC::RegExpConstructor::getLeftContext): + (JSC::RegExpConstructor::getRightContext): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncSplit): + +2009-06-30 Kwang Yul Seo <skyul@company100.net> + + Reviewed by Eric Seidel. + + Override operator new/delete with const std::nothrow_t& as the second + argument. + https://bugs.webkit.org/show_bug.cgi?id=26792 + + On Windows CE, operator new/delete, new[]/delete[] with const + std::nothrow_t& must be overrided because some standard template + libraries use these operators. + + The problem occurs when memory allocated by new(size_t s, const + std::nothrow_t&) is freed by delete(void* p). This causes the umatched + malloc/free problem. + + The patch overrides all new, delete, new[] and delete[] to use + fastMaloc and fastFree consistently. + + * wtf/FastMalloc.h: + (throw): + +2009-06-30 Gabor Loki <loki@inf.u-szeged.hu> + + Reviewed by Sam Weinig. + + <https://bugs.webkit.org/show_bug.cgi?id=24986> + + Remove unnecessary references to AssemblerBuffer. + + * interpreter/Interpreter.cpp: + * interpreter/Interpreter.h: + +2009-06-29 David Levin <levin@chromium.org> + + Reviewed by Oliver Hunt. + + Still seeing occasional leaks from UString::sharedBuffer code + https://bugs.webkit.org/show_bug.cgi?id=26420 + + The problem is that the pointer to the memory allocation isn't visible + by "leaks" due to the lower bits being used as flags. The fix is to + make the pointer visible in memory (in debug only). The downside of + this fix that the memory allocated by sharedBuffer will still look like + a leak in non-debug builds when any flags are set. + + * wtf/PtrAndFlags.h: + (WTF::PtrAndFlags::set): + +2009-06-29 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Remove more unused scons support. + + * SConstruct: Removed. + +2009-06-29 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters + <https://bugs.webkit.org/show_bug.cgi?id=26802> + + In the original JSON.parse patch unicode was handled correctly, however in some last + minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug. + + * runtime/LiteralParser.cpp: + (JSC::isSafeStringCharacter): + (JSC::LiteralParser::Lexer::lexString): + 2009-06-26 Oliver Hunt <oliver@apple.com> Reviewed by Dan Bernstein. diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi new file mode 100644 index 0000000..2d69c7d --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi @@ -0,0 +1,452 @@ +{ + 'variables': { + 'javascriptcore_files': [ + 'AllInOneFile.cpp', + 'API/APICast.h', + 'API/JavaScript.h', + 'API/JavaScriptCore.h', + 'API/JSBase.cpp', + 'API/JSBase.h', + 'API/JSBasePrivate.h', + 'API/JSCallbackConstructor.cpp', + 'API/JSCallbackConstructor.h', + 'API/JSCallbackFunction.cpp', + 'API/JSCallbackFunction.h', + 'API/JSCallbackObject.cpp', + 'API/JSCallbackObject.h', + 'API/JSCallbackObjectFunctions.h', + 'API/JSClassRef.cpp', + 'API/JSClassRef.h', + 'API/JSContextRef.cpp', + 'API/JSContextRef.h', + 'API/JSObjectRef.cpp', + 'API/JSObjectRef.h', + 'API/JSProfilerPrivate.cpp', + 'API/JSProfilerPrivate.h', + 'API/JSRetainPtr.h', + 'API/JSStringRef.cpp', + 'API/JSStringRef.h', + 'API/JSStringRefBSTR.cpp', + 'API/JSStringRefBSTR.h', + 'API/JSStringRefCF.cpp', + 'API/JSStringRefCF.h', + 'API/JSValueRef.cpp', + 'API/JSValueRef.h', + 'API/OpaqueJSString.cpp', + 'API/OpaqueJSString.h', + 'API/tests/JSNode.h', + 'API/tests/JSNodeList.h', + 'API/tests/Node.h', + 'API/tests/NodeList.h', + 'API/WebKitAvailability.h', + 'assembler/AbstractMacroAssembler.h', + 'assembler/ARMv7Assembler.h', + 'assembler/AssemblerBuffer.h', + 'assembler/CodeLocation.h', + 'assembler/MacroAssembler.h', + 'assembler/MacroAssemblerARMv7.h', + 'assembler/MacroAssemblerCodeRef.h', + 'assembler/MacroAssemblerX86.h', + 'assembler/MacroAssemblerX86_64.h', + 'assembler/MacroAssemblerX86Common.h', + 'assembler/X86Assembler.h', + 'bytecode/CodeBlock.cpp', + 'bytecode/CodeBlock.h', + 'bytecode/EvalCodeCache.h', + 'bytecode/Instruction.h', + 'bytecode/JumpTable.cpp', + 'bytecode/JumpTable.h', + 'bytecode/Opcode.cpp', + 'bytecode/Opcode.h', + 'bytecode/SamplingTool.cpp', + 'bytecode/SamplingTool.h', + 'bytecode/StructureStubInfo.cpp', + 'bytecode/StructureStubInfo.h', + 'bytecompiler/BytecodeGenerator.cpp', + 'bytecompiler/BytecodeGenerator.h', + 'bytecompiler/Label.h', + 'bytecompiler/LabelScope.h', + 'bytecompiler/RegisterID.h', + 'config.h', + 'debugger/Debugger.cpp', + 'debugger/Debugger.h', + 'debugger/DebuggerActivation.cpp', + 'debugger/DebuggerActivation.h', + 'debugger/DebuggerCallFrame.cpp', + 'debugger/DebuggerCallFrame.h', + 'icu/unicode/parseerr.h', + 'icu/unicode/platform.h', + 'icu/unicode/putil.h', + 'icu/unicode/uchar.h', + 'icu/unicode/ucnv.h', + 'icu/unicode/ucnv_err.h', + 'icu/unicode/ucol.h', + 'icu/unicode/uconfig.h', + 'icu/unicode/uenum.h', + 'icu/unicode/uiter.h', + 'icu/unicode/uloc.h', + 'icu/unicode/umachine.h', + 'icu/unicode/unorm.h', + 'icu/unicode/urename.h', + 'icu/unicode/uset.h', + 'icu/unicode/ustring.h', + 'icu/unicode/utf.h', + 'icu/unicode/utf16.h', + 'icu/unicode/utf8.h', + 'icu/unicode/utf_old.h', + 'icu/unicode/utypes.h', + 'icu/unicode/uversion.h', + 'interpreter/CachedCall.h', + 'interpreter/CallFrame.cpp', + 'interpreter/CallFrame.h', + 'interpreter/CallFrameClosure.h', + 'interpreter/Interpreter.cpp', + 'interpreter/Interpreter.h', + 'interpreter/Register.h', + 'interpreter/RegisterFile.cpp', + 'interpreter/RegisterFile.h', + 'JavaScriptCorePrefix.h', + 'jit/ExecutableAllocator.cpp', + 'jit/ExecutableAllocator.h', + 'jit/ExecutableAllocatorFixedVMPool.cpp', + 'jit/ExecutableAllocatorPosix.cpp', + 'jit/ExecutableAllocatorWin.cpp', + 'jit/JIT.cpp', + 'jit/JIT.h', + 'jit/JITArithmetic.cpp', + 'jit/JITCall.cpp', + 'jit/JITCode.h', + 'jit/JITInlineMethods.h', + 'jit/JITOpcodes.cpp', + 'jit/JITPropertyAccess.cpp', + 'jit/JITStubCall.h', + 'jit/JITStubs.cpp', + 'jit/JITStubs.h', + 'jsc.cpp', + 'os-win32/stdbool.h', + 'os-win32/stdint.h', + 'parser/Lexer.cpp', + 'parser/Lexer.h', + 'parser/NodeConstructors.h', + 'parser/NodeInfo.h', + 'parser/Nodes.cpp', + 'parser/Nodes.h', + 'parser/Parser.cpp', + 'parser/Parser.h', + 'parser/ParserArena.cpp', + 'parser/ParserArena.h', + 'parser/ResultType.h', + 'parser/SourceCode.h', + 'parser/SourceProvider.h', + 'pcre/pcre.h', + 'pcre/pcre_compile.cpp', + 'pcre/pcre_exec.cpp', + 'pcre/pcre_internal.h', + 'pcre/pcre_tables.cpp', + 'pcre/pcre_ucp_searchfuncs.cpp', + 'pcre/pcre_xclass.cpp', + 'pcre/ucpinternal.h', + 'pcre/ucptable.cpp', + 'profiler/CallIdentifier.h', + 'profiler/HeavyProfile.cpp', + 'profiler/HeavyProfile.h', + 'profiler/Profile.cpp', + 'profiler/Profile.h', + 'profiler/ProfileGenerator.cpp', + 'profiler/ProfileGenerator.h', + 'profiler/ProfileNode.cpp', + 'profiler/ProfileNode.h', + 'profiler/Profiler.cpp', + 'profiler/Profiler.h', + 'profiler/ProfilerServer.h', + 'profiler/TreeProfile.cpp', + 'profiler/TreeProfile.h', + 'runtime/ArgList.cpp', + 'runtime/ArgList.h', + 'runtime/Arguments.cpp', + 'runtime/Arguments.h', + 'runtime/ArrayConstructor.cpp', + 'runtime/ArrayConstructor.h', + 'runtime/ArrayPrototype.cpp', + 'runtime/ArrayPrototype.h', + 'runtime/BatchedTransitionOptimizer.h', + 'runtime/BooleanConstructor.cpp', + 'runtime/BooleanConstructor.h', + 'runtime/BooleanObject.cpp', + 'runtime/BooleanObject.h', + 'runtime/BooleanPrototype.cpp', + 'runtime/BooleanPrototype.h', + 'runtime/CallData.cpp', + 'runtime/CallData.h', + 'runtime/ClassInfo.h', + 'runtime/Collector.cpp', + 'runtime/Collector.h', + 'runtime/CollectorHeapIterator.h', + 'runtime/CommonIdentifiers.cpp', + 'runtime/CommonIdentifiers.h', + 'runtime/Completion.cpp', + 'runtime/Completion.h', + 'runtime/ConstructData.cpp', + 'runtime/ConstructData.h', + 'runtime/DateConstructor.cpp', + 'runtime/DateConstructor.h', + 'runtime/DateConversion.cpp', + 'runtime/DateConversion.h', + 'runtime/DateInstance.cpp', + 'runtime/DateInstance.h', + 'runtime/DatePrototype.cpp', + 'runtime/DatePrototype.h', + 'runtime/Error.cpp', + 'runtime/Error.h', + 'runtime/ErrorConstructor.cpp', + 'runtime/ErrorConstructor.h', + 'runtime/ErrorInstance.cpp', + 'runtime/ErrorInstance.h', + 'runtime/ErrorPrototype.cpp', + 'runtime/ErrorPrototype.h', + 'runtime/ExceptionHelpers.cpp', + 'runtime/ExceptionHelpers.h', + 'runtime/FunctionConstructor.cpp', + 'runtime/FunctionConstructor.h', + 'runtime/FunctionPrototype.cpp', + 'runtime/FunctionPrototype.h', + 'runtime/GetterSetter.cpp', + 'runtime/GetterSetter.h', + 'runtime/GlobalEvalFunction.cpp', + 'runtime/GlobalEvalFunction.h', + 'runtime/Identifier.cpp', + 'runtime/Identifier.h', + 'runtime/InitializeThreading.cpp', + 'runtime/InitializeThreading.h', + 'runtime/InternalFunction.cpp', + 'runtime/InternalFunction.h', + 'runtime/JSActivation.cpp', + 'runtime/JSActivation.h', + 'runtime/JSArray.cpp', + 'runtime/JSArray.h', + 'runtime/JSByteArray.cpp', + 'runtime/JSByteArray.h', + 'runtime/JSCell.cpp', + 'runtime/JSCell.h', + 'runtime/JSFunction.cpp', + 'runtime/JSFunction.h', + 'runtime/JSGlobalData.cpp', + 'runtime/JSGlobalData.h', + 'runtime/JSGlobalObject.cpp', + 'runtime/JSGlobalObject.h', + 'runtime/JSGlobalObjectFunctions.cpp', + 'runtime/JSGlobalObjectFunctions.h', + 'runtime/JSImmediate.cpp', + 'runtime/JSImmediate.h', + 'runtime/JSLock.cpp', + 'runtime/JSLock.h', + 'runtime/JSNotAnObject.cpp', + 'runtime/JSNotAnObject.h', + 'runtime/JSNumberCell.cpp', + 'runtime/JSNumberCell.h', + 'runtime/JSObject.cpp', + 'runtime/JSObject.h', + 'runtime/JSONObject.cpp', + 'runtime/JSONObject.h', + 'runtime/JSPropertyNameIterator.cpp', + 'runtime/JSPropertyNameIterator.h', + 'runtime/JSStaticScopeObject.cpp', + 'runtime/JSStaticScopeObject.h', + 'runtime/JSString.cpp', + 'runtime/JSString.h', + 'runtime/JSType.h', + 'runtime/JSValue.cpp', + 'runtime/JSValue.h', + 'runtime/JSVariableObject.cpp', + 'runtime/JSVariableObject.h', + 'runtime/JSWrapperObject.cpp', + 'runtime/JSWrapperObject.h', + 'runtime/LiteralParser.cpp', + 'runtime/LiteralParser.h', + 'runtime/Lookup.cpp', + 'runtime/Lookup.h', + 'runtime/MathObject.cpp', + 'runtime/MathObject.h', + 'runtime/NativeErrorConstructor.cpp', + 'runtime/NativeErrorConstructor.h', + 'runtime/NativeErrorPrototype.cpp', + 'runtime/NativeErrorPrototype.h', + 'runtime/NativeFunctionWrapper.h', + 'runtime/NumberConstructor.cpp', + 'runtime/NumberConstructor.h', + 'runtime/NumberObject.cpp', + 'runtime/NumberObject.h', + 'runtime/NumberPrototype.cpp', + 'runtime/NumberPrototype.h', + 'runtime/ObjectConstructor.cpp', + 'runtime/ObjectConstructor.h', + 'runtime/ObjectPrototype.cpp', + 'runtime/ObjectPrototype.h', + 'runtime/Operations.cpp', + 'runtime/Operations.h', + 'runtime/PropertyMapHashTable.h', + 'runtime/PropertyNameArray.cpp', + 'runtime/PropertyNameArray.h', + 'runtime/PropertySlot.cpp', + 'runtime/PropertySlot.h', + 'runtime/Protect.h', + 'runtime/PrototypeFunction.cpp', + 'runtime/PrototypeFunction.h', + 'runtime/PutPropertySlot.h', + 'runtime/RegExp.cpp', + 'runtime/RegExp.h', + 'runtime/RegExpConstructor.cpp', + 'runtime/RegExpConstructor.h', + 'runtime/RegExpMatchesArray.h', + 'runtime/RegExpObject.cpp', + 'runtime/RegExpObject.h', + 'runtime/RegExpPrototype.cpp', + 'runtime/RegExpPrototype.h', + 'runtime/ScopeChain.cpp', + 'runtime/ScopeChain.h', + 'runtime/ScopeChainMark.h', + 'runtime/SmallStrings.cpp', + 'runtime/SmallStrings.h', + 'runtime/StringConstructor.cpp', + 'runtime/StringConstructor.h', + 'runtime/StringObject.cpp', + 'runtime/StringObject.h', + 'runtime/StringObjectThatMasqueradesAsUndefined.h', + 'runtime/StringPrototype.cpp', + 'runtime/StringPrototype.h', + 'runtime/Structure.cpp', + 'runtime/Structure.h', + 'runtime/StructureChain.cpp', + 'runtime/StructureChain.h', + 'runtime/StructureTransitionTable.h', + 'runtime/SymbolTable.h', + 'runtime/TimeoutChecker.cpp', + 'runtime/TimeoutChecker.h', + 'runtime/Tracing.h', + 'runtime/TypeInfo.h', + 'runtime/UString.cpp', + 'runtime/UString.h', + 'wrec/CharacterClass.cpp', + 'wrec/CharacterClass.h', + 'wrec/CharacterClassConstructor.cpp', + 'wrec/CharacterClassConstructor.h', + 'wrec/Escapes.h', + 'wrec/Quantifier.h', + 'wrec/WREC.cpp', + 'wrec/WREC.h', + 'wrec/WRECFunctors.cpp', + 'wrec/WRECFunctors.h', + 'wrec/WRECGenerator.cpp', + 'wrec/WRECGenerator.h', + 'wrec/WRECParser.cpp', + 'wrec/WRECParser.h', + 'wtf/AlwaysInline.h', + 'wtf/ASCIICType.h', + 'wtf/Assertions.cpp', + 'wtf/Assertions.h', + 'wtf/AVLTree.h', + 'wtf/ByteArray.cpp', + 'wtf/ByteArray.h', + 'wtf/chromium/ChromiumThreading.h', + 'wtf/chromium/MainThreadChromium.cpp', + 'wtf/CrossThreadRefCounted.h', + 'wtf/CurrentTime.cpp', + 'wtf/CurrentTime.h', + 'wtf/DateMath.cpp', + 'wtf/DateMath.h', + 'wtf/Deque.h', + 'wtf/DisallowCType.h', + 'wtf/dtoa.cpp', + 'wtf/dtoa.h', + 'wtf/FastAllocBase.h', + 'wtf/FastMalloc.cpp', + 'wtf/FastMalloc.h', + 'wtf/Forward.h', + 'wtf/GetPtr.h', + 'wtf/GOwnPtr.cpp', + 'wtf/GOwnPtr.h', + 'wtf/gtk/MainThreadGtk.cpp', + 'wtf/gtk/ThreadingGtk.cpp', + 'wtf/HashCountedSet.h', + 'wtf/HashFunctions.h', + 'wtf/HashIterators.h', + 'wtf/HashMap.h', + 'wtf/HashSet.h', + 'wtf/HashTable.cpp', + 'wtf/HashTable.h', + 'wtf/HashTraits.h', + 'wtf/ListHashSet.h', + 'wtf/ListRefPtr.h', + 'wtf/Locker.h', + 'wtf/MainThread.cpp', + 'wtf/MainThread.h', + 'wtf/MallocZoneSupport.h', + 'wtf/MathExtras.h', + 'wtf/MessageQueue.h', + 'wtf/Noncopyable.h', + 'wtf/NotFound.h', + 'wtf/OwnArrayPtr.h', + 'wtf/OwnFastMallocPtr.h', + 'wtf/OwnPtr.h', + 'wtf/OwnPtrCommon.h', + 'wtf/OwnPtrWin.cpp', + 'wtf/PassOwnPtr.h', + 'wtf/PassRefPtr.h', + 'wtf/Platform.h', + 'wtf/PtrAndFlags.h', + 'wtf/qt/MainThreadQt.cpp', + 'wtf/qt/ThreadingQt.cpp', + 'wtf/RandomNumber.cpp', + 'wtf/RandomNumber.h', + 'wtf/RandomNumberSeed.h', + 'wtf/RefCounted.h', + 'wtf/RefCountedLeakCounter.cpp', + 'wtf/RefCountedLeakCounter.h', + 'wtf/RefPtr.h', + 'wtf/RefPtrHashMap.h', + 'wtf/RetainPtr.h', + 'wtf/SegmentedVector.h', + 'wtf/StdLibExtras.h', + 'wtf/StringExtras.h', + 'wtf/TCPackedCache.h', + 'wtf/TCPageMap.h', + 'wtf/TCSpinLock.h', + 'wtf/TCSystemAlloc.cpp', + 'wtf/TCSystemAlloc.h', + 'wtf/Threading.cpp', + 'wtf/Threading.h', + 'wtf/ThreadingNone.cpp', + 'wtf/ThreadingPthreads.cpp', + 'wtf/ThreadingWin.cpp', + 'wtf/ThreadSpecific.h', + 'wtf/ThreadSpecificWin.cpp', + 'wtf/TypeTraits.cpp', + 'wtf/TypeTraits.h', + 'wtf/unicode/Collator.h', + 'wtf/unicode/CollatorDefault.cpp', + 'wtf/unicode/glib/UnicodeGLib.cpp', + 'wtf/unicode/glib/UnicodeGLib.h', + 'wtf/unicode/glib/UnicodeMacrosFromICU.h', + 'wtf/unicode/icu/CollatorICU.cpp', + 'wtf/unicode/icu/UnicodeIcu.h', + 'wtf/unicode/qt4/UnicodeQt4.h', + 'wtf/unicode/Unicode.h', + 'wtf/unicode/UTF8.cpp', + 'wtf/unicode/UTF8.h', + 'wtf/UnusedParam.h', + 'wtf/Vector.h', + 'wtf/VectorTraits.h', + 'wtf/VMTags.h', + 'wtf/win/MainThreadWin.cpp', + 'wtf/wx/MainThreadWx.cpp', + 'yarr/RegexCompiler.cpp', + 'yarr/RegexCompiler.h', + 'yarr/RegexInterpreter.cpp', + 'yarr/RegexInterpreter.h', + 'yarr/RegexJIT.cpp', + 'yarr/RegexJIT.h', + 'yarr/RegexParser.h', + 'yarr/RegexPattern.h', + ] + } +} diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp index d777f73..5dae952 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp @@ -363,15 +363,6 @@ void CodeBlock::dump(ExecState* exec) const } while (i < m_constantRegisters.size()); } - if (m_rareData && !m_rareData->m_unexpectedConstants.isEmpty()) { - printf("\nUnexpected Constants:\n"); - size_t i = 0; - do { - printf(" k%u = %s\n", static_cast<unsigned>(i), valueToSourceString(exec, m_rareData->m_unexpectedConstants[i]).ascii()); - ++i; - } while (i < m_rareData->m_unexpectedConstants.size()); - } - if (m_rareData && !m_rareData->m_regexps.isEmpty()) { printf("\nm_regexps:\n"); size_t i = 0; @@ -506,12 +497,6 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator& printf("[%4d] convert_this %s\n", location, registerName(r0).c_str()); break; } - case op_unexpected_load: { - int r0 = (++it)->u.operand; - int k0 = (++it)->u.operand; - printf("[%4d] unexpected_load\t %s, %s\n", location, registerName(r0).c_str(), constantName(exec, k0, unexpectedConstant(k0)).c_str()); - break; - } case op_new_object: { int r0 = (++it)->u.operand; printf("[%4d] new_object\t %s\n", location, registerName(r0).c_str()); @@ -1084,7 +1069,7 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator& int r0 = (++it)->u.operand; int errorType = (++it)->u.operand; int k0 = (++it)->u.operand; - printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, unexpectedConstant(k0)).c_str()); + printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str()); break; } case op_jsr: { @@ -1142,7 +1127,6 @@ static HashSet<CodeBlock*> liveCodeBlockSet; #define FOR_EACH_MEMBER_VECTOR_RARE_DATA(macro) \ macro(regexps) \ macro(functions) \ - macro(unexpectedConstants) \ macro(exceptionHandlers) \ macro(immediateSwitchJumpTables) \ macro(characterSwitchJumpTables) \ @@ -1267,7 +1251,6 @@ void CodeBlock::dumpStatistics() CodeBlock::CodeBlock(ScopeNode* ownerNode) : m_numCalleeRegisters(0) - , m_numConstants(0) , m_numVars(0) , m_numParameters(0) , m_ownerNode(ownerNode) @@ -1290,7 +1273,6 @@ CodeBlock::CodeBlock(ScopeNode* ownerNode) CodeBlock::CodeBlock(ScopeNode* ownerNode, CodeType codeType, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset) : m_numCalleeRegisters(0) - , m_numConstants(0) , m_numVars(0) , m_numParameters(0) , m_ownerNode(ownerNode) @@ -1455,10 +1437,6 @@ void CodeBlock::mark() for (size_t i = 0; i < m_rareData->m_functions.size(); ++i) m_rareData->m_functions[i]->body()->mark(); - for (size_t i = 0; i < m_rareData->m_unexpectedConstants.size(); ++i) { - if (!m_rareData->m_unexpectedConstants[i].marked()) - m_rareData->m_unexpectedConstants[i].mark(); - } m_rareData->m_evalCodeCache.mark(); } } @@ -1757,7 +1735,6 @@ void CodeBlock::shrinkToFit() if (m_rareData) { m_rareData->m_exceptionHandlers.shrinkToFit(); m_rareData->m_functions.shrinkToFit(); - m_rareData->m_unexpectedConstants.shrinkToFit(); m_rareData->m_regexps.shrinkToFit(); m_rareData->m_immediateSwitchJumpTables.shrinkToFit(); m_rareData->m_characterSwitchJumpTables.shrinkToFit(); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h index afd32f0..64b6c98 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h @@ -46,6 +46,12 @@ #include "StructureStubInfo.h" #endif +// Register numbers used in bytecode operations have different meaning accoring to their ranges: +// 0x80000000-0xFFFFFFFF Negative indicies from the CallFrame pointer are entries in the call frame, see RegisterFile.h. +// 0x00000000-0x3FFFFFFF Forwards indices from the CallFrame pointer are local vars and temporaries with the function's callframe. +// 0x40000000-0x7FFFFFFF Positive indices from 0x40000000 specify entries in the constant pool on the CodeBlock. +static const int FirstConstantRegisterIndex = 0x40000000; + namespace JSC { class ExecState; @@ -248,19 +254,9 @@ namespace JSC { return false; } - ALWAYS_INLINE bool isConstantRegisterIndex(int index) - { - return index >= m_numVars && index < m_numVars + m_numConstants; - } - - ALWAYS_INLINE JSValue getConstant(int index) - { - return m_constantRegisters[index - m_numVars].jsValue(); - } - ALWAYS_INLINE bool isTemporaryRegisterIndex(int index) { - return index >= m_numVars + m_numConstants; + return index >= m_numVars; } HandlerInfo* handlerForBytecodeOffset(unsigned bytecodeOffset); @@ -400,7 +396,9 @@ namespace JSC { size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); } void addConstantRegister(const Register& r) { return m_constantRegisters.append(r); } - Register& constantRegister(int index) { return m_constantRegisters[index]; } + Register& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; } + ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; } + ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); } unsigned addFunctionExpression(FuncExprNode* n) { unsigned size = m_functionExpressions.size(); m_functionExpressions.append(n); return size; } FuncExprNode* functionExpression(int index) const { return m_functionExpressions[index].get(); } @@ -410,9 +408,6 @@ namespace JSC { bool hasFunctions() const { return m_functionExpressions.size() || (m_rareData && m_rareData->m_functions.size()); } - unsigned addUnexpectedConstant(JSValue v) { createRareDataIfNecessary(); unsigned size = m_rareData->m_unexpectedConstants.size(); m_rareData->m_unexpectedConstants.append(v); return size; } - JSValue unexpectedConstant(int index) const { ASSERT(m_rareData); return m_rareData->m_unexpectedConstants[index]; } - unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; } RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); } @@ -441,11 +436,6 @@ namespace JSC { // FIXME: Make these remaining members private. int m_numCalleeRegisters; - // NOTE: numConstants holds the number of constant registers allocated - // by the code generator, not the number of constant registers used. - // (Duplicate constants are uniqued during code generation, and spare - // constant registers may be allocated.) - int m_numConstants; int m_numVars; int m_numParameters; @@ -519,7 +509,6 @@ namespace JSC { // Rare Constants Vector<RefPtr<FuncDeclNode> > m_functions; - Vector<JSValue> m_unexpectedConstants; Vector<RefPtr<RegExp> > m_regexps; // Jump Tables @@ -574,6 +563,14 @@ namespace JSC { int m_baseScopeDepth; }; + inline Register& ExecState::r(int index) + { + CodeBlock* codeBlock = this->codeBlock(); + if (codeBlock->isConstantRegisterIndex(index)) + return codeBlock->constantRegister(index); + return this[index]; + } + } // namespace JSC #endif // CodeBlock_h diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h index f4421df..27b016e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h @@ -44,7 +44,6 @@ namespace JSC { macro(op_create_arguments, 1) \ macro(op_convert_this, 2) \ \ - macro(op_unexpected_load, 3) \ macro(op_new_object, 2) \ macro(op_new_array, 4) \ macro(op_new_regexp, 3) \ diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 7feb3c8..15261ee 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -196,17 +196,10 @@ bool BytecodeGenerator::addGlobalVar(const Identifier& ident, bool isConstant, R return result.second; } -void BytecodeGenerator::allocateConstants(size_t count) +void BytecodeGenerator::preserveLastVar() { - m_codeBlock->m_numConstants = count; - if (!count) - return; - - m_nextConstantIndex = m_calleeRegisters.size(); - - for (size_t i = 0; i < count; ++i) - newRegister(); - m_lastConstant = &m_calleeRegisters.last(); + if ((m_firstConstantIndex = m_calleeRegisters.size()) != 0) + m_lastVar = &m_calleeRegisters.last(); } BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* debugger, const ScopeChain& scopeChain, SymbolTable* symbolTable, ProgramCodeBlock* codeBlock) @@ -222,6 +215,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d , m_baseScopeDepth(0) , m_codeType(GlobalCode) , m_nextGlobalIndex(-1) + , m_nextConstantOffset(0) , m_globalConstantIndex(0) , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) , m_lastOpcodeID(op_end) @@ -272,7 +266,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d if (!globalObject->hasProperty(exec, varStack[i].first)) newVars.append(addGlobalVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); - allocateConstants(programNode->neededConstants()); + preserveLastVar(); for (size_t i = 0; i < newVars.size(); ++i) emitLoad(newVars[i], jsUndefined()); @@ -290,7 +284,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d globalObject->putWithAttributes(exec, varStack[i].first, jsUndefined(), attributes); } - allocateConstants(programNode->neededConstants()); + preserveLastVar(); } } @@ -305,6 +299,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug , m_dynamicScopeDepth(0) , m_baseScopeDepth(0) , m_codeType(FunctionCode) + , m_nextConstantOffset(0) , m_globalConstantIndex(0) , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) , m_lastOpcodeID(op_end) @@ -372,7 +367,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug for (size_t i = 0; i < parameterCount; ++i) addParameter(parameters[i]); - allocateConstants(functionBody->neededConstants()); + preserveLastVar(); } BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugger, const ScopeChain& scopeChain, SymbolTable* symbolTable, EvalCodeBlock* codeBlock) @@ -387,6 +382,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge , m_dynamicScopeDepth(0) , m_baseScopeDepth(codeBlock->baseScopeDepth()) , m_codeType(EvalCode) + , m_nextConstantOffset(0) , m_globalConstantIndex(0) , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) , m_lastOpcodeID(op_end) @@ -401,7 +397,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge codeBlock->setGlobalData(m_globalData); m_codeBlock->m_numParameters = 1; // Allocate space for "this" - allocateConstants(evalNode->neededConstants()); + preserveLastVar(); } RegisterID* BytecodeGenerator::addParameter(const Identifier& ident) @@ -525,7 +521,7 @@ PassRefPtr<LabelScope> BytecodeGenerator::newLabelScope(LabelScope::Type type, c m_labelScopes.removeLast(); // Allocate new label scope. - LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : 0); // Only loops have continue targets. + LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr<Label>()); // Only loops have continue targets. m_labelScopes.append(scope); return &m_labelScopes.last(); } @@ -791,34 +787,19 @@ unsigned BytecodeGenerator::addConstant(const Identifier& ident) return result.first->second; } -RegisterID* BytecodeGenerator::addConstant(JSValue v) +RegisterID* BytecodeGenerator::addConstantValue(JSValue v) { - pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantIndex); - if (result.second) { - RegisterID& constant = m_calleeRegisters[m_nextConstantIndex]; - - ++m_nextConstantIndex; + int index = m_nextConstantOffset; + pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantOffset); + if (result.second) { + m_constantPoolRegisters.append(FirstConstantRegisterIndex + m_nextConstantOffset); + ++m_nextConstantOffset; m_codeBlock->addConstantRegister(JSValue(v)); - return &constant; - } + } else + index = result.first->second; - return ®isterFor(result.first->second); -} - -unsigned BytecodeGenerator::addUnexpectedConstant(JSValue v) -{ - return m_codeBlock->addUnexpectedConstant(v); -} - -RegisterID* BytecodeGenerator::emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject) -{ - if (!m_globalConstantIndex) - m_globalConstantIndex = m_codeBlock->addUnexpectedConstant(globalObject); - emitOpcode(op_unexpected_load); - instructions().append(dst->index()); - instructions().append(m_globalConstantIndex); - return dst; + return &m_constantPoolRegisters[index]; } unsigned BytecodeGenerator::addRegExp(RegExp* r) @@ -898,8 +879,8 @@ RegisterID* BytecodeGenerator::emitEqualityOp(OpcodeID opcodeID, RegisterID* dst if (src1->index() == dstIndex && src1->isTemporary() && m_codeBlock->isConstantRegisterIndex(src2->index()) - && m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue().isString()) { - const UString& value = asString(m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue())->value(); + && m_codeBlock->constantRegister(src2->index()).jsValue().isString()) { + const UString& value = asString(m_codeBlock->constantRegister(src2->index()).jsValue())->value(); if (value == "undefined") { rewindUnaryOp(); emitOpcode(op_is_undefined); @@ -979,28 +960,12 @@ RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, const Identifier& ident RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, JSValue v) { - RegisterID* constantID = addConstant(v); + RegisterID* constantID = addConstantValue(v); if (dst) return emitMove(dst, constantID); return constantID; } -RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, bool b) -{ - emitOpcode(op_unexpected_load); - instructions().append(dst->index()); - instructions().append(addUnexpectedConstant(jsBoolean(b))); - return dst; -} - -RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, double d) -{ - emitOpcode(op_unexpected_load); - instructions().append(dst->index()); - instructions().append(addUnexpectedConstant(jsNumber(globalData(), d))); - return dst; -} - bool BytecodeGenerator::findScopedProperty(const Identifier& property, int& index, size_t& stackDepth, bool forWriting, JSObject*& globalObject) { // Cases where we cannot statically optimize the lookup. @@ -1169,7 +1134,7 @@ RegisterID* BytecodeGenerator::emitResolveBase(RegisterID* dst, const Identifier } // Global object is the base - return emitLoadGlobalObject(dst, globalObject); + return emitLoad(dst, JSValue(globalObject)); } RegisterID* BytecodeGenerator::emitResolveWithBase(RegisterID* baseDst, RegisterID* propDst, const Identifier& property) @@ -1196,7 +1161,7 @@ RegisterID* BytecodeGenerator::emitResolveWithBase(RegisterID* baseDst, Register } // Global object is the base - emitLoadGlobalObject(baseDst, globalObject); + emitLoad(baseDst, JSValue(globalObject)); if (index != missingSymbolMarker() && !forceGlobalResolve) { // Directly index the property lookup across multiple scopes. @@ -1831,7 +1796,7 @@ RegisterID* BytecodeGenerator::emitNewError(RegisterID* dst, ErrorType type, JSV emitOpcode(op_new_error); instructions().append(dst->index()); instructions().append(static_cast<int>(type)); - instructions().append(addUnexpectedConstant(message)); + instructions().append(addConstantValue(message)->index()); return dst; } diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h index d29a24d..54d0289 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h @@ -245,9 +245,6 @@ namespace JSC { RegisterID* emitLoad(RegisterID* dst, double); RegisterID* emitLoad(RegisterID* dst, const Identifier&); RegisterID* emitLoad(RegisterID* dst, JSValue); - RegisterID* emitUnexpectedLoad(RegisterID* dst, bool); - RegisterID* emitUnexpectedLoad(RegisterID* dst, double); - RegisterID* emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject); RegisterID* emitUnaryOp(OpcodeID, RegisterID* dst, RegisterID* src); RegisterID* emitBinaryOp(OpcodeID, RegisterID* dst, RegisterID* src1, RegisterID* src2, OperandTypes); @@ -399,7 +396,7 @@ namespace JSC { RegisterID* addParameter(const Identifier&); - void allocateConstants(size_t); + void preserveLastVar(); RegisterID& registerFor(int index) { @@ -420,8 +417,7 @@ namespace JSC { unsigned addConstant(FuncDeclNode*); unsigned addConstant(FuncExprNode*); unsigned addConstant(const Identifier&); - RegisterID* addConstant(JSValue); - unsigned addUnexpectedConstant(JSValue); + RegisterID* addConstantValue(JSValue); unsigned addRegExp(RegExp*); Vector<Instruction>& instructions() { return m_codeBlock->instructions(); } @@ -450,12 +446,13 @@ namespace JSC { RegisterID m_thisRegister; RegisterID m_argumentsRegister; int m_activationRegisterIndex; + WTF::SegmentedVector<RegisterID, 32> m_constantPoolRegisters; WTF::SegmentedVector<RegisterID, 32> m_calleeRegisters; WTF::SegmentedVector<RegisterID, 32> m_parameters; WTF::SegmentedVector<RegisterID, 32> m_globals; WTF::SegmentedVector<Label, 32> m_labels; WTF::SegmentedVector<LabelScope, 8> m_labelScopes; - RefPtr<RegisterID> m_lastConstant; + RefPtr<RegisterID> m_lastVar; int m_finallyDepth; int m_dynamicScopeDepth; int m_baseScopeDepth; @@ -466,7 +463,8 @@ namespace JSC { int m_nextGlobalIndex; int m_nextParameterIndex; - int m_nextConstantIndex; + int m_firstConstantIndex; + int m_nextConstantOffset; unsigned m_globalConstantIndex; int m_globalVarStorageOffset; diff --git a/src/3rdparty/webkit/JavaScriptCore/create_hash_table b/src/3rdparty/webkit/JavaScriptCore/create_hash_table index 25d0b02..4184500 100755 --- a/src/3rdparty/webkit/JavaScriptCore/create_hash_table +++ b/src/3rdparty/webkit/JavaScriptCore/create_hash_table @@ -268,7 +268,7 @@ sub output() { } print " { 0, 0, 0, 0 }\n"; print "};\n\n"; - print "extern const struct HashTable $name =\n"; + print "extern JSC_CONST_HASHTABLE HashTable $name =\n"; print " \{ $compactSize, $compactHashSizeMask, $nameEntries, 0 \};\n"; print "} // namespace\n"; } diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h index 868ea71..98d0935 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.h @@ -38,7 +38,7 @@ namespace JSC { virtual ~Debugger(); void attach(JSGlobalObject*); - void detach(JSGlobalObject*); + virtual void detach(JSGlobalObject*); virtual void sourceParsed(ExecState*, const SourceCode&, int errorLine, const UString& errorMsg) = 0; virtual void exception(const DebuggerCallFrame&, intptr_t sourceID, int lineno) = 0; diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h index 2a7c98f..5732add 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/ArrayPrototype.lut.h @@ -29,6 +29,6 @@ static const struct HashTableValue arrayTableValues[22] = { { 0, 0, 0, 0 } }; -extern const struct HashTable arrayTable = +extern JSC_CONST_HASHTABLE HashTable arrayTable = { 65, 63, arrayTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h index 1f43d4d..8b1c735 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/DatePrototype.lut.h @@ -54,6 +54,6 @@ static const struct HashTableValue dateTableValues[47] = { { 0, 0, 0, 0 } }; -extern const struct HashTable dateTable = +extern JSC_CONST_HASHTABLE HashTable dateTable = { 134, 127, dateTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp index 8e80eca..4e16e25 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,159 +54,28 @@ /* Pure parsers. */ #define YYPURE 1 +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + /* Using locations. */ #define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ -#define yyparse jscyyparse -#define yylex jscyylex -#define yyerror jscyyerror -#define yylval jscyylval -#define yychar jscyychar -#define yydebug jscyydebug -#define yynerrs jscyynerrs -#define yylloc jscyylloc - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - NULLTOKEN = 258, - TRUETOKEN = 259, - FALSETOKEN = 260, - BREAK = 261, - CASE = 262, - DEFAULT = 263, - FOR = 264, - NEW = 265, - VAR = 266, - CONSTTOKEN = 267, - CONTINUE = 268, - FUNCTION = 269, - RETURN = 270, - VOIDTOKEN = 271, - DELETETOKEN = 272, - IF = 273, - THISTOKEN = 274, - DO = 275, - WHILE = 276, - INTOKEN = 277, - INSTANCEOF = 278, - TYPEOF = 279, - SWITCH = 280, - WITH = 281, - RESERVED = 282, - THROW = 283, - TRY = 284, - CATCH = 285, - FINALLY = 286, - DEBUGGER = 287, - IF_WITHOUT_ELSE = 288, - ELSE = 289, - EQEQ = 290, - NE = 291, - STREQ = 292, - STRNEQ = 293, - LE = 294, - GE = 295, - OR = 296, - AND = 297, - PLUSPLUS = 298, - MINUSMINUS = 299, - LSHIFT = 300, - RSHIFT = 301, - URSHIFT = 302, - PLUSEQUAL = 303, - MINUSEQUAL = 304, - MULTEQUAL = 305, - DIVEQUAL = 306, - LSHIFTEQUAL = 307, - RSHIFTEQUAL = 308, - URSHIFTEQUAL = 309, - ANDEQUAL = 310, - MODEQUAL = 311, - XOREQUAL = 312, - OREQUAL = 313, - OPENBRACE = 314, - CLOSEBRACE = 315, - NUMBER = 316, - IDENT = 317, - STRING = 318, - AUTOPLUSPLUS = 319, - AUTOMINUSMINUS = 320 - }; -#endif -/* Tokens. */ -#define NULLTOKEN 258 -#define TRUETOKEN 259 -#define FALSETOKEN 260 -#define BREAK 261 -#define CASE 262 -#define DEFAULT 263 -#define FOR 264 -#define NEW 265 -#define VAR 266 -#define CONSTTOKEN 267 -#define CONTINUE 268 -#define FUNCTION 269 -#define RETURN 270 -#define VOIDTOKEN 271 -#define DELETETOKEN 272 -#define IF 273 -#define THISTOKEN 274 -#define DO 275 -#define WHILE 276 -#define INTOKEN 277 -#define INSTANCEOF 278 -#define TYPEOF 279 -#define SWITCH 280 -#define WITH 281 -#define RESERVED 282 -#define THROW 283 -#define TRY 284 -#define CATCH 285 -#define FINALLY 286 -#define DEBUGGER 287 -#define IF_WITHOUT_ELSE 288 -#define ELSE 289 -#define EQEQ 290 -#define NE 291 -#define STREQ 292 -#define STRNEQ 293 -#define LE 294 -#define GE 295 -#define OR 296 -#define AND 297 -#define PLUSPLUS 298 -#define MINUSMINUS 299 -#define LSHIFT 300 -#define RSHIFT 301 -#define URSHIFT 302 -#define PLUSEQUAL 303 -#define MINUSEQUAL 304 -#define MULTEQUAL 305 -#define DIVEQUAL 306 -#define LSHIFTEQUAL 307 -#define RSHIFTEQUAL 308 -#define URSHIFTEQUAL 309 -#define ANDEQUAL 310 -#define MODEQUAL 311 -#define XOREQUAL 312 -#define OREQUAL 313 -#define OPENBRACE 314 -#define CLOSEBRACE 315 -#define NUMBER 316 -#define IDENT 317 -#define STRING 318 -#define AUTOPLUSPLUS 319 -#define AUTOMINUSMINUS 320 - - - +#define yyparse jscyyparse +#define yylex jscyylex +#define yyerror jscyyerror +#define yylval jscyylval +#define yychar jscyychar +#define yydebug jscyydebug +#define yynerrs jscyynerrs +#define yylloc jscyylloc /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 3 "../parser/Grammar.y" @@ -363,6 +231,9 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D +/* Line 189 of yacc.c */ +#line 236 "JavaScriptCore/tmp/../generated/Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -381,10 +252,88 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + NULLTOKEN = 258, + TRUETOKEN = 259, + FALSETOKEN = 260, + BREAK = 261, + CASE = 262, + DEFAULT = 263, + FOR = 264, + NEW = 265, + VAR = 266, + CONSTTOKEN = 267, + CONTINUE = 268, + FUNCTION = 269, + RETURN = 270, + VOIDTOKEN = 271, + DELETETOKEN = 272, + IF = 273, + THISTOKEN = 274, + DO = 275, + WHILE = 276, + INTOKEN = 277, + INSTANCEOF = 278, + TYPEOF = 279, + SWITCH = 280, + WITH = 281, + RESERVED = 282, + THROW = 283, + TRY = 284, + CATCH = 285, + FINALLY = 286, + DEBUGGER = 287, + IF_WITHOUT_ELSE = 288, + ELSE = 289, + EQEQ = 290, + NE = 291, + STREQ = 292, + STRNEQ = 293, + LE = 294, + GE = 295, + OR = 296, + AND = 297, + PLUSPLUS = 298, + MINUSMINUS = 299, + LSHIFT = 300, + RSHIFT = 301, + URSHIFT = 302, + PLUSEQUAL = 303, + MINUSEQUAL = 304, + MULTEQUAL = 305, + DIVEQUAL = 306, + LSHIFTEQUAL = 307, + RSHIFTEQUAL = 308, + URSHIFTEQUAL = 309, + ANDEQUAL = 310, + MODEQUAL = 311, + XOREQUAL = 312, + OREQUAL = 313, + OPENBRACE = 314, + CLOSEBRACE = 315, + NUMBER = 316, + IDENT = 317, + STRING = 318, + AUTOPLUSPLUS = 319, + AUTOMINUSMINUS = 320 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 157 "../parser/Grammar.y" { + +/* Line 214 of yacc.c */ +#line 157 "../parser/Grammar.y" + int intValue; double doubleValue; Identifier* ident; @@ -414,13 +363,15 @@ typedef union YYSTYPE ParameterListInfo parameterList; Operator op; -} -/* Line 187 of yacc.c. */ -#line 420 "JavaScriptCore/tmp/../generated/Grammar.tab.c" - YYSTYPE; + + + +/* Line 214 of yacc.c */ +#line 371 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED @@ -440,8 +391,8 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 445 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 396 "JavaScriptCore/tmp/../generated/Grammar.tab.c" #ifdef short # undef short @@ -516,14 +467,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -605,9 +556,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - YYLTYPE yyls; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ @@ -642,12 +593,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -2361,17 +2312,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -2406,11 +2360,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -2692,10 +2646,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -2714,10 +2666,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -2741,88 +2692,97 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; -/* Location data for the look-ahead symbol. */ +/* Location data for the lookahead symbol. */ YYLTYPE yylloc; - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + /* Number of syntax errors so far. */ + int yynerrs; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + `yyls': related to locations. - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls; + YYLTYPE *yylsp; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[2]; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yyls = yylsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; yylsp = yyls; + #if YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; + yylloc.first_column = yylloc.last_column = 1; #endif goto yysetstate; @@ -2861,6 +2821,7 @@ YYLTYPE yylloc; &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); + yyls = yyls1; yyss = yyss1; yyvs = yyvs1; @@ -2882,9 +2843,9 @@ YYLTYPE yylloc; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - YYSTACK_RELOCATE (yyls); + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -2905,6 +2866,9 @@ YYLTYPE yylloc; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -2913,16 +2877,16 @@ YYLTYPE yylloc; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2954,20 +2918,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -3008,31 +2968,43 @@ yyreduce: switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 290 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NullNode(GLOBAL_DATA), 0, 1); ;} break; case 3: + +/* Line 1455 of yacc.c */ #line 291 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, true), 0, 1); ;} break; case 4: + +/* Line 1455 of yacc.c */ #line 292 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, false), 0, 1); ;} break; case 5: + +/* Line 1455 of yacc.c */ #line 293 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, (yyvsp[(1) - (1)].doubleValue)), 0, 1); ;} break; case 6: + +/* Line 1455 of yacc.c */ #line 294 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StringNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)), 0, 1); ;} break; case 7: + +/* Line 1455 of yacc.c */ #line 295 "../parser/Grammar.y" { Lexer& l = *LEXER; @@ -3046,6 +3018,8 @@ yyreduce: break; case 8: + +/* Line 1455 of yacc.c */ #line 304 "../parser/Grammar.y" { Lexer& l = *LEXER; @@ -3059,26 +3033,36 @@ yyreduce: break; case 9: + +/* Line 1455 of yacc.c */ #line 316 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 10: + +/* Line 1455 of yacc.c */ #line 317 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 11: + +/* Line 1455 of yacc.c */ #line 318 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, Identifier(GLOBAL_DATA, UString::from((yyvsp[(1) - (3)].doubleValue))), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 12: + +/* Line 1455 of yacc.c */ #line 319 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (7)].ident), *(yyvsp[(2) - (7)].ident), 0, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); if (!(yyval.propertyNode).m_node) YYABORT; ;} break; case 13: + +/* Line 1455 of yacc.c */ #line 321 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(globalPtr, *(yyvsp[(1) - (8)].ident), *(yyvsp[(2) - (8)].ident), (yyvsp[(4) - (8)].parameterList).m_node.head, (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line)), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -3091,6 +3075,8 @@ yyreduce: break; case 14: + +/* Line 1455 of yacc.c */ #line 332 "../parser/Grammar.y" { (yyval.propertyList).m_node.head = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].propertyNode).m_node); (yyval.propertyList).m_node.tail = (yyval.propertyList).m_node.head; @@ -3099,6 +3085,8 @@ yyreduce: break; case 15: + +/* Line 1455 of yacc.c */ #line 336 "../parser/Grammar.y" { (yyval.propertyList).m_node.head = (yyvsp[(1) - (3)].propertyList).m_node.head; (yyval.propertyList).m_node.tail = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(3) - (3)].propertyNode).m_node, (yyvsp[(1) - (3)].propertyList).m_node.tail); @@ -3107,51 +3095,71 @@ yyreduce: break; case 17: + +/* Line 1455 of yacc.c */ #line 344 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA), 0, 0); ;} break; case 18: + +/* Line 1455 of yacc.c */ #line 345 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (3)].propertyList).m_node.head), (yyvsp[(2) - (3)].propertyList).m_features, (yyvsp[(2) - (3)].propertyList).m_numConstants); ;} break; case 19: + +/* Line 1455 of yacc.c */ #line 347 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (4)].propertyList).m_node.head), (yyvsp[(2) - (4)].propertyList).m_features, (yyvsp[(2) - (4)].propertyList).m_numConstants); ;} break; case 20: + +/* Line 1455 of yacc.c */ #line 351 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ThisNode(GLOBAL_DATA), ThisFeature, 0); ;} break; case 23: + +/* Line 1455 of yacc.c */ #line 354 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), (yylsp[(1) - (1)]).first_column), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 24: + +/* Line 1455 of yacc.c */ #line 355 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;} break; case 25: + +/* Line 1455 of yacc.c */ #line 359 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].intValue)), 0, (yyvsp[(2) - (3)].intValue) ? 1 : 0); ;} break; case 26: + +/* Line 1455 of yacc.c */ #line 360 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].elementList).m_node.head), (yyvsp[(2) - (3)].elementList).m_features, (yyvsp[(2) - (3)].elementList).m_numConstants); ;} break; case 27: + +/* Line 1455 of yacc.c */ #line 361 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(4) - (5)].intValue), (yyvsp[(2) - (5)].elementList).m_node.head), (yyvsp[(2) - (5)].elementList).m_features, (yyvsp[(4) - (5)].intValue) ? (yyvsp[(2) - (5)].elementList).m_numConstants + 1 : (yyvsp[(2) - (5)].elementList).m_numConstants); ;} break; case 28: + +/* Line 1455 of yacc.c */ #line 365 "../parser/Grammar.y" { (yyval.elementList).m_node.head = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].intValue), (yyvsp[(2) - (2)].expressionNode).m_node); (yyval.elementList).m_node.tail = (yyval.elementList).m_node.head; @@ -3160,6 +3168,8 @@ yyreduce: break; case 29: + +/* Line 1455 of yacc.c */ #line 370 "../parser/Grammar.y" { (yyval.elementList).m_node.head = (yyvsp[(1) - (4)].elementList).m_node.head; (yyval.elementList).m_node.tail = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (4)].elementList).m_node.tail, (yyvsp[(3) - (4)].intValue), (yyvsp[(4) - (4)].expressionNode).m_node); @@ -3168,26 +3178,36 @@ yyreduce: break; case 30: + +/* Line 1455 of yacc.c */ #line 377 "../parser/Grammar.y" { (yyval.intValue) = 0; ;} break; case 32: + +/* Line 1455 of yacc.c */ #line 382 "../parser/Grammar.y" { (yyval.intValue) = 1; ;} break; case 33: + +/* Line 1455 of yacc.c */ #line 383 "../parser/Grammar.y" { (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;} break; case 35: + +/* Line 1455 of yacc.c */ #line 388 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>((yyvsp[(1) - (1)].funcExprNode).m_node, (yyvsp[(1) - (1)].funcExprNode).m_features, (yyvsp[(1) - (1)].funcExprNode).m_numConstants); ;} break; case 36: + +/* Line 1455 of yacc.c */ #line 389 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3196,6 +3216,8 @@ yyreduce: break; case 37: + +/* Line 1455 of yacc.c */ #line 393 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3204,6 +3226,8 @@ yyreduce: break; case 38: + +/* Line 1455 of yacc.c */ #line 397 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3212,6 +3236,8 @@ yyreduce: break; case 40: + +/* Line 1455 of yacc.c */ #line 405 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3220,6 +3246,8 @@ yyreduce: break; case 41: + +/* Line 1455 of yacc.c */ #line 409 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3228,6 +3256,8 @@ yyreduce: break; case 42: + +/* Line 1455 of yacc.c */ #line 413 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3236,6 +3266,8 @@ yyreduce: break; case 44: + +/* Line 1455 of yacc.c */ #line 421 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); @@ -3244,6 +3276,8 @@ yyreduce: break; case 46: + +/* Line 1455 of yacc.c */ #line 429 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); @@ -3252,16 +3286,22 @@ yyreduce: break; case 47: + +/* Line 1455 of yacc.c */ #line 436 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 48: + +/* Line 1455 of yacc.c */ #line 437 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 49: + +/* Line 1455 of yacc.c */ #line 438 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3270,6 +3310,8 @@ yyreduce: break; case 50: + +/* Line 1455 of yacc.c */ #line 442 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3277,16 +3319,22 @@ yyreduce: break; case 51: + +/* Line 1455 of yacc.c */ #line 448 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 52: + +/* Line 1455 of yacc.c */ #line 449 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(globalPtr, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 53: + +/* Line 1455 of yacc.c */ #line 450 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3295,6 +3343,8 @@ yyreduce: break; case 54: + +/* Line 1455 of yacc.c */ #line 454 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3303,16 +3353,22 @@ yyreduce: break; case 55: + +/* Line 1455 of yacc.c */ #line 461 "../parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA), 0, 0); ;} break; case 56: + +/* Line 1455 of yacc.c */ #line 462 "../parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA, (yyvsp[(2) - (3)].argumentList).m_node.head), (yyvsp[(2) - (3)].argumentList).m_features, (yyvsp[(2) - (3)].argumentList).m_numConstants); ;} break; case 57: + +/* Line 1455 of yacc.c */ #line 466 "../parser/Grammar.y" { (yyval.argumentList).m_node.head = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].expressionNode).m_node); (yyval.argumentList).m_node.tail = (yyval.argumentList).m_node.head; @@ -3321,6 +3377,8 @@ yyreduce: break; case 58: + +/* Line 1455 of yacc.c */ #line 470 "../parser/Grammar.y" { (yyval.argumentList).m_node.head = (yyvsp[(1) - (3)].argumentList).m_node.head; (yyval.argumentList).m_node.tail = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (3)].argumentList).m_node.tail, (yyvsp[(3) - (3)].expressionNode).m_node); @@ -3329,181 +3387,253 @@ yyreduce: break; case 64: + +/* Line 1455 of yacc.c */ #line 488 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 65: + +/* Line 1455 of yacc.c */ #line 489 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 67: + +/* Line 1455 of yacc.c */ #line 494 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 68: + +/* Line 1455 of yacc.c */ #line 495 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 69: + +/* Line 1455 of yacc.c */ #line 499 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 70: + +/* Line 1455 of yacc.c */ #line 500 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) VoidNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants + 1); ;} break; case 71: + +/* Line 1455 of yacc.c */ #line 501 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 72: + +/* Line 1455 of yacc.c */ #line 502 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 73: + +/* Line 1455 of yacc.c */ #line 503 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 74: + +/* Line 1455 of yacc.c */ #line 504 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 75: + +/* Line 1455 of yacc.c */ #line 505 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 76: + +/* Line 1455 of yacc.c */ #line 506 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnaryPlusNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 77: + +/* Line 1455 of yacc.c */ #line 507 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 78: + +/* Line 1455 of yacc.c */ #line 508 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeBitwiseNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 79: + +/* Line 1455 of yacc.c */ #line 509 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 85: + +/* Line 1455 of yacc.c */ #line 523 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 86: + +/* Line 1455 of yacc.c */ #line 524 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 87: + +/* Line 1455 of yacc.c */ #line 525 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 89: + +/* Line 1455 of yacc.c */ #line 531 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 90: + +/* Line 1455 of yacc.c */ #line 533 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 91: + +/* Line 1455 of yacc.c */ #line 535 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 93: + +/* Line 1455 of yacc.c */ #line 540 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 94: + +/* Line 1455 of yacc.c */ #line 541 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 96: + +/* Line 1455 of yacc.c */ #line 547 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 97: + +/* Line 1455 of yacc.c */ #line 549 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 99: + +/* Line 1455 of yacc.c */ #line 554 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 100: + +/* Line 1455 of yacc.c */ #line 555 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 101: + +/* Line 1455 of yacc.c */ #line 556 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 103: + +/* Line 1455 of yacc.c */ #line 561 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 104: + +/* Line 1455 of yacc.c */ #line 562 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 105: + +/* Line 1455 of yacc.c */ #line 563 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 107: + +/* Line 1455 of yacc.c */ #line 568 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 108: + +/* Line 1455 of yacc.c */ #line 569 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 109: + +/* Line 1455 of yacc.c */ #line 570 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 110: + +/* Line 1455 of yacc.c */ #line 571 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 111: + +/* Line 1455 of yacc.c */ #line 572 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3511,6 +3641,8 @@ yyreduce: break; case 112: + +/* Line 1455 of yacc.c */ #line 575 "../parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3518,26 +3650,36 @@ yyreduce: break; case 114: + +/* Line 1455 of yacc.c */ #line 582 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 115: + +/* Line 1455 of yacc.c */ #line 583 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 116: + +/* Line 1455 of yacc.c */ #line 584 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 117: + +/* Line 1455 of yacc.c */ #line 585 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 118: + +/* Line 1455 of yacc.c */ #line 587 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3545,26 +3687,36 @@ yyreduce: break; case 120: + +/* Line 1455 of yacc.c */ #line 594 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 121: + +/* Line 1455 of yacc.c */ #line 595 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 122: + +/* Line 1455 of yacc.c */ #line 596 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 123: + +/* Line 1455 of yacc.c */ #line 597 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 124: + +/* Line 1455 of yacc.c */ #line 599 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3572,6 +3724,8 @@ yyreduce: break; case 125: + +/* Line 1455 of yacc.c */ #line 603 "../parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3579,156 +3733,218 @@ yyreduce: break; case 127: + +/* Line 1455 of yacc.c */ #line 610 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 128: + +/* Line 1455 of yacc.c */ #line 611 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 129: + +/* Line 1455 of yacc.c */ #line 612 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 130: + +/* Line 1455 of yacc.c */ #line 613 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 132: + +/* Line 1455 of yacc.c */ #line 619 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 133: + +/* Line 1455 of yacc.c */ #line 621 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 134: + +/* Line 1455 of yacc.c */ #line 623 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 135: + +/* Line 1455 of yacc.c */ #line 625 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 137: + +/* Line 1455 of yacc.c */ #line 631 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 138: + +/* Line 1455 of yacc.c */ #line 632 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 139: + +/* Line 1455 of yacc.c */ #line 634 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 140: + +/* Line 1455 of yacc.c */ #line 636 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 142: + +/* Line 1455 of yacc.c */ #line 641 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 144: + +/* Line 1455 of yacc.c */ #line 647 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 146: + +/* Line 1455 of yacc.c */ #line 652 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 148: + +/* Line 1455 of yacc.c */ #line 657 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 150: + +/* Line 1455 of yacc.c */ #line 663 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 152: + +/* Line 1455 of yacc.c */ #line 669 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 154: + +/* Line 1455 of yacc.c */ #line 674 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 156: + +/* Line 1455 of yacc.c */ #line 680 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 158: + +/* Line 1455 of yacc.c */ #line 686 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 160: + +/* Line 1455 of yacc.c */ #line 691 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 162: + +/* Line 1455 of yacc.c */ #line 697 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 164: + +/* Line 1455 of yacc.c */ #line 703 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 166: + +/* Line 1455 of yacc.c */ #line 708 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 168: + +/* Line 1455 of yacc.c */ #line 714 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 170: + +/* Line 1455 of yacc.c */ #line 719 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 172: + +/* Line 1455 of yacc.c */ #line 725 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 174: + +/* Line 1455 of yacc.c */ #line 731 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 176: + +/* Line 1455 of yacc.c */ #line 737 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 178: + +/* Line 1455 of yacc.c */ #line 743 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3736,6 +3952,8 @@ yyreduce: break; case 180: + +/* Line 1455 of yacc.c */ #line 751 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3743,6 +3961,8 @@ yyreduce: break; case 182: + +/* Line 1455 of yacc.c */ #line 759 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3750,99 +3970,137 @@ yyreduce: break; case 183: + +/* Line 1455 of yacc.c */ #line 765 "../parser/Grammar.y" { (yyval.op) = OpEqual; ;} break; case 184: + +/* Line 1455 of yacc.c */ #line 766 "../parser/Grammar.y" { (yyval.op) = OpPlusEq; ;} break; case 185: + +/* Line 1455 of yacc.c */ #line 767 "../parser/Grammar.y" { (yyval.op) = OpMinusEq; ;} break; case 186: + +/* Line 1455 of yacc.c */ #line 768 "../parser/Grammar.y" { (yyval.op) = OpMultEq; ;} break; case 187: + +/* Line 1455 of yacc.c */ #line 769 "../parser/Grammar.y" { (yyval.op) = OpDivEq; ;} break; case 188: + +/* Line 1455 of yacc.c */ #line 770 "../parser/Grammar.y" { (yyval.op) = OpLShift; ;} break; case 189: + +/* Line 1455 of yacc.c */ #line 771 "../parser/Grammar.y" { (yyval.op) = OpRShift; ;} break; case 190: + +/* Line 1455 of yacc.c */ #line 772 "../parser/Grammar.y" { (yyval.op) = OpURShift; ;} break; case 191: + +/* Line 1455 of yacc.c */ #line 773 "../parser/Grammar.y" { (yyval.op) = OpAndEq; ;} break; case 192: + +/* Line 1455 of yacc.c */ #line 774 "../parser/Grammar.y" { (yyval.op) = OpXOrEq; ;} break; case 193: + +/* Line 1455 of yacc.c */ #line 775 "../parser/Grammar.y" { (yyval.op) = OpOrEq; ;} break; case 194: + +/* Line 1455 of yacc.c */ #line 776 "../parser/Grammar.y" { (yyval.op) = OpModEq; ;} break; case 196: + +/* Line 1455 of yacc.c */ #line 781 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 198: + +/* Line 1455 of yacc.c */ #line 786 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 200: + +/* Line 1455 of yacc.c */ #line 791 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 218: + +/* Line 1455 of yacc.c */ #line 815 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, 0), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 219: + +/* Line 1455 of yacc.c */ #line 817 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].sourceElements).m_node), (yyvsp[(2) - (3)].sourceElements).m_varDeclarations, (yyvsp[(2) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (3)].sourceElements).m_features, (yyvsp[(2) - (3)].sourceElements).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 220: + +/* Line 1455 of yacc.c */ #line 822 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 221: + +/* Line 1455 of yacc.c */ #line 824 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); @@ -3850,6 +4108,8 @@ yyreduce: break; case 222: + +/* Line 1455 of yacc.c */ #line 830 "../parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -3861,6 +4121,8 @@ yyreduce: break; case 223: + +/* Line 1455 of yacc.c */ #line 837 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); @@ -3874,6 +4136,8 @@ yyreduce: break; case 224: + +/* Line 1455 of yacc.c */ #line 847 "../parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; @@ -3885,6 +4149,8 @@ yyreduce: break; case 225: + +/* Line 1455 of yacc.c */ #line 855 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); @@ -3898,6 +4164,8 @@ yyreduce: break; case 226: + +/* Line 1455 of yacc.c */ #line 867 "../parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -3909,6 +4177,8 @@ yyreduce: break; case 227: + +/* Line 1455 of yacc.c */ #line 874 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); @@ -3922,6 +4192,8 @@ yyreduce: break; case 228: + +/* Line 1455 of yacc.c */ #line 884 "../parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; @@ -3933,6 +4205,8 @@ yyreduce: break; case 229: + +/* Line 1455 of yacc.c */ #line 892 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); @@ -3946,18 +4220,24 @@ yyreduce: break; case 230: + +/* Line 1455 of yacc.c */ #line 904 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 231: + +/* Line 1455 of yacc.c */ #line 907 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} break; case 232: + +/* Line 1455 of yacc.c */ #line 912 "../parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node; (yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head; @@ -3970,6 +4250,8 @@ yyreduce: break; case 233: + +/* Line 1455 of yacc.c */ #line 921 "../parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (3)].constDeclList).m_node.head; (yyvsp[(1) - (3)].constDeclList).m_node.tail->m_next = (yyvsp[(3) - (3)].constDeclNode).m_node; @@ -3982,49 +4264,67 @@ yyreduce: break; case 234: + +/* Line 1455 of yacc.c */ #line 932 "../parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), 0), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 235: + +/* Line 1455 of yacc.c */ #line 933 "../parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node), ((*(yyvsp[(1) - (2)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 236: + +/* Line 1455 of yacc.c */ #line 937 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 237: + +/* Line 1455 of yacc.c */ #line 941 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 238: + +/* Line 1455 of yacc.c */ #line 945 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) EmptyStatementNode(GLOBAL_DATA), 0, 0, 0, 0); ;} break; case 239: + +/* Line 1455 of yacc.c */ #line 949 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 240: + +/* Line 1455 of yacc.c */ #line 951 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; case 241: + +/* Line 1455 of yacc.c */ #line 957 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; case 242: + +/* Line 1455 of yacc.c */ #line 960 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfElseNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].statementNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node), mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), @@ -4035,24 +4335,32 @@ yyreduce: break; case 243: + +/* Line 1455 of yacc.c */ #line 969 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; case 244: + +/* Line 1455 of yacc.c */ #line 971 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; case 245: + +/* Line 1455 of yacc.c */ #line 973 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WhileNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; case 246: + +/* Line 1455 of yacc.c */ #line 976 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(3) - (9)].expressionNode).m_node, (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, false), (yyvsp[(9) - (9)].statementNode).m_varDeclarations, (yyvsp[(9) - (9)].statementNode).m_funcDeclarations, (yyvsp[(3) - (9)].expressionNode).m_features | (yyvsp[(5) - (9)].expressionNode).m_features | (yyvsp[(7) - (9)].expressionNode).m_features | (yyvsp[(9) - (9)].statementNode).m_features, @@ -4062,6 +4370,8 @@ yyreduce: break; case 247: + +/* Line 1455 of yacc.c */ #line 982 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(4) - (10)].varDeclList).m_node, (yyvsp[(6) - (10)].expressionNode).m_node, (yyvsp[(8) - (10)].expressionNode).m_node, (yyvsp[(10) - (10)].statementNode).m_node, true), mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_varDeclarations, (yyvsp[(10) - (10)].statementNode).m_varDeclarations), @@ -4072,6 +4382,8 @@ yyreduce: break; case 248: + +/* Line 1455 of yacc.c */ #line 989 "../parser/Grammar.y" { ForInNode* node = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node); @@ -4084,6 +4396,8 @@ yyreduce: break; case 249: + +/* Line 1455 of yacc.c */ #line 998 "../parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (8)].ident), 0, (yyvsp[(6) - (8)].expressionNode).m_node, (yyvsp[(8) - (8)].statementNode).m_node, (yylsp[(5) - (8)]).first_column, (yylsp[(5) - (8)]).first_column - (yylsp[(4) - (8)]).first_column, (yylsp[(6) - (8)]).last_column - (yylsp[(5) - (8)]).first_column); SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (8)]).first_column, (yylsp[(5) - (8)]).first_column + 1, (yylsp[(6) - (8)]).last_column); @@ -4093,6 +4407,8 @@ yyreduce: break; case 250: + +/* Line 1455 of yacc.c */ #line 1004 "../parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (9)].ident), (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, (yylsp[(5) - (9)]).first_column, (yylsp[(5) - (9)]).first_column - (yylsp[(4) - (9)]).first_column, (yylsp[(5) - (9)]).last_column - (yylsp[(5) - (9)]).first_column); SET_EXCEPTION_LOCATION(forIn, (yylsp[(4) - (9)]).first_column, (yylsp[(6) - (9)]).first_column + 1, (yylsp[(7) - (9)]).last_column); @@ -4104,16 +4420,22 @@ yyreduce: break; case 251: + +/* Line 1455 of yacc.c */ #line 1014 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 253: + +/* Line 1455 of yacc.c */ #line 1019 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 255: + +/* Line 1455 of yacc.c */ #line 1024 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4122,6 +4444,8 @@ yyreduce: break; case 256: + +/* Line 1455 of yacc.c */ #line 1028 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4130,6 +4454,8 @@ yyreduce: break; case 257: + +/* Line 1455 of yacc.c */ #line 1032 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4138,6 +4464,8 @@ yyreduce: break; case 258: + +/* Line 1455 of yacc.c */ #line 1036 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4146,6 +4474,8 @@ yyreduce: break; case 259: + +/* Line 1455 of yacc.c */ #line 1043 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4153,6 +4483,8 @@ yyreduce: break; case 260: + +/* Line 1455 of yacc.c */ #line 1046 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4160,6 +4492,8 @@ yyreduce: break; case 261: + +/* Line 1455 of yacc.c */ #line 1049 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4167,6 +4501,8 @@ yyreduce: break; case 262: + +/* Line 1455 of yacc.c */ #line 1052 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4174,6 +4510,8 @@ yyreduce: break; case 263: + +/* Line 1455 of yacc.c */ #line 1058 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4181,6 +4519,8 @@ yyreduce: break; case 264: + +/* Line 1455 of yacc.c */ #line 1061 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4188,6 +4528,8 @@ yyreduce: break; case 265: + +/* Line 1455 of yacc.c */ #line 1064 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4195,6 +4537,8 @@ yyreduce: break; case 266: + +/* Line 1455 of yacc.c */ #line 1067 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4202,6 +4546,8 @@ yyreduce: break; case 267: + +/* Line 1455 of yacc.c */ #line 1073 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WithNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node, (yylsp[(3) - (5)]).last_column, (yylsp[(3) - (5)]).last_column - (yylsp[(3) - (5)]).first_column), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features | WithFeature, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); @@ -4209,6 +4555,8 @@ yyreduce: break; case 268: + +/* Line 1455 of yacc.c */ #line 1079 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) SwitchNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].caseBlockNode).m_node), (yyvsp[(5) - (5)].caseBlockNode).m_varDeclarations, (yyvsp[(5) - (5)].caseBlockNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].caseBlockNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].caseBlockNode).m_numConstants); @@ -4216,11 +4564,15 @@ yyreduce: break; case 269: + +/* Line 1455 of yacc.c */ #line 1085 "../parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].clauseList).m_node.head, 0, 0), (yyvsp[(2) - (3)].clauseList).m_varDeclarations, (yyvsp[(2) - (3)].clauseList).m_funcDeclarations, (yyvsp[(2) - (3)].clauseList).m_features, (yyvsp[(2) - (3)].clauseList).m_numConstants); ;} break; case 270: + +/* Line 1455 of yacc.c */ #line 1087 "../parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (5)].clauseList).m_node.head, (yyvsp[(3) - (5)].caseClauseNode).m_node, (yyvsp[(4) - (5)].clauseList).m_node.head), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_varDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_varDeclarations), (yyvsp[(4) - (5)].clauseList).m_varDeclarations), @@ -4230,11 +4582,15 @@ yyreduce: break; case 271: + +/* Line 1455 of yacc.c */ #line 1095 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = 0; (yyval.clauseList).m_node.tail = 0; (yyval.clauseList).m_varDeclarations = 0; (yyval.clauseList).m_funcDeclarations = 0; (yyval.clauseList).m_features = 0; (yyval.clauseList).m_numConstants = 0; ;} break; case 273: + +/* Line 1455 of yacc.c */ #line 1100 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].caseClauseNode).m_node); (yyval.clauseList).m_node.tail = (yyval.clauseList).m_node.head; @@ -4245,6 +4601,8 @@ yyreduce: break; case 274: + +/* Line 1455 of yacc.c */ #line 1106 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = (yyvsp[(1) - (2)].clauseList).m_node.head; (yyval.clauseList).m_node.tail = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (2)].clauseList).m_node.tail, (yyvsp[(2) - (2)].caseClauseNode).m_node); @@ -4256,26 +4614,36 @@ yyreduce: break; case 275: + +/* Line 1455 of yacc.c */ #line 1116 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node), 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); ;} break; case 276: + +/* Line 1455 of yacc.c */ #line 1117 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].sourceElements).m_node), (yyvsp[(4) - (4)].sourceElements).m_varDeclarations, (yyvsp[(4) - (4)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (4)].expressionNode).m_features | (yyvsp[(4) - (4)].sourceElements).m_features, (yyvsp[(2) - (4)].expressionNode).m_numConstants + (yyvsp[(4) - (4)].sourceElements).m_numConstants); ;} break; case 277: + +/* Line 1455 of yacc.c */ #line 1121 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0, 0); ;} break; case 278: + +/* Line 1455 of yacc.c */ #line 1122 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0, (yyvsp[(3) - (3)].sourceElements).m_node), (yyvsp[(3) - (3)].sourceElements).m_varDeclarations, (yyvsp[(3) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(3) - (3)].sourceElements).m_features, (yyvsp[(3) - (3)].sourceElements).m_numConstants); ;} break; case 279: + +/* Line 1455 of yacc.c */ #line 1126 "../parser/Grammar.y" { LabelNode* node = new (GLOBAL_DATA) LabelNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].statementNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4283,6 +4651,8 @@ yyreduce: break; case 280: + +/* Line 1455 of yacc.c */ #line 1132 "../parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4291,6 +4661,8 @@ yyreduce: break; case 281: + +/* Line 1455 of yacc.c */ #line 1136 "../parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); SET_EXCEPTION_LOCATION(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4299,6 +4671,8 @@ yyreduce: break; case 282: + +/* Line 1455 of yacc.c */ #line 1143 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (4)].statementNode).m_node, GLOBAL_DATA->propertyNames->nullIdentifier, false, 0, (yyvsp[(4) - (4)].statementNode).m_node), mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_varDeclarations, (yyvsp[(4) - (4)].statementNode).m_varDeclarations), @@ -4309,6 +4683,8 @@ yyreduce: break; case 283: + +/* Line 1455 of yacc.c */ #line 1149 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, *(yyvsp[(5) - (7)].ident), ((yyvsp[(7) - (7)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (7)].statementNode).m_node, 0), mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), @@ -4319,6 +4695,8 @@ yyreduce: break; case 284: + +/* Line 1455 of yacc.c */ #line 1156 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (9)].statementNode).m_node, *(yyvsp[(5) - (9)].ident), ((yyvsp[(7) - (9)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (9)].statementNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_varDeclarations, (yyvsp[(7) - (9)].statementNode).m_varDeclarations), (yyvsp[(9) - (9)].statementNode).m_varDeclarations), @@ -4329,23 +4707,31 @@ yyreduce: break; case 285: + +/* Line 1455 of yacc.c */ #line 1165 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 286: + +/* Line 1455 of yacc.c */ #line 1167 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; case 287: + +/* Line 1455 of yacc.c */ #line 1172 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (7)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); (yyval.statementNode).m_funcDeclarations->data.append(static_cast<FuncDeclNode*>((yyval.statementNode).m_node)); ;} break; case 288: + +/* Line 1455 of yacc.c */ #line 1174 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (8)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -4357,11 +4743,15 @@ yyreduce: break; case 289: + +/* Line 1455 of yacc.c */ #line 1184 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(5) - (6)].functionBodyNode), LEXER->sourceCode((yyvsp[(4) - (6)].intValue), (yyvsp[(6) - (6)].intValue), (yylsp[(4) - (6)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(5) - (6)].functionBodyNode), (yylsp[(4) - (6)]), (yylsp[(6) - (6)])); ;} break; case 290: + +/* Line 1455 of yacc.c */ #line 1186 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line), (yyvsp[(3) - (7)].parameterList).m_node.head), (yyvsp[(3) - (7)].parameterList).m_features | ClosureFeature, 0); @@ -4372,11 +4762,15 @@ yyreduce: break; case 291: + +/* Line 1455 of yacc.c */ #line 1192 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), LEXER->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); DBG((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); ;} break; case 292: + +/* Line 1455 of yacc.c */ #line 1194 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), LEXER->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -4387,6 +4781,8 @@ yyreduce: break; case 293: + +/* Line 1455 of yacc.c */ #line 1203 "../parser/Grammar.y" { (yyval.parameterList).m_node.head = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)); (yyval.parameterList).m_features = (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0; @@ -4394,6 +4790,8 @@ yyreduce: break; case 294: + +/* Line 1455 of yacc.c */ #line 1206 "../parser/Grammar.y" { (yyval.parameterList).m_node.head = (yyvsp[(1) - (3)].parameterList).m_node.head; (yyval.parameterList).m_features = (yyvsp[(1) - (3)].parameterList).m_features | ((*(yyvsp[(3) - (3)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0); @@ -4401,27 +4799,37 @@ yyreduce: break; case 295: + +/* Line 1455 of yacc.c */ #line 1212 "../parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 296: + +/* Line 1455 of yacc.c */ #line 1213 "../parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 297: + +/* Line 1455 of yacc.c */ #line 1217 "../parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing(new (GLOBAL_DATA) SourceElements(GLOBAL_DATA), 0, 0, NoFeatures, (yylsp[(0) - (0)]).last_line, 0); ;} break; case 298: + +/* Line 1455 of yacc.c */ #line 1218 "../parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing((yyvsp[(1) - (1)].sourceElements).m_node, (yyvsp[(1) - (1)].sourceElements).m_varDeclarations, (yyvsp[(1) - (1)].sourceElements).m_funcDeclarations, (yyvsp[(1) - (1)].sourceElements).m_features, (yylsp[(1) - (1)]).last_line, (yyvsp[(1) - (1)].sourceElements).m_numConstants); ;} break; case 299: + +/* Line 1455 of yacc.c */ #line 1223 "../parser/Grammar.y" { (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA); (yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node); @@ -4433,6 +4841,8 @@ yyreduce: break; case 300: + +/* Line 1455 of yacc.c */ #line 1230 "../parser/Grammar.y" { (yyval.sourceElements).m_node->append((yyvsp[(2) - (2)].statementNode).m_node); (yyval.sourceElements).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_varDeclarations, (yyvsp[(2) - (2)].statementNode).m_varDeclarations); @@ -4443,188 +4853,261 @@ yyreduce: break; case 304: + +/* Line 1455 of yacc.c */ #line 1244 "../parser/Grammar.y" { ;} break; case 305: + +/* Line 1455 of yacc.c */ #line 1245 "../parser/Grammar.y" { ;} break; case 306: + +/* Line 1455 of yacc.c */ #line 1246 "../parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;} break; case 307: + +/* Line 1455 of yacc.c */ #line 1247 "../parser/Grammar.y" { Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;} break; case 308: + +/* Line 1455 of yacc.c */ #line 1251 "../parser/Grammar.y" { ;} break; case 309: + +/* Line 1455 of yacc.c */ #line 1252 "../parser/Grammar.y" { ;} break; case 310: + +/* Line 1455 of yacc.c */ #line 1253 "../parser/Grammar.y" { ;} break; case 311: + +/* Line 1455 of yacc.c */ #line 1254 "../parser/Grammar.y" { if (*(yyvsp[(1) - (7)].ident) != "get" && *(yyvsp[(1) - (7)].ident) != "set") YYABORT; ;} break; case 312: + +/* Line 1455 of yacc.c */ #line 1255 "../parser/Grammar.y" { if (*(yyvsp[(1) - (8)].ident) != "get" && *(yyvsp[(1) - (8)].ident) != "set") YYABORT; ;} break; case 316: + +/* Line 1455 of yacc.c */ #line 1265 "../parser/Grammar.y" { ;} break; case 317: + +/* Line 1455 of yacc.c */ #line 1266 "../parser/Grammar.y" { ;} break; case 318: + +/* Line 1455 of yacc.c */ #line 1268 "../parser/Grammar.y" { ;} break; case 322: + +/* Line 1455 of yacc.c */ #line 1275 "../parser/Grammar.y" { ;} break; case 517: + +/* Line 1455 of yacc.c */ #line 1643 "../parser/Grammar.y" { ;} break; case 518: + +/* Line 1455 of yacc.c */ #line 1644 "../parser/Grammar.y" { ;} break; case 520: + +/* Line 1455 of yacc.c */ #line 1649 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 521: + +/* Line 1455 of yacc.c */ #line 1653 "../parser/Grammar.y" { ;} break; case 522: + +/* Line 1455 of yacc.c */ #line 1654 "../parser/Grammar.y" { ;} break; case 525: + +/* Line 1455 of yacc.c */ #line 1660 "../parser/Grammar.y" { ;} break; case 526: + +/* Line 1455 of yacc.c */ #line 1661 "../parser/Grammar.y" { ;} break; case 530: + +/* Line 1455 of yacc.c */ #line 1668 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 533: + +/* Line 1455 of yacc.c */ #line 1677 "../parser/Grammar.y" { ;} break; case 534: + +/* Line 1455 of yacc.c */ #line 1678 "../parser/Grammar.y" { ;} break; case 539: + +/* Line 1455 of yacc.c */ #line 1695 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 555: + +/* Line 1455 of yacc.c */ #line 1726 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 557: + +/* Line 1455 of yacc.c */ #line 1728 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 559: + +/* Line 1455 of yacc.c */ #line 1733 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 561: + +/* Line 1455 of yacc.c */ #line 1735 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 563: + +/* Line 1455 of yacc.c */ #line 1740 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 565: + +/* Line 1455 of yacc.c */ #line 1742 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 568: + +/* Line 1455 of yacc.c */ #line 1754 "../parser/Grammar.y" { ;} break; case 569: + +/* Line 1455 of yacc.c */ #line 1755 "../parser/Grammar.y" { ;} break; case 578: + +/* Line 1455 of yacc.c */ #line 1779 "../parser/Grammar.y" { ;} break; case 580: + +/* Line 1455 of yacc.c */ #line 1784 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 585: + +/* Line 1455 of yacc.c */ #line 1795 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 592: + +/* Line 1455 of yacc.c */ #line 1811 "../parser/Grammar.y" { ;} break; -/* Line 1267 of yacc.c. */ -#line 4628 "JavaScriptCore/tmp/../generated/Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 5111 "JavaScriptCore/tmp/../generated/Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4700,7 +5183,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -4717,7 +5200,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -4775,14 +5258,11 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; yyerror_range[1] = yylloc; /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ + the lookahead. YYLOC is available though. */ YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); *++yylsp = yyloc; @@ -4807,7 +5287,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -4818,7 +5298,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); /* Do not reclaim the symbols of the rule which action triggered @@ -4844,6 +5324,8 @@ yyreturn: } + +/* Line 1675 of yacc.c */ #line 1827 "../parser/Grammar.y" diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h index ebd30c8..c7d3837 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -104,78 +104,16 @@ AUTOMINUSMINUS = 320 }; #endif -/* Tokens. */ -#define NULLTOKEN 258 -#define TRUETOKEN 259 -#define FALSETOKEN 260 -#define BREAK 261 -#define CASE 262 -#define DEFAULT 263 -#define FOR 264 -#define NEW 265 -#define VAR 266 -#define CONSTTOKEN 267 -#define CONTINUE 268 -#define FUNCTION 269 -#define RETURN 270 -#define VOIDTOKEN 271 -#define DELETETOKEN 272 -#define IF 273 -#define THISTOKEN 274 -#define DO 275 -#define WHILE 276 -#define INTOKEN 277 -#define INSTANCEOF 278 -#define TYPEOF 279 -#define SWITCH 280 -#define WITH 281 -#define RESERVED 282 -#define THROW 283 -#define TRY 284 -#define CATCH 285 -#define FINALLY 286 -#define DEBUGGER 287 -#define IF_WITHOUT_ELSE 288 -#define ELSE 289 -#define EQEQ 290 -#define NE 291 -#define STREQ 292 -#define STRNEQ 293 -#define LE 294 -#define GE 295 -#define OR 296 -#define AND 297 -#define PLUSPLUS 298 -#define MINUSMINUS 299 -#define LSHIFT 300 -#define RSHIFT 301 -#define URSHIFT 302 -#define PLUSEQUAL 303 -#define MINUSEQUAL 304 -#define MULTEQUAL 305 -#define DIVEQUAL 306 -#define LSHIFTEQUAL 307 -#define RSHIFTEQUAL 308 -#define URSHIFTEQUAL 309 -#define ANDEQUAL 310 -#define MODEQUAL 311 -#define XOREQUAL 312 -#define OREQUAL 313 -#define OPENBRACE 314 -#define CLOSEBRACE 315 -#define NUMBER 316 -#define IDENT 317 -#define STRING 318 -#define AUTOPLUSPLUS 319 -#define AUTOMINUSMINUS 320 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 157 "../parser/Grammar.y" { + +/* Line 1676 of yacc.c */ +#line 157 "../parser/Grammar.y" + int intValue; double doubleValue; Identifier* ident; @@ -205,13 +143,15 @@ typedef union YYSTYPE ParameterListInfo parameterList; Operator op; -} -/* Line 1489 of yacc.c. */ -#line 211 "JavaScriptCore/tmp/../generated/Grammar.tab.h" - YYSTYPE; + + + +/* Line 1676 of yacc.c */ +#line 151 "JavaScriptCore/tmp/../generated/Grammar.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif @@ -230,3 +170,4 @@ typedef struct YYLTYPE #endif + diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h index 2b7e836..a9b1631 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/JSONObject.lut.h @@ -10,6 +10,6 @@ static const struct HashTableValue jsonTableValues[3] = { { 0, 0, 0, 0 } }; -extern const struct HashTable jsonTable = +extern JSC_CONST_HASHTABLE HashTable jsonTable = { 4, 3, jsonTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h index fb1ae29..95c33b6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/Lexer.lut.h @@ -44,6 +44,6 @@ static const struct HashTableValue mainTableValues[37] = { { 0, 0, 0, 0 } }; -extern const struct HashTable mainTable = +extern JSC_CONST_HASHTABLE HashTable mainTable = { 133, 127, mainTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h index 7d9b43e..9cb0ee2 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/MathObject.lut.h @@ -26,6 +26,6 @@ static const struct HashTableValue mathTableValues[19] = { { 0, 0, 0, 0 } }; -extern const struct HashTable mathTable = +extern JSC_CONST_HASHTABLE HashTable mathTable = { 67, 63, mathTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h index e963e1a..6285d62 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/NumberConstructor.lut.h @@ -13,6 +13,6 @@ static const struct HashTableValue numberTableValues[6] = { { 0, 0, 0, 0 } }; -extern const struct HashTable numberTable = +extern JSC_CONST_HASHTABLE HashTable numberTable = { 16, 15, numberTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h index fd822c6..a3f15b3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpConstructor.lut.h @@ -29,6 +29,6 @@ static const struct HashTableValue regExpConstructorTableValues[22] = { { 0, 0, 0, 0 } }; -extern const struct HashTable regExpConstructorTable = +extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable = { 65, 63, regExpConstructorTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h index 81d5b60..8c87f16 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/RegExpObject.lut.h @@ -13,6 +13,6 @@ static const struct HashTableValue regExpTableValues[6] = { { 0, 0, 0, 0 } }; -extern const struct HashTable regExpTable = +extern JSC_CONST_HASHTABLE HashTable regExpTable = { 17, 15, regExpTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h b/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h index dfb9c20..f912298 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/StringPrototype.lut.h @@ -40,6 +40,6 @@ static const struct HashTableValue stringTableValues[33] = { { 0, 0, 0, 0 } }; -extern const struct HashTable stringTable = +extern JSC_CONST_HASHTABLE HashTable stringTable = { 71, 63, stringTableValues, 0 }; } // namespace diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h index a8a677e..75de082 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h @@ -124,26 +124,23 @@ namespace JSC { setCalleeArguments(0); } - private: - friend class Arguments; - friend class JSActivation; - friend class JSGlobalObject; - friend class Interpreter; - friend struct CallFrameClosure; + // Read a register from the codeframe (or constant from the CodeBlock). + inline Register& r(int); + static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); } int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); } + bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; } + CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); } + CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); } + + private: void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; } void setCallee(JSObject* callee) { this[RegisterFile::Callee] = callee; } void setCodeBlock(CodeBlock* codeBlock) { this[RegisterFile::CodeBlock] = codeBlock; } static const intptr_t HostCallFrameFlag = 1; - static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); } - bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; } - CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); } - CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); } - ExecState(); ~ExecState(); }; diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index d006b53..ccc26bb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -116,7 +116,7 @@ NEVER_INLINE bool Interpreter::resolve(CallFrame* callFrame, Instruction* vPC, J exceptionValue = callFrame->globalData().exception; if (exceptionValue) return false; - callFrame[dst] = JSValue(result); + callFrame->r(dst) = JSValue(result); return true; } } while (++iter != end); @@ -149,7 +149,7 @@ NEVER_INLINE bool Interpreter::resolveSkip(CallFrame* callFrame, Instruction* vP exceptionValue = callFrame->globalData().exception; if (exceptionValue) return false; - callFrame[dst] = JSValue(result); + callFrame->r(dst) = JSValue(result); return true; } } while (++iter != end); @@ -167,7 +167,7 @@ NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* int offset = (vPC + 5)->u.operand; if (structure == globalObject->structure()) { - callFrame[dst] = JSValue(globalObject->getDirectOffset(offset)); + callFrame->r(dst) = JSValue(globalObject->getDirectOffset(offset)); return true; } @@ -182,14 +182,14 @@ NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* globalObject->structure()->ref(); vPC[4] = globalObject->structure(); vPC[5] = slot.cachedOffset(); - callFrame[dst] = JSValue(result); + callFrame->r(dst) = JSValue(result); return true; } exceptionValue = callFrame->globalData().exception; if (exceptionValue) return false; - callFrame[dst] = JSValue(result); + callFrame->r(dst) = JSValue(result); return true; } @@ -201,7 +201,7 @@ NEVER_INLINE void Interpreter::resolveBase(CallFrame* callFrame, Instruction* vP { int dst = (vPC + 1)->u.operand; int property = (vPC + 2)->u.operand; - callFrame[dst] = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain())); + callFrame->r(dst) = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain())); } NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValue& exceptionValue) @@ -229,8 +229,8 @@ NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Inst exceptionValue = callFrame->globalData().exception; if (exceptionValue) return false; - callFrame[propDst] = JSValue(result); - callFrame[baseDst] = JSValue(base); + callFrame->r(propDst) = JSValue(result); + callFrame->r(baseDst) = JSValue(base); return true; } ++iter; @@ -274,8 +274,8 @@ NEVER_INLINE bool Interpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruct if (exceptionValue) return false; - callFrame[baseDst] = JSValue(thisObj); - callFrame[funcDst] = JSValue(result); + callFrame->r(baseDst) = JSValue(thisObj); + callFrame->r(funcDst) = JSValue(result); return true; } ++iter; @@ -440,17 +440,7 @@ void Interpreter::dumpRegisters(CallFrame* callFrame) } printf("----------------------------------------------------\n"); - end = it + codeBlock->m_numConstants; - if (it != end) { - do { - printf("[r%2d] | %10p | %10p \n", registerCount, it, (*it).v()); - ++it; - ++registerCount; - } while (it != end); - } - printf("----------------------------------------------------\n"); - - end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numConstants - codeBlock->m_numVars; + end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numVars; if (it != end) { do { printf("[r%2d] | %10p | %10p \n", registerCount, it, (*it).v()); @@ -571,13 +561,13 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV if (Profiler* profiler = *Profiler::enabledProfilerReference()) { #if !ENABLE(JIT) if (isCallBytecode(codeBlock->instructions()[bytecodeOffset].u.opcode)) - profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 2].u.operand].jsValue()); + profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 2].u.operand).jsValue()); else if (codeBlock->instructions()[bytecodeOffset + 8].u.opcode == getOpcode(op_construct)) - profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 10].u.operand].jsValue()); + profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 10].u.operand).jsValue()); #else int functionRegisterIndex; if (codeBlock->functionRegisterForBytecodeOffset(bytecodeOffset, functionRegisterIndex)) - profiler->didExecute(callFrame, callFrame[functionRegisterIndex].jsValue()); + profiler->didExecute(callFrame, callFrame->r(functionRegisterIndex).jsValue()); #endif } @@ -629,7 +619,7 @@ JSValue Interpreter::execute(ProgramNode* programNode, CallFrame* callFrame, Sco globalObject->copyGlobalsTo(m_registerFile); CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize); - newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj); + newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj); newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), 0, 0, 0); if (codeBlock->needsFullScopeChain()) @@ -686,10 +676,10 @@ JSValue Interpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* call CallFrame* newCallFrame = CallFrame::create(oldEnd); size_t dst = 0; - newCallFrame[0] = JSValue(thisObj); + newCallFrame->r(0) = JSValue(thisObj); ArgList::const_iterator end = args.end(); for (ArgList::const_iterator it = args.begin(); it != end; ++it) - newCallFrame[++dst] = *it; + newCallFrame->r(++dst) = *it; CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain); newCallFrame = slideRegisterWindowForCall(codeBlock, &m_registerFile, newCallFrame, argc + RegisterFile::CallFrameHeaderSize, argc); @@ -747,7 +737,7 @@ CallFrameClosure Interpreter::prepareForRepeatCall(FunctionBodyNode* functionBod CallFrame* newCallFrame = CallFrame::create(oldEnd); size_t dst = 0; for (int i = 0; i < argc; ++i) - newCallFrame[++dst] = jsUndefined(); + newCallFrame->r(++dst) = jsUndefined(); CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain); newCallFrame = slideRegisterWindowForCall(codeBlock, &m_registerFile, newCallFrame, argc + RegisterFile::CallFrameHeaderSize, argc); @@ -858,7 +848,7 @@ JSValue Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* CallFrame* newCallFrame = CallFrame::create(m_registerFile.start() + globalRegisterOffset); // a 0 codeBlock indicates a built-in caller - newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj); + newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj); newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), 0, 0, 0); if (codeBlock->needsFullScopeChain()) @@ -922,9 +912,9 @@ NEVER_INLINE ScopeChainNode* Interpreter::createExceptionScope(CallFrame* callFr int dst = (++vPC)->u.operand; CodeBlock* codeBlock = callFrame->codeBlock(); Identifier& property = codeBlock->identifier((++vPC)->u.operand); - JSValue value = callFrame[(++vPC)->u.operand].jsValue(); + JSValue value = callFrame->r((++vPC)->u.operand).jsValue(); JSObject* scope = new (callFrame) JSStaticScopeObject(callFrame, property, value, DontDelete); - callFrame[dst] = JSValue(scope); + callFrame->r(dst) = JSValue(scope); return callFrame->scopeChain()->push(scope); } @@ -1201,7 +1191,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi constructor, and puts the result in register dst. */ int dst = (++vPC)->u.operand; - callFrame[dst] = JSValue(constructEmptyObject(callFrame)); + callFrame->r(dst) = JSValue(constructEmptyObject(callFrame)); ++vPC; NEXT_INSTRUCTION(); @@ -1218,7 +1208,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int firstArg = (++vPC)->u.operand; int argCount = (++vPC)->u.operand; ArgList args(callFrame->registers() + firstArg, argCount); - callFrame[dst] = JSValue(constructArray(callFrame, args)); + callFrame->r(dst) = JSValue(constructArray(callFrame, args)); ++vPC; NEXT_INSTRUCTION(); @@ -1232,7 +1222,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int regExp = (++vPC)->u.operand; - callFrame[dst] = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp))); + callFrame->r(dst) = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp))); ++vPC; NEXT_INSTRUCTION(); @@ -1244,7 +1234,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = callFrame[src]; + callFrame->r(dst) = callFrame->r(src); ++vPC; NEXT_INSTRUCTION(); @@ -1257,14 +1247,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi as a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) - callFrame[dst] = JSFastMath::equal(src1, src2); + callFrame->r(dst) = JSFastMath::equal(src1, src2); else { JSValue result = jsBoolean(JSValue::equalSlowCase(callFrame, src1, src2)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; @@ -1277,15 +1267,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi operator, and puts the result as a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); if (src.isUndefinedOrNull()) { - callFrame[dst] = jsBoolean(true); + callFrame->r(dst) = jsBoolean(true); ++vPC; NEXT_INSTRUCTION(); } - callFrame[dst] = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined()); + callFrame->r(dst) = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined()); ++vPC; NEXT_INSTRUCTION(); } @@ -1297,14 +1287,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi result as a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) - callFrame[dst] = JSFastMath::notEqual(src1, src2); + callFrame->r(dst) = JSFastMath::notEqual(src1, src2); else { JSValue result = jsBoolean(!JSValue::equalSlowCase(callFrame, src1, src2)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; @@ -1317,15 +1307,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi operator, and puts the result as a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); if (src.isUndefinedOrNull()) { - callFrame[dst] = jsBoolean(false); + callFrame->r(dst) = jsBoolean(false); ++vPC; NEXT_INSTRUCTION(); } - callFrame[dst] = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined()); + callFrame->r(dst) = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined()); ++vPC; NEXT_INSTRUCTION(); } @@ -1337,9 +1327,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi result as a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); - callFrame[dst] = jsBoolean(JSValue::strictEqual(src1, src2)); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); + callFrame->r(dst) = jsBoolean(JSValue::strictEqual(src1, src2)); ++vPC; NEXT_INSTRUCTION(); @@ -1352,9 +1342,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi puts the result as a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); - callFrame[dst] = jsBoolean(!JSValue::strictEqual(src1, src2)); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); + callFrame->r(dst) = jsBoolean(!JSValue::strictEqual(src1, src2)); ++vPC; NEXT_INSTRUCTION(); @@ -1367,11 +1357,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); JSValue result = jsBoolean(jsLess(callFrame, src1, src2)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); @@ -1384,11 +1374,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi puts the result as a boolean in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); JSValue result = jsBoolean(jsLessEq(callFrame, src1, src2)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); @@ -1400,13 +1390,13 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi back in register srcDst. */ int srcDst = (++vPC)->u.operand; - JSValue v = callFrame[srcDst].jsValue(); + JSValue v = callFrame->r(srcDst).jsValue(); if (JSFastMath::canDoFastAdditiveOperations(v)) - callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v)); + callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v)); else { JSValue result = jsNumber(callFrame, v.toNumber(callFrame) + 1); CHECK_FOR_EXCEPTION(); - callFrame[srcDst] = result; + callFrame->r(srcDst) = result; } ++vPC; @@ -1419,13 +1409,13 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi back in register srcDst. */ int srcDst = (++vPC)->u.operand; - JSValue v = callFrame[srcDst].jsValue(); + JSValue v = callFrame->r(srcDst).jsValue(); if (JSFastMath::canDoFastAdditiveOperations(v)) - callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v)); + callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v)); else { JSValue result = jsNumber(callFrame, v.toNumber(callFrame) - 1); CHECK_FOR_EXCEPTION(); - callFrame[srcDst] = result; + callFrame->r(srcDst) = result; } ++vPC; @@ -1440,15 +1430,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int srcDst = (++vPC)->u.operand; - JSValue v = callFrame[srcDst].jsValue(); + JSValue v = callFrame->r(srcDst).jsValue(); if (JSFastMath::canDoFastAdditiveOperations(v)) { - callFrame[dst] = v; - callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v)); + callFrame->r(dst) = v; + callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v)); } else { - JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame); + JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame); CHECK_FOR_EXCEPTION(); - callFrame[dst] = number; - callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1)); + callFrame->r(dst) = number; + callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1)); } ++vPC; @@ -1463,15 +1453,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int srcDst = (++vPC)->u.operand; - JSValue v = callFrame[srcDst].jsValue(); + JSValue v = callFrame->r(srcDst).jsValue(); if (JSFastMath::canDoFastAdditiveOperations(v)) { - callFrame[dst] = v; - callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v)); + callFrame->r(dst) = v; + callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v)); } else { - JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame); + JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame); CHECK_FOR_EXCEPTION(); - callFrame[dst] = number; - callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1)); + callFrame->r(dst) = number; + callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1)); } ++vPC; @@ -1486,14 +1476,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - JSValue srcVal = callFrame[src].jsValue(); + JSValue srcVal = callFrame->r(src).jsValue(); if (LIKELY(srcVal.isNumber())) - callFrame[dst] = callFrame[src]; + callFrame->r(dst) = callFrame->r(src); else { JSValue result = srcVal.toJSNumber(callFrame); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; @@ -1506,15 +1496,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi result in register dst. */ int dst = (++vPC)->u.operand; - JSValue src = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); ++vPC; double v; if (src.getNumber(v)) - callFrame[dst] = JSValue(jsNumber(callFrame, -v)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, -v)); else { JSValue result = jsNumber(callFrame, -src.toNumber(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } NEXT_INSTRUCTION(); @@ -1527,14 +1517,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi numeric add, depending on the types of the operands.) */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); if (JSFastMath::canDoFastAdditiveOperations(src1, src2)) - callFrame[dst] = JSValue(JSFastMath::addImmediateNumbers(src1, src2)); + callFrame->r(dst) = JSValue(JSFastMath::addImmediateNumbers(src1, src2)); else { JSValue result = jsAdd(callFrame, src1, src2); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } vPC += 2; NEXT_INSTRUCTION(); @@ -1546,23 +1536,23 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi numbers), and puts the product in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); double left; double right; if (JSValue::areBothInt32Fast(src1, src2)) { int32_t left = src1.getInt32Fast(); int32_t right = src2.getInt32Fast(); if ((left | right) >> 15 == 0) - callFrame[dst] = JSValue(jsNumber(callFrame, left * right)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right)); else - callFrame[dst] = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right))); + callFrame->r(dst) = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right))); } else if (src1.getNumber(left) && src2.getNumber(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left * right)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right)); else { JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) * src2.toNumber(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } vPC += 2; @@ -1576,16 +1566,16 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi quotient in register dst. */ int dst = (++vPC)->u.operand; - JSValue dividend = callFrame[(++vPC)->u.operand].jsValue(); - JSValue divisor = callFrame[(++vPC)->u.operand].jsValue(); + JSValue dividend = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue divisor = callFrame->r((++vPC)->u.operand).jsValue(); double left; double right; if (dividend.getNumber(left) && divisor.getNumber(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left / right)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left / right)); else { JSValue result = jsNumber(callFrame, dividend.toNumber(callFrame) / divisor.toNumber(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; NEXT_INSTRUCTION(); @@ -1601,15 +1591,15 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int dividend = (++vPC)->u.operand; int divisor = (++vPC)->u.operand; - JSValue dividendValue = callFrame[dividend].jsValue(); - JSValue divisorValue = callFrame[divisor].jsValue(); + JSValue dividendValue = callFrame->r(dividend).jsValue(); + JSValue divisorValue = callFrame->r(divisor).jsValue(); if (JSValue::areBothInt32Fast(dividendValue, divisorValue) && divisorValue != jsNumber(callFrame, 0)) { // We expect the result of the modulus of a number that was representable as an int32 to also be representable // as an int32. JSValue result = JSValue::makeInt32Fast(dividendValue.getInt32Fast() % divisorValue.getInt32Fast()); ASSERT(result); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); } @@ -1617,7 +1607,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi double d = dividendValue.toNumber(callFrame); JSValue result = jsNumber(callFrame, fmod(d, divisorValue.toNumber(callFrame))); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); } @@ -1629,18 +1619,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); double left; double right; if (JSFastMath::canDoFastAdditiveOperations(src1, src2)) - callFrame[dst] = JSValue(JSFastMath::subImmediateNumbers(src1, src2)); + callFrame->r(dst) = JSValue(JSFastMath::subImmediateNumbers(src1, src2)); else if (src1.getNumber(left) && src2.getNumber(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left - right)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left - right)); else { JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) - src2.toNumber(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } vPC += 2; NEXT_INSTRUCTION(); @@ -1653,18 +1643,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi in register dst. */ int dst = (++vPC)->u.operand; - JSValue val = callFrame[(++vPC)->u.operand].jsValue(); - JSValue shift = callFrame[(++vPC)->u.operand].jsValue(); + JSValue val = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue shift = callFrame->r((++vPC)->u.operand).jsValue(); int32_t left; uint32_t right; if (JSValue::areBothInt32Fast(val, shift)) - callFrame[dst] = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f))); + callFrame->r(dst) = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f))); else if (val.numberToInt32(left) && shift.numberToUInt32(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left << (right & 0x1f))); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left << (right & 0x1f))); else { JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; @@ -1678,18 +1668,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi uint32), and puts the result in register dst. */ int dst = (++vPC)->u.operand; - JSValue val = callFrame[(++vPC)->u.operand].jsValue(); - JSValue shift = callFrame[(++vPC)->u.operand].jsValue(); + JSValue val = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue shift = callFrame->r((++vPC)->u.operand).jsValue(); int32_t left; uint32_t right; if (JSFastMath::canDoFastRshift(val, shift)) - callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); + callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); else if (val.numberToInt32(left) && shift.numberToUInt32(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left >> (right & 0x1f))); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left >> (right & 0x1f))); else { JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; @@ -1703,14 +1693,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi uint32), and puts the result in register dst. */ int dst = (++vPC)->u.operand; - JSValue val = callFrame[(++vPC)->u.operand].jsValue(); - JSValue shift = callFrame[(++vPC)->u.operand].jsValue(); + JSValue val = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue shift = callFrame->r((++vPC)->u.operand).jsValue(); if (JSFastMath::canDoFastUrshift(val, shift)) - callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); + callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); else { JSValue result = jsNumber(callFrame, (val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; @@ -1724,18 +1714,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); int32_t left; int32_t right; if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) - callFrame[dst] = JSValue(JSFastMath::andImmediateNumbers(src1, src2)); + callFrame->r(dst) = JSValue(JSFastMath::andImmediateNumbers(src1, src2)); else if (src1.numberToInt32(left) && src2.numberToInt32(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left & right)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left & right)); else { JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) & src2.toInt32(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } vPC += 2; @@ -1749,18 +1739,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); int32_t left; int32_t right; if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) - callFrame[dst] = JSValue(JSFastMath::xorImmediateNumbers(src1, src2)); + callFrame->r(dst) = JSValue(JSFastMath::xorImmediateNumbers(src1, src2)); else if (src1.numberToInt32(left) && src2.numberToInt32(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left ^ right)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left ^ right)); else { JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) ^ src2.toInt32(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } vPC += 2; @@ -1774,18 +1764,18 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi result in register dst. */ int dst = (++vPC)->u.operand; - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); int32_t left; int32_t right; if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) - callFrame[dst] = JSValue(JSFastMath::orImmediateNumbers(src1, src2)); + callFrame->r(dst) = JSValue(JSFastMath::orImmediateNumbers(src1, src2)); else if (src1.numberToInt32(left) && src2.numberToInt32(right)) - callFrame[dst] = JSValue(jsNumber(callFrame, left | right)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, left | right)); else { JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) | src2.toInt32(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } vPC += 2; @@ -1798,14 +1788,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi and puts the result in register dst. */ int dst = (++vPC)->u.operand; - JSValue src = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); int32_t value; if (src.numberToInt32(value)) - callFrame[dst] = JSValue(jsNumber(callFrame, ~value)); + callFrame->r(dst) = JSValue(jsNumber(callFrame, ~value)); else { JSValue result = jsNumber(callFrame, ~src.toInt32(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; } ++vPC; NEXT_INSTRUCTION(); @@ -1818,9 +1808,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - JSValue result = jsBoolean(!callFrame[src].jsValue().toBoolean(callFrame)); + JSValue result = jsBoolean(!callFrame->r(src).jsValue().toBoolean(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); @@ -1843,14 +1833,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int base = vPC[3].u.operand; int baseProto = vPC[4].u.operand; - JSValue baseVal = callFrame[base].jsValue(); + JSValue baseVal = callFrame->r(base).jsValue(); if (isInvalidParamForInstanceOf(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue)) goto vm_throw; - bool result = asObject(baseVal)->hasInstance(callFrame, callFrame[value].jsValue(), callFrame[baseProto].jsValue()); + bool result = asObject(baseVal)->hasInstance(callFrame, callFrame->r(value).jsValue(), callFrame->r(baseProto).jsValue()); CHECK_FOR_EXCEPTION(); - callFrame[dst] = jsBoolean(result); + callFrame->r(dst) = jsBoolean(result); vPC += 5; NEXT_INSTRUCTION(); @@ -1863,7 +1853,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = JSValue(jsTypeStringForValue(callFrame, callFrame[src].jsValue())); + callFrame->r(dst) = JSValue(jsTypeStringForValue(callFrame, callFrame->r(src).jsValue())); ++vPC; NEXT_INSTRUCTION(); @@ -1877,8 +1867,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - JSValue v = callFrame[src].jsValue(); - callFrame[dst] = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined()); + JSValue v = callFrame->r(src).jsValue(); + callFrame->r(dst) = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined()); ++vPC; NEXT_INSTRUCTION(); @@ -1892,7 +1882,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = jsBoolean(callFrame[src].jsValue().isBoolean()); + callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isBoolean()); ++vPC; NEXT_INSTRUCTION(); @@ -1906,7 +1896,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = jsBoolean(callFrame[src].jsValue().isNumber()); + callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isNumber()); ++vPC; NEXT_INSTRUCTION(); @@ -1920,7 +1910,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = jsBoolean(callFrame[src].jsValue().isString()); + callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isString()); ++vPC; NEXT_INSTRUCTION(); @@ -1934,7 +1924,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = jsBoolean(jsIsObjectType(callFrame[src].jsValue())); + callFrame->r(dst) = jsBoolean(jsIsObjectType(callFrame->r(src).jsValue())); ++vPC; NEXT_INSTRUCTION(); @@ -1948,7 +1938,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = jsBoolean(jsIsFunctionType(callFrame[src].jsValue())); + callFrame->r(dst) = jsBoolean(jsIsFunctionType(callFrame->r(src).jsValue())); ++vPC; NEXT_INSTRUCTION(); @@ -1966,21 +1956,21 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int property = (++vPC)->u.operand; int base = (++vPC)->u.operand; - JSValue baseVal = callFrame[base].jsValue(); + JSValue baseVal = callFrame->r(base).jsValue(); if (isInvalidParamForIn(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue)) goto vm_throw; JSObject* baseObj = asObject(baseVal); - JSValue propName = callFrame[property].jsValue(); + JSValue propName = callFrame->r(property).jsValue(); uint32_t i; if (propName.getUInt32(i)) - callFrame[dst] = jsBoolean(baseObj->hasProperty(callFrame, i)); + callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, i)); else { Identifier property(callFrame, propName.toString(callFrame)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = jsBoolean(baseObj->hasProperty(callFrame, property)); + callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, property)); } ++vPC; @@ -2038,7 +2028,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ASSERT(scope->isGlobalObject()); int index = (++vPC)->u.operand; - callFrame[dst] = scope->registerAt(index); + callFrame->r(dst) = scope->registerAt(index); ++vPC; NEXT_INSTRUCTION(); } @@ -2052,7 +2042,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int index = (++vPC)->u.operand; int value = (++vPC)->u.operand; - scope->registerAt(index) = JSValue(callFrame[value].jsValue()); + scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); ++vPC; NEXT_INSTRUCTION(); } @@ -2077,7 +2067,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ASSERT((*iter)->isVariableObject()); JSVariableObject* scope = static_cast<JSVariableObject*>(*iter); - callFrame[dst] = scope->registerAt(index); + callFrame->r(dst) = scope->registerAt(index); ++vPC; NEXT_INSTRUCTION(); } @@ -2100,7 +2090,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ASSERT((*iter)->isVariableObject()); JSVariableObject* scope = static_cast<JSVariableObject*>(*iter); - scope->registerAt(index) = JSValue(callFrame[value].jsValue()); + scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); ++vPC; NEXT_INSTRUCTION(); } @@ -2168,14 +2158,14 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi CodeBlock* codeBlock = callFrame->codeBlock(); Identifier& ident = codeBlock->identifier(property); - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); PropertySlot slot(baseValue); JSValue result = baseValue.get(callFrame, ident, slot); CHECK_FOR_EXCEPTION(); tryCacheGetByID(callFrame, codeBlock, vPC, baseValue, ident, slot); - callFrame[dst] = result; + callFrame->r(dst) = result; vPC += 8; NEXT_INSTRUCTION(); } @@ -2187,7 +2177,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi op_get_by_id. */ int base = vPC[2].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); if (LIKELY(baseValue.isCell())) { JSCell* baseCell = asCell(baseValue); @@ -2200,7 +2190,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int offset = vPC[5].u.operand; ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); - callFrame[dst] = JSValue(baseObject->getDirectOffset(offset)); + callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset)); vPC += 8; NEXT_INSTRUCTION(); @@ -2218,7 +2208,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi reverts to op_get_by_id. */ int base = vPC[2].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); if (LIKELY(baseValue.isCell())) { JSCell* baseCell = asCell(baseValue); @@ -2234,7 +2224,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int offset = vPC[6].u.operand; ASSERT(protoObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset)); - callFrame[dst] = JSValue(protoObject->getDirectOffset(offset)); + callFrame->r(dst) = JSValue(protoObject->getDirectOffset(offset)); vPC += 8; NEXT_INSTRUCTION(); @@ -2267,7 +2257,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi reverts to op_get_by_id. */ int base = vPC[2].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); if (LIKELY(baseValue.isCell())) { JSCell* baseCell = asCell(baseValue); @@ -2289,7 +2279,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int offset = vPC[7].u.operand; ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); - callFrame[dst] = JSValue(baseObject->getDirectOffset(offset)); + callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset)); vPC += 8; NEXT_INSTRUCTION(); @@ -2315,12 +2305,12 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int property = vPC[3].u.operand; Identifier& ident = callFrame->codeBlock()->identifier(property); - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); PropertySlot slot(baseValue); JSValue result = baseValue.get(callFrame, ident, slot); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; vPC += 8; NEXT_INSTRUCTION(); } @@ -2333,10 +2323,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int base = vPC[2].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); if (LIKELY(isJSArray(globalData, baseValue))) { int dst = vPC[1].u.operand; - callFrame[dst] = JSValue(jsNumber(callFrame, asArray(baseValue)->length())); + callFrame->r(dst) = JSValue(jsNumber(callFrame, asArray(baseValue)->length())); vPC += 8; NEXT_INSTRUCTION(); } @@ -2353,10 +2343,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int base = vPC[2].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); if (LIKELY(isJSString(globalData, baseValue))) { int dst = vPC[1].u.operand; - callFrame[dst] = JSValue(jsNumber(callFrame, asString(baseValue)->value().size())); + callFrame->r(dst) = JSValue(jsNumber(callFrame, asString(baseValue)->value().size())); vPC += 8; NEXT_INSTRUCTION(); } @@ -2379,10 +2369,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int value = vPC[3].u.operand; CodeBlock* codeBlock = callFrame->codeBlock(); - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); Identifier& ident = codeBlock->identifier(property); PutPropertySlot slot; - baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot); + baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot); CHECK_FOR_EXCEPTION(); tryCachePutByID(callFrame, codeBlock, vPC, baseValue, slot); @@ -2402,7 +2392,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi the register file. */ int base = vPC[1].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); if (LIKELY(baseValue.isCell())) { JSCell* baseCell = asCell(baseValue); @@ -2430,7 +2420,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int value = vPC[3].u.operand; unsigned offset = vPC[7].u.operand; ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset); - baseObject->putDirectOffset(offset, callFrame[value].jsValue()); + baseObject->putDirectOffset(offset, callFrame->r(value).jsValue()); vPC += 8; NEXT_INSTRUCTION(); @@ -2452,7 +2442,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi the register file. */ int base = vPC[1].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); if (LIKELY(baseValue.isCell())) { JSCell* baseCell = asCell(baseValue); @@ -2465,7 +2455,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi unsigned offset = vPC[5].u.operand; ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset); - baseObject->putDirectOffset(offset, callFrame[value].jsValue()); + baseObject->putDirectOffset(offset, callFrame->r(value).jsValue()); vPC += 8; NEXT_INSTRUCTION(); @@ -2488,10 +2478,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int property = vPC[2].u.operand; int value = vPC[3].u.operand; - JSValue baseValue = callFrame[base].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); Identifier& ident = callFrame->codeBlock()->identifier(property); PutPropertySlot slot; - baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot); + baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot); CHECK_FOR_EXCEPTION(); vPC += 8; @@ -2509,11 +2499,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int base = (++vPC)->u.operand; int property = (++vPC)->u.operand; - JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); + JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame); Identifier& ident = callFrame->codeBlock()->identifier(property); JSValue result = jsBoolean(baseObj->deleteProperty(callFrame, ident)); CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); } @@ -2529,8 +2519,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int base = (++vPC)->u.operand; int property = (++vPC)->u.operand; - JSValue baseValue = callFrame[base].jsValue(); - JSValue subscript = callFrame[property].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); + JSValue subscript = callFrame->r(property).jsValue(); JSValue result; @@ -2554,7 +2544,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi } CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); } @@ -2573,21 +2563,21 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int property = (++vPC)->u.operand; int value = (++vPC)->u.operand; - JSValue baseValue = callFrame[base].jsValue(); - JSValue subscript = callFrame[property].jsValue(); + JSValue baseValue = callFrame->r(base).jsValue(); + JSValue subscript = callFrame->r(property).jsValue(); if (LIKELY(subscript.isUInt32Fast())) { uint32_t i = subscript.getUInt32Fast(); if (isJSArray(globalData, baseValue)) { JSArray* jsArray = asArray(baseValue); if (jsArray->canSetIndex(i)) - jsArray->setIndex(i, callFrame[value].jsValue()); + jsArray->setIndex(i, callFrame->r(value).jsValue()); else - jsArray->JSArray::put(callFrame, i, callFrame[value].jsValue()); + jsArray->JSArray::put(callFrame, i, callFrame->r(value).jsValue()); } else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) { JSByteArray* jsByteArray = asByteArray(baseValue); double dValue = 0; - JSValue jsValue = callFrame[value].jsValue(); + JSValue jsValue = callFrame->r(value).jsValue(); if (jsValue.isInt32Fast()) jsByteArray->setIndex(i, jsValue.getInt32Fast()); else if (jsValue.getNumber(dValue)) @@ -2595,12 +2585,12 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi else baseValue.put(callFrame, i, jsValue); } else - baseValue.put(callFrame, i, callFrame[value].jsValue()); + baseValue.put(callFrame, i, callFrame->r(value).jsValue()); } else { Identifier property(callFrame, subscript.toString(callFrame)); if (!globalData->exception) { // Don't put to an object if toString threw an exception. PutPropertySlot slot; - baseValue.put(callFrame, property, callFrame[value].jsValue(), slot); + baseValue.put(callFrame, property, callFrame->r(value).jsValue(), slot); } } @@ -2620,9 +2610,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int base = (++vPC)->u.operand; int property = (++vPC)->u.operand; - JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); // may throw + JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame); // may throw - JSValue subscript = callFrame[property].jsValue(); + JSValue subscript = callFrame->r(property).jsValue(); JSValue result; uint32_t i; if (subscript.getUInt32(i)) @@ -2635,7 +2625,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi } CHECK_FOR_EXCEPTION(); - callFrame[dst] = result; + callFrame->r(dst) = result; ++vPC; NEXT_INSTRUCTION(); } @@ -2655,7 +2645,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi unsigned property = (++vPC)->u.operand; int value = (++vPC)->u.operand; - callFrame[base].jsValue().put(callFrame, property, callFrame[value].jsValue()); + callFrame->r(base).jsValue().put(callFrame, property, callFrame->r(value).jsValue()); ++vPC; NEXT_INSTRUCTION(); @@ -2702,7 +2692,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int cond = (++vPC)->u.operand; int target = (++vPC)->u.operand; - if (callFrame[cond].jsValue().toBoolean(callFrame)) { + if (callFrame->r(cond).jsValue().toBoolean(callFrame)) { vPC += target; CHECK_FOR_TIMEOUT(); NEXT_INSTRUCTION(); @@ -2719,7 +2709,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int cond = (++vPC)->u.operand; int target = (++vPC)->u.operand; - if (callFrame[cond].jsValue().toBoolean(callFrame)) { + if (callFrame->r(cond).jsValue().toBoolean(callFrame)) { vPC += target; NEXT_INSTRUCTION(); } @@ -2735,7 +2725,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int cond = (++vPC)->u.operand; int target = (++vPC)->u.operand; - if (!callFrame[cond].jsValue().toBoolean(callFrame)) { + if (!callFrame->r(cond).jsValue().toBoolean(callFrame)) { vPC += target; NEXT_INSTRUCTION(); } @@ -2751,7 +2741,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int src = (++vPC)->u.operand; int target = (++vPC)->u.operand; - JSValue srcValue = callFrame[src].jsValue(); + JSValue srcValue = callFrame->r(src).jsValue(); if (srcValue.isUndefinedOrNull() || (srcValue.isCell() && srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { vPC += target; @@ -2769,7 +2759,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int src = (++vPC)->u.operand; int target = (++vPC)->u.operand; - JSValue srcValue = callFrame[src].jsValue(); + JSValue srcValue = callFrame->r(src).jsValue(); if (!srcValue.isUndefinedOrNull() || (srcValue.isCell() && !srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { vPC += target; @@ -2788,7 +2778,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int src = (++vPC)->u.operand; JSValue ptr = JSValue((++vPC)->u.jsCell); int target = (++vPC)->u.operand; - JSValue srcValue = callFrame[src].jsValue(); + JSValue srcValue = callFrame->r(src).jsValue(); if (srcValue != ptr) { vPC += target; NEXT_INSTRUCTION(); @@ -2808,8 +2798,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi Additionally this loop instruction may terminate JS execution is the JS timeout is reached. */ - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); int target = (++vPC)->u.operand; bool result = jsLess(callFrame, src1, src2); @@ -2835,8 +2825,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi Additionally this loop instruction may terminate JS execution is the JS timeout is reached. */ - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); int target = (++vPC)->u.operand; bool result = jsLessEq(callFrame, src1, src2); @@ -2859,8 +2849,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi target from the current instruction, if and only if the result of the comparison is false. */ - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); int target = (++vPC)->u.operand; bool result = jsLess(callFrame, src1, src2); @@ -2882,8 +2872,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi and then jumps to offset target from the current instruction, if and only if theresult of the comparison is false. */ - JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); - JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); + JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); + JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); int target = (++vPC)->u.operand; bool result = jsLessEq(callFrame, src1, src2); @@ -2908,7 +2898,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int tableIndex = (++vPC)->u.operand; int defaultOffset = (++vPC)->u.operand; - JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue(); + JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue(); if (scrutinee.isInt32Fast()) vPC += callFrame->codeBlock()->immediateSwitchJumpTable(tableIndex).offsetForValue(scrutinee.getInt32Fast(), defaultOffset); else { @@ -2932,7 +2922,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int tableIndex = (++vPC)->u.operand; int defaultOffset = (++vPC)->u.operand; - JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue(); + JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue(); if (!scrutinee.isString()) vPC += defaultOffset; else { @@ -2955,7 +2945,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int tableIndex = (++vPC)->u.operand; int defaultOffset = (++vPC)->u.operand; - JSValue scrutinee = callFrame[(++vPC)->u.operand].jsValue(); + JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue(); if (!scrutinee.isString()) vPC += defaultOffset; else @@ -2973,7 +2963,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int dst = (++vPC)->u.operand; int func = (++vPC)->u.operand; - callFrame[dst] = callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain()); + callFrame->r(dst) = callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain()); ++vPC; NEXT_INSTRUCTION(); @@ -2989,7 +2979,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int dst = (++vPC)->u.operand; int func = (++vPC)->u.operand; - callFrame[dst] = callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain()); + callFrame->r(dst) = callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain()); ++vPC; NEXT_INSTRUCTION(); @@ -3011,7 +3001,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int argCount = vPC[3].u.operand; int registerOffset = vPC[4].u.operand; - JSValue funcVal = callFrame[func].jsValue(); + JSValue funcVal = callFrame->r(func).jsValue(); Register* newCallFrame = callFrame->registers() + registerOffset; Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount; @@ -3022,7 +3012,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi JSValue result = callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue); if (exceptionValue) goto vm_throw; - callFrame[dst] = result; + callFrame->r(dst) = result; vPC += 5; NEXT_INSTRUCTION(); @@ -3048,7 +3038,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int argCount = vPC[3].u.operand; int registerOffset = vPC[4].u.operand; - JSValue v = callFrame[func].jsValue(); + JSValue v = callFrame->r(func).jsValue(); CallData callData; CallType callType = v.getCallData(callData); @@ -3097,7 +3087,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi } CHECK_FOR_EXCEPTION(); - callFrame[dst] = JSValue(returnValue); + callFrame->r(dst) = JSValue(returnValue); vPC += 5; NEXT_INSTRUCTION(); @@ -3112,19 +3102,19 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int argCountDst = (++vPC)->u.operand; int argsOffset = (++vPC)->u.operand; - JSValue arguments = callFrame[argsOffset].jsValue(); - uint32_t argCount = 0; + JSValue arguments = callFrame->r(argsOffset).jsValue(); + int32_t argCount = 0; if (!arguments) { - argCount = (uint32_t)(callFrame[RegisterFile::ArgumentCount].u.i) - 1; + argCount = (uint32_t)(callFrame->argumentCount()) - 1; int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize; Register* newEnd = callFrame->registers() + sizeDelta; if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) { exceptionValue = createStackOverflowError(callFrame); goto vm_throw; } - uint32_t expectedParams = asFunction(callFrame[RegisterFile::Callee].jsValue())->body()->parameterCount(); - uint32_t inplaceArgs = min(argCount, expectedParams); - uint32_t i = 0; + int32_t expectedParams = callFrame->callee()->body()->parameterCount(); + int32_t inplaceArgs = min(argCount, expectedParams); + int32_t i = 0; Register* argStore = callFrame->registers() + argsOffset; // First step is to copy the "expected" parameters from their normal location relative to the callframe @@ -3168,7 +3158,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi goto vm_throw; } Register* argsBuffer = callFrame->registers() + argsOffset; - for (unsigned i = 0; i < argCount; ++i) { + for (int32_t i = 0; i < argCount; ++i) { argsBuffer[i] = asObject(arguments)->get(callFrame, i); CHECK_FOR_EXCEPTION(); } @@ -3180,7 +3170,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi } } CHECK_FOR_EXCEPTION(); - callFrame[argCountDst] = argCount + 1; + callFrame->r(argCountDst) = argCount + 1; ++vPC; NEXT_INSTRUCTION(); } @@ -3201,8 +3191,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int argCountReg = vPC[3].u.operand; int registerOffset = vPC[4].u.operand; - JSValue v = callFrame[func].jsValue(); - int argCount = callFrame[argCountReg].i(); + JSValue v = callFrame->r(func).jsValue(); + int argCount = callFrame->r(argCountReg).i(); registerOffset += argCount; CallData callData; CallType callType = v.getCallData(callData); @@ -3251,7 +3241,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi } CHECK_FOR_EXCEPTION(); - callFrame[dst] = JSValue(returnValue); + callFrame->r(dst) = JSValue(returnValue); vPC += 5; NEXT_INSTRUCTION(); @@ -3278,7 +3268,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int src = (++vPC)->u.operand; ASSERT(callFrame->codeBlock()->needsFullScopeChain()); - asActivation(callFrame[src].jsValue())->copyRegisters(callFrame->optionalCalleeArguments()); + asActivation(callFrame->r(src).jsValue())->copyRegisters(callFrame->optionalCalleeArguments()); ++vPC; NEXT_INSTRUCTION(); @@ -3318,7 +3308,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi if (callFrame->codeBlock()->needsFullScopeChain()) callFrame->scopeChain()->deref(); - JSValue returnValue = callFrame[result].jsValue(); + JSValue returnValue = callFrame->r(result).jsValue(); vPC = callFrame->returnPC(); int dst = callFrame->returnValueRegister(); @@ -3327,7 +3317,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi if (callFrame->hasHostCallFrameFlag()) return returnValue; - callFrame[dst] = JSValue(returnValue); + callFrame->r(dst) = JSValue(returnValue); NEXT_INSTRUCTION(); } @@ -3346,10 +3336,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi CodeBlock* codeBlock = callFrame->codeBlock(); for (size_t count = codeBlock->m_numVars; i < count; ++i) - callFrame[i] = jsUndefined(); - - for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j) - callFrame[i] = codeBlock->constantRegister(j); + callFrame->r(i) = jsUndefined(); ++vPC; NEXT_INSTRUCTION(); @@ -3371,14 +3358,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi CodeBlock* codeBlock = callFrame->codeBlock(); for (size_t count = codeBlock->m_numVars; i < count; ++i) - callFrame[i] = jsUndefined(); - - for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j) - callFrame[i] = codeBlock->constantRegister(j); + callFrame->r(i) = jsUndefined(); int dst = (++vPC)->u.operand; JSActivation* activation = new (globalData) JSActivation(callFrame, static_cast<FunctionBodyNode*>(codeBlock->ownerNode())); - callFrame[dst] = activation; + callFrame->r(dst) = activation; callFrame->setScopeChain(callFrame->scopeChain()->copy()->push(activation)); ++vPC; @@ -3397,9 +3381,9 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int thisRegister = (++vPC)->u.operand; - JSValue thisVal = callFrame[thisRegister].jsValue(); + JSValue thisVal = callFrame->r(thisRegister).jsValue(); if (thisVal.needsThisConversion()) - callFrame[thisRegister] = JSValue(thisVal.toThisObject(callFrame)); + callFrame->r(thisRegister) = JSValue(thisVal.toThisObject(callFrame)); ++vPC; NEXT_INSTRUCTION(); @@ -3414,7 +3398,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi This opcode should only be used at the beginning of a code block. */ - callFrame[RegisterFile::ArgumentsRegister] = JSValue(); + callFrame->r(RegisterFile::ArgumentsRegister) = JSValue(); ++vPC; NEXT_INSTRUCTION(); } @@ -3429,7 +3413,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi if (!callFrame->optionalCalleeArguments()) { Arguments* arguments = new (globalData) Arguments(callFrame); callFrame->setCalleeArguments(arguments); - callFrame[RegisterFile::ArgumentsRegister] = arguments; + callFrame->r(RegisterFile::ArgumentsRegister) = arguments; } ++vPC; NEXT_INSTRUCTION(); @@ -3456,7 +3440,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int proto = vPC[5].u.operand; int thisRegister = vPC[6].u.operand; - JSValue v = callFrame[func].jsValue(); + JSValue v = callFrame->r(func).jsValue(); ConstructData constructData; ConstructType constructType = v.getConstructData(constructData); @@ -3467,7 +3451,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi CodeBlock* newCodeBlock = &functionBodyNode->bytecode(callDataScopeChain); Structure* structure; - JSValue prototype = callFrame[proto].jsValue(); + JSValue prototype = callFrame->r(proto).jsValue(); if (prototype.isObject()) structure = asObject(prototype)->inheritorID(); else @@ -3478,7 +3462,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi #else JSObject* newObject = new (globalData) JSObject(structure); #endif - callFrame[thisRegister] = JSValue(newObject); // "this" value + callFrame->r(thisRegister) = JSValue(newObject); // "this" value CallFrame* previousCallFrame = callFrame; @@ -3527,7 +3511,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi returnValue = constructData.native.function(newCallFrame, asObject(v), args); } CHECK_FOR_EXCEPTION(); - callFrame[dst] = JSValue(returnValue); + callFrame->r(dst) = JSValue(returnValue); vPC += 7; NEXT_INSTRUCTION(); @@ -3546,13 +3530,13 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int dst = vPC[1].u.operand; - if (LIKELY(callFrame[dst].jsValue().isObject())) { + if (LIKELY(callFrame->r(dst).jsValue().isObject())) { vPC += 3; NEXT_INSTRUCTION(); } int override = vPC[2].u.operand; - callFrame[dst] = callFrame[override]; + callFrame->r(dst) = callFrame->r(override); vPC += 3; NEXT_INSTRUCTION(); @@ -3562,7 +3546,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int src = (++vPC)->u.operand; int count = (++vPC)->u.operand; - callFrame[dst] = concatenateStrings(callFrame, &callFrame->registers()[src], count); + callFrame->r(dst) = concatenateStrings(callFrame, &callFrame->registers()[src], count); ++vPC; NEXT_INSTRUCTION(); @@ -3571,7 +3555,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int dst = (++vPC)->u.operand; int src = (++vPC)->u.operand; - callFrame[dst] = callFrame[src].jsValue().toPrimitive(callFrame); + callFrame->r(dst) = callFrame->r(src).jsValue().toPrimitive(callFrame); ++vPC; NEXT_INSTRUCTION(); @@ -3584,11 +3568,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi are replaced by the result of toObject conversion of the scope. */ int scope = (++vPC)->u.operand; - JSValue v = callFrame[scope].jsValue(); + JSValue v = callFrame->r(scope).jsValue(); JSObject* o = v.toObject(callFrame); CHECK_FOR_EXCEPTION(); - callFrame[scope] = JSValue(o); + callFrame->r(scope) = JSValue(o); callFrame->setScopeChain(callFrame->scopeChain()->push(o)); ++vPC; @@ -3615,7 +3599,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int dst = (++vPC)->u.operand; int base = (++vPC)->u.operand; - callFrame[dst] = JSPropertyNameIterator::create(callFrame, callFrame[base].jsValue()); + callFrame->r(dst) = JSPropertyNameIterator::create(callFrame, callFrame->r(base).jsValue()); ++vPC; NEXT_INSTRUCTION(); } @@ -3632,10 +3616,10 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int iter = (++vPC)->u.operand; int target = (++vPC)->u.operand; - JSPropertyNameIterator* it = callFrame[iter].propertyNameIterator(); + JSPropertyNameIterator* it = callFrame->r(iter).propertyNameIterator(); if (JSValue temp = it->next(callFrame)) { CHECK_FOR_TIMEOUT(); - callFrame[dst] = JSValue(temp); + callFrame->r(dst) = JSValue(temp); vPC += target; NEXT_INSTRUCTION(); } @@ -3691,7 +3675,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ASSERT(exceptionValue); ASSERT(!globalData->exception); int ex = (++vPC)->u.operand; - callFrame[ex] = exceptionValue; + callFrame->r(ex) = exceptionValue; exceptionValue = JSValue(); ++vPC; @@ -3709,7 +3693,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int ex = (++vPC)->u.operand; - exceptionValue = callFrame[ex].jsValue(); + exceptionValue = callFrame->r(ex).jsValue(); handler = throwException(callFrame, exceptionValue, vPC - callFrame->codeBlock()->instructions().begin(), true); if (!handler) { @@ -3720,18 +3704,6 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi vPC = callFrame->codeBlock()->instructions().begin() + handler->target; NEXT_INSTRUCTION(); } - DEFINE_OPCODE(op_unexpected_load) { - /* unexpected_load load dst(r) src(k) - - Copies constant src to register dst. - */ - int dst = (++vPC)->u.operand; - int src = (++vPC)->u.operand; - callFrame[dst] = JSValue(callFrame->codeBlock()->unexpectedConstant(src)); - - ++vPC; - NEXT_INSTRUCTION(); - } DEFINE_OPCODE(op_new_error) { /* new_error dst(r) type(n) message(k) @@ -3745,7 +3717,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int message = (++vPC)->u.operand; CodeBlock* codeBlock = callFrame->codeBlock(); - callFrame[dst] = JSValue(Error::create(callFrame, (ErrorType)type, codeBlock->unexpectedConstant(message).toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL())); + callFrame->r(dst) = JSValue(Error::create(callFrame, (ErrorType)type, callFrame->r(message).jsValue().toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL())); ++vPC; NEXT_INSTRUCTION(); @@ -3763,7 +3735,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi scopeChain->deref(); } int result = (++vPC)->u.operand; - return callFrame[result].jsValue(); + return callFrame->r(result).jsValue(); } DEFINE_OPCODE(op_put_getter) { /* put_getter base(r) property(id) function(r) @@ -3780,11 +3752,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int property = (++vPC)->u.operand; int function = (++vPC)->u.operand; - ASSERT(callFrame[base].jsValue().isObject()); - JSObject* baseObj = asObject(callFrame[base].jsValue()); + ASSERT(callFrame->r(base).jsValue().isObject()); + JSObject* baseObj = asObject(callFrame->r(base).jsValue()); Identifier& ident = callFrame->codeBlock()->identifier(property); - ASSERT(callFrame[function].jsValue().isObject()); - baseObj->defineGetter(callFrame, ident, asObject(callFrame[function].jsValue())); + ASSERT(callFrame->r(function).jsValue().isObject()); + baseObj->defineGetter(callFrame, ident, asObject(callFrame->r(function).jsValue())); ++vPC; NEXT_INSTRUCTION(); @@ -3804,11 +3776,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int property = (++vPC)->u.operand; int function = (++vPC)->u.operand; - ASSERT(callFrame[base].jsValue().isObject()); - JSObject* baseObj = asObject(callFrame[base].jsValue()); + ASSERT(callFrame->r(base).jsValue().isObject()); + JSObject* baseObj = asObject(callFrame->r(base).jsValue()); Identifier& ident = callFrame->codeBlock()->identifier(property); - ASSERT(callFrame[function].jsValue().isObject()); - baseObj->defineSetter(callFrame, ident, asObject(callFrame[function].jsValue())); + ASSERT(callFrame->r(function).jsValue().isObject()); + baseObj->defineSetter(callFrame, ident, asObject(callFrame->r(function).jsValue())); ++vPC; NEXT_INSTRUCTION(); @@ -3825,7 +3797,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi */ int retAddrDst = (++vPC)->u.operand; int target = (++vPC)->u.operand; - callFrame[retAddrDst] = vPC + 1; + callFrame->r(retAddrDst) = vPC + 1; vPC += target; NEXT_INSTRUCTION(); @@ -3838,7 +3810,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi register, not as an immediate. */ int retAddrSrc = (++vPC)->u.operand; - vPC = callFrame[retAddrSrc].vPC(); + vPC = callFrame->r(retAddrSrc).vPC(); NEXT_INSTRUCTION(); } DEFINE_OPCODE(op_debug) { @@ -3865,7 +3837,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int function = vPC[1].u.operand; if (*enabledProfilerReference) - (*enabledProfilerReference)->willExecute(callFrame, callFrame[function].jsValue()); + (*enabledProfilerReference)->willExecute(callFrame, callFrame->r(function).jsValue()); vPC += 2; NEXT_INSTRUCTION(); @@ -3879,7 +3851,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int function = vPC[1].u.operand; if (*enabledProfilerReference) - (*enabledProfilerReference)->didExecute(callFrame, callFrame[function].jsValue()); + (*enabledProfilerReference)->didExecute(callFrame, callFrame->r(function).jsValue()); vPC += 2; NEXT_INSTRUCTION(); @@ -3922,12 +3894,12 @@ JSValue Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* functio ASSERT(codeBlock->codeType() == FunctionCode); SymbolTable& symbolTable = codeBlock->symbolTable(); int argumentsIndex = symbolTable.get(functionCallFrame->propertyNames().arguments.ustring().rep()).getIndex(); - if (!functionCallFrame[argumentsIndex].arguments()) { + if (!functionCallFrame->r(argumentsIndex).arguments()) { Arguments* arguments = new (callFrame) Arguments(functionCallFrame); functionCallFrame->setCalleeArguments(arguments); - functionCallFrame[RegisterFile::ArgumentsRegister] = arguments; + functionCallFrame->r(RegisterFile::ArgumentsRegister) = arguments; } - return functionCallFrame[argumentsIndex].jsValue(); + return functionCallFrame->r(argumentsIndex).jsValue(); } Arguments* arguments = functionCallFrame->optionalCalleeArguments(); diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h index 702c89c..fa6f7db 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h @@ -45,7 +45,6 @@ namespace JSC { class FunctionBodyNode; class Instruction; class InternalFunction; - class AssemblerBuffer; class JSFunction; class JSGlobalObject; class ProgramNode; diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp index 02cb09b..f1b22c0 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp @@ -275,7 +275,6 @@ void JIT::privateCompileMainPass() DEFINE_OP(op_throw) DEFINE_OP(op_to_jsnumber) DEFINE_OP(op_to_primitive) - DEFINE_OP(op_unexpected_load) case op_get_array_length: case op_get_by_id_chain: diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp index dbcb34d..b669dfa 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp @@ -505,13 +505,6 @@ void JIT::emit_op_jneq_ptr(Instruction* currentInstruction) RECORD_JUMP_TARGET(target + 3); } -void JIT::emit_op_unexpected_load(Instruction* currentInstruction) -{ - JSValue v = m_codeBlock->unexpectedConstant(currentInstruction[2].u.operand); - move(ImmPtr(JSValue::encode(v)), regT0); - emitPutVirtualRegister(currentInstruction[1].u.operand); -} - void JIT::emit_op_jsr(Instruction* currentInstruction) { int retAddrDst = currentInstruction[1].u.operand; @@ -759,7 +752,7 @@ void JIT::emit_op_new_error(Instruction* currentInstruction) { JITStubCall stubCall(this, JITStubs::cti_op_new_error); stubCall.addArgument(Imm32(currentInstruction[2].u.operand)); - stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock->unexpectedConstant(currentInstruction[3].u.operand)))); + stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock->getConstant(currentInstruction[3].u.operand)))); stubCall.addArgument(Imm32(m_bytecodeIndex)); stubCall.call(currentInstruction[1].u.operand); } @@ -828,7 +821,7 @@ void JIT::emit_op_enter(Instruction*) // Even though CTI doesn't use them, we initialize our constant // registers to zap stale pointers, to avoid unnecessarily prolonging // object lifetime and increasing GC pressure. - size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters(); + size_t count = m_codeBlock->m_numVars; for (size_t j = 0; j < count; ++j) emitInitRegister(j); @@ -839,7 +832,7 @@ void JIT::emit_op_enter_with_activation(Instruction* currentInstruction) // Even though CTI doesn't use them, we initialize our constant // registers to zap stale pointers, to avoid unnecessarily prolonging // object lifetime and increasing GC pressure. - size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters(); + size_t count = m_codeBlock->m_numVars; for (size_t j = 0; j < count; ++j) emitInitRegister(j); diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp index 20d6694..769169b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp @@ -48,7 +48,7 @@ #include <sys/time.h> #endif -#if PLATFORM(UNIX) +#if HAVE(SIGNAL_H) #include <signal.h> #endif @@ -489,7 +489,9 @@ static NO_RETURN void printUsageStatement(JSGlobalData* globalData, bool help = fprintf(stderr, " -f Specifies a source file (deprecated)\n"); fprintf(stderr, " -h|--help Prints this help message\n"); fprintf(stderr, " -i Enables interactive mode (default if no files are specified)\n"); +#if HAVE(SIGNAL_H) fprintf(stderr, " -s Installs signal handlers that exit on a crash (Unix platforms only)\n"); +#endif cleanupGlobalData(globalData); exit(help ? EXIT_SUCCESS : EXIT_FAILURE); @@ -524,7 +526,7 @@ static void parseArguments(int argc, char** argv, Options& options, JSGlobalData continue; } if (strcmp(arg, "-s") == 0) { -#if PLATFORM(UNIX) +#if HAVE(SIGNAL_H) signal(SIGILL, _exit); signal(SIGFPE, _exit); signal(SIGBUS, _exit); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h index d17da69..780a624 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h @@ -39,6 +39,11 @@ namespace JSC { return fastMalloc(size); } + inline void ParserArenaDeletable::operator delete(void* p) + { + fastFree(p); + } + inline ParserArenaRefCounted::ParserArenaRefCounted(JSGlobalData* globalData) { globalData->parser->arena().derefWithArena(adoptRef(this)); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp index ba6e1e0..105ceaf 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp @@ -601,7 +601,7 @@ RegisterID* PostfixErrorNode::emitBytecode(BytecodeGenerator& generator, Registe RegisterID* DeleteResolveNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst) { if (generator.registerFor(m_ident)) - return generator.emitUnexpectedLoad(generator.finalDestination(dst), false); + return generator.emitLoad(generator.finalDestination(dst), false); generator.emitExpressionInfo(divot(), startOffset(), endOffset()); RegisterID* base = generator.emitResolveBase(generator.tempDestination(dst), m_ident); @@ -636,7 +636,7 @@ RegisterID* DeleteValueNode::emitBytecode(BytecodeGenerator& generator, Register generator.emitNode(generator.ignoredResult(), m_expr); // delete on a non-location expression ignores the value and returns true - return generator.emitUnexpectedLoad(generator.finalDestination(dst), true); + return generator.emitLoad(generator.finalDestination(dst), true); } // ------------------------------ VoidNode ------------------------------------- @@ -688,7 +688,7 @@ RegisterID* PrefixResolveNode::emitBytecode(BytecodeGenerator& generator, Regist if (generator.isLocalConstant(m_ident)) { if (dst == generator.ignoredResult()) return 0; - RefPtr<RegisterID> r0 = generator.emitUnexpectedLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0); + RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0); return generator.emitBinaryOp(op_add, r0.get(), local, r0.get(), OperandTypes()); } diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h index a9f88b7..34b4497 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h @@ -109,6 +109,8 @@ namespace JSC { // Objects created with this version of new are not deleted when the arena is deleted. // Other arrangements must be made. void* operator new(size_t); + + void operator delete(void*); }; class ParserArenaRefCounted : public RefCounted<ParserArenaRefCounted> { diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp index 8996629..3bef263 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSActivation.cpp @@ -40,7 +40,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSActivation); const ClassInfo JSActivation::info = { "JSActivation", 0, 0, 0 }; JSActivation::JSActivation(CallFrame* callFrame, PassRefPtr<FunctionBodyNode> functionBody) - : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame)) + : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame->registers())) { } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp index d5c4ee4..ff728e8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.cpp @@ -59,14 +59,14 @@ using namespace WTF; namespace JSC { -extern const HashTable arrayTable; -extern const HashTable jsonTable; -extern const HashTable dateTable; -extern const HashTable mathTable; -extern const HashTable numberTable; -extern const HashTable regExpTable; -extern const HashTable regExpConstructorTable; -extern const HashTable stringTable; +extern JSC_CONST_HASHTABLE HashTable arrayTable; +extern JSC_CONST_HASHTABLE HashTable jsonTable; +extern JSC_CONST_HASHTABLE HashTable dateTable; +extern JSC_CONST_HASHTABLE HashTable mathTable; +extern JSC_CONST_HASHTABLE HashTable numberTable; +extern JSC_CONST_HASHTABLE HashTable regExpTable; +extern JSC_CONST_HASHTABLE HashTable regExpConstructorTable; +extern JSC_CONST_HASHTABLE HashTable stringTable; struct VPtrSet { VPtrSet(); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp index 3f3fab9..798013a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/LiteralParser.cpp @@ -124,9 +124,9 @@ LiteralParser::TokenType LiteralParser::Lexer::lex(LiteralParserToken& token) return TokError; } -static inline bool isSafeStringCharacter(UChar c) +template <LiteralParser::ParserMode mode> static inline bool isSafeStringCharacter(UChar c) { - return (c >= ' ' && c <= 0xff && c != '\\' && c != '"') || c == '\t'; + return (c >= ' ' && (mode == LiteralParser::StrictJSON || c <= 0xff) && c != '\\' && c != '"') || c == '\t'; } template <LiteralParser::ParserMode mode> LiteralParser::TokenType LiteralParser::Lexer::lexString(LiteralParserToken& token) @@ -136,7 +136,7 @@ template <LiteralParser::ParserMode mode> LiteralParser::TokenType LiteralParser token.stringToken = UString(); do { runStart = m_ptr; - while (m_ptr < m_end && isSafeStringCharacter(*m_ptr)) + while (m_ptr < m_end && isSafeStringCharacter<mode>(*m_ptr)) ++m_ptr; if (runStart < m_ptr) token.stringToken.append(runStart, m_ptr - runStart); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h index 3b7353d..167f2bc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Lookup.h @@ -29,6 +29,13 @@ #include <stdio.h> #include <wtf/Assertions.h> +// Bug #26843: Work around Metrowerks compiler bug +#if COMPILER(WINSCW) +#define JSC_CONST_HASHTABLE +#else +#define JSC_CONST_HASHTABLE const +#endif + namespace JSC { // Hash table generated by the create_hash_table script. diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp index 857a316..7dd4a8f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 1999-2001, 2004 Harri Porten (porten@kde.org) * Copyright (c) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2009 Torch Mobile, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -110,7 +111,7 @@ void RegExp::compile(JSGlobalData* globalData) #endif } -int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector) +int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector) { if (startOffset < 0) startOffset = 0; @@ -126,16 +127,20 @@ int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector) if (m_regExpBytecode) { #endif int offsetVectorSize = (m_numSubpatterns + 1) * 3; // FIXME: should be 2 - but adding temporary fallback to pcre. - int* offsetVector = new int [offsetVectorSize]; + int* offsetVector; + Vector<int, 32> nonReturnedOvector; + if (ovector) { + ovector->resize(offsetVectorSize); + offsetVector = ovector->data(); + } else { + nonReturnedOvector.resize(offsetVectorSize); + offsetVector = nonReturnedOvector.data(); + } + ASSERT(offsetVector); for (int j = 0; j < offsetVectorSize; ++j) offsetVector[j] = -1; - OwnArrayPtr<int> nonReturnedOvector; - if (!ovector) - nonReturnedOvector.set(offsetVector); - else - ovector->set(offsetVector); #if ENABLE(YARR_JIT) int result = Yarr::executeRegex(m_regExpJITCode, s.data(), startOffset, s.size(), offsetVector, offsetVectorSize); @@ -177,7 +182,7 @@ void RegExp::compile(JSGlobalData* globalData) m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(m_pattern.data()), m_pattern.size(), ignoreCaseOption, multilineOption, &m_numSubpatterns, &m_constructionError); } -int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector) +int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector) { if (startOffset < 0) startOffset = 0; @@ -190,17 +195,19 @@ int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector) #if ENABLE(WREC) if (m_wrecFunction) { int offsetVectorSize = (m_numSubpatterns + 1) * 2; - int* offsetVector = new int [offsetVectorSize]; + int* offsetVector; + Vector<int, 32> nonReturnedOvector; + if (ovector) { + ovector->resize(offsetVectorSize); + offsetVector = ovector->data(); + } else { + nonReturnedOvector.resize(offsetVectorSize); + offsetVector = nonReturnedOvector.data(); + } ASSERT(offsetVector); for (int j = 0; j < offsetVectorSize; ++j) offsetVector[j] = -1; - OwnArrayPtr<int> nonReturnedOvector; - if (!ovector) - nonReturnedOvector.set(offsetVector); - else - ovector->set(offsetVector); - int result = m_wrecFunction(s.data(), startOffset, s.size(), offsetVector); if (result < 0) { @@ -226,8 +233,8 @@ int RegExp::match(const UString& s, int startOffset, OwnArrayPtr<int>* ovector) offsetVector = fixedSizeOffsetVector; } else { offsetVectorSize = (m_numSubpatterns + 1) * 3; - offsetVector = new int [offsetVectorSize]; - ovector->set(offsetVector); + ovector->resize(offsetVectorSize); + offsetVector = ovector->data(); } int numMatches = jsRegExpExecute(m_regExp, reinterpret_cast<const UChar*>(s.data()), s.size(), startOffset, offsetVector, offsetVectorSize); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h index f3be656..24d4199 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExp.h @@ -1,6 +1,7 @@ /* * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2009 Torch Mobile, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -53,7 +54,7 @@ namespace JSC { bool isValid() const { return !m_constructionError; } const char* errorMessage() const { return m_constructionError; } - int match(const UString&, int startOffset, OwnArrayPtr<int>* ovector = 0); + int match(const UString&, int startOffset, Vector<int, 32>* ovector = 0); unsigned numSubpatterns() const { return m_numSubpatterns; } private: diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp index bcd0d07..e468521 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/RegExpConstructor.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) * Copyright (C) 2003, 2007, 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2009 Torch Mobile, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -93,14 +94,21 @@ struct RegExpConstructorPrivate { RegExpConstructorPrivate() : lastNumSubPatterns(0) , multiline(false) + , lastOvectorIndex(0) { } + const Vector<int, 32>& lastOvector() const { return ovector[lastOvectorIndex]; } + Vector<int, 32>& lastOvector() { return ovector[lastOvectorIndex]; } + Vector<int, 32>& tempOvector() { return ovector[lastOvectorIndex ? 0 : 1]; } + void changeLastOvector() { lastOvectorIndex = lastOvectorIndex ? 0 : 1; } + UString input; UString lastInput; - OwnArrayPtr<int> lastOvector; - unsigned lastNumSubPatterns : 31; + Vector<int, 32> ovector[2]; + unsigned lastNumSubPatterns : 30; bool multiline : 1; + unsigned lastOvectorIndex : 1; }; RegExpConstructor::RegExpConstructor(ExecState* exec, PassRefPtr<Structure> structure, RegExpPrototype* regExpPrototype) @@ -121,20 +129,19 @@ RegExpConstructor::RegExpConstructor(ExecState* exec, PassRefPtr<Structure> stru */ void RegExpConstructor::performMatch(RegExp* r, const UString& s, int startOffset, int& position, int& length, int** ovector) { - OwnArrayPtr<int> tmpOvector; - position = r->match(s, startOffset, &tmpOvector); + position = r->match(s, startOffset, &d->tempOvector()); if (ovector) - *ovector = tmpOvector.get(); + *ovector = d->tempOvector().data(); if (position != -1) { - ASSERT(tmpOvector); + ASSERT(!d->tempOvector().isEmpty()); - length = tmpOvector[1] - tmpOvector[0]; + length = d->tempOvector()[1] - d->tempOvector()[0]; d->input = s; d->lastInput = s; - d->lastOvector.set(tmpOvector.release()); + d->changeLastOvector(); d->lastNumSubPatterns = r->numSubpatterns(); } } @@ -147,8 +154,8 @@ RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpConstructorPrivate d->lastInput = data->lastInput; d->lastNumSubPatterns = data->lastNumSubPatterns; unsigned offsetVectorSize = (data->lastNumSubPatterns + 1) * 2; // only copying the result part of the vector - d->lastOvector.set(new int[offsetVectorSize]); - memcpy(d->lastOvector.get(), data->lastOvector.get(), offsetVectorSize * sizeof(int)); + d->lastOvector().resize(offsetVectorSize); + memcpy(d->lastOvector().data(), data->lastOvector().data(), offsetVectorSize * sizeof(int)); // d->multiline is not needed, and remains uninitialized setLazyCreationData(d); @@ -167,13 +174,13 @@ void RegExpMatchesArray::fillArrayInstance(ExecState* exec) unsigned lastNumSubpatterns = d->lastNumSubPatterns; for (unsigned i = 0; i <= lastNumSubpatterns; ++i) { - int start = d->lastOvector[2 * i]; + int start = d->lastOvector()[2 * i]; if (start >= 0) - JSArray::put(exec, i, jsSubstring(exec, d->lastInput, start, d->lastOvector[2 * i + 1] - start)); + JSArray::put(exec, i, jsSubstring(exec, d->lastInput, start, d->lastOvector()[2 * i + 1] - start)); } PutPropertySlot slot; - JSArray::put(exec, exec->propertyNames().index, jsNumber(exec, d->lastOvector[0]), slot); + JSArray::put(exec, exec->propertyNames().index, jsNumber(exec, d->lastOvector()[0]), slot); JSArray::put(exec, exec->propertyNames().input, jsString(exec, d->input), slot); delete d; @@ -187,10 +194,10 @@ JSObject* RegExpConstructor::arrayOfMatches(ExecState* exec) const JSValue RegExpConstructor::getBackref(ExecState* exec, unsigned i) const { - if (d->lastOvector && i <= d->lastNumSubPatterns) { - int start = d->lastOvector[2 * i]; + if (!d->lastOvector().isEmpty() && i <= d->lastNumSubPatterns) { + int start = d->lastOvector()[2 * i]; if (start >= 0) - return jsSubstring(exec, d->lastInput, start, d->lastOvector[2 * i + 1] - start); + return jsSubstring(exec, d->lastInput, start, d->lastOvector()[2 * i + 1] - start); } return jsEmptyString(exec); } @@ -199,25 +206,25 @@ JSValue RegExpConstructor::getLastParen(ExecState* exec) const { unsigned i = d->lastNumSubPatterns; if (i > 0) { - ASSERT(d->lastOvector); - int start = d->lastOvector[2 * i]; + ASSERT(!d->lastOvector().isEmpty()); + int start = d->lastOvector()[2 * i]; if (start >= 0) - return jsSubstring(exec, d->lastInput, start, d->lastOvector[2 * i + 1] - start); + return jsSubstring(exec, d->lastInput, start, d->lastOvector()[2 * i + 1] - start); } return jsEmptyString(exec); } JSValue RegExpConstructor::getLeftContext(ExecState* exec) const { - if (d->lastOvector) - return jsSubstring(exec, d->lastInput, 0, d->lastOvector[0]); + if (!d->lastOvector().isEmpty()) + return jsSubstring(exec, d->lastInput, 0, d->lastOvector()[0]); return jsEmptyString(exec); } JSValue RegExpConstructor::getRightContext(ExecState* exec) const { - if (d->lastOvector) - return jsSubstring(exec, d->lastInput, d->lastOvector[1], d->lastInput.size() - d->lastOvector[1]); + if (!d->lastOvector().isEmpty()) + return jsSubstring(exec, d->lastInput, d->lastOvector()[1], d->lastInput.size() - d->lastOvector()[1]); return jsEmptyString(exec); } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp index d6939cb..ceb6b1e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2009 Torch Mobile, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -575,7 +576,7 @@ JSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec, JSObject*, JSValue t } int pos = 0; while (i != limit && pos < s.size()) { - OwnArrayPtr<int> ovector; + Vector<int, 32> ovector; int mpos = reg->match(s, pos, &ovector); if (mpos < 0) break; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp index c65ba85..d6850e6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp @@ -1526,10 +1526,6 @@ inline void TCMalloc_PageHeap::Delete(Span* span) { // necessary. We do not bother resetting the stale pagemap // entries for the pieces we are merging together because we only // care about the pagemap entries for the boundaries. - // - // Note that the spans we merge into "span" may come out of - // a "returned" list. For simplicity, we move these into the - // "normal" list of the appropriate size class. const PageID p = span->start; const Length n = span->length; Span* prev = GetDescriptor(p-1); @@ -1560,10 +1556,19 @@ inline void TCMalloc_PageHeap::Delete(Span* span) { Event(span, 'D', span->length); span->free = 1; - if (span->length < kMaxPages) { - DLL_Prepend(&free_[span->length].normal, span); - } else { - DLL_Prepend(&large_.normal, span); +#if TCMALLOC_TRACK_DECOMMITED_SPANS + if (span->decommitted) { + if (span->length < kMaxPages) + DLL_Prepend(&free_[span->length].returned, span); + else + DLL_Prepend(&large_.returned, span); + } else +#endif + { + if (span->length < kMaxPages) + DLL_Prepend(&free_[span->length].normal, span); + else + DLL_Prepend(&large_.normal, span); } free_pages_ += n; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h index 9e13cf9..61ebe32 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.h @@ -179,6 +179,13 @@ WTF_PRIVATE_INLINE void* operator new(size_t s) { return fastMalloc(s); } WTF_PRIVATE_INLINE void operator delete(void* p) { fastFree(p); } WTF_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); } WTF_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); } + +#if PLATFORM(WINCE) +WTF_PRIVATE_INLINE void* operator new(size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); } +WTF_PRIVATE_INLINE void operator delete(void* p, const std::nothrow_t&) throw() { fastFree(p); } +WTF_PRIVATE_INLINE void* operator new[](size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); } +WTF_PRIVATE_INLINE void operator delete[](void* p, const std::nothrow_t&) throw() { fastFree(p); } +#endif #endif #endif // _CRTDBG_MAP_ALLOC diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h index d664c67..990670d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h @@ -176,28 +176,28 @@ namespace WTF { } template<typename Value, typename HashFunctions, typename Traits> - template<typename T, typename Translator> + template<typename T, typename HashTranslator> typename HashSet<Value, HashFunctions, Traits>::iterator inline HashSet<Value, HashFunctions, Traits>::find(const T& value) { - typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter; + typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; return m_impl.template find<T, Adapter>(value); } template<typename Value, typename HashFunctions, typename Traits> - template<typename T, typename Translator> + template<typename T, typename HashTranslator> typename HashSet<Value, HashFunctions, Traits>::const_iterator inline HashSet<Value, HashFunctions, Traits>::find(const T& value) const { - typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter; + typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; return m_impl.template find<T, Adapter>(value); } template<typename Value, typename HashFunctions, typename Traits> - template<typename T, typename Translator> + template<typename T, typename HashTranslator> inline bool HashSet<Value, HashFunctions, Traits>::contains(const T& value) const { - typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter; + typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; return m_impl.template contains<T, Adapter>(value); } @@ -208,11 +208,11 @@ namespace WTF { } template<typename Value, typename HashFunctions, typename Traits> - template<typename T, typename Translator> + template<typename T, typename HashTranslator> pair<typename HashSet<Value, HashFunctions, Traits>::iterator, bool> HashSet<Value, HashFunctions, Traits>::add(const T& value) { - typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, Translator> Adapter; + typedef HashSetTranslatorAdapter<ValueType, ValueTraits, T, HashTranslator> Adapter; return m_impl.template addPassingHashCode<T, T, Adapter>(value, value); } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h index 6cd8bdd..6d91a54 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrCommon.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 Apple Inc. All rights reserved. + * Copyright (C) 2009 Torch Mobile, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,6 +30,7 @@ #if PLATFORM(WIN) typedef struct HBITMAP__* HBITMAP; typedef struct HBRUSH__* HBRUSH; +typedef struct HDC__* HDC; typedef struct HFONT__* HFONT; typedef struct HPALETTE__* HPALETTE; typedef struct HPEN__* HPEN; @@ -47,6 +49,7 @@ namespace WTF { #if PLATFORM(WIN) void deleteOwnedPtr(HBITMAP); void deleteOwnedPtr(HBRUSH); + void deleteOwnedPtr(HDC); void deleteOwnedPtr(HFONT); void deleteOwnedPtr(HPALETTE); void deleteOwnedPtr(HPEN); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp index b08d7dc..67a32ff 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtrWin.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2007 Apple Inc. All rights reserved. + * Copyright (C) 2008, 2009 Torch Mobile, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -42,6 +43,12 @@ void deleteOwnedPtr(HBRUSH ptr) DeleteObject(ptr); } +void deleteOwnedPtr(HDC ptr) +{ + if (ptr) + DeleteDC(ptr); +} + void deleteOwnedPtr(HFONT ptr) { if (ptr) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index c82d1f7..5e37e09 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -27,11 +27,11 @@ #define WTF_Platform_h /* PLATFORM handles OS, operating environment, graphics API, and CPU */ -#define PLATFORM(WTF_FEATURE) (defined( WTF_PLATFORM_##WTF_FEATURE ) && WTF_PLATFORM_##WTF_FEATURE) -#define COMPILER(WTF_FEATURE) (defined( WTF_COMPILER_##WTF_FEATURE ) && WTF_COMPILER_##WTF_FEATURE) -#define HAVE(WTF_FEATURE) (defined( HAVE_##WTF_FEATURE ) && HAVE_##WTF_FEATURE) -#define USE(WTF_FEATURE) (defined( WTF_USE_##WTF_FEATURE ) && WTF_USE_##WTF_FEATURE) -#define ENABLE(WTF_FEATURE) (defined( ENABLE_##WTF_FEATURE ) && ENABLE_##WTF_FEATURE) +#define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE) +#define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE) +#define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE) +#define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE) +#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE) /* Operating systems - low-level dependencies */ @@ -402,6 +402,10 @@ #endif #endif /* !defined(HAVE_ACCESSIBILITY) */ +#if PLATFORM(UNIX) && !PLATFORM(SYMBIAN) +#define HAVE_SIGNAL_H 1 +#endif + #if PLATFORM(DARWIN) #define HAVE_ERRNO_H 1 @@ -549,6 +553,7 @@ #endif #endif +#if ENABLE(JIT) #ifndef ENABLE_JIT_OPTIMIZE_CALL #define ENABLE_JIT_OPTIMIZE_CALL 1 #endif @@ -564,6 +569,7 @@ #ifndef ENABLE_JIT_OPTIMIZE_METHOD_CALLS #define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1 #endif +#endif #if PLATFORM(X86) && COMPILER(MSVC) #define JSC_HOST_CALL __fastcall @@ -630,7 +636,7 @@ /* Accelerated compositing */ #if PLATFORM(MAC) -#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) +#if !defined(BUILDING_ON_TIGER) #define WTF_USE_ACCELERATED_COMPOSITING 1 #endif #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h b/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h index 477e893..f4527df 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Google Inc. All rights reserved. + * Copyright (C) 2009 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -42,9 +42,20 @@ namespace WTF { void setFlag(FlagEnum flagNumber) { ASSERT(flagNumber < 2); m_ptrAndFlags |= (1 << flagNumber);} void clearFlag(FlagEnum flagNumber) { ASSERT(flagNumber < 2); m_ptrAndFlags &= ~(1 << flagNumber);} T* get() const { return reinterpret_cast<T*>(m_ptrAndFlags & ~3); } - void set(T* ptr) { ASSERT(!(reinterpret_cast<intptr_t>(ptr) & 3)); m_ptrAndFlags = reinterpret_cast<intptr_t>(ptr) | (m_ptrAndFlags & 3);} + void set(T* ptr) + { + ASSERT(!(reinterpret_cast<intptr_t>(ptr) & 3)); + m_ptrAndFlags = reinterpret_cast<intptr_t>(ptr) | (m_ptrAndFlags & 3); +#ifndef NDEBUG + m_leaksPtr = ptr; +#endif + } + private: intptr_t m_ptrAndFlags; +#ifndef NDEBUG + void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced. +#endif }; } // namespace WTF diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp index 9509388..d75c17a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp @@ -148,6 +148,7 @@ #include <wtf/AlwaysInline.h> #include <wtf/Assertions.h> #include <wtf/FastMalloc.h> +#include <wtf/Vector.h> #include <wtf/Threading.h> #include <stdio.h> @@ -255,6 +256,8 @@ typedef union { double d; uint32_t L[2]; } U; #define Big0 (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1)) #define Big1 0xffffffff + +// FIXME: we should remove non-Pack_32 mode since it is unused and unmaintained #ifndef Pack_32 #define Pack_32 #endif @@ -278,25 +281,41 @@ typedef union { double d; uint32_t L[2]; } U; #define Kmax 15 struct BigInt { - BigInt() : sign(0), wds(0) { } - BigInt(const BigInt& other) : sign(other.sign), wds(other.wds) + BigInt() : sign(0) { } + int sign; + + void clear() + { + sign = 0; + m_words.clear(); + } + + size_t size() const + { + return m_words.size(); + } + + void resize(size_t s) { - for (int i = 0; i < 64; ++i) - x[i] = other.x[i]; + m_words.resize(s); + } + + uint32_t* words() + { + return m_words.data(); } - BigInt& operator=(const BigInt& other) + const uint32_t* words() const { - sign = other.sign; - wds = other.wds; - for (int i = 0; i < 64; ++i) - x[i] = other.x[i]; - return *this; + return m_words.data(); } - int sign; - int wds; - uint32_t x[64]; + void append(uint32_t w) + { + m_words.append(w); + } + + Vector<uint32_t, 16> m_words; }; static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */ @@ -307,8 +326,8 @@ static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */ uint32_t carry; #endif - int wds = b.wds; - uint32_t* x = b.x; + int wds = b.size(); + uint32_t* x = b.words(); int i = 0; carry = a; do { @@ -331,10 +350,8 @@ static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */ #endif } while (++i < wds); - if (carry) { - b.x[wds++] = (uint32_t)carry; - b.wds = wds; - } + if (carry) + b.append((uint32_t)carry); } static void s2b(BigInt& b, const char* s, int nd0, int nd, uint32_t y9) @@ -346,12 +363,12 @@ static void s2b(BigInt& b, const char* s, int nd0, int nd, uint32_t y9) for (k = 0, y = 1; x > y; y <<= 1, k++) { } #ifdef Pack_32 b.sign = 0; - b.x[0] = y9; - b.wds = 1; + b.resize(1); + b.words()[0] = y9; #else b.sign = 0; - b.x[0] = y9 & 0xffff; - b.wds = (b->x[1] = y9 >> 16) ? 2 : 1; + b.resize((b->x[1] = y9 >> 16) ? 2 : 1); + b.words()[0] = y9 & 0xffff; #endif int i = 9; @@ -440,8 +457,8 @@ static int lo0bits (uint32_t* y) static void i2b(BigInt& b, int i) { b.sign = 0; - b.x[0] = i; - b.wds = 1; + b.resize(1); + b.words()[0] = i; } static void mult(BigInt& aRef, const BigInt& bRef) @@ -459,23 +476,24 @@ static void mult(BigInt& aRef, const BigInt& bRef) uint32_t carry, z; #endif - if (a->wds < b->wds) { + if (a->size() < b->size()) { const BigInt* tmp = a; a = b; b = tmp; } - wa = a->wds; - wb = b->wds; + wa = a->size(); + wb = b->size(); wc = wa + wb; + c.resize(wc); - for (xc = c.x, xa = xc + wc; xc < xa; xc++) + for (xc = c.words(), xa = xc + wc; xc < xa; xc++) *xc = 0; - xa = a->x; + xa = a->words(); xae = xa + wa; - xb = b->x; + xb = b->words(); xbe = xb + wb; - xc0 = c.x; + xc0 = c.words(); #ifdef USE_LONG_LONG for (; xb < xbe; xc0++) { if ((y = *xb++)) { @@ -537,8 +555,8 @@ static void mult(BigInt& aRef, const BigInt& bRef) } #endif #endif - for (xc0 = c.x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) { } - c.wds = wc; + for (xc0 = c.words(), xc = xc0 + wc; wc > 0 && !*--xc; --wc) { } + c.resize(wc); aRef = c; } @@ -617,14 +635,20 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k) int n = k >> 4; #endif - int n1 = n + b.wds + 1; + int origSize = b.size(); + int n1 = n + origSize + 1; + + if (k &= 0x1f) + b.resize(b.size() + n + 1); + else + b.resize(b.size() + n); - const uint32_t* srcStart = b.x; - uint32_t* dstStart = b.x; - const uint32_t* src = srcStart + b.wds - 1; + const uint32_t* srcStart = b.words(); + uint32_t* dstStart = b.words(); + const uint32_t* src = srcStart + origSize - 1; uint32_t* dst = dstStart + n1 - 1; #ifdef Pack_32 - if (k &= 0x1f) { + if (k) { uint32_t hiSubword = 0; int s = 32 - k; for (; src >= srcStart; --src) { @@ -633,7 +657,8 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k) } *dst = hiSubword; ASSERT(dst == dstStart + n); - b.wds = b.wds + n + (b.x[n1 - 1] != 0); + + b.resize(origSize + n + (b.words()[n1 - 1] != 0)); } #else if (k &= 0xf) { @@ -652,10 +677,11 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k) do { *--dst = *src--; } while (src >= srcStart); - b.wds = b.wds + n; } for (dst = dstStart + n; dst != dstStart; ) *--dst = 0; + + ASSERT(b.size() <= 1 || b.words()[b.size() - 1]); } static int cmp(const BigInt& a, const BigInt& b) @@ -663,15 +689,15 @@ static int cmp(const BigInt& a, const BigInt& b) const uint32_t *xa, *xa0, *xb, *xb0; int i, j; - i = a.wds; - j = b.wds; - ASSERT(i <= 1 || a.x[i - 1]); - ASSERT(j <= 1 || b.x[j - 1]); + i = a.size(); + j = b.size(); + ASSERT(i <= 1 || a.words()[i - 1]); + ASSERT(j <= 1 || b.words()[j - 1]); if (i -= j) return i; - xa0 = a.x; + xa0 = a.words(); xa = xa0 + j; - xb0 = b.x; + xb0 = b.words(); xb = xb0 + j; for (;;) { if (*--xa != *--xb) @@ -692,8 +718,8 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef i = cmp(*a, *b); if (!i) { c.sign = 0; - c.wds = 1; - c.x[0] = 0; + c.resize(1); + c.words()[0] = 0; return; } if (i < 0) { @@ -704,15 +730,16 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef } else i = 0; - c.wds = 0; - c.sign = i; - wa = a->wds; - const uint32_t* xa = a->x; + wa = a->size(); + const uint32_t* xa = a->words(); const uint32_t* xae = xa + wa; - wb = b->wds; - const uint32_t* xb = b->x; + wb = b->size(); + const uint32_t* xb = b->words(); const uint32_t* xbe = xb + wb; - xc = c.x; + + c.resize(wa); + c.sign = i; + xc = c.words(); #ifdef USE_LONG_LONG unsigned long long borrow = 0; do { @@ -757,7 +784,7 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef #endif while (!*--xc) wa--; - c.wds = wa; + c.resize(wa); } static double ulp(U *x) @@ -804,8 +831,8 @@ static double b2d(const BigInt& a, int* e) #define d0 word0(&d) #define d1 word1(&d) - xa0 = a.x; - xa = xa0 + a.wds; + xa0 = a.words(); + xa = xa0 + a.size(); y = *--xa; ASSERT(y); k = hi0bits(y); @@ -860,11 +887,11 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits) b.sign = 0; #ifdef Pack_32 - b.wds = 1; + b.resize(1); #else - b.wds = 2; + b.resize(2); #endif - x = b.x; + x = b.words(); z = d0 & Frac_mask; d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ @@ -881,17 +908,21 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits) z >>= k; } else x[0] = y; + if (z) { + b.resize(2); + x[1] = z; + } + #ifndef Sudden_Underflow - i = + i = b.size(); #endif - b.wds = (x[1] = z) ? 2 : 1; } else { k = lo0bits(&z); x[0] = z; #ifndef Sudden_Underflow - i = + i = 1; #endif - b.wds = 1; + b.resize(1); k += 32; } #else @@ -929,7 +960,7 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits) k += 32; } while (!x[i]) --i; - b->wds = i + 1; + b->resize(i + 1); #endif #ifndef Sudden_Underflow if (de) { @@ -958,9 +989,9 @@ static double ratio(const BigInt& a, const BigInt& b) dval(&da) = b2d(a, &ka); dval(&db) = b2d(b, &kb); #ifdef Pack_32 - k = ka - kb + 32 * (a.wds - b.wds); + k = ka - kb + 32 * (a.size() - b.size()); #else - k = ka - kb + 16 * (a.wds - b.wds); + k = ka - kb + 16 * (a.size() - b.size()); #endif if (k > 0) word0(&da) += k * Exp_msk1; @@ -1452,12 +1483,12 @@ undfl: #endif ) { #ifdef SET_INEXACT - if (!delta->x[0] && delta->wds <= 1) + if (!delta->words()[0] && delta->size() <= 1) inexact = 0; #endif break; } - if (!delta.x[0] && delta.wds <= 1) { + if (!delta.words()[0] && delta.size() <= 1) { /* exact result */ #ifdef SET_INEXACT inexact = 0; @@ -1700,7 +1731,7 @@ ret: static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S) { - int n; + size_t n; uint32_t *bx, *bxe, q, *sx, *sxe; #ifdef USE_LONG_LONG unsigned long long borrow, carry, y, ys; @@ -1710,14 +1741,16 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S) uint32_t si, z, zs; #endif #endif + ASSERT(b.size() <= 1 || b.words()[b.size() - 1]); + ASSERT(S.size() <= 1 || S.words()[S.size() - 1]); - n = S.wds; - ASSERT_WITH_MESSAGE(b.wds <= n, "oversize b in quorem"); - if (b.wds < n) + n = S.size(); + ASSERT_WITH_MESSAGE(b.size() <= n, "oversize b in quorem"); + if (b.size() < n) return 0; - sx = S.x; + sx = S.words(); sxe = sx + --n; - bx = b.x; + bx = b.words(); bxe = bx + n; q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ ASSERT_WITH_MESSAGE(q <= 9, "oversized quotient in quorem"); @@ -1752,18 +1785,18 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S) #endif } while (sx <= sxe); if (!*bxe) { - bx = b.x; + bx = b.words(); while (--bxe > bx && !*bxe) --n; - b.wds = n; + b.resize(n); } } if (cmp(b, S) >= 0) { q++; borrow = 0; carry = 0; - bx = b.x; - sx = S.x; + bx = b.words(); + sx = S.words(); do { #ifdef USE_LONG_LONG ys = *sx++ + carry; @@ -1791,12 +1824,12 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S) #endif #endif } while (sx <= sxe); - bx = b.x; + bx = b.words(); bxe = bx + n; if (!*bxe) { while (--bxe > bx && !*bxe) --n; - b.wds = n; + b.resize(n); } } return q; @@ -2027,7 +2060,8 @@ void dtoa(char* result, double dd, int ndigits, int* decpt, int* sign, char** rv dval(&eps) = (ieps * dval(&u)) + 7.; word0(&eps) -= (P - 1) * Exp_msk1; if (ilim == 0) { - S = mhi = BigInt(); + S.clear(); + mhi.clear(); dval(&u) -= 5.; if (dval(&u) > dval(&eps)) goto one_digit; @@ -2090,7 +2124,8 @@ fast_failed: /* Yes. */ ds = tens[k]; if (ndigits < 0 && ilim <= 0) { - S = mhi = BigInt(); + S.clear(); + mhi.clear(); if (ilim < 0 || dval(&u) <= 5 * ds) goto no_digits; goto one_digit; @@ -2132,7 +2167,8 @@ bump_up: m2 = b2; m5 = b5; - mhi = mlo = BigInt(); + mhi.clear(); + mlo.clear(); if (leftright) { i = #ifndef Sudden_Underflow @@ -2186,10 +2222,10 @@ bump_up: * can do shifts and ors to compute the numerator for q. */ #ifdef Pack_32 - if ((i = ((s5 ? 32 - hi0bits(S.x[S.wds - 1]) : 1) + s2) & 0x1f)) + if ((i = ((s5 ? 32 - hi0bits(S.words()[S.size() - 1]) : 1) + s2) & 0x1f)) i = 32 - i; #else - if ((i = ((s5 ? 32 - hi0bits(S.x[S.wds - 1]) : 1) + s2) & 0xf)) + if ((i = ((s5 ? 32 - hi0bits(S.words()[S.size() - 1]) : 1) + s2) & 0xf)) i = 16 - i; #endif if (i > 4) { @@ -2252,7 +2288,7 @@ bump_up: goto ret; } if (j < 0 || (j == 0 && !(word1(&u) & 1))) { - if (!b.x[0] && b.wds <= 1) { + if (!b.words()[0] && b.size() <= 1) { #ifdef SET_INEXACT inexact = 0; #endif @@ -2287,7 +2323,7 @@ round_9_up: } else for (i = 1;; i++) { *s++ = dig = quorem(b,S) + '0'; - if (!b.x[0] && b.wds <= 1) { + if (!b.words()[0] && b.size() <= 1) { #ifdef SET_INEXACT inexact = 0; #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp index 29a9d18..65c53cf 100644 --- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp @@ -1292,6 +1292,7 @@ class RegexGenerator : private MacroAssembler { #if PLATFORM(X86_64) push(X86::ebp); move(stackPointerRegister, X86::ebp); + push(X86::ebx); #elif PLATFORM(X86) push(X86::ebp); move(stackPointerRegister, X86::ebp); @@ -1319,6 +1320,7 @@ class RegexGenerator : private MacroAssembler { void generateReturn() { #if PLATFORM(X86_64) + pop(X86::ebx); pop(X86::ebp); #elif PLATFORM(X86) pop(X86::esi); |