1. 23 Feb, 2012 12 commits
    • mhahnenberg@apple.com's avatar
      Zero out CopiedBlocks on initialization · 13bbb9d7
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79199
      
      Reviewed by Filip Pizlo.
      
      Made CopyBlocks zero their payloads during construction. This allows
      JSArray to avoid having to manually clear its backing store upon allocation
      and also alleviates any future pain with regard to the garbage collector trying
      to mark what it thinks are values in what is actually uninitialized memory.
      
      * heap/CopiedBlock.h:
      (JSC::CopiedBlock::CopiedBlock):
      * runtime/JSArray.cpp:
      (JSC::JSArray::finishCreation):
      (JSC::JSArray::tryFinishCreationUninitialized):
      (JSC::JSArray::increaseVectorLength):
      (JSC::JSArray::unshiftCountSlowCase):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13bbb9d7
    • oliver@apple.com's avatar
      Make Interpreter::getStackTrace be able to generate the line number for the... · 22e4a74f
      oliver@apple.com authored
      Make Interpreter::getStackTrace be able to generate the line number for the top callframe if none is provided
      https://bugs.webkit.org/show_bug.cgi?id=79407
      
      Reviewed by Gavin Barraclough.
      
      Outside of exception handling, we don't know what our source line number is.  This
      change allows us to pass -1 is as the initial line number, and get the correct line
      number in the resultant stack trace.  We can't completely elide the initial line
      number (yet) due to some idiosyncrasies of the exception handling machinery.
      
      * interpreter/Interpreter.cpp:
      (JSC::getLineNumberForCallFrame):
      (JSC):
      (JSC::Interpreter::getStackTrace):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22e4a74f
    • fpizlo@apple.com's avatar
      DFG OSR exit value profiling should have graceful handling of local variables and arguments · 31659dee
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79310
      
      Reviewed by Gavin Barraclough.
              
      Previously, if we OSR exited because a prediction in a local was wrong, we'd
      only realize what the true type of the local was if the regular value profiling
      kicked in and told us. Unless the local was block-locally copy propagated, in
      which case we'd know from an OSR exit profile.
              
      This patch adds OSR exit profiling to all locals and arguments. Now, if we OSR
      exit because of a mispredicted local or argument type, we'll know what the type of
      the local or argument should be immediately upon exiting.
              
      The way that local variable OSR exit profiling works is that we now have a lazily
      added set of OSR-exit-only value profiles for exit sites that are BadType and that
      cited a GetLocal as their value source. The value profiles are only added if the
      OSR exit is taken, and are keyed by CodeBlock, bytecode index of the GetLocal, and
      operand. The look-up is performed by querying the
      CompressedLazyOperandValueProfileHolder in the CodeBlock, using a key that contains
      the bytecode index and the operand. Because the value profiles are added at random
      times, they are not sorted; instead they are just stored in an arbitrarily-ordered
      SegmentedVector. Look-ups are made fast by "decompressing": the DFG::ByteCodeParser
      creates a LazyOperandValueProfileParser, which turns the
      CompressedLazyOperandValueProfileHolder's contents into a HashMap for the duration
      of DFG parsing.
              
      Previously, OSR exits had a pointer to the ValueProfile that had the specFailBucket
      into which values observed during OSR exit would be placed. Now it uses a lazy
      thunk for a ValueProfile. I call this the MethodOfGettingAValueProfile. It may
      either contain a ValueProfile inside it (which works for previous uses of OSR exit
      profiling) or it may just have knowledge of how to go about creating the
      LazyOperandValueProfile in the case that the OSR exit is actually taken. This
      ensures that we never have to create NumOperands*NumBytecodeIndices*NumCodeBlocks
      value profiling buckets unless we actually did OSR exit on every single operand,
      in every single instruction, in each code block (that's probably unlikely).
              
      This appears to be neutral on the major benchmarks, but is a double-digit speed-up
      on code deliberately written to have data flow that spans basic blocks and where
      the code exhibits post-optimization polymorphism in a local variable.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::stronglyVisitStrongReferences):
      * bytecode/CodeBlock.h:
      (CodeBlock):
      (JSC::CodeBlock::lazyOperandValueProfiles):
      * bytecode/LazyOperandValueProfile.cpp: Added.
      (JSC):
      (JSC::CompressedLazyOperandValueProfileHolder::CompressedLazyOperandValueProfileHolder):
      (JSC::CompressedLazyOperandValueProfileHolder::~CompressedLazyOperandValueProfileHolder):
      (JSC::CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions):
      (JSC::CompressedLazyOperandValueProfileHolder::add):
      (JSC::LazyOperandValueProfileParser::LazyOperandValueProfileParser):
      (JSC::LazyOperandValueProfileParser::~LazyOperandValueProfileParser):
      (JSC::LazyOperandValueProfileParser::getIfPresent):
      (JSC::LazyOperandValueProfileParser::prediction):
      * bytecode/LazyOperandValueProfile.h: Added.
      (JSC):
      (LazyOperandValueProfileKey):
      (JSC::LazyOperandValueProfileKey::LazyOperandValueProfileKey):
      (JSC::LazyOperandValueProfileKey::operator!):
      (JSC::LazyOperandValueProfileKey::operator==):
      (JSC::LazyOperandValueProfileKey::hash):
      (JSC::LazyOperandValueProfileKey::bytecodeOffset):
      (JSC::LazyOperandValueProfileKey::operand):
      (JSC::LazyOperandValueProfileKey::isHashTableDeletedValue):
      (JSC::LazyOperandValueProfileKeyHash::hash):
      (JSC::LazyOperandValueProfileKeyHash::equal):
      (LazyOperandValueProfileKeyHash):
      (WTF):
      (JSC::LazyOperandValueProfile::LazyOperandValueProfile):
      (LazyOperandValueProfile):
      (JSC::LazyOperandValueProfile::key):
      (CompressedLazyOperandValueProfileHolder):
      (LazyOperandValueProfileParser):
      * bytecode/MethodOfGettingAValueProfile.cpp: Added.
      (JSC):
      (JSC::MethodOfGettingAValueProfile::fromLazyOperand):
      (JSC::MethodOfGettingAValueProfile::getSpecFailBucket):
      * bytecode/MethodOfGettingAValueProfile.h: Added.
      (JSC):
      (MethodOfGettingAValueProfile):
      (JSC::MethodOfGettingAValueProfile::MethodOfGettingAValueProfile):
      (JSC::MethodOfGettingAValueProfile::operator!):
      * bytecode/ValueProfile.cpp: Removed.
      * bytecode/ValueProfile.h:
      (JSC):
      (ValueProfileBase):
      (JSC::ValueProfileBase::ValueProfileBase):
      (JSC::ValueProfileBase::dump):
      (JSC::ValueProfileBase::computeUpdatedPrediction):
      (JSC::MinimalValueProfile::MinimalValueProfile):
      (ValueProfileWithLogNumberOfBuckets):
      (JSC::ValueProfileWithLogNumberOfBuckets::ValueProfileWithLogNumberOfBuckets):
      (JSC::ValueProfile::ValueProfile):
      (JSC::getValueProfileBytecodeOffset):
      (JSC::getRareCaseProfileBytecodeOffset):
      * dfg/DFGByteCodeParser.cpp:
      (ByteCodeParser):
      (JSC::DFG::ByteCodeParser::injectLazyOperandPrediction):
      (JSC::DFG::ByteCodeParser::getLocal):
      (JSC::DFG::ByteCodeParser::getArgument):
      (InlineStackEntry):
      (JSC::DFG::ByteCodeParser::fixVariableAccessPredictions):
      (DFG):
      (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
      (JSC::DFG::ByteCodeParser::parse):
      * dfg/DFGDriver.cpp:
      (JSC::DFG::compile):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::valueProfileFor):
      (JSC::DFG::Graph::methodOfGettingAValueProfileFor):
      (Graph):
      * dfg/DFGNode.h:
      (Node):
      * dfg/DFGOSRExit.cpp:
      (JSC::DFG::OSRExit::OSRExit):
      * dfg/DFGOSRExit.h:
      (OSRExit):
      * dfg/DFGOSRExitCompiler32_64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGOSRExitCompiler64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGPhase.cpp:
      (JSC::DFG::Phase::beginPhase):
      (JSC::DFG::Phase::endPhase):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::speculationCheck):
      * dfg/DFGVariableAccessData.h:
      (JSC::DFG::VariableAccessData::nonUnifiedPrediction):
      (VariableAccessData):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31659dee
    • fpizlo@apple.com's avatar
      Build fix. · 5e95987d
      fpizlo@apple.com authored
      * llint/LLIntOffsetsExtractor.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e95987d
    • kevino@webkit.org's avatar
      bd014826
    • kevino@webkit.org's avatar
      [wx] Build fix for non-Mac wx builds. · 46c73677
      kevino@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46c73677
    • fpizlo@apple.com's avatar
      DFG's logic for emitting a Flush is too convoluted and contains an inaccurate comment · 62da10a2
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79334
      
      Reviewed by Oliver Hunt.
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getLocal):
      (JSC::DFG::ByteCodeParser::getArgument):
      (JSC::DFG::ByteCodeParser::flush):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62da10a2
    • barraclough@apple.com's avatar
      Object.isSealed / Object.isFrozen don't work for native objects · 4e34894f
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79331
      
      Reviewed by Sam Weinig.
      
      Need to inspect all properties, including static ones.
      This exposes a couple of bugs in Array & Arguments:
          - getOwnPropertyDescriptor doesn't correctly report the writable attribute of array length.
          - Arguments object's defineOwnProperty does not handle callee/caller/length correctly.
      
      Source/JavaScriptCore: 
      
      * runtime/Arguments.cpp:
      (JSC::Arguments::defineOwnProperty):
          - Add handling for callee/caller/length.
      * runtime/JSArray.cpp:
      (JSC::JSArray::getOwnPropertyDescriptor):
          - report length's writability correctly.
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorSeal):
      (JSC::objectConstructorFreeze):
      (JSC::objectConstructorIsSealed):
      (JSC::objectConstructorIsFrozen):
          - Add spec-based implementation for non-final objects.
      
      LayoutTests: 
      
      * fast/js/preventExtensions-expected.txt:
      * fast/js/script-tests/preventExtensions.js:
          - Added tests.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e34894f
    • barraclough@apple.com's avatar
      pop of array hole should get from the prototype chain · 30ddfb17
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79338
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::pop):
          - If the fast fast vector case fails, more closely follow the spec.
      
      LayoutTests: 
      
      * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.6_Array_prototype_pop/S15.4.4.6_A4_T1-expected.txt:
          - Checking passing test result.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30ddfb17
    • commit-queue@webkit.org's avatar
      JSString::outOfMemory() should ASSERT(isRope()) rather than !isRope() · 7914d5af
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79268
      
      Patch by Yong Li <yoli@rim.com> on 2012-02-23
      Reviewed by Michael Saboff.
      
      resolveRope() is the only caller of outOfMemory(), and it calls outOfMemory()
      after it fails to allocate a buffer for m_value. So outOfMemory() should assert
      isRope() rather than !isRope().
      
      * runtime/JSString.cpp:
      (JSC::JSString::outOfMemory):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7914d5af
    • paroga@webkit.org's avatar
      [CMake] Add WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS macro · 583094f3
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79371
      
      Reviewed by Daniel Bates.
      
      .:
      
      Add a new macro to handle the inclusion of the platform specific *.cmake files.
      In the future this macro should get expanded to also handle feature specifc
      files, like the UseJSC.cmake in WebCore we already have.
      
      * Source/cmake/WebKitMacros.cmake:
      
      Source/JavaScriptCore:
      
      * CMakeLists.txt:
      * shell/CMakeLists.txt:
      * wtf/CMakeLists.txt:
      
      Source/WebCore:
      
      * CMakeLists.txt:
      
      Source/WebKit:
      
      * CMakeLists.txt:
      * PlatformBlackBerry.cmake: Renamed from Source/WebKit/blackberry/CMakeListsBlackBerry.txt.
      * PlatformEfl.cmake: Renamed from Source/WebKit/efl/CMakeListsEfl.txt.
      * PlatformWinCE.cmake: Renamed from Source/WebKit/wince/CMakeListsWinCE.txt.
      
      Source/WebKit2:
      
      * CMakeLists.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      583094f3
    • hausmann@webkit.org's avatar
      Fix the PRI macros used in WTF::String formatters to be compatible with Qt and... · d1092f42
      hausmann@webkit.org authored
      Fix the PRI macros used in WTF::String formatters to be compatible with Qt and Visual Studio 2005 and newer.
      https://bugs.webkit.org/show_bug.cgi?id=76210
      
      Add compile time check for Visual Studio 2005 or newer.
      
      Patch by Aron Rosenberg <arosenberg@logitech.com> on 2012-02-23
      Reviewed by Simon Hausmann.
      
      * os-win32/inttypes.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1092f42
  2. 22 Feb, 2012 8 commits
    • barraclough@apple.com's avatar
      Implement [[DefineOwnProperty]] for the arguments object · a9b45395
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79309
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * runtime/Arguments.cpp:
      (JSC::Arguments::deletePropertyByIndex):
      (JSC::Arguments::deleteProperty):
          - Deleting an argument should also delete the copy on the object, if any.
      (JSC::Arguments::defineOwnProperty):
          - Defining a property may override the live mapping.
      * runtime/Arguments.h:
      (Arguments):
      
      LayoutTests: 
      
      * fast/js/arguments-expected.txt:
      * fast/js/script-tests/arguments.js:
          - Added test cases
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9b45395
    • barraclough@apple.com's avatar
      Fix Object.freeze for non-final objects. · 2668db93
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79286
      
      Reviewed by Oliver Hunt.
      
      For vanilla objects we implement this with a single transition, for objects
      with special properties we should just follow the spec defined algorithm.
      
      Source/JavaScriptCore: 
      
      * runtime/JSArray.cpp:
      (JSC::SparseArrayValueMap::put):
          - this does need to handle inextensible objects.
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorSeal):
      (JSC::objectConstructorFreeze):
          - Implement spec defined algorithm for non-final objects.
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
      (JSC::Structure::freezeTransition):
          - freeze should set m_hasReadOnlyOrGetterSetterPropertiesExcludingProto.
      * runtime/Structure.h:
      (JSC::Structure::hasReadOnlyOrGetterSetterPropertiesExcludingProto):
      (JSC::Structure::setHasGetterSetterProperties):
      (JSC::Structure::setContainsReadOnlyProperties):
      (Structure):
          - renamed m_hasReadOnlyOrGetterSetterPropertiesExcludingProto.
      
      LayoutTests: 
      
      * fast/js/preventExtensions-expected.txt:
      * fast/js/script-tests/preventExtensions.js:
          - added new tests.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2668db93
    • mhahnenberg@apple.com's avatar
      Allocations from CopiedBlocks should always be 8-byte aligned · bd5ac227
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79271
      
      Reviewed by Geoffrey Garen.
      
      * heap/CopiedAllocator.h:
      (JSC::CopiedAllocator::allocate):
      * heap/CopiedBlock.h: Changed to add padding so that the start of the payload is always 
      guaranteed to be 8 byte aligned on both 64- and 32-bit platforms.
      (CopiedBlock):
      * heap/CopiedSpace.cpp: Changed all assertions of isPointerAligned to is8ByteAligned.
      (JSC::CopiedSpace::tryAllocateOversize):
      (JSC::CopiedSpace::getFreshBlock):
      * heap/CopiedSpaceInlineMethods.h:
      (JSC::CopiedSpace::allocateFromBlock):
      * runtime/JSArray.h:
      (ArrayStorage): Added padding for ArrayStorage to make sure that it is always 8 byte 
      aligned on both 64- and 32-bit platforms.
      * wtf/StdLibExtras.h:
      (WTF::is8ByteAligned): Added new utility function that functions similarly to the 
      way isPointerAligned does, but it just always checks for 8 byte alignment.
      (WTF):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd5ac227
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r108456. · c3edd789
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/108456
      https://bugs.webkit.org/show_bug.cgi?id=79223
      
      Broke fast/regex/pcre-test-4.html and cannot find anyone on
      IRC (Requested by zherczeg on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-02-22
      
      * yarr/YarrJIT.cpp:
      (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3edd789
    • bashi@chromium.org's avatar
      Unreviewed, rolling out r108468. · 34412b6f
      bashi@chromium.org authored
      http://trac.webkit.org/changeset/108468
      https://bugs.webkit.org/show_bug.cgi?id=79219
      
      Broke Chromium Win release build (Requested by bashi on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-02-22
      
      Source/JavaScriptCore:
      
      * wtf/Platform.h:
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * websockets/WebSocket.cpp:
      (WebCore::WebSocket::didConnect):
      * websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::connect):
      (WebCore::WebSocketChannel::fail):
      (WebCore::WebSocketChannel::processFrame):
      (WebCore::WebSocketChannel::sendFrame):
      * websockets/WebSocketChannel.h:
      * websockets/WebSocketDeflateFramer.cpp: Removed.
      * websockets/WebSocketDeflateFramer.h: Removed.
      
      LayoutTests:
      
      * http/tests/websocket/tests/hybi/compressed-control-frame-expected.txt: Removed.
      * http/tests/websocket/tests/hybi/compressed-control-frame.html: Removed.
      * http/tests/websocket/tests/hybi/compressed-control-frame_wsh.py: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame-comp-bit-onoff-expected.txt: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame-comp-bit-onoff.html: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter-expected.txt: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter.html: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter_wsh.py: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame-parameter-expected.txt: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame-parameter.html: Removed.
      * http/tests/websocket/tests/hybi/deflate-frame_wsh.py: Removed.
      * http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header-expected.txt:
      * http/tests/websocket/tests/hybi/send-file-blob_wsh.py:
      (web_socket_transfer_data):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34412b6f
    • bashi@chromium.org's avatar
      Adding WebSocket per-frame DEFLATE extension · fc1d3cd0
      bashi@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=77522
      
      Source/JavaScriptCore:
      
      Added USE(ZLIB) flag.
      
      Reviewed by Kent Tamura.
      
      * wtf/Platform.h:
      
      Source/WebCore:
      
      Add WebSocketDeflateFramer class which handles deflate-frame extension.
      This class encapsulates WebSocketDeflater and WebSocketInflater classes,
      which depend on zlib, so that WebSocketChannel is not necessary to aware
      zlib dependency.
      
      Reviewed by Kent Tamura.
      
      Tests: http/tests/websocket/tests/hybi/compressed-control-frame.html
             http/tests/websocket/tests/hybi/deflate-frame-comp-bit-onoff.html
             http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter.html
             http/tests/websocket/tests/hybi/deflate-frame-parameter.html
      
      * CMakeLists.txt: Added WebSocketDeflateFramer.(cpp|h)
      * GNUmakefile.list.am: Ditto.
      * Target.pri: Ditto.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      * websockets/WebSocket.cpp:
      (WebCore::WebSocket::didConnect): Set m_extensions.
      * websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::connect): Add deflate-frame extension processor to WebSocketHanshake if deflate can use.
      (WebCore::WebSocketChannel::fail): Call m_deflateFramer.didFail().
      (WebCore::WebSocketChannel::processFrame): Decompress frames if needed.
      (WebCore::WebSocketChannel::sendFrame): Compress frames if possible.
      * websockets/WebSocketChannel.h:
      * websockets/WebSocketDeflateFramer.cpp: Added.
      (WebCore):
      (WebSocketExtensionDeflateFrame):
      (WebCore::WebSocketExtensionDeflateFrame::create):
      (WebCore::WebSocketExtensionDeflateFrame::~WebSocketExtensionDeflateFrame):
      (WebCore::WebSocketExtensionDeflateFrame::WebSocketExtensionDeflateFrame):
      (WebCore::WebSocketExtensionDeflateFrame::handshakeString):
      (WebCore::WebSocketExtensionDeflateFrame::processResponse):
      (WebCore::DeflateResultHolder::DeflateResultHolder):
      (WebCore::DeflateResultHolder::~DeflateResultHolder):
      (WebCore::DeflateResultHolder::fail):
      (WebCore::InflateResultHolder::InflateResultHolder):
      (WebCore::InflateResultHolder::~InflateResultHolder):
      (WebCore::InflateResultHolder::fail):
      (WebCore::WebSocketDeflateFramer::WebSocketDeflateFramer):
      (WebCore::WebSocketDeflateFramer::createExtensionProcessor):
      (WebCore::WebSocketDeflateFramer::canDeflate):
      (WebCore::WebSocketDeflateFramer::enableDeflate):
      (WebCore::WebSocketDeflateFramer::deflate):
      (WebCore::WebSocketDeflateFramer::resetDeflateContext):
      (WebCore::WebSocketDeflateFramer::inflate):
      (WebCore::WebSocketDeflateFramer::resetInflateContext):
      (WebCore::WebSocketDeflateFramer::didFail):
      * websockets/WebSocketDeflateFramer.h: Added.
      (WebCore):
      (DeflateResultHolder):
      (WebCore::DeflateResultHolder::succeeded):
      (WebCore::DeflateResultHolder::failureReason):
      (InflateResultHolder):
      (WebCore::InflateResultHolder::succeeded):
      (WebCore::InflateResultHolder::failureReason):
      (WebSocketDeflateFramer):
      (WebCore::WebSocketDeflateFramer::enabled):
      
      LayoutTests:
      
      Added tests for WebSocket deflate-frame extension. Also updated some
      tests to follow the change.
      
      Reviewed by Kent Tamura.
      
      * http/tests/websocket/tests/hybi/compressed-control-frame-expected.txt: Added.
      * http/tests/websocket/tests/hybi/compressed-control-frame.html: Added.
      * http/tests/websocket/tests/hybi/compressed-control-frame_wsh.py: Added.
      (web_socket_do_extra_handshake):
      (web_socket_transfer_data):
      * http/tests/websocket/tests/hybi/deflate-frame-comp-bit-onoff-expected.txt: Added.
      * http/tests/websocket/tests/hybi/deflate-frame-comp-bit-onoff.html: Added.
      * http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter-expected.txt: Added.
      * http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter.html: Added.
      * http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter_wsh.py: Added.
      (web_socket_do_extra_handshake):
      (web_socket_transfer_data):
      * http/tests/websocket/tests/hybi/deflate-frame-parameter-expected.txt: Added.
      * http/tests/websocket/tests/hybi/deflate-frame-parameter.html: Added.
      * http/tests/websocket/tests/hybi/deflate-frame_wsh.py: Added.
      (_get_deflate_frame_extension_processor):
      (web_socket_do_extra_handshake):
      (web_socket_transfer_data):
      * http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header-expected.txt:
      * http/tests/websocket/tests/hybi/send-file-blob_wsh.py:
      (_retrieve_frame):
      (web_socket_transfer_data):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc1d3cd0
    • commit-queue@webkit.org's avatar
      Short circuit fixed for a 16 bt pattern character and an 8 bit string. · b970b57e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=75602
      
      Patch by Hojong Han <hojong.han@samsung.com> on 2012-02-22
      Reviewed by Gavin Barraclough.
      
      * yarr/YarrJIT.cpp:
      (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b970b57e
    • fpizlo@apple.com's avatar
      Build fix for systems with case sensitive disks. · 6e03ee7d
      fpizlo@apple.com authored
      * llint/LLIntOfflineAsmConfig.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e03ee7d
  3. 21 Feb, 2012 12 commits
    • fpizlo@apple.com's avatar
      JSC should be a triple-tier VM · 7bbcaab7
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75812
      <rdar://problem/10079694>
      
      Source/JavaScriptCore: 
      
      Reviewed by Gavin Barraclough.
              
      Implemented an interpreter that uses the JIT's calling convention. This
      interpreter is called LLInt, or the Low Level Interpreter. JSC will now
      will start by executing code in LLInt and will only tier up to the old
      JIT after the code is proven hot.
              
      LLInt is written in a modified form of our macro assembly. This new macro
      assembly is compiled by an offline assembler (see offlineasm), which
      implements many modern conveniences such as a Turing-complete CPS-based
      macro language and direct access to relevant C++ type information
      (basically offsets of fields and sizes of structs/classes).
              
      Code executing in LLInt appears to the rest of the JSC world "as if" it
      were executing in the old JIT. Hence, things like exception handling and
      cross-execution-engine calls just work and require pretty much no
      additional overhead.
              
      This interpreter is 2-2.5x faster than our old interpreter on SunSpider,
      V8, and Kraken. With triple-tiering turned on, we're neutral on SunSpider,
      V8, and Kraken, but appear to get a double-digit improvement on real-world
      websites due to a huge reduction in the amount of JIT'ing.
              
      * CMakeLists.txt:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.pri:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
      * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * assembler/LinkBuffer.h:
      * assembler/MacroAssemblerCodeRef.h:
      (MacroAssemblerCodePtr):
      (JSC::MacroAssemblerCodePtr::createFromExecutableAddress):
      * bytecode/BytecodeConventions.h: Added.
      * bytecode/CallLinkStatus.cpp:
      (JSC::CallLinkStatus::computeFromLLInt):
      (JSC):
      (JSC::CallLinkStatus::computeFor):
      * bytecode/CallLinkStatus.h:
      (JSC::CallLinkStatus::isSet):
      (JSC::CallLinkStatus::operator!):
      (CallLinkStatus):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dump):
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::~CodeBlock):
      (JSC::CodeBlock::finalizeUnconditionally):
      (JSC::CodeBlock::stronglyVisitStrongReferences):
      (JSC):
      (JSC::CodeBlock::unlinkCalls):
      (JSC::CodeBlock::unlinkIncomingCalls):
      (JSC::CodeBlock::bytecodeOffset):
      (JSC::ProgramCodeBlock::jettison):
      (JSC::EvalCodeBlock::jettison):
      (JSC::FunctionCodeBlock::jettison):
      (JSC::ProgramCodeBlock::jitCompileImpl):
      (JSC::EvalCodeBlock::jitCompileImpl):
      (JSC::FunctionCodeBlock::jitCompileImpl):
      * bytecode/CodeBlock.h:
      (JSC):
      (CodeBlock):
      (JSC::CodeBlock::baselineVersion):
      (JSC::CodeBlock::linkIncomingCall):
      (JSC::CodeBlock::bytecodeOffset):
      (JSC::CodeBlock::jitCompile):
      (JSC::CodeBlock::hasOptimizedReplacement):
      (JSC::CodeBlock::addPropertyAccessInstruction):
      (JSC::CodeBlock::addGlobalResolveInstruction):
      (JSC::CodeBlock::addLLIntCallLinkInfo):
      (JSC::CodeBlock::addGlobalResolveInfo):
      (JSC::CodeBlock::numberOfMethodCallLinkInfos):
      (JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):
      (JSC::CodeBlock::likelyToTakeSlowCase):
      (JSC::CodeBlock::couldTakeSlowCase):
      (JSC::CodeBlock::likelyToTakeSpecialFastCase):
      (JSC::CodeBlock::likelyToTakeDeepestSlowCase):
      (JSC::CodeBlock::likelyToTakeAnySlowCase):
      (JSC::CodeBlock::addFrequentExitSite):
      (JSC::CodeBlock::dontJITAnytimeSoon):
      (JSC::CodeBlock::jitAfterWarmUp):
      (JSC::CodeBlock::jitSoon):
      (JSC::CodeBlock::llintExecuteCounter):
      (ProgramCodeBlock):
      (EvalCodeBlock):
      (FunctionCodeBlock):
      * bytecode/GetByIdStatus.cpp:
      (JSC::GetByIdStatus::computeFromLLInt):
      (JSC):
      (JSC::GetByIdStatus::computeFor):
      * bytecode/GetByIdStatus.h:
      (JSC::GetByIdStatus::GetByIdStatus):
      (JSC::GetByIdStatus::wasSeenInJIT):
      (GetByIdStatus):
      * bytecode/Instruction.h:
      (JSC):
      (JSC::Instruction::Instruction):
      (Instruction):
      * bytecode/LLIntCallLinkInfo.h: Added.
      (JSC):
      (JSC::LLIntCallLinkInfo::LLIntCallLinkInfo):
      (LLIntCallLinkInfo):
      (JSC::LLIntCallLinkInfo::~LLIntCallLinkInfo):
      (JSC::LLIntCallLinkInfo::isLinked):
      (JSC::LLIntCallLinkInfo::unlink):
      * bytecode/MethodCallLinkStatus.cpp:
      (JSC::MethodCallLinkStatus::computeFor):
      * bytecode/Opcode.cpp:
      (JSC):
      * bytecode/Opcode.h:
      (JSC):
      (JSC::padOpcodeName):
      * bytecode/PutByIdStatus.cpp:
      (JSC::PutByIdStatus::computeFromLLInt):
      (JSC):
      (JSC::PutByIdStatus::computeFor):
      * bytecode/PutByIdStatus.h:
      (PutByIdStatus):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitResolve):
      (JSC::BytecodeGenerator::emitResolveWithBase):
      (JSC::BytecodeGenerator::emitGetById):
      (JSC::BytecodeGenerator::emitPutById):
      (JSC::BytecodeGenerator::emitDirectPutById):
      (JSC::BytecodeGenerator::emitCall):
      (JSC::BytecodeGenerator::emitConstruct):
      (JSC::BytecodeGenerator::emitCatch):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
      (JSC::DFG::ByteCodeParser::handleInlining):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGOSRExitCompiler.cpp:
      * dfg/DFGOperations.cpp:
      * heap/Heap.h:
      (JSC):
      (JSC::Heap::firstAllocatorWithoutDestructors):
      (Heap):
      * heap/MarkStack.cpp:
      (JSC::visitChildren):
      * heap/MarkedAllocator.h:
      (JSC):
      (MarkedAllocator):
      * heap/MarkedSpace.h:
      (JSC):
      (MarkedSpace):
      (JSC::MarkedSpace::firstAllocator):
      * interpreter/CallFrame.cpp:
      (JSC):
      (JSC::CallFrame::bytecodeOffsetForNonDFGCode):
      (JSC::CallFrame::setBytecodeOffsetForNonDFGCode):
      (JSC::CallFrame::currentVPC):
      (JSC::CallFrame::setCurrentVPC):
      (JSC::CallFrame::trueCallerFrame):
      * interpreter/CallFrame.h:
      (JSC::ExecState::hasReturnPC):
      (JSC::ExecState::clearReturnPC):
      (ExecState):
      (JSC::ExecState::bytecodeOffsetForNonDFGCode):
      (JSC::ExecState::currentVPC):
      (JSC::ExecState::setCurrentVPC):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::Interpreter):
      (JSC::Interpreter::~Interpreter):
      (JSC):
      (JSC::Interpreter::initialize):
      (JSC::Interpreter::isOpcode):
      (JSC::Interpreter::unwindCallFrame):
      (JSC::getCallerInfo):
      (JSC::Interpreter::privateExecute):
      (JSC::Interpreter::retrieveLastCaller):
      * interpreter/Interpreter.h:
      (JSC):
      (Interpreter):
      (JSC::Interpreter::getOpcode):
      (JSC::Interpreter::getOpcodeID):
      (JSC::Interpreter::classicEnabled):
      * interpreter/RegisterFile.h:
      (JSC):
      (RegisterFile):
      * jit/ExecutableAllocator.h:
      (JSC):
      * jit/HostCallReturnValue.cpp: Added.
      (JSC):
      (JSC::getHostCallReturnValueWithExecState):
      * jit/HostCallReturnValue.h: Added.
      (JSC):
      (JSC::initializeHostCallReturnValue):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      (JSC::JIT::privateCompileSlowCases):
      (JSC::JIT::privateCompile):
      * jit/JITCode.h:
      (JSC::JITCode::isOptimizingJIT):
      (JITCode):
      (JSC::JITCode::isBaselineCode):
      (JSC::JITCode::JITCode):
      * jit/JITDriver.h:
      (JSC::jitCompileIfAppropriate):
      (JSC::jitCompileFunctionIfAppropriate):
      * jit/JITExceptions.cpp:
      (JSC::jitThrow):
      * jit/JITInlineMethods.h:
      (JSC::JIT::updateTopCallFrame):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC):
      * jit/JITStubs.h:
      (JSC):
      * jit/JSInterfaceJIT.h:
      * llint: Added.
      * llint/LLIntCommon.h: Added.
      * llint/LLIntData.cpp: Added.
      (LLInt):
      (JSC::LLInt::Data::Data):
      (JSC::LLInt::Data::performAssertions):
      (JSC::LLInt::Data::~Data):
      * llint/LLIntData.h: Added.
      (JSC):
      (LLInt):
      (Data):
      (JSC::LLInt::Data::exceptionInstructions):
      (JSC::LLInt::Data::opcodeMap):
      (JSC::LLInt::Data::performAssertions):
      * llint/LLIntEntrypoints.cpp: Added.
      (LLInt):
      (JSC::LLInt::getFunctionEntrypoint):
      (JSC::LLInt::getEvalEntrypoint):
      (JSC::LLInt::getProgramEntrypoint):
      * llint/LLIntEntrypoints.h: Added.
      (JSC):
      (LLInt):
      (JSC::LLInt::getEntrypoint):
      * llint/LLIntExceptions.cpp: Added.
      (LLInt):
      (JSC::LLInt::interpreterThrowInCaller):
      (JSC::LLInt::returnToThrowForThrownException):
      (JSC::LLInt::returnToThrow):
      (JSC::LLInt::callToThrow):
      * llint/LLIntExceptions.h: Added.
      (JSC):
      (LLInt):
      * llint/LLIntOfflineAsmConfig.h: Added.
      * llint/LLIntOffsetsExtractor.cpp: Added.
      (JSC):
      (LLIntOffsetsExtractor):
      (JSC::LLIntOffsetsExtractor::dummy):
      (main):
      * llint/LLIntSlowPaths.cpp: Added.
      (LLInt):
      (JSC::LLInt::llint_trace_operand):
      (JSC::LLInt::llint_trace_value):
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      (JSC::LLInt::traceFunctionPrologue):
      (JSC::LLInt::shouldJIT):
      (JSC::LLInt::entryOSR):
      (JSC::LLInt::resolveGlobal):
      (JSC::LLInt::getByVal):
      (JSC::LLInt::handleHostCall):
      (JSC::LLInt::setUpCall):
      (JSC::LLInt::genericCall):
      * llint/LLIntSlowPaths.h: Added.
      (JSC):
      (LLInt):
      * llint/LLIntThunks.cpp: Added.
      (LLInt):
      (JSC::LLInt::generateThunkWithJumpTo):
      (JSC::LLInt::functionForCallEntryThunkGenerator):
      (JSC::LLInt::functionForConstructEntryThunkGenerator):
      (JSC::LLInt::functionForCallArityCheckThunkGenerator):
      (JSC::LLInt::functionForConstructArityCheckThunkGenerator):
      (JSC::LLInt::evalEntryThunkGenerator):
      (JSC::LLInt::programEntryThunkGenerator):
      * llint/LLIntThunks.h: Added.
      (JSC):
      (LLInt):
      * llint/LowLevelInterpreter.asm: Added.
      * llint/LowLevelInterpreter.cpp: Added.
      * llint/LowLevelInterpreter.h: Added.
      * offlineasm: Added.
      * offlineasm/armv7.rb: Added.
      * offlineasm/asm.rb: Added.
      * offlineasm/ast.rb: Added.
      * offlineasm/backends.rb: Added.
      * offlineasm/generate_offset_extractor.rb: Added.
      * offlineasm/instructions.rb: Added.
      * offlineasm/offset_extractor_constants.rb: Added.
      * offlineasm/offsets.rb: Added.
      * offlineasm/opt.rb: Added.
      * offlineasm/parser.rb: Added.
      * offlineasm/registers.rb: Added.
      * offlineasm/self_hash.rb: Added.
      * offlineasm/settings.rb: Added.
      * offlineasm/transform.rb: Added.
      * offlineasm/x86.rb: Added.
      * runtime/CodeSpecializationKind.h: Added.
      (JSC):
      * runtime/CommonSlowPaths.h:
      (JSC::CommonSlowPaths::arityCheckFor):
      (CommonSlowPaths):
      * runtime/Executable.cpp:
      (JSC::jettisonCodeBlock):
      (JSC):
      (JSC::EvalExecutable::jitCompile):
      (JSC::samplingDescription):
      (JSC::EvalExecutable::compileInternal):
      (JSC::ProgramExecutable::jitCompile):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::FunctionExecutable::baselineCodeBlockFor):
      (JSC::FunctionExecutable::jitCompileForCall):
      (JSC::FunctionExecutable::jitCompileForConstruct):
      (JSC::FunctionExecutable::compileForCallInternal):
      (JSC::FunctionExecutable::compileForConstructInternal):
      * runtime/Executable.h:
      (JSC):
      (EvalExecutable):
      (ProgramExecutable):
      (FunctionExecutable):
      (JSC::FunctionExecutable::jitCompileFor):
      * runtime/ExecutionHarness.h: Added.
      (JSC):
      (JSC::prepareForExecution):
      (JSC::prepareFunctionForExecution):
      * runtime/JSArray.h:
      (JSC):
      (JSArray):
      * runtime/JSCell.h:
      (JSC):
      (JSCell):
      * runtime/JSFunction.h:
      (JSC):
      (JSFunction):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      * runtime/JSGlobalData.h:
      (JSC):
      (JSGlobalData):
      * runtime/JSGlobalObject.h:
      (JSC):
      (JSGlobalObject):
      * runtime/JSObject.h:
      (JSC):
      (JSObject):
      (JSFinalObject):
      * runtime/JSPropertyNameIterator.h:
      (JSC):
      (JSPropertyNameIterator):
      * runtime/JSString.h:
      (JSC):
      (JSString):
      * runtime/JSTypeInfo.h:
      (JSC):
      (TypeInfo):
      * runtime/JSValue.cpp:
      (JSC::JSValue::description):
      * runtime/JSValue.h:
      (LLInt):
      (JSValue):
      * runtime/JSVariableObject.h:
      (JSC):
      (JSVariableObject):
      * runtime/Options.cpp:
      (Options):
      (JSC::Options::initializeOptions):
      * runtime/Options.h:
      (Options):
      * runtime/ScopeChain.h:
      (JSC):
      (ScopeChainNode):
      * runtime/Structure.cpp:
      (JSC::Structure::addPropertyTransition):
      * runtime/Structure.h:
      (JSC):
      (Structure):
      * runtime/StructureChain.h:
      (JSC):
      (StructureChain):
      * wtf/InlineASM.h:
      * wtf/Platform.h:
      * wtf/SentinelLinkedList.h:
      (SentinelLinkedList):
      (WTF::SentinelLinkedList::isEmpty):
      * wtf/text/StringImpl.h:
      (JSC):
      (StringImpl):
      
      Source/WebCore: 
      
      Reviewed by Gavin Barraclough.
              
      No new tests, because there is no change in behavior.
      
      * CMakeLists.txt:
      
      Source/WebKit: 
      
      Reviewed by Gavin Barraclough.
      
      Changed EFL's build system to include a new directory in JavaScriptCore.
              
      * CMakeLists.txt:
      
      Tools: 
      
      Reviewed by Gavin Barraclough.
      
      Changed EFL's build system to include a new directory in JavaScriptCore.
      
      * DumpRenderTree/efl/CMakeLists.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bbcaab7
    • oliver@apple.com's avatar
      Unbreak double-typed arrays on ARMv7 · 2fb265b4
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79177
      
      Reviewed by Gavin Barraclough.
      
      The existing code had completely broken address arithmetic.
      
      * JSCTypedArrayStubs.h:
      (JSC):
      * assembler/MacroAssemblerARMv7.h:
      (JSC::MacroAssemblerARMv7::storeDouble):
      (JSC::MacroAssemblerARMv7::storeFloat):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2fb265b4
    • barraclough@apple.com's avatar
      Should be able to reconfigure a non-configurable property as read-only · 2f2c38e7
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79170
      
      Reviewed by Sam Weinig.
      
      See ES5.1 8.12.9 10.a.i - the spec prohibits making a read-only property writable,
      but does not inhibit making a writable property read-only.
      
      Source/JavaScriptCore: 
      
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      * runtime/JSGlobalData.h:
      (JSC::JSGlobalData::setInDefineOwnProperty):
      (JSGlobalData):
      (JSC::JSGlobalData::isInDefineOwnProperty):
          - Added flag, tracking whether we are in JSObject::defineOwnProperty.
      * runtime/JSObject.cpp:
      (JSC::JSObject::deleteProperty):
      (DefineOwnPropertyScope):
          - Always allow properties to be deleted by DefineOwnProperty - assume it knows what it is doing!
      (JSC::DefineOwnPropertyScope::DefineOwnPropertyScope):
      (JSC::DefineOwnPropertyScope::~DefineOwnPropertyScope):
          - Added RAII helper.
      (JSC::JSObject::defineOwnProperty):
          - Track on the globalData when we are in this method.
      
      LayoutTests: 
      
      * fast/js/Object-defineProperty-expected.txt:
      * fast/js/script-tests/Object-defineProperty.js:
          - Update test result (this was enforcing incorrect behaviour).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f2c38e7
    • oliver@apple.com's avatar
      Make TypedArrays be available in commandline jsc · b5a603ef
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79163
      
      Reviewed by Gavin Barraclough.
      
      Adds a compile time option to have jsc support a basic implementation
      of the TypedArrays available in WebCore.  This lets us test the typed
      array logic in the JIT witout having to build webcore.
      
      * JSCTypedArrayStubs.h: Added.
      (JSC):
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (GlobalObject):
      (GlobalObject::addConstructableFunction):
      * runtime/JSGlobalData.h:
      (JSGlobalData):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5a603ef
    • tsepez@chromium.org's avatar
      equalIgnoringNullity() only comparing half the bytes for equality · 3e7ec15a
      tsepez@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79135
      
      Reviewed by Adam Barth.
      
      Source/JavaScriptCore:
      
      * wtf/text/StringImpl.h:
      (WTF::equalIgnoringNullity):
      
      LayoutTests:
      
      * http/tests/security/xssAuditor/script-tag.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e7ec15a
    • paroga@webkit.org's avatar
      Unnecessary preprocessor macros in MainThread.h/cpp · c8a112bc
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79083
      
      Removed invalid/wrong PLATFORM(WINDOWS) preprocessor macro.
      
      Patch by Roland Takacs <takacs.roland@stud.u-szeged.hu> on 2012-02-21
      
      * wtf/MainThread.cpp:
      (WTF):
      * wtf/MainThread.h:
      (WTF):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8a112bc
    • weinig@apple.com's avatar
      Attempt to fix the Snow Leopard build. · e1eea098
      weinig@apple.com authored
      Source/JavaScriptCore: 
      
      * Configurations/Base.xcconfig:
      
      Source/ThirdParty: 
      
      * gtest/xcode/Config/General.xcconfig:
      
      Source/ThirdParty/ANGLE: 
      
      * Configurations/Base.xcconfig:
      
      Source/WebCore: 
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit/mac: 
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit2: 
      
      * Configurations/Base.xcconfig:
      
      Tools: 
      
      * DumpRenderTree/mac/Configurations/Base.xcconfig:
      * MiniBrowser/Configurations/Base.xcconfig:
      * TestWebKitAPI/Configurations/Base.xcconfig:
      * WebKitTestRunner/Configurations/Base.xcconfig:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1eea098
    • weinig@apple.com's avatar
      Use libc++ when building with Clang on Mac · 97fd849d
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78981
      
      Reviewed by Dan Bernstein.
      
      Source/JavaScriptCore: 
      
      * Configurations/Base.xcconfig:
      
      Source/ThirdParty: 
      
      * gtest/xcode/Config/General.xcconfig:
      In addition to enabling libc++ when building with Clang,
      disable gtest's use of tr1::tuple, which doesn't exist in
      libc++.
      
      Source/ThirdParty/ANGLE: 
      
      * Configurations/Base.xcconfig:
      
      Source/WebCore: 
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit/mac: 
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit2: 
      
      * Configurations/Base.xcconfig:
      
      Tools: 
      
      * DumpRenderTree/mac/Configurations/Base.xcconfig:
      * MiniBrowser/Configurations/Base.xcconfig:
      * TestWebKitAPI/Configurations/Base.xcconfig:
      * WebKitTestRunner/Configurations/Base.xcconfig:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97fd849d
    • aroben@apple.com's avatar
      Roll out r108309, r108323, and r108326 · e089d623
      aroben@apple.com authored
      They broke the 32-bit Lion build.
      
      Original bugs is <http://webkit.org/b/75812> <rdar://problem/10079694>.
      
      Source/JavaScriptCore:
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.pri:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
      * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * assembler/LinkBuffer.h:
      * assembler/MacroAssemblerCodeRef.h:
      * bytecode/BytecodeConventions.h: Removed.
      * bytecode/CallLinkStatus.cpp:
      * bytecode/CallLinkStatus.h:
      * bytecode/CodeBlock.cpp:
      * bytecode/CodeBlock.h:
      * bytecode/GetByIdStatus.cpp:
      * bytecode/GetByIdStatus.h:
      * bytecode/Instruction.h:
      * bytecode/LLIntCallLinkInfo.h: Removed.
      * bytecode/MethodCallLinkStatus.cpp:
      * bytecode/Opcode.cpp:
      * bytecode/Opcode.h:
      * bytecode/PutByIdStatus.cpp:
      * bytecode/PutByIdStatus.h:
      * bytecompiler/BytecodeGenerator.cpp:
      * dfg/DFGByteCodeParser.cpp:
      * dfg/DFGCapabilities.h:
      * dfg/DFGOSRExitCompiler.cpp:
      * dfg/DFGOperations.cpp:
      * heap/Heap.h:
      * heap/MarkStack.cpp:
      * heap/MarkedAllocator.h:
      * heap/MarkedSpace.h:
      * interpreter/CallFrame.cpp:
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      * interpreter/Interpreter.h:
      * interpreter/RegisterFile.h:
      * jit/ExecutableAllocator.h:
      * jit/HostCallReturnValue.cpp: Removed.
      * jit/HostCallReturnValue.h: Removed.
      * jit/JIT.cpp:
      * jit/JITCode.h:
      * jit/JITDriver.h:
      * jit/JITExceptions.cpp:
      * jit/JITInlineMethods.h:
      * jit/JITStubs.cpp:
      * jit/JITStubs.h:
      * jit/JSInterfaceJIT.h:
      * llint/LLIntCommon.h: Removed.
      * llint/LLIntData.cpp: Removed.
      * llint/LLIntData.h: Removed.
      * llint/LLIntEntrypoints.cpp: Removed.
      * llint/LLIntEntrypoints.h: Removed.
      * llint/LLIntExceptions.cpp: Removed.
      * llint/LLIntExceptions.h: Removed.
      * llint/LLIntOfflineAsmConfig.h: Removed.
      * llint/LLIntOffsetsExtractor.cpp: Removed.
      * llint/LLIntSlowPaths.cpp: Removed.
      * llint/LLIntSlowPaths.h: Removed.
      * llint/LLIntThunks.cpp: Removed.
      * llint/LLIntThunks.h: Removed.
      * llint/LowLevelInterpreter.asm: Removed.
      * llint/LowLevelInterpreter.cpp: Removed.
      * llint/LowLevelInterpreter.h: Removed.
      * offlineasm/armv7.rb: Removed.
      * offlineasm/asm.rb: Removed.
      * offlineasm/ast.rb: Removed.
      * offlineasm/backends.rb: Removed.
      * offlineasm/generate_offset_extractor.rb: Removed.
      * offlineasm/instructions.rb: Removed.
      * offlineasm/offset_extractor_constants.rb: Removed.
      * offlineasm/offsets.rb: Removed.
      * offlineasm/opt.rb: Removed.
      * offlineasm/parser.rb: Removed.
      * offlineasm/registers.rb: Removed.
      * offlineasm/self_hash.rb: Removed.
      * offlineasm/settings.rb: Removed.
      * offlineasm/transform.rb: Removed.
      * offlineasm/x86.rb: Removed.
      * runtime/CodeSpecializationKind.h: Removed.
      * runtime/CommonSlowPaths.h:
      * runtime/Executable.cpp:
      * runtime/Executable.h:
      * runtime/ExecutionHarness.h: Removed.
      * runtime/JSArray.h:
      * runtime/JSCell.h:
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      * runtime/JSGlobalData.h:
      * runtime/JSGlobalObject.h:
      * runtime/JSObject.h:
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSString.h:
      * runtime/JSTypeInfo.h:
      * runtime/JSValue.cpp:
      * runtime/JSValue.h:
      * runtime/JSVariableObject.h:
      * runtime/Options.cpp:
      * runtime/Options.h:
      * runtime/ScopeChain.h:
      * runtime/Structure.cpp:
      * runtime/Structure.h:
      * runtime/StructureChain.h:
      * wtf/InlineASM.h:
      * wtf/Platform.h:
      * wtf/SentinelLinkedList.h:
      * wtf/text/StringImpl.h:
      
      Source/WebCore:
      
      * CMakeLists.txt:
      
      Source/WebKit:
      
      * CMakeLists.txt:
      
      Tools:
      
      * DumpRenderTree/efl/CMakeLists.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e089d623
    • kov@webkit.org's avatar
      Does not build on IA64, SPARC and Alpha · 24dde1d5
      kov@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79047
      
      Patch by Gustavo Noronha Silva  <kov@debian.org> and Bob Tracy <rct@frus.com> on 2012-02-21
      Rubber-stamped by Kent Tamura.
      
      * wtf/dtoa/utils.h: these architectures also have correct double
      operations, so add them to the appropriate side of the check.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24dde1d5
    • fpizlo@apple.com's avatar
      Fix massive crashes in all tests introduced by previous build fix, and fix non-DFG build. · 04659ba5
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75812
      
      Reviewed by Csaba Osztrogonác.
      
      * dfg/DFGOperations.cpp:
      (JSC):
      * jit/HostCallReturnValue.h:
      (JSC::initializeHostCallReturnValue):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04659ba5
    • fpizlo@apple.com's avatar
      Attempted build fix for ELF platforms. · 4be94de7
      fpizlo@apple.com authored
      * dfg/DFGOperations.cpp:
      (JSC):
      (JSC::getHostCallReturnValueWithExecState):
      * jit/HostCallReturnValue.cpp:
      (JSC):
      * jit/HostCallReturnValue.h:
      (JSC::initializeHostCallReturnValue):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4be94de7
  4. 20 Feb, 2012 8 commits
    • fpizlo@apple.com's avatar
      JSC should be a triple-tier VM · 091129f4
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=75812
      <rdar://problem/10079694>
      
      Source/JavaScriptCore: 
      
      Reviewed by Gavin Barraclough.
              
      Implemented an interpreter that uses the JIT's calling convention. This
      interpreter is called LLInt, or the Low Level Interpreter. JSC will now
      will start by executing code in LLInt and will only tier up to the old
      JIT after the code is proven hot.
              
      LLInt is written in a modified form of our macro assembly. This new macro
      assembly is compiled by an offline assembler (see offlineasm), which
      implements many modern conveniences such as a Turing-complete CPS-based
      macro language and direct access to relevant C++ type information
      (basically offsets of fields and sizes of structs/classes).
              
      Code executing in LLInt appears to the rest of the JSC world "as if" it
      were executing in the old JIT. Hence, things like exception handling and
      cross-execution-engine calls just work and require pretty much no
      additional overhead.
              
      This interpreter is 2-2.5x faster than our old interpreter on SunSpider,
      V8, and Kraken. With triple-tiering turned on, we're neutral on SunSpider,
      V8, and Kraken, but appear to get a double-digit improvement on real-world
      websites due to a huge reduction in the amount of JIT'ing.
              
      * CMakeLists.txt:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.pri:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
      * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * assembler/LinkBuffer.h:
      * assembler/MacroAssemblerCodeRef.h:
      (MacroAssemblerCodePtr):
      (JSC::MacroAssemblerCodePtr::createFromExecutableAddress):
      * bytecode/BytecodeConventions.h: Added.
      * bytecode/CallLinkStatus.cpp:
      (JSC::CallLinkStatus::computeFromLLInt):
      (JSC):
      (JSC::CallLinkStatus::computeFor):
      * bytecode/CallLinkStatus.h:
      (JSC::CallLinkStatus::isSet):
      (JSC::CallLinkStatus::operator!):
      (CallLinkStatus):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dump):
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::~CodeBlock):
      (JSC::CodeBlock::finalizeUnconditionally):
      (JSC::CodeBlock::stronglyVisitStrongReferences):
      (JSC):
      (JSC::CodeBlock::unlinkCalls):
      (JSC::CodeBlock::unlinkIncomingCalls):
      (JSC::CodeBlock::bytecodeOffset):
      (JSC::ProgramCodeBlock::jettison):
      (JSC::EvalCodeBlock::jettison):
      (JSC::FunctionCodeBlock::jettison):
      (JSC::ProgramCodeBlock::jitCompileImpl):
      (JSC::EvalCodeBlock::jitCompileImpl):
      (JSC::FunctionCodeBlock::jitCompileImpl):
      * bytecode/CodeBlock.h:
      (JSC):
      (CodeBlock):
      (JSC::CodeBlock::baselineVersion):
      (JSC::CodeBlock::linkIncomingCall):
      (JSC::CodeBlock::bytecodeOffset):
      (JSC::CodeBlock::jitCompile):
      (JSC::CodeBlock::hasOptimizedReplacement):
      (JSC::CodeBlock::addPropertyAccessInstruction):
      (JSC::CodeBlock::addGlobalResolveInstruction):
      (JSC::CodeBlock::addLLIntCallLinkInfo):
      (JSC::CodeBlock::addGlobalResolveInfo):
      (JSC::CodeBlock::numberOfMethodCallLinkInfos):
      (JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):
      (JSC::CodeBlock::likelyToTakeSlowCase):
      (JSC::CodeBlock::couldTakeSlowCase):
      (JSC::CodeBlock::likelyToTakeSpecialFastCase):
      (JSC::CodeBlock::likelyToTakeDeepestSlowCase):
      (JSC::CodeBlock::likelyToTakeAnySlowCase):
      (JSC::CodeBlock::addFrequentExitSite):
      (JSC::CodeBlock::dontJITAnytimeSoon):
      (JSC::CodeBlock::jitAfterWarmUp):
      (JSC::CodeBlock::jitSoon):
      (JSC::CodeBlock::llintExecuteCounter):
      (ProgramCodeBlock):
      (EvalCodeBlock):
      (FunctionCodeBlock):
      * bytecode/GetByIdStatus.cpp:
      (JSC::GetByIdStatus::computeFromLLInt):
      (JSC):
      (JSC::GetByIdStatus::computeFor):
      * bytecode/GetByIdStatus.h:
      (JSC::GetByIdStatus::GetByIdStatus):
      (JSC::GetByIdStatus::wasSeenInJIT):
      (GetByIdStatus):
      * bytecode/Instruction.h:
      (JSC):
      (JSC::Instruction::Instruction):
      (Instruction):
      * bytecode/LLIntCallLinkInfo.h: Added.
      (JSC):
      (JSC::LLIntCallLinkInfo::LLIntCallLinkInfo):
      (LLIntCallLinkInfo):
      (JSC::LLIntCallLinkInfo::~LLIntCallLinkInfo):
      (JSC::LLIntCallLinkInfo::isLinked):
      (JSC::LLIntCallLinkInfo::unlink):
      * bytecode/MethodCallLinkStatus.cpp:
      (JSC::MethodCallLinkStatus::computeFor):
      * bytecode/Opcode.cpp:
      (JSC):
      * bytecode/Opcode.h:
      (JSC):
      (JSC::padOpcodeName):
      * bytecode/PutByIdStatus.cpp:
      (JSC::PutByIdStatus::computeFromLLInt):
      (JSC):
      (JSC::PutByIdStatus::computeFor):
      * bytecode/PutByIdStatus.h:
      (PutByIdStatus):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitResolve):
      (JSC::BytecodeGenerator::emitResolveWithBase):
      (JSC::BytecodeGenerator::emitGetById):
      (JSC::BytecodeGenerator::emitPutById):
      (JSC::BytecodeGenerator::emitDirectPutById):
      (JSC::BytecodeGenerator::emitCall):
      (JSC::BytecodeGenerator::emitConstruct):
      (JSC::BytecodeGenerator::emitCatch):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
      (JSC::DFG::ByteCodeParser::handleInlining):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canCompileOpcode):
      * dfg/DFGOSRExitCompiler.cpp:
      * dfg/DFGOperations.cpp:
      * heap/Heap.h:
      (JSC):
      (JSC::Heap::firstAllocatorWithoutDestructors):
      (Heap):
      * heap/MarkStack.cpp:
      (JSC::visitChildren):
      * heap/MarkedAllocator.h:
      (JSC):
      (MarkedAllocator):
      * heap/MarkedSpace.h:
      (JSC):
      (MarkedSpace):
      (JSC::MarkedSpace::firstAllocator):
      * interpreter/CallFrame.cpp:
      (JSC):
      (JSC::CallFrame::bytecodeOffsetForNonDFGCode):
      (JSC::CallFrame::setBytecodeOffsetForNonDFGCode):
      (JSC::CallFrame::currentVPC):
      (JSC::CallFrame::setCurrentVPC):
      (JSC::CallFrame::trueCallerFrame):
      * interpreter/CallFrame.h:
      (JSC::ExecState::hasReturnPC):
      (JSC::ExecState::clearReturnPC):
      (ExecState):
      (JSC::ExecState::bytecodeOffsetForNonDFGCode):
      (JSC::ExecState::currentVPC):
      (JSC::ExecState::setCurrentVPC):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::Interpreter):
      (JSC::Interpreter::~Interpreter):
      (JSC):
      (JSC::Interpreter::initialize):
      (JSC::Interpreter::isOpcode):
      (JSC::Interpreter::unwindCallFrame):
      (JSC::getCallerInfo):
      (JSC::Interpreter::privateExecute):
      (JSC::Interpreter::retrieveLastCaller):
      * interpreter/Interpreter.h:
      (JSC):
      (Interpreter):
      (JSC::Interpreter::getOpcode):
      (JSC::Interpreter::getOpcodeID):
      (JSC::Interpreter::classicEnabled):
      * interpreter/RegisterFile.h:
      (JSC):
      (RegisterFile):
      * jit/ExecutableAllocator.h:
      (JSC):
      * jit/HostCallReturnValue.cpp: Added.
      (JSC):
      (JSC::getHostCallReturnValueWithExecState):
      * jit/HostCallReturnValue.h: Added.
      (JSC):
      (JSC::initializeHostCallReturnValue):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      (JSC::JIT::privateCompileSlowCases):
      (JSC::JIT::privateCompile):
      * jit/JITCode.h:
      (JSC::JITCode::isOptimizingJIT):
      (JITCode):
      (JSC::JITCode::isBaselineCode):
      (JSC::JITCode::JITCode):
      * jit/JITDriver.h:
      (JSC::jitCompileIfAppropriate):
      (JSC::jitCompileFunctionIfAppropriate):
      * jit/JITExceptions.cpp:
      (JSC::jitThrow):
      * jit/JITInlineMethods.h:
      (JSC::JIT::updateTopCallFrame):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC):
      * jit/JITStubs.h:
      (JSC):
      * jit/JSInterfaceJIT.h:
      * llint: Added.
      * llint/LLIntCommon.h: Added.
      * llint/LLIntData.cpp: Added.
      (LLInt):
      (JSC::LLInt::Data::Data):
      (JSC::LLInt::Data::performAssertions):
      (JSC::LLInt::Data::~Data):
      * llint/LLIntData.h: Added.
      (JSC):
      (LLInt):
      (Data):
      (JSC::LLInt::Data::exceptionInstructions):
      (JSC::LLInt::Data::opcodeMap):
      (JSC::LLInt::Data::performAssertions):
      * llint/LLIntEntrypoints.cpp: Added.
      (LLInt):
      (JSC::LLInt::getFunctionEntrypoint):
      (JSC::LLInt::getEvalEntrypoint):
      (JSC::LLInt::getProgramEntrypoint):
      * llint/LLIntEntrypoints.h: Added.
      (JSC):
      (LLInt):
      (JSC::LLInt::getEntrypoint):
      * llint/LLIntExceptions.cpp: Added.
      (LLInt):
      (JSC::LLInt::interpreterThrowInCaller):
      (JSC::LLInt::returnToThrowForThrownException):
      (JSC::LLInt::returnToThrow):
      (JSC::LLInt::callToThrow):
      * llint/LLIntExceptions.h: Added.
      (JSC):
      (LLInt):
      * llint/LLIntOfflineAsmConfig.h: Added.
      * llint/LLIntOffsetsExtractor.cpp: Added.
      (JSC):
      (LLIntOffsetsExtractor):
      (JSC::LLIntOffsetsExtractor::dummy):
      (main):
      * llint/LLIntSlowPaths.cpp: Added.
      (LLInt):
      (JSC::LLInt::llint_trace_operand):
      (JSC::LLInt::llint_trace_value):
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      (JSC::LLInt::traceFunctionPrologue):
      (JSC::LLInt::shouldJIT):
      (JSC::LLInt::entryOSR):
      (JSC::LLInt::resolveGlobal):
      (JSC::LLInt::getByVal):
      (JSC::LLInt::handleHostCall):
      (JSC::LLInt::setUpCall):
      (JSC::LLInt::genericCall):
      * llint/LLIntSlowPaths.h: Added.
      (JSC):
      (LLInt):
      * llint/LLIntThunks.cpp: Added.
      (LLInt):
      (JSC::LLInt::generateThunkWithJumpTo):
      (JSC::LLInt::functionForCallEntryThunkGenerator):
      (JSC::LLInt::functionForConstructEntryThunkGenerator):
      (JSC::LLInt::functionForCallArityCheckThunkGenerator):
      (JSC::LLInt::functionForConstructArityCheckThunkGenerator):
      (JSC::LLInt::evalEntryThunkGenerator):
      (JSC::LLInt::programEntryThunkGenerator):
      * llint/LLIntThunks.h: Added.
      (JSC):
      (LLInt):
      * llint/LowLevelInterpreter.asm: Added.
      * llint/LowLevelInterpreter.cpp: Added.
      * llint/LowLevelInterpreter.h: Added.
      * offlineasm: Added.
      * offlineasm/armv7.rb: Added.
      * offlineasm/asm.rb: Added.
      * offlineasm/ast.rb: Added.
      * offlineasm/backends.rb: Added.
      * offlineasm/generate_offset_extractor.rb: Added.
      * offlineasm/instructions.rb: Added.
      * offlineasm/offset_extractor_constants.rb: Added.
      * offlineasm/offsets.rb: Added.
      * offlineasm/opt.rb: Added.
      * offlineasm/parser.rb: Added.
      * offlineasm/registers.rb: Added.
      * offlineasm/self_hash.rb: Added.
      * offlineasm/settings.rb: Added.
      * offlineasm/transform.rb: Added.
      * offlineasm/x86.rb: Added.
      * runtime/CodeSpecializationKind.h: Added.
      (JSC):
      * runtime/CommonSlowPaths.h:
      (JSC::CommonSlowPaths::arityCheckFor):
      (CommonSlowPaths):
      * runtime/Executable.cpp:
      (JSC::jettisonCodeBlock):
      (JSC):
      (JSC::EvalExecutable::jitCompile):
      (JSC::samplingDescription):
      (JSC::EvalExecutable::compileInternal):
      (JSC::ProgramExecutable::jitCompile):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::FunctionExecutable::baselineCodeBlockFor):
      (JSC::FunctionExecutable::jitCompileForCall):
      (JSC::FunctionExecutable::jitCompileForConstruct):
      (JSC::FunctionExecutable::compileForCallInternal):
      (JSC::FunctionExecutable::compileForConstructInternal):
      * runtime/Executable.h:
      (JSC):
      (EvalExecutable):
      (ProgramExecutable):
      (FunctionExecutable):
      (JSC::FunctionExecutable::jitCompileFor):
      * runtime/ExecutionHarness.h: Added.
      (JSC):
      (JSC::prepareForExecution):
      (JSC::prepareFunctionForExecution):
      * runtime/JSArray.h:
      (JSC):
      (JSArray):
      * runtime/JSCell.h:
      (JSC):
      (JSCell):
      * runtime/JSFunction.h:
      (JSC):
      (JSFunction):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      * runtime/JSGlobalData.h:
      (JSC):
      (JSGlobalData):
      * runtime/JSGlobalObject.h:
      (JSC):
      (JSGlobalObject):
      * runtime/JSObject.h:
      (JSC):
      (JSObject):
      (JSFinalObject):
      * runtime/JSPropertyNameIterator.h:
      (JSC):
      (JSPropertyNameIterator):
      * runtime/JSString.h:
      (JSC):
      (JSString):
      * runtime/JSTypeInfo.h:
      (JSC):
      (TypeInfo):
      * runtime/JSValue.cpp:
      (JSC::JSValue::description):
      * runtime/JSValue.h:
      (LLInt):
      (JSValue):
      * runtime/JSVariableObject.h:
      (JSC):
      (JSVariableObject):
      * runtime/Options.cpp:
      (Options):
      (JSC::Options::initializeOptions):
      * runtime/Options.h:
      (Options):
      * runtime/ScopeChain.h:
      (JSC):
      (ScopeChainNode):
      * runtime/Structure.cpp:
      (JSC::Structure::addPropertyTransition):
      * runtime/Structure.h:
      (JSC):
      (Structure):
      * runtime/StructureChain.h:
      (JSC):
      (StructureChain):
      * wtf/InlineASM.h:
      * wtf/Platform.h:
      * wtf/SentinelLinkedList.h:
      (SentinelLinkedList):
      (WTF::SentinelLinkedList::isEmpty):
      * wtf/text/StringImpl.h:
      (JSC):
      (StringImpl):
      
      Source/WebCore: 
      
      Reviewed by Gavin Barraclough.
              
      No new tests, because there is no change in behavior.
      
      * CMakeLists.txt:
      
      Source/WebKit: 
      
      Reviewed by Gavin Barraclough.
      
      Changed EFL's build system to include a new directory in JavaScriptCore.
              
      * CMakeLists.txt:
      
      Tools: 
      
      Reviewed by Gavin Barraclough.
      
      Changed EFL's build system to include a new directory in JavaScriptCore.
      
      * DumpRenderTree/efl/CMakeLists.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      091129f4
    • fpizlo@apple.com's avatar
      Unreviewed, rolling out http://trac.webkit.org/changeset/108291 · 29229227
      fpizlo@apple.com authored
      It completely broke the 32-bit JIT.
      
      * heap/CopiedAllocator.h:
      * heap/CopiedSpace.h:
      (CopiedSpace):
      * heap/Heap.h:
      (JSC::Heap::allocatorForObjectWithDestructor):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileSlowCases):
      * jit/JIT.h:
      (JIT):
      * jit/JITInlineMethods.h:
      (JSC):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_new_array):
      * runtime/JSArray.cpp:
      (JSC::storageSize):
      (JSC):
      * runtime/JSArray.h:
      (ArrayStorage):
      (JSArray):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29229227
    • barraclough@apple.com's avatar
      [[Put]] should throw if prototype chain contains a readonly property. · 7f154b83
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79069
      
      Reviewed by Oliver Hunt.
      
      Currently we only check the base of the put, not the prototype chain.
      Fold this check in with the test for accessors.
      
      Source/JavaScriptCore: 
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
          - Updated to test all objects in the propotype chain for readonly properties.
      (JSC::JSObject::putDirectAccessor):
      (JSC::putDescriptor):
          - Record the presence of readonly properties on the structure.
      * runtime/Structure.cpp:
      (JSC::Structure::Structure):
          - hasGetterSetterPropertiesExcludingProto expanded to hasReadOnlyOrGetterSetterPropertiesExcludingProto.
      * runtime/Structure.h:
      (JSC::Structure::hasReadOnlyOrGetterSetterPropertiesExcludingProto):
      (JSC::Structure::setHasGetterSetterProperties):
          - hasGetterSetterPropertiesExcludingProto expanded to hasReadOnlyOrGetterSetterPropertiesExcludingProto.
      (JSC::Structure::setContainsReadOnlyProperties):
          - Added.
      
      LayoutTests: 
      
      * fast/js/Object-defineProperty-expected.txt:
      * fast/js/script-tests/Object-defineProperty.js:
      (get shouldBeTrue):
          - Added test case.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f154b83
    • mhahnenberg@apple.com's avatar
      Implement fast path for op_new_array in the baseline JIT · d249ef82
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=78612
      
      Reviewed by Filip Pizlo.
      
      * heap/CopiedAllocator.h:
      (CopiedAllocator): Friended the JIT to allow access to m_currentOffset.
      * heap/CopiedSpace.h:
      (CopiedSpace): Friended the JIT to allow access to
      (JSC::CopiedSpace::allocator):
      * heap/Heap.h:
      (JSC::Heap::storageAllocator): Added a getter for the CopiedAllocator class so the JIT
      can use it for simple allocation i.e. when we can just bump the offset without having to
      do anything else.
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileSlowCases): Added new slow case for op_new_array for when
      we have to bail out because the fast allocation path fails for whatever reason.
      * jit/JIT.h:
      (JIT):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateBasicStorage): Added utility function that allows objects to
      allocate generic backing stores. This function is used by emitAllocateJSArray.
      (JSC):
      (JSC::JIT::emitAllocateJSArray): Added utility function that allows the client to
      more easily allocate JSArrays. This function is used by emit_op_new_array and I expect
      it will also be used for emit_op_new_array_buffer.
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_new_array): Changed to do inline allocation of JSArrays. Still does
      a stub call for oversize arrays.
      (JSC):
      (JSC::JIT::emitSlow_op_new_array): Just bails out to a stub call if we fail in any way on
      the fast path.
      * runtime/JSArray.cpp:
      (JSC):
      * runtime/JSArray.h: Added lots of offset functions for all the fields that we need to
      initialize in the JIT.
      (ArrayStorage):
      (JSC::ArrayStorage::lengthOffset):
      (JSC::ArrayStorage::numValuesInVectorOffset):
      (JSC::ArrayStorage::allocBaseOffset):
      (JSC::ArrayStorage::vectorOffset):
      (JSArray):
      (JSC::JSArray::sparseValueMapOffset):
      (JSC::JSArray::subclassDataOffset):
      (JSC::JSArray::indexBiasOffset):
      (JSC):
      (JSC::JSArray::storageSize): Moved this function from being a static function in the cpp file
      to being a static function in the JSArray class. This move allows the JIT to call it to
      see what size it should allocate.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d249ef82
    • barraclough@apple.com's avatar
      DefineOwnProperty fails with numeric properties & Object.prototype · 59111917
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=79059
      
      Reviewed by Oliver Hunt.
      
      ObjectPrototype caches whether it contains any numeric properties (m_hasNoPropertiesWithUInt32Names),
      calls to defineOwnProperty need to update this cache.
      
      Source/JavaScriptCore: 
      
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::put):
      (JSC::ObjectPrototype::defineOwnProperty):
      (JSC):
      (JSC::ObjectPrototype::getOwnPropertySlotByIndex):
      * runtime/ObjectPrototype.h:
      (ObjectPrototype):
      
      LayoutTests: 
      
      * fast/js/Object-defineProperty-expected.txt:
      * fast/js/script-tests/Object-defineProperty.js:
      (shouldBe.shouldBe.shouldBe.shouldBe.shouldBe.shouldBe.shouldBe.shouldThrow.Object.defineProperty):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59111917
    • commit-queue@webkit.org's avatar
      Does not build on GNU Hurd · 69258631
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79045
      
      Patch by Pino Toscano <pino@debian.org> on 2012-02-20
      Reviewed by Gustavo Noronha Silva.
      
      * wtf/Platform.h: define WTF_OS_HURD.
      * wtf/ThreadIdentifierDataPthreads.cpp: adds a band-aid fix
      for the lack of PTHREAD_KEYS_MAX definition, with a value which
      should not cause issues.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69258631
    • barraclough@apple.com's avatar
      Unreviewed windows build fix. · 2cd9b449
      barraclough@apple.com authored
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2cd9b449
    • mhahnenberg@apple.com's avatar
      Undoing accidental changes · ba30dbb1
      mhahnenberg@apple.com authored
      * heap/Heap.cpp:
      (JSC::Heap::collectAllGarbage):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba30dbb1