summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-04 08:33:52 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-04 09:02:17 (GMT)
commit4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1 (patch)
treeb34985c5716d98f01b9f36fd4a98f2ac9710099f /src/3rdparty/webkit/JavaScriptCore
parenta0df97c03f26a38af17a42fb44ad6910536c8857 (diff)
parent2076f150995e541308b1d8da936b3e12ab68b886 (diff)
downloadQt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.zip
Qt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.tar.gz
Qt-4aafbd6222e7aeafd59a4a4356ba8c53b2bfa1d1.tar.bz2
Merge commit 'qt/master-stable'
Conflicts: config.tests/unix/openssl/openssl.pri demos/embedded/embedded.pro examples/itemviews/chart/chart.pro examples/network/network.pro examples/painting/painterpaths/painterpaths.pro examples/threads/mandelbrot/mandelbrot.pro qmake/project.cpp src/3rdparty/libtiff/libtiff/tif_config.h src/corelib/arch/arch.pri src/corelib/global/qglobal.cpp src/corelib/kernel/kernel.pri src/corelib/kernel/qcore_unix_p.h src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/corelib/tools/qsharedpointer_impl.h src/corelib/tools/tools.pri src/gui/kernel/qaction.h src/gui/kernel/qapplication.cpp src/gui/painting/qregion.h src/gui/widgets/qlineedit.cpp src/gui/widgets/qlineedit_p.h src/network/socket/qnativesocketengine_unix.cpp tests/auto/qdir/tst_qdir.cpp tests/auto/qdiriterator/tst_qdiriterator.cpp tests/auto/qhttp/qhttp.pro tests/auto/qline/qline.pro tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qresourceengine/qresourceengine.pro tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qstring/qstring.pro tests/auto/qtcpsocket/qtcpsocket.pro tests/auto/qtcpsocket/tst_qtcpsocket.cpp
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog1287
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri68
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp353
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h706
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h41
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h322
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h17
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h305
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/LinkBuffer.h195
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h797
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h19
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h18
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h25
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/RepatchBuffer.h136
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h44
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp664
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h3
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h71
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp56
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JIT.h16
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h7
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp37
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp69
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jsc.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jsc.pro31
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/parser/Parser.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp68
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp40
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h28
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp22
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp20
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h11
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp25
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h11
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h104
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h16
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h19
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h8
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp20
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/wince/FastMallocWince.h177
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.cpp171
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.h80
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/wince/mt19937ar.c170
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp18
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h6
94 files changed, 5492 insertions, 985 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp
index fc3d0fe..4a32d35 100644
--- a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp
@@ -96,7 +96,7 @@ void JSGarbageCollect(JSContextRef ctx)
ExecState* exec = toJS(ctx);
JSGlobalData& globalData = exec->globalData();
- JSLock lock(globalData.isSharedInstance);
+ JSLock lock(globalData.isSharedInstance ? LockForReal : SilenceAssertionsOnly);
if (!globalData.heap.isBusy())
globalData.heap.collect();
diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h
index 4f67618..c742d96 100644
--- a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h
+++ b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h
@@ -34,7 +34,7 @@
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
-struct StaticValueEntry {
+struct StaticValueEntry : FastAllocBase {
StaticValueEntry(JSObjectGetPropertyCallback _getProperty, JSObjectSetPropertyCallback _setProperty, JSPropertyAttributes _attributes)
: getProperty(_getProperty), setProperty(_setProperty), attributes(_attributes)
{
@@ -45,7 +45,7 @@ struct StaticValueEntry {
JSPropertyAttributes attributes;
};
-struct StaticFunctionEntry {
+struct StaticFunctionEntry : FastAllocBase {
StaticFunctionEntry(JSObjectCallAsFunctionCallback _callAsFunction, JSPropertyAttributes _attributes)
: callAsFunction(_callAsFunction), attributes(_attributes)
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp
index a3bdc69..c358a84 100644
--- a/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp
@@ -70,7 +70,7 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass)
#else
{
#endif
- JSLock lock(true);
+ JSLock lock(LockForReal);
return JSGlobalContextCreateInGroup(toRef(&JSGlobalData::sharedInstance()), globalObjectClass);
}
#endif // PLATFORM(DARWIN)
@@ -82,7 +82,7 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass
{
initializeThreading();
- JSLock lock(true);
+ JSLock lock(LockForReal);
RefPtr<JSGlobalData> globalData = group ? PassRefPtr<JSGlobalData>(toJS(group)) : JSGlobalData::create();
diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp
index 50ee635..87d36ec 100644
--- a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp
@@ -449,7 +449,7 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size
return result;
}
-struct OpaqueJSPropertyNameArray {
+struct OpaqueJSPropertyNameArray : FastAllocBase {
OpaqueJSPropertyNameArray(JSGlobalData* globalData)
: refCount(0)
, globalData(globalData)
@@ -491,7 +491,7 @@ JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array)
void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array)
{
if (--array->refCount == 0) {
- JSLock lock(array->globalData->isSharedInstance);
+ JSLock lock(array->globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly);
delete array;
}
}
@@ -511,7 +511,7 @@ void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStri
PropertyNameArray* propertyNames = toJS(array);
propertyNames->globalData()->heap.registerThread();
- JSLock lock(propertyNames->globalData()->isSharedInstance);
+ JSLock lock(propertyNames->globalData()->isSharedInstance ? LockForReal : SilenceAssertionsOnly);
propertyNames->add(propertyName->identifier(propertyNames->globalData()));
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index cd46bf5..24fc7e7 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,1290 @@
+2009-07-28 Xan Lopez <xlopez@igalia.com>
+
+ Add new files, fixes distcheck.
+
+ * GNUmakefile.am:
+
+2009-07-28 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Determining whether to use JIT or interpreter
+ moved from JavaScriptCore.pri to Platform.h
+
+ * JavaScriptCore.pri:
+ * wtf/Platform.h:
+
+2009-07-27 Brian Weinstein <bweinstein@apple.com>
+
+ Fix of misuse of sort command.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+
+2009-07-27 Brian Weinstein <bweinstein@apple.com>
+
+ Build fix for Windows.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+
+2009-07-27 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Oliver Hunt.
+
+ Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall.
+
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompile):
+ (JSC::JIT::privateCompileCTIMachineTrampolines):
+ * jit/JIT.h:
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::preserveReturnAddressAfterCall):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::privateCompilePutByIdTransition):
+
+2009-07-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Gtk build fix.
+
+ * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case.
+
+2009-07-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Release build fix.
+
+ * runtime/JSLock.h: (JSC::JSLock::~JSLock):
+
+2009-07-27 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27735
+ Give a helpful name to JSLock constructor argument
+
+ * API/JSBase.cpp:
+ (JSGarbageCollect):
+ * API/JSContextRef.cpp:
+ * API/JSObjectRef.cpp:
+ (JSPropertyNameArrayRelease):
+ (JSPropertyNameAccumulatorAddName):
+ * JavaScriptCore.exp:
+ * jsc.cpp:
+ (functionGC):
+ (cleanupGlobalData):
+ (jscmain):
+ * runtime/Collector.cpp:
+ (JSC::Heap::destroy):
+ * runtime/JSLock.cpp:
+ (JSC::JSLock::JSLock):
+ (JSC::JSLock::lock):
+ (JSC::JSLock::unlock):
+ (JSC::JSLock::DropAllLocks::DropAllLocks):
+ (JSC::JSLock::DropAllLocks::~DropAllLocks):
+ * runtime/JSLock.h:
+ (JSC::):
+ (JSC::JSLock::JSLock):
+ (JSC::JSLock::~JSLock):
+
+2009-07-25 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Eric Seidel.
+
+ Allow custom memory allocation control for OpaqueJSPropertyNameArray struct
+ https://bugs.webkit.org/show_bug.cgi?id=27342
+
+ Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been
+ instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473.
+
+ * API/JSObjectRef.cpp:
+
+2009-07-24 Ada Chan <adachan@apple.com>
+
+ In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236:
+ Remove TCMALLOC_TRACK_DECOMMITED_SPANS. We'll always track decommitted spans.
+ We have tested this and show it has little impact on performance.
+
+ Reviewed by Mark Rowe.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_PageHeap::New):
+ (WTF::TCMalloc_PageHeap::AllocLarge):
+ (WTF::propagateDecommittedState):
+ (WTF::mergeDecommittedStates):
+ (WTF::TCMalloc_PageHeap::Delete):
+ (WTF::TCMalloc_PageHeap::IncrementalScavenge):
+
+2009-07-24 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler and Adam Barth.
+
+ Build fix for x86 platforms.
+ https://bugs.webkit.org/show_bug.cgi?id=27602
+
+ * jit/JIT.cpp:
+
+2009-07-23 Kevin Ollivier <kevino@theolliviers.com>
+
+ wx build fix, adding missing header.
+
+ * jit/JIT.cpp:
+
+2009-07-22 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Add wince specific memory files into wtf/wince
+ https://bugs.webkit.org/show_bug.cgi?id=27550
+
+ * wtf/wince/FastMallocWince.h: Added.
+ * wtf/wince/MemoryManager.cpp: Added.
+ * wtf/wince/MemoryManager.h: Added.
+
+2009-07-23 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Fix for missing mmap features in Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=24540
+
+ Fix, conditionally for PLATFORM(SYMBIAN), as an alternative
+ to missing support for the MAP_ANON property flag in mmap.
+ It utilizes Symbian specific memory allocation features.
+
+ * runtime/Collector.cpp
+
+2009-07-22 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event.
+ ( https://bugs.webkit.org/show_bug.cgi?id=27564 )
+
+ Currently we change permissions forwards and backwards for each instruction modified,
+ instead we should only change permissions once per complete repatching event.
+
+ 2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled,
+ which recoups 1/3 of the penalty of running with this mode enabled.
+
+ * assembler/ARMAssembler.cpp:
+ (JSC::ARMAssembler::linkBranch):
+ - Replace usage of MakeWritable with cacheFlush.
+
+ * assembler/ARMAssembler.h:
+ (JSC::ARMAssembler::patchPointerInternal):
+ (JSC::ARMAssembler::repatchLoadPtrToLEA):
+ - Replace usage of MakeWritable with cacheFlush.
+
+ * assembler/ARMv7Assembler.h:
+ (JSC::ARMv7Assembler::relinkJump):
+ (JSC::ARMv7Assembler::relinkCall):
+ (JSC::ARMv7Assembler::repatchInt32):
+ (JSC::ARMv7Assembler::repatchPointer):
+ (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
+ (JSC::ARMv7Assembler::setInt32):
+ - Replace usage of MakeWritable with cacheFlush.
+
+ * assembler/LinkBuffer.h:
+ (JSC::LinkBuffer::performFinalization):
+ - Make explicit call to cacheFlush.
+
+ * assembler/MacroAssemblerCodeRef.h:
+ (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
+ - Make size always available.
+
+ * assembler/RepatchBuffer.h:
+ (JSC::RepatchBuffer::RepatchBuffer):
+ (JSC::RepatchBuffer::~RepatchBuffer):
+ - Add calls to MakeWritable & makeExecutable.
+
+ * assembler/X86Assembler.h:
+ (JSC::X86Assembler::relinkJump):
+ (JSC::X86Assembler::relinkCall):
+ (JSC::X86Assembler::repatchInt32):
+ (JSC::X86Assembler::repatchPointer):
+ (JSC::X86Assembler::repatchLoadPtrToLEA):
+ - Remove usage of MakeWritable.
+
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::getJITCode):
+ - Provide access to CodeBlock's JITCode.
+
+ * jit/ExecutableAllocator.h:
+ (JSC::ExecutableAllocator::makeExecutable):
+ (JSC::ExecutableAllocator::cacheFlush):
+ - Remove MakeWritable, make cacheFlush public.
+
+ * jit/JIT.cpp:
+ (JSC::ctiPatchNearCallByReturnAddress):
+ (JSC::ctiPatchCallByReturnAddress):
+ (JSC::JIT::privateCompile):
+ (JSC::JIT::unlinkCall):
+ (JSC::JIT::linkCall):
+ - Add CodeBlock argument to RepatchBuffer.
+
+ * jit/JIT.h:
+ - Pass CodeBlock argument for use by RepatchBuffer.
+
+ * jit/JITCode.h:
+ (JSC::JITCode::start):
+ (JSC::JITCode::size):
+ - Provide access to code start & size.
+
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::privateCompilePutByIdTransition):
+ (JSC::JIT::patchGetByIdSelf):
+ (JSC::JIT::patchMethodCallProto):
+ (JSC::JIT::patchPutByIdReplace):
+ (JSC::JIT::privateCompilePatchGetArrayLength):
+ (JSC::JIT::privateCompileGetByIdProto):
+ (JSC::JIT::privateCompileGetByIdSelfList):
+ (JSC::JIT::privateCompileGetByIdProtoList):
+ (JSC::JIT::privateCompileGetByIdChainList):
+ (JSC::JIT::privateCompileGetByIdChain):
+ - Add CodeBlock argument to RepatchBuffer.
+
+ * jit/JITStubs.cpp:
+ (JSC::JITThunks::tryCachePutByID):
+ (JSC::JITThunks::tryCacheGetByID):
+ (JSC::JITStubs::DEFINE_STUB_FUNCTION):
+ - Pass CodeBlock argument for use by RepatchBuffer.
+
+2009-07-21 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
+
+ Reviewed by Gavin Barraclough.
+
+ Cache not only the structure of the method, but the
+ structure of its prototype as well.
+ https://bugs.webkit.org/show_bug.cgi?id=27077
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::~CodeBlock):
+ * bytecode/CodeBlock.h:
+ (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::patchMethodCallProto):
+
+2009-07-21 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes.
+ ( https://bugs.webkit.org/show_bug.cgi?id=27527 )
+
+ This allows the implementation to be defined per architecture. Specifically this addresses the
+ fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call
+ to register. Patching the call actually requires the pointer load to be patched, rather than
+ the call to be patched. This is implementation detail specific to MacroAssemblerX86_64, and as
+ such is best handled there.
+
+ * assembler/AbstractMacroAssembler.h:
+ * assembler/MacroAssemblerARM.h:
+ (JSC::MacroAssemblerARM::linkCall):
+ (JSC::MacroAssemblerARM::repatchCall):
+ * assembler/MacroAssemblerARMv7.h:
+ (JSC::MacroAssemblerARMv7::linkCall):
+ (JSC::MacroAssemblerARMv7::repatchCall):
+ * assembler/MacroAssemblerX86.h:
+ (JSC::MacroAssemblerX86::linkCall):
+ (JSC::MacroAssemblerX86::repatchCall):
+ * assembler/MacroAssemblerX86_64.h:
+ (JSC::MacroAssemblerX86_64::linkCall):
+ (JSC::MacroAssemblerX86_64::repatchCall):
+
+2009-07-21 Adam Treat <adam.treat@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ Every wtf file includes other wtf files with <> style includes
+ except this one. Fix the exception.
+
+ * wtf/ByteArray.h:
+
+2009-07-21 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler.
+ ( https://bugs.webkit.org/show_bug.cgi?id=27485 )
+
+ This change is the first step in a process to move code that should be in
+ the architecture-specific MacroAssembler classes up out of Assmbler and
+ AbstractMacroAssembler.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ - added new files
+
+ * assembler/ARMAssembler.h:
+ (JSC::ARMAssembler::linkPointer):
+ - rename patchPointer to bring it in line with the current link/repatch naming scheme
+
+ * assembler/ARMv7Assembler.h:
+ (JSC::ARMv7Assembler::linkCall):
+ (JSC::ARMv7Assembler::linkPointer):
+ (JSC::ARMv7Assembler::relinkCall):
+ (JSC::ARMv7Assembler::repatchInt32):
+ (JSC::ARMv7Assembler::repatchPointer):
+ (JSC::ARMv7Assembler::setInt32):
+ (JSC::ARMv7Assembler::setPointer):
+ - rename patchPointer to bring it in line with the current link/repatch naming scheme
+
+ * assembler/AbstractMacroAssembler.h:
+ (JSC::AbstractMacroAssembler::linkJump):
+ (JSC::AbstractMacroAssembler::linkCall):
+ (JSC::AbstractMacroAssembler::linkPointer):
+ (JSC::AbstractMacroAssembler::getLinkerAddress):
+ (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
+ (JSC::AbstractMacroAssembler::repatchJump):
+ (JSC::AbstractMacroAssembler::repatchCall):
+ (JSC::AbstractMacroAssembler::repatchNearCall):
+ (JSC::AbstractMacroAssembler::repatchInt32):
+ (JSC::AbstractMacroAssembler::repatchPointer):
+ (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA):
+ - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler
+
+ * assembler/LinkBuffer.h: Added.
+ (JSC::LinkBuffer::LinkBuffer):
+ (JSC::LinkBuffer::~LinkBuffer):
+ (JSC::LinkBuffer::link):
+ (JSC::LinkBuffer::patch):
+ (JSC::LinkBuffer::locationOf):
+ (JSC::LinkBuffer::locationOfNearCall):
+ (JSC::LinkBuffer::returnAddressOffset):
+ (JSC::LinkBuffer::finalizeCode):
+ (JSC::LinkBuffer::finalizeCodeAddendum):
+ (JSC::LinkBuffer::code):
+ (JSC::LinkBuffer::performFinalization):
+ - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler
+
+ * assembler/RepatchBuffer.h: Added.
+ (JSC::RepatchBuffer::RepatchBuffer):
+ (JSC::RepatchBuffer::relink):
+ (JSC::RepatchBuffer::repatch):
+ (JSC::RepatchBuffer::repatchLoadPtrToLEA):
+ (JSC::RepatchBuffer::relinkCallerToTrampoline):
+ (JSC::RepatchBuffer::relinkCallerToFunction):
+ (JSC::RepatchBuffer::relinkNearCallerToTrampoline):
+ - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler
+
+ * assembler/X86Assembler.h:
+ (JSC::X86Assembler::linkJump):
+ (JSC::X86Assembler::linkCall):
+ (JSC::X86Assembler::linkPointerForCall):
+ (JSC::X86Assembler::linkPointer):
+ (JSC::X86Assembler::relinkJump):
+ (JSC::X86Assembler::relinkCall):
+ (JSC::X86Assembler::repatchInt32):
+ (JSC::X86Assembler::repatchPointer):
+ (JSC::X86Assembler::setPointer):
+ (JSC::X86Assembler::setInt32):
+ (JSC::X86Assembler::setRel32):
+ - rename patchPointer to bring it in line with the current link/repatch naming scheme
+
+ * jit/JIT.cpp:
+ (JSC::ctiPatchNearCallByReturnAddress):
+ (JSC::ctiPatchCallByReturnAddress):
+ - include new headers
+ - remove MacroAssembler:: specification from RepatchBuffer usage
+
+ * jit/JITPropertyAccess.cpp:
+ * yarr/RegexJIT.cpp:
+ - include new headers
+
+2009-07-21 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
+
+ Reviewed by David Levin.
+
+ Fixed #undef typo.
+ https://bugs.webkit.org/show_bug.cgi?id=27506
+
+ * bytecode/Opcode.h:
+
+2009-07-21 Adam Roben <aroben@apple.com>
+
+ Roll out r46153, r46154, and r46155
+
+ These changes were causing build failures and assertion failures on
+ Windows.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * runtime/JSArray.cpp:
+ * runtime/StringPrototype.cpp:
+ * runtime/UString.cpp:
+ * runtime/UString.h:
+ * wtf/FastMalloc.cpp:
+ * wtf/FastMalloc.h:
+ * wtf/Platform.h:
+ * wtf/PossiblyNull.h: Removed.
+
+2009-07-21 Roland Steiner <rolandsteiner@google.com>
+
+ Reviewed by David Levin.
+
+ Add ENABLE_RUBY to list of build options
+ https://bugs.webkit.org/show_bug.cgi?id=27324
+
+ * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
+
+2009-07-20 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (Build fix).
+
+ Build fix attempt #2
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+
+2009-07-20 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY (Build fix).
+
+ Build fix attempt #1
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+
+2009-07-20 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Make it harder to misuse try* allocation routines
+ https://bugs.webkit.org/show_bug.cgi?id=27469
+
+ Jump through a few hoops to make it much harder to accidentally
+ miss null-checking of values returned by the try-* allocation
+ routines.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::putSlowCase):
+ (JSC::JSArray::increaseVectorLength):
+ * runtime/StringPrototype.cpp:
+ (JSC::stringProtoFuncFontsize):
+ (JSC::stringProtoFuncLink):
+ * runtime/UString.cpp:
+ (JSC::allocChars):
+ (JSC::reallocChars):
+ (JSC::expandCapacity):
+ (JSC::UString::Rep::reserveCapacity):
+ (JSC::UString::expandPreCapacity):
+ (JSC::createRep):
+ (JSC::concatenate):
+ (JSC::UString::spliceSubstringsWithSeparators):
+ (JSC::UString::replaceRange):
+ (JSC::UString::append):
+ (JSC::UString::operator=):
+ * runtime/UString.h:
+ (JSC::UString::Rep::createEmptyBuffer):
+ * wtf/FastMalloc.cpp:
+ (WTF::tryFastZeroedMalloc):
+ (WTF::tryFastMalloc):
+ (WTF::tryFastCalloc):
+ (WTF::tryFastRealloc):
+ (WTF::TCMallocStats::tryFastMalloc):
+ (WTF::TCMallocStats::tryFastCalloc):
+ (WTF::TCMallocStats::tryFastRealloc):
+ * wtf/FastMalloc.h:
+ (WTF::TryMallocReturnValue::TryMallocReturnValue):
+ (WTF::TryMallocReturnValue::~TryMallocReturnValue):
+ (WTF::TryMallocReturnValue::operator Maybe<T>):
+ (WTF::TryMallocReturnValue::getValue):
+ * wtf/PossiblyNull.h:
+ (WTF::PossiblyNull::PossiblyNull):
+ (WTF::PossiblyNull::~PossiblyNull):
+ (WTF::PossiblyNull::getValue):
+ * wtf/Platform.h:
+
+2009-07-20 Gavin Barraclough <barraclough@apple.com>
+
+ RS Oliver Hunt.
+
+ Add ARM assembler files to xcodeproj, for convenience editing.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2009-07-20 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by David Levin.
+
+ Fix an incorrect assertion in Vector::remove.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27477
+
+ * wtf/Vector.h:
+ (WTF::::remove):
+ Assert that the position at which to start removing elements + the
+ length (the number of elements to remove) is less than or equal to the
+ size of the entire Vector.
+
+2009-07-20 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Mark Rowe.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27468
+ Back out r46060, which caused problems for some Apple developers.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
+ * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
+ * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
+ * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
+
+2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Oliver Hunt.
+
+ Allow custom memory allocation control in NewThreadContext
+ https://bugs.webkit.org/show_bug.cgi?id=27338
+
+ Inherits NewThreadContext struct from FastAllocBase because it
+ has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76.
+
+ * wtf/Threading.cpp:
+
+2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Oliver Hunt.
+
+ Allow custom memory allocation control in JavaScriptCore's JSClassRef.h
+ https://bugs.webkit.org/show_bug.cgi?id=27340
+
+ Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these
+ have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153
+ and in JavaScriptCore/API/JSClassRef.cpp:166.
+
+ * API/JSClassRef.h:
+
+2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control in JavaScriptCore's RegexPattern.h
+ https://bugs.webkit.org/show_bug.cgi?id=27343
+
+ Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase:
+
+ CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144)
+ PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221)
+ PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446)
+
+ * yarr/RegexPattern.h:
+
+2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for JavaScriptCore's MatchFrame struct
+ https://bugs.webkit.org/show_bug.cgi?id=27344
+
+ Inherits MatchFrame struct from FastAllocBase because it has
+ been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359.
+
+ * pcre/pcre_exec.cpp:
+
+2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Remove some outdated S60 platform specific code
+ https://bugs.webkit.org/show_bug.cgi?id=27423
+
+ * wtf/Platform.h:
+
+2009-07-20 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ Qt build fix with MSVC and MinGW.
+
+ * jsc.pro: Make sure jsc is a console application, and turn off
+ exceptions and stl support to fix the build.
+
+2009-07-20 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ Do not use C++-style comments in preprocessor directives.
+
+ GCC does not like this in some configurations, using C-style
+ comments is safer.
+
+ * wtf/Platform.h:
+
+2009-07-17 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Steve Falkenburg.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27323
+ Only add Cygwin to the path when it isn't already there. This avoids
+ causing problems for people who purposefully have non-Cygwin versions of
+ executables like svn in front of the Cygwin ones in their paths.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
+ * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
+ * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
+ * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
+
+2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
+
+ Reviewed by Gavin Barraclough.
+
+ Add YARR support for generic ARM platforms (disabled by default).
+ https://bugs.webkit.org/show_bug.cgi?id=24986
+
+ Add generic ARM port for MacroAssembler. It supports the whole
+ MacroAssembler functionality except floating point.
+
+ The class JmpSrc is extended with a flag which enables to patch
+ the jump destination offset during execution. This feature is
+ required for generic ARM port.
+
+ Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
+ Signed off by Gabor Loki <loki@inf.u-szeged.hu>
+
+ * JavaScriptCore.pri:
+ * assembler/ARMAssembler.cpp: Added.
+ (JSC::ARMAssembler::getLdrImmAddress):
+ (JSC::ARMAssembler::linkBranch):
+ (JSC::ARMAssembler::patchConstantPoolLoad):
+ (JSC::ARMAssembler::getOp2):
+ (JSC::ARMAssembler::genInt):
+ (JSC::ARMAssembler::getImm):
+ (JSC::ARMAssembler::moveImm):
+ (JSC::ARMAssembler::dataTransfer32):
+ (JSC::ARMAssembler::baseIndexTransfer32):
+ (JSC::ARMAssembler::executableCopy):
+ * assembler/ARMAssembler.h: Added.
+ (JSC::ARM::):
+ (JSC::ARMAssembler::ARMAssembler):
+ (JSC::ARMAssembler::):
+ (JSC::ARMAssembler::JmpSrc::JmpSrc):
+ (JSC::ARMAssembler::JmpSrc::enableLatePatch):
+ (JSC::ARMAssembler::JmpDst::JmpDst):
+ (JSC::ARMAssembler::JmpDst::isUsed):
+ (JSC::ARMAssembler::JmpDst::used):
+ (JSC::ARMAssembler::emitInst):
+ (JSC::ARMAssembler::and_r):
+ (JSC::ARMAssembler::ands_r):
+ (JSC::ARMAssembler::eor_r):
+ (JSC::ARMAssembler::eors_r):
+ (JSC::ARMAssembler::sub_r):
+ (JSC::ARMAssembler::subs_r):
+ (JSC::ARMAssembler::rsb_r):
+ (JSC::ARMAssembler::rsbs_r):
+ (JSC::ARMAssembler::add_r):
+ (JSC::ARMAssembler::adds_r):
+ (JSC::ARMAssembler::adc_r):
+ (JSC::ARMAssembler::adcs_r):
+ (JSC::ARMAssembler::sbc_r):
+ (JSC::ARMAssembler::sbcs_r):
+ (JSC::ARMAssembler::rsc_r):
+ (JSC::ARMAssembler::rscs_r):
+ (JSC::ARMAssembler::tst_r):
+ (JSC::ARMAssembler::teq_r):
+ (JSC::ARMAssembler::cmp_r):
+ (JSC::ARMAssembler::orr_r):
+ (JSC::ARMAssembler::orrs_r):
+ (JSC::ARMAssembler::mov_r):
+ (JSC::ARMAssembler::movs_r):
+ (JSC::ARMAssembler::bic_r):
+ (JSC::ARMAssembler::bics_r):
+ (JSC::ARMAssembler::mvn_r):
+ (JSC::ARMAssembler::mvns_r):
+ (JSC::ARMAssembler::mul_r):
+ (JSC::ARMAssembler::muls_r):
+ (JSC::ARMAssembler::mull_r):
+ (JSC::ARMAssembler::ldr_imm):
+ (JSC::ARMAssembler::ldr_un_imm):
+ (JSC::ARMAssembler::dtr_u):
+ (JSC::ARMAssembler::dtr_ur):
+ (JSC::ARMAssembler::dtr_d):
+ (JSC::ARMAssembler::dtr_dr):
+ (JSC::ARMAssembler::ldrh_r):
+ (JSC::ARMAssembler::ldrh_d):
+ (JSC::ARMAssembler::ldrh_u):
+ (JSC::ARMAssembler::strh_r):
+ (JSC::ARMAssembler::push_r):
+ (JSC::ARMAssembler::pop_r):
+ (JSC::ARMAssembler::poke_r):
+ (JSC::ARMAssembler::peek_r):
+ (JSC::ARMAssembler::clz_r):
+ (JSC::ARMAssembler::bkpt):
+ (JSC::ARMAssembler::lsl):
+ (JSC::ARMAssembler::lsr):
+ (JSC::ARMAssembler::asr):
+ (JSC::ARMAssembler::lsl_r):
+ (JSC::ARMAssembler::lsr_r):
+ (JSC::ARMAssembler::asr_r):
+ (JSC::ARMAssembler::size):
+ (JSC::ARMAssembler::ensureSpace):
+ (JSC::ARMAssembler::label):
+ (JSC::ARMAssembler::align):
+ (JSC::ARMAssembler::jmp):
+ (JSC::ARMAssembler::patchPointerInternal):
+ (JSC::ARMAssembler::patchConstantPoolLoad):
+ (JSC::ARMAssembler::patchPointer):
+ (JSC::ARMAssembler::repatchInt32):
+ (JSC::ARMAssembler::repatchPointer):
+ (JSC::ARMAssembler::repatchLoadPtrToLEA):
+ (JSC::ARMAssembler::linkJump):
+ (JSC::ARMAssembler::relinkJump):
+ (JSC::ARMAssembler::linkCall):
+ (JSC::ARMAssembler::relinkCall):
+ (JSC::ARMAssembler::getRelocatedAddress):
+ (JSC::ARMAssembler::getDifferenceBetweenLabels):
+ (JSC::ARMAssembler::getCallReturnOffset):
+ (JSC::ARMAssembler::getOp2Byte):
+ (JSC::ARMAssembler::placeConstantPoolBarrier):
+ (JSC::ARMAssembler::RM):
+ (JSC::ARMAssembler::RS):
+ (JSC::ARMAssembler::RD):
+ (JSC::ARMAssembler::RN):
+ (JSC::ARMAssembler::getConditionalField):
+ * assembler/ARMv7Assembler.h:
+ (JSC::ARMv7Assembler::JmpSrc::enableLatePatch):
+ * assembler/AbstractMacroAssembler.h:
+ (JSC::AbstractMacroAssembler::Call::enableLatePatch):
+ (JSC::AbstractMacroAssembler::Jump::enableLatePatch):
+ * assembler/MacroAssembler.h:
+ * assembler/MacroAssemblerARM.h: Added.
+ (JSC::MacroAssemblerARM::):
+ (JSC::MacroAssemblerARM::add32):
+ (JSC::MacroAssemblerARM::and32):
+ (JSC::MacroAssemblerARM::lshift32):
+ (JSC::MacroAssemblerARM::mul32):
+ (JSC::MacroAssemblerARM::not32):
+ (JSC::MacroAssemblerARM::or32):
+ (JSC::MacroAssemblerARM::rshift32):
+ (JSC::MacroAssemblerARM::sub32):
+ (JSC::MacroAssemblerARM::xor32):
+ (JSC::MacroAssemblerARM::load32):
+ (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
+ (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA):
+ (JSC::MacroAssemblerARM::load16):
+ (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
+ (JSC::MacroAssemblerARM::store32):
+ (JSC::MacroAssemblerARM::pop):
+ (JSC::MacroAssemblerARM::push):
+ (JSC::MacroAssemblerARM::move):
+ (JSC::MacroAssemblerARM::swap):
+ (JSC::MacroAssemblerARM::signExtend32ToPtr):
+ (JSC::MacroAssemblerARM::zeroExtend32ToPtr):
+ (JSC::MacroAssemblerARM::branch32):
+ (JSC::MacroAssemblerARM::branch16):
+ (JSC::MacroAssemblerARM::branchTest32):
+ (JSC::MacroAssemblerARM::jump):
+ (JSC::MacroAssemblerARM::branchAdd32):
+ (JSC::MacroAssemblerARM::mull32):
+ (JSC::MacroAssemblerARM::branchMul32):
+ (JSC::MacroAssemblerARM::branchSub32):
+ (JSC::MacroAssemblerARM::breakpoint):
+ (JSC::MacroAssemblerARM::nearCall):
+ (JSC::MacroAssemblerARM::call):
+ (JSC::MacroAssemblerARM::ret):
+ (JSC::MacroAssemblerARM::set32):
+ (JSC::MacroAssemblerARM::setTest32):
+ (JSC::MacroAssemblerARM::tailRecursiveCall):
+ (JSC::MacroAssemblerARM::makeTailRecursiveCall):
+ (JSC::MacroAssemblerARM::moveWithPatch):
+ (JSC::MacroAssemblerARM::branchPtrWithPatch):
+ (JSC::MacroAssemblerARM::storePtrWithPatch):
+ (JSC::MacroAssemblerARM::supportsFloatingPoint):
+ (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
+ (JSC::MacroAssemblerARM::loadDouble):
+ (JSC::MacroAssemblerARM::storeDouble):
+ (JSC::MacroAssemblerARM::addDouble):
+ (JSC::MacroAssemblerARM::subDouble):
+ (JSC::MacroAssemblerARM::mulDouble):
+ (JSC::MacroAssemblerARM::convertInt32ToDouble):
+ (JSC::MacroAssemblerARM::branchDouble):
+ (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
+ (JSC::MacroAssemblerARM::ARMCondition):
+ (JSC::MacroAssemblerARM::prepareCall):
+ (JSC::MacroAssemblerARM::call32):
+ * assembler/X86Assembler.h:
+ (JSC::X86Assembler::JmpSrc::enableLatePatch):
+ * jit/ExecutableAllocator.h:
+ (JSC::ExecutableAllocator::cacheFlush):
+ * wtf/Platform.h:
+ * yarr/RegexJIT.cpp:
+ (JSC::Yarr::RegexGenerator::generateEnter):
+ (JSC::Yarr::RegexGenerator::generateReturn):
+
+2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
+
+ Reviewed by Gavin Barraclough.
+
+ Extend AssemblerBuffer with constant pool handling mechanism.
+ https://bugs.webkit.org/show_bug.cgi?id=24986
+
+ Add a platform independed constant pool framework.
+ This pool can store 32 or 64 bits values which is enough to hold
+ any integer, pointer or double constant.
+
+ * assembler/AssemblerBuffer.h:
+ (JSC::AssemblerBuffer::putIntUnchecked):
+ (JSC::AssemblerBuffer::putInt64Unchecked):
+ (JSC::AssemblerBuffer::append):
+ (JSC::AssemblerBuffer::grow):
+ * assembler/AssemblerBufferWithConstantPool.h: Added.
+ (JSC::):
+
+2009-07-17 Eric Roman <eroman@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Build fix for non-Darwin.
+ Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h
+
+ https://bugs.webkit.org/show_bug.cgi?id=27382
+
+ * wtf/unicode/icu/CollatorICU.cpp:
+
+2009-07-17 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by John Sullivan.
+
+ Get user default collation order via a CFLocale API when available.
+
+ * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault):
+
+2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix the include path for the Symbian port
+ https://bugs.webkit.org/show_bug.cgi?id=27358
+
+ * JavaScriptCore.pri:
+
+2009-07-17 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by David Levin.
+
+ Build fix on platforms don't have MMAP.
+ https://bugs.webkit.org/show_bug.cgi?id=27365
+
+ * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP)
+
+2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
+ https://bugs.webkit.org/show_bug.cgi?id=27206
+
+ Add ENABLE_WEB_SOCKETS
+
+ * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
+
+2009-07-16 Maxime Simon <simon.maxime@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Added Haiku-specific files for JavaScriptCore.
+ https://bugs.webkit.org/show_bug.cgi?id=26620
+
+ * wtf/haiku/MainThreadHaiku.cpp: Added.
+ (WTF::initializeMainThreadPlatform):
+ (WTF::scheduleDispatchFunctionsOnMainThread):
+
+2009-07-16 Gavin Barraclough <barraclough@apple.com>
+
+ RS by Oliver Hunt.
+
+ Revert r45969, this fix does not appear to be valid.
+ https://bugs.webkit.org/show_bug.cgi?id=27077
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::~CodeBlock):
+ (JSC::CodeBlock::unlinkCallers):
+ * jit/JIT.cpp:
+ * jit/JIT.h:
+
+2009-07-16 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Oliver Hunt.
+
+ Allow custom memory allocation control in ExceptionInfo and RareData struct
+ https://bugs.webkit.org/show_bug.cgi?id=27336
+
+ Inherits ExceptionInfo and RareData struct from FastAllocBase because these
+ have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and
+ in JavaScriptCore/bytecode/CodeBlock.h:453.
+
+ Remove unnecessary WTF:: namespace from CodeBlock inheritance.
+
+ * bytecode/CodeBlock.h:
+
+2009-07-16 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Geoff Garen.
+
+ Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2009-07-16 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27320
+ _countof is only included in CE6; for CE5 we need to define it ourself
+
+ * wtf/Platform.h:
+
+2009-07-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
+
+ Reviewed by Oliver Hunt.
+
+ Workers + garbage collector: weird crashes
+ https://bugs.webkit.org/show_bug.cgi?id=27077
+
+ We need to unlink cached method call sites when a function is destroyed.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::~CodeBlock):
+ (JSC::CodeBlock::unlinkCallers):
+ * jit/JIT.cpp:
+ (JSC::JIT::unlinkMethodCall):
+ * jit/JIT.h:
+
+2009-07-15 Steve Falkenburg <sfalken@apple.com>
+
+ Windows Build fix.
+
+ Visual Studio reset our intermediate directory on us.
+ This sets it back.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.vcproj/testapi/testapi.vcproj:
+
+2009-07-15 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Eric Seidel.
+
+ https://bugs.webkit.org/show_bug.cgi?id=26794
+ Make Yacc-generated parsers to use fastMalloc/fastFree.
+
+ Define YYMALLOC and YYFREE to fastMalloc and fastFree
+ respectively.
+
+ * parser/Grammar.y:
+
+2009-07-15 Darin Adler <darin@apple.com>
+
+ Fix a build for a particular Apple configuration.
+
+ * wtf/FastAllocBase.h: Change include to use "" style for
+ including another wtf header. This is the style we use for
+ including other public headers in the same directory.
+
+2009-07-15 George Staikos <george.staikos@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27303
+ Implement createThreadInternal for WinCE.
+ Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
+
+ * wtf/ThreadingWin.cpp:
+ (WTF::createThreadInternal):
+
+2009-07-15 Joe Mason <joe.mason@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27298
+ Platform defines for WINCE.
+ Contains changes by Yong Li <yong.li@torchmobile.com>,
+ George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
+
+ * wtf/Platform.h:
+
+2009-07-15 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27306
+ Use RegisterClass instead of RegisterClassEx on WinCE.
+
+ * wtf/win/MainThreadWin.cpp:
+ (WTF::initializeMainThreadPlatform):
+
+2009-07-15 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27301
+ Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
+ Originally written by Yong Li <yong.li@torchmobile.com> and refactored by
+ Joe Mason <joe.mason@torchmobile.com>
+
+ * wtf/Assertions.cpp: vprintf_stderr_common
+
+2009-07-15 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by George Staikos.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27020
+ msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false
+
+ * wtf/DateMath.cpp:
+ (WTF::gregorianDateTimeToMS):
+
+2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Cleanup - Remove obsolete code from the make system
+ https://bugs.webkit.org/show_bug.cgi?id=27299
+
+ * JavaScriptCore.pro:
+ * jsc.pro:
+
+2009-07-07 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27056
+
+ Alternate bool operator for codewarrior compiler (WINSCW).
+ Compiler (latest b482) reports error for UnspecifiedBoolType construct:
+ "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
+
+ Same fix as in r38391.
+
+ * JavaScriptCore/wtf/OwnArrayPtr.h:
+
+2009-07-15 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Qualify include path with wtf to fix compilation
+ on Symbian.
+ https://bugs.webkit.org/show_bug.cgi?id=27055
+
+ * interpreter/Interpreter.h:
+
+2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Dave Kilzer.
+
+ Turn off non-portable date manipulations for SYMBIAN
+ https://bugs.webkit.org/show_bug.cgi?id=27064
+
+ Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards
+ and place the rules for controlling the guards in Platform.h.
+ Turn off these newly introduced guards for SYMBIAN.
+
+ * wtf/DateMath.cpp:
+ (WTF::calculateUTCOffset):
+ * wtf/DateMath.h:
+ (WTF::GregorianDateTime::GregorianDateTime):
+ (WTF::GregorianDateTime::operator tm):
+ * wtf/Platform.h:
+
+2009-07-15 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Undef ASSERT on Symbian, to avoid excessive warnings
+ https://bugs.webkit.org/show_bug.cgi?id=27052
+
+ * wtf/Assertions.h:
+
+2009-07-15 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Simon Hausmann.
+
+ REGRESSION: fast/js/postfix-syntax.html fails with interpreter
+ https://bugs.webkit.org/show_bug.cgi?id=27294
+
+ When postfix operators operating on locals assign to the same local
+ the order of operations has to be to store the incremented value, then
+ store the unmodified number. Rather than implementing this subtle
+ semantic in the interpreter I've just made the logic explicit in the
+ bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a
+ local var x).
+
+ * parser/Nodes.cpp:
+ (JSC::emitPostIncOrDec):
+
+2009-07-15 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Simon Hausmann.
+
+ REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter
+ https://bugs.webkit.org/show_bug.cgi?id=27259
+
+ The interpreter was incorrectly basing its need to create the arguments object
+ based on the presence of the callframe's argument reference rather than the local
+ arguments reference. Based on this it then overrode the local variable reference.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute):
+
+2009-07-14 Steve Falkenburg <sfalken@apple.com>
+
+ Reorganize JavaScriptCore headers into:
+ API: include/JavaScriptCore/
+ Private: include/private/JavaScriptCore/
+
+ Reviewed by Darin Adler.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
+ * JavaScriptCore.vcproj/testapi/testapi.vcproj:
+ * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Change JSCell's superclass to NoncopyableCustomAllocated
+ https://bugs.webkit.org/show_bug.cgi?id=27248
+
+ JSCell class customizes operator new, since Noncopyable will be
+ inherited from FastAllocBase, NoncopyableCustomAllocated has
+ to be used.
+
+ * runtime/JSCell.h:
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Change all Noncopyable inheriting visibility to public.
+ https://bugs.webkit.org/show_bug.cgi?id=27225
+
+ Change all Noncopyable inheriting visibility to public because
+ it is needed to the custom allocation framework (bug #20422).
+
+ * bytecode/SamplingTool.h:
+ * bytecompiler/RegisterID.h:
+ * interpreter/CachedCall.h:
+ * interpreter/RegisterFile.h:
+ * parser/Lexer.h:
+ * parser/Parser.h:
+ * runtime/ArgList.h:
+ * runtime/BatchedTransitionOptimizer.h:
+ * runtime/Collector.h:
+ * runtime/CommonIdentifiers.h:
+ * runtime/JSCell.h:
+ * runtime/JSGlobalObject.h:
+ * runtime/JSLock.h:
+ * runtime/JSONObject.cpp:
+ * runtime/SmallStrings.cpp:
+ * runtime/SmallStrings.h:
+ * wtf/CrossThreadRefCounted.h:
+ * wtf/GOwnPtr.h:
+ * wtf/Locker.h:
+ * wtf/MessageQueue.h:
+ * wtf/OwnArrayPtr.h:
+ * wtf/OwnFastMallocPtr.h:
+ * wtf/OwnPtr.h:
+ * wtf/RefCounted.h:
+ * wtf/ThreadSpecific.h:
+ * wtf/Threading.h:
+ * wtf/Vector.h:
+ * wtf/unicode/Collator.h:
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
+ https://bugs.webkit.org/show_bug.cgi?id=27249
+
+ ParserArenaDeletable customizes operator new, to avoid double inheritance
+ ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
+
+ * parser/Nodes.h:
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Add RefCountedCustomAllocated to RefCounted.h
+ https://bugs.webkit.org/show_bug.cgi?id=27232
+
+ Some class which are inherited from RefCounted customize
+ operator new, but RefCounted is inherited from Noncopyable
+ which will be inherited from FastAllocBase. To avoid
+ conflicts Noncopyable inheriting was moved down to RefCounted
+ and to avoid double inheritance this class has been added.
+
+ * wtf/RefCounted.h:
+ (WTF::RefCountedCustomAllocated::deref):
+ (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Add NoncopyableCustomAllocated to Noncopyable.h.
+ https://bugs.webkit.org/show_bug.cgi?id=27228
+
+ Some classes which inherited from Noncopyable overrides operator new
+ since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h
+ needs to be extended with this new class to support the overriding.
+
+ * wtf/Noncopyable.h:
+ (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
+ (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
+ https://bugs.webkit.org/show_bug.cgi?id=27260
+
+ Inherits IdentifierTable class from FastAllocBase because it has been
+ instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
+
+ * runtime/Identifier.cpp:
+
+2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
+
+ Reviewed by Darin Adler.
+
+ Allow custom memory allocation control for JavaScriptCore's Profiler class
+ https://bugs.webkit.org/show_bug.cgi?id=27253
+
+ Inherits Profiler class from FastAllocBase because it has been instantiated by
+ 'new' in JavaScriptCore/profiler/Profiler.cpp:56.
+
+ * profiler/Profiler.h:
+
+2009-07-06 George Staikos <george.staikos@torchmobile.com>
+
+ Reviewed by Adam Treat.
+
+ Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
+
+ https://bugs.webkit.org/show_bug.cgi?id=27030
+ Implement custom RNG for WinCE using Mersenne Twister
+
+ * wtf/RandomNumber.cpp:
+ (WTF::randomNumber):
+ * wtf/RandomNumberSeed.h:
+ (WTF::initializeRandomNumberGenerator):
+ * wtf/wince/mt19937ar.c: Added.
+ (init_genrand):
+ (init_by_array):
+ (genrand_int32):
+ (genrand_int31):
+ (genrand_real1):
+ (genrand_real2):
+ (genrand_real3):
+ (genrand_res53):
+
2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Unreviewed make dist build fix.
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
index dbc467d..b43602e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
@@ -9,24 +9,26 @@ CONFIG(debug, debug|release) {
OBJECTS_DIR = obj/release
}
-INCLUDEPATH += $$GENERATED_SOURCES_DIR \
- $$PWD \
- $$PWD/parser \
- $$PWD/bytecompiler \
- $$PWD/debugger \
- $$PWD/runtime \
- $$PWD/wtf \
- $$PWD/wtf/unicode \
- $$PWD/interpreter \
- $$PWD/jit \
- $$PWD/profiler \
- $$PWD/wrec \
- $$PWD/yarr \
- $$PWD/API \
- $$PWD/.. \
- $$PWD/ForwardingHeaders \
- $$PWD/bytecode \
- $$PWD/assembler \
+INCLUDEPATH = \
+ $$PWD \
+ $$PWD/.. \
+ $$PWD/assembler \
+ $$PWD/bytecode \
+ $$PWD/bytecompiler \
+ $$PWD/debugger \
+ $$PWD/interpreter \
+ $$PWD/jit \
+ $$PWD/parser \
+ $$PWD/profiler \
+ $$PWD/runtime \
+ $$PWD/wrec \
+ $$PWD/wtf \
+ $$PWD/wtf/unicode \
+ $$PWD/yarr \
+ $$PWD/API \
+ $$PWD/ForwardingHeaders \
+ $$GENERATED_SOURCES_DIR \
+ $$INCLUDEPATH
DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
@@ -35,34 +37,17 @@ win32-* {
LIBS += -lwinmm
}
-# Default rules to turn JIT on/off
-!contains(DEFINES, ENABLE_JIT=.) {
- isEqual(QT_ARCH,i386)|isEqual(QT_ARCH,windows) {
- # Require gcc >= 4.1
- CONFIG(release):linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
- DEFINES += ENABLE_JIT=1
- }
- win32-msvc* {
- DEFINES += ENABLE_JIT=1
- }
- }
+# In debug mode JIT disabled until crash fixed
+win32-* {
+ CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0
}
-# Rules when JIT enabled
-contains(DEFINES, ENABLE_JIT=1) {
- !contains(DEFINES, ENABLE_YARR=.): DEFINES += ENABLE_YARR=1
- !contains(DEFINES, ENABLE_YARR_JIT=.): DEFINES += ENABLE_YARR_JIT=1
- !contains(DEFINES, ENABLE_JIT_OPTIMIZE_CALL=.): DEFINES += ENABLE_JIT_OPTIMIZE_CALL=1
- !contains(DEFINES, ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=.): DEFINES += ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS=1
- !contains(DEFINES, ENABLE_JIT_OPTIMIZE_ARITHMETIC=.): DEFINES += ENABLE_JIT_OPTIMIZE_ARITHMETIC=1
- linux-g++* {
- !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_VA_LIST=1
+# Rules when JIT enabled (not disabled)
+!contains(DEFINES, ENABLE_JIT=0) {
+ linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
QMAKE_CXXFLAGS += -fno-stack-protector
QMAKE_CFLAGS += -fno-stack-protector
}
- win32-msvc* {
- !contains(DEFINES, WTF_USE_JIT_STUB_ARGUMENT_REGISTER=.): DEFINES += WTF_USE_JIT_STUB_ARGUMENT_REGISTER=1
- }
}
win32-msvc*: INCLUDEPATH += $$PWD/os-win32
@@ -124,6 +109,7 @@ SOURCES += \
bytecode/CodeBlock.cpp \
bytecode/StructureStubInfo.cpp \
bytecode/JumpTable.cpp \
+ assembler/ARMAssembler.cpp \
jit/JIT.cpp \
jit/JITCall.cpp \
jit/JITArithmetic.cpp \
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
index 28f0e6b..f881c05 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
@@ -33,8 +33,6 @@ INCLUDEPATH += $$GENERATED_SOURCES_DIR
}
}
-include($$OUTPUT_DIR/config.pri)
-
CONFIG -= warn_on
*-g++*:QMAKE_CXXFLAGS += -Wreturn-type -fno-strict-aliasing
#QMAKE_CXXFLAGS += -Wall -Wno-undef -Wno-unused-parameter
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp
new file mode 100644
index 0000000..dafc482
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp
@@ -0,0 +1,353 @@
+/*
+ * Copyright (C) 2009 University of Szeged
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(ASSEMBLER) && PLATFORM(ARM)
+
+#include "ARMAssembler.h"
+
+namespace JSC {
+
+// Patching helpers
+
+ARMWord* ARMAssembler::getLdrImmAddress(ARMWord* insn, uint32_t* constPool)
+{
+ // Must be an ldr ..., [pc +/- imm]
+ ASSERT((*insn & 0x0f7f0000) == 0x051f0000);
+
+ if (constPool && (*insn & 0x1))
+ return reinterpret_cast<ARMWord*>(constPool + ((*insn & SDT_OFFSET_MASK) >> 1));
+
+ ARMWord addr = reinterpret_cast<ARMWord>(insn) + 2 * sizeof(ARMWord);
+ if (*insn & DT_UP)
+ return reinterpret_cast<ARMWord*>(addr + (*insn & SDT_OFFSET_MASK));
+ else
+ return reinterpret_cast<ARMWord*>(addr - (*insn & SDT_OFFSET_MASK));
+}
+
+void ARMAssembler::linkBranch(void* code, JmpSrc from, void* to)
+{
+ ARMWord* insn = reinterpret_cast<ARMWord*>(code) + (from.m_offset / sizeof(ARMWord));
+
+ if (!from.m_latePatch) {
+ int diff = reinterpret_cast<ARMWord*>(to) - reinterpret_cast<ARMWord*>(insn + 2);
+
+ if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) {
+ *insn = B | getConditionalField(*insn) | (diff & BRANCH_MASK);
+ ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord));
+ return;
+ }
+ }
+ ARMWord* addr = getLdrImmAddress(insn);
+ *addr = reinterpret_cast<ARMWord>(to);
+ ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord));
+}
+
+void ARMAssembler::patchConstantPoolLoad(void* loadAddr, void* constPoolAddr)
+{
+ ARMWord *ldr = reinterpret_cast<ARMWord*>(loadAddr);
+ ARMWord diff = reinterpret_cast<ARMWord*>(constPoolAddr) - ldr;
+ ARMWord index = (*ldr & 0xfff) >> 1;
+
+ ASSERT(diff >= 1);
+ if (diff >= 2 || index > 0) {
+ diff = (diff + index - 2) * sizeof(ARMWord);
+ ASSERT(diff <= 0xfff);
+ *ldr = (*ldr & ~0xfff) | diff;
+ } else
+ *ldr = (*ldr & ~(0xfff | ARMAssembler::DT_UP)) | sizeof(ARMWord);
+}
+
+// Handle immediates
+
+ARMWord ARMAssembler::getOp2(ARMWord imm)
+{
+ int rol;
+
+ if (imm <= 0xff)
+ return OP2_IMM | imm;
+
+ if ((imm & 0xff000000) == 0) {
+ imm <<= 8;
+ rol = 8;
+ }
+ else {
+ imm = (imm << 24) | (imm >> 8);
+ rol = 0;
+ }
+
+ if ((imm & 0xff000000) == 0) {
+ imm <<= 8;
+ rol += 4;
+ }
+
+ if ((imm & 0xf0000000) == 0) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if ((imm & 0xc0000000) == 0) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ if ((imm & 0x00ffffff) == 0)
+ return OP2_IMM | (imm >> 24) | (rol << 8);
+
+ return 0;
+}
+
+int ARMAssembler::genInt(int reg, ARMWord imm, bool positive)
+{
+ // Step1: Search a non-immediate part
+ ARMWord mask;
+ ARMWord imm1;
+ ARMWord imm2;
+ int rol;
+
+ mask = 0xff000000;
+ rol = 8;
+ while(1) {
+ if ((imm & mask) == 0) {
+ imm = (imm << rol) | (imm >> (32 - rol));
+ rol = 4 + (rol >> 1);
+ break;
+ }
+ rol += 2;
+ mask >>= 2;
+ if (mask & 0x3) {
+ // rol 8
+ imm = (imm << 8) | (imm >> 24);
+ mask = 0xff00;
+ rol = 24;
+ while (1) {
+ if ((imm & mask) == 0) {
+ imm = (imm << rol) | (imm >> (32 - rol));
+ rol = (rol >> 1) - 8;
+ break;
+ }
+ rol += 2;
+ mask >>= 2;
+ if (mask & 0x3)
+ return 0;
+ }
+ break;
+ }
+ }
+
+ ASSERT((imm & 0xff) == 0);
+
+ if ((imm & 0xff000000) == 0) {
+ imm1 = OP2_IMM | ((imm >> 16) & 0xff) | (((rol + 4) & 0xf) << 8);
+ imm2 = OP2_IMM | ((imm >> 8) & 0xff) | (((rol + 8) & 0xf) << 8);
+ } else if (imm & 0xc0000000) {
+ imm1 = OP2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8);
+ imm <<= 8;
+ rol += 4;
+
+ if ((imm & 0xff000000) == 0) {
+ imm <<= 8;
+ rol += 4;
+ }
+
+ if ((imm & 0xf0000000) == 0) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if ((imm & 0xc0000000) == 0) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ if ((imm & 0x00ffffff) == 0)
+ imm2 = OP2_IMM | (imm >> 24) | ((rol & 0xf) << 8);
+ else
+ return 0;
+ } else {
+ if ((imm & 0xf0000000) == 0) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if ((imm & 0xc0000000) == 0) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ imm1 = OP2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8);
+ imm <<= 8;
+ rol += 4;
+
+ if ((imm & 0xf0000000) == 0) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if ((imm & 0xc0000000) == 0) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ if ((imm & 0x00ffffff) == 0)
+ imm2 = OP2_IMM | (imm >> 24) | ((rol & 0xf) << 8);
+ else
+ return 0;
+ }
+
+ if (positive) {
+ mov_r(reg, imm1);
+ orr_r(reg, reg, imm2);
+ } else {
+ mvn_r(reg, imm1);
+ bic_r(reg, reg, imm2);
+ }
+
+ return 1;
+}
+
+ARMWord ARMAssembler::getImm(ARMWord imm, int tmpReg, bool invert)
+{
+ ARMWord tmp;
+
+ // Do it by 1 instruction
+ tmp = getOp2(imm);
+ if (tmp)
+ return tmp;
+
+ tmp = getOp2(~imm);
+ if (tmp) {
+ if (invert)
+ return tmp | OP2_INV_IMM;
+ mvn_r(tmpReg, tmp);
+ return tmpReg;
+ }
+
+ // Do it by 2 instruction
+ if (genInt(tmpReg, imm, true))
+ return tmpReg;
+ if (genInt(tmpReg, ~imm, false))
+ return tmpReg;
+
+ ldr_imm(tmpReg, imm);
+ return tmpReg;
+}
+
+void ARMAssembler::moveImm(ARMWord imm, int dest)
+{
+ ARMWord tmp;
+
+ // Do it by 1 instruction
+ tmp = getOp2(imm);
+ if (tmp) {
+ mov_r(dest, tmp);
+ return;
+ }
+
+ tmp = getOp2(~imm);
+ if (tmp) {
+ mvn_r(dest, tmp);
+ return;
+ }
+
+ // Do it by 2 instruction
+ if (genInt(dest, imm, true))
+ return;
+ if (genInt(dest, ~imm, false))
+ return;
+
+ ldr_imm(dest, imm);
+}
+
+// Memory load/store helpers
+
+void ARMAssembler::dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset)
+{
+ if (offset >= 0) {
+ if (offset <= 0xfff)
+ dtr_u(isLoad, srcDst, base, offset);
+ else if (offset <= 0xfffff) {
+ add_r(ARM::S0, base, OP2_IMM | (offset >> 12) | (10 << 8));
+ dtr_u(isLoad, srcDst, ARM::S0, offset & 0xfff);
+ } else {
+ ARMWord reg = getImm(offset, ARM::S0);
+ dtr_ur(isLoad, srcDst, base, reg);
+ }
+ } else {
+ offset = -offset;
+ if (offset <= 0xfff)
+ dtr_d(isLoad, srcDst, base, offset);
+ else if (offset <= 0xfffff) {
+ sub_r(ARM::S0, base, OP2_IMM | (offset >> 12) | (10 << 8));
+ dtr_d(isLoad, srcDst, ARM::S0, offset & 0xfff);
+ } else {
+ ARMWord reg = getImm(offset, ARM::S0);
+ dtr_dr(isLoad, srcDst, base, reg);
+ }
+ }
+}
+
+void ARMAssembler::baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset)
+{
+ ARMWord op2;
+
+ ASSERT(scale >= 0 && scale <= 3);
+ op2 = lsl(index, scale);
+
+ if (offset >= 0 && offset <= 0xfff) {
+ add_r(ARM::S0, base, op2);
+ dtr_u(isLoad, srcDst, ARM::S0, offset);
+ return;
+ }
+ if (offset <= 0 && offset >= -0xfff) {
+ add_r(ARM::S0, base, op2);
+ dtr_d(isLoad, srcDst, ARM::S0, -offset);
+ return;
+ }
+
+ moveImm(offset, ARM::S0);
+ add_r(ARM::S0, ARM::S0, op2);
+ dtr_ur(isLoad, srcDst, base, ARM::S0);
+}
+
+void* ARMAssembler::executableCopy(ExecutablePool* allocator)
+{
+ char* data = reinterpret_cast<char*>(m_buffer.executableCopy(allocator));
+
+ for (Jumps::Iterator iter = m_jumps.begin(); iter != m_jumps.end(); ++iter) {
+ ARMWord* ldrAddr = reinterpret_cast<ARMWord*>(data + *iter);
+ ARMWord* offset = getLdrImmAddress(ldrAddr);
+ if (*offset != 0xffffffff)
+ linkBranch(data, JmpSrc(*iter), data + *offset);
+ }
+
+ return data;
+}
+
+} // namespace JSC
+
+#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM)
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h
new file mode 100644
index 0000000..d6bb43e
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h
@@ -0,0 +1,706 @@
+/*
+ * Copyright (C) 2009 University of Szeged
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ARMAssembler_h
+#define ARMAssembler_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(ASSEMBLER) && PLATFORM(ARM)
+
+#include "AssemblerBufferWithConstantPool.h"
+#include <wtf/Assertions.h>
+namespace JSC {
+
+typedef uint32_t ARMWord;
+
+namespace ARM {
+ typedef enum {
+ r0 = 0,
+ r1,
+ r2,
+ r3,
+ S0 = r3,
+ r4,
+ r5,
+ r6,
+ r7,
+ r8,
+ S1 = r8,
+ r9,
+ r10,
+ r11,
+ r12,
+ r13,
+ sp = r13,
+ r14,
+ lr = r14,
+ r15,
+ pc = r15
+ } RegisterID;
+
+ typedef enum {
+ fp0 //FIXME
+ } FPRegisterID;
+} // namespace ARM
+
+ class ARMAssembler {
+ public:
+ typedef ARM::RegisterID RegisterID;
+ typedef ARM::FPRegisterID FPRegisterID;
+ typedef AssemblerBufferWithConstantPool<2048, 4, 4, ARMAssembler> ARMBuffer;
+ typedef WTF::SegmentedVector<int, 64> Jumps;
+
+ ARMAssembler() { }
+
+ // ARM conditional constants
+ typedef enum {
+ EQ = 0x00000000, // Zero
+ NE = 0x10000000, // Non-zero
+ CS = 0x20000000,
+ CC = 0x30000000,
+ MI = 0x40000000,
+ PL = 0x50000000,
+ VS = 0x60000000,
+ VC = 0x70000000,
+ HI = 0x80000000,
+ LS = 0x90000000,
+ GE = 0xa0000000,
+ LT = 0xb0000000,
+ GT = 0xc0000000,
+ LE = 0xd0000000,
+ AL = 0xe0000000
+ } Condition;
+
+ // ARM instruction constants
+ enum {
+ AND = (0x0 << 21),
+ EOR = (0x1 << 21),
+ SUB = (0x2 << 21),
+ RSB = (0x3 << 21),
+ ADD = (0x4 << 21),
+ ADC = (0x5 << 21),
+ SBC = (0x6 << 21),
+ RSC = (0x7 << 21),
+ TST = (0x8 << 21),
+ TEQ = (0x9 << 21),
+ CMP = (0xa << 21),
+ CMN = (0xb << 21),
+ ORR = (0xc << 21),
+ MOV = (0xd << 21),
+ BIC = (0xe << 21),
+ MVN = (0xf << 21),
+ MUL = 0x00000090,
+ MULL = 0x00c00090,
+ DTR = 0x05000000,
+ LDRH = 0x00100090,
+ STRH = 0x00000090,
+ STMDB = 0x09200000,
+ LDMIA = 0x08b00000,
+ B = 0x0a000000,
+ BL = 0x0b000000,
+#if ARM_ARCH_VERSION >= 5
+ CLZ = 0x016f0f10,
+ BKPT = 0xe120070,
+#endif
+ };
+
+ enum {
+ OP2_IMM = (1 << 25),
+ OP2_IMMh = (1 << 22),
+ OP2_INV_IMM = (1 << 26),
+ SET_CC = (1 << 20),
+ OP2_OFSREG = (1 << 25),
+ DT_UP = (1 << 23),
+ DT_WB = (1 << 21),
+ // This flag is inlcuded in LDR and STR
+ DT_PRE = (1 << 24),
+ HDT_UH = (1 << 5),
+ DT_LOAD = (1 << 20),
+ };
+
+ // Masks of ARM instructions
+ enum {
+ BRANCH_MASK = 0x00ffffff,
+ NONARM = 0xf0000000,
+ SDT_MASK = 0x0c000000,
+ SDT_OFFSET_MASK = 0xfff,
+ };
+
+ enum {
+ BOFFSET_MIN = -0x00800000,
+ BOFFSET_MAX = 0x007fffff,
+ SDT = 0x04000000,
+ };
+
+ enum {
+ padForAlign8 = 0x00,
+ padForAlign16 = 0x0000,
+ padForAlign32 = 0xee120070,
+ };
+
+ class JmpSrc {
+ friend class ARMAssembler;
+ public:
+ JmpSrc()
+ : m_offset(-1)
+ , m_latePatch(false)
+ {
+ }
+
+ void enableLatePatch() { m_latePatch = true; }
+ private:
+ JmpSrc(int offset)
+ : m_offset(offset)
+ , m_latePatch(false)
+ {
+ }
+
+ int m_offset : 31;
+ int m_latePatch : 1;
+ };
+
+ class JmpDst {
+ friend class ARMAssembler;
+ public:
+ JmpDst()
+ : m_offset(-1)
+ , m_used(false)
+ {
+ }
+
+ bool isUsed() const { return m_used; }
+ void used() { m_used = true; }
+ private:
+ JmpDst(int offset)
+ : m_offset(offset)
+ , m_used(false)
+ {
+ ASSERT(m_offset == offset);
+ }
+
+ int m_offset : 31;
+ int m_used : 1;
+ };
+
+ // Instruction formating
+
+ void emitInst(ARMWord op, int rd, int rn, ARMWord op2)
+ {
+ ASSERT ( ((op2 & ~OP2_IMM) <= 0xfff) || (((op2 & ~OP2_IMMh) <= 0xfff)) );
+ m_buffer.putInt(op | RN(rn) | RD(rd) | op2);
+ }
+
+ void and_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | AND, rd, rn, op2);
+ }
+
+ void ands_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | AND | SET_CC, rd, rn, op2);
+ }
+
+ void eor_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | EOR, rd, rn, op2);
+ }
+
+ void eors_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | EOR | SET_CC, rd, rn, op2);
+ }
+
+ void sub_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | SUB, rd, rn, op2);
+ }
+
+ void subs_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | SUB | SET_CC, rd, rn, op2);
+ }
+
+ void rsb_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | RSB, rd, rn, op2);
+ }
+
+ void rsbs_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | RSB | SET_CC, rd, rn, op2);
+ }
+
+ void add_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | ADD, rd, rn, op2);
+ }
+
+ void adds_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | ADD | SET_CC, rd, rn, op2);
+ }
+
+ void adc_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | ADC, rd, rn, op2);
+ }
+
+ void adcs_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | ADC | SET_CC, rd, rn, op2);
+ }
+
+ void sbc_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | SBC, rd, rn, op2);
+ }
+
+ void sbcs_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | SBC | SET_CC, rd, rn, op2);
+ }
+
+ void rsc_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | RSC, rd, rn, op2);
+ }
+
+ void rscs_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | RSC | SET_CC, rd, rn, op2);
+ }
+
+ void tst_r(int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | TST | SET_CC, 0, rn, op2);
+ }
+
+ void teq_r(int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | TEQ | SET_CC, 0, rn, op2);
+ }
+
+ void cmp_r(int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | CMP | SET_CC, 0, rn, op2);
+ }
+
+ void orr_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | ORR, rd, rn, op2);
+ }
+
+ void orrs_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | ORR | SET_CC, rd, rn, op2);
+ }
+
+ void mov_r(int rd, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | MOV, rd, ARM::r0, op2);
+ }
+
+ void movs_r(int rd, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | MOV | SET_CC, rd, ARM::r0, op2);
+ }
+
+ void bic_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | BIC, rd, rn, op2);
+ }
+
+ void bics_r(int rd, int rn, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | BIC | SET_CC, rd, rn, op2);
+ }
+
+ void mvn_r(int rd, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | MVN, rd, ARM::r0, op2);
+ }
+
+ void mvns_r(int rd, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | MVN | SET_CC, rd, ARM::r0, op2);
+ }
+
+ void mul_r(int rd, int rn, int rm, Condition cc = AL)
+ {
+ m_buffer.putInt(static_cast<ARMWord>(cc) | MUL | RN(rd) | RS(rn) | RM(rm));
+ }
+
+ void muls_r(int rd, int rn, int rm, Condition cc = AL)
+ {
+ m_buffer.putInt(static_cast<ARMWord>(cc) | MUL | SET_CC | RN(rd) | RS(rn) | RM(rm));
+ }
+
+ void mull_r(int rdhi, int rdlo, int rn, int rm, Condition cc = AL)
+ {
+ m_buffer.putInt(static_cast<ARMWord>(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm));
+ }
+
+ void ldr_imm(int rd, ARMWord imm, Condition cc = AL)
+ {
+ m_buffer.putIntWithConstantInt(static_cast<ARMWord>(cc) | DTR | DT_LOAD | DT_UP | RN(ARM::pc) | RD(rd), imm, true);
+ }
+
+ void ldr_un_imm(int rd, ARMWord imm, Condition cc = AL)
+ {
+ m_buffer.putIntWithConstantInt(static_cast<ARMWord>(cc) | DTR | DT_LOAD | DT_UP | RN(ARM::pc) | RD(rd), imm);
+ }
+
+ void dtr_u(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, op2);
+ }
+
+ void dtr_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm);
+ }
+
+ void dtr_d(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0), rd, rb, op2);
+ }
+
+ void dtr_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | DTR | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm);
+ }
+
+ void ldrh_r(int rd, int rn, int rm, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rn, rm);
+ }
+
+ void ldrh_d(int rd, int rb, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | LDRH | HDT_UH | DT_PRE, rd, rb, op2);
+ }
+
+ void ldrh_u(int rd, int rb, ARMWord op2, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, op2);
+ }
+
+ void strh_r(int rn, int rm, int rd, Condition cc = AL)
+ {
+ emitInst(static_cast<ARMWord>(cc) | STRH | HDT_UH | DT_UP | DT_PRE, rd, rn, rm);
+ }
+
+ void push_r(int reg, Condition cc = AL)
+ {
+ ASSERT(ARMWord(reg) <= 0xf);
+ m_buffer.putInt(cc | DTR | DT_WB | RN(ARM::sp) | RD(reg) | 0x4);
+ }
+
+ void pop_r(int reg, Condition cc = AL)
+ {
+ ASSERT(ARMWord(reg) <= 0xf);
+ m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARM::sp) | RD(reg) | 0x4);
+ }
+
+ inline void poke_r(int reg, Condition cc = AL)
+ {
+ dtr_d(false, ARM::sp, 0, reg, cc);
+ }
+
+ inline void peek_r(int reg, Condition cc = AL)
+ {
+ dtr_u(true, reg, ARM::sp, 0, cc);
+ }
+
+#if ARM_ARCH_VERSION >= 5
+ void clz_r(int rd, int rm, Condition cc = AL)
+ {
+ m_buffer.putInt(static_cast<ARMWord>(cc) | CLZ | RD(rd) | RM(rm));
+ }
+#endif
+
+ void bkpt(ARMWord value)
+ {
+#if ARM_ARCH_VERSION >= 5
+ m_buffer.putInt(BKPT | ((value & 0xff0) << 4) | (value & 0xf));
+#else
+ // Cannot access to Zero memory address
+ dtr_dr(true, ARM::S0, ARM::S0, ARM::S0);
+#endif
+ }
+
+ static ARMWord lsl(int reg, ARMWord value)
+ {
+ ASSERT(reg <= ARM::pc);
+ ASSERT(value <= 0x1f);
+ return reg | (value << 7) | 0x00;
+ }
+
+ static ARMWord lsr(int reg, ARMWord value)
+ {
+ ASSERT(reg <= ARM::pc);
+ ASSERT(value <= 0x1f);
+ return reg | (value << 7) | 0x20;
+ }
+
+ static ARMWord asr(int reg, ARMWord value)
+ {
+ ASSERT(reg <= ARM::pc);
+ ASSERT(value <= 0x1f);
+ return reg | (value << 7) | 0x40;
+ }
+
+ static ARMWord lsl_r(int reg, int shiftReg)
+ {
+ ASSERT(reg <= ARM::pc);
+ ASSERT(shiftReg <= ARM::pc);
+ return reg | (shiftReg << 8) | 0x10;
+ }
+
+ static ARMWord lsr_r(int reg, int shiftReg)
+ {
+ ASSERT(reg <= ARM::pc);
+ ASSERT(shiftReg <= ARM::pc);
+ return reg | (shiftReg << 8) | 0x30;
+ }
+
+ static ARMWord asr_r(int reg, int shiftReg)
+ {
+ ASSERT(reg <= ARM::pc);
+ ASSERT(shiftReg <= ARM::pc);
+ return reg | (shiftReg << 8) | 0x50;
+ }
+
+ // General helpers
+
+ int size()
+ {
+ return m_buffer.size();
+ }
+
+ void ensureSpace(int insnSpace, int constSpace)
+ {
+ m_buffer.ensureSpace(insnSpace, constSpace);
+ }
+
+ JmpDst label()
+ {
+ return JmpDst(m_buffer.size());
+ }
+
+ JmpDst align(int alignment)
+ {
+ while (!m_buffer.isAligned(alignment))
+ mov_r(ARM::r0, ARM::r0);
+
+ return label();
+ }
+
+ JmpSrc jmp(Condition cc = AL)
+ {
+ int s = size();
+ ldr_un_imm(ARM::pc, 0xffffffff, cc);
+ m_jumps.append(s);
+ return JmpSrc(s);
+ }
+
+ void* executableCopy(ExecutablePool* allocator);
+
+ // Patching helpers
+
+ static ARMWord* getLdrImmAddress(ARMWord* insn, uint32_t* constPool = 0);
+ static void linkBranch(void* code, JmpSrc from, void* to);
+
+ static void patchPointerInternal(intptr_t from, void* to)
+ {
+ ARMWord* insn = reinterpret_cast<ARMWord*>(from);
+ ARMWord* addr = getLdrImmAddress(insn);
+ *addr = reinterpret_cast<ARMWord>(to);
+ ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord));
+ }
+
+ static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value)
+ {
+ value = (value << 1) + 1;
+ ASSERT(!(value & ~0xfff));
+ return (load & ~0xfff) | value;
+ }
+
+ static void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr);
+
+ // Patch pointers
+
+ static void linkPointer(void* code, JmpDst from, void* to)
+ {
+ patchPointerInternal(reinterpret_cast<intptr_t>(code) + from.m_offset, to);
+ }
+
+ static void repatchInt32(void* from, int32_t to)
+ {
+ patchPointerInternal(reinterpret_cast<intptr_t>(from), reinterpret_cast<void*>(to));
+ }
+
+ static void repatchPointer(void* from, void* to)
+ {
+ patchPointerInternal(reinterpret_cast<intptr_t>(from), to);
+ }
+
+ static void repatchLoadPtrToLEA(void* from)
+ {
+ // On arm, this is a patch from LDR to ADD. It is restricted conversion,
+ // from special case to special case, altough enough for its purpose
+ ARMWord* insn = reinterpret_cast<ARMWord*>(from);
+ ASSERT((*insn & 0x0ff00f00) == 0x05900000);
+
+ *insn = (*insn & 0xf00ff0ff) | 0x02800000;
+ ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord));
+ }
+
+ // Linkers
+
+ void linkJump(JmpSrc from, JmpDst to)
+ {
+ ARMWord* insn = reinterpret_cast<ARMWord*>(m_buffer.data()) + (from.m_offset / sizeof(ARMWord));
+ *getLdrImmAddress(insn, m_buffer.poolAddress()) = static_cast<ARMWord>(to.m_offset);
+ }
+
+ static void linkJump(void* code, JmpSrc from, void* to)
+ {
+ linkBranch(code, from, to);
+ }
+
+ static void relinkJump(void* from, void* to)
+ {
+ patchPointerInternal(reinterpret_cast<intptr_t>(from) - sizeof(ARMWord), to);
+ }
+
+ static void linkCall(void* code, JmpSrc from, void* to)
+ {
+ linkBranch(code, from, to);
+ }
+
+ static void relinkCall(void* from, void* to)
+ {
+ relinkJump(from, to);
+ }
+
+ // Address operations
+
+ static void* getRelocatedAddress(void* code, JmpSrc jump)
+ {
+ return reinterpret_cast<void*>(reinterpret_cast<ARMWord*>(code) + jump.m_offset / sizeof(ARMWord) + 1);
+ }
+
+ static void* getRelocatedAddress(void* code, JmpDst label)
+ {
+ return reinterpret_cast<void*>(reinterpret_cast<ARMWord*>(code) + label.m_offset / sizeof(ARMWord));
+ }
+
+ // Address differences
+
+ static int getDifferenceBetweenLabels(JmpDst from, JmpSrc to)
+ {
+ return (to.m_offset + sizeof(ARMWord)) - from.m_offset;
+ }
+
+ static int getDifferenceBetweenLabels(JmpDst from, JmpDst to)
+ {
+ return to.m_offset - from.m_offset;
+ }
+
+ static unsigned getCallReturnOffset(JmpSrc call)
+ {
+ return call.m_offset + sizeof(ARMWord);
+ }
+
+ // Handle immediates
+
+ static ARMWord getOp2Byte(ARMWord imm)
+ {
+ ASSERT(imm <= 0xff);
+ return OP2_IMMh | (imm & 0x0f) | ((imm & 0xf0) << 4) ;
+ }
+
+ static ARMWord getOp2(ARMWord imm);
+ ARMWord getImm(ARMWord imm, int tmpReg, bool invert = false);
+ void moveImm(ARMWord imm, int dest);
+
+ // Memory load/store helpers
+
+ void dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset);
+ void baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset);
+
+ // Constant pool hnadlers
+
+ static ARMWord placeConstantPoolBarrier(int offset)
+ {
+ offset = (offset - sizeof(ARMWord)) >> 2;
+ ASSERT((offset <= BOFFSET_MAX && offset >= BOFFSET_MIN));
+ return AL | B | (offset & BRANCH_MASK);
+ }
+
+ private:
+ ARMWord RM(int reg)
+ {
+ ASSERT(reg <= ARM::pc);
+ return reg;
+ }
+
+ ARMWord RS(int reg)
+ {
+ ASSERT(reg <= ARM::pc);
+ return reg << 8;
+ }
+
+ ARMWord RD(int reg)
+ {
+ ASSERT(reg <= ARM::pc);
+ return reg << 12;
+ }
+
+ ARMWord RN(int reg)
+ {
+ ASSERT(reg <= ARM::pc);
+ return reg << 16;
+ }
+
+ static ARMWord getConditionalField(ARMWord i)
+ {
+ return i & 0xf0000000;
+ }
+
+ int genInt(int reg, ARMWord imm, bool positive);
+
+ ARMBuffer m_buffer;
+ Jumps m_jumps;
+ };
+
+} // namespace JSC
+
+#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM)
+
+#endif // ARMAssembler_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h
index 9745d6d..f7e2fb4 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h
@@ -442,6 +442,7 @@ public:
{
}
+ void enableLatePatch() { }
private:
JmpSrc(int offset)
: m_offset(offset)
@@ -1528,51 +1529,51 @@ public:
ASSERT(from.m_offset != -1);
ASSERT(reinterpret_cast<intptr_t>(to) & 1);
- patchPointer(reinterpret_cast<uint16_t*>(reinterpret_cast<intptr_t>(code) + from.m_offset) - 1, to);
+ setPointer(reinterpret_cast<uint16_t*>(reinterpret_cast<intptr_t>(code) + from.m_offset) - 1, to);
}
- static void patchPointer(void* code, JmpDst where, void* value)
+ static void linkPointer(void* code, JmpDst where, void* value)
{
- patchPointer(reinterpret_cast<char*>(code) + where.m_offset, value);
+ setPointer(reinterpret_cast<char*>(code) + where.m_offset, value);
}
static void relinkJump(void* from, void* to)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(from) - 2, 2 * sizeof(uint16_t));
-
ASSERT(!(reinterpret_cast<intptr_t>(from) & 1));
ASSERT(!(reinterpret_cast<intptr_t>(to) & 1));
intptr_t relative = reinterpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(from);
linkWithOffset(reinterpret_cast<uint16_t*>(from), relative);
+
+ ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(from) - 2, 2 * sizeof(uint16_t));
}
static void relinkCall(void* from, void* to)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(from) - 5, 4 * sizeof(uint16_t));
-
ASSERT(!(reinterpret_cast<intptr_t>(from) & 1));
ASSERT(reinterpret_cast<intptr_t>(to) & 1);
- patchPointer(reinterpret_cast<uint16_t*>(from) - 1, to);
+ setPointer(reinterpret_cast<uint16_t*>(from) - 1, to);
+
+ ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(from) - 5, 4 * sizeof(uint16_t));
}
static void repatchInt32(void* where, int32_t value)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t));
-
ASSERT(!(reinterpret_cast<intptr_t>(where) & 1));
- patchInt32(where, value);
+ setInt32(where, value);
+
+ ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t));
}
static void repatchPointer(void* where, void* value)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t));
-
ASSERT(!(reinterpret_cast<intptr_t>(where) & 1));
- patchPointer(where, value);
+ setPointer(where, value);
+
+ ExecutableAllocator::cacheFlush(reinterpret_cast<uint16_t*>(where) - 4, 4 * sizeof(uint16_t));
}
static void repatchLoadPtrToLEA(void* where)
@@ -1582,8 +1583,8 @@ public:
uint16_t* loadOp = reinterpret_cast<uint16_t*>(where) + 4;
ASSERT((*loadOp & 0xfff0) == OP_LDR_reg_T2);
- ExecutableAllocator::MakeWritable unprotect(loadOp, sizeof(uint16_t));
*loadOp = OP_ADD_reg_T3 | (*loadOp & 0xf);
+ ExecutableAllocator::cacheFlush(loadOp, sizeof(uint16_t));
}
private:
@@ -1610,12 +1611,10 @@ private:
m_formatter.vfpOp(0x0b00ed00 | offset | (up << 7) | (isLoad << 4) | doubleRegisterMask(rd, 6, 28) | rn);
}
- static void patchInt32(void* code, uint32_t value)
+ static void setInt32(void* code, uint32_t value)
{
uint16_t* location = reinterpret_cast<uint16_t*>(code);
- ExecutableAllocator::MakeWritable unprotect(location - 4, 4 * sizeof(uint16_t));
-
uint16_t lo16 = value;
uint16_t hi16 = value >> 16;
@@ -1623,11 +1622,13 @@ private:
spliceLo11(location - 3, lo16);
spliceHi5(location - 2, hi16);
spliceLo11(location - 1, hi16);
+
+ ExecutableAllocator::cacheFlush(location - 4, 4 * sizeof(uint16_t));
}
- static void patchPointer(void* code, void* value)
+ static void setPointer(void* code, void* value)
{
- patchInt32(code, reinterpret_cast<uint32_t>(value));
+ setInt32(code, reinterpret_cast<uint32_t>(value));
}
// Linking & patching:
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h
index cf94677..95b5afc 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h
@@ -35,22 +35,20 @@
#if ENABLE(ASSEMBLER)
-// FIXME: keep transitioning this out into MacroAssemblerX86_64.
-#if PLATFORM(X86_64)
-#define REPTACH_OFFSET_CALL_R11 3
-#endif
-
namespace JSC {
+class LinkBuffer;
+class RepatchBuffer;
+
template <class AssemblerType>
class AbstractMacroAssembler {
public:
+ typedef AssemblerType AssemblerType_T;
+
typedef MacroAssemblerCodePtr CodePtr;
typedef MacroAssemblerCodeRef CodeRef;
class Jump;
- class LinkBuffer;
- class RepatchBuffer;
typedef typename AssemblerType::RegisterID RegisterID;
typedef typename AssemblerType::FPRegisterID FPRegisterID;
@@ -292,7 +290,7 @@ public:
class Call {
template<class TemplateAssemblerType>
friend class AbstractMacroAssembler;
- friend class LinkBuffer;
+
public:
enum Flags {
None = 0x0,
@@ -322,8 +320,13 @@ public:
return Call(jump.m_jmp, Linkable);
}
- private:
+ void enableLatePatch()
+ {
+ m_jmp.enableLatePatch();
+ }
+
JmpSrc m_jmp;
+ private:
Flags m_flags;
};
@@ -358,6 +361,11 @@ public:
masm->m_assembler.linkJump(m_jmp, label.m_label);
}
+ void enableLatePatch()
+ {
+ m_jmp.enableLatePatch();
+ }
+
private:
JmpSrc m_jmp;
};
@@ -406,254 +414,13 @@ public:
};
- // Section 3: LinkBuffer - utility to finalize code generation.
+ // Section 3: Misc admin methods
static CodePtr trampolineAt(CodeRef ref, Label label)
{
return CodePtr(AssemblerType::getRelocatedAddress(ref.m_code.dataLocation(), label.m_label));
}
- // LinkBuffer:
- //
- // This class assists in linking code generated by the macro assembler, once code generation
- // has been completed, and the code has been copied to is final location in memory. At this
- // time pointers to labels within the code may be resolved, and relative offsets to external
- // addresses may be fixed.
- //
- // Specifically:
- // * Jump objects may be linked to external targets,
- // * The address of Jump objects may taken, such that it can later be relinked.
- // * The return address of a Jump object representing a call may be acquired.
- // * The address of a Label pointing into the code may be resolved.
- // * The value referenced by a DataLabel may be fixed.
- //
- // FIXME: distinguish between Calls & Jumps (make a specific call to obtain the return
- // address of calls, as opposed to a point that can be used to later relink a Jump -
- // possibly wrap the later up in an object that can do just that).
- class LinkBuffer : public Noncopyable {
- public:
- // Note: Initialization sequence is significant, since executablePool is a PassRefPtr.
- // First, executablePool is copied into m_executablePool, then the initialization of
- // m_code uses m_executablePool, *not* executablePool, since this is no longer valid.
- LinkBuffer(AbstractMacroAssembler<AssemblerType>* masm, PassRefPtr<ExecutablePool> executablePool)
- : m_executablePool(executablePool)
- , m_code(masm->m_assembler.executableCopy(m_executablePool.get()))
- , m_size(masm->m_assembler.size())
-#ifndef NDEBUG
- , m_completed(false)
-#endif
- {
- }
-
- ~LinkBuffer()
- {
- ASSERT(m_completed);
- }
-
- // These methods are used to link or set values at code generation time.
-
- void link(Call call, FunctionPtr function)
- {
- ASSERT(call.isFlagSet(Call::Linkable));
-#if PLATFORM(X86_64)
- if (!call.isFlagSet(Call::Near)) {
- char* callLocation = reinterpret_cast<char*>(AssemblerType::getRelocatedAddress(code(), call.m_jmp)) - REPTACH_OFFSET_CALL_R11;
- AssemblerType::patchPointerForCall(callLocation, function.value());
- } else
-#endif
- AssemblerType::linkCall(code(), call.m_jmp, function.value());
- }
-
- void link(Jump jump, CodeLocationLabel label)
- {
- AssemblerType::linkJump(code(), jump.m_jmp, label.dataLocation());
- }
-
- void link(JumpList list, CodeLocationLabel label)
- {
- for (unsigned i = 0; i < list.m_jumps.size(); ++i)
- AssemblerType::linkJump(code(), list.m_jumps[i].m_jmp, label.dataLocation());
- }
-
- void patch(DataLabelPtr label, void* value)
- {
- AssemblerType::patchPointer(code(), label.m_label, value);
- }
-
- void patch(DataLabelPtr label, CodeLocationLabel value)
- {
- AssemblerType::patchPointer(code(), label.m_label, value.executableAddress());
- }
-
- // These methods are used to obtain handles to allow the code to be relinked / repatched later.
-
- CodeLocationCall locationOf(Call call)
- {
- ASSERT(call.isFlagSet(Call::Linkable));
- ASSERT(!call.isFlagSet(Call::Near));
- return CodeLocationCall(AssemblerType::getRelocatedAddress(code(), call.m_jmp));
- }
-
- CodeLocationNearCall locationOfNearCall(Call call)
- {
- ASSERT(call.isFlagSet(Call::Linkable));
- ASSERT(call.isFlagSet(Call::Near));
- return CodeLocationNearCall(AssemblerType::getRelocatedAddress(code(), call.m_jmp));
- }
-
- CodeLocationLabel locationOf(Label label)
- {
- return CodeLocationLabel(AssemblerType::getRelocatedAddress(code(), label.m_label));
- }
-
- CodeLocationDataLabelPtr locationOf(DataLabelPtr label)
- {
- return CodeLocationDataLabelPtr(AssemblerType::getRelocatedAddress(code(), label.m_label));
- }
-
- CodeLocationDataLabel32 locationOf(DataLabel32 label)
- {
- return CodeLocationDataLabel32(AssemblerType::getRelocatedAddress(code(), label.m_label));
- }
-
- // This method obtains the return address of the call, given as an offset from
- // the start of the code.
- unsigned returnAddressOffset(Call call)
- {
- return AssemblerType::getCallReturnOffset(call.m_jmp);
- }
-
- // Upon completion of all patching either 'finalizeCode()' or 'finalizeCodeAddendum()' should be called
- // once to complete generation of the code. 'finalizeCode()' is suited to situations
- // where the executable pool must also be retained, the lighter-weight 'finalizeCodeAddendum()' is
- // suited to adding to an existing allocation.
- CodeRef finalizeCode()
- {
- performFinalization();
-
- return CodeRef(m_code, m_executablePool, m_size);
- }
- CodeLocationLabel finalizeCodeAddendum()
- {
- performFinalization();
-
- return CodeLocationLabel(code());
- }
-
- private:
- // Keep this private! - the underlying code should only be obtained externally via
- // finalizeCode() or finalizeCodeAddendum().
- void* code()
- {
- return m_code;
- }
-
- void performFinalization()
- {
-#ifndef NDEBUG
- ASSERT(!m_completed);
- m_completed = true;
-#endif
-
- ExecutableAllocator::makeExecutable(code(), m_size);
- }
-
- RefPtr<ExecutablePool> m_executablePool;
- void* m_code;
- size_t m_size;
-#ifndef NDEBUG
- bool m_completed;
-#endif
- };
-
- class RepatchBuffer {
- public:
- RepatchBuffer()
- {
- }
-
- void relink(CodeLocationJump jump, CodeLocationLabel destination)
- {
- AssemblerType::relinkJump(jump.dataLocation(), destination.dataLocation());
- }
-
- void relink(CodeLocationCall call, CodeLocationLabel destination)
- {
-#if PLATFORM(X86_64)
- repatch(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11), destination.executableAddress());
-#else
- AssemblerType::relinkCall(call.dataLocation(), destination.executableAddress());
-#endif
- }
-
- void relink(CodeLocationCall call, FunctionPtr destination)
- {
-#if PLATFORM(X86_64)
- repatch(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11), destination.executableAddress());
-#else
- AssemblerType::relinkCall(call.dataLocation(), destination.executableAddress());
-#endif
- }
-
- void relink(CodeLocationNearCall nearCall, CodePtr destination)
- {
- AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress());
- }
-
- void relink(CodeLocationNearCall nearCall, CodeLocationLabel destination)
- {
- AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress());
- }
-
- void relink(CodeLocationNearCall nearCall, FunctionPtr destination)
- {
- AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress());
- }
-
- void repatch(CodeLocationDataLabel32 dataLabel32, int32_t value)
- {
- AssemblerType::repatchInt32(dataLabel32.dataLocation(), value);
- }
-
- void repatch(CodeLocationDataLabelPtr dataLabelPtr, void* value)
- {
- AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value);
- }
-
- void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label)
- {
- relink(CodeLocationCall(CodePtr(returnAddress)), label);
- }
-
- void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction)
- {
- relinkCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction));
- }
-
- void relinkCallerToFunction(ReturnAddressPtr returnAddress, FunctionPtr function)
- {
- relink(CodeLocationCall(CodePtr(returnAddress)), function);
- }
-
- void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label)
- {
- relink(CodeLocationNearCall(CodePtr(returnAddress)), label);
- }
-
- void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction)
- {
- relinkNearCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction));
- }
-
- void repatchLoadPtrToLEA(CodeLocationInstruction instruction)
- {
- AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation());
- }
- };
-
-
- // Section 4: Misc admin methods
-
size_t size()
{
return m_assembler.size();
@@ -712,6 +479,59 @@ public:
protected:
AssemblerType m_assembler;
+
+ friend class LinkBuffer;
+ friend class RepatchBuffer;
+
+ static void linkJump(void* code, Jump jump, CodeLocationLabel target)
+ {
+ AssemblerType::linkJump(code, jump.m_jmp, target.dataLocation());
+ }
+
+ static void linkPointer(void* code, typename AssemblerType::JmpDst label, void* value)
+ {
+ AssemblerType::linkPointer(code, label, value);
+ }
+
+ static void* getLinkerAddress(void* code, typename AssemblerType::JmpSrc label)
+ {
+ return AssemblerType::getRelocatedAddress(code, label);
+ }
+
+ static void* getLinkerAddress(void* code, typename AssemblerType::JmpDst label)
+ {
+ return AssemblerType::getRelocatedAddress(code, label);
+ }
+
+ static unsigned getLinkerCallReturnOffset(Call call)
+ {
+ return AssemblerType::getCallReturnOffset(call.m_jmp);
+ }
+
+ static void repatchJump(CodeLocationJump jump, CodeLocationLabel destination)
+ {
+ AssemblerType::relinkJump(jump.dataLocation(), destination.dataLocation());
+ }
+
+ static void repatchNearCall(CodeLocationNearCall nearCall, CodeLocationLabel destination)
+ {
+ AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress());
+ }
+
+ static void repatchInt32(CodeLocationDataLabel32 dataLabel32, int32_t value)
+ {
+ AssemblerType::repatchInt32(dataLabel32.dataLocation(), value);
+ }
+
+ static void repatchPointer(CodeLocationDataLabelPtr dataLabelPtr, void* value)
+ {
+ AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value);
+ }
+
+ static void repatchLoadPtrToLEA(CodeLocationInstruction instruction)
+ {
+ AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation());
+ }
};
} // namespace JSC
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h
index 7a5a8d3..073906a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBuffer.h
@@ -95,12 +95,14 @@ namespace JSC {
void putIntUnchecked(int value)
{
+ ASSERT(!(m_size > m_capacity - 4));
*reinterpret_cast<int*>(&m_buffer[m_size]) = value;
m_size += 4;
}
void putInt64Unchecked(int64_t value)
{
+ ASSERT(!(m_size > m_capacity - 8));
*reinterpret_cast<int64_t*>(&m_buffer[m_size]) = value;
m_size += 8;
}
@@ -137,10 +139,19 @@ namespace JSC {
return memcpy(result, m_buffer, m_size);
}
- private:
- void grow()
+ protected:
+ void append(const char* data, int size)
+ {
+ if (m_size > m_capacity - size)
+ grow(size);
+
+ memcpy(m_buffer + m_size, data, size);
+ m_size += size;
+ }
+
+ void grow(int extraCapacity = 0)
{
- m_capacity += m_capacity / 2;
+ m_capacity += m_capacity / 2 + extraCapacity;
if (m_buffer == m_inlineBuffer) {
char* newBuffer = static_cast<char*>(fastMalloc(m_capacity));
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h
new file mode 100644
index 0000000..f15b7f3
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h
@@ -0,0 +1,305 @@
+/*
+ * Copyright (C) 2009 University of Szeged
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AssemblerBufferWithConstantPool_h
+#define AssemblerBufferWithConstantPool_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(ASSEMBLER)
+
+#include "AssemblerBuffer.h"
+#include <wtf/SegmentedVector.h>
+
+namespace JSC {
+
+/*
+ On a constant pool 4 or 8 bytes data can be stored. The values can be
+ constants or addresses. The addresses should be 32 or 64 bits. The constants
+ should be double-precisions float or integer numbers which are hard to be
+ encoded as few machine instructions.
+
+ TODO: The pool is desinged to handle both 32 and 64 bits values, but
+ currently only the 4 bytes constants are implemented and tested.
+
+ The AssemblerBuffer can contain multiple constant pools. Each pool is inserted
+ into the instruction stream - protected by a jump instruction from the
+ execution flow.
+
+ The flush mechanism is called when no space remain to insert the next instruction
+ into the pool. Three values are used to determine when the constant pool itself
+ have to be inserted into the instruction stream (Assembler Buffer):
+
+ - maxPoolSize: size of the constant pool in bytes, this value cannot be
+ larger than the maximum offset of a PC relative memory load
+
+ - barrierSize: size of jump instruction in bytes which protects the
+ constant pool from execution
+
+ - maxInstructionSize: maximum length of a machine instruction in bytes
+
+ There are some callbacks which solve the target architecture specific
+ address handling:
+
+ - TYPE patchConstantPoolLoad(TYPE load, int value):
+ patch the 'load' instruction with the index of the constant in the
+ constant pool and return the patched instruction.
+
+ - void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr):
+ patch the a PC relative load instruction at 'loadAddr' address with the
+ final relative offset. The offset can be computed with help of
+ 'constPoolAddr' (the address of the constant pool) and index of the
+ constant (which is stored previously in the load instruction itself).
+
+ - TYPE placeConstantPoolBarrier(int size):
+ return with a constant pool barrier instruction which jumps over the
+ constant pool.
+
+ The 'put*WithConstant*' functions should be used to place a data into the
+ constant pool.
+*/
+
+template <int maxPoolSize, int barrierSize, int maxInstructionSize, class AssemblerType>
+class AssemblerBufferWithConstantPool: public AssemblerBuffer {
+ typedef WTF::SegmentedVector<uint32_t, 512> LoadOffsets;
+public:
+ enum {
+ UniqueConst,
+ ReusableConst,
+ UnusedEntry,
+ };
+
+ AssemblerBufferWithConstantPool()
+ : AssemblerBuffer()
+ , m_numConsts(0)
+ , m_maxDistance(maxPoolSize)
+ , m_lastConstDelta(0)
+ {
+ m_pool = static_cast<uint32_t*>(fastMalloc(maxPoolSize));
+ m_mask = static_cast<char*>(fastMalloc(maxPoolSize / sizeof(uint32_t)));
+ }
+
+ ~AssemblerBufferWithConstantPool()
+ {
+ fastFree(m_mask);
+ fastFree(m_pool);
+ }
+
+ void ensureSpace(int space)
+ {
+ flushIfNoSpaceFor(space);
+ AssemblerBuffer::ensureSpace(space);
+ }
+
+ void ensureSpace(int insnSpace, int constSpace)
+ {
+ flushIfNoSpaceFor(insnSpace, constSpace);
+ AssemblerBuffer::ensureSpace(insnSpace);
+ }
+
+ bool isAligned(int alignment)
+ {
+ flushIfNoSpaceFor(alignment);
+ return AssemblerBuffer::isAligned(alignment);
+ }
+
+ void putByteUnchecked(int value)
+ {
+ AssemblerBuffer::putByteUnchecked(value);
+ correctDeltas(1);
+ }
+
+ void putByte(int value)
+ {
+ flushIfNoSpaceFor(1);
+ AssemblerBuffer::putByte(value);
+ correctDeltas(1);
+ }
+
+ void putShortUnchecked(int value)
+ {
+ AssemblerBuffer::putShortUnchecked(value);
+ correctDeltas(2);
+ }
+
+ void putShort(int value)
+ {
+ flushIfNoSpaceFor(2);
+ AssemblerBuffer::putShort(value);
+ correctDeltas(2);
+ }
+
+ void putIntUnchecked(int value)
+ {
+ AssemblerBuffer::putIntUnchecked(value);
+ correctDeltas(4);
+ }
+
+ void putInt(int value)
+ {
+ flushIfNoSpaceFor(4);
+ AssemblerBuffer::putInt(value);
+ correctDeltas(4);
+ }
+
+ void putInt64Unchecked(int64_t value)
+ {
+ AssemblerBuffer::putInt64Unchecked(value);
+ correctDeltas(8);
+ }
+
+ int size()
+ {
+ flushIfNoSpaceFor(maxInstructionSize, sizeof(uint64_t));
+ return AssemblerBuffer::size();
+ }
+
+ void* executableCopy(ExecutablePool* allocator)
+ {
+ flushConstantPool(false);
+ return AssemblerBuffer::executableCopy(allocator);
+ }
+
+ void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false)
+ {
+ flushIfNoSpaceFor(4, 4);
+
+ m_loadOffsets.append(AssemblerBuffer::size());
+ if (isReusable)
+ for (int i = 0; i < m_numConsts; ++i) {
+ if (m_mask[i] == ReusableConst && m_pool[i] == constant) {
+ AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, i));
+ correctDeltas(4);
+ return;
+ }
+ }
+
+ m_pool[m_numConsts] = constant;
+ m_mask[m_numConsts] = static_cast<char>(isReusable ? ReusableConst : UniqueConst);
+
+ AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, m_numConsts));
+ ++m_numConsts;
+
+ correctDeltas(4, 4);
+ }
+
+ // This flushing mechanism can be called after any unconditional jumps.
+ void flushWithoutBarrier()
+ {
+ // Flush if constant pool is more than 60% full to avoid overuse of this function.
+ if (5 * m_numConsts > 3 * maxPoolSize / sizeof(uint32_t))
+ flushConstantPool(false);
+ }
+
+ uint32_t* poolAddress()
+ {
+ return m_pool;
+ }
+
+private:
+ void correctDeltas(int insnSize)
+ {
+ m_maxDistance -= insnSize;
+ m_lastConstDelta -= insnSize;
+ if (m_lastConstDelta < 0)
+ m_lastConstDelta = 0;
+ }
+
+ void correctDeltas(int insnSize, int constSize)
+ {
+ correctDeltas(insnSize);
+
+ m_maxDistance -= m_lastConstDelta;
+ m_lastConstDelta = constSize;
+ }
+
+ void flushConstantPool(bool useBarrier = true)
+ {
+ if (m_numConsts == 0)
+ return;
+ int alignPool = (AssemblerBuffer::size() + (useBarrier ? barrierSize : 0)) & (sizeof(uint64_t) - 1);
+
+ if (alignPool)
+ alignPool = sizeof(uint64_t) - alignPool;
+
+ // Callback to protect the constant pool from execution
+ if (useBarrier)
+ AssemblerBuffer::putInt(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool));
+
+ if (alignPool) {
+ if (alignPool & 1)
+ AssemblerBuffer::putByte(AssemblerType::padForAlign8);
+ if (alignPool & 2)
+ AssemblerBuffer::putShort(AssemblerType::padForAlign16);
+ if (alignPool & 4)
+ AssemblerBuffer::putInt(AssemblerType::padForAlign32);
+ }
+
+ int constPoolOffset = AssemblerBuffer::size();
+ append(reinterpret_cast<char*>(m_pool), m_numConsts * sizeof(uint32_t));
+
+ // Patch each PC relative load
+ for (LoadOffsets::Iterator iter = m_loadOffsets.begin(); iter != m_loadOffsets.end(); ++iter) {
+ void* loadAddr = reinterpret_cast<void*>(m_buffer + *iter);
+ AssemblerType::patchConstantPoolLoad(loadAddr, reinterpret_cast<void*>(m_buffer + constPoolOffset));
+ }
+
+ m_loadOffsets.clear();
+ m_numConsts = 0;
+ m_maxDistance = maxPoolSize;
+ }
+
+ void flushIfNoSpaceFor(int nextInsnSize)
+ {
+ if (m_numConsts == 0)
+ return;
+ if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t)))
+ flushConstantPool();
+ }
+
+ void flushIfNoSpaceFor(int nextInsnSize, int nextConstSize)
+ {
+ if (m_numConsts == 0)
+ return;
+ if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t)) ||
+ (m_numConsts + nextConstSize / sizeof(uint32_t) >= maxPoolSize))
+ flushConstantPool();
+ }
+
+ uint32_t* m_pool;
+ char* m_mask;
+ LoadOffsets m_loadOffsets;
+
+ int m_numConsts;
+ int m_maxDistance;
+ int m_lastConstDelta;
+};
+
+} // namespace JSC
+
+#endif // ENABLE(ASSEMBLER)
+
+#endif // AssemblerBufferWithConstantPool_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/LinkBuffer.h b/src/3rdparty/webkit/JavaScriptCore/assembler/LinkBuffer.h
new file mode 100644
index 0000000..6d08117
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/LinkBuffer.h
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef LinkBuffer_h
+#define LinkBuffer_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(ASSEMBLER)
+
+#include <MacroAssembler.h>
+#include <wtf/Noncopyable.h>
+
+namespace JSC {
+
+// LinkBuffer:
+//
+// This class assists in linking code generated by the macro assembler, once code generation
+// has been completed, and the code has been copied to is final location in memory. At this
+// time pointers to labels within the code may be resolved, and relative offsets to external
+// addresses may be fixed.
+//
+// Specifically:
+// * Jump objects may be linked to external targets,
+// * The address of Jump objects may taken, such that it can later be relinked.
+// * The return address of a Call may be acquired.
+// * The address of a Label pointing into the code may be resolved.
+// * The value referenced by a DataLabel may be set.
+//
+class LinkBuffer : public Noncopyable {
+ typedef MacroAssemblerCodeRef CodeRef;
+ typedef MacroAssembler::Label Label;
+ typedef MacroAssembler::Jump Jump;
+ typedef MacroAssembler::JumpList JumpList;
+ typedef MacroAssembler::Call Call;
+ typedef MacroAssembler::DataLabel32 DataLabel32;
+ typedef MacroAssembler::DataLabelPtr DataLabelPtr;
+
+public:
+ // Note: Initialization sequence is significant, since executablePool is a PassRefPtr.
+ // First, executablePool is copied into m_executablePool, then the initialization of
+ // m_code uses m_executablePool, *not* executablePool, since this is no longer valid.
+ LinkBuffer(MacroAssembler* masm, PassRefPtr<ExecutablePool> executablePool)
+ : m_executablePool(executablePool)
+ , m_code(masm->m_assembler.executableCopy(m_executablePool.get()))
+ , m_size(masm->m_assembler.size())
+#ifndef NDEBUG
+ , m_completed(false)
+#endif
+ {
+ }
+
+ ~LinkBuffer()
+ {
+ ASSERT(m_completed);
+ }
+
+ // These methods are used to link or set values at code generation time.
+
+ void link(Call call, FunctionPtr function)
+ {
+ ASSERT(call.isFlagSet(Call::Linkable));
+ MacroAssembler::linkCall(code(), call, function);
+ }
+
+ void link(Jump jump, CodeLocationLabel label)
+ {
+ MacroAssembler::linkJump(code(), jump, label);
+ }
+
+ void link(JumpList list, CodeLocationLabel label)
+ {
+ for (unsigned i = 0; i < list.m_jumps.size(); ++i)
+ MacroAssembler::linkJump(code(), list.m_jumps[i], label);
+ }
+
+ void patch(DataLabelPtr label, void* value)
+ {
+ MacroAssembler::linkPointer(code(), label.m_label, value);
+ }
+
+ void patch(DataLabelPtr label, CodeLocationLabel value)
+ {
+ MacroAssembler::linkPointer(code(), label.m_label, value.executableAddress());
+ }
+
+ // These methods are used to obtain handles to allow the code to be relinked / repatched later.
+
+ CodeLocationCall locationOf(Call call)
+ {
+ ASSERT(call.isFlagSet(Call::Linkable));
+ ASSERT(!call.isFlagSet(Call::Near));
+ return CodeLocationCall(MacroAssembler::getLinkerAddress(code(), call.m_jmp));
+ }
+
+ CodeLocationNearCall locationOfNearCall(Call call)
+ {
+ ASSERT(call.isFlagSet(Call::Linkable));
+ ASSERT(call.isFlagSet(Call::Near));
+ return CodeLocationNearCall(MacroAssembler::getLinkerAddress(code(), call.m_jmp));
+ }
+
+ CodeLocationLabel locationOf(Label label)
+ {
+ return CodeLocationLabel(MacroAssembler::getLinkerAddress(code(), label.m_label));
+ }
+
+ CodeLocationDataLabelPtr locationOf(DataLabelPtr label)
+ {
+ return CodeLocationDataLabelPtr(MacroAssembler::getLinkerAddress(code(), label.m_label));
+ }
+
+ CodeLocationDataLabel32 locationOf(DataLabel32 label)
+ {
+ return CodeLocationDataLabel32(MacroAssembler::getLinkerAddress(code(), label.m_label));
+ }
+
+ // This method obtains the return address of the call, given as an offset from
+ // the start of the code.
+ unsigned returnAddressOffset(Call call)
+ {
+ return MacroAssembler::getLinkerCallReturnOffset(call);
+ }
+
+ // Upon completion of all patching either 'finalizeCode()' or 'finalizeCodeAddendum()' should be called
+ // once to complete generation of the code. 'finalizeCode()' is suited to situations
+ // where the executable pool must also be retained, the lighter-weight 'finalizeCodeAddendum()' is
+ // suited to adding to an existing allocation.
+ CodeRef finalizeCode()
+ {
+ performFinalization();
+
+ return CodeRef(m_code, m_executablePool, m_size);
+ }
+ CodeLocationLabel finalizeCodeAddendum()
+ {
+ performFinalization();
+
+ return CodeLocationLabel(code());
+ }
+
+private:
+ // Keep this private! - the underlying code should only be obtained externally via
+ // finalizeCode() or finalizeCodeAddendum().
+ void* code()
+ {
+ return m_code;
+ }
+
+ void performFinalization()
+ {
+#ifndef NDEBUG
+ ASSERT(!m_completed);
+ m_completed = true;
+#endif
+
+ ExecutableAllocator::makeExecutable(code(), m_size);
+ ExecutableAllocator::cacheFlush(code(), m_size);
+ }
+
+ RefPtr<ExecutablePool> m_executablePool;
+ void* m_code;
+ size_t m_size;
+#ifndef NDEBUG
+ bool m_completed;
+#endif
+};
+
+} // namespace JSC
+
+#endif // ENABLE(ASSEMBLER)
+
+#endif // LinkBuffer_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h
index 43d27e7..9e1c5d3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h
@@ -34,6 +34,10 @@
#include "MacroAssemblerARMv7.h"
namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; };
+#elif PLATFORM(ARM)
+#include "MacroAssemblerARM.h"
+namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; };
+
#elif PLATFORM(X86)
#include "MacroAssemblerX86.h"
namespace JSC { typedef MacroAssemblerX86 MacroAssemblerBase; };
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h
new file mode 100644
index 0000000..27879a9
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h
@@ -0,0 +1,797 @@
+/*
+ * Copyright (C) 2008 Apple Inc.
+ * Copyright (C) 2009 University of Szeged
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MacroAssemblerARM_h
+#define MacroAssemblerARM_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(ASSEMBLER) && PLATFORM(ARM)
+
+#include "ARMAssembler.h"
+#include "AbstractMacroAssembler.h"
+
+namespace JSC {
+
+class MacroAssemblerARM : public AbstractMacroAssembler<ARMAssembler> {
+public:
+ enum Condition {
+ Equal = ARMAssembler::EQ,
+ NotEqual = ARMAssembler::NE,
+ Above = ARMAssembler::HI,
+ AboveOrEqual = ARMAssembler::CS,
+ Below = ARMAssembler::CC,
+ BelowOrEqual = ARMAssembler::LS,
+ GreaterThan = ARMAssembler::GT,
+ GreaterThanOrEqual = ARMAssembler::GE,
+ LessThan = ARMAssembler::LT,
+ LessThanOrEqual = ARMAssembler::LE,
+ Overflow = ARMAssembler::VS,
+ Signed = ARMAssembler::MI,
+ Zero = ARMAssembler::EQ,
+ NonZero = ARMAssembler::NE
+ };
+
+ enum DoubleCondition {
+ DoubleEqual, //FIXME
+ DoubleNotEqual, //FIXME
+ DoubleGreaterThan, //FIXME
+ DoubleGreaterThanOrEqual, //FIXME
+ DoubleLessThan, //FIXME
+ DoubleLessThanOrEqual, //FIXME
+ };
+
+ static const RegisterID stackPointerRegister = ARM::sp;
+
+ static const Scale ScalePtr = TimesFour;
+
+ void add32(RegisterID src, RegisterID dest)
+ {
+ m_assembler.adds_r(dest, dest, src);
+ }
+
+ void add32(Imm32 imm, Address address)
+ {
+ load32(address, ARM::S1);
+ add32(imm, ARM::S1);
+ store32(ARM::S1, address);
+ }
+
+ void add32(Imm32 imm, RegisterID dest)
+ {
+ m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0));
+ }
+
+ void add32(Address src, RegisterID dest)
+ {
+ load32(src, ARM::S1);
+ add32(ARM::S1, dest);
+ }
+
+ void and32(RegisterID src, RegisterID dest)
+ {
+ m_assembler.ands_r(dest, dest, src);
+ }
+
+ void and32(Imm32 imm, RegisterID dest)
+ {
+ ARMWord w = m_assembler.getImm(imm.m_value, ARM::S0, true);
+ if (w & ARMAssembler::OP2_INV_IMM)
+ m_assembler.bics_r(dest, dest, w & ~ARMAssembler::OP2_INV_IMM);
+ else
+ m_assembler.ands_r(dest, dest, w);
+ }
+
+ void lshift32(Imm32 imm, RegisterID dest)
+ {
+ m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f));
+ }
+
+ void lshift32(RegisterID shift_amount, RegisterID dest)
+ {
+ m_assembler.movs_r(dest, m_assembler.lsl_r(dest, shift_amount));
+ }
+
+ void mul32(RegisterID src, RegisterID dest)
+ {
+ if (src == dest) {
+ move(src, ARM::S0);
+ src = ARM::S0;
+ }
+ m_assembler.muls_r(dest, dest, src);
+ }
+
+ void mul32(Imm32 imm, RegisterID src, RegisterID dest)
+ {
+ move(imm, ARM::S0);
+ m_assembler.muls_r(dest, src, ARM::S0);
+ }
+
+ void not32(RegisterID dest)
+ {
+ m_assembler.mvns_r(dest, dest);
+ }
+
+ void or32(RegisterID src, RegisterID dest)
+ {
+ m_assembler.orrs_r(dest, dest, src);
+ }
+
+ void or32(Imm32 imm, RegisterID dest)
+ {
+ m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0));
+ }
+
+ void rshift32(RegisterID shift_amount, RegisterID dest)
+ {
+ m_assembler.movs_r(dest, m_assembler.asr_r(dest, shift_amount));
+ }
+
+ void rshift32(Imm32 imm, RegisterID dest)
+ {
+ m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f));
+ }
+
+ void sub32(RegisterID src, RegisterID dest)
+ {
+ m_assembler.subs_r(dest, dest, src);
+ }
+
+ void sub32(Imm32 imm, RegisterID dest)
+ {
+ m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0));
+ }
+
+ void sub32(Imm32 imm, Address address)
+ {
+ load32(address, ARM::S1);
+ sub32(imm, ARM::S1);
+ store32(ARM::S1, address);
+ }
+
+ void sub32(Address src, RegisterID dest)
+ {
+ load32(src, ARM::S1);
+ sub32(ARM::S1, dest);
+ }
+
+ void xor32(RegisterID src, RegisterID dest)
+ {
+ m_assembler.eors_r(dest, dest, src);
+ }
+
+ void xor32(Imm32 imm, RegisterID dest)
+ {
+ m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0));
+ }
+
+ void load32(ImplicitAddress address, RegisterID dest)
+ {
+ m_assembler.dataTransfer32(true, dest, address.base, address.offset);
+ }
+
+ void load32(BaseIndex address, RegisterID dest)
+ {
+ m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast<int>(address.scale), address.offset);
+ }
+
+ DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest)
+ {
+ DataLabel32 dataLabel(this);
+ m_assembler.ldr_un_imm(ARM::S0, 0);
+ m_assembler.dtr_ur(true, dest, address.base, ARM::S0);
+ return dataLabel;
+ }
+
+ Label loadPtrWithPatchToLEA(Address address, RegisterID dest)
+ {
+ Label label(this);
+ load32(address, dest);
+ return label;
+ }
+
+ void load16(BaseIndex address, RegisterID dest)
+ {
+ m_assembler.add_r(ARM::S0, address.base, m_assembler.lsl(address.index, address.scale));
+ if (address.offset>=0)
+ m_assembler.ldrh_u(dest, ARM::S0, ARMAssembler::getOp2Byte(address.offset));
+ else
+ m_assembler.ldrh_d(dest, ARM::S0, ARMAssembler::getOp2Byte(-address.offset));
+ }
+
+ DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address)
+ {
+ DataLabel32 dataLabel(this);
+ m_assembler.ldr_un_imm(ARM::S0, 0);
+ m_assembler.dtr_ur(false, src, address.base, ARM::S0);
+ return dataLabel;
+ }
+
+ void store32(RegisterID src, ImplicitAddress address)
+ {
+ m_assembler.dataTransfer32(false, src, address.base, address.offset);
+ }
+
+ void store32(RegisterID src, BaseIndex address)
+ {
+ m_assembler.baseIndexTransfer32(false, src, address.base, address.index, static_cast<int>(address.scale), address.offset);
+ }
+
+ void store32(Imm32 imm, ImplicitAddress address)
+ {
+ move(imm, ARM::S1);
+ store32(ARM::S1, address);
+ }
+
+ void store32(RegisterID src, void* address)
+ {
+ m_assembler.moveImm(reinterpret_cast<ARMWord>(address), ARM::S0);
+ m_assembler.dtr_u(false, src, ARM::S0, 0);
+ }
+
+ void store32(Imm32 imm, void* address)
+ {
+ m_assembler.moveImm(reinterpret_cast<ARMWord>(address), ARM::S0);
+ m_assembler.moveImm(imm.m_value, ARM::S1);
+ m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0);
+ }
+
+ void pop(RegisterID dest)
+ {
+ m_assembler.pop_r(dest);
+ }
+
+ void push(RegisterID src)
+ {
+ m_assembler.push_r(src);
+ }
+
+ void push(Address address)
+ {
+ load32(address, ARM::S1);
+ push(ARM::S1);
+ }
+
+ void push(Imm32 imm)
+ {
+ move(imm, ARM::S0);
+ push(ARM::S0);
+ }
+
+ void move(Imm32 imm, RegisterID dest)
+ {
+ m_assembler.moveImm(imm.m_value, dest);
+ }
+
+ void move(RegisterID src, RegisterID dest)
+ {
+ m_assembler.mov_r(dest, src);
+ }
+
+ void move(ImmPtr imm, RegisterID dest)
+ {
+ m_assembler.mov_r(dest, m_assembler.getImm(reinterpret_cast<ARMWord>(imm.m_value), ARM::S0));
+ }
+
+ void swap(RegisterID reg1, RegisterID reg2)
+ {
+ m_assembler.mov_r(ARM::S0, reg1);
+ m_assembler.mov_r(reg1, reg2);
+ m_assembler.mov_r(reg2, ARM::S0);
+ }
+
+ void signExtend32ToPtr(RegisterID src, RegisterID dest)
+ {
+ if (src != dest)
+ move(src, dest);
+ }
+
+ void zeroExtend32ToPtr(RegisterID src, RegisterID dest)
+ {
+ if (src != dest)
+ move(src, dest);
+ }
+
+ Jump branch32(Condition cond, RegisterID left, RegisterID right)
+ {
+ m_assembler.cmp_r(left, right);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branch32(Condition cond, RegisterID left, Imm32 right)
+ {
+ m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARM::S0));
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branch32(Condition cond, RegisterID left, Address right)
+ {
+ load32(right, ARM::S1);
+ return branch32(cond, left, ARM::S1);
+ }
+
+ Jump branch32(Condition cond, Address left, RegisterID right)
+ {
+ load32(left, ARM::S1);
+ return branch32(cond, ARM::S1, right);
+ }
+
+ Jump branch32(Condition cond, Address left, Imm32 right)
+ {
+ load32(left, ARM::S1);
+ return branch32(cond, ARM::S1, right);
+ }
+
+ Jump branch32(Condition cond, BaseIndex left, Imm32 right)
+ {
+ load32(left, ARM::S1);
+ return branch32(cond, ARM::S1, right);
+ }
+
+ Jump branch16(Condition cond, BaseIndex left, RegisterID right)
+ {
+ UNUSED_PARAM(cond);
+ UNUSED_PARAM(left);
+ UNUSED_PARAM(right);
+ ASSERT_NOT_REACHED();
+ return jump();
+ }
+
+ Jump branch16(Condition cond, BaseIndex left, Imm32 right)
+ {
+ load16(left, ARM::S0);
+ move(right, ARM::S1);
+ m_assembler.cmp_r(ARM::S0, ARM::S1);
+ return m_assembler.jmp(ARMCondition(cond));
+ }
+
+ Jump branchTest32(Condition cond, RegisterID reg, RegisterID mask)
+ {
+ ASSERT((cond == Zero) || (cond == NonZero));
+ m_assembler.tst_r(reg, mask);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1))
+ {
+ ASSERT((cond == Zero) || (cond == NonZero));
+ ARMWord w = m_assembler.getImm(mask.m_value, ARM::S0, true);
+ if (w & ARMAssembler::OP2_INV_IMM)
+ m_assembler.bics_r(ARM::S0, reg, w & ~ARMAssembler::OP2_INV_IMM);
+ else
+ m_assembler.tst_r(reg, w);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1))
+ {
+ load32(address, ARM::S1);
+ return branchTest32(cond, ARM::S1, mask);
+ }
+
+ Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1))
+ {
+ load32(address, ARM::S1);
+ return branchTest32(cond, ARM::S1, mask);
+ }
+
+ Jump jump()
+ {
+ return Jump(m_assembler.jmp());
+ }
+
+ void jump(RegisterID target)
+ {
+ move(target, ARM::pc);
+ }
+
+ void jump(Address address)
+ {
+ load32(address, ARM::pc);
+ }
+
+ Jump branchAdd32(Condition cond, RegisterID src, RegisterID dest)
+ {
+ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero));
+ add32(src, dest);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest)
+ {
+ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero));
+ add32(imm, dest);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ void mull32(RegisterID src1, RegisterID src2, RegisterID dest)
+ {
+ if (src1 == dest) {
+ move(src1, ARM::S0);
+ src1 = ARM::S0;
+ }
+ m_assembler.mull_r(ARM::S1, dest, src2, src1);
+ m_assembler.cmp_r(ARM::S1, m_assembler.asr(dest, 31));
+ }
+
+ Jump branchMul32(Condition cond, RegisterID src, RegisterID dest)
+ {
+ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero));
+ if (cond == Overflow) {
+ mull32(src, dest, dest);
+ cond = NonZero;
+ }
+ else
+ mul32(src, dest);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest)
+ {
+ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero));
+ if (cond == Overflow) {
+ move(imm, ARM::S0);
+ mull32(ARM::S0, src, dest);
+ cond = NonZero;
+ }
+ else
+ mul32(imm, src, dest);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branchSub32(Condition cond, RegisterID src, RegisterID dest)
+ {
+ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero));
+ sub32(src, dest);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest)
+ {
+ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero));
+ sub32(imm, dest);
+ return Jump(m_assembler.jmp(ARMCondition(cond)));
+ }
+
+ void breakpoint()
+ {
+ m_assembler.bkpt(0);
+ }
+
+ Call nearCall()
+ {
+ prepareCall();
+ return Call(m_assembler.jmp(), Call::LinkableNear);
+ }
+
+ Call call(RegisterID target)
+ {
+ prepareCall();
+ move(ARM::pc, target);
+ JmpSrc jmpSrc;
+ return Call(jmpSrc, Call::None);
+ }
+
+ void call(Address address)
+ {
+ call32(address.base, address.offset);
+ }
+
+ void ret()
+ {
+ pop(ARM::pc);
+ }
+
+ void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest)
+ {
+ m_assembler.cmp_r(left, right);
+ m_assembler.mov_r(dest, ARMAssembler::getOp2(0));
+ m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond));
+ }
+
+ void set32(Condition cond, RegisterID left, Imm32 right, RegisterID dest)
+ {
+ m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARM::S0));
+ m_assembler.mov_r(dest, ARMAssembler::getOp2(0));
+ m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond));
+ }
+
+ void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest)
+ {
+ load32(address, ARM::S1);
+ if (mask.m_value == -1)
+ m_assembler.cmp_r(0, ARM::S1);
+ else
+ m_assembler.tst_r(ARM::S1, m_assembler.getImm(mask.m_value, ARM::S0));
+ m_assembler.mov_r(dest, ARMAssembler::getOp2(0));
+ m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond));
+ }
+
+ void add32(Imm32 imm, RegisterID src, RegisterID dest)
+ {
+ m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARM::S0));
+ }
+
+ void add32(Imm32 imm, AbsoluteAddress address)
+ {
+ m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S1);
+ m_assembler.dtr_u(true, ARM::S1, ARM::S1, 0);
+ add32(imm, ARM::S1);
+ m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S0);
+ m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0);
+ }
+
+ void sub32(Imm32 imm, AbsoluteAddress address)
+ {
+ m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S1);
+ m_assembler.dtr_u(true, ARM::S1, ARM::S1, 0);
+ sub32(imm, ARM::S1);
+ m_assembler.moveImm(reinterpret_cast<ARMWord>(address.m_ptr), ARM::S0);
+ m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0);
+ }
+
+ void load32(void* address, RegisterID dest)
+ {
+ m_assembler.moveImm(reinterpret_cast<ARMWord>(address), ARM::S0);
+ m_assembler.dtr_u(true, dest, ARM::S0, 0);
+ }
+
+ Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right)
+ {
+ load32(left.m_ptr, ARM::S1);
+ return branch32(cond, ARM::S1, right);
+ }
+
+ Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right)
+ {
+ load32(left.m_ptr, ARM::S1);
+ return branch32(cond, ARM::S1, right);
+ }
+
+ Call call()
+ {
+ prepareCall();
+ return Call(m_assembler.jmp(), Call::Linkable);
+ }
+
+ Call tailRecursiveCall()
+ {
+ return Call::fromTailJump(jump());
+ }
+
+ Call makeTailRecursiveCall(Jump oldJump)
+ {
+ return Call::fromTailJump(oldJump);
+ }
+
+ DataLabelPtr moveWithPatch(ImmPtr initialValue, RegisterID dest)
+ {
+ DataLabelPtr dataLabel(this);
+ m_assembler.ldr_un_imm(dest, reinterpret_cast<ARMWord>(initialValue.m_value));
+ return dataLabel;
+ }
+
+ Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0))
+ {
+ dataLabel = moveWithPatch(initialRightValue, ARM::S1);
+ Jump jump = branch32(cond, left, ARM::S1);
+ jump.enableLatePatch();
+ return jump;
+ }
+
+ Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0))
+ {
+ load32(left, ARM::S1);
+ dataLabel = moveWithPatch(initialRightValue, ARM::S0);
+ Jump jump = branch32(cond, ARM::S0, ARM::S1);
+ jump.enableLatePatch();
+ return jump;
+ }
+
+ DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address)
+ {
+ DataLabelPtr dataLabel = moveWithPatch(initialValue, ARM::S1);
+ store32(ARM::S1, address);
+ return dataLabel;
+ }
+
+ DataLabelPtr storePtrWithPatch(ImplicitAddress address)
+ {
+ return storePtrWithPatch(ImmPtr(0), address);
+ }
+
+ // Floating point operators
+ bool supportsFloatingPoint() const
+ {
+ return false;
+ }
+
+ bool supportsFloatingPointTruncate() const
+ {
+ return false;
+ }
+
+ void loadDouble(ImplicitAddress address, FPRegisterID dest)
+ {
+ UNUSED_PARAM(address);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ void storeDouble(FPRegisterID src, ImplicitAddress address)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(address);
+ ASSERT_NOT_REACHED();
+ }
+
+ void addDouble(FPRegisterID src, FPRegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ void addDouble(Address src, FPRegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ void subDouble(FPRegisterID src, FPRegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ void subDouble(Address src, FPRegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ void mulDouble(FPRegisterID src, FPRegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ void mulDouble(Address src, FPRegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ void convertInt32ToDouble(RegisterID src, FPRegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ }
+
+ Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right)
+ {
+ UNUSED_PARAM(cond);
+ UNUSED_PARAM(left);
+ UNUSED_PARAM(right);
+ ASSERT_NOT_REACHED();
+ return jump();
+ }
+
+ // Truncates 'src' to an integer, and places the resulting 'dest'.
+ // If the result is not representable as a 32 bit value, branch.
+ // May also branch for some values that are representable in 32 bits
+ // (specifically, in this case, INT_MIN).
+ Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest)
+ {
+ UNUSED_PARAM(src);
+ UNUSED_PARAM(dest);
+ ASSERT_NOT_REACHED();
+ return jump();
+ }
+
+protected:
+ ARMAssembler::Condition ARMCondition(Condition cond)
+ {
+ return static_cast<ARMAssembler::Condition>(cond);
+ }
+
+ void prepareCall()
+ {
+ m_assembler.ensureSpace(3 * sizeof(ARMWord), sizeof(ARMWord));
+
+ // S0 might be used for parameter passing
+ m_assembler.add_r(ARM::S1, ARM::pc, ARMAssembler::OP2_IMM | 0x4);
+ m_assembler.push_r(ARM::S1);
+ }
+
+ void call32(RegisterID base, int32_t offset)
+ {
+ if (base == ARM::sp)
+ offset += 4;
+
+ if (offset >= 0) {
+ if (offset <= 0xfff) {
+ prepareCall();
+ m_assembler.dtr_u(true, ARM::pc, base, offset);
+ } else if (offset <= 0xfffff) {
+ m_assembler.add_r(ARM::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8));
+ prepareCall();
+ m_assembler.dtr_u(true, ARM::pc, ARM::S0, offset & 0xfff);
+ } else {
+ ARMWord reg = m_assembler.getImm(offset, ARM::S0);
+ prepareCall();
+ m_assembler.dtr_ur(true, ARM::pc, base, reg);
+ }
+ } else {
+ offset = -offset;
+ if (offset <= 0xfff) {
+ prepareCall();
+ m_assembler.dtr_d(true, ARM::pc, base, offset);
+ } else if (offset <= 0xfffff) {
+ m_assembler.sub_r(ARM::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8));
+ prepareCall();
+ m_assembler.dtr_d(true, ARM::pc, ARM::S0, offset & 0xfff);
+ } else {
+ ARMWord reg = m_assembler.getImm(offset, ARM::S0);
+ prepareCall();
+ m_assembler.dtr_dr(true, ARM::pc, base, reg);
+ }
+ }
+ }
+
+private:
+ friend class LinkBuffer;
+ friend class RepatchBuffer;
+
+ static void linkCall(void* code, Call call, FunctionPtr function)
+ {
+ ARMAssembler::linkCall(code, call.m_jmp, function.value());
+ }
+
+ static void repatchCall(CodeLocationCall call, CodeLocationLabel destination)
+ {
+ ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress());
+ }
+
+ static void repatchCall(CodeLocationCall call, FunctionPtr destination)
+ {
+ ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress());
+ }
+
+};
+
+}
+
+#endif
+
+#endif // MacroAssemblerARM_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h
index bd83c60..f7a8402 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h
@@ -1054,6 +1054,25 @@ protected:
{
return static_cast<ARMv7Assembler::Condition>(cond);
}
+
+private:
+ friend class LinkBuffer;
+ friend class RepatchBuffer;
+
+ static void linkCall(void* code, Call call, FunctionPtr function)
+ {
+ ARMv7Assembler::linkCall(code, call.m_jmp, function.value());
+ }
+
+ static void repatchCall(CodeLocationCall call, CodeLocationLabel destination)
+ {
+ ARMv7Assembler::relinkCall(call.dataLocation(), destination.executableAddress());
+ }
+
+ static void repatchCall(CodeLocationCall call, FunctionPtr destination)
+ {
+ ARMv7Assembler::relinkCall(call.dataLocation(), destination.executableAddress());
+ }
};
} // namespace JSC
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
index 50fca5b..341a7ff 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
@@ -165,28 +165,20 @@ private:
class MacroAssemblerCodeRef {
public:
MacroAssemblerCodeRef()
-#ifndef NDEBUG
: m_size(0)
-#endif
{
}
MacroAssemblerCodeRef(void* code, PassRefPtr<ExecutablePool> executablePool, size_t size)
: m_code(code)
, m_executablePool(executablePool)
+ , m_size(size)
{
-#ifndef NDEBUG
- m_size = size;
-#else
- UNUSED_PARAM(size);
-#endif
}
MacroAssemblerCodePtr m_code;
RefPtr<ExecutablePool> m_executablePool;
-#ifndef NDEBUG
size_t m_size;
-#endif
};
} // namespace JSC
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h
index aaf98fd..0b9ff35 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h
@@ -164,6 +164,24 @@ public:
private:
const bool m_isSSE2Present;
+
+ friend class LinkBuffer;
+ friend class RepatchBuffer;
+
+ static void linkCall(void* code, Call call, FunctionPtr function)
+ {
+ X86Assembler::linkCall(code, call.m_jmp, function.value());
+ }
+
+ static void repatchCall(CodeLocationCall call, CodeLocationLabel destination)
+ {
+ X86Assembler::relinkCall(call.dataLocation(), destination.executableAddress());
+ }
+
+ static void repatchCall(CodeLocationCall call, FunctionPtr destination)
+ {
+ X86Assembler::relinkCall(call.dataLocation(), destination.executableAddress());
+ }
};
} // namespace JSC
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h
index ffdca7c..df0090a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h
@@ -32,6 +32,8 @@
#include "MacroAssemblerX86Common.h"
+#define REPTACH_OFFSET_CALL_R11 3
+
namespace JSC {
class MacroAssemblerX86_64 : public MacroAssemblerX86Common {
@@ -446,6 +448,29 @@ public:
bool supportsFloatingPoint() const { return true; }
// See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
bool supportsFloatingPointTruncate() const { return true; }
+
+private:
+ friend class LinkBuffer;
+ friend class RepatchBuffer;
+
+ static void linkCall(void* code, Call call, FunctionPtr function)
+ {
+ if (!call.isFlagSet(Call::Near))
+ X86Assembler::linkPointer(code, X86Assembler::labelFor(call.m_jmp, -REPTACH_OFFSET_CALL_R11), function.value());
+ else
+ X86Assembler::linkCall(code, call.m_jmp, function.value());
+ }
+
+ static void repatchCall(CodeLocationCall call, CodeLocationLabel destination)
+ {
+ X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());
+ }
+
+ static void repatchCall(CodeLocationCall call, FunctionPtr destination)
+ {
+ X86Assembler::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());
+ }
+
};
} // namespace JSC
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/RepatchBuffer.h b/src/3rdparty/webkit/JavaScriptCore/assembler/RepatchBuffer.h
new file mode 100644
index 0000000..89cbf06
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/RepatchBuffer.h
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RepatchBuffer_h
+#define RepatchBuffer_h
+
+#include <wtf/Platform.h>
+
+#if ENABLE(ASSEMBLER)
+
+#include <MacroAssembler.h>
+#include <wtf/Noncopyable.h>
+
+namespace JSC {
+
+// RepatchBuffer:
+//
+// This class is used to modify code after code generation has been completed,
+// and after the code has potentially already been executed. This mechanism is
+// used to apply optimizations to the code.
+//
+class RepatchBuffer {
+ typedef MacroAssemblerCodePtr CodePtr;
+
+public:
+ RepatchBuffer(CodeBlock* codeBlock)
+ {
+ JITCode& code = codeBlock->getJITCode();
+ m_start = code.start();
+ m_size = code.size();
+
+ ExecutableAllocator::makeWritable(m_start, m_size);
+ }
+
+ ~RepatchBuffer()
+ {
+ ExecutableAllocator::makeExecutable(m_start, m_size);
+ }
+
+ void relink(CodeLocationJump jump, CodeLocationLabel destination)
+ {
+ MacroAssembler::repatchJump(jump, destination);
+ }
+
+ void relink(CodeLocationCall call, CodeLocationLabel destination)
+ {
+ MacroAssembler::repatchCall(call, destination);
+ }
+
+ void relink(CodeLocationCall call, FunctionPtr destination)
+ {
+ MacroAssembler::repatchCall(call, destination);
+ }
+
+ void relink(CodeLocationNearCall nearCall, CodePtr destination)
+ {
+ MacroAssembler::repatchNearCall(nearCall, CodeLocationLabel(destination));
+ }
+
+ void relink(CodeLocationNearCall nearCall, CodeLocationLabel destination)
+ {
+ MacroAssembler::repatchNearCall(nearCall, destination);
+ }
+
+ void repatch(CodeLocationDataLabel32 dataLabel32, int32_t value)
+ {
+ MacroAssembler::repatchInt32(dataLabel32, value);
+ }
+
+ void repatch(CodeLocationDataLabelPtr dataLabelPtr, void* value)
+ {
+ MacroAssembler::repatchPointer(dataLabelPtr, value);
+ }
+
+ void repatchLoadPtrToLEA(CodeLocationInstruction instruction)
+ {
+ MacroAssembler::repatchLoadPtrToLEA(instruction);
+ }
+
+ void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label)
+ {
+ relink(CodeLocationCall(CodePtr(returnAddress)), label);
+ }
+
+ void relinkCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction)
+ {
+ relinkCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction));
+ }
+
+ void relinkCallerToFunction(ReturnAddressPtr returnAddress, FunctionPtr function)
+ {
+ relink(CodeLocationCall(CodePtr(returnAddress)), function);
+ }
+
+ void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodeLocationLabel label)
+ {
+ relink(CodeLocationNearCall(CodePtr(returnAddress)), label);
+ }
+
+ void relinkNearCallerToTrampoline(ReturnAddressPtr returnAddress, CodePtr newCalleeFunction)
+ {
+ relinkNearCallerToTrampoline(returnAddress, CodeLocationLabel(newCalleeFunction));
+ }
+
+private:
+ void* m_start;
+ size_t m_size;
+};
+
+} // namespace JSC
+
+#endif // ENABLE(ASSEMBLER)
+
+#endif // RepatchBuffer_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h
index 7a8b58d..745bc60 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h
@@ -226,6 +226,7 @@ public:
{
}
+ void enableLatePatch() { }
private:
JmpSrc(int offset)
: m_offset(offset)
@@ -1344,6 +1345,11 @@ public:
return JmpDst(m_formatter.size());
}
+ static JmpDst labelFor(JmpSrc jump, intptr_t offset = 0)
+ {
+ return JmpDst(jump.m_offset + offset);
+ }
+
JmpDst align(int alignment)
{
while (!m_formatter.isAligned(alignment))
@@ -1366,59 +1372,48 @@ public:
ASSERT(to.m_offset != -1);
char* code = reinterpret_cast<char*>(m_formatter.data());
- patchRel32(code + from.m_offset, code + to.m_offset);
+ setRel32(code + from.m_offset, code + to.m_offset);
}
static void linkJump(void* code, JmpSrc from, void* to)
{
ASSERT(from.m_offset != -1);
- patchRel32(reinterpret_cast<char*>(code) + from.m_offset, to);
+ setRel32(reinterpret_cast<char*>(code) + from.m_offset, to);
}
static void linkCall(void* code, JmpSrc from, void* to)
{
ASSERT(from.m_offset != -1);
- patchRel32(reinterpret_cast<char*>(code) + from.m_offset, to);
+ setRel32(reinterpret_cast<char*>(code) + from.m_offset, to);
}
-#if PLATFORM(X86_64)
- static void patchPointerForCall(void* where, void* value)
- {
- reinterpret_cast<void**>(where)[-1] = value;
- }
-#endif
-
- static void patchPointer(void* code, JmpDst where, void* value)
+ static void linkPointer(void* code, JmpDst where, void* value)
{
ASSERT(where.m_offset != -1);
- patchPointer(reinterpret_cast<char*>(code) + where.m_offset, value);
+ setPointer(reinterpret_cast<char*>(code) + where.m_offset, value);
}
static void relinkJump(void* from, void* to)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(from) - sizeof(int32_t), sizeof(int32_t));
- patchRel32(from, to);
+ setRel32(from, to);
}
static void relinkCall(void* from, void* to)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(from) - sizeof(int32_t), sizeof(int32_t));
- patchRel32(from, to);
+ setRel32(from, to);
}
static void repatchInt32(void* where, int32_t value)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(where) - sizeof(int32_t), sizeof(int32_t));
- patchInt32(where, value);
+ setInt32(where, value);
}
static void repatchPointer(void* where, void* value)
{
- ExecutableAllocator::MakeWritable unprotect(reinterpret_cast<char*>(where) - sizeof(void*), sizeof(void*));
- patchPointer(where, value);
+ setPointer(where, value);
}
static void repatchLoadPtrToLEA(void* where)
@@ -1428,7 +1423,6 @@ public:
// Skip over the prefix byte.
where = reinterpret_cast<char*>(where) + 1;
#endif
- ExecutableAllocator::MakeWritable unprotect(where, 1);
*reinterpret_cast<unsigned char*>(where) = static_cast<unsigned char>(OP_LEA);
}
@@ -1476,22 +1470,22 @@ public:
private:
- static void patchPointer(void* where, void* value)
+ static void setPointer(void* where, void* value)
{
reinterpret_cast<void**>(where)[-1] = value;
}
- static void patchInt32(void* where, int32_t value)
+ static void setInt32(void* where, int32_t value)
{
reinterpret_cast<int32_t*>(where)[-1] = value;
}
- static void patchRel32(void* from, void* to)
+ static void setRel32(void* from, void* to)
{
intptr_t offset = reinterpret_cast<intptr_t>(to) - reinterpret_cast<intptr_t>(from);
ASSERT(offset == static_cast<int32_t>(offset));
- patchInt32(from, offset);
+ setInt32(from, offset);
}
class X86InstructionFormatter {
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp
index 5dae952..0cb3813 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -1319,8 +1319,12 @@ CodeBlock::~CodeBlock()
}
for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) {
- if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure)
+ if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) {
structure->deref();
+ // Both members must be filled at the same time
+ ASSERT(m_methodCallLinkInfos[i].cachedPrototypeStructure);
+ m_methodCallLinkInfos[i].cachedPrototypeStructure->deref();
+ }
}
unlinkCallers();
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h
index 64b6c98..e9f2697 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h
@@ -105,6 +105,7 @@ namespace JSC {
CodeLocationNearCall callReturnLocation;
CodeLocationDataLabelPtr hotPathBegin;
CodeLocationNearCall hotPathOther;
+ CodeBlock* ownerCodeBlock;
CodeBlock* callee;
unsigned position;
@@ -115,12 +116,14 @@ namespace JSC {
struct MethodCallLinkInfo {
MethodCallLinkInfo()
: cachedStructure(0)
+ , cachedPrototypeStructure(0)
{
}
CodeLocationCall callReturnLocation;
CodeLocationDataLabelPtr structureLabel;
Structure* cachedStructure;
+ Structure* cachedPrototypeStructure;
};
struct FunctionRegisterInfo {
@@ -221,7 +224,7 @@ namespace JSC {
}
#endif
- class CodeBlock : public WTF::FastAllocBase {
+ class CodeBlock : public FastAllocBase {
friend class JIT;
public:
CodeBlock(ScopeNode* ownerNode);
@@ -317,6 +320,7 @@ namespace JSC {
#endif
#if ENABLE(JIT)
+ JITCode& getJITCode() { return ownerNode()->generatedJITCode(); }
void setJITCode(JITCode);
ExecutablePool* executablePool() { return ownerNode()->getExecutablePool(); }
#endif
@@ -493,7 +497,7 @@ namespace JSC {
SymbolTable m_symbolTable;
- struct ExceptionInfo {
+ struct ExceptionInfo : FastAllocBase {
Vector<ExpressionRangeInfo> m_expressionInfo;
Vector<LineInfo> m_lineInfo;
Vector<GetByIdExceptionInfo> m_getByIdExceptionInfo;
@@ -504,7 +508,7 @@ namespace JSC {
};
OwnPtr<ExceptionInfo> m_exceptionInfo;
- struct RareData {
+ struct RareData : FastAllocBase {
Vector<HandlerInfo> m_exceptionHandlers;
// Rare Constants
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
index 27b016e..2d1ca98 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h
@@ -181,7 +181,7 @@ namespace JSC {
#define OPCODE_ID_LENGTHS(id, length) const int id##_length = length;
FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS);
- #undef OPCODE_ID_SIZES
+ #undef OPCODE_ID_LENGTHS
#define OPCODE_LENGTH(opcode) opcode##_length
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h
index 7d7dc9c..fa95603 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h
@@ -140,7 +140,7 @@ namespace JSC {
friend class HostCallRecord;
#if ENABLE(OPCODE_SAMPLING)
- class CallRecord : Noncopyable {
+ class CallRecord : public Noncopyable {
public:
CallRecord(SamplingTool* samplingTool)
: m_samplingTool(samplingTool)
@@ -170,7 +170,7 @@ namespace JSC {
}
};
#else
- class CallRecord : Noncopyable {
+ class CallRecord : public Noncopyable {
public:
CallRecord(SamplingTool*)
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h
index 0223c2a..3532ad8 100644
--- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h
+++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/RegisterID.h
@@ -35,7 +35,7 @@
namespace JSC {
- class RegisterID : Noncopyable {
+ class RegisterID : public Noncopyable {
public:
RegisterID()
: m_refCount(0)
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp
index 4e16e25..94b9654 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp
@@ -113,8 +113,12 @@
#include "CommonIdentifiers.h"
#include "NodeInfo.h"
#include "Parser.h"
+#include <wtf/FastMalloc.h>
#include <wtf/MathExtras.h>
+#define YYMALLOC fastMalloc
+#define YYFREE fastFree
+
#define YYMAXDEPTH 10000
#define YYENABLE_NLS 0
@@ -165,12 +169,6 @@ static ExpressionNode* combineCommaNodes(void*, ExpressionNode* list, Expression
#pragma warning(disable: 4244)
#pragma warning(disable: 4702)
-// At least some of the time, the declarations of malloc and free that bison
-// generates are causing warnings. A way to avoid this is to explicitly define
-// the macros so that bison doesn't try to declare malloc and free.
-#define YYMALLOC malloc
-#define YYFREE free
-
#endif
#define YYPARSE_PARAM globalPtr
@@ -232,7 +230,7 @@ static inline void appendToVarDeclarationList(void* globalPtr, ParserArenaData<D
/* Line 189 of yacc.c */
-#line 236 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+#line 234 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -332,7 +330,7 @@ typedef union YYSTYPE
{
/* Line 214 of yacc.c */
-#line 157 "../parser/Grammar.y"
+#line 155 "../parser/Grammar.y"
int intValue;
double doubleValue;
@@ -367,7 +365,7 @@ typedef union YYSTYPE
/* Line 214 of yacc.c */
-#line 371 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+#line 369 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -392,7 +390,7 @@ typedef struct YYLTYPE
/* Line 264 of yacc.c */
-#line 396 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+#line 394 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
#ifdef short
# undef short
@@ -946,66 +944,66 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 290, 290, 291, 292, 293, 294, 295, 304, 316,
- 317, 318, 319, 320, 332, 336, 343, 344, 345, 347,
- 351, 352, 353, 354, 355, 359, 360, 361, 365, 369,
- 377, 378, 382, 383, 387, 388, 389, 393, 397, 404,
- 405, 409, 413, 420, 421, 428, 429, 436, 437, 438,
- 442, 448, 449, 450, 454, 461, 462, 466, 470, 477,
- 478, 482, 483, 487, 488, 489, 493, 494, 495, 499,
- 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
- 512, 513, 517, 518, 522, 523, 524, 525, 529, 530,
- 532, 534, 539, 540, 541, 545, 546, 548, 553, 554,
- 555, 556, 560, 561, 562, 563, 567, 568, 569, 570,
- 571, 572, 575, 581, 582, 583, 584, 585, 586, 593,
- 594, 595, 596, 597, 598, 602, 609, 610, 611, 612,
- 613, 617, 618, 620, 622, 624, 629, 630, 632, 633,
- 635, 640, 641, 645, 646, 651, 652, 656, 657, 661,
- 662, 667, 668, 673, 674, 678, 679, 684, 685, 690,
- 691, 695, 696, 701, 702, 707, 708, 712, 713, 718,
- 719, 723, 724, 729, 730, 735, 736, 741, 742, 749,
- 750, 757, 758, 765, 766, 767, 768, 769, 770, 771,
- 772, 773, 774, 775, 776, 780, 781, 785, 786, 790,
- 791, 795, 796, 797, 798, 799, 800, 801, 802, 803,
- 804, 805, 806, 807, 808, 809, 810, 811, 815, 817,
- 822, 824, 830, 837, 846, 854, 867, 874, 883, 891,
- 904, 906, 912, 920, 932, 933, 937, 941, 945, 949,
- 951, 956, 959, 969, 971, 973, 975, 981, 988, 997,
- 1003, 1014, 1015, 1019, 1020, 1024, 1028, 1032, 1036, 1043,
- 1046, 1049, 1052, 1058, 1061, 1064, 1067, 1073, 1079, 1085,
- 1086, 1095, 1096, 1100, 1106, 1116, 1117, 1121, 1122, 1126,
- 1132, 1136, 1143, 1149, 1155, 1165, 1167, 1172, 1173, 1184,
- 1185, 1192, 1193, 1203, 1206, 1212, 1213, 1217, 1218, 1223,
- 1230, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1251, 1252,
- 1253, 1254, 1255, 1259, 1260, 1264, 1265, 1266, 1268, 1272,
- 1273, 1274, 1275, 1276, 1280, 1281, 1282, 1286, 1287, 1290,
- 1292, 1296, 1297, 1301, 1302, 1303, 1304, 1305, 1309, 1310,
- 1311, 1312, 1316, 1317, 1321, 1322, 1326, 1327, 1328, 1329,
- 1333, 1334, 1335, 1336, 1340, 1341, 1345, 1346, 1350, 1351,
- 1355, 1356, 1360, 1361, 1362, 1366, 1367, 1368, 1372, 1373,
- 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1385,
- 1386, 1390, 1391, 1395, 1396, 1397, 1398, 1402, 1403, 1404,
- 1405, 1409, 1410, 1411, 1415, 1416, 1417, 1421, 1422, 1423,
- 1424, 1428, 1429, 1430, 1431, 1435, 1436, 1437, 1438, 1439,
- 1440, 1441, 1445, 1446, 1447, 1448, 1449, 1450, 1454, 1455,
- 1456, 1457, 1458, 1459, 1460, 1464, 1465, 1466, 1467, 1468,
- 1472, 1473, 1474, 1475, 1476, 1480, 1481, 1482, 1483, 1484,
- 1488, 1489, 1493, 1494, 1498, 1499, 1503, 1504, 1508, 1509,
- 1513, 1514, 1518, 1519, 1523, 1524, 1528, 1529, 1533, 1534,
- 1538, 1539, 1543, 1544, 1548, 1549, 1553, 1554, 1558, 1559,
- 1563, 1564, 1568, 1569, 1573, 1574, 1578, 1579, 1583, 1584,
- 1588, 1589, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600,
- 1601, 1602, 1603, 1604, 1608, 1609, 1613, 1614, 1618, 1619,
- 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632,
- 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1643, 1644, 1648,
- 1649, 1653, 1654, 1655, 1656, 1660, 1661, 1662, 1663, 1667,
- 1668, 1672, 1673, 1677, 1678, 1682, 1686, 1690, 1694, 1695,
- 1699, 1700, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711,
- 1714, 1716, 1719, 1721, 1725, 1726, 1727, 1728, 1732, 1733,
- 1734, 1735, 1739, 1740, 1741, 1742, 1746, 1750, 1754, 1755,
- 1758, 1760, 1764, 1765, 1769, 1770, 1774, 1775, 1779, 1783,
- 1784, 1788, 1789, 1790, 1794, 1795, 1799, 1800, 1804, 1805,
- 1806, 1807, 1811, 1812, 1815, 1817, 1821, 1822
+ 0, 288, 288, 289, 290, 291, 292, 293, 302, 314,
+ 315, 316, 317, 318, 330, 334, 341, 342, 343, 345,
+ 349, 350, 351, 352, 353, 357, 358, 359, 363, 367,
+ 375, 376, 380, 381, 385, 386, 387, 391, 395, 402,
+ 403, 407, 411, 418, 419, 426, 427, 434, 435, 436,
+ 440, 446, 447, 448, 452, 459, 460, 464, 468, 475,
+ 476, 480, 481, 485, 486, 487, 491, 492, 493, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 510, 511, 515, 516, 520, 521, 522, 523, 527, 528,
+ 530, 532, 537, 538, 539, 543, 544, 546, 551, 552,
+ 553, 554, 558, 559, 560, 561, 565, 566, 567, 568,
+ 569, 570, 573, 579, 580, 581, 582, 583, 584, 591,
+ 592, 593, 594, 595, 596, 600, 607, 608, 609, 610,
+ 611, 615, 616, 618, 620, 622, 627, 628, 630, 631,
+ 633, 638, 639, 643, 644, 649, 650, 654, 655, 659,
+ 660, 665, 666, 671, 672, 676, 677, 682, 683, 688,
+ 689, 693, 694, 699, 700, 705, 706, 710, 711, 716,
+ 717, 721, 722, 727, 728, 733, 734, 739, 740, 747,
+ 748, 755, 756, 763, 764, 765, 766, 767, 768, 769,
+ 770, 771, 772, 773, 774, 778, 779, 783, 784, 788,
+ 789, 793, 794, 795, 796, 797, 798, 799, 800, 801,
+ 802, 803, 804, 805, 806, 807, 808, 809, 813, 815,
+ 820, 822, 828, 835, 844, 852, 865, 872, 881, 889,
+ 902, 904, 910, 918, 930, 931, 935, 939, 943, 947,
+ 949, 954, 957, 967, 969, 971, 973, 979, 986, 995,
+ 1001, 1012, 1013, 1017, 1018, 1022, 1026, 1030, 1034, 1041,
+ 1044, 1047, 1050, 1056, 1059, 1062, 1065, 1071, 1077, 1083,
+ 1084, 1093, 1094, 1098, 1104, 1114, 1115, 1119, 1120, 1124,
+ 1130, 1134, 1141, 1147, 1153, 1163, 1165, 1170, 1171, 1182,
+ 1183, 1190, 1191, 1201, 1204, 1210, 1211, 1215, 1216, 1221,
+ 1228, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1249, 1250,
+ 1251, 1252, 1253, 1257, 1258, 1262, 1263, 1264, 1266, 1270,
+ 1271, 1272, 1273, 1274, 1278, 1279, 1280, 1284, 1285, 1288,
+ 1290, 1294, 1295, 1299, 1300, 1301, 1302, 1303, 1307, 1308,
+ 1309, 1310, 1314, 1315, 1319, 1320, 1324, 1325, 1326, 1327,
+ 1331, 1332, 1333, 1334, 1338, 1339, 1343, 1344, 1348, 1349,
+ 1353, 1354, 1358, 1359, 1360, 1364, 1365, 1366, 1370, 1371,
+ 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1383,
+ 1384, 1388, 1389, 1393, 1394, 1395, 1396, 1400, 1401, 1402,
+ 1403, 1407, 1408, 1409, 1413, 1414, 1415, 1419, 1420, 1421,
+ 1422, 1426, 1427, 1428, 1429, 1433, 1434, 1435, 1436, 1437,
+ 1438, 1439, 1443, 1444, 1445, 1446, 1447, 1448, 1452, 1453,
+ 1454, 1455, 1456, 1457, 1458, 1462, 1463, 1464, 1465, 1466,
+ 1470, 1471, 1472, 1473, 1474, 1478, 1479, 1480, 1481, 1482,
+ 1486, 1487, 1491, 1492, 1496, 1497, 1501, 1502, 1506, 1507,
+ 1511, 1512, 1516, 1517, 1521, 1522, 1526, 1527, 1531, 1532,
+ 1536, 1537, 1541, 1542, 1546, 1547, 1551, 1552, 1556, 1557,
+ 1561, 1562, 1566, 1567, 1571, 1572, 1576, 1577, 1581, 1582,
+ 1586, 1587, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598,
+ 1599, 1600, 1601, 1602, 1606, 1607, 1611, 1612, 1616, 1617,
+ 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630,
+ 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1641, 1642, 1646,
+ 1647, 1651, 1652, 1653, 1654, 1658, 1659, 1660, 1661, 1665,
+ 1666, 1670, 1671, 1675, 1676, 1680, 1684, 1688, 1692, 1693,
+ 1697, 1698, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709,
+ 1712, 1714, 1717, 1719, 1723, 1724, 1725, 1726, 1730, 1731,
+ 1732, 1733, 1737, 1738, 1739, 1740, 1744, 1748, 1752, 1753,
+ 1756, 1758, 1762, 1763, 1767, 1768, 1772, 1773, 1777, 1781,
+ 1782, 1786, 1787, 1788, 1792, 1793, 1797, 1798, 1802, 1803,
+ 1804, 1805, 1809, 1810, 1813, 1815, 1819, 1820
};
#endif
@@ -2970,42 +2968,42 @@ yyreduce:
case 2:
/* Line 1455 of yacc.c */
-#line 290 "../parser/Grammar.y"
+#line 288 "../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"
+#line 289 "../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"
+#line 290 "../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"
+#line 291 "../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"
+#line 292 "../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"
+#line 293 "../parser/Grammar.y"
{
Lexer& l = *LEXER;
if (!l.scanRegExp())
@@ -3020,7 +3018,7 @@ yyreduce:
case 8:
/* Line 1455 of yacc.c */
-#line 304 "../parser/Grammar.y"
+#line 302 "../parser/Grammar.y"
{
Lexer& l = *LEXER;
if (!l.scanRegExp())
@@ -3035,35 +3033,35 @@ yyreduce:
case 9:
/* Line 1455 of yacc.c */
-#line 316 "../parser/Grammar.y"
+#line 314 "../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"
+#line 315 "../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"
+#line 316 "../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"
+#line 317 "../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"
+#line 319 "../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);
if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature)
@@ -3077,7 +3075,7 @@ yyreduce:
case 14:
/* Line 1455 of yacc.c */
-#line 332 "../parser/Grammar.y"
+#line 330 "../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;
(yyval.propertyList).m_features = (yyvsp[(1) - (1)].propertyNode).m_features;
@@ -3087,7 +3085,7 @@ yyreduce:
case 15:
/* Line 1455 of yacc.c */
-#line 336 "../parser/Grammar.y"
+#line 334 "../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);
(yyval.propertyList).m_features = (yyvsp[(1) - (3)].propertyList).m_features | (yyvsp[(3) - (3)].propertyNode).m_features;
@@ -3097,70 +3095,70 @@ yyreduce:
case 17:
/* Line 1455 of yacc.c */
-#line 344 "../parser/Grammar.y"
+#line 342 "../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"
+#line 343 "../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"
+#line 345 "../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"
+#line 349 "../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"
+#line 352 "../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"
+#line 353 "../parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;}
break;
case 25:
/* Line 1455 of yacc.c */
-#line 359 "../parser/Grammar.y"
+#line 357 "../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"
+#line 358 "../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"
+#line 359 "../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"
+#line 363 "../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;
(yyval.elementList).m_features = (yyvsp[(2) - (2)].expressionNode).m_features;
@@ -3170,7 +3168,7 @@ yyreduce:
case 29:
/* Line 1455 of yacc.c */
-#line 370 "../parser/Grammar.y"
+#line 368 "../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);
(yyval.elementList).m_features = (yyvsp[(1) - (4)].elementList).m_features | (yyvsp[(4) - (4)].expressionNode).m_features;
@@ -3180,35 +3178,35 @@ yyreduce:
case 30:
/* Line 1455 of yacc.c */
-#line 377 "../parser/Grammar.y"
+#line 375 "../parser/Grammar.y"
{ (yyval.intValue) = 0; ;}
break;
case 32:
/* Line 1455 of yacc.c */
-#line 382 "../parser/Grammar.y"
+#line 380 "../parser/Grammar.y"
{ (yyval.intValue) = 1; ;}
break;
case 33:
/* Line 1455 of yacc.c */
-#line 383 "../parser/Grammar.y"
+#line 381 "../parser/Grammar.y"
{ (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;}
break;
case 35:
/* Line 1455 of yacc.c */
-#line 388 "../parser/Grammar.y"
+#line 386 "../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"
+#line 387 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants);
@@ -3218,7 +3216,7 @@ yyreduce:
case 37:
/* Line 1455 of yacc.c */
-#line 393 "../parser/Grammar.y"
+#line 391 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants);
@@ -3228,7 +3226,7 @@ yyreduce:
case 38:
/* Line 1455 of yacc.c */
-#line 397 "../parser/Grammar.y"
+#line 395 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].argumentsNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].argumentsNode).m_numConstants);
@@ -3238,7 +3236,7 @@ yyreduce:
case 40:
/* Line 1455 of yacc.c */
-#line 405 "../parser/Grammar.y"
+#line 403 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants);
@@ -3248,7 +3246,7 @@ yyreduce:
case 41:
/* Line 1455 of yacc.c */
-#line 409 "../parser/Grammar.y"
+#line 407 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants);
@@ -3258,7 +3256,7 @@ yyreduce:
case 42:
/* Line 1455 of yacc.c */
-#line 413 "../parser/Grammar.y"
+#line 411 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].argumentsNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].argumentsNode).m_numConstants);
@@ -3268,7 +3266,7 @@ yyreduce:
case 44:
/* Line 1455 of yacc.c */
-#line 421 "../parser/Grammar.y"
+#line 419 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants);
@@ -3278,7 +3276,7 @@ yyreduce:
case 46:
/* Line 1455 of yacc.c */
-#line 429 "../parser/Grammar.y"
+#line 427 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants);
@@ -3288,21 +3286,21 @@ yyreduce:
case 47:
/* Line 1455 of yacc.c */
-#line 436 "../parser/Grammar.y"
+#line 434 "../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"
+#line 435 "../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"
+#line 436 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants);
@@ -3312,7 +3310,7 @@ yyreduce:
case 50:
/* Line 1455 of yacc.c */
-#line 442 "../parser/Grammar.y"
+#line 440 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants); ;}
@@ -3321,21 +3319,21 @@ yyreduce:
case 51:
/* Line 1455 of yacc.c */
-#line 448 "../parser/Grammar.y"
+#line 446 "../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"
+#line 447 "../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"
+#line 448 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (4)].expressionNode).m_features | (yyvsp[(3) - (4)].expressionNode).m_features, (yyvsp[(1) - (4)].expressionNode).m_numConstants + (yyvsp[(3) - (4)].expressionNode).m_numConstants);
@@ -3345,7 +3343,7 @@ yyreduce:
case 54:
/* Line 1455 of yacc.c */
-#line 454 "../parser/Grammar.y"
+#line 452 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(node, (yyvsp[(1) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants);
@@ -3355,21 +3353,21 @@ yyreduce:
case 55:
/* Line 1455 of yacc.c */
-#line 461 "../parser/Grammar.y"
+#line 459 "../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"
+#line 460 "../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"
+#line 464 "../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;
(yyval.argumentList).m_features = (yyvsp[(1) - (1)].expressionNode).m_features;
@@ -3379,7 +3377,7 @@ yyreduce:
case 58:
/* Line 1455 of yacc.c */
-#line 470 "../parser/Grammar.y"
+#line 468 "../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);
(yyval.argumentList).m_features = (yyvsp[(1) - (3)].argumentList).m_features | (yyvsp[(3) - (3)].expressionNode).m_features;
@@ -3389,252 +3387,252 @@ yyreduce:
case 64:
/* Line 1455 of yacc.c */
-#line 488 "../parser/Grammar.y"
+#line 486 "../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"
+#line 487 "../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"
+#line 492 "../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"
+#line 493 "../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"
+#line 497 "../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"
+#line 498 "../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"
+#line 499 "../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"
+#line 500 "../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"
+#line 501 "../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"
+#line 502 "../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"
+#line 503 "../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"
+#line 504 "../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"
+#line 505 "../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"
+#line 506 "../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"
+#line 507 "../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"
+#line 521 "../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"
+#line 522 "../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"
+#line 523 "../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"
+#line 529 "../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"
+#line 531 "../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"
+#line 533 "../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"
+#line 538 "../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"
+#line 539 "../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"
+#line 545 "../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"
+#line 547 "../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"
+#line 552 "../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"
+#line 553 "../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"
+#line 554 "../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"
+#line 559 "../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"
+#line 560 "../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"
+#line 561 "../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"
+#line 566 "../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"
+#line 567 "../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"
+#line 568 "../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"
+#line 569 "../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"
+#line 570 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(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); ;}
@@ -3643,7 +3641,7 @@ yyreduce:
case 112:
/* Line 1455 of yacc.c */
-#line 575 "../parser/Grammar.y"
+#line 573 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(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); ;}
@@ -3652,35 +3650,35 @@ yyreduce:
case 114:
/* Line 1455 of yacc.c */
-#line 582 "../parser/Grammar.y"
+#line 580 "../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"
+#line 581 "../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"
+#line 582 "../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"
+#line 583 "../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"
+#line 585 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(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); ;}
@@ -3689,35 +3687,35 @@ yyreduce:
case 120:
/* Line 1455 of yacc.c */
-#line 594 "../parser/Grammar.y"
+#line 592 "../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"
+#line 593 "../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"
+#line 594 "../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"
+#line 595 "../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"
+#line 597 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(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); ;}
@@ -3726,7 +3724,7 @@ yyreduce:
case 125:
/* Line 1455 of yacc.c */
-#line 603 "../parser/Grammar.y"
+#line 601 "../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);
(yyval.expressionNode) = createNodeInfo<ExpressionNode*>(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); ;}
@@ -3735,217 +3733,217 @@ yyreduce:
case 127:
/* Line 1455 of yacc.c */
-#line 610 "../parser/Grammar.y"
+#line 608 "../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"
+#line 609 "../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"
+#line 610 "../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"
+#line 611 "../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"
+#line 617 "../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"
+#line 619 "../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"
+#line 621 "../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"
+#line 623 "../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"
+#line 629 "../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"
+#line 630 "../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"
+#line 632 "../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"
+#line 634 "../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"
+#line 639 "../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"
+#line 645 "../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"
+#line 650 "../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"
+#line 655 "../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"
+#line 661 "../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"
+#line 667 "../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"
+#line 672 "../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"
+#line 678 "../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"
+#line 684 "../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"
+#line 689 "../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"
+#line 695 "../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"
+#line 701 "../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"
+#line 706 "../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"
+#line 712 "../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"
+#line 717 "../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"
+#line 723 "../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"
+#line 729 "../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"
+#line 735 "../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"
+#line 741 "../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);
;}
@@ -3954,7 +3952,7 @@ yyreduce:
case 180:
/* Line 1455 of yacc.c */
-#line 751 "../parser/Grammar.y"
+#line 749 "../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);
;}
@@ -3963,7 +3961,7 @@ yyreduce:
case 182:
/* Line 1455 of yacc.c */
-#line 759 "../parser/Grammar.y"
+#line 757 "../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);
;}
@@ -3972,112 +3970,112 @@ yyreduce:
case 183:
/* Line 1455 of yacc.c */
-#line 765 "../parser/Grammar.y"
+#line 763 "../parser/Grammar.y"
{ (yyval.op) = OpEqual; ;}
break;
case 184:
/* Line 1455 of yacc.c */
-#line 766 "../parser/Grammar.y"
+#line 764 "../parser/Grammar.y"
{ (yyval.op) = OpPlusEq; ;}
break;
case 185:
/* Line 1455 of yacc.c */
-#line 767 "../parser/Grammar.y"
+#line 765 "../parser/Grammar.y"
{ (yyval.op) = OpMinusEq; ;}
break;
case 186:
/* Line 1455 of yacc.c */
-#line 768 "../parser/Grammar.y"
+#line 766 "../parser/Grammar.y"
{ (yyval.op) = OpMultEq; ;}
break;
case 187:
/* Line 1455 of yacc.c */
-#line 769 "../parser/Grammar.y"
+#line 767 "../parser/Grammar.y"
{ (yyval.op) = OpDivEq; ;}
break;
case 188:
/* Line 1455 of yacc.c */
-#line 770 "../parser/Grammar.y"
+#line 768 "../parser/Grammar.y"
{ (yyval.op) = OpLShift; ;}
break;
case 189:
/* Line 1455 of yacc.c */
-#line 771 "../parser/Grammar.y"
+#line 769 "../parser/Grammar.y"
{ (yyval.op) = OpRShift; ;}
break;
case 190:
/* Line 1455 of yacc.c */
-#line 772 "../parser/Grammar.y"
+#line 770 "../parser/Grammar.y"
{ (yyval.op) = OpURShift; ;}
break;
case 191:
/* Line 1455 of yacc.c */
-#line 773 "../parser/Grammar.y"
+#line 771 "../parser/Grammar.y"
{ (yyval.op) = OpAndEq; ;}
break;
case 192:
/* Line 1455 of yacc.c */
-#line 774 "../parser/Grammar.y"
+#line 772 "../parser/Grammar.y"
{ (yyval.op) = OpXOrEq; ;}
break;
case 193:
/* Line 1455 of yacc.c */
-#line 775 "../parser/Grammar.y"
+#line 773 "../parser/Grammar.y"
{ (yyval.op) = OpOrEq; ;}
break;
case 194:
/* Line 1455 of yacc.c */
-#line 776 "../parser/Grammar.y"
+#line 774 "../parser/Grammar.y"
{ (yyval.op) = OpModEq; ;}
break;
case 196:
/* Line 1455 of yacc.c */
-#line 781 "../parser/Grammar.y"
+#line 779 "../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"
+#line 784 "../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"
+#line 789 "../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"
+#line 813 "../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;
@@ -4085,7 +4083,7 @@ yyreduce:
case 219:
/* Line 1455 of yacc.c */
-#line 817 "../parser/Grammar.y"
+#line 815 "../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;
@@ -4093,7 +4091,7 @@ yyreduce:
case 220:
/* Line 1455 of yacc.c */
-#line 822 "../parser/Grammar.y"
+#line 820 "../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;
@@ -4101,7 +4099,7 @@ yyreduce:
case 221:
/* Line 1455 of yacc.c */
-#line 824 "../parser/Grammar.y"
+#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[(2) - (3)]));
AUTO_SEMICOLON; ;}
@@ -4110,7 +4108,7 @@ yyreduce:
case 222:
/* Line 1455 of yacc.c */
-#line 830 "../parser/Grammar.y"
+#line 828 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = 0;
(yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>;
appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(1) - (1)].ident), 0);
@@ -4123,7 +4121,7 @@ yyreduce:
case 223:
/* Line 1455 of yacc.c */
-#line 837 "../parser/Grammar.y"
+#line 835 "../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);
(yyval.varDeclList).m_node = node;
@@ -4138,7 +4136,7 @@ yyreduce:
case 224:
/* Line 1455 of yacc.c */
-#line 847 "../parser/Grammar.y"
+#line 845 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node;
(yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations;
appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(3) - (3)].ident), 0);
@@ -4151,7 +4149,7 @@ yyreduce:
case 225:
/* Line 1455 of yacc.c */
-#line 855 "../parser/Grammar.y"
+#line 853 "../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);
(yyval.varDeclList).m_node = combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (4)].varDeclList).m_node, node);
@@ -4166,7 +4164,7 @@ yyreduce:
case 226:
/* Line 1455 of yacc.c */
-#line 867 "../parser/Grammar.y"
+#line 865 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = 0;
(yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>;
appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(1) - (1)].ident), 0);
@@ -4179,7 +4177,7 @@ yyreduce:
case 227:
/* Line 1455 of yacc.c */
-#line 874 "../parser/Grammar.y"
+#line 872 "../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);
(yyval.varDeclList).m_node = node;
@@ -4194,7 +4192,7 @@ yyreduce:
case 228:
/* Line 1455 of yacc.c */
-#line 884 "../parser/Grammar.y"
+#line 882 "../parser/Grammar.y"
{ (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node;
(yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations;
appendToVarDeclarationList(GLOBAL_DATA, (yyval.varDeclList).m_varDeclarations, *(yyvsp[(3) - (3)].ident), 0);
@@ -4207,7 +4205,7 @@ yyreduce:
case 229:
/* Line 1455 of yacc.c */
-#line 892 "../parser/Grammar.y"
+#line 890 "../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);
(yyval.varDeclList).m_node = combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (4)].varDeclList).m_node, node);
@@ -4222,7 +4220,7 @@ yyreduce:
case 230:
/* Line 1455 of yacc.c */
-#line 904 "../parser/Grammar.y"
+#line 902 "../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;
@@ -4230,7 +4228,7 @@ yyreduce:
case 231:
/* Line 1455 of yacc.c */
-#line 907 "../parser/Grammar.y"
+#line 905 "../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;
@@ -4238,7 +4236,7 @@ yyreduce:
case 232:
/* Line 1455 of yacc.c */
-#line 912 "../parser/Grammar.y"
+#line 910 "../parser/Grammar.y"
{ (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node;
(yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head;
(yyval.constDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>;
@@ -4252,7 +4250,7 @@ yyreduce:
case 233:
/* Line 1455 of yacc.c */
-#line 921 "../parser/Grammar.y"
+#line 919 "../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;
(yyval.constDeclList).m_node.tail = (yyvsp[(3) - (3)].constDeclNode).m_node;
@@ -4266,42 +4264,42 @@ yyreduce:
case 234:
/* Line 1455 of yacc.c */
-#line 932 "../parser/Grammar.y"
+#line 930 "../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"
+#line 931 "../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"
+#line 935 "../parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;}
break;
case 237:
/* Line 1455 of yacc.c */
-#line 941 "../parser/Grammar.y"
+#line 939 "../parser/Grammar.y"
{ (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;}
break;
case 238:
/* Line 1455 of yacc.c */
-#line 945 "../parser/Grammar.y"
+#line 943 "../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"
+#line 947 "../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;
@@ -4309,7 +4307,7 @@ yyreduce:
case 240:
/* Line 1455 of yacc.c */
-#line 951 "../parser/Grammar.y"
+#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[(1) - (2)])); AUTO_SEMICOLON; ;}
break;
@@ -4317,7 +4315,7 @@ yyreduce:
case 241:
/* Line 1455 of yacc.c */
-#line 957 "../parser/Grammar.y"
+#line 955 "../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;
@@ -4325,7 +4323,7 @@ yyreduce:
case 242:
/* Line 1455 of yacc.c */
-#line 960 "../parser/Grammar.y"
+#line 958 "../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),
mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_funcDeclarations, (yyvsp[(7) - (7)].statementNode).m_funcDeclarations),
@@ -4337,7 +4335,7 @@ yyreduce:
case 243:
/* Line 1455 of yacc.c */
-#line 969 "../parser/Grammar.y"
+#line 967 "../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;
@@ -4345,7 +4343,7 @@ yyreduce:
case 244:
/* Line 1455 of yacc.c */
-#line 971 "../parser/Grammar.y"
+#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;
@@ -4353,7 +4351,7 @@ yyreduce:
case 245:
/* Line 1455 of yacc.c */
-#line 973 "../parser/Grammar.y"
+#line 971 "../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;
@@ -4361,7 +4359,7 @@ yyreduce:
case 246:
/* Line 1455 of yacc.c */
-#line 976 "../parser/Grammar.y"
+#line 974 "../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,
(yyvsp[(3) - (9)].expressionNode).m_numConstants + (yyvsp[(5) - (9)].expressionNode).m_numConstants + (yyvsp[(7) - (9)].expressionNode).m_numConstants + (yyvsp[(9) - (9)].statementNode).m_numConstants);
@@ -4372,7 +4370,7 @@ yyreduce:
case 247:
/* Line 1455 of yacc.c */
-#line 982 "../parser/Grammar.y"
+#line 980 "../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),
mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_funcDeclarations, (yyvsp[(10) - (10)].statementNode).m_funcDeclarations),
@@ -4384,7 +4382,7 @@ yyreduce:
case 248:
/* Line 1455 of yacc.c */
-#line 989 "../parser/Grammar.y"
+#line 987 "../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);
SET_EXCEPTION_LOCATION(node, (yylsp[(3) - (7)]).first_column, (yylsp[(3) - (7)]).last_column, (yylsp[(5) - (7)]).last_column);
@@ -4398,7 +4396,7 @@ yyreduce:
case 249:
/* Line 1455 of yacc.c */
-#line 998 "../parser/Grammar.y"
+#line 996 "../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);
appendToVarDeclarationList(GLOBAL_DATA, (yyvsp[(8) - (8)].statementNode).m_varDeclarations, *(yyvsp[(4) - (8)].ident), DeclarationStacks::HasInitializer);
@@ -4409,7 +4407,7 @@ yyreduce:
case 250:
/* Line 1455 of yacc.c */
-#line 1004 "../parser/Grammar.y"
+#line 1002 "../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);
appendToVarDeclarationList(GLOBAL_DATA, (yyvsp[(9) - (9)].statementNode).m_varDeclarations, *(yyvsp[(4) - (9)].ident), DeclarationStacks::HasInitializer);
@@ -4422,21 +4420,21 @@ yyreduce:
case 251:
/* Line 1455 of yacc.c */
-#line 1014 "../parser/Grammar.y"
+#line 1012 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;}
break;
case 253:
/* Line 1455 of yacc.c */
-#line 1019 "../parser/Grammar.y"
+#line 1017 "../parser/Grammar.y"
{ (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;}
break;
case 255:
/* Line 1455 of yacc.c */
-#line 1024 "../parser/Grammar.y"
+#line 1022 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0);
@@ -4446,7 +4444,7 @@ yyreduce:
case 256:
/* Line 1455 of yacc.c */
-#line 1028 "../parser/Grammar.y"
+#line 1026 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0);
@@ -4456,7 +4454,7 @@ yyreduce:
case 257:
/* Line 1455 of yacc.c */
-#line 1032 "../parser/Grammar.y"
+#line 1030 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0);
@@ -4466,7 +4464,7 @@ yyreduce:
case 258:
/* Line 1455 of yacc.c */
-#line 1036 "../parser/Grammar.y"
+#line 1034 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0);
@@ -4476,7 +4474,7 @@ yyreduce:
case 259:
/* Line 1455 of yacc.c */
-#line 1043 "../parser/Grammar.y"
+#line 1041 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
@@ -4485,7 +4483,7 @@ yyreduce:
case 260:
/* Line 1455 of yacc.c */
-#line 1046 "../parser/Grammar.y"
+#line 1044 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BreakNode(GLOBAL_DATA), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;}
@@ -4494,7 +4492,7 @@ yyreduce:
case 261:
/* Line 1455 of yacc.c */
-#line 1049 "../parser/Grammar.y"
+#line 1047 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
@@ -4503,7 +4501,7 @@ yyreduce:
case 262:
/* Line 1455 of yacc.c */
-#line 1052 "../parser/Grammar.y"
+#line 1050 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)), 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;}
@@ -4512,7 +4510,7 @@ yyreduce:
case 263:
/* Line 1455 of yacc.c */
-#line 1058 "../parser/Grammar.y"
+#line 1056 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;}
@@ -4521,7 +4519,7 @@ yyreduce:
case 264:
/* Line 1455 of yacc.c */
-#line 1061 "../parser/Grammar.y"
+#line 1059 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, 0, 0); DBG((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;}
@@ -4530,7 +4528,7 @@ yyreduce:
case 265:
/* Line 1455 of yacc.c */
-#line 1064 "../parser/Grammar.y"
+#line 1062 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;}
@@ -4539,7 +4537,7 @@ yyreduce:
case 266:
/* Line 1455 of yacc.c */
-#line 1067 "../parser/Grammar.y"
+#line 1065 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;}
@@ -4548,7 +4546,7 @@ yyreduce:
case 267:
/* Line 1455 of yacc.c */
-#line 1073 "../parser/Grammar.y"
+#line 1071 "../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);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;}
@@ -4557,7 +4555,7 @@ yyreduce:
case 268:
/* Line 1455 of yacc.c */
-#line 1079 "../parser/Grammar.y"
+#line 1077 "../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);
DBG((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;}
@@ -4566,14 +4564,14 @@ yyreduce:
case 269:
/* Line 1455 of yacc.c */
-#line 1085 "../parser/Grammar.y"
+#line 1083 "../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"
+#line 1085 "../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),
mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_funcDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_funcDeclarations), (yyvsp[(4) - (5)].clauseList).m_funcDeclarations),
@@ -4584,14 +4582,14 @@ yyreduce:
case 271:
/* Line 1455 of yacc.c */
-#line 1095 "../parser/Grammar.y"
+#line 1093 "../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"
+#line 1098 "../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;
(yyval.clauseList).m_varDeclarations = (yyvsp[(1) - (1)].caseClauseNode).m_varDeclarations;
@@ -4603,7 +4601,7 @@ yyreduce:
case 274:
/* Line 1455 of yacc.c */
-#line 1106 "../parser/Grammar.y"
+#line 1104 "../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);
(yyval.clauseList).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].clauseList).m_varDeclarations, (yyvsp[(2) - (2)].caseClauseNode).m_varDeclarations);
@@ -4616,35 +4614,35 @@ yyreduce:
case 275:
/* Line 1455 of yacc.c */
-#line 1116 "../parser/Grammar.y"
+#line 1114 "../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"
+#line 1115 "../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"
+#line 1119 "../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"
+#line 1120 "../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"
+#line 1124 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, (yyvsp[(3) - (3)].statementNode).m_varDeclarations, (yyvsp[(3) - (3)].statementNode).m_funcDeclarations, (yyvsp[(3) - (3)].statementNode).m_features, (yyvsp[(3) - (3)].statementNode).m_numConstants); ;}
@@ -4653,7 +4651,7 @@ yyreduce:
case 280:
/* Line 1455 of yacc.c */
-#line 1132 "../parser/Grammar.y"
+#line 1130 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)]));
@@ -4663,7 +4661,7 @@ yyreduce:
case 281:
/* Line 1455 of yacc.c */
-#line 1136 "../parser/Grammar.y"
+#line 1134 "../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);
(yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(node, 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); DBG((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON;
@@ -4673,7 +4671,7 @@ yyreduce:
case 282:
/* Line 1455 of yacc.c */
-#line 1143 "../parser/Grammar.y"
+#line 1141 "../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),
mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_funcDeclarations, (yyvsp[(4) - (4)].statementNode).m_funcDeclarations),
@@ -4685,7 +4683,7 @@ yyreduce:
case 283:
/* Line 1455 of yacc.c */
-#line 1149 "../parser/Grammar.y"
+#line 1147 "../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),
mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(7) - (7)].statementNode).m_funcDeclarations),
@@ -4697,7 +4695,7 @@ yyreduce:
case 284:
/* Line 1455 of yacc.c */
-#line 1156 "../parser/Grammar.y"
+#line 1154 "../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),
mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_funcDeclarations, (yyvsp[(7) - (9)].statementNode).m_funcDeclarations), (yyvsp[(9) - (9)].statementNode).m_funcDeclarations),
@@ -4709,7 +4707,7 @@ yyreduce:
case 285:
/* Line 1455 of yacc.c */
-#line 1165 "../parser/Grammar.y"
+#line 1163 "../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;
@@ -4717,7 +4715,7 @@ yyreduce:
case 286:
/* Line 1455 of yacc.c */
-#line 1167 "../parser/Grammar.y"
+#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[(1) - (2)])); AUTO_SEMICOLON; ;}
break;
@@ -4725,14 +4723,14 @@ yyreduce:
case 287:
/* Line 1455 of yacc.c */
-#line 1172 "../parser/Grammar.y"
+#line 1170 "../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"
+#line 1172 "../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);
if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature)
@@ -4745,14 +4743,14 @@ yyreduce:
case 289:
/* Line 1455 of yacc.c */
-#line 1184 "../parser/Grammar.y"
+#line 1182 "../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"
+#line 1184 "../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);
if ((yyvsp[(3) - (7)].parameterList).m_features & ArgumentsFeature)
@@ -4764,14 +4762,14 @@ yyreduce:
case 291:
/* Line 1455 of yacc.c */
-#line 1192 "../parser/Grammar.y"
+#line 1190 "../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"
+#line 1192 "../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);
if ((yyvsp[(4) - (8)].parameterList).m_features & ArgumentsFeature)
@@ -4783,7 +4781,7 @@ yyreduce:
case 293:
/* Line 1455 of yacc.c */
-#line 1203 "../parser/Grammar.y"
+#line 1201 "../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;
(yyval.parameterList).m_node.tail = (yyval.parameterList).m_node.head; ;}
@@ -4792,7 +4790,7 @@ yyreduce:
case 294:
/* Line 1455 of yacc.c */
-#line 1206 "../parser/Grammar.y"
+#line 1204 "../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);
(yyval.parameterList).m_node.tail = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].parameterList).m_node.tail, *(yyvsp[(3) - (3)].ident)); ;}
@@ -4801,28 +4799,28 @@ yyreduce:
case 295:
/* Line 1455 of yacc.c */
-#line 1212 "../parser/Grammar.y"
+#line 1210 "../parser/Grammar.y"
{ (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;}
break;
case 296:
/* Line 1455 of yacc.c */
-#line 1213 "../parser/Grammar.y"
+#line 1211 "../parser/Grammar.y"
{ (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;}
break;
case 297:
/* Line 1455 of yacc.c */
-#line 1217 "../parser/Grammar.y"
+#line 1215 "../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"
+#line 1216 "../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;
@@ -4830,7 +4828,7 @@ yyreduce:
case 299:
/* Line 1455 of yacc.c */
-#line 1223 "../parser/Grammar.y"
+#line 1221 "../parser/Grammar.y"
{ (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA);
(yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node);
(yyval.sourceElements).m_varDeclarations = (yyvsp[(1) - (1)].statementNode).m_varDeclarations;
@@ -4843,7 +4841,7 @@ yyreduce:
case 300:
/* Line 1455 of yacc.c */
-#line 1230 "../parser/Grammar.y"
+#line 1228 "../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);
(yyval.sourceElements).m_funcDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (2)].statementNode).m_funcDeclarations);
@@ -4855,259 +4853,259 @@ yyreduce:
case 304:
/* Line 1455 of yacc.c */
-#line 1244 "../parser/Grammar.y"
+#line 1242 "../parser/Grammar.y"
{ ;}
break;
case 305:
/* Line 1455 of yacc.c */
-#line 1245 "../parser/Grammar.y"
+#line 1243 "../parser/Grammar.y"
{ ;}
break;
case 306:
/* Line 1455 of yacc.c */
-#line 1246 "../parser/Grammar.y"
+#line 1244 "../parser/Grammar.y"
{ Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;}
break;
case 307:
/* Line 1455 of yacc.c */
-#line 1247 "../parser/Grammar.y"
+#line 1245 "../parser/Grammar.y"
{ Lexer& l = *LEXER; if (!l.scanRegExp()) YYABORT; ;}
break;
case 308:
/* Line 1455 of yacc.c */
-#line 1251 "../parser/Grammar.y"
+#line 1249 "../parser/Grammar.y"
{ ;}
break;
case 309:
/* Line 1455 of yacc.c */
-#line 1252 "../parser/Grammar.y"
+#line 1250 "../parser/Grammar.y"
{ ;}
break;
case 310:
/* Line 1455 of yacc.c */
-#line 1253 "../parser/Grammar.y"
+#line 1251 "../parser/Grammar.y"
{ ;}
break;
case 311:
/* Line 1455 of yacc.c */
-#line 1254 "../parser/Grammar.y"
+#line 1252 "../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"
+#line 1253 "../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"
+#line 1263 "../parser/Grammar.y"
{ ;}
break;
case 317:
/* Line 1455 of yacc.c */
-#line 1266 "../parser/Grammar.y"
+#line 1264 "../parser/Grammar.y"
{ ;}
break;
case 318:
/* Line 1455 of yacc.c */
-#line 1268 "../parser/Grammar.y"
+#line 1266 "../parser/Grammar.y"
{ ;}
break;
case 322:
/* Line 1455 of yacc.c */
-#line 1275 "../parser/Grammar.y"
+#line 1273 "../parser/Grammar.y"
{ ;}
break;
case 517:
/* Line 1455 of yacc.c */
-#line 1643 "../parser/Grammar.y"
+#line 1641 "../parser/Grammar.y"
{ ;}
break;
case 518:
/* Line 1455 of yacc.c */
-#line 1644 "../parser/Grammar.y"
+#line 1642 "../parser/Grammar.y"
{ ;}
break;
case 520:
/* Line 1455 of yacc.c */
-#line 1649 "../parser/Grammar.y"
+#line 1647 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 521:
/* Line 1455 of yacc.c */
-#line 1653 "../parser/Grammar.y"
+#line 1651 "../parser/Grammar.y"
{ ;}
break;
case 522:
/* Line 1455 of yacc.c */
-#line 1654 "../parser/Grammar.y"
+#line 1652 "../parser/Grammar.y"
{ ;}
break;
case 525:
/* Line 1455 of yacc.c */
-#line 1660 "../parser/Grammar.y"
+#line 1658 "../parser/Grammar.y"
{ ;}
break;
case 526:
/* Line 1455 of yacc.c */
-#line 1661 "../parser/Grammar.y"
+#line 1659 "../parser/Grammar.y"
{ ;}
break;
case 530:
/* Line 1455 of yacc.c */
-#line 1668 "../parser/Grammar.y"
+#line 1666 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 533:
/* Line 1455 of yacc.c */
-#line 1677 "../parser/Grammar.y"
+#line 1675 "../parser/Grammar.y"
{ ;}
break;
case 534:
/* Line 1455 of yacc.c */
-#line 1678 "../parser/Grammar.y"
+#line 1676 "../parser/Grammar.y"
{ ;}
break;
case 539:
/* Line 1455 of yacc.c */
-#line 1695 "../parser/Grammar.y"
+#line 1693 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 555:
/* Line 1455 of yacc.c */
-#line 1726 "../parser/Grammar.y"
+#line 1724 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 557:
/* Line 1455 of yacc.c */
-#line 1728 "../parser/Grammar.y"
+#line 1726 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 559:
/* Line 1455 of yacc.c */
-#line 1733 "../parser/Grammar.y"
+#line 1731 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 561:
/* Line 1455 of yacc.c */
-#line 1735 "../parser/Grammar.y"
+#line 1733 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 563:
/* Line 1455 of yacc.c */
-#line 1740 "../parser/Grammar.y"
+#line 1738 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 565:
/* Line 1455 of yacc.c */
-#line 1742 "../parser/Grammar.y"
+#line 1740 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 568:
/* Line 1455 of yacc.c */
-#line 1754 "../parser/Grammar.y"
+#line 1752 "../parser/Grammar.y"
{ ;}
break;
case 569:
/* Line 1455 of yacc.c */
-#line 1755 "../parser/Grammar.y"
+#line 1753 "../parser/Grammar.y"
{ ;}
break;
case 578:
/* Line 1455 of yacc.c */
-#line 1779 "../parser/Grammar.y"
+#line 1777 "../parser/Grammar.y"
{ ;}
break;
case 580:
/* Line 1455 of yacc.c */
-#line 1784 "../parser/Grammar.y"
+#line 1782 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 585:
/* Line 1455 of yacc.c */
-#line 1795 "../parser/Grammar.y"
+#line 1793 "../parser/Grammar.y"
{ AUTO_SEMICOLON; ;}
break;
case 592:
/* Line 1455 of yacc.c */
-#line 1811 "../parser/Grammar.y"
+#line 1809 "../parser/Grammar.y"
{ ;}
break;
/* Line 1455 of yacc.c */
-#line 5111 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
+#line 5109 "JavaScriptCore/tmp/../generated/Grammar.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5326,7 +5324,7 @@ yyreturn:
/* Line 1675 of yacc.c */
-#line 1827 "../parser/Grammar.y"
+#line 1825 "../parser/Grammar.y"
static ExpressionNode* makeAssignNode(void* globalPtr, ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments, int start, int divot, int end)
diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h
index c7d3837..847624f 100644
--- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h
+++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h
@@ -112,7 +112,7 @@ typedef union YYSTYPE
{
/* Line 1676 of yacc.c */
-#line 157 "../parser/Grammar.y"
+#line 155 "../parser/Grammar.y"
int intValue;
double doubleValue;
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h
index f48f4f4..767c262 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h
@@ -32,7 +32,7 @@
#include "Interpreter.h"
namespace JSC {
- class CachedCall : Noncopyable {
+ class CachedCall : public Noncopyable {
public:
CachedCall(CallFrame* callFrame, JSFunction* function, int argCount, JSValue* exception)
: m_valid(false)
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
index ed7e1ee..e4eebb2 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
@@ -3402,7 +3402,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
register, if it has not already been initialised.
*/
- if (!callFrame->optionalCalleeArguments()) {
+ if (!callFrame->r(RegisterFile::ArgumentsRegister).jsValue()) {
Arguments* arguments = new (globalData) Arguments(callFrame);
callFrame->setCalleeArguments(arguments);
callFrame->r(RegisterFile::ArgumentsRegister) = arguments;
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h
index fa6f7db..5331d92 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.h
@@ -31,13 +31,14 @@
#include "ArgList.h"
#include "FastAllocBase.h"
-#include "HashMap.h"
#include "JSCell.h"
#include "JSValue.h"
#include "JSObject.h"
#include "Opcode.h"
#include "RegisterFile.h"
+#include <wtf/HashMap.h>
+
namespace JSC {
class CodeBlock;
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
index 3a6e63b..d46bdc9 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
@@ -32,12 +32,12 @@
#include "Collector.h"
#include "ExecutableAllocator.h"
#include "Register.h"
+#include <stdio.h>
#include <wtf/Noncopyable.h>
#include <wtf/VMTags.h>
#if HAVE(MMAP)
#include <errno.h>
-#include <stdio.h>
#include <sys/mman.h>
#endif
@@ -92,7 +92,7 @@ namespace JSC {
class JSGlobalObject;
- class RegisterFile : Noncopyable {
+ class RegisterFile : public Noncopyable {
friend class JIT;
public:
enum CallFrameHeaderEntry {
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h
index 0de4f79..4ed47e3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h
@@ -156,7 +156,7 @@ public:
return pool.release();
}
-#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) || !(PLATFORM(X86) || PLATFORM(X86_64))
+#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
static void makeWritable(void* start, size_t size)
{
reprotectRegion(start, size, Writable);
@@ -165,58 +165,47 @@ public:
static void makeExecutable(void* start, size_t size)
{
reprotectRegion(start, size, Executable);
- cacheFlush(start, size);
}
-
- // If ASSEMBLER_WX_EXCLUSIVE protection is turned on, or on non-x86 platforms,
- // we need to track start & size so we can makeExecutable/cacheFlush at the end.
- class MakeWritable {
- public:
- MakeWritable(void* start, size_t size)
- : m_start(start)
- , m_size(size)
- {
- makeWritable(start, size);
- }
-
- ~MakeWritable()
- {
- makeExecutable(m_start, m_size);
- }
-
- private:
- void* m_start;
- size_t m_size;
- };
#else
static void makeWritable(void*, size_t) {}
static void makeExecutable(void*, size_t) {}
-
- // On x86, without ASSEMBLER_WX_EXCLUSIVE, there is nothing to do here.
- class MakeWritable { public: MakeWritable(void*, size_t) {} };
#endif
-private:
-
-#if ENABLE(ASSEMBLER_WX_EXCLUSIVE) || !(PLATFORM(X86) || PLATFORM(X86_64))
-#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
- static void reprotectRegion(void*, size_t, ProtectionSeting);
-#else
- static void reprotectRegion(void*, size_t, ProtectionSeting) {}
-#endif
- static void cacheFlush(void* code, size_t size)
- {
#if PLATFORM(X86) || PLATFORM(X86_64)
- UNUSED_PARAM(code);
- UNUSED_PARAM(size);
+ static void cacheFlush(void*, size_t)
+ {
+ }
#elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE)
+ static void cacheFlush(void* code, size_t size)
+ {
sys_dcache_flush(code, size);
sys_icache_invalidate(code, size);
-#else
-#error "ExecutableAllocator::cacheFlush not implemented on this platform."
-#endif
}
+#elif PLATFORM(ARM)
+ static void cacheFlush(void* code, size_t size)
+ {
+ #if COMPILER(GCC) && (GCC_VERSION >= 30406)
+ __clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(code) + size);
+ #else
+ const int syscall = 0xf0002;
+ __asm __volatile (
+ "mov r0, %0\n"
+ "mov r1, %1\n"
+ "mov r7, %2\n"
+ "mov r2, #0x0\n"
+ "swi 0x00000000\n"
+ :
+ : "r" (code), "r" (reinterpret_cast<char*>(code) + size), "r" (syscall)
+ : "r0", "r1", "r7");
+ #endif // COMPILER(GCC) && (GCC_VERSION >= 30406)
+ }
+#endif
+
+private:
+
+#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
+ static void reprotectRegion(void*, size_t, ProtectionSeting);
#endif
RefPtr<ExecutablePool> m_smallAllocationPool;
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
index f1b22c0..a0e462b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
@@ -26,6 +26,12 @@
#include "config.h"
#include "JIT.h"
+// This probably does not belong here; adding here for now as a quick Windows build fix.
+#if ENABLE(ASSEMBLER) && PLATFORM(X86) && !PLATFORM(MAC)
+#include "MacroAssembler.h"
+JSC::MacroAssemblerX86Common::SSE2CheckState JSC::MacroAssemblerX86Common::s_sse2CheckState = NotCheckedSSE2;
+#endif
+
#if ENABLE(JIT)
#include "CodeBlock.h"
@@ -34,6 +40,8 @@
#include "JITStubCall.h"
#include "JSArray.h"
#include "JSFunction.h"
+#include "LinkBuffer.h"
+#include "RepatchBuffer.h"
#include "ResultType.h"
#include "SamplingTool.h"
@@ -45,21 +53,21 @@ using namespace std;
namespace JSC {
-void ctiPatchNearCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction)
+void ctiPatchNearCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction)
{
- MacroAssembler::RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(codeblock);
repatchBuffer.relinkNearCallerToTrampoline(returnAddress, newCalleeFunction);
}
-void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction)
+void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction)
{
- MacroAssembler::RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(codeblock);
repatchBuffer.relinkCallerToTrampoline(returnAddress, newCalleeFunction);
}
-void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction)
+void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction)
{
- MacroAssembler::RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(codeblock);
repatchBuffer.relinkCallerToFunction(returnAddress, newCalleeFunction);
}
@@ -396,7 +404,7 @@ void JIT::privateCompile()
#endif
// Could use a pop_m, but would need to offset the following instruction if so.
- preverveReturnAddressAfterCall(regT2);
+ preserveReturnAddressAfterCall(regT2);
emitPutToCallFrameHeader(regT2, RegisterFile::ReturnPC);
Jump slowRegisterFileCheck;
@@ -488,6 +496,7 @@ void JIT::privateCompile()
#if ENABLE(JIT_OPTIMIZE_CALL)
for (unsigned i = 0; i < m_codeBlock->numberOfCallLinkInfos(); ++i) {
CallLinkInfo& info = m_codeBlock->callLinkInfo(i);
+ info.ownerCodeBlock = m_codeBlock;
info.callReturnLocation = patchBuffer.locationOfNearCall(m_callStructureStubCompilationInfo[i].callReturnLocation);
info.hotPathBegin = patchBuffer.locationOf(m_callStructureStubCompilationInfo[i].hotPathBegin);
info.hotPathOther = patchBuffer.locationOfNearCall(m_callStructureStubCompilationInfo[i].hotPathOther);
@@ -553,7 +562,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_body)), regT3);
loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionBodyNode, m_code)), regT0);
Jump hasCodeBlock1 = branchTestPtr(NonZero, regT0);
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
restoreArgumentReference();
Call callJSFunction1 = call();
emitGetJITStubArg(1, regT2);
@@ -565,7 +574,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
// Check argCount matches callee arity.
Jump arityCheckOkay1 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1);
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
emitPutJITStubArg(regT3, 2);
emitPutJITStubArg(regT0, 4);
restoreArgumentReference();
@@ -579,7 +588,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
compileOpCallInitializeCallFrame();
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
emitPutJITStubArg(regT3, 2);
restoreArgumentReference();
Call callDontLazyLinkCall = call();
@@ -594,7 +603,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_body)), regT3);
loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionBodyNode, m_code)), regT0);
Jump hasCodeBlock2 = branchTestPtr(NonZero, regT0);
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
restoreArgumentReference();
Call callJSFunction2 = call();
emitGetJITStubArg(1, regT2);
@@ -606,7 +615,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
// Check argCount matches callee arity.
Jump arityCheckOkay2 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1);
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
emitPutJITStubArg(regT3, 2);
emitPutJITStubArg(regT0, 4);
restoreArgumentReference();
@@ -620,7 +629,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
compileOpCallInitializeCallFrame();
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
emitPutJITStubArg(regT3, 2);
restoreArgumentReference();
Call callLazyLinkCall = call();
@@ -634,7 +643,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
loadPtr(Address(regT2, OBJECT_OFFSETOF(JSFunction, m_body)), regT3);
loadPtr(Address(regT3, OBJECT_OFFSETOF(FunctionBodyNode, m_code)), regT0);
Jump hasCodeBlock3 = branchTestPtr(NonZero, regT0);
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
restoreArgumentReference();
Call callJSFunction3 = call();
emitGetJITStubArg(1, regT2);
@@ -647,7 +656,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
// Check argCount matches callee arity.
Jump arityCheckOkay3 = branch32(Equal, Address(regT0, OBJECT_OFFSETOF(CodeBlock, m_numParameters)), regT1);
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
emitPutJITStubArg(regT3, 2);
emitPutJITStubArg(regT0, 4);
restoreArgumentReference();
@@ -668,7 +677,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
Label nativeCallThunk = align();
- preverveReturnAddressAfterCall(regT0);
+ preserveReturnAddressAfterCall(regT0);
emitPutToCallFrameHeader(regT0, RegisterFile::ReturnPC); // Push return address
// Load caller frame's scope chain into this callframe so that whatever we call can
@@ -903,14 +912,14 @@ void JIT::unlinkCall(CallLinkInfo* callLinkInfo)
// When the JSFunction is deleted the pointer embedded in the instruction stream will no longer be valid
// (and, if a new JSFunction happened to be constructed at the same location, we could get a false positive
// match). Reset the check so it no longer matches.
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock);
repatchBuffer.repatch(callLinkInfo->hotPathBegin, JSValue::encode(JSValue()));
}
-void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData)
+void JIT::linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData)
{
ASSERT(calleeCodeBlock);
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(callerCodeBlock);
// Currently we only link calls with the exact number of arguments.
// If this is a native call calleeCodeBlock is null so the number of parameters is unimportant
@@ -931,12 +940,3 @@ void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code
} // namespace JSC
#endif // ENABLE(JIT)
-
-// This probably does not belong here; adding here for now as a quick Windows build fix.
-#if ENABLE(ASSEMBLER)
-
-#if PLATFORM(X86) && !PLATFORM(MAC)
-JSC::MacroAssemblerX86Common::SSE2CheckState JSC::MacroAssemblerX86Common::s_sse2CheckState = NotCheckedSSE2;
-#endif
-
-#endif
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h
index db3f38a..ceffe59 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h
@@ -171,9 +171,9 @@ namespace JSC {
};
// Near calls can only be patched to other JIT code, regular calls can be patched to JIT code or relinked to stub functions.
- void ctiPatchNearCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction);
- void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction);
- void ctiPatchCallByReturnAddress(ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction);
+ void ctiPatchNearCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction);
+ void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, MacroAssemblerCodePtr newCalleeFunction);
+ void ctiPatchCallByReturnAddress(CodeBlock* codeblock, ReturnAddressPtr returnAddress, FunctionPtr newCalleeFunction);
class JIT : private MacroAssembler {
friend class JITStubCall;
@@ -379,9 +379,9 @@ namespace JSC {
jit.privateCompileCTIMachineTrampolines(executablePool, globalData, ctiArrayLengthTrampoline, ctiStringLengthTrampoline, ctiVirtualCallPreLink, ctiVirtualCallLink, ctiVirtualCall, ctiNativeCallThunk);
}
- static void patchGetByIdSelf(StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress);
- static void patchPutByIdReplace(StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress);
- static void patchMethodCallProto(MethodCallLinkInfo&, JSFunction*, Structure*, JSObject*);
+ static void patchGetByIdSelf(CodeBlock* codeblock, StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress);
+ static void patchPutByIdReplace(CodeBlock* codeblock, StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress);
+ static void patchMethodCallProto(CodeBlock* codeblock, MethodCallLinkInfo&, JSFunction*, Structure*, JSObject*);
static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, ReturnAddressPtr returnAddress)
{
@@ -389,7 +389,7 @@ namespace JSC {
return jit.privateCompilePatchGetArrayLength(returnAddress);
}
- static void linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode&, CallLinkInfo*, int callerArgCount, JSGlobalData*);
+ static void linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, JITCode&, CallLinkInfo*, int callerArgCount, JSGlobalData*);
static void unlinkCall(CallLinkInfo*);
private:
@@ -663,7 +663,7 @@ namespace JSC {
void restoreArgumentReferenceForTrampoline();
Call emitNakedCall(CodePtr function = CodePtr());
- void preverveReturnAddressAfterCall(RegisterID);
+ void preserveReturnAddressAfterCall(RegisterID);
void restoreReturnAddressBeforeReturn(RegisterID);
void restoreReturnAddressBeforeReturn(Address);
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h
index 7ee644b..b502c8a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h
@@ -83,13 +83,16 @@ namespace JSC {
m_ref.m_code.executableAddress(), registerFile, callFrame, exception, Profiler::enabledProfilerReference(), globalData));
}
-#ifndef NDEBUG
+ void* start()
+ {
+ return m_ref.m_code.dataLocation();
+ }
+
size_t size()
{
ASSERT(m_ref.m_code.executableAddress());
return m_ref.m_size;
}
-#endif
ExecutablePool* getExecutablePool()
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h
index deca0d1..f03d635 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h
@@ -179,7 +179,7 @@ ALWAYS_INLINE JIT::Call JIT::emitNakedCall(CodePtr function)
#if PLATFORM(X86) || PLATFORM(X86_64)
-ALWAYS_INLINE void JIT::preverveReturnAddressAfterCall(RegisterID reg)
+ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg)
{
pop(reg);
}
@@ -196,7 +196,7 @@ ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(Address address)
#elif PLATFORM_ARM_ARCH(7)
-ALWAYS_INLINE void JIT::preverveReturnAddressAfterCall(RegisterID reg)
+ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg)
{
move(linkRegister, reg);
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp
index ed8f48f..c1e5c29 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess.cpp
@@ -34,6 +34,8 @@
#include "JSArray.h"
#include "JSFunction.h"
#include "Interpreter.h"
+#include "LinkBuffer.h"
+#include "RepatchBuffer.h"
#include "ResultType.h"
#include "SamplingTool.h"
@@ -461,7 +463,7 @@ void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure
if (willNeedStorageRealloc) {
// This trampoline was called to like a JIT stub; before we can can call again we need to
// remove the return address from the stack, to prevent the stack from becoming misaligned.
- preverveReturnAddressAfterCall(regT3);
+ preserveReturnAddressAfterCall(regT3);
JITStubCall stubCall(this, JITStubs::cti_op_put_by_id_transition_realloc);
stubCall.addArgument(regT0);
@@ -501,13 +503,13 @@ void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
stubInfo->stubRoutine = entryLabel;
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relinkCallerToTrampoline(returnAddress, entryLabel);
}
-void JIT::patchGetByIdSelf(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress)
+void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress)
{
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(codeBlock);
// We don't want to patch more than once - in future go to cti_op_get_by_id_generic.
// Should probably go to JITStubs::cti_op_get_by_id_fail, but that doesn't do anything interesting right now.
@@ -525,23 +527,28 @@ void JIT::patchGetByIdSelf(StructureStubInfo* stubInfo, Structure* structure, si
repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetGetByIdPropertyMapOffset), offset);
}
-void JIT::patchMethodCallProto(MethodCallLinkInfo& methodCallLinkInfo, JSFunction* callee, Structure* structure, JSObject* proto)
+void JIT::patchMethodCallProto(CodeBlock* codeBlock, MethodCallLinkInfo& methodCallLinkInfo, JSFunction* callee, Structure* structure, JSObject* proto)
{
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(codeBlock);
ASSERT(!methodCallLinkInfo.cachedStructure);
methodCallLinkInfo.cachedStructure = structure;
structure->ref();
+ Structure* prototypeStructure = proto->structure();
+ ASSERT(!methodCallLinkInfo.cachedPrototypeStructure);
+ methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure;
+ prototypeStructure->ref();
+
repatchBuffer.repatch(methodCallLinkInfo.structureLabel, structure);
repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoObj), proto);
- repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), proto->structure());
+ repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), prototypeStructure);
repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckPutFunction), callee);
}
-void JIT::patchPutByIdReplace(StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress)
+void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress)
{
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(codeBlock);
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
// Should probably go to JITStubs::cti_op_put_by_id_fail, but that doesn't do anything interesting right now.
@@ -591,7 +598,7 @@ void JIT::privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress)
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
@@ -637,7 +644,7 @@ void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
@@ -669,7 +676,7 @@ void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Polymorphic
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
}
@@ -714,7 +721,7 @@ void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Polymorphi
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
}
@@ -768,7 +775,7 @@ void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Polymorphi
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
}
@@ -816,7 +823,7 @@ void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
- RepatchBuffer repatchBuffer;
+ RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
index 02bf7c0..5049477 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
@@ -358,7 +358,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co
// Uncacheable: give up.
if (!slot.isCacheable()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
return;
}
@@ -366,13 +366,13 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co
Structure* structure = baseCell->structure();
if (structure->isDictionary()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
return;
}
// If baseCell != base, then baseCell must be a proxy for another object.
if (baseCell != slot.base()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
return;
}
@@ -384,7 +384,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co
if (slot.type() == PutPropertySlot::NewProperty) {
StructureChain* prototypeChain = structure->prototypeChain(callFrame);
if (!prototypeChain->isCacheable()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_put_by_id_generic));
return;
}
stubInfo->initPutByIdTransition(structure->previousID(), structure, prototypeChain);
@@ -394,7 +394,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co
stubInfo->initPutByIdReplace(structure);
- JIT::patchPutByIdReplace(stubInfo, structure, slot.cachedOffset(), returnAddress);
+ JIT::patchPutByIdReplace(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress);
}
NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot)
@@ -404,7 +404,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
// FIXME: Cache property access for immediates.
if (!baseValue.isCell()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
return;
}
@@ -418,13 +418,13 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
if (isJSString(globalData, baseValue) && propertyName == callFrame->propertyNames().length) {
// The tradeoff of compiling an patched inline string length access routine does not seem
// to pay off, so we currently only do this for arrays.
- ctiPatchCallByReturnAddress(returnAddress, globalData->jitStubs.ctiStringLengthTrampoline());
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, globalData->jitStubs.ctiStringLengthTrampoline());
return;
}
// Uncacheable: give up.
if (!slot.isCacheable()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
return;
}
@@ -432,7 +432,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
Structure* structure = baseCell->structure();
if (structure->isDictionary()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
return;
}
@@ -447,7 +447,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
// set this up, so derefStructures can do it's job.
stubInfo->initGetByIdSelf(structure);
- JIT::patchGetByIdSelf(stubInfo, structure, slot.cachedOffset(), returnAddress);
+ JIT::patchGetByIdSelf(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress);
return;
}
@@ -475,7 +475,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
StructureChain* prototypeChain = structure->prototypeChain(callFrame);
if (!prototypeChain->isCacheable()) {
- ctiPatchCallByReturnAddress(returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(JITStubs::cti_op_get_by_id_generic));
return;
}
stubInfo->initGetByIdChain(structure, prototypeChain);
@@ -777,7 +777,7 @@ DEFINE_STUB_FUNCTION(void, op_put_by_id)
PutPropertySlot slot;
stackFrame.args[0].jsValue().put(callFrame, ident, stackFrame.args[2].jsValue(), slot);
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_id_second));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_id_second));
CHECK_FOR_EXCEPTION_AT_END();
}
@@ -831,7 +831,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id)
PropertySlot slot(baseValue);
JSValue result = baseValue.get(callFrame, ident, slot);
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_second));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_second));
CHECK_FOR_EXCEPTION_AT_END();
return JSValue::encode(result);
@@ -848,7 +848,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check)
PropertySlot slot(baseValue);
JSValue result = baseValue.get(callFrame, ident, slot);
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_method_check_second));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_method_check_second));
CHECK_FOR_EXCEPTION_AT_END();
return JSValue::encode(result);
@@ -900,7 +900,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check_second)
// Check to see if the function is on the object's prototype. Patch up the code to optimize.
if (slot.slotBase() == structure->prototypeForLookup(callFrame))
- JIT::patchMethodCallProto(methodCallLinkInfo, callee, structure, slotBaseObject);
+ JIT::patchMethodCallProto(callFrame->codeBlock(), methodCallLinkInfo, callee, structure, slotBaseObject);
// Check to see if the function is on the object itself.
// Since we generate the method-check to check both the structure and a prototype-structure (since this
// is the common case) we have a problem - we need to patch the prototype structure check to do something
@@ -908,13 +908,13 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check_second)
// for now. For now it performs a check on a special object on the global object only used for this
// purpose. The object is in no way exposed, and as such the check will always pass.
else if (slot.slotBase() == baseValue)
- JIT::patchMethodCallProto(methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject()->methodCallDummy());
+ JIT::patchMethodCallProto(callFrame->codeBlock(), methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject()->methodCallDummy());
// For now let any other case be cached as a normal get_by_id.
}
// Revert the get_by_id op back to being a regular get_by_id - allow it to cache like normal, if it needs to.
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id));
return JSValue::encode(result);
}
@@ -975,10 +975,9 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail)
JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), slot.cachedOffset());
if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
- } else {
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
- }
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
+ } else
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
return JSValue::encode(result);
}
@@ -1024,7 +1023,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
CHECK_FOR_EXCEPTION();
if (!baseValue.isCell() || !slot.isCacheable() || asCell(baseValue)->structure()->isDictionary()) {
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
return JSValue::encode(result);
}
@@ -1036,7 +1035,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
JSObject* slotBaseObject = asObject(slot.slotBase());
if (slot.slotBase() == baseValue)
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
else if (slot.slotBase() == asCell(baseValue)->structure()->prototypeForLookup(callFrame)) {
// Since we're accessing a prototype in a loop, it's a good bet that it
// should not be treated as a dictionary.
@@ -1049,11 +1048,11 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), slot.cachedOffset());
if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
} else if (size_t count = countPrototypeChainEntriesAndCheckForProxies(callFrame, baseValue, slot)) {
StructureChain* protoChain = structure->prototypeChain(callFrame);
if (!protoChain->isCacheable()) {
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
return JSValue::encode(result);
}
@@ -1062,9 +1061,9 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, slot.cachedOffset());
if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
} else
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
return JSValue::encode(result);
}
@@ -1271,7 +1270,7 @@ DEFINE_STUB_FUNCTION(void*, vm_dontLazyLinkCall)
JSGlobalData* globalData = stackFrame.globalData;
JSFunction* callee = asFunction(stackFrame.args[0].jsValue());
- ctiPatchNearCallByReturnAddress(stackFrame.args[1].returnAddress(), globalData->jitStubs.ctiVirtualCallLink());
+ ctiPatchNearCallByReturnAddress(stackFrame.callFrame->callerFrame()->codeBlock(), stackFrame.args[1].returnAddress(), globalData->jitStubs.ctiVirtualCallLink());
return callee->body()->generatedJITCode().addressForCall().executableAddress();
}
@@ -1290,7 +1289,7 @@ DEFINE_STUB_FUNCTION(void*, vm_lazyLinkCall)
codeBlock = &callee->body()->generatedBytecode();
CallLinkInfo* callLinkInfo = &stackFrame.callFrame->callerFrame()->codeBlock()->getCallLinkInfo(stackFrame.args[1].returnAddress());
- JIT::linkCall(callee, codeBlock, jitCode, callLinkInfo, stackFrame.args[2].int32(), stackFrame.globalData);
+ JIT::linkCall(callee, stackFrame.callFrame->callerFrame()->codeBlock(), codeBlock, jitCode, callLinkInfo, stackFrame.args[2].int32(), stackFrame.globalData);
return jitCode.addressForCall().executableAddress();
}
@@ -1530,11 +1529,11 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val)
result = jsArray->JSArray::get(callFrame, i);
} else if (isJSString(globalData, baseValue) && asString(baseValue)->canGetIndex(i)) {
// All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks.
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_string));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_string));
result = asString(baseValue)->getIndex(stackFrame.globalData, i);
} else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) {
// All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks.
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_byte_array));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_byte_array));
return JSValue::encode(asByteArray(baseValue)->getIndex(callFrame, i));
} else
result = baseValue.get(callFrame, i);
@@ -1566,7 +1565,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val_string)
else {
result = baseValue.get(callFrame, i);
if (!isJSString(globalData, baseValue))
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val));
}
} else {
Identifier property(callFrame, subscript.toString(callFrame));
@@ -1599,7 +1598,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_val_byte_array)
result = baseValue.get(callFrame, i);
if (!isJSByteArray(globalData, baseValue))
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val));
} else {
Identifier property(callFrame, subscript.toString(callFrame));
result = baseValue.get(callFrame, property);
@@ -1692,7 +1691,7 @@ DEFINE_STUB_FUNCTION(void, op_put_by_val)
jsArray->JSArray::put(callFrame, i, value);
} else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) {
JSByteArray* jsByteArray = asByteArray(baseValue);
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val_byte_array));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val_byte_array));
// All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks.
if (value.isInt32Fast()) {
jsByteArray->setIndex(i, value.getInt32Fast());
@@ -1776,7 +1775,7 @@ DEFINE_STUB_FUNCTION(void, op_put_by_val_byte_array)
}
if (!isJSByteArray(globalData, baseValue))
- ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val));
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val));
baseValue.put(callFrame, i, value);
} else {
Identifier property(callFrame, subscript.toString(callFrame));
diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
index 769169b..190deff 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
@@ -221,7 +221,7 @@ JSValue JSC_HOST_CALL functionDebug(ExecState* exec, JSObject*, JSValue, const A
JSValue JSC_HOST_CALL functionGC(ExecState* exec, JSObject*, JSValue, const ArgList&)
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
exec->heap()->collect();
return jsUndefined();
}
@@ -375,7 +375,7 @@ int main(int argc, char** argv)
static void cleanupGlobalData(JSGlobalData* globalData)
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
globalData->heap.destroy();
globalData->deref();
}
@@ -550,7 +550,7 @@ static void parseArguments(int argc, char** argv, Options& options, JSGlobalData
int jscmain(int argc, char** argv, JSGlobalData* globalData)
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
Options options;
parseArguments(argc, argv, options, globalData);
diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.pro b/src/3rdparty/webkit/JavaScriptCore/jsc.pro
new file mode 100644
index 0000000..ba880ff
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/jsc.pro
@@ -0,0 +1,31 @@
+TEMPLATE = app
+TARGET = jsc
+DESTDIR = .
+SOURCES = jsc.cpp
+QT -= gui
+CONFIG -= app_bundle
+CONFIG += building-libs
+win32-*: CONFIG += console
+win32-msvc*: CONFIG += exceptions_off stl_off
+
+include($$PWD/../WebKit.pri)
+
+CONFIG += link_pkgconfig
+
+QMAKE_RPATHDIR += $$OUTPUT_DIR/lib
+
+isEmpty(OUTPUT_DIR):OUTPUT_DIR=$$PWD/..
+CONFIG(debug, debug|release) {
+ OBJECTS_DIR = obj/debug
+} else { # Release
+ OBJECTS_DIR = obj/release
+}
+OBJECTS_DIR_WTR = $$OBJECTS_DIR$${QMAKE_DIR_SEP}
+include($$PWD/JavaScriptCore.pri)
+
+lessThan(QT_MINOR_VERSION, 4) {
+ DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE=""
+}
+
+*-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2
+*-g++*:QMAKE_CXXFLAGS_RELEASE += -O3
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y b/src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y
index c5ca425..354c786 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/Grammar.y
@@ -36,8 +36,12 @@
#include "CommonIdentifiers.h"
#include "NodeInfo.h"
#include "Parser.h"
+#include <wtf/FastMalloc.h>
#include <wtf/MathExtras.h>
+#define YYMALLOC fastMalloc
+#define YYFREE fastFree
+
#define YYMAXDEPTH 10000
#define YYENABLE_NLS 0
@@ -88,12 +92,6 @@ static ExpressionNode* combineCommaNodes(void*, ExpressionNode* list, Expression
#pragma warning(disable: 4244)
#pragma warning(disable: 4702)
-// At least some of the time, the declarations of malloc and free that bison
-// generates are causing warnings. A way to avoid this is to explicitly define
-// the macros so that bison doesn't try to declare malloc and free.
-#define YYMALLOC malloc
-#define YYFREE free
-
#endif
#define YYPARSE_PARAM globalPtr
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h b/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h
index 0e1b618..2583162 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h
@@ -33,7 +33,7 @@ namespace JSC {
class RegExp;
- class Lexer : Noncopyable {
+ class Lexer : public Noncopyable {
public:
// Character manipulation functions.
static bool isWhiteSpace(int character);
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp
index 105ceaf..6c0d1af 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp
@@ -495,6 +495,8 @@ static RegisterID* emitPreIncOrDec(BytecodeGenerator& generator, RegisterID* src
static RegisterID* emitPostIncOrDec(BytecodeGenerator& generator, RegisterID* dst, RegisterID* srcDst, Operator oper)
{
+ if (srcDst == dst)
+ return generator.emitToJSNumber(dst, srcDst);
return (oper == OpPlusPlus) ? generator.emitPostInc(dst, srcDst) : generator.emitPostDec(dst, srcDst);
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h
index 34b4497..84e8b95 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h
@@ -113,7 +113,7 @@ namespace JSC {
void operator delete(void*);
};
- class ParserArenaRefCounted : public RefCounted<ParserArenaRefCounted> {
+ class ParserArenaRefCounted : public RefCountedCustomAllocated<ParserArenaRefCounted> {
protected:
ParserArenaRefCounted(JSGlobalData*);
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h b/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h
index 6f4c2b7..373dc00 100644
--- a/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h
+++ b/src/3rdparty/webkit/JavaScriptCore/parser/Parser.h
@@ -39,7 +39,7 @@ namespace JSC {
template <typename T> struct ParserArenaData : ParserArenaDeletable { T data; };
- class Parser : Noncopyable {
+ class Parser : public Noncopyable {
public:
template <class ParsedNode> PassRefPtr<ParsedNode> parse(ExecState*, Debugger*, const SourceCode&, int* errLine = 0, UString* errMsg = 0);
template <class ParsedNode> PassRefPtr<ParsedNode> reparse(JSGlobalData*, ParsedNode*);
diff --git a/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp b/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp
index af770f3..16619d4 100644
--- a/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/pcre/pcre_exec.cpp
@@ -112,7 +112,7 @@ struct BracketChainNode {
const UChar* bracketStart;
};
-struct MatchFrame {
+struct MatchFrame : FastAllocBase {
ReturnLocation returnLocation;
struct MatchFrame* previousFrame;
diff --git a/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h b/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h
index b37f613..869f419 100644
--- a/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h
+++ b/src/3rdparty/webkit/JavaScriptCore/profiler/Profiler.h
@@ -44,7 +44,7 @@ namespace JSC {
class ProfileGenerator;
class UString;
- class Profiler {
+ class Profiler : public FastAllocBase {
public:
static Profiler** enabledProfilerReference()
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h b/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h
index 4d571fc..0899e85 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/ArgList.h
@@ -31,7 +31,7 @@
namespace JSC {
- class MarkedArgumentBuffer : Noncopyable {
+ class MarkedArgumentBuffer : public Noncopyable {
private:
static const unsigned inlineCapacity = 8;
typedef Vector<Register, inlineCapacity> VectorType;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h b/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h
index 13dd95c..b9f738f 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h
@@ -32,7 +32,7 @@
namespace JSC {
- class BatchedTransitionOptimizer : Noncopyable {
+ class BatchedTransitionOptimizer : public Noncopyable {
public:
BatchedTransitionOptimizer(JSObject* object)
: m_object(object)
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
index 0ff97b8..bc5582c 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
@@ -48,6 +48,11 @@
#include <mach/thread_act.h>
#include <mach/vm_map.h>
+#elif PLATFORM(SYMBIAN)
+#include <e32std.h>
+#include <e32cmn.h>
+#include <unistd.h>
+
#elif PLATFORM(WIN_OS)
#include <windows.h>
@@ -84,6 +89,13 @@ extern int *__libc_stack_end;
#include <pthread_np.h>
#endif
+#if PLATFORM(QNX)
+#include <fcntl.h>
+#include <sys/procfs.h>
+#include <stdio.h>
+#include <errno.h>
+#endif
+
#endif
#define DEBUG_COLLECTOR 0
@@ -103,6 +115,11 @@ const size_t ALLOCATIONS_PER_COLLECTION = 4000;
// a PIC branch in Mach-O binaries, see <rdar://problem/5971391>.
#define MIN_ARRAY_SIZE (static_cast<size_t>(14))
+#if PLATFORM(SYMBIAN)
+const size_t MAX_NUM_BLOCKS = 256; // Max size of collector heap set to 16 MB
+static RHeap* userChunk = 0;
+#endif
+
static void freeHeap(CollectorHeap*);
#if ENABLE(JSC_MULTIPLE_THREADS)
@@ -144,6 +161,26 @@ Heap::Heap(JSGlobalData* globalData)
{
ASSERT(globalData);
+#if PLATFORM(SYMBIAN)
+ // Symbian OpenC supports mmap but currently not the MAP_ANON flag.
+ // Using fastMalloc() does not properly align blocks on 64k boundaries
+ // and previous implementation was flawed/incomplete.
+ // UserHeap::ChunkHeap allows allocation of continuous memory and specification
+ // of alignment value for (symbian) cells within that heap.
+ //
+ // Clarification and mapping of terminology:
+ // RHeap (created by UserHeap::ChunkHeap below) is continuos memory chunk,
+ // which can dynamically grow up to 8 MB,
+ // that holds all CollectorBlocks of this session (static).
+ // Each symbian cell within RHeap maps to a 64kb aligned CollectorBlock.
+ // JSCell objects are maintained as usual within CollectorBlocks.
+ if (!userChunk) {
+ userChunk = UserHeap::ChunkHeap(0, 0, MAX_NUM_BLOCKS * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE);
+ if (!userChunk)
+ CRASH();
+ }
+#endif // PLATFORM(SYMBIAN)
+
memset(&primaryHeap, 0, sizeof(CollectorHeap));
memset(&numberHeap, 0, sizeof(CollectorHeap));
}
@@ -156,7 +193,7 @@ Heap::~Heap()
void Heap::destroy()
{
- JSLock lock(false);
+ JSLock lock(SilenceAssertionsOnly);
if (!m_globalData)
return;
@@ -201,8 +238,12 @@ static NEVER_INLINE CollectorBlock* allocateBlock()
// FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>.
vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
#elif PLATFORM(SYMBIAN)
- // no memory map in symbian, need to hack with fastMalloc
- void* address = fastMalloc(BLOCK_SIZE);
+ // Allocate a 64 kb aligned CollectorBlock
+ unsigned char* mask = reinterpret_cast<unsigned char*>(userChunk->Alloc(BLOCK_SIZE));
+ if (!mask)
+ CRASH();
+ uintptr_t address = reinterpret_cast<uintptr_t>(mask);
+
memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
#elif PLATFORM(WIN_OS)
// windows virtual address granularity is naturally 64k
@@ -247,7 +288,7 @@ static void freeBlock(CollectorBlock* block)
#if PLATFORM(DARWIN)
vm_deallocate(current_task(), reinterpret_cast<vm_address_t>(block), BLOCK_SIZE);
#elif PLATFORM(SYMBIAN)
- fastFree(block);
+ userChunk->Free(reinterpret_cast<TAny*>(block));
#elif PLATFORM(WIN_OS)
VirtualFree(block, 0, MEM_RELEASE);
#elif HAVE(POSIX_MEMALIGN)
@@ -546,6 +587,24 @@ static inline void* currentThreadStackBase()
static pthread_t stackThread;
pthread_t thread = pthread_self();
if (stackBase == 0 || thread != stackThread) {
+#if PLATFORM(QNX)
+ int fd;
+ struct _debug_thread_info tinfo;
+ memset(&tinfo, 0, sizeof(tinfo));
+ tinfo.tid = pthread_self();
+ fd = open("/proc/self", O_RDONLY);
+ if (fd == -1) {
+#ifndef NDEBUG
+ perror("Unable to open /proc/self:");
+#endif
+ return 0;
+ }
+ devctl(fd, DCMD_PROC_TIDSTATUS, &tinfo, sizeof(tinfo), NULL);
+ close(fd);
+ stackBase = (void*)tinfo.stkbase;
+ stackSize = tinfo.stksize;
+ ASSERT(stackBase);
+#else
#if defined(QT_LINUXBASE)
// LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead
// see http://bugs.linuxbase.org/show_bug.cgi?id=2364
@@ -570,6 +629,7 @@ static inline void* currentThreadStackBase()
(void)rc; // FIXME: Deal with error code somehow? Seems fatal.
ASSERT(stackBase);
pthread_attr_destroy(&sattr);
+#endif
stackThread = thread;
}
return static_cast<char*>(stackBase) + stackSize;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
index 23f9f15..852ac59 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
@@ -63,7 +63,7 @@ namespace JSC {
OperationInProgress operationInProgress;
};
- class Heap : Noncopyable {
+ class Heap : public Noncopyable {
public:
class Thread;
typedef CollectorHeapIterator<PrimaryHeap> iterator;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h b/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h
index 408d819..7b275bd 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h
@@ -70,7 +70,7 @@
namespace JSC {
- class CommonIdentifiers : Noncopyable {
+ class CommonIdentifiers : public Noncopyable {
private:
CommonIdentifiers(JSGlobalData*);
friend class JSGlobalData;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp
index 040c123..7db723b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Identifier.cpp
@@ -32,7 +32,7 @@ namespace JSC {
typedef HashMap<const char*, RefPtr<UString::Rep>, PtrHash<const char*> > LiteralIdentifierTable;
-class IdentifierTable {
+class IdentifierTable : public FastAllocBase {
public:
~IdentifierTable()
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h
index e0a9b4d..32aa22b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSCell.h
@@ -31,7 +31,7 @@
namespace JSC {
- class JSCell : Noncopyable {
+ class JSCell : public NoncopyableCustomAllocated {
friend class GetterSetter;
friend class Heap;
friend class JIT;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h
index 983274b..7ab759d 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h
@@ -391,7 +391,7 @@ namespace JSC {
return globalData().dynamicGlobalObject;
}
- class DynamicGlobalObjectScope : Noncopyable {
+ class DynamicGlobalObjectScope : public Noncopyable {
public:
DynamicGlobalObjectScope(CallFrame* callFrame, JSGlobalObject* dynamicGlobalObject)
: m_dynamicGlobalObjectSlot(callFrame->globalData().dynamicGlobalObject)
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp
index 7ece5da..8f056c8 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.cpp
@@ -60,23 +60,23 @@ static void setLockCount(intptr_t count)
}
JSLock::JSLock(ExecState* exec)
- : m_lockingForReal(exec->globalData().isSharedInstance)
+ : m_lockBehavior(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly)
{
- lock(m_lockingForReal);
+ lock(m_lockBehavior);
}
-void JSLock::lock(bool lockForReal)
+void JSLock::lock(JSLockBehavior lockBehavior)
{
#ifdef NDEBUG
// Locking "not for real" is a debug-only feature.
- if (!lockForReal)
+ if (lockBehavior == SilenceAssertionsOnly)
return;
#endif
pthread_once(&createJSLockCountOnce, createJSLockCount);
intptr_t currentLockCount = lockCount();
- if (!currentLockCount && lockForReal) {
+ if (!currentLockCount && lockBehavior == LockForReal) {
int result;
result = pthread_mutex_lock(&JSMutex);
ASSERT(!result);
@@ -84,19 +84,19 @@ void JSLock::lock(bool lockForReal)
setLockCount(currentLockCount + 1);
}
-void JSLock::unlock(bool lockForReal)
+void JSLock::unlock(JSLockBehavior lockBehavior)
{
ASSERT(lockCount());
#ifdef NDEBUG
// Locking "not for real" is a debug-only feature.
- if (!lockForReal)
+ if (lockBehavior == SilenceAssertionsOnly)
return;
#endif
intptr_t newLockCount = lockCount() - 1;
setLockCount(newLockCount);
- if (!newLockCount && lockForReal) {
+ if (!newLockCount && lockBehavior == LockForReal) {
int result;
result = pthread_mutex_unlock(&JSMutex);
ASSERT(!result);
@@ -105,12 +105,12 @@ void JSLock::unlock(bool lockForReal)
void JSLock::lock(ExecState* exec)
{
- lock(exec->globalData().isSharedInstance);
+ lock(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly);
}
void JSLock::unlock(ExecState* exec)
{
- unlock(exec->globalData().isSharedInstance);
+ unlock(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly);
}
bool JSLock::currentThreadIsHoldingLock()
@@ -162,7 +162,7 @@ bool JSLock::currentThreadIsHoldingLock()
static unsigned lockDropDepth = 0;
JSLock::DropAllLocks::DropAllLocks(ExecState* exec)
- : m_lockingForReal(exec->globalData().isSharedInstance)
+ : m_lockBehavior(exec->globalData().isSharedInstance ? LockForReal : SilenceAssertionsOnly)
{
pthread_once(&createJSLockCountOnce, createJSLockCount);
@@ -173,11 +173,11 @@ JSLock::DropAllLocks::DropAllLocks(ExecState* exec)
m_lockCount = JSLock::lockCount();
for (intptr_t i = 0; i < m_lockCount; i++)
- JSLock::unlock(m_lockingForReal);
+ JSLock::unlock(m_lockBehavior);
}
-JSLock::DropAllLocks::DropAllLocks(bool lockingForReal)
- : m_lockingForReal(lockingForReal)
+JSLock::DropAllLocks::DropAllLocks(JSLockBehavior JSLockBehavior)
+ : m_lockBehavior(JSLockBehavior)
{
pthread_once(&createJSLockCountOnce, createJSLockCount);
@@ -191,13 +191,13 @@ JSLock::DropAllLocks::DropAllLocks(bool lockingForReal)
m_lockCount = JSLock::lockCount();
for (intptr_t i = 0; i < m_lockCount; i++)
- JSLock::unlock(m_lockingForReal);
+ JSLock::unlock(m_lockBehavior);
}
JSLock::DropAllLocks::~DropAllLocks()
{
for (intptr_t i = 0; i < m_lockCount; i++)
- JSLock::lock(m_lockingForReal);
+ JSLock::lock(m_lockBehavior);
--lockDropDepth;
}
@@ -205,7 +205,7 @@ JSLock::DropAllLocks::~DropAllLocks()
#else
JSLock::JSLock(ExecState*)
- : m_lockingForReal(false)
+ : m_lockBehavior(SilenceAssertionsOnly)
{
}
@@ -221,11 +221,11 @@ bool JSLock::currentThreadIsHoldingLock()
return true;
}
-void JSLock::lock(bool)
+void JSLock::lock(JSLockBehavior)
{
}
-void JSLock::unlock(bool)
+void JSLock::unlock(JSLockBehavior)
{
}
@@ -241,7 +241,7 @@ JSLock::DropAllLocks::DropAllLocks(ExecState*)
{
}
-JSLock::DropAllLocks::DropAllLocks(bool)
+JSLock::DropAllLocks::DropAllLocks(JSLockBehavior)
{
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h
index 3dde358..8b015c4 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSLock.h
@@ -50,50 +50,52 @@ namespace JSC {
class ExecState;
- class JSLock : Noncopyable {
+ enum JSLockBehavior { SilenceAssertionsOnly, LockForReal };
+
+ class JSLock : public Noncopyable {
public:
JSLock(ExecState*);
- JSLock(bool lockingForReal)
- : m_lockingForReal(lockingForReal)
+ JSLock(JSLockBehavior lockBehavior)
+ : m_lockBehavior(lockBehavior)
{
#ifdef NDEBUG
// Locking "not for real" is a debug-only feature.
- if (!lockingForReal)
+ if (lockBehavior == SilenceAssertionsOnly)
return;
#endif
- lock(lockingForReal);
+ lock(lockBehavior);
}
~JSLock()
{
#ifdef NDEBUG
// Locking "not for real" is a debug-only feature.
- if (!m_lockingForReal)
+ if (m_lockBehavior == SilenceAssertionsOnly)
return;
#endif
- unlock(m_lockingForReal);
+ unlock(m_lockBehavior);
}
- static void lock(bool);
- static void unlock(bool);
+ static void lock(JSLockBehavior);
+ static void unlock(JSLockBehavior);
static void lock(ExecState*);
static void unlock(ExecState*);
static intptr_t lockCount();
static bool currentThreadIsHoldingLock();
- bool m_lockingForReal;
+ JSLockBehavior m_lockBehavior;
- class DropAllLocks : Noncopyable {
+ class DropAllLocks : public Noncopyable {
public:
DropAllLocks(ExecState* exec);
- DropAllLocks(bool);
+ DropAllLocks(JSLockBehavior);
~DropAllLocks();
private:
intptr_t m_lockCount;
- bool m_lockingForReal;
+ JSLockBehavior m_lockBehavior;
};
};
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp
index 4a89c55..2f02b1d 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSONObject.cpp
@@ -61,7 +61,7 @@ private:
mutable JSValue m_value;
};
-class Stringifier : Noncopyable {
+class Stringifier : public Noncopyable {
public:
Stringifier(ExecState*, JSValue replacer, JSValue space);
~Stringifier();
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp
index 87b49f0..9d1f01a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.cpp
@@ -34,7 +34,7 @@
namespace JSC {
static const unsigned numCharactersToStore = 0x100;
-class SmallStringsStorage : Noncopyable {
+class SmallStringsStorage : public Noncopyable {
public:
SmallStringsStorage();
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h
index e7f1170..f0dd8df 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/SmallStrings.h
@@ -36,7 +36,7 @@ namespace JSC {
class SmallStringsStorage;
- class SmallStrings : Noncopyable {
+ class SmallStrings : public Noncopyable {
public:
SmallStrings();
~SmallStrings();
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp
index 098186e..819ed9a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,6 +46,10 @@
#include <crtdbg.h>
#endif
+#if PLATFORM(WINCE)
+#include <winbase.h>
+#endif
+
extern "C" {
WTF_ATTRIBUTE_PRINTF(1, 0)
@@ -66,7 +71,7 @@ static void vprintf_stderr_common(const char* format, va_list args)
CFRelease(str);
CFRelease(cfFormat);
} else
-#elif COMPILER(MSVC) && !PLATFORM(WINCE)
+#elif COMPILER(MSVC) && !defined(WINCEBASIC)
if (IsDebuggerPresent()) {
size_t size = 1024;
@@ -77,7 +82,20 @@ static void vprintf_stderr_common(const char* format, va_list args)
break;
if (_vsnprintf(buffer, size, format, args) != -1) {
+#if PLATFORM(WINCE)
+ // WinCE only supports wide chars
+ wchar_t* wideBuffer = (wchar_t*)malloc(size * sizeof(wchar_t));
+ if (wideBuffer == NULL)
+ break;
+ for (unsigned int i = 0; i < size; ++i) {
+ if (!(wideBuffer[i] = buffer[i]))
+ break;
+ }
+ OutputDebugStringW(wideBuffer);
+ free(wideBuffer);
+#else
OutputDebugStringA(buffer);
+#endif
free(buffer);
break;
}
@@ -101,7 +119,7 @@ static void printf_stderr_common(const char* format, ...)
static void printCallSite(const char* file, int line, const char* function)
{
-#if PLATFORM(WIN) && defined _DEBUG
+#if PLATFORM(WIN) && !PLATFORM(WINCE) && defined _DEBUG
_CrtDbgReport(_CRT_WARN, file, line, NULL, "%s\n", function);
#else
printf_stderr_common("(%s:%d %s)\n", file, line, function);
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h
index ad66d06..59efd84 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h
@@ -136,8 +136,8 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
#undef ERROR
#endif
-#if PLATFORM(WIN_OS)
-/* FIXME: Change to use something other than ASSERT to avoid this conflict with win32. */
+#if PLATFORM(WIN_OS) || PLATFORM(SYMBIAN)
+/* FIXME: Change to use something other than ASSERT to avoid this conflict with the underlying platform */
#undef ASSERT
#endif
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h b/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h
index 33f0877..96e9cc2 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h
@@ -26,8 +26,8 @@
#ifndef ByteArray_h
#define ByteArray_h
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
namespace WTF {
class ByteArray : public RefCountedBase {
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h b/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h
index 281dfa6..6a05211 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/CrossThreadRefCounted.h
@@ -51,7 +51,7 @@ namespace WTF {
// with respect to the original and any other copies. The underlying m_data is jointly
// owned by the original instance and all copies.
template<class T>
- class CrossThreadRefCounted : Noncopyable {
+ class CrossThreadRefCounted : public Noncopyable {
public:
static PassRefPtr<CrossThreadRefCounted<T> > create(T* data)
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp
index 47c9d44..0b76649 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
@@ -375,14 +376,19 @@ static int32_t calculateUTCOffset()
localt.tm_wday = 0;
localt.tm_yday = 0;
localt.tm_isdst = 0;
-#if PLATFORM(WIN_OS) || PLATFORM(SOLARIS) || COMPILER(RVCT)
+#if HAVE(TM_GMTOFF)
+ localt.tm_gmtoff = 0;
+#endif
+#if HAVE(TM_ZONE)
+ localt.tm_zone = 0;
+#endif
+
+#if HAVE(TIMEGM)
+ time_t utcOffset = timegm(&localt) - mktime(&localt);
+#else
// Using a canned date of 01/01/2009 on platforms with weaker date-handling foo.
localt.tm_year = 109;
time_t utcOffset = 1230768000 - mktime(&localt);
-#else
- localt.tm_zone = 0;
- localt.tm_gmtoff = 0;
- time_t utcOffset = timegm(&localt) - mktime(&localt);
#endif
return static_cast<int32_t>(utcOffset * 1000);
@@ -512,7 +518,7 @@ void msToGregorianDateTime(double ms, bool outputIsUTC, GregorianDateTime& tm)
tm.year = year - 1900;
tm.isDST = dstOff != 0.0;
- tm.utcOffset = static_cast<long>((dstOff + utcOff) / msPerSecond);
+ tm.utcOffset = outputIsUTC ? 0 : static_cast<long>((dstOff + utcOff) / msPerSecond);
tm.timeZone = NULL;
}
@@ -835,7 +841,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString)
return NaN;
int sgn = (o < 0) ? -1 : 1;
- o = abs(o);
+ o = labs(o);
if (*dateString != ':') {
offset = ((o / 100) * 60 + (o % 100)) * sgn;
} else { // GMT+05:00
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h
index 8690a49..6110f76 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h
@@ -109,14 +109,17 @@ struct GregorianDateTime : Noncopyable {
, year(inTm.tm_year)
, isDST(inTm.tm_isdst)
{
-#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !COMPILER(RVCT)
+#if HAVE(TM_GMTOFF)
utcOffset = static_cast<int>(inTm.tm_gmtoff);
+#else
+ utcOffset = static_cast<int>(getUTCOffset() / msPerSecond + (isDST ? secondsPerHour : 0));
+#endif
+#if HAVE(TM_ZONE)
int inZoneSize = strlen(inTm.tm_zone) + 1;
timeZone = new char[inZoneSize];
strncpy(timeZone, inTm.tm_zone, inZoneSize);
#else
- utcOffset = static_cast<int>(getUTCOffset() / msPerSecond + (isDST ? secondsPerHour : 0));
timeZone = 0;
#endif
}
@@ -136,8 +139,10 @@ struct GregorianDateTime : Noncopyable {
ret.tm_year = year;
ret.tm_isdst = isDST;
-#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !COMPILER(RVCT)
+#if HAVE(TM_GMTOFF)
ret.tm_gmtoff = static_cast<long>(utcOffset);
+#endif
+#if HAVE(TM_ZONE)
ret.tm_zone = timeZone;
#endif
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h b/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h
index 1c81856..9fcbbc1 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastAllocBase.h
@@ -79,9 +79,9 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+#include "Assertions.h"
#include "FastMalloc.h"
#include "TypeTraits.h"
-#include <wtf/Assertions.h>
namespace WTF {
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
index d6850e6..c855a41 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
@@ -95,8 +95,6 @@
#define FORCE_SYSTEM_MALLOC 1
#endif
-#define TCMALLOC_TRACK_DECOMMITED_SPANS (HAVE(VIRTUALALLOC) || HAVE(MADV_FREE_REUSE))
-
#ifndef NDEBUG
namespace WTF {
@@ -1043,11 +1041,7 @@ struct Span {
#endif
};
-#if TCMALLOC_TRACK_DECOMMITED_SPANS
#define ASSERT_SPAN_COMMITTED(span) ASSERT(!span->decommitted)
-#else
-#define ASSERT_SPAN_COMMITTED(span)
-#endif
#ifdef SPAN_HISTORY
void Event(Span* span, char op, int v = 0) {
@@ -1369,12 +1363,10 @@ inline Span* TCMalloc_PageHeap::New(Length n) {
Span* result = ll->next;
Carve(result, n, released);
-#if TCMALLOC_TRACK_DECOMMITED_SPANS
if (result->decommitted) {
TCMalloc_SystemCommit(reinterpret_cast<void*>(result->start << kPageShift), static_cast<size_t>(n << kPageShift));
result->decommitted = false;
}
-#endif
ASSERT(Check());
free_pages_ -= n;
return result;
@@ -1431,12 +1423,10 @@ Span* TCMalloc_PageHeap::AllocLarge(Length n) {
if (best != NULL) {
Carve(best, n, from_released);
-#if TCMALLOC_TRACK_DECOMMITED_SPANS
if (best->decommitted) {
TCMalloc_SystemCommit(reinterpret_cast<void*>(best->start << kPageShift), static_cast<size_t>(n << kPageShift));
best->decommitted = false;
}
-#endif
ASSERT(Check());
free_pages_ -= n;
return best;
@@ -1461,14 +1451,10 @@ Span* TCMalloc_PageHeap::Split(Span* span, Length n) {
return leftover;
}
-#if !TCMALLOC_TRACK_DECOMMITED_SPANS
-static ALWAYS_INLINE void propagateDecommittedState(Span*, Span*) { }
-#else
static ALWAYS_INLINE void propagateDecommittedState(Span* destination, Span* source)
{
destination->decommitted = source->decommitted;
}
-#endif
inline void TCMalloc_PageHeap::Carve(Span* span, Length n, bool released) {
ASSERT(n > 0);
@@ -1495,9 +1481,6 @@ inline void TCMalloc_PageHeap::Carve(Span* span, Length n, bool released) {
}
}
-#if !TCMALLOC_TRACK_DECOMMITED_SPANS
-static ALWAYS_INLINE void mergeDecommittedStates(Span*, Span*) { }
-#else
static ALWAYS_INLINE void mergeDecommittedStates(Span* destination, Span* other)
{
if (destination->decommitted && !other->decommitted) {
@@ -1509,7 +1492,6 @@ static ALWAYS_INLINE void mergeDecommittedStates(Span* destination, Span* other)
destination->decommitted = true;
}
}
-#endif
inline void TCMalloc_PageHeap::Delete(Span* span) {
ASSERT(Check());
@@ -1556,15 +1538,12 @@ inline void TCMalloc_PageHeap::Delete(Span* span) {
Event(span, 'D', span->length);
span->free = 1;
-#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
- {
+ } else {
if (span->length < kMaxPages)
DLL_Prepend(&free_[span->length].normal, span);
else
@@ -1596,9 +1575,7 @@ void TCMalloc_PageHeap::IncrementalScavenge(Length n) {
DLL_Remove(s);
TCMalloc_SystemRelease(reinterpret_cast<void*>(s->start << kPageShift),
static_cast<size_t>(s->length << kPageShift));
-#if TCMALLOC_TRACK_DECOMMITED_SPANS
s->decommitted = true;
-#endif
DLL_Prepend(&slist->returned, s);
scavenge_counter_ = std::max<size_t>(64UL, std::min<size_t>(kDefaultReleaseDelay, kDefaultReleaseDelay - (free_pages_ / kDefaultReleaseDelay)));
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h
index 8d03ff2..4993348 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h
@@ -37,7 +37,7 @@ namespace WTF {
template<> void freeOwnedGPtr<GDir>(GDir*);
template<> void freeOwnedGPtr<GHashTable>(GHashTable*);
- template <typename T> class GOwnPtr : Noncopyable {
+ template <typename T> class GOwnPtr : public Noncopyable {
public:
explicit GOwnPtr(T* ptr = 0) : m_ptr(ptr) { }
~GOwnPtr() { freeOwnedGPtr(m_ptr); }
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h
index 9feec1f..41813d3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Locker.h
@@ -32,7 +32,7 @@
namespace WTF {
-template <typename T> class Locker : Noncopyable {
+template <typename T> class Locker : public Noncopyable {
public:
Locker(T& lockable) : m_lockable(lockable) { m_lockable.lock(); }
~Locker() { m_lockable.unlock(); }
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h
index 7721dba..12291cc 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h
@@ -45,7 +45,7 @@ namespace WTF {
};
template<typename DataType>
- class MessageQueue : Noncopyable {
+ class MessageQueue : public Noncopyable {
public:
MessageQueue() : m_killed(false) { }
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h
index f241c7c..c50c9d8 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Noncopyable.h
@@ -24,6 +24,8 @@
// We don't want argument-dependent lookup to pull in everything from the WTF
// namespace when you use Noncopyable, so put it in its own namespace.
+#include "FastAllocBase.h"
+
namespace WTFNoncopyable {
class Noncopyable {
@@ -34,8 +36,17 @@ namespace WTFNoncopyable {
~Noncopyable() { }
};
+ class NoncopyableCustomAllocated {
+ NoncopyableCustomAllocated(const NoncopyableCustomAllocated&);
+ NoncopyableCustomAllocated& operator=(const NoncopyableCustomAllocated&);
+ protected:
+ NoncopyableCustomAllocated() { }
+ ~NoncopyableCustomAllocated() { }
+ };
+
} // namespace WTFNoncopyable
using WTFNoncopyable::Noncopyable;
+using WTFNoncopyable::NoncopyableCustomAllocated;
#endif // WTF_Noncopyable_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h
index 344f813..61375c7 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnArrayPtr.h
@@ -27,7 +27,7 @@
namespace WTF {
- template <typename T> class OwnArrayPtr : Noncopyable {
+ template <typename T> class OwnArrayPtr : public Noncopyable {
public:
explicit OwnArrayPtr(T* ptr = 0) : m_ptr(ptr) { }
~OwnArrayPtr() { safeDelete(); }
@@ -46,8 +46,12 @@ namespace WTF {
bool operator!() const { return !m_ptr; }
// This conversion operator allows implicit conversion to bool but not to other integer types.
+#if COMPILER(WINSCW)
+ operator bool() const { return m_ptr; }
+#else
typedef T* OwnArrayPtr::*UnspecifiedBoolType;
operator UnspecifiedBoolType() const { return m_ptr ? &OwnArrayPtr::m_ptr : 0; }
+#endif
void swap(OwnArrayPtr& o) { std::swap(m_ptr, o.m_ptr); }
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h
index 5c0d064..c88235a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnFastMallocPtr.h
@@ -27,7 +27,7 @@
namespace WTF {
- template<class T> class OwnFastMallocPtr : Noncopyable {
+ template<class T> class OwnFastMallocPtr : public Noncopyable {
public:
explicit OwnFastMallocPtr(T* ptr) : m_ptr(ptr)
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h
index 9e4bd32..b7e62b1 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/OwnPtr.h
@@ -34,7 +34,7 @@ namespace WTF {
template <typename T> class PassOwnPtr;
- template <typename T> class OwnPtr : Noncopyable {
+ template <typename T> class OwnPtr : public Noncopyable {
public:
typedef typename RemovePointer<T>::Type ValueType;
typedef ValueType* PtrType;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
index 5e37e09..c7a5be9 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -93,12 +94,10 @@
#define WTF_PLATFORM_SOLARIS 1
#endif
-#if defined (__S60__) || defined (__SYMBIAN32__)
+#if defined (__SYMBIAN32__)
/* we are cross-compiling, it is not really windows */
#undef WTF_PLATFORM_WIN_OS
#undef WTF_PLATFORM_WIN
-#undef WTF_PLATFORM_CAIRO
-#define WTF_PLATFORM_S60 1
#define WTF_PLATFORM_SYMBIAN 1
#endif
@@ -110,17 +109,25 @@
#define WTF_PLATFORM_NETBSD 1
#endif
+/* PLATFORM(QNX) */
+/* Operating system level dependencies for QNX that should be used */
+/* regardless of operating environment */
+#if defined(__QNXNTO__)
+#define WTF_PLATFORM_QNX 1
+#endif
+
/* PLATFORM(UNIX) */
/* Operating system level dependencies for Unix-like systems that */
/* should be used regardless of operating environment */
#if PLATFORM(DARWIN) \
|| PLATFORM(FREEBSD) \
- || PLATFORM(S60) \
+ || PLATFORM(SYMBIAN) \
|| PLATFORM(NETBSD) \
|| defined(unix) \
|| defined(__unix) \
|| defined(__unix__) \
- || defined(_AIX)
+ || defined(_AIX) \
+ || defined(__QNXNTO__)
#define WTF_PLATFORM_UNIX 1
#endif
@@ -191,7 +198,7 @@
/* Makes PLATFORM(WIN) default to PLATFORM(CAIRO) */
/* FIXME: This should be changed from a blacklist to a whitelist */
-#if !PLATFORM(MAC) && !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM)
+#if !PLATFORM(MAC) && !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM) && !PLATFORM(WINCE)
#define WTF_PLATFORM_CAIRO 1
#endif
@@ -311,6 +318,7 @@
/* --gnu option of the RVCT compiler also defines __GNUC__ */
#if defined(__GNUC__) && !COMPILER(RVCT)
#define WTF_COMPILER_GCC 1
+#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif
/* COMPILER(MINGW) */
@@ -339,11 +347,36 @@
#define ENABLE_JSC_MULTIPLE_THREADS 1
#endif
+#if PLATFORM(WINCE) && !PLATFORM(QT)
+#undef ENABLE_JSC_MULTIPLE_THREADS
+#define ENABLE_JSC_MULTIPLE_THREADS 0
+#define USE_SYSTEM_MALLOC 0
+#define ENABLE_ICONDATABASE 0
+#define ENABLE_JAVASCRIPT_DEBUGGER 0
+#define ENABLE_FTPDIR 0
+#define ENABLE_PAN_SCROLLING 0
+#define ENABLE_WML 1
+#define HAVE_ACCESSIBILITY 0
+
+#define NOMINMAX // Windows min and max conflict with standard macros
+#define NOSHLWAPI // shlwapi.h not available on WinCe
+
+// MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file.
+#define __usp10__ // disable "usp10.h"
+
+#define _INC_ASSERT // disable "assert.h"
+#define assert(x)
+
+// _countof is only included in CE6; for CE5 we need to define it ourself
+#ifndef _countof
+#define _countof(x) (sizeof(x) / sizeof((x)[0]))
+#endif
+
+#endif /* PLATFORM(WINCE) && !PLATFORM(QT) */
+
/* for Unicode, KDE uses Qt */
#if PLATFORM(KDE) || PLATFORM(QT)
#define WTF_USE_QT4_UNICODE 1
-#elif PLATFORM(SYMBIAN)
-#define WTF_USE_SYMBIAN_UNICODE 1
#elif PLATFORM(GTK)
/* The GTK+ Unicode backend is configurable */
#else
@@ -406,6 +439,13 @@
#define HAVE_SIGNAL_H 1
#endif
+#if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(QNX) \
+ && !PLATFORM(SYMBIAN) && !COMPILER(RVCT)
+#define HAVE_TM_GMTOFF 1
+#define HAVE_TM_ZONE 1
+#define HAVE_TIMEGM 1
+#endif
+
#if PLATFORM(DARWIN)
#define HAVE_ERRNO_H 1
@@ -450,6 +490,15 @@
#define HAVE_SYS_PARAM_H 1
#endif
+#elif PLATFORM(QNX)
+
+#define HAVE_ERRNO_H 1
+#define HAVE_MMAP 1
+#define HAVE_SBRK 1
+#define HAVE_STRINGS_H 1
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYS_TIME_H 1
+
#else
/* FIXME: is this actually used or do other platforms generate their own config.h? */
@@ -536,6 +585,7 @@
#endif
#if !defined(ENABLE_JIT)
+
/* The JIT is tested & working on x86_64 Mac */
#if PLATFORM(X86_64) && PLATFORM(MAC)
#define ENABLE_JIT 1
@@ -551,7 +601,21 @@
#elif PLATFORM(X86) && PLATFORM(WIN)
#define ENABLE_JIT 1
#endif
+
+#if PLATFORM(X86) && PLATFORM(QT)
+#if PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100
+ #define ENABLE_JIT 1
+ #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
+#elif PLATFORM(WIN_OS) && COMPILER(MSVC)
+ #define ENABLE_JIT 1
+ #define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
+#elif PLATFORM(LINUX) && GCC_VERSION >= 40100
+ #define ENABLE_JIT 1
+ #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#endif
+#endif /* PLATFORM(QT) && PLATFORM(X86) */
+
+#endif /* !defined(ENABLE_JIT) */
#if ENABLE(JIT)
#ifndef ENABLE_JIT_OPTIMIZE_CALL
@@ -590,15 +654,29 @@
#endif
/* Yet Another Regex Runtime. */
+#if !defined(ENABLE_YARR_JIT)
+
/* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */
-#if (!defined(ENABLE_YARR_JIT) && PLATFORM(X86) && PLATFORM(MAC)) \
- || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86_64) && PLATFORM(MAC)) \
+#if (PLATFORM(X86) && PLATFORM(MAC)) \
+ || (PLATFORM(X86_64) && PLATFORM(MAC)) \
/* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ \
- || (!defined(ENABLE_YARR_JIT) && PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) && 0) \
- || (!defined(ENABLE_YARR_JIT) && PLATFORM(X86) && PLATFORM(WIN))
+ || (PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) && 0) \
+ || (PLATFORM(X86) && PLATFORM(WIN))
#define ENABLE_YARR 1
#define ENABLE_YARR_JIT 1
#endif
+
+#if PLATFORM(X86) && PLATFORM(QT)
+#if (PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
+ || (PLATFORM(WIN_OS) && COMPILER(MSVC)) \
+ || (PLATFORM(LINUX) && GCC_VERSION >= 40100)
+#define ENABLE_YARR 1
+#define ENABLE_YARR_JIT 1
+#endif
+#endif
+
+#endif /* !defined(ENABLE_YARR_JIT) */
+
/* Sanity Check */
#if ENABLE(YARR_JIT) && !ENABLE(YARR)
#error "YARR_JIT requires YARR"
@@ -609,7 +687,7 @@
#endif
/* Setting this flag prevents the assembler from using RWX memory; this may improve
security but currectly comes at a significant performance cost. */
-#if PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE)
+#if PLATFORM(ARM)
#define ENABLE_ASSEMBLER_WX_EXCLUSIVE 1
#else
#define ENABLE_ASSEMBLER_WX_EXCLUSIVE 0
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
index c94d5a4..0e6e208 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,6 +34,12 @@
#include <stdint.h>
#include <stdlib.h>
+#if PLATFORM(WINCE)
+extern "C" {
+#include "wince/mt19937ar.c"
+}
+#endif
+
namespace WTF {
double weakRandomNumber()
@@ -74,6 +80,8 @@ double randomNumber()
// Mask off the low 53bits
fullRandom &= (1LL << 53) - 1;
return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53);
+#elif PLATFORM(WINCE)
+ return genrand_res53();
#else
uint32_t part1 = rand() & (RAND_MAX - 1);
uint32_t part2 = rand() & (RAND_MAX - 1);
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h
index 32291dd..1c2d364 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumberSeed.h
@@ -39,6 +39,9 @@
#endif
#if PLATFORM(WINCE)
+extern "C" {
+void init_by_array(unsigned long init_key[],int key_length);
+}
#include <ce_time.h>
#endif
@@ -49,8 +52,19 @@ inline void initializeRandomNumberGenerator()
{
#if PLATFORM(DARWIN)
// On Darwin we use arc4random which initialises itself.
+#elif PLATFORM(WINCE)
+ // initialize rand()
+ srand(static_cast<unsigned>(time(0)));
+
+ // use rand() to initialize the real RNG
+ unsigned long initializationBuffer[4];
+ initializationBuffer[0] = (rand() << 16) | rand();
+ initializationBuffer[1] = (rand() << 16) | rand();
+ initializationBuffer[2] = (rand() << 16) | rand();
+ initializationBuffer[3] = (rand() << 16) | rand();
+ init_by_array(initializationBuffer, 4);
#elif COMPILER(MSVC) && defined(_CRT_RAND_S)
- // On Windows we use rand_s which intialises itself
+ // On Windows we use rand_s which initialises itself
#elif PLATFORM(UNIX)
// srandomdev is not guaranteed to exist on linux so we use this poor seed, this should be improved
timeval time;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h b/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h
index c174145..761a856 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RefCounted.h
@@ -29,7 +29,7 @@ namespace WTF {
// This base class holds the non-template methods and attributes.
// The RefCounted class inherits from it reducing the template bloat
// generated by the compiler (technique called template hoisting).
-class RefCountedBase : Noncopyable {
+class RefCountedBase {
public:
void ref()
{
@@ -101,7 +101,7 @@ private:
};
-template<class T> class RefCounted : public RefCountedBase {
+template<class T> class RefCounted : public RefCountedBase, public Noncopyable {
public:
void deref()
{
@@ -115,8 +115,23 @@ protected:
}
};
+template<class T> class RefCountedCustomAllocated : public RefCountedBase, public NoncopyableCustomAllocated {
+public:
+ void deref()
+ {
+ if (derefBase())
+ delete static_cast<T*>(this);
+ }
+
+protected:
+ ~RefCountedCustomAllocated()
+ {
+ }
+};
+
} // namespace WTF
using WTF::RefCounted;
+using WTF::RefCountedCustomAllocated;
#endif // RefCounted_h
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h
index b07a9a2..4d5d2f7 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadSpecific.h
@@ -59,7 +59,7 @@ namespace WTF {
void ThreadSpecificThreadExit();
#endif
-template<typename T> class ThreadSpecific : Noncopyable {
+template<typename T> class ThreadSpecific : public Noncopyable {
public:
ThreadSpecific();
T* operator->();
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp
index bd25ee7..56bf438 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp
@@ -30,7 +30,7 @@
namespace WTF {
-struct NewThreadContext {
+struct NewThreadContext : FastAllocBase {
NewThreadContext(ThreadFunction entryPoint, void* data, const char* name)
: entryPoint(entryPoint)
, data(data)
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h
index b12f41f..6578151 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h
@@ -159,7 +159,7 @@ typedef void* PlatformReadWriteLock;
typedef void* PlatformCondition;
#endif
-class Mutex : Noncopyable {
+class Mutex : public Noncopyable {
public:
Mutex();
~Mutex();
@@ -176,7 +176,7 @@ private:
typedef Locker<Mutex> MutexLocker;
-class ReadWriteLock : Noncopyable {
+class ReadWriteLock : public Noncopyable {
public:
ReadWriteLock();
~ReadWriteLock();
@@ -193,7 +193,7 @@ private:
PlatformReadWriteLock m_readWriteLock;
};
-class ThreadCondition : Noncopyable {
+class ThreadCondition : public Noncopyable {
public:
ThreadCondition();
~ThreadCondition();
@@ -234,7 +234,7 @@ inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_
#endif
-class ThreadSafeSharedBase : Noncopyable {
+class ThreadSafeSharedBase : public Noncopyable {
public:
ThreadSafeSharedBase(int initialRefCount = 1)
: m_refCount(initialRefCount)
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp
index ea18656..cccbda1 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingWin.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -89,7 +90,14 @@
#if !USE(PTHREADS) && PLATFORM(WIN_OS)
#include "ThreadSpecific.h"
#endif
+#if !PLATFORM(WINCE)
#include <process.h>
+#endif
+#if HAVE(ERRNO_H)
+#include <errno.h>
+#else
+#define NO_ERRNO
+#endif
#include <windows.h>
#include <wtf/CurrentTime.h>
#include <wtf/HashMap.h>
@@ -210,9 +218,21 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
unsigned threadIdentifier = 0;
ThreadIdentifier threadID = 0;
ThreadFunctionInvocation* invocation = new ThreadFunctionInvocation(entryPoint, data);
+#if PLATFORM(WINCE)
+ // This is safe on WINCE, since CRT is in the core and innately multithreaded.
+ // On desktop Windows, need to use _beginthreadex (not available on WinCE) if using any CRT functions
+ HANDLE threadHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)wtfThreadEntryPoint, invocation, 0, (LPDWORD)&threadIdentifier);
+#else
HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, invocation, 0, &threadIdentifier));
+#endif
if (!threadHandle) {
+#if PLATFORM(WINCE)
+ LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, ::GetLastError());
+#elif defined(NO_ERRNO)
+ LOG_ERROR("Failed to create thread at entry point %p with data %p.", entryPoint, data);
+#else
LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, errno);
+#endif
return 0;
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
index c378fd0..7cba4e4 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
@@ -268,7 +268,7 @@ namespace WTF {
};
template<typename T>
- class VectorBufferBase : Noncopyable {
+ class VectorBufferBase : public Noncopyable {
public:
void allocateBuffer(size_t newCapacity)
{
@@ -934,7 +934,7 @@ namespace WTF {
inline void Vector<T, inlineCapacity>::remove(size_t position, size_t length)
{
ASSERT(position < size());
- ASSERT(position + length < size());
+ ASSERT(position + length <= size());
T* beginSpot = begin() + position;
T* endSpot = beginSpot + length;
TypeOperations::destruct(beginSpot, endSpot);
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h
index f04779d..51e8a06 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Collator.h
@@ -39,7 +39,7 @@ struct UCollator;
namespace WTF {
- class Collator : Noncopyable {
+ class Collator : public Noncopyable {
public:
enum Result { Equal = 0, Greater = 1, Less = -1 };
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp
index 79dec79..6376bb3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp
@@ -37,6 +37,7 @@
#include <string.h>
#if PLATFORM(DARWIN)
+#include "RetainPtr.h"
#include <CoreFoundation/CoreFoundation.h>
#endif
@@ -60,11 +61,16 @@ std::auto_ptr<Collator> Collator::userDefault()
{
#if PLATFORM(DARWIN) && PLATFORM(CF)
// Mac OS X doesn't set UNIX locale to match user-selected one, so ICU default doesn't work.
- CFStringRef collationOrder = (CFStringRef)CFPreferencesCopyValue(CFSTR("AppleCollationOrder"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
+ RetainPtr<CFLocaleRef> currentLocale(AdoptCF, CFLocaleCopyCurrent());
+ CFStringRef collationOrder = (CFStringRef)CFLocaleGetValue(currentLocale.get(), kCFLocaleCollatorIdentifier);
+#else
+ RetainPtr<CFStringRef> collationOrderRetainer(AdoptCF, (CFStringRef)CFPreferencesCopyValue(CFSTR("AppleCollationOrder"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
+ CFStringRef collationOrder = collationOrderRetainer.get();
+#endif
char buf[256];
if (collationOrder) {
CFStringGetCString(collationOrder, buf, sizeof(buf), kCFStringEncodingASCII);
- CFRelease(collationOrder);
return std::auto_ptr<Collator>(new Collator(buf));
} else
return std::auto_ptr<Collator>(new Collator(""));
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/FastMallocWince.h b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/FastMallocWince.h
new file mode 100644
index 0000000..93d9f75
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/FastMallocWince.h
@@ -0,0 +1,177 @@
+/*
+ * This file is part of the KDE libraries
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2009 Torch Mobile, Inc. All rights reserved
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef FastMallocWince_h
+#define FastMallocWince_h
+
+#include <new.h>
+
+#ifdef __cplusplus
+#include <new>
+#include "MemoryManager.h"
+extern "C" {
+#endif
+
+void* fastMalloc(size_t n);
+void* fastCalloc(size_t n_elements, size_t element_size);
+void fastFree(void* p);
+void* fastRealloc(void* p, size_t n);
+void* fastZeroedMalloc(size_t n);
+// These functions return 0 if an allocation fails.
+void* tryFastMalloc(size_t n);
+void* tryFastZeroedMalloc(size_t n);
+void* tryFastCalloc(size_t n_elements, size_t element_size);
+void* tryFastRealloc(void* p, size_t n);
+char* fastStrDup(const char*);
+
+#ifndef NDEBUG
+void fastMallocForbid();
+void fastMallocAllow();
+#endif
+
+#if !defined(USE_SYSTEM_MALLOC) || !USE_SYSTEM_MALLOC
+
+#define malloc(n) fastMalloc(n)
+#define calloc(n_elements, element_size) fastCalloc(n_elements, element_size)
+#define realloc(p, n) fastRealloc(p, n)
+#define free(p) fastFree(p)
+#define strdup(p) fastStrDup(p)
+
+#else
+
+#define strdup(p) _strdup(p)
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef __cplusplus
+#if !defined(USE_SYSTEM_MALLOC) || !USE_SYSTEM_MALLOC
+static inline void* __cdecl operator new(size_t s) { return fastMalloc(s); }
+static inline void __cdecl operator delete(void* p) { fastFree(p); }
+static inline void* __cdecl operator new[](size_t s) { return fastMalloc(s); }
+static inline void __cdecl operator delete[](void* p) { fastFree(p); }
+static inline void* operator new(size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); }
+static inline void operator delete(void* p, const std::nothrow_t&) throw() { fastFree(p); }
+static inline void* operator new[](size_t s, const std::nothrow_t&) throw() { return fastMalloc(s); }
+static inline void operator delete[](void* p, const std::nothrow_t&) throw() { fastFree(p); }
+#endif
+
+namespace WTF {
+ // This defines a type which holds an unsigned integer and is the same
+ // size as the minimally aligned memory allocation.
+ typedef unsigned long long AllocAlignmentInteger;
+
+ namespace Internal {
+ enum AllocType { // Start with an unusual number instead of zero, because zero is common.
+ AllocTypeMalloc = 0x375d6750, // Encompasses fastMalloc, fastZeroedMalloc, fastCalloc, fastRealloc.
+ AllocTypeClassNew, // Encompasses class operator new from FastAllocBase.
+ AllocTypeClassNewArray, // Encompasses class operator new[] from FastAllocBase.
+ AllocTypeFastNew, // Encompasses fastNew.
+ AllocTypeFastNewArray, // Encompasses fastNewArray.
+ AllocTypeNew, // Encompasses global operator new.
+ AllocTypeNewArray // Encompasses global operator new[].
+ };
+ }
+
+
+#if ENABLE(FAST_MALLOC_MATCH_VALIDATION)
+
+ // Malloc validation is a scheme whereby a tag is attached to an
+ // allocation which identifies how it was originally allocated.
+ // This allows us to verify that the freeing operation matches the
+ // allocation operation. If memory is allocated with operator new[]
+ // but freed with free or delete, this system would detect that.
+ // In the implementation here, the tag is an integer prepended to
+ // the allocation memory which is assigned one of the AllocType
+ // enumeration values. An alternative implementation of this
+ // scheme could store the tag somewhere else or ignore it.
+ // Users of FastMalloc don't need to know or care how this tagging
+ // is implemented.
+
+ namespace Internal {
+
+ // Return the AllocType tag associated with the allocated block p.
+ inline AllocType fastMallocMatchValidationType(const void* p)
+ {
+ const AllocAlignmentInteger* type = static_cast<const AllocAlignmentInteger*>(p) - 1;
+ return static_cast<AllocType>(*type);
+ }
+
+ // Return the address of the AllocType tag associated with the allocated block p.
+ inline AllocAlignmentInteger* fastMallocMatchValidationValue(void* p)
+ {
+ return reinterpret_cast<AllocAlignmentInteger*>(static_cast<char*>(p) - sizeof(AllocAlignmentInteger));
+ }
+
+ // Set the AllocType tag to be associaged with the allocated block p.
+ inline void setFastMallocMatchValidationType(void* p, AllocType allocType)
+ {
+ AllocAlignmentInteger* type = static_cast<AllocAlignmentInteger*>(p) - 1;
+ *type = static_cast<AllocAlignmentInteger>(allocType);
+ }
+
+ // Handle a detected alloc/free mismatch. By default this calls CRASH().
+ void fastMallocMatchFailed(void* p);
+
+ } // namespace Internal
+
+ // This is a higher level function which is used by FastMalloc-using code.
+ inline void fastMallocMatchValidateMalloc(void* p, Internal::AllocType allocType)
+ {
+ if (!p)
+ return;
+
+ Internal::setFastMallocMatchValidationType(p, allocType);
+ }
+
+ // This is a higher level function which is used by FastMalloc-using code.
+ inline void fastMallocMatchValidateFree(void* p, Internal::AllocType allocType)
+ {
+ if (!p)
+ return;
+
+ if (Internal::fastMallocMatchValidationType(p) != allocType)
+ Internal::fastMallocMatchFailed(p);
+ Internal::setFastMallocMatchValidationType(p, Internal::AllocTypeMalloc); // Set it to this so that fastFree thinks it's OK.
+ }
+
+#else
+
+ inline void fastMallocMatchValidateMalloc(void*, Internal::AllocType)
+ {
+ }
+
+ inline void fastMallocMatchValidateFree(void*, Internal::AllocType)
+ {
+ }
+
+#endif
+
+} // namespace WTF
+
+#endif
+
+#endif // FastMallocWince_h
+
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.cpp
new file mode 100644
index 0000000..b65b368
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.cpp
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2008-2009 Torch Mobile Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "MemoryManager.h"
+
+#undef malloc
+#undef calloc
+#undef realloc
+#undef free
+#undef strdup
+#undef _strdup
+#undef VirtualAlloc
+#undef VirtualFree
+
+#include <malloc.h>
+#include <windows.h>
+
+namespace WTF {
+
+MemoryManager* memoryManager()
+{
+ static MemoryManager mm;
+ return &mm;
+}
+
+MemoryManager::MemoryManager()
+: m_allocationCanFail(false)
+{
+}
+
+MemoryManager::~MemoryManager()
+{
+}
+
+HBITMAP MemoryManager::createCompatibleBitmap(HDC hdc, int width, int height)
+{
+ return ::CreateCompatibleBitmap(hdc, width, height);
+}
+
+HBITMAP MemoryManager::createDIBSection(const BITMAPINFO* pbmi, void** ppvBits)
+{
+ return ::CreateDIBSection(0, pbmi, DIB_RGB_COLORS, ppvBits, 0, 0);
+}
+
+void* MemoryManager::m_malloc(size_t size)
+{
+ return malloc(size);
+}
+
+void* MemoryManager::m_calloc(size_t num, size_t size)
+{
+ return calloc(num, size);
+}
+
+void* MemoryManager::m_realloc(void* p, size_t size)
+{
+ return realloc(p, size);
+}
+
+void MemoryManager::m_free(void* p)
+{
+ return free(p);
+}
+
+bool MemoryManager::resizeMemory(void*, size_t)
+{
+ return false;
+}
+
+void* MemoryManager::allocate64kBlock()
+{
+ return VirtualAlloc(0, 65536, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
+}
+
+void MemoryManager::free64kBlock(void* p)
+{
+ VirtualFree(p, 65536, MEM_RELEASE);
+}
+
+bool MemoryManager::onIdle(DWORD& timeLimitMs)
+{
+ return false;
+}
+
+LPVOID MemoryManager::virtualAlloc(LPVOID lpAddress, DWORD dwSize, DWORD flAllocationType, DWORD flProtect)
+{
+ return ::VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect);
+}
+
+BOOL MemoryManager::virtualFree(LPVOID lpAddress, DWORD dwSize, DWORD dwFreeType)
+{
+ return ::VirtualFree(lpAddress, dwSize, dwFreeType);
+}
+
+
+#if defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC
+
+void *fastMalloc(size_t n) { return malloc(n); }
+void *fastCalloc(size_t n_elements, size_t element_size) { return calloc(n_elements, element_size); }
+void fastFree(void* p) { return free(p); }
+void *fastRealloc(void* p, size_t n) { return realloc(p, n); }
+
+#else
+
+void *fastMalloc(size_t n) { return MemoryManager::m_malloc(n); }
+void *fastCalloc(size_t n_elements, size_t element_size) { return MemoryManager::m_calloc(n_elements, element_size); }
+void fastFree(void* p) { return MemoryManager::m_free(p); }
+void *fastRealloc(void* p, size_t n) { return MemoryManager::m_realloc(p, n); }
+
+#endif
+
+#ifndef NDEBUG
+void fastMallocForbid() {}
+void fastMallocAllow() {}
+#endif
+
+void* fastZeroedMalloc(size_t n)
+{
+ void* p = fastMalloc(n);
+ if (p)
+ memset(p, 0, n);
+ return p;
+}
+
+void* tryFastMalloc(size_t n)
+{
+ MemoryAllocationCanFail canFail;
+ return fastMalloc(n);
+}
+
+void* tryFastZeroedMalloc(size_t n)
+{
+ MemoryAllocationCanFail canFail;
+ return fastZeroedMalloc(n);
+}
+
+void* tryFastCalloc(size_t n_elements, size_t element_size)
+{
+ MemoryAllocationCanFail canFail;
+ return fastCalloc(n_elements, element_size);
+}
+
+void* tryFastRealloc(void* p, size_t n)
+{
+ MemoryAllocationCanFail canFail;
+ return fastRealloc(p, n);
+}
+
+char* fastStrDup(const char* str)
+{
+ return _strdup(str);
+}
+
+} \ No newline at end of file
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.h b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.h
new file mode 100644
index 0000000..f405612
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/MemoryManager.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2008-2009 Torch Mobile Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include <winbase.h>
+
+typedef struct HBITMAP__* HBITMAP;
+typedef struct HDC__* HDC;
+typedef void *HANDLE;
+typedef struct tagBITMAPINFO BITMAPINFO;
+
+namespace WTF {
+
+ class MemoryManager {
+ public:
+ MemoryManager();
+ ~MemoryManager();
+
+ bool allocationCanFail() const { return m_allocationCanFail; }
+ void setAllocationCanFail(bool c) { m_allocationCanFail = c; }
+
+ static HBITMAP createCompatibleBitmap(HDC hdc, int width, int height);
+ static HBITMAP createDIBSection(const BITMAPINFO* pbmi, void** ppvBits);
+ static void* m_malloc(size_t size);
+ static void* m_calloc(size_t num, size_t size);
+ static void* m_realloc(void* p, size_t size);
+ static void m_free(void*);
+ static bool resizeMemory(void* p, size_t newSize);
+ static void* allocate64kBlock();
+ static void free64kBlock(void*);
+ static bool onIdle(DWORD& timeLimitMs);
+ static LPVOID virtualAlloc(LPVOID lpAddress, DWORD dwSize, DWORD flAllocationType, DWORD flProtect);
+ static BOOL virtualFree(LPVOID lpAddress, DWORD dwSize, DWORD dwFreeType);
+
+ private:
+ friend MemoryManager* memoryManager();
+
+ bool m_allocationCanFail;
+ };
+
+ MemoryManager* memoryManager();
+
+ class MemoryAllocationCanFail {
+ public:
+ MemoryAllocationCanFail() : m_old(memoryManager()->allocationCanFail()) { memoryManager()->setAllocationCanFail(true); }
+ ~MemoryAllocationCanFail() { memoryManager()->setAllocationCanFail(m_old); }
+ private:
+ bool m_old;
+ };
+
+ class MemoryAllocationCannotFail {
+ public:
+ MemoryAllocationCannotFail() : m_old(memoryManager()->allocationCanFail()) { memoryManager()->setAllocationCanFail(false); }
+ ~MemoryAllocationCannotFail() { memoryManager()->setAllocationCanFail(m_old); }
+ private:
+ bool m_old;
+ };
+}
+
+using WTF::MemoryManager;
+using WTF::memoryManager;
+using WTF::MemoryAllocationCanFail;
+using WTF::MemoryAllocationCannotFail;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/wince/mt19937ar.c b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/mt19937ar.c
new file mode 100644
index 0000000..4715958
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/wince/mt19937ar.c
@@ -0,0 +1,170 @@
+/*
+ A C-program for MT19937, with initialization improved 2002/1/26.
+ Coded by Takuji Nishimura and Makoto Matsumoto.
+
+ Before using, initialize the state by using init_genrand(seed)
+ or init_by_array(init_key, key_length).
+
+ Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. The names of its contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ Any feedback is very welcome.
+ http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
+ email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
+*/
+
+#include <stdio.h>
+
+/* Period parameters */
+#define N 624
+#define M 397
+#define MATRIX_A 0x9908b0dfUL /* constant vector a */
+#define UPPER_MASK 0x80000000UL /* most significant w-r bits */
+#define LOWER_MASK 0x7fffffffUL /* least significant r bits */
+
+static unsigned long mt[N]; /* the array for the state vector */
+static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */
+
+/* initializes mt[N] with a seed */
+void init_genrand(unsigned long s)
+{
+ mt[0]= s & 0xffffffffUL;
+ for (mti=1; mti<N; mti++) {
+ mt[mti] = (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
+ /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
+ /* In the previous versions, MSBs of the seed affect */
+ /* only MSBs of the array mt[]. */
+ /* 2002/01/09 modified by Makoto Matsumoto */
+ mt[mti] &= 0xffffffffUL;
+ /* for >32 bit machines */
+ }
+}
+
+/* initialize by an array with array-length */
+/* init_key is the array for initializing keys */
+/* key_length is its length */
+/* slight change for C++, 2004/2/26 */
+void init_by_array(unsigned long init_key[],int key_length)
+{
+ int i, j, k;
+ init_genrand(19650218UL);
+ i=1; j=0;
+ k = (N>key_length ? N : key_length);
+ for (; k; k--) {
+ mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL))
+ + init_key[j] + j; /* non linear */
+ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
+ i++; j++;
+ if (i>=N) { mt[0] = mt[N-1]; i=1; }
+ if (j>=key_length) j=0;
+ }
+ for (k=N-1; k; k--) {
+ mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))
+ - i; /* non linear */
+ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
+ i++;
+ if (i>=N) { mt[0] = mt[N-1]; i=1; }
+ }
+
+ mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
+}
+
+/* generates a random number on [0,0xffffffff]-interval */
+unsigned long genrand_int32(void)
+{
+ unsigned long y;
+ static unsigned long mag01[2]={0x0UL, MATRIX_A};
+ /* mag01[x] = x * MATRIX_A for x=0,1 */
+
+ if (mti >= N) { /* generate N words at one time */
+ int kk;
+
+ if (mti == N+1) /* if init_genrand() has not been called, */
+ init_genrand(5489UL); /* a default initial seed is used */
+
+ for (kk=0;kk<N-M;kk++) {
+ y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
+ mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL];
+ }
+ for (;kk<N-1;kk++) {
+ y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
+ mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
+ }
+ y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
+ mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL];
+
+ mti = 0;
+ }
+
+ y = mt[mti++];
+
+ /* Tempering */
+ y ^= (y >> 11);
+ y ^= (y << 7) & 0x9d2c5680UL;
+ y ^= (y << 15) & 0xefc60000UL;
+ y ^= (y >> 18);
+
+ return y;
+}
+
+/* generates a random number on [0,0x7fffffff]-interval */
+long genrand_int31(void)
+{
+ return (long)(genrand_int32()>>1);
+}
+
+/* generates a random number on [0,1]-real-interval */
+double genrand_real1(void)
+{
+ return genrand_int32()*(1.0/4294967295.0);
+ /* divided by 2^32-1 */
+}
+
+/* generates a random number on [0,1)-real-interval */
+double genrand_real2(void)
+{
+ return genrand_int32()*(1.0/4294967296.0);
+ /* divided by 2^32 */
+}
+
+/* generates a random number on (0,1)-real-interval */
+double genrand_real3(void)
+{
+ return (((double)genrand_int32()) + 0.5)*(1.0/4294967296.0);
+ /* divided by 2^32 */
+}
+
+/* generates a random number on [0,1) with 53-bit resolution*/
+double genrand_res53(void)
+{
+ unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;
+ return(a*67108864.0+b)*(1.0/9007199254740992.0);
+}
diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
index 65c53cf..663a524 100644
--- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
@@ -28,6 +28,7 @@
#include "ASCIICType.h"
#include "JSGlobalData.h"
+#include "LinkBuffer.h"
#include "MacroAssembler.h"
#include "RegexCompiler.h"
@@ -43,18 +44,17 @@ namespace JSC { namespace Yarr {
class RegexGenerator : private MacroAssembler {
friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);
-#if PLATFORM_ARM_ARCH(7)
+#if PLATFORM(ARM)
static const RegisterID input = ARM::r0;
static const RegisterID index = ARM::r1;
static const RegisterID length = ARM::r2;
-
static const RegisterID output = ARM::r4;
+
static const RegisterID regT0 = ARM::r5;
static const RegisterID regT1 = ARM::r6;
static const RegisterID returnRegister = ARM::r0;
-#endif
-#if PLATFORM(X86)
+#elif PLATFORM(X86)
static const RegisterID input = X86::eax;
static const RegisterID index = X86::edx;
static const RegisterID length = X86::ecx;
@@ -64,8 +64,7 @@ class RegexGenerator : private MacroAssembler {
static const RegisterID regT1 = X86::esi;
static const RegisterID returnRegister = X86::eax;
-#endif
-#if PLATFORM(X86_64)
+#elif PLATFORM(X86_64)
static const RegisterID input = X86::edi;
static const RegisterID index = X86::esi;
static const RegisterID length = X86::edx;
@@ -1309,7 +1308,10 @@ class RegexGenerator : private MacroAssembler {
#else
loadPtr(Address(X86::ebp, 2 * sizeof(void*)), output);
#endif
-#elif PLATFORM_ARM_ARCH(7)
+#elif PLATFORM(ARM)
+#if !PLATFORM_ARM_ARCH(7)
+ push(ARM::lr);
+#endif
push(ARM::r4);
push(ARM::r5);
push(ARM::r6);
@@ -1327,7 +1329,7 @@ class RegexGenerator : private MacroAssembler {
pop(X86::edi);
pop(X86::ebx);
pop(X86::ebp);
-#elif PLATFORM_ARM_ARCH(7)
+#elif PLATFORM(ARM)
pop(ARM::r6);
pop(ARM::r5);
pop(ARM::r4);
diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h
index fb1b0ab..a451131 100644
--- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h
+++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexPattern.h
@@ -57,7 +57,7 @@ struct CharacterRange {
}
};
-struct CharacterClass {
+struct CharacterClass : FastAllocBase {
Vector<UChar> m_matches;
Vector<CharacterRange> m_ranges;
Vector<UChar> m_matchesUnicode;
@@ -181,7 +181,7 @@ struct PatternTerm {
}
};
-struct PatternAlternative {
+struct PatternAlternative : FastAllocBase {
PatternAlternative(PatternDisjunction* disjunction)
: m_parent(disjunction)
{
@@ -205,7 +205,7 @@ struct PatternAlternative {
bool m_hasFixedSize;
};
-struct PatternDisjunction {
+struct PatternDisjunction : FastAllocBase {
PatternDisjunction(PatternAlternative* parent = 0)
: m_parent(parent)
{