blob: 9f81b2b36b46553e9fa3f1f9c88f7f0a9846bd49 [file] [log] [blame]
2011-02-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage.
Currently JSObject is both directly instantiated for regular JS objects, and
derived to implement subtypes. A consequence of this is that we need to ensure
that sufficient space from the cell is left unused and available for any data
members that will be introduced by subclasses of JSObject. By restructuring
the internal storage array out of JSObject we can increase the size in the
internal storage for regular objects.
Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as
much additional capacity as is currently available to allow for data members
in subclasses. JSFinalObject utilizes all available space for internal storage,
and only allows construction through JSFinalObject::create().
The additional storage made available in the JSObject means that we need no
longer rely on a union of the internal storage with a pointer to storage that
is only valid for external storage. This means we can go back to always having
a valid pointer to property storage, regardless of whether this is internal or
external. This simplifies some cases of access to the array from C code, and
significantly simplifies JIT access, since repatching no longer needs to be
able to change between a load of the storage pointer / a LEA of the internal
storage.
* API/JSObjectRef.cpp:
(JSObjectMake):
* assembler/ARMAssembler.h:
* assembler/ARMv7Assembler.h:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::repatchPointer):
* assembler/MIPSAssembler.h:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerX86.h:
* assembler/MacroAssemblerX86_64.h:
* assembler/RepatchBuffer.h:
* assembler/X86Assembler.h:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
* debugger/DebuggerActivation.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::emit_op_get_by_pname):
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::compilePutDirectOffset):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::compilePutDirectOffset):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
(JSC::JIT::emit_op_get_by_pname):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Arguments.h:
(JSC::Arguments::Arguments):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorInstance.h:
* runtime/ExceptionHelpers.cpp:
(JSC::InterruptedExecutionError::InterruptedExecutionError):
(JSC::TerminatedExecutionError::TerminatedExecutionError):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::JSByteArray):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalObject.h:
(JSC::constructEmptyObject):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::JSNotAnObject):
* runtime/JSObject.cpp:
(JSC::JSObject::createInheritorID):
(JSC::JSObject::allocatePropertyStorage):
* runtime/JSObject.h:
(JSC::JSObject::propertyStorage):
(JSC::JSNonFinalObject::JSNonFinalObject):
(JSC::JSNonFinalObject::createStructure):
(JSC::JSFinalObject::create):
(JSC::JSFinalObject::createStructure):
(JSC::JSFinalObject::JSFinalObject):
(JSC::JSObject::offsetOfInlineStorage):
(JSC::constructEmptyObject):
(JSC::createEmptyObjectStructure):
(JSC::JSObject::JSObject):
(JSC::JSObject::~JSObject):
(JSC::Structure::isUsingInlineStorage):
* runtime/JSObjectWithGlobalObject.cpp:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSObjectWithGlobalObject.h:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::isVanilla):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::JSVariableObject):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
* runtime/ObjectConstructor.cpp:
(JSC::constructObject):
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::ObjectPrototype):
* runtime/ObjectPrototype.h:
* runtime/StrictEvalActivation.cpp:
(JSC::StrictEvalActivation::StrictEvalActivation):
* runtime/StrictEvalActivation.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::growPropertyStorageCapacity):
2011-02-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Incorrect handling of global writes in dynamic contexts
https://bugs.webkit.org/show_bug.cgi?id=49383
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
Can't use the existing callframe to return an uncaught exception
as by definition that callframe has already been torn down.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::varDeclarations):
(JSC::ASTBuilder::funcDeclarations):
(JSC::ASTBuilder::features):
(JSC::ASTBuilder::numConstants):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::addVar):
(JSC::ASTBuilder::incConstants):
(JSC::ASTBuilder::usesThis):
(JSC::ASTBuilder::usesCatch):
(JSC::ASTBuilder::usesClosures):
(JSC::ASTBuilder::usesArguments):
(JSC::ASTBuilder::usesAssignment):
(JSC::ASTBuilder::usesWith):
(JSC::ASTBuilder::usesEval):
Don't need a vector of scopes in the ASTBuilder
* runtime/Operations.h:
(JSC::resolveBase):
In strict mode the optimisation that we use to skip a lookup
on the global object is incorrect and lead to us always
disallowing global writes when we needed to do a dynamic slot
lookup. Now the strict mode path actually checks for the
property.
2011-02-15 Jon Honeycutt <jhoneycutt@apple.com>
Windows build fix for
https://bugs.webkit.org/show_bug.cgi?id=54415
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
Remove deleted files.
2011-02-15 Oliver Hunt <oliver@apple.com>
Fix EFL build for
https://bugs.webkit.org/show_bug.cgi?id=54415
* CMakeLists.txt:
2011-02-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough and Geoff Garen.
Refactor handles and weak pointers to become nicer and more automatic
https://bugs.webkit.org/show_bug.cgi?id=54415
Move to a true handle based mechanism for GC value protection. This
also allows us to switch to a more sensible behaviour for weak pointers
in which weak pointers are automatically updated.
This allows us to remove the old (and convoluted) that required all
objects that may be held by a weak reference to be aware of the reference
and manually clear them in their destructors.
This also adds a few new data types to JSC that we use to efficiently
allocate and return the underlying handle storage.
This patch is largely renaming and removing now unnecessary destructors
from objects.
* API/JSClassRef.cpp:
(OpaqueJSClass::create):
(OpaqueJSClassContextData::OpaqueJSClassContextData):
(OpaqueJSClass::contextData):
(OpaqueJSClass::prototype):
* API/JSClassRef.h:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.xcodeproj/project.pbxproj:
* collector/handles/Global.h: Added.
New Global handle type used to keep gc objects live, even if they're not
marked.
(JSC::Global::Global):
(JSC::Global::~Global):
(JSC::Global::set):
We can only assign directly to a global from another global.
In all other cases we need the JSGlobalData to be provided
explicitly so we use a set function.
(JSC::Global::operator=):
(JSC::Global::clear):
(JSC::Global::isHashTableDeletedValue):
(JSC::Global::internalSet):
* collector/handles/Handle.h: Added.
Root "Handle" type used for immutable handles and to provide the basic
APIs needed for pointer-like behaviour.
(JSC::HandleBase::operator!):
(JSC::HandleBase::operator UnspecifiedBoolType*):
(JSC::HandleBase::isEmpty):
(JSC::HandleBase::HandleBase):
(JSC::HandleBase::slot):
(JSC::HandleBase::invalidate):
(JSC::HandleBase::setSlot):
(JSC::HandleTypes::getFromSlot):
(JSC::HandleTypes::toJSValue):
(JSC::HandleTypes::validateUpcast):
(JSC::HandleConverter::operator->):
(JSC::HandleConverter::operator*):
(JSC::Handle::Handle):
(JSC::Handle::get):
(JSC::Handle::wrapSlot):
(JSC::operator==):
(JSC::operator!=):
* collector/handles/HandleHeap.cpp: Added.
New heap for global handles.
(JSC::HandleHeap::HandleHeap):
(JSC::HandleHeap::grow):
(JSC::HandleHeap::markStrongHandles):
(JSC::HandleHeap::updateAfterMark):
(JSC::HandleHeap::clearWeakPointers):
(JSC::HandleHeap::writeBarrier):
* collector/handles/HandleHeap.h: Added.
(JSC::HandleHeap::heapFor):
(JSC::HandleHeap::toHandle):
(JSC::HandleHeap::toNode):
(JSC::HandleHeap::allocate):
(JSC::HandleHeap::deallocate):
(JSC::HandleHeap::makeWeak):
Convert a hard handle into weak handle that does not
protect the object it points to.
(JSC::HandleHeap::makeSelfDestroying):
Converts a handle to a weak handle that will be returned
to the free list when the referenced object dies.
(JSC::HandleHeap::Node::Node):
(JSC::HandleHeap::Node::slot):
(JSC::HandleHeap::Node::handleHeap):
(JSC::HandleHeap::Node::setFinalizer):
(JSC::HandleHeap::Node::makeWeak):
(JSC::HandleHeap::Node::isWeak):
(JSC::HandleHeap::Node::makeSelfDestroying):
(JSC::HandleHeap::Node::isSelfDestroying):
(JSC::HandleHeap::Node::finalizer):
(JSC::HandleHeap::Node::setPrev):
(JSC::HandleHeap::Node::prev):
(JSC::HandleHeap::Node::setNext):
(JSC::HandleHeap::Node::next):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
* interpreter/Interpreter.h:
* interpreter/RegisterFile.cpp:
(JSC::RegisterFile::globalObjectCollected):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
* runtime/GCHandle.cpp: Removed.
* runtime/GCHandle.h: Removed.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::markRoots):
* runtime/Heap.h:
(JSC::Heap::allocateGlobalHandle):
(JSC::Heap::reportExtraMemoryCost):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::allocateGlobalHandle):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):
(JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
* runtime/JSPropertyNameIterator.h:
(JSC::JSPropertyNameIterator::createStructure):
(JSC::Structure::setEnumerationCache):
(JSC::Structure::clearEnumerationCache):
* runtime/Protect.h:
* runtime/Structure.cpp:
(JSC::Structure::~Structure):
* runtime/Structure.h:
* runtime/WeakGCPtr.h:
(JSC::WeakGCPtrBase::get):
(JSC::WeakGCPtrBase::clear):
(JSC::WeakGCPtrBase::operator!):
(JSC::WeakGCPtrBase::operator UnspecifiedBoolType*):
(JSC::WeakGCPtrBase::~WeakGCPtrBase):
(JSC::WeakGCPtrBase::WeakGCPtrBase):
(JSC::WeakGCPtrBase::internalSet):
(JSC::LazyWeakGCPtr::LazyWeakGCPtr):
(JSC::LazyWeakGCPtr::set):
(JSC::WeakGCPtr::WeakGCPtr):
(JSC::WeakGCPtr::operator=):
* runtime/WriteBarrier.h:
* wtf/BlockStack.h: Added.
(WTF::::BlockStack):
(WTF::::~BlockStack):
(WTF::::blocks):
(WTF::::grow):
(WTF::::shrink):
* wtf/SentinelLinkedList.h: Added.
(WTF::::SentinelLinkedList):
(WTF::::begin):
(WTF::::end):
(WTF::::push):
(WTF::::remove):
* wtf/SinglyLinkedList.h: Added.
(WTF::::SinglyLinkedList):
(WTF::::isEmpty):
(WTF::::push):
(WTF::::pop):
2011-02-15 Pratik Solanki <psolanki@apple.com>
Move WTF_USE_CFNETWORK to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=54168
Reviewed by Darin Adler.
* wtf/Platform.h: Define WTF_USE_CFNETWORK for Windows builds.
2011-02-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Moved MarkedBlock data members to the head of the block
https://bugs.webkit.org/show_bug.cgi?id=54482
This allows for a variable-sized tail, to accommodate oversized blocks.
SunSpider reports no change.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate):
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep):
* runtime/MarkedBlock.h: Added missing element to the CELLS_PER_BLOCK
calculation. This kind of error is why we want to migrate to the system
described below.
(JSC::roundUpToMultipleOf):
(JSC::MarkedBlock::firstCell):
(JSC::MarkedBlock::cells):
(JSC::MarkedBlock::cellNumber): Use subtraction instead of masking to
calculate cell number. The mask is no longer correct because the first
cell is not at the head of the block.
(JSC::MarkedBlock::forEach): Replaced m_cells data member with a cells()
accessor. We want to use sizeof(MarkedBlock) to calculate the size of the
block header, so we can't have an explicit data member to represent the block tail.
Also replaced iteration from zero with iteration from startCell(), since
the first N cells are now occupied by the header.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::reset): Replaced iteration from zero as above.
2011-02-15 Chris Rogers <crogers@google.com>
Reviewed by Alexey Proskuryakov.
Fix Mutex::tryLock() on Windows to work properly with PlatformCondition::timedWait()
https://bugs.webkit.org/show_bug.cgi?id=54408
* wtf/ThreadingWin.cpp:
(WTF::PlatformCondition::timedWait):
2011-02-15 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Remove some dead code in ARMv7
https://bugs.webkit.org/show_bug.cgi?id=54461
* assembler/ARMv7Assembler.h: remove dead code.
2011-02-14 Geoffrey Garen <ggaren@apple.com>
Rubber-stamped by Gavin Barraclough.
Some MarkedBlock refactoring.
Made cells private.
Renamed cells => m_cells
marked => m_marks.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate):
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep):
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::markCount):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::setMarked):
(JSC::MarkedBlock::forEach):
2011-02-14 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add basic parser for Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=54379
Add a constructor for copying a Vector into a String. I suspect there
are a number of call sites that are doing this manually that would
benefit from being moved to this API.
* wtf/text/WTFString.h:
(WTF::String::String):
2011-02-14 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: use call frame column to determine execution line in source frame.
https://bugs.webkit.org/show_bug.cgi?id=54001
* wtf/text/TextPosition.h:
(WTF::ZeroBasedNumber::convertAsOneBasedInt):
2011-02-13 Jeremy Moskovich <jeremy@chromium.org>
Reviewed by Adam Barth.
Add a compile-time option to completely disable WebArchive support.
https://bugs.webkit.org/show_bug.cgi?id=52712
Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
Ports Affected:
WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt.
This patch preserves this behavior except that it also disables support in the Chromium port.
* wtf/Platform.h: Add ENABLE_WEB_ARCHIVE definition and turn it off explicitly for Qt & Chromium ports.
2011-02-13 Cameron Zwarich <zwarich@apple.com>
Reviewed by Dan Bernstein.
Bug 53760 - JSC fails to build with TOT Clang
https://bugs.webkit.org/show_bug.cgi?id=53760
Fix -Woverloaded-virtual warnings. This is also a 6% speedup on the v8 raytrace
benchmark; it is nothing-to-noise on everything else.
* API/JSCallbackObject.h: Remove pointlessly overloaded method.
* API/JSCallbackObjectFunctions.h: Ditto.
* runtime/Arguments.cpp:
(JSC::Arguments::put): Change signature to match the base class. This implementation
was no longer being called by anyone. This wasn't noticed because it is merely an
optimization of the base class' implementation.
* runtime/Arguments.h: Ditto.
2011-02-12 Adam Barth <abarth@webkit.org>
Reviewed by Mark Rowe.
Use /dev/urandom as the OSRandomSource on OS(DARWIN)
https://bugs.webkit.org/show_bug.cgi?id=54279
I'm not sure it makes much of a difference whether we use arc4random or
/dev/urandom on Mac. However, there's some aesthetic benefit to using
the same underlying API on as many platforms as reasonable.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
2011-02-12 Adam Barth <abarth@webkit.org>
Reviewed by Kenneth Russell.
Enable ArrayBuffers by default
https://bugs.webkit.org/show_bug.cgi?id=54310
Export the required functions.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-11 Daniel Bates <dbates@rim.com>
Reviewed by Geoffrey Garen.
Remove explicit disable ENABLE_ASSEMBLER_WX_EXCLUSIVE on non-iOS ports
https://bugs.webkit.org/show_bug.cgi?id=54107
It is unnecessary to explicitly disable ENABLE_ASSEMBLER_WX_EXCLUSIVE
by the definition of ENABLE().
* wtf/Platform.h:
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Not reviewed.
Randomly touch some build files in the hopes of fixing the Qt build.
* JavaScriptCore.gypi:
* JavaScriptCore.pri:
* JavaScriptCore.pro:
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Garbage collection timer cycles forever, even when nothing is happening
https://bugs.webkit.org/show_bug.cgi?id=54320
(Rolling back in r78386 with the build fixed.)
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
our timer inert after forcing a GC, to avoid GC'ing repeatedly.
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Not reviewed.
Used svn merge -r78386:78385 to roll out r78386 because it broke the build.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger):
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Garbage collection timer cycles forever, even when nothing is happening
https://bugs.webkit.org/show_bug.cgi?id=54320
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
our timer inert after forcing a GC, to avoid GC'ing repeatedly.
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Try to fix the Windows build: added an exported symbol.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-11 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
A little more encapsulation for the heap: Removed CollectorHeapIterator
https://bugs.webkit.org/show_bug.cgi?id=54298
CollectorHeapIterator is a God object that knows the internals of each
of the pieces of the heap. This undermines the encapsulation I'm trying
to achieve by splitting concepts into different classes.
As an alternative, I've given each class a forEach iteration function,
which takes a functor as an argument. Now, each class just needs to
know how to iterate the things it knows about.
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed CollectorHeapIterator.
* debugger/Debugger.cpp:
(JSC::Recompiler::Recompiler):
(JSC::Recompiler::~Recompiler):
(JSC::Recompiler::operator()):
(JSC::Debugger::recompileAllJSFunctions): Updated to use forEach interface
instead of an iterator.
* runtime/CollectorHeapIterator.h: Removed.
* runtime/Heap.cpp:
(JSC::TypeCounter::TypeCounter):
(JSC::TypeCounter::typeName):
(JSC::TypeCounter::operator()):
(JSC::TypeCounter::take):
(JSC::Heap::protectedObjectTypeCounts):
(JSC::Heap::objectTypeCounts): Added forEach and removed iterator.
* runtime/Heap.h:
(JSC::Heap::forEach):
* runtime/JSGlobalData.cpp:
(JSC::Recompiler::operator()):
(JSC::JSGlobalData::recompileAllJSFunctions):
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::forEach): Added forEach. Removed friend declaration
for CollectorHeapIterator. Now, we can make all our data private and
change it without breaking any other classes.
* runtime/MarkedSpace.cpp:
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::forEach): Added forEach and removed iterator.
2011-02-11 Adam Barth <abarth@webkit.org>
Reviewed by Andreas Kling.
CryptographicRandomNumber has its threading ifdefs backwards
https://bugs.webkit.org/show_bug.cgi?id=54280
Turns out we want the mutex when thread is enabled. :)
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
2011-02-10 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
WebKit should have a cryptographic RNG
https://bugs.webkit.org/show_bug.cgi?id=22049
Teach JavaScriptCore how to export this function.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A little more encapsulation for MarkedBlock: Made all constants private
so clients don't know whether allocations are fixed-sized or not
https://bugs.webkit.org/show_bug.cgi?id=54270
SunSpider reports no change.
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants.
* runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like
all other classes.
* runtime/Heap.cpp:
(JSC::Heap::allocate): Updated for removal of HeapConstants.
(JSC::Heap::reset): Updated to use size(), instead of calculating size
on our own.
* runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces
on special knowledge of fixed-sizery, which only MarkedBlock is supposed
to know about.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants.
Also changed to reset nextCell to 0 at the end of a block, since that
seems more consistent.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char.
This hard-coded size is a little wonky, but the compiler will tell us
if it's ever wrong, so I think it's OK.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep): Updated for removal of HeapConstants.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::size):
(JSC::MarkedBlock::capacity): Made constants private to this class.
Removed HeapConstants. Added size() and capacity() functions.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::objectCount):
(JSC::MarkedSpace::size):
(JSC::MarkedSpace::capacity):
* runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of
direct knowledge of MarkedBlock internals.
2011-02-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A little more encapsulation for MarkedBlock: Made mark bits private
https://bugs.webkit.org/show_bug.cgi?id=54264
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::reset): Renamed clearMarkBits => clearMarks, since clients
don't need to know that marks are represented as bits. Renamed
markedCells => markCount, since clients don't need to know that blocks
are split into cells.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::markCount): New helper functions for encapsulating
the information clients actually need.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::destroy):
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::clearMarks):
(JSC::MarkedSpace::markCount):
(JSC::MarkedSpace::objectCount):
* runtime/MarkedSpace.h: Use new helper functions instead of accessing
MarkedBlock data directly.
2011-02-10 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Cached JavaScript Parser Data Being Left in Memory Cache
https://bugs.webkit.org/show_bug.cgi?id=54245
Added clear method which removes SourceProviderCache items.
Cleaned up extraneous whitespace.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* parser/SourceProviderCache.cpp:
(JSC::SourceProviderCache::~SourceProviderCache):
(JSC::SourceProviderCache::clear):
(JSC::SourceProviderCache::byteSize):
(JSC::SourceProviderCache::add):
* parser/SourceProviderCache.h:
2011-02-10 Joseph Pecoraro <joepeck@webkit.org>
Follow-up fix to r78291. I should pass (int) 0, not '0' to memset.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::commonConstructor): fix mistaken post-review change.
2011-02-10 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by Geoffrey Garen.
Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass
https://bugs.webkit.org/show_bug.cgi?id=54257
A subclass may want to specify the CFRunLoop that the Garbage Collection
will happen on. It was difficult to manipulate this in a subclass because
the current DefaultGCActivityCallback class does this in its constructor.
This patch generalizes things a bit more so that a specific run loop can
be passed in to the constructor. This makes it so all run loop management
can stay in DefaultGCActivityCallback and a subclass can specify any runloop.
* runtime/GCActivityCallback.h: expose a PLATFORM(CF) constructor that can
specify the runloop GC can be scheduled on.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): two constructors,
one that specifies the run loop and passes that on to commonConstructor and
the old constructor defaults to the current run loop.
(JSC::DefaultGCActivityCallback::commonConstructor): do normal construction,
adding the timer to the given runloop.
2011-02-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock
https://bugs.webkit.org/show_bug.cgi?id=54253
SunSpider reports no change.
* runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it
is now unused.
* runtime/Heap.cpp:
(JSC::Heap::reset): Moved the call to shrink() here, since it seems a
little more clear for MarkedSpace's client to tell it explicitly when to
shrink.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and
converted to more directly iterate a MarkedBlock based on knowing its
internal structure.
* runtime/MarkedBlock.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::sweep):
* runtime/MarkedSpace.h: Split out the code mentioned above.
2011-02-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Fix compilation error on OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=53766
Add a HAVE_STRNSTR in Platform.h and define it only on Darwin and FreeBSD.
* wtf/Platform.h:
* wtf/StringExtras.h: Use HAVE(STRNSTR) now.
2011-02-10 Adam Roben <aroben@apple.com>
Print locations of assertions and logs in a way that Visual Studio understands
With this change, double-clicking one of these locations in Visual Studio's Output Window
will focus that line of code in the editor.
Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual
Studio's Output Window does nothing
Reviewed by Alexey Proskuryakov.
* wtf/Assertions.cpp:
(printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using
the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the
same format that cl.exe uses when it prints compiler errors.
2011-02-10 Dan Bernstein <mitz@apple.com>
LLVM Compiler build fix.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
2011-02-10 Peter Varga <pvarga@webkit.org>
Reviewed by Csaba Osztrogonác.
Remove PCRE source from trunk
https://bugs.webkit.org/show_bug.cgi?id=54188
* Android.mk:
* Android.v8.wtf.mk:
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.order:
* JavaScriptCore.pri:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.xcodeproj/project.pbxproj:
* pcre/AUTHORS: Removed.
* pcre/COPYING: Removed.
* pcre/dftables: Removed.
* pcre/pcre.h: Removed.
* pcre/pcre.pri: Removed.
* pcre/pcre_compile.cpp: Removed.
* pcre/pcre_exec.cpp: Removed.
* pcre/pcre_internal.h: Removed.
* pcre/pcre_tables.cpp: Removed.
* pcre/pcre_ucp_searchfuncs.cpp: Removed.
* pcre/pcre_xclass.cpp: Removed.
* pcre/ucpinternal.h: Removed.
* pcre/ucptable.cpp: Removed.
* wscript:
2011-02-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Add randomValuesFromOS for OS(WINDOWS)
https://bugs.webkit.org/show_bug.cgi?id=54155
Use CryptGenRandom for generating cryptographically secure random numbers.
This will work on WinCE and MinGW too.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-10 Jarred Nicholls <jarred@sencha.com>
Reviewed by Adam Barth.
REGRESSION(r78149): Return value of read() shouldn't be ignored.
https://bugs.webkit.org/show_bug.cgi?id=54167
stdio read should have its return value handled. Build error in gcc 4.4.5.
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS
https://bugs.webkit.org/show_bug.cgi?id=54156
randomValuesFromOS generates random numbers of cryptographic quality.
Make this clear by adding "cryptographically" to the function name.
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::ARC4Stream::ARC4RandomNumberGenerator::stir):
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/OSRandomSource.h:
2011-02-09 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader.
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely.
(WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto.
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto.
(WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read.
(WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto.
* wtf/MallocZoneSupport.h:
(WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid.
(WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in
a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can
handle gracefully.
2011-02-09 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 54164 - Optimize global_var accesses on JSVALUE64
Directly embed the pointer to d->registers, optimize out the load
from the variable object, as we do already in JSVALUE32_64.
This is a ~1.5% win on sunspidey.
* jit/JIT.cpp:
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):
2011-02-09 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
A little more encapsulation for MarkedBlock: Made MarkedBlock responsible
for its own initialization and destruction
https://bugs.webkit.org/show_bug.cgi?id=54137
* runtime/CollectorHeapIterator.h: Removed ObjectIterator since it is
now unused.
* runtime/JSCell.h: Maded MarkedBlock a friend so it can construct and
destruct JSCells.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock): Migrated initialization and destruction
code from MarkedSpace, updating it not to use ObjectIterator. We don't
want to use an abstract iterator since iteration will be unique to each
block in the future.
* runtime/MarkedBlock.h: Made the consructor private and moved it into
the .cpp file because it's big now.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::freeBlock): Migrated code.
* runtime/MarkedSpace.h:
(JSC::CollectorHeap::collectorBlock): Keep a vector of MarkedBlock
pointers instead of aligned allocations -- how MarkedBlocks are allocated
is now an implementation detail of MarkedBlock.
2011-02-09 Adam Barth <abarth@webkit.org>
Another attempt to fix the Qt Windows build.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-09 Adam Barth <abarth@webkit.org>
Attempt to fix the Qt Windows build.
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-09 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add WTF::cryptographicallyRandomNumber
https://bugs.webkit.org/show_bug.cgi?id=54083
Introduce a cryptographically strong random number generator to WTF.
The random number generator is based on arc4random as found in:
http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.22
I've changed to source to WebKit style and abstracted the operating
system interaction to OSRandomSource. We'll use this functionality to
expose a cryptographically strong random number generator to
JavaScript.
* Android.mk:
* Android.v8.wtf.mk:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* config.h:
* wtf/CMakeLists.txt:
* wtf/CryptographicallyRandomNumber.cpp: Added.
(WTF::initMutexIfNeeded):
(WTF::init):
(WTF::addRandomData):
(WTF::stir):
(WTF::stirIfNeeded):
(WTF::getByte):
(WTF::getWord):
(WTF::cryptographicallyRandomNumber):
(WTF::cryptographicallyRandomValues):
* wtf/CryptographicallyRandomNumber.h: Added.
* wtf/OSRandomSource.cpp: Added.
(WTF::randomValuesFromOS):
* wtf/OSRandomSource.h: Added.
* wtf/wtf.pri:
2011-02-09 Geoffrey Garen <ggaren@apple.com>
Try to fix the build.
* wtf/Bitmap.h: Include string.h for memset. Not sure why this started
failing now.
2011-02-09 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A tiny bit of encapsulation for MarkedBlock: made its heap data member private
https://bugs.webkit.org/show_bug.cgi?id=54129
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isCellAligned):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::heap): Made the heap data member private, and provided
a constructor and an accessor.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocateBlock):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::heap): Use the constructor and accessor.
2011-02-09 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Replace PCRE with Yarr in WebCore
https://bugs.webkit.org/show_bug.cgi?id=53496
* JavaScriptCore.exp:
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* create_regex_tables:
* runtime/RegExp.cpp:
* wtf/Platform.h:
* yarr/Yarr.h:
* yarr/YarrJIT.cpp:
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.h:
* yarr/YarrSyntaxChecker.h:
* yarr/yarr.pri: Added.
2011-02-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Removed some dead code from Heap
https://bugs.webkit.org/show_bug.cgi?id=54064
* runtime/MarkedSpace.cpp: Removed some now-unused constants and
declarations.
(JSC::MarkedSpace::allocate): Removed some ASSERTs that are also ASSERTed
by our caller. Removed redundant typedefs.
2011-02-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Use a vector to track blocks in the Heap, instead of hand-rolled vector-like code
https://bugs.webkit.org/show_bug.cgi?id=54062
SunSpider reports no change.
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::isValid):
(JSC::CollectorHeapIterator::isLive): Updated for new mark invariant: To
know if an object is live, you just need to test its mark bit.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace): Moved waterMark and highWaterMark from
CollectorHeap into MarkedSpace, since they're global state. Removed call
to memset since CollectorHeap is a true class with its own constructor now.
(JSC::MarkedSpace::destroy): Change uses of m_heap.usedBlocks to
m_heap.blocks.size(), and m_heap.numBlocks to m_heap.blocks.capacity().
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::freeBlock): No need to manage our vector manually anymore.
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::clearMarkBits):
(JSC::MarkedSpace::markedCells):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::objectCount):
(JSC::MarkedSpace::capacity):
(JSC::MarkedSpace::reset):
(JSC::MarkedSpace::primaryHeapEnd):
* runtime/MarkedSpace.h:
(JSC::CollectorHeap::CollectorHeap):
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark):
(JSC::MarkedSpace::contains): Same as above.
2011-02-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Give each MarkedBlock enough mark bits to cover the whole block
https://bugs.webkit.org/show_bug.cgi?id=54029
SunSpider reports no change.
This simplifies access to mark bits, since any cell-aligned pointer
into a block now has a valid mark bit to test.
* runtime/MarkedBlock.h: Changed CELLS_PER_BLOCK to account for the extra
mark bits. This happens not to change its actual value.
(JSC::MarkedBlock::cellNumber):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::setMarked): Changed const JSCell* to const void* to
remove a cast from our caller, and to more accurately reflect the fact
that MarkedBlock is agnostic about the types pointed to by the pointers
you pass to it.
(JSC::MarkedBlock::isPossibleCell): Removed a null check. We now consider
the null pointer to be a possible cell with a 0 (impossible) block. This
removes a null check from marking.
* runtime/MarkedSpace.cpp:
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::contains): Simplified the contains check, and inlined
the whole thing, now that it's so simple.
2011-02-08 Daniel Bates <dbates@rim.com>
Rubber-stamped by Martin Robinson.
Rename enum ProtectionSeting [sic] to ProtectionSetting.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
* jit/ExecutableAllocator.h:
2011-02-08 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Andreas Kling.
[Qt] Should not always define USE_SYSTEM_MALLOC
https://bugs.webkit.org/show_bug.cgi?id=54007
* wtf/Platform.h:
2011-02-08 Dan Bernstein <mitz@apple.com>
Reviewed by Maciej Stachowiak.
LLVM Compiler build fix.
* runtime/WriteBarrier.h:
(JSC::WriteBarrier::WriteBarrier):
2011-02-07 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray.
https://bugs.webkit.org/show_bug.cgi?id=53902
* runtime/Arguments.h:
(JSC::JSActivation::copyRegisters): Uses OwnArrayPtr<Register> instead of Register*.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::copyGlobalsFrom): Ditto.
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
for registerArray.
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::copyRegisterArray): Returns PassOwnArrayPtr<Register> instead of Register*.
(JSC::JSVariableObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
for registerArray.
2011-02-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Removed some dead code from Heap
https://bugs.webkit.org/show_bug.cgi?id=53969
SunSpider reports no change.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::sweep):
* runtime/MarkedSpace.h: Removed resizeBlocks and growBlocks, and
renamed shrinkBlocks to shrink, making it unconditionally shrink as
much as possible.
2011-02-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Simplified the marked space's mark invariant
https://bugs.webkit.org/show_bug.cgi?id=53968
SunSpider reports no change.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate): Mark objects when allocating them. This
means that, at all times other than the mark phase, an object is live
if and only if it is marked.
(JSC::MarkedSpace::containsSlowCase): Use the new mark invariant to
simplify testing whether an object is live.
2011-02-07 Beth Dakin <bdakin@apple.com>
Reviewed by Eric Seidel.
Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
Platform.h instead
* wtf/Platform.h:
2011-02-07 Darin Adler <darin@apple.com>
Reviewed by Antti Koivisto.
Add built-in decoder for UTF-8 for improved performance
https://bugs.webkit.org/show_bug.cgi?id=53898
* wtf/unicode/UnicodeMacrosFromICU.h: Added U8_MAX_LENGTH and
U8_APPEND_UNSAFE. Also fixed header.
2011-02-07 Adam Roben <aroben@apple.com>
Delete precompiled headers whenever any .vsprops file changes
Precompiled headers need to be rebuilt if, e.g., an ENABLE_* macro is changed in one of our
.vsprops files. Unfortunately, Visual Studio isn't smart enough to figure this out, so we
give it some assistance by deleting the precompiled headers whenever any .vsprops file
changes.
I also made some drive-by fixes while I was in the area.
Fixes <http://webkit.org/b/53826> react-to-vsprops-changes.py doesn't force precompiled
headers to be rebuilt, but should
Reviewed by David Kilzer.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stop ignoring the
return code from react-to-vsprops-changes.py so we will notice when errors are introduced.
But skip the script entirely in production builds, where it is both unnecessary and can't
function correctly (due to not having the entire source tree available to it).
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
(main): Removed an extra '*' in the glob for finding manifest files. The extra '*' was
leftover from before we rearranged WebKitBuild in r75138. Moved code to delete an old file
to the new delete_if_older_than function. Added code to delete any precompiled headers older
than the newest .vsprops file.
(delete_if_older_than): Added. Code came from main.
2011-02-07 Antti Koivisto <antti@apple.com>
Not reviewed.
ASSERTS_DISABLED -> ASSERT_DISABLED
* wtf/BloomFilter.h:
2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed; speculative Qt build fix.
* JavaScriptCore.pro:
2011-02-06 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
https://bugs.webkit.org/show_bug.cgi?id=52867
Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set
and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed
OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is
no point in putting deleteOwnedArrayPtr into a separate header.
Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr
without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=.
No tests are added since this is a refactoring.
* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString): Calls adoptArrayPtr.
* GNUmakefile.am: Removed OwnArrayPtrCommon.h
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* runtime/Arguments.cpp:
(JSC::Arguments::deleteProperty): Calls adoptArrayPtr.
* runtime/Arguments.h:
(JSC::Arguments::copyRegisters): Ditto.
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto.
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::setRegisters): Calls operator= instead of set.
* runtime/StructureChain.cpp:
(JSC::StructureChain::StructureChain): Ditto.
* wtf/CMakeLists.txt:
* wtf/DateMath.h:
(JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr
with a null pointer.
* wtf/OwnArrayPtr.h:
* wtf/OwnArrayPtrCommon.h: Removed.
* wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h
(WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h
2011-02-06 Antti Koivisto <antti@apple.com>
Reviewed by Maciej Stachowiak.
Use bloom filter for descendant selector filtering
https://bugs.webkit.org/show_bug.cgi?id=53880
Implement a bloom filter with k=2 and 8 bit counting.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/BloomFilter.h: Added.
(WTF::BloomFilter::maximumCount):
(WTF::BloomFilter::BloomFilter):
(WTF::BloomFilter::mayContain):
(WTF::BloomFilter::add):
(WTF::BloomFilter::remove):
(WTF::BloomFilter::firstSlot):
(WTF::BloomFilter::secondSlot):
(WTF::::add):
(WTF::::remove):
(WTF::::clear):
(WTF::::likelyEmpty):
(WTF::::isClear):
2011-02-04 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Rolled back in r77612 with ASSERT/crash fixed.
https://bugs.webkit.org/show_bug.cgi?id=53759
Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if
necessary. For now, the heap assumes that it always has at least one
block live.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
* runtime/Heap.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::shrinkBlocks):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::reset):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark):
2011-02-04 David Kilzer <ddkilzer@apple.com>
BUILD FIX: REALLY remove the last vestiges of JSVALUE32!
<rdar://problem/8957409> Remove last vestiges of JSVALUE32
<http://webkit.org/b/53779>
* DerivedSources.make: Removed dependency on
JavaScriptCore.JSVALUE32.exp.
2011-02-04 David Kilzer <ddkilzer@apple.com>
<rdar://problem/8957409> Remove last vestiges of JSVALUE32
<http://webkit.org/b/53779>
Reviewed by Darin Adler.
Support for JSVALUE32 was originaly removed in r70111.
* Configurations/JavaScriptCore.xcconfig: Changed armv6 to use
JavaScriptCore.JSVALUE32_64.exp and ppc64 to use
JavaScriptCore.JSVALUE64.exp to match Platform.h.
* DerivedSources.make: Removed rule for
JavaScriptCore.JSVALUE32.exp.
* JavaScriptCore.JSVALUE32only.exp: Removed.
* JavaScriptCore.xcodeproj/project.pbxproj: Removed references
to JavaScriptCore.JSVALUE32only.exp.
2011-02-04 David Kilzer <ddkilzer@apple.com>
Use static_cast and other style cleanup in YarrInterpreter.cpp
<http://webkit.org/b/53772>
Reviewed by John Sullivan.
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::InputStream::readChecked): Use
static_cast.
(JSC::Yarr::Interpreter::InputStream::checkInput): Remove
unnecessary else block.
(JSC::Yarr::Interpreter::matchAssertionEOL): Ditto.
(JSC::Yarr::Interpreter::backtrackBackReference): Ditto.
(JSC::Yarr::ByteCompiler::emitDisjunction): Use static_cast.
2011-02-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77625 and r77626.
http://trac.webkit.org/changeset/77625
http://trac.webkit.org/changeset/77626
https://bugs.webkit.org/show_bug.cgi?id=53765
It broke Windows builds (Requested by Ossy_ on #webkit).
* JavaScriptCore.exp:
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* create_regex_tables:
* runtime/RegExp.cpp:
* wtf/Platform.h:
* yarr/Yarr.h:
* yarr/YarrJIT.cpp:
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.h:
* yarr/YarrSyntaxChecker.h:
* yarr/yarr.pri: Removed.
2011-02-04 Jessie Berlin <jberlin@apple.com>
Windows build fix. Unreviewed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2011-02-04 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Replace PCRE with Yarr in WebCore
https://bugs.webkit.org/show_bug.cgi?id=53496
* JavaScriptCore.exp:
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* create_regex_tables:
* runtime/RegExp.cpp:
* wtf/Platform.h:
* yarr/Yarr.h:
* yarr/YarrJIT.cpp:
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.h:
* yarr/YarrSyntaxChecker.h:
* yarr/yarr.pri: Added.
2011-02-04 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed rollout two patches r77614 and r77612.
REGRESSION: Snow Leopard Intel Release anumber of failing tests.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
* runtime/Heap.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::reset):
* runtime/MarkedSpace.h:
2011-02-04 Geoffrey Garen <ggaren@apple.com>
Try to fix 32bit build.
* runtime/Heap.cpp:
(JSC::Heap::reset): Use an explicit cast to avoid shortening warnings,
since 1.5 is double (64bit), and the result is size_t (32bit).
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Changed MarkedSpace to delegate grow/shrink decisions to Heap
https://bugs.webkit.org/show_bug.cgi?id=53759
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
* runtime/Heap.h: Reorganized a few data members for better cache locality.
Added a grow policy.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::reset): Don't shrink automatically. Instead, wait for
the heap to make an explicit sweep call.
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark): Use a watermark to determine how
many bytes to allocate before failing and giving the heap an opportunity
to collect garbage. This also means that we allocate blocks on demand,
instead of ahead of time.
2011-02-03 James Kozianski <koz@chromium.org>
Reviewed by Dimitri Glazkov.
Add navigator.registerProtocolHandler behind a flag.
https://bugs.webkit.org/show_bug.cgi?id=52609
* Configurations/FeatureDefines.xcconfig:
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Not all blocks are freed when the heap is freed (counting is hard!)
https://bugs.webkit.org/show_bug.cgi?id=53732
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::destroy): Freeing a block compacts the list, so just
keep freeing block 0 until there are no blocks left.
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Try to fix the Mac build.
* JavaScriptCore.xcodeproj/project.pbxproj: The new MarkedBlock.h header
needs to be private, not project, so other projects can include headers
that depend on it.
2011-02-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Start using MarkedBlock instead of CollectorBlock
https://bugs.webkit.org/show_bug.cgi?id=53693
SunSpider reports no change.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::blockFor):
(JSC::MarkedBlock::setMarked):
(JSC::MarkedBlock::isCellAligned):
(JSC::MarkedBlock::isPossibleCell): Updated for const-ness.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::containsSlowCase):
(JSC::MarkedSpace::clearMarkBits): Updated for const-ness.
* runtime/MarkedSpace.h:
(JSC::CollectorHeap::collectorBlock):
(JSC::MarkedSpace::heap):
(JSC::MarkedSpace::isMarked):
(JSC::MarkedSpace::testAndSetMarked):
(JSC::MarkedSpace::setMarked):
(JSC::MarkedSpace::contains): Switched from CollectorBlock to MarkedBlock,
and deleted dead CollectorBlock-related code.
2011-02-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Avoid strlen() in AtomicString::fromUTF8
https://bugs.webkit.org/show_bug.cgi?id=50516
Add an overload to calculateStringHashFromUTF8 to get
strlen() of the input data with only one call.
This change shows about 3% performance win on the xml-parser benchmark.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::fromUTF8):
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
(WTF::Unicode::calculateStringHashFromUTF8):
(WTF::Unicode::calculateStringHashAndLengthFromUTF8):
* wtf/unicode/UTF8.h:
2011-02-02 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-02 Gavin Barraclough <barraclough@apple.com>
oops, build fix!
* wtf/Assertions.cpp:
2011-02-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 53650 - Add a BACKTRACE macro to Assertions.h
Add a BACKTRACE macro to Assertions.h, which will print a backtrace on
debug Mac builds, make CRASH (and thus ASSERT) automatically call this.
* JavaScriptCore.exp:
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2011-02-02 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Improper backtrack of nested non-capturing greedy paren to prior paren
https://bugs.webkit.org/show_bug.cgi?id=53261
A paren that follows a non-capturing greedy paren nested within a
non-capturing fixed paren was back tracking to the last paren
processed instead of the immediately prior paren.
Refactored default backtracking of parens to prior paren to work for
both nested (within) and immediately prior (after) parens.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::YarrGenerator::TermGenerationState::setJumpListToPriorParen):
(JSC::Yarr::YarrGenerator::TermGenerationState::getJumpListToPriorParen):
(JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
(JSC::Yarr::YarrGenerator::generateDisjunction):
2011-02-02 Jeff Miller <jeffm@apple.com>
Reviewed by Darin Adler and Steve Falkenburg.
Add DerivedSources.make to some Visual Studio projects
https://bugs.webkit.org/show_bug.cgi?id=53607
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add DerivedSources.make.
2011-02-02 Steve Lacey <sjl@chromium.org>
Reviewed by Eric Carlson.
Implement basic media statistics on media elements.
https://bugs.webkit.org/show_bug.cgi?id=53322
* Configurations/FeatureDefines.xcconfig:
2011-02-02 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fixes for wxWebKit.
* wtf/wx/StringWx.cpp:
(WTF::String::String):
2011-02-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
A little more Heap refactoring
https://bugs.webkit.org/show_bug.cgi?id=53577
SunSpider reports no change.
Split out MarkedBlock into its own file / class.
Did the following renames:
isCellMarked => isMarked
checkMarkCell => testAndSetMarked
markCell => setMarked
cellOffset => cellNumber
collectorBlock => blockFor
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/Heap.cpp:
(JSC::WeakGCHandlePool::update):
* runtime/Heap.h:
(JSC::Heap::isMarked):
(JSC::Heap::testAndSetMarked):
(JSC::Heap::setMarked):
* runtime/JSArray.h:
(JSC::MarkStack::markChildren):
(JSC::MarkStack::drain):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::internalAppend):
* runtime/MarkedBlock.cpp: Added.
* runtime/MarkedBlock.h: Added.
(JSC::MarkedBlock::blockFor):
(JSC::MarkedBlock::cellNumber):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::setMarked):
(JSC::MarkedBlock::isCellAligned):
(JSC::MarkedBlock::isPossibleCell):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::isMarked):
(JSC::MarkedSpace::testAndSetMarked):
(JSC::MarkedSpace::setMarked):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
2011-02-02 Sam Weinig <sam@webkit.org>
Fix windows clean build.
* DerivedSources.make:
2011-02-02 Alejandro G. Castro <alex@igalia.com>
Reviewed by Martin Robinson.
[GTK] Fix dist compilation
https://bugs.webkit.org/show_bug.cgi?id=53579
* GNUmakefile.am: Added WriteBarrier.h to the sources, it was
added in r77151
2011-02-01 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77297.
http://trac.webkit.org/changeset/77297
https://bugs.webkit.org/show_bug.cgi?id=53538
caused leopard crashes (Requested by paroga on #webkit).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::fromUTF8):
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::calculateStringHashFromUTF8):
* wtf/unicode/UTF8.h:
2011-02-01 Sam Weinig <sam@webkit.org>
Fix Mac production builds.
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-01 Sam Weinig <sam@webkit.org>
Try to fix the windows build.
* DerivedSources.make:
2011-02-01 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Avoid strlen() in AtomicString::fromUTF8
https://bugs.webkit.org/show_bug.cgi?id=50516
Add an overload to calculateStringHashFromUTF8 to get
strlen() of the input data with only one call.
This change shows about 3% performance win on the xml-parser benchmark.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::fromUTF8):
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
(WTF::Unicode::calculateStringHashFromUTF8):
(WTF::Unicode::calculateStringHashAndLengthFromUTF8):
* wtf/unicode/UTF8.h:
2011-02-01 Sam Weinig <sam@webkit.org>
Reviewed by Beth Dakin.
Part 2 for <rdar://problem/8492788>
Adopt WKScrollbarPainterController
Use header detection to define scrollbar painting controller #define.
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Refactor JSGlobalObject-related tear-down
https://bugs.webkit.org/show_bug.cgi?id=53478
While investigating crashes caused by r77082, I noticed some strange
destructor-time behaviors. This patch makes them less strange.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
(JSC::GlobalCodeBlock::GlobalCodeBlock):
(JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code
blocks on the Heap, instead of on independent global objects. The heap
is guaranteed to outlast any GC-owned data structure. The heap is also
a natural place to store objects that needs out-of-band marking, since
the heap is responsible for marking all roots.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::globalObjectCount):
(JSC::Heap::protectedGlobalObjectCount):
* runtime/Heap.h:
(JSC::Heap::codeBlocks):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
* runtime/MarkedSpace.cpp: Store the set of global objects in a weak map
owned by JSGlobalData, instead of an instrusive circular linked list.
This is simpler, and it avoids destructor-time access between garbage
collected objects, which is hard to get right.
(JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing
everything down. Otherwise, weak data structures will incorrectly report
that objects pending destruction are still alive.
2011-02-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
REGRESSION(77082): GC-related crashes seen: on WebKit2 bot; on GTK 32bit
bot; loading trac pages; typing in search field
https://bugs.webkit.org/show_bug.cgi?id=53519
The crashes were all caused by failure to run an object's destructor.
* runtime/CollectorHeapIterator.h:
(JSC::ObjectIterator::ObjectIterator): Don't skip forward upon
construction. The iterator class used to do that when it was designed
for prior-to-beginning initialization. I forgot to remove this line
of code when I changed the iterator to normal initialization.
Skipping forward upon construction was causing the heap to skip running
the destructor for the very first object in a block when destroying the
block. This usually did not crash, since block destruction is rare and
most objects have pretty trivial destructors. However, in the rare case
when the heap would destroy a block whose first object was a global
object or a DOM node, BOOM.
2011-01-31 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Update JSObject storage for new marking API
https://bugs.webkit.org/show_bug.cgi?id=53467
JSObject no longer uses EncodedJSValue for its property storage.
This produces a stream of mechanical changes to PropertySlot and
anonymous storage APIs.
* JavaScriptCore.exp:
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::ArrayPrototype):
* runtime/BooleanConstructor.cpp:
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanObject.cpp:
(JSC::BooleanObject::BooleanObject):
* runtime/BooleanObject.h:
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::DatePrototype):
* runtime/JSActivation.cpp:
(JSC::JSActivation::getOwnPropertySlot):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObject):
* runtime/JSObject.cpp:
(JSC::JSObject::fillGetterPropertySlot):
* runtime/JSObject.h:
(JSC::JSObject::getDirectLocation):
(JSC::JSObject::offsetForLocation):
(JSC::JSObject::putAnonymousValue):
(JSC::JSObject::clearAnonymousValue):
(JSC::JSObject::getAnonymousValue):
(JSC::JSObject::putThisToAnonymousValue):
(JSC::JSObject::locationForOffset):
(JSC::JSObject::inlineGetOwnPropertySlot):
* runtime/JSObjectWithGlobalObject.cpp:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
(JSC::JSWrapperObject::setInternalValue):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/NumberConstructor.cpp:
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::NumberObject::NumberObject):
(JSC::constructNumber):
* runtime/NumberObject.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/PropertySlot.h:
(JSC::PropertySlot::getValue):
(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setRegisterSlot):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::setWithoutWriteBarrier):
2011-02-01 Daniel Bates <dbates@rim.com>
Reviewed by Antonio Gomes.
Modify RandomNumberSeed.h to use USE(MERSENNE_TWISTER_19937)
https://bugs.webkit.org/show_bug.cgi?id=53506
Currently, use of the Mersenne Twister pseudorandom number generator
is hardcoded to the Windows CE port. With the passing of bug #53253,
we can generalize support for this PRNG to all ports that use srand(3)
and rand(3), including Windows CE.
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2011-02-01 Dave Tapuska <dtapuska@rim.com>
Reviewed by Gavin Barraclough.
MacroAssemblerARM would generate code that did 32bit loads
on addresses that were not aligned. More specifically it would
generate a ldr r8,[r1, #7] which isn't valid on ARMv5 and lower.
The intended instruction really is ldrb r8,[r1, #7]; ensure we
call load8 instead of load32.
https://bugs.webkit.org/show_bug.cgi?id=46095
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::set32Test32):
(JSC::MacroAssemblerARM::set32Test8):
2011-02-01 Darin Fisher <darin@chromium.org>
Reviewed by Eric Seidel.
Fix some Visual Studio compiler warnings.
https://bugs.webkit.org/show_bug.cgi?id=53476
* wtf/MathExtras.h:
(clampToInteger):
(clampToPositiveInteger):
* wtf/ThreadingWin.cpp:
(WTF::absoluteTimeToWaitTimeoutInterval):
2011-01-31 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Bogus callframe during stack unwinding
https://bugs.webkit.org/show_bug.cgi?id=53454
Trying to access a callframe's globalData after destroying its
ScopeChain is not a good thing. While we could access the
globalData directly through the (known valid) scopechain we're
holding on to, it feels fragile. Instead we push the valid
ScopeChain onto the callframe again to ensure that the callframe
itself remains valid.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
2011-01-31 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
https://bugs.webkit.org/show_bug.cgi?id=53271
Reapplying this change again.
Changed isValid() to use .get() as a result of change r77151.
Added new isValid() methods to check if a contained object in
a WeakGCMap is valid when using an unchecked iterator.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
2011-01-31 Oliver Hunt <oliver@apple.com>
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
rolling r77098, r77099, r77100, r77109, and
r77111 back in, along with a few more Qt fix attempts.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append):
(JSC::JSCell::MarkStack::internalAppend):
(JSC::JSCell::MarkStack::deprecatedAppend):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::Holder::objectSlot):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::putUndefinedAtDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStack):
(JSC::MarkStack::deprecatedAppendValues):
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
(JSC::Structure::storedPrototypeSlot):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::uncheckedGetSlot):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Added.
(JSC::DeprecatedPtr::DeprecatedPtr):
(JSC::DeprecatedPtr::get):
(JSC::DeprecatedPtr::operator*):
(JSC::DeprecatedPtr::operator->):
(JSC::DeprecatedPtr::slot):
(JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
(JSC::DeprecatedPtr::operator!):
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrierBase::get):
(JSC::WriteBarrierBase::operator*):
(JSC::WriteBarrierBase::operator->):
(JSC::WriteBarrierBase::clear):
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrier::WriteBarrier):
(JSC::operator==):
2011-01-31 Dan Winship <danw@gnome.org>
Reviewed by Gustavo Noronha Silva.
wss (websockets ssl) support for gtk via new gio TLS support
https://bugs.webkit.org/show_bug.cgi?id=50344
Add a GPollableOutputStream typedef for TLS WebSockets support
* wtf/gobject/GTypedefs.h:
2011-01-31 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=53352
Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
The FixedVMPoolAllocator currently uses a best fix policy -
switch to first fit, this is less prone to external fragmentation.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::AllocationTableSizeClass::AllocationTableSizeClass):
(JSC::AllocationTableSizeClass::blockSize):
(JSC::AllocationTableSizeClass::blockCount):
(JSC::AllocationTableSizeClass::blockAlignment):
(JSC::AllocationTableSizeClass::size):
(JSC::AllocationTableLeaf::AllocationTableLeaf):
(JSC::AllocationTableLeaf::~AllocationTableLeaf):
(JSC::AllocationTableLeaf::allocate):
(JSC::AllocationTableLeaf::free):
(JSC::AllocationTableLeaf::isEmpty):
(JSC::AllocationTableLeaf::isFull):
(JSC::AllocationTableLeaf::size):
(JSC::AllocationTableLeaf::classForSize):
(JSC::AllocationTableLeaf::dump):
(JSC::LazyAllocationTable::LazyAllocationTable):
(JSC::LazyAllocationTable::~LazyAllocationTable):
(JSC::LazyAllocationTable::allocate):
(JSC::LazyAllocationTable::free):
(JSC::LazyAllocationTable::isEmpty):
(JSC::LazyAllocationTable::isFull):
(JSC::LazyAllocationTable::size):
(JSC::LazyAllocationTable::dump):
(JSC::LazyAllocationTable::classForSize):
(JSC::AllocationTableDirectory::AllocationTableDirectory):
(JSC::AllocationTableDirectory::~AllocationTableDirectory):
(JSC::AllocationTableDirectory::allocate):
(JSC::AllocationTableDirectory::free):
(JSC::AllocationTableDirectory::isEmpty):
(JSC::AllocationTableDirectory::isFull):
(JSC::AllocationTableDirectory::size):
(JSC::AllocationTableDirectory::classForSize):
(JSC::AllocationTableDirectory::dump):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::allocated):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::classForSize):
(JSC::FixedVMPoolAllocator::offsetToPointer):
(JSC::FixedVMPoolAllocator::pointerToOffset):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::committed):
2011-01-31 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r76969.
http://trac.webkit.org/changeset/76969
https://bugs.webkit.org/show_bug.cgi?id=53418
"It is causing crashes in GTK+ and Leopard bots" (Requested by
alexg__ on #webkit).
* runtime/WeakGCMap.h:
2011-01-30 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed, rolling out r77098, r77099, r77100, r77109, and
r77111.
http://trac.webkit.org/changeset/77098
http://trac.webkit.org/changeset/77099
http://trac.webkit.org/changeset/77100
http://trac.webkit.org/changeset/77109
http://trac.webkit.org/changeset/77111
https://bugs.webkit.org/show_bug.cgi?id=53219
Qt build is broken
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::JSValue::toThisObject):
(JSC::JSCell::MarkStack::append):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Removed.
2011-01-30 Simon Fraser <simon.fraser@apple.com>
Build fix the build fix. I assume Oliver meant m_cell, not m_value.
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::clear):
2011-01-30 Oliver Hunt <oliver@apple.com>
More Qt build fixes
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::clear):
2011-01-30 Oliver Hunt <oliver@apple.com>
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
rolling r77006 and r77020 back in.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append):
(JSC::JSCell::MarkStack::internalAppend):
(JSC::JSCell::MarkStack::deprecatedAppend):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::Holder::objectSlot):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::putUndefinedAtDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStack):
(JSC::MarkStack::deprecatedAppendValues):
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
(JSC::Structure::storedPrototypeSlot):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::uncheckedGetSlot):
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Added.
(JSC::DeprecatedPtr::DeprecatedPtr):
(JSC::DeprecatedPtr::get):
(JSC::DeprecatedPtr::operator*):
(JSC::DeprecatedPtr::operator->):
(JSC::DeprecatedPtr::slot):
(JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
(JSC::DeprecatedPtr::operator!):
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrierBase::get):
(JSC::WriteBarrierBase::operator*):
(JSC::WriteBarrierBase::operator->):
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrier::WriteBarrier):
(JSC::operator==):
2011-01-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Filter all Heap collection through a common reset function, in
preparation for adding features triggered by collection.
https://bugs.webkit.org/show_bug.cgi?id=53396
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::reportExtraMemoryCostSlowCase): When we're over the extraCost
limit, just call collectAllGarbage() instead of rolling our own special
way of resetting the heap. In theory, this may be slower in some cases,
but it also fixes cases of pathological heap growth that we've seen,
where the only objects being allocated are temporary and huge
(<rdar://problem/8885843>).
(JSC::Heap::allocate):
(JSC::Heap::collectAllGarbage): Use the shared reset function.
(JSC::Heap::reset):
* runtime/Heap.h: Carved a new shared reset function out of the old
collectAllGarbage.
2011-01-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77025.
http://trac.webkit.org/changeset/77025
https://bugs.webkit.org/show_bug.cgi?id=53401
It made js1_5/Regress/regress-159334.js fail on 64 bit Linux
(Requested by Ossy on #webkit).
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FreeListEntry::FreeListEntry):
(JSC::AVLTreeAbstractorForFreeList::get_less):
(JSC::AVLTreeAbstractorForFreeList::set_less):
(JSC::AVLTreeAbstractorForFreeList::get_greater):
(JSC::AVLTreeAbstractorForFreeList::set_greater):
(JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
(JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
(JSC::AVLTreeAbstractorForFreeList::null):
(JSC::AVLTreeAbstractorForFreeList::compare_key_key):
(JSC::AVLTreeAbstractorForFreeList::compare_key_node):
(JSC::AVLTreeAbstractorForFreeList::compare_node_node):
(JSC::reverseSortFreeListEntriesByPointer):
(JSC::reverseSortCommonSizedAllocations):
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::addToFreeList):
(JSC::FixedVMPoolAllocator::coalesceFreeSpace):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::allocInternal):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::FixedVMPoolAllocator::addToCommittedByteCount):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::maybeModifyVMPoolSize):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
2011-01-30 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Daniel Bates.
Code style issue in JavaScriptCore/wtf/CurrentTime.h
https://bugs.webkit.org/show_bug.cgi?id=53394
According to rule #3 at http://webkit.org/coding/coding-style.html,
This patch fix style issue in CurrentTime.h.
No functionality change, no new tests.
* wtf/CurrentTime.h:
(WTF::currentTimeMS):
(WTF::getLocalTime):
2011-01-30 Benjamin Poulain <ikipou@gmail.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] JavaScriptCore does not link on Mac if building WebKit 2
https://bugs.webkit.org/show_bug.cgi?id=53377
The option "-whole-archive" is not availabe with the libtool of Mac OS X,
instead, we can use "-all_load" on Mac.
* JavaScriptCore.pri:
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Sorry Leopard bot -- I committed a change by accident.
* JavaScriptCore.exp: You may have your symbols back now.
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Simplified Heap iteration
https://bugs.webkit.org/show_bug.cgi?id=53393
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::isValid):
(JSC::CollectorHeapIterator::isLive):
(JSC::CollectorHeapIterator::advance): Removed "max" argument to
advance because it's a constant.
(JSC::LiveObjectIterator::LiveObjectIterator):
(JSC::LiveObjectIterator::operator++):
(JSC::DeadObjectIterator::DeadObjectIterator):
(JSC::DeadObjectIterator::operator++):
(JSC::ObjectIterator::ObjectIterator):
(JSC::ObjectIterator::operator++): Factored out common checks into
two helper functions -- isValid() for "Am I past the end?" and isLive()
for "Is the cell I'm pointing to live?".
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap
to the end, to avoid making sweep subtly reliant on internal Heap state.
(JSC::MarkedSpace::primaryHeapBegin):
(JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where
iteration begins.
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Cameron Zwarich.
Simplified heap destruction
https://bugs.webkit.org/show_bug.cgi?id=53392
* JavaScriptCore.exp:
* runtime/Heap.cpp:
(JSC::Heap::destroy):
* runtime/Heap.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::destroy):
* runtime/MarkedSpace.h: Don't go out of our way to destroy GC-protected
cells last -- the difficult contortions required to do so just don't seem
justified. We make no guarantees about GC protection after the client
throws away JSGlobalData, and it doesn't seem like any meaningful
guarantee is even possible.
2011-01-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Switched heap to use the Bitmap class and removed CollectorBitmap
https://bugs.webkit.org/show_bug.cgi?id=53391
SunSpider says 1.005x as fast. Seems like a fluke.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate): Updated for rename and returning a value
rather than taking a value by reference.
* runtime/MarkedSpace.h: Code reuse is good.
* wtf/Bitmap.h:
(WTF::::testAndSet): Added, since this is the one thing Bitmap was missing
which CollectorBitmap had. (Renamed from the less conventional "getset".)
(WTF::::nextPossiblyUnset): Renamed and changed to return a value for
clarity. It's all the same with inlining.
2011-01-28 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Some more Heap cleanup.
https://bugs.webkit.org/show_bug.cgi?id=53357
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols.
* runtime/Heap.cpp:
(JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to
reportExtraMemoryCostSlowCase to match our naming conventions.
(JSC::Heap::capacity): Renamed size to capacity because this function
returns the capacity of the heap, including unused portions.
* runtime/Heap.h:
(JSC::Heap::globalData):
(JSC::Heap::markedSpace):
(JSC::Heap::machineStackMarker):
(JSC::Heap::reportExtraMemoryCost): Moved statics to the top of the file.
Moved ctor and dtor to the beginning of the class definition. Grouped
functions by purpose.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::capacity): Renamed size to capacity because this
function returns the capacity of the heap, including unused portions.
* runtime/MarkedSpace.h: Removed statistics and the Statistics class because
the same information can be gotten just by calling size() and capacity().
* runtime/MemoryStatistics.cpp:
* runtime/MemoryStatistics.h: Ditto.
2011-01-29 Daniel Bates <dbates@rim.com>
Reviewed by Eric Seidel.
Move wince/mt19937ar.c to ThirdParty and make it a policy choice
https://bugs.webkit.org/show_bug.cgi?id=53253
Make inclusion of MT19937 a policy decision.
Currently, we hardcoded to use MT19937 when building for
Windows CE. Instead, we should make this a policy decision
with the Windows CE port using this by default.
* JavaScriptCore.pri: Append Source/ThirdParty to the end
of the list include directories.
* wtf/CMakeLists.txt: Ditto.
* wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when
building for Windows CE.
* wtf/RandomNumber.cpp:
(WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE).
2011-01-29 Cameron Zwarich <zwarich@apple.com>
Reviewed by David Kilzer.
Bug 53374 - Remove uses of unsafe string functions in debugging code
https://bugs.webkit.org/show_bug.cgi?id=53374
* runtime/RegExp.cpp:
(JSC::RegExp::printTraceData):
2011-01-29 Cameron Zwarich <zwarich@apple.com>
Reviewed by Oliver Hunt.
JavaScriptCoreUseJIT environment variable broken
https://bugs.webkit.org/show_bug.cgi?id=53372
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData): Check the actual value in the string returned
by getenv() rather than just doing a NULL check on the return value.
2011-01-29 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Move CharacterNames.h into WTF directory
https://bugs.webkit.org/show_bug.cgi?id=49618
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h.
* wtf/unicode/UTF8.cpp:
2011-01-28 Simon Fraser <simon.fraser@apple.com>
Reviewed by Gavin Barraclough.
Add various clampToInt() methods to MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=52910
Add functions for clamping doubles and floats to valid int
ranges, for signed and positive integers.
* wtf/MathExtras.h:
(clampToInteger):
(clampToPositiveInteger):
2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r77006 and r77020.
http://trac.webkit.org/changeset/77006
http://trac.webkit.org/changeset/77020
https://bugs.webkit.org/show_bug.cgi?id=53360
"Broke Windows tests" (Requested by rniwa on #webkit).
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::tryCacheGetByID):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::JSValue::toThisObject):
(JSC::JSCell::MarkStack::append):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::Structure::prototypeForLookup):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getDirectOffset):
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
(JSC::JSPropertyNameIterator::get):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
(JSC::MarkStack::appendValues):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::isValid):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Removed.
2011-01-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=53352
Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
The FixedVMPoolAllocator currently uses a best fix policy -
switch to first fit, this is less prone to external fragmentation.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::AllocationTableSizeClass::AllocationTableSizeClass):
(JSC::AllocationTableSizeClass::blockSize):
(JSC::AllocationTableSizeClass::blockCount):
(JSC::AllocationTableSizeClass::blockAlignment):
(JSC::AllocationTableSizeClass::size):
(JSC::AllocationTableLeaf::AllocationTableLeaf):
(JSC::AllocationTableLeaf::~AllocationTableLeaf):
(JSC::AllocationTableLeaf::allocate):
(JSC::AllocationTableLeaf::free):
(JSC::AllocationTableLeaf::isEmpty):
(JSC::AllocationTableLeaf::isFull):
(JSC::AllocationTableLeaf::size):
(JSC::AllocationTableLeaf::classForSize):
(JSC::AllocationTableLeaf::dump):
(JSC::LazyAllocationTable::LazyAllocationTable):
(JSC::LazyAllocationTable::~LazyAllocationTable):
(JSC::LazyAllocationTable::allocate):
(JSC::LazyAllocationTable::free):
(JSC::LazyAllocationTable::isEmpty):
(JSC::LazyAllocationTable::isFull):
(JSC::LazyAllocationTable::size):
(JSC::LazyAllocationTable::dump):
(JSC::LazyAllocationTable::classForSize):
(JSC::AllocationTableDirectory::AllocationTableDirectory):
(JSC::AllocationTableDirectory::~AllocationTableDirectory):
(JSC::AllocationTableDirectory::allocate):
(JSC::AllocationTableDirectory::free):
(JSC::AllocationTableDirectory::isEmpty):
(JSC::AllocationTableDirectory::isFull):
(JSC::AllocationTableDirectory::size):
(JSC::AllocationTableDirectory::classForSize):
(JSC::AllocationTableDirectory::dump):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::allocated):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::classForSize):
(JSC::FixedVMPoolAllocator::offsetToPointer):
(JSC::FixedVMPoolAllocator::pointerToOffset):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::committed):
2011-01-27 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Convert markstack to a slot visitor API
https://bugs.webkit.org/show_bug.cgi?id=53219
Move the MarkStack over to a slot based marking API.
In order to avoiding aliasing concerns there are two new types
that need to be used when holding on to JSValues and JSCell that
need to be marked: WriteBarrier and DeprecatedPtr. WriteBarrier
is expected to be used for any JSValue or Cell that's lifetime and
marking is controlled by another GC object. DeprecatedPtr is used
for any value that we need to rework ownership for.
The change over to this model has produced a large amount of
code changes, but they are mostly mechanical (forwarding JSGlobalData,
etc).
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
(JSC::JSCallbackObject::setPrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::put):
(JSC::::staticFunctionGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeConstructor):
(JSObjectSetPrivateProperty):
* API/JSWeakObjectMapRefInternal.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
(JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
(JSC::BytecodeGenerator::findScopedProperty):
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
(JSC::DebuggerActivation::markChildren):
* debugger/DebuggerActivation.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::execute):
(JSC::Interpreter::privateExecute):
* interpreter/Register.h:
(JSC::Register::jsValueSlot):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
* runtime/Arguments.cpp:
(JSC::Arguments::markChildren):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
* runtime/Arguments.h:
(JSC::Arguments::setActivation):
(JSC::Arguments::Arguments):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
(JSC::constructBoolean):
(JSC::constructBooleanFromImmediateBoolean):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/ConservativeSet.h:
(JSC::ConservativeSet::mark):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::markChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::GetterSetter):
(JSC::GetterSetter::getter):
(JSC::GetterSetter::setGetter):
(JSC::GetterSetter::setter):
(JSC::GetterSetter::setSetter):
* runtime/GlobalEvalFunction.cpp:
(JSC::GlobalEvalFunction::GlobalEvalFunction):
(JSC::GlobalEvalFunction::markChildren):
* runtime/GlobalEvalFunction.h:
(JSC::GlobalEvalFunction::cachedGlobalObject):
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::value):
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
* runtime/JSActivation.cpp:
(JSC::JSActivation::put):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
* runtime/JSArray.h:
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append):
(JSC::JSCell::MarkStack::appendCell):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::regExpConstructor):
(JSC::JSGlobalObject::errorConstructor):
(JSC::JSGlobalObject::evalErrorConstructor):
(JSC::JSGlobalObject::rangeErrorConstructor):
(JSC::JSGlobalObject::referenceErrorConstructor):
(JSC::JSGlobalObject::syntaxErrorConstructor):
(JSC::JSGlobalObject::typeErrorConstructor):
(JSC::JSGlobalObject::URIErrorConstructor):
(JSC::JSGlobalObject::evalFunction):
(JSC::JSGlobalObject::objectPrototype):
(JSC::JSGlobalObject::functionPrototype):
(JSC::JSGlobalObject::arrayPrototype):
(JSC::JSGlobalObject::booleanPrototype):
(JSC::JSGlobalObject::stringPrototype):
(JSC::JSGlobalObject::numberPrototype):
(JSC::JSGlobalObject::datePrototype):
(JSC::JSGlobalObject::regExpPrototype):
(JSC::JSGlobalObject::methodCallDummy):
(JSC::constructArray):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
(JSC::Stringifier::Holder::objectSlot):
(JSC::Stringifier::markAggregate):
(JSC::Stringifier::stringify):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::callReviver):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::removeDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::putDirectOffset):
(JSC::JSObject::putUndefinedAtDirectOffset):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSObject::putDirectFunction):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectFunctionWithoutTransition):
(JSC::JSValue::putDirect):
(JSC::JSObject::allocatePropertyStorageInline):
(JSC::JSObject::markChildrenDirect):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/JSValue.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::markChildren):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
(JSC::lookupPut):
* runtime/MarkStack.h:
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::constructWithNumberConstructor):
* runtime/NumberObject.cpp:
(JSC::constructNumber):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
(JSC::objectConstructorGetOwnPropertyDescriptor):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
(JSC::resolveBase):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setExistingProperty):
(JSC::PutPropertySlot::setNewProperty):
(JSC::PutPropertySlot::base):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::~ScopeChainNode):
(JSC::ScopeChainIterator::operator*):
(JSC::ScopeChainIterator::operator->):
(JSC::ScopeChain::top):
* runtime/ScopeChainMark.h:
(JSC::ScopeChain::markAggregate):
* runtime/SmallStrings.cpp:
(JSC::isMarked):
(JSC::SmallStrings::markChildren):
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/Structure.cpp:
(JSC::Structure::flattenDictionaryStructure):
* runtime/Structure.h:
(JSC::Structure::storedPrototypeSlot):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::uncheckedGet):
(JSC::WeakGCMap::uncheckedGetSlot):
(JSC::::get):
(JSC::::take):
(JSC::::set):
(JSC::::uncheckedRemove):
* runtime/WriteBarrier.h: Added.
(JSC::DeprecatedPtr::DeprecatedPtr):
(JSC::DeprecatedPtr::get):
(JSC::DeprecatedPtr::operator*):
(JSC::DeprecatedPtr::operator->):
(JSC::DeprecatedPtr::slot):
(JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
(JSC::DeprecatedPtr::operator!):
(JSC::WriteBarrierBase::set):
(JSC::WriteBarrierBase::get):
(JSC::WriteBarrierBase::operator*):
(JSC::WriteBarrierBase::operator->):
(JSC::WriteBarrierBase::slot):
(JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
(JSC::WriteBarrierBase::operator!):
(JSC::WriteBarrier::WriteBarrier):
(JSC::operator==):
2011-01-28 Adam Roben <aroben@apple.com>
Chromium build fix after r76967
* wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other
similar macros in this file.
2011-01-28 Michael Saboff <msaboff@apple.com>
Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
https://bugs.webkit.org/show_bug.cgi?id=53271
Reapplying this this change. No change from prior patch in
JavaScriptCore.
Added new isValid() methods to check if a contained object in
a WeakGCMap is valid when using an unchecked iterator.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
2011-01-27 Adam Roben <aroben@apple.com>
Extract code to convert a WTF absolute time to a Win32 wait interval into a separate
function
Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a
Win32 event
Reviewed by Dave Hyatt.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function.
* wtf/ThreadingPrimitives.h: Declare the new function.
* wtf/ThreadingWin.cpp:
(WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait
interval from here...
(WTF::absoluteTimeToWaitTimeoutInterval): ...to here.
2011-01-28 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
Add basic rubber banding support
<rdar://problem/8219429>
https://bugs.webkit.org/show_bug.cgi?id=53277
* wtf/Platform.h: Add ENABLE for rubber banding.
2011-01-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r76893.
http://trac.webkit.org/changeset/76893
https://bugs.webkit.org/show_bug.cgi?id=53287
It made some tests crash on GTK and Qt debug bots (Requested
by Ossy on #webkit).
* runtime/WeakGCMap.h:
2011-01-27 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add WTFString method to compare equality with Vector<UChar>
https://bugs.webkit.org/show_bug.cgi?id=53266
I'm planning to use this method in the new XSS filter implementation,
but it seems generally useful.
* wtf/text/StringImpl.h:
(WTF::equalIgnoringNullity):
* wtf/text/WTFString.h:
(WTF::equalIgnoringNullity):
2011-01-27 Michael Saboff <msaboff@apple.com>
Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
https://bugs.webkit.org/show_bug.cgi?id=53271
Added new isValid() methods to check if a contained object in
a WeakGCMap is valid when using an unchecked iterator.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::isValid):
2011-01-26 Sam Weinig <sam@webkit.org>
Reviewed by Maciej Stachowiak.
Add events to represent the start/end of a gesture scroll
https://bugs.webkit.org/show_bug.cgi?id=53215
* wtf/Platform.h: Add ENABLE for gesture events.
2011-01-26 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Laszlo Gombos.
[Qt][Symbian] Fix --minimal build
https://bugs.webkit.org/show_bug.cgi?id=52839
Move definition of USE_SYSTEM_MALLOC out of pri file.
Put it in platform.h instead.
* wtf/Platform.h:
* wtf/TCSystemAlloc.cpp:
* wtf/wtf.pri:
2011-01-26 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Add JIT support to build system
https://bugs.webkit.org/show_bug.cgi?id=53079
* CMakeListsWinCE.txt:
2011-01-25 Adam Roben <aroben@apple.com>
Windows Production build fix
Reviewed by Steve Falkenburg.
* JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start
of the file so that ConfigurationBuildDir takes that into account. Also set it the right way
(by redefining the macro) rather than the wrong way (by modifying the environment variable).
2011-01-25 Steve Falkenburg <sfalken@apple.com>
Rubber-stamped by Adam Roben.
Windows production build fix.
Use correct environment variable escaping
* JavaScriptCore.vcproj/JavaScriptCore.make:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2011-01-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
JSON.stringify processing time exponentially grows with size of object
https://bugs.webkit.org/show_bug.cgi?id=51922
Remove last use of reserveCapacity from JSON stringification, as it results
in appalling append behaviour when there are a large number of property names
and nothing else.
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendQuotedString):
2011-01-25 Antti Koivisto <antti@apple.com>
Not reviewed.
Try to fix windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-01-25 Antti Koivisto <antti@apple.com>
Reviewed by Oliver Hunt.
REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
https://bugs.webkit.org/show_bug.cgi?id=53061
Cache did not know about the subclass so failed to fully delete the items.
Got rid of the subclass and moved the classes to separate files.
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/JSParser.cpp:
(JSC::JSParser::Scope::saveFunctionInfo):
(JSC::JSParser::Scope::restoreFunctionInfo):
(JSC::JSParser::findCachedFunctionInfo):
(JSC::JSParser::parseFunctionInfo):
* parser/SourceProvider.h:
* parser/SourceProviderCache.cpp: Added.
(JSC::SourceProviderCache::~SourceProviderCache):
(JSC::SourceProviderCache::byteSize):
* parser/SourceProviderCache.h: Added.
(JSC::SourceProviderCache::SourceProviderCache):
(JSC::SourceProviderCache::add):
(JSC::SourceProviderCache::get):
* parser/SourceProviderCacheItem.h: Added.
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):
(JSC::SourceProviderCacheItem::approximateByteSize):
(JSC::SourceProviderCacheItem::closeBraceToken):
2011-01-25 Marcilio Mendonca <mamendonca@rim.com>
Reviewed by Darin Adler.
Bug 53087: Refactoring: replaced a hanging "else" with a "return"
statement
https://bugs.webkit.org/show_bug.cgi?id=53087.
Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M
with a "return" so that the code is more readable and less error pro
(e.g., "else" doesn't use braces so adding extra lines to the else
block won't have any effect; even worse, code still compiles
successfully.
* wtf/Assertions.cpp:
2011-01-24 Chris Marrin <cmarrin@apple.com>
Reviewed by Eric Seidel.
Change ENABLE_3D_CANVAS to ENABLE_WEBGL
https://bugs.webkit.org/show_bug.cgi?id=53041
* Configurations/FeatureDefines.xcconfig:
2011-01-25 Adam Roben <aroben@apple.com>
Windows Production build fix
* JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set".
2011-01-25 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2)
https://bugs.webkit.org/show_bug.cgi?id=52949
* jit/JITStubs.cpp:
2011-01-24 Adam Roben <aroben@apple.com>
Windows Production build fix
* JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
2011-01-24 Peter Varga <pvarga@webkit.org>
Reviewed by Oliver Hunt.
Optimize regex patterns which contain empty alternatives
https://bugs.webkit.org/show_bug.cgi?id=51395
Eliminate the empty alternatives from the regex pattern and convert it to do
the matching in an easier way.
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
2011-01-24 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt] Move project files into Source
https://bugs.webkit.org/show_bug.cgi?id=52891
* JavaScriptCore.pri:
* JavaScriptCore.pro:
* jsc.pro:
2011-01-23 Mark Rowe <mrowe@apple.com>
Follow-up to r76477.
Fix the scripts that detect problematic code such as static initializers
and destructors, weak vtables, inappropriate files in the framework wrappers,
and public headers including private headers. These had all been broken
since the projects were moved in to the Source directory as the paths to the
scripts were not updated at that time.
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Use WTF::StringHasher in WebCore
https://bugs.webkit.org/show_bug.cgi?id=52934
Add an additional function to calculate the hash
of data with a runtimedependent size.
* wtf/StringHasher.h:
(WTF::StringHasher::createBlobHash):
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Fix comment in String::ascii()
https://bugs.webkit.org/show_bug.cgi?id=52980
* wtf/text/WTFString.cpp:
(WTF::String::ascii):
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Add String::containsOnlyLatin1()
https://bugs.webkit.org/show_bug.cgi?id=52979
* wtf/text/WTFString.h:
(WTF::String::containsOnlyLatin1):
(WTF::charactersAreAllLatin1):
2011-01-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by Oliver Hunt.
Remove obsolete JSVALUE32 code
https://bugs.webkit.org/show_bug.cgi?id=52948
r70111 removed support for JSVALUE32.
ARM, MIPS and X86 support JSVALUE32_64 only.
* jit/JITStubs.cpp:
2011-01-22 Geoffrey Garen <ggaren@apple.com>
Reviewed by Dan Bernstein.
ASSERT running run-webkit-tests --threaded.
https://bugs.webkit.org/show_bug.cgi?id=52971
SunSpider and v8 report no change.
* runtime/ConservativeSet.cpp:
(JSC::ConservativeSet::grow):
(JSC::ConservativeSet::add):
* runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and
the growth policy to 2X, to make SunSpider and v8 happy.
(JSC::ConservativeSet::ConservativeSet):
(JSC::ConservativeSet::~ConservativeSet):
(JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc.
Malloc is forbidden during a multi-threaded mark phase because it can
cause deadlock.
2011-01-22 Geoffrey Garen <ggaren@apple.com>
Reviewed by Geoffrey Garen.
Rubber-stamped by Maciej Stachowiak.
A few of Maciej's review suggestions for my last patch.
https://bugs.webkit.org/show_bug.cgi?id=52946
SunSpider reports no change.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
* runtime/ConservativeSet.cpp: Added.
(JSC::isPointerAligned):
(JSC::ConservativeSet::add):
* runtime/ConservativeSet.h: Added.
(JSC::ConservativeSet::ConservativeSet):
(JSC::ConservativeSet::mark): Split ConservativeSet out into its own
file, and moved the conservative check into ConservativeSet::add, making
ConservativeSet's responsibility clearer.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
* runtime/MachineStackMarker.cpp:
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markOtherThreadConservatively):
* runtime/MachineStackMarker.h:
* runtime/MarkStack.h: Updated for changes above.
2011-01-22 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix for r76430.
* runtime/MachineStackMarker.cpp:
(JSC::swapIfBackwards):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Beth Dakin.
Reorganized MarkedSpace, making many of its functions private.
* runtime/JSCell.h:
(JSC::JSCell::Heap::heap):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::globalData):
(JSC::MarkedSpace::heap):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Try to fix build: moved helper function out of #ifdef.
* runtime/MachineStackMarker.cpp:
(JSC::swapIfBackwards):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Rubber-stamped by Maciej Stachowiak.
A few of Maciej's review suggestions for my last patch.
https://bugs.webkit.org/show_bug.cgi?id=52946
SunSpider reports no change.
* runtime/MachineStackMarker.cpp:
(JSC::swapIfBackwards): Added a helper function for handling platforms
where the stack can grow in any direction.
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper
function.
(JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to.
(JSC::MachineStackMarker::markConservatively): Changed to use a more
standard looping idiom, and to use the helper function above.
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to.
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Cleaned up some conservative marking code.
https://bugs.webkit.org/show_bug.cgi?id=52946
SunSpider reports no change.
* interpreter/RegisterFile.h: No need for a special marking function,
since we already expose a start() and end().
* runtime/Heap.cpp:
(JSC::Heap::registerFile):
(JSC::Heap::markRoots):
* runtime/Heap.h:
(JSC::Heap::contains): Migrated markConservatively() to the machine stack
marker class. Now, Heap just provides a contains() function, which the
machine stack marker uses for checking whether a pointer points into the heap.
* runtime/MachineStackMarker.cpp:
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markOtherThreadConservatively):
(JSC::isPointerAligned):
(JSC::MachineStackMarker::markConservatively):
* runtime/MachineStackMarker.h: Move the conservative marking code here.
* runtime/MarkStack.h:
(JSC::ConservativeSet::add):
(JSC::ConservativeSet::mark): Changed to using a vector instead of hash
set. Vector seems to be a bit faster, and it generates smaller code.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::containsSlowCase):
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::isCellAligned):
(JSC::MarkedSpace::isPossibleCell):
(JSC::MarkedSpace::contains): Kept the code for determining whether a
pointer pointed into marked space, and moved the code for marking
a set of conservative pointers into the machine stack marker.
* wtf/HashSet.h:
(WTF::::add): Added two missing inlines that I noticed while testing
vector vs hash set.
2011-01-21 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access
control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool".
* wtf/PageAllocation.h:
(WTF::PageAllocation::operator bool):
* wtf/PageReservation.h:
(WTF::PageReservation::operator bool):
2011-01-21 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
[RegexFuzz] Hang with forward assertion
https://bugs.webkit.org/show_bug.cgi?id=52825
<rdar://problem/8894332>
The backtrackTo label from the first term in a list of terms is
being overwritten by processing of subsequent terms. Changed
copyBacktrackToLabel() to check for an existing bcaktrackTo label
before copying and renamed it to propagateBacktrackToLabel() since
it no longer copies.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
2011-01-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Moved the mark stack from global data to the heap, since it pertains
to the heap, and not the virtual machine as a whole.
https://bugs.webkit.org/show_bug.cgi?id=52930
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::markRoots):
* runtime/Heap.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
2011-01-21 Peter Gal <galpeter@inf.u-szeged.hu>
Reviewed by Darin Adler.
REGRESSION(r76177): All JavaScriptCore tests fail on ARM
https://bugs.webkit.org/show_bug.cgi?id=52814
Get the approximateByteSize value before releasing the OwnPtr.
* parser/JSParser.cpp:
(JSC::JSParser::parseFunctionInfo):
2011-01-21 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Remove unnecessary <stdio.h> include
https://bugs.webkit.org/show_bug.cgi?id=52884
* jit/JIT.cpp: remove unnecessary include.
2011-01-20 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Maciej Stachowiak.
Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr.
* wtf/OwnArrayPtr.h:
2011-01-20 Patrick Gansterer <paroga@webkit.org>
Reviewed by Oliver Hunt.
[WINCE] Remove obsolete JSVALUE32 code
https://bugs.webkit.org/show_bug.cgi?id=52450
Remove the "offset hack" in create_jit_stubs, since we
only support JSVALUE32_64 in the meantime.
* create_jit_stubs: Removed offset argument
* jit/JITStubs.cpp:
2011-01-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
When marking conservatively, guard against reviving dead objects.
https://bugs.webkit.org/show_bug.cgi?id=52840
SunSpider and v8 say no change.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API.
* runtime/Heap.cpp:
(JSC::Heap::recordExtraCost): No need to guard against conservative
marking reviving dead objects anymore, since the conservative marking
mechanism guards against this now.
(JSC::Heap::markConservatively):
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a
marking function. We want to establish a separation of concerns between
visiting roots and draining the mark stack.
(JSC::Heap::markRoots): Gather the set of conservative references before
clearning mark bits, because conservative marking now uses the mark bits
to determine if a reference is valid, and avoid reviving dead objects.
(JSC::Heap::collectAllGarbage): No need to guard against conservative
marking reviving dead objects anymore, since the conservative marking
mechanism guards against this now.
* runtime/Heap.h: Updated to use the ConservativeSet API.
* runtime/MachineStackMarker.cpp:
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markCurrentThreadConservatively):
(JSC::MachineStackMarker::markOtherThreadConservatively):
(JSC::MachineStackMarker::markMachineStackConservatively):
* runtime/MachineStackMarker.h: Ditto.
* runtime/MarkStack.h:
(JSC::ConservativeSet::add):
(JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the
set of conservative references. This is different from MarkStack, since
we don't mark the set until it is completely gathered.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::resizeBlocks):
(JSC::MarkedSpace::markConservatively):
* runtime/MarkedSpace.h: When marking conservatively, guard against
reviving dead objects.
2011-01-20 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Geoffrey Garen.
[Symbian] Fix StackBounds::initialize()
https://bugs.webkit.org/show_bug.cgi?id=52842
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit
2011-01-20 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773)
https://bugs.webkit.org/show_bug.cgi?id=52773
Fixed case where an existing DataLabelPtr is overwritten. The
replacing DataLabelPtr is now resolved immediately in
linkDataLabelToBacktrackIfExists(). Cleanup - eliminated bool
return value for the routine as it was never used.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
2011-01-20 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2] WebKit2 enabled build fails to link
Work around undefined reference linking issues until the buildsystem gets redesigned.
These issues first occured in minimal builds (see BUG 50519).
* JavaScriptCore.pri: link as whole-archive for WebKit2 builds
2011-01-20 Zoltan Horvath <zoltan@webkit.org>
Reviewed by Csaba Osztrogonác.
Refactoring of the custom allocation framework
https://bugs.webkit.org/show_bug.cgi?id=49897
Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
equivalent macro implementation at the necessary places.
* wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
2011-01-20 Mark Rowe <mrowe@apple.com>
Reviewed by Maciej Stachowiak.
Follow-up to r75766 / <rdar://problem/5469576>.
We were failing to initialize the key, causing all sorts of unexpected behavior.
* wtf/FastMalloc.cpp:
(WTF::setThreadHeap):
(WTF::TCMalloc_ThreadCache::GetThreadHeap):
(WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized.
2011-01-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Rolled back in r76078, with crash fixed.
https://bugs.webkit.org/show_bug.cgi?id=52668
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren): Account for the fact that the global
object moves its variables into and out of the register file. While out
of the register file, the symbol table's size is not an accurate count
for the size of the register array, since the BytecodeGenerator might
be compiling, adding items to the symbol table.
2011-01-18 Darin Adler <darin@apple.com>
Reviewed by Geoffrey Garen.
Stack overflow when converting an Error object to string
https://bugs.webkit.org/show_bug.cgi?id=46410
* Android.mk: Added StringRecursionChecker.cpp and
StringRecursionChecker.h.
* CMakeLists.txt: Ditto.
* GNUmakefile.am: Ditto.
* JavaScriptCore.gypi: Ditto.
* JavaScriptCore.pro: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
of the older hand-written code to do the same thing.
(JSC::arrayProtoFuncToLocaleString): Ditto.
(JSC::arrayProtoFuncJoin): Ditto.
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString): Use StringRecursionChecker.
* runtime/JSGlobalData.h: Renamed arrayVisitedElements to
stringRecursionCheckVisitedObjects.
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncToString): Use StringRecursionChecker.
* runtime/StringRecursionChecker.cpp: Added.
* runtime/StringRecursionChecker.h: Added.
2011-01-19 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove non-spec support for callable RegExp
https://bugs.webkit.org/show_bug.cgi?id=28285
Remove support for callable regexps. If it breaks sites we can
just roll this out.
* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* tests/mozilla/expected.html: update results.
2011-01-19 Antti Koivisto <antti@apple.com>
Reviewed by Oliver Hunt.
Cache function offsets to speed up javascript parsing
https://bugs.webkit.org/show_bug.cgi?id=52622
Use cache to save function offsets and some other info.
This avoids quite a bit of work when reparsing the source.
* parser/ASTBuilder.h:
* parser/JSParser.cpp:
(JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo):
(JSC::JSParser::CachedFunctionInfo::approximateByteSize):
(JSC::JSParser::CachedFunctionInfo::closeBraceToken):
(JSC::JSParser::Scope::copyCapturedVariablesToVector):
(JSC::JSParser::Scope::saveFunctionInfo):
(JSC::JSParser::Scope::restoreFunctionInfo):
(JSC::JSParser::findCachedFunctionInfo):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseFunctionInfo):
* parser/Lexer.h:
(JSC::Lexer::setOffset):
(JSC::Lexer::setLineNumber):
(JSC::Lexer::sourceProvider):
* parser/SourceProvider.h:
(JSC::SourceProviderCache::SourceProviderCache):
(JSC::SourceProviderCache::~SourceProviderCache):
(JSC::SourceProviderCache::byteSize):
(JSC::SourceProviderCache::add):
(JSC::SourceProviderCache::get):
(JSC::SourceProvider::SourceProvider):
(JSC::SourceProvider::~SourceProvider):
(JSC::SourceProvider::cache):
(JSC::SourceProvider::notifyCacheSizeChanged):
(JSC::SourceProvider::cacheSizeChanged):
* parser/SyntaxChecker.h:
2011-01-19 Mark Rowe <mrowe@apple.com>
Reviewed by Darin Adler.
Follow-up to r75766 / <rdar://problem/5469576>.
* DerivedSources.make: Evaluate the SDKROOT variable correctly.
2011-01-19 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion
https://bugs.webkit.org/show_bug.cgi?id=52672
Rather than coming up with a somewhat convoluted mechanism to ensure that
developers can override the global objects prototype with a function named
__proto__ and expect it to work, we just disallow it at the syntax level.
* parser/JSParser.cpp:
(JSC::JSParser::parseFunctionInfo):
2011-01-19 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8882994> Regression: Simple nested backtrack hangs
https://bugs.webkit.org/show_bug.cgi?id=52675
The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540
broke simple backtracking in some cases. Reworked that change to
link both jumps and labels.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
2011-01-19 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: [JSC] scripts have incorrect starting line (always 1).
https://bugs.webkit.org/show_bug.cgi?id=52721
* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
* debugger/Debugger.h:
* parser/Parser.h:
(JSC::Parser::parse):
* parser/SourceCode.h:
(JSC::SourceCode::SourceCode):
* parser/SourceProvider.h:
(JSC::SourceProvider::startPosition):
2011-01-19 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Laszlo Gombos and Tor Arne Vestbø.
[Qt] Remove unnecessary "../Source" from paths
after moving source files into Source is finished.
* JavaScriptCore.pri:
2011-01-19 Benjamin Kalman <kalman@chromium.org>
Reviewed by Darin Adler.
Don't return void from void function String::split
https://bugs.webkit.org/show_bug.cgi?id=52684
* wtf/text/WTFString.cpp:
(WTF::String::split):
2011-01-18 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r76078.
http://trac.webkit.org/changeset/76078
https://bugs.webkit.org/show_bug.cgi?id=52668
Caused crashes of fast/canvas/webgl/constants.html,
fast/canvas/webgl/gl-enum-tests.html, and possibly other layout
test crashes in Release mode. WebGL crashes were observed with
"run-webkit-tests fast/canvas/webgl". It was necessary to run
multiple tests to provoke the crash.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::markGlobals):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren):
2011-01-18 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
https://bugs.webkit.org/show_bug.cgi?id=52690
Clean up code to retrieve arguments from activation and function objects.
Remove the incorrect assertion from JSActivation's argumentsGetter.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::retrieveArguments):
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
2011-01-18 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
Removed RegisterFile::markGlobals because it was obtuse, and it
unnecessarily relied on conservative marking.
https://bugs.webkit.org/show_bug.cgi?id=52668
* interpreter/RegisterFile.h: Removed markGlobals.
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren): Added a comment explaning why some
JSActivations don't always mark their registers arrays.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
the registers array directly.
2011-01-18 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540)
https://bugs.webkit.org/show_bug.cgi?id=52540
https://bugs.webkit.org/show_bug.cgi?id=52662
Directly use backtrack label with parentheses nested under a
non-capturing parentheses. Also linked current parentheses
tail code object for possible parens nested within a non-capturing
parentheses.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
2011-01-18 Daniel Bates <dbates@rim.com>
Reviewed by Gavin Barraclough.
Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS
https://bugs.webkit.org/show_bug.cgi?id=52517
Patch by David Tapuska
Currently, we compile code with respect to the Symbian-specific moving memory model
assumption for all ARMv5 or lower architectures. Instead, we should only compile
such code when building for Symbian OS on those architectures because this model
is Symbian-specific.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
2011-01-18 Dimitry Andric <dim@freebsd.org>
Reviewed by Andreas Kling.
Fix linking JavaScriptCore on FreeBSD/amd64
https://bugs.webkit.org/show_bug.cgi?id=52591
Linking of JavaScriptCore on FreeBSD/amd64 fails, for the same reason as
in bug 28422: cti_vm_throw needs a "@plt" suffix, otherwise the linker
complains about the relocation type.
* jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux
and FreeBSD.
2011-01-18 Oliver Hunt <oliver@apple.com>
Reviewed by Antti Koivisto.
[jsfunfuzz] Assertion in codegen for array of NaN constants
https://bugs.webkit.org/show_bug.cgi?id=52643
Don't cache NaN literals in the code generator, as NaN doesn't compare
as equal to itself it causes problems when rehashing the number cache.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
2011-01-17 Jarred Nicholls <jarred@sencha.com>
Reviewed by Csaba Osztrogonác.
REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
https://bugs.webkit.org/show_bug.cgi?id=52585
gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check
the return value to get around the gcc warning
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::maybeModifyVMPoolSize):
2011-01-17 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
[regexfuzz] Crash running regex with lookahead
https://bugs.webkit.org/show_bug.cgi?id=52548
Eliminated agressive chaining of backtracks. This code was overwriting
already valid backtrack information.
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
2011-01-17 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Alexey Proskuryakov.
Fix some headers with missing or misspelled #ifndef guards
https://bugs.webkit.org/show_bug.cgi?id=52545
* wtf/RefPtrHashMap.h:
2011-01-17 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
Update xcodeproj svn:ignore to include xcuserdata.
* JavaScriptCore.xcodeproj: Modified property svn:ignore.
2011-01-16 Adam Barth <abarth@webkit.org>
Rubber-stamped by Eric Seidel.
Move WebKit into Source
https://bugs.webkit.org/show_bug.cgi?id=52530
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2011-01-16 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
[jsfunfuzz] Parser doesn't correctly validate for-loop syntax
https://bugs.webkit.org/show_bug.cgi?id=52516
Ensure that we always check for a semicolon after encountering
multiple declarations in the initialiser portion of a for-loop.
* parser/JSParser.cpp:
(JSC::JSParser::parseForStatement):
2011-01-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Strict mode restrictions on arguments and eval usage aren't complete
https://bugs.webkit.org/show_bug.cgi?id=52528
Fix a few bugs in strict mode where we incorrect allow mutation of
arguments and eval in the parser.
Alas the "optimisation" used by the syntax checker for validating
binary and unary expressions was too aggressive: we do actually need
a stack for operations and operands although it needn't be as complete
as that used for the full AST builder.
Also disallow assignment to arguments in all cases as allowing arguments
to be assignable is always an error in strict mode, regardless of context.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::BinaryExprContext::BinaryExprContext):
(JSC::ASTBuilder::UnaryExprContext::UnaryExprContext):
* parser/JSParser.cpp:
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::BinaryExprContext::BinaryExprContext):
(JSC::SyntaxChecker::BinaryExprContext::~BinaryExprContext):
(JSC::SyntaxChecker::UnaryExprContext::UnaryExprContext):
(JSC::SyntaxChecker::UnaryExprContext::~UnaryExprContext):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
2011-01-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Rolled back in r75886.
https://bugs.webkit.org/show_bug.cgi?id=52527
r75886 broke the GTK Linux bot because Linux was -- quite surprisingly --
set up to use the constants for embedded devices.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded
constants.
2011-01-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r75886.
http://trac.webkit.org/changeset/75886
https://bugs.webkit.org/show_bug.cgi?id=52526
"Broke GTK+ 64bit" (Requested by xan_ on #webkit).
* jit/ExecutableAllocatorFixedVMPool.cpp:
2011-01-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/8870429> Shrink the executable pool on embedded devices
* jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB
to 16MB.
2011-01-15 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Incorrect behavior changing attributes of an accessor
https://bugs.webkit.org/show_bug.cgi?id=52515
defineProperty doesn't correctly handle changing attributes of an accessor
property. This is because we don't pass the full descriptor to the
putDescriptor helper function, which means we have insufficient information
to do the right thing. Once that's passed the correct behavior is relatively
simple to implement.
* runtime/JSObject.cpp:
(JSC::putDescriptor):
(JSC::JSObject::defineOwnProperty):
2011-01-14 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
[jsfunfuzz] Incorrect handling of consecutive duplicate labels
https://bugs.webkit.org/show_bug.cgi?id=52505
Compare StringImpl*'s instead of Identifier*'s when looking for duplicate
labels.
* parser/JSParser.cpp:
(JSC::JSParser::parseExpressionOrLabelStatement):
2011-01-14 Simon Fraser <simon.fraser@apple.com>
No review.
Initialize m_operationInProgress after r75855.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
2011-01-14 Geoffrey Garen <ggaren@apple.com>
Reverted accidentally committed code from my last checkin.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
2011-01-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Try to fix the GTK bot.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::markRoots): Kids, remember to initialize your data members.
Knowing is half the battle.
2011-01-14 Oliver Hunt <oliver@apple.com>
Reviewed by Stephanie Lewis.
[jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
https://bugs.webkit.org/show_bug.cgi?id=52501
Clear the temporary character buffers used for reading escaped characters and
numbers.
* parser/Lexer.h:
(JSC::Lexer::setOffset):
2011-01-14 Geoffrey Garen <ggaren@apple.com>
Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h.
* runtime/Heap.cpp:
2011-01-13 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Split out a MarkedSpace strategy object from Heap.
https://bugs.webkit.org/show_bug.cgi?id=52421
SunSpider reports no change.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::recordExtraCost):
(JSC::Heap::allocate):
(JSC::Heap::markConservatively):
(JSC::Heap::markRoots):
(JSC::Heap::objectCount):
(JSC::Heap::statistics):
(JSC::Heap::size):
(JSC::Heap::isBusy):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::primaryHeapBegin):
(JSC::Heap::primaryHeapEnd):
* runtime/Heap.h:
(JSC::Heap::globalData):
(JSC::Heap::markedSpace):
(JSC::Heap::isCellMarked):
(JSC::Heap::checkMarkCell):
(JSC::Heap::markCell): Moved all code pertaining to managing chunks of
collector memory out of this class. Heap now just delegates to MarkedSpace.
* runtime/JSCell.h:
(JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation.
* runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes.
* runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp.
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::destroy):
(JSC::MarkedSpace::allocateBlock):
(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::resizeBlocks):
(JSC::MarkedSpace::growBlocks):
(JSC::MarkedSpace::shrinkBlocks):
(JSC::MarkedSpace::markConservatively):
(JSC::MarkedSpace::clearMarkBits):
(JSC::MarkedSpace::markedCells):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::objectCount):
(JSC::MarkedSpace::addToStatistics):
(JSC::MarkedSpace::statistics):
(JSC::MarkedSpace::size):
(JSC::MarkedSpace::reset):
(JSC::MarkedSpace::primaryHeapBegin):
(JSC::MarkedSpace::primaryHeapEnd):
* runtime/MarkedSpace.h: Copied from runtime/Heap.h.
(JSC::MarkedSpace::globalData):
(JSC::MarkedSpace::didShrink):
(JSC::MarkedSpace::cellBlock):
(JSC::MarkedSpace::cellOffset):
(JSC::MarkedSpace::isCellMarked):
(JSC::MarkedSpace::checkMarkCell):
(JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of
collector memory into this class.
* runtime/MemoryStatistics.cpp:
(JSC::heapStatistics):
* runtime/MemoryStatistics.h: Updated for MarkedSpace delegation.
2011-01-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[jsfunfuzz] parser doesn't enforce continue restrictions correctly.
https://bugs.webkit.org/show_bug.cgi?id=52493
This patch reworks handling of break, continue and label statements
to correctly handle all the valid and invalid cases. Previously certain
errors would be missed by the parser in strict mode, but the bytecode
generator needed to handle those cases for non-strict code so nothing
failed, it simply became non-standard behaviour.
Now that we treat break and continue errors as early faults in non-strict
mode as well that safety net has been removed so the parser bugs result in
crashes at codegen time.
* parser/JSParser.cpp:
(JSC::JSParser::ScopeLabelInfo::ScopeLabelInfo):
(JSC::JSParser::next):
(JSC::JSParser::nextTokenIsColon):
(JSC::JSParser::continueIsValid):
Continue is only valid in loops so we can't use breakIsValid()
(JSC::JSParser::pushLabel):
We now track whether the label is for a loop (and is therefore a
valid target for continue.
(JSC::JSParser::popLabel):
(JSC::JSParser::getLabel):
Replace hasLabel with getLabel so that we can validate the target
when parsing continue statements.
(JSC::JSParser::Scope::continueIsValid):
(JSC::JSParser::Scope::pushLabel):
(JSC::JSParser::Scope::getLabel):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::LabelInfo::LabelInfo):
(JSC::JSParser::parseExpressionOrLabelStatement):
Consecutive labels now get handled iteratively so that we can determine
whether they're valid targets for continue.
* parser/Lexer.cpp:
(JSC::Lexer::nextTokenIsColon):
* parser/Lexer.h:
(JSC::Lexer::setOffset):
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
https://bugs.webkit.org/show_bug.cgi?id=45186
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer().
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
https://bugs.webkit.org/show_bug.cgi?id=45186
r75819 accidentally changed the initial state of the scavenge timer.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true.
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Unreviewed Windows Release build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scavengerTimerFired):
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Unreviewed Windows Release build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scavengerTimerFired):
2011-01-14 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
https://bugs.webkit.org/show_bug.cgi?id=45186
Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer().
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
(WTF::TCMalloc_PageHeap::isScavengerSuspended):
(WTF::TCMalloc_PageHeap::scheduleScavenger):
(WTF::TCMalloc_PageHeap::rescheduleScavenger):
(WTF::TCMalloc_PageHeap::suspendScavenger):
(WTF::scavengerTimerFired):
(WTF::TCMalloc_PageHeap::periodicScavenge):
(WTF::TCMalloc_PageHeap::signalScavenger):
2011-01-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Align import/export directives
https://bugs.webkit.org/show_bug.cgi?id=52208
* API/JSBase.h: Align import/export directives with
WebKit2/Shared/API/c/WKBase.h
2011-01-14 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Incorrect backtracking for nested alternatives
https://bugs.webkit.org/show_bug.cgi?id=52387
In the process of propigating a datalabel it wasn't getting connected
to a destination when the destination was an indirect jump. Added
code to recognize a direct backtrack destination that was an indirect
jump and added mechanism to associate DataLabelPtrs with indirect
jump entries.
Removed dead method
BacktrackDestination::linkDataLabelToHereIfExists()
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::addDataLabel):
(JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
(JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
Changes to link indirect jumps with DataLabelPtr's.
(JSC::Yarr::YarrGenerator::BacktrackDestination::clearSubDataLabelPtr):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
Updated to handle immediate linking of indirect jumps to
DataLabelPtr.
(JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to
reflect updated linkDataLabelToBacktrackIfExists().
2011-01-14 Pavel Podivilov <podivilov@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: provide script column offset to frontend.
https://bugs.webkit.org/show_bug.cgi?id=52377
* parser/SourceCode.h:
(JSC::SourceCode::SourceCode):
(JSC::SourceCode::firstColumn):
2011-01-13 Darin Adler <darin@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available.
* DerivedSources.make: Create a header file, HeaderDetection.h, that tells
us whether pthread_machdep.h is available.
* wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then
don't do the pthread_getspecific_function_pointer trick.
(WTF::setThreadHeap): Ditto, but set thread-specific data.
(WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set.
2011-01-13 Xan Lopez <xlopez@igalia.com>
Reviewed by Gavin Barraclough.
JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
https://bugs.webkit.org/show_bug.cgi?id=42756
The FixedVMPool Allocator does not work well on systems where
allocating very large amounts of memory upfront is not reasonable,
like Linux without overcommit enabled. As a workaround, on Linux,
default to the values used in embedded environments (in the MB
range), and only jump to the GB range if we detect at runtime that
overcommit is enabled. Should fix crashes on Linux/x86_64 with
less than 3 or 4GB of RAM.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::free): use new variables for VM pool
size and coalesce limit.
(JSC::ExecutableAllocator::isValid): swap the variables from
embedded to generic values at runtime, on linux, if overcommit is
enabled.
(JSC::ExecutableAllocator::underMemoryPressure): use new variables
for VM pool size and coalesce limit.
2011-01-12 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Add new Yarr.h header to the list file.
* GNUmakefile.am: ditto.
2011-01-12 Martin Robinson <mrobinson@igalia.com>
Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball
https://bugs.webkit.org/show_bug.cgi?id=52299
* GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source
files in the source list.
2011-01-12 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Add Yarr.h to YARR
https://bugs.webkit.org/show_bug.cgi?id=51021
Move other common constants and functions from YARR's different files
to Yarr.h.
Use Yarr.h header instead of including other YARR headers where it
is possible.
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
* yarr/Yarr.h: Added.
* yarr/YarrInterpreter.cpp:
* yarr/YarrInterpreter.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::jitCompile):
(JSC::Yarr::execute):
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPattern::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h:
2011-01-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r75595.
http://trac.webkit.org/changeset/75595
https://bugs.webkit.org/show_bug.cgi?id=52286
It broke fast/regex/pcre-test-1.html (Requested by Ossy on
#webkit).
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
* yarr/Yarr.h: Removed.
* yarr/YarrInterpreter.cpp:
* yarr/YarrInterpreter.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::jitCompile):
* yarr/YarrJIT.h:
(JSC::Yarr::execute):
* yarr/YarrParser.h:
* yarr/YarrPattern.cpp:
(JSC::Yarr::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h:
2011-01-12 Peter Varga <pvarga@webkit.org>
Reviewed by Gavin Barraclough.
Add Yarr.h to YARR
https://bugs.webkit.org/show_bug.cgi?id=51021
Move other common constants and functions from YARR's different files
to Yarr.h.
Use Yarr.h header instead of including other YARR headers where it
is possible.
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
* yarr/Yarr.h: Added.
* yarr/YarrInterpreter.cpp:
* yarr/YarrInterpreter.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::jitCompile):
(JSC::Yarr::execute):
* yarr/YarrJIT.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPattern::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h:
2011-01-11 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Missing call to popTempSortVector() for exception case in JSArray::sort.
https://bugs.webkit.org/show_bug.cgi?id=50718
Fix to patch of 50718 that added pushTempSortVector() and
popTempSortVector() to JSArray::sort() to mark elements during sort.
Need to add popTempSortVector() for the return case if toString()
had an exception.
* runtime/JSArray.cpp:
(JSC::JSArray::sort): Added popTempSortVector()
2011-01-11 Xan Lopez <xlopez@igalia.com>
Reviewed by Darin Adler.
Microoptimization in ~JSString
https://bugs.webkit.org/show_bug.cgi?id=52222
The case where m_fibers is 0 seems to be the most common one
(almost 1/2 of the time, followed at some distance by m_fibers = 1
in 1/4 of the cases in a typical SunSpider execution). We can save
one comparison in this common case by doing a bit of refactoring
in the JSString destructor; overall a 0.3% progression, but only
the string tests show improvement.
* runtime/JSString.h:
(JSC::RopeBuilder::~JSString):
2011-01-10 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
ASSERTION Failure in JSC::binaryChop
https://bugs.webkit.org/show_bug.cgi?id=25614
Changed JITStubs::cti_register_file_check() to use the current stack's
return PC to find the bytecode for handling the exception in the prior
frame. Also added the appropriate arrity check routine call to the
JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock.
* jit/JIT.cpp:
(JSC::JIT::privateCompile): Changed the arrity check call location
so that it gets added to the m_calls list so that it's included in
CodeBlock::m_callReturnIndexVector.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.
2011-01-10 Daniel Bates <dbates@rim.com>
Reviewed by Martin Robinson.
Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
https://bugs.webkit.org/show_bug.cgi?id=52178
It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we
are not compiling with GCC.
Fixes style issues at the callsites (i.e. replace comma with comma-space in
macro function argument list). Also, makes a spelling correction in a comment.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
* wtf/Platform.h:
2011-01-10 Geoffrey Garen <ggaren@apple.com>
Build fix: removed some uses of nextNumber that I missed last time.
* runtime/Heap.cpp:
(JSC::Heap::reset):
(JSC::Heap::collectAllGarbage):
2011-01-10 Daniel Bates <dbates@rim.com>
Reviewed by Darin Adler.
Use __builtin_expect when compiling using RVCT in GNU mode
https://bugs.webkit.org/show_bug.cgi?id=51866
We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode
as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>.
* wtf/AlwaysInline.h:
* wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro
function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT
version.
2011-01-10 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Moved Collector.* => Heap.*, since the file contains a class named "Heap".
* API/JSCallbackObject.cpp:
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/Interpreter.cpp:
* interpreter/RegisterFile.h:
* jit/JITStubs.cpp:
* runtime/Collector.cpp: Removed.
* runtime/Collector.h: Removed.
* runtime/CollectorHeapIterator.h:
* runtime/GCActivityCallbackCF.cpp:
* runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
* runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h.
* runtime/InitializeThreading.cpp:
* runtime/JSCell.h:
* runtime/JSGlobalData.cpp:
* runtime/JSGlobalData.h:
* runtime/JSLock.cpp:
* runtime/JSNumberCell.h:
* runtime/MachineStackMarker.cpp:
* runtime/MemoryStatistics.h:
* runtime/Protect.h:
* runtime/UString.cpp:
* runtime/WeakGCMap.h:
* runtime/WeakGCPtr.h:
2011-01-10 Xan Lopez <xlopez@igalia.com>
Reviewed by Gavin Barraclough.
Remove unused isString() case in JSString::toPrimitiveString()
https://bugs.webkit.org/show_bug.cgi?id=52167
We never call toPrimitiveString() with strings, so remove the
check and add an ASSERT ensuring this never happens. 0.7% overall
progression in sunspider, since one of the call sites is very hot.
* runtime/JSString.h:
(JSC::JSValue::toPrimitiveString):
2011-01-10 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Rename the existing YARR files and classes
https://bugs.webkit.org/show_bug.cgi?id=51872
Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
(JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
(JSC::Yarr::Interpreter::DisjunctionContext::operator new):
(JSC::Yarr::Interpreter::allocDisjunctionContext):
(JSC::Yarr::Interpreter::freeDisjunctionContext):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::InputStream::InputStream):
(JSC::Yarr::Interpreter::InputStream::next):
(JSC::Yarr::Interpreter::InputStream::rewind):
(JSC::Yarr::Interpreter::InputStream::read):
(JSC::Yarr::Interpreter::InputStream::readPair):
(JSC::Yarr::Interpreter::InputStream::readChecked):
(JSC::Yarr::Interpreter::InputStream::reread):
(JSC::Yarr::Interpreter::InputStream::prev):
(JSC::Yarr::Interpreter::InputStream::getPos):
(JSC::Yarr::Interpreter::InputStream::setPos):
(JSC::Yarr::Interpreter::InputStream::atStart):
(JSC::Yarr::Interpreter::InputStream::atEnd):
(JSC::Yarr::Interpreter::InputStream::checkInput):
(JSC::Yarr::Interpreter::InputStream::uncheckInput):
(JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
(JSC::Yarr::Interpreter::testCharacterClass):
(JSC::Yarr::Interpreter::checkCharacter):
(JSC::Yarr::Interpreter::checkCasedCharacter):
(JSC::Yarr::Interpreter::checkCharacterClass):
(JSC::Yarr::Interpreter::tryConsumeBackReference):
(JSC::Yarr::Interpreter::matchAssertionBOL):
(JSC::Yarr::Interpreter::matchAssertionEOL):
(JSC::Yarr::Interpreter::matchAssertionWordBoundary):
(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
(JSC::Yarr::Interpreter::matchCharacterClass):
(JSC::Yarr::Interpreter::backtrackCharacterClass):
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):
(JSC::Yarr::Interpreter::recordParenthesesMatch):
(JSC::Yarr::Interpreter::resetMatches):
(JSC::Yarr::Interpreter::parenthesesDoBacktrack):
(JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
(JSC::Yarr::Interpreter::lookupForBeginChars):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::Interpreter::matchNonZeroDisjunction):
(JSC::Yarr::Interpreter::interpret):
(JSC::Yarr::Interpreter::Interpreter):
(JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
(JSC::Yarr::ByteCompiler::ByteCompiler):
(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::ByteCompiler::checkInput):
(JSC::Yarr::ByteCompiler::assertionBOL):
(JSC::Yarr::ByteCompiler::assertionEOL):
(JSC::Yarr::ByteCompiler::assertionWordBoundary):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
(JSC::Yarr::ByteCompiler::atomCharacterClass):
(JSC::Yarr::ByteCompiler::atomBackReference):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::popParenthesesStack):
(JSC::Yarr::ByteCompiler::dumpDisjunction):
(JSC::Yarr::ByteCompiler::closeAlternative):
(JSC::Yarr::ByteCompiler::closeBodyAlternative):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::regexBegin):
(JSC::Yarr::ByteCompiler::regexEnd):
(JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
(JSC::Yarr::ByteCompiler::alternativeDisjunction):
(JSC::Yarr::ByteCompiler::emitDisjunction):
(JSC::Yarr::byteCompile):
(JSC::Yarr::interpret):
* yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
(JSC::Yarr::ByteTerm::ByteTerm):
(JSC::Yarr::ByteTerm::BOL):
(JSC::Yarr::ByteTerm::CheckInput):
(JSC::Yarr::ByteTerm::EOL):
(JSC::Yarr::ByteTerm::WordBoundary):
(JSC::Yarr::ByteTerm::BackReference):
(JSC::Yarr::ByteTerm::BodyAlternativeBegin):
(JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
(JSC::Yarr::ByteTerm::BodyAlternativeEnd):
(JSC::Yarr::ByteTerm::AlternativeBegin):
(JSC::Yarr::ByteTerm::AlternativeDisjunction):
(JSC::Yarr::ByteTerm::AlternativeEnd):
(JSC::Yarr::ByteTerm::SubpatternBegin):
(JSC::Yarr::ByteTerm::SubpatternEnd):
(JSC::Yarr::ByteTerm::invert):
(JSC::Yarr::ByteTerm::capture):
(JSC::Yarr::ByteDisjunction::ByteDisjunction):
(JSC::Yarr::BytecodePattern::BytecodePattern):
(JSC::Yarr::BytecodePattern::~BytecodePattern):
* yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
(JSC::Yarr::YarrGenerator::optimizeAlternative):
(JSC::Yarr::YarrGenerator::matchCharacterClassRange):
(JSC::Yarr::YarrGenerator::matchCharacterClass):
(JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
(JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
(JSC::Yarr::YarrGenerator::checkInput):
(JSC::Yarr::YarrGenerator::atEndOfInput):
(JSC::Yarr::YarrGenerator::notAtEndOfInput):
(JSC::Yarr::YarrGenerator::jumpIfCharEquals):
(JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
(JSC::Yarr::YarrGenerator::readCharacter):
(JSC::Yarr::YarrGenerator::storeToFrame):
(JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
(JSC::Yarr::YarrGenerator::loadFromFrame):
(JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
(JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
(JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
(JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
(JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
(JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
(JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
(JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
(JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
(JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
(JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
(JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
(JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
(JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
(JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
(JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
(JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
(JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
(JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
(JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::term):
(JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
(JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
(JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
(JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
(JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
(JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
(JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
(JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
(JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
(JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
(JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
(JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
(JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::YarrGenerator::generateAssertionBOL):
(JSC::Yarr::YarrGenerator::generateAssertionEOL):
(JSC::Yarr::YarrGenerator::matchAssertionWordchar):
(JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
(JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
(JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
(JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
(JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
(JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
(JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
(JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
(JSC::Yarr::YarrGenerator::generateTerm):
(JSC::Yarr::YarrGenerator::generateDisjunction):
(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):
(JSC::Yarr::YarrGenerator::YarrGenerator):
(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::jitCompile):
* yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
(JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
(JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
(JSC::Yarr::YarrCodeBlock::setFallBack):
(JSC::Yarr::YarrCodeBlock::isFallBack):
(JSC::Yarr::YarrCodeBlock::set):
(JSC::Yarr::YarrCodeBlock::execute):
(JSC::Yarr::YarrCodeBlock::getAddr):
(JSC::Yarr::execute):
* yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
(JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
(JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
(JSC::Yarr::Parser::CharacterClassParserDelegate::end):
(JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parseAtomEscape):
(JSC::Yarr::Parser::parseCharacterClassEscape):
(JSC::Yarr::Parser::parseCharacterClass):
(JSC::Yarr::Parser::parseParenthesesBegin):
(JSC::Yarr::Parser::parseParenthesesEnd):
(JSC::Yarr::Parser::parseQuantifier):
(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::Parser::parse):
(JSC::Yarr::Parser::saveState):
(JSC::Yarr::Parser::restoreState):
(JSC::Yarr::Parser::atEndOfPattern):
(JSC::Yarr::Parser::peek):
(JSC::Yarr::Parser::peekIsDigit):
(JSC::Yarr::Parser::peekDigit):
(JSC::Yarr::Parser::consume):
(JSC::Yarr::Parser::consumeDigit):
(JSC::Yarr::Parser::consumeNumber):
(JSC::Yarr::Parser::consumeOctal):
(JSC::Yarr::Parser::tryConsume):
(JSC::Yarr::Parser::tryConsumeHex):
(JSC::Yarr::parse):
* yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
(JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
(JSC::Yarr::CharacterClassConstructor::reset):
(JSC::Yarr::CharacterClassConstructor::append):
(JSC::Yarr::CharacterClassConstructor::putChar):
(JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
(JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
(JSC::Yarr::CharacterClassConstructor::putRange):
(JSC::Yarr::CharacterClassConstructor::charClass):
(JSC::Yarr::CharacterClassConstructor::addSorted):
(JSC::Yarr::CharacterClassConstructor::addSortedRange):
(JSC::Yarr::BeginCharHelper::BeginCharHelper):
(JSC::Yarr::BeginCharHelper::addBeginChar):
(JSC::Yarr::BeginCharHelper::merge):
(JSC::Yarr::BeginCharHelper::addCharacter):
(JSC::Yarr::BeginCharHelper::linkHotTerms):
(JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::reset):
(JSC::Yarr::YarrPatternConstructor::assertionBOL):
(JSC::Yarr::YarrPatternConstructor::assertionEOL):
(JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
(JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
(JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
(JSC::Yarr::YarrPatternConstructor::atomBackReference):
(JSC::Yarr::YarrPatternConstructor::copyDisjunction):
(JSC::Yarr::YarrPatternConstructor::copyTerm):
(JSC::Yarr::YarrPatternConstructor::quantifyAtom):
(JSC::Yarr::YarrPatternConstructor::disjunction):
(JSC::Yarr::YarrPatternConstructor::regexBegin):
(JSC::Yarr::YarrPatternConstructor::regexEnd):
(JSC::Yarr::YarrPatternConstructor::regexError):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
(JSC::Yarr::YarrPatternConstructor::setupOffsets):
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::YarrPatternConstructor::optimizeBOL):
(JSC::Yarr::YarrPatternConstructor::addBeginTerm):
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
(JSC::Yarr::YarrPatternConstructor::setupBeginChars):
(JSC::Yarr::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
(JSC::Yarr::CharacterRange::CharacterRange):
(JSC::Yarr::CharacterClassTable::create):
(JSC::Yarr::CharacterClassTable::CharacterClassTable):
(JSC::Yarr::CharacterClass::CharacterClass):
(JSC::Yarr::PatternTerm::PatternTerm):
(JSC::Yarr::PatternTerm::ForwardReference):
(JSC::Yarr::PatternTerm::BOL):
(JSC::Yarr::PatternTerm::EOL):
(JSC::Yarr::PatternTerm::WordBoundary):
(JSC::Yarr::PatternTerm::invert):
(JSC::Yarr::PatternTerm::capture):
(JSC::Yarr::PatternTerm::quantify):
(JSC::Yarr::PatternAlternative::PatternAlternative):
(JSC::Yarr::PatternAlternative::lastTerm):
(JSC::Yarr::PatternAlternative::removeLastTerm):
(JSC::Yarr::PatternAlternative::setOnceThrough):
(JSC::Yarr::PatternAlternative::onceThrough):
(JSC::Yarr::PatternDisjunction::PatternDisjunction):
(JSC::Yarr::PatternDisjunction::~PatternDisjunction):
(JSC::Yarr::PatternDisjunction::addNewAlternative):
(JSC::Yarr::TermChain::TermChain):
(JSC::Yarr::BeginChar::BeginChar):
(JSC::Yarr::YarrPattern::~YarrPattern):
(JSC::Yarr::YarrPattern::reset):
(JSC::Yarr::YarrPattern::containsIllegalBackReference):
(JSC::Yarr::YarrPattern::newlineCharacterClass):
(JSC::Yarr::YarrPattern::digitsCharacterClass):
(JSC::Yarr::YarrPattern::spacesCharacterClass):
(JSC::Yarr::YarrPattern::wordcharCharacterClass):
(JSC::Yarr::YarrPattern::nondigitsCharacterClass):
(JSC::Yarr::YarrPattern::nonspacesCharacterClass):
(JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
2011-01-10 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* parser/SyntaxChecker.h:
2011-01-10 Dave Tapuska <dtapuska@rim.com>
Reviewed by Gavin Barraclough.
Add CTI ASM versions for RVCT ARM THUMB2 mode.
https://bugs.webkit.org/show_bug.cgi?id=52154
* jit/JITStubs.cpp:
(JSC::ctiTrampoline):
(JSC::ctiVMThrowTrampoline):
(JSC::ctiOpThrowNotCaught):
2011-01-10 Gavin Barraclough <barraclough@apple.com>
Qt build fix.
* JavaScriptCore.pro:
2011-01-10 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 52079 - Syntax errors should be early errors.
From chapter 16 the spec:
An implementation must report most errors at the time the relevant ECMAScript language construct is
evaluated. An early error is an error that can be detected and reported prior to the evaluation of
any construct in the Program containing the error. An implementation must report early errors in a
Program prior to the first evaluation of that Program. Early errors in eval code are reported at
the time eval is called but prior to evaluation of any construct within the eval code. All errors
that are not early errors are runtime errors.
An implementation must treat any instance of the following kinds of errors as an early error:
* Any syntax error."
* JavaScriptCore.xcodeproj/project.pbxproj:
Added new files.
* bytecode/CodeBlock.cpp:
Removed op_throw_syntax_error.
* bytecode/Opcode.h:
Removed op_throw_syntax_error.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
If m_expressionTooDeep then throw a runtime error.
(JSC::BytecodeGenerator::BytecodeGenerator):
Initialize m_expressionTooDeep.
(JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
Sets m_expressionTooDeep.
* bytecompiler/BytecodeGenerator.h:
Added m_expressionTooDeep, removed emitThrowSyntaxError.
* bytecompiler/NodesCodegen.cpp:
(JSC::RegExpNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
Conditions that threw syntax error are now handled during parsing;
during bytecompilation these are now just ASSERTs.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
* jit/JITOpcodes32_64.cpp:
* jit/JITStubs.cpp:
* jit/JITStubs.h:
Removed op_throw_syntax_error.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createRegExp):
Renamed; added syntax check.
* parser/JSParser.cpp:
(JSC::JSParser::breakIsValid):
(JSC::JSParser::hasLabel):
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::setIsFunction):
(JSC::JSParser::Scope::isFunctionBoundary):
(JSC::JSParser::ScopeRef::hasContainingScope):
(JSC::JSParser::ScopeRef::containingScope):
(JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef):
(JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef):
(JSC::JSParser::AutoPopScopeRef::setPopped):
(JSC::JSParser::popScopeInternal):
(JSC::JSParser::popScope):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parsePrimaryExpression):
* parser/JSParser.h:
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createRegExp):
Renamed; added syntax check.
* runtime/ExceptionHelpers.cpp:
(JSC::createOutOfMemoryError):
(JSC::throwOutOfMemoryError):
* runtime/ExceptionHelpers.h:
Broke out createOutOfMemoryError.
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
Add check for exception after bytecode generation.
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
RegExp error prefixes not included in error string.
* yarr/RegexParser.h:
(JSC::Yarr::Parser::parse):
Removed regexBegin/regexEnd/regexError.
* yarr/RegexPattern.cpp:
(JSC::Yarr::RegexPatternConstructor::regexBegin):
Removed regexEnd/regexError.
(JSC::Yarr::compileRegex):
Add call to regexBegin (no longer called from the parser).
* yarr/YarrSyntaxChecker.cpp: Added.
(JSC::Yarr::SyntaxChecker::assertionBOL):
(JSC::Yarr::SyntaxChecker::assertionEOL):
(JSC::Yarr::SyntaxChecker::assertionWordBoundary):
(JSC::Yarr::SyntaxChecker::atomPatternCharacter):
(JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass):
(JSC::Yarr::SyntaxChecker::atomCharacterClassBegin):
(JSC::Yarr::SyntaxChecker::atomCharacterClassAtom):
(JSC::Yarr::SyntaxChecker::atomCharacterClassRange):
(JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn):
(JSC::Yarr::SyntaxChecker::atomCharacterClassEnd):
(JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin):
(JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin):
(JSC::Yarr::SyntaxChecker::atomParenthesesEnd):
(JSC::Yarr::SyntaxChecker::atomBackReference):
(JSC::Yarr::SyntaxChecker::quantifyAtom):
(JSC::Yarr::SyntaxChecker::disjunction):
(JSC::Yarr::checkSyntax):
* yarr/YarrSyntaxChecker.h: Added.
Check RegExp syntax.
2011-01-10 Adam Roben <aroben@apple.com>
Roll out r75289
It was causing assertion failures. See <http://webkit.org/b/52156>.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2011-01-08 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Unify string table adding in AtomicString
https://bugs.webkit.org/show_bug.cgi?id=51927
Move code for adding a string into a separate function.
This removes multiple occurrence of the same logic.
* wtf/text/AtomicString.cpp:
(WTF::addToStringTable): Added.
(WTF::AtomicString::add): Use addToStringTable().
(WTF::AtomicString::fromUTF8): Ditto.
2011-01-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Split machine stack marking functions into their own class (MachineStackMarker)
https://bugs.webkit.org/show_bug.cgi?id=52088
* API/APIShims.h:
(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread()
call behind an #ifdef because we shouldn't be registering threads at all
if we don't support usage on multiple threads.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated projects.
* runtime/Collector.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::markRoots):
* runtime/Collector.h:
(JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary
level of indirection, to make Heap less of a God class.
* runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h.
* runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp.
(JSC::MachineStackMarker::MachineStackMarker):
(JSC::MachineStackMarker::~MachineStackMarker):
(JSC::MachineStackMarker::makeUsableFromMultipleThreads):
(JSC::MachineStackMarker::registerThread):
(JSC::MachineStackMarker::unregisterThread):
(JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
(JSC::MachineStackMarker::markCurrentThreadConservatively):
(JSC::MachineStackMarker::markOtherThreadConservatively):
(JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap.
2011-01-07 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
Fix for win32. The base of the stack is stored in the "deallocation stack" field of the
Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
for more information!
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2011-01-07 Adam Roben <aroben@apple.com>
Update react-to-vsprops-changes.py after r74855
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2011-01-07 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Port scrollbar painting to GtkStyleContext
https://bugs.webkit.org/show_bug.cgi?id=52051
* wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
declaration.
2011-01-07 Daniel Bates <dbates@rim.com>
Reviewed by Martin Robinson.
Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode
https://bugs.webkit.org/show_bug.cgi?id=52034
Derived from a patch by Eli Fidler.
RVCT 4 or greater in GNU mode supports the computed goto GNU language extension
as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>.
* pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead
of hardcoding the GCC compiler.
* wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000.
2011-01-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
destructor early, in order to release wrappers once we know we no longer intend to use them.
Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
A sequence of events that triggers the bug would look like this:
(1) Create a DOMWrapperWorld.
(2) Register a timer in the world.
(3) Call unregisterWorld() on the world.
(4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
(5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
called forgetWorld() none exists.
(6) Attempt to add a wrapper to a NULL map.
Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::clear):
2011-01-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Bug 52021 - zeroDouble broken on ARMv7
The bug here is that zeroDouble was working incorrectly,
leading to op_loop_if_true failing - specifically in the
case where the value being checked is 0.0 encoded as a
double (rather than an integer immediate).
Additionally this patch removes a redundant duplicate compare
in some (many) case.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::vcmp_F64):
(JSC::ARMv7Assembler::vcmpz_F64):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::branchDoubleNonZero):
(JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::branchDouble):
(JSC::MacroAssemblerARMv7::branchDoubleNonZero):
(JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
(JSC::MacroAssemblerARMv7::compare32):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchDoubleNonZero):
(JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchDoubleNonZero):
(JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
2011-01-06 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Added debug code to compare the results of JIT regexp with
interpreted regexp and displays discrepencies. This debug code is
controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and
is only valid if ENABLE_YARR_JIT is enabled.
Fixed a discovered problem in RegExp::printTraceData, changing
m_pattern to the getter pattern().
Also deleted an extraneous semicolon.
Enhancement: Add Regexp Debug Compare between JIT and Interpreter
https://bugs.webkit.org/show_bug.cgi?id=51834
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* wtf/Platform.h:
2011-01-06 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
[WINCE] Remove JSC::g_stackBase
https://bugs.webkit.org/show_bug.cgi?id=51779
* wtf/StackBounds.cpp:
2011-01-06 Joone Hur <joone.hur@collabora.co.uk>
Reviewed by Eric Seidel.
WML Parser should treat line/column number in a consistent way
https://bugs.webkit.org/show_bug.cgi?id=51601
Add the equality operators to TextPosition class.
* wtf/text/TextPosition.h:
(WTF::TextPosition::operator==): Added.
(WTF::TextPosition::operator!=): Added.
(WTF::TextPosition::belowRangePosition): Use belowBase() instead of base().
(WTF::ZeroBasedNumber::operator==): Added.
(WTF::ZeroBasedNumber::operator!=): Added.
(WTF::OneBasedNumber::operator==): Added.
(WTF::OneBasedNumber::operator!=): Added.
2011-01-06 Patrick Gansterer <paroga@webkit.org>
Reviewed by Gavin Barraclough.
[WINCE] Determine stack extent
https://bugs.webkit.org/show_bug.cgi?id=26276
Scan the stack for writeable pages and use the limits.
* wtf/StackBounds.cpp:
(WTF::detectGrowingDownward):
(WTF::isPageWritable):
(WTF::getLowerStackBound):
(WTF::getUpperStackBound):
(WTF::StackBounds::initialize):
2011-01-05 Steve Falkenburg <sfalken@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
2011-01-05 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
Debug and Release builds on Windows clobber each other
https://bugs.webkit.org/show_bug.cgi?id=49185
Changes the structure of WebKitBuild build products directory so we
completely separate each build configuration into independent directories.
Although we previously had per-configuration directories for obj, this change adds
per-configuration directories for bin, lib, obj, and include. Each configuration's
build products are stored within a directory inside of WebKitBuild.
Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
for proper operation of the instrumentation/optimization scripts.
* JavaScriptCore.vcproj/JavaScriptCore.make:
* JavaScriptCore.vcproj/JavaScriptCore.sln:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
* JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
* JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
2011-01-05 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build fix.
* wtf/Encoder.h: Add <stdint.h> include for systems that
do not natively know about uint8_t, etc.
2011-01-05 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[CMake] Fix the usage of SOURCE_GROUP
https://bugs.webkit.org/show_bug.cgi?id=51739
* CMakeLists.txt:
2011-01-05 Andras Becsi <abecsi@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][V8] Fix the build after recent changes.
* pcre/pcre.pri: Correct the path after Source was introduced.
2011-01-04 Steve Falkenburg <sfalken@apple.com>
Build fix. Update path to FindSafari after source code reorganization.
* JavaScriptCore.vcproj/JavaScriptCore.sln:
2011-01-04 Daniel Bates <dbates@rim.com>
Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
(https://bugs.webkit.org/show_bug.cgi?id=51855).
* wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
(WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
2011-01-04 Martin Robinson <mrobinson@igalia.com>
Try to fix the EFL build.
* wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
2011-01-04 James Robinson <jamesr@chromium.org>
Reviewed by Darin Adler.
StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
https://bugs.webkit.org/show_bug.cgi?id=51881
The StackBounds class is only used by JavaScriptCore.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::resetCurrentIdentifierTable):
2011-01-03 Martin Robinson <mrobinson@igalia.com>
Reviewed by Darin Adler.
Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=51846
* GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
(JSC::ExecutableAllocator::cacheFlush): Ditto.
* wtf/PlatformRefPtr.h: Removed.
* wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
(WTF::randomNumber): Ditto.
* wtf/brew/RefPtrBrew.h: Ditto.
(WTF::refIfNotNull): Added.
(WTF::derefIfNotNull): Added.
* wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
(WTF::createRefPtrInstance): Modified to return a RefPtr.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr): Moved from PlatformRefPtr here.
(WTF::derefGPtr): Ditto.
* wtf/gobject/GRefPtr.h: Ditto.
(WTF::GRefPtr::GRefPtr): Ditto.
(WTF::GRefPtr::~GRefPtr): Ditto.
(WTF::GRefPtr::clear): Ditto.
(WTF::GRefPtr::isHashTableDeletedValue): Ditto.
(WTF::GRefPtr::get): Ditto.
(WTF::GRefPtr::operator*): Ditto.
(WTF::GRefPtr::operator->): Ditto.
(WTF::GRefPtr::operator!): Ditto.
(WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
(WTF::GRefPtr::hashTableDeletedValue): Ditto.
(WTF::::operator): Ditto.
(WTF::::swap): Ditto.
(WTF::swap): Ditto.
(WTF::operator==): Ditto.
(WTF::operator!=): Ditto.
(WTF::static_pointer_cast): Ditto.
(WTF::const_pointer_cast): Ditto.
(WTF::getPtr): Ditto.
(WTF::adoptGRef): Ditto.
(WTF::refGPtr): Ditto.
(WTF::derefGPtr): Ditto.
2011-01-04 Daniel Bates <dbates@rim.com>
Reviewed by Adam Roben.
LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
https://bugs.webkit.org/show_bug.cgi?id=51860
* wtf/ThreadingWin.cpp:
(WTF::createThreadInternal):
2011-01-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Ariya Hidayat.
[Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
https://bugs.webkit.org/show_bug.cgi?id=31273
On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
are included before platform headers. On all other platforms continue to use
INCLUDEPATH (as before). This is a continuation of r65877.
No new tests as there is no new functionality.
* JavaScriptCore.pri:
2011-01-04 Darin Adler <darin@apple.com>
Try to fix Windows build.
* wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
of conditional includes.
(WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
(WTF::createThreadInternal): Tweaked #if to not need separate macro.
2011-01-04 Daniel Bates <dbates@rim.com>
Reviewed by Adam Roben.
Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
https://bugs.webkit.org/show_bug.cgi?id=51855
Both the Apple Windows and Android ports implement a similar adapter structure,
called ThreadFunctionInvocation and ThreadData respectively, as part of
their thread creation process. Instead, we should share such an adapter
structure and remove duplicate code.
* JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
* wtf/ThreadFunctionInvocation.h: Added.
(WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
* wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
(WTF::runThreadWithRegistration):
(WTF::createThreadInternal):
* wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
it can be shared with the Android implementation of createThreadInternal().
(WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
2011-01-04 Daniel Bates <dbates@rim.com>
Reviewed by Darin Adler.
Use __builtin_expect when compiling using RVCT in GNU mode
https://bugs.webkit.org/show_bug.cgi?id=51866
Derived from a patch by Dave Tapuska.
* wtf/AlwaysInline.h:
2011-01-03 Darin Adler <darin@apple.com>
Reviewed by Brady Eidson.
* wtf/Forward.h: Added Decoder and Encoder.
2011-01-03 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
* GNUmakefile.am:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Decoder.h: Added.
* wtf/Encoder.h: Added.
2011-01-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix.
[Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
This fix is required for builds where HAVE(NULLPTR) is false
(e.g. some MSVC and Symbian builds).
* wtf/wtf.pri:
2011-01-02 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Simon Fraser.
<rdar://problem/8812159> Update copyright strings
* Info.plist:
2011-01-02 Csaba Osztrogonác <ossy@webkit.org>
Fix GTK+ build after r74855.
Reviewed by Xan Lopez.
* GNUmakefile.am: Fix include pathes.
2011-01-02 Adam Barth <abarth@webkit.org>
One more .. missing in the Qt build.
* jsc.pro:
2011-01-02 Xan Lopez <xlopez@igalia.com>
Fix GTK+ build.
* GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
that anyone can include its headers without adding the prefix
'Source/'.
2011-01-02 Carl Lobo <carllobo@gmail.com>
Reviewed by Adam Barth.
Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
https://bugs.webkit.org/show_bug.cgi?id=51797
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2011-01-01 Adam Barth <abarth@webkit.org>
Fix relative include paths in an attempt to fix the Qt build.
* JavaScriptCore.pri:
* JavaScriptCore.pro:
2011-01-01 Adam Barth <abarth@webkit.org>
Another speculative build fix for GTK.
* GNUmakefile.am:
2011-01-01 Adam Barth <abarth@webkit.org>
Speculative build fix for GTK. Update the paths in GNUmakefile to
include "Source".
* GNUmakefile.am:
2011-01-01 Adam Barth <abarth@webkit.org>
Update relative paths in JavaScriptCore.gyp to account for the extra
level of directories.
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2010-12-31 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
https://bugs.webkit.org/show_bug.cgi?id=50517
This change shows about 2% performance win on the xml-parser benchmark.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal):
2010-12-30 Patrick Gansterer <paroga@webkit.org>
Reviewed by Ariya Hidayat.
[CMake] Add WTF_HEADERS
https://bugs.webkit.org/show_bug.cgi?id=51741
Add the WTF headers to show them in Visual Studio.
* wtf/CMakeLists.txt:
* wtf/CMakeListsWinCE.txt:
2010-12-30 Konstantin Tokarev <annulen@yandex.ru>
Reviewed by David Kilzer.
[Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
used
https://bugs.webkit.org/show_bug.cgi?id=51672
* wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
2010-12-30 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
https://bugs.webkit.org/show_bug.cgi?id=51743
Most of the ifdefs belong to windows and not to the MSVC compiler.
* wtf/FastMalloc.cpp:
2010-12-29 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
* parser/Lexer.cpp:
(JSC::Lexer::parseString):
2010-12-29 Helder Correia <helder@sencha.com>
Reviewed by Eric Seidel.
<VT> and <FF> are not valid JSON whitespace characters
https://bugs.webkit.org/show_bug.cgi?id=51671
Vertical Tab and Form Feed are not allowed white spaces by the JSON
RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
ietestcenter/Javascript/15.12.1.1-0-3.html
* runtime/LiteralParser.cpp:
(JSC::isJSONWhiteSpace):
(JSC::LiteralParser::Lexer::lex):
2010-12-28 Helder Correia <helder@sencha.com>
Reviewed by Eric Seidel.
JSON.stringify must exist as a function taking 3 parameters
https://bugs.webkit.org/show_bug.cgi?id=51667
The reported function length is 1 instead.
Test: ietestcenter/Javascript/15.12.3-0-2.html
* runtime/JSONObject.cpp:
2010-12-28 Helder Correia <helder@sencha.com>
Reviewed by Sam Weinig.
JSON.parse must exist as a function taking 2 parameters
https://bugs.webkit.org/show_bug.cgi?id=51666
Support for revivers was introduced in bug 26591, but the function
length has since remained unchanged.
Test: ietestcenter/Javascript/15.12.2-0-2.html
* runtime/JSONObject.cpp:
2010-12-27 Jake Helfert <jake@jakeonthenet.com>
Reviewed and reworked by Darin Adler.
Building WebKit with Visual Studio 2010 fails due
to ambiguous assignment operator errors.
https://bugs.webkit.org/show_bug.cgi?id=51116
* wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
Platform.h HAVE macro, and included the Visual Studio 2010 compiler
as one of the ones that has nullptr.
* wtf/NullPtr.cpp: Updated condition to match.
* wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
overload if we are compiling in loose mode and the compiler has
nullptr, because assignment of 0 will otherwise encounter
ambiguitity with this overload and the overload for loose mode
that takes a raw pointer. The conditional can be removed when we
get rid of loose mode.
* wtf/PassOwnPtr.h: Ditto.
* wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
if the compiler has nullptr, because assignment of 0 would be
ambiguous with the overload that takes a raw pointer. The conditional
can be removed if we ever decide we no longer need to support
assigning 0, but might need a way to catch that usage on older compilers.
* wtf/RefPtr.h: Ditto.
* wtf/RetainPtr.h: Ditto
* JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
accidentally omitted when the file was first added.
2010-12-26 Xan Lopez <xlopez@igalia.com>
Reviewed by Eric Seidel.
[GTK] Add standalone target for JSC
https://bugs.webkit.org/show_bug.cgi?id=51607
* GNUmakefile.am: add convenience target to only build jsc and its
dependencies.
2010-12-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
[WINCE] Add CPU(MIPS) detection
https://bugs.webkit.org/show_bug.cgi?id=51342
WinCE usually defines MIPS and _MIPS_.
* wtf/Platform.h:
2010-12-23 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Rename RegexCompiler.cpp to RegexPattern.cpp.
Implicitly call compileRegex from RegexPattern's constructor.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
* yarr/RegexCompiler.cpp: Removed.
* yarr/RegexCompiler.h: Removed.
* yarr/RegexInterpreter.cpp:
* yarr/RegexJIT.cpp:
* yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
(JSC::Yarr::compileRegex):
(JSC::Yarr::RegexPattern::RegexPattern):
* yarr/RegexPattern.h:
2010-12-23 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix for WinCE after r74360.
Move the OS(WINDOWS) section after the OS(WINCE) section
and add missing argument to the getStackMax call.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2010-12-22 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix.
[Symbian] Make sure OSAllocatorSymbian builds
This patch only addresses the build problem.
https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
(re)implementation of the Symbian allocator.
* wtf/OSAllocatorSymbian.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
2010-12-22 Dan Bernstein <mitz@apple.com>
Changed WebKitTools to Tools.
* JavaScriptCore.vcproj/JavaScriptCore.sln:
2010-12-22 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
Changed WebKitTools to Tools in script build phases.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-12-22 Andrei Popescu <andreip@google.com>
Unreviewed build fix.
Fix Chromium Linux shared library build.
[Chromium] r74431 broke the Chromium Linux shared library build
https://bugs.webkit.org/show_bug.cgi?id=51462
* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:
2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r74462.
http://trac.webkit.org/changeset/74462
https://bugs.webkit.org/show_bug.cgi?id=51449
broke chromium win (Requested by tonyg-cr on #webkit).
* JavaScriptCore.gypi:
2010-12-21 Tony Gentilcore <tonyg@chromium.org>
Unreviewed build fix.
[chromium] Build fix after r74431
https://bugs.webkit.org/show_bug.cgi?id=51447
* JavaScriptCore.gypi:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Speculative build fix.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::underMemoryPressure):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 26276 - Need a mechanism to determine stack extent
This patch adds accurate stack size calculation for:
DARWIN, QNX, UNIX
We still need to fix:
WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
https://bugs.webkit.org/show_bug.cgi?id=51443
The problem here is that each page uses a reasonable amount of memory, (~4Mb),
and that when miultiple pages are open we keep all JIT code for all functions
in all pages alive.
Add a check to detect high memory pressure situations in the executable allocator
(>50% of available memory allocated), and upon a top level entry into JSC (no code
running on the stack) in this situation throw away all JIT code.
* JavaScriptCore.exp:
* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
* jit/ExecutableAllocator.h:
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::ExecutablePool::systemAlloc): Count allocations.
(JSC::ExecutablePool::systemRelease): Count deallocations.
(JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
* jit/ExecutableAllocatorPosix.cpp:
(JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
* jit/ExecutableAllocatorWin.cpp:
(JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
* runtime/Executable.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.h:
(JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
<rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
https://bugs.webkit.org/show_bug.cgi?id=51434
Reduce the amount of memory the RegExpCache can hold on to on iOS.
Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
from RegExp objects. This helps in two ways (1) it increases the probability that
RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
up holding on to a large ExecutablePool containing a translation of JS code.
(A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
same pool, but large RegExp patterns are less common).
* runtime/JSGlobalData.h:
* runtime/RegExpCache.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Eeeep! build fix!
* wtf/OSAllocator.h:
(WTF::OSAllocator::decommitAndRelease):
2010-12-21 Gavin Barraclough <barraclough@apple.com>
Ooops, fixed typo in comment.
* wtf/OSAllocator.h:
2010-12-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough & Oliver Hunt.
Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
https://bugs.webkit.org/show_bug.cgi?id=51359
I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
* runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
PageAllocationAligned.
* runtime/Collector.cpp:
(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::addWeakGCHandle):
* runtime/Collector.h: Switched from AlignedMemoryAllocator to
PageAllocationAligned.
* runtime/GCHandle.cpp:
* runtime/GCHandle.h: Ditto.
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
functions. Supplanted by PageAllocationAligned.
* wtf/PageAllocationAligned.cpp: Added.
(WTF::PageAllocationAligned::allocate):
(WTF::PageAllocationAligned::deallocate):
* wtf/PageAllocationAligned.h: Added.
(WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
class for doing aligned memory allocation. This class properly matches
allocation and deallocation library calls, fixing a long-standing bug
in PageAllocation.
* wtf/Platform.h: Removed some defunction VM platform defines.
* wtf/wtf.pri: Updated build files.
2010-12-21 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
https://bugs.webkit.org/show_bug.cgi?id=49006
This problem was caused by having a parameter named 'arguments'.
The fix is to treat parameters named 'arguments' as shadowing
the actual arguments property, and so logically turn the function
into one that doesn't "use" arguments.
This required a bit of fiddling in the parser to ensure we correctly
propagate the 'feature' of shadowing is set correctly.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::createArgumentsIfNecessary):
Change assertion to an early return as we may now reference
a property named 'arguments' without being in a function that
has the ArgumentsFeature
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::declareParameter):
(JSC::JSParser::Scope::shadowsArguments):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionInfo):
* parser/Nodes.h:
(JSC::ScopeNode::usesArguments):
2010-12-21 Daniel Bates <dbates@rim.com>
Reviewed by Eric Seidel and Darin Adler.
Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
https://bugs.webkit.org/show_bug.cgi?id=51367
Inspired by a patch by George Staikos.
* wtf/DateMath.cpp:
(JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
of type OwnPtrArray<char>.
* wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed.
(JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
(JSC::GregorianDateTime::operator tm): Ditto.
(JSC::GregorianDateTime::copyFrom): Ditto.
2010-12-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r74402.
http://trac.webkit.org/changeset/74402
https://bugs.webkit.org/show_bug.cgi?id=51402
This patch broke the Windows 7 Release Layout Tests (Requested
by jessieberlin on #webkit).
* wtf/StackBounds.cpp:
(WTF::estimateStackBound):
(WTF::StackBounds::initialize):
2010-12-21 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
Unify the name of parentheses in YARR: rename parenthesis to
parentheses.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2010-12-21 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Andreas Kling.
[Qt] Set BUILDING_QT__ consistently
https://bugs.webkit.org/show_bug.cgi?id=51341
* JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
is already defined in WebKit.pri.
2010-12-20 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 26276 - Need a mechanism to determine stack extent
This patch adds accurate stack size calculation for:
DARWIN, WINDOWS, QNX, UNIX
We still need to fix:
SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2010-12-20 Gavin Barraclough <barraclough@apple.com>
PPC build fix; stop using std::swap on PageAllocation/PageReservation,
this was failing on some compilers since the lack of default construction
for the m_executable/m_writable fields meant the value being swapped may
not have been fully initialized.
* wtf/PageAllocation.h:
(WTF::PageAllocation::deallocate):
* wtf/PageBlock.h:
* wtf/PageReservation.h:
(WTF::PageReservation::deallocate):
2010-12-20 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
|delete name| in strict mode code should be an early error
https://bugs.webkit.org/show_bug.cgi?id=50431
Disallow the |delete IDENTIFIER| production in strict mode, and removed
a bunch of now unnecessary code.
* parser/JSParser.cpp:
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::jsParse):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h:
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
2010-12-20 Gavin Barraclough <barraclough@apple.com>
Reviewed by Olver Hunt.
Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
The current implementation of recursion limit checking is not safe on smaller stacks.
Switch to using a common mechanism, shared with the parser, to check recursion limits.
Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
footprint on the stack, at just under 1k on x86-64. Given this, the default recursion
check (requiring 4k of available space to recurse) seems reasonable.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNode):
(JSC::BytecodeGenerator::emitNodeInConditionContext):
* bytecompiler/NodesCodegen.cpp:
(JSC::BinaryOpNode::emitStrcat):
2010-12-20 Tony Gentilcore <tonyg@chromium.org>
Unreviewed build fix.
Include pthread to fix chromium mac build (broken by r74360)
https://bugs.webkit.org/show_bug.cgi?id=51356
* wtf/StackBounds.cpp:
2010-12-20 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
* GNUmakefile.am: add missing files.
2010-12-18 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 26276 - Need a mechanism to determine stack extent
This patch adds a class 'StackBounds', to hold information about the machine stack.
The implementation of this class broadly adheres to the current implmentation of
stack limit checking, and as such does not solve the problem of determining stack
extent, but gives us a common place to do so.
Currently two mechanism are provided to determine the stack origin (the point the
stack is growing away from). currentThreadStackBase() in Collector provides a
more accurate determination of the stack origin, so use this to calculate
StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
as such can be removed. Cache the StackBounds on WTFThreadData such that they
need only be determined once per thread, and for non-API contexts cache this
information in JSGlobalData, to save a thread-specific access.
For the time being retain the estimate of stack size used by JSC's parser
(128 * sizeof(void*) * 1024), with a view to replacing this with something more
accurate in the near future.
* parser/JSParser.cpp:
(JSC::JSParser::canRecurse):
(JSC::JSParser::JSParser):
Change to use StackBounds.
* runtime/Collector.cpp:
(JSC::Heap::registerThread):
(JSC::Heap::markCurrentThreadConservativelyInternal):
Change to use StackBounds, cached on JSGlobalData.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::stack):
Add a cached copy of StackBounds.
* wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
(WTF::estimateStackBound):
(WTF::StackBounds::initialize):
(WTF::getStackMax):
Copy code from Collector.cpp to determine stack origin.
* wtf/StackBounds.h: Added.
(WTF::StackBounds::StackBounds):
No argument constructor; returns a null StackBounds.
(WTF::StackBounds::currentThreadStackBounds):
Returns a StackBounds object representing the stack limits
of the current thread.
(WTF::StackBounds::origin):
Returns to stack origin (the point the stack is growing away
from; the highest extent of the stack on machines where the
stack grows downwards.
(WTF::StackBounds::recursionLimit):
Returns a limit value that is 'a comfortable distance from
the end of the stack'. Our concept of this is currently 1 page
away from the end, however the default value may be tuned in
the future, and clients may override passing a larger delta;
should only be called on StackBounds object representing the
stack of the thread this method is called on (checked by
checkConsistency).
(WTF::StackBounds::recursionCheck):
Checks whether we are currently 'a comfortable distance from
the end of the stack'. Our concept of this is currently 1 page
away from the end, however the default value may be tuned in
the future, and clients may override passing a larger delta
to apply when checking, if they wish to do so. This method
should only be called on StackBounds object representing the
stack of the thread this method is called on (checked by
checkConsistency).
(WTF::StackBounds::current):
Approximate current stack position. On machines where the stack
is growing downwards this is the lowest address that might need
conservative collection.
(WTF::StackBounds::isGrowingDownward):
True for all platforms other than WINCE, which has to check.
(WTF::StackBounds::checkConsistency):
This is called in methods that shoulds only be operating on a
valid set of bounds; as such we expect m_origin != m_bounds
(i.e. stack size != zero) - we're really testing that this
object is not null (the constructor initializes both fields
to zero). Also checks that current() is within the stack's
bounds.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::stack):
Add the StackBounds member variable.
2010-12-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Factored common page set management into a new PageBlock base class
https://bugs.webkit.org/show_bug.cgi?id=51285
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
* wtf/PageAllocation.cpp: Removed.
* wtf/PageAllocation.h:
(WTF::PageAllocation::deallocate):
(WTF::PageAllocation::PageAllocation):
* wtf/PageReservation.h:
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::deallocate):
(WTF::PageReservation::PageReservation):
* wtf/wtf.pri:
2010-12-17 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
RegExp Jit'ed expression crashes clicking link on yelp.com
https://bugs.webkit.org/show_bug.cgi?id=51284
When transitioning between an non-repeating beginning of line
anchored expression and the remaining refactored repeating
expression, we should not clear any residual datalabel in
state's m_backtrack. It will be resolved and cleared in subsequent
code when linkAlternativeBacktracks() is called for the repeating
alternative(s).
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
(JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
2010-12-17 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Mark Rowe.
Updated for the renaming of WebKitTools to Tools
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2010-12-17 Ariya Hidayat <ariya@sencha.com>
Reviewed by Oliver Hunt.
[JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
https://bugs.webkit.org/show_bug.cgi?id=51268
* parser/JSParser.cpp:
(JSC::JSParser::parseAssignmentExpression):
2010-12-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Removed RChunk from PageAllocation/PageReservation, since it's now unused.
https://bugs.webkit.org/show_bug.cgi?id=51276
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
* wtf/PageReservation.h:
(WTF::PageReservation::PageReservation):
2010-12-17 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Incorrect encoding of some constants in ARMv7 JIT
https://bugs.webkit.org/show_bug.cgi?id=51273
<rdar://problem/8650210>
When using immediate encoding 3 we need to write the byte
that holds a duplicated value.
* assembler/ARMv7Assembler.h:
(JSC::ARMThumbImmediate::makeEncodedImm):
2010-12-16 Evan Martin <evan@chromium.org>
Reviewed by Darin Fisher.
[chromium] useless warnings when building on Windows
https://bugs.webkit.org/show_bug.cgi?id=50985
Disable some compiler warnings that aren't indicative of real problems.
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2010-12-16 Pratik Solanki <psolanki@apple.com>
Reviewed by Geoffrey Garen.
https://bugs.webkit.org/show_bug.cgi?id=51166
ExecutableAllocator::cacheFlush should call sys_cache_control
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
sys_cache_control(kCacheFunctionPrepareForExecution,...).
2010-12-16 Ariya Hidayat <ariya@sencha.com>
Reviewed by Andreas Kling.
[JSC] Const correctness in ASTBuilder and SyntaxChecker
https://bugs.webkit.org/show_bug.cgi?id=51141
* parser/ASTBuilder.h:
(JSC::ASTBuilder::getName):
(JSC::ASTBuilder::getType):
(JSC::ASTBuilder::isResolve):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):
2010-12-15 Kenneth Russell <kbr@google.com>
Reviewed by James Robinson.
Web Audio API: port FFTFrame to MKL
https://bugs.webkit.org/show_bug.cgi?id=50986
Fixed bug in log2 emulation function provided for Windows port of
Web Audio API.
* wtf/MathExtras.h:
(log2):
2010-12-14 Mark Rowe <mrowe@apple.com>
Reviewed by Sam Weinig.
<http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
* wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool.
It was previously implicitly convertible to bool on Mac via operator NSString*,
but since that always has a non-zero return value it would give unexpected results.
2010-12-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Eric Seidel.
[Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
https://bugs.webkit.org/show_bug.cgi?id=50231
Guard CONFIG+=link_pkgconfig with !symbian.
* jsc.pro:
2010-12-14 Cameron Zwarich <zwarich@apple.com>
Not reviewed.
Revert accidental change disabling the JIT for most platforms.
* wtf/Platform.h:
2010-12-13 Cameron Zwarich <zwarich@apple.com>
Reviewed by Eric Seidel.
Clang fails to build the JSC interpreter
https://bugs.webkit.org/show_bug.cgi?id=51016
Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows
them, but it does not correctly generate the cleanup, causing a leak if the
cleanup decrements a reference count.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Put an Identifier into its own scope.
2010-12-14 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Simplify context-menu handling code
https://bugs.webkit.org/show_bug.cgi?id=49658
* wtf/PlatformRefPtr.h: Add leakRef()
2010-12-13 Cameron Zwarich <zwarich@apple.com>
Reviewed by Gavin Barraclough.
JavaScriptCore should not use "asm volatile" outside of a function
https://bugs.webkit.org/show_bug.cgi?id=50991
* jit/JITStubs.cpp: Remove the volatile keyword from asm statements.
2010-12-13 Steve Falkenburg <sfalken@apple.com>
Windows production build fix.
Try copying ICU 4.6 in addition to 4.4 and 4.2.
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
2010-12-13 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
REGRESSION: mobileme mail viewing is broken
https://bugs.webkit.org/show_bug.cgi?id=50884
Fixed problem where simple parenthesis (those without capture and
with a fixed count) where not propagating backtrack to labels for
nested parentheses. Also added the nesting level for the parentheses
state created in that case as well.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel):
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-12-13 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
https://bugs.webkit.org/show_bug.cgi?id=49385
Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
* yarr/RegexPattern.h:
2010-12-10 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
bugs.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=50816
First nested parentheses of the second or greater alternative
where backtracking to the prior parentheses. Changed the default
handling of initial parentheses for all alternatives to go back
to the immediate outer paren.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex):
(JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail):
(JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-12-11 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Add an overload to makeString for Vector<char>
https://bugs.webkit.org/show_bug.cgi?id=50123
Also cleanup StringTypeAdapter.
* wtf/text/StringConcatenate.h:
2010-12-10 Siddharth Mathur <siddharth.mathur@nokia.com>
Reviewed by Eric Seidel.
[Qt] Build fix for Symbian: don't compile POSIX memory management implementation
https://bugs.webkit.org/show_bug.cgi?id=50707
* wtf/wtf.pri:
2010-12-10 Steve Falkenburg <sfalken@apple.com>
Windows production build fix.
Don't stop if react-to-vsprops-changes.py exits with an error,
since this will occur in production builds.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-12-10 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows.
* wtf/Platform.h:
2010-12-10 Martin Robinson <mrobinson@igalia.com>
Unreviewed, rolling out r73703.
http://trac.webkit.org/changeset/73703
https://bugs.webkit.org/show_bug.cgi?id=49658
This patch is causing crashes on the GTK+ bots.
* wtf/PlatformRefPtr.h:
2010-12-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Eric Seidel.
Cleanup StringWx.cpp
https://bugs.webkit.org/show_bug.cgi?id=50525
Use StringImpl::createUninitialized to avoid memcpy and fix style issues.
* wtf/wx/StringWx.cpp:
(WTF::String::String):
2010-12-10 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Simplify context-menu handling code
https://bugs.webkit.org/show_bug.cgi?id=49658
* wtf/PlatformRefPtr.h:
2010-12-09 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION (r73065?): A regex no longer works
https://bugs.webkit.org/show_bug.cgi?id=50570
Changed the handling of adjacent parentheses backtracks in two ways.
First, only outer most paren backtracks default to back tracking
to the "next character" looping code. Second, added a jump around
backtracks that fall through to the next backtrack where the
second backtrack has some greedy processing before the backtracking
from outside the parentheses code.
Also cleaned up extraneous white spce, removing white space at the
end of or that makes up a whole line.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
(JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel):
(JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel):
(JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-12-09 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Addressed the "FIXME" issues in array sort for toString() methods that
mutate the array in either size or contents. The change is to mark
the temporary array contents so that they are not garbage collected
and to make sure the array is large enough to hold the contents
of the sorted temporary vector.
https://bugs.webkit.org/show_bug.cgi?id=50718
* runtime/Collector.cpp:
(JSC::Heap::addTempSortVector):
(JSC::Heap::removeTempSortVector):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/Collector.h:
* runtime/JSArray.cpp:
(JSC::JSArray::sort):
* runtime/JSValue.h:
2010-12-09 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Changed setting of backtrack labels to not overwrite a prior
label. Where losing prior labe which then reverted back to
next character label.
https://bugs.webkit.org/show_bug.cgi?id=50579
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
2010-12-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Permit Character Class Escape in CharacterRange in Character Class.
https://bugs.webkit.org/show_bug.cgi?id=50483
https://bugs.webkit.org/show_bug.cgi?id=50538
https://bugs.webkit.org/show_bug.cgi?id=50654
https://bugs.webkit.org/show_bug.cgi?id=50646
We recently tightened up our spec conformance in generating syntax
error in these cases, however testing in the wild has shown this
to be problematic. This reverts the previous change in allowing
class escapes (e.g. \d) in ranges in character classes ([]), but
does retain some closer conformance to the spec in only allowing
ranges that would be permitted per the grammar rules in the spec
(e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range).
* yarr/RegexParser.h:
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
(JSC::Yarr::Parser::parse):
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Try to fix crash-on-launch seen on Windows builder.
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::release): Disabled an ASSERT, because it checks for
a bug that hasn't been fixed yet.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def
file to remove a symbol -- the next build failure will say which symbol
to add back.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
2010-12-08 Geoffrey Garen <ggaren@apple.com>
Try to fix GTK Linux build.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutablePool::systemAlloc):
* runtime/AlignedMemoryAllocator.h:
(JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator.
2010-12-07 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator
https://bugs.webkit.org/show_bug.cgi?id=50653
* JavaScriptCore.exp: Updated for new function signature.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
OSAllocator is now the central location for verifying that allocation succeeds.
This allowed me to remove some complicating cross-platform cruft.
* runtime/AlignedMemoryAllocator.h:
(JSC::::allocate): Updated for code motion.
* wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
support VM features required by clients of PageAllocation and PageReservation.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
executable memory here.
* wtf/OSAllocatorSymbian.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit): Updated for new function signatures.
* wtf/OSAllocatorWin.cpp:
(WTF::protection):
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::release): Updated for new function signatures. Moved
some protection-related and WINCE-related code from PageAllocation here.
* wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
it was only used by checkAllocatedOkay, which is now gone.
* wtf/PageAllocation.h:
(WTF::PageAllocation::allocate):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::deallocate):
(WTF::PageAllocation::isPowerOfTwo):
(WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
and replaced calls to them with calls to OSAllocator.
* wtf/PageReservation.h:
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::reserve):
(WTF::PageReservation::deallocate):
(WTF::PageReservation::PageReservation): Ditto. Added m_writable and
m_executable because these flags are now required when committing memory.
2010-12-08 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Add web audio files to mac port Xcode projects
https://bugs.webkit.org/show_bug.cgi?id=50721
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-12-08 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Marking the active global object re-enters through markConservatively
https://bugs.webkit.org/show_bug.cgi?id=50711
draining of the MarkStack is not allowed to be re-entrant, we got away
with this simply due to the logic in MarkStack::drain implicitly handling
changes that could be triggered by the re-entry.
Just to be safe this patch removes the re-entry through markConservatively
so we don't accidentally introduce such an issue in future. I've also
added an assertion to catch such errors.
* runtime/Collector.cpp:
(JSC::Heap::markConservatively):
(JSC::Heap::markCurrentThreadConservativelyInternal):
(JSC::Heap::markOtherThreadConservatively):
* runtime/JSArray.h:
(JSC::MarkStack::drain):
* runtime/MarkStack.h:
(JSC::MarkStack::MarkStack):
2010-12-08 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
https://bugs.webkit.org/show_bug.cgi?id=49388
Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
which was decided was the best way to identify a build with CoreAnimation
* wtf/Platform.h:
2010-12-07 Anders Carlsson <andersca@apple.com>
Build fix follow up build fix.
* pcre/pcre_ucp_searchfuncs.cpp:
(jsc_pcre_ucp_othercase):
2010-12-07 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
Fix clang++ build
https://bugs.webkit.org/show_bug.cgi?id=50645
Explicitly cast offset to int.
* pcre/pcre_ucp_searchfuncs.cpp:
(jsc_pcre_ucp_othercase):
2010-12-07 Kenneth Russell <kbr@google.com>
Reviewed by David Levin.
Fix compilation of core web audio files on Windows
https://bugs.webkit.org/show_bug.cgi?id=50603
Added log2 definition to MathExtras.h on Windows platform.
* wtf/MathExtras.h:
(log2):
2010-12-07 Antti Koivisto <antti@apple.com>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=50412
http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading
Creating a substring caused the original string be flattened if it was in the rope form. This could use
significant amount of memory by reducing buffer sharing between strings.
Add a rope specific substring function that constructs the substring by reusing the rope fibers
instead of flattening the rope.
No change observed in SunSpider.
* runtime/JSString.cpp:
(JSC::JSString::substringFromRope):
* runtime/JSString.h:
(JSC::jsSubstring):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
2010-12-06 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Simplified some ASLR-related code in PageAllocation/Reservation
https://bugs.webkit.org/show_bug.cgi?id=50599
Removed reserveAt, allocateAt, and friends, since they all existed to
serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
ASLR code down into systemAllocate -- now, any time you allocate
executable memory on a supporting platform, the memory's location is
randomized.
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
to randomize anything.
* wtf/PageAllocation.h:
(WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
beefed up executable allocation with randomization.
* wtf/PageReservation.h:
(WTF::PageReservation::systemReserve): Removed some *At() functions.
2010-12-06 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
https://bugs.webkit.org/show_bug.cgi?id=50588
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit): Tightened up some comments. Changed
reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
2010-12-06 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Add build system
https://bugs.webkit.org/show_bug.cgi?id=50522
* CMakeListsWinCE.txt: Added.
* shell/CMakeListsWinCE.txt: Added.
* wtf/CMakeListsWinCE.txt: Added.
2010-12-06 John Tantalo <john.tantalo@gmail.com>
Reviewed by Geoffrey Garen.
jsc does not ignore shebang
https://bugs.webkit.org/show_bug.cgi?id=49576
* jsc.cpp:
(fillBufferWithContentsOfFile):
- translate shebang into a valid JavaScript comment so the lexer ignores it
2010-12-05 Adam Roben <aroben@apple.com>
Windows production build fix
Put spaces after trailing backslashes when setting
%WebKitVSPropsRedirectionDir%. According to MSDN
<http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
A backslash ( \ ) followed by a newline character is interpreted as
a space in the command; use a backslash at the end of a line to
continue a command onto the next line. NMAKE interprets the
backslash literally if any other character, including a space or
tab, follows the backslash.
* JavaScriptCore.vcproj/JavaScriptCore.make:
2010-12-04 Patrick Gansterer <paroga@webkit.org>
Unreviewed, build fix after r69132.
* shell/CMakeLists.txt: Fix directory name (jsc -> shell).
2010-12-04 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
[GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
https://bugs.webkit.org/show_bug.cgi?id=50451
* wtf/gobject/GTypedefs.h: add GdkWindow defines.
2010-12-03 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Oliver Hunt.
Bug 50509 - set* methods on MacroAssembler are awfully named.
Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
Rename to clarify.
set32 -> set32Compare32
setTest32 -> set32Test32
set8 -> set8Compare32
setTest8 -> set32Test8
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::setPtr):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::set32Compare32):
(JSC::MacroAssemblerARM::set8Compare32):
(JSC::MacroAssemblerARM::set32Test32):
(JSC::MacroAssemblerARM::set32Test8):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::set32Compare32):
(JSC::MacroAssemblerARMv7::set8Compare32):
(JSC::MacroAssemblerARMv7::set32Test32):
(JSC::MacroAssemblerARMv7::set32Test8):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::set8Compare32):
(JSC::MacroAssemblerMIPS::set32Compare32):
(JSC::MacroAssemblerMIPS::set32Test8):
(JSC::MacroAssemblerMIPS::set32Test32):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::set8Compare32):
(JSC::MacroAssemblerX86Common::set32Compare32):
(JSC::MacroAssemblerX86Common::set32Test8):
(JSC::MacroAssemblerX86Common::set32Test32):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
2010-12-03 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Incorrect logic for returning memory at the end of linking.
Reviewed by Geoff Garen.
At the end of linking we return any space at the end of the
allocated executable region that was saved due to branch
compaction. This is currently by done by subtracting the
different from the m_freePtr in the allocation pool. This
can be incorrect if your allocation was made from a new
page that was not selected for subsequent allocations.
This patch corrects this behaviour by verifying that the
memory being returned actually comes from the current
allocation pool.
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::linkCode):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::tryShrink):
2010-12-03 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough
Changes to significantly reduce branches to branches in JIT'ed
parentheses backtrack processing. The changes include the following:
- Taking the backtracking processing out of line and adding it as
code at the end of the JIT'ed routine.
- Allow backtracks to be direct via an indirect branch for an address
pushed onto the stack. If the use of an indirect branch is from a
conditional jump, then we emit a trampoline at the end of the
routine.
- Propogate backtracks instead of adding trampolines. Backtracks are
propogated to where they are used. This change also eliminated
trampoline branch code that aren't used.
- Added global expression state to keep track of parentheses tail
code and indirect branches.
Other changes made to support these changes.
- Split invertOrCapture flag on Patterns to two separate flags. Added
getters for these flags. Rippled these changes to both the JIT
and interpreter code.
- Split BacktrackDestination out off TermGenerationState struct.
This is done to hold references to a backtrack for later code
generation.
https://bugs.webkit.org/show_bug.cgi?id=50295
* assembler/ARMAssembler.h:
(JSC::ARMAssembler::JmpDst::isSet):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::JmpDst::isSet):
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::Label::isSet):
(JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
(JSC::AbstractMacroAssembler::DataLabelPtr::used):
(JSC::AbstractMacroAssembler::JumpList::clear):
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::JmpDst::isSet):
* assembler/X86Assembler.h:
(JSC::X86Assembler::JmpDst::isSet):
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
(JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/RegexInterpreter.h:
(JSC::Yarr::ByteTerm::ByteTerm):
(JSC::Yarr::ByteTerm::BackReference):
(JSC::Yarr::ByteTerm::invert):
(JSC::Yarr::ByteTerm::capture):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
(JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
(JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
(JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
(JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
(JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
(JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
(JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
(JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
(JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
(JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
(JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
(JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
(JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
(JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
(JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
(JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
(JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
(JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
(JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
(JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
(JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
(JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
(JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
(JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
(JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
(JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
(JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
(JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
(JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
(JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
(JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
(JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
(JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
(JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
(JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
(JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
(JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
(JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
(JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
(JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::RegexGenerator::generateAssertionBOL):
(JSC::Yarr::RegexGenerator::generateAssertionEOL):
(JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
(JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
(JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
(JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
(JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
(JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
(JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
(JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
(JSC::Yarr::RegexGenerator::generateDisjunction):
(JSC::Yarr::RegexGenerator::compile):
* yarr/RegexPattern.h:
(JSC::Yarr::PatternTerm::PatternTerm):
(JSC::Yarr::PatternTerm::invert):
(JSC::Yarr::PatternTerm::capture):
2010-12-03 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
First steps to adding web audio files to build systems
https://bugs.webkit.org/show_bug.cgi?id=49952
* wtf/Complex.h:
2010-12-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Move StringWx.cpp into wtf directory
https://bugs.webkit.org/show_bug.cgi?id=50060
* wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
(WTF::String::String):
2010-12-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Move StringBrew.cpp into wtf directory
https://bugs.webkit.org/show_bug.cgi?id=50058
* wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
(WTF::String::String):
2010-12-03 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Move StringHaiku.cpp into wtf directory
https://bugs.webkit.org/show_bug.cgi?id=50057
* wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
(WTF::String::String):
(WTF::String::operator BString):
2010-12-02 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build.
* runtime/GCActivityCallback.cpp:
(JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
2010-12-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
* API/APIShims.h:
(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
synchronize() function.
* runtime/Collector.cpp:
(JSC::Heap::activityCallback):
* runtime/Collector.h: Added an activityCallback() accessor, for the
call above.
* runtime/GCActivityCallback.h:
(JSC::GCActivityCallback::synchronize):
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()):
(JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
scheduled in. If we begin/resume execution within a new run loop, reschedule
on it. This prevents a crash when using a lockless context group on
multiple threads -- the crash would happen if the GC timer scheduled on
thread A, then you continued execution on thread B, then the thread A
timer fired.
2010-12-02 Darin Adler <darin@apple.com>
* wtf/ASCIICType.h: Fix wrong type from last check-in.
2010-12-02 Darin Adler <darin@apple.com>
Try to fix certain builds (Qt Windows).
* wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
versions of ICU, UChar32 can be a typedef for unsigned. Adding this
overload should make us compatible with these old ICUs.
2010-12-02 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Add AtomicString::fromUTF8
https://bugs.webkit.org/show_bug.cgi?id=45594
Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
calculates the required length for the UTF16 conversation in one step.
This is then used in a specialized translator for the string table of AtomicString.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/AtomicString.cpp:
(WTF::CStringTranslator::equal):
(WTF::HashAndUTF8CharactersTranslator::hash):
(WTF::HashAndUTF8CharactersTranslator::equal):
(WTF::HashAndUTF8CharactersTranslator::translate):
(WTF::AtomicString::add):
(WTF::AtomicString::addSlowCase):
(WTF::AtomicString::find):
(WTF::AtomicString::fromUTF8):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::readUTF8Sequence):
(WTF::Unicode::convertUTF8ToUTF16):
(WTF::Unicode::calculateStringHashFromUTF8):
(WTF::Unicode::equalUTF16WithUTF8):
* wtf/unicode/UTF8.h:
2010-12-02 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Added a little hardening to OSAllocator.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::release):
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
reports an error.
2010-12-02 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Geoffrey Garen.
[Qt] Make platform managing of OSAllocator better than r73106
https://bugs.webkit.org/show_bug.cgi?id=50385
* wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
* wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
* wtf/OSAllocatorWin.cpp: Remove platform specific guard.
* wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
2010-12-02 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Use GetTickCount() for srand()
https://bugs.webkit.org/show_bug.cgi?id=50338
time() is not a native function on WinCE, so use GetTickCount() instead.
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2010-12-02 Norbert Leser <norbert.leser@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] [Symbian] Reintroduce compiler optimizations for JSC
https://bugs.webkit.org/show_bug.cgi?id=50270
Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
Tested via Sunspider and V8 - both of which show significant performance improvement.
* JavaScriptCore.pro:
2010-12-02 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Move regex parsing and fallback handling to runtime/RegExp.cpp
https://bugs.webkit.org/show_bug.cgi?id=50015
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
(JSC::RegExp::compile):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* runtime/RegExp.h:
(JSC::RegExp::pattern):
* yarr/RegexInterpreter.cpp:
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::setFallBack):
(JSC::Yarr::RegexCodeBlock::isFallBack):
(JSC::Yarr::executeRegex):
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the GTK build.
* GNUmakefile.am: Use a full path to OSAllocator*.cpp.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the EFL Linux build.
* CMakeListsEfl.txt: Added OSAllocator to the project.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Qt build: Include all OS files for Qt's sake, and then
use #ifdefs in the files to exclude things based on OS.
This is a pretty bad way to manage platforms -- hopefully we can
fix the Qt build system and move away from this in the future.
* wtf/OSAllocatorPosix.cpp:
* wtf/OSAllocatorSymbian.cpp:
* wtf/OSAllocatorWin.cpp:
* wtf/wtf.pri:
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Chromium build.
* JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the GTK build.
* GNUmakefile.am: Added OSAllocator to another project.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the GTK Linux build.
* JavaScriptCore.gypi: Added OSAllocator to the project.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Qt Linux build.
* wtf/OSAllocatorPosix.cpp: Use the right errno.h.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build: export some more symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Try to fix the Qt Linux build.
* wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Windows build fix: commit doesn't have a return value.
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::commit):
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Build fix: Export some symbols.
* JavaScriptCore.exp:
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Build fix.
* JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
so other projects can see it.
* wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
2010-12-01 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Baby step toward a cross-platform virtual memory abstraction: created
an all-static OSAllocator class and changed MarkStack to use it.
* JavaScriptCore.exp: These functions are inlined now.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
* JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
* runtime/MarkStack.h:
(JSC::MarkStack::allocateStack):
(JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
own platform-specific code.
* runtime/MarkStackNone.cpp: Removed. Nothing used this.
* runtime/MarkStackPosix.cpp:
* runtime/MarkStackSymbian.cpp:
* runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
we use the OSAllocator abstraction now.
* wtf/OSAllocator.h: Added.
* wtf/OSAllocatorPosix.cpp: Added.
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release):
* wtf/OSAllocatorSymbian.cpp: Added.
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release):
* wtf/OSAllocatorWin.cpp: Added.
(WTF::OSAllocator::reserve):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::release): The new OSAllocator abstraction.
* wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
2010-12-01 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
WinCairo build should not use link-time code generation (LTCG)
https://bugs.webkit.org/show_bug.cgi?id=50353
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
010-12-01 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
vcproj changes can't be applied cleanly by the Windows EWS bot
https://bugs.webkit.org/show_bug.cgi?id=50328
* JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
* JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
2010-12-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
For unmatched subpattens we previously used to set the subpattern end to -1,
but now we only set the start value. E.g. consider the following:
/a(b)?c/.exec("ac");
Previously we would generate an internal results array of:
[ 0, 2, -1, -1 ]
Since fairly recently we have generated results of:
[ 0, 2, -1, ??? ]
(With the end index of the subpattern uninitialized).
Update these ASSERTs to account for this.
Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
were checking the wrong property on the pattern term. We should have been
looking at term.parentheses.subpatternId, but instead were checking
term.subpatternId. The latter is actually only the subpatternId for
back reference terms. Rename this to backReferenceSubpatternId.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):
2010-11-30 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Bug 50297 - \s in YARR should match BOMs.
From section 15.10.2.12 CharacterClassEscape contains:
The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
Table 2 in section 7.2 contains:
\uFEFF Byte Order Mark <BOM>
* create_regex_tables:
Add BOM to spaces table.
2010-11-30 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Fixed review comments following bug #48101.
Mostly typos, plus gave quantifyInfinite a symbolic name.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
(JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
* yarr/RegexParser.h:
(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::parse):
2010-11-30 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
WTF project missing build-stopping code from its pre-build event
https://bugs.webkit.org/show_bug.cgi?id=50281
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
2010-11-30 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Cleanup UTF8.cpp
https://bugs.webkit.org/show_bug.cgi?id=49581
Use macros and functions instead of range values directly.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::inlineUTF8SequenceLength):
(WTF::Unicode::UTF8SequenceLength):
(WTF::Unicode::convertUTF16ToUTF8):
(WTF::Unicode::readUTF8Sequence):
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
2010-11-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Fixed a crash seen when using a PageAllocation to store itself.
* wtf/PageAllocation.h:
(WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
it, in case unmapping m_base unmaps the PageAllocation.
* wtf/BumpPointerAllocator.h:
(WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
2010-11-30 Xan Lopez <xlopez@igalia.com>
Reviewed by Darin Adler.
m_hasNonEnumerableProperties is never initialized in Structure
https://bugs.webkit.org/show_bug.cgi?id=50266
* runtime/Structure.cpp:
(JSC::Structure::Structure): initialize member variable.
2010-11-29 Steve Falkenburg <sfalken@apple.com>
Windows build fix (part 1). Use correct environment variable syntax in cmd files.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
* JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
* JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
* JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
2010-11-29 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
https://bugs.webkit.org/show_bug.cgi?id=50038
* wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
2010-11-29 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
JavaScriptCore projects on Windows should use cmd files for build events
https://bugs.webkit.org/show_bug.cgi?id=50193
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
* JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
* JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
* JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
* JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
* JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
2010-11-29 Dai Mikurube <dmikurube@google.com>
Reviewed by Kent Tamura.
when empty, clicking "down" on outer-spin-button returns "max value"
https://bugs.webkit.org/show_bug.cgi?id=45491
It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
returns a struct tm, not milliseconds.
Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
environments. This calculation is already done in calculateUTCOffset(), and complicated.
Duplicating this complicated calculation is unreasonable because of maintainability.
To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
(WTF::calculateUTCOffset):
(WTF::calculateDSTOffset):
* wtf/DateMath.h:
2010-11-29 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Switch web audio code to use FloatPoint3D instead of Vector3
https://bugs.webkit.org/show_bug.cgi?id=50186
* wtf/Vector3.h: Removed.
2010-11-29 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
https://bugs.webkit.org/show_bug.cgi?id=49858
We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
- To simplify editing (editing vsprops build steps is confusing).
- For more readable diffs.
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
* JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
2010-11-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by Gavin Barraclough.
Improved accuracy of command-line SunSpider.
* jsc.cpp:
(functionRun): Changed the "run" function to run a given test in
its own global object. Previously, all tests ran in the same global
object, which created name conflicts, and made globals from previous
tests artificially survive into later tests.
Also changed "run" to return the elapsed milliseconds when running a
given test, for slightly more accurate numbers.
(functionCheckSyntax): Ditto on returning elapsed milliseconds.
2010-11-29 Darin Adler <darin@apple.com>
Reviewed by Andreas Kling.
Remove a couple unneeded overflow checks
https://bugs.webkit.org/show_bug.cgi?id=49816
* wtf/text/CString.cpp:
(WTF::CString::init): Use an ASSERT instead of
an overflow check with CRASH.
2010-11-29 Adam Roben <aroben@apple.com>
Robustify react-to-vsprops-changes.py against changes to its location
or the location of the .vsprops files
Suggested by John Sullivan.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
Removed file_modification_times.
(main): Use glob.glob to find the .vsprops files and assert that we found some.
2010-11-29 Adam Roben <aroben@apple.com>
Touch wtf/Platform.h whenever any .vsprops file changes
This will cause all files to be recompiled, which will make changes to
preprocessor macros (e.g., ENABLE_*) actually take effect.
Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
macros are changed (because not enough files are rebuilt)
Reviewed by John Sullivan.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
(main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
added some comments and logging to make it clearer what the script is
doing and why.
2010-11-29 Adam Roben <aroben@apple.com>
Update react-to-vsprops-changes.py after r72555
.vsprops files are no longer accessed relative to $WebKitLibrariesDir.
Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
react-to-vsprops-changes.py no longer works for people with a
non-default $WebKitLibrariesDir
Reviewed by John Sullivan.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
(main): Always look in WebKitLibraries/win for .vsprops files, not in
$WebKitLibrariesDir.
2010-11-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 48100 - YARR allows what seems like a bogus character-class range
Per ECMA-262 character classes containing character ranges containing
character classes are invalid, eg:
/[\d-x]/
/[x-\d]/
/[\d-\d]/
These should throw a syntax error.
* yarr/RegexParser.h:
2010-11-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 48101 - Yarr gives different results for /(?:a*?){2,}/
The test cases in the linked mozilla bug demonstrate a couple of
problems in subpattern matching. These bugs lie in the optimized
cases - for matching parentheses with a quantity count of 1, and
for matching greedy quantified parentheses at the end of a regex
(which do not backtrack).
In both of these cases we are failing to correctly handle empty
matches. In the case of parentheses-single matches (quantity count
one) we are failing to test for empty matches at all. In the case
of terminal subpattern matches we do currently check, however there
is a subtler bug here too. In the case of an empty match we will
presently immediately fall through to the next alternative (or
complete the regex match), whereas upon a failed match we should
be backtracking into the failing alternative, to give it a chance
to match further (e.g. consider /a??b?|a/.exec("ab") - upon first
attempting to match the first alternative this will match the empty
string - since a?? is non-greedy, however rather than moving on to
the second alternative we should be re-matching the first one, at
which point the non-greedy a?? will match, and as such the result
should be "ab", not "a").
Terminal subpattern matching contains a second bug, too. The frame
location values in the subpattern should be being allocated with
the outer disjunction's frame (as we do for the parentheses-single
optimization). Consider the following three regexes:
/a*(?:b*)*c*/
/a*(?:b*)c*/
/a*(?:b*)*/
Considering only the frame location required by the atoms a,b, and
c, (ignoring space associated with the nested subpattern) the first
regex (a normal subpattern match) requires a frame size of 2 for
the outer disjunction, (to backtrack terms a & c), with each
iteration of the subpattern requiring a frame of size 1 (in order
to backtrack b). In the case of the second regex (where the
parentheses-single optimization will kick in) the outer frame must
be set up with a frame size of 3, since the outer frame will also
be used when running the nested subpattern. We will currently only
allocate a farme of size 1 for the outer disjuntion (to contain a),
howver the frame size should be 2 (since the subpattern will be
evaluated in the outer frame). In addition to failing to allocate
frame space the frame offsets are also presently invalid - in the
case of the last regex b's frame location will be set assuming it
to be the first term in the frame, whereas in this case b lies
after the term a, and should be taking a separate frame location.
In order to correctly allocate the frame for terminal subpattern
matches we must move this optimization back up from the JIT into
the compiler (and thus interpreter too), since this is where the
frame allocation takes place.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
(JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::compileRegex):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
* yarr/RegexPattern.h:
(JSC::Yarr::PatternTerm::PatternTerm):
2010-11-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by Csaba Osztrogonác.
Remove Bakefile build system files
https://bugs.webkit.org/show_bug.cgi?id=49983
r53757 only removed the content, but not the files.
This patch removes that empty files.
* JavaScriptCoreSources.bkl: Removed.
* jscore.bkl: Removed.
2010-11-24 Gabor Loki <loki@webkit.org>
Reviewed by Csaba Osztrogonác.
Merge the usage of jumps and calls at ARM-JIT
https://bugs.webkit.org/show_bug.cgi?id=50008
Those JmpSrc objects which represent jumps (not calls) should point to
after the jump instruction.
* assembler/ARMAssembler.h:
(JSC::ARMAssembler::blx):
(JSC::ARMAssembler::loadBranchTarget):
(JSC::ARMAssembler::getAbsoluteJumpAddress):
(JSC::ARMAssembler::linkJump):
(JSC::ARMAssembler::relinkJump):
(JSC::ARMAssembler::linkCall):
(JSC::ARMAssembler::relinkCall):
(JSC::ARMAssembler::getRelocatedAddress):
(JSC::ARMAssembler::getDifferenceBetweenLabels):
(JSC::ARMAssembler::getCallReturnOffset):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::call):
2010-11-24 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Xan Lopez.
[GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=48625
GLib methods use UTF-8 strings, so we have to convert from UTF-16 to
UTF-8 to perform the case operations and then convert back the result to
UTF-16. GLib conversion methods return a new allocated string, so we
have to memcpy the result into the destination buffer too. Using our
own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h
we don't need such memcpy, since they take an already allocated buffer
rather than returning a new one. There's another optimization for the
case when the destination buffer is not large enough. In that case,
methods should return the expected destination buffer size and are
called again with a new buffer. We can avoid the conversion to UTF-16 by
pre-calculating the required size for the destination buffer.
* wtf/unicode/glib/UnicodeGLib.cpp:
(WTF::Unicode::getUTF16LengthFromUTF8):
(WTF::Unicode::convertCase):
(WTF::Unicode::foldCase):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
2010-11-23 Patrick Gansterer <paroga@webkit.org>
Reviewed by Sam Weinig.
Use WTF::StringHasher directly in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=49893
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::Hash::hash):
* runtime/Identifier.cpp:
(JSC::IdentifierCStringTranslator::hash):
(JSC::IdentifierUCharBufferTranslator::hash):
2010-11-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Sam Weinig.
Add WTF::FixedArray::size()
https://bugs.webkit.org/show_bug.cgi?id=49891
Add a method to get the size of a FixedArray.
* wtf/FixedArray.h:
(WTF::FixedArray::size):
2010-11-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
[WINCE] Set correct preprocessor definitions
https://bugs.webkit.org/show_bug.cgi?id=49887
* wtf/Platform.h:
2010-11-22 Adam Roben <aroben@apple.com>
Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
Apple's Windows build allows placing header files and import libraries for WebKit's
dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
$WebKitLibrariesDir environment variable. This is both required for production builds and
convenient for Apple-internal developer builds. Apple's production builds also require that
WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
builds, the files are copied into that directory tree by the
WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
copying is done by
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
This .vsprops copying is problematic in one very important case: when a developer updates
their source tree and then tries to build. Visual Studio only reads .vsprops files when a
project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
$WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build
will proceed with out-of-date .vsprops files, which will likely result in a build failure.
To fix this, we now use normal relative paths to access the .vsprops files in the source
tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
unset, so the normal relative paths are used to read the .vsprops files out of the source
tree directly. In production builds, this environment variable is set to a fake directory
that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
is resolved.
For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
"$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
FeatureDefines.vsprops becomes:
$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
which resolves to:
$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
(We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
actually exist since they are matched by an equal number of ".." path components.)
Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
updated
Reviewed by Dave Hyatt.
* JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that
production builds can find the .vsprops files.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the
.vsprops files. It isn't needed anymore.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
files.
2010-11-19 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
YARR JIT should fallback to YARR Interpreter instead of PCRE.
https://bugs.webkit.org/show_bug.cgi?id=46719
Remove the ENABLE_YARR macro and the option of matching regular
expressions with PCRE from JavaScriptCore.
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
* tests/mozilla/expected.html:
* wtf/Platform.h:
* yarr/RegexCompiler.cpp:
* yarr/RegexCompiler.h:
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::byteCompileRegex):
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::getFallback):
(JSC::Yarr::RegexCodeBlock::isFallback):
(JSC::Yarr::RegexCodeBlock::setFallback):
(JSC::Yarr::executeRegex):
* yarr/RegexParser.h:
* yarr/RegexPattern.h:
2010-11-20 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
[BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message
https://bugs.webkit.org/show_bug.cgi?id=49520
DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2010-11-20 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Support JIT_OPTIMIZE_MOD on Thumb-2
https://bugs.webkit.org/show_bug.cgi?id=49432
Rewrite the soft modulo operation into macroassembler form, and move it
to JSValue32_64 section.
Add support for soft modulo on Thumb-2 JIT also.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::clz):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::countLeadingZeros32):
(JSC::MacroAssemblerARM::relativeTableJump):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::countLeadingZeros32):
(JSC::MacroAssemblerARMv7::relativeTableJump):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::softModulo):
* jit/JITStubs.cpp:
(JSC::JITThunks::JITThunks):
* wtf/Platform.h:
2010-11-20 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured
Reviewed by Darin Adler.
* JavaScriptCore.exp:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::secure): Added argument that controls whether
the last character is obscured or not. Implemented behavior.
* wtf/text/StringImpl.h:
(WTF::StringImpl::LastCharacterBehavior): Added enum.
(WTF::StringImpl::secure): Updated method signature.
2010-11-19 William Chan <willchan@chromium.org>
Reviewed by David Levin.
Add USE(CHROMIUM_NET)
Indicates the use of Chromium's network stack. Chromium's network
stack performs better when it has full view of all resource requests,
so USE(CHROMIUM_NET) can be used to bypass throttles.
https://bugs.webkit.org/show_bug.cgi?id=49778
* wtf/Platform.h:
2010-11-19 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
https://bugs.webkit.org/show_bug.cgi?id=49819
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-19 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Don't check for constant registers when we can guarantee that the register won't be in the constant pool
https://bugs.webkit.org/show_bug.cgi?id=49814
Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
when we can guarantee that the register is not referring to a constant.
This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
logic correct when we're using a faked callframe (as in the case of the globalExec).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::createActivation):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::thisObject):
* interpreter/CallFrame.h:
(JSC::ExecState::uncheckedR):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBase):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::callEval):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::createExceptionScope):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
2010-11-19 Steve Falkenburg <sfalken@apple.com>
Reviewed by Darin Adler.
Normalize Cairo/CFLite project/solution configuration names
https://bugs.webkit.org/show_bug.cgi?id=49818
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Windows vcproj configuration names should be normalized across projects
https://bugs.webkit.org/show_bug.cgi?id=49776
* JavaScriptCore.vcproj/JavaScriptCore.sln:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added.
* JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
2010-11-19 Patrick Gansterer <paroga@webkit.org>
Unreviewed, build fix after r72360.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
2010-11-18 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Geoff Garen.
Bug 49577 - Function.prototype should be non-configurable
Ooops, Function.prototype should not be enumerable!
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
2010-11-18 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 49708 - Stop recompiling functions to regenerate exception info.
Instead only hold info as necessary – keep divot info is the inspector
is enabled, line number info is debugging or profiling, and handler
info for functions with try/catch.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpStatistics):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::addExpressionInfo):
(JSC::CodeBlock::addLineInfo):
(JSC::CodeBlock::hasExpressionInfo):
(JSC::CodeBlock::hasLineInfo):
(JSC::CodeBlock::needsCallReturnIndices):
(JSC::CodeBlock::callReturnIndexVector):
* bytecode/SamplingTool.cpp:
(JSC::SamplingTool::dump):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNode):
(JSC::BytecodeGenerator::emitNodeInConditionContext):
(JSC::BytecodeGenerator::emitExpressionInfo):
(JSC::BytecodeGenerator::addLineInfo):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
(JSC::Interpreter::retrieveLastCaller):
* interpreter/Interpreter.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JITStubs.cpp:
(JSC::jitThrow):
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Collector.cpp:
(JSC::Heap::markRoots):
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::usingAPI):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::supportsRichSourceInfo):
(JSC::JSGlobalObject::globalData):
2010-11-18 Adam Roben <aroben@apple.com>
Add a script to delete manifest-related files when they are older than
any .vsprops file
Changes to .vsprops files can cause the manifest files to become
invalid, and Visual Studio doesn't always figure out that it needs to
rebuild them.
Reviewed by Sam Weinig.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
Call the new script.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
Added the new script.
* JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added.
(file_modification_times): Generator to return the modification time of
each file in a directory hierarchy.
(main): Get the modification time of the newest vsprops file, then find
all manifest-related files in the obj directory. Delete all
manifest-related files that are older than the newest vsprops file.
2010-11-18 Mark Rowe <mrowe@apple.com>
Rubber-stamped by Adam Roben.
<rdar://problem/8602509&8602717&8602724> Enable compaction support.
* Configurations/JavaScriptCore.xcconfig:
2010-11-18 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 49635 - Profiler implementation is fragile
The profile presently requires the exception handling mechanism to explicitly
remove all stack frames that are exited during the exception unwind mechanism.
This is fragile in a number of ways:
* We have to change bytecode register allocation when compiling code to run
when profiling, to preserve the callee function (this is also required to
call did_call after the call has returned).
* In the JIT we have to maintain additional data structures
(CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
containing the callee.
* In the interpreter we use 'magic values' to offset into the instruction
stream to rediscover the register containing the function.
Instead, move profiling into the head and tail of functions.
* This correctly accounts the cost of the call itself to the caller.
* This allows us to access the callee function object from the callframe.
* This means that at the point a call is made we can track the stack depth
on the ProfileNode.
* When unwinding we can simply report the depth at which the exception is
being handled - all call frames above this level are freed.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::methodCallLinkInfo):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::exceptionUnwind):
(JSC::ProfileGenerator::stopProfiling):
* profiler/ProfileGenerator.h:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::willExecute):
* profiler/ProfileNode.h:
(JSC::ProfileNode::create):
(JSC::ProfileNode::callerCallFrame):
* profiler/Profiler.cpp:
(JSC::dispatchFunctionToProfiles):
(JSC::Profiler::_willExecute):
(JSC::Profiler::_didExecute):
(JSC::Profiler::exceptionUnwind):
* profiler/Profiler.h:
2010-11-18 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Remove leftover Windows Debug_Internal configurations
https://bugs.webkit.org/show_bug.cgi?id=49758
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-18 Chao-ying Fu <fu@mips.com>
Reviewed by Csaba Osztrogonác.
Avoid increasing required alignment of target type warning
https://bugs.webkit.org/show_bug.cgi?id=43963
* runtime/UString.h:
(JSC::UStringHash::equal):
* wtf/StdLibExtras.h:
2010-11-17 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Add stubbed out ScrollAnimator for the Mac
https://bugs.webkit.org/show_bug.cgi?id=49678
* wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no
change in behavior at the moment.
2010-11-17 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
Reviewed by Darin Adler.
Add an explicit overflow check prior to allocating our buffer,
rather than implicitly relying on the guard in convertUTF16ToUTF8.
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r72197.
http://trac.webkit.org/changeset/72197
https://bugs.webkit.org/show_bug.cgi?id=49661
broke fast/regex/test1.html (Requested by stampho on #webkit).
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExpRepresentation::~RegExpRepresentation):
(JSC::RegExp::compile):
(JSC::RegExp::match):
* tests/mozilla/expected.html:
* wtf/Platform.h:
* yarr/RegexCompiler.cpp:
* yarr/RegexCompiler.h:
* yarr/RegexInterpreter.cpp:
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::getFallback):
(JSC::Yarr::RegexCodeBlock::setFallback):
(JSC::Yarr::executeRegex):
* yarr/RegexParser.h:
* yarr/RegexPattern.h:
2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
YARR JIT should fallback to YARR Interpreter instead of PCRE.
https://bugs.webkit.org/show_bug.cgi?id=46719
Remove the ENABLE_YARR macro and the option of matching regular
expressions with PCRE from JavaScriptCore.
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
* tests/mozilla/expected.html:
* wtf/Platform.h:
* yarr/RegexCompiler.cpp:
* yarr/RegexCompiler.h:
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::byteCompileRegex):
* yarr/RegexInterpreter.h:
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
(JSC::Yarr::RegexCodeBlock::getFallback):
(JSC::Yarr::RegexCodeBlock::isFallback):
(JSC::Yarr::RegexCodeBlock::setFallback):
(JSC::Yarr::executeRegex):
* yarr/RegexParser.h:
* yarr/RegexPattern.h:
2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Extend YARR Interpreter with beginning character look-up optimization
https://bugs.webkit.org/show_bug.cgi?id=45751
Add beginning character look-up optimization which sets the start
index to the first possible successful pattern match.
Extend YARR Interpreter with lookupForBeginChars function which
implements the beginning character look-up optimization.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::InputStream::readPair):
(JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
(JSC::Yarr::Interpreter::lookupForBeginChars):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::Interpreter::interpret):
* yarr/RegexInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
2010-11-17 Alexis Menard <alexis.menard@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
[Qt] Add support for use GStreamer with the Qt build
Enable the build/inclusion of the wtf/QObject convenience classes.
* JavaScriptCore.pri:
* wtf/wtf.pri:
2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Collect the beginning characters in a RegExp pattern for look-up
optimization
https://bugs.webkit.org/show_bug.cgi?id=45748
Extend the YARR's parser with an algorithm which collects the potential
beginning characters from a RegExp pattern for later look-up optimization.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::BeginCharHelper::BeginCharHelper):
(JSC::Yarr::BeginCharHelper::addBeginChar):
(JSC::Yarr::BeginCharHelper::merge):
(JSC::Yarr::BeginCharHelper::addCharacter):
(JSC::Yarr::BeginCharHelper::linkHotTerms):
(JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
(JSC::Yarr::RegexPatternConstructor::addBeginTerm):
(JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
(JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
(JSC::Yarr::RegexPatternConstructor::setupBeginChars):
(JSC::Yarr::compileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::TermChain::TermChain):
(JSC::Yarr::BeginChar::BeginChar):
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r72160.
http://trac.webkit.org/changeset/72160
https://bugs.webkit.org/show_bug.cgi?id=49646
Broke lots of fast/profiler tests, among others (Requested by
aroben on #webkit).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::functionRegisterForBytecodeOffset):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addFunctionRegisterInfo):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::profileHookRegister):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::stopProfiling):
* profiler/ProfileGenerator.h:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::willExecute):
* profiler/ProfileNode.h:
(JSC::ProfileNode::create):
(JSC::ProfileNode::operator==):
* profiler/Profiler.cpp:
(JSC::dispatchFunctionToProfiles):
(JSC::Profiler::willExecute):
(JSC::Profiler::didExecute):
* profiler/Profiler.h:
2010-11-16 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 49635 - Profiler implementation is fragile
The profile presently requires the exception handling mechanism to explicitly
remove all stack frames that are exited during the exception unwind mechanism.
This is fragile in a number of ways:
* We have to change bytecode register allocation when compiling code to run
when profiling, to preserve the callee function (this is also required to
call did_call after the call has returned).
* In the JIT we have to maintain additional data structures
(CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
containing the callee.
* In the interpreter we use 'magic values' to offset into the instruction
stream to rediscover the register containing the function.
Instead, move profiling into the head and tail of functions.
* This correctly accounts the cost of the call itself to the caller.
* This allows us to access the callee function object from the callframe.
* This means that at the point a call is made we can track the stack depth
on the ProfileNode.
* When unwinding we can simply report the depth at which the exception is
being handled - all call frames above this level are freed.
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::methodCallLinkInfo):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallVarargs):
(JSC::BytecodeGenerator::emitReturn):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::count):
* bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
* interpreter/Interpreter.cpp:
(JSC::ProfileHostCall::ProfileHostCall):
(JSC::ProfileHostCall::~ProfileHostCall):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_has_called):
(JSC::JIT::emit_op_profile_will_return):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_has_called):
(JSC::JIT::emit_op_profile_will_return):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::exceptionUnwind):
(JSC::ProfileGenerator::stopProfiling):
* profiler/ProfileGenerator.h:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::willExecute):
* profiler/ProfileNode.h:
(JSC::ProfileNode::create):
(JSC::ProfileNode::operator==):
(JSC::ProfileNode::exec):
* profiler/Profiler.cpp:
(JSC::dispatchFunctionToProfiles):
(JSC::Profiler::hasCalled):
(JSC::Profiler::willEvaluate):
(JSC::Profiler::willReturn):
(JSC::Profiler::didEvaluate):
(JSC::Profiler::exceptionUnwind):
* profiler/Profiler.h:
2010-11-16 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben and Steve Falkenburg.
Touch Platform.h to force a rebuild for Windows.
* wtf/Platform.h:
2010-11-16 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
https://bugs.webkit.org/show_bug.cgi?id=49632
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
2010-11-16 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The number of recursive match calls isn't limited in YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=47906
Check the number of the matchDisjunction recursive calls to avoid unbounded
recursion.
Now the matchDisjunction function returns JSRegExpResult instead of bool.
The JSRegExpResult enum contains the result of matching or the error code
of the failure (like HitLimit) which terminates the matching.
The error codes are based on pcre's jsRegExpExecute error codes.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::parenthesesDoBacktrack):
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::Interpreter::matchNonZeroDisjunction):
(JSC::Yarr::Interpreter::interpret):
(JSC::Yarr::Interpreter::Interpreter):
* yarr/RegexInterpreter.h:
2010-11-16 Brian Weinstein <bweinstein@apple.com>
Rest of the Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-11-16 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 1.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-11-16 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=49606
The bug here is that we read the prototype from the RHS argument using a regular
op_get_by_id before op_instanceof has checked that this is an object implementing
HasInstance. This incorrect behaviour gives rise to further unnecessary complexity
in the code base, since we have additional logic (implemented using the
GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors
from the get_by_id into invalid parameter errors. Having fixed this bug this code
is all redundant, since in these cases the get_by_id will never have been reached.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addExpressionInfo):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCheckHasInstance):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::InstanceOfNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_check_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_check_has_instance):
(JSC::JIT::emitSlow_op_instanceof):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_check_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_check_has_instance):
(JSC::JIT::emitSlow_op_instanceof):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* runtime/ExceptionHelpers.cpp:
(JSC::createInterruptedExecutionException):
(JSC::createTerminatedExecutionException):
(JSC::createUndefinedVariableError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
* runtime/ExceptionHelpers.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::toPrimitive):
(JSC::JSNotAnObject::getPrimitiveNumber):
(JSC::JSNotAnObject::toBoolean):
(JSC::JSNotAnObject::toNumber):
(JSC::JSNotAnObject::toString):
(JSC::JSNotAnObject::toObject):
(JSC::JSNotAnObject::getOwnPropertySlot):
(JSC::JSNotAnObject::getOwnPropertyDescriptor):
(JSC::JSNotAnObject::put):
(JSC::JSNotAnObject::deleteProperty):
(JSC::JSNotAnObject::getOwnPropertyNames):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::JSNotAnObject):
* runtime/JSObject.h:
(JSC::JSObject::isActivationObject):
* runtime/JSValue.cpp:
(JSC::JSValue::toObjectSlowCase):
(JSC::JSValue::synthesizeObject):
(JSC::JSValue::synthesizePrototype):
2010-11-15 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Harden additional string functions against large lengths
https://bugs.webkit.org/show_bug.cgi?id=49574
* wtf/text/CString.cpp:
(WTF::CString::init): Check for length that is too large for CString.
(WTF::CString::newUninitialized): Ditto.
(WTF::CString::copyBufferIfNeeded): Fix types so the length stays
in a size_t.
* wtf/text/WTFString.cpp:
(WTF::String::append): Check for length that is too large.
2010-11-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 49577 - Function.prototype should be non-configurable
JSC lazily allocates the prototype property of Function objects.
We check the prototype exists on 'get', but not on 'put'.
If you 'put' without having first done a 'get' you can end up with a configurable
prototype (prototype should only ever be non-configurable).
This is visible in a couple of ways:
* 'delete' on the property may succeed. (the next access will result in a new,
reset prototype object).
* the prototype may be set to a getter.
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertyNames):
Reify the prototype property before allowing an enumerate including don't enum properties.
(JSC::JSFunction::put):
Reify the prototype property before any put to it.
2010-11-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException
Three types of source location information are added to errors.
(1) Divot information.
This was added with the intention of using it to provide better source highlighting in the inspector.
We may still want to do so, but we probably should not be exposing these values in a manner visible to
user scripts – only through an internal C++ interface. The code adding divot properties to objects has
been removed.
(2) Line number information.
Line number information is presently sometimes added at the point the exception is created, and sometimes
added at the point the exception passes through throwException. Change this so that throwException has
the sole responsibility for adding line number and source file information.
(3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`).
These messages are currently created at the point the exceptions is raised. Instead reformat the message
such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.`
becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at
the in throw Exception. This presents a number of advantages:
* we no longer need to have source location information to create these TypeErrors.
* we can chose to append source location information in other error messages, including those where
passing source location to the point of construction would be inconvenient.
* we can chose in future to omit to append source location information when running in a non-debug mode.
This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output,
removing double periods (..) at end of lines, and adding slightly more context to some errors.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
- Separated called to access line and range information.
* bytecode/CodeBlock.h:
- Separated called to access line and range information.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::isInvalidParamForIn):
(JSC::isInvalidParamForInstanceOf):
- Update parameters passed to error constructors.
(JSC::appendSourceToError):
- Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers)
(JSC::Interpreter::throwException):
- Updated to call appendSourceToError.
(JSC::Interpreter::privateExecute):
- Update parameters passed to error constructors.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
- Update parameters passed to error constructors.
* runtime/Error.cpp:
(JSC::addErrorInfo):
(JSC::hasErrorInfo):
- Removed divot properties.
* runtime/Error.h:
- Removed divot properties.
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
- Initialize new property.
* runtime/ErrorInstance.h:
(JSC::ErrorInstance::appendSourceToMessage):
(JSC::ErrorInstance::setAppendSourceToMessage):
(JSC::ErrorInstance::clearAppendSourceToMessage):
- Added flag to check for errors needing location information appending.
(JSC::ErrorInstance::isErrorInstance):
- Added virtual method to check for ErrorInstances.
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
(JSC::createInvalidParamError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
- Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages.
* runtime/ExceptionHelpers.h:
- Updated function signatures.
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
- Update parameters passed to error constructors.
* runtime/JSObject.h:
(JSC::JSObject::isErrorInstance):
- Added virtual method to check for ErrorInstances.
2010-11-12 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
CString(const char*) crashes when passed a null pointer
https://bugs.webkit.org/show_bug.cgi?id=49450
* wtf/text/CString.cpp:
(WTF::CString::CString):
Return early if str is null.
2010-11-11 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 49420 - Clean up syntax/reference error throw.
Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair.
This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data
attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around
this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised.
We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an
Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false.
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitThrowReferenceError):
(JSC::BytecodeGenerator::emitThrowSyntaxError):
(JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNodeInConditionContext):
* bytecompiler/NodesCodegen.cpp:
(JSC::ThrowableExpressionData::emitThrowReferenceError):
(JSC::ThrowableExpressionData::emitThrowSyntaxError):
(JSC::RegExpNode::emitBytecode):
(JSC::PostfixErrorNode::emitBytecode):
(JSC::PrefixErrorNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_throw_reference_error):
(JSC::JIT::emit_op_throw_syntax_error):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_throw_reference_error):
(JSC::JIT::emit_op_throw_syntax_error):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* parser/Nodes.h:
2010-11-11 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Harden some string functions against large lengths
https://bugs.webkit.org/show_bug.cgi?id=49293
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for
strlen results that are too large for StringImpl.
(WTF::StringImpl::lower): Check for lengths that are too large for
int32_t.
(WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for
lengths that are too large for int32_t.
(WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned
rather than int and int32_t so we can handle any length.
(WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for
lengths that are too large for int32_t.
(WTF::StringImpl::find): Check for strlen results that are too large for
StringImpl.
(WTF::StringImpl::findIgnoringCase): Ditto.
(WTF::StringImpl::replace): Fix incorrect use of PassRefPtr.
(WTF::StringImpl::createWithTerminatingNullCharacter): Check before
incrementing length.
2010-11-11 Dan Horák <dan@danny.cz>
Reviewed by Andreas Kling.
Add support for the s390/s390x architectures, it's big-endian
with s390 being 32-bit and s390x being 64-bit.
https://bugs.webkit.org/show_bug.cgi?id=34786
* wtf/Platform.h:
2010-11-10 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by David Hyatt.
HTML5 Ruby support should be mandatory feature
https://bugs.webkit.org/show_bug.cgi?id=49272
Remove Ruby as optional feature.
* Configurations/FeatureDefines.xcconfig:
* JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows.
2010-11-10 Peter Rybin <peter.rybin@gmail.com>
Reviewed by Adam Barth.
HTML parser should provide script column position within HTML document to JavaScript engine
https://bugs.webkit.org/show_bug.cgi?id=45271
Adds TextPosition* classes -- a structure that stores line/column/generation
level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
wrappers that emphasize whether int number is used as zero-based or
one-based.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Added.
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):
(WTF::ZeroBasedNumber::fromZeroBasedInt):
(WTF::ZeroBasedNumber::ZeroBasedNumber):
(WTF::ZeroBasedNumber::zeroBasedInt):
(WTF::ZeroBasedNumber::base):
(WTF::ZeroBasedNumber::belowBase):
(WTF::OneBasedNumber::fromOneBasedInt):
(WTF::OneBasedNumber::OneBasedNumber):
(WTF::OneBasedNumber::oneBasedInt):
(WTF::OneBasedNumber::convertAsZeroBasedInt):
(WTF::OneBasedNumber::convertToZeroBased):
(WTF::OneBasedNumber::base):
(WTF::OneBasedNumber::belowBase):
(WTF::toZeroBasedTextPosition):
(WTF::toOneBasedTextPosition):
(WTF::ZeroBasedNumber::convertToOneBased):
2010-11-09 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
ARM JIT asserts when loading http://reader.google.com in debug mode
https://bugs.webkit.org/show_bug.cgi?id=48912
There are several cases when the uninterrupted sequence is larger than
maximum required offset for pathing the same sequence. Eg.: if in a
uninterrupted sequence the last macroassembler's instruction is a stub
call, it emits store instruction(s) which should not be included in the
calculation of length of uninterrupted sequence. So, the insnSpace and
constSpace should be upper limit instead of hard limit.
* jit/JIT.h:
* jit/JITInlineMethods.h:
(JSC::JIT::endUninterruptedSequence):
2010-11-09 David Kilzer <ddkilzer@apple.com>
<http://webkit.org/b/49279> Fix include statements for local headers
Reviewed by Gavin Barraclough.
Use "Foo.h" instead of <Foo.h> for local headers.
* assembler/AbstractMacroAssembler.h: Also fixed sort order.
* assembler/CodeLocation.h:
* yarr/RegexJIT.h:
* yarr/RegexParser.h:
2010-11-08 Adam Roben <aroben@apple.com>
Roll out r71532
It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default
.bashrc unsets %TEMP%, which broke copy-tools.cmd.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed.
* JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed.
2010-11-08 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
>=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la'
https://bugs.webkit.org/show_bug.cgi?id=49128
r59042 introduced a C++-style comment in Platform.h, which is often
included in C source files. Change it to a C-style comment.
* wtf/Platform.h: Fix the C++-style comment.
2010-11-08 Adam Roben <aroben@apple.com>
Show a message and cause the build to immediately fail when any
.vsprops files are copied
When $WebKitLibrariesDir is set to a non-standard location, the
.vsprops files have to be copied from WebKitLibraries/win to
$WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up
changes to the .vsprops files until the next time it opens the solution
file. Before this patch, the build would soldier on with the old
.vsprops files, leading to strange build failures. Now we detect that
the .vsprops files have been updated, display a message to the user
telling them what to do, and make the build fail immediately.
Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when
.vsprops files are updated
Reviewed by Steve Falkenburg.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
Moved code to copy the tools directory to the new copy-tools.cmd
script. Moved that after the command that writes the buildfailed file
so the build will be considered a failure if copy-tools.cmd fails.
Changed to write the project name into buildfailed like all our other
projects do, so those other projects will know that the failure was due
to this project.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
Added new scripts.
* JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies
the tools directory to $WebKitLibrariesDir. If any files were copied,
we display a message to the user and exit with error code 1 to cause
the build to fail. In non-interactive builds, we just print the message
to the build log. In interactive builds, we show the message in an
alert.
* JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses
Windows Scripting Host to display a message in an alert.
2010-11-07 Sam Magnuson <smagnuson@netflix.com>
Reviewed by Andreas Kling.
[Qt] make install does not cause JavaScriptCore to be built
https://bugs.webkit.org/show_bug.cgi?id=49114
* JavaScriptCore.pro:
2010-11-05 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Website consistently crashing TOT in JIT::execute() on news.com.au
https://bugs.webkit.org/show_bug.cgi?id=48954
The problem here was the strict pass of this conversion was loading the
this structure into one register but doing the flags check off a different
register. This is clearly wrong. I have been unable to trigger the crash
with a reduction, but I've added an assertion to the this conversion to
attempt to make it more readily catchable in future.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_convert_this_strict):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_convert_this_strict):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-11-04 Xan Lopez <xlopez@igalia.com>
Reviewed by Adam Barth.
Use leakRef instead of releaseRef
https://bugs.webkit.org/show_bug.cgi?id=48974
Use leakRef instead of the deprecated releaseRef. This was renamed
some time ago because 'releaseRef' is too close to 'release',
which does something completely different.
2010-11-04 Eric Seidel <eric@webkit.org>
Reviewed by Gavin Barraclough.
REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
https://bugs.webkit.org/show_bug.cgi?id=48789
The contract for all String/AtomicString methods seems to be that it's
safe to call them, even when the String is null (impl() returns 0).
This contract was broken by r49798 (unintentionally) when optimizing
for dromeo.
This patch adds a null check to AtomicString::lower() fixing this
crash and preventing future confusion.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::lower):
2010-11-04 Adam Barth <abarth@webkit.org>
Enabled ICCJPEG on Chromium Mac
https://bugs.webkit.org/show_bug.cgi?id=48977
* wtf/Platform.h:
2010-11-03 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Crash in Function.prototype.call.apply
https://bugs.webkit.org/show_bug.cgi?id=48485
The problem here was op_load_varargs failing to ensure that
there was sufficient space for the entire callframe prior to
op_call_varargs. This meant that when we then re-entered the
VM it was possible to stomp over an earlier portion of the
stack, so causing sub-optimal behaviour.
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoadVarargs):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_load_varargs):
2010-11-03 Kenneth Russell <kbr@google.com>
Reviewed by Chris Marrin.
Redesign extension mechanism in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=46894
* JavaScriptCore.exp:
- Exposed String::split(const String&, Vector<String>).
2010-11-03 Adam Roben <aroben@apple.com>
Bring WTF.vcproj up to date
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
unicode directories, added new files, removed old files.
2010-11-03 Gabor Loki <loki@webkit.org>
Reviewed by Andreas Kling.
Remove unused initializeWeakRandomNumberGenerator
https://bugs.webkit.org/show_bug.cgi?id=48899
WeakRandom class is used instead of weakRandomNumber and its initializer.
* wtf/RandomNumberSeed.h:
2010-11-03 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Unused class: JSFastMath with JSValue64
https://bugs.webkit.org/show_bug.cgi?id=48835
Remove unused JSFastMath class.
* runtime/JSImmediate.h:
2010-11-02 Adam Roben <aroben@apple.com>
Windows build fix after r71127
MSVC isn't smart enough to figure out that the definition of the global
nullptr variable isn't needed, so we provide one for it.
Fixes <http://webkit.org/b/48862> Windows build is broken due to
undefined symbol nullptr
Reviewed by Anders Carlsson.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
resort the files.
* wtf/NullPtr.cpp: Added.
2010-11-02 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
https://bugs.webkit.org/show_bug.cgi?id=48841
Remove special handling of HashTableDeletedValue in PlatformRefPtr.
This is better handled on a case-by-case basis, when HashTraits
cannot account for it.
* wtf/PlatformRefPtr.h:
(WTF::PlatformRefPtr::~PlatformRefPtr):
(WTF::PlatformRefPtr::clear):
(WTF::::operator):
2010-10-29 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute
https://bugs.webkit.org/show_bug.cgi?id=47573
I think the interpreter portion of this was introduced by
an incorrect but silent merge when I updated prior to committing.
The JIT change is basically just a correctness fix, but it is
needed to prevent the testcase from asserting in debug builds.
The basic problem is incorrectly setting the activation object
on an arguments object. The crash was due to us setting a null
activation in the interpreter, in the jit we were setting the
activation of a strict mode arguments object.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* wtf/Platform.h:
2010-10-29 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Adam Roben and David Kilzer.
Fix and cleanup of build systems
https://bugs.webkit.org/show_bug.cgi?id=48342
* Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API
2010-10-28 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Include stddef.h unconditionally in Assertions.h
https://bugs.webkit.org/show_bug.cgi?id=48573
There is no reason to have stddef.h include be MSVC-only.
* wtf/Assertions.h:
2010-10-28 Herczeg Zoltan <zherczeg@webkit.org>
Rubber stamped by Csaba Osztrogonác.
Try to fix interpreter build.
Needed parentheses around assignment to avoid GCC warning after
http://trac.webkit.org/changeset/70703
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-28 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
resetAssertionMatches() is an unused function in YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=48503
The resetAssertionMatches() function is removed from YARR Interpreter
because it's never called.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::resetMatches):
2010-10-28 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Andreas Kling.
Wrong instruction form for BKPT
https://bugs.webkit.org/show_bug.cgi?id=48427
One '0' is missing from BKPT instruction.
Thanks for Jacob Bramley for reporting this error.
* assembler/ARMAssembler.h:
2010-10-28 Xan Lopez <xlopez@igalia.com>
Try to fix Snow Leopard build.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::testPrototype):
2010-10-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Oliver Hunt.
Do not have two different asCell APIs in JSValue
https://bugs.webkit.org/show_bug.cgi?id=47979
Remove JSCell* asCell(JSValue) in favor of only using
JSValue::asCell().
* API/APICast.h:
(toRef):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::testPrototype):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* runtime/GetterSetter.h:
(JSC::asGetterSetter):
* runtime/JSByteArray.h:
(JSC::asByteArray):
* runtime/JSCell.h:
(JSC::JSCell::getCallData):
(JSC::JSCell::getConstructData):
* runtime/JSString.h:
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::asString):
* runtime/JSValue.h:
* runtime/Operations.cpp:
(JSC::jsIsObjectType):
* runtime/Operations.h:
(JSC::normalizePrototypeChain):
* runtime/Protect.h:
(JSC::gcProtect):
(JSC::gcUnprotect):
2010-10-27 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Support emit_op_mod() for MIPS on JSVALUE32_64
https://bugs.webkit.org/show_bug.cgi?id=46511
This patch uses MIPS div instructions for op_mod to improve performance.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
2010-10-27 Brent Fulgham <bfulgham@webkit.org>
Unreviewed build correction.
* wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is
turned off in the WinCairo port. This isn't supported (yet.)
2010-10-27 Chris Rogers <crogers@google.com>
Reviewed by Chris Marrin.
Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
https://bugs.webkit.org/show_bug.cgi?id=48279
* Configurations/FeatureDefines.xcconfig:
2010-10-27 Brian Weinstein <bweinstein@apple.com>
Windows build fix.
* jit/JITStubs.cpp:
(JSC::jitThrow):
2010-10-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 48365 - Remove output parameters from JITStackFrame
The JIT stub functions presently use the stackframe to provide a couple of additional return values.
* In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
* In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.
Change exception returns such that exceptions are always returned on JSGlobalData::exception.
Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.
* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CachedCall.h:
(JSC::CachedCall::CachedCall):
(JSC::CachedCall::call):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval):
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
* interpreter/Interpreter.h:
* jit/JITCode.h:
(JSC::JITCode::execute):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_catch):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_catch):
* jit/JITStubs.cpp:
(JSC::ctiTrampoline):
(JSC::jitThrow):
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
* runtime/CallData.cpp:
(JSC::call):
* runtime/Completion.cpp:
(JSC::evaluate):
* runtime/ConstructData.cpp:
(JSC::construct):
* runtime/ExceptionHelpers.cpp:
(JSC::createErrorForInvalidGlobalAssignment):
(JSC::throwOutOfMemoryError):
(JSC::throwStackOverflowError):
* runtime/ExceptionHelpers.h:
* runtime/JSArray.cpp:
(JSC::JSArray::sort):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
2010-10-27 Gabor Loki <loki@webkit.org>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=48060
Speed up op_jeq_null and op_jneq_null.
For both opcodes the NullTag and UndefinedTag are checked to control the
jump. These values can be simply checked by AboveOrEqual or Below
condition if they are the two highest unsigned integers from JSValue's
Tag field.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
* runtime/JSValue.h:
2010-10-25 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=41948
REGRESSION(r60392): Registerfile can be unwound too far following an exception
SunSpider reports no change.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException): Walk the stack to calculate the high
water mark currently in use. It's not safe to assume that the current
CallFrame's high water mark is the highest high water mark because
calls do not always set up at the end of a CallFrame. A large caller
CallFrame can encompass a small callee CallFrame.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
in the CallFrame of a host call, like the Interpreter does, instead of
leaving the CodeBlock field uninitialized. The backtracing code requires
a valid CodeBlock field in each CallFrame.
2010-10-27 Gabor Loki <loki@webkit.org>
Reviewed by Csaba Osztrogonác.
Add cmn to branch32(reg, imm) on ARM
https://bugs.webkit.org/show_bug.cgi?id=48062
The conditional comparison can be done with cmn if the imm value is
negative and can fit into the cmn instruction.
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::branch32):
2010-10-26 Oliver Hunt <oliver@apple.com>
Interpreter build fix.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-25 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove exec and globalData arguments from jsNumber
https://bugs.webkit.org/show_bug.cgi?id=48270
Remove the now unused exec and globalData arguments from jsNumber
and mechanically update all users of jsNumber.
* API/JSValueRef.cpp:
(JSValueMakeNumber):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoad):
* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayNode::emitBytecode):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(functionRun):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
* runtime/CachedTranscendentalFunction.h:
(JSC::CachedTranscendentalFunction::operator()):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
* runtime/Error.cpp:
(JSC::addErrorSourceInfo):
(JSC::addErrorDivotInfo):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::getIndex):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::getOwnPropertyDescriptor):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
* runtime/JSNumberCell.h:
(JSC::JSValue::JSValue):
(JSC::jsNaN):
(JSC::JSValue::toJSNumber):
* runtime/JSONObject.cpp:
(JSC::unwrapBoxedPrimitive):
(JSC::PropertyNameForFunctionCall::value):
(JSC::JSONStringify):
* runtime/JSString.cpp:
(JSC::JSString::getStringPropertyDescriptor):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/JSValue.h:
(JSC::jsDoubleNumber):
(JSC::jsNumber):
(JSC::jsNaN):
(JSC::JSValue::JSValue):
(JSC::JSValue::toJSNumber):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::parse):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
(JSC::numberConstructorNaNValue):
(JSC::numberConstructorNegInfinity):
(JSC::numberConstructorPosInfinity):
(JSC::numberConstructorMaxValue):
(JSC::numberConstructorMinValue):
(JSC::constructWithNumberConstructor):
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
* runtime/Operations.cpp:
(JSC::jsAddSlowCase):
* runtime/Operations.h:
(JSC::jsAdd):
* runtime/PrototypeFunction.cpp:
(JSC::PrototypeFunction::PrototypeFunction):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
(JSC::RegExpMatchesArray::fillArrayInstance):
* runtime/RegExpObject.cpp:
(JSC::regExpObjectLastIndex):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncLocaleCompare):
2010-10-25 David Tapuska <dtapuska@rim.com>
Reviewed by David Kilzer.
Enable VFP if our compiler settings indicated we had a hardware
VFP.
https://bugs.webkit.org/show_bug.cgi?id=46096
* assembler/MacroAssemblerARM.cpp:
(JSC::isVFPPresent):
2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r70451.
http://trac.webkit.org/changeset/70451
https://bugs.webkit.org/show_bug.cgi?id=48249
Broke set-unloaded-frame-location.html under Qt (Requested by
caseq on #webkit).
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Removed.
2010-10-25 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Replace _countof with WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=48229
* wtf/Platform.h:
2010-10-25 Peter Rybin <peter.rybin@gmail.com>
Reviewed by Adam Barth.
HTML parser should provide script column position within HTML document to JavaScript engine
https://bugs.webkit.org/show_bug.cgi?id=45271
Adds TextPosition* classes -- a structure that stores line/column/generation
level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
wrappers that emphasize whether int number is used as zero-based or
one-based.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Added.
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):
(WTF::ZeroBasedNumber::fromZeroBasedInt):
(WTF::ZeroBasedNumber::ZeroBasedNumber):
(WTF::ZeroBasedNumber::zeroBasedInt):
(WTF::ZeroBasedNumber::base):
(WTF::ZeroBasedNumber::belowBase):
(WTF::OneBasedNumber::fromOneBasedInt):
(WTF::OneBasedNumber::OneBasedNumber):
(WTF::OneBasedNumber::oneBasedInt):
(WTF::OneBasedNumber::convertAsZeroBasedInt):
(WTF::OneBasedNumber::convertToZeroBased):
(WTF::OneBasedNumber::base):
(WTF::OneBasedNumber::belowBase):
(WTF::toZeroBasedTextPosition):
(WTF::toOneBasedTextPosition):
(WTF::ZeroBasedNumber::convertToOneBased):
2010-10-24 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
Check endianness with __BIG_ENDIAN in RVCT.
https://bugs.webkit.org/show_bug.cgi?id=46122
RVCT defines __BIG_ENDIAN if compiling for a big-endian target.
* wtf/Platform.h:
2010-10-24 Dan Bernstein <mitz@apple.com>
Rubber-stamped by Dave Kilzer.
Removed empty directories.
* JavaScriptCore: Removed.
* JavaScriptCore/runtime: Removed.
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Unreviewed, fix typo of last build fix.
* wtf/DateMath.cpp:
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix for chromium.
* wtf/DateMath.cpp: Added missing include.
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Add WTF_ARRAY_LENGTH macro to WTF
https://bugs.webkit.org/show_bug.cgi?id=32828
Unify the different implementations and usages.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::toJSON):
(JSC::Stringifier::appendStringifiedValue):
* runtime/UString.cpp:
(JSC::UString::number):
* wtf/DateMath.cpp:
(WTF::parseDateFromNullTerminatedCharacters):
* wtf/StdLibExtras.h:
2010-10-24 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
Filter example Chiseled from SVG Wow! is slow
https://bugs.webkit.org/show_bug.cgi?id=48174
Added 'using WTF::ByteArray;' at the end of ByteArray.h
* wtf/ByteArray.h:
2010-10-24 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Inline WTF::bitwise_cast and fix style
https://bugs.webkit.org/show_bug.cgi?id=48208
* wtf/StdLibExtras.h:
(WTF::bitwise_cast):
(WTF::bitCount):
2010-10-23 Xan Lopez <xlopez@igalia.com>
Reviewed by Sam Weinig.
Unify globalData APIs
https://bugs.webkit.org/show_bug.cgi?id=47969
Make JSGlobalObject::globalData return a reference and adapt
callers. This unifies the API with the existing
CallFrame::globalData, which also returns a reference.
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
* jsc.cpp:
(runWithScripts):
* parser/JSParser.cpp:
(JSC::jsParse):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
* runtime/Error.cpp:
(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::markChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::globalData):
2010-10-23 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, rolling out r70369.
http://trac.webkit.org/changeset/70369
https://bugs.webkit.org/show_bug.cgi?id=47974
Caused weird artifacts in expected results.
* wtf/Platform.h:
2010-10-23 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
Crashes randomly in cairo_scaled_font_destroy
https://bugs.webkit.org/show_bug.cgi?id=46794
Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr
goes away this should probably be handled in the future via some special
hooks in RefCounted (or its contained type).
* wtf/PlatformRefPtr.h:
(WTF::PlatformRefPtr::~PlatformRefPtr):
(WTF::PlatformRefPtr::clear):
(WTF::::operator):
2010-10-22 Adam Roben <aroben@apple.com>
Remove the QuartzCorePresent.h mechanism
This header was used to detect whether QuartzCore headers were present
on the system. Everyone should have these headers now so we no longer
need to detect.
Reviewed by Sam Weinig.
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove
code to generate QuartzCorePresent.h.
* wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and
collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef.
2010-10-22 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r70290.
http://trac.webkit.org/changeset/70290
https://bugs.webkit.org/show_bug.cgi?id=48111
Undelete Android build files.
* Android.mk: Added.
2010-10-22 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Csaba Osztrogonác.
JSC interpreter regressions after r69940
https://bugs.webkit.org/show_bug.cgi?id=47839
Wrong "if": It should test whether the result exists,
and not the opposite. It is an interpreter bug, hence
the bots does not capture it.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveBase):
2010-10-21 Adam Barth <abarth@webkit.org>
Reviewed by David Levin.
Remove Android build system
https://bugs.webkit.org/show_bug.cgi?id=48111
* Android.mk: Removed.
2010-10-21 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Add a String constructor which takes AECHAR*
https://bugs.webkit.org/show_bug.cgi?id=45043
Add String(const AECHAR*) constructor for convenience.
* wtf/text/WTFString.h:
2010-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed by Martin Robinson.
[GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
https://bugs.webkit.org/show_bug.cgi?id=47896
* wtf/gobject/GTypedefs.h:
2010-10-21 Adam Barth <abarth@webkit.org>
Unreviewed, rolling out r70174.
http://trac.webkit.org/changeset/70174
https://bugs.webkit.org/show_bug.cgi?id=41948
This patch reverts a change that causes
http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
2010-10-20 Simon Fraser <simon.fraser@apple.com>
Fix the EFL build.
* wtf/CMakeLists.txt:
2010-10-20 Simon Fraser <simon.fraser@apple.com>
Fix Windows build: export needed symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-19 Simon Fraser <simon.fraser@apple.com>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=47851
Add methods to DecimalNumber to return the buffer length
required for decimal and exponential output.
Make some of the DecimalNumber code non-inline (no
effect on Sunspider), adding DecimalNumber.cpp to various
build systems.
Make some DecimalNumber methods 'const'.
* Android.mk:
* Android.v8.wtf.mk:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
* wtf/DecimalNumber.cpp: Added.
(WTF::DecimalNumber::bufferLengthForStringDecimal):
(WTF::DecimalNumber::bufferLengthForStringExponential):
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::sign):
(WTF::DecimalNumber::exponent):
(WTF::DecimalNumber::significand):
(WTF::DecimalNumber::precision):
* wtf/dtoa.cpp:
(WTF::dtoa):
* wtf/dtoa.h:
* wtf/wtf.pri:
2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r70165.
http://trac.webkit.org/changeset/70165
https://bugs.webkit.org/show_bug.cgi?id=48007
It broke tests on Qt bot (Requested by Ossy on #webkit).
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Removed.
2010-10-20 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-10-20 Dumitru Daniliuc <dumi@chromium.org>
Unreviewed, fixing the Win build.
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
2010-10-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=41948
REGRESSION(r60392): Registerfile can be unwound too far following an exception
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException): Walk the stack to calculate the high
water mark currently in use. It's not safe to assume that the current
CallFrame's high water mark is the highest high water mark because
calls do not always set up at the end of a CallFrame. A large caller
CallFrame can encompass a small callee CallFrame.
2010-10-20 Peter Rybin <peter.rybin@gmail.com>
Reviewed by Adam Barth.
HTML parser should provide script column position within HTML document to JavaScript engine
https://bugs.webkit.org/show_bug.cgi?id=45271
Adds TextPosition* classes -- a structure that stores line/column/generation
level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
wrappers that emphasize whether int number is used as zero-based or
one-based.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/TextPosition.h: Added.
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):
(WTF::ZeroBasedNumber::fromZeroBasedInt):
(WTF::ZeroBasedNumber::ZeroBasedNumber):
(WTF::ZeroBasedNumber::zeroBasedInt):
(WTF::ZeroBasedNumber::base):
(WTF::ZeroBasedNumber::belowBase):
(WTF::OneBasedNumber::fromOneBasedInt):
(WTF::OneBasedNumber::OneBasedNumber):
(WTF::OneBasedNumber::oneBasedInt):
(WTF::OneBasedNumber::convertAsZeroBasedInt):
(WTF::OneBasedNumber::convertToZeroBased):
(WTF::OneBasedNumber::base):
(WTF::OneBasedNumber::belowBase):
(WTF::toZeroBasedTextPosition):
(WTF::toOneBasedTextPosition):
(WTF::ZeroBasedNumber::convertToOneBased):
2010-10-19 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
[BREWMP] Turn off JIT for simulator build
https://bugs.webkit.org/show_bug.cgi?id=47937
We don't need to test x86 JIT.
* wtf/Platform.h:
2010-10-19 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Remove support for JSVALUE32 from JSC
https://bugs.webkit.org/show_bug.cgi?id=47948
Remove all the code for supporting JSVALUE32 from JSC.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emitSlow_op_lshift):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emitSlow_op_rshift):
(JSC::JIT::emit_op_urshift):
(JSC::JIT::emitSlow_op_urshift):
(JSC::JIT::emit_op_jnless):
(JSC::JIT::emitSlow_op_jnless):
(JSC::JIT::emit_op_jless):
(JSC::JIT::emitSlow_op_jless):
(JSC::JIT::emit_op_jlesseq):
(JSC::JIT::emitSlow_op_jlesseq):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emit_op_post_inc):
(JSC::JIT::emit_op_post_dec):
(JSC::JIT::emit_op_pre_inc):
(JSC::JIT::emit_op_pre_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
* jit/JITCall.cpp:
* jit/JITInlineMethods.h:
(JSC::JIT::emitGetFromCallFrameHeaderPtr):
(JSC::JIT::emitGetFromCallFrameHeader32):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_loop_if_lesseq):
(JSC::JIT::emit_op_bitnot):
(JSC::JIT::emit_op_next_pname):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
* jit/JITStubs.h:
* jit/JSInterfaceJIT.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::returnDouble):
(JSC::SpecializedThunkJIT::tagReturnAsInt32):
* jit/ThunkGenerators.cpp:
(JSC::sqrtThunkGenerator):
(JSC::powThunkGenerator):
* runtime/Collector.cpp:
(JSC::isPossibleCell):
(JSC::typeName):
* runtime/JSCell.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.h:
(JSC::Structure::prototypeForLookup):
* runtime/JSImmediate.h:
(JSC::reinterpretIntptrToDouble):
(JSC::JSImmediate::isIntegerNumber):
(JSC::JSImmediate::isDouble):
(JSC::JSImmediate::areBothImmediateIntegerNumbers):
(JSC::JSImmediate::makeDouble):
(JSC::JSImmediate::doubleValue):
(JSC::JSImmediate::toBoolean):
(JSC::JSImmediate::fromNumberOutsideIntegerRange):
(JSC::JSImmediate::from):
(JSC::JSImmediate::toDouble):
(JSC::JSFastMath::rightShiftImmediateNumbers):
* runtime/JSNumberCell.cpp:
* runtime/JSNumberCell.h:
* runtime/JSObject.h:
(JSC::JSObject::JSObject):
* runtime/JSValue.h:
* runtime/NumberObject.h:
* wtf/Platform.h:
2010-10-19 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Geoffrey Garen.
BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors
https://bugs.webkit.org/show_bug.cgi?id=47920
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization.
2010-10-19 Kwang Yul Seo <skyul@company100.net>
Reviewed by David Kilzer.
RVCT fails to compile DateMath.cpp due to overloaded function pow
https://bugs.webkit.org/show_bug.cgi?id=47844
Choose std::pow(double, double) among multiple overloaded pow functions
to fix build for RVCT.
* wtf/DateMath.cpp:
(WTF::parseES5DateFromNullTerminatedCharacters):
2010-10-19 Patrick Gansterer <paroga@webkit.org>
Reviewed by David Kilzer.
Use UChar instead of wchar_t in UnicodeWinCE
https://bugs.webkit.org/show_bug.cgi?id=47904
Make UnicodeWinCE more portable, so we can use it for other ports too.
* wtf/unicode/wince/UnicodeWinCE.cpp:
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isSpace):
(WTF::Unicode::isLetter):
(WTF::Unicode::isUpper):
(WTF::Unicode::isLower):
(WTF::Unicode::isDigit):
(WTF::Unicode::isPunct):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::digitValue):
* wtf/unicode/wince/UnicodeWinCE.h:
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isHighSurrogate):
(WTF::Unicode::isLowSurrogate):
(WTF::Unicode::umemcasecmp):
(WTF::Unicode::surrogateToUcs4):
2010-10-19 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
Fix style of UnicodeWinCE
https://bugs.webkit.org/show_bug.cgi?id=47818
* wtf/unicode/wince/UnicodeWinCE.cpp:
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
* wtf/unicode/wince/UnicodeWinCE.h:
2010-10-18 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
* GNUmakefile.am: add missing file.
2010-10-18 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: Functions created with the function constructor don't implement strict mode semantics
https://bugs.webkit.org/show_bug.cgi?id=47860
When creating the FunctionExecutable for a new function the function constructor
was always passing false for whether or not a function was strict, rather than
using the information from the freshly parsed function itself.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::fromGlobalCode):
2010-10-18 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
Strict mode: |this| should be undefined if it is not explicitly provided
https://bugs.webkit.org/show_bug.cgi?id=47833
To make strict mode behave correctly we want to pass undefined instead of null
as the default this value. This has no impact on behaviour outside of strict
mode as both values are replaced with the global object if necessary.
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
2010-10-18 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
Make a nullptr that works with OwnPtr and RefPtr
https://bugs.webkit.org/show_bug.cgi?id=47756
* JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h.
* wtf/NullPtr.h: Added.
* wtf/OwnArrayPtr.h: Add an overload of = taking nullptr.
* wtf/OwnPtr.h: Ditto.
* wtf/PassOwnArrayPtr.h: Ditto.
* wtf/PassOwnPtr.h: Ditto.
* wtf/PassRefPtr.h: Ditto.
* wtf/RefPtr.h: Ditto.
* wtf/RetainPtr.h: Ditto.
2010-10-18 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: JIT doesn't check for |this| being an immediate before dereferencing
https://bugs.webkit.org/show_bug.cgi?id=47826
There's no guarantee that |this| will be a cell in a strict mode function, so
don't claim that it is.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::isKnownNotImmediate):
2010-10-18 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
if (0) throw "x" ; else { } throws parse error after r69906
https://bugs.webkit.org/show_bug.cgi?id=47807
r69906 introduced a bug: the semicolon is not parsed after a throw
expression anymore. Thus, the semicolon terminates the "if" parsing
in the example above, and the else token results a parse error.
* parser/JSParser.cpp:
(JSC::JSParser::parseThrowStatement):
2010-10-18 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Andreas Kling.
Remove some unnecessary lines of code from Parser.cpp
https://bugs.webkit.org/show_bug.cgi?id=47816
* parser/Parser.cpp:
2010-10-18 Xan Lopez <xlopez@igalia.com>
Reviewed by Csaba Osztrogonác.
Build broken with JIT disabled
https://bugs.webkit.org/show_bug.cgi?id=47801
This is a regression caused by r69940.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveBase):
2010-10-18 Zoltan Horvath <zoltan@webkit.org>
Reviewed by Darin Adler.
Change FastAllocBase implementation into a macro
https://bugs.webkit.org/show_bug.cgi?id=42998
It was investigated in bug #33896 that inheriting classes from FastAllocBase
can result in objects getting larger which leads to memory regressions.
Using a macro instead of inheriting classes from FastAllocBase would solve the issue.
* wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
2010-10-17 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions
https://bugs.webkit.org/show_bug.cgi?id=47791
Simple fix, check for arguments in addition to eval.
* parser/JSParser.cpp:
(JSC::JSParser::parseUnaryExpression):
2010-10-17 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
https://bugs.webkit.org/show_bug.cgi?id=47788
Fixing this required a couple of changes:
* resolve_base now has a flag to indicate whether it is being used for a put in strict mode.
this allows us to throw an exception when we're doing a completely generic resolve for
assignment, and that assignment would create a new global.
* There is a new opcode 'op_ensure_property_exists' that is used to determine whether
the property being assigned to already exists on the global object. This currently
has no caching, but such caching could be added relatively trivially. It is only used
in the case where we know that a property will be placed on the global object, and
we cannot verify that the property already exists.
In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather
than making op_resolve_base have an additional runtime branch.
There's also a new helper function to create the exception for the invalid assignment.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitResolveBase):
(JSC::BytecodeGenerator::emitResolveBaseForPut):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::AssignResolveNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveBase):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_resolve_base):
(JSC::JIT::emit_op_ensure_property_exists):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_base):
(JSC::JIT::emit_op_ensure_property_exists):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* parser/JSParser.cpp:
(JSC::JSParser::parseProgram):
* runtime/ExceptionHelpers.cpp:
(JSC::createErrorForInvalidGlobalAssignment):
* runtime/ExceptionHelpers.h:
* runtime/Operations.h:
(JSC::resolveBase):
2010-10-17 Simon Fraser <simon.fraser@apple.com>
First part of fix for Windows build failure. Will wait for the
next set of link errors to determine the mangled forms for dtoaRoundSF
and dtoaRoundDP.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-17 Simon Fraser <simon.fraser@apple.com>
Reviewed by Nikolas Zimmermann.
Very large and small numbers fail to round-trip through CSS
https://bugs.webkit.org/show_bug.cgi?id=20674
New exports required to use DecimalNumber in WebCore.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-10-16 Kyusun Kim <maniagoon@company100.net>
Reviewed by Alexey Proskuryakov.
Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters()
https://bugs.webkit.org/show_bug.cgi?id=47758
* wtf/CurrentTime.h:
* wtf/DateMath.h:
2010-10-16 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Rename StringHasherFunctions.h to StringHasher.h
https://bugs.webkit.org/show_bug.cgi?id=47200
Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/StringHashFunctions.h: Removed.
* wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h.
* wtf/text/StringHash.h:
* wtf/text/StringImpl.h:
2010-10-15 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline
https://bugs.webkit.org/show_bug.cgi?id=47762
The old YACC parser depended on the lexer for some classes of semicolon insertion.
The new parser handles ASI entirely on its own so when the lexer inserts a semicolon
on its own the net result is a spurious semicolon in the input stream. This can result
in incorrect parsing in some cases:
if (0)
break
;else {}
Would result in a parse failure as the output from the lexer is essentially
if (0)
break
;;else
So the second semicolon is interpreted as a empty statement, which terminates the if,
making the else an error.
* parser/JSParser.cpp:
(JSC::JSParser::parseThrowStatement):
Parsing of throw statement was wrong, and only worked due to the weird behaviour
in the lexer
* parser/Lexer.cpp:
(JSC::Lexer::lex):
Remove bogus semicolon insertion from the newline handling
2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Replace some String::format() usages by StringConcatenate in WebKit
https://bugs.webkit.org/show_bug.cgi?id=47714
* wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString().
2010-10-15 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::emitDisjunction):
2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The parenthetical assertion checking isn't working in some cases with YARR
Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46893
Calculate the countToCheck value of a TypeParentheticalAssertion by
subtracting the number of characters which follows
a TypeParentheticalAssertion term with the number of characters which should
be matched by terms which are contained
in the TypeParentheticalAssertion term (minimumSize).
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::emitDisjunction):
2010-10-14 Nathan Vander Wilt <nate@andyet.net>
Reviewed by Darin Adler.
Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632
* runtime/DateConversion.cpp:
(JSC::parseDate):
* wtf/DateMath.cpp:
(WTF::ymdhmsToSeconds):
(WTF::parseES5DateFromNullTerminatedCharacters):
* wtf/DateMath.h:
2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Gavin Barraclough.
Replace lots of String::format() usages by StringConcatenate
https://bugs.webkit.org/show_bug.cgi?id=47664
Add StringTypeAdapter<char> to accept single characters for makeString().
* wtf/text/StringConcatenate.h:
(WTF::makeString):
2010-10-14 David Goodwin <david_goodwin@apple.com>
Reviewed by Darin Adler.
need way to measure size of JITed ARM code
https://bugs.webkit.org/show_bug.cgi?id=47121
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::dumpLinkStats):
(JSC::LinkBuffer::dumpCode):
2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The backreference checking isn't working in some cases with YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46904
The Interpreter::matchBackReference() function returns true without matching
when a backreference points to the same parentheses where it is.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchBackReference):
2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Andreas Kling.
[Qt] Text breaking is slow: enable ICU as an opt-in
https://bugs.webkit.org/show_bug.cgi?id=40332
Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
* JavaScriptCore.pri:
* wtf/unicode/qt4/UnicodeQt4.h:
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isPunct):
(WTF::Unicode::isLower):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::combiningClass):
(WTF::Unicode::direction):
(WTF::Unicode::category):
2010-10-14 Anton Faern <anton@bladehawke.com>
Reviewed by Csaba Osztrogonác.
https://bugs.webkit.org/show_bug.cgi?id=47658
NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
change. This means that OS(NETBSD) is also undefined.
* wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
2010-10-13 David Goodwin <david_goodwin@apple.com>
Reviewed by Oliver Hunt.
ARMv7 JIT should generated conditional branches when possible
https://bugs.webkit.org/show_bug.cgi?id=47384
Use different jump padding sizes for conditional and unconditional
jumps (12 bytes and 10 bytes respectively). This allows the JIT to
include the IT instruction as part of the conditional jump sequence
which in turn allows it to optimize away the IT using an ARMv7
conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
conditional branches when displacement is in range. Also use IT/B(T4)
for conditional branch when displacement does not fit in B(T3).
For unconditional jump, instruction selection options are:
B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
* assembler/ARMv7Assembler.cpp:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::JmpSrc::JmpSrc):
(JSC::ARMv7Assembler::ifThenElse):
(JSC::ARMv7Assembler::jumpSizeDelta):
(JSC::ARMv7Assembler::canCompact):
(JSC::ARMv7Assembler::computeJumpType):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::canBeJumpT1):
(JSC::ARMv7Assembler::canBeJumpT3):
(JSC::ARMv7Assembler::canBeJumpT4):
(JSC::ARMv7Assembler::linkJumpT1):
(JSC::ARMv7Assembler::linkJumpT3):
(JSC::ARMv7Assembler::linkJumpT4):
(JSC::ARMv7Assembler::linkConditionalJumpT4):
(JSC::ARMv7Assembler::linkBX):
(JSC::ARMv7Assembler::linkConditionalBX):
(JSC::ARMv7Assembler::linkJumpAbsolute):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::linkCode):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::canCompact):
(JSC::MacroAssemblerARMv7::computeJumpType):
(JSC::MacroAssemblerARMv7::jumpSizeDelta):
(JSC::MacroAssemblerARMv7::jump):
(JSC::MacroAssemblerARMv7::nearCall):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::ret):
(JSC::MacroAssemblerARMv7::tailRecursiveCall):
(JSC::MacroAssemblerARMv7::makeJump):
(JSC::MacroAssemblerARMv7::makeBranch):
2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch>
Reviewed by Darin Adler.
Don't depend on Windows on sched_yield and sched.h
https://bugs.webkit.org/show_bug.cgi?id=45543
sched.h is part of pthreads and sched_yield is implemented
in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
dependency on pthreads-win32 in this file.
* wtf/TCSpinLock.h:
(TCMalloc_SlowLock):
2010-10-13 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Port unicode
https://bugs.webkit.org/show_bug.cgi?id=45716
Brew MP port uses only the subset of ICU library to reduce the binary size.
Follow the WinCE's implementation.
* wtf/Platform.h:
* wtf/unicode/Unicode.h:
* wtf/unicode/brew/UnicodeBrew.cpp: Added.
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isUpper):
(WTF::Unicode::isLower):
(WTF::Unicode::isDigit):
(WTF::Unicode::isPunct):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::direction):
(WTF::Unicode::category):
(WTF::Unicode::decompositionType):
(WTF::Unicode::combiningClass):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::digitValue):
(WTF::Unicode::isSpace):
(WTF::Unicode::isLetter):
* wtf/unicode/brew/UnicodeBrew.h: Added.
(WTF::Unicode::isArabicChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
(WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
(WTF::Unicode::umemcasecmp):
2010-10-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-13 Adam Barth <abarth@webkit.org>
Reviewed by Maciej Stachowiak.
[WTFURL] Add URLQueryCanonicalizer
https://bugs.webkit.org/show_bug.cgi?id=45088
This class canonicalizes the query component of URLs. The main tricky
bit there is the convertCharset function, which I've moved to a
templated dependency. There'll likely be more about that in future
patches.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/url/src/URLEscape.cpp: Added.
* wtf/url/src/URLEscape.h: Added.
(WTF::appendEscapedCharacter):
* wtf/url/src/URLQueryCanonicalizer.h: Added.
(WTF::URLQueryCanonicalizer::canonicalize):
(WTF::URLQueryCanonicalizer::isAllASCII):
(WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
(WTF::URLQueryCanonicalizer::convertToQueryEncoding):
2010-10-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43987 - Downloading using XHR is much slower than before
Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
Fundamentally this should be the same (copies current contents to expand capacity,
rather than using a rope), but this approach allows the intermadiate state of the
String to be inspected in the buffer without copying to resolve.
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::Holder::appendNextProperty):
Renamed StringBuilder::size() -> length() (to match other String types).
* runtime/UStringBuilder.h:
(JSC::UStringBuilder::append):
(JSC::UStringBuilder::toUString):
Update for changes in parent class, can just 'using' the append methods.
* wtf/text/StringBuilder.cpp: Added.
(WTF::StringBuilder::reifyString):
(WTF::StringBuilder::resize):
(WTF::StringBuilder::reserveCapacity):
(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::appendUninitialized):
(WTF::StringBuilder::append):
(WTF::StringBuilder::shrinkToFit):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::StringBuilder):
(WTF::StringBuilder::append):
(WTF::StringBuilder::toString):
(WTF::StringBuilder::toStringPreserveCapacity):
(WTF::StringBuilder::length):
(WTF::StringBuilder::isEmpty):
(WTF::StringBuilder::operator[]):
(WTF::StringBuilder::clear):
Class updated to use overcapacity in a StringImpl, rather than a Vector.
* Android.mk:
* Android.v8.wtf.mk:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/wtf.pri:
2010-10-13 Adam Roben <aroben@apple.com>
Export tryFastRealloc for WebKit2's benefit
Rubber-stamped by Anders Carlsson.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
tryFastRealloc. Removed RegExpObject::info, which is now exported via
JS_EXPORTDATA.
2010-10-13 Adam Barth <abarth@webkit.org>
Reviewed by Maciej Stachowiak.
[WTFURL] Add a mechanism for classifying types of characters
https://bugs.webkit.org/show_bug.cgi?id=45085
Various characters have different escaping rules depending on where
they are in URLs. This patch adds a table containing that information.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/url/src/URLCharacterTypes.cpp: Added.
* wtf/url/src/URLCharacterTypes.h: Added.
(WTF::URLCharacterTypes::isQueryChar):
(WTF::URLCharacterTypes::isIPv4Char):
(WTF::URLCharacterTypes::isHexChar):
(WTF::URLCharacterTypes::isCharOfType):
2010-10-13 Xan Lopez <xlopez@igalia.com>
Reviewed by Csaba Osztrogonác.
Missing parameters for bytecode dump of next_pname
https://bugs.webkit.org/show_bug.cgi?id=47590
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump): add missing parameters to the dump.
2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Dirk Schulze.
Add wtf/text/StringConcatenate
https://bugs.webkit.org/show_bug.cgi?id=47584
Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
Exactly the same design that has been followed while refactoring StringBuilder.
The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
* GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
* JavaScriptCore.gypi: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* bytecode/CodeBlock.cpp: s/makeString/makeUString/
(JSC::escapeQuotes):
(JSC::valueToSourceString):
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpToSourceString):
(JSC::regexpName):
* bytecompiler/NodesCodegen.cpp: Ditto.
(JSC::substitute):
* profiler/Profiler.cpp: Ditto.
(JSC::Profiler::createCallIdentifier):
* runtime/ExceptionHelpers.cpp: Ditto.
(JSC::createUndefinedVariableError):
(JSC::createErrorMessage):
(JSC::createInvalidParamError):
* runtime/FunctionConstructor.cpp: Ditto.
(JSC::constructFunction):
* runtime/FunctionPrototype.cpp: Ditto.
(JSC::insertSemicolonIfNeeded):
* runtime/JSONObject.cpp: Ditto.
(JSC::Stringifier::indent):
* runtime/JSStringBuilder.h:
(JSC::jsMakeNontrivialString):
* runtime/RegExpConstructor.cpp: Ditto.
(JSC::constructRegExp):
* runtime/RegExpObject.cpp: Ditto.
(JSC::RegExpObject::match):
* runtime/RegExpPrototype.cpp: Ditto.
(JSC::regExpProtoFuncCompile):
* runtime/StringConcatenate.h: Removed.
* runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
(JSC::makeUString):
* wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
(WTF::makeString):
2010-10-12 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::length):
2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com>
Reviewed by Gavin Barraclough.
Unify JSC::StringBuilder & WebCore::StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=47538
Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
No new code, just move code around.
* GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
* JavaScriptCore.gypi: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction): Ditto.
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncUnescape): Ditto.
* runtime/JSONObject.cpp:
(JSC::Stringifier::stringify): Ditto.
(JSC::Stringifier::appendQuotedString): Ditto.
(JSC::Stringifier::appendStringifiedValue): Ditto.
(JSC::Stringifier::startNewLine): Ditto.
(JSC::Stringifier::Holder::appendNextProperty): Ditto.
* runtime/LiteralParser.cpp:
(JSC::LiteralParser::Lexer::lexString): Ditto.
* runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
* runtime/StringBuilder.h: Removed.
* runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
(JSC::UStringBuilder::append): append(const JSC::UString&)
(JSC::UStringBuilder::toUString):
* wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
(WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
(WTF::StringBuilder::isEmpty): Ditto (+ constify method).
(WTF::StringBuilder::reserveCapacity): Ditto.
(WTF::StringBuilder::resize): Ditto.
(WTF::StringBuilder::size): Ditto.
(WTF::StringBuilder::operator[]): Ditto.
(WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
2010-10-12 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Cleaned up the processing of replacements after regular expression
processing, especially the case where there wasn't a match.
Changed to use empty strings instead of computing a zero length sub
string.
https://bugs.webkit.org/show_bug.cgi?id=47506
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncReplace):
2010-10-11 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Clang build fix after r69472.
https://bugs.webkit.org/show_bug.cgi?id=46523
* wtf/text/StringHash.h:
2010-10-11 Oliver Hunt <oliver@apple.com>
Undo last minute change to 32bit build.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_convert_this_strict):
2010-10-11 Brian Weinstein <bweinstein@apple.com>
Build fix for Windows. Add a necessary export from r69516.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-10-11 Oliver Hunt <oliver@apple.com>
Fix interpreter build -- was broken by incorrect merge.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-01 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[ES5] Implement strict mode
https://bugs.webkit.org/show_bug.cgi?id=10701
Initial strict mode implementation. This is the simplest
implementation that could possibly work and adds (hopefully)
all of the restrictions required by strict mode. There are
a number of inefficiencies, especially in the handling of
arguments and eval as smart implementations would make this
patch more complicated.
The SyntaxChecker AST builder has become somewhat more complex
as strict mode does require more parse tree information to
validate the syntax.
Summary of major changes to the parser:
* We track when we enter strict mode (this may come as a surprise)
* Strict mode actually requires a degree of AST knowledge to validate
so the SyntaxChecker now produces values that can be used to distinguish
"node" types.
* We now track variables that are written to. We do this to
statically identify writes to global properties that don't exist
and abort at that point. This should actually make it possible
to optimise some other cases in the future but for now it's
purely for validity checking. Currently writes are only tracked
in strict mode code.
* Labels are now tracked as it is now a syntax error to jump to a label
that does not exist (or to use break, continue, or return in a context
where they would be invalid).
Runtime changes:
* In order to get correct hanlding of the Arguments object all
strict mode functions that reference arguments create and tearoff
the arguments object on entry. This is not strictly necessary
but was the least work necessary to get the correct behaviour.
* PutPropertySlot now tracks whether it is being used for a strict
mode write, and if so Object::put will throw when a write can't be
completed.
* StrictEvalActivation was added as an "activation" object for strict
mode eval (so that strict eval does not introduce new variables into
the containing scope).
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::isStrictMode):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::get):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::createArgumentsIfNecessary):
(JSC::BytecodeGenerator::emitReturn):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isStrictMode):
(JSC::BytecodeGenerator::makeFunction):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::execute):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_pnames):
(JSC::JIT::emit_op_convert_this_strict):
(JSC::JIT::emitSlow_op_convert_this_strict):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_pnames):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::isResolve):
* parser/JSParser.cpp:
(JSC::JSParser::next):
(JSC::JSParser::startLoop):
(JSC::JSParser::endLoop):
(JSC::JSParser::startSwitch):
(JSC::JSParser::endSwitch):
(JSC::JSParser::setStrictMode):
(JSC::JSParser::strictMode):
(JSC::JSParser::isValidStrictMode):
(JSC::JSParser::declareParameter):
(JSC::JSParser::breakIsValid):
(JSC::JSParser::pushLabel):
(JSC::JSParser::popLabel):
(JSC::JSParser::hasLabel):
(JSC::JSParser::DepthManager::DepthManager):
(JSC::JSParser::DepthManager::~DepthManager):
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::startSwitch):
(JSC::JSParser::Scope::endSwitch):
(JSC::JSParser::Scope::startLoop):
(JSC::JSParser::Scope::endLoop):
(JSC::JSParser::Scope::inLoop):
(JSC::JSParser::Scope::breakIsValid):
(JSC::JSParser::Scope::pushLabel):
(JSC::JSParser::Scope::popLabel):
(JSC::JSParser::Scope::hasLabel):
(JSC::JSParser::Scope::isFunction):
(JSC::JSParser::Scope::declareVariable):
(JSC::JSParser::Scope::declareWrite):
(JSC::JSParser::Scope::deleteProperty):
(JSC::JSParser::Scope::declareParameter):
(JSC::JSParser::Scope::setNeedsFullActivation):
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::JSParser::Scope::getUncapturedWrittenVariables):
(JSC::JSParser::Scope::getDeletedVariables):
(JSC::JSParser::Scope::setStrictMode):
(JSC::JSParser::Scope::strictMode):
(JSC::JSParser::Scope::isValidStrictMode):
(JSC::JSParser::pushScope):
(JSC::JSParser::popScope):
(JSC::JSParser::declareVariable):
(JSC::JSParser::declareWrite):
(JSC::JSParser::deleteProperty):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseSourceElements):
(JSC::JSParser::parseDoWhileStatement):
(JSC::JSParser::parseWhileStatement):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseForStatement):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseSwitchStatement):
(JSC::JSParser::parseSwitchClauses):
(JSC::JSParser::parseSwitchDefaultClause):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseBlockStatement):
(JSC::JSParser::parseStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionBody):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parseIfStatement):
(JSC::JSParser::parseExpression):
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseConditionalExpression):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseStrictObjectLiteral):
(JSC::JSParser::parsePrimaryExpression):
(JSC::JSParser::parseMemberExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h:
* parser/Lexer.cpp:
(JSC::Lexer::parseString):
(JSC::Lexer::lex):
* parser/Lexer.h:
(JSC::Lexer::isReparsing):
* parser/Nodes.cpp:
(JSC::ScopeNode::ScopeNode):
(JSC::FunctionBodyNode::FunctionBodyNode):
(JSC::FunctionBodyNode::create):
* parser/Nodes.h:
(JSC::ScopeNode::isStrictMode):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::SyntaxChecker):
(JSC::SyntaxChecker::makeFunctionCallNode):
(JSC::SyntaxChecker::appendToComma):
(JSC::SyntaxChecker::createCommaExpr):
(JSC::SyntaxChecker::makeAssignNode):
(JSC::SyntaxChecker::makePrefixNode):
(JSC::SyntaxChecker::makePostfixNode):
(JSC::SyntaxChecker::makeTypeOfNode):
(JSC::SyntaxChecker::makeDeleteNode):
(JSC::SyntaxChecker::makeNegateNode):
(JSC::SyntaxChecker::makeBitwiseNotNode):
(JSC::SyntaxChecker::createLogicalNot):
(JSC::SyntaxChecker::createUnaryPlus):
(JSC::SyntaxChecker::createVoid):
(JSC::SyntaxChecker::thisExpr):
(JSC::SyntaxChecker::createResolve):
(JSC::SyntaxChecker::createObjectLiteral):
(JSC::SyntaxChecker::createArray):
(JSC::SyntaxChecker::createNumberExpr):
(JSC::SyntaxChecker::createString):
(JSC::SyntaxChecker::createBoolean):
(JSC::SyntaxChecker::createNull):
(JSC::SyntaxChecker::createBracketAccess):
(JSC::SyntaxChecker::createDotAccess):
(JSC::SyntaxChecker::createRegex):
(JSC::SyntaxChecker::createNewExpr):
(JSC::SyntaxChecker::createConditionalExpr):
(JSC::SyntaxChecker::createAssignResolve):
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFunctionBody):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/Arguments.cpp:
(JSC::Arguments::createStrictModeCallerIfNecessary):
(JSC::Arguments::createStrictModeCalleeIfNecessary):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/Arguments.h:
(JSC::Arguments::Arguments):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
* runtime/CommonIdentifiers.h:
* runtime/Error.cpp:
(JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
(JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
(JSC::StrictModeTypeErrorFunction::getConstructData):
(JSC::StrictModeTypeErrorFunction::callThrowTypeError):
(JSC::StrictModeTypeErrorFunction::getCallData):
(JSC::createTypeErrorFunction):
* runtime/Error.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
(JSC::FunctionExecutable::fromGlobalCode):
(JSC::ProgramExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::isStrictMode):
(JSC::EvalExecutable::create):
(JSC::FunctionExecutable::create):
* runtime/JSActivation.cpp:
(JSC::JSActivation::toStrictThisObject):
* runtime/JSActivation.h:
* runtime/JSFunction.cpp:
(JSC::createDescriptorForThrowingProperty):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnPropertyDescriptor):
(JSC::JSFunction::put):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::internalFunctionStructure):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::toStrictThisObject):
(JSC::throwTypeError):
* runtime/JSObject.h:
(JSC::JSObject::isStrictModeFunction):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirect):
(JSC::JSValue::putDirect):
(JSC::JSValue::toStrictThisObject):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::toStrictThisObject):
* runtime/JSStaticScopeObject.h:
* runtime/JSValue.h:
* runtime/JSZombie.h:
(JSC::JSZombie::toStrictThisObject):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::isStrictMode):
* runtime/StrictEvalActivation.cpp: Added.
(JSC::StrictEvalActivation::StrictEvalActivation):
(JSC::StrictEvalActivation::deleteProperty):
(JSC::StrictEvalActivation::toThisObject):
(JSC::StrictEvalActivation::toStrictThisObject):
* runtime/StrictEvalActivation.h: Added.
2010-10-10 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Windows build fix after r69472.
* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::hash):
2010-10-10 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Use WTF::StringHasher in WTF::CaseFoldingHash
https://bugs.webkit.org/show_bug.cgi?id=46523
* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::foldCase):
(WTF::CaseFoldingHash::hash):
2010-10-09 Pratik Solanki <psolanki@apple.com>
Reviewed by Xan Lopez.
https://bugs.webkit.org/show_bug.cgi?id=47445
Remove unused function WTFThreadData::initializeIdentifierTable()
* wtf/WTFThreadData.h:
2010-10-08 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Added check to start of subexpression being positive before using
subexpression in replacement.
https://bugs.webkit.org/show_bug.cgi?id=47324
* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):
2010-10-08 Chris Evans <cevans@google.com>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=47393
Use unsigned consistently to check for max StringImpl length.
Add a few integer overflow checks.
Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
* wtf/text/WTFString.cpp:
* wtf/text/StringImpl.h:
* wtf/text/StringImpl.cpp:
Better use of size_t vs. unsigned; check for integer overflows.
2010-10-07 David Goodwin <david_goodwin@apple.com>
Reviewed by Oliver Hunt.
ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
https://bugs.webkit.org/show_bug.cgi?id=47356
* assembler/ARMv7Assembler.h:
2010-10-06 Chris Evans <cevans@google.com>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=47248
Use size_t consistently in CString, to prevent theoretical trouble
with > 4GB strings on 64-bit platforms.
* wtf/text/CString.h:
* wtf/text/CString.cpp:
Use size_t for string lengths.
* wtf/MD5.cpp:
(WTF::expectMD5): use suitable format string + cast for size_t.
* JavaScriptCore.exp:
Update symbol name.
2010-10-06 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Start cleaning up Arguments.h
https://bugs.webkit.org/show_bug.cgi?id=47304
* wtf/TypeTraits.h:
* wtf/TypeTraits.cpp:
Add RemoveReference type trait.
2010-10-06 Rafael Antognolli <antognolli@profusion.mobi>
Unreviewed build fix.
[EFL] Build fix for glib support.
https://bugs.webkit.org/show_bug.cgi?id=47221
If compiling with GLib support enabled, we also need to link wtf against
glib library.
* wtf/CMakeListsEfl.txt:
2010-10-05 Kwang Yul Seo <skyul@company100.net>
Reviewed by Gavin Barraclough.
[BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
https://bugs.webkit.org/show_bug.cgi?id=47117
Use IMemCache1 to flush data cache and invalidate instruction cache.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
2010-10-05 Leandro Pereira <leandro@profusion.mobi>
Unreviewed. Build fix.
Moved "jsc" directory to "shell", so that the name does not clash with the
JavaScriptCore shell in some build systems.
http://webkit.org/b/47049
* CMakeLists.txt: Changed reference from "jsc" to "shell".
* jsc: Removed.
* jsc/CMakeLists.txt: Removed.
* jsc/CMakeListsEfl.txt: Removed.
* shell: Copied from JavaScriptCore/jsc.
2010-10-05 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Use PlatformRefPtr in randomNumber
https://bugs.webkit.org/show_bug.cgi?id=46989
Use PlatformRefPtr to free memory automatically.
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
2010-10-05 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
https://bugs.webkit.org/show_bug.cgi?id=46690
Use the correct register value when initialising the arguments
object in the interpreter. This is covered by existing tests.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-10-04 David Goodwin <david_goodwin@apple.com>
Reviewed by Oliver Hunt.
ARMv7 JIT should take advantage of 2-byte branches to reduce code size
https://bugs.webkit.org/show_bug.cgi?id=47007
* assembler/ARMv7Assembler.cpp:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::computeJumpType):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::canBeJumpT2):
(JSC::ARMv7Assembler::canBeJumpT4):
(JSC::ARMv7Assembler::linkBX):
(JSC::ARMv7Assembler::linkJumpT4):
(JSC::ARMv7Assembler::linkJumpT2):
(JSC::ARMv7Assembler::linkJumpAbsolute):
2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Reviewed by Antonio Gomes.
[EFL] Use fast malloc for WebKit EFL
https://bugs.webkit.org/show_bug.cgi?id=46691
Use fast malloc for WebKit EFL because the fast malloc is to allocate
memory quickly.
* wtf/CMakeListsEfl.txt:
2010-10-04 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Lazily create activation objects
https://bugs.webkit.org/show_bug.cgi?id=47107
Make it possible to lazily create the activation object
for a function that needs one. This allows us to reduce
the overhead of entering a function that may require
an activation in some cases, but not always.
This does make exception handling a little more complex as
it's now necessary to verify that a callframes activation
has been created, and create it if not, in all of the
paths used in exception handling.
We also need to add logic to check for the existence of
the activation in the scoped_var opcodes, as well as
op_ret, op_ret_object_or_this and op_tearoff_activation
so that we can avoid creating an activation unnecesarily
on function exit.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
(JSC::CodeBlock::createActivation):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setActivationRegister):
(JSC::CodeBlock::activationRegister):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewFunctionInternal):
(JSC::BytecodeGenerator::emitNewFunctionExpression):
(JSC::BytecodeGenerator::createActivationIfNecessary):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBase):
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITCall32_64.cpp:
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
(JSC::JIT::emit_op_create_activation):
(JSC::JIT::emit_op_resolve_global_dynamic):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_create_activation):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-10-04 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
Remove ENABLE_SANDBOX
https://bugs.webkit.org/show_bug.cgi?id=47032
* Configurations/FeatureDefines.xcconfig:
2010-10-01 Pratik Solanki <psolanki@apple.com>
Reviewed by Geoffrey Garen.
Specify ALWAYS_INLINE at function declaration not function definition
https://bugs.webkit.org/show_bug.cgi?id=46960
For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
* bytecompiler/BytecodeGenerator.h:
* wtf/FastMalloc.cpp:
2010-10-01 Kwang Yul Seo <skyul@company100.net>
Unreviewed.
[BREWMP] Change Collector BLOCK_SIZE to 64KB
https://bugs.webkit.org/show_bug.cgi?id=46436
Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
* runtime/Collector.h:
2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
Reviewed by Andreas Kling.
[Qt] Stack overflow on symbian platform.
https://bugs.webkit.org/show_bug.cgi?id=40598
Move big allocation in arrayProtoFuncToString from stack to heap.
JSC::arrayProtoFuncToString function can be called recursivly and
1K allocation on stack cahse stack overflow.
Can be useful for other platforms with limited stack size.
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
2010-09-30 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
https://bugs.webkit.org/show_bug.cgi?id=46373
A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
to wrap the instance in PlatformRefPtr.
* wtf/brew/ShellBrew.h:
(WTF::createRefPtrInstance):
2010-09-30 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Port PlatformRefPtr
https://bugs.webkit.org/show_bug.cgi?id=46370
Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
* wtf/brew/RefPtrBrew.h: Added.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
2010-09-29 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Add additional checks to StringBuffer.
<rdar://problem/7756381>
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::StringBuffer):
(WTF::StringBuffer::resize):
2010-09-30 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
Make 2D accelerated canvas rendering build on Mac
https://bugs.webkit.org/show_bug.cgi?id=46007
Added ACCELERATED_2D_CANVAS to FeatureDefines
* Configurations/FeatureDefines.xcconfig:
2010-09-30 Kevin Ollivier <kevino@theolliviers.com>
[wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
the copy so as not to alter global settings.
* wscript:
2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The case-insensitivity backreference checking isn't working with YARR
Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46882
Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::tryConsumeBackReference):
2010-09-30 Kwang Yul Seo <skyul@company100.net>
Reviewed by Andreas Kling.
[BREWMP] Leave initializeRandomNumberGenerator empty.
https://bugs.webkit.org/show_bug.cgi?id=46851
On Brew MP, AEECLSID_RANDOM initializes itself.
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2010-09-30 Gabor Loki <loki@webkit.org>
Reviewed by Csaba Osztrogonác.
Remove unnecessary cacheFlush calls from Thumb-2
https://bugs.webkit.org/show_bug.cgi?id=46702
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::relinkCall):
(JSC::ARMv7Assembler::repatchInt32):
(JSC::ARMv7Assembler::repatchPointer):
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Next try to fix cygwin build.
* wtf/Assertions.cpp:
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
* wtf/Assertions.cpp:
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Build fix for cygwin.
* wtf/Assertions.cpp:
2010-09-29 Patrick Gansterer <paroga@webkit.org>
Reviewed by Andreas Kling.
[WINCE] Buildfix for Assertions.cpp after r68511.
https://bugs.webkit.org/show_bug.cgi?id=46807
Some, but not all WinCE environments have support for IsDebuggerPresent().
Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
* wtf/Assertions.cpp:
* wtf/Platform.h:
2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
JSC compile fails on 32bit platform when Regexp Tracing is enabled
https://bugs.webkit.org/show_bug.cgi?id=46713
Fix the cast of pointer in regexp tracing to avoid the warning.
* runtime/RegExp.cpp:
(JSC::RegExp::match):
2010-09-28 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Begin hooking up painting in the plug-in process
https://bugs.webkit.org/show_bug.cgi?id=46766
* JavaScriptCore.exp:
Add tryFastRealloc, used by WebKit2.
2010-09-28 Philippe Normand <pnormand@igalia.com>
Reviewed by Martin Robinson.
Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
https://bugs.webkit.org/show_bug.cgi?id=46721
Enable GOwnPtr/GRefPtr build only if glib support has been
explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
* wtf/gobject/GOwnPtr.cpp:
* wtf/gobject/GOwnPtr.h:
* wtf/gobject/GRefPtr.cpp:
* wtf/gobject/GRefPtr.h:
2010-09-28 İsmail Dönmez <ismail@namtrac.org>
Reviewed by Andreas Kling.
Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
Remove reference to unexisting path JavaScriptCore/os-wince.
* JavaScriptCore.pri:
* wtf/Assertions.cpp:
2010-09-27 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Changed the initialization of JSArray objects to have space for
3 elements for the constructor that takes a ArgList argument.
This improves v8-deltablue performance by about 2.8% by reducing
the number of realloc() calls.
https://bugs.webkit.org/show_bug.cgi?id=46664
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
2010-09-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Bug 46680 - Inlining string concatenation can regress interpreter performance
<rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
Do not inline calls to string concatenation in the interpret loop.
* interpreter/Interpreter.cpp:
(JSC::concatenateStrings):
(JSC::Interpreter::privateExecute):
2010-09-27 Anders Carlsson <andersca@apple.com>
Fix thinko.
* runtime/JSCell.h:
2010-09-27 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
Try to fix Windows build.
* runtime/JSCell.h:
(JSC::MSVCBugWorkaround::MSVCBugWorkaround):
(JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
2010-09-27 Erik Arvidsson <arv@chromium.org>
Reviewed by Darin Adler.
Add operator == for AtomicString and Vector<Uchar>
https://bugs.webkit.org/show_bug.cgi?id=46509
* JavaScriptCore.exp:
* wtf/text/AtomicString.cpp:
(WTF::operator==):
* wtf/text/AtomicString.h:
(WTF::operator==):
(WTF::operator!=):
2010-09-27 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* wtf/Noncopyable.h:
2010-09-26 Anders Carlsson <andersca@apple.com>
Reviewed by Alexey Proskuryakov and Adam Barth.
Add WTF_MAKE_NONCOPYABLE macro
https://bugs.webkit.org/show_bug.cgi?id=46589
Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
reason for this is that the Itanium C++ ABI states that no empty classes of the same type
can be laid out at the same offset in the class. This can result in objects getting larger
which leads to memory regressions. (One example of this is the String class which grew by
sizeof(void*) when both its base class and its first member variable inherited indirectly
from FastAllocBase).
* wtf/Noncopyable.h:
Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
* runtime/JSCell.h:
* wtf/RefCounted.h:
Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
2010-09-27 Philippe Normand <pnormand@igalia.com>
Reviewed by Martin Robinson.
[GTK] use ENABLE(GLIB_SUPPORT)
https://bugs.webkit.org/show_bug.cgi?id=46630
* wtf/Platform.h: Include GTypedefs.h only if glib support
is explicitly enabled.
2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com>
Reviewed by Adam Barth.
jsc: Document the strcat opcode.
https://bugs.webkit.org/show_bug.cgi?id=46571
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com>
Reviewed by Adam Barth.
make-bytecode-docs.pl: Add a comment to the generated HTML
https://bugs.webkit.org/show_bug.cgi?id=46570
Generate an HTML Comment that this file was generated from
Interpreter.cpp with the make-bytecode-docs.pl script.
* docs/make-bytecode-docs.pl:
2010-09-27 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Remove WTF::stringHash functions
https://bugs.webkit.org/show_bug.cgi?id=46520
Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
So use StringHasher::createHash directly and remove stringHash.
* wtf/StringHashFunctions.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
2010-09-26 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
Add WTF::StringHasher::createBlobHash
https://bugs.webkit.org/show_bug.cgi?id=46514
Add this function for hashing FormElementKey and QualifiedNameComponents.
* wtf/StringHashFunctions.h:
(WTF::StringHasher::createBlobHash):
2010-09-26 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Barth.
REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
running websocket/tests/bad-sub-protocol-non-ascii.html
https://bugs.webkit.org/show_bug.cgi?id=46553
Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
Add an additional member variable to indicate if we have an pending character
instead of only using an invalid character for this purpose.
* wtf/StringHashFunctions.h:
(WTF::StringHasher::StringHasher):
(WTF::StringHasher::addCharacters):
(WTF::StringHasher::addCharacter):
(WTF::StringHasher::hash):
2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
Reviewed by Oliver Hunt.
valueOf called in wrong order in atan2 and date constructors.
https://bugs.webkit.org/show_bug.cgi?id=26978
Fixed the bug where the arguments to atan2 were being evaluated
out of order.
* runtime/MathObject.cpp:
(JSC::mathProtoFuncATan2):
2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
Reviewed by Oliver Hunt.
valueOf called in wrong order in atan2 and date constructors.
https://bugs.webkit.org/show_bug.cgi?id=26978
Fixed the issue where the parameters to the Date constructor
were being evaluated to numbers more than once.
* runtime/DateConstructor.cpp:
(JSC::constructDate):
(JSC::dateUTC):
2010-09-25 Oliver Hunt <oliver@apple.com>
Fix various builds
Relearning the lesson that last minute changes are bad.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetArgumentsLength):
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_get_argument_by_val):
2010-09-25 Oliver Hunt <oliver@apple.com>
Reviewed by Cameron Zwarich.
Avoid constructing arguments object when accessing length and index properties
https://bugs.webkit.org/show_bug.cgi?id=46572
Add opcodes to read argument length and properties, and then implement them.
Much like other lazy opcodes these opcodes take a fast path when the arguments
object has not been instantiated, and fall back on generic access mechanisms
if they are acting on an instantiated object.
3% win on v8-earleyboyer, no change elsewhere.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetArgumentsLength):
(JSC::BytecodeGenerator::emitGetArgumentByVal):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_arguments_length):
(JSC::JIT::emitSlow_op_get_arguments_length):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emitSlow_op_get_argument_by_val):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_arguments_length):
(JSC::JIT::emitSlow_op_get_arguments_length):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emitSlow_op_get_argument_by_val):
2010-09-25 Patrick Gansterer <paroga@webkit.org>
Unreviewed.
Fix typo in StringHasher class
https://bugs.webkit.org/show_bug.cgi?id=45970
* wtf/StringHashFunctions.h:
(WTF::StringHasher::createHash):
2010-09-24 Patrick Gansterer <paroga@paroga.com>
Reviewed by Gavin Barraclough.
Add WTF::StringHasher
https://bugs.webkit.org/show_bug.cgi?id=45970
StringHasher is a class for calculation stringHash out of character string.
This class will unify the different usages of the same algorithm.
* wtf/StringHashFunctions.h:
(WTF::StringHasher::StringHasher):
(WTF::StringHasher::addCharacters):
(WTF::StringHasher::addCharacter):
(WTF::StringHasher::hash):
(WTF::StringHasher::createHash):
(WTF::StringHasher::defaultCoverter):
(WTF::StringHasher::addCharactersToHash):
(WTF::stringHash):
2010-09-24 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Variable declarations inside a catch scope don't get propogated to the parent scope
https://bugs.webkit.org/show_bug.cgi?id=46501
Add logic to make variable declaration look for a scope for the
new variable. This allows us to create a scope (eg. for catch)
and then seal it, so that additional variable declarations
contained are propogated to the correct target. Strangely this
comes out as a performance win, but I think it's mostly cache
effects.
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::preventNewDecls):
(JSC::JSParser::Scope::allowsNewDecls):
(JSC::JSParser::declareVariable):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionDeclaration):
2010-09-24 İsmail Dönmez <ismail@namtrac.org>
Reviewed by Csaba Osztrogonác.
Add a Windows compatible inttypes.h header to fix WinCE build.
https://bugs.webkit.org/show_bug.cgi?id=46463
* os-win32/inttypes.h: Added.
2010-09-24 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=46448
Roll this back in, with additional logic to prevent us from delaying construction
of functions named "arguments"
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitInitLazyRegister):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitLazyNewFunction):
(JSC::BytecodeGenerator::emitNewFunctionInternal):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
(JSC::JIT::emit_op_new_func):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
* parser/Nodes.h:
(JSC::ScopeNode::needsActivationForMoreThanVariables):
2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r68223.
http://trac.webkit.org/changeset/68223
https://bugs.webkit.org/show_bug.cgi?id=46448
It broke 2-3 tests on bots (Requested by Ossy on #webkit).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::emitNewFunction):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_init_arguments):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_init_arguments):
* parser/Nodes.h:
2010-09-23 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Delay construction of functions that aren't captured
https://bugs.webkit.org/show_bug.cgi?id=46433
If a function isn't captured by an activation there's no
way it can be accessed indirectly, so we can delay the
construction until it's used (similar to what we do with
arguments). We rename the existing op_init_arguments to
op_init_lazy_reg and removed its implicit handling of
the anonymous argument register, and make op_new_function
take a parameter to indicate whether it should null check
the target slot before creating the function object.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitInitLazyRegister):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitLazyNewFunction):
(JSC::BytecodeGenerator::emitNewFunctionInternal):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
(JSC::JIT::emit_op_new_func):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_init_lazy_reg):
* parser/Nodes.h:
(JSC::ScopeNode::needsActivationForMoreThanVariables):
2010-09-23 David Kilzer <ddkilzer@apple.com>
<rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
https://bugs.webkit.org/show_bug.cgi?id=46423
Reviewed by Oliver Hunt.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Disable the gcc computed
goto hacks added in r55564 when compiling with llvm-gcc-4.2.
2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Darin Adler.
Fix usage of enum as if it was a define
https://bugs.webkit.org/show_bug.cgi?id=46355
pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
enum. Hence, it cannot be used by the preprocessor which always
evaluates that condition as true. This was giving a warning when
compiling with gcc and "-Wundef" flag.
The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
and get rid of that #if.
* wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
set mutex type to PTHREAD_MUTEX_NORMAL.
(WTF::Mutex::Mutex):
2010-09-23 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Removed extraneous truncation of ovector on entry and error exit.
Changed the initialization to -1 of vector to only initialize
the start indecies, which is sufficient for the pattern/subpatterns.
Changed the JIT code to not clear the end index for subpatterns
as it isn't needed. These changes are worth ~2.7% on v8-regexp.
https://bugs.webkit.org/show_bug.cgi?id=46404
* runtime/RegExp.cpp:
(JSC::RegExp::match):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-09-22 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Only copy captured variables into activation
https://bugs.webkit.org/show_bug.cgi?id=46330
We now track free variable information which means that
we no longer need to copy every variable defined in a
function. With this patch activations only retain those
variables needed for correctness. In order to interact
safely with the inspector this means that JSActivation
now provides its own lookup functions so it can avoid
trying to read or write to variables that have been
optimised out.
* bytecode/CodeBlock.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* parser/Nodes.h:
(JSC::ScopeNode::capturedVariableCount):
(JSC::ScopeNode::captures):
* runtime/Arguments.h:
(JSC::JSActivation::copyRegisters):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
(JSC::FunctionExecutable::capturedVariableCount):
* runtime/JSActivation.cpp:
(JSC::JSActivation::markChildren):
(JSC::JSActivation::symbolTableGet):
(JSC::JSActivation::symbolTablePut):
(JSC::JSActivation::getOwnPropertyNames):
(JSC::JSActivation::symbolTablePutWithAttributes):
* runtime/JSActivation.h:
2010-09-23 Ismail Donmez <ismail@namtrac.org>
Reviewed by Andreas Kling.
Fix jsc.exe build for Windows CE
* jsc.pro: Add mmtimer.lib for Windows CE.
2010-09-23 Ismail Donmez <ismail@namtrac.org>
Unreviewed.
JIT should be disabled on Windows CE. Broken in r64176.
* wtf/Platform.h:
2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
Reduce the number of BOL checks in YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46260
Extend the YARR Interpreter with an optimization which reduces the number of
BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
"TypeAssertionBOL" byteTerm it will be checked just one time.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::ByteCompiler::regexBegin):
(JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/RegexInterpreter.h:
(JSC::Yarr::ByteTerm::BodyAlternativeBegin):
(JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
(JSC::Yarr::ByteTerm::BodyAlternativeEnd):
(JSC::Yarr::ByteTerm::AlternativeBegin):
(JSC::Yarr::ByteTerm::AlternativeDisjunction):
(JSC::Yarr::ByteTerm::AlternativeEnd):
2010-09-22 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Fixed the cross over from alternatives executed once and
those that loop. This fixed the problem where the index
was getting messed up for looping alternatives causing an
infinite loop.
https://bugs.webkit.org/show_bug.cgi?id=46189
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
2010-09-22 Steve Falkenburg <sfalken@apple.com>
Rubber stamped by Jon Honeycutt.
Allow jsc.exe to be run against unversioned ICU.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
2010-09-22 Kwang Yul Seo <skyul@company100.net>
Reviewed by Laszlo Gombos.
Use "typedef wchar_t JSChar" when compiled with RVCT
https://bugs.webkit.org/show_bug.cgi?id=40651
Use wchar_t for JSChar and UChar when compiled with RVCT.
Linux is the exception for this rule.
* API/JSStringRef.h:
* wtf/unicode/qt4/UnicodeQt4.h:
2010-09-22 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown
https://bugs.webkit.org/show_bug.cgi?id=44245
Remove incorrect code from op_load_varargs in the interpreter.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-09-22 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
https://bugs.webkit.org/show_bug.cgi?id=44246
JIT code generated for instanceof was not checking to ensure that the prototype property was
an object, this patch ensures that it does.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
2010-09-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Darin Adler.
Inline UTF8SequenceLength
https://bugs.webkit.org/show_bug.cgi?id=45589
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
2010-09-21 Oliver Hunt <oliver@apple.com>
RS=Gavin Barraclough.
Fix codeblock dumping
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* runtime/Executable.h:
(JSC::ScriptExecutable::ScriptExecutable):
2010-09-21 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Speed up function.apply(..., arguments)
https://bugs.webkit.org/show_bug.cgi?id=46207
Add code to do argument copying inline in the case
where we're using Function.apply to forward our arguments
directly.
* jit/JIT.cpp:
(JSC::JIT::privateCompileSlowCases):
Splitted op_load_varargs into fast and slow paths, so add the call
to the slow path generator.
* jit/JIT.h:
* jit/JITCall32_64.cpp:
Remove 32bit specific emit_op_load_varargs as the logic is the
same for all value representations
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_load_varargs):
Copy arguments inline
(JSC::JIT::emitSlow_op_load_varargs):
2010-09-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
interpreter due to 54724 and 54596
Fixed a typo (using "UNLIKELY" instead of "LIKELY").
* wtf/PassRefPtr.h:
(WTF::refIfNotNull):
(WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
hold real data. Also, in cases where they do not hold real data, the
compiler usually sees a call to release() right before the call to the
destructor, so it can probably optimize out the test completely.
2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch>
Reviewed by Martin Robinson.
Build issues with Windows versions of the GTK+ port
https://bugs.webkit.org/show_bug.cgi?id=45844
Link with winmm.dll when necessary and specify the executable extension
explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
rule actually works.
Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
a section in ThreadSpecific.cpp
* GNUmakefile.am:
2010-09-21 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] 'make dist' should be fixed in preparation for the next release
https://bugs.webkit.org/show_bug.cgi?id=46129
* GNUmakefile.am: Update the sources list to include missing headers.
2010-09-21 Dave Tapuska <dtapuska@rim.com>
Reviewed by Csaba Osztrogonác.
https://bugs.webkit.org/show_bug.cgi?id=45673
r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
8 byte aligned. A non 8 byte divisible value for this will
cause the sp to become non 8 byte aligned.
Verify and correct offset values that r65596 effected that
weren't updated.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-09-21 Xan Lopez <xlopez@igalia.com>
Reviewed by Martin Robinson.
Fix Opcode stats compilation
https://bugs.webkit.org/show_bug.cgi?id=46079
The FixedArray API had changed, and <stdio.h> was not included for
printf.
* bytecode/Opcode.cpp:
(JSC::OpcodeStats::~OpcodeStats):
2010-09-20 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Fixed detection of alternative smaller than the first alternative
to only check looping alternatives.
https://bugs.webkit.org/show_bug.cgi?id=46049
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
REGRESSION(67790): jsc tests are failed with YARR interpreter
https://bugs.webkit.org/show_bug.cgi?id=46083
Fix the initializing of the lastSubpatternId member of
parentheses.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2010-09-20 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 46077 - ASSERT failure in YARR JIT
We will currently attempt to loop if there are multiple alternatives, they are all
BOL predicated, and the last alternative is longer then the first - however if all
alternatives are BOL predicated the head of loop label will not have been set, and
we'll try to link a jump to an undefined label. Stop doing so.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
2010-09-20 Adam Roben <aroben@apple.com>
Export RegExpObject::info from JavaScriptCore
This allows obj->inherits(&RegExpObject::info) to work correctly from
outside JavaScriptCore.dll on Windows.
Fixes <http://webkit.org/b/46098>
fast/loader/stateobjects/pushstate-object-types.html fails on Windows
Reviewed by John Sullivan.
* runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
we already have for some other classes whose info members have to be
used from outside the DLL.
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 2.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 1.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Build fix - implicit double-to-int conversion invalid on 32-bit.
* runtime/DatePrototype.cpp:
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncSetYear):
2010-09-19 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
These methods implement the same conversion (see discussion in the notes
of sections of 9.5 and 9.6 of the spec), only differing in how the result
is interpretted.
Date prototype is incorrectly using toInt32, and this is causing us to
provide an output value indicating whether the input to ToInt32 was finite
(the corresponding methods on Date are actually spec'ed to use ToInteger,
not ToInt32). This patch partially fixes this in order to remove this
bogus output value, hoewever more work will be require to bring Date
fully up to spec compliance (the constructor is still performing ToInt32
conversions).
* JavaScriptCore.exp:
* runtime/DatePrototype.cpp:
(JSC::fillStructuresUsingTimeArgs):
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncSetYear):
* runtime/JSValue.cpp:
(JSC::toInt32):
* runtime/JSValue.h:
(JSC::toUInt32):
(JSC::JSValue::toInt32):
(JSC::JSValue::toUInt32):
2010-09-18 Darin Adler <darin@apple.com>
First step in fixing Windows build.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
Removed incorrect symbol. The build will probably still fail,
but the failure will tell us what symbol to add.
2010-09-18 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Added code to unroll regular expressions containing ^.
Alternatives that begin with ^ are tagged during parsing
and rolled up in containing sub expression structs.
After parsing, a regular expression flagged as containing
a ^ (a.k.a. BOL) is processed further in optimizeBOL().
A copy of the disjunction is made excluding alternatives that
are rooted with BOL. The original alternatives are flagged
to only be executed once. The copy of the other alternatives are
added to the original expression.
In the case that all original alternatives are flagged, there
won't be any looping alternatives.
The JIT generator will emit code accordingly, executing the
original alternatives once and then looping over the
alternatives that aren't anchored with a BOL (if any).
https://bugs.webkit.org/show_bug.cgi?id=45787
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::assertionBOL):
(JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
(JSC::Yarr::RegexPatternConstructor::copyDisjunction):
(JSC::Yarr::RegexPatternConstructor::copyTerm):
(JSC::Yarr::RegexPatternConstructor::optimizeBOL):
(JSC::Yarr::compileRegex):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
* yarr/RegexPattern.h:
(JSC::Yarr::PatternAlternative::PatternAlternative):
(JSC::Yarr::PatternAlternative::setOnceThrough):
(JSC::Yarr::PatternAlternative::onceThrough):
(JSC::Yarr::PatternDisjunction::PatternDisjunction):
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-09-18 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Rename Wince files to WinCE
https://bugs.webkit.org/show_bug.cgi?id=37287
* wtf/unicode/Unicode.h:
* wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp.
* wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h.
* wtf/unicode/wince/UnicodeWince.cpp: Removed.
* wtf/unicode/wince/UnicodeWince.h: Removed.
* wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h.
* wtf/wince/FastMallocWince.h: Removed.
2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
Enable Platform Strategies on Qt
[Qt] Turn on PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=45831
* wtf/Platform.h: Enable Platform Strategies when building QtWebkit
2010-09-17 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Imprecise tracking of variable capture leads to overly pessimistic creation of activations
https://bugs.webkit.org/show_bug.cgi?id=46020
The old logic for track free and captured variables would cause us
to decide we needed an activation in every function along the scope
chain between a variable capture and its declaration. We now track
captured variables precisely which requires a bit of additional work
The most substantial change is that the parsing routine needs to
be passed the list of function parameters when reparsing a function
as when reparsing we don't parse the function declaration itself only
its body.
* JavaScriptCore.exp:
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::needsFullActivation):
We need to distinguish between use of a feature that requires
an activation and eval so we now get this additional flag.
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::JSParser::Scope::getCapturedVariables):
We can't simply return the list of "capturedVariables" now as
is insufficiently precise, so we compute them instead.
(JSC::JSParser::popScope):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseMemberExpression):
* parser/JSParser.h:
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/Parser.h:
(JSC::Parser::parse):
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
(JSC::FunctionExecutable::fromGlobalCode):
Pass function parameters (if available) to the parser.
2010-09-17 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add IsFloatingPoint and IsArithmetic type traits
https://bugs.webkit.org/show_bug.cgi?id=46018
* wtf/TypeTraits.h:
* wtf/TypeTraits.cpp:
2010-09-17 Martin Robinson <mrobinson@igalia.com>
Reviewed by Oliver Hunt.
[GTK] FontPlatformDataFreeType should use smart pointers to hold its members
https://bugs.webkit.org/show_bug.cgi?id=45917
Added support to PlatformRefPtr for handling HashTableDeletedValue.
* wtf/PlatformRefPtr.h:
(WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue.
(WTF::PlatformRefPtr::isHashTableDeletedValue): Added.
2010-09-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Crash due to timer triggered GC on one heap while another heap is active
https://bugs.webkit.org/show_bug.cgi?id=45932
<rdar://problem/8318446>
The GC timer may trigger for one heap while another heap is active. This
is safe, but requires us to ensure that we have temporarily associated the
thread's identifierTable with the heap we're collecting on. Otherwise we
may end up with the identifier tables in an inconsistent state leading to
an eventual crash.
* runtime/Collector.cpp:
(JSC::Heap::allocate):
(JSC::Heap::reset):
(JSC::Heap::collectAllGarbage):
Add assertions to ensure we have the correct identifierTable active
while collecting.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger):
Temporarily make the expected IdentifierTable active
* wtf/WTFThreadData.h:
(JSC::IdentifierTable::remove):
Make it possible to see when IdentifierTable::remove has succeeded
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
CRASH if an StringImpl is an Identifier but isn't present in the
active IdentifierTable. If we get to this state something has
gone wrong and we should just crash immediately.
2010-09-16 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Implement dissolveDragImageToFraction
https://bugs.webkit.org/show_bug.cgi?id=45826
* wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
2010-09-16 Eric Uhrhane <ericu@chromium.org>
Reviewed by Jian Li.
Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
https://bugs.webkit.org/show_bug.cgi?id=45798
* Configurations/FeatureDefines.xcconfig:
2010-09-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Use free variable analysis to improve activation performance
https://bugs.webkit.org/show_bug.cgi?id=45837
Adds free and captured variable tracking to the JS parser. This
allows us to avoid construction of an activation object in some
cases. Future patches will make more use of this information to
improve those cases where activations are still needed.
* parser/ASTBuilder.h:
* parser/JSParser.cpp:
(JSC::JSParser::Scope::Scope):
(JSC::JSParser::Scope::declareVariable):
(JSC::JSParser::Scope::useVariable):
(JSC::JSParser::Scope::collectFreeVariables):
(JSC::JSParser::Scope::capturedVariables):
(JSC::JSParser::ScopeRef::ScopeRef):
(JSC::JSParser::ScopeRef::operator->):
(JSC::JSParser::ScopeRef::index):
(JSC::JSParser::currentScope):
(JSC::JSParser::pushScope):
(JSC::JSParser::popScope):
(JSC::JSParser::parseProgram):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parsePrimaryExpression):
* parser/Nodes.cpp:
(JSC::ScopeNodeData::ScopeNodeData):
(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::ProgramNode::create):
(JSC::EvalNode::EvalNode):
(JSC::EvalNode::create):
(JSC::FunctionBodyNode::FunctionBodyNode):
(JSC::FunctionBodyNode::create):
* parser/Nodes.h:
(JSC::ScopeNode::needsActivation):
(JSC::ScopeNode::hasCapturedVariables):
* parser/Parser.cpp:
(JSC::Parser::didFinishParsing):
* parser/Parser.h:
(JSC::Parser::parse):
* parser/SyntaxChecker.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
(JSC::ScriptExecutable::needsActivation):
(JSC::ScriptExecutable::recordParse):
2010-09-14 Hyung Song <beergun@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Add IMemGroup and IMemSpace to OwnPtr type.
https://bugs.webkit.org/show_bug.cgi?id=44764
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.cpp:
(WTF::deleteOwnedPtr):
2010-09-14 Darin Adler <darin@apple.com>
Reviewed by Geoffrey Garen.
Sort with non-numeric custom sort function fails on array with length but no values
https://bugs.webkit.org/show_bug.cgi?id=45781
* runtime/JSArray.cpp:
(JSC::JSArray::sort): Replaced early exit for an array of length zero to instead
exit for any array without values, even if it has a non-0 length.
2010-09-14 Steve Falkenburg <sfalken@apple.com>
Windows production build fix.
Roll out r65143.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-09-14 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Share UnicodeMacrosFromICU.h
https://bugs.webkit.org/show_bug.cgi?id=45710
glib, qt4 and wince use the same macros from ICU.
Remove the code duplication and use the same header file.
* wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
* wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
* wtf/unicode/qt4/UnicodeQt4.h:
* wtf/unicode/wince/UnicodeWince.h:
2010-09-13 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Preparation for eliminating deprecatedParseURL
https://bugs.webkit.org/show_bug.cgi?id=45695
* wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from
the HTML tree builder.
2010-09-13 Darin Fisher <darin@chromium.org>
Reviewed by David Levin.
Add option to conditionally compile smooth scrolling support.
https://bugs.webkit.org/show_bug.cgi?id=45689
ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms.
* wtf/Platform.h:
2010-09-13 Adam Roben <aroben@apple.com>
Copy JavaScriptCore's generated sources to the right directory
* JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo.
2010-09-13 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Don't call _msize
https://bugs.webkit.org/show_bug.cgi?id=45556
Because Brew MP uses its own memory allocator, it is not correct to use
_msize in fastMallocSize. Add !PLATFORM(BREWMP) guard.
* wtf/FastMalloc.cpp:
(WTF::fastMallocSize):
2010-09-11 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Andreas Kling.
[Qt] V8 port: webcore project files changes
https://bugs.webkit.org/show_bug.cgi?id=45141
* JavaScriptCore.pro: Moved wtf specific files to wtf.pri,
so that they can also be used from WebCore.pro for v8 builds.
* wtf/wtf.pri: Added.
2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch>
Reviewed by Andreas Kling.
Add a define missing when building with glib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=45544
* wtf/unicode/glib/UnicodeMacrosFromICU.h:
2010-09-10 Stephanie Lewis <slewis@apple.com>
Reviewed by Alexey Proskuryakov.
Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know
about the JIT and other implementation details of JavaScriptCore. Necessary
to fix PPC build.
https://bugs.webkit.org/show_bug.cgi?id=45528
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/MemoryStatistics.cpp: Added.
(JSC::memoryStatistics):
* runtime/MemoryStatistics.h: Added.
2010-09-09 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Added a regular expression tracing facility. This tracing is connected
to jsc. Every compiled regular expression object is added to a list.
When the process exits, each regular expression dumps its pattern,
JIT address, number of times it was executed and the number of matches.
This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
wtf/Platform.h.
https://bugs.webkit.org/show_bug.cgi?id=45401
* JavaScriptCore.exp:
* jsc.cpp:
(runWithScripts):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
(JSC::JSGlobalData::addRegExpToTrace):
(JSC::JSGlobalData::dumpRegExpTrace):
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
(JSC::RegExp::match):
* runtime/RegExp.h:
* wtf/Platform.h:
* yarr/RegexJIT.h:
(JSC::Yarr::RegexCodeBlock::getAddr):
2010-09-09 John Therrell <jtherrell@apple.com>
32-bit build fix.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::committedByteCount):
2010-09-09 John Therrell <jtherrell@apple.com>
Reviewed by Alexey Proskuryakov.
Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
https://bugs.webkit.org/show_bug.cgi?id=45134
Added thread-safe committed byte counting and reporting functionality to RegisterFile and
ExecutableAllocator.
* JavaScriptCore.exp:
Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
* interpreter/RegisterFile.cpp:
(JSC::registerFileStatisticsMutex):
Added function which returns a static Mutex used for locking during read/write access to
static committed byte count variable.
(JSC::RegisterFile::~RegisterFile):
Added call to addToStatistics since memory is decommitted here.
(JSC::RegisterFile::releaseExcessCapacity):
Added call to addToStatistics since memory is decommitted here.
(JSC::RegisterFile::initializeThreading):
Added function which calls registerFileStatisticsMutex().
(JSC::RegisterFile::committedByteCount):
Added function which returns the current committed byte count for RegisterFile.
(JSC::RegisterFile::addToCommittedByteCount):
Added function which updates committed byte count.
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
Added call to addToStatistics since memory is committed here.
(JSC::RegisterFile::grow):
Added call to addToStatistics since memory is committed here.
* jit/ExecutableAllocator.h:
Added function prototype for public static function committedByteCount().
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
Added call to addToStatistics since memory is decommitted here.
(JSC::FixedVMPoolAllocator::reuse):
Added call to addToStatistics since memory is committed here.
(JSC::FixedVMPoolAllocator::addToCommittedByteCount):
Added function which updates committed byte count.
(JSC::ExecutableAllocator::committedByteCount):
Added function which returns the current committed byte count for ExecutableAllocator.
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
Added call to RegisterFile::initializeThreading.
2010-09-09 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
<http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims
* API/JSObjectRef.cpp:
(JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion
failure. Instead map NULL directly to the null JSValue.
* API/tests/testapi.c:
(main): Add test coverage for the NULL value case.
2010-09-09 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Gavin Barraclough.
[Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler
https://bugs.webkit.org/show_bug.cgi?id=29268
* wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now.
2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Removing doneSemicolon label in the lexer
https://bugs.webkit.org/show_bug.cgi?id=45289
As a side effect of moving the multiline comment parsing
to a separate function, an opportunity raised to simplify
the single line comment parsing, and removing doneSemicolon
label. Slight performance increase on --parse-only
tests (from 32.8ms to 31.5ms)
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-09-08 Xan Lopez <xlopez@igalia.com>
Reviewed by Alexey Proskuryakov.
Remove accessor for private member variable in JSParser
https://bugs.webkit.org/show_bug.cgi?id=45378
m_token is private to JSParser, so it does not seem to be useful
to have an accessor for it. On top of that, the file was both
using the accessor and directly accessing the member variable,
only one style should be used.
2010-09-08 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Oliver Hunt.
[Qt] REGRESSION(63348): jsc is broken
https://bugs.webkit.org/show_bug.cgi?id=42818
Need fastcall conventions on Qt/Win/MinGW.
Based on patches of Gavin Barraclough: r63947 and r63948.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-09-08 Robert Hogan <robert@webkit.org>
Reviewed by Antonio Gomes.
Remove some unnecessary duplicate calls to string functions
https://bugs.webkit.org/show_bug.cgi?id=45314
* wtf/text/WTFString.cpp:
(WTF::String::format):
2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Andreas Kling.
Re-Disable JIT for MSVC 64bit to fix the build on this compiler.
https://bugs.webkit.org/show_bug.cgi?id=45382
It was enabled in the cleanup made in r64176, though it is still
not implemented.
* wtf/Platform.h:
2010-09-08 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Need a WebSocket implementation
https://bugs.webkit.org/show_bug.cgi?id=45197
Add a GIO-based WebSocket implementation.
* wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
* wtf/gobject/GRefPtr.h: Added new template specialization declarations.
* wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations.
2010-08-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Adler.
Handle MediaQueryExp memory management exclusively with smart pointers
https://bugs.webkit.org/show_bug.cgi?id=44874
Implemented a non-copying sort function to make it possible to sort a Vector
of OwnPtrs (which cannot be copied). This is required for the above.
* wtf/NonCopyingSort.h: Added.
(WTF::nonCopyingSort): It's secretly heapsort.
(WTF::heapSort): heapsort implementation.
(WTF::siftDown): Helper function for heapsort.
(WTF::heapify): ditto
Adjust build systems.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactoring multiline comments in the lexer
https://bugs.webkit.org/show_bug.cgi?id=45289
MultiLine comment parsing is moved to a separate function.
Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
SunSpider reports no change (from 523.1ms to 521.2ms).
* parser/Lexer.cpp:
(JSC::Lexer::parseMultilineComment):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-09-07 James Robinson <jamesr@chromium.org>
Compile fix attempt for windows.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-07 Mihai Parparita <mihaip@chromium.org>
Reviewed by James Robinson.
Fix Windows build after r66936
https://bugs.webkit.org/show_bug.cgi?id=45348
Add symbol names that were missing from r66936.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-09-07 Mihai Parparita <mihaip@chromium.org>
Reviewed by Oliver Hunt.
pushState and replaceState do not clone RegExp objects correctly
https://bugs.webkit.org/show_bug.cgi?id=44718
Move internal representation of JSC::RegExp (which depends on wether
YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
in the implementation only. This makes it feasible to use RegExp in
WebCore without bringing in all of YARR.
* JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
needed inside WebCore's JSC bindings.
* runtime/RegExp.cpp:
(JSC::RegExpRepresentation::~RegExpRepresentation):
(JSC::RegExp::RegExp):
(JSC::RegExp::~RegExp):
(JSC::RegExp::compile):
(JSC::RegExp::match):
* runtime/RegExp.h:
2010-09-07 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler.
<rdar://problem/8381749> -Wcast-align warning emitted when building with clang
Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
* Configurations/Base.xcconfig:
2010-09-07 Zoltan Horvath <zoltan@webkit.org>
Reviewed by Darin Adler.
REGRESSION(66741): Undefined pthread macros
https://bugs.webkit.org/show_bug.cgi?id=45246
PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux,
but used in a statement. Add an additional check to test this.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
2010-09-06 Oliver Hunt <oliver@apple.com>
Windows build fix
2010-09-05 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
SerializedScriptValue needs to use a flat storage mechanism
https://bugs.webkit.org/show_bug.cgi?id=45244
Export JSArray::put
* JavaScriptCore.exp:
2010-09-06 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Support JSVALUE32_64 on MIPS
https://bugs.webkit.org/show_bug.cgi?id=43999
Add missing functions to support JSVALUE32_64 on MIPS.
Remove JSVALUE32 as the default for MIPS.
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::divd):
(JSC::MIPSAssembler::mthc1):
(JSC::MIPSAssembler::cvtwd):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::neg32):
(JSC::MacroAssemblerMIPS::branchOr32):
(JSC::MacroAssemblerMIPS::set8):
(JSC::MacroAssemblerMIPS::loadDouble):
(JSC::MacroAssemblerMIPS::divDouble):
(JSC::MacroAssemblerMIPS::convertInt32ToDouble):
(JSC::MacroAssemblerMIPS::branchDouble):
(JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
(JSC::MacroAssemblerMIPS::zeroDouble):
* jit/JIT.h:
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
* jit/JITStubs.cpp:
(JSC::JITThunks::JITThunks):
* jit/JITStubs.h:
* wtf/Platform.h:
2010-09-06 Robert Hogan <robert@webkit.org>
Unreviewed, compile fix.
Fix compile failure in r66843
Revert to original patch in bugzilla. Leave bug open for
discussion on potential removal of double utf8 conversion.
https://bugs.webkit.org/show_bug.cgi?id=45240
* wtf/text/WTFString.cpp:
(WTF::String::format):
2010-09-06 Robert Hogan <robert@webkit.org>
Reviewed by Andreas Kling.
[Qt] utf8 encoding of console() messages
Unskip:
http/tests/security/xssAuditor/embed-tag-null-char.html
http/tests/security/xssAuditor/object-embed-tag-null-char.html
Both tests failed because Qt's implementation of String::format()
is casting a utf8 result to String, which assumes latin1 in
its constructor. So instead of casting a QString to a String, use
StringImpl::create() instead. Unfortunately, this involves a lot
of extra casts but the end result is correct.
https://bugs.webkit.org/show_bug.cgi?id=45240
* wtf/text/WTFString.cpp:
(WTF::String::format):
2010-09-03 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=45135
<rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
regardless of platform default, so that we can assert that it's held (this is for platforms
that don't have libdispatch).
(WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
is held.
(WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
can make unbalanced calls to dispatch_resume().
2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Martin Robinson.
[EFL] Regression (66531) Build break with Glib Support
https://bugs.webkit.org/show_bug.cgi?id=45011
Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
since when glib is enabled, EFL port needs it, too.
* CMakeListsEfl.txt: Include gobject directory to find new header
file.
* GNUmakefile.am: Ditto.
* wtf/CMakeListsEfl.txt: Ditto.
* wtf/Platform.h: Include header if port is EFL and glib support is
enabled.
* wtf/gtk/GtkTypedefs.h: Removed.
* wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
guarded by PLATFORM(GTK).
2010-09-03 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Simon Hausmann.
Fix warning in wtf/ByteArray.h
https://bugs.webkit.org/show_bug.cgi?id=44672
* wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
2010-09-02 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Actually parse a URL from ParsedURL
https://bugs.webkit.org/show_bug.cgi?id=45080
This patch only handles standard URLs. At some point we'll need to
distinguish between standard URLs and other kinds of URLs.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
2010-09-02 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add ParsedURL and URLString to WTFURL API
https://bugs.webkit.org/show_bug.cgi?id=45078
Currently there's no actual URL parsing going on, but this patch is a
start to sketching out the API.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp: Added.
(WTF::ParsedURL::ParsedURL):
(WTF::ParsedURL::scheme):
(WTF::ParsedURL::username):
(WTF::ParsedURL::password):
(WTF::ParsedURL::host):
(WTF::ParsedURL::port):
(WTF::ParsedURL::path):
(WTF::ParsedURL::query):
(WTF::ParsedURL::fragment):
(WTF::ParsedURL::segment):
* wtf/url/api/ParsedURL.h: Added.
(WTF::ParsedURL::spec):
* wtf/url/api/URLString.h: Added.
(WTF::URLString::URLString):
(WTF::URLString::string):
2010-09-02 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Add WTFURL to the JavaScriptCore build on Mac
https://bugs.webkit.org/show_bug.cgi?id=45075
Building code is good.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-09-02 Alexey Proskuryakov <ap@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=43230
<rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
One can't delete a ThreadSpecific object that has data in it. It's not even possible to
enumerate data objects in all threads, much less destroy them from a thread that's destroying
the ThreadSpecific.
* parser/JSParser.cpp:
(JSC::JSParser::JSParser):
* runtime/JSGlobalData.h:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::approximatedStackStart):
Moved stack guard tracking from JSGlobalData to WTFThreadData.
* wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
ever face a situation where we'd want to delete a ThreadSpecific object.
2010-09-01 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Oliver Hunt.
Ecma-262 15.11.1.1 states that if the argument is undefined then an
Error object's message property should be set to the empty string.
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
(JSC::ErrorInstance::create):
* runtime/ErrorInstance.h:
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
2010-08-31 Darin Adler <darin@apple.com>
Reviewed by Anders Carlsson.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
mixed types with code that uses size_t.
* wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
2010-08-31 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Isolate all GTK+ typedefs into one file
https://bugs.webkit.org/show_bug.cgi?id=44900
* GNUmakefile.am: Add GtkTypedefs.h to the source lists.
* wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
* wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
* wtf/gobject/GOwnPtr.h: Ditto.
* wtf/gobject/GRefPtr.h: Ditto.
* wtf/gtk/GtkTypedefs.h: Added.
2010-08-31 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Fix 'make dist' in preparation of the 1.3.3 release
https://bugs.webkit.org/show_bug.cgi?id=44978
* GNUmakefile.am: Adding missing headers to the sources list.
2010-08-31 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Support emit_op_mod() for MIPS
https://bugs.webkit.org/show_bug.cgi?id=42855
This patch uses MIPS div instructions for op_mod to improve performance.
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::div):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
2010-08-31 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Darin Adler.
Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
https://bugs.webkit.org/show_bug.cgi?id=44870
* wtf/Assertions.h:
* wtf/UnusedParam.h:
2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
JSC TimeoutChecker::didTimeOut overflows on ARM
https://bugs.webkit.org/show_bug.cgi?id=38538
Make getCPUTime() return values relative to the first call.
The previous implementation relied on simply on currentTime(), which
return a time since epoch and not a time since the thread started. This
made the return value of getCPUTime() overflow on 32 bits.
* runtime/TimeoutChecker.cpp:
(JSC::getCPUTime):
2010-08-30 Mihai Parparita <mihaip@chromium.org>
Reviewed by Adam Barth.
HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
https://bugs.webkit.org/show_bug.cgi?id=44315
Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
* wtf/Platform.h:
2010-08-30 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
Fix namespace for wtf/Complex.h and wtf/Vector3.h
https://bugs.webkit.org/show_bug.cgi?id=44892
* wtf/Complex.h:
* wtf/Vector3.h:
2010-08-30 Andy Estes <aestes@apple.com>
Reviewed by Eric Carlson.
Strings returned by asciiDebug() should be NULL-terminated.
https://bugs.webkit.org/show_bug.cgi?id=44866
* wtf/text/WTFString.cpp:
(asciiDebug):
2010-08-30 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactor number parsing in the lexer
https://bugs.webkit.org/show_bug.cgi?id=44104
Number parsing was full of gotos, and needed a complete
redesign to remove them (Only one remained). Furthermore
integer arithmetic is empolyed for fast cases (= small
integer numbers).
* parser/Lexer.cpp:
(JSC::Lexer::parseHex):
(JSC::Lexer::parseOctal):
(JSC::Lexer::parseDecimal):
(JSC::Lexer::parseNumberAfterDecimalPoint):
(JSC::Lexer::parseNumberAfterExponentIndicator):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-08-29 Darin Adler <darin@apple.com>
Fix Qt build.
* wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
* wtf/unicode/qt4/UnicodeQt4.h: Ditto.
* wtf/unicode/wince/UnicodeWince.h: Ditto.
2010-08-29 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Port vprintf_stderr_common
https://bugs.webkit.org/show_bug.cgi?id=33568
Use BREW's DBGPRINTF to output debug messages.
* wtf/Assertions.cpp:
2010-08-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
that the result is within bounds. This is problematic in the case of double-to-unsigned
conversion because we should be saturating to array length.
Also, the error return value from Array.splice should be [], not undefined.
I don't see any security concerns here. These methods are spec'ed in such a way that they
can be applied to non Array objects, so in all cases the (potentially bogus) indices are
being passed to functions that will safely check accesses are within bounds.
* runtime/ArrayPrototype.cpp:
(JSC::argumentClampedIndexFromStartOrEnd):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/JSValue.h:
(JSC::JSValue::toUInt32):
2010-08-28 Pratik Solanki <psolanki@apple.com>
Reviewed by Dan Bernstein.
Add an ENABLE define for purgeable memory support
https://bugs.webkit.org/show_bug.cgi?id=44777
* wtf/Platform.h:
2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
https://bugs.webkit.org/show_bug.cgi?id=43179
Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
NPAPI Plugin Cache. The flag is enabled by default.
* wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
2010-07-27 Jer Noble <jer.noble@apple.com>
Reviewed by Eric Carlson.
Add JavaScript API to allow a page to go fullscreen.
rdar://problem/6867795
https://bugs.webkit.org/show_bug.cgi?id=43099
* wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
2010-08-27 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 2.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-27 Gavin Barraclough <barraclough@apple.com>
Windows build fix pt 1.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
These methods should be using a version of dtoa that can generate results accurate
to the requested precision, whereas our version of dtoa is only currently able to
support producing results sufficiently accurate to distinguish the value from any
other IEEE-754 double precision number.
This change has no impact on benchmarks we track.
On microbenchmarks for these functions, this is a slight regression where a high
precision is requested (dtoa now need to iterate further to generate a a greater
number of digits), but with smaller precision values (hopefully more common) this
improves performance, since it reduced the accurate of result dtoa is required,
to produce, and removes the need to pre-round values before calling dtoa.
* JavaScriptCore.exp:
doubleToStringInJavaScriptFormat renamed to numberToString
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
doubleToStringInJavaScriptFormat renamed to numberToString
* runtime/UString.cpp:
(JSC::UString::number):
doubleToStringInJavaScriptFormat renamed to numberToString
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
Remove all pre-rounding of values, instead call dtoa correctly.
* wtf/dtoa.cpp:
(WTF::dtoa):
* wtf/dtoa.h:
Reenable support for rounding to specific-figures/decimal-places in dtoa.
Modify to remove unbiased rounding, provide ECMA required away-from-zero.
Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
numberToString.
2010-08-27 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Byte alignment issue on MIPS
https://bugs.webkit.org/show_bug.cgi?id=29415
MIPS accesses one byte at a time for now to avoid the help from the
kernel to fix unaligned accesses.
* wtf/text/AtomicString.cpp:
(WebCore::equal):
* wtf/text/StringHash.h:
(WebCore::StringHash::equal):
2010-08-27 Xan Lopez <xlopez@igalia.com>
Reviewed by Tor Arne Vestbø.
Fix a couple of typos in comment.
* bytecode/CodeBlock.h:
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* wtf/dtoa.cpp:
2010-08-26 Gavin Barraclough <baraclough@apple.com>
Reviewed by Sam Weinig.
Bug 44735 - Clean up dtoa.cpp
Remove unused & unmaintained code paths, reformat code to match
coding standard & use platform #defines from Platform.h directly.
* wtf/dtoa.cpp:
(WTF::storeInc):
(WTF::multadd):
(WTF::s2b):
(WTF::lo0bits):
(WTF::mult):
(WTF::pow5mult):
(WTF::lshift):
(WTF::diff):
(WTF::ulp):
(WTF::b2d):
(WTF::d2b):
(WTF::ratio):
(WTF::):
(WTF::strtod):
(WTF::quorem):
(WTF::dtoa):
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Rubber Stamped by Oliver Hunt.
Partially revert r65959. The toString changes regressed the v8 tests,
but keep the toFixed/toExponential/toPrecision changes.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/NumberPrototype.cpp:
* runtime/UString.cpp:
(JSC::UString::number):
* wtf/DecimalNumber.h:
* wtf/dtoa.cpp:
(WTF::append):
(WTF::doubleToStringInJavaScriptFormat):
* wtf/dtoa.h:
* wtf/text/WTFString.cpp:
* wtf/text/WTFString.h:
2010-08-26 James Robinson <jamesr@chromium.org>
Reviewed by Darin Fisher.
[chromium] Remove the USE(GLES2_RENDERING) define and associated code
https://bugs.webkit.org/show_bug.cgi?id=43761
Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
* wtf/Platform.h:
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Rolling out r64608, this regressed performance.
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::~LinkBuffer):
(JSC::LinkBuffer::performFinalization):
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::executableCopy):
* assembler/X86Assembler.h:
(JSC::X86Assembler::executableCopy):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::initGetByIdSelfList):
(JSC::StructureStubInfo::initGetByIdProtoList):
(JSC::StructureStubInfo::initPutByIdTransition):
* jit/ExecutableAllocator.cpp:
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::create):
(JSC::ExecutableAllocator::ExecutableAllocator):
(JSC::ExecutableAllocator::poolForSize):
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::allocInternal):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compileGetByIdProto):
(JSC::JIT::compileGetByIdSelfList):
(JSC::JIT::compileGetByIdProtoList):
(JSC::JIT::compileGetByIdChainList):
(JSC::JIT::compileGetByIdChain):
(JSC::JIT::compilePutByIdTransition):
(JSC::JIT::compilePatchGetArrayLength):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::getPolymorphicAccessStructureListSlot):
* jit/JITStubs.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
* runtime/ExceptionHelpers.cpp:
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
2010-08-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Brady Eidson.
Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
* wtf/text/WTFString.cpp:
(asciiDebug):
Return a Vector<char> containing the contents of a string as ASCII.
2010-08-26 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Add PassOwnArrayPtr
https://bugs.webkit.org/show_bug.cgi?id=44627
* GNUmakefile.am:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add the new files.
* wtf/Forward.h:
Forward declare PassOwnArrayPtr.
* wtf/OwnArrayPtr.h:
Mimic the OwnPtr interface.
* wtf/OwnArrayPtrCommon.h: Added.
(WTF::deleteOwnedArrayPtr):
Move delete function here so it can be shared by OwnArrayPtr and
PassOwnArrayPtr.
* wtf/PassOwnArrayPtr.h: Added.
Mimic the PassOwnPtr interface.
2010-08-26 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
[JSC] JavaScript parsing error when loading Equifax web page
https://bugs.webkit.org/show_bug.cgi?id=42900
'-->' is ostensibly only meant to occur when there is only
whitespace preceeding it on the line. However firefox treats
multiline comments as a space character, so they are allowed.
One side effect of the firefox model is that any line terminators
inside the multiline comment are ignored, so
foo/*
*/-->
is treated as
foo -->
and so '-->' will not be a comment in this case. Happily this simply
means that to fix this issue all we need to do is stop updating
m_atLineStart when handling multiline comments.
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-08-25 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Improve overflow handling in StringImpl::Replace
https://bugs.webkit.org/show_bug.cgi?id=42502
<rdar://problem/8203794>
Harden StringImpl::replace against overflow -- I can't see how this
could be abused, but it's better to be safe than sorry.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
2010-08-26 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
https://bugs.webkit.org/show_bug.cgi?id=44624
Clean up GNUmakefile.am.
* GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
a couple include lines from the top-level GNUmakefile.am.
2010-08-25 Xan Lopez <xlopez@igalia.com>
Reviewed by Kent Tamura.
Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
https://bugs.webkit.org/show_bug.cgi?id=29259
Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
* wtf/dtoa.cpp:
(WTF::s2b):
2010-08-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kevin Ollivier.
[BREWMP] Add build system
https://bugs.webkit.org/show_bug.cgi?id=44645
Make waf script portable so that we can add more ports.
* wscript:
2010-08-25 Michael Saboff <msaboff@apple.com>
Reviewed by Sam Weinig.
Remove the single entry regular expression cache introduced as part of
the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
The performance problem in Dromaeo that initiated that bug is no
longer present. Dromaeo has been modified so that the regular
expression tests are somewhat random and don't benefit from a
single entry cache.
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::match):
* runtime/RegExp.h:
2010-08-25 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
Cairo and EFL port shouldn't depend on glib.
https://bugs.webkit.org/show_bug.cgi?id=44354
Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
GRefPtr.h.
* GNUmakefile.am: Add PlatformRefPtr.h to the source list.
* wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
(WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
(WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
(WTF::PlatformRefPtr::clear): Ditto.
(WTF::PlatformRefPtr::get): Ditto.
(WTF::PlatformRefPtr::operator*): Ditto.
(WTF::PlatformRefPtr::operator->): Ditto.
(WTF::PlatformRefPtr::operator!): Ditto.
(WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
(WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
(WTF::::operator): Ditto.
(WTF::::swap): Ditto.
(WTF::swap): Ditto.
(WTF::operator==): Ditto.
(WTF::operator!=): Ditto.
(WTF::static_pointer_cast): Ditto.
(WTF::const_pointer_cast): Ditto.
(WTF::getPtr): Ditto.
(WTF::adoptPlatformRef): Ditto.
* wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
* wtf/gobject/GRefPtr.h: Ditto.
(WTF::refPlatformPtr):
(WTF::derefPlatformPtr):
2010-08-25 Xan Lopez <xlopez@igalia.com>
Reviewed by Alexey Proskuryakov.
Remove dead code in JSGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=44615
The recursion data member in the JSGlobalObject and its getter
plus inc/dec methods seems to be unused, remove them.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
2010-08-25 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Changed the initial and subsequent allocation of vector storage to
Array()s. The changes are to limit sparse arrays to 100000 entries
and fixed the sparse map to vector storage conversion to use the
minimum amount of memory needed to store the current number of entries.
These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
* runtime/JSArray.cpp:
(JSC::JSArray::putSlowCase):
(JSC::JSArray::getNewVectorLength):
2010-08-16 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Avoid increasing required alignment of target type warning
https://bugs.webkit.org/show_bug.cgi?id=43963
Fix platform independent alignment warnings.
* wtf/ListHashSet.h:
(WTF::ListHashSetNodeAllocator::pool):
2010-08-19 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Enable truncated floating point feature on ARM
https://bugs.webkit.org/show_bug.cgi?id=44233
Enable truncated floating point feature with the help of VCVTR.S32.F64
instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit
integer/register, it saturates at INT_MAX or INT_MIN. Testing this
looks quicker than testing FPSCR for exception.
Inspired by Jacob Bramley's patch from JaegerMonkey
* assembler/ARMAssembler.h:
(JSC::ARMAssembler::):
(JSC::ARMAssembler::cmn_r):
(JSC::ARMAssembler::vcvtr_s32_f64_r):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
(JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
2010-08-24 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-24 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::intPow10):
* wtf/dtoa.cpp:
* wtf/dtoa.h:
2010-08-23 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=44487
Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated
code & unnecessary complexity. Add a new DecimalNumber class to encapsulate
double to string conversion, share the implementations of rounding &
decimal-fraction/exponential formatting.
* JavaScriptCore.exp:
Update exports.
* runtime/NumberPrototype.cpp:
(JSC::toThisNumber):
(JSC::getIntegerArgumentInRange):
Helper methods used in implementing toExponential/toFixed/toString.
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
Reimplemented using new DecimalNumber class.
* runtime/UString.cpp:
(JSC::UString::number):
Updated to call numberToString.
* wtf/DecimalNumber.h: Added.
(WTF::):
(WTF::DecimalNumber::DecimalNumber):
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
(WTF::DecimalNumber::sign):
(WTF::DecimalNumber::exponent):
(WTF::DecimalNumber::significand):
(WTF::DecimalNumber::precision):
(WTF::DecimalNumber::init):
(WTF::DecimalNumber::isZero):
(WTF::DecimalNumber::roundToPrecision):
New class to perform double to string conversion.
Has three constructors, which allow conversion with no rounding,
rounding to significant-figures, or rounding to decimal-places,
and two methods for formatting strings, either using decimal
fraction or exponential encoding. Internal implementation uses
pre-rounding of the values before calling dtoa rather than
relying on dtoa to correctly round, which does not produce
fully accurate results. Hopefully we can address this in the
near future.
* wtf/dtoa.cpp:
(WTF::intPow10):
* wtf/dtoa.h:
intPow10 is used internally by DecimalNumber.
* wtf/text/WTFString.cpp:
(WTF::copyToString):
(WTF::nanOrInfToString):
Used internally in numberToString for NaN/Infinity handling.
(WTF::numberToString):
Added new method to convert doubles to strings.
* wtf/text/WTFString.h:
Added declaration for numberToString. This is here because
we should switch over to using this for all double to string
conversion in WebCore (see section 2.4.4.3 of the HTML5 spec).
2010-08-24 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Don't seed the JS random number generator from time()
https://bugs.webkit.org/show_bug.cgi?id=41868
<rdar://problem/8171025>
Switch to using the secure random number generator to
seed the fast random generator, and make the generator
be per global object.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
(JSC::JSGlobalObject::weakRandomNumber):
* runtime/MathObject.cpp:
(JSC::mathProtoFuncRandom):
2010-08-24 Oliver Hunt <oliver@apple.com>
Reviewed by Beth Dakin.
Make overflow guards in UString::utf8 explicit
https://bugs.webkit.org/show_bug.cgi?id=44540
Add an explicit overflow check prior to allocating our buffer,
rather than implicitly relying on the guard in convertUTF16ToUTF8.
* runtime/UString.cpp:
(JSC::UString::utf8):
2010-08-24 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Simon Hausmann.
[Symbian] Fix commit/decommit of system memory using RChunk
Swap accidentially reversed start and m_base values for determining the
offset within the RChunk.
* wtf/PageReservation.h:
(WTF::PageReservation::systemCommit):
(WTF::PageReservation::systemDecommit):
2010-08-23 Patrick Gansterer <paroga@paroga.com>
Rubber-stamped by Gabor Loki.
[WINCE] Buildfix for GeneratedJITStubs after r64818
https://bugs.webkit.org/show_bug.cgi?id=44469
Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#".
* jit/JITStubs.cpp:
2010-08-23 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
[REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition
https://bugs.webkit.org/show_bug.cgi?id=44240
<rdar://problem/8328995>
Fix an error I introduced when cleaning up the interpreter side of the logic
to prevent setters being called in object initialisers.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-08-23 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Fixed case where a single character search string in a string.replace()
did not properly handle back reference replacement. The fix is to
check for a '$' as part of the check to see if we can execute the
single character replace optimization.
https://bugs.webkit.org/show_bug.cgi?id=44067
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
2010-08-23 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
JSON.stringify is much slower than Firefox on particular pathological input
https://bugs.webkit.org/show_bug.cgi?id=44456
Make StringBuilder::reserveCapacity reserve additional space so we don't end up
repeatedly copying the entire result string.
* runtime/StringBuilder.h:
(JSC::StringBuilder::append):
(JSC::StringBuilder::reserveCapacity):
2010-08-23 Jian Li <jianli@chromium.org>
Reviewed by Darin Fisher.
Handle blob resource.
https://bugs.webkit.org/show_bug.cgi?id=43941
* JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle.
2010-08-19 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Geoffrey Garen.
JSC: Move the static_cast into to(U)Int32 fast case
https://bugs.webkit.org/show_bug.cgi?id=44037
Do the static_cast<(u)int32_t> inline to avoid the function call overhead
for easily converted values (within (u)int32_t range.)
* runtime/JSValue.cpp:
(JSC::toInt32SlowCase):
(JSC::toUInt32SlowCase):
* runtime/JSValue.h:
(JSC::JSValue::toInt32):
(JSC::JSValue::toUInt32):
2010-08-18 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Geoffrey Garen.
REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
https://bugs.webkit.org/show_bug.cgi?id=43742
Add codegen for pow() to return Int32 values when possible.
* jit/ThunkGenerators.cpp:
(JSC::powThunkGenerator):
2010-08-18 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64
https://bugs.webkit.org/show_bug.cgi?id=43897
A 64 bits wide member in a structure is aligned to 8 bytes on ARM by
default, but this is not taken into account in the offset defines of
JITStackFrame.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-08-18 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Rename UString::substr to substringSharingImpl, add to WTF::String.
Now WTF::String can do everything that JSC::UString can do!
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::escapeQuotes):
* bytecompiler/NodesCodegen.cpp:
(JSC::substitute):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::getRange):
* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseInt):
* runtime/JSONObject.cpp:
(JSC::gap):
(JSC::Stringifier::indent):
(JSC::Stringifier::unindent):
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::trimString):
* runtime/UString.cpp:
(JSC::UString::substringSharingImpl):
* runtime/UString.h:
* wtf/text/WTFString.cpp:
(WTF::String::substringSharingImpl):
* wtf/text/WTFString.h:
2010-08-18 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-08-18 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-08-17 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 44146 - Remove toDouble/toUInt32 methods from UString.
These methods all implement JavaScript language specific behaviour, and as such
are not suited to being on a generic string object. They are also inefficient
and incorrectly used, refactor & cleanup. Uses of these methods really divide
out into two cases.
ToNumber:
Uses of toDouble from JSString and from parseFloat are implementing ecma's
ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
should largely just be moved out to a global jsToNumber function. ToNumber is
capable of recognizing either decimal or hexadecimal numbers, but parseFloat
should only recognize decimal values. This is currently handled by testing for
hexadecimal before calling toDouble, which should unnecessary - instead we can
just split out the two parts to the grammar into separate functions. Also,
strtod recognizes a set of literals (nan, inf, and infinity - all with any
capitalization) - which are not defined by any of the specs we are implementing.
To handle this we need to perform additional work in toDouble to convert the
unsupported cases of infinities back to NaNs. Instead we should simply remove
support for this literals from strtod. This should provide a more desirable
behaviour for all clients of strtod.
Indexed properties:
Uses of the toStrictUInt32 methods are were all converting property names to
indices, and all uses of toUInt32 were incorrect; in all cases we should have
been calling toUInt32. This error results in some incorrect behaviour in the
DOM (accessing property "0 " of a NodeList should fail; it currently does not).
Move this method onto Identifier (our canonical property name), and make it
always perform a strict conversion. Add a layout test to check NodeList does
convert indexed property names correctly.
* JavaScriptCore.exp:
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/Identifier.cpp:
(JSC::Identifier::toUInt32):
* runtime/Identifier.h:
(JSC::Identifier::toUInt32):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
(JSC::Identifier::toArrayIndex):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::getOwnPropertySlot):
(JSC::JSByteArray::getOwnPropertyDescriptor):
(JSC::JSByteArray::put):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::isInfinity):
(JSC::jsHexIntegerLiteral):
(JSC::jsStrDecimalLiteral):
(JSC::jsToNumber):
(JSC::parseFloat):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSString.cpp:
(JSC::JSString::getPrimitiveNumber):
(JSC::JSString::toNumber):
(JSC::JSString::getStringPropertyDescriptor):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::put):
* runtime/StringObject.cpp:
(JSC::StringObject::deleteProperty):
* runtime/UString.cpp:
* runtime/UString.h:
* wtf/dtoa.cpp:
(WTF::strtod):
2010-08-17 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find
Bug 44080 introuduced a couple of cases in which array bounds could be overrun.
One of these was fixed in r65493, this patch fixes the other and address the
concerns voiced in comment #6 by restructuring the loops to remove the code
dupliction without introducing an additional if check.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringCase):
(WTF::StringImpl::reverseFind):
(WTF::StringImpl::reverseFindIgnoringCase):
2010-08-17 No'am Rosenthal <noam.rosenthal@nokia.com>
Reviewed by Ariya Hidayat.
[Qt] Move the accelerated compositing build flag to the right place
https://bugs.webkit.org/show_bug.cgi?id=43882
* wtf/Platform.h:
2010-08-17 Yuta Kitamura <yutak@chromium.org>
Reviewed by Shinichiro Hamaji.
Avoid uninitialized memory read in StringImpl::find().
REGRESSION(r65468): Crashes in StringImpl::find
https://bugs.webkit.org/show_bug.cgi?id=44099
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
2010-08-16 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Add VectorTraits to String & DefaultHash traits to UString to unify behaviour.
* runtime/UString.h:
(JSC::UStringHash::hash):
(JSC::UStringHash::equal):
(WTF::):
* wtf/text/WTFString.h:
(WTF::):
2010-08-16 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Remove unnecessary includes from UString.h, add new includes as necessary.
* profiler/CallIdentifier.h:
* profiler/ProfileNode.h:
* runtime/DateConversion.cpp:
* runtime/Identifier.h:
(JSC::IdentifierRepHash::hash):
* runtime/RegExpCache.h:
* runtime/RegExpKey.h:
* runtime/UString.cpp:
(JSC::UString::substr):
* runtime/UString.h:
* wtf/text/WTFString.h:
2010-08-16 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Bug 44080 - String find/reverseFind methods need tidying up
These methods have a couple of problems with their interface, and implementation.
These methods take and int index, and return an int - however this is problematic
since on 64-bit string indices may have a full 32-bit range. This spills out into
surrounding code, which unsafely casts string indices from unsigned to int. Code
checking the result of these methods check for a mix of "== -1", "< 0", and
"== notFound". Clean this up by changing these methods to take an unsigned
starting index, and return a size_t. with a failed match indicated by notFound.
reverseFind also has a special meaning for the starting index argument, in that a
negative index is interpreted as an offset back from the end of the string. Remove
this functionality, in the (1!) case where it is used we should just calculate the
offset by subtracting from the string's length.
The implementation has a few problems too. The code is not in webkit style, in
using assorted abbreviations in variable names, and implementations of similar
find methods with differing argument types were unnecessarily inconsistent. When
find is passed const char* data the string would be handled as latin1 (zero
extended to UTF-16) for all characters but the first; this is sign extended.
Case-insensitive find is broken for unicode strings; the hashing optimization is
not unicode safe, and could result in false negatives.
Unify UString find methods to match String.
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::escapeQuotes):
* bytecompiler/NodesCodegen.cpp:
(JSC::substitute):
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExpKey.h:
(JSC::RegExpKey::getFlagsValue):
* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):
(JSC::substituteBackreferences):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSplit):
* runtime/UString.cpp:
* runtime/UString.h:
(JSC::UString::find):
(JSC::UString::reverseFind):
* wtf/text/AtomicString.h:
(WTF::AtomicString::find):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::StringImpl::findCaseInsensitive):
(WTF::StringImpl::reverseFind):
(WTF::StringImpl::reverseFindCaseInsensitive):
(WTF::StringImpl::endsWith):
(WTF::StringImpl::replace):
* wtf/text/StringImpl.h:
(WTF::StringImpl::startsWith):
* wtf/text/WTFString.cpp:
(WTF::String::split):
* wtf/text/WTFString.h:
(WTF::String::find):
(WTF::String::reverseFind):
(WTF::String::findCaseInsensitive):
(WTF::String::reverseFindCaseInsensitive):
(WTF::String::contains):
(WTF::find):
(WTF::reverseFind):
2010-08-16 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, do not build WebCore as a convenience library as this leads to
errors in the Win build w/export symbols and causes problems with DOM bindings
debugging in gdb.
* wscript:
2010-08-16 Leandro Pereira <leandro@profusion.mobi>
[EFL] Build fix after r65366.
* CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if
they're empty.
* jsc/CMakeLists.txt: Ditto.
* wtf/CMakeLists.txt: Ditto.
2010-08-15 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, don't build intermediate source in DerivedSources dir.
* wscript:
2010-08-14 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kenneth Rohde Christiansen.
[CMake] Add preprocessor detection for generator scripts
https://bugs.webkit.org/show_bug.cgi?id=43984
* CMakeLists.txt:
2010-08-14 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kenneth Rohde Christiansen.
[CMake] Set target properties only if available
https://bugs.webkit.org/show_bug.cgi?id=43978
* CMakeLists.txt:
* jsc/CMakeLists.txt:
* wtf/CMakeLists.txt:
2010-08-13 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, add CString to the list of forwards.
* wtf/Forward.h:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Windows build fix
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Switch String::/UString::ascii() to return a CString.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/SamplingTool.cpp:
(JSC::SamplingTool::dump):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::dumpCaller):
* jsc.cpp:
(runWithScripts):
(runInteractive):
* runtime/Identifier.h:
(JSC::Identifier::ascii):
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::print):
* runtime/UString.cpp:
(JSC::UString::ascii):
(JSC::UString::latin1):
* runtime/UString.h:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::asciiOLD):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
(WTF::String::ascii):
(WTF::String::latin1):
* wtf/text/WTFString.h:
2010-08-13 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Avoid increasing required alignment of target type warning on ARM
https://bugs.webkit.org/show_bug.cgi?id=38045
The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
increases required alignment of target type warnings.
Casting the type of [pointer to Type2] object to void* bypasses the
warning.
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::putShortUnchecked):
(JSC::AssemblerBuffer::putIntUnchecked):
(JSC::AssemblerBuffer::putInt64Unchecked):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):
* jit/JITStubs.cpp:
* pcre/pcre_compile.cpp:
(jsRegExpCompile):
* runtime/JSArray.cpp:
(JSC::JSArray::putSlowCase):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::New):
(WTF::TCMalloc_Central_FreeList::Populate):
* wtf/MD5.cpp:
(WTF::reverseBytes):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/StdLibExtras.h:
(isPointerTypeAlignmentOkay):
(reinterpret_cast_ptr):
* wtf/Vector.h:
(WTF::VectorBuffer::inlineBuffer):
* wtf/qt/StringQt.cpp:
(WTF::String::String):
2010-08-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Unify UString::UTF8String() & String::utf8() methods,
remove UString::cost() & make atArrayIndex a free function.
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
* jsc.cpp:
(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):
* pcre/pcre_exec.cpp:
(Histogram::~Histogram):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::c_str):
* profiler/Profile.cpp:
(JSC::Profile::debugPrintDataSampleStyle):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/DateConversion.cpp:
(JSC::parseDate):
* runtime/Identifier.h:
(JSC::Identifier::toStrictUInt32):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
(JSC::toArrayIndex):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::parseInt):
(JSC::globalFuncJSCPrint):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
* runtime/UString.cpp:
(JSC::UString::toDouble):
(JSC::putUTF8Triple):
(JSC::UString::utf8):
* runtime/UString.h:
(JSC::UString::~UString):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
* wtf/text/WTFString.h:
(WTF::String::~String):
(WTF::String::swap):
(WTF::String::isNull):
(WTF::String::isEmpty):
(WTF::String::impl):
(WTF::String::length):
(WTF::String::String):
(WTF::String::isHashTableDeletedValue):
2010-08-12 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Gavin Barraclough.
Refactoring the fpu code generator for the ARM port
https://bugs.webkit.org/show_bug.cgi?id=43842
Support up to 32 double precision registers, and the
recent VFP instruction formats. This patch is mainly
a style change which keeps the current functionality.
* assembler/ARMAssembler.h:
(JSC::ARMRegisters::):
(JSC::ARMAssembler::):
(JSC::ARMAssembler::emitInst):
(JSC::ARMAssembler::emitDoublePrecisionInst):
(JSC::ARMAssembler::emitSinglePrecisionInst):
(JSC::ARMAssembler::vadd_f64_r):
(JSC::ARMAssembler::vdiv_f64_r):
(JSC::ARMAssembler::vsub_f64_r):
(JSC::ARMAssembler::vmul_f64_r):
(JSC::ARMAssembler::vcmp_f64_r):
(JSC::ARMAssembler::vsqrt_f64_r):
(JSC::ARMAssembler::vmov_vfp_r):
(JSC::ARMAssembler::vmov_arm_r):
(JSC::ARMAssembler::vcvt_f64_s32_r):
(JSC::ARMAssembler::vcvt_s32_f64_r):
(JSC::ARMAssembler::vmrs_apsr):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::addDouble):
(JSC::MacroAssemblerARM::divDouble):
(JSC::MacroAssemblerARM::subDouble):
(JSC::MacroAssemblerARM::mulDouble):
(JSC::MacroAssemblerARM::sqrtDouble):
(JSC::MacroAssemblerARM::convertInt32ToDouble):
(JSC::MacroAssemblerARM::branchDouble):
(JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r65295.
http://trac.webkit.org/changeset/65295
https://bugs.webkit.org/show_bug.cgi?id=43950
It broke 4 sputnik tests (Requested by Ossy on #webkit).
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
* jsc.cpp:
(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):
* pcre/pcre_exec.cpp:
(Histogram::~Histogram):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::c_str):
* profiler/Profile.cpp:
(JSC::Profile::debugPrintDataSampleStyle):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/DateConversion.cpp:
(JSC::parseDate):
* runtime/Identifier.h:
(JSC::Identifier::Identifier):
(JSC::Identifier::toArrayIndex):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::parseInt):
(JSC::globalFuncJSCPrint):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
* runtime/UString.cpp:
(JSC::UString::toDouble):
(JSC::UString::UTF8String):
* runtime/UString.h:
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::UString::~UString):
(JSC::UString::toArrayIndex):
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
* wtf/text/WTFString.h:
(WTF::String::String):
(WTF::String::isHashTableDeletedValue):
(WTF::String::length):
(WTF::String::operator[]):
(WTF::String::isNull):
(WTF::String::isEmpty):
(WTF::String::impl):
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Unify UString::UTF8String() & String::utf8() methods,
remove UString::cost() & make atArrayIndex a free function.
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
* jsc.cpp:
(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):
* pcre/pcre_exec.cpp:
(Histogram::~Histogram):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::c_str):
* profiler/Profile.cpp:
(JSC::Profile::debugPrintDataSampleStyle):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/DateConversion.cpp:
(JSC::parseDate):
* runtime/Identifier.h:
(JSC::Identifier::toStrictUInt32):
* runtime/JSArray.cpp:
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::deleteProperty):
* runtime/JSArray.h:
(JSC::toArrayIndex):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::parseInt):
(JSC::globalFuncJSCPrint):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
* runtime/UString.cpp:
(JSC::UString::toDouble):
(JSC::putUTF8Triple):
(JSC::UString::utf8):
* runtime/UString.h:
(JSC::UString::~UString):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
* wtf/text/WTFString.cpp:
(WTF::String::utf8):
* wtf/text/WTFString.h:
(WTF::String::~String):
(WTF::String::swap):
(WTF::String::isNull):
(WTF::String::isEmpty):
(WTF::String::impl):
(WTF::String::length):
(WTF::String::String):
(WTF::String::isHashTableDeletedValue):
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Eeerk! - revert accidentally committed changes in UString!
* JavaScriptCore.exp:
* runtime/UString.cpp:
(JSC::UString::UString):
* runtime/UString.h:
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Change UString constructors to match those in WTF::String.
This changes behaviour of UString((char*)0) to create null
strings, akin to UString() rather than UString::empty().
(This matches String). Remove unused constructors from
UString, and add null-terminated UTF-16 constructor, to
match String. Move String's constructor into the .cpp to
match UString.
* JavaScriptCore.exp:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::calculatedFunctionName):
* runtime/RegExpKey.h:
(JSC::RegExpKey::RegExpKey):
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::createSingleCharacterString):
* runtime/UString.cpp:
(JSC::UString::UString):
* runtime/UString.h:
(JSC::UString::UString):
(JSC::UString::swap):
(JSC::UString::adopt):
(JSC::UString::operator[]):
* wtf/text/WTFString.h:
(WTF::String::String):
(WTF::String::adopt):
(WTF::String::operator[]):
2010-08-12 David Levin <levin@chromium.org>
Reviewed by NOBODY (build fix).
* runtime/UString.h: Removed unneccessary #include.
2010-08-12 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig
Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
This appears to have degraded performance.
* runtime/UString.cpp:
(JSC::UString::ascii):
* runtime/UString.h:
(JSC::UString::length):
(JSC::UString::isEmpty):
(JSC::UString::~UString):
2010-08-12 Csaba Osztrogonác <ossy@webkit.org>
Reviewed by Antonio Gomes.
[Qt] Fix warnings: unknown conversion type character 'l' in format
https://bugs.webkit.org/show_bug.cgi?id=43359
Qt port doesn't call any printf in String::format(...), consequently
using __attribute__((format(printf,m,n))) is incorrect and causes
false positive warnings on Windows if you build with MinGW.
Qt port calls QString::vsprintf(...) , which is platform
independent, and handles %lli, %llu and %llx on all platforms.
(http://trac.webkit.org/changeset/35712)
* wtf/text/WTFString.h:
2010-08-12 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Fix the array subscript is above array bounds warning in ByteArray on ARM.
https://bugs.webkit.org/show_bug.cgi?id=43358
The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861
* wtf/ByteArray.cpp:
(WTF::ByteArray::create):
2010-08-12 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Martin Robinson.
[GTK] Use GSettings to save/restore Web Inspector settings
https://bugs.webkit.org/show_bug.cgi?id=43512
* wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our
GSettings support.
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
2010-08-12 Gabor Loki <loki@webkit.org>
Reviewed by Simon Hausmann.
The scratch register should be saved in YARR with ARM JIT
https://bugs.webkit.org/show_bug.cgi?id=43910
Reported by Jocelyn Turcotte.
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateEnter):
(JSC::Yarr::RegexGenerator::generateReturn):
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-11 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Geoffrey Garen.
Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date,
which means isNaN(new Date("")) should return true.
https://bugs.webkit.org/show_bug.cgi?id=43793
Tests: fast/js/date-constructor.html
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::resetDateCache):
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Windows & !JIT build fix.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::match):
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Rubber stamp by sam weinig
Touch a file to stop the bot rolling a bit change out!
* runtime/UString.cpp:
(JSC::UString::ascii):
2010-08-11 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards.
* wtf/Forward.h:
2010-08-11 Gavin Barraclough <barraclough@apple.com>
Rubber stamps by Darin Adler & Sam Weinig.
Bug 43867 - Some UString cleanup
Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit().
* API/JSClassRef.cpp:
(OpaqueJSClass::~OpaqueJSClass):
(OpaqueJSClass::className):
* API/OpaqueJSString.cpp:
(OpaqueJSString::create):
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::idName):
(JSC::CodeBlock::registerName):
(JSC::regexpName):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::get):
* bytecompiler/NodesCodegen.cpp:
(JSC::ResolveNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::processClauseList):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createRegex):
* parser/ParserArena.h:
(JSC::IdentifierArena::makeNumericIdentifier):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::data):
(JSC::UStringSourceProvider::length):
* profiler/Profiler.cpp:
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyNames):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
* runtime/ExceptionHelpers.cpp:
* runtime/FunctionConstructor.cpp:
* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
* runtime/Identifier.h:
(JSC::Identifier::characters):
(JSC::Identifier::length):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::decode):
(JSC::parseInt):
(JSC::parseFloat):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
* runtime/JSNumberCell.cpp:
(JSC::JSNumberCell::toString):
* runtime/JSONObject.cpp:
(JSC::gap):
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::indent):
(JSC::Stringifier::unindent):
(JSC::Walker::walk):
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
(JSC::JSString::getIndexSlowCase):
* runtime/JSString.h:
(JSC::RopeBuilder::JSString):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::RopeBuilder::fiberCount):
(JSC::jsSingleCharacterSubstring):
(JSC::jsNontrivialString):
(JSC::JSString::getIndex):
(JSC::jsString):
(JSC::jsStringWithFinalizer):
(JSC::jsSubstring):
(JSC::jsOwnedString):
* runtime/JSStringBuilder.h:
(JSC::JSStringBuilder::append):
* runtime/LiteralParser.h:
(JSC::LiteralParser::Lexer::Lexer):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/NumericStrings.h:
(JSC::NumericStrings::add):
(JSC::NumericStrings::lookupSmallString):
* runtime/Operations.h:
(JSC::jsString):
* runtime/RegExp.cpp:
(JSC::RegExp::match):
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getRightContext):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::match):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncToString):
* runtime/StringBuilder.h:
(JSC::StringBuilder::append):
* runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.
(JSC::):
(JSC::sumWithOverflow):
(JSC::tryMakeString):
(JSC::makeString):
* runtime/StringObject.cpp:
(JSC::StringObject::getOwnPropertyNames):
* runtime/StringPrototype.cpp:
(JSC::substituteBackreferencesSlow):
(JSC::localeCompare):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
(JSC::trimString):
* runtime/UString.cpp:
(JSC::UString::number):
(JSC::UString::ascii):
(JSC::UString::operator[]):
(JSC::UString::toDouble):
(JSC::UString::find):
(JSC::UString::rfind):
(JSC::UString::substr):
(JSC::operator==):
(JSC::operator<):
(JSC::operator>):
(JSC::UString::UTF8String):
* runtime/UString.h:
(JSC::UString::UString):
(JSC::UString::adopt):
(JSC::UString::length):
(JSC::UString::characters):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::operator==):
(JSC::operator!=):
(JSC::codePointCompare):
(JSC::UString::toArrayIndex):
(JSC::IdentifierRepHash::hash):
(WTF::):
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
* yarr/RegexParser.h:
(JSC::Yarr::Parser::Parser):
2010-08-11 Gabor Loki <loki@webkit.org>
Qt build fix (ARMv7).
Fix invalid conversion from int to Condition.
Add ARMv7Assembler.cpp to JavaScriptCore.pro.
* JavaScriptCore.pro:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::):
(JSC::ARMv7Assembler::JmpSrc::JmpSrc):
2010-08-11 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
At collection time, we frequently want to mark a cell, while checking
whether it was originally checked. Previously, this was a get
operation follwed by a set operation. Fusing the two saves
computation and gives a 0.5% sunspider speedup.
* runtime/Collector.h:
(JSC::CollectorBitmap::getset):
(JSC::Heap::checkMarkCell):
* runtime/JSArray.h:
(JSC::MarkStack::drain):
* runtime/JSCell.h:
(JSC::MarkStack::append):
2010-08-11 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
Improve vsprops copying for Windows build
https://bugs.webkit.org/show_bug.cgi?id=41982
When we detect a new SDK, always copy a new set of vsprops files.
Previously, if someone updated their SDK after updating their sources,
they could end up with out-of-date vsprops files.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2010-08-10 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Add leakRef and clear to all RefPtr variants
https://bugs.webkit.org/show_bug.cgi?id=42389
* API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
"template<...>". We should probably put this in the style guide and do it
consitently. Fixed other minor style issues. Defined many of the inlined
functions outside the class definition, to avoid style checker warnings
about multiple statements on a single line and for slightly better clarity
of the class definition itself. Renamed releaseRef to leakRef. Added a
releaseRef that calls leakRef so we don't have to rename all callers oat
once. Added a clear function.
* wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
n
* wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
"template<...>". Tidied up declarations and comments a bit.
Changed all uses of releaseRef to leakRef.
* wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
"template<...>". Defined many of the inlined functions outside the class
definition, to avoid style checker warnings about multiple statements on
a single line and for slightly better clarity of the class definition itself.
Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
don't have to rename all callers at once. Added a clear function.
2010-08-10 Dumitru Daniliuc <dumi@chromium.org>
Unreviewed, reverting an unintentional change to a file submitted in r65108.
* bytecode/CodeBlock.h:
(JSC::binaryChop):
2010-08-10 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Bug 43817 - Remove UString::Rep
UString::Rep has for a long time been replaced by UStringImpl (Rep
remaining as a typedef). UStringImpl has since been removed too
(unified with StringImpl). Remove Rep, rename rep() to impl() and
m_rep to m_impl. Also add impl() method to Identifier, and rename
its UString member from _ustring to m_string.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertySlot):
(JSC::::put):
(JSC::::deleteProperty):
(JSC::::getOwnPropertyNames):
(JSC::::staticValueGetter):
(JSC::::staticFunctionGetter):
* API/JSClassRef.cpp:
(tryCreateStringFromUTF8):
(OpaqueJSClass::OpaqueJSClass):
(OpaqueJSClass::~OpaqueJSClass):
(OpaqueJSClassContextData::OpaqueJSClassContextData):
* API/JSClassRef.h:
* API/OpaqueJSString.cpp:
(OpaqueJSString::ustring):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::get):
* bytecode/JumpTable.h:
(JSC::StringJumpTable::offsetForValue):
(JSC::StringJumpTable::ctiForValue):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addVar):
(JSC::BytecodeGenerator::addGlobalVar):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::addParameter):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::willResolveToArguments):
(JSC::BytecodeGenerator::uncheckedRegisterForArguments):
(JSC::BytecodeGenerator::constRegisterFor):
(JSC::BytecodeGenerator::isLocal):
(JSC::BytecodeGenerator::isLocalConstant):
(JSC::BytecodeGenerator::addConstant):
(JSC::BytecodeGenerator::emitLoad):
(JSC::BytecodeGenerator::findScopedProperty):
(JSC::keyForCharacterSwitch):
(JSC::prepareJumpTableForStringSwitch):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::processClauseList):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* parser/JSParser.cpp:
(JSC::JSParser::parseStrictObjectLiteral):
* pcre/pcre_exec.cpp:
(Histogram::add):
* profiler/CallIdentifier.h:
(JSC::CallIdentifier::Hash::hash):
* profiler/Profile.cpp:
* profiler/ProfileNode.cpp:
(JSC::ProfileNode::debugPrintDataSampleStyle):
* profiler/ProfileNode.h:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
* runtime/Identifier.cpp:
(JSC::Identifier::equal):
(JSC::IdentifierCStringTranslator::hash):
(JSC::IdentifierCStringTranslator::equal):
(JSC::IdentifierCStringTranslator::translate):
(JSC::Identifier::add):
(JSC::IdentifierUCharBufferTranslator::hash):
(JSC::IdentifierUCharBufferTranslator::equal):
(JSC::IdentifierUCharBufferTranslator::translate):
(JSC::Identifier::addSlowCase):
* runtime/Identifier.h:
(JSC::Identifier::Identifier):
(JSC::Identifier::ustring):
(JSC::Identifier::impl):
(JSC::Identifier::data):
(JSC::Identifier::size):
(JSC::Identifier::ascii):
(JSC::Identifier::isNull):
(JSC::Identifier::isEmpty):
(JSC::Identifier::toUInt32):
(JSC::Identifier::toStrictUInt32):
(JSC::Identifier::toArrayIndex):
(JSC::Identifier::toDouble):
(JSC::Identifier::equal):
(JSC::Identifier::add):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::displayName):
* runtime/JSFunction.cpp:
(JSC::JSFunction::displayName):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::addStaticGlobals):
* runtime/JSStaticScopeObject.h:
(JSC::JSStaticScopeObject::JSStaticScopeObject):
* runtime/JSString.h:
(JSC::):
(JSC::RopeBuilder::appendStringInConstruct):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::jsSingleCharacterSubstring):
(JSC::jsSubstring):
* runtime/JSVariableObject.cpp:
(JSC::JSVariableObject::deleteProperty):
(JSC::JSVariableObject::symbolTableGet):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::symbolTableGet):
(JSC::JSVariableObject::symbolTablePut):
(JSC::JSVariableObject::symbolTablePutWithAttributes):
* runtime/Lookup.cpp:
(JSC::HashTable::createTable):
(JSC::HashTable::deleteTable):
* runtime/Lookup.h:
(JSC::HashEntry::initialize):
(JSC::HashEntry::setKey):
(JSC::HashEntry::key):
(JSC::HashTable::entry):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyMapEntry::PropertyMapEntry):
* runtime/PropertyNameArray.cpp:
(JSC::PropertyNameArray::add):
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):
* runtime/RegExp.cpp:
(JSC::RegExp::match):
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::create):
* runtime/RegExpKey.h:
(JSC::RegExpKey::RegExpKey):
* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::rep):
(JSC::SmallStrings::singleCharacterStringRep):
* runtime/SmallStrings.h:
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
* runtime/Structure.cpp:
(JSC::Structure::~Structure):
(JSC::Structure::despecifyDictionaryFunction):
(JSC::Structure::addPropertyTransitionToExistingStructure):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::copyPropertyTable):
(JSC::Structure::get):
(JSC::Structure::despecifyFunction):
(JSC::Structure::put):
(JSC::Structure::hasTransition):
(JSC::Structure::remove):
(JSC::Structure::checkConsistency):
* runtime/Structure.h:
(JSC::Structure::get):
(JSC::Structure::hasTransition):
* runtime/StructureTransitionTable.h:
* runtime/SymbolTable.h:
* runtime/UString.cpp:
(JSC::UString::UString):
(JSC::UString::toStrictUInt32):
(JSC::UString::substr):
* runtime/UString.h:
(JSC::UString::UString):
(JSC::UString::adopt):
(JSC::UString::data):
(JSC::UString::size):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::impl):
(JSC::UString::cost):
(JSC::operator==):
(JSC::codePointCompare):
(JSC::IdentifierRepHash::hash):
(WTF::):
2010-08-10 Gavin Barraclough <barraclough@apple.com>
Bug 43816 - Remove UStringImpl
The class was actually removed a long time ago, replaced by StringImpl.
UStringImpl is just a typedef onto StringImpl. Remove this.
* API/JSClassRef.cpp:
(OpaqueJSClass::OpaqueJSClass):
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSString.cpp:
(JSC::JSString::resolveRope):
(JSC::JSString::replaceCharacter):
* runtime/JSString.h:
(JSC::RopeBuilder::RopeIterator::operator*):
(JSC::RopeBuilder::JSString):
(JSC::RopeBuilder::appendStringInConstruct):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::jsSingleCharacterSubstring):
(JSC::jsSubstring):
* runtime/JSStringBuilder.h:
(JSC::jsMakeNontrivialString):
* runtime/RopeImpl.cpp:
(JSC::RopeImpl::derefFibersNonRecursive):
* runtime/RopeImpl.h:
(JSC::RopeImpl::deref):
* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::SmallStringsStorage):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCodeSlowCase):
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
* runtime/UString.cpp:
(JSC::initializeUString):
* runtime/UString.h:
(JSC::UString::adopt):
(JSC::tryMakeString):
(JSC::makeString):
* runtime/UStringImpl.h: Removed.
2010-08-10 Patrick Gansterer <paroga@paroga.com>
Reviewed by Eric Seidel.
Make FastMalloc more portable.
https://bugs.webkit.org/show_bug.cgi?id=41790
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2010-08-10 Patrick Gansterer <paroga@paroga.com>
Reviewed by David Levin.
[WINCE] Buildfix for CE 6.0
https://bugs.webkit.org/show_bug.cgi?id=43027
CE 6.0 doesn't define localtime in the system include files.
* wtf/Platform.h: Include ce_time.h on all OS(WINCE).
2010-08-10 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Bug 43786 - Move AtomicStringHash from WebCore to WTF
Also remove deprecated string headers from WebCore/platform/text.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/text/AtomicString.h:
* wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h.
2010-08-09 Oliver Hunt <oliver@apple.com>
Fix Qt/ARM again, this time including the other changed file.
* jit/JIT.h:
2010-08-09 Oliver Hunt <oliver@apple.com>
Fix Qt/ARM
C++ overload resolution I stab at thee
* jit/JITInlineMethods.h:
(JSC::JIT::beginUninterruptedSequence):
(JSC::JIT::endUninterruptedSequence):
2010-08-09 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Allow an assembler/macroassembler to compact branches to more concise forms when linking
https://bugs.webkit.org/show_bug.cgi?id=43745
This patch makes it possible for an assembler to convert jumps into a different
(presumably more efficient) form at link time. Currently implemented in the
ARMv7 JIT as that already had logic to delay linking of jumps until the end of
compilation already. The ARMv7 JIT chooses between either a 4 byte short jump
or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does
not yet produce the most compact form possible. The general design of the linker
should make it relatively simple to introduce new branch types with little effort,
as the linker has no knowledge of the exact form of any of the branches.
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARMv7Assembler.cpp: Added.
(JSC::):
Record jump sizes
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::LinkRecord::LinkRecord):
(JSC::ARMv7Assembler::LinkRecord::from):
(JSC::ARMv7Assembler::LinkRecord::setFrom):
(JSC::ARMv7Assembler::LinkRecord::to):
(JSC::ARMv7Assembler::LinkRecord::type):
(JSC::ARMv7Assembler::LinkRecord::linkType):
(JSC::ARMv7Assembler::LinkRecord::setLinkType):
Encapsulate LinkRecord fields so we can compress the values somewhat
(JSC::ARMv7Assembler::JmpSrc::JmpSrc):
Need to record the jump type now
(JSC::ARMv7Assembler::b):
(JSC::ARMv7Assembler::blx):
(JSC::ARMv7Assembler::bx):
Need to pass the jump types
(JSC::ARMv7Assembler::executableOffsetFor):
(JSC::ARMv7Assembler::jumpSizeDelta):
(JSC::ARMv7Assembler::linkRecordSourceComparator):
(JSC::ARMv7Assembler::computeJumpType):
(JSC::ARMv7Assembler::convertJumpTo):
(JSC::ARMv7Assembler::recordLinkOffsets):
(JSC::ARMv7Assembler::jumpsToLink):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::unlinkedCode):
Helper functions for the linker
(JSC::ARMv7Assembler::linkJump):
(JSC::ARMv7Assembler::canBeShortJump):
(JSC::ARMv7Assembler::linkLongJump):
(JSC::ARMv7Assembler::linkShortJump):
(JSC::ARMv7Assembler::linkJumpAbsolute):
Moving code around for the various jump linking functions
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::beginUninterruptedSequence):
(JSC::AbstractMacroAssembler::endUninterruptedSequence):
We have to track uninterrupted sequences in any assembler that compacts
branches as that's not something we're allowed to do in such sequences.
AbstractMacroAssembler has a nop version of these functions as it makes the
code elsewhere nicer.
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::link):
(JSC::LinkBuffer::patch):
(JSC::LinkBuffer::locationOf):
(JSC::LinkBuffer::locationOfNearCall):
(JSC::LinkBuffer::returnAddressOffset):
(JSC::LinkBuffer::trampolineAt):
Updated these functions to adjust for any changed offsets in the linked code
(JSC::LinkBuffer::applyOffset):
A helper function to deal with the now potentially moved labels
(JSC::LinkBuffer::linkCode):
The new and mighty linker function
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
(JSC::MacroAssemblerARMv7::beginUninterruptedSequence):
(JSC::MacroAssemblerARMv7::endUninterruptedSequence):
(JSC::MacroAssemblerARMv7::jumpsToLink):
(JSC::MacroAssemblerARMv7::unlinkedCode):
(JSC::MacroAssemblerARMv7::computeJumpType):
(JSC::MacroAssemblerARMv7::convertJumpTo):
(JSC::MacroAssemblerARMv7::recordLinkOffsets):
(JSC::MacroAssemblerARMv7::jumpSizeDelta):
(JSC::MacroAssemblerARMv7::link):
(JSC::MacroAssemblerARMv7::jump):
(JSC::MacroAssemblerARMv7::branchMul32):
(JSC::MacroAssemblerARMv7::breakpoint):
(JSC::MacroAssemblerARMv7::nearCall):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::ret):
(JSC::MacroAssemblerARMv7::tailRecursiveCall):
(JSC::MacroAssemblerARMv7::executableOffsetFor):
(JSC::MacroAssemblerARMv7::inUninterruptedSequence):
(JSC::MacroAssemblerARMv7::makeJump):
(JSC::MacroAssemblerARMv7::makeBranch):
All branches need to pass on their type now
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::returnLastBytes):
We can't know ahead of time how much space will be necessary to
hold the linked code if we're compacting branches, this new
function allows us to return the unused bytes at the end of linking
* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compile):
The JIT class now needs to take a linker offset so that recompilation
can generate the same jumps when using branch compaction.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitSlow_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
Update for new trampolineAt changes
* wtf/FastMalloc.cpp:
(WTF::TCMallocStats::):
* wtf/Platform.h:
2010-08-09 Gavin Barraclough <barraclough@apple.com>
Qt build fix III.
* wtf/text/WTFString.h:
2010-08-09 Gavin Barraclough <barraclough@apple.com>
Qt build fix.
* wtf/qt/StringQt.cpp:
2010-08-06 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Bug 43594 - Add string forwards to Forward.h
This allows us to remove forward declarations for these classes from
WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64938.
http://trac.webkit.org/changeset/64938
https://bugs.webkit.org/show_bug.cgi?id=43685
Did not compile on several ports (Requested by abarth on
#webkit).
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssembler.h:
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::load32):
(JSC::MacroAssemblerX86::store32):
* assembler/X86Assembler.h:
(JSC::X86Assembler::movl_rm):
(JSC::X86Assembler::movl_mr):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/Instruction.h:
(JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
(JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
(JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::deref):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::):
* jit/JIT.h:
* jit/JITMarkObjects.cpp: Removed.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::setupPolymorphicProtoList):
* wtf/Platform.h:
2010-08-07 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
The JIT code contains a number of direct references to GC'd objects.
When we have movable objects, these references will need to be
updated.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::int32AtLocation):
(JSC::AbstractMacroAssembler::pointerAtLocation):
(JSC::AbstractMacroAssembler::jumpTarget):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::loadPtrWithPatch):
Normally, loadPtr will optimize when the register is eax. Since
the slightly smaller instruction changes the offsets, it messes up
our ability to repatch the code. We added this new instruction
that garuntees a constant size.
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::load32WithPatch):
Changed load32 in the same way described above.
(JSC::MacroAssemblerX86::load32):
Moved the logic to optimize laod32 from movl_mr to load32
(JSC::MacroAssemblerX86::store32):
Moved the logic to optimize store32 from movl_rm to store32
* assembler/X86Assembler.h:
(JSC::X86Assembler::movl_rm):
(JSC::X86Assembler::movl_mr):
(JSC::X86Assembler::int32AtLocation):
(JSC::X86Assembler::pointerAtLocation):
(JSC::X86Assembler::jumpTarget):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* bytecode/Instruction.h:
As described in StructureStubInfo.h, we needed to add additional
fields to both StructureStubInfo and
PolymorphicAccessStructureList so that we can determine the
structure of the JITed code at patch time.
(JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
(JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::markAggregate):
Added this function to mark the JITed code that correosponds to
this structure stub info.
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::):
* jit/JIT.h:
* jit/JITMarkObjects.cpp: Added.
(JSC::JIT::patchPrototypeStructureAddress):
(JSC::JIT::patchGetDirectOffset):
(JSC::JIT::markGetByIdProto):
(JSC::JIT::markGetByIdChain):
(JSC::JIT::markGetByIdProtoList):
(JSC::JIT::markPutByIdTransition):
(JSC::JIT::markGlobalObjectReference):
* jit/JITPropertyAccess.cpp:
Added asserts for the patch offsets.
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::setupPolymorphicProtoList):
* wtf/Platform.h:
Added ENABLE_MOVABLE_GC_OBJECTS flag
2010-08-07 Michael Saboff <msaboff@apple.com>
Reviewed by Geoffrey Garen.
Revert JSArray to point to the beginning of the contained ArrayStorage
struct. This is described in
https://bugs.webkit.org/show_bug.cgi?id=43526.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::getNewVectorLength):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
2010-08-07 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator
https://bugs.webkit.org/show_bug.cgi?id=43399
m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR).
* runtime/JSGlobalData.h:
2010-08-07 Patrick Roland Gansterer <paroga@paroga.com>
Reviewed by Eric Seidel.
[Qt] Enable JIT on WinCE
https://bugs.webkit.org/show_bug.cgi?id=43303
Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm.
* DerivedSources.pro:
2010-08-07 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef
from SimpleFontData to FontPlatformData.
https://bugs.webkit.org/show_bug.cgi?id=43674
* wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h.
2010-08-07 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Eric Seidel.
Bitmap.h has no default constructor
https://bugs.webkit.org/show_bug.cgi?id=43619
Without a constructor, the initial bits of the Bitmap class
are undefinied. If only a few, or zero bits are 0, the memory
area provided by AlignedMemoryAllocator can be easly exhausted.
Csaba Osztrogonác helped to find this bug.
* wtf/Bitmap.h:
(WTF::::Bitmap):
2010-08-06 Rafael Antognolli <antognolli@profusion.mobi>
[EFL] Build fix.
* CMakeLists.txt: add runtime/CGHandle.cpp.
2010-08-06 Jessie Berlin <jberlin@apple.com>
Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
Unreviewed.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-06 Jessie Berlin <jberlin@apple.com>
Windows Build Fix (continued). Unreviewed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-06 Jessie Berlin <jberlin@apple.com>
Windows Build Fix. Unreviewed.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
Add GCHandle.h and GCHandle.cpp.
2010-08-06 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
https://bugs.webkit.org/show_bug.cgi?id=43207
WeakGCPtr's should instead of directly pointing to the GC'd object
should be directed to an array of pointers that can be updated for
movable objects.
* Android.mk:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/Collector.cpp:
(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::updateWeakGCHandles):
(JSC::WeakGCHandlePool::update):
(JSC::Heap::addWeakGCHandle):
(JSC::Heap::markRoots):
* runtime/Collector.h:
(JSC::Heap::weakGCHandlePool):
* runtime/GCHandle.cpp: Added.
(JSC::WeakGCHandle::pool):
(JSC::WeakGCHandlePool::WeakGCHandlePool):
(JSC::WeakGCHandlePool::allocate):
(JSC::WeakGCHandlePool::free):
(JSC::WeakGCHandlePool::operator new):
* runtime/GCHandle.h: Added.
(JSC::WeakGCHandle::isValidPtr):
(JSC::WeakGCHandle::isPtr):
(JSC::WeakGCHandle::isNext):
(JSC::WeakGCHandle::invalidate):
(JSC::WeakGCHandle::get):
(JSC::WeakGCHandle::set):
(JSC::WeakGCHandle::getNextInFreeList):
(JSC::WeakGCHandle::setNextInFreeList):
(JSC::WeakGCHandlePool::isFull):
* runtime/WeakGCPtr.h:
(JSC::WeakGCPtr::WeakGCPtr):
(JSC::WeakGCPtr::~WeakGCPtr):
(JSC::WeakGCPtr::get):
(JSC::WeakGCPtr::clear):
(JSC::WeakGCPtr::assign):
(JSC::get):
2010-08-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Antonio Gomes.
[Qt] Fix warnings about difference in symbol visiblity on Mac OS X
* jsc.pro:
2010-08-06 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactor identifier parsing in lexer
https://bugs.webkit.org/show_bug.cgi?id=41845
The code is refactored to avoid gotos. The new code
has the same performance as the old one.
SunSpider --parse-only: no change (from 34.0ms to 33.6ms)
SunSpider: no change (from 523.2ms to 523.5ms)
* parser/Lexer.cpp:
(JSC::Lexer::parseIdent):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-08-06 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
The ARM JIT does not support JSValue32_64 with RVCT
https://bugs.webkit.org/show_bug.cgi?id=43411
JSValue32_64 is enabled for RVCT by default.
* create_jit_stubs:
* jit/JITStubs.cpp:
(JSC::ctiTrampoline):
(JSC::ctiVMThrowTrampoline):
(JSC::ctiOpThrowNotCaught):
* wtf/Platform.h:
2010-08-05 Chao-ying Fu <fu@mips.com>
Reviewed by Darin Adler.
Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS
https://bugs.webkit.org/show_bug.cgi?id=43514
MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that
RenderArena::allocate() can return 8-byte aligned memory to avoid
exceptions on sdc1/ldc1.
* wtf/Platform.h:
2010-08-05 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig
Bug 43594 - Add string forwards to Forward.h
This allows us to remove forward declarations for these classes from
WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2010-08-05 Geoffrey Garen <ggaren@apple.com>
Reviewed by Mark Rowe.
Fixed leak seen on buildbot.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
since anything less would be uncivilized.
2010-08-05 Andy Estes <aestes@apple.com>
Reviewed by David Kilzer.
Rename iOS-related OS and PLATFORM macros.
https://bugs.webkit.org/show_bug.cgi?id=43493
Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to
WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to
WTF_PLATFORM_IOS_SIMULATOR.
* jit/ExecutableAllocator.h:
* jit/JITStubs.cpp:
* profiler/ProfilerServer.mm:
(-[ProfilerServer init]):
* wtf/FastMalloc.cpp:
(WTF::TCMallocStats::):
* wtf/Platform.h:
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2010-08-05 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=43464
Currently, the global object is being embedded in the JavaScriptCore
bytecode, however since the global object is the same for all opcodes
in a code block, we can have the global object just be a member of the
associated code block.
Additionally, I added an assert inside of emitOpcode that verifies
that the last generated opcode was of the correct length.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::derefStructures):
(JSC::CodeBlock::markAggregate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::globalObject):
(JSC::GlobalCodeBlock::GlobalCodeBlock):
(JSC::ProgramCodeBlock::ProgramCodeBlock):
(JSC::EvalCodeBlock::EvalCodeBlock):
(JSC::FunctionCodeBlock::FunctionCodeBlock):
* bytecode/Opcode.h:
(JSC::opcodeLength):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitOpcode):
Added an assert to check that the last generated opcode is the
correct length.
(JSC::BytecodeGenerator::rewindBinaryOp):
Changed the last opcode to op_end since the length will no longer
be correct.
(JSC::BytecodeGenerator::rewindUnaryOp):
Changed the last opcode to op_end since the length will no longer
be correct.
(JSC::BytecodeGenerator::emitResolve):
(JSC::BytecodeGenerator::emitGetScopedVar):
(JSC::BytecodeGenerator::emitPutScopedVar):
(JSC::BytecodeGenerator::emitResolveWithBase):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::privateExecute):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_resolve_global):
(JSC::JIT::emitSlow_op_resolve_global):
(JSC::JIT::emit_op_resolve_global_dynamic):
(JSC::JIT::emitSlow_op_resolve_global_dynamic):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_resolve_global):
(JSC::JIT::emitSlow_op_resolve_global):
* jit/JITStubs.cpp:
(JSC::cti_op_resolve_global):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
2010-08-05 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 43185 - Switch RegisterFile over to use PageAllocation
Remove platform-specific memory allocation code.
* interpreter/RegisterFile.cpp:
(JSC::RegisterFile::~RegisterFile):
(JSC::RegisterFile::releaseExcessCapacity):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):
(JSC::RegisterFile::checkAllocatedOkay):
* wtf/PageAllocation.cpp:
(WTF::PageAllocation::lastError):
* wtf/PageAllocation.h:
(WTF::PageAllocation::allocate):
(WTF::PageAllocation::allocateAt):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::pageSize):
(WTF::PageAllocation::isPageAligned):
(WTF::PageAllocation::isPowerOfTwo):
* wtf/PageReservation.h:
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::reserve):
(WTF::PageReservation::reserveAt):
2010-08-05 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array
content aren't properly initialized as part of unshift.
* runtime/JSArray.cpp:
(JSC::JSArray::unshiftCount):
2010-08-05 Jian Li <jianli@chromium.org>
Reviewed by David Levin.
Unify blob related feature defines to ENABLE(BLOB).
https://bugs.webkit.org/show_bug.cgi?id=43081
* Configurations/FeatureDefines.xcconfig:
2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Rubber-stamped by Xan Lopez.
Remove GHashTable left-overs. GHashTable is ref-counted, and is
correctly supported by GRefPtr.
* wtf/gobject/GOwnPtr.h:
2010-08-05 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Unreviewed.
Typo fix that makes distcheck happy.
* GNUmakefile.am:
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt and Beth Dakin.
https://bugs.webkit.org/show_bug.cgi?id=43461
Invalid NaN parsing
* wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a
non-standard NaN representation, since our NaN encoding assumes that all
true NaNs have the standard bit pattern.
* API/JSValueRef.cpp:
(JSValueMakeNumber): Don't allow an API client to accidentally specify
a non-standard NaN either.
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Windows build fix part II.
* wtf/PageReservation.h:
(WTF::PageReservation::systemReserve):
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
* wtf/PageReservation.h:
(WTF::PageReservation::systemReserve):
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Build fix - add new header to !Mac projects.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
The PageAllocation class has a number of issues:
* Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
blocks of memory for the GC heap, instead of allocating RChunks. Revert this change in
behaviour.
* In order for PageAllocation to work correctly on WinCE we should be decommitting memory
before deallocating. In order to simplify understanding the expected state at deallocate,
split behaviour out into PageAllocation and PageReservation classes. Require that all
memory be decommitted before calling deallocate on a PageReservation, add asserts to
enforce this.
* add many missing asserts.
* inline more functions.
* remove ability to create sub-PageAllocations from an existing PageAllocations object -
this presented an interface that would allow sub regions to be deallocated, which would
not have provided expected behaviour.
* remove writable/executable arguments to commit, this value can be cached at the point
the memory is reserved.
* remove writable/executable arguments to allocateAligned, protection other than RW is not
supported.
* add missing checks for overflow & failed allocation to mmap path through allocateAligned.
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::Allocation::Allocation):
(JSC::ExecutablePool::Allocation::base):
(JSC::ExecutablePool::Allocation::size):
(JSC::ExecutablePool::Allocation::operator!):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::coalesceFreeSpace):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::allocInternal):
* runtime/AlignedMemoryAllocator.h:
(JSC::::allocate):
(JSC::::AlignedMemoryAllocator):
* runtime/Collector.cpp:
(JSC::Heap::allocateBlock):
* runtime/Collector.h:
* wtf/PageAllocation.cpp:
* wtf/PageAllocation.h:
(WTF::PageAllocation::operator!):
(WTF::PageAllocation::allocate):
(WTF::PageAllocation::allocateAt):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::deallocate):
(WTF::PageAllocation::pageSize):
(WTF::PageAllocation::systemAllocate):
(WTF::PageAllocation::systemAllocateAt):
(WTF::PageAllocation::systemAllocateAligned):
(WTF::PageAllocation::systemDeallocate):
(WTF::PageAllocation::systemPageSize):
* wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::reserve):
(WTF::PageReservation::reserveAt):
(WTF::PageReservation::deallocate):
(WTF::PageReservation::systemCommit):
(WTF::PageReservation::systemDecommit):
(WTF::PageReservation::systemReserve):
(WTF::PageReservation::systemReserveAt):
* wtf/Platform.h:
2010-08-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64655.
http://trac.webkit.org/changeset/64655
https://bugs.webkit.org/show_bug.cgi?id=43496
JavaScriptCore references patch seems to have caused
regressions in QT and GTK builds (Requested by nlawrence on
#webkit).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* runtime/Collector.cpp:
(JSC::Heap::markConservatively):
* runtime/JSCell.h:
(JSC::JSValue::asCell):
(JSC::MarkStack::append):
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
* runtime/JSObject.h:
(JSC::JSObject::prototype):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSValue.h:
(JSC::JSValue::):
(JSC::JSValue::JSValue):
(JSC::JSValue::asCell):
* runtime/MarkStack.h:
* runtime/NativeErrorConstructor.cpp:
* runtime/NativeErrorConstructor.h:
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
2010-08-04 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Enable JSVALUE64 for CPU(PPC64).
Basic browsing seems to work.
* wtf/Platform.h:
2010-08-04 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Darin Adler.
Refactoring MarkStack::append to take a reference. This is in
preparation for movable objects when we will need to update pointers.
http://bugs.webkit.org/show_bug.cgi?id=41177
Unless otherwise noted, all changes are to either return by reference
or pass a reference to MarkStack::append.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::markAggregate):
* runtime/Collector.cpp:
(JSC::Heap::markConservatively):
Added a temporary variable to prevent marking from changing an
unknown value on the stack
* runtime/JSCell.h:
(JSC::JSValue::asCell):
(JSC::MarkStack::append):
(JSC::MarkStack::appendInternal):
* runtime/JSGlobalObject.cpp:
(JSC::markIfNeeded):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::object):
* runtime/JSObject.h:
(JSC::JSObject::prototype):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::markChildren):
* runtime/JSValue.h:
(JSC::JSValue::JSValue):
(JSC::JSValue::asCell):
* runtime/MarkStack.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::createStructure):
Changed the structure flags to include a custom markChildren.
(JSC::NativeErrorConstructor::markChildren):
Update the prototype of the stored structure.
* runtime/NativeErrorConstructor.h:
Added structure flags.
* runtime/Structure.h:
(JSC::Structure::storedPrototype):
2010-08-03 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Oliver Hunt.
Tightened up some get_by_id_chain* code generation
https://bugs.webkit.org/show_bug.cgi?id=40935
This is in the style of
https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to
call accessor functions when it was not necessary to directly access
the private variables.
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::testPrototype):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
2010-08-03 Adam Roben <aroben@apple.com>
Turn on PLATFORM_STRATEGIES on Windows
Fixes <http://webkit.org/b/43431>.
Reviewed by Anders Carlsson.
* wtf/Platform.h:
2010-08-04 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Enable JSValue32_64 for GCC on ARM by default
https://bugs.webkit.org/show_bug.cgi?id=43410
* wtf/Platform.h:
2010-08-03 Gavin Barraclough <barraclough@apple.com>
Speculative windows build fix.
* wtf/Bitmap.h:
2010-08-03 Gavin Barraclough <barraclough@apple.com>
Build fix following r64624.
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/PageAllocation.h:
2010-08-03 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=43269
Added new allocateAligned methods to PageAllocation. In order to
prevent a regress in performance, the function needs to be inlined.
Additionally, I ported the symbian block allocator to use
PageAllocation and added a new WTF::Bitmap class to support this.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/AlignedMemoryAllocator.h: Added.
(JSC::AlignedMemory::deallocate):
(JSC::AlignedMemory::base):
(JSC::AlignedMemory::AlignedMemory):
(JSC::AlignedMemoryAllocator::destroy):
(JSC::AlignedMemoryAllocator::allocate):
(JSC::AlignedMemoryAllocator::AlignedMemoryAllocator):
(JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator):
(JSC::AlignedMemoryAllocator::free):
* runtime/Collector.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::freeBlocks):
(JSC::Heap::allocate):
(JSC::Heap::shrinkBlocks):
(JSC::Heap::markConservatively):
(JSC::Heap::clearMarkBits):
(JSC::Heap::markedCells):
* runtime/Collector.h:
(JSC::CollectorHeap::collectorBlock):
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::operator*):
(JSC::LiveObjectIterator::operator++):
(JSC::DeadObjectIterator::operator++):
* wtf/Bitmap.h: Added.
(WTF::Bitmap::get):
(WTF::Bitmap::set):
(WTF::Bitmap::clear):
(WTF::Bitmap::clearAll):
(WTF::Bitmap::advanceToNextFreeBit):
(WTF::Bitmap::count):
(WTF::Bitmap::isEmpty):
(WTF::Bitmap::isFull):
* wtf/PageAllocation.h:
(WTF::PageAllocation::operator UnspecifiedBoolType):
(WTF::PageAllocation::allocateAligned):
(WTF::PageAllocation::reserveAligned):
* wtf/Platform.h:
* wtf/symbian: Removed.
* wtf/symbian/BlockAllocatorSymbian.cpp: Removed.
* wtf/symbian/BlockAllocatorSymbian.h: Removed.
2010-08-03 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Fix for https://bugs.webkit.org/show_bug.cgi?id=43314. The prior code
was using the wrong "length" value to move array contents when adding
space to the beginning of an array for an unshift() or similar
operation. Instead of using m_vectorLength, the length of the
allocated JSValue array, the code was using m_length, the declared
length of the array. These two values do not need to match.
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSArray.cpp:
(JSC::JSArray::increaseVectorPrefixLength):
2010-08-03 Chao-ying Fu <fu@mips.com>
Reviewed by Gavin Barraclough.
Fix following https://bugs.webkit.org/show_bug.cgi?id=43089
(accidentally inverted a compiler version check).
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
2010-08-03 Patrick Gansterer <paroga@paroga.com>
Reviewed by Gavin Barraclough.
Implement DEFINE_STUB_FUNCTION for WinCE.
https://bugs.webkit.org/show_bug.cgi?id=34953
* jit/JITStubs.cpp:
(JSC::):
(JSC::DEFINE_STUB_FUNCTION):
2010-08-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43390 - Do not CRASH if we run out of room for jit code.
Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated.
The assemblers should pass this through without trying to use it in executableCopy.
Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this.
Change the JIT to throw an exception if allocation fails.
Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path).
Change YARR JIT to fallback to PCRE
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::executableCopy):
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::allocationSuccessful):
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::executableCopy):
* assembler/X86Assembler.h:
(JSC::X86Assembler::executableCopy):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::initGetByIdProto):
(JSC::StructureStubInfo::initGetByIdChain):
(JSC::StructureStubInfo::initGetByIdSelfList):
(JSC::StructureStubInfo::initGetByIdProtoList):
(JSC::StructureStubInfo::initPutByIdTransition):
* jit/ExecutableAllocator.cpp:
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::allocInternal):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compileGetByIdProto):
(JSC::JIT::compileGetByIdSelfList):
(JSC::JIT::compileGetByIdProtoList):
(JSC::JIT::compileGetByIdChainList):
(JSC::JIT::compileGetByIdChain):
(JSC::JIT::compilePutByIdTransition):
(JSC::JIT::compilePatchGetArrayLength):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::JITThunks::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::setupPolymorphicProtoList):
* jit/JITStubs.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
* runtime/ExceptionHelpers.cpp:
(JSC::createOutOfMemoryError):
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::compile):
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Fixed a crash seen on the GTK 64bit buildbot.
When JSArray is allocated for the vptr stealing hack, it's not allocated
in the heap, so the JSArray constructor can't safely call Heap::heap().
Since this was subtle enough to confuse smart people, I've changed JSArray
to have an explicit vptr stealing constructor.
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
(JSC::JSArray::):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs):
2010-08-03 Alex Milowski <alex@milowski.com>
Reviewed by Beth Dakin.
Changed the ENABLE_MATHML value to enable MathML by default.
* Configurations/FeatureDefines.xcconfig:
2010-08-03 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Change to keep returned pointer from malloc family functions to
quiet memory leak detect. The pointer is saved in the new m_allocBase
member of the ArrayStorage structure. This fixes the issue found in
https://bugs.webkit.org/show_bug.cgi?id=43229.
As part of this change, we use m_allocBase when reallocating and
freeing the memory associated with ArrayStorage.
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
* runtime/JSArray.h:
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by Mark Rowe.
https://bugs.webkit.org/show_bug.cgi?id=43444
PLATFORM(CF) is false on Windows in JavaScriptCore
Moved some PLATFORM(WIN) #defines down into JavaScriptCore.
* wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited
from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h
just #undefined that later.
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since
PLATFORM(CF) is not defined on Windows.
We'll need to enable the GC activity callback some other way, but this
change should get the build back to normal.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error
in the future with an explicit error message.
2010-08-03 Geoffrey Garen <ggaren@apple.com>
Try to fix Windows build: update .def file.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-08-03 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=41318
GC should reclaim garbage even when new objects are not being allocated rapidly
Added a callback in JavaScriptCore that gets triggered after an
allocation causes the heap to reset. This is useful for adding a
timer that will trigger garbage collection after the "last" allocation.
Also needed was to add lock and unlock methods to JSLock that needed
only a JSGlobalData object versus an ExecState object.
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_val):
* runtime/Collector.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reset):
(JSC::Heap::setActivityCallback):
* runtime/Collector.h:
* runtime/GCActivityCallback.cpp: Added.
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()):
* runtime/GCActivityCallback.h: Added.
(JSC::GCActivityCallback::~GCActivityCallback):
(JSC::GCActivityCallback::operator()):
(JSC::GCActivityCallback::GCActivityCallback):
(JSC::DefaultGCActivityCallback::create):
* runtime/GCActivityCallbackCF.cpp: Added.
(JSC::DefaultGCActivityCallbackPlatformData::trigger):
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::operator()):
* runtime/JSLock.cpp:
(JSC::JSLock::JSLock):
* runtime/JSLock.h:
2010-08-02 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp
* wscript:
2010-08-02 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Simon Hausmann.
[QT] build fix for symbian
https://bugs.webkit.org/show_bug.cgi?id=43234
1) wrong order of passing param's
2) static_cast complains on symbian so using reinterpret_cast
No new tests added. Just a build fix for qt symbian
* wtf/PageAllocation.cpp:
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
(WTF::PageAllocation::reserve):
2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Simon Fraser.
Enabling view modes to all platforms
https://bugs.webkit.org/show_bug.cgi?id=37505
Removing ENABLE_WIDGETS_10_SUPPORT flag.
As view mode media feature is not part of widget 1.0 specification
any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use
of this flag was related to view mode media feature implementation in Qt.
* wtf/Platform.h:
2010-07-30 Andy Estes <aestes@apple.com>
Reviewed by David Kilzer.
Add Xcode support for compiling WebKit against iOS SDKs.
https://bugs.webkit.org/show_bug.cgi?id=42796
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
2010-07-30 Dumitru Daniliuc <dumi@chromium.org>
Reviewed by Davin Levin.
Added a yield() function.
https://bugs.webkit.org/show_bug.cgi?id=42843
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::yield):
* wtf/ThreadingWin.cpp:
(WTF::yield):
* wtf/gtk/ThreadingGtk.cpp:
(WTF::yield):
* wtf/qt/ThreadingQt.cpp:
(WTF::yield):
2010-07-30 Rafael Antognolli <antognolli@profusion.mobi>
Reviewed by Antonio Gomes.
[EFL] Add library version and soname to EFL generated libraries and binary.
https://bugs.webkit.org/show_bug.cgi?id=43212
Add version and soname to libjavascriptcore.so and libwtf.so in case of
linking as shared libraries, and version to jsc executable.
* CMakeLists.txt:
* jsc/CMakeLists.txt:
* wtf/CMakeLists.txt:
2010-07-30 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Simon Hausmann.
[QT] build fix for symbian
https://bugs.webkit.org/show_bug.cgi?id=43234
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64313.
http://trac.webkit.org/changeset/64313
https://bugs.webkit.org/show_bug.cgi?id=43233
Some Chromium bots are not happy with it for some unknown
reason. (Requested by dumi on #webkit).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
* wtf/gtk/ThreadingGtk.cpp:
* wtf/qt/ThreadingQt.cpp:
2010-07-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r64302.
http://trac.webkit.org/changeset/64302
https://bugs.webkit.org/show_bug.cgi?id=43223
Assertion is bogus (Requested by olliej on #webkit).
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::putShortUnchecked):
(JSC::AssemblerBuffer::putIntUnchecked):
(JSC::AssemblerBuffer::putInt64Unchecked):
* jit/JITStubs.cpp:
* pcre/pcre_compile.cpp:
(jsRegExpCompile):
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::New):
(WTF::TCMalloc_Central_FreeList::Populate):
* wtf/MD5.cpp:
(WTF::reverseBytes):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/StdLibExtras.h:
* wtf/Vector.h:
(WTF::VectorBuffer::inlineBuffer):
* wtf/qt/StringQt.cpp:
(WebCore::String::String):
2010-07-29 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Changed the handling for removing and adding elements at the front
of an array. The code now keeps a bias that indicates the amount of
JSValue sized holes are prior to the ArrayStorage block. This means
that shift operations are now memmove's of the header part of
the ArrayStorage and unshift operations are similar, but may require a
realloc first to create the space. Similar operations are performed
for special cases of splice and slice.
Also optimized the new Array(size) case so that we don't allocate and
initialize array elements until the JS code starts using elements.
The array growth code is slightly more aggressive for initial growth
based on size growth of any previous array.
* Configurations/JavaScriptCore.xcconfig:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::getNewVectorLength):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::arrayStorage):
(JSC::JSArray::setArrayStorage):
(JSC::JSArray::markChildrenDirect):
2010-07-29 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes.
* runtime/Collector.h:
2010-07-28 Dumitru Daniliuc <dumi@chromium.org>
Reviewed by David Levin.
Added a yield() function.
https://bugs.webkit.org/show_bug.cgi?id=42843
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Threading.h:
* wtf/ThreadingPthreads.cpp:
(WTF::yield):
* wtf/ThreadingWin.cpp:
(WTF::yield):
* wtf/gtk/ThreadingGtk.cpp:
(WTF::yield):
* wtf/qt/ThreadingQt.cpp:
(WTF::yield):
2010-07-29 Michael Saboff <msaboff@apple.com>
Reviewed by Oliver Hunt.
Fixed issue where RegExp greedy jit code loops when no input is
consumed. Changed the code to only loop if some input was consumed,
but fall through if we successfully match an alternative that
doesn't consume any input.
https://bugs.webkit.org/show_bug.cgi?id=42664
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
2010-07-29 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Avoid increasing required alignment of target type warning on ARM
https://bugs.webkit.org/show_bug.cgi?id=38045
The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
increases required alignment of target type warnings.
Casting the type of [pointer to Type2] object to void* bypasses the
warning.
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::executableCopy):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::putShortUnchecked):
(JSC::AssemblerBuffer::putIntUnchecked):
(JSC::AssemblerBuffer::putInt64Unchecked):
* jit/JITStubs.cpp:
* pcre/pcre_compile.cpp:
(jsRegExpCompile):
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::New):
(WTF::TCMalloc_Central_FreeList::Populate):
* wtf/MD5.cpp:
(WTF::reverseBytes):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/StdLibExtras.h:
(reinterpret_cast_ptr):
* wtf/Vector.h:
(WTF::VectorBuffer::inlineBuffer):
* wtf/qt/StringQt.cpp:
(WebCore::String::String):
2010-07-29 Martin Robinson <mrobinson@igalia.com>
Unreviewed build fix.
Include a missing header in the source list to fix 'make dist.'
* GNUmakefile.am: Include missing header.
2010-07-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Darin Adler.
Bug 43162 - Add support for MADV_FREE to PageAllocation.
* wtf/PageAllocation.cpp:
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
2010-07-27 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by Ojan Vafai.
Add FILE_SYSTEM build flag for FileSystem API
https://bugs.webkit.org/show_bug.cgi?id=42915
* Configurations/FeatureDefines.xcconfig:
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Temporarily rolling out http://trac.webkit.org/changeset/64177,
this seems to give QT ARM/Win a headache (specifically, looks
like structure layour differs, objects get too large -
"..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:"
"error: size of array 'dummyclass_fits_in_cell' is negative").
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
* runtime/JSArray.cpp:
(JSC::increasedVectorLength):
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::markChildrenDirect):
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Speculative build fix for Chromium/Win
* wtf/Platform.h:
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Oh! that makes more sense! Maybe C++-style comments are bringing teh bad mojo.
* wtf/Platform.h:
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O
* wtf/Platform.h:
2010-07-27 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Changed the handling for removing and adding elements at the front
of an array. The code now keeps a bias that indicates the amount of
JSValue sized holes are prior to the ArrayStorage block. This means
that shift operations are now memmove's of the header part of
the ArrayStorage and unshift operations are similar, but may require a
realloc first to create the space. Similar operations are performed
for special cases of splice and slice.
Also optimized the new Array(size) case so that we don't allocate and
initialize array elements until the JS code starts using elements.
The array growth code is slightly more aggressive for initial growth
based on size growth of any previous array.
* Configurations/JavaScriptCore.xcconfig:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::privateCompilePatchGetArrayLength):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::~JSArray):
(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::put):
(JSC::JSArray::putSlowCase):
(JSC::JSArray::deleteProperty):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::getNewVectorLength):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::fillArgList):
(JSC::JSArray::copyToRegisters):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::length):
(JSC::JSArray::canGetIndex):
(JSC::JSArray::getIndex):
(JSC::JSArray::setIndex):
(JSC::JSArray::uncheckedSetIndex):
(JSC::JSArray::arrayStorage):
(JSC::JSArray::setArrayStorage):
(JSC::JSArray::markChildrenDirect):
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43089 - Cleanup JIT related switched in Platform.h
The code the enable to JIT checks every permutation of platform & OS individually, but
now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems. It should
be cleaner to just enable by default on these platforms, and explicitly disable on configs
that don't aren't supported.
Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO. I always find this
confusing since enabling this "optimization" would be possible, but would be a regression
on x86/x86-64 systems! I think it's clearer to reserve "JIT_OPTIMIZE" for compiler
technologies applicable to all platforms, and make a more optional behaviour like this a
"USE".
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::cacheFlush):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* wtf/Platform.h:
2010-07-27 James Robinson <jamesr@chromium.org>
Reviewed by Darin Fisher.
[chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on
https://bugs.webkit.org/show_bug.cgi?id=43084
This turns USE(GLES2_RENDERING) on for chromium on windows/linux. This causes no
change in behavior, that's all controlled by ENABLE() macros that are currently off.
* wtf/Platform.h:
2010-07-23 Helder Correia <heldercorreia@codeaurora.org>
Reviewed by Darin Adler.
Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are
failing. For canvas image data manipulation, the values passed should
be truncated and wrapped. Also fix the canvas-ImageData-behaviour test
to expect wrapping rather than clamping, and add some new checkings.
https://bugs.webkit.org/show_bug.cgi?id=40272
* runtime/JSByteArray.h:
(JSC::JSByteArray::setIndex):
(JSC::JSByteArray::JSByteArray):
2010-07-27 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42621 - Add a bump allocator for the YARR interpreter
The regex engine requires lifo allocation, however currently uses the general purpose
malloc/free memory allocation. A simple bump pointer allocator should provide a lower
overhead allocation solution.
When using YARR interpreter, 15% progression on v8-regex.
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSGlobalData.h:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
* wtf/BumpPointerAllocator.h: Added.
(WTF::BumpPointerPool::ensureCapacity):
(WTF::BumpPointerPool::alloc):
(WTF::BumpPointerPool::dealloc):
(WTF::BumpPointerPool::operator new):
(WTF::BumpPointerPool::BumpPointerPool):
(WTF::BumpPointerPool::create):
(WTF::BumpPointerPool::shrink):
(WTF::BumpPointerPool::destroy):
(WTF::BumpPointerPool::ensureCapacityCrossPool):
(WTF::BumpPointerPool::deallocCrossPool):
(WTF::BumpPointerAllocator::BumpPointerAllocator):
(WTF::BumpPointerAllocator::~BumpPointerAllocator):
(WTF::BumpPointerAllocator::startAllocator):
(WTF::BumpPointerAllocator::stopAllocator):
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::allocDisjunctionContext):
(JSC::Yarr::Interpreter::freeDisjunctionContext):
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::interpret):
(JSC::Yarr::Interpreter::Interpreter):
(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::byteCompileRegex):
* yarr/RegexInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Windows build fix from Chromium/GTK build fix!
* wtf/PageAllocation.cpp:
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Chromium/GTK build fix
* wtf/PageAllocation.cpp:
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Build fix for !Mac platforms.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43009 - Abstract out page allocation from executable allocators
It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
I think this will match current behaviour for the next client we will want to port across (RegisterFile &
Collector).
* CMakeListsEfl.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp: Removed.
* jit/ExecutableAllocatorSymbian.cpp: Removed.
* jit/ExecutableAllocatorWin.cpp: Removed.
* wscript:
* wtf/PageAllocator.cpp: Added.
(WTF::protection):
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
(WTF::PageAllocator::allocate):
(WTF::PageAllocator::reserve):
(WTF::PageAllocator::deallocate):
(WTF::PageAllocator::pagesize):
* wtf/PageAllocator.h: Added.
(WTF::PageAllocation::PageAllocation):
(WTF::PageAllocation::base):
(WTF::PageAllocation::size):
(WTF::PageAllocation::chunk):
(WTF::PageAllocation::operator!):
(WTF::PageAllocator::):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry!
* CMakeListsEfl.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp: Added.
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocatorSymbian.cpp: Added.
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocatorWin.cpp: Added.
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* wscript:
* wtf/PageAllocation.cpp: Removed.
* wtf/PageAllocation.h: Removed.
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Speculative !debug build fix II.
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Speculative !debug build fix.
* wtf/PageAllocation.h:
(WTF::PageAllocation::PageAllocation):
2010-07-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 43009 - Abstract out page allocation from executable allocators
It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
I think this will match current behaviour for the next client we will want to port across (RegisterFile &
Collector).
* CMakeListsEfl.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocator.h:
(JSC::ExecutablePool::ExecutablePool):
(JSC::ExecutablePool::poolAllocate):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::FixedVMPoolAllocator::isWithinVMPool):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp: Removed.
* jit/ExecutableAllocatorSymbian.cpp: Removed.
* jit/ExecutableAllocatorWin.cpp: Removed.
* wscript:
* wtf/PageAllocator.cpp: Added.
(WTF::protection):
(WTF::PageAllocation::commit):
(WTF::PageAllocation::decommit):
(WTF::PageAllocator::allocate):
(WTF::PageAllocator::reserve):
(WTF::PageAllocator::deallocate):
(WTF::PageAllocator::pagesize):
* wtf/PageAllocator.h: Added.
(WTF::PageAllocation::PageAllocation):
(WTF::PageAllocation::base):
(WTF::PageAllocation::size):
(WTF::PageAllocation::chunk):
(WTF::PageAllocation::operator!):
(WTF::PageAllocator::):
2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
This ensures that long-running JavaScript (for example due to a modal alert() dialog),
will not trigger a deferred load after only 500ms (the default tokenizer delay) while
still giving a reasonable timeout (10 seconds) to prevent deadlock.
https://bugs.webkit.org/show_bug.cgi?id=29381
* runtime/TimeoutChecker.h: Add getter for the timeout interval
2010-07-25 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kent Tamura.
[WINCE] Buildfix for JSC in release mode
https://bugs.webkit.org/show_bug.cgi?id=42934
* jsc.cpp: Don't use __try on WinCE.
2010-07-24 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
[MSVC] Ensure 4 byte alignment on ARM
https://bugs.webkit.org/show_bug.cgi?id=42935
* jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame.
2010-07-24 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
[WINCE] Cleanup defines in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=42933
* wtf/Platform.h:
2010-07-23 Rafael Antognolli <antognolli@profusion.mobi>
Reviewed by Antonio Gomes.
[EFL] Cleanup glib support (make it optional)
https://bugs.webkit.org/show_bug.cgi?id=42480
Remove gobject/GRefPtr.cpp if not using soup/glib.
* wtf/CMakeListsEfl.txt:
2010-07-23 Patrick Gansterer <paroga@paroga.com>
Reviewed by Adam Roben.
[WINCE] Implement TCSpinLock.
https://bugs.webkit.org/show_bug.cgi?id=41792
Implement the SpinLock with InterlockedExchange from the Windows API.
* wtf/TCSpinLock.h:
(TCMalloc_SpinLock::Lock):
(TCMalloc_SpinLock::Unlock):
(TCMalloc_SpinLock::IsHeld):
(TCMalloc_SpinLock::Init):
(TCMalloc_SlowLock):
2010-07-22 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-07-22 Gavin Barraclough <barraclough@apple.com>
Eeeep! r63947 hosed all non-x86 builds!
* jit/JITStubs.h:
2010-07-22 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42818 - [Qt] REGRESSION(63348): jsc is broken
Speculative fix, need fastcall conventions on Qt/Win.
* jit/JITStubs.cpp:
* jit/JITStubs.h:
2010-07-22 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Do more constant folding
https://bugs.webkit.org/show_bug.cgi?id=42867
Constant fold a few more operations. SunSpider says this is
a win but I suspect that's just code motion at play.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeModNode):
(JSC::ASTBuilder::makeURightShiftNode):
(JSC::ASTBuilder::makeBitOrNode):
(JSC::ASTBuilder::makeBitAndNode):
(JSC::ASTBuilder::makeBitXOrNode):
(JSC::ASTBuilder::makeBinaryNode):
2010-07-22 Kent Hansen <kent.hansen@nokia.com>
Reviewed by Kent Tamura.
Error properties of the Global Object are missing the DontEnum attribute
https://bugs.webkit.org/show_bug.cgi?id=28771
Add the attributes to become spec compliant.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
2010-07-20 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
WebKit on Windows should build optionally with an unversioned ICU DLL
https://bugs.webkit.org/show_bug.cgi?id=42722
<rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU
Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh.
Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API
should be namespaced with the current ICU version number. Proper value is determined
by checking for the presence of libicuuc.lib, the unversioned copy of ICU.
To get the proper value for U_DISABLE_RENAMING into all source files, we force
the include of ICUVersion.h (our generated header) via the compiler options.
Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
we copy the ICU lib to an intermediate location under obj with a common name. This
allows us to link properly with either without adding a new build configuration.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
Copy ICU libs into a common location with a common name.
Add additional library search path to pick up icu lib.
Change ICU library filename specified to linker.
Add forced include of ICUVersion.h.
* JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h.
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
Copy ICU libs into a common location with a common name.
Add additional library search path to pick up icu lib.
Change ICU library filename specified to linker.
Add forced include of ICUVersion.h.
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
Copy ICU libs into a common location with a common name.
Add additional library search path to pick up icu lib.
Change ICU library filename specified to linker.
Add forced include of ICUVersion.h.
2010-07-20 Steve Falkenburg <sfalken@apple.com>
Re-save vsprops files after no-op edits in Visual Studio
to fix manual edit issues.
2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Steve Block.
Need to be able to configure Geolocation policy regarding user permissions
https://bugs.webkit.org/show_bug.cgi?id=42068
If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
by default
* wtf/Platform.h:
2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r63742.
http://trac.webkit.org/changeset/63742
https://bugs.webkit.org/show_bug.cgi?id=42641
Broke Leopard Intel build. (Requested by bbandix on #webkit).
* wtf/Platform.h:
2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
Reviewed by Steve Block.
Need to be able to configure Geolocation policy regarding user permissions
https://bugs.webkit.org/show_bug.cgi?id=42068
If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
by default
* wtf/Platform.h:
2010-07-19 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
SVG CleanUp of SVGPathData parsing
https://bugs.webkit.org/show_bug.cgi?id=41410
Added piOverTwo to MathExtras.
* wtf/MathExtras.h:
2010-07-19 Mike Moretti <mike.moretti@nokia.com>
Reviewed by Laszlo Gombos.
[Symbian] Build fix after r63404.
Implement isValid() function for the Symbian executable allocator.
* jit/ExecutableAllocatorSymbian.cpp:
(JSC::ExecutableAllocator::isValid):
2010-07-19 Chris Marrin <cmarrin@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=42118
Disable WebGL on Leopard for now.
LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
software OpenGL driver on machines without this support.
* Configurations/FeatureDefines.xcconfig:
2010-07-16 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Use OwnPtr for CodeBlock objects
https://bugs.webkit.org/show_bug.cgi?id=42490
* runtime/Executable.cpp:
(JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline.
Eliminated the code that used to initialize the raw pointer since it's now
an OwnPtr.
(JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here.
(JSC::ProgramExecutable::ProgramExecutable): Ditto.
(JSC::ProgramExecutable::~ProgramExecutable): Ditto.
(JSC::FunctionExecutable::FunctionExecutable): Ditto.
(JSC::FunctionExecutable::~FunctionExecutable): Ditto.
(JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get.
(JSC::ProgramExecutable::compileInternal): Ditto.
(JSC::FunctionExecutable::compileForCallInternal): Ditto.
(JSC::FunctionExecutable::compileForConstructInternal): Ditto.
(JSC::FunctionExecutable::recompile): Use clear instead of delete followed
by assignment of 0.
* runtime/Executable.h: Moved constructors to the cpp file and changed
raw pointers to OwnPtr.
2010-07-19 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
[EFL] Fix build on 64-bit systems. According to
JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which
needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build
system.
https://bugs.webkit.org/show_bug.cgi?id=42559
* CMakeListsEfl.txt: add missing file for x86_64.
2010-07-16 Leandro Pereira <leandro@profusion.mobi>
[EFL] Unreviewed build system cleanup.
Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from
root CMakeLists.txt to the platform CMakeLists.txt.
* CMakeLists.txt:
* CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp.
2010-07-16 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
ES5 allows use of reserved words as IdentifierName
https://bugs.webkit.org/show_bug.cgi?id=42471
Modify the lexer to allow us to avoid identifying reserved
words in those contexts where they are valid identifiers, and
we know it's safe. Additionally tag the reserved word tokens
so we can easily identify them in those cases where we can't
guarantee that we've skipped reserved word identification.
* parser/JSParser.cpp:
(JSC::JSParser::next):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseMemberExpression):
* parser/JSParser.h:
(JSC::):
* parser/Lexer.cpp:
(JSC::Lexer::lex):
* parser/Lexer.h:
(JSC::Lexer::):
2010-07-16 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
clang++ build fixes for JavaScriptCore and WebCore
https://bugs.webkit.org/show_bug.cgi?id=42478
* runtime/RegExpKey.h:
(JSC::operator==):
Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL.
2010-07-16 Anders Carlsson <andersca@apple.com>
Reviewed by David Levin.
Really add WARN_UNUSED_RESULT to leakRef
https://bugs.webkit.org/show_bug.cgi?id=42464
* wtf/PassRefPtr.h:
(WTF::PassRefPtr::):
(WTF::NonNullPassRefPtr::):
Put the WARN_UNUSED_RESULT attribute at the right place.
* wtf/RetainPtr.h:
(WTF::RetainPtr::releaseRef):
Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need
to be fixed first.
2010-07-15 Victor Wang <victorw@chromium.org>
Reviewed by David Levin.
[Chromium] Disable c4291 for chromium windows multi dll build.
https://bugs.webkit.org/show_bug.cgi?id=42177
* JavaScriptCore.gyp/JavaScriptCore.gyp:
2010-07-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
Crash entering mail.yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=42394
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the
identifier we're resolving is not a local variable, registerFor returns
NULL.
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I
noticed this while working on it: No need to NULL-check returnNode,
since an early return has already done so.
2010-07-15 Martin Robinson <mrobinson@igalia.com>
Reviewed by Oliver Hunt.
[GTK] Simplify the distribution step
https://bugs.webkit.org/show_bug.cgi?id=42414
* GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead
of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list.
Refer to create_hash_table and create_regexp_tables directly, as is the
behavior with other code generation scripts.
2010-07-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Fix dumping of op_put_by_id.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printPutByIdOp):
2010-07-15 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Refactoring some parts of the lexer
https://bugs.webkit.org/show_bug.cgi?id=41845
This patch is a precursor of refactoring the identifier
parsing, which currently slows down the lexer, and not
ready for landing. This patch contains those sources,
which does not slow down the lexer (mainly style changes).
SunSpider: no change (529.4ms to 528.7ms)
--parse-only: no change (31.0ms to 31.2ms)
* parser/Lexer.cpp:
(JSC::isIdentStart): using typesOfASCIICharacters to determine
whether the current character is in identifier start
(JSC::isIdentPart): using typesOfASCIICharacters to determine
whether the current character is in identifier part
(JSC::Lexer::parseString): style fix
(JSC::Lexer::lex): removing the else after the main which
which reduces code duplication
2010-07-15 Mark Rowe <mrowe@apple.com>
Update the sorting in the Xcode project files.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-07-14 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails
https://bugs.webkit.org/show_bug.cgi?id=42310
Add some null checks to deal with the Fixed VM allocator failing
to get the requested executable region, delay the creation of the
JITStubs in JSGlobalData until after we know whether we're using
the JIT.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocator::ExecutableAllocator):
(JSC::ExecutableAllocator::poolForSize):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::FixedVMPoolAllocator::isValid):
(JSC::ExecutableAllocator::isValid):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
* jit/ExecutableAllocatorPosix.cpp:
(JSC::ExecutableAllocator::isValid):
* jit/ExecutableAllocatorWin.cpp:
(JSC::ExecutableAllocator::isValid):
* jit/JIT.cpp:
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):
* jit/JIT.h:
(JSC::JIT::compileCTIMachineTrampolines):
(JSC::JIT::compileCTINativeCall):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_mod):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITStubs.cpp:
(JSC::JITThunks::JITThunks):
(JSC::JITThunks::tryCacheGetByID):
(JSC::JITThunks::hostFunctionStub):
* jit/ThunkGenerators.cpp:
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::powThunkGenerator):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::getHostFunction):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::getCTIStub):
* yarr/RegexJIT.cpp:
(JSC::Yarr::jitCompileRegex):
2010-07-14 Gavin Barraclough <barraclough@apple.com>
Speculative Qt/Windows build fix.
* jit/JITStubs.h:
2010-07-14 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=42280
JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it!
* jit/JIT.h:
* jit/JITInlineMethods.h:
(JSC::JIT::restoreArgumentReferenceForTrampoline):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* wtf/Platform.h:
2010-07-14 Oliver Hunt <oliver@apple.com>
RS=Geoff Garen.
Guard the CF path of interpreter vs. jit selection with PLATFORM(CF)
This allows the code to work on windows as well. Also unifies the
environment variable with the preference name.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
2010-07-14 Oliver Hunt <oliver@apple.com>
Reviewed by Don Melton.
Crash when trying to enable JIT and Interpreter in a single build.
CFPreferences code added at the last minute failed to account for
the preference not being present and then attempted to CFRelease
a null value.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
2010-07-14 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Darin Adler.
Change indentations in the lexer
https://bugs.webkit.org/show_bug.cgi?id=41845
This patch fixes an old, indentation error comes from kjs,
as webkit has a different style rule for switches, and change
the indentation of the main switch, which is a temporary
style error. This change makes easier to see the behavioural
changes in the follow-up patch.
No behavioural changes.
* parser/Lexer.cpp:
(JSC::singleEscape):
(JSC::Lexer::lex):
2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r63262.
http://trac.webkit.org/changeset/63262
https://bugs.webkit.org/show_bug.cgi?id=42229
broke Windows compile (Requested by bweinstein on #webkit).
* API/tests/testapi.c:
(assertEqualsAsCharactersPtr):
(main):
* testapi.pro: Removed.
2010-07-13 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218
Add BOM character to the Lexer's definition of whitespace,
and remove the logic that dealt with stripping BOMs and
caching the cleaned string.
* parser/Lexer.h:
(JSC::Lexer::isWhiteSpace):
* parser/SourceProvider.h:
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
2010-07-13 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Darin Adler.
Avoid slow-path for put() in Array.splice()
https://bugs.webkit.org/show_bug.cgi?id=41920
Defer creation of the returned array until its final size is known
to avoid growing it while adding elements.
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old)
and CreateCompact (which should only be used when constructing arrays whose
size and contents are known at the time of creation.)
(JSC::JSArray::setLength): Skip first consistency check if in CreateCompact
initialization mode. (Only applies to non-empty arrays.)
(JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone)
* runtime/JSArray.h:
(JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact
arrays. Does no bounds or other sanity checking.
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray.
* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor.
* runtime/JSGlobalObject.h:
(JSC::constructEmptyArray): Pass CreateInitialized to ctor.
* runtime/RegExpConstructor.cpp:
(JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor.
2010-07-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42207 - Clean up interface to compile executables, always check for exceptions
Presently interface to compile executable is inconsistent between eval/program and
function code, and is error prone in allowing a caller to byte compile without JIT
compiling an executable (we rely on all executables with codeblocks having JIT code).
Unify on an interface where all compilation is performed by a single compile (with
ForCall|ForConstruct variants) method, and make all clients check for errors.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* parser/Parser.h:
(JSC::Parser::isFunctionBodyNode):
(JSC::Parser::parse):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/ExceptionHelpers.cpp:
(JSC::createStackOverflowError):
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
(JSC::FunctionExecutable::fromGlobalCode):
* runtime/Executable.h:
(JSC::EvalExecutable::compile):
(JSC::EvalExecutable::generatedBytecode):
(JSC::EvalExecutable::generatedJITCode):
(JSC::ProgramExecutable::compile):
(JSC::ProgramExecutable::generatedBytecode):
(JSC::ProgramExecutable::generatedJITCode):
(JSC::FunctionExecutable::generatedBytecode):
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct):
(JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::canUseJIT):
2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Oliver Hunt.
testapi.c depends on the Core Foundation.
https://bugs.webkit.org/show_bug.cgi?id=40058
Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it
to compile in Qt environments.
All tests should work except for the JSStringCreateWithCharacters() function,
because its tests depend on Core Foundation specific functions.
* API/tests/testapi.c:
(testJSStringRefCF): moved CoreFoundation specific tests to this function.
(main): The moves plus some minor tweaks.
* testapi.pro: Added.
2010-07-13 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42182 - Change how numeric compare functions are detected
There are three problems with the current mechanism:
* It requires that a function executable be bytecode compiled without
being JIT generated (in order to copy the bytecode from the numeric
compare function). This is a problem since we have an invariant when
running with the JIT that functions are never bytecode compiled without
also being JIT generated (after checking the codeblock we assume the
function has JIT code). To help maintain this invariant
* This implementation will prevent us from experimenting with alternate
compilation paths which do not compile via bytecode.
* It doesn't work. Functions passing more than two arguments will match
if they are comparing their last two arguments, not the first two.
Generally the mapping back from bytecode to semantics may be more
complex then initially expected.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::setIsNumericCompareFunction):
(JSC::BytecodeGenerator::argumentNumberFor):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BlockNode::singleStatement):
(JSC::FunctionBodyNode::emitBytecode):
* parser/Nodes.h:
(JSC::ExpressionNode::isSubtract):
(JSC::BinaryOpNode::lhs):
(JSC::BinaryOpNode::rhs):
(JSC::SubNode::isSubtract):
(JSC::ReturnNode::value):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
2010-07-12 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*)
https://bugs.webkit.org/show_bug.cgi?id=41763
There are two parts to this patch, the first is to fix the actual
problem. When calling copyStringWithoutBOMs on a string we know
to contain BOMs we return a value indicating that there are no
BOMs.
The second part of this fix is simply to harden the path that
led to a crash when parsing failed.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
Harden compilation stubs against parser failure.
* parser/Lexer.cpp:
(JSC::Lexer::sourceCode):
Add assertions to ensure that subranges into a source provider
are always actually braces. Hopefully this should catch similar
failures in future. These assertions fire on existing tests
without this fix.
* runtime/Executable.h:
(JSC::FunctionExecutable::tryJitCodeForCall):
(JSC::FunctionExecutable::tryJitCodeForConstruct):
* wtf/text/StringImpl.h:
(WebCore::StringImpl::copyStringWithoutBOMs):
Make copyStringWithBOMs do the right thing.
2010-07-13 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Fix the constant encoding in data transfer instructions on ARM
https://bugs.webkit.org/show_bug.cgi?id=42166
The getImm function is designed to produce modified immediate constant
for data processing instructions. It should not be used to encode
any constant for data transfer. In the current situation there is no
way to use any immediate constant for data transfer. So, the moveImm
function is the desired method to pass the offset value to the data
transfer instructions.
Reported by Jacob Bramley.
* assembler/ARMAssembler.cpp:
(JSC::ARMAssembler::dataTransfer32):
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::call32):
2010-07-09 Darin Adler <darin@apple.com>
Reviewed by Geoffrey Garen.
String to number coercion is not spec compliant
https://bugs.webkit.org/show_bug.cgi?id=31349
ToNumber should ignore NBSP (\u00a0)
https://bugs.webkit.org/show_bug.cgi?id=25490
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseIntOverflow): Added a version that works on UChar.
* runtime/JSGlobalObjectFunctions.h: Ditto.
* runtime/UString.cpp:
(JSC::isInfinity): Added helper functions.
(JSC::UString::toDouble): Use isStrWhiteSpace instead of
isSASCIISpace to define what we should skip. Got rid of the
code that used CString and UTF8String, instead processing the
UChar of the string directly, except for when we call strtod.
For strtod, use our own home-grown conversion function that
does not try to do any UTF-16 processing. Tidied up the logic
a bit as well.
2010-07-12 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] make dist is broken because of missing headers and other miscellaneous reasons
https://bugs.webkit.org/show_bug.cgi?id=42107
* GNUmakefile.am: Add missing header to the sources list.
2010-07-12 Adam Roben <aroben@apple.com>
Stop generating stripped symbols for Release builds
It turns out we can strip the symbols after-the-fact using PDBCopy.
Fixes <http://webkit.org/b/42085>.
Reviewed by Steve Falkenburg.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
Removed the pre-link event, which just created the public\sym
directory.
2010-07-12 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions
https://bugs.webkit.org/show_bug.cgi?id=42086
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
* wtf/PassRefPtr.h:
(WTF::PassRefPtr::releaseRef):
(WTF::NonNullPassRefPtr::leakRef):
(WTF::NonNullPassRefPtr::releaseRef):
* wtf/RetainPtr.h:
(WTF::RetainPtr::releaseRef):
2010-07-10 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled
https://bugs.webkit.org/show_bug.cgi?id=42039
Separate the existence of computed goto support in the compiler
from whether or not we are using the interpreter. All the current
HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like
the option of using it elsewhere. The interpreter now uses
ENABLE(COMPUTED_GOTO_INTERPRETER)
* bytecode/Instruction.h:
(JSC::Instruction::Instruction):
* bytecode/Opcode.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::isOpcode):
(JSC::Interpreter::privateExecute):
* interpreter/Interpreter.h:
(JSC::Interpreter::getOpcode):
(JSC::Interpreter::getOpcodeID):
* wtf/Platform.h:
2010-07-10 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Remove switches from inner expression loops in the parser
https://bugs.webkit.org/show_bug.cgi?id=42035
Use bitmasks and flags on the token types to identify unary and
binary operators, rather than switching on the token type to
identify them.
* parser/JSParser.cpp:
(JSC::isUnaryOp):
(JSC::JSParser::isBinaryOperator):
* parser/JSParser.h:
(JSC::):
2010-07-09 Leon Clarke <leonclarke@google.com>
Reviewed by Adam Barth.
add support for link prefetching
https://bugs.webkit.org/show_bug.cgi?id=3652
* Configurations/FeatureDefines.xcconfig:
2010-07-09 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
Tidy up lexer token ids
https://bugs.webkit.org/show_bug.cgi?id=42014
Stop using character literals to identify single character tokens
and instead use symbolic names for all tokens.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeBinaryNode):
* parser/JSParser.cpp:
(JSC::JSParser::consume):
(JSC::JSParser::match):
(JSC::JSParser::autoSemiColon):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::allowAutomaticSemicolon):
(JSC::JSParser::parseDoWhileStatement):
(JSC::JSParser::parseWhileStatement):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseForStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseSwitchStatement):
(JSC::JSParser::parseSwitchClauses):
(JSC::JSParser::parseSwitchDefaultClause):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseDebuggerStatement):
(JSC::JSParser::parseStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parseIfStatement):
(JSC::JSParser::parseExpression):
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseConditionalExpression):
(JSC::isUnaryOp):
(JSC::JSParser::isBinaryOperator):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseObjectLiteral):
(JSC::JSParser::parseStrictObjectLiteral):
(JSC::JSParser::parseArrayLiteral):
(JSC::JSParser::parsePrimaryExpression):
(JSC::JSParser::parseArguments):
(JSC::JSParser::parseMemberExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h:
(JSC::):
* parser/Lexer.cpp:
(JSC::):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-07-09 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 42015 - Enable JSValue32_64 on ARMv7
* Configurations/JavaScriptCore.xcconfig:
* jit/JIT.h:
* jit/JITStubs.cpp:
* wtf/Platform.h:
2010-07-09 Kenneth Russell <kbr@google.com>
Reviewed by Dimitri Glazkov.
Assertion failure in String::utf8() for certain invalid UTF16 inputs
https://bugs.webkit.org/show_bug.cgi?id=41983
* wtf/text/WTFString.cpp:
(WebCore::String::utf8):
- Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8.
2010-07-09 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Remove a couple of excess writes from the lexer
https://bugs.webkit.org/show_bug.cgi?id=41981
Remove a couple of fields from JSTokenInfo, and rename the remaining ones
to something more accurate
* parser/JSParser.cpp:
(JSC::JSParser::next):
(JSC::JSParser::tokenStart):
(JSC::JSParser::tokenLine):
(JSC::JSParser::tokenEnd):
* parser/JSParser.h:
(JSC::JSTokenInfo::JSTokenInfo):
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Property declarations in an object literal should not consider the prototype chain when being added to the new object
https://bugs.webkit.org/show_bug.cgi?id=41929
To fix this all we need to do is ensure that all new properties are
added with putDirect rather than a fully generic call to put. This
is safe as an object literal is by definition going to produce a
completely normal object.
Rather than duplicating all the put_by_id logic we add an additional
flag to op_put_by_id to indicate it should be using putDirect. In
the interpreter this adds a runtime branch, but in the jit this is
essentially free as the branch is taken at compile time. This does
actually improve object literal creation time even in the interpreter
as we no longer need to walk the prototype chain to verify that the
cached put is safe.
We still emit normal put_by_id code when emitting __proto__ as we want
to get the correct handling for changing the prototype.
Sunspider claims this is a 0.7% speedup which is conceivably real due
to the performance improvement in object literals, but I suspect its
really just the result of code motion.
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitBytecode):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.h:
(JSC::JIT::compilePutByIdTransition):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchPutByIdReplace):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchPutByIdReplace):
* jit/JITStubs.cpp:
(JSC::JITThunks::tryCachePutByID):
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
(JSC::):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSObject.h:
(JSC::JSObject::putDirect):
(JSC::JSValue::putDirect):
* runtime/JSValue.h:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
String.prototype methods should CheckObjectCoercible (test this is not null or undefined).
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::trimString):
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Date.prototype.toJSON takes one argument, report this correctly.
* runtime/DatePrototype.cpp:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
RegExp's prototype should be an object of type RegExp.
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::RegExpPrototype):
* runtime/RegExpPrototype.h:
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
JavaScript parser violates ECMA automatic semicolon insertion rule
https://bugs.webkit.org/show_bug.cgi?id=41844
Remove (very) old and bogus logic that automatically inserted a semicolon
at the end of a script's source.
* parser/Lexer.cpp:
(JSC::Lexer::lex):
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Anders Carlson.
Tidy up the lexer
Remove some of the old yacc/lex-isms still present in the lexer
* parser/JSParser.h:
(JSC::):
* parser/Lexer.cpp:
(JSC::Lexer::parseString):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-07-08 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Make object-literal parsing conformant with the spec.
https://bugs.webkit.org/show_bug.cgi?id=41892
Bring our parsing of object literals into conformance with the ES5 spec.
Basically disallow conflicting accessor vs. normal property definitions
The bulk of this patch is just fiddling to maintain performance.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createProperty):
(JSC::ASTBuilder::getName):
(JSC::ASTBuilder::getType):
* parser/JSParser.cpp:
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseObjectLiteral):
(JSC::JSParser::parseStrictObjectLiteral):
* parser/JSParser.h:
* parser/Lexer.cpp:
(JSC::Lexer::clear):
* parser/Lexer.h:
(JSC::Lexer::currentOffset):
(JSC::Lexer::setOffset):
Add logic to allow us to roll the lexer back in the input stream.
* parser/Nodes.h:
(JSC::PropertyNode::):
(JSC::PropertyNode::type):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
(JSC::SourceProvider::isValid):
(JSC::SourceProvider::setValid):
SourceProvider now records whether the input text
has already been validated.
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::SyntaxChecker):
(JSC::SyntaxChecker::Property::Property):
(JSC::SyntaxChecker::Property::operator!):
(JSC::SyntaxChecker::createProperty):
(JSC::SyntaxChecker::createPropertyList):
(JSC::SyntaxChecker::createGetterOrSetterProperty):
The SyntaxChecker mode now needs to maintain a bit more information
to ensure that we can validate object literals correctly.
2010-07-08 Darin Adler <darin@apple.com>
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::sharedInstance): Fix typo.
2010-07-08 Darin Adler <darin@apple.com>
Reviewed by Oliver Hunt.
Fix assertion seen on the Leopard buildbot.
The single shared instance of JSGlobalData was not being
adopted after creation.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef.
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
BOMs are whitespace.
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::isStrWhiteSpace):
2010-07-08 Martin Robinson <mrobinson@igalia.com>
Unreviewed.
Try fix the GTK+ build by touching this file.
* jit/ExecutableAllocatorFixedVMPool.cpp:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
GTK build fix take two.
* GNUmakefile.am:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
GTK build fix.
* GNUmakefile.am:
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=41641
Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
other than x86-64 (this may be useful on 32-bit platforms, too).
Simplify ifdefs by dividing into thwo broad allocation strategies
(ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
Rename constant used in the code to have names descriptive of their purpose,
rather than their specific value on a given platform.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::free):
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorPosix.cpp:
* jit/ExecutableAllocatorSymbian.cpp:
* jit/ExecutableAllocatorWin.cpp:
* wtf/Platform.h:
2010-07-08 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Silence a few noisy build rules.
* GNUmakefile.am:
2010-07-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r62765.
http://trac.webkit.org/changeset/62765
https://bugs.webkit.org/show_bug.cgi?id=41840
All jscore and layout tests crash on Qt bot (Requested by Ossy
on #webkit).
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
(WTF::TCMalloc_PageHeap::signalScavenger):
(WTF::TCMalloc_PageHeap::scavengerThread):
2010-07-08 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Oliver Hunt.
Interpreter: Crash in op_load_varargs on 64-bit
https://bugs.webkit.org/show_bug.cgi?id=41795
Added missing cast of argCount to int32_t in op_load_varargs.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-07-08 Patrick Gansterer <paroga@paroga.com>
Reviewed by Geoffrey Garen.
Make FastMalloc more portable.
https://bugs.webkit.org/show_bug.cgi?id=41790
Use WTF::Mutex instead of pthread_mutex_t and
replace pthread_cond_t with WTF::ThreadCondition.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger):
(WTF::TCMalloc_PageHeap::signalScavenger):
(WTF::TCMalloc_PageHeap::scavengerThread):
2010-07-08 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Remove needless #include <fcntl.h> from TCSystemAlloc.cpp.
https://bugs.webkit.org/show_bug.cgi?id=41777
* wtf/TCSystemAlloc.cpp:
2010-07-07 Darin Adler <darin@apple.com>
Fixed build in configurations like PowerPC.
* runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h.
* runtime/RegExpObject.cpp: Ditto.
* wtf/SizeLimits.cpp: Changed compile time assertion to work
even on platforms where two bool members do not end up taking
the same size as one int member!
2010-07-07 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Lazy mode of parser allows invalid syntax in object literals.
https://bugs.webkit.org/show_bug.cgi?id=41809
Make the parser itself validate getter and setter syntax rather
than offloading it to the AST builder.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createGetterOrSetterProperty):
* parser/JSParser.cpp:
(JSC::JSParser::parseProperty):
2010-07-07 Dumitru Daniliuc <dumi@chromium.org>
Reviewed by Adam Roben.
Revert r62689.
https://bugs.webkit.org/show_bug.cgi?id=41804
* runtime/Collector.cpp:
(JSC::Heap::freeBlocks):
2010-07-07 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
Add reverseFind to Vector and deploy in HTML5 parser
https://bugs.webkit.org/show_bug.cgi?id=41778
This method seems generally useful. I'm slightly surprised we don't
have it already.
* wtf/Vector.h:
(WTF::::reverseFind):
2010-07-07 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Turn on adoptRef assertion for RefCounted
https://bugs.webkit.org/show_bug.cgi?id=41547
* wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other
WTF headers should use "" includes; consistent in most WTF headers.
Added a call to relaxAdoptionRequirement.
* wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED.
Added relaxAdoptionRequirement.
2010-07-07 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
* runtime/Collector.cpp:
(JSC::Heap::freeBlocks):
2010-07-07 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
More OwnPtr work
https://bugs.webkit.org/show_bug.cgi?id=41727
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject::JSCallbackObject): Ditto.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Ditto.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::createRareDataIfNecessary): Ditto.
* parser/Nodes.cpp:
(JSC::ScopeNode::ScopeNode): Ditto.
* parser/ParserArena.cpp:
(JSC::ParserArena::ParserArena): Ditto.
* runtime/Arguments.h:
(JSC::Arguments::Arguments): Ditto.
* runtime/Executable.cpp:
(JSC::EvalExecutable::compile): Ditto.
(JSC::ProgramExecutable::compile): Ditto.
(JSC::FunctionExecutable::compileForCall): Ditto.
(JSC::FunctionExecutable::compileForConstruct): Ditto.
(JSC::FunctionExecutable::reparseExceptionInfo): Ditto.
(JSC::EvalExecutable::reparseExceptionInfo): Ditto.
* runtime/JSArray.cpp:
(JSC::JSArray::sort): Ditto.
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor): Ditto.
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::RegExpObject): Ditto.
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::createSingleCharacterString): Ditto.
(JSC::SmallStrings::singleCharacterStringRep): Ditto.
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault): Use adoptPtr.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::ByteCompiler): Ditto.
(JSC::Yarr::ByteCompiler::compile): Ditto.
(JSC::Yarr::ByteCompiler::regexBegin): Ditto.
(JSC::Yarr::byteCompileRegex): Ditto.
* yarr/RegexInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.
2010-07-07 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Make clear set the pointer to 0 before deletion
https://bugs.webkit.org/show_bug.cgi?id=41727
* wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new
value before deleting the old one, including in the set function and the
clear function. This required changing safeDelete.
* wtf/OwnPtr.h: Ditto. Also removed some extra null checks.
* wtf/PassOwnPtr.h: Ditto.
* wtf/PassRefPtr.h: Changed code so we always set the pointer to its new
value before deref'ing the old one in the clear function. Also added a
leakRef function for NonNullPassRefPtr.
* wtf/RefPtr.h: Ditto.
* wtf/gobject/GOwnPtr.h: More of the same.
* wtf/gobject/GRefPtr.h: Ditto.
2010-07-07 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
Refactored string parsing inside the lexer
https://bugs.webkit.org/show_bug.cgi?id=41606
Does not use goto. Although the last sunspider
parse-only tests yields 1.044x speedup, I think the
patch can have a slight improvement at most.
* parser/Lexer.cpp:
(JSC::singleEscape):
(JSC::Lexer::parseString):
(JSC::Lexer::lex):
* parser/Lexer.h:
2010-07-06 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Make it possible to have both the JIT and Interpreter available in a single build
https://bugs.webkit.org/show_bug.cgi?id=41722
Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible
to have both JIT and INTERPRETER enabled at the same time. This doesn't add
support for mix mode execution, but it does allow a single build to contain all
the code needed to use either the interpreter or the jit.
If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment
variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter.
This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER),
or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif
#if ENABLE(INTERPRETER), etc. There are also a few functions that need to be
renamed to resolve return type ambiguity.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
* interpreter/CallFrame.h:
(JSC::ExecState::returnVPC):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwindCallFrame):
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
(JSC::Interpreter::retrieveLastCaller):
* interpreter/Interpreter.h:
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/Executable.cpp:
(JSC::EvalExecutable::generateJITCode):
(JSC::ProgramExecutable::generateJITCode):
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* runtime/JSFunction.cpp:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::canUseJIT):
* wtf/Platform.h:
2010-07-06 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=41320
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment
instead of set since the result of reparseExceptionInfo is now a
PassOwnPtr.
* bytecode/CodeBlock.h: Change extractExceptionInfo to return a
PassOwnPtr instead of a raw pointer.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr.
(JSC::EvalExecutable::reparseExceptionInfo): Ditto.
(JSC::ProgramExecutable::reparseExceptionInfo): Added. This was
in the header before, but it's better to not have it there to reduce
header dependencies. Return a PassOwnPtr.
* runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr,
and put it in the private sections of classes other than the base class.
* wtf/MessageQueue.h:
(WTF::MessageQueue::append): Use leakPtr instead of release.
(WTF::MessageQueue::appendAndCheckEmpty): Ditto.
(WTF::MessageQueue::prepend): Ditto.
* wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return
a PassOwnPtr rather than a raw pointer. Added a leakPtr function that
returns a raw pointer. Put the constructor that takes a raw pointer and
the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the
new adoptPtr function from PassOwnPtr.h.
* wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function
to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr.
Put the constructor and assignment operators that take a raw pointer
into a section guarded by LOOSE_PASS_OWN_PTR.
2010-07-06 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler
Update comment in StringExtras.h to be more accurate.
* wtf/StringExtras.h:
2010-07-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r62511.
http://trac.webkit.org/changeset/62511
https://bugs.webkit.org/show_bug.cgi?id=41686
Breaks Linux/64bit compilation (Requested by xan_ on #webkit).
* jit/ExecutableAllocator.cpp:
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::free):
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorPosix.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocatorSymbian.cpp:
* jit/ExecutableAllocatorWin.cpp:
* wtf/Platform.h:
2010-07-05 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=41641
Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
other than x86-64 (this may be useful on 32-bit platforms, too).
Simplify ifdefs by dividing into thwo broad allocation strategies
(ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
Rename constant used in the code to have names descriptive of their purpose,
rather than their specific value on a given platform.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::reprotectRegion):
(JSC::ExecutableAllocator::cacheFlush):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::free):
(JSC::ExecutablePool::systemAlloc):
* jit/ExecutableAllocatorPosix.cpp:
* jit/ExecutableAllocatorSymbian.cpp:
* jit/ExecutableAllocatorWin.cpp:
* wtf/Platform.h:
2010-07-05 Steve Block <steveblock@google.com>
Reviewed by Darin Adler.
ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h
https://bugs.webkit.org/show_bug.cgi?id=41594
* wtf/ThreadingPthreads.cpp:
2010-07-04 Mark Rowe <mrowe@apple.com>
Build fix after r62456.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
warnings about comparisons between signed and unsigned types, and attempts to call an overload
of std::min that doesn't exist.
2010-07-02 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
Make StringExtras.h versions of snprintf and vsnprintf match the unix versions.
- MSVC does not ensure the buffers are null terminated as the unix versions do.
* runtime/JSGlobalObjectFunctions.cpp: Cleanup includes.
* runtime/UString.cpp: Clean up includes.
(JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong.
* wtf/StringExtras.h:
(snprintf): Ensure null termination of buffer.
(vsnprintf): Ditto.
2010-07-03 Yong Li <yoli@rim.com>
Reviewed by Darin Adler.
Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
the interpreter as well as the JIT.
https://bugs.webkit.org/show_bug.cgi?id=41351
rdar://problem/8142141
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Fix signed integer overflow problem
in op_load_varargs handling. 0xFFFFFFFF was read as -1.
2010-06-26 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Dumitru Daniliuc.
Support for keys and in-memory storage for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=41252
Set the role to Private.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-07-02 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Move BOM handling out of the lexer and parser
https://bugs.webkit.org/show_bug.cgi?id=41539
Doing the BOM stripping in the lexer meant that we could
end up having to strip the BOMs from a source multiple times.
To deal with this we now require all strings provided by
a SourceProvider to already have had the BOMs stripped.
This also simplifies some of the lexer logic.
* parser/Lexer.cpp:
(JSC::Lexer::setCode):
(JSC::Lexer::sourceCode):
* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::getRange):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
(WebCore::StringImpl::copyStringWithoutBOMs):
2010-07-03 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kent Tamura.
[WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar.
https://bugs.webkit.org/show_bug.cgi?id=41411
* wtf/unicode/wince/UnicodeWince.cpp:
(WTF::Unicode::isAlphanumeric):
* wtf/unicode/wince/UnicodeWince.h:
(WTF::Unicode::isArabicChar):
2010-07-03 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Change the CRASH() macro to print "WebKit CRASH" log.
https://bugs.webkit.org/show_bug.cgi?id=41524
Print "WebKit CRASH" before crashing.
* wtf/Assertions.h:
2010-07-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken
This method tried to repatch a LDR (T2) into an ADD (T3) - but it only
repatches the first instruction word. The layout of the fields in the
second word is different, and also needs repatching.
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::repatchLoadPtrToLEA):
2010-07-02 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Clamp the number of arguments supported by function.apply
https://bugs.webkit.org/show_bug.cgi?id=41351
<rdar://problem/8142141>
Add clamping logic to function.apply similar to that
enforced by firefox. We have a smaller clamp than
firefox as our calling convention means that stack
usage is proportional to argument count -- the firefox
limit is larger than you could actually call.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Arguments.h:
(JSC::Arguments::):
2010-07-02 Chao-ying Fu <fu@mips.com>
Reviewed by Oliver Hunt.
Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS
https://bugs.webkit.org/show_bug.cgi?id=40179
Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* wtf/Platform.h:
2010-07-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 41552 - Clean up ARMv7 vfp code generation
Emit separate opcode individually, remove magic numbers.
Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned).
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::):
(JSC::ARMv7Assembler::vadd_F64):
(JSC::ARMv7Assembler::vcmp_F64):
(JSC::ARMv7Assembler::vcvt_F64_S32):
(JSC::ARMv7Assembler::vcvtr_S32_F64):
(JSC::ARMv7Assembler::vdiv_F64):
(JSC::ARMv7Assembler::vldr):
(JSC::ARMv7Assembler::vmov_F64_0):
(JSC::ARMv7Assembler::vmov):
(JSC::ARMv7Assembler::vmrs):
(JSC::ARMv7Assembler::vmul_F64):
(JSC::ARMv7Assembler::vstr):
(JSC::ARMv7Assembler::vsub_F64):
(JSC::ARMv7Assembler::VFPOperand::VFPOperand):
(JSC::ARMv7Assembler::VFPOperand::bits1):
(JSC::ARMv7Assembler::VFPOperand::bits4):
(JSC::ARMv7Assembler::vcvtOp):
(JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp):
(JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::branchDouble):
* runtime/JSImmediate.h:
(JSC::JSValue::isCell):
2010-07-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r62410.
http://trac.webkit.org/changeset/62410
https://bugs.webkit.org/show_bug.cgi?id=41549
accursed last minute changes (Requested by olliej on #webkit).
* parser/Lexer.cpp:
(JSC::Lexer::setCode):
(JSC::Lexer::copyCodeWithoutBOMs):
(JSC::Lexer::sourceCode):
* parser/SourceProvider.h:
(JSC::):
(JSC::SourceProvider::SourceProvider):
(JSC::SourceProvider::hasBOMs):
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::getRange):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
2010-07-02 Sam Weinig <sam@webkit.org>
Reviewed by Geoffrey Garen.
Patch for https://bugs.webkit.org/show_bug.cgi?id=41548
Use snprintf instead of sprintf everywhere in JavaScriptCore
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::globalFuncEscape):
* runtime/UString.cpp:
(JSC::UString::from):
2010-07-02 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Move BOM handling out of the lexer and parser
https://bugs.webkit.org/show_bug.cgi?id=41539
Doing the BOM stripping in the lexer meant that we could
end up having to strip the BOMs from a source multiple times.
To deal with this we now require all strings provided by
a SourceProvider to already have had the BOMs stripped.
This also simplifies some of the lexer logic.
* parser/Lexer.cpp:
(JSC::Lexer::setCode):
(JSC::Lexer::sourceCode):
* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
(JSC::UStringSourceProvider::create):
(JSC::UStringSourceProvider::getRange):
(JSC::UStringSourceProvider::UStringSourceProvider):
* wtf/text/StringImpl.h:
(WebCore::StringImpl::copyStringWithoutBOMs):
2010-07-02 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Oliver Hunt.
[ Updated after rollout. ]
Merged RegExp constructor and RegExp::create methods.
Both functions are called with three parameters and check whether
flags (the third param) is given or not.
Avoid extra hash lookups in RegExpCache::create by passing a pre-computed
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-07-02 Martin Robinson <mrobinson@igalia.com>
Unreviewed. Build fix for GTK+.
Build Lexer.lut.h with the rest of the .lut.h files. Later these should
all probably be moved to DerivedSources.
* GNUmakefile.am:
2010-06-23 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Separate DerivedSources per-project
https://bugs.webkit.org/show_bug.cgi?id=41109
Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore.
* GNUmakefile.am:
2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Oliver Hunt.
The alternativeFrameLocation value is wrong in the emitDisjunction function in
case of PatternTerm::TypeParentheticalAssertion. This value needs to be
computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
memory corruption in some cases.
Layout test added for checking of TypeParentheticalAssertion case.
https://bugs.webkit.org/show_bug.cgi?id=41458
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::ByteCompiler::emitDisjunction):
2010-07-01 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Add a FixedArray template to encapsulate fixed length arrays
https://bugs.webkit.org/show_bug.cgi?id=41506
This new type is used in place of fixed length C arrays so
that debug builds can guard against attempts to go beyond
the end of the array.
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/Opcode.cpp:
(JSC::OpcodeStats::~OpcodeStats):
* pcre/pcre_compile.cpp:
(calculateCompiledPatternLength):
* runtime/Collector.cpp:
(JSC::Heap::allocateBlock):
(JSC::Heap::allocate):
* runtime/Collector.h:
(JSC::CollectorBitmap::clearAll):
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::operator*):
* runtime/DateInstanceCache.h:
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
* runtime/JSString.h:
(JSC::RopeBuilder::JSStringFinalizerStruct::):
* runtime/NumericStrings.h:
* runtime/RegExpCache.h:
* runtime/SmallStrings.h:
(JSC::SmallStrings::singleCharacterStrings):
* wtf/AVLTree.h:
* wtf/FixedArray.h: Added.
(WTF::FixedArray::operator[]):
(WTF::FixedArray::data):
2010-07-01 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
Improve the main lexer switch by mapping input characters to their type
https://bugs.webkit.org/show_bug.cgi?id=41459
Sunsipder: no change (from 532.9ms to 531.5ms)
SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms)
* parser/Lexer.cpp:
(JSC::):
(JSC::Lexer::lex):
2010-07-01 Sam Weinig <sam@webkit.org>
Rubber-stamped by Ander Carlsson.
Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard.
* wtf/Platform.h:
2010-07-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 41490 - Add missing operations to MacroAssemblerARMv7
Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed.
* assembler/ARMv7Assembler.h:
(JSC::ARMRegisters::):
(JSC::ARMRegisters::asSingle):
(JSC::ARMRegisters::asDouble):
(JSC::VFPImmediate::VFPImmediate):
(JSC::VFPImmediate::isValid):
(JSC::VFPImmediate::value):
(JSC::ARMv7Assembler::singleRegisterMask):
(JSC::ARMv7Assembler::doubleRegisterMask):
(JSC::ARMv7Assembler::):
(JSC::ARMv7Assembler::add_S):
(JSC::ARMv7Assembler::neg):
(JSC::ARMv7Assembler::orr_S):
(JSC::ARMv7Assembler::sub):
(JSC::ARMv7Assembler::sub_S):
(JSC::ARMv7Assembler::vadd_F64):
(JSC::ARMv7Assembler::vcmp_F64):
(JSC::ARMv7Assembler::vcvt_F64_S32):
(JSC::ARMv7Assembler::vcvtr_S32_F64):
(JSC::ARMv7Assembler::vdiv_F64):
(JSC::ARMv7Assembler::vldr):
(JSC::ARMv7Assembler::vmov_F64_0):
(JSC::ARMv7Assembler::vmov):
(JSC::ARMv7Assembler::vmul_F64):
(JSC::ARMv7Assembler::vstr):
(JSC::ARMv7Assembler::vsub_F64):
(JSC::ARMv7Assembler::vcvt):
(JSC::ARMv7Assembler::vmem):
* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle):
(JSC::MacroAssemblerARMv7::neg32):
(JSC::MacroAssemblerARMv7::loadDouble):
(JSC::MacroAssemblerARMv7::divDouble):
(JSC::MacroAssemblerARMv7::convertInt32ToDouble):
(JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
(JSC::MacroAssemblerARMv7::zeroDouble):
(JSC::MacroAssemblerARMv7::branchOr32):
(JSC::MacroAssemblerARMv7::set32):
(JSC::MacroAssemblerARMv7::set8):
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerX86Common.h:
2010-07-01 Oliver Hunt <oliver@apple.com>
Reviewed by Geoff Garen.
Improve reentrancy logic in polymorphic cache stubs
<https://bugs.webkit.org/show_bug.cgi?id=41482>
<rdar://problem/8094380>
Make the polymorphic cache stubs handle reentrancy
better.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::getPolymorphicAccessStructureListSlot):
2010-07-01 Antti Koivisto <koivisto@iki.fi>
Revert accidental commit.
* runtime/Collector.cpp:
(JSC::Heap::allocateBlock):
2010-06-30 Darin Adler <darin@apple.com>
Reviewed by Adam Barth.
Add assertion, off by default, for when you forget to do adoptRef
https://bugs.webkit.org/show_bug.cgi?id=41422
* wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted
function, called on the pointer by adoptRef, with an empty inline
default version, meant to be overloaded. Unified the inlining
with a macro named REF_DEREF_INLINE to make it clearer what's
going on in the refIfNotNull/derefIfNotNull functions. Renamed
releaseRef to leakRef, but left the old name in for compatibility
for now.
* wtf/RefCounted.h: Added code to require adoption and assert if
you don't call adoptRef. For now, it is turned off because of the
LOOSE_REF_COUNTED define in this header. Later we can turn it on
once we get everything working without asserting.
2010-06-29 Michael Saboff <msaboff@apple.com>
Reviewed by Darin Adler.
Bug 41238 - RegExp performance slow on Dromaeo benchmark
Other javascript engines appear to cache prior results of regular
expression operations.
Suggest adding some sort of caching mechanism to regular expression
processing.
Added a single entry cache of match() results to RegExp class.
Also added performance improvements to UString == operator.
First check the impls for equality. Then get the length of
each of the non-null impls. Next check the sizes for equality.
Then check the data for the case of different impls that point
to the same data (most likely due to substrings from the beginning of
another string). Lastly we check the underlying data for equality.
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::match):
* runtime/RegExp.h:
* runtime/UString.h:
(JSC::operator==):
2010-06-29 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
WTF::HashSet iterators are quasi-mutable. Changing the value through
dereferencing an iterator will not change the behavior of methods like
contains or find, but will change the behavior of iterating.
* wtf/HashSet.h:
(WTF::::begin):
(WTF::::end):
(WTF::::find):
(WTF::::remove):
* wtf/HashTable.h:
2010-06-29 Martin Robinson <mrobinson@igalia.com>
Reviewed by Xan Lopez.
[GTK] Clean up the source lists in the GNUMakefile.am files
https://bugs.webkit.org/show_bug.cgi?id=41229
Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
the source lists.
* GNUmakefile.am:
2010-06-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix QtScript build after QScriptValuePrivate ctor changes
https://bugs.webkit.org/show_bug.cgi?id=41307
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::prototype):
* qt/benchmarks/qscriptengine/qscriptengine.pro:
2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QScriptEngine API should contain a newArray function
https://bugs.webkit.org/show_bug.cgi?id=39115
* qt/api/qscriptengine.cpp:
(QScriptEngine::newArray):
* qt/api/qscriptengine.h:
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::newArray):
* qt/api/qscriptengine_p.h:
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::newArray):
2010-06-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
Install jsc as jsc-X where X is the major API version to allow
parallel installation of both GTK+ 2.x and 3.x versions.
* GNUmakefile.am:
2010-06-28 John Gregg <johnnyg@google.com>
Reviewed by Kent Tamura.
add ENABLE_DIRECTORY_UPLOAD build support
https://bugs.webkit.org/show_bug.cgi?id=41100
* Configurations/FeatureDefines.xcconfig:
2010-06-28 Xan Lopez <xlopez@igalia.com>
Revert to build jsc, since the tests expect this.
* GNUmakefile.am:
2010-06-28 Zoltan Herczeg <zherczeg@webkit.org>
Reviewed by Oliver Hunt.
Only one character lookahead should be enough for the lexer
https://bugs.webkit.org/show_bug.cgi?id=41213
The lexer had 4 character lookahead before, which required
a complex shifting mechanism. This can be improved by using
only one character lookahead for most decisions, and a
peek() function as a fallback when it is absolutely necessary.
* parser/Lexer.cpp:
(JSC::Lexer::currentCharacter):
(JSC::Lexer::currentOffset):
(JSC::Lexer::setCode):
(JSC::Lexer::shift):
(JSC::Lexer::peek):
(JSC::Lexer::getUnicodeCharacter):
(JSC::Lexer::shiftLineTerminator):
(JSC::Lexer::lastTokenWasRestrKeyword):
(JSC::Lexer::lex):
(JSC::Lexer::scanRegExp):
(JSC::Lexer::skipRegExp):
* parser/Lexer.h:
2010-06-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Unreviewed build fix.
[EFL] Build fix for latest version of Ecore library.
Ecore recently changed return type of callbacks from int to Eina_Bool.
* wtf/efl/MainThreadEfl.cpp:
(WTF::timeoutFired): Return Eina_Bool instead of int.
2010-06-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QScriptValue should have API for accessing object properties
https://bugs.webkit.org/show_bug.cgi?id=40903
Make possible to access properties inside QScriptValues. While this
still doesn't support the ResolveLocal parameter, it is already useful
for testing the API.
The tests from upstream QtScript weren't imported since most of them
depend on the setProperty() function as well. A simple test was created.
* qt/api/qscriptvalue.cpp:
(QScriptValue::property):
* qt/api/qscriptvalue.h:
(QScriptValue::):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::property):
* qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
(tst_QScriptValue::propertySimple):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
2010-06-28 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
[GTK] Add support for GTK+3
https://bugs.webkit.org/show_bug.cgi?id=41253
Suffix jsc with the API version of the library, so that
libwebkitgtk 1.x and 3.x can install jsc.
* GNUmakefile.am:
2010-06-27 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Turn ENABLE(SINGLE_THREADED) on.
https://bugs.webkit.org/show_bug.cgi?id=41135
Brew MP does not support preemptive multi-threading.
Disable threading for Brew MP.
* wtf/Platform.h:
2010-06-26 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Dimitri Glazkov.
Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
https://bugs.webkit.org/show_bug.cgi?id=38924
* Configurations/FeatureDefines.xcconfig:
2010-06-25 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
We assume in testapi.c that the value aHeapRef refers to will not be
moved. When we have movable objects, this will not be the case.
* API/tests/testapi.c:
(main):
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61924.
http://trac.webkit.org/changeset/61924
https://bugs.webkit.org/show_bug.cgi?id=41240
It was rolled out, but cq+ wasn't removed (Requested by Ossy_
on #webkit).
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Merge RegExp constructor and RegExp::create methods into one.
Both of function are called with tree parameters and check whether
flags (the third param) is given or not.
Simplify hash lookups in RegExpCache::create with giving them an extra
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
Introduce QtScript benchmarks.
The QtScript performance should be tested regularly. The patch introduces
micro benchmarks for existing API.
[Qt] Performance of the QtScript API is not tested.
https://bugs.webkit.org/show_bug.cgi?id=40911
* qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
* qt/benchmarks/benchmarks.pro: Added.
* qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
* qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
(tst_QScriptEngine::checkSyntax_data):
(tst_QScriptEngine::checkSyntax):
(tst_QScriptEngine::constructor):
(tst_QScriptEngine::evaluateString_data):
(tst_QScriptEngine::evaluateString):
(tst_QScriptEngine::evaluateProgram_data):
(tst_QScriptEngine::evaluateProgram):
(tst_QScriptEngine::newObject):
(tst_QScriptEngine::nullValue):
(tst_QScriptEngine::undefinedValue):
(tst_QScriptEngine::globalObject):
(tst_QScriptEngine::toStringHandle):
* qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
* qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
(tst_QScriptValue::tst_QScriptValue):
(tst_QScriptValue::~tst_QScriptValue):
(tst_QScriptValue::values_data):
(tst_QScriptValue::ctorBool):
(tst_QScriptValue::ctorReal):
(tst_QScriptValue::ctorNumber):
(tst_QScriptValue::ctorQString):
(tst_QScriptValue::ctorCString):
(tst_QScriptValue::ctorSpecial):
(tst_QScriptValue::ctorQScriptValue):
(tst_QScriptValue::isValid_data):
(tst_QScriptValue::isValid):
(tst_QScriptValue::isBool_data):
(tst_QScriptValue::isBool):
(tst_QScriptValue::isNumber_data):
(tst_QScriptValue::isNumber):
(tst_QScriptValue::isFunction_data):
(tst_QScriptValue::isFunction):
(tst_QScriptValue::isNull_data):
(tst_QScriptValue::isNull):
(tst_QScriptValue::isString_data):
(tst_QScriptValue::isString):
(tst_QScriptValue::isUndefined_data):
(tst_QScriptValue::isUndefined):
(tst_QScriptValue::isObject_data):
(tst_QScriptValue::isObject):
(tst_QScriptValue::isError_data):
(tst_QScriptValue::isError):
(tst_QScriptValue::toString_data):
(tst_QScriptValue::toString):
(tst_QScriptValue::toNumber_data):
(tst_QScriptValue::toNumber):
(tst_QScriptValue::toBool_data):
(tst_QScriptValue::toBool):
(tst_QScriptValue::toInteger_data):
(tst_QScriptValue::toInteger):
(tst_QScriptValue::toInt32_data):
(tst_QScriptValue::toInt32):
(tst_QScriptValue::toUInt32_data):
(tst_QScriptValue::toUInt32):
(tst_QScriptValue::toUInt16_data):
(tst_QScriptValue::toUInt16):
(tst_QScriptValue::toObject_data):
(tst_QScriptValue::toObject):
(tst_QScriptValue::equals_data):
(tst_QScriptValue::equals):
(tst_QScriptValue::strictlyEquals_data):
(tst_QScriptValue::strictlyEquals):
(tst_QScriptValue::instanceOf_data):
(tst_QScriptValue::instanceOf):
2010-06-25 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Remove old js parser
https://bugs.webkit.org/show_bug.cgi?id=41222
Remove the old yacc parser, this also solves the tiger problem. Which
was a conflict between yacc generated token values and those in the
custom parser
* Android.mk:
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/Grammar.y: Removed.
* parser/JSParser.cpp:
* parser/JSParser.h:
* parser/Lexer.cpp:
* parser/NodeConstructors.h:
(JSC::Node::Node):
* parser/Parser.cpp:
(JSC::Parser::parse):
* wtf/Platform.h:
2010-06-25 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
New QtScript API; setPrototype() and prototype().
This patch implements QScriptValue's prototype accessors.
[Qt] QScriptValue should have accessors to a prototype.
https://bugs.webkit.org/show_bug.cgi?id=39356
* qt/api/qscriptvalue.cpp:
(QScriptValue::prototype):
(QScriptValue::setPrototype):
* qt/api/qscriptvalue.h:
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::prototype):
(QScriptValuePrivate::setPrototype):
* qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
(tst_QScriptValue::getSetPrototype):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Kenneth Rohde Christiansen.
[CMake] Add option to enable JIT.
JIT is disabled by default, but now it's possible to enable it through
an option to CMake: -DENABLE_JIT will enable it.
https://bugs.webkit.org/show_bug.cgi?id=40936
* CMakeLists.txt: Add missing files and re-sort.
2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Reviewed by Gustavo Noronha Silva.
[CMake] Remove unused variable in EFL build system. It was previously
being used to set the flags of each port but it was superseded by
other flags.
https://bugs.webkit.org/show_bug.cgi?id=40931
* jsc/CMakeLists.txt:
2010-06-25 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
sunspider.
* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::AssemblerBuffer):
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61842.
http://trac.webkit.org/changeset/61842
https://bugs.webkit.org/show_bug.cgi?id=41208
It broke Windows build (Requested by Ossy_ on #webkit).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Removed.
* wtf/win/OwnPtrWin.h: Removed.
2010-06-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r61833.
http://trac.webkit.org/changeset/61833
https://bugs.webkit.org/show_bug.cgi?id=41205
It broke Leopard and GTK (Requested by Ossy_ on #webkit).
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
(JSC::RegExp::create):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Adam Barth.
Change OwnPtrCommon to include platform-specific headers
https://bugs.webkit.org/show_bug.cgi?id=40279
Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Added.
* wtf/win/OwnPtrWin.h: Added.
2010-06-25 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Add the possibility for a head and footer section to create_jit_stubs.
https://bugs.webkit.org/show_bug.cgi?id=36050
* create_jit_stubs:
2010-06-24 Renata Hodovan <reni@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Merge RegExp constructor and RegExp::create methods into one.
Both of function are called with tree parameters and check whether
flags (the third param) is given or not.
Simplify hash lookups in RegExpCache::create with giving them an extra
iterator parameter.
https://bugs.webkit.org/show_bug.cgi?id=41055
* runtime/RegExp.cpp:
(JSC::RegExp::RegExp):
* runtime/RegExp.h:
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
* runtime/RegExpCache.h:
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
https://bugs.webkit.org/show_bug.cgi?id=41193
I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
were a few places where endianness was being hardcoded. This patch fixes
the errors i could find through code inspection.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
2010-06-24 Oliver Hunt <oliver@apple.com>
Build fix
Temporarily get the tiger bot working again by disabling the
new JS parser. GCC on tiger is miscompiling the parser and
I don't have access to a tiger machine right now.
* wtf/Platform.h:
2010-06-21 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoff Garen.
https://bugs.webkit.org/show_bug.cgi?id=40128
Fixed broken debug functionality.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
Fixed to work with updated call frame.
* runtime/JSImmediate.h:
(JSC::JSValue::isCell):
Added assert for aligned cell.
* runtime/JSValue.cpp:
(JSC::JSValue::description):
Fixed to work with current JSValue implementation.
* runtime/JSZombie.cpp:
(JSC::JSZombie::leakedZombieStructure):
JSombies compile again.
2010-06-24 Leandro Pereira <leandro@profusion.mobi>
Unreviewed build fix.
* CMakeLists.txt: Add JSParser.cpp.
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Single character string replacement may replace too many characters
https://bugs.webkit.org/show_bug.cgi?id=41138
<rdar://problem/8097496>
Simple fix to stop the rope path of single character replacement
once the first replacement occurs.
* runtime/JSString.cpp:
(JSC::JSString::replaceCharacter):
2010-06-24 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
Fix the length of instruction stream controlled by constant pool
https://bugs.webkit.org/show_bug.cgi?id=40293
The initial/maximum length of instruction stream (m_maxDistance) should
be set when the first constant arrives to the constant pool. Otherwise
the constant pool could be placed into an uninterrupted sequence.
* assembler/AssemblerBufferWithConstantPool.h:
(JSC::):
2010-06-24 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
We assume bytecodeOffset will always return a value > 1,
so we adjust the failure case to return 1 instead of 0.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
2010-06-23 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Custom-written JavaScript parser
https://bugs.webkit.org/show_bug.cgi?id=34019
Implement a recursive descent parser similar to that used by V8 and
SpiderMonkey. Greater than 2x improvement in SunSpider parsing tests.
The parser consists of a JSParser class that uses a TreeBuilder to actually
build the AST. There are currently two builders -- the ASTBuilder and
SyntaxChecker which separate the job of building an AST for code generation
and simply checking syntactic correctness.
There's still some less than ideal code remaining in the parser to allow
us to retain the existing lexing code with minimal changes. We'll tidy
this up at a later date.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/ASTBuilder.h: Added.
(JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
(JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::createSourceElements):
(JSC::ASTBuilder::varDeclarations):
(JSC::ASTBuilder::funcDeclarations):
(JSC::ASTBuilder::features):
(JSC::ASTBuilder::numConstants):
(JSC::ASTBuilder::appendToComma):
(JSC::ASTBuilder::createCommaExpr):
(JSC::ASTBuilder::createLogicalNot):
(JSC::ASTBuilder::createUnaryPlus):
(JSC::ASTBuilder::createVoid):
(JSC::ASTBuilder::thisExpr):
(JSC::ASTBuilder::createResolve):
(JSC::ASTBuilder::createObjectLiteral):
(JSC::ASTBuilder::createArray):
(JSC::ASTBuilder::createNumberExpr):
(JSC::ASTBuilder::createString):
(JSC::ASTBuilder::createBoolean):
(JSC::ASTBuilder::createNull):
(JSC::ASTBuilder::createBracketAccess):
(JSC::ASTBuilder::createDotAccess):
(JSC::ASTBuilder::createRegex):
(JSC::ASTBuilder::createNewExpr):
(JSC::ASTBuilder::createConditionalExpr):
(JSC::ASTBuilder::createAssignResolve):
(JSC::ASTBuilder::createFunctionExpr):
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createArguments):
(JSC::ASTBuilder::createArgumentsList):
(JSC::ASTBuilder::createProperty):
(JSC::ASTBuilder::createPropertyList):
(JSC::ASTBuilder::createElementList):
(JSC::ASTBuilder::createFormalParameterList):
(JSC::ASTBuilder::createClause):
(JSC::ASTBuilder::createClauseList):
(JSC::ASTBuilder::setUsesArguments):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::createBlockStatement):
(JSC::ASTBuilder::createExprStatement):
(JSC::ASTBuilder::createIfStatement):
(JSC::ASTBuilder::createForLoop):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createEmptyStatement):
(JSC::ASTBuilder::createVarStatement):
(JSC::ASTBuilder::createReturnStatement):
(JSC::ASTBuilder::createBreakStatement):
(JSC::ASTBuilder::createContinueStatement):
(JSC::ASTBuilder::createTryStatement):
(JSC::ASTBuilder::createSwitchStatement):
(JSC::ASTBuilder::createWhileStatement):
(JSC::ASTBuilder::createDoWhileStatement):
(JSC::ASTBuilder::createLabelStatement):
(JSC::ASTBuilder::createWithStatement):
(JSC::ASTBuilder::createThrowStatement):
(JSC::ASTBuilder::createDebugger):
(JSC::ASTBuilder::createConstStatement):
(JSC::ASTBuilder::appendConstDecl):
(JSC::ASTBuilder::appendStatement):
(JSC::ASTBuilder::addVar):
(JSC::ASTBuilder::combineCommaNodes):
(JSC::ASTBuilder::evalCount):
(JSC::ASTBuilder::appendBinaryExpressionInfo):
(JSC::ASTBuilder::operatorStackPop):
(JSC::ASTBuilder::operatorStackHasHigherPrecedence):
(JSC::ASTBuilder::getFromOperandStack):
(JSC::ASTBuilder::shrinkOperandStackBy):
(JSC::ASTBuilder::appendBinaryOperation):
(JSC::ASTBuilder::operatorStackAppend):
(JSC::ASTBuilder::popOperandStack):
(JSC::ASTBuilder::appendUnaryToken):
(JSC::ASTBuilder::unaryTokenStackLastType):
(JSC::ASTBuilder::unaryTokenStackLastStart):
(JSC::ASTBuilder::unaryTokenStackRemoveLast):
(JSC::ASTBuilder::assignmentStackAppend):
(JSC::ASTBuilder::createAssignment):
(JSC::ASTBuilder::Scope::Scope):
(JSC::ASTBuilder::setExceptionLocation):
(JSC::ASTBuilder::incConstants):
(JSC::ASTBuilder::usesThis):
(JSC::ASTBuilder::usesCatch):
(JSC::ASTBuilder::usesClosures):
(JSC::ASTBuilder::usesArguments):
(JSC::ASTBuilder::usesAssignment):
(JSC::ASTBuilder::usesWith):
(JSC::ASTBuilder::usesEval):
(JSC::ASTBuilder::createNumber):
(JSC::ASTBuilder::makeTypeOfNode):
(JSC::ASTBuilder::makeDeleteNode):
(JSC::ASTBuilder::makeNegateNode):
(JSC::ASTBuilder::makeBitwiseNotNode):
(JSC::ASTBuilder::makeMultNode):
(JSC::ASTBuilder::makeDivNode):
(JSC::ASTBuilder::makeAddNode):
(JSC::ASTBuilder::makeSubNode):
(JSC::ASTBuilder::makeLeftShiftNode):
(JSC::ASTBuilder::makeRightShiftNode):
(JSC::ASTBuilder::makeFunctionCallNode):
(JSC::ASTBuilder::makeBinaryNode):
(JSC::ASTBuilder::makeAssignNode):
(JSC::ASTBuilder::makePrefixNode):
(JSC::ASTBuilder::makePostfixNode):
* parser/JSParser.cpp: Added.
(JSC::JSParser::AllowInOverride::AllowInOverride):
(JSC::JSParser::AllowInOverride::~AllowInOverride):
(JSC::JSParser::token):
(JSC::JSParser::next):
(JSC::JSParser::consume):
(JSC::JSParser::match):
(JSC::JSParser::tokenStart):
(JSC::JSParser::tokenLine):
(JSC::JSParser::tokenEnd):
(JSC::JSParser::):
(JSC::JSParser::autoSemiColon):
(JSC::JSParser::canRecurse):
(JSC::JSParser::lastTokenEnd):
(JSC::jsParse):
(JSC::JSParser::JSParser):
(JSC::JSParser::parseProgram):
(JSC::JSParser::allowAutomaticSemicolon):
(JSC::JSParser::parseSourceElements):
(JSC::JSParser::parseVarDeclaration):
(JSC::JSParser::parseConstDeclaration):
(JSC::JSParser::parseDoWhileStatement):
(JSC::JSParser::parseWhileStatement):
(JSC::JSParser::parseVarDeclarationList):
(JSC::JSParser::parseConstDeclarationList):
(JSC::JSParser::parseForStatement):
(JSC::JSParser::parseBreakStatement):
(JSC::JSParser::parseContinueStatement):
(JSC::JSParser::parseReturnStatement):
(JSC::JSParser::parseThrowStatement):
(JSC::JSParser::parseWithStatement):
(JSC::JSParser::parseSwitchStatement):
(JSC::JSParser::parseSwitchClauses):
(JSC::JSParser::parseSwitchDefaultClause):
(JSC::JSParser::parseTryStatement):
(JSC::JSParser::parseDebuggerStatement):
(JSC::JSParser::parseBlockStatement):
(JSC::JSParser::parseStatement):
(JSC::JSParser::parseFormalParameters):
(JSC::JSParser::parseFunctionBody):
(JSC::JSParser::parseFunctionInfo):
(JSC::JSParser::parseFunctionDeclaration):
(JSC::JSParser::parseExpressionOrLabelStatement):
(JSC::JSParser::parseExpressionStatement):
(JSC::JSParser::parseIfStatement):
(JSC::JSParser::parseExpression):
(JSC::JSParser::parseAssignmentExpression):
(JSC::JSParser::parseConditionalExpression):
(JSC::isUnaryOp):
(JSC::JSParser::isBinaryOperator):
(JSC::JSParser::parseBinaryExpression):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseObjectLiteral):
(JSC::JSParser::parseArrayLiteral):
(JSC::JSParser::parsePrimaryExpression):
(JSC::JSParser::parseArguments):
(JSC::JSParser::parseMemberExpression):
(JSC::JSParser::parseUnaryExpression):
* parser/JSParser.h: Added.
(JSC::):
(JSC::JSTokenInfo::JSTokenInfo):
* parser/Lexer.cpp:
(JSC::Lexer::lex):
* parser/Lexer.h:
(JSC::Lexer::setLastLineNumber):
(JSC::Lexer::lastLineNumber):
* parser/NodeConstructors.h:
(JSC::Node::Node):
* parser/Parser.cpp:
(JSC::Parser::parse):
* parser/SyntaxChecker.h: Added.
(JSC::SyntaxChecker::SyntaxChecker):
(JSC::SyntaxChecker::createSourceElements):
(JSC::SyntaxChecker::makeFunctionCallNode):
(JSC::SyntaxChecker::appendToComma):
(JSC::SyntaxChecker::createCommaExpr):
(JSC::SyntaxChecker::makeAssignNode):
(JSC::SyntaxChecker::makePrefixNode):
(JSC::SyntaxChecker::makePostfixNode):
(JSC::SyntaxChecker::makeTypeOfNode):
(JSC::SyntaxChecker::makeDeleteNode):
(JSC::SyntaxChecker::makeNegateNode):
(JSC::SyntaxChecker::makeBitwiseNotNode):
(JSC::SyntaxChecker::createLogicalNot):
(JSC::SyntaxChecker::createUnaryPlus):
(JSC::SyntaxChecker::createVoid):
(JSC::SyntaxChecker::thisExpr):
(JSC::SyntaxChecker::createResolve):
(JSC::SyntaxChecker::createObjectLiteral):
(JSC::SyntaxChecker::createArray):
(JSC::SyntaxChecker::createNumberExpr):
(JSC::SyntaxChecker::createString):
(JSC::SyntaxChecker::createBoolean):
(JSC::SyntaxChecker::createNull):
(JSC::SyntaxChecker::createBracketAccess):
(JSC::SyntaxChecker::createDotAccess):
(JSC::SyntaxChecker::createRegex):
(JSC::SyntaxChecker::createNewExpr):
(JSC::SyntaxChecker::createConditionalExpr):
(JSC::SyntaxChecker::createAssignResolve):
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFunctionBody):
(JSC::SyntaxChecker::createArguments):
(JSC::SyntaxChecker::createArgumentsList):
(JSC::SyntaxChecker::createProperty):
(JSC::SyntaxChecker::createPropertyList):
(JSC::SyntaxChecker::createElementList):
(JSC::SyntaxChecker::createFormalParameterList):
(JSC::SyntaxChecker::createClause):
(JSC::SyntaxChecker::createClauseList):
(JSC::SyntaxChecker::setUsesArguments):
(JSC::SyntaxChecker::createFuncDeclStatement):
(JSC::SyntaxChecker::createBlockStatement):
(JSC::SyntaxChecker::createExprStatement):
(JSC::SyntaxChecker::createIfStatement):
(JSC::SyntaxChecker::createForLoop):
(JSC::SyntaxChecker::createForInLoop):
(JSC::SyntaxChecker::createEmptyStatement):
(JSC::SyntaxChecker::createVarStatement):
(JSC::SyntaxChecker::createReturnStatement):
(JSC::SyntaxChecker::createBreakStatement):
(JSC::SyntaxChecker::createContinueStatement):
(JSC::SyntaxChecker::createTryStatement):
(JSC::SyntaxChecker::createSwitchStatement):
(JSC::SyntaxChecker::createWhileStatement):
(JSC::SyntaxChecker::createWithStatement):
(JSC::SyntaxChecker::createDoWhileStatement):
(JSC::SyntaxChecker::createLabelStatement):
(JSC::SyntaxChecker::createThrowStatement):
(JSC::SyntaxChecker::createDebugger):
(JSC::SyntaxChecker::createConstStatement):
(JSC::SyntaxChecker::appendConstDecl):
(JSC::SyntaxChecker::createGetterOrSetterProperty):
(JSC::SyntaxChecker::appendStatement):
(JSC::SyntaxChecker::addVar):
(JSC::SyntaxChecker::combineCommaNodes):
(JSC::SyntaxChecker::evalCount):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/JSGlobalData.h:
* wtf/Platform.h:
* wtf/ThreadSpecific.h:
(WTF::T):
2010-06-23 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
Optimization of the QScriptValuePrivate.
Patch change only internals of the QScriptValuePrivate.
Most of the QScriptValuePrivate's attributes were moved
into an union.
[Qt] Optimization of the QScriptVAluePrivate.
https://bugs.webkit.org/show_bug.cgi?id=40415
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::globalObject):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::):
(QScriptValuePrivate::~QScriptValuePrivate):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::equals):
(QScriptValuePrivate::strictlyEquals):
(QScriptValuePrivate::assignEngine):
(QScriptValuePrivate::operator JSValueRef):
(QScriptValuePrivate::operator JSObjectRef):
(QScriptValuePrivate::refinedJSValue):
2010-06-23 Kwang Yul Seo <skyul@company100.net>
Reviewed by Oliver Hunt.
[GTK] Implement ThreadSpecific with glib
https://bugs.webkit.org/show_bug.cgi?id=39829
Implement ThreadSpecific with glib's GStaticPrivate.
This patch makes it possible to build GTK port without pthread.
* wtf/ThreadSpecific.h:
(WTF::::ThreadSpecific):
(WTF::::~ThreadSpecific):
(WTF::::get):
(WTF::::set):
(WTF::::destroy):
2010-06-23 Leandro Pereira <leandro@profusion.mobi>
Unreviewed build fix.
* CMakeLists.txt: Add runtime/RegExpCache.cpp.
2010-06-22 Renata Hodovan <hodovan@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Adding regular expression caching to JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=38142
The cache is based on Round Robin eviction policy, and
can cache at most 256 character long regular expressions,
and at most 256 of them. These values can be changed at compile time.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecompiler/NodesCodegen.cpp:
(JSC::RegExpNode::emitBytecode):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::regExpCache):
* runtime/RegExpCache.cpp: Added.
(JSC::RegExpCache::lookupOrCreate):
(JSC::RegExpCache::create):
(JSC::RegExpCache::RegExpCache):
* runtime/RegExpCache.h: Added.
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpKey.h: Added.
(JSC::RegExpKey::RegExpKey):
(JSC::RegExpKey::getFlagsValue):
(WTF::operator==):
(WTF::):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
2010-06-22 Gabor Loki <loki@webkit.org>
Reviewed by Geoffrey Garen.
Add native call support for ARM and Thumb-2 JIT.
https://bugs.webkit.org/show_bug.cgi?id=40231
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* wtf/Platform.h:
2010-06-21 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make JSC more resilient in the face of parse failures
https://bugs.webkit.org/show_bug.cgi?id=40951
A number of recent bugs have occurred due to issues like miscounting
BOMs, etc which lead to interesting crashes later on. Adding this
logic hardens JSC in the face of these errors, and has no impact on
performance (32bit jit actually gets 0.7% faster but I put that down
to cache effects).
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffset):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct):
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::FunctionExecutable::bytecodeForCall):
(JSC::FunctionExecutable::bytecodeForConstruct):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::numericCompareFunction):
2010-06-21 John Sullivan <sullivan@apple.com>
Reviewed by Adam Roben.
RetainPtr can't be used in HashMaps or HashSets
<https://bugs.webkit.org/show_bug.cgi?id=40938>
Added hashing knowledge similar to that in COMPtr.h.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr):
New function, copied from COMPtr.h but for the type change.
(WTF::RetainPtr::isHashTableDeletedValue):
Ditto.
(WTF::RetainPtr::hashTableDeletedValue):
Ditto.
Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
rather than the COMPtr implementation.
2010-06-19 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Need to ensure that we grow the RegisterFile when creating a callframe for host code
https://bugs.webkit.org/show_bug.cgi?id=40858
<rdar://problem/8108986>
In the past the use of the callframe in hostcode was much more
limited. Now that we expect the callframe to always be valid
we need to grow the RegisterFile so that this is actually the
case. In this particular case the problem was failing to grow
the registerfile could lead to a callframe that extended beyond
RegisterFiler::end(), so vm re-entry would clobber the callframe
other scenarios could also lead to badness.
I was unable to construct a simple testcase to trigger badness,
and any such testcase would be so dependent on exact vm stack
layout that it would be unlikely to work as a testcase following
any callframe or register allocation changes anyway.
Thankfully the new assertion I added should help to catch these
failures in future, and triggers on a couple of tests currently.
* interpreter/CallFrame.cpp:
(JSC::CallFrame::registerFile):
* interpreter/CallFrame.h:
(JSC::ExecState::init):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-06-21 Satish Sampath <satish@chromium.org>
Reviewed by Steve Block.
Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
https://bugs.webkit.org/show_bug.cgi?id=40878
* Configurations/FeatureDefines.xcconfig:
2010-06-21 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kent Tamura.
[BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
https://bugs.webkit.org/show_bug.cgi?id=40653
Currently, other ports do not use global new/delete operator overloading
when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
"global fastMalloc new" because the default new/delete causes crash on device.
We need to replace them with Brew MP's MALLOC/FREE.
* wtf/FastMalloc.h:
2010-06-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Work around a build problem with libjscore on Symbian.
https://bugs.webkit.org/show_bug.cgi?id=40840
Sbsv2 sometimes have problems with debug/release configuration
determination causing QtWebKit in release to try linking with the debug
JavaScriptCore static library. This patch limit the jscore/jscored
r58306 fix necessary for mac builds only to the mac platform to prevent the
different name problem.
The real fix would be to fix qmake or the toolchain, this patch might
help meanwhile.
* JavaScriptCore.pri:
2010-06-21 Patrick Gansterer <paroga@paroga.com>
Reviewed by Kent Tamura.
Buildfix after r61338.
https://bugs.webkit.org/show_bug.cgi?id=40888
roundUpAllocationSize is needed in RegisterFile.h.
* jit/ExecutableAllocator.h:
2010-06-19 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Include <string.h> in StringExtras.h
https://bugs.webkit.org/show_bug.cgi?id=40808
Without string.h, RVCT 2.2 can't compile StringExtras.h.
It can't find strlen and strncmp.
* wtf/StringExtras.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Don't use __attribute__((may_alias)) with the Intel compiler,
as it doesn't understand it.
* wtf/Vector.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix compilation with the Intel C++ compiler (11.1.072).
Like RVCT, label pointers must be void*, not const void*.
* bytecode/Opcode.h:
2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Add the WTF_COMPILER_INTEL for when the Intel compiler is used
for building. Usually, the Intel compiler masquerades as
another compiler in the system and gets away with it, but some
times specific fixes are required (such as when using language
extensions).
* wtf/Platform.h:
2010-06-18 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Incorrect handling of multiple BOMs scattered through a file.
https://bugs.webkit.org/show_bug.cgi?id=40865
When determining the offset of open and close braces in a source
with BOMs we were finishing our count early as we failed to account
for BOMs prior to the open/close brace positions effecting those
positions.
* parser/Lexer.cpp:
(JSC::Lexer::sourceCode):
2010-06-17 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
Don't throw away exception information for functions that use exceptions
https://bugs.webkit.org/show_bug.cgi?id=40786
Simple patch to stop JSC from throwing away the exception information
of a function that uses "exceptiony" features like try and throw. This
is a speed up for catching expressions but it's difficult to quantify as
the old cost of reparsing is amortised over all exceptions caught in the
effected function.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::emitCatch):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitThrow):
2010-06-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add PlatformStrategies and PluginStrategy classes.
https://bugs.webkit.org/show_bug.cgi?id=40850
* wtf/Platform.h:
2010-06-18 Leandro Pereira <leandro@profusion.mobi>
[EFL] Unreviewed build fix.
* wtf/CMakeLists.txt: Add MD5.cpp.
2010-06-17 Shu Chang <chang.shu@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Fix the link error on symbian with ENABLE_JIT=0.
1. Add "#if ENABLE(JIT)" in the header file;
2. Put feature enable/disable logic to a common.pri so
that both JavaScriptCore.pri and WebCore.pri can share.
https://bugs.webkit.org/show_bug.cgi?id=40780
* JavaScriptCore.pri:
* jit/ExecutableAllocator.h:
2010-06-17 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
Use adoptRef and create functions in more code paths
https://bugs.webkit.org/show_bug.cgi?id=40760
* API/JSClassRef.h: Removed unneeded include of RefCounted.h.
* API/JSWeakObjectMapRefPrivate.cpp: Ditto.
* bytecode/CodeBlock.h:
(JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
SharedSymbolTable::create function instead of calling new directly.
* runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
class and made the constructor private.
2010-06-17 Mark Brand <mabrand@mabrand.nl>
Reviewed by Simon Hausmann.
[Qt] use "win32-g++*" scope to match all MinGW makespecs
The scope "win32-g++" comes from the name of the makespec. However, it
is frequently used to check for MinGW. This works fine as long as
win32-g++ is the only makespec for MinGW. Now we need the wildcard
to cover "win32-g++-cross" as well.
* JavaScriptCore.pro:
2010-06-16 Darin Adler <darin@apple.com>
Reviewed by David Levin.
Deploy adoptRef in more places, including all HTML and MathML elements
https://bugs.webkit.org/show_bug.cgi?id=39941
* wtf/ThreadSafeShared.h: Made the constructor protected and removed the
unneeded support for initial reference counts other than 1.
2010-06-16 Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed by Geoffrey Garen.
Store matchBegin directly in the array of output instead of the stack.
https://bugs.webkit.org/show_bug.cgi?id=38988
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::generateDisjunction):
(JSC::Yarr::RegexGenerator::generate):
2010-06-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make JavaScriptCore build with clang++.
* jit/JITInlineMethods.h:
(JSC::JIT::emitPutVirtualRegister):
Explicitly cast to an int.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::compileRegex):
Return 0 instead of false.
2010-06-15 Adam Roben <aroben@apple.com>
Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
Reviewed by Sam Weinig.
* JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
JavaScriptCore's DerivedSources directory to
AppleInternal/Sources/JavaScriptCore.
2010-06-15 Gabor Loki <loki@webkit.org>
Rubber-stamped by Eric Seidel.
Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
https://bugs.webkit.org/show_bug.cgi?id=40423
Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
non-static data member warning.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
2010-06-11 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
Rename the rest of the *Tokenizer classes to *DocumentParser
https://bugs.webkit.org/show_bug.cgi?id=40507
* wtf/Platform.h:
- fixed a comment to match new names.
2010-06-11 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
https://bugs.webkit.org/show_bug.cgi?id=40412
Conversion between a JSC C types and a QtScript private types, takes
main part of the source code. In most cases a mapping between the types
is one to one. New cast operators were added to simplify the code.
The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
The QScriptEnginePrivate could be casted to the JSGlobalContext.
The QScriptProgramPrivate could be casted to the JSStringRef.
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::evaluate):
(QScriptEnginePrivate::newObject):
(QScriptEnginePrivate::globalObject):
* qt/api/qscriptengine_p.h:
(QScriptEnginePrivate::operator JSGlobalContextRef):
* qt/api/qscriptprogram_p.h:
(QScriptProgramPrivate::operator JSStringRef):
* qt/api/qscriptsyntaxcheckresult.cpp:
(QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
(QScriptSyntaxCheckResultPrivate::errorMessage):
(QScriptSyntaxCheckResultPrivate::errorLineNumber):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::~QScriptValuePrivate):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::isBool):
(QScriptValuePrivate::isNumber):
(QScriptValuePrivate::isNull):
(QScriptValuePrivate::isString):
(QScriptValuePrivate::isUndefined):
(QScriptValuePrivate::isFunction):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::equals):
(QScriptValuePrivate::strictlyEquals):
(QScriptValuePrivate::instanceOf):
(QScriptValuePrivate::call):
(QScriptValuePrivate::operator JSValueRef):
(QScriptValuePrivate::operator JSObjectRef):
(QScriptValuePrivate::setValue):
(QScriptValuePrivate::inherits):
(QScriptValuePrivate::refinedJSValue):
2010-05-31 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Implement the simple text code path.
https://bugs.webkit.org/show_bug.cgi?id=40077
Remove the FONT_FAST_PATH macro and use the Qt's
fast text implementation instead of the one of WebKit.
The Qt::TextBypassShaping flag is used to tell Qt to
only use the glyph advances.
Qt 4.7 is needed to get this flag thus the complex path is always
used if QtWebKit is compiled against an earlier version.
Contrary to the WebKit's implementation, the complex code path
is taken if the text is RightToLeft, justified or is formatted
with non-zero letter or word spacing.
* wtf/Platform.h:
2010-06-11 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
add codePointCompare to JavaScriptCore.exp
https://bugs.webkit.org/show_bug.cgi?id=40426
* JavaScriptCore.exp:
2010-06-10 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
https://bugs.webkit.org/show_bug.cgi?id=40367
If we're in the slow case of right shift we must write the type tag as
the only reason we hit this code path is because we know we're working
with a double. eg. we are guaranteed that the tag cannot be reused.
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitRightShiftSlowCase):
2010-06-10 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
Remove weakRandomNumber
https://bugs.webkit.org/show_bug.cgi?id=40291
weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
* wtf/RandomNumber.cpp:
* wtf/RandomNumber.h:
2010-06-09 Alexey Proskuryakov <ap@apple.com>
Reviewed by Brady Eidson.
Export StringImpl::ascii(). It might be not very useful, but it's a public function.
* JavaScriptCore.exp:
2010-06-09 Leandro Pereira <leandro@profusion.mobi>
Reviewed by Adam Treat.
[EFL] Allow building core libraries as shared objects to speed up
linking time on machines with small amounts of memory.
http://webkit.org/b/39899
* CMakeLists.txt: If building with shared core, install the lib.
* jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
* wtf/CMakeLists.txt: If building with shared core, install the lib.
2010-06-09 Gabor Loki <loki@webkit.org>
Reviewed by David Levin.
Remove some unused variable warnings from JITOpcodes
https://bugs.webkit.org/show_bug.cgi?id=40298
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
2010-05-18 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Fix for Bug 34529 - [CSSOM] issues with cssText and selectorText
Add U16_LENGTH that is needed to implement CSS character serialization.
https://bugs.webkit.org/show_bug.cgi?id=34529
* wtf/unicode/qt4/UnicodeQt4.h:
* wtf/unicode/wince/UnicodeWince.h:
2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r60830.
http://trac.webkit.org/changeset/60830
https://bugs.webkit.org/show_bug.cgi?id=40305
Broke the Windows build (Requested by abarth on #webkit).
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Removed.
* wtf/win/OwnPtrWin.h: Removed.
2010-06-08 MORITA Hajime <morrita@google.com>
Unreviewed. An attempt to fix test break.
* Configurations/FeatureDefines.xcconfig:
2010-06-08 Kwang Yul Seo <skyul@company100.net>
Reviewed by Adam Barth.
Change OwnPtrCommon to include platform-specific headers
https://bugs.webkit.org/show_bug.cgi?id=40279
Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.h: Added.
* wtf/win/OwnPtrWin.h: Added.
2010-06-07 MORITA Hajime <morrita@google.com>
Reviewed by Kent Tamura.
https://bugs.webkit.org/show_bug.cgi?id=40219
[Mac] ENABLE_METER_TAG should be enabled
Added ENABLE_METER_TAG.
* Configurations/FeatureDefines.xcconfig:
2010-06-07 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
[BREWMP] Add more types to OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=39667
Add ISSL and ISocket to the list of OwnPtr-ed type.
* wtf/OwnPtrCommon.h:
* wtf/brew/OwnPtrBrew.cpp:
(WTF::deleteOwnedPtr):
2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Simon Hausmann.
[Qt] Crash when compiling on Snow Leopard and running on Leopard
https://bugs.webkit.org/show_bug.cgi?id=31403
Disable the use of pthread_setname_np and other symbols
when targetting Leopard.
Use the defines TARGETING_XX instead of BUILDING_ON_XX
for features that cannot be used before Snow Leopard.
* wtf/Platform.h:
2010-06-07 Gabor Loki <loki@webkit.org>
Reviewed by NOBODY (JSVALUE32_64 build fix).
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix pt 2).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix pt 1).
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-06 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 40214 - Clean up error construction / throwing in JSC.
The one egregious insanity here is that creating an error requires
a VM-entry-esqe-host call (the string argument is wrapped as a JS
object & pushed on the RegisterFile, then unwrapped back to a
UString). Changing this also means you only require a global
object, not an ExecState, to create an error.
The methods to create error objects are also parameterized
requiring a switch on the type, which can be made cleaner and
faster by moving to a separate method per error type. Code to add
divot information to error had been duplicated, and is coalesced
back into a single function.
Convenience methods added to create & throw type & syntax error
with a default error message, since this is a common case.
Also, errors are currently thrown either using
"throwError(exec, error)" or "exec->setException(error)" - unify
on the former, since this is more commonly used. Add
"throwVMError(exec, error)" equivalents, as a convenience for
cases where the result was being wrapped in "JSValue::encode(...)".
* API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertySlot):
(JSC::::put):
(JSC::::deleteProperty):
(JSC::::construct):
(JSC::::hasInstance):
(JSC::::call):
(JSC::::toNumber):
(JSC::::toString):
(JSC::::staticValueGetter):
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* API/JSObjectRef.cpp:
(JSObjectMakeError):
* JavaScriptCore.exp:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewError):
(JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ThrowableExpressionData::emitThrowError):
(JSC::RegExpNode::emitBytecode):
(JSC::PostfixErrorNode::emitBytecode):
(JSC::PrefixErrorNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(functionRun):
(functionLoad):
(functionCheckSyntax):
* parser/Nodes.h:
* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/Error.cpp:
(JSC::createError):
(JSC::createEvalError):
(JSC::createRangeError):
(JSC::createReferenceError):
(JSC::createSyntaxError):
(JSC::createTypeError):
(JSC::createURIError):
(JSC::addErrorSourceInfo):
(JSC::addErrorDivotInfo):
(JSC::addErrorInfo):
(JSC::hasErrorInfo):
(JSC::throwError):
(JSC::throwTypeError):
(JSC::throwSyntaxError):
* runtime/Error.h:
(JSC::throwVMError):
(JSC::throwVMTypeError):
* runtime/ErrorConstructor.cpp:
(JSC::constructWithErrorConstructor):
(JSC::callErrorConstructor):
* runtime/ErrorConstructor.h:
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
(JSC::ErrorInstance::create):
* runtime/ErrorInstance.h:
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/ExceptionHelpers.cpp:
(JSC::createStackOverflowError):
(JSC::createUndefinedVariableError):
(JSC::createInvalidParamError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
(JSC::throwOutOfMemoryError):
* runtime/ExceptionHelpers.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compile):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compile):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/Identifier.cpp:
(JSC::Identifier::from):
* runtime/Identifier.h:
* runtime/JSArray.cpp:
(JSC::JSArray::put):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncEval):
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue):
(JSC::Walker::walk):
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSObject.cpp:
(JSC::throwSetterError):
(JSC::JSObject::put):
(JSC::JSObject::putWithAttributes):
(JSC::JSObject::defaultValue):
(JSC::JSObject::hasInstance):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
* runtime/JSValue.cpp:
(JSC::JSValue::toObjectSlowCase):
(JSC::JSValue::synthesizeObject):
(JSC::JSValue::synthesizePrototype):
* runtime/NativeErrorConstructor.cpp:
(JSC::constructWithNativeErrorConstructor):
(JSC::callNativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::toPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::match):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncToString):
2010-06-05 Kwang Yul Seo <skyul@company100.net>
Reviewed by Eric Seidel.
[BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
https://bugs.webkit.org/show_bug.cgi?id=39710
Build fix for BREW MP.
* wtf/MathExtras.h:
2010-06-04 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
HTML5 parser should be within 1% of old parser performance
https://bugs.webkit.org/show_bug.cgi?id=40172
Fix cast in this operator= to allow for assignment between vectors with
different inline capacities (as clearly intended by its author).
* wtf/Vector.h:
(WTF::::operator):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New QtScript API; QScriptValue::instanceOf.
New function create an easy way to check value's prototype hierarchy.
[Qt] QScriptValue should have an instanceOf method
https://bugs.webkit.org/show_bug.cgi?id=40120
* qt/api/qscriptvalue.cpp:
(QScriptValue::instanceOf):
* qt/api/qscriptvalue.h:
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::instanceOf):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
(tst_QScriptValue::instanceOf_initData):
(tst_QScriptValue::instanceOf_makeData):
(tst_QScriptValue::instanceOf_test):
2010-06-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (interpreter build fix).
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-06-04 Mark Rowe <mrowe@apple.com>
Silence some warnings seen on the build bot.
* JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
* JavaScriptCore.JSVALUE32only.exp: Ditto.
* JavaScriptCore.JSVALUE64only.exp: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
complain about not knowing how to compile them.
2010-06-04 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
Mostly for consistency, but constructor & args arguments are redundant,
and this will help if we wish to be able to JIT calls to more constructors.
* API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::construct):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeConstruct):
* interpreter/Interpreter.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/ArrayConstructor.cpp:
(JSC::constructWithArrayConstructor):
* runtime/BooleanConstructor.cpp:
(JSC::constructWithBooleanConstructor):
* runtime/ConstructData.cpp:
(JSC::construct):
* runtime/ConstructData.h:
* runtime/DateConstructor.cpp:
(JSC::constructWithDateConstructor):
* runtime/Error.cpp:
(JSC::constructNativeError):
(JSC::Error::create):
* runtime/ErrorConstructor.cpp:
(JSC::constructWithErrorConstructor):
* runtime/FunctionConstructor.cpp:
(JSC::constructWithFunctionConstructor):
* runtime/NativeErrorConstructor.cpp:
(JSC::constructWithNativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
(JSC::NativeErrorConstructor::errorStructure):
* runtime/NumberConstructor.cpp:
(JSC::constructWithNumberConstructor):
* runtime/ObjectConstructor.cpp:
(JSC::constructWithObjectConstructor):
* runtime/RegExpConstructor.cpp:
(JSC::constructWithRegExpConstructor):
* runtime/StringConstructor.cpp:
(JSC::constructWithStringConstructor):
2010-06-04 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
Add a takeFirst() method to Deque and use it where appropriate.
https://bugs.webkit.org/show_bug.cgi?id=40089
* wtf/Deque.h:
(WTF::::takeFirst):
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
* wtf/MessageQueue.h:
(WTF::::tryGetMessage):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Remove a QEXPECT_FAIL flag from an autotest.
Test tst_QScriptEngine::globalObject pass after 36600 bug
fix have been applied.
[Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
https://bugs.webkit.org/show_bug.cgi?id=40114
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::globalObject):
2010-06-04 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix QScriptValue::equals.
Handling for a few edge cases were added. Now comparison between
NaN, an invalid objects should works as supposed.
[Qt] QScriptValue::equals problems
https://bugs.webkit.org/show_bug.cgi?id=40110
* qt/api/qscriptvalue.cpp:
(QScriptValue::equals):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::equals):
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
(tst_QScriptValue::equals_initData):
(tst_QScriptValue::equals_makeData):
(tst_QScriptValue::equals_test):
2010-06-03 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New states in QScriptValuePrivate.
The CSpecial state was divided into CNull and CUndefined. It simplify
the QScriptValue code by avoiding a few "cast" and "if".
Moreover the MSVS compiler didn't like casting between a double and an
enum which is avoided now.
[Qt] The QScriptValuePrivate::CSpecial is too generic.
https://bugs.webkit.org/show_bug.cgi?id=40067
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::):
(QScriptValuePrivate::QScriptValuePrivate):
(QScriptValuePrivate::isNull):
(QScriptValuePrivate::isUndefined):
(QScriptValuePrivate::toString):
(QScriptValuePrivate::toNumber):
(QScriptValuePrivate::toBool):
(QScriptValuePrivate::toObject):
(QScriptValuePrivate::assignEngine):
(QScriptValuePrivate::isNumberBased):
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (Qt build fix).
* wtf/Platform.h:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by Mark Rowe.
Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
This was fixed in bug #40094.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/Platform.h:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (Interpreter build fix).
* JavaScriptCore.JSVALUE32_64only.exp:
* JavaScriptCore.JSVALUE32only.exp:
* JavaScriptCore.JSVALUE64only.exp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix II).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-03 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (windows build fix).
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-06-02 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 40094 - The return type of NativeFunction should be EncodedJSValue
On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::call):
* JavaScriptCore.exp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeCall):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
* jsc.cpp:
(functionPrint):
(functionDebug):
(functionGC):
(functionVersion):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(functionSetSamplingFlags):
(functionClearSamplingFlags):
(functionReadline):
(functionQuit):
* runtime/ArrayConstructor.cpp:
(JSC::callArrayConstructor):
(JSC::arrayConstructorIsArray):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::callBooleanConstructor):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/CallData.h:
* runtime/DateConstructor.cpp:
(JSC::callDate):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/ErrorConstructor.cpp:
(JSC::callErrorConstructor):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/FunctionConstructor.cpp:
(JSC::callFunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::callFunctionPrototype):
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/JSCell.h:
(JSC::getCallData):
(JSC::getConstructData):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncIsNaN):
(JSC::globalFuncIsFinite):
(JSC::globalFuncDecodeURI):
(JSC::globalFuncDecodeURIComponent):
(JSC::globalFuncEncodeURI):
(JSC::globalFuncEncodeURIComponent):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::globalFuncJSCPrint):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSObject.cpp:
(JSC::callDefaultValueFunction):
* runtime/JSValue.h:
* runtime/MathObject.cpp:
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::callNativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::callObjectConstructor):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::toPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):
* runtime/ObjectPrototype.h:
* runtime/RegExpConstructor.cpp:
(JSC::callRegExpConstructor):
* runtime/RegExpObject.cpp:
(JSC::callRegExpObject):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):
(JSC::callStringConstructor):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncToString):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::stringProtoFuncTrim):
(JSC::stringProtoFuncTrimLeft):
(JSC::stringProtoFuncTrimRight):
2010-06-02 Mark Rowe <mrowe@apple.com>
Reviewed by Gavin Barraclough.
Add value-representation specific sections to the mac export file.
* Configurations/JavaScriptCore.xcconfig:
* DerivedSources.make:
* JavaScriptCore.JSVALUE32_64only.exp: Added.
* JavaScriptCore.JSVALUE32only.exp: Added.
* JavaScriptCore.JSVALUE64only.exp: Added.
* JavaScriptCore.xcodeproj/project.pbxproj:
2010-06-02 Mark Rowe <mrowe@apple.com>
Reviewed by Gavin Barraclough.
<rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE.
* pcre/pcre_exec.cpp:
(repeatInformationFromInstructionOffset): Change the type of instructionOffset to int. There's no good
reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug.
2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Fix the QScriptValue::strictlyEquals function.
Handling for a few edge cases was added.
New autotest that covers the QScriptValue::strictlyEquals function.
[Qt] QScriptValue::strictlyEquals is broken
https://bugs.webkit.org/show_bug.cgi?id=36600
* qt/api/qscriptvalue.cpp:
(QScriptValue::strictlyEquals):
* qt/api/qscriptvalue_p.h:
(QScriptValuePrivate::strictlyEquals):
* qt/tests/qscriptvalue/qscriptvalue.pro:
* qt/tests/qscriptvalue/tst_qscriptvalue.h:
* qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added.
(tst_QScriptValue::strictlyEquals_initData):
(tst_QScriptValue::strictlyEquals_makeData):
(tst_QScriptValue::strictlyEquals_test):
2010-06-02 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
New function QScriptEngine::newObject.
The function creates a object of class Object and returns it
as a QScriptValue.
[Qt] QScriptEngine API should contain a newObject function
https://bugs.webkit.org/show_bug.cgi?id=39114
* qt/api/qscriptengine.cpp:
(QScriptEngine::newObject):
* qt/api/qscriptengine.h:
* qt/api/qscriptengine_p.cpp:
(QScriptEnginePrivate::newObject):
* qt/api/qscriptengine_p.h:
* qt/tests/qscriptengine/tst_qscriptengine.cpp:
(tst_QScriptEngine::newObject):
2010-06-02 Gabor Loki <loki@webkit.org>
Reviewed by Gavin Barraclough.
https://bugs.webkit.org/show_bug.cgi?id=40011
Thumb-2 build fix: The offset parameter of ldrh should be encoded as an
imm12 immediate constant in load16. If it is not fit in the instruction
a temporary register has to be used.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::load16):
2010-06-02 Sterling Swigart <sswigart@google.com>
Reviewed by David Levin.
Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
https://bugs.webkit.org/show_bug.cgi?id=39906
* Configurations/FeatureDefines.xcconfig:
2010-06-01 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together
This is a useful stepping stone towards reversing argument order.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::addParameter):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::thisRegister):
(JSC::CallArguments::argumentRegister):
(JSC::CallArguments::callFrame):
(JSC::CallArguments::count):
(JSC::BytecodeGenerator::shouldEmitProfileHooks):
* bytecompiler/NodesCodegen.cpp:
(JSC::NewExprNode::emitBytecode):
(JSC::CallArguments::CallArguments):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
2010-06-01 Yong Li <yoli@rim.com>
Reviewed by Darin Adler.
Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex.
https://bugs.webkit.org/show_bug.cgi?id=39893
* wtf/ThreadingPthreads.cpp:
(WTF::Mutex::Mutex):
2010-06-01 Kwang Yul Seo <skyul@company100.net>
Reviewed by Xan Lopez.
[GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap
https://bugs.webkit.org/show_bug.cgi?id=39831
Use DEFINE_STATIC_LOCAL for static local variables.
* wtf/gtk/ThreadingGtk.cpp:
(WTF::threadMapMutex):
(WTF::threadMap):
(WTF::identifierByGthreadHandle):
2010-06-01 Kent Tamura <tkent@chromium.org>
Reviewed by Shinichiro Hamaji.
Fix style errors of dtoa
https://bugs.webkit.org/show_bug.cgi?id=39972
Fix all errors reported by check-webkit-style.
* wtf/dtoa.cpp:
* wtf/dtoa.h:
2010-05-30 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
* wtf/OwnArrayPtr.h:
(WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr.
At some point someone fixed the "asserts when assigning to 0 and the pointer is
already 0" issue in OwnPtr but forgot to do it here.
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
can figure out why it's crashing.
* wtf/Platform.h:
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Fixed Windows crash seen on buildbot.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
argument in ecx.
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
is disabled.
* runtime/Lookup.cpp:
(JSC::setUpStaticFunctionSlot):
* runtime/Lookup.h:
* wtf/Platform.h:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Windows build fix: Updated exported symbols.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2010-05-28 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
Simplified the host calling convention.
22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
function calls.
No change on SunSpider.
All JS calls (but not constructs, yet) now go through the normal JS
calling convention via the RegisterFile. As a result, the host calling
convention, which used to be this
JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
is now this
JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
Callee, 'this', and argument access all hapen relative to the ExecState*,
which is a pointer into the RegisterFile.
This patch comes in two parts.
PART ONE: Functional code changes.
* wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
We can re-enable once we verify that host calls on these platforms are
correct.
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName):
(JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
ExecState::callee().
(JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
* interpreter/CallFrame.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::callee):
(JSC::ExecState::scopeChain):
(JSC::ExecState::init): Changed callee() to be JSObject* instead of
JSFunction* -- now, it might be some other callable host object.
(JSC::ExecState::hostThisRegister):
(JSC::ExecState::hostThisValue):
(JSC::ExecState::argumentCount):
(JSC::ExecState::argumentCountIncludingThis):
(JSC::ExecState::argument):
(JSC::ExecState::setArgumentCountIncludingThis):
(JSC::ExecState::setCallee): Added convenient accessors for arguments
from within a host function. Removed thisValue() because it was too
tempting to use incorrectly, and it only had one or two clients, anyway.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
(JSC::Interpreter::throwException): Be sure to shrink the register file
before invoking the exception handler, to reduce the chances that the
handler will re-throw in the case of stack overflow. (Re-throwing is now
more likely than it used to be, since standardizing the calling convention
implicitly added stack overflow checks to some places where they used to be missing.)
(JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change.
(JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change. Added support for calling a host
function.
(JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
Updated for CallFrame::init API change.
(JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change.
(JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
Added some explicit JSValue(JSObject*) initialization, since relaxing
the JSFunction* restriction on callee has made register types more ambiguous.
Removed toThisObject() conversion, since all callees do it themselves now.
Updated host function call for new host function signature. Updated for
change to ExecState::argumentCount() API.
* interpreter/Register.h:
(JSC::Register::):
(JSC::Register::operator=):
(JSC::Register::function): Changed callee() to be JSObject* instead of
JSFunction* -- now, it might be some other callable host object.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
set up the arguments to host functions -- all but one of the arguments
are gone now. This is the actual optimization.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
changes noted above. Removed toThisObject() conversion, since all callees
do it themselves now.
* runtime/ArgList.h:
(JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
temporary shim for converting from ExecState* to ArgList where it's still
necessary.
* runtime/Arguments.h:
(JSC::Arguments::getArgumentsData):
(JSC::Arguments::Arguments): Updated for ExecState and Register API
changes noted above.
* runtime/CallData.cpp:
(JSC::call): Changed call always to call Interpreter::executeCall, even
for host functions. This ensures that the normal calling convention is
set up in the RegsiterFile when calling from C++ to host function.
* runtime/CallData.h: Changed host function signature as described above.
* runtime/ConstructData.cpp:
(JSC::construct): Moved JSFunction::construct code here so I could nix
JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
way to call and construct, so that everything works naturally for non-
JSFunction objects.
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h: Updated for ExecState and Register API changes
noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Ditto.
PART TWO: Global search and replace.
In the areas below, I used global search-and-replace to change
(ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
args.size() => exec->argumentCount()
args.at(i) => exec->argument(i)
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::call):
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::call):
* JavaScriptCore.exp:
* jsc.cpp:
(functionPrint):
(functionDebug):
(functionGC):
(functionVersion):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(functionSetSamplingFlags):
(functionClearSamplingFlags):
(functionReadline):
(functionQuit):
* runtime/ArrayConstructor.cpp:
(JSC::callArrayConstructor):
(JSC::arrayConstructorIsArray):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncConcat):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSort):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
* runtime/BooleanConstructor.cpp:
(JSC::callBooleanConstructor):
* runtime/BooleanPrototype.cpp:
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/DateConstructor.cpp:
(JSC::callDate):
(JSC::dateParse):
(JSC::dateNow):
(JSC::dateUTC):
* runtime/DatePrototype.cpp:
(JSC::formatLocaleDate):
(JSC::fillStructuresUsingTimeArgs):
(JSC::fillStructuresUsingDateArgs):
(JSC::dateProtoFuncToString):
(JSC::dateProtoFuncToUTCString):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToDateString):
(JSC::dateProtoFuncToTimeString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncToGMTString):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
(JSC::dateProtoFuncToJSON):
* runtime/ErrorConstructor.cpp:
(JSC::callErrorConstructor):
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):
* runtime/FunctionConstructor.cpp:
(JSC::callFunctionConstructor):
* runtime/FunctionPrototype.cpp:
(JSC::callFunctionPrototype):
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncApply):
(JSC::functionProtoFuncCall):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncEval):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncIsNaN):
(JSC::globalFuncIsFinite):
(JSC::globalFuncDecodeURI):
(JSC::globalFuncDecodeURIComponent):
(JSC::globalFuncEncodeURI):
(JSC::globalFuncEncodeURIComponent):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::globalFuncJSCPrint):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
* runtime/JSString.h:
* runtime/MathObject.cpp:
(JSC::mathProtoFuncAbs):
(JSC::mathProtoFuncACos):
(JSC::mathProtoFuncASin):
(JSC::mathProtoFuncATan):
(JSC::mathProtoFuncATan2):
(JSC::mathProtoFuncCeil):
(JSC::mathProtoFuncCos):
(JSC::mathProtoFuncExp):
(JSC::mathProtoFuncFloor):
(JSC::mathProtoFuncLog):
(JSC::mathProtoFuncMax):
(JSC::mathProtoFuncMin):
(JSC::mathProtoFuncPow):
(JSC::mathProtoFuncRandom):
(JSC::mathProtoFuncRound):
(JSC::mathProtoFuncSin):
(JSC::mathProtoFuncSqrt):
(JSC::mathProtoFuncTan):
* runtime/NativeErrorConstructor.cpp:
(JSC::callNativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::callNumberConstructor):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToPrecision):
* runtime/ObjectConstructor.cpp:
(JSC::callObjectConstructor):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorKeys):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):
* runtime/ObjectPrototype.h:
* runtime/Operations.h:
(JSC::jsString):
* runtime/RegExpConstructor.cpp:
(JSC::callRegExpConstructor):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::test):
(JSC::RegExpObject::exec):
(JSC::callRegExpObject):
(JSC::RegExpObject::match):
* runtime/RegExpObject.h:
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCodeSlowCase):
(JSC::stringFromCharCode):
(JSC::callStringConstructor):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncToString):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplit):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::stringProtoFuncTrim):
(JSC::stringProtoFuncTrimLeft):
(JSC::stringProtoFuncTrimRight):
2010-05-28 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Geoffrey Garen.
Fix the JSObjectSetPrototype function.
A cycle in a prototype chain can cause an application hang or
even crash.
A check for a prototype chain cycles was added to
the JSObjectSetPrototype.
JSObjectSetPrototype doesn't check for cycle in prototype chain.
https://bugs.webkit.org/show_bug.cgi?id=39360
* API/JSObjectRef.cpp:
(JSObjectSetPrototype):
* API/tests/testapi.c:
(assertTrue):
(checkForCycleInPrototypeChain):
(main):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
* runtime/JSObject.h:
(JSC::JSObject::setPrototypeWithCycleCheck):
2010-05-28 Chao-ying Fu <fu@mips.com>
Reviewed by Eric Seidel.
Fix MIPS JIT DoubleGreaterThanOrEqual Operands
https://bugs.webkit.org/show_bug.cgi?id=39504
Swapped two operands of left and right for DoubleGreaterThanOrEqual.
This patch fixed two layout tests as follows.
fast/js/comparison-operators-greater.html
fast/js/comparison-operators-less.html
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchDouble):
2010-05-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
Move jit compilation from linking thunks into cti_vm_lazyLink methods.
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
2010-05-28 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 39898 - Move arity check into callee.
We can reduce the size of the virtual call trampolines by moving the arity check
into the callee functions. As a following step we will be able to remove the
check for native function / codeblocks by performing translation in a lazy stub.
* interpreter/CallFrame.h:
(JSC::ExecState::init):
(JSC::ExecState::setReturnPC):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):
* jit/JIT.h:
(JSC::JIT::compile):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):
* runtime/Executable.h:
(JSC::NativeExecutable::NativeExecutable):
(JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
(JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
2010-05-27 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Darin Adler.
UTF-16 code points compare() for String objects
https://bugs.webkit.org/show_bug.cgi?id=39701
Moving compare() implementation from UString to StringImpl for it to be shared
with String. Adding overloaded free functions codePointCompare() in StringImpl
and WTFString. Renaming function compare in UString to codePointCompare to be
consistent.
* runtime/JSArray.cpp:
(JSC::compareByStringPairForQSort):
* runtime/UString.cpp:
* runtime/UString.h:
(JSC::codePointCompare):
* wtf/text/StringImpl.cpp:
(WebCore::codePointCompare):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
(WebCore::codePointCompare):
* wtf/text/WTFString.h:
2010-05-26 Darin Adler <darin@apple.com>
Reviewed by Kent Tamura.
Null characters handled incorrectly in ToNumber conversion
https://bugs.webkit.org/show_bug.cgi?id=38088
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseInt): Changed code to use UTF8String().data() instead of
ascii() to fix the thread safety issue. Code path is covered by existing
tests in run-javascriptcore-tests.
(JSC::parseFloat): Moved comment to UString::toDouble since the issue
affects all clients, not just parseFloat. Specifically, this also affects
standard JavaScript numeric conversion, ToNumber.
* runtime/UString.cpp:
(JSC::UString::toDouble): Added a comment about incorrect space skipping.
Changed trailing junk check to use the length of the CString instead of
checking for a null character. Also got rid of a little unneeded logic
in the case where we tolerate trailing junk.
2010-05-27 Nathan Lawrence <nlawrence@apple.com>
Reviewed by Geoffrey Garen.
Search for the new allocation one word at a time. Improves
performance on SunSpider by approximately 1%.
http://bugs.webkit.org/show_bug.cgi?id=39758
* runtime/Collector.cpp:
(JSC::Heap::allocate):
* runtime/Collector.h:
(JSC::CollectorBitmap::advanceToNextPossibleFreeCell):
2010-05-27 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fixes for Windows after recent changes.
* wscript:
2010-05-27 Gustavo Noronha Silva <gns@gnome.org>
More build fixage for make dist.
* GNUmakefile.am:
2010-05-27 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
RVCT does not have strnstr.
https://bugs.webkit.org/show_bug.cgi?id=39719
Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.
* wtf/StringExtras.h:
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
(relanding r60267)
If the last item in a main disjunction is a quantified set of parentheses,
this is easier to code generate for than the general case for quantified
parentheses. This is because we never need to backtrack into the parentheses
- the first match will be the final and accepted match.
This patch also somewhat reverts a recent change to when fallback to PCRE
occurs. At the minute the compiler is tracking on patterns which will
require JIT fallback. This is handy from a performance perspective (it saves
the failed attempt at JIT compilation), but it means introducing knowledge
of the JITs capabilities into the other layers of the regex compilers. For
the specific feature of back-references, add a flag tracking their presence
on the pattern, and make these expressions fallback without attempting to
JIT. For parentheses, return to detecting which cases are have or have not
been handled during JIT compilation.
18% progression on tagcloud, ~1.5% overall on sunspidey.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::RegexGenerator::shouldFallBack):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by NOBODY (revert).
Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::term):
(JSC::Yarr::RegexGenerator::generateParenthesesSingle):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Gustavo Noronha Silva <gns@gnome.org>
Build fixes for make distcheck.
* GNUmakefile.am:
2010-05-26 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
If the last item in a main disjunction is a quantified set of parentheses,
this is easier to code generate for than the general case for quantified
parentheses. This is because we never need to backtrack into the parentheses
- the first match will be the final and accepted match.
This patch also somewhat reverts a recent change to when fallback to PCRE
occurs. At the minute the compiler is tracking on patterns which will
require JIT fallback. This is handy from a performance perspective (it saves
the failed attempt at JIT compilation), but it means introducing knowledge
of the JITs capabilities into the other layers of the regex compilers. For
the specific feature of back-references, add a flag tracking their presence
on the pattern, and make these expressions fallback without attempting to
JIT. For parentheses, return to detecting which cases are have or have not
been handled during JIT compilation.
18% progression on tagcloud, ~1.5% overall on sunspidey.
* yarr/RegexCompiler.cpp:
(JSC::Yarr::RegexPatternConstructor::atomBackReference):
(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
* yarr/RegexJIT.cpp:
(JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::RegexGenerator::generateTerm):
(JSC::Yarr::RegexGenerator::RegexGenerator):
(JSC::Yarr::RegexGenerator::shouldFallBack):
(JSC::Yarr::jitCompileRegex):
* yarr/RegexPattern.h:
(JSC::Yarr::RegexPattern::RegexPattern):
(JSC::Yarr::RegexPattern::reset):
2010-05-26 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
Fixed a crash seen on the Leopard bot, caused by merge.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
since it's no longer passed to us as an argument.
2010-05-25 Geoffrey Garen <ggaren@apple.com>
Fixed build failure caused by merge.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
function no longer returns a pair.
2010-05-25 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
<rdar://problem/8020221>
Fixed a crash seen on Windows when calling a function with too many
arguments.
SunSpider reports no change.
No test because the ASSERT I added fires in existing tests.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
many arguments have been provided, since the caller only allocated enough
registerFile space for the arguments it provided, not enough for the extra
copy of arguments we're going to need.
2010-05-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Darin Adler.
Build fix for JSFunction
https://bugs.webkit.org/show_bug.cgi?id=39658
MSVC can't compile one of JSFunction constructors when JIT is disabled.
"PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined.
Add ENABLE(JIT) guard to the constructor.
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
* runtime/JSFunction.h:
2010-05-24 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
Presently, as soon as op-call strays off the hot path we set up a set of values on
the stack to be passed as arguments to cti functions, in case any should be called.
Instead, hoist the setup of the callframe to happen slightly sooner, and make the
cti functions to compile & check arity read these values from the callframe. This
allows up to remove the deprecated methods to manually set up cti arguments, rather
than using JITStubCall.h.
* interpreter/CallFrame.h:
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITInlineMethods.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jit/JITStubs.h:
(JSC::):
2010-05-24 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Relanding r60075.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
* bytecode/CodeBlock.h:
* bytecode/Opcode.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_convert_this):
(JSC::JIT::emit_op_get_callee):
(JSC::JIT::emit_op_create_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTIMachineTrampolines):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_get_callee):
(JSC::JIT::emit_op_create_this):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::JITThunks::hostFunctionStub):
* jit/JITStubs.h:
(JSC::JITThunks::ctiNativeConstruct):
(JSC::):
* runtime/ExceptionHelpers.cpp:
(JSC::createNotAnObjectError):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
* runtime/JSFunction.h:
* wtf/Platform.h:
== Rolled over to ChangeLog-2010-05-24 ==