- 21 Jun, 2009 5 commits
-
-
oliver@apple.com authored
<https://bugs.webkit.org/show_bug.cgi?id=26594> Reviewed by Sam Weinig Add support for Date.toISOString. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
oliver@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
oliver@apple.com authored
<https://bugs.webkit.org/show_bug.cgi?id=26587> Reviewed by Darin Adler and Cameron Zwarich. Extend the LiteralParser to support the full strict JSON grammar, fix a few places where the grammar was incorrectly lenient. Doesn't yet support the JSON.parse reviver function but that does not block the JSON.parse functionality itself. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
levin@chromium.org authored
Reviewed by NOBODY (speculative build fix for windows). Simply removed some whitespace form this file to make windows build wtf and hopefully copy the new MessageQueque.h so that WebCore picks it up. * wtf/Assertions.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
levin@chromium.org authored
2009-06-21 Drew Wilson <atwilson@google.com> Reviewed by David Levin. <https://bugs.webkit.org/show_bug.cgi?id=25043> Added support for multi-threaded MessagePorts. * wtf/MessageQueue.h: (WTF::::appendAndCheckEmpty): Added API to test whether the queue was empty before adding an element. WebCore: 2009-06-21 Drew Wilson <atwilson@google.com> Reviewed by David Levin. <https://bugs.webkit.org/show_bug.cgi?id=25043> Removed obsolete MessagePort.startConversation(), active and onclose APIs. Refactored MessagePortProxy into MessagePortChannel and a platform-dependent PlatformMessagePortChannel implementation. Modified APIs to simplify cross-process implementations by moving the messaging code entirely into the platform-dependent proxy. Created a thread-safe default PlatformMessagePortChannel implementation. Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how cross-thread MessagePorts work. * GNUMakefile.am: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added MessagePortChannel/PlatformMessagePortChannel files. * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::mark): Changed ports to not mark their entangled pair as reachable, per the spec. * bindings/v8/custom/V8MessagePortCustom.cpp: * dom/MessageChannel.cpp: (WebCore::MessageChannel::MessageChannel): Updated to use PlatformMessagePortChannel::createChannel() to entangle the ports. * dom/MessagePort.cpp: (WebCore::MessagePort::MessagePort): (WebCore::MessagePort::~MessagePort): (WebCore::MessagePort::postMessage): (WebCore::MessagePort::disentangle): (WebCore::MessagePort::messageAvailable): (WebCore::MessagePort::start): (WebCore::MessagePort::close): (WebCore::MessagePort::entangle): (WebCore::MessagePort::contextDestroyed): (WebCore::MessagePort::dispatchMessages): (WebCore::MessagePort::setOnmessage): (WebCore::MessagePort::hasPendingActivity): Changed these APIs to delegate to new PlatformMessagePortChannel APIs. * dom/MessagePort.h: Renamed isQueueOpen() to started(). * dom/MessagePort.idl: Removed startConversation and onclose. * dom/MessagePortProxy.h: Removed. * dom/MessagePortChannel.cpp: Added. (WebCore::MessagePortChannel::EventData::create): (WebCore::MessagePortChannel::EventData::EventData): (WebCore::MessagePortChannel::~MessagePortChannel): * dom/MessagePortChannel.h: Added. (WebCore::MessagePortChannel::EventData::message): (WebCore::MessagePortChannel::EventData::channel): Changed EventData to hold a reference to a MessagePortChannel object instead of a MessagePort to enable cross-thread messaging. (WebCore::MessagePortChannel::MessagePortChannel): (WebCore::MessagePortChannel::create): * dom/ScriptExecutionContext.cpp: (WebCore:ScriptExecutionContext::dispatchMessagePortEvents): Renamed isQueueOpen() to started(). * dom/default/PlatformMessagePortChannel.cpp: Added. (WebCore::MessagePortChannel::entangleIfOpen): (WebCore::MessagePortChannel::disentangle): (WebCore::MessagePortChannel::postMessageToRemote): (WebCore::MessagePortChannel::tryGetMessageFromRemote): (WebCore::MessagePortChannel::close): (WebCore::MessagePortChannel::isConnectedTo): (WebCore::MessagePortChannel::hasPendingActivity): (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel): (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel): (WebCore::PlatformMessagePortChannel::createChannel): (WebCore::PlatformMessagePortChannel::entangleIfOpen): (WebCore::PlatformMessagePortChannel::disentangle): (WebCore::PlatformMessagePortChannel::setRemotePort): (WebCore::PlatformMessagePortChannel::remotePort): (WebCore::PlatformMessagePortChannel::entangledChannel): (WebCore::PlatformMessagePortChannel::setEntangledChannel): (WebCore::PlatformMessagePortChannel::postMessageToRemote): (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): (WebCore::PlatformMessagePortChannel::isConnectedTo): (WebCore::PlatformMessagePortChannel::close): (WebCore::PlatformMessagePortChannel::closeInternal): (WebCore::PlatformMessagePortChannel::hasPendingActivity): * dom/default/PlatformMessagePortChannel.h: Added. (WebCore::PlatformMessagePortChannel::MessagePortQueue::create): (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage): (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty): (WebCore::PlatformMessagePortChannel::MessagePortQueue::isEmpty): (WebCore::PlatformMessagePortChannel::MessagePortQueue::MessagePortQueue): * page/DOMWindow.cpp: (WebCore::PostMessageTimer::PostMessageTimer): Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how cross-thread MessagePorts work. (WebCore::PostMessageTimer::event): (WebCore::DOMWindow::postMessage): (WebCore::DOMWindow::postMessageTimerFired): LayoutTests: 2009-06-21 Drew Wilson <atwilson@google.com> Reviewed by David Levin. <https://bugs.webkit.org/show_bug.cgi?id=25043> Updated MessageChannel/MessagePorts tests to reflect latest spec (close event has been removed). Added more tests of port cloning. * fast/events/message-channel-gc-2-expected.txt: * fast/events/message-channel-gc-2.html-disabled: * fast/events/message-channel-gc-3-expected.txt: * fast/events/message-channel-gc-3.html-disabled: * fast/events/message-channel-gc-expected.txt: * fast/events/message-channel-gc.html-disabled: * fast/events/message-port-clone-expected.txt: Added. * fast/events/message-port-clone.html-disabled: Added. * fast/events/message-port-expected.txt: * fast/events/message-port-no-wrapper-expected.txt: Added. * fast/events/message-port-onclose-expected.txt: Removed. * fast/events/message-port-onclose.html-disabled: Removed. * fast/events/message-port.html-disabled: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 20 Jun, 2009 3 commits
-
-
ddkilzer@apple.com authored
* wtf/SegmentedVector.h: Updated namespace comment to reflect new namespace after r44897. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ddkilzer@apple.com authored
Bug 24986: ARM JIT port <https://bugs.webkit.org/show_bug.cgi?id=24986> Reviewed by Oliver Hunt. An Iterator added for SegmentedVector. Currently only the pre ++ operator is supported. * wtf/SegmentedVector.h: (WTF::SegmentedVectorIterator::~SegmentedVectorIterator): (WTF::SegmentedVectorIterator::operator*): (WTF::SegmentedVectorIterator::operator->): (WTF::SegmentedVectorIterator::operator++): (WTF::SegmentedVectorIterator::operator==): (WTF::SegmentedVectorIterator::operator!=): (WTF::SegmentedVectorIterator::operator=): (WTF::SegmentedVectorIterator::SegmentedVectorIterator): (WTF::SegmentedVector::alloc): (WTF::SegmentedVector::begin): (WTF::SegmentedVector::end): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ddkilzer@apple.com authored
Bug 24986: ARM JIT port <https://bugs.webkit.org/show_bug.cgi?id=24986> Reviewed by Oliver Hunt. Move SegmentedVector to /wtf subdirectory and change "namespace JSC" to "namespace WTF" Additional build file updates by David Kilzer. * GNUmakefile.am: Updated path to SegmentedVector.h. * JavaScriptCore.order: Updated SegmentedVector namespace from JSC to WTF in mangled C++ method name. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed reference to bytecompiler\SegmentedVector.h. * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to wtf\SegmentedVector.h. * JavaScriptCore.xcodeproj/project.pbxproj: Moved SegmentedVector.h definition from bytecompiler subdirectory to wtf subdirectory. * bytecompiler/BytecodeGenerator.h: Updated #include path to SegmentedVector.h and prepended WTF:: namespace to its use. * parser/Lexer.h: Ditto. * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h. (WTF::SegmentedVector::SegmentedVector): (WTF::SegmentedVector::~SegmentedVector): (WTF::SegmentedVector::size): (WTF::SegmentedVector::at): (WTF::SegmentedVector::operator[]): (WTF::SegmentedVector::last): (WTF::SegmentedVector::append): (WTF::SegmentedVector::removeLast): (WTF::SegmentedVector::grow): (WTF::SegmentedVector::clear): (WTF::SegmentedVector::deleteAllSegments): (WTF::SegmentedVector::segmentExistsFor): (WTF::SegmentedVector::segmentFor): (WTF::SegmentedVector::subscriptFor): (WTF::SegmentedVector::ensureSegmentsFor): (WTF::SegmentedVector::ensureSegment): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 19 Jun, 2009 13 commits
-
-
barraclough@apple.com authored
Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h). * jit/JIT.cpp: (JSC::JIT::privateCompile): (JSC::JIT::privateCompileCTIMachineTrampolines): (JSC::JIT::emitGetVariableObjectRegister): (JSC::JIT::emitPutVariableObjectRegister): * jit/JIT.h: * jit/JITArithmetic.cpp: (JSC::JIT::emit_op_rshift): (JSC::JIT::emitSlow_op_jnless): (JSC::JIT::emitSlow_op_jnlesseq): (JSC::JIT::compileBinaryArithOp): * jit/JITCall.cpp: (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCall): * jit/JITInlineMethods.h: (JSC::JIT::restoreArgumentReference): (JSC::JIT::checkStructure): * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_instanceof): (JSC::JIT::emit_op_get_scoped_var): (JSC::JIT::emit_op_put_scoped_var): (JSC::JIT::emit_op_construct_verify): (JSC::JIT::emit_op_resolve_global): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_to_jsnumber): (JSC::JIT::emit_op_catch): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_convert_this): (JSC::JIT::emit_op_profile_will_call): (JSC::JIT::emit_op_profile_did_call): (JSC::JIT::emitSlow_op_get_by_val): * jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emit_op_method_check): (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::compilePutDirectOffset): (JSC::JIT::compileGetDirectOffset): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): * jit/JITStubs.cpp: (JSC::JITThunks::JITThunks): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
Reviewed by NOBODY (Windows build fix). * jit/JIT.h: * jit/JITInlineMethods.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
Reviewed by Gavin Barraclough. Reorganize ARM architecture specific macros. Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7). Bug 24986: ARM JIT port <https://bugs.webkit.org/show_bug.cgi?id=24986> * assembler/ARMv7Assembler.h: * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::Imm32::Imm32): * assembler/MacroAssembler.h: * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): * jit/ExecutableAllocator.h: (JSC::ExecutableAllocator::cacheFlush): * jit/JIT.h: * jit/JITInlineMethods.h: (JSC::JIT::restoreArgumentReferenceForTrampoline): * jit/JITStubs.cpp: * jit/JITStubs.h: * wtf/Platform.h: * yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::generateEnter): (JSC::Yarr::RegexGenerator::generateReturn): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
Reviewed by Oliver Hunt. Fix armv7 JIT build issues. Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types), and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros. * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects). * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor. * jit/JIT.cpp: * jit/JIT.h: * jit/JITInlineMethods.h: (JSC::JIT::restoreArgumentReference): * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_catch): * jit/JITStubs.cpp: (JSC::JITThunks::JITThunks): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
treat@webkit.org authored
Blind attempt at build fix. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
bfulgham@webkit.org authored
Reviewed by Oliver Hunt. Inherits CallIdentifier struct from FastAllocBase because it has been instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86. * wtf/HashCountedSet.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
treat@webkit.org authored
Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=26540 Currently the SunSpider test driver lacks an option to run a test suite that will test JavaScriptCore parsing performance only. This patch adds just such a test suite and option to SunSpider as well as the jsc test shell. I've included three large javascript source files found in the wild: jquery, mootools and prototype. Combined with the concatenation of all three, these form a new testsuite to measure and test pure JavaScriptCore parsing performance. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
bfulgham@webkit.org authored
Reviewed by Darin Adler. Inherits HashCountedSet class from FastAllocBase because it has been instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095. * wtf/HashCountedSet.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
treat@webkit.org authored
Reviewed by George Staikos. https://bugs.webkit.org/show_bug.cgi?id=26558 Declare these symbols extern for WINCE as they are provided by libce. * runtime/DateConstructor.cpp: * runtime/DatePrototype.cpp: (JSC::formatLocaleDate): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
rdar://problem/6988973oliver@apple.com authored
Reviewed by Maciej Stachowiak Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT) path. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
treat@webkit.org authored
Reviewed by George Staikos. https://bugs.webkit.org/show_bug.cgi?id=26543 Windows CE uses 'GetLastError' instead of 'errno.' * interpreter/RegisterFile.h: (JSC::RegisterFile::RegisterFile): (JSC::RegisterFile::grow): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
levin@chromium.org authored
Reviewed by NOBODY (Windows build fix). Add export for Windows corresponding to OSX export done in r44844. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
oliver@apple.com authored
<https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385> Reviewed by Gavin "Viceroy of Venezuela" Barraclough. We need to make sure that each native function instance correctly unlinks any references to it when it is collected. Allowing this to happen required a few changes: * Every native function needs a codeblock to track the link information * To have this codeblock, every function now also needs its own functionbodynode so we no longer get to have a single shared instance. * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 18 Jun, 2009 6 commits
-
-
barraclough@apple.com authored
Reviewed by NOBODY (Windows build fix). * wtf/DateMath.cpp: (WTF::calculateUTCOffset): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
Reviewed by Geoff Garen. Timezone calculation incorrect in Venezuela. https://bugs.webkit.org/show_bug.cgi?id=26531 <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3 The problem is that we're calculating the timezone relative to 01/01/2000, but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007. According to the spec, section 15.9.1.9 states "the time since the beginning of the year", presumably meaning the *current* year. Change the calculation to be based on whatever the current year is, rather than a canned date. No performance impact. * wtf/DateMath.cpp: (WTF::calculateUTCOffset): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig). (Reintroducing patch added in r44492, and reverted in r44796.) Change the implementation of op_throw so the stub function always modifies its return address - if it doesn't find a 'catch' it will switch to a trampoline to force a return from JIT execution. This saves memory, by avoiding the need for a unique return for every op_throw. * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_throw): JITStubs::cti_op_throw now always changes its return address, remove return code generated after the stub call (this is now handled by ctiOpThrowNotCaught). * jit/JITStubs.cpp: (JSC::): Add ctiOpThrowNotCaught definitions. (JSC::JITStubs::DEFINE_STUB_FUNCTION): Change cti_op_throw to always change its return address. * jit/JITStubs.h: Add ctiOpThrowNotCaught declaration. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
kmccullough@apple.com authored
2009-06-18 Kevin McCullough <kmccullough@apple.com> Reviewed by Oliver Hunt. <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit - Exposed functions now needed by WebCore. * JavaScriptCore.exp: WebCore: 2009-06-18 Kevin McCullough <kmccullough@apple.com> Reviewed by Oliver Hunt. <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit Convert intptr_t to Strings so that we don't loose bits in the conversion to JS. Previously they were being put into 32bit ints. * inspector/InspectorController.cpp: Convert the String back to an intptr_t. (WebCore::InspectorController::addBreakpoint): (WebCore::InspectorController::removeBreakpoint): * inspector/InspectorController.h: * inspector/InspectorController.idl: Use strings in JS to avoid 32bit truncation. * inspector/InspectorFrontend.cpp: Make the intptr_t into a String. (WebCore::InspectorFrontend::parsedScriptSource): * platform/text/PlatformString.h: Implemented the necessary conversion functions to be able to convert to and from an intptr_t. * platform/text/String.cpp: Ditto. (WebCore::String::toIntPtrStrict): (WebCore::String::toIntPtr): (WebCore::charactersToIntPtrStrict): (WebCore::charactersToIntPtr): * platform/text/StringImpl.cpp: Ditto. (WebCore::StringImpl::toIntPtrStrict): (WebCore::StringImpl::toIntPtr): * platform/text/StringImpl.h: Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
2009-06-17 Darin Adler <darin@apple.com> Reviewed by Oliver Hunt. Bug 26429: Make JSON.stringify non-recursive so it can handle objects of arbitrary complexity https://bugs.webkit.org/show_bug.cgi?id=26429 For marking I decided not to use gcProtect, because this is inside the engine so it's easy enough to just do marking. And that darned gcProtect does locking! Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor for that class says "FIXME: Remove all clients of this API, then remove this API." * runtime/Collector.cpp: (JSC::Heap::collect): Add a call to JSONObject::markStringifiers. * runtime/CommonIdentifiers.cpp: (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier. * runtime/CommonIdentifiers.h: Ditto. * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0. * runtime/JSGlobalData.h: Added firstStringifierToMark. * runtime/JSONObject.cpp: Cut down the includes to the needed ones only. (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string objects to get their number and string values. (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used to wrap an identifier or integer so we don't have to do any work unless we actually call a replacer. (JSC::ReplacerPropertyName::value): Added. (JSC::gap): Added. Helper function for the Stringifier constructor. (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added. The class is used to wrap an identifier or integer so we don't have to allocate a number or string until we actually call toJSON or a replacer. (JSC::PropertyNameForFunctionCall::asJSValue): Added. (JSC::Stringifier::Stringifier): Updated and moved out of the class definition. Added code to hook this into a singly linked list for marking. (JSC::Stringifier::~Stringifier): Remove from the singly linked list. (JSC::Stringifier::mark): Mark all the objects in the holder stacks. (JSC::Stringifier::stringify): Updated. (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit. (JSC::Stringifier::toJSON): Renamed from toJSONValue. (JSC::Stringifier::appendStringifiedValue): Renamed from stringify. Added code to use the m_holderStack to do non-recursive stringify of objects and arrays. This code also uses the timeout checker since in pathological cases it could be slow even without calling into the JavaScript virtual machine. (JSC::Stringifier::willIndent): Added. (JSC::Stringifier::indent): Added. (JSC::Stringifier::unindent): Added. (JSC::Stringifier::startNewLine): Added. (JSC::Stringifier::Holder::Holder): Added. (JSC::Stringifier::Holder::appendNextProperty): Added. This is the function that handles the format of arrays and objects. (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom of the file so the JSONObject class is not interleaved with the Stringifier class. (JSC::JSONObject::markStringifiers): Added. Calls mark. (JSC::JSONProtoFuncStringify): Streamlined the code here. The code to compute the gap string is now a separate function. * runtime/JSONObject.h: Made everything private. Added markStringifiers. LayoutTests: 2009-06-17 Darin Adler <darin@apple.com> Reviewed by Oliver Hunt. Bug 26429: Make JSON.stringify non-recursive so it can handle objects of arbitrary complexity https://bugs.webkit.org/show_bug.cgi?id=26429 * fast/js/JSON-stringify-expected.txt: Updated. * fast/js/resources/JSON-stringify.js: Changed the infinite object and infinite array tests to instead just test something a fixed number of levels deep. Otherwise we end up with an infinite loop in the test, which would lead to the slow-script dialog in the production web browser. Also raised the number from 512 to 2048 since there's no fixed limit any more. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
rdar://problem/6974140oliver@apple.com authored
<rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com Reviewed by Gavin Barraclough Roll out r43849 as it appears that we cannot rely on the address of an objects property storage being constant even if the structure is unchanged. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 17 Jun, 2009 5 commits
-
-
barraclough@apple.com authored
Rubber Stamped by Mark Rowe. Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>. * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_throw): * jit/JITStubs.cpp: (JSC::): (JSC::JITStubs::DEFINE_STUB_FUNCTION): * jit/JITStubs.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
2009-06-17 Gavin Barraclough <barraclough@apple.com> Reviewed by Mark Rowe. <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit On 64-bit, NaN-encoded values must be detagged before they can be used in rshift. No performance impact. * jit/JITArithmetic.cpp: (JSC::JIT::emit_op_rshift): LayoutTests: 2009-06-17 Gavin Barraclough <barraclough@apple.com> Reviewed by Mark Rowe. Add tests to check shifts by non-constant amounts. * fast/js/kde/operators-expected.txt: * fast/js/kde/resources/operators.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
treat@webkit.org authored
Reviewed by George Staikos. https://bugs.webkit.org/show_bug.cgi?id=23155 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
treat@webkit.org authored
Reviewed by Adam Treat. https://bugs.webkit.org/show_bug.cgi?id=23155 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
2009-06-17 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com Remove PropertySlot::putValue - PropertySlots should only be used for getting, not putting. Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite, which is what it really was being used to ask, and remove some other getOwnPropertySlot & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion. * runtime/JSGlobalObject.h: (JSC::JSGlobalObject::hasOwnPropertyForWrite): * runtime/JSObject.h: * runtime/JSStaticScopeObject.cpp: * runtime/JSStaticScopeObject.h: * runtime/PropertySlot.h: WebCore: 2009-06-17 Gavin Barraclough <barraclough@apple.com> Reviewed by Oliver Hunt. <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com JSDOMWindowCustom was using PropertySlot::putValue, however this interface appears to be fundaementally incorrect - PropertySlots are only used to get values, all puts use PutPropertySlot. However PutPropertySlot cannot be used in the fashion desired here - it only reports the caching type of a write that has been performed. (This caused a bug where the put should have triggered a transition, and failed to do so.) Removing the faulty case from the optimization leads to a ~0.5% progression on in-browser SunSpider (presumably the very first case was not being hit often, and the simplification here is beneficial). * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::put): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 16 Jun, 2009 5 commits
-
-
barraclough@apple.com authored
Reviewed by Oliver hunt. Temporarily partially disable r44492, since this is causing some problems on internal builds. * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_throw): * jit/JITStubs.cpp: (JSC::JITStubs::DEFINE_STUB_FUNCTION): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
weinig@apple.com authored
Fix windows build. * jit/JIT.cpp: (JSC::JIT::JIT): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
kmccullough@apple.com authored
Reviewed by Oliver Hunt. Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize it for each type of stub using the return address to find the correct offset. * jit/JIT.cpp: (JSC::JIT::JIT): * jit/JIT.h: (JSC::JIT::compileGetByIdProto): (JSC::JIT::compileGetByIdSelfList): (JSC::JIT::compileGetByIdProtoList): (JSC::JIT::compileGetByIdChainList): (JSC::JIT::compileGetByIdChain): (JSC::JIT::compilePutByIdTransition): (JSC::JIT::compileCTIMachineTrampolines): (JSC::JIT::compilePatchGetArrayLength): * jit/JITStubCall.h: (JSC::JITStubCall::call): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mrowe@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
Rubber Stamped by Sam Weinig. Rename PatchBuffer to LinkBuffer. Previously our terminology has been a little mixed up, but we have decided to fix on refering to the process that takes place at the end of code generation as 'linking', and on any modifications that take place later (and once the code has potentially already been executed) as 'patching'. However, the term 'PatchBuffer' is already in use, and needs to be repurposed. To try to minimize confusion, we're going to switch the terminology over in stages, so for now we'll refer to later modifications as 'repatching'. This means that the new 'PatchBuffer' has been introduced with the name 'RepatchBuffer' instead. This patch renames the old 'PatchBuffer' to 'LinkBuffer'. We'll leave ToT in this state for a week or so to try to avoid to much overlap of the meaning of the term 'PatchBuffer', then will come back and rename 'RepatchBuffer'. * assembler/ARMv7Assembler.h: * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::LinkBuffer::LinkBuffer): (JSC::AbstractMacroAssembler::LinkBuffer::~LinkBuffer): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITPropertyAccess.cpp: (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain): * yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::compile): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 15 Jun, 2009 3 commits
-
-
barraclough@apple.com authored
Reviewed by Sam Weinig. Having moved most of their functionality into the RepatchBuffer class, we can simplify the CodeLocation* classes. The CodeLocation* classes are currently a tangle of templatey and friendly badness, burried in the middle of AbstractMacroAssembler. Having moved the ability to repatch out into RepatchBufer they are now do-nothing wrappers on CodePtr (MacroAssemblerCodePtr), that only exist to provide type-safety. Simplify the code, and move them off into their own header. * JavaScriptCore.xcodeproj/project.pbxproj: * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::PatchBuffer::patch): * assembler/CodeLocation.h: Copied from assembler/AbstractMacroAssembler.h. (JSC::CodeLocationCommon::CodeLocationCommon): (JSC::CodeLocationInstruction::CodeLocationInstruction): (JSC::CodeLocationLabel::CodeLocationLabel): (JSC::CodeLocationJump::CodeLocationJump): (JSC::CodeLocationCall::CodeLocationCall): (JSC::CodeLocationNearCall::CodeLocationNearCall): (JSC::CodeLocationDataLabel32::CodeLocationDataLabel32): (JSC::CodeLocationDataLabelPtr::CodeLocationDataLabelPtr): (JSC::CodeLocationCommon::instructionAtOffset): (JSC::CodeLocationCommon::labelAtOffset): (JSC::CodeLocationCommon::jumpAtOffset): (JSC::CodeLocationCommon::callAtOffset): (JSC::CodeLocationCommon::nearCallAtOffset): (JSC::CodeLocationCommon::dataLabelPtrAtOffset): (JSC::CodeLocationCommon::dataLabel32AtOffset): * assembler/MacroAssemblerCodeRef.h: (JSC::MacroAssemblerCodePtr::operator!): * bytecode/CodeBlock.h: (JSC::getStructureStubInfoReturnLocation): (JSC::getCallLinkInfoReturnLocation): (JSC::getMethodCallLinkInfoReturnLocation): * bytecode/Instruction.h: * bytecode/JumpTable.h: (JSC::StringJumpTable::ctiForValue): (JSC::SimpleJumpTable::ctiForValue): * bytecode/StructureStubInfo.h: * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitCatch): * jit/JIT.cpp: (JSC::JIT::privateCompile): * jit/JITStubs.cpp: (JSC::JITStubs::DEFINE_STUB_FUNCTION): (JSC::JITStubs::getPolymorphicAccessStructureListSlot): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
barraclough@apple.com authored
Reviewed by Sam Weinig. Having introduced the RepatchBuffer, ProcessorReturnAddress is now a do-nothing wrapper around ReturnAddressPtr. Remove it. In tugging on this piece of string it made sense to roll out the use of ReturnAddressPtr a little further into JITStubs (which had always been the intention). No performance impact. * assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToTrampoline): (JSC::AbstractMacroAssembler::RepatchBuffer::relinkCallerToFunction): (JSC::AbstractMacroAssembler::RepatchBuffer::relinkNearCallerToTrampoline): * assembler/MacroAssemblerCodeRef.h: (JSC::ReturnAddressPtr::ReturnAddressPtr): * bytecode/CodeBlock.h: (JSC::CodeBlock::getStubInfo): (JSC::CodeBlock::getCallLinkInfo): (JSC::CodeBlock::getMethodCallLinkInfo): (JSC::CodeBlock::getBytecodeIndex): * interpreter/Interpreter.cpp: (JSC::bytecodeOffsetForPC): * jit/JIT.cpp: (JSC::ctiPatchNearCallByReturnAddress): (JSC::ctiPatchCallByReturnAddress): * jit/JIT.h: (JSC::JIT::compileGetByIdProto): (JSC::JIT::compileGetByIdChain): (JSC::JIT::compilePutByIdTransition): (JSC::JIT::compilePatchGetArrayLength): * jit/JITPropertyAccess.cpp: (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::patchGetByIdSelf): (JSC::JIT::patchPutByIdReplace): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdChain): * jit/JITStubs.cpp: (JSC::JITThunks::tryCachePutByID): (JSC::JITThunks::tryCacheGetByID): (JSC::StackHack::StackHack): (JSC::returnToThrowTrampoline): (JSC::throwStackOverflowError): (JSC::JITStubs::DEFINE_STUB_FUNCTION): * jit/JITStubs.h: (JSC::): (JSC::JITStackFrame::returnAddressSlot): * runtime/JSGlobalData.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
simon.fraser@apple.com authored
Reviewed by Mark Rowe. <rdar://problem/6974857> Define ENABLE_3D_RENDERING and WTF_USE_ACCELERATED_COMPOSITING when building on 10.6. Move the ENABLE_3D_RENDERING switch from config.h and WebKitPrefix.h to wtf/Platform.h git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-