1. 29 Sep, 2013 2 commits
  2. 28 Sep, 2013 3 commits
    • mrowe@apple.com's avatar
      Take Xcode's advice and enable some extra warnings. · c11deac3
      mrowe@apple.com authored
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore:
      
      * Configurations/Base.xcconfig:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      
      Source/WebCore:
      
      * Configurations/Base.xcconfig:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/NamedNodeMap.cpp:
      (WebCore::NamedNodeMap::removeNamedItemNS): Use the correct constant.
      
      Source/WebKit:
      
      * WebKit.xcodeproj/project.pbxproj:
      
      Source/WebKit/mac:
      
      * Configurations/Base.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/Base.xcconfig:
      * WebKit2.xcodeproj/project.pbxproj:
      
      Source/WTF:
      
      * Configurations/Base.xcconfig:
      * WTF.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c11deac3
    • akling@apple.com's avatar
      Pass VM instead of ExecState to JSFunction constructors. · 20d6f9c1
      akling@apple.com authored
      <https://webkit.org/b/122014>
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      JSFunction doesn't need the ExecState for anything during its
      construction, so reduce the amount of loads by just passing the
      VM around instead.
      
      Factored out putDirectNonIndexAccessor() from the existing
      putDirectAccessor() to avoid snowballing the patch (and because
      it's kinda neat to avoid the extra branch.)
      
      JSC release binary size -= 9680 bytes.
      
      Source/WebCore:
      
      Updated for new JSFunction::create() signature.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      20d6f9c1
    • mrowe@apple.com's avatar
      JavaScriptCore fails to build with newer versions of clang. · aae57e37
      mrowe@apple.com authored
      Reviewed by Sam Weinig.
      
      * interpreter/Interpreter.cpp: Remove an unused function.
      * parser/SourceProvider.cpp: Ditto.
      * runtime/GCActivityCallback.cpp: #if a constant that's only used on non-CF platforms.
      * runtime/JSCJSValue.cpp: Remove an unused constant.
      * runtime/JSString.cpp: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aae57e37
  3. 27 Sep, 2013 6 commits
    • fpizlo@apple.com's avatar
      Get rid of SetMyScope/SetCallee; use normal variables for the scope and callee... · 48cdafdc
      fpizlo@apple.com authored
      Get rid of SetMyScope/SetCallee; use normal variables for the scope and callee of inlined call frames of closures
      https://bugs.webkit.org/show_bug.cgi?id=122047
      
      Reviewed by Oliver Hunt.
              
      Currently we have the DFG reserve space for inline call frames at exactly the same stack
      offsets that you would have gotten if the baseline interpreter/JIT had made the calls.
      We need to get rid of that. One of the weirder parts of this is that we have special DFG
      operations for accessing these inlined call frame headers. It's really hard for any
      analysis of DFG IR to see what the liveness of any of those frame header "variables" is;
      the liveness behaves like flushed arguments (it's all live until end of the inlinee) but
      we don't have anything like a Flush node for those special variables.
              
      This patch gets rid of the special operations for accessing inline call frame headers.
      GetMyScope and GetCallee still remain, and are only for accessing the machine call
      frame's scope/callee entries. The inline call frame's scope/callee now behave like
      normal variables, and have Flush behavior just like inline arguments.
      
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getDirect):
      (JSC::DFG::ByteCodeParser::get):
      (JSC::DFG::ByteCodeParser::setDirect):
      (JSC::DFG::ByteCodeParser::set):
      (JSC::DFG::ByteCodeParser::setLocal):
      (JSC::DFG::ByteCodeParser::setArgument):
      (JSC::DFG::ByteCodeParser::flush):
      (JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand):
      (JSC::DFG::ByteCodeParser::handleInlining):
      (JSC::DFG::ByteCodeParser::getScope):
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::getCalleeLoadElimination):
      (JSC::DFG::CSEPhase::getMyScopeLoadElimination):
      (JSC::DFG::CSEPhase::performNodeCSE):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGNodeType.h:
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48cdafdc
    • fpizlo@apple.com's avatar
      Deoptimize 32-bit deoptimization · 22958794
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122025
      
      Reviewed by Oliver Hunt.
              
      Just simplifying a bunch of code. I don't want the old, super-complicated,
      deoptimization code to get in the way of changes I'll be making to DFG stack layout.
      
      * bytecode/ValueRecovery.h:
      (JSC::ValueRecovery::inGPR):
      (JSC::ValueRecovery::isInRegisters):
      (JSC::ValueRecovery::gpr):
      (JSC::ValueRecovery::dumpInContext):
      * dfg/DFGOSRExitCompiler32_64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGOSRExitCompiler64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22958794
    • alex.christensen@flexsim.com's avatar
      Fixed Win64 build after r156184. · 8eee7ecd
      alex.christensen@flexsim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121994
      
      Reviewed by Oliver Hunt.
      
      * jit/CCallHelpers.h:
      (JSC::CCallHelpers::setupTwoStubArgsGPR):
      (JSC::CCallHelpers::setupTwoStubArgsFPR):
      Renamed from setupTwoStubArgs.
      Visual Studio x64 compiler fails to see that this is an overloaded template function.
      (JSC::CCallHelpers::setupStubArguments):
      (JSC::CCallHelpers::setupArguments):
      (JSC::CCallHelpers::setupArgumentsWithExecState):
      Use setupTwoStubArgsGPR or setupTwoStubArgsFPR instead of setupTwoStubArgs.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8eee7ecd
    • rgabor@webkit.org's avatar
      LLInt alignment problem on ARM in debug mode · 42062786
      rgabor@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122012
      
      Reviewed by Michael Saboff.
      
      Force GCC to put the LLInt code to .text section.
      
      * llint/LowLevelInterpreter.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42062786
    • jer.noble@apple.com's avatar
      [Mac] Implement the media controls in JavaScript. · b8744b36
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120895
      
      Reviewed by Dean Jackson.
      
      Source/JavaScriptCore:
      
      Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      Re-implement the existing MediaControls constellation of classes in JavaScript
      and CSS. This will allow different ports to configure their controls without
      dependencies on the layout requirements of any other port's controls.
      
      Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT:
      * Configurations/FeatureDefines.xcconfig:
      
      Add new source files to the project:
      * DerivedSources.cpp:
      * DerivedSources.make:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      Add a new class MediaControlsHost which the script controls can use to
      communicate with the HTMLMediaElement without exposing private interfaces
      to web facing scripts:
      * Modules/mediacontrols/MediaControlsHost.cpp: Added.
      (WebCore::MediaControlsHost::automaticKeyword): Static method.
      (WebCore::MediaControlsHost::forcedOnlyKeyword): Ditto.
      (WebCore::MediaControlsHost::alwaysOnKeyword): Ditto.
      (WebCore::MediaControlsHost::create): Simple factory.
      (WebCore::MediaControlsHost::MediaControlsHost): Simple constructor.
      (WebCore::MediaControlsHost::~MediaControlsHost): Simple destructor.
      (WebCore::MediaControlsHost::sortedTrackListForMenu): Pass through to CaptionUserPreferences.
      (WebCore::MediaControlsHost::displayNameForTrack): Ditto.
      (WebCore::MediaControlsHost::captionMenuOffItem): Pass through to TextTrack.
      (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
      (WebCore::MediaControlsHost::captionDisplayMode): Pass through to CaptionUserPreferences.
      (WebCore::MediaControlsHost::setSelectedTextTrack): Pass through to HTMLMediaElement.
      (WebCore::MediaControlsHost::textTrackContainer): Lazily create a MediaControlTextTrackContainerElement.
      (WebCore::MediaControlsHost::updateTextTrackContainer): Pass through to MediaControlTextTrackContainerElement.
      * Modules/mediacontrols/MediaControlsHost.h: Added.
      * Modules/mediacontrols/MediaControlsHost.idl: Added.
      * Modules/mediacontrols/mediaControlsApple.css: Added.
      
      Add convenience methods for adding a MediaControlsHost to a VM.
      * bindings/js/ScriptObject.cpp:
      (WebCore::ScriptGlobalObject::set):
      * bindings/js/ScriptObject.h:
      
      Add the new controller .js implementation:
      * Modules/mediacontrols/mediaControlsApple.js: Added.
      (createControls): Global method to create a new Controller object.
      (Controller): Constructor. Create and configure the default set of controls.
      (Controller.prototype.addListeners): Adds event listeners to the this.video object.
      (Controller.prototype.removeListeners): Removes listeners from same.
      (Controller.prototype.handleEvent): Makes Controller an EventHandler, making registration and
              deregistration simpler.
      (Controller.prototype.createBase): Creates the base controls object and the text track container.
      (Controller.prototype.createControls): Creates the controls panel object and controller UI.
      (Controller.prototype.setControlsType): Switches between Full Screen and Inline style of controller.
      (Controller.prototype.disconnectControls): Disconnects all UI elements from the DOM.
      (Controller.prototype.configureInlineControls): Configures existing controls for Inline mode.
      (Controller.prototype.configureFullScreenControls): Ditto, for Full Screen Mode.
      
      Add listeners for HTMLMediaElement events:
      (Controller.prototype.onloadstart): Update the status display.
      (Controller.prototype.onerror): Ditto.
      (Controller.prototype.onabort): Ditto.
      (Controller.prototype.onsuspend): Ditto.
      (Controller.prototype.onprogress): Ditto.
      (Controller.prototype.onstalled): Ditto.
      (Controller.prototype.onwaiting): Ditto.
      (Controller.prototype.onreadystatechange): Ditto.
      (Controller.prototype.ontimeupdate): Update the timeline and time displays.
      (Controller.prototype.ondurationchange): Ditto.
      (Controller.prototype.onplaying): Update the play button.
      (Controller.prototype.onplay): Ditto.
      (Controller.prototype.onpause): Ditto.
      (Controller.prototype.onratechange): Ditto.
      (Controller.prototype.onvolumechange): Update the volume and mute UI.
      (Controller.prototype.ontexttrackchange): Update the text track container and captions button.
      (Controller.prototype.ontexttrackadd): Ditto.
      (Controller.prototype.ontexttrackremove): Ditto.
      (Controller.prototype.ontexttrackcuechange): Ditto.
      (Controller.prototype.onfullscreenchange): Reconfigure the controls.
      
      Add listeners for UI element events:
      (Controller.prototype.onwrappermousemove): Show the controls and start the hide timer.
      (Controller.prototype.onwrappermouseout): Hide the controls and stop the hide timer.
      (Controller.prototype.onrewindbuttonclicked): Rewind.
      (Controller.prototype.onplaybuttonclicked): Toggle pause.
      (Controller.prototype.ontimelinechange): Update the currentTime.
      (Controller.prototype.ontimelinedown):
      (Controller.prototype.ontimelineup):
      (Controller.prototype.ontimelinemouseover): Show the thumbnail view if available.
      (Controller.prototype.ontimelinemouseout): Hide same.
      (Controller.prototype.ontimelinemousemove): Move the thumbnail view.
      (Controller.prototype.onmutebuttonclicked): Mute audio.
      (Controller.prototype.onminbuttonclicked): Increase volume to max.
      (Controller.prototype.onmaxbuttonclicked): Decrease volume to min.
      (Controller.prototype.onvolumesliderchange): Update the current volume.
      (Controller.prototype.oncaptionbuttonclicked): Show or hide the track menu.
      (Controller.prototype.onfullscreenbuttonclicked): Enter or exit fullscreen.
      (Controller.prototype.oncontrolschange): Show or hide the controls panel.
      (Controller.prototype.onseekbackmousedown): Start seeking and enable the seek timer.
      (Controller.prototype.onseekbackmouseup): Stop seeking and disable the seek timer.
      (Controller.prototype.onseekforwardmousedown): Start seekind and enable the seek timer.
      (Controller.prototype.onseekforwardmouseup): Stop seekind and disable the seek timer.
      
      Add action methods (which are mostly self explanatory):
      (Controller.prototype.updateDuration):
      (Controller.prototype.updatePlaying):
      (Controller.prototype.showControls):
      (Controller.prototype.hideControls):
      (Controller.prototype.removeControls):
      (Controller.prototype.addControls):
      (Controller.prototype.updateTime):
      (Controller.prototype.updateReadyState):
      (Controller.prototype.setStatusHidden):
      (Controller.prototype.updateThumbnailTrack):
      (Controller.prototype.updateCaptionButton):
      (Controller.prototype.updateCaptionContainer):
      (Controller.prototype.buildCaptionMenu):
      (Controller.prototype.captionItemSelected):
      (Controller.prototype.destroyCaptionMenu):
      (Controller.prototype.updateVolume):
      
      Add utility methods:
      (Controller.prototype.isFullScreen):
      (Controller.prototype.canPlay):
      (Controller.prototype.nextRate):
      (Controller.prototype.seekBackFaster):
      (Controller.prototype.seekForwardFaster):
      (Controller.prototype.formatTime):
      (Controller.prototype.trackHasThumbnails):
      
      Add the stylesheet for the javascript controls (which are mostly) copied from
      the (deleted) mediaControlsQuickTime.css and fullscreenQuickTime.css files:
      * Modules/mediacontrols/mediaControlsApple.css: Added.
      * css/fullscreenQuickTime.css: Removed.
      * css/mediaControlsQuickTime.css: Removed.
      
      Inject new stylesheets into UA sheets:
      * css/CSSDefaultStyleSheets.cpp:
      (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
      
      Use the new javascript controls rather than MediaControls:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::childShouldCreateRenderer): Use the javascript controls if available.
      (WebCore::HTMLMediaElement::updateTextTrackDisplay): Ditto.
      (WebCore::HTMLMediaElement::mediaControls): Ditto.
      (WebCore::HTMLMediaElement::hasMediaControls): Ditto.
      (WebCore::HTMLMediaElement::createMediaControls): Ditto.
      (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
      (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
      (WebCore::HTMLMediaElement::ensureIsolatedWorld): Create a new VM for the controls script.
      (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): Inject the media controls script into the VM.
      (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Inject the MediaControlsHost into the VM and call
              the scripts global factory function.
      * html/HTMLMediaElement.h:
      
      Remove most of the drawing code from RenderThemeMac and RenderThemeWin and
      add accessors for the new .js and .css file data:
      * rendering/RenderTheme.h:
      (WebCore::RenderTheme::mediaControlsStyleSheet): Empty virtual method.
      (WebCore::RenderTheme::mediaControlsScript): Ditto.
      * rendering/RenderThemeMac.h:
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::mediaControlsStyleSheet): Add accessor for mediaControlsApple.css.
      (WebCore::RenderThemeMac::mediaControlsScript): Add accessor for mediaControlsApple.js.
      (WebCore::RenderThemeMac::adjustSliderThumbSize): Remove the call to adjustMediaSliderThumbSize.
      * rendering/RenderThemeWin.cpp:
      (WebCore::RenderThemeWin::mediaControlsStyleSheet):
      (WebCore::RenderThemeWin::mediaControlsScript):
      * rendering/RenderThemeWin.h:
      
      Source/WebKit/mac:
      
      Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF:
      
      Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
      
      * wtf/FeatureDefines.h:
      
      LayoutTests:
      
      Rebaseline changed tests and add new (failing) tests to
      TestExpectations.
      
      * media/audio-delete-while-slider-thumb-clicked.html:
      * platform/mac/TestExpectations:
      * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.png:
      * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
      * platform/mac/fast/layers/video-layer-expected.png:
      * platform/mac/fast/layers/video-layer-expected.txt:
      * platform/mac/fullscreen/video-controls-override-expected.txt: Added.
      * platform/mac/media/audio-controls-rendering-expected.png:
      * platform/mac/media/audio-controls-rendering-expected.txt:
      * platform/mac/media/controls-after-reload-expected.png:
      * platform/mac/media/controls-after-reload-expected.txt:
      * platform/mac/media/controls-strict-expected.png:
      * platform/mac/media/controls-strict-expected.txt:
      * platform/mac/media/controls-styling-strict-expected.png:
      * platform/mac/media/controls-styling-strict-expected.txt:
      * platform/mac/media/controls-without-preload-expected.png:
      * platform/mac/media/controls-without-preload-expected.txt:
      * platform/mac/media/media-controls-clone-expected.png:
      * platform/mac/media/media-controls-clone-expected.txt:
      * webarchive/loading/video-in-webarchive-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8744b36
    • akling@apple.com's avatar
      Pass VM instead of ExecState to JSDateMath functions. · 38c79a21
      akling@apple.com authored
      <https://webkit.org/b/121997>
      
      Reviewed by Geoffrey Garen.
      
      The JSC date math functions only need the VM, so pass that from
      callers instead of the whole ExecState.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38c79a21
  4. 26 Sep, 2013 21 commits
    • akling@apple.com's avatar
      GetterSetter construction should take a VM instead of ExecState. · 8370dec1
      akling@apple.com authored
      <https://webkit.org/b/121993>
      
      Reviewed by Sam Weinig.
      
      Pass VM& instead of ExecState* to GetterSetter. Updated surrounding
      code at touched sites to cache VM in a local for fewer loads.
      
      JSC release binary size -= 4120 bytes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8370dec1
    • oliver@apple.com's avatar
      Make GCC happy · d158362f
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d158362f
    • oliver@apple.com's avatar
      2013-09-25 Oliver Hunt <oliver@apple.com> · f1ae6d11
      oliver@apple.com authored
              Implement prefixed-destructuring assignment
              https://bugs.webkit.org/show_bug.cgi?id=121930
      
              Reviewed by Mark Hahnenberg.
      
              Relanding with fix after rollout
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1ae6d11
    • msaboff@apple.com's avatar
      VirtualRegister should be a class · 62aa8b77
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121732
      
      Reviewed by Geoffrey Garen.
      
      This is a refactoring change.  Changed VirtualRegister from an enum to a class.
      Moved Operands::operandIsArgument(), operandToArgument(), argumentToOperand()
      and the similar functions for locals to VirtualRegister class.
      
      This is in preparation for changing the offset for the first local register from
      0 to -1.  This is needed since most native calling conventions have the architected
      frame pointer (e.g. %rbp for X86) point at the slot that stores the previous frame
      pointer.  Local values start below that address.
      
      * bytecode/CodeBlock.cpp:
      * bytecode/CodeBlock.h:
      * bytecode/Instruction.h:
      * bytecode/LazyOperandValueProfile.h:
      * bytecode/MethodOfGettingAValueProfile.cpp:
      * bytecode/Operands.h:
      * bytecode/UnlinkedCodeBlock.cpp:
      * bytecode/UnlinkedCodeBlock.h:
      * bytecode/ValueRecovery.h:
      * bytecode/VirtualRegister.h:
      * bytecompiler/BytecodeGenerator.cpp:
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/RegisterID.h:
      * debugger/DebuggerCallFrame.cpp:
      * dfg/DFGAbstractHeap.h:
      * dfg/DFGAbstractInterpreterInlines.h:
      * dfg/DFGArgumentPosition.h:
      * dfg/DFGArgumentsSimplificationPhase.cpp:
      * dfg/DFGByteCodeParser.cpp:
      * dfg/DFGCFGSimplificationPhase.cpp:
      * dfg/DFGCPSRethreadingPhase.cpp:
      * dfg/DFGCapabilities.cpp:
      * dfg/DFGConstantFoldingPhase.cpp:
      * dfg/DFGFlushLivenessAnalysisPhase.cpp:
      * dfg/DFGGraph.cpp:
      * dfg/DFGGraph.h:
      * dfg/DFGJITCode.cpp:
      * dfg/DFGNode.h:
      * dfg/DFGOSREntry.cpp:
      * dfg/DFGOSREntrypointCreationPhase.cpp:
      * dfg/DFGOSRExit.h:
      * dfg/DFGOSRExitCompiler32_64.cpp:
      * dfg/DFGOSRExitCompiler64.cpp:
      * dfg/DFGRegisterBank.h:
      * dfg/DFGScoreBoard.h:
      * dfg/DFGSpeculativeJIT.cpp:
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGSpeculativeJIT32_64.cpp:
      * dfg/DFGSpeculativeJIT64.cpp:
      * dfg/DFGValidate.cpp:
      * dfg/DFGValueRecoveryOverride.h:
      * dfg/DFGVariableAccessData.h:
      * dfg/DFGVariableEvent.h:
      * dfg/DFGVariableEventStream.cpp:
      * dfg/DFGVirtualRegisterAllocationPhase.cpp:
      * ftl/FTLExitArgumentForOperand.h:
      * ftl/FTLLink.cpp:
      * ftl/FTLLowerDFGToLLVM.cpp:
      * ftl/FTLOSREntry.cpp:
      * ftl/FTLOSRExit.cpp:
      * ftl/FTLOSRExit.h:
      * ftl/FTLOSRExitCompiler.cpp:
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      * jit/AssemblyHelpers.h:
      * jit/JIT.h:
      * jit/JITCall.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITInlines.h:
      * jit/JITOpcodes.cpp:
      * jit/JITOpcodes32_64.cpp:
      * jit/JITPropertyAccess32_64.cpp:
      * jit/JITStubs.cpp:
      * llint/LLIntSlowPaths.cpp:
      * profiler/ProfilerBytecodeSequence.cpp:
      * runtime/CommonSlowPaths.cpp:
      * runtime/JSActivation.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62aa8b77
    • andersca@apple.com's avatar
      Source/JavaScriptCore: Work around another MSVC bug. · fe416bb9
      andersca@apple.com authored
      * runtime/PrototypeMap.cpp:
      (JSC::PrototypeMap::emptyObjectStructureForPrototype):
      
      Source/WTF: Build fixes.
      
      Fix a paste-o.
      
      * wtf/StdLibExtras.h:
      (std::make_unique):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe416bb9
    • andersca@apple.com's avatar
      Attempt to fix the FTL build. · 631300c8
      andersca@apple.com authored
      * ftl/FTLAbstractHeap.cpp:
      (JSC::FTL::IndexedAbstractHeap::atSlow):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      631300c8
    • akling@apple.com's avatar
      Pass VM instead of ExecState to many finishCreation() functions. · 22558063
      akling@apple.com authored
      <https://webkit.org/b/121975>
      
      Reviewed by Sam Weinig.
      
      Reduce unnecessary loads by passing the VM to object creation
      functions that don't need the ExecState.
      
      There are tons of opportunities in this area, I'm just scratching
      the surface.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22558063
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r156464 and r156480. · c68e9807
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/156464
      http://trac.webkit.org/changeset/156480
      https://bugs.webkit.org/show_bug.cgi?id=121981
      
      Leaking too much and killi
      ng buildbot. (Requested by xenon on
      #webkit).
      
      Source/JavaScriptCore:
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedFunctionExecutable::paramString):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitExpressionInfo):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ForInNode::emitBytecode):
      (JSC::FuncExprNode::emitBytecode):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createFormalParameterList):
      (JSC::ASTBuilder::createForInLoop):
      (JSC::ASTBuilder::addVar):
      * parser/NodeConstructors.h:
      (JSC::CommaNode::CommaNode):
      (JSC::ParameterNode::ParameterNode):
      (JSC::ForInNode::ForInNode):
      * parser/Nodes.cpp:
      (JSC::FunctionParameters::create):
      (JSC::FunctionParameters::FunctionParameters):
      (JSC::FunctionParameters::~FunctionParameters):
      * parser/Nodes.h:
      (JSC::CommaNode::append):
      (JSC::ParameterNode::ident):
      (JSC::FunctionParameters::at):
      (JSC::FunctionParameters::identifiers):
      * parser/Parser.cpp:
      (JSC::::Parser):
      (JSC::::parseVarDeclaration):
      (JSC::::parseVarDeclarationList):
      (JSC::::parseForStatement):
      (JSC::::parseFormalParameters):
      (JSC::::parseAssignmentExpression):
      * parser/Parser.h:
      (JSC::Scope::declareParameter):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::createFormalParameterList):
      (JSC::SyntaxChecker::createForInLoop):
      (JSC::SyntaxChecker::operatorStackPop):
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      
      LayoutTests:
      
      * js/destructuring-assignment-expected.txt: Removed.
      * js/destructuring-assignment.html: Removed.
      * js/mozilla/strict/13.1-expected.txt:
      * js/mozilla/strict/regress-532254-expected.txt:
      * js/mozilla/strict/script-tests/13.1.js:
      * js/regress/destructuring-arguments-expected.txt: Removed.
      * js/regress/destructuring-arguments-length-expected.txt: Removed.
      * js/regress/destructuring-arguments-length.html: Removed.
      * js/regress/destructuring-arguments.html: Removed.
      * js/regress/destructuring-swap-expected.txt: Removed.
      * js/regress/destructuring-swap.html: Removed.
      * js/regress/script-tests/destructuring-arguments-length.js: Removed.
      * js/regress/script-tests/destructuring-arguments.js: Removed.
      * js/regress/script-tests/destructuring-swap.js: Removed.
      * js/script-tests/destructuring-assignment.js: Removed.
      * sputnik/Conformance/13_Function_Definition/S13_A5.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c68e9807
    • andersca@apple.com's avatar
      Try to fix the Windows build. · 84c504ef
      andersca@apple.com authored
      * jit/JITThunks.cpp:
      (JSC::JITThunks::hostFunctionStub):
      * jit/JITThunks.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84c504ef
    • andersca@apple.com's avatar
      Change a couple of HashMap value types from OwnPtr to std::unique_ptr · 2a6c489f
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121973
      
      Reviewed by Andreas Kling.
      
      Source/JavaScriptCore:
      
      * API/JSClassRef.cpp:
      (OpaqueJSClassContextData::OpaqueJSClassContextData):
      (OpaqueJSClass::contextData):
      * API/JSClassRef.h:
      * bytecode/SamplingTool.h:
      * ftl/FTLAbstractHeap.h:
      * parser/Parser.cpp:
      (JSC::::parseFunctionInfo):
      * parser/SourceProviderCache.cpp:
      (JSC::SourceProviderCache::add):
      * parser/SourceProviderCache.h:
      * parser/SourceProviderCacheItem.h:
      (JSC::SourceProviderCacheItem::create):
      * profiler/ProfilerCompilation.cpp:
      (JSC::Profiler::Compilation::executionCounterFor):
      (JSC::Profiler::Compilation::toJS):
      * profiler/ProfilerCompilation.h:
      * runtime/JSGlobalObject.h:
      
      Source/WTF:
      
      * wtf/RefPtrHashMap.h:
      Add a missing std::forward.
      
      * wtf/StdLibExtras.h:
      (std::make_unique):
      Add more overloads.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a6c489f
    • mark.lam@apple.com's avatar
      Move DFG inline caching logic into jit/. · 9df8b83f
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121749.
      
      Reviewed by Geoffrey Garen.
      
      Relanding http://trac.webkit.org/changeset/156235 after rebasing to latest
      revision and fixing build breakages on Windows.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CallLinkInfo.cpp:
      (JSC::CallLinkInfo::unlink):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::resetStubInternal):
      * bytecode/StructureStubInfo.h:
      * dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
      (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
      (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):
      * dfg/DFGJITCompiler.h:
      * dfg/DFGOSRExitCompiler.h:
      * dfg/DFGOperations.cpp:
      (JSC::DFG::operationPutByValInternal):
      * dfg/DFGOperations.h:
      (JSC::DFG::operationNewTypedArrayWithSizeForType):
      (JSC::DFG::operationNewTypedArrayWithOneArgumentForType):
      * dfg/DFGRegisterSet.h: Removed.
      * dfg/DFGRepatch.cpp: Removed.
      * dfg/DFGRepatch.h: Removed.
      * dfg/DFGScratchRegisterAllocator.h: Removed.
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
      (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
      (JSC::DFG::SpeculativeJIT::compare):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
      (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
      (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
      (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGThunks.cpp:
      * dfg/DFGThunks.h:
      * ftl/FTLIntrinsicRepository.h:
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
      * ftl/FTLOSRExitCompiler.h:
      * jit/AssemblyHelpers.h:
      (JSC::AssemblyHelpers::writeBarrier):
      * jit/JIT.cpp:
      (JSC::JIT::linkFor):
      (JSC::JIT::linkSlowCall):
      * jit/JITCall.cpp:
      (JSC::JIT::compileCallEvalSlowCase):
      (JSC::JIT::compileOpCallSlowCase):
      (JSC::JIT::privateCompileClosureCall):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileCallEvalSlowCase):
      (JSC::JIT::compileOpCallSlowCase):
      (JSC::JIT::privateCompileClosureCall):
      * jit/JITOperationWrappers.h: Copied from Source/JavaScriptCore/jit/JITOperationWrappers.h.
      * jit/JITOperations.cpp: Copied from Source/JavaScriptCore/jit/JITOperations.cpp.
      (JSC::getHostCallReturnValueWithExecState):
      * jit/JITOperations.h: Copied from Source/JavaScriptCore/jit/JITOperations.h.
      * jit/RegisterSet.h: Copied from Source/JavaScriptCore/jit/RegisterSet.h.
      * jit/Repatch.cpp: Copied from Source/JavaScriptCore/jit/Repatch.cpp.
      (JSC::tryBuildGetByIDList):
      * jit/Repatch.h: Copied from Source/JavaScriptCore/jit/Repatch.h.
      * jit/ScratchRegisterAllocator.h: Copied from Source/JavaScriptCore/jit/ScratchRegisterAllocator.h.
      * jit/ThunkGenerators.cpp:
      (JSC::oldStyleGenerateSlowCaseFor):
      (JSC::oldStyleLinkForGenerator):
      (JSC::oldStyleLinkCallGenerator):
      (JSC::oldStyleLinkConstructGenerator):
      (JSC::oldStyleLinkClosureCallGenerator):
      (JSC::oldStyleVirtualForGenerator):
      (JSC::oldStyleVirtualCallGenerator):
      (JSC::oldStyleVirtualConstructGenerator):
      (JSC::emitPointerValidation):
      (JSC::throwExceptionFromCallSlowPathGenerator):
      (JSC::slowPathFor):
      (JSC::linkForThunkGenerator):
      (JSC::linkCallThunkGenerator):
      (JSC::linkConstructThunkGenerator):
      (JSC::linkClosureCallThunkGenerator):
      (JSC::virtualForThunkGenerator):
      (JSC::virtualCallThunkGenerator):
      (JSC::virtualConstructThunkGenerator):
      * jit/ThunkGenerators.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9df8b83f
    • andersca@apple.com's avatar
      Remove PassWeak.h · cb9e849d
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121971
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/PassWeak.h: Removed.
      * heap/WeakInlines.h:
      
      Source/WebCore:
      
      * ForwardingHeaders/heap/PassWeak.h: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb9e849d
    • andersca@apple.com's avatar
      Stop using PassWeak · c21b1344
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121968
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore:
      
      * heap/Weak.h:
      Remove all knowledge of PassWeak.
      
      (JSC::Weak::Weak):
      These constructors don't need to be explicit.
      
      * heap/WeakInlines.h:
      (JSC::weakAdd):
      Change Value to be an rvalue reference and use std::forward.
      
      * jit/JITThunks.cpp:
      (JSC::JITThunks::hostFunctionStub):
      Remove PassWeak.
      
      * runtime/RegExpCache.cpp:
      (JSC::RegExpCache::lookupOrCreate):
      Use Weak instead of PassWeak.
      
      * runtime/SimpleTypedArrayController.cpp:
      Change add and set to take Weak by value and std::move into place.
      
      * runtime/WeakGCMap.h:
      (JSC::WeakGCMap::get):
      (JSC::WeakGCMap::set):
      (JSC::WeakGCMap::add):
      
      Source/WebCore:
      
      Update for JavaScriptCore changes.
      
      * bindings/js/JSDOMBinding.h:
      (WebCore::setInlineCachedWrapper):
      (WebCore::cacheWrapper):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::JSEventListener):
      * bindings/js/JSEventListener.h:
      (WebCore::JSEventListener::setWrapper):
      (WebCore::JSEventListener::jsFunction):
      * bindings/js/JSMutationCallback.cpp:
      (WebCore::JSMutationCallback::JSMutationCallback):
      * bindings/js/JSNodeFilterCondition.cpp:
      (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
      * bindings/js/ScriptWrappableInlines.h:
      (WebCore::ScriptWrappable::setWrapper):
      * bindings/js/WebCoreTypedArrayController.cpp:
      * bridge/jsc/BridgeJSC.cpp:
      (JSC::Bindings::Instance::createRuntimeObject):
      * bridge/runtime_root.cpp:
      (JSC::Bindings::RootObject::addRuntimeObject):
      
      Source/WebKit2:
      
      Update for JavaScriptCore changes.
      
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c21b1344
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r156474. · bf43ed96
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/156474
      https://bugs.webkit.org/show_bug.cgi?id=121966
      
      Broke the builds. (Requested by xenon on #webkit).
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::registerName):
      (JSC::CodeBlock::dumpBytecode):
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::createActivation):
      (JSC::CodeBlock::nameForRegister):
      * bytecode/CodeBlock.h:
      (JSC::unmodifiedArgumentsRegister):
      (JSC::CodeBlock::isKnownNotImmediate):
      (JSC::CodeBlock::setThisRegister):
      (JSC::CodeBlock::thisRegister):
      (JSC::CodeBlock::setArgumentsRegister):
      (JSC::CodeBlock::argumentsRegister):
      (JSC::CodeBlock::uncheckedArgumentsRegister):
      (JSC::CodeBlock::setActivationRegister):
      (JSC::CodeBlock::activationRegister):
      (JSC::CodeBlock::uncheckedActivationRegister):
      (JSC::CodeBlock::usesArguments):
      (JSC::CodeBlock::isCaptured):
      * bytecode/Instruction.h:
      * bytecode/LazyOperandValueProfile.h:
      (JSC::LazyOperandValueProfileKey::LazyOperandValueProfileKey):
      (JSC::LazyOperandValueProfileKey::operator!):
      (JSC::LazyOperandValueProfileKey::hash):
      (JSC::LazyOperandValueProfileKey::operand):
      (JSC::LazyOperandValueProfileKey::isHashTableDeletedValue):
      (JSC::LazyOperandValueProfile::LazyOperandValueProfile):
      * bytecode/MethodOfGettingAValueProfile.cpp:
      (JSC::MethodOfGettingAValueProfile::fromLazyOperand):
      (JSC::MethodOfGettingAValueProfile::getSpecFailBucket):
      * bytecode/Operands.h:
      (JSC::localToOperand):
      (JSC::operandIsLocal):
      (JSC::operandToLocal):
      (JSC::operandIsArgument):
      (JSC::operandToArgument):
      (JSC::argumentToOperand):
      (JSC::Operands::operand):
      (JSC::Operands::hasOperand):
      (JSC::Operands::setOperand):
      (JSC::Operands::operandForIndex):
      (JSC::Operands::setOperandFirstTime):
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
      * bytecode/UnlinkedCodeBlock.h:
      (JSC::UnlinkedCodeBlock::setThisRegister):
      (JSC::UnlinkedCodeBlock::setActivationRegister):
      (JSC::UnlinkedCodeBlock::setArgumentsRegister):
      (JSC::UnlinkedCodeBlock::usesArguments):
      (JSC::UnlinkedCodeBlock::argumentsRegister):
      (JSC::UnlinkedCodeBlock::usesGlobalObject):
      (JSC::UnlinkedCodeBlock::setGlobalObjectRegister):
      (JSC::UnlinkedCodeBlock::globalObjectRegister):
      (JSC::UnlinkedCodeBlock::thisRegister):
      (JSC::UnlinkedCodeBlock::activationRegister):
      * bytecode/ValueRecovery.h:
      (JSC::ValueRecovery::displacedInJSStack):
      (JSC::ValueRecovery::virtualRegister):
      (JSC::ValueRecovery::dumpInContext):
      * bytecode/VirtualRegister.h:
      (WTF::printInternal):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::generate):
      (JSC::BytecodeGenerator::addVar):
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
      (JSC::BytecodeGenerator::newRegister):
      (JSC::BytecodeGenerator::emitLoadGlobalObject):
      (JSC::BytecodeGenerator::emitGetArgumentsLength):
      (JSC::BytecodeGenerator::emitGetArgumentByVal):
      (JSC::BytecodeGenerator::createArgumentsIfNecessary):
      (JSC::BytecodeGenerator::emitReturn):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::registerFor):
      * bytecompiler/RegisterID.h:
      (JSC::RegisterID::RegisterID):
      (JSC::RegisterID::setIndex):
      (JSC::RegisterID::index):
      * debugger/DebuggerCallFrame.cpp:
      (JSC::DebuggerCallFrame::thisObject):
      * dfg/DFGAbstractHeap.h:
      (JSC::DFG::AbstractHeap::Payload::Payload):
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      (JSC::DFG::::clobberCapturedVars):
      * dfg/DFGArgumentPosition.h:
      (JSC::DFG::ArgumentPosition::dump):
      * dfg/DFGArgumentsSimplificationPhase.cpp:
      (JSC::DFG::ArgumentsSimplificationPhase::run):
      (JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):
      (JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::newVariableAccessData):
      (JSC::DFG::ByteCodeParser::getDirect):
      (JSC::DFG::ByteCodeParser::get):
      (JSC::DFG::ByteCodeParser::setDirect):
      (JSC::DFG::ByteCodeParser::set):
      (JSC::DFG::ByteCodeParser::getLocal):
      (JSC::DFG::ByteCodeParser::setLocal):
      (JSC::DFG::ByteCodeParser::getArgument):
      (JSC::DFG::ByteCodeParser::setArgument):
      (JSC::DFG::ByteCodeParser::findArgumentPositionForLocal):
      (JSC::DFG::ByteCodeParser::findArgumentPosition):
      (JSC::DFG::ByteCodeParser::flush):
      (JSC::DFG::ByteCodeParser::flushDirect):
      (JSC::DFG::ByteCodeParser::getToInt32):
      (JSC::DFG::ByteCodeParser::getThis):
      (JSC::DFG::ByteCodeParser::addCall):
      (JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand):
      (JSC::DFG::ByteCodeParser::handleCall):
      (JSC::DFG::ByteCodeParser::emitFunctionChecks):
      (JSC::DFG::ByteCodeParser::emitArgumentPhantoms):
      (JSC::DFG::ByteCodeParser::handleInlining):
      (JSC::DFG::ByteCodeParser::handleMinMax):
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      (JSC::DFG::ByteCodeParser::handleTypedArrayConstructor):
      (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
      (JSC::DFG::ByteCodeParser::handleGetByOffset):
      (JSC::DFG::ByteCodeParser::handleGetById):
      (JSC::DFG::ByteCodeParser::parseBlock):
      (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
      (JSC::DFG::ByteCodeParser::parse):
      * dfg/DFGCFGSimplificationPhase.cpp:
      * dfg/DFGCPSRethreadingPhase.cpp:
      (JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocal):
      (JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocal):
      (JSC::DFG::CPSRethreadingPhase::canonicalizeSetArgument):
      * dfg/DFGCapabilities.cpp:
      (JSC::DFG::capabilityLevel):
      * dfg/DFGConstantFoldingPhase.cpp:
      (JSC::DFG::ConstantFoldingPhase::isCapturedAtOrAfter):
      * dfg/DFGFlushLivenessAnalysisPhase.cpp:
      (JSC::DFG::FlushLivenessAnalysisPhase::setForNode):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::argumentsRegisterFor):
      (JSC::DFG::Graph::uncheckedArgumentsRegisterFor):
      (JSC::DFG::Graph::uncheckedActivationRegisterFor):
      (JSC::DFG::Graph::valueProfileFor):
      * dfg/DFGJITCode.cpp:
      (JSC::DFG::JITCode::reconstruct):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::Node):
      (JSC::DFG::Node::convertToGetLocalUnlinked):
      (JSC::DFG::Node::hasVirtualRegister):
      (JSC::DFG::Node::virtualRegister):
      (JSC::DFG::Node::setVirtualRegister):
      * dfg/DFGOSREntry.cpp:
      (JSC::DFG::prepareOSREntry):
      * dfg/DFGOSREntrypointCreationPhase.cpp:
      (JSC::DFG::OSREntrypointCreationPhase::run):
      * dfg/DFGOSRExit.h:
      * dfg/DFGOSRExitCompiler32_64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGOSRExitCompiler64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGRegisterBank.h:
      (JSC::DFG::RegisterBank::tryAllocate):
      (JSC::DFG::RegisterBank::allocateSpecific):
      (JSC::DFG::RegisterBank::retain):
      (JSC::DFG::RegisterBank::isInUse):
      (JSC::DFG::RegisterBank::dump):
      (JSC::DFG::RegisterBank::releaseAtIndex):
      (JSC::DFG::RegisterBank::allocateInternal):
      (JSC::DFG::RegisterBank::MapEntry::MapEntry):
      * dfg/DFGScoreBoard.h:
      (JSC::DFG::ScoreBoard::allocate):
      (JSC::DFG::ScoreBoard::use):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
      (JSC::DFG::SpeculativeJIT::checkConsistency):
      (JSC::DFG::SpeculativeJIT::compileMovHint):
      (JSC::DFG::SpeculativeJIT::compileInlineStart):
      (JSC::DFG::SpeculativeJIT::compileCurrentBlock):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::allocate):
      (JSC::DFG::SpeculativeJIT::fprAllocate):
      (JSC::DFG::SpeculativeJIT::silentSpillAllRegistersImpl):
      (JSC::DFG::SpeculativeJIT::flushRegisters):
      (JSC::DFG::SpeculativeJIT::isFlushed):
      (JSC::DFG::SpeculativeJIT::argumentSlot):
      (JSC::DFG::SpeculativeJIT::argumentTagSlot):
      (JSC::DFG::SpeculativeJIT::argumentPayloadSlot):
      (JSC::DFG::SpeculativeJIT::valueSourceForOperand):
      (JSC::DFG::SpeculativeJIT::setNodeForOperand):
      (JSC::DFG::SpeculativeJIT::valueSourceReferenceForOperand):
      (JSC::DFG::SpeculativeJIT::recordSetLocal):
      (JSC::DFG::SpeculativeJIT::generationInfoFromVirtualRegister):
      (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGValidate.cpp:
      (JSC::DFG::Validate::validate):
      (JSC::DFG::Validate::validateCPS):
      (JSC::DFG::Validate::checkOperand):
      (JSC::DFG::Validate::reportValidationContext):
      * dfg/DFGValueRecoveryOverride.h:
      (JSC::DFG::ValueRecoveryOverride::ValueRecoveryOverride):
      * dfg/DFGVariableAccessData.h:
      (JSC::DFG::VariableAccessData::operand):
      (JSC::DFG::VariableAccessData::shouldUseDoubleFormatAccordingToVote):
      (JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat):
      (JSC::DFG::VariableAccessData::flushFormat):
      * dfg/DFGVariableEvent.h:
      (JSC::DFG::VariableEvent::spill):
      (JSC::DFG::VariableEvent::setLocal):
      * dfg/DFGVariableEventStream.cpp:
      (JSC::DFG::VariableEventStream::reconstruct):
      * dfg/DFGVirtualRegisterAllocationPhase.cpp:
      (JSC::DFG::VirtualRegisterAllocationPhase::run):
      * ftl/FTLExitArgumentForOperand.h:
      (JSC::FTL::ExitArgumentForOperand::ExitArgumentForOperand):
      (JSC::FTL::ExitArgumentForOperand::operand):
      * ftl/FTLLink.cpp:
      (JSC::FTL::link):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM):
      (JSC::FTL::LowerDFGToLLVM::compileGetArgument):
      (JSC::FTL::LowerDFGToLLVM::compileExtractOSREntryLocal):
      (JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
      (JSC::FTL::LowerDFGToLLVM::appendOSRExit):
      (JSC::FTL::LowerDFGToLLVM::observeMovHint):
      (JSC::FTL::LowerDFGToLLVM::addressFor):
      (JSC::FTL::LowerDFGToLLVM::payloadFor):
      (JSC::FTL::LowerDFGToLLVM::tagFor):
      * ftl/FTLOSREntry.cpp:
      (JSC::FTL::prepareOSREntry):
      * ftl/FTLOSRExit.cpp:
      (JSC::FTL::OSRExit::convertToForward):
      * ftl/FTLOSRExit.h:
      * ftl/FTLOSRExitCompiler.cpp:
      (JSC::FTL::compileStub):
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::dumpRegisters):
      (JSC::unwindCallFrame):
      (JSC::Interpreter::unwind):
      * jit/AssemblyHelpers.h:
      (JSC::AssemblyHelpers::addressFor):
      (JSC::AssemblyHelpers::tagFor):
      (JSC::AssemblyHelpers::payloadFor):
      (JSC::AssemblyHelpers::argumentsRegisterFor):
      * jit/JIT.h:
      * jit/JITCall.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITInlines.h:
      (JSC::JIT::emitGetVirtualRegister):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_tear_off_arguments):
      (JSC::JIT::emit_op_get_pnames):
      (JSC::JIT::emit_op_enter):
      (JSC::JIT::emit_op_create_arguments):
      (JSC::JIT::emitSlow_op_get_argument_by_val):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_enter):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * profiler/ProfilerBytecodeSequence.cpp:
      (JSC::Profiler::BytecodeSequence::BytecodeSequence):
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/JSActivation.cpp:
      (JSC::JSActivation::argumentsGetter):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf43ed96
    • oliver@apple.com's avatar
      Attempt to fix MSVC build · bfab3436
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bfab3436
    • commit-queue@webkit.org's avatar
      [sh4] JSValue* exception is unused since r70703 in JITStackFrame. · 3ce68347
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=121962
      
      This is a cosmetic change, but it could avoid people reading sh4 part to
      waste time to understand why there is a JSValue* here.
      
      Patch by Julien Brianceau <jbriance@cisco.com> on 2013-09-26
      Reviewed by Darin Adler.
      
      * jit/JITStubs.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ce68347
    • andersca@apple.com's avatar
      WeakGCMap should not inherit from HashMap · e4b2dd9c
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121964
      
      Reviewed by Geoffrey Garen.
      
      Add the HashMap as a member variable instead and implement the missing member functions.
      
      * runtime/WeakGCMap.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4b2dd9c
    • msaboff@apple.com's avatar
      VirtualRegister should be a class · 1796ad0f
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121732
      
      Reviewed by Geoffrey Garen.
      
      This is a refactoring change.  Changed VirtualRegister from an enum to a class.
      Moved Operands::operandIsArgument(), operandToArgument(), argumentToOperand()
      and the similar functions for locals to VirtualRegister class.
      
      This is in preparation for changing the offset for the first local register from
      0 to -1.  This is needed since most native calling conventions have the architected
      frame pointer (e.g. %rbp for X86) point at the slot that stores the previous frame
      pointer.  Local values start below that address.
      
      * bytecode/CodeBlock.cpp:
      * bytecode/CodeBlock.h:
      * bytecode/Instruction.h:
      * bytecode/LazyOperandValueProfile.h:
      * bytecode/MethodOfGettingAValueProfile.cpp:
      * bytecode/Operands.h:
      * bytecode/UnlinkedCodeBlock.cpp:
      * bytecode/UnlinkedCodeBlock.h:
      * bytecode/ValueRecovery.h:
      * bytecode/VirtualRegister.h:
      * bytecompiler/BytecodeGenerator.cpp:
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/RegisterID.h:
      * debugger/DebuggerCallFrame.cpp:
      * dfg/DFGAbstractHeap.h:
      * dfg/DFGAbstractInterpreterInlines.h:
      * dfg/DFGArgumentPosition.h:
      * dfg/DFGArgumentsSimplificationPhase.cpp:
      * dfg/DFGByteCodeParser.cpp:
      * dfg/DFGCFGSimplificationPhase.cpp:
      * dfg/DFGCPSRethreadingPhase.cpp:
      * dfg/DFGCapabilities.cpp:
      * dfg/DFGConstantFoldingPhase.cpp:
      * dfg/DFGFlushLivenessAnalysisPhase.cpp:
      * dfg/DFGGraph.cpp:
      * dfg/DFGGraph.h:
      * dfg/DFGJITCode.cpp:
      * dfg/DFGNode.h:
      * dfg/DFGOSREntry.cpp:
      * dfg/DFGOSREntrypointCreationPhase.cpp:
      * dfg/DFGOSRExit.h:
      * dfg/DFGOSRExitCompiler32_64.cpp:
      * dfg/DFGOSRExitCompiler64.cpp:
      * dfg/DFGRegisterBank.h:
      * dfg/DFGScoreBoard.h:
      * dfg/DFGSpeculativeJIT.cpp:
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGSpeculativeJIT64.cpp:
      * dfg/DFGValidate.cpp:
      * dfg/DFGValueRecoveryOverride.h:
      * dfg/DFGVariableAccessData.h:
      * dfg/DFGVariableEvent.h:
      * dfg/DFGVariableEventStream.cpp:
      * dfg/DFGVirtualRegisterAllocationPhase.cpp:
      * ftl/FTLExitArgumentForOperand.h:
      * ftl/FTLLink.cpp:
      * ftl/FTLLowerDFGToLLVM.cpp:
      * ftl/FTLOSREntry.cpp:
      * ftl/FTLOSRExit.cpp:
      * ftl/FTLOSRExit.h:
      * ftl/FTLOSRExitCompiler.cpp:
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      * jit/AssemblyHelpers.h:
      * jit/JIT.h:
      * jit/JITCall.cpp:
      * jit/JITInlines.h:
      * jit/JITOpcodes.cpp:
      * jit/JITOpcodes32_64.cpp:
      * jit/JITStubs.cpp:
      * llint/LLIntSlowPaths.cpp:
      * profiler/ProfilerBytecodeSequence.cpp:
      * runtime/CommonSlowPaths.cpp:
      * runtime/JSActivation.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1796ad0f
    • andersca@apple.com's avatar
      Weak should have a move constructor and move assignment operator · b366a0c2
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121963
      
      Reviewed by Oliver Hunt.
      
      This is the first step towards getting rid of PassWeak.
      
      * API/JSClassRef.cpp:
      (OpaqueJSClass::prototype):
      * heap/Weak.h:
      * heap/WeakInlines.h:
      (JSC::::Weak):
      (JSC::::leakImpl):
      * runtime/SimpleTypedArrayController.cpp:
      (JSC::SimpleTypedArrayController::toJS):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b366a0c2
    • mhahnenberg@apple.com's avatar
      op_to_this shouldn't use value profiling · c5684714
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121920
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Currently it's the only opcode that uses m_singletonValue, which is unnecessary. Our current plan is
      to remove m_singletonValue so that GenGC can have a simpler story for handling CodeBlocks/FunctionExecutables
      during nursery collections.
      
      This patch adds an inline cache for the Structure of to_this so it no longer depends on the ValueProfile's
      m_singletonValue. Since nobody uses m_singletonValue now, this patch also removes m_singletonValue from
      ValueProfile.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::finalizeUnconditionally):
      (JSC::CodeBlock::stronglyVisitStrongReferences):
      (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
      (JSC::CodeBlock::updateAllValueProfilePredictions):
      (JSC::CodeBlock::updateAllPredictions):
      (JSC::CodeBlock::shouldOptimizeNow):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::updateAllValueProfilePredictions):
      (JSC::CodeBlock::updateAllPredictions):
      * bytecode/LazyOperandValueProfile.cpp:
      (JSC::CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions):
      * bytecode/LazyOperandValueProfile.h:
      * bytecode/ValueProfile.h:
      (JSC::ValueProfileBase::ValueProfileBase):
      (JSC::ValueProfileBase::briefDescription):
      (JSC::ValueProfileBase::dump):
      (JSC::ValueProfileBase::computeUpdatedPrediction):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_to_this):
      (JSC::JIT::emitSlow_op_to_this):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_to_this):
      (JSC::JIT::emitSlow_op_to_this):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      
      LayoutTests:
      
      Updated a couple tests that waited for two DFG compiles, but with this patch we
      don't do two compiles any more, so we don't want to wait forever.
      
      * js/script-tests/dfg-convert-this-polymorphic-object-then-exit-on-other.js:
      * js/script-tests/dfg-convert-this-polymorphic-object-then-exit-on-string.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5684714
    • oliver@apple.com's avatar
      Implement prefixed-destructuring assignment · aeca5dcd
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121930
      
      Reviewed by Mark Hahnenberg.
      
      Source/JavaScriptCore:
      
      This is mostly simple - the semantics of deconstruction are already
      present in the language, so most of the complexity (if you call it
      that) is addition of new AST nodes, and parsing the syntax.
      
      In order to get correct semantics for the parameter lists, FunctionParameters
      now needs to store refcounted references to the parameter patterns.
      There's also a little work to ensure that variable creation and assignment
      occurs in the correct order while the BytecodeGenerator is being constructed.
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedFunctionExecutable::paramString):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitExpressionInfo):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ForInNode::emitBytecode):
      (JSC::DeconstructingAssignmentNode::emitBytecode):
      (JSC::DeconstructionPatternNode::~DeconstructionPatternNode):
      (JSC::ArrayPatternNode::emitBytecode):
      (JSC::ArrayPatternNode::emitDirectBinding):
      (JSC::ArrayPatternNode::toString):
      (JSC::ArrayPatternNode::collectBoundIdentifiers):
      (JSC::ObjectPatternNode::toString):
      (JSC::ObjectPatternNode::emitBytecode):
      (JSC::ObjectPatternNode::collectBoundIdentifiers):
      (JSC::BindingNode::emitBytecode):
      (JSC::BindingNode::toString):
      (JSC::BindingNode::collectBoundIdentifiers):
      * parser/ASTBuilder.h:
      (JSC::ASTBuilder::createFormalParameterList):
      (JSC::ASTBuilder::createForInLoop):
      (JSC::ASTBuilder::addVar):
      (JSC::ASTBuilder::createDeconstructingAssignment):
      (JSC::ASTBuilder::createArrayPattern):
      (JSC::ASTBuilder::appendArrayPatternSkipEntry):
      (JSC::ASTBuilder::appendArrayPatternEntry):
      (JSC::ASTBuilder::createObjectPattern):
      (JSC::ASTBuilder::appendObjectPatternEntry):
      (JSC::ASTBuilder::createBindingLocation):
      * parser/NodeConstructors.h:
      (JSC::CommaNode::CommaNode):
      (JSC::ParameterNode::ParameterNode):
      (JSC::ForInNode::ForInNode):
      (JSC::DeconstructionPatternNode::DeconstructionPatternNode):
      (JSC::ArrayPatternNode::ArrayPatternNode):
      (JSC::ArrayPatternNode::create):
      (JSC::ObjectPatternNode::ObjectPatternNode):
      (JSC::ObjectPatternNode::create):
      (JSC::BindingNode::create):
      (JSC::BindingNode::BindingNode):
      (JSC::DeconstructingAssignmentNode::DeconstructingAssignmentNode):
      * parser/Nodes.cpp:
      (JSC::FunctionParameters::create):
      (JSC::FunctionParameters::FunctionParameters):
      (JSC::FunctionParameters::~FunctionParameters):
      * parser/Nodes.h:
      (JSC::ExpressionNode::isDeconstructionNode):
      (JSC::ArrayNode::elements):
      (JSC::CommaNode::append):
      (JSC::ParameterNode::pattern):
      (JSC::FunctionParameters::at):
      (JSC::FunctionParameters::patterns):
      (JSC::DeconstructionPatternNode::isBindingNode):
      (JSC::DeconstructionPatternNode::emitDirectBinding):
      (JSC::ArrayPatternNode::appendIndex):
      (JSC::ObjectPatternNode::appendEntry):
      (JSC::ObjectPatternNode::Entry::Entry):
      (JSC::BindingNode::boundProperty):
      (JSC::BindingNode::isBindingNode):
      (JSC::DeconstructingAssignmentNode::bindings):
      (JSC::DeconstructingAssignmentNode::isLocation):
      (JSC::DeconstructingAssignmentNode::isDeconstructionNode):
      * parser/Parser.cpp:
      (JSC::::Parser):
      (JSC::::parseVarDeclaration):
      (JSC::::parseVarDeclarationList):
      (JSC::::createBindingPattern):
      (JSC::::parseDeconstructionPattern):
      (JSC::::parseForStatement):
      (JSC::::parseFormalParameters):
      (JSC::::parseAssignmentExpression):
      * parser/Parser.h:
      (JSC::Scope::declareBoundParameter):
      (JSC::Parser::declareBoundParameter):
      * parser/SyntaxChecker.h:
      (JSC::SyntaxChecker::createFormalParameterList):
      (JSC::SyntaxChecker::addVar):
      (JSC::SyntaxChecker::operatorStackPop):
      * runtime/JSONObject.cpp:
      (JSC::escapeStringToBuilder):
      * runtime/JSONObject.h:
      
      LayoutTests:
      
      Add enw tests, and update old ones.
      
      * js/destructuring-assignment-expected.txt: Added.
      * js/destructuring-assignment.html: Added.
      * js/mozilla/strict/13.1-expected.txt:
      * js/mozilla/strict/regress-532254-expected.txt:
      * js/mozilla/strict/script-tests/13.1.js:
      * js/regress/destructuring-arguments-expected.txt: Added.
      * js/regress/destructuring-arguments-length-expected.txt: Added.
      * js/regress/destructuring-arguments-length.html: Added.
      * js/regress/destructuring-arguments.html: Added.
      * js/regress/destructuring-swap-expected.txt: Added.
      * js/regress/destructuring-swap.html: Added.
      * js/regress/script-tests/destructuring-arguments-length.js: Added.
      (foo):
      * js/regress/script-tests/destructuring-arguments.js: Added.
      (foo):
      * js/regress/script-tests/destructuring-swap.js: Added.
      (foo):
      * js/script-tests/destructuring-assignment.js: Added.
      (testDestructuring):
      (testDeconstructArgs):
      (testDeconstructArgLength):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeca5dcd
  5. 25 Sep, 2013 6 commits
  6. 24 Sep, 2013 2 commits
    • mhahnenberg@apple.com's avatar
      op_get_callee shouldn't use value profiling · 5f2e70b5
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121821
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore: 
      
      Currently it's one of the two opcodes that uses m_singletonValue, which is unnecessary. 
      Our current plan is to remove m_singletonValue so that GenGC can have a simpler story 
      for handling CodeBlocks/FunctionExecutables during nursery collections.
      
      Instead of using a ValueProfile op_get_callee now has a simple inline cache of the most 
      recent JSFunction that we saw.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::finalizeUnconditionally):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitCreateThis):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileSlowCases):
      * jit/JIT.h:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_get_callee):
      (JSC::JIT::emitSlow_op_get_callee):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_get_callee):
      (JSC::JIT::emitSlow_op_get_callee):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/CommonSlowPaths.h:
      
      LayoutTests: 
      
      Added two tests to make sure we didn't regress the performance of op_get_callee.
      
      * js/regress/get_callee_monomorphic-expected.txt: Added.
      * js/regress/get_callee_monomorphic.html: Added.
      * js/regress/get_callee_polymorphic-expected.txt: Added.
      * js/regress/get_callee_polymorphic.html: Added.
      * js/regress/script-tests/get_callee_monomorphic.js: Added.
      * js/regress/script-tests/get_callee_polymorphic.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5f2e70b5
    • mark.lam@apple.com's avatar
      Change JSC debug hooks to pass a CallFrame* instead of a DebuggerCallFrame. · e72693dc
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121867.
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      1. Removed the need for passing the line and column info to the debug hook
         callbacks. We now get the line and column info from the CallFrame.
      
      2. Simplify BytecodeGenerator::emitDebugHook() to only take 1 line number
         argument. The caller can determine whether to pass in the first or last
         line number of the block of source code as appropriate.
         Note: we still need to pass in the line and column info to emitDebugHook()
         because it uses this info to emit expression info which is later used by
         the StackVisitor to determine the line and column info for its "pc".
      
      3. Pass the exceptionValue explicitly to the exception() debug hook
         callback. It should not be embedded in the CallFrame / DebuggerCallFrame.
      
      4. Change the op_debug opcode size to 2 (from 5) since we've removing 3 arg
         values. Update the LLINT and JIT code to handle this.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dumpBytecode):
      (JSC::CodeBlock::CodeBlock):
      * bytecode/Opcode.h:
      (JSC::padOpcodeName):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::emitDebugHook):
      * bytecompiler/BytecodeGenerator.h:
      * bytecompiler/NodesCodegen.cpp:
      (JSC::ConstStatementNode::emitBytecode):
      (JSC::EmptyStatementNode::emitBytecode):
      (JSC::DebuggerStatementNode::emitBytecode):
      (JSC::ExprStatementNode::emitBytecode):
      (JSC::VarStatementNode::emitBytecode):
      (JSC::IfElseNode::emitBytecode):
      (JSC::DoWhileNode::emitBytecode):
      (JSC::WhileNode::emitBytecode):
      (JSC::ForNode::emitBytecode):
      (JSC::ForInNode::emitBytecode):
      (JSC::ContinueNode::emitBytecode):
      (JSC::BreakNode::emitBytecode):
      (JSC::ReturnNode::emitBytecode):
      (JSC::WithNode::emitBytecode):
      (JSC::SwitchNode::emitBytecode):
      (JSC::LabelNode::emitBytecode):
      (JSC::ThrowNode::emitBytecode):
      (JSC::TryNode::emitBytecode):
      (JSC::ProgramNode::emitBytecode):
      (JSC::EvalNode::emitBytecode):
      (JSC::FunctionBodyNode::emitBytecode):
      * debugger/Debugger.h:
      * debugger/DebuggerCallFrame.cpp:
      (JSC::LineAndColumnFunctor::operator()):
      (JSC::LineAndColumnFunctor::line):
      (JSC::LineAndColumnFunctor::column):
      (JSC::DebuggerCallFrame::DebuggerCallFrame):
      (JSC::DebuggerCallFrame::clear):
      * debugger/DebuggerCallFrame.h:
      (JSC::DebuggerCallFrame::line):
      (JSC::DebuggerCallFrame::column):
      * interpreter/Interpreter.cpp:
      (JSC::unwindCallFrame):
      (JSC::UnwindFunctor::UnwindFunctor):
      (JSC::UnwindFunctor::operator()):
      (JSC::Interpreter::unwind):
      (JSC::Interpreter::debug):
      * interpreter/Interpreter.h:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_debug):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_debug):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * llint/LowLevelInterpreter.asm:
      
      Source/WebCore: 
      
      No new tests.
      
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::createCallFrame):
      (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
      (WebCore::ScriptDebugServer::callEvent):
      (WebCore::ScriptDebugServer::atStatement):
      (WebCore::ScriptDebugServer::returnEvent):
      (WebCore::ScriptDebugServer::exception):
      (WebCore::ScriptDebugServer::willExecuteProgram):
      (WebCore::ScriptDebugServer::didExecuteProgram):
      (WebCore::ScriptDebugServer::didReachBreakpoint):
      * bindings/js/ScriptDebugServer.h:
      * bindings/js/WorkerScriptDebugServer.cpp:
      (WebCore::WorkerScriptDebugServer::willExecuteProgram):
      * bindings/js/WorkerScriptDebugServer.h:
      
      Source/WebKit/mac: 
      
      * WebView/WebScriptDebugDelegate.mm:
      (-[WebScriptCallFrame _initWithGlobalObject:debuggerCallFrame:exceptionValue:JSC::]):
      (-[WebScriptCallFrame exception]):
      * WebView/WebScriptDebugger.h:
      * WebView/WebScriptDebugger.mm:
      (WebScriptDebugger::exception):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e72693dc