1. 20 Jan, 2014 1 commit
    • mark.lam@apple.com's avatar
      Removing CodeBlock::opDebugBytecodeOffsetForLineAndColumn() and friends. · 26a6692f
      mark.lam@apple.com authored
      <https://webkit.org/b/127321>
      
      Reviewed by Geoffrey Garen.
      
      We're changing plans and will be going with CodeBlock level breakpoints
      instead of bytecode level breakpoints. As a result, we no longer need
      the services of CodeBlock::opDebugBytecodeOffsetForLineAndColumn() (and
      friends). This patch will remove that unused code.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.cpp:
      * bytecode/CodeBlock.h:
      * bytecode/LineColumnInfo.h: Removed.
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo):
      * bytecode/UnlinkedCodeBlock.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26a6692f
  2. 18 Jan, 2014 1 commit
    • mark.lam@apple.com's avatar
      Adding UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn().. · 440584f1
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=127127.
      
      Reviewed by Geoffrey Garen.
      
      In order to implement bytecode level breakpoints, we need a mechanism
      for computing the best fit op_debug bytecode offset for any valid given
      line and column value in the source. The "best fit" op_debug bytecode
      in this case is defined below in the comment for
      UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn().
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::opDebugBytecodeOffsetForLineAndColumn):
      - Convert the line and column to unlinked line and column values and
        pass them to UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn()
        to do the real work.
      
      * bytecode/CodeBlock.h:
      * bytecode/LineColumnInfo.h: Added.
      (JSC::LineColumnInfo::operator <):
      (JSC::LineColumnInfo::LineColumnPair::LineColumnPair):
      (JSC::LineColumnInfo::operator ==):
      (JSC::LineColumnInfo::operator !=):
      (JSC::LineColumnInfo::operator <=):
      (JSC::LineColumnInfo::operator >):
      (JSC::LineColumnInfo::operator >=):
      * bytecode/LineInfo.h: Removed.
      
      * bytecode/UnlinkedCodeBlock.cpp:
      (JSC::UnlinkedCodeBlock::decodeExpressionRangeLineAndColumn):
      - Factored this out of expressionRangeForBytecodeOffset() so that it can
        be called from multiple places.
      (JSC::dumpLineColumnEntry):
      (JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo):
      (JSC::UnlinkedCodeBlock::dumpOpDebugLineColumnInfoList):
      - Some dumpers for debugging use only.
      (JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
      (JSC::UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn):
      - Finds the earliest op_debug bytecode whose line and column matches the
        specified line and column values. If an exact match is not found, then
        finds the nearest op_debug bytecode that precedes the specified line
        and column values. If there are more than one op_debug at that preceding
        line and column value, then the earliest of those op_debug bytecodes will
        be be selected. The offset of the selected bytecode will be returned.
      
        We want the earliest one because when we have multiple op_debug bytecodes
        that map to a given line and column, a debugger user would expect to break
        on the first one and step through the rest thereafter if needed.
      
      (JSC::compareLineColumnInfo):
      (JSC::UnlinkedCodeBlock::opDebugLineColumnInfoList):
      - Creates the sorted opDebugLineColumnInfoList on demand. This list is
        stored in the UnlinkedCodeBlock's rareData.
      * bytecode/UnlinkedCodeBlock.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      440584f1
  3. 10 Jan, 2014 1 commit
    • joepeck@webkit.org's avatar
      Web Inspector: Push InspectorAgent down into JSC, give JSC an InspectorController · 8897eaaf
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126763
      
      Reviewed by Timothy Hatcher.
      
      Source/JavaScriptCore:
      
      Introduce JSGlobalObjectInspectorController. This is the InspectorController
      for a JSContext. It is created by the JSGlobalObject Remote Inspector Debuggable
      when a remote frontend connects, and is destroyed when the remote frontend
      disconnects of the JSGlobalObject is destroyed.
      
      * inspector/JSGlobalObjectInspectorController.h: Added.
      * inspector/JSGlobalObjectInspectorController.cpp: Added.
      (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
      (Inspector::JSGlobalObjectInspectorController::~JSGlobalObjectInspectorController):
      (Inspector::JSGlobalObjectInspectorController::connectFrontend):
      (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
      (Inspector::JSGlobalObjectInspectorController::dispatchMessageFromFrontend):
      (Inspector::JSGlobalObjectInspectorController::functionCallHandler):
      (Inspector::JSGlobalObjectInspectorController::evaluateHandler):
      Create/destory agents, create/destroy dispatches, implement InspectorEnvironment.
      
      * runtime/JSGlobalObjectDebuggable.h:
      * runtime/JSGlobalObjectDebuggable.cpp:
      (JSC::JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable):
      (JSC::JSGlobalObjectDebuggable::connect):
      (JSC::JSGlobalObjectDebuggable::disconnect):
      (JSC::JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend):
      Forward actions to the InspectorController object.
      
      * inspector/agents/InspectorAgent.h: Renamed from Source/WebCore/inspector/InspectorAgent.h.
      * inspector/agents/InspectorAgent.cpp: Renamed from Source/WebCore/inspector/InspectorAgent.cpp.
      (Inspector::InspectorAgent::InspectorAgent):
      (Inspector::InspectorAgent::~InspectorAgent):
      (Inspector::InspectorAgent::didCreateFrontendAndBackend):
      (Inspector::InspectorAgent::inspect):
      (Inspector::InspectorAgent::evaluateForTestInFrontend):
      Implement InspectorAgent in JavaScriptCore in namespace Inspector.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * CMakeLists.txt:
      * ChangeLog:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.vcxproj/copy-files.cmd:
      Add files and new inspector/agents subdirectory.
      
      Source/WebCore:
      
      No new tests, no observable change in functionality.
      
      * CMakeLists.txt:
      * ForwardingHeaders/inspector/InspectorAgent.h: Added.
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * inspector/InspectorAllInOne.cpp:
      InspectorAgent moved to JavaScriptCore.
      
      * inspector/PageConsoleAgent.cpp:
      (WebCore::PageConsoleAgent::PageConsoleAgent):
      (WebCore::PageConsoleAgent::~PageConsoleAgent):
      * inspector/PageConsoleAgent.h:
      (WebCore::PageConsoleAgent::create):
      * inspector/InspectorApplicationCacheAgent.cpp:
      * inspector/InspectorApplicationCacheAgent.h:
      InspectorAgent was not used by these files, remove it.
      
      * inspector/CommandLineAPIHost.cpp:
      * inspector/CommandLineAPIHost.h:
      (WebCore::CommandLineAPIHost::init):
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InstrumentingAgents.h:
      (WebCore::InstrumentingAgents::inspectorAgent):
      (WebCore::InstrumentingAgents::setInspectorAgent):
      Switch to Inspector::InspectorAgent where applicable.
      
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::InspectorController):
      * inspector/InspectorController.h:
      Manually add InspectorAgent to the InstrumentingAgents. It is one
      of the agents that is always available in InstrumentingAgents.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8897eaaf
  4. 09 Jan, 2014 2 commits
    • joepeck@webkit.org's avatar
      Unreviewed Windows build fix for r161563. · 678cecb1
      joepeck@webkit.org authored
      Copy all scripts, some may not be .py.
      
      * JavaScriptCore.vcxproj/copy-files.cmd:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      678cecb1
    • joepeck@webkit.org's avatar
      Web Inspector: Move InjectedScript classes into JavaScriptCore · 69a4eafa
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126598
      
      Source/JavaScriptCore:
      
      Reviewed by Timothy Hatcher.
      
      Part 1: Extract InspectorInstrumentationCookie class from InspectorInstrumentation.
      Part 2: Move InjectedScriptSource and generation into JavaScriptCore.
      Part 3: Update CodeGeneratorInspector to avoid inlining virtual destructors.
      Part 4: Move all inspector scripts into JavaScriptCore and update generators.
      Part 5: Move InjectedScript classes into JavaScriptCore
      Part 6: Put it all together. Make WebCore use the JavaScriptCore InjectedScript files.
      
      There are pieces of logic that WebCore wants to hook into in the InjectedScript
      execution (e.g. for CommandLineAPIModule and InspectorInstrumentation). Create
      hooks for those in a base class called InspectorEnvironment. For now, the
      InspectorControllers (Page, JSGlobalObject, Worker) will be the InspectorEnvironments
      and provide answers to its hooks.
      
      * inspector/InspectorEnvironment.h: Added.
      New hooks needed by WebCore in various places. Mostly stubbed in JavaScriptCore.
      
      * inspector/InjectedScript.cpp: Renamed from Source/WebCore/inspector/InjectedScript.cpp.
      * inspector/InjectedScript.h: Added.
      * inspector/InjectedScriptBase.cpp: Renamed from Source/WebCore/inspector/InjectedScriptBase.cpp.
      * inspector/InjectedScriptBase.h: Renamed from Source/WebCore/inspector/InjectedScriptBase.h.
      * inspector/InjectedScriptModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptModule.cpp.
      * inspector/InjectedScriptModule.h: Renamed from Source/WebCore/inspector/InjectedScriptModule.h.
      Cleanup the style of these files (nullptr, formatting, whitespace, etc).
      Use the InspectorEnvironments call/evaluate function for ScriptFunctionCalls and checking access
      
      * inspector/InjectedScriptManager.cpp: Renamed from Source/WebCore/inspector/InjectedScriptManager.cpp.
      * inspector/InjectedScriptManager.h: Renamed from Source/WebCore/inspector/InjectedScriptManager.h.
      Take an InspectorEnvironment with multiple hooks, instead of a single hook function.
      
      * inspector/InjectedScriptHost.cpp: Added.
      * inspector/InjectedScriptHost.h: Added.
      * inspector/JSInjectedScriptHost.cpp: Renamed from Source/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp.
      * inspector/JSInjectedScriptHost.h: Added.
      * inspector/JSInjectedScriptHostPrototype.cpp: Added.
      * inspector/JSInjectedScriptHostPrototype.h: Added.
      Implementation of InjectedScriptHost which is passed into the script (InjectedScriptSource.js)
      that we inject into the page. This is mostly copied from the original autogenerated code,
      then simplified and cleaned up. InjectedScriptHost can be subclasses to provide specialized
      implementations of isHTMLAllCollection and type for Web/DOM types unknown to a pure JS context.
      
      For OS X be sure to export the scripts as if they are private headers.
      
      * GNUmakefile.am:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * inspector/scripts/cssmin.py: Renamed from Source/WebCore/inspector/Scripts/cssmin.py.
      * inspector/scripts/inline-and-minify-stylesheets-and-scripts.py: Renamed from Source/WebCore/inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py.
      * inspector/scripts/jsmin.py: Renamed from Source/WebCore/inspector/Scripts/jsmin.py.
      * inspector/scripts/xxd.pl: Renamed from Source/WebCore/inspector/xxd.pl.
      
      This avoids build errors about duplicate exported virtual inlined methods
      are included from multiple places. Just put empty destructors in the
      implementation file instead of inlined.
      
      * inspector/scripts/CodeGeneratorInspector.py:
      (Generator):
      (Generator.go):
      * inspector/scripts/CodeGeneratorInspectorStrings.py:
      
      Move InjectedScriptSource.js and derived sources generation.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * inspector/InjectedScriptSource.js: Renamed from Source/WebCore/inspector/InjectedScriptSource.js.
      
      Source/WebCore:
      
      Reviewed by Timothy Hatcher.
      
      * CMakeLists.txt:
      * DerivedSources.cpp:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      Remove old InjectedScript files.
      
      * ForwardingHeaders/inspector/InjectedScript.h: Added.
      * ForwardingHeaders/inspector/InjectedScriptBase.h: Added.
      * ForwardingHeaders/inspector/InjectedScriptHost.h: Added.
      * ForwardingHeaders/inspector/InjectedScriptManager.h: Added.
      * ForwardingHeaders/inspector/InjectedScriptModule.h: Added.
      * ForwardingHeaders/inspector/InspectorEnvironment.h: Added.
      Expose headers to WebCore.
      
      * inspector/InspectorController.h:
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::InspectorController):
      (WebCore::InspectorController::developerExtrasEnabled):
      (WebCore::InspectorController::canAccessInspectedScriptState):
      (WebCore::InspectorController::functionCallHandler):
      (WebCore::InspectorController::evaluateHandler):
      (WebCore::InspectorController::willCallInjectedScriptFunction):
      (WebCore::InspectorController::didCallInjectedScriptFunction):
      * inspector/WorkerInspectorController.h:
      * inspector/WorkerInspectorController.cpp:
      (WebCore::WorkerInspectorController::WorkerInspectorController):
      (WebCore::WorkerInspectorController::functionCallHandler):
      (WebCore::WorkerInspectorController::evaluateHandler):
      (WebCore::WorkerInspectorController::willCallInjectedScriptFunction):
      (WebCore::WorkerInspectorController::didCallInjectedScriptFunction):
      Make both InspectorControllers in WebCore be InspectorEnvironments.
      
      * bindings/js/JSMainThreadExecState.h:
      * bindings/js/JSMainThreadExecState.cpp:
      (WebCore::evaluateHandlerFromAnyThread):
      Make JSC::evaluate wrapper like the existing JSC::call wrapper.
      These will be the ScriptFunctionCall implementations when debugging
      a WebCore::Page or worker, instead of the pure JSC versions.
      
      * inspector/PageInjectedScriptHost.h: Copied from Source/WebCore/inspector/CommandLineAPIModule.h.
      * inspector/PageInjectedScriptHost.cpp: Copied from Source/WebCore/inspector/PageInjectedScriptManager.cpp.
      (WebCore::PageInjectedScriptHost::type):
      (WebCore::PageInjectedScriptHost::isHTMLAllCollection):
      WebCore InjectedScriptHost implementation for DOM type handling.
      
      * inspector/PageInjectedScriptManager.h:
      * inspector/PageInjectedScriptManager.cpp:
      (WebCore::PageInjectedScriptManager::PageInjectedScriptManager):
      (WebCore::PageInjectedScriptManager::discardInjectedScriptsFor):
      WebCore InjectedScriptManager implementation for CommandLineAPI and
      specialized DOMWindow injected script management.
      
      * bindings/js/JSBindingsAllInOne.cpp:
      * inspector/CommandLineAPIHost.cpp:
      * inspector/CommandLineAPIHost.h:
      * inspector/CommandLineAPIModule.cpp:
      (WebCore::CommandLineAPIModule::host):
      * inspector/CommandLineAPIModule.h:
      * inspector/ConsoleMessage.cpp:
      (WebCore::ConsoleMessage::addToFrontend):
      * inspector/ConsoleMessage.h:
      * inspector/InjectedScriptCanvasModule.cpp:
      (WebCore::InjectedScriptCanvasModule::InjectedScriptCanvasModule):
      * inspector/InjectedScriptCanvasModule.h:
      * inspector/InspectorAllInOne.cpp:
      * inspector/InspectorCanvasAgent.cpp:
      * inspector/InspectorCanvasAgent.h:
      (WebCore::InspectorCanvasAgent::create):
      * inspector/InspectorConsoleAgent.cpp:
      (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
      * inspector/InspectorConsoleAgent.h:
      * inspector/InspectorDOMAgent.cpp:
      * inspector/InspectorDOMAgent.h:
      (WebCore::InspectorDOMAgent::create):
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorDebuggerAgent.h:
      (WebCore::InspectorDebuggerAgent::injectedScriptManager):
      * inspector/InspectorHeapProfilerAgent.cpp:
      (WebCore::InspectorHeapProfilerAgent::create):
      (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
      * inspector/InspectorHeapProfilerAgent.h:
      * inspector/InspectorIndexedDBAgent.cpp:
      * inspector/InspectorIndexedDBAgent.h:
      (WebCore::InspectorIndexedDBAgent::create):
      * inspector/InspectorPageAgent.cpp:
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::PageProfilerAgent::PageProfilerAgent):
      (WebCore::InspectorProfilerAgent::create):
      (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
      (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
      * inspector/InspectorProfilerAgent.h:
      * inspector/InspectorRuntimeAgent.cpp:
      * inspector/InspectorRuntimeAgent.h:
      (WebCore::InspectorRuntimeAgent::injectedScriptManager):
      * inspector/PageConsoleAgent.cpp:
      (WebCore::PageConsoleAgent::PageConsoleAgent):
      * inspector/PageConsoleAgent.h:
      (WebCore::PageConsoleAgent::create):
      * inspector/PageDebuggerAgent.cpp:
      * inspector/PageDebuggerAgent.h:
      * inspector/PageRuntimeAgent.cpp:
      * inspector/PageRuntimeAgent.h:
      (WebCore::PageRuntimeAgent::create):
      * inspector/WorkerConsoleAgent.cpp:
      (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
      * inspector/WorkerConsoleAgent.h:
      (WebCore::WorkerConsoleAgent::create):
      * inspector/WorkerDebuggerAgent.cpp:
      * inspector/WorkerDebuggerAgent.h:
      * inspector/WorkerRuntimeAgent.cpp:
      * inspector/WorkerRuntimeAgent.h:
      (WebCore::WorkerRuntimeAgent::create):
      Switch to using the Inspector namespace and JSC InjectedScript files.
      
      * bindings/js/JSInjectedScriptManager.cpp: Removed.
      * inspector/InjectedScript.h: Removed.
      * inspector/InjectedScriptHost.cpp: Removed.
      * inspector/InjectedScriptHost.h: Removed.
      * inspector/InjectedScriptHost.idl: Removed.
      
      With the updated location switch to using the appropriate INSPECTOR_SCRIPTS_DIR
      variable which defines where the scripts are.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      Currently InjectedScriptBase uses InspectorInstrumentation directly
      to track calling into JavaScript for timeline purposes. We will remove
      the direct call from InjectedScriptBase and extracting the Cookie class
      will make that easier.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * inspector/InspectorAllInOne.cpp:
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InspectorInstrumentation.h:
      * inspector/InspectorInstrumentationCookie.cpp: Added.
      (WebCore::InspectorInstrumentationCookie::InspectorInstrumentationCookie):
      (WebCore::InspectorInstrumentationCookie::operator=):
      (WebCore::InspectorInstrumentationCookie::~InspectorInstrumentationCookie):
      * inspector/InspectorInstrumentationCookie.h: Added.
      (WebCore::InspectorInstrumentationCookie::isValid):
      (WebCore::InspectorInstrumentationCookie::instrumentingAgents):
      (WebCore::InspectorInstrumentationCookie::hasMatchingTimelineAgentId):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69a4eafa
  5. 06 Jan, 2014 1 commit
    • fpizlo@apple.com's avatar
      Make the different flavors of integer arithmetic more explicit, and don't rely... · a0fb0905
      fpizlo@apple.com authored
      Make the different flavors of integer arithmetic more explicit, and don't rely on (possibly stale) results of the backwards propagator to decide integer arithmetic semantics
      https://bugs.webkit.org/show_bug.cgi?id=125519
      
      Reviewed by Geoffrey Garen.
              
      Adds the Arith::Mode enum to arithmetic nodes, which makes it explicit what sorts of
      checks and overflows the node should do. Previously this would be deduced from
      backwards analysis results.
              
      This also makes "unchecked" variants really mean that you want the int32 wrapped
      result, so ArithIMul is now done in terms of ArithMul(Unchecked). That means that the
      constant folder needs to compute exactly the result implied by ArithMode, instead of
      just folding the double result.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
      * dfg/DFGArithMode.cpp: Added.
      (WTF::printInternal):
      * dfg/DFGArithMode.h: Added.
      (JSC::DFG::doesOverflow):
      (JSC::DFG::shouldCheckOverflow):
      (JSC::DFG::shouldCheckNegativeZero):
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::pureCSE):
      (JSC::DFG::CSEPhase::performNodeCSE):
      * dfg/DFGConstantFoldingPhase.cpp:
      (JSC::DFG::ConstantFoldingPhase::foldConstants):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      (JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::Node):
      (JSC::DFG::Node::hasArithMode):
      (JSC::DFG::Node::arithMode):
      (JSC::DFG::Node::setArithMode):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
      (JSC::DFG::SpeculativeJIT::compileDoubleAsInt32):
      (JSC::DFG::SpeculativeJIT::compileAdd):
      (JSC::DFG::SpeculativeJIT::compileArithSub):
      (JSC::DFG::SpeculativeJIT::compileArithNegate):
      (JSC::DFG::SpeculativeJIT::compileArithMul):
      (JSC::DFG::SpeculativeJIT::compileArithDiv):
      (JSC::DFG::SpeculativeJIT::compileArithMod):
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileAddSub):
      (JSC::FTL::LowerDFGToLLVM::compileArithMul):
      (JSC::FTL::LowerDFGToLLVM::compileArithDivMod):
      (JSC::FTL::LowerDFGToLLVM::compileArithNegate):
      (JSC::FTL::LowerDFGToLLVM::compileUInt32ToNumber):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0fb0905
  6. 02 Jan, 2014 2 commits
    • weinig@apple.com's avatar
      Update Promises to the https://github.com/domenic/promises-unwrapping spec · 349af4e4
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120954
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore: 
      
      Update Promises to the revised spec. Notable changes:
      - JSPromiseResolver is gone.
      - TaskContext has been renamed Microtask and now has a virtual run() function.
      - Instead of using custom InternalFunction subclasses, JSFunctions are used
        with PrivateName properties for internal slots.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * interpreter/CallFrame.h:
      (JSC::ExecState::promiseConstructorTable):
      * runtime/CommonIdentifiers.cpp:
      (JSC::CommonIdentifiers::CommonIdentifiers):
      * runtime/CommonIdentifiers.h:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      (JSC::JSGlobalObject::queueMicrotask):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::promiseConstructor):
      (JSC::JSGlobalObject::promisePrototype):
      (JSC::JSGlobalObject::promiseStructure):
      * runtime/JSPromise.cpp:
      (JSC::JSPromise::create):
      (JSC::JSPromise::JSPromise):
      (JSC::JSPromise::finishCreation):
      (JSC::JSPromise::visitChildren):
      (JSC::JSPromise::reject):
      (JSC::JSPromise::resolve):
      (JSC::JSPromise::appendResolveReaction):
      (JSC::JSPromise::appendRejectReaction):
      (JSC::triggerPromiseReactions):
      * runtime/JSPromise.h:
      (JSC::JSPromise::status):
      (JSC::JSPromise::result):
      (JSC::JSPromise::constructor):
      * runtime/JSPromiseCallback.cpp: Removed.
      * runtime/JSPromiseCallback.h: Removed.
      * runtime/JSPromiseConstructor.cpp:
      (JSC::constructPromise):
      (JSC::JSPromiseConstructor::getCallData):
      (JSC::JSPromiseConstructorFuncCast):
      (JSC::JSPromiseConstructorFuncResolve):
      (JSC::JSPromiseConstructorFuncReject):
      * runtime/JSPromiseConstructor.h:
      * runtime/JSPromiseDeferred.cpp: Added.
      (JSC::JSPromiseDeferred::create):
      (JSC::JSPromiseDeferred::JSPromiseDeferred):
      (JSC::JSPromiseDeferred::finishCreation):
      (JSC::JSPromiseDeferred::visitChildren):
      (JSC::createJSPromiseDeferredFromConstructor):
      (JSC::updateDeferredFromPotentialThenable):
      * runtime/JSPromiseDeferred.h: Added.
      (JSC::JSPromiseDeferred::createStructure):
      (JSC::JSPromiseDeferred::promise):
      (JSC::JSPromiseDeferred::resolve):
      (JSC::JSPromiseDeferred::reject):
      * runtime/JSPromiseFunctions.cpp: Added.
      (JSC::deferredConstructionFunction):
      (JSC::createDeferredConstructionFunction):
      (JSC::identifyFunction):
      (JSC::createIdentifyFunction):
      (JSC::promiseAllCountdownFunction):
      (JSC::createPromiseAllCountdownFunction):
      (JSC::promiseResolutionHandlerFunction):
      (JSC::createPromiseResolutionHandlerFunction):
      (JSC::rejectPromiseFunction):
      (JSC::createRejectPromiseFunction):
      (JSC::resolvePromiseFunction):
      (JSC::createResolvePromiseFunction):
      (JSC::throwerFunction):
      (JSC::createThrowerFunction):
      * runtime/JSPromiseFunctions.h: Added.
      * runtime/JSPromisePrototype.cpp:
      (JSC::JSPromisePrototypeFuncThen):
      (JSC::JSPromisePrototypeFuncCatch):
      * runtime/JSPromiseReaction.cpp: Added.
      (JSC::createExecutePromiseReactionMicroTask):
      (JSC::ExecutePromiseReactionMicroTask::run):
      (JSC::JSPromiseReaction::create):
      (JSC::JSPromiseReaction::JSPromiseReaction):
      (JSC::JSPromiseReaction::finishCreation):
      (JSC::JSPromiseReaction::visitChildren):
      * runtime/JSPromiseReaction.h: Added.
      (JSC::JSPromiseReaction::createStructure):
      (JSC::JSPromiseReaction::deferred):
      (JSC::JSPromiseReaction::handler):
      * runtime/JSPromiseResolver.cpp: Removed.
      * runtime/JSPromiseResolver.h: Removed.
      * runtime/JSPromiseResolverConstructor.cpp: Removed.
      * runtime/JSPromiseResolverConstructor.h: Removed.
      * runtime/JSPromiseResolverPrototype.cpp: Removed.
      * runtime/JSPromiseResolverPrototype.h: Removed.
      * runtime/Microtask.h: Added.
      * runtime/VM.cpp:
      (JSC::VM::VM):
      (JSC::VM::~VM):
      * runtime/VM.h:
      
      Source/WebCore: 
      
      * ForwardingHeaders/runtime/JSPromiseDeferred.h: Added.
      * ForwardingHeaders/runtime/JSPromiseResolver.h: Removed.
      * bindings/js/JSDOMGlobalObjectTask.cpp:
      (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
      * bindings/js/JSDOMGlobalObjectTask.h:
      * bindings/js/JSDOMPromise.cpp:
      (WebCore::DeferredWrapper::DeferredWrapper):
      (WebCore::DeferredWrapper::promise):
      (WebCore::DeferredWrapper::resolve):
      (WebCore::DeferredWrapper::reject):
      * bindings/js/JSDOMPromise.h:
      (WebCore::DeferredWrapper::resolve):
      (WebCore::DeferredWrapper::reject):
      (WebCore::DeferredWrapper::resolve<String>):
      (WebCore::DeferredWrapper::resolve<bool>):
      (WebCore::char>>):
      (WebCore::DeferredWrapper::reject<String>):
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::JSSubtleCrypto::encrypt):
      (WebCore::JSSubtleCrypto::decrypt):
      (WebCore::JSSubtleCrypto::sign):
      (WebCore::JSSubtleCrypto::verify):
      (WebCore::JSSubtleCrypto::digest):
      (WebCore::JSSubtleCrypto::generateKey):
      (WebCore::JSSubtleCrypto::importKey):
      (WebCore::JSSubtleCrypto::exportKey):
      (WebCore::JSSubtleCrypto::wrapKey):
      (WebCore::JSSubtleCrypto::unwrapKey):
      * bindings/js/JSWorkerGlobalScopeBase.cpp:
      (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
      * bindings/js/JSWorkerGlobalScopeBase.h:
      
      LayoutTests: 
      
      * crypto/subtle/argument-conversion.html:
      * crypto/subtle/resources/common.js:
      * crypto/subtle/sha-1.html:
      * crypto/subtle/sha-224.html:
      * crypto/subtle/sha-256.html:
      * crypto/subtle/sha-384.html:
      * crypto/subtle/sha-512.html:
      * js/dom/Promise-already-fulfilled-expected.txt: Removed.
      * js/dom/Promise-already-fulfilled.html: Removed.
      * js/dom/Promise-already-rejected.html:
      * js/dom/Promise-already-resolved.html:
      * js/dom/Promise-catch-expected.txt:
      * js/dom/Promise-catch-in-workers-expected.txt:
      * js/dom/Promise-catch.html:
      * js/dom/Promise-chain.html:
      * js/dom/Promise-exception-expected.txt:
      * js/dom/Promise-exception.html:
      * js/dom/Promise-expected.txt:
      * js/dom/Promise-fulfill-expected.txt: Removed.
      * js/dom/Promise-fulfill-in-workers-expected.txt: Removed.
      * js/dom/Promise-fulfill-in-workers.html: Removed.
      * js/dom/Promise-fulfill.html: Removed.
      * js/dom/Promise-init-callback-receiver-expected.txt: Added.
      * js/dom/Promise-init-callback-receiver.html: Added.
      * js/dom/Promise-init-expected.txt:
      * js/dom/Promise-init-in-workers-expected.txt:
      * js/dom/Promise-init.html:
      * js/dom/Promise-onFulfilled-deep-expected.txt: Added.
      * js/dom/Promise-onFulfilled-deep.html: Added.
      * js/dom/Promise-onRejected-deep-expected.txt: Added.
      * js/dom/Promise-onRejected-deep.html: Added.
      * js/dom/Promise-reject.html:
      * js/dom/Promise-resolve-chain.html:
      * js/dom/Promise-resolve-expected.txt:
      * js/dom/Promise-resolve-in-workers-expected.txt:
      * js/dom/Promise-resolve-state-expected.txt: Added.
      * js/dom/Promise-resolve-state-in-workers-expected.txt: Added.
      * js/dom/Promise-resolve-state-in-workers.html: Added.
      * js/dom/Promise-resolve-state.html: Added.
      * js/dom/Promise-resolve-with-itself-expected.txt: Added.
      * js/dom/Promise-resolve-with-itself.html: Added.
      * js/dom/Promise-resolve-with-then-exception.html:
      * js/dom/Promise-resolve-with-then-fulfill-expected.txt:
      * js/dom/Promise-resolve-with-then-fulfill.html:
      * js/dom/Promise-resolve-with-then-reject-expected.txt:
      * js/dom/Promise-resolve-with-then-reject.html:
      * js/dom/Promise-resolve.html:
      * js/dom/Promise-simple-expected.txt:
      * js/dom/Promise-simple-fulfill-expected.txt: Removed.
      * js/dom/Promise-simple-fulfill-inside-callback-expected.txt: Removed.
      * js/dom/Promise-simple-fulfill-inside-callback.html: Removed.
      * js/dom/Promise-simple-fulfill.html: Removed.
      * js/dom/Promise-simple-in-workers-expected.txt:
      * js/dom/Promise-simple-resolve-expected.txt: Added.
      * js/dom/Promise-simple-resolve.html: Added.
      * js/dom/Promise-simple.html:
      * js/dom/Promise-static-all-expected.txt: Added.
      * js/dom/Promise-static-all.html: Added.
      * js/dom/Promise-static-cast-expected.txt: Added.
      * js/dom/Promise-static-cast.html: Added.
      * js/dom/Promise-static-fulfill-expected.txt: Removed.
      * js/dom/Promise-static-fulfill.html: Removed.
      * js/dom/Promise-static-race-expected.txt: Added.
      * js/dom/Promise-static-race.html: Added.
      * js/dom/Promise-static-resolve.html:
      * js/dom/Promise-then-callback-receiver-expected.txt: Added.
      * js/dom/Promise-then-callback-receiver.html: Added.
      * js/dom/Promise-then-expected.txt:
      * js/dom/Promise-then-in-workers-expected.txt:
      * js/dom/Promise-then-without-callbacks.html:
      * js/dom/Promise-then.html:
      * js/dom/Promise-types-expected.txt:
      * js/dom/Promise-types.html:
      * js/dom/Promise.html:
      * js/resources/Promise-catch-in-workers.js:
      * js/resources/Promise-fulfill-in-workers.js: Removed.
      * js/resources/Promise-init-in-workers.js:
      * js/resources/Promise-reject-in-workers.js:
      * js/resources/Promise-resolve-in-workers.js:
      * js/resources/Promise-resolve-state-in-workers.js: Added.
      * js/resources/Promise-simple-in-workers.js:
      * js/resources/Promise-then-in-workers.js:
      * js/resources/Promise-then-without-callbacks-in-workers.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      349af4e4
    • mhahnenberg@apple.com's avatar
      Storing new CopiedSpace memory into a JSObject should fire a write barrier · ebf01914
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126025
      
      Reviewed by Filip Pizlo.
      
      Technically this is creating a pointer between a (potentially) old generation object and a young
      generation chunk of memory, thus there needs to be a barrier.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGOperations.cpp:
      * heap/CopyWriteBarrier.h: Added. This class functions similarly to the WriteBarrier class. It
      acts as a proxy for pointers to CopiedSpace. Assignments to the field cause a write barrier to
      fire for the object that is the owner of the CopiedSpace memory. This is to ensure during nursery
      collections that objects with new backing stores are visited, even if they are old generation objects.
      (JSC::CopyWriteBarrier::CopyWriteBarrier):
      (JSC::CopyWriteBarrier::operator!):
      (JSC::CopyWriteBarrier::operator UnspecifiedBoolType*):
      (JSC::CopyWriteBarrier::get):
      (JSC::CopyWriteBarrier::operator*):
      (JSC::CopyWriteBarrier::operator->):
      (JSC::CopyWriteBarrier::set):
      (JSC::CopyWriteBarrier::setWithoutWriteBarrier):
      (JSC::CopyWriteBarrier::clear):
      * heap/Heap.h:
      * runtime/JSArray.cpp:
      (JSC::JSArray::unshiftCountSlowCase):
      (JSC::JSArray::shiftCountWithArrayStorage):
      (JSC::JSArray::unshiftCountWithArrayStorage):
      * runtime/JSCell.h:
      (JSC::JSCell::unvalidatedStructure):
      * runtime/JSGenericTypedArrayViewInlines.h:
      (JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory):
      * runtime/JSObject.cpp:
      (JSC::JSObject::copyButterfly):
      (JSC::JSObject::getOwnPropertySlotByIndex):
      (JSC::JSObject::putByIndex):
      (JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
      (JSC::JSObject::createInitialIndexedStorage):
      (JSC::JSObject::createArrayStorage):
      (JSC::JSObject::deletePropertyByIndex):
      (JSC::JSObject::getOwnPropertyNames):
      (JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
      (JSC::JSObject::countElements):
      (JSC::JSObject::increaseVectorLength):
      (JSC::JSObject::ensureLengthSlow):
      * runtime/JSObject.h:
      (JSC::JSObject::butterfly):
      (JSC::JSObject::setStructureAndButterfly):
      (JSC::JSObject::setButterflyWithoutChangingStructure):
      (JSC::JSObject::JSObject):
      (JSC::JSObject::putDirectInternal):
      (JSC::JSObject::putDirectWithoutTransition):
      * runtime/MapData.cpp:
      (JSC::MapData::ensureSpaceForAppend):
      * runtime/Structure.cpp:
      (JSC::Structure::materializePropertyMap):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ebf01914
  7. 23 Dec, 2013 1 commit
    • lforschler@apple.com's avatar
      Source/JavaScriptCore: <rdar://problem/15682948> Update copyright strings · af2230ef
      lforschler@apple.com authored
              
      Reviewed by Dan Bernstein.
      
      * Info.plist:
      * JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist:
      
      Source/WebCore: <rdar://problem/15682948> Update copyright strings
      
      Reviewed by Dan Bernstein
      
      * Info.plist:
      
      Source/WebKit/mac: <rdar://problem/15682948> Update copyright strings
      
      Reviewed by Dan Bernstein.
      
      * Info.plist:
      
      Source/WebKit2: <rdar://problem/15682948> Update copyright strings
      
      Reviewed by Dan Bernstein
      
      * DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
      * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
      * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
      * Info.plist:
      * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
      * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist:
      * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
      * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
      * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
      * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
      * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
      * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
      * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
      * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
      * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
      
      WebKitLibraries: <rdar://problem/15682948> Update copyright strings
      
      Reviewed by Dan Bernstein.
      
      * win/tools/scripts/COPYRIGHT-END-YEAR:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af2230ef
  8. 18 Dec, 2013 1 commit
    • mhahnenberg@apple.com's avatar
      DFG should have a separate StoreBarrier node · 4968e1a3
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125530
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore: 
      
      This is in preparation for GenGC. We use a separate StoreBarrier node instead of making them implicitly 
      part of other nodes so that it's easier to run analyses on them, e.g. for the StoreBarrierElisionPhase. 
      They are inserted during the fixup phase. Initially they do not generate any code.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGAbstractHeap.h:
      * dfg/DFGAbstractInterpreter.h:
      (JSC::DFG::AbstractInterpreter::isKnownNotCell):
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberizeForAllocation):
      (JSC::DFG::clobberize):
      * dfg/DFGConstantFoldingPhase.cpp:
      (JSC::DFG::ConstantFoldingPhase::foldConstants): Whenever we insert new nodes that require StoreBarriers,
      we have to add those new StoreBarriers too. It's important to note that AllocatePropertyStorage and 
      ReallocatePropertyStorage nodes require their StoreBarriers to come after them since they allocate first,
      which could cause a GC, and then store the resulting buffer into their JSCell, which requires the barrier.
      If we ever require that write barriers occur before stores, we'll have to split these nodes into 
      AllocatePropertyStorage + StoreBarrier + PutPropertyStorage.
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      (JSC::DFG::FixupPhase::insertStoreBarrier):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::isStoreBarrier):
      * dfg/DFGNodeType.h:
      * dfg/DFGOSRExitCompiler32_64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGOSRExitCompiler64.cpp:
      (JSC::DFG::OSRExitCompiler::compileExit):
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::compileInThreadImpl):
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
      (JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
      (JSC::DFG::SpeculativeJIT::compileStoreBarrier):
      (JSC::DFG::SpeculativeJIT::genericWriteBarrier): The fast path write barrier check. It loads the 
      byte that contains the mark bit of the object. 
      (JSC::DFG::SpeculativeJIT::storeToWriteBarrierBuffer): If the fast path check fails we try to store the 
      cell in the WriteBarrierBuffer so as to avoid frequently flushing all registers in order to make a C call.
      (JSC::DFG::SpeculativeJIT::writeBarrier):
      (JSC::DFG::SpeculativeJIT::osrWriteBarrier): More barebones version of the write barrier to be executed 
      during an OSR exit into baseline code. We must do this so that the baseline JIT object and array profiles 
      are properly cleared during GC.
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::compileBaseValueStoreBarrier):
      (JSC::DFG::SpeculativeJIT::compile):
      (JSC::DFG::SpeculativeJIT::writeBarrier):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::cachedPutById):
      (JSC::DFG::SpeculativeJIT::compileBaseValueStoreBarrier):
      (JSC::DFG::SpeculativeJIT::compile):
      (JSC::DFG::SpeculativeJIT::writeBarrier):
      * dfg/DFGStoreBarrierElisionPhase.cpp: Added. New DFG phase that does block-local elision of redundant
      StoreBarriers. Every time a StoreBarrier on a particular object is executed, a bit is set indicating that 
      that object doesn't need any more StoreBarriers. 
      (JSC::DFG::StoreBarrierElisionPhase::StoreBarrierElisionPhase):
      (JSC::DFG::StoreBarrierElisionPhase::couldCauseGC): Nodes that could cause a GC reset the bits for all of the 
      objects known in the current block. 
      (JSC::DFG::StoreBarrierElisionPhase::allocatesFreshObject): A node that creates a new object automatically 
      sets the bit for that object since if a GC occurred as the result of that object's allocation then that 
      object would not need a barrier since it would be guaranteed to be a young generation object until the 
      next GC point.
      (JSC::DFG::StoreBarrierElisionPhase::noticeFreshObject):
      (JSC::DFG::StoreBarrierElisionPhase::getBaseOfStore):
      (JSC::DFG::StoreBarrierElisionPhase::shouldBeElided):
      (JSC::DFG::StoreBarrierElisionPhase::elideBarrier):
      (JSC::DFG::StoreBarrierElisionPhase::handleNode):
      (JSC::DFG::StoreBarrierElisionPhase::handleBlock):
      (JSC::DFG::StoreBarrierElisionPhase::run):
      (JSC::DFG::performStoreBarrierElision):
      * dfg/DFGStoreBarrierElisionPhase.h: Added.
      * heap/Heap.cpp:
      (JSC::Heap::Heap):
      (JSC::Heap::flushWriteBarrierBuffer):
      * heap/Heap.h:
      (JSC::Heap::writeBarrier):
      * heap/MarkedBlock.h:
      (JSC::MarkedBlock::offsetOfMarks):
      * heap/WriteBarrierBuffer.cpp: Added. The WriteBarrierBuffer buffers a set of JSCells that are awaiting 
      a pending WriteBarrier. This buffer is used by the DFG to avoid the overhead of calling out to C repeatedly
      to invoke a write barrier on a single JSCell. Instead the DFG has inline code to fill the WriteBarrier buffer
      until its full, and then to call out to C to flush it. The WriteBarrierBuffer will also be flushed prior to 
      each EdenCollection.
      (JSC::WriteBarrierBuffer::WriteBarrierBuffer):
      (JSC::WriteBarrierBuffer::~WriteBarrierBuffer):
      (JSC::WriteBarrierBuffer::flush):
      (JSC::WriteBarrierBuffer::reset):
      (JSC::WriteBarrierBuffer::add):
      * heap/WriteBarrierBuffer.h: Added.
      (JSC::WriteBarrierBuffer::currentIndexOffset):
      (JSC::WriteBarrierBuffer::capacityOffset):
      (JSC::WriteBarrierBuffer::bufferOffset):
      * jit/JITOperations.cpp:
      * jit/JITOperations.h:
      * runtime/VM.h:
      
      Source/WTF: 
      
      * wtf/Platform.h: Added an #define for ENABLE(GGC) which will be used for landing things related to GenGC.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4968e1a3
  9. 16 Dec, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Fixed Win64 build on VS2013. · b638e272
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125753
      
      Patch by Alex Christensen <achristensen@webkit.org> on 2013-12-16
      Reviewed by Brent Fulgham.
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
      * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
      * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
      * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
      * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
      * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
      * JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/ThirdParty/ANGLE:
      
      * ANGLE.vcxproj/libGLESv2.vcxproj:
      * ANGLE.vcxproj/preprocessor.vcxproj:
      * ANGLE.vcxproj/translator_common.vcxproj:
      * ANGLE.vcxproj/translator_glsl.vcxproj:
      * ANGLE.vcxproj/translator_hlsl.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/WebCore:
      
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/WebInspectorUI:
      
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
      Added 64-bit configuration.
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKit.sln:
      Use new 64-bit WebInspectorUI configurations.
      * WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
      * WebKit.vcxproj/WebKit/WebKit.vcxproj:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj:
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Source/WTF:
      
      * WTF.vcxproj/WTF.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      Tools:
      
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
      * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
      * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
      * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
      * win/record-memory/record-memory.vcxproj:
      Added correct PlatformToolset for 64-bit builds.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b638e272
  10. 13 Dec, 2013 4 commits
    • bfulgham@apple.com's avatar
      [Win] Unreviewed build fix after r160563 · b68c9031
      bfulgham@apple.com authored
      * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Missed the Debug
      target in my last patch.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b68c9031
    • bfulgham@apple.com's avatar
      [Win] Unreviewed build fix after r160548 · a5c4c835
      bfulgham@apple.com authored
      Source/JavaScriptCore: 
      
      * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Specify
      that we are using the vs12_xp target for Makefile-based projects.
      * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Ditto
      * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Ditto.
      
      Source/WebCore: 
      
      * WebCore.vcxproj/WebCoreGenerated.vcxproj: Specify that we are
      using the vs120_xp build target for Makefile-based projects.
      
      Source/WTF: 
      
      * WTF.vcxproj/WTFGenerated.vcxproj: Specify that we are using
      the vs12_xp target for Makefile-based projects.
      
      Tools: 
      
      * win/AssembleBuildLogs/AssembleBuildLogs.vcxproj: Specify
      we are using vs12_xp target for Makefile-based projects.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5c4c835
    • joepeck@webkit.org's avatar
      Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain · 8be4912d
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125595
      
      Reviewed by Timothy Hatcher.
      
      * GNUmakefile.am:
      
      Source/JavaScriptCore:
      
        - Move CodeGeneration scripts from WebCore into JavaScriptCore/inspector/scripts
        - For ports that build WebKit frameworks separately, export the scripts as PrivateHeaders
        - Update CodeGeneratorInspector.py in a few ways:
          - output dynamic filenames, so JavaScriptCore generates InspectorJSFoo.* and WebCore generates InspectorWebFoo.*
          - take in more then one protocol JSON file. The first contains domains to generate, the others are dependencies
            that are generated elsewhere that we can depend on for Types.
        - Add DerivedSources build step to generate the Inspector Interfaces
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.vcxproj/copy-files.cmd:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      Add scripts and code generation.
      
      * inspector/protocol/Runtime.json: Renamed from Source/WebCore/inspector/protocol/Runtime.json.
      Move protocol file into JavaScriptCore so its types will be generated in JavaScriptCore.
      
      * inspector/scripts/CodeGeneratorInspector.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspector.py.
      Updates to the script as listed above.
      
      * inspector/scripts/CodeGeneratorInspectorStrings.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspectorStrings.py.
      * inspector/scripts/generate-combined-inspector-json.py: Renamed from Source/WebCore/inspector/Scripts/generate-combined-inspector-json.py.
      Moved from WebCore into JavaScriptCore for code generation.
      
      Source/WebCore:
      
        - CodeGeneration changed to output Frontend and Backend dispatchers
          in namespace Inspector. So update all the agent's appropriately.
        - Update Derived Sources code generation to use the Scripts that had
          moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
          directly, but others have to use the Scripts exported by JSC
          in JavaScriptCore's PrivateHeaders.
        - Add ForwardingHeaders for the files generated in JavaScriptCore.
        - Update the names of Inspector DerivedSources files, since they
          were renamed to InspectorWeb*.
      
      No new tests, this only moves code around. There are no functional changes.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
      * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
      * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.vcxproj/build-generated-files.sh:
      * WebCore.xcodeproj/project.pbxproj:
      Remove files, rename files, update code generation.
      
      * make-generated-sources.sh:
      Update this standalone developer script to fill in the new InspectorScripts variable.
      
      * inspector/ConsoleMessage.h:
      * inspector/InjectedScriptHost.cpp:
      * inspector/InspectorAgent.cpp:
      * inspector/InspectorAgent.h:
      * inspector/InspectorApplicationCacheAgent.cpp:
      * inspector/InspectorApplicationCacheAgent.h:
      * inspector/InspectorCSSAgent.h:
      * inspector/InspectorCanvasAgent.cpp:
      * inspector/InspectorCanvasAgent.h:
      * inspector/InspectorConsoleAgent.cpp:
      * inspector/InspectorConsoleAgent.h:
      * inspector/InspectorController.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorDOMDebuggerAgent.cpp:
      * inspector/InspectorDOMDebuggerAgent.h:
      * inspector/InspectorDOMStorageAgent.cpp:
      * inspector/InspectorDOMStorageAgent.h:
      * inspector/InspectorDatabaseAgent.cpp:
      * inspector/InspectorDatabaseAgent.h:
      * inspector/InspectorDatabaseResource.cpp:
      * inspector/InspectorDatabaseResource.h:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorDebuggerAgent.h:
      * inspector/InspectorFrontendClientLocal.cpp:
      * inspector/InspectorHeapProfilerAgent.h:
      * inspector/InspectorIndexedDBAgent.cpp:
      * inspector/InspectorIndexedDBAgent.h:
      * inspector/InspectorInputAgent.h:
      * inspector/InspectorLayerTreeAgent.cpp:
      * inspector/InspectorLayerTreeAgent.h:
      * inspector/InspectorMemoryAgent.cpp:
      * inspector/InspectorMemoryAgent.h:
      * inspector/InspectorPageAgent.cpp:
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorProfilerAgent.cpp:
      * inspector/InspectorProfilerAgent.h:
      * inspector/InspectorResourceAgent.cpp:
      * inspector/InspectorResourceAgent.h:
      * inspector/InspectorRuntimeAgent.h:
      * inspector/InspectorTimelineAgent.cpp:
      * inspector/InspectorTimelineAgent.h:
      * inspector/InspectorWorkerAgent.cpp:
      * inspector/InspectorWorkerAgent.h:
      * inspector/PageRuntimeAgent.h:
      * inspector/ScriptCallFrame.cpp:
      * inspector/WorkerInspectorController.cpp:
      * inspector/WorkerRuntimeAgent.h:
      Updates header names and class namespace changes.
      
      Source/WebInspectorUI:
      
      * Scripts/copy-user-interface-resources.sh:
      Copy all the different backend commands files.
      
      * Scripts/update-InspectorBackendCommands.rb:
      Update with respect to new script location and new file names.
      
      * WebInspectorUI.xcodeproj/project.pbxproj:
      Remove Inputs and Outputs of build phase, which were wrong.
      Now this build phase always runs, and not by accident.
      
      * UserInterface/InspectorJSBackendCommands.js: Added.
      * UserInterface/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/InspectorBackendCommands.js.
      * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorBackendCommands.js.
      * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorBackendCommands.js.
      * UserInterface/LoadInspectorBackendCommands.js:
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
      
      LayoutTests:
      
      * http/tests/inspector-protocol/resources/InspectorTest.js:
      (InspectorTest.importInspectorScripts):
      Update for the new backend commands files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8be4912d
    • bfulgham@apple.com's avatar
      [Win] Switch WebKit solution to Visual Studio 2013 · 0d3ee590
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125192
      
      Reviewed by Anders Carlsson.
      
      Source/JavaScriptCore: 
      
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Update for VS2013
      * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
      Ditto
      * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Ditto
      * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto
      * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto
      
      Source/ThirdParty: 
      
      * gtest/msvc/gtest-md.vcxproj: Update for VS2013
      
      Source/WebCore: 
      
      * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013
      * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
      * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto
      
      Source/WebInspectorUI: 
      
      * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj: Update for VS2013
      
      Source/WebKit: 
      
      * WebKit.vcxproj/Interfaces/Interfaces.vcxproj: Update for VS2013
      * WebKit.vcxproj/WebKit.sln: Ditto
      * WebKit.vcxproj/WebKit/WebKit.vcxproj: Ditto
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj: Ditto
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj: Ditto
      
      Source/WTF: 
      
      * WTF.vcxproj/WTF.vcxproj: Update for VS2013
      * WTF.vcxproj/WTF.vcxproj.filters: Ditto
      
      Tools: 
      
      Project files must reference vs12_xp for 32-bit builds. 
      
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
      Update for VS2013
      * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
      Ditto
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
      Ditto
      * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
      Ditto
      * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
      Ditto
      * Scripts/webkitdirs.pm:
      (visualStudioInstallDir): Specify VS2013
      (visualStudioVersion): Ditto.
      (setupAppleWinEnv): Use VS2013 in messages
      (setupCygwinEnv): Ditto
      * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
      Update for VS2013
      * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
      Ditto
      * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
      Ditto
      * win/record-memory/record-memory.vcxproj:
      Ditto
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d3ee590
  11. 11 Dec, 2013 1 commit
    • joepeck@webkit.org's avatar
      Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore · a3198444
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125324
      
      Reviewed by Timothy Hatcher.
      
      Source/JavaScriptCore:
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
      * JavaScriptCore.vcxproj/copy-files.cmd:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bindings/ScriptFunctionCall.cpp: Renamed from Source/WebCore/bindings/js/ScriptFunctionCall.cpp.
      * bindings/ScriptFunctionCall.h: Renamed from Source/WebCore/bindings/js/ScriptFunctionCall.h.
      * bindings/ScriptObject.cpp: Copied from Source/WebCore/inspector/WorkerConsoleAgent.cpp.
      * bindings/ScriptObject.h: Renamed from Source/WebCore/inspector/InspectorBaseAgent.h.
      * bindings/ScriptValue.cpp: Renamed from Source/WebCore/bindings/js/ScriptValue.cpp.
      * bindings/ScriptValue.h: Renamed from Source/WebCore/bindings/js/ScriptValue.h.
      * inspector/InspectorAgentBase.h: Copied from Source/WebCore/inspector/InspectorAgentRegistry.h.
      * inspector/InspectorAgentRegistry.cpp: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.cpp.
      * inspector/InspectorBackendDispatcher.h: Renamed from Source/WebCore/inspector/InspectorBackendDispatcher.h.
      (Inspector::InspectorSupplementalBackendDispatcher::InspectorSupplementalBackendDispatcher):
      (Inspector::InspectorSupplementalBackendDispatcher::~InspectorSupplementalBackendDispatcher):
      * inspector/InspectorValues.cpp: Renamed from Source/WebCore/inspector/InspectorValues.cpp.
      * inspector/InspectorValues.h: Renamed from Source/WebCore/inspector/InspectorValues.h.
      
      Source/WebCore:
      
      Part 1: Push down core inspector classes.
      
        - Move InspectAgentBase, InspectorAgentRegistry, InspectorBackendDispatcher, InspectorValues
          down to JavaScriptCore and into the Inspector namespace.
        - Add forwarding headers for JavaScriptCore/inspector files.
        - Use the Inspector namespace where appropriate.
        - Rename InspectorBaseAgent to InspectorAgentBase for clarity.
      
      Part 2: Push Script wrapper classes down into JavaScriptCore/bindings.
      
        - Move ScriptObject and ScriptValue into JavaScriptCore but namespace Deprecated
        - Add forwarding headers
        - Use Deprecated::ScriptObject and Deprecated::ScriptValue everywhere.
      
      Part 3: Push Down ScriptFunctionCall
      
        - Move ScriptFunctionCall to JavaScriptCore/bindings into namespace Deprecated.
        - Give constructor a function to all for a different JSC::call, because
          WebCore ScriptFunctionCall's use JSMainThreadExecState when isMainThread.
        - Prefer Deprecated::ScriptFunctionCall everywhere it is used in WebCore.
      
      Part 4: Extract InspectorTypeBuilder helper functions
      
        - There is a chunk of InspectorTypeBuilder that never changes. Extract it into
          its own file, InspectorTypeBuilder.h in JSC/inspector, Inspector namespace.
        - This moves TypeBuilder from namespace WebCore to namespace Inspector
        - Rename the WebCore generated InspectorTypeBuilder to InspectorWebTypeBuilders,
          eventually the CodeGenerator script will do this for more then TypeBuilders
          and there will be "JS" TypeBuilders and "Web" TypeBuilders files.
      
      No new tests. No change in functionality, just moving things around.
      
      * CMakeLists.txt:
      * ForwardingHeaders/bindings/ScriptFunctionCall.h: Added.
      * ForwardingHeaders/bindings/ScriptObject.h: Added.
      * ForwardingHeaders/bindings/ScriptValue.h: Added.
      * ForwardingHeaders/inspector/InspectorAgentBase.h: Added.
      * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Added.
      * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Added.
      * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Added.
      * ForwardingHeaders/inspector/InspectorValues.h: Added.
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBAny.cpp:
      (WebCore::IDBAny::scriptValue):
      (WebCore::IDBAny::IDBAny):
      * Modules/indexeddb/IDBAny.h:
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::key):
      (WebCore::IDBCursor::primaryKey):
      (WebCore::IDBCursor::value):
      (WebCore::IDBCursor::update):
      (WebCore::IDBCursor::continueFunction):
      (WebCore::IDBCursor::setValueReady):
      * Modules/indexeddb/IDBCursor.h:
      * Modules/indexeddb/IDBFactory.cpp:
      (WebCore::IDBFactory::cmp):
      * Modules/indexeddb/IDBFactory.h:
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::count):
      (WebCore::IDBIndex::openKeyCursor):
      (WebCore::IDBIndex::get):
      (WebCore::IDBIndex::getKey):
      * Modules/indexeddb/IDBIndex.h:
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::openKeyCursor):
      * Modules/indexeddb/IDBKeyRange.cpp:
      (WebCore::IDBKeyRange::lowerValue):
      (WebCore::IDBKeyRange::upperValue):
      (WebCore::IDBKeyRange::only):
      (WebCore::IDBKeyRange::lowerBound):
      (WebCore::IDBKeyRange::upperBound):
      (WebCore::IDBKeyRange::bound):
      * Modules/indexeddb/IDBKeyRange.h:
      (WebCore::IDBKeyRange::lowerBound):
      (WebCore::IDBKeyRange::upperBound):
      (WebCore::IDBKeyRange::bound):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::get):
      (WebCore::generateIndexKeysForValue):
      (WebCore::IDBObjectStore::add):
      (WebCore::IDBObjectStore::put):
      (WebCore::IDBObjectStore::deleteFunction):
      (WebCore::IDBObjectStore::openCursor):
      (WebCore::IDBObjectStore::count):
      * Modules/indexeddb/IDBObjectStore.h:
      * Modules/indexeddb/IDBRequest.cpp:
      (WebCore::IDBRequest::setResultCursor):
      (WebCore::IDBRequest::onSuccess):
      (WebCore::IDBRequest::onSuccessInternal):
      * Modules/indexeddb/IDBRequest.h:
      * Modules/mediastream/CapabilityRange.cpp:
      (WebCore::scriptValue):
      (WebCore::CapabilityRange::min):
      (WebCore::CapabilityRange::max):
      * Modules/mediastream/CapabilityRange.h:
      * Modules/mediastream/MediaTrackConstraint.h:
      * Modules/mediastream/RTCIceCandidate.cpp:
      * Modules/plugins/QuickTimePluginReplacement.cpp:
      * Modules/plugins/QuickTimePluginReplacement.h:
      * UseJSC.cmake:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/Dictionary.h:
      (WebCore::Dictionary::getEventListener):
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::createIDBKeyFromScriptValueAndKeyPath):
      (WebCore::injectIDBKeyIntoScriptValue):
      (WebCore::canInjectIDBKeyIntoScriptValue):
      (WebCore::deserializeIDBValue):
      (WebCore::deserializeIDBValueBuffer):
      (WebCore::idbKeyToScriptValue):
      (WebCore::scriptValueToIDBKey):
      * bindings/js/IDBBindingUtilities.h:
      * bindings/js/JSBindingsAllInOne.cpp:
      * bindings/js/JSDictionary.cpp:
      (WebCore::JSDictionary::convertValue):
      * bindings/js/JSDictionary.h:
      * bindings/js/JSHTMLCanvasElementCustom.cpp:
      (WebCore::JSHTMLCanvasElement::getContext):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::InjectedScriptHost::scriptValueAsNode):
      (WebCore::InjectedScriptHost::nodeAsScriptValue):
      (WebCore::JSInjectedScriptHost::inspectedObject):
      (WebCore::JSInjectedScriptHost::inspect):
      * bindings/js/JSInjectedScriptManager.cpp:
      (WebCore::InjectedScriptManager::createInjectedScript):
      * bindings/js/JSMainThreadExecState.cpp:
      (WebCore::functionCallHandlerFromAnyThread):
      * bindings/js/JSMainThreadExecState.h:
      (WebCore::JSMainThreadExecState::currentState):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::JSMessageEvent::data):
      (WebCore::handleInitMessageEvent):
      * bindings/js/ScheduledAction.cpp:
      * bindings/js/ScriptCallStackFactory.cpp:
      (WebCore::createScriptArguments):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::evaluateInWorld):
      (WebCore::ScriptController::evaluate):
      (WebCore::ScriptController::executeScriptInWorld):
      (WebCore::ScriptController::executeScript):
      (WebCore::ScriptController::executeIfJavaScriptURL):
      * bindings/js/ScriptController.h:
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::setScriptSource):
      (WebCore::ScriptDebugServer::updateCallStack):
      (WebCore::ScriptDebugServer::dispatchDidPause):
      (WebCore::ScriptDebugServer::runScript):
      * bindings/js/ScriptDebugServer.h:
      * bindings/js/ScriptGlobalObject.cpp: Renamed from Source/WebCore/bindings/js/ScriptObject.cpp.
      (WebCore::handleException):
      (WebCore::ScriptGlobalObject::set):
      (WebCore::ScriptGlobalObject::get):
      (WebCore::ScriptGlobalObject::remove):
      * bindings/js/ScriptGlobalObject.h: Copied from Source/WebCore/inspector/ScriptCallStack.h.
      (WebCore::ScriptGlobalObject::ScriptGlobalObject):
      * bindings/js/ScriptObject.h: Removed.
      * bindings/js/ScriptProfile.cpp:
      (WebCore::buildInspectorObjectFor):
      (WebCore::ScriptProfile::buildInspectorObjectForHead):
      (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
      * bindings/js/ScriptProfile.h:
      * bindings/js/ScriptProfiler.cpp:
      (WebCore::ScriptProfiler::objectByHeapObjectId):
      (WebCore::ScriptProfiler::getHeapObjectId):
      * bindings/js/ScriptProfiler.h:
      * bindings/js/ScriptState.h:
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::deserializeForInspector):
      (WebCore::SerializedScriptValue::serialize):
      (WebCore::SerializedScriptValue::deserialize):
      * bindings/js/SerializedScriptValue.h:
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::evaluate):
      (WebCore::WorkerScriptController::setException):
      * bindings/js/WorkerScriptController.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::setJSTestObjAnyAttribute):
      * dom/CustomEvent.cpp:
      (WebCore::CustomEvent::initCustomEvent):
      * dom/CustomEvent.h:
      (WebCore::CustomEvent::detail):
      * dom/MessageEvent.cpp:
      (WebCore::MessageEvent::MessageEvent):
      (WebCore::MessageEvent::initMessageEvent):
      * dom/MessageEvent.h:
      (WebCore::MessageEvent::create):
      (WebCore::MessageEvent::dataAsScriptValue):
      * dom/PopStateEvent.h:
      (WebCore::PopStateEvent::state):
      * dom/ScriptElement.cpp:
      * html/HTMLMediaElement.cpp:
      * html/parser/XSSAuditor.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/CodeGeneratorInspector.py:
      (RawTypes.BaseType.get_raw_validator_call_text):
      (RawTypes.Object.get_array_item_raw_c_type_text):
      (RawTypes.Any.get_array_item_raw_c_type_text):
      (RawTypes.Array.get_array_item_raw_c_type_text):
      (CommandReturnPassModel.OptOutput.get_return_var_type):
      (CommandReturnPassModel.OptOutput.get_output_parameter_type):
      (TypeModel.ExactlyInt.get_input_param_type_text):
      (TypeModel.ExactlyInt.get_opt_output_type_):
      (TypeModel.init_class):
      (TypeBindings.create_named_type_declaration.Helper):
      (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
      (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
      (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder):
      (Inspector):
      (ArrayBinding.get_array_item_c_type_text):
      (Generator.go):
      (Generator.process_command):
      * inspector/CodeGeneratorInspectorStrings.py:
      (void):
      (InspectorFrontend_h):
      (InspectorBackendDispatchers_h):
      * inspector/ConsoleMessage.cpp:
      (WebCore::messageSourceValue):
      (WebCore::messageTypeValue):
      (WebCore::messageLevelValue):
      (WebCore::ConsoleMessage::addToFrontend):
      * inspector/ConsoleMessage.h:
      * inspector/ContentSearchUtils.cpp:
      (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
      (WebCore::ContentSearchUtils::searchInTextByLines):
      * inspector/ContentSearchUtils.h:
      * inspector/InjectedScript.cpp:
      (WebCore::InjectedScript::InjectedScript):
      (WebCore::InjectedScript::evaluate):
      (WebCore::InjectedScript::callFunctionOn):
      (WebCore::InjectedScript::evaluateOnCallFrame):
      (WebCore::InjectedScript::getFunctionDetails):
      (WebCore::InjectedScript::getProperties):
      (WebCore::InjectedScript::getInternalProperties):
      (WebCore::InjectedScript::nodeForObjectId):
      (WebCore::InjectedScript::releaseObject):
      (WebCore::InjectedScript::wrapCallFrames):
      (WebCore::InjectedScript::wrapObject):
      (WebCore::InjectedScript::wrapTable):
      (WebCore::InjectedScript::wrapNode):
      (WebCore::InjectedScript::findObjectById):
      (WebCore::InjectedScript::inspectNode):
      (WebCore::InjectedScript::releaseObjectGroup):
      (WebCore::InjectedScript::nodeAsScriptValue):
      * inspector/InjectedScript.h:
      * inspector/InjectedScriptBase.cpp:
      (WebCore::InjectedScriptBase::InjectedScriptBase):
      (WebCore::InjectedScriptBase::initialize):
      (WebCore::InjectedScriptBase::injectedScriptObject):
      (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
      (WebCore::InjectedScriptBase::makeCall):
      (WebCore::InjectedScriptBase::makeEvalCall):
      * inspector/InjectedScriptBase.h:
      * inspector/InjectedScriptCanvasModule.cpp:
      (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
      (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
      (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
      (WebCore::InjectedScriptCanvasModule::markFrameEnd):
      (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
      (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
      (WebCore::InjectedScriptCanvasModule::traceLog):
      (WebCore::InjectedScriptCanvasModule::replayTraceLog):
      (WebCore::InjectedScriptCanvasModule::resourceInfo):
      (WebCore::InjectedScriptCanvasModule::resourceState):
      * inspector/InjectedScriptCanvasModule.h:
      * inspector/InjectedScriptHost.cpp:
      (WebCore::InjectedScriptHost::inspectImpl):
      (WebCore::InjectedScriptHost::InspectableObject::get):
      * inspector/InjectedScriptHost.h:
      * inspector/InjectedScriptManager.cpp:
      (WebCore::InjectedScriptManager::injectedScriptFor):
      * inspector/InjectedScriptManager.h:
      * inspector/InjectedScriptModule.cpp:
      (WebCore::InjectedScriptModule::ensureInjected):
      * inspector/InspectorAgent.cpp:
      (WebCore::InspectorAgent::InspectorAgent):
      (WebCore::InspectorAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorAgent::inspect):
      * inspector/InspectorAgent.h:
      * inspector/InspectorAllInOne.cpp:
      * inspector/InspectorApplicationCacheAgent.cpp:
      (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
      (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
      (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
      (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
      (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
      (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
      * inspector/InspectorApplicationCacheAgent.h:
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::SelectorProfile::toInspectorObject):
      (WebCore::InspectorCSSAgent::InspectorCSSAgent):
      (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
      (WebCore::InspectorCSSAgent::getInlineStylesForNode):
      (WebCore::InspectorCSSAgent::getComputedStyleForNode):
      (WebCore::InspectorCSSAgent::getAllStyleSheets):
      (WebCore::InspectorCSSAgent::getStyleSheet):
      (WebCore::InspectorCSSAgent::setStyleText):
      (WebCore::InspectorCSSAgent::setPropertyText):
      (WebCore::InspectorCSSAgent::toggleProperty):
      (WebCore::InspectorCSSAgent::setRuleSelector):
      (WebCore::InspectorCSSAgent::addRule):
      (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
      (WebCore::InspectorCSSAgent::getNamedFlowCollection):
      (WebCore::InspectorCSSAgent::stopSelectorProfiler):
      (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
      (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
      (WebCore::InspectorCSSAgent::collectStyleSheets):
      (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
      (WebCore::InspectorCSSAgent::detectOrigin):
      (WebCore::InspectorCSSAgent::buildObjectForRule):
      (WebCore::InspectorCSSAgent::buildArrayForRuleList):
      (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
      (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
      (WebCore::InspectorCSSAgent::buildArrayForRegions):
      (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
      * inspector/InspectorCSSAgent.h:
      * inspector/InspectorCanvasAgent.cpp:
      (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
      (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
      (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
      (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
      (WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
      * inspector/InspectorCanvasAgent.h:
      * inspector/InspectorCanvasInstrumentation.h:
      (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
      (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
      * inspector/InspectorClient.cpp:
      * inspector/InspectorClient.h:
      * inspector/InspectorConsoleAgent.cpp:
      (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
      (WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
      (WebCore::InspectableHeapObject::get):
      * inspector/InspectorConsoleAgent.h:
      * inspector/InspectorController.cpp:
      * inspector/InspectorController.h:
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::InspectorDOMAgent):
      (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorDOMAgent::getDocument):
      (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
      (WebCore::InspectorDOMAgent::querySelectorAll):
      (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
      (WebCore::InspectorDOMAgent::getEventListenersForNode):
      (WebCore::InspectorDOMAgent::getSearchResults):
      (WebCore::InspectorDOMAgent::resolveNode):
      (WebCore::InspectorDOMAgent::getAttributes):
      (WebCore::InspectorDOMAgent::buildObjectForNode):
      (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
      (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
      (WebCore::InspectorDOMAgent::buildObjectForEventListener):
      (WebCore::InspectorDOMAgent::didCommitLoad):
      (WebCore::InspectorDOMAgent::didInsertDOMNode):
      (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorDOMDebuggerAgent.cpp:
      (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
      (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
      * inspector/InspectorDOMDebuggerAgent.h:
      * inspector/InspectorDOMStorageAgent.cpp:
      (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
      (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
      (WebCore::InspectorDOMStorageAgent::storageId):
      (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
      * inspector/InspectorDOMStorageAgent.h:
      * inspector/InspectorDatabaseAgent.cpp:
      (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
      (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
      * inspector/InspectorDatabaseAgent.h:
      * inspector/InspectorDatabaseResource.cpp:
      (WebCore::InspectorDatabaseResource::bind):
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
      (WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
      (WebCore::breakpointActionTypeForString):
      (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
      (WebCore::InspectorDebuggerAgent::setBreakpoint):
      (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
      (WebCore::scriptToInspectorObject):
      (WebCore::InspectorDebuggerAgent::searchInContent):
      (WebCore::InspectorDebuggerAgent::setScriptSource):
      (WebCore::InspectorDebuggerAgent::getFunctionDetails):
      (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
      (WebCore::InspectorDebuggerAgent::compileScript):
      (WebCore::InspectorDebuggerAgent::runScript):
      (WebCore::InspectorDebuggerAgent::currentCallFrames):
      (WebCore::InspectorDebuggerAgent::didParseSource):
      (WebCore::InspectorDebuggerAgent::didPause):
      (WebCore::InspectorDebuggerAgent::didContinue):
      (WebCore::InspectorDebuggerAgent::clear):
      * inspector/InspectorDebuggerAgent.h:
      * inspector/InspectorForwarding.h:
      * inspector/InspectorFrontendClientLocal.cpp:
      (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
      * inspector/InspectorFrontendHost.cpp:
      (WebCore::FrontendMenuProvider::create):
      (WebCore::FrontendMenuProvider::disconnect):
      (WebCore::FrontendMenuProvider::FrontendMenuProvider):
      (WebCore::FrontendMenuProvider::contextMenuItemSelected):
      (WebCore::FrontendMenuProvider::contextMenuCleared):
      (WebCore::InspectorFrontendHost::showContextMenu):
      * inspector/InspectorHeapProfilerAgent.cpp:
      (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
      (WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
      (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
      (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
      (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
      * inspector/InspectorHeapProfilerAgent.h:
      * inspector/InspectorIndexedDBAgent.cpp:
      (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
      (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
      * inspector/InspectorIndexedDBAgent.h:
      * inspector/InspectorInputAgent.cpp:
      (WebCore::InspectorInputAgent::InspectorInputAgent):
      (WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
      * inspector/InspectorInputAgent.h:
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InspectorInstrumentation.h:
      * inspector/InspectorLayerTreeAgent.cpp:
      (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
      (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorLayerTreeAgent::layersForNode):
      (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
      (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
      (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
      (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
      (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
      * inspector/InspectorLayerTreeAgent.h:
      * inspector/InspectorMemoryAgent.cpp:
      (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
      * inspector/InspectorMemoryAgent.h:
      * inspector/InspectorOverlay.cpp:
      * inspector/InspectorOverlay.h:
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::resourceTypeJson):
      (WebCore::InspectorPageAgent::cachedResourceTypeJson):
      (WebCore::InspectorPageAgent::InspectorPageAgent):
      (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
      (WebCore::buildObjectForCookie):
      (WebCore::buildArrayForCookies):
      (WebCore::InspectorPageAgent::getCookies):
      (WebCore::InspectorPageAgent::getResourceTree):
      (WebCore::InspectorPageAgent::searchInResource):
      (WebCore::buildObjectForSearchResult):
      (WebCore::InspectorPageAgent::searchInResources):
      (WebCore::InspectorPageAgent::buildObjectForFrame):
      (WebCore::InspectorPageAgent::buildObjectForFrameTree):
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
      (WebCore::InspectorProfilerAgent::createProfileHeader):
      (WebCore::InspectorProfilerAgent::createSnapshotHeader):
      (WebCore::InspectorProfilerAgent::getProfileHeaders):
      (WebCore::InspectorProfilerAgent::getCPUProfile):
      (WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
      (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
      (WebCore::InspectorProfilerAgent::getHeapObjectId):
      * inspector/InspectorProfilerAgent.h:
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
      (WebCore::buildObjectForTiming):
      (WebCore::buildObjectForResourceRequest):
      (WebCore::buildObjectForResourceResponse):
      (WebCore::buildObjectForCachedResource):
      (WebCore::InspectorResourceAgent::willSendRequest):
      (WebCore::InspectorResourceAgent::didReceiveResponse):
      (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
      (WebCore::InspectorResourceAgent::buildInitiatorObject):
      (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
      (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
      (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
      (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
      (WebCore::InspectorResourceAgent::InspectorResourceAgent):
      * inspector/InspectorResourceAgent.h:
      * inspector/InspectorRuntimeAgent.cpp:
      (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
      (WebCore::buildErrorRangeObject):
      (WebCore::InspectorRuntimeAgent::parse):
      (WebCore::InspectorRuntimeAgent::evaluate):
      (WebCore::InspectorRuntimeAgent::callFunctionOn):
      (WebCore::InspectorRuntimeAgent::getProperties):
      * inspector/InspectorRuntimeAgent.h:
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::buildSourceRangeObject):
      (WebCore::buildMediaObject):
      (WebCore::fillMediaListChain):
      (WebCore::InspectorStyle::buildObjectForStyle):
      (WebCore::InspectorStyle::buildArrayForComputedStyle):
      (WebCore::InspectorStyle::styleWithProperties):
      (WebCore::InspectorStyleSheet::create):
      (WebCore::InspectorStyleSheet::InspectorStyleSheet):
      (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
      (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
      (WebCore::selectorsFromSource):
      (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
      (WebCore::InspectorStyleSheet::buildObjectForRule):
      (WebCore::InspectorStyleSheet::buildObjectForStyle):
      (WebCore::InspectorStyleSheet::resourceStyleSheetText):
      (WebCore::InspectorStyleSheet::buildArrayForRuleList):
      (WebCore::InspectorStyleSheetForInlineStyle::create):
      (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
      * inspector/InspectorStyleSheet.h:
      (WebCore::InspectorCSSId::InspectorCSSId):
      (WebCore::InspectorStyleSheet::canBind):
      * inspector/InspectorStyleTextEditor.cpp:
      * inspector/InspectorTimelineAgent.cpp:
      (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
      (WebCore::toProtocol):
      (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
      (WebCore::InspectorTimelineAgent::setDOMCounters):
      (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
      (WebCore::InspectorTimelineAgent::sendEvent):
      * inspector/InspectorTimelineAgent.h:
      (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
      * inspector/InspectorWebAgentBase.h: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.h.
      (WebCore::InspectorAgentBase::InspectorAgentBase):
      * inspector/InspectorWorkerAgent.cpp:
      (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
      (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
      * inspector/InspectorWorkerAgent.h:
      * inspector/InstrumentingAgents.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/PageConsoleAgent.cpp:
      (WebCore::InspectableNode::get):
      * inspector/PageDebuggerAgent.cpp:
      * inspector/PageDebuggerAgent.h:
      * inspector/PageRuntimeAgent.cpp:
      (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
      * inspector/PageRuntimeAgent.h:
      * inspector/ScriptArguments.cpp:
      (WebCore::ScriptArguments::create):
      (WebCore::ScriptArguments::ScriptArguments):
      (WebCore::ScriptArguments::argumentAt):
      (WebCore::ScriptArguments::getFirstArgumentAsString):
      * inspector/ScriptArguments.h:
      * inspector/ScriptCallFrame.cpp:
      (WebCore::ScriptCallFrame::buildInspectorObject):
      * inspector/ScriptCallFrame.h:
      * inspector/ScriptCallStack.cpp:
      (WebCore::ScriptCallStack::buildInspectorArray):
      * inspector/ScriptCallStack.h:
      * inspector/ScriptDebugListener.h:
      * inspector/TimelineRecordFactory.cpp:
      * inspector/TimelineRecordFactory.h:
      (WebCore::TimelineRecordFactory::createWebSocketCreateData):
      (WebCore::TimelineRecordFactory::createGenericWebSocketData):
      * inspector/WorkerConsoleAgent.cpp:
      * inspector/WorkerDebuggerAgent.cpp:
      * inspector/WorkerInspectorController.cpp:
      * inspector/WorkerInspectorController.h:
      * inspector/WorkerRuntimeAgent.cpp:
      (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
      * inspector/WorkerRuntimeAgent.h:
      * page/Console.cpp:
      * page/ContentSecurityPolicy.cpp:
      * page/Frame.cpp:
      * page/PageConsole.cpp:
      * plugins/PluginView.cpp:
      (WebCore::PluginView::performRequest):
      * testing/Internals.cpp:
      (WebCore::Internals::parserMetaData):
      * testing/Internals.h:
      * workers/SharedWorkerGlobalScope.cpp:
      (WebCore::createConnectEvent):
      * workers/WorkerGlobalScope.cpp:
      (WebCore::WorkerGlobalScope::importScripts):
      * workers/WorkerThread.cpp:
      * xml/XMLTreeViewer.cpp:
      * xml/parser/XMLDocumentParser.cpp:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebview.cpp:
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      * WebCoreSupport/WebInspectorClient.mm:
      * WebView/WebFrame.mm:
      * WebView/WebView.mm:
      
      Source/WebKit/win:
      
      * WebFrame.cpp:
      * WebView.cpp:
      
      Source/WebKit2:
      
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::performJavaScriptURLRequest):
      * WebProcess/WebPage/WebInspector.cpp:
      * WebProcess/WebPage/WebInspector.h:
      * WebProcess/WebPage/WebPage.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3198444
  12. 10 Dec, 2013 1 commit
  13. 09 Dec, 2013 2 commits
    • fpizlo@apple.com's avatar
      Reveal array bounds checks in DFG IR · 8624c4b8
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125253
      
      Reviewed by Oliver Hunt and Mark Hahnenberg.
              
      In SSA mode, this reveals array bounds checks and the load of array length in DFG IR,
      making this a candidate for LICM.
      
      This also fixes a long-standing performance bug where the JSObject slow paths would
      always create contiguous storage, rather than type-specialized storage, when doing a
      "storage creating" storage, like:
              
          var o = {};
          o[0] = 42;
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/ExitKind.cpp:
      (JSC::exitKindToString):
      (JSC::exitKindIsCountable):
      * bytecode/ExitKind.h:
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGArrayMode.cpp:
      (JSC::DFG::permitsBoundsCheckLowering):
      (JSC::DFG::ArrayMode::permitsBoundsCheckLowering):
      * dfg/DFGArrayMode.h:
      (JSC::DFG::ArrayMode::lengthNeedsStorage):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      * dfg/DFGConstantFoldingPhase.cpp:
      (JSC::DFG::ConstantFoldingPhase::foldConstants):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGNodeType.h:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::compileInThreadImpl):
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSSALoweringPhase.cpp: Added.
      (JSC::DFG::SSALoweringPhase::SSALoweringPhase):
      (JSC::DFG::SSALoweringPhase::run):
      (JSC::DFG::SSALoweringPhase::handleNode):
      (JSC::DFG::SSALoweringPhase::lowerBoundsCheck):
      (JSC::DFG::performSSALowering):
      * dfg/DFGSSALoweringPhase.h: Added.
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileNode):
      (JSC::FTL::LowerDFGToLLVM::compileCheckInBounds):
      (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
      (JSC::FTL::LowerDFGToLLVM::compilePutByVal):
      (JSC::FTL::LowerDFGToLLVM::contiguousPutByValOutOfBounds):
      * runtime/JSObject.cpp:
      (JSC::JSObject::convertUndecidedForValue):
      (JSC::JSObject::createInitialForValueAndSet):
      (JSC::JSObject::putByIndexBeyondVectorLength):
      (JSC::JSObject::putDirectIndexBeyondVectorLength):
      * runtime/JSObject.h:
      * tests/stress/float32array-out-of-bounds.js: Added.
      (make):
      (foo):
      (test):
      * tests/stress/int32-object-out-of-bounds.js: Added.
      (make):
      (foo):
      (test):
      * tests/stress/int32-out-of-bounds.js: Added.
      (foo):
      (test):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8624c4b8
    • commit-queue@webkit.org's avatar
      Remove miscellaneous unnecessary build statements · 2afc0d63
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125466
      
      Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-09
      Reviewed by Darin Adler.
      
      * DerivedSources.make:
      * JavaScriptCore.vcxproj/build-generated-files.sh:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * make-generated-sources.sh:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2afc0d63
  14. 08 Dec, 2013 1 commit
    • fpizlo@apple.com's avatar
      Fold typedArray.length if typedArray is constant · ce995b22
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125252
      
      Source/JavaScriptCore: 
      
      Reviewed by Sam Weinig.
              
      This was meant to be easy. The problem is that there was no good place for putting
      the folding of typedArray.length to a constant. You can't quite do it in the
      bytecode parser because at that point you don't yet know if typedArray is really
      a typed array. You can't do it as part of constant folding because the folder
      assumes that it can opportunistically forward-flow a constant value without changing
      the IR; this doesn't work since we need to first change the IR to register a
      desired watchpoint and only after that can we introduce that constant. We could have
      done it in Fixup but that would have been awkward since Fixup's code for turning a
      GetById of "length" into GetArrayLength is already somewhat complex. We could have
      done it in CSE but CSE is already fairly gnarly and will probably get rewritten.
              
      So I introduced a new phase, called StrengthReduction. This phase should have any
      transformations that don't requite CFA or CSE and that it would be weird to put into
      those other phases.
              
      I also took the opportunity to refactor some of the other folding code.
              
      This also adds a test, but the test couldn't quite be a LayoutTests/js/regress so I
      introduced the notion of JavaScriptCore/tests/stress.
              
      The goal of this patch isn't really to improve performance or anything like that.
      It adds an optimization for completeness, and in doing so it unlocks a bunch of new
      possibilities. The one that I'm most excited about is revealing array length checks
      in DFG IR, which will allow for array bounds check hoisting and elimination.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::tryGetFoldableView):
      (JSC::DFG::Graph::tryGetFoldableViewForChild1):
      * dfg/DFGGraph.h:
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasTypedArray):
      (JSC::DFG::Node::typedArray):
      * dfg/DFGNodeType.h:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::compileInThreadImpl):
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
      (JSC::DFG::SpeculativeJIT::compileConstantIndexedPropertyStorage):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGStrengthReductionPhase.cpp: Added.
      (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase):
      (JSC::DFG::StrengthReductionPhase::run):
      (JSC::DFG::StrengthReductionPhase::handleNode):
      (JSC::DFG::StrengthReductionPhase::foldTypedArrayPropertyToConstant):
      (JSC::DFG::performStrengthReduction):
      * dfg/DFGStrengthReductionPhase.h: Added.
      * dfg/DFGWatchpointCollectionPhase.cpp:
      (JSC::DFG::WatchpointCollectionPhase::handle):
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileNode):
      (JSC::FTL::LowerDFGToLLVM::compileGetIndexedPropertyStorage):
      (JSC::FTL::LowerDFGToLLVM::compilePutByVal):
      (JSC::FTL::LowerDFGToLLVM::typedArrayLength):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (functionTransferArrayBuffer):
      * runtime/ArrayBufferView.h:
      * tests/stress: Added.
      * tests/stress/fold-typed-array-properties.js: Added.
      (foo):
      
      Tools: 
      
      Reviewed by Sam Weinig.
              
      Add Source/JavaScriptCore/tests/stress to the set of JS tests. This is where you
      should put tests that run just like JSRegress but don't run as part of LayoutTests.
      Currently I'm using it for tests that require some surgical support from jsc.cpp.
      
      * Scripts/run-javascriptcore-tests:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce995b22
  15. 04 Dec, 2013 6 commits
    • fpizlo@apple.com's avatar
      Fold constant typed arrays · ee327c85
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125205
      
      Source/JavaScriptCore: 
      
      Reviewed by Oliver Hunt and Mark Hahnenberg.
              
      If by some other mechanism we have a typed array access on a compile-time constant
      typed array pointer, then fold:
              
      - Array bounds checks. Specifically, fold the load of length.
              
      - Loading the vector.
              
      This needs to install a watchpoint on the array itself because of the possibility of
      neutering. Neutering is ridiculous. We do this without bloating the size of
      ArrayBuffer or JSArrayBufferView in the common case (i.e. the case where you
      allocated an array that didn't end up becoming a compile-time constant). To install
      the watchpoint, we slowDownAndWasteMemory and then create an incoming reference to
      the ArrayBuffer, where that incoming reference is from a watchpoint object. The
      ArrayBuffer already knows about such incoming references and can fire the
      watchpoints that way.
              
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGDesiredWatchpoints.cpp:
      (JSC::DFG::ArrayBufferViewWatchpointAdaptor::add):
      (JSC::DFG::DesiredWatchpoints::addLazily):
      * dfg/DFGDesiredWatchpoints.h:
      (JSC::DFG::GenericSetAdaptor::add):
      (JSC::DFG::GenericSetAdaptor::hasBeenInvalidated):
      (JSC::DFG::ArrayBufferViewWatchpointAdaptor::hasBeenInvalidated):
      (JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
      (JSC::DFG::GenericDesiredWatchpoints::areStillValid):
      (JSC::DFG::GenericDesiredWatchpoints::isStillValid):
      (JSC::DFG::GenericDesiredWatchpoints::shouldAssumeMixedState):
      (JSC::DFG::DesiredWatchpoints::isStillValid):
      (JSC::DFG::DesiredWatchpoints::shouldAssumeMixedState):
      (JSC::DFG::DesiredWatchpoints::isValidOrMixed):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::tryGetFoldableView):
      * dfg/DFGGraph.h:
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
      (JSC::DFG::SpeculativeJIT::emitTypedArrayBoundsCheck):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compileConstantIndexedPropertyStorage):
      (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGWatchpointCollectionPhase.cpp:
      (JSC::DFG::WatchpointCollectionPhase::handle):
      (JSC::DFG::WatchpointCollectionPhase::addLazily):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileGetIndexedPropertyStorage):
      (JSC::FTL::LowerDFGToLLVM::compileGetByVal):
      (JSC::FTL::LowerDFGToLLVM::compilePutByVal):
      (JSC::FTL::LowerDFGToLLVM::typedArrayLength):
      * runtime/ArrayBuffer.cpp:
      (JSC::ArrayBuffer::transfer):
      * runtime/ArrayBufferNeuteringWatchpoint.cpp: Added.
      (JSC::ArrayBufferNeuteringWatchpoint::ArrayBufferNeuteringWatchpoint):
      (JSC::ArrayBufferNeuteringWatchpoint::~ArrayBufferNeuteringWatchpoint):
      (JSC::ArrayBufferNeuteringWatchpoint::finishCreation):
      (JSC::ArrayBufferNeuteringWatchpoint::destroy):
      (JSC::ArrayBufferNeuteringWatchpoint::create):
      (JSC::ArrayBufferNeuteringWatchpoint::createStructure):
      * runtime/ArrayBufferNeuteringWatchpoint.h: Added.
      (JSC::ArrayBufferNeuteringWatchpoint::set):
      * runtime/VM.cpp:
      (JSC::VM::VM):
      * runtime/VM.h:
      
      LayoutTests: 
      
      Reviewed by Oliver Hunt and Mark Hahnenberg.
      
      * js/regress/fixed-typed-array-storage-expected.txt: Added.
      * js/regress/fixed-typed-array-storage-var-index-expected.txt: Added.
      * js/regress/fixed-typed-array-storage-var-index.html: Added.
      * js/regress/fixed-typed-array-storage.html: Added.
      * js/regress/script-tests/fixed-typed-array-storage-var-index.js: Added.
      (foo):
      * js/regress/script-tests/fixed-typed-array-storage.js: Added.
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee327c85
    • fpizlo@apple.com's avatar
      Infer constant closure variables · 88fedde1
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124630
      
      Source/JavaScriptCore: 
      
      Reviewed by Geoffrey Garen.
              
      Captured variables that are assigned once (not counting op_enter's Undefined
      initialization) and that are contained within a function that has thus far only been
      entered once are now constant folded. It's pretty awesome.
              
      This involves a watchpoint on the assignment to variables and a watchpoint on entry
      into the function. The former is reused from global variable constant inference and the
      latter is reused from one-time closure inference.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dumpBytecode):
      (JSC::CodeBlock::CodeBlock):
      * bytecode/Instruction.h:
      (JSC::Instruction::Instruction):
      * bytecode/Opcode.h:
      (JSC::padOpcodeName):
      * bytecode/UnlinkedCodeBlock.h:
      (JSC::UnlinkedInstruction::UnlinkedInstruction):
      * bytecode/VariableWatchpointSet.h:
      (JSC::VariableWatchpointSet::invalidate):
      * bytecode/Watchpoint.h:
      (JSC::WatchpointSet::invalidate):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::addVar):
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::emitInitLazyRegister):
      (JSC::BytecodeGenerator::emitMove):
      (JSC::BytecodeGenerator::emitNewFunctionInternal):
      (JSC::BytecodeGenerator::createArgumentsIfNecessary):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::addVar):
      (JSC::BytecodeGenerator::watchableVariable):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::getLocal):
      (JSC::DFG::ByteCodeParser::inferredConstant):
      (JSC::DFG::ByteCodeParser::parseBlock):
      (JSC::DFG::ByteCodeParser::parse):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::tryGetActivation):
      (JSC::DFG::Graph::tryGetRegisters):
      * dfg/DFGGraph.h:
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      (JSC::JIT::privateCompileSlowCases):
      * jit/JIT.h:
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_mov):
      (JSC::JIT::emit_op_captured_mov):
      (JSC::JIT::emit_op_new_captured_func):
      (JSC::JIT::emitSlow_op_captured_mov):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::emit_op_mov):
      (JSC::JIT::emit_op_captured_mov):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/CommonSlowPaths.h:
      * runtime/ConstantMode.h: Added.
      * runtime/JSGlobalObject.h:
      * runtime/JSScope.cpp:
      (JSC::abstractAccess):
      * runtime/SymbolTable.cpp:
      (JSC::SymbolTableEntry::prepareToWatch):
      
      LayoutTests: 
      
      Reviewed by Geoffrey Garen.
              
      This adds both correctness and performance tests for constant closure variable
      inference.
      
      * js/regress/infer-closure-const-then-mov-expected.txt: Added.
      * js/regress/infer-closure-const-then-mov-no-inline-expected.txt: Added.
      * js/regress/infer-closure-const-then-mov-no-inline.html: Added.
      * js/regress/infer-closure-const-then-mov.html: Added.
      * js/regress/infer-closure-const-then-put-to-scope-expected.txt: Added.
      * js/regress/infer-closure-const-then-put-to-scope-no-inline-expected.txt: Added.
      * js/regress/infer-closure-const-then-put-to-scope-no-inline.html: Added.
      * js/regress/infer-closure-const-then-put-to-scope.html: Added.
      * js/regress/infer-closure-const-then-reenter-expected.txt: Added.
      * js/regress/infer-closure-const-then-reenter-no-inline-expected.txt: Added.
      * js/regress/infer-closure-const-then-reenter-no-inline.html: Added.
      * js/regress/infer-closure-const-then-reenter.html: Added.
      * js/regress/script-tests/infer-closure-const-then-mov-no-inline.js: Added.
      * js/regress/script-tests/infer-closure-const-then-mov.js: Added.
      * js/regress/script-tests/infer-closure-const-then-put-to-scope-no-inline.js: Added.
      (thingy.):
      (thingy):
      * js/regress/script-tests/infer-closure-const-then-put-to-scope.js: Added.
      (thingy.):
      (thingy):
      * js/regress/script-tests/infer-closure-const-then-reenter-no-inline.js: Added.
      (.return.foo):
      (foo):
      * js/regress/script-tests/infer-closure-const-then-reenter.js: Added.
      (.return.foo):
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88fedde1
    • bfulgham@apple.com's avatar
      [Win] Unreviewed project file gardening. · 8b15ff35
      bfulgham@apple.com authored
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Remove deleted files from project.
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Put files in proper directory
      folders to match the directory structure of the source code.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b15ff35
    • joepeck@webkit.org's avatar
      Unreviewed Windows build fix attempt 2 after r160099. · 13972079
      joepeck@webkit.org authored
      * JavaScriptCore.vcxproj/copy-files.cmd:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13972079
    • joepeck@webkit.org's avatar
      Web Inspector: Push Remote Inspector debugging connection management into JavaScriptCore · d2ecf37f
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124613
      
      Reviewed by Timothy Hatcher.
      
      Source/JavaScriptCore:
      
      Move the ENABLE(REMOTE_INSPECTOR) remote debugger connection management
      into JavaScriptCore (originally from WebKit/mac). Include enhancements:
      
        * allow for different types of remote debuggable targets,
          eventually at least a JSContext, WebView, WKView.
        * allow debuggables to be registered and debugged on any thread. Unlike
          WebViews, JSContexts may be run entirely off of the main thread.
        * move the remote connection (XPC connection) itself off of the main thread,
          it doesn't need to be on the main thread.
      
      Make JSContext @class and JavaScriptCore::JSContextRef
      "JavaScript" Remote Debuggables.
      
      * inspector/remote/RemoteInspectorDebuggable.h: Added.
      * inspector/remote/RemoteInspectorDebuggable.cpp: Added.
      (Inspector::RemoteInspectorDebuggable::RemoteInspectorDebuggable):
      (Inspector::RemoteInspectorDebuggable::~RemoteInspectorDebuggable):
      (Inspector::RemoteInspectorDebuggable::init):
      (Inspector::RemoteInspectorDebuggable::update):
      (Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed):
      (Inspector::RemoteInspectorDebuggable::info):
      RemoteInspectorDebuggable defines a debuggable target. As long as
      something creates a debuggable and is set to allow remote inspection
      it will be listed in remote debuggers. For the different types of
      debuggables (JavaScript and Web) there is different basic information
      that may be listed.
      
      * inspector/InspectorFrontendChannel.h: Added.
      (Inspector::InspectorFrontendChannel::~InspectorFrontendChannel):
      The only thing a debuggable needs for remote debugging is an
      InspectorFrontendChannel a way to send messages to a remote frontend.
      This class provides that method, and is vended to the
      RemoteInspectorDebuggable when a remote connection is setup.
      
      * inspector/remote/RemoteInspector.h: Added.
      * inspector/remote/RemoteInspector.mm: Added.
      Singleton, created at least when the first Debuggable is created.
      This class manages the list of debuggables, any connection to a
      remote debugger proxy (XPC service "com.apple.webinspector").
      
      (Inspector::dispatchAsyncOnQueueSafeForAnyDebuggable):
      (Inspector::RemoteInspector::shared):
      (Inspector::RemoteInspector::RemoteInspector):
      (Inspector::RemoteInspector::nextAvailableIdentifier):
      (Inspector::RemoteInspector::registerDebuggable):
      (Inspector::RemoteInspector::unregisterDebuggable):
      (Inspector::RemoteInspector::updateDebuggable):
      Debuggable management. When debuggables are added, removed, or updated
      we stash a copy of the debuggable information and push an update to
      debuggers. Stashing a copy of the information in the RemoteInspector
      is a thread safe way to avoid walking over all debuggables to gather
      the information when it is needed.
      
      (Inspector::RemoteInspector::start):
      (Inspector::RemoteInspector::stop):
      Runtime API to enable / disable the feature.
      
      (Inspector::RemoteInspector::listingForDebuggable):
      (Inspector::RemoteInspector::pushListingNow):
      (Inspector::RemoteInspector::pushListingSoon):
      Pushing a listing to remote debuggers.
      
      (Inspector::RemoteInspector::sendMessageToRemoteFrontend):
      (Inspector::RemoteInspector::setupXPCConnectionIfNeeded):
      (Inspector::RemoteInspector::xpcConnectionReceivedMessage):
      (Inspector::RemoteInspector::xpcConnectionFailed):
      (Inspector::RemoteInspector::xpcConnectionUnhandledMessage):
      XPC setup, send, and receive handling.
      
      (Inspector::RemoteInspector::updateHasActiveDebugSession):
      Applications being debugged may want to know when a debug
      session is active. This provides that notification.
      
      (Inspector::RemoteInspector::receivedSetupMessage):
      (Inspector::RemoteInspector::receivedDataMessage):
      (Inspector::RemoteInspector::receivedDidCloseMessage):
      (Inspector::RemoteInspector::receivedGetListingMessage):
      (Inspector::RemoteInspector::receivedIndicateMessage):
      (Inspector::RemoteInspector::receivedConnectionDiedMessage):
      Dispatching incoming remote debugging protocol messages.
      These are wrapping above the inspector protocol messages.
      
      * inspector/remote/RemoteInspectorConstants.h: Added.
      Protocol messages and dictionary keys inside the messages.
      
      (Inspector::RemoteInspectorDebuggableInfo::RemoteInspectorDebuggableInfo):
      * inspector/remote/RemoteInspectorDebuggableConnection.h: Added.
      * inspector/remote/RemoteInspectorDebuggableConnection.mm: Added.
      This is a connection between the RemoteInspector singleton and a RemoteInspectorDebuggable.
      
      (Inspector::RemoteInspectorDebuggableConnection::RemoteInspectorDebuggableConnection):
      (Inspector::RemoteInspectorDebuggableConnection::~RemoteInspectorDebuggableConnection):
      Allow for dispatching messages on JavaScript debuggables on a dispatch_queue
      instead of the main queue.
      
      (Inspector::RemoteInspectorDebuggableConnection::destination):
      (Inspector::RemoteInspectorDebuggableConnection::connectionIdentifier):
      Needed in the remote debugging protocol to identify the remote debugger.
      
      (Inspector::RemoteInspectorDebuggableConnection::dispatchSyncOnDebuggable):
      (Inspector::RemoteInspectorDebuggableConnection::dispatchAsyncOnDebuggable):
      (Inspector::RemoteInspectorDebuggableConnection::setup):
      (Inspector::RemoteInspectorDebuggableConnection::closeFromDebuggable):
      (Inspector::RemoteInspectorDebuggableConnection::close):
      (Inspector::RemoteInspectorDebuggableConnection::sendMessageToBackend):
      (Inspector::RemoteInspectorDebuggableConnection::sendMessageToFrontend):
      The connection is a thin channel between the two sides that can be closed
      from either side, so there is some logic around multi-threaded access.
      
      * inspector/remote/RemoteInspectorXPCConnection.h: Added.
      (Inspector::RemoteInspectorXPCConnection::Client::~Client):
      * inspector/remote/RemoteInspectorXPCConnection.mm: Added.
      (Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection):
      (Inspector::RemoteInspectorXPCConnection::~RemoteInspectorXPCConnection):
      (Inspector::RemoteInspectorXPCConnection::close):
      (Inspector::RemoteInspectorXPCConnection::deserializeMessage):
      (Inspector::RemoteInspectorXPCConnection::handleEvent):
      (Inspector::RemoteInspectorXPCConnection::sendMessage):
      This is a connection between the RemoteInspector singleton and an XPC service
      named "com.apple.webinspector". This handles serialization of the dictionary
      messages to and from the service. The receiving is done on a non-main queue.
      
      * API/JSContext.h:
      * API/JSContext.mm:
      (-[JSContext name]):
      (-[JSContext setName:]):
      ObjC API to enable/disable JSContext remote inspection and give a name.
      
      * API/JSContextRef.h:
      * API/JSContextRef.cpp:
      (JSGlobalContextGetName):
      (JSGlobalContextSetName):
      C API to give a JSContext a name.
      
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::setName):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::name):
      Shared handling of the APIs above.
      
      * runtime/JSGlobalObjectDebuggable.cpp: Added.
      (JSC::JSGlobalObjectDebuggable::JSGlobalObjectDebuggable):
      (JSC::JSGlobalObjectDebuggable::name):
      (JSC::JSGlobalObjectDebuggable::connect):
      (JSC::JSGlobalObjectDebuggable::disconnect):
      (JSC::JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend):
      * runtime/JSGlobalObjectDebuggable.h: Added.
      Stub for the actual remote debugging implementation. We will push
      down the appropriate WebCore/inspector peices suitable for debugging
      just a JavaScript context.
      
      * CMakeLists.txt:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      Update build files.
      
      Source/WebCore:
      
      Make a WebCore::Page a "Web" Remote Debuggable.
      
      * bindings/js/JSDOMGlobalObject.cpp:
      Disable JavaScript context inspection on JSGlobalObjects inside WebCore::Page's.
      
      * page/Page.cpp:
      (WebCore::Page::Page):
      (WebCore::Page::remoteInspectionAllowed):
      (WebCore::Page::setRemoteInspectionAllowed):
      (WebCore::Page::remoteInspectorInformationDidChange):
      * page/Page.h:
      * page/PageDebuggable.h:
      * page/PageDebuggable.cpp: Added.
      (WebCore::PageDebuggable::PageDebuggable):
      (WebCore::PageDebuggable::name):
      (WebCore::PageDebuggable::url):
      (WebCore::PageDebuggable::hasLocalDebugger):
      (WebCore::PageDebuggable::connect):
      (WebCore::PageDebuggable::disconnect):
      (WebCore::PageDebuggable::dispatchMessageFromRemoteFrontend):
      (WebCore::PageDebuggable::setIndicating):
      Make a page a "Web" debuggable.
      
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      Misc.
      
      * inspector/InspectorClient.h:
      (WebCore::InspectorClient::indicate):
      (WebCore::InspectorClient::hideIndicate):
      Forward indicate methods to WebKit clients.
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::didChangeTitle):
      (WebCore::FrameLoader::dispatchDidCommitLoad):
      Push updates when remote debuggable information like the Page's
      URL or title change.
      
      * ForwardingHeaders/inspector/InspectorFrontendChannel.h:
      * inspector/InspectorForwarding.h:
      Re-export Inspector::InspectorFrontendChannel as WebCore::InspectorFrontendChannel
      to avoid needlessly updating code all over the place.
      
      * inspector/CodeGeneratorInspectorStrings.py:
      * inspector/InspectorWorkerAgent.cpp:
      * inspector/WorkerInspectorController.cpp:
      * testing/Internals.cpp:
      Update include names.
      
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::populate):
      Make the "Inspect Element" context menu work correctly when there is a
      remote inspector instead of a local inspector.
      
      Source/WebKit:
      
      * WebKit.xcodeproj/project.pbxproj:
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/InspectorClientBlackBerry.h:
      
      Source/WebKit/cf:
      
      * WebCoreSupport/WebInspectorClientCF.cpp:
      (WebInspectorClient::sendMessageToFrontend):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/InspectorClientEfl.h:
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/InspectorClientGtk.h:
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebInspectorClientIOS.mm:
      (WebInspectorClient::WebInspectorClient):
      (WebInspectorClient::inspectorDestroyed):
      
      Source/WebKit/mac:
      
      Remove the old ENABLE(REMOTE_INSPECTOR) connection management implementation.
      
      * WebCoreSupport/WebInspectorClient.h:
      * WebCoreSupport/WebInspectorClient.mm:
      (WebInspectorClient::indicate):
      (WebInspectorClient::hideIndicate):
      Hook up WebView indication through this new path.
      
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (WebFrameLoaderClient::dispatchDidReceiveTitle):
      * WebCoreSupport/WebInspectorClient.h:
      * WebCoreSupport/WebInspectorClient.mm:
      (WebInspectorClient::WebInspectorClient):
      (WebInspectorClient::inspectorDestroyed):
      * WebInspector/remote/WebInspectorClientRegistry.h: Removed.
      * WebInspector/remote/WebInspectorClientRegistry.mm: Removed.
      * WebInspector/remote/WebInspectorRelayDefinitions.h: Removed.
      * WebInspector/remote/WebInspectorRemoteChannel.h: Removed.
      * WebInspector/remote/WebInspectorRemoteChannel.mm: Removed.
      * WebInspector/remote/WebInspectorServer.h: Removed.
      * WebInspector/remote/WebInspectorServer.mm: Removed.
      * WebInspector/remote/WebInspectorServerWebViewConnection.h: Removed.
      * WebInspector/remote/WebInspectorServerWebViewConnection.mm: Removed.
      * WebInspector/remote/WebInspectorServerWebViewConnectionController.h: Removed.
      * WebInspector/remote/WebInspectorServerWebViewConnectionController.mm: Removed.
      * WebInspector/remote/WebInspectorXPCWrapper.h: Removed.
      * WebInspector/remote/WebInspectorXPCWrapper.m: Removed.
      * WebKit.exp:
      * WebView/WebView.mm:
      (-[WebView _commonInitializationWithFrameName:groupName:]):
      (+[WebView _enableRemoteInspector]):
      (+[WebView _disableRemoteInspector]):
      (+[WebView _disableAutoStartRemoteInspector]):
      (+[WebView _isRemoteInspectorEnabled]):
      (+[WebView _hasRemoteInspectorSession]):
      (-[WebView allowsRemoteInspection]):
      (-[WebView setAllowsRemoteInspection:]):
      (-[WebView setIndicatingForRemoteInspector:]):
      (-[WebView setHostApplicationBundleId:name:]):
      (-[WebView _didCommitLoadForFrame:]):
      * WebView/WebViewData.h:
      * WebView/WebViewData.mm:
      (-[WebViewPrivate init]):
      (-[WebViewPrivate dealloc]):
      * WebView/WebViewInternal.h:
      * WebView/WebViewPrivate.h:
      Remove old REMOTE_INSPECTOR.
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebInspectorClient.h:
      
      Source/WebKit/wince:
      
      * WebCoreSupport/InspectorClientWinCE.h:
      
      Source/WebKit2:
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      * WebProcess/com.apple.WebProcess.sb.in:
      Allow the WebProcess to access the "com.apple.webinspector" named
      XPC service to expose its WebCore::Page's to remote debuggers.
      
      Source/WTF:
      
      * wtf/ios/WebCoreThread.cpp:
      * wtf/ios/WebCoreThread.h:
      Expose WebThreadRun/WebThreadRunSync iOS methods defined in WebCore through
      WTF so that JavaScriptCore can use it. Another such method already existed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2ecf37f
    • msaboff@apple.com's avatar
      Move the setting up of callee's callFrame from pushFrame to callToJavaScript thunk · 6f0b31aa
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123999
      
      Reviewed by Filip Pizlo.
      
      Changed LLInt and/or JIT enabled ports to allocate the stack frame in the
      callToJavaScript stub.  Added an additional stub, callToNativeFunction that
      allocates a stack frame in a similar way for calling native entry points
      that take a single ExecState* argument.  These stubs are implemented
      using common macros in LowLevelInterpreter{32_64,64}.asm.  There are also
      Windows X86 and X86-64 versions in the corresponding JitStubsXX.h.
      The stubs allocate and create a sentinel frame, then create the callee's
      frame, populating  the header and arguments from the passed in ProtoCallFrame*.
      It is assumed that the caller of either stub does a check for enough stack space
      via JSStack::entryCheck().
      
      For ports using the C-Loop interpreter, the prior method for allocating stack
      frame and invoking functions is used, namely with JSStack::pushFrame() and
      ::popFrame().
      
      Made spelling changes "sentinal" -> "sentinel".
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * interpreter/CachedCall.h:
      (JSC::CachedCall::CachedCall):
      (JSC::CachedCall::setThis):
      (JSC::CachedCall::setArgument):
      * interpreter/CallFrameClosure.h:
      (JSC::CallFrameClosure::resetCallFrame):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall):
      * interpreter/Interpreter.h:
      * interpreter/JSStack.h:
      * interpreter/JSStackInlines.h:
      (JSC::JSStack::entryCheck):
      (JSC::JSStack::pushFrame):
      (JSC::JSStack::popFrame):
      * interpreter/ProtoCallFrame.cpp: Added.
      (JSC::ProtoCallFrame::init):
      * interpreter/ProtoCallFrame.h: Added.
      (JSC::ProtoCallFrame::codeBlock):
      (JSC::ProtoCallFrame::setCodeBlock):
      (JSC::ProtoCallFrame::setScope):
      (JSC::ProtoCallFrame::setCallee):
      (JSC::ProtoCallFrame::argumentCountIncludingThis):
      (JSC::ProtoCallFrame::argumentCount):
      (JSC::ProtoCallFrame::setArgumentCountIncludingThis):
      (JSC::ProtoCallFrame::setPaddedArgsCount):
      (JSC::ProtoCallFrame::clearCurrentVPC):
      (JSC::ProtoCallFrame::setThisValue):
      (JSC::ProtoCallFrame::setArgument):
      * jit/JITCode.cpp:
      (JSC::JITCode::execute):
      * jit/JITCode.h:
      * jit/JITOperations.cpp:
      * jit/JITStubs.h:
      * jit/JITStubsMSVC64.asm:
      * jit/JITStubsX86.h:
      * llint/LLIntOffsetsExtractor.cpp:
      * llint/LLIntThunks.h:
      * llint/LowLevelInterpreter.asm:
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/ArgList.h:
      (JSC::ArgList::data):
      * runtime/JSArray.cpp:
      (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
      * runtime/StringPrototype.cpp:
      (JSC::replaceUsingRegExpSearch):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f0b31aa
  16. 03 Dec, 2013 1 commit
    • mark.lam@apple.com's avatar
      Fix LLINT_C_LOOP build for Win64. · f60b15bd
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125186.
      
      Reviewed by Michael Saboff.
      
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * jit/JITOperationsMSVC64.cpp: Added.
      (JSC::getHostCallReturnValueWithExecState):
      - Win64 will build JITStubMSVC64.asm even when !ENABLE(JIT). This results
        in a linkage error due to a missing getHostCallReturnValueWithExecState().
        So, we add a stub getHostCallReturnValueWithExecState() here to satisfy
        that linkage. This function will never be called.
        The alternative to providing such a stub is to make the MSVC project
        recognize if the JIT is enabled or not, and exclude JITStubMSVC64.asm
        if it's not enabled. We don't currently set ENABLE(JIT) via the MSVC
        project and the work to do that is too much trouble for what we're trying
        to achieve here. So, we're opting for this simpler workaround instead.
      
      * llint/LowLevelInterpreter.asm:
      * llint/LowLevelInterpreter.cpp:
      (JSC::CLoop::execute):
      - Don't build callToJavaScript if we're building the C loop. Otherwise,
        the C loop won't build if !ENABLE(COMPUTE_GOTO_OPCODES). 
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f60b15bd
  17. 02 Dec, 2013 1 commit
    • fpizlo@apple.com's avatar
      Stores to local captured variables should be intercepted · 0309686b
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124883
      
      Source/JavaScriptCore: 
      
      Reviewed by Mark Hahnenberg.
              
      Previously, in bytecode, you could assign to a captured variable just as you would
      assign to any other kind of variable. This complicates closure variable constant
      inference because we don't have any place where we can intercept stores to captured
      variables in the LLInt.
              
      This patch institutes a policy that only certain instructions can store to captured
      variables. If you interpret those instructions and you are required to notifyWrite()
      then you need to check if the relevant variable is captured. Those instructions are
      tracked in CodeBlock.cpp's VerifyCapturedDef. The main one is simply op_captured_mov.
      In the future, we'll probably modify those instructions to have a pointer directly to
      the VariableWatchpointSet; but for now we just introduce the captured instructions as
      placeholders.
              
      In order to validate that the placeholders are inserted correctly, this patch improves
      the CodeBlock validation to be able to inspect every def in the bytecode. To do that,
      this patch refactors the liveness analysis' use/def calculator to be reusable; it now
      takes a functor for each use or def.
              
      In the process of refactoring the liveness analysis, I noticed that op_enter was
      claiming to def all callee registers. That's wrong; it only defs the non-temporary
      variables. Making that change revealed preexisting bugs in the liveness analysis, since
      now the validator would pick up cases where the bytecode claimed to use a temporary and
      the def calculator never noticed the definition (or the converse - where the bytecode
      was actually not using a temporary but the liveness analysis thought that it was a
      use). This patch fixes a few of those bugs.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/BytecodeLivenessAnalysis.cpp:
      (JSC::stepOverInstruction):
      * bytecode/BytecodeUseDef.h: Added.
      (JSC::computeUsesForBytecodeOffset):
      (JSC::computeDefsForBytecodeOffset):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dumpBytecode):
      (JSC::CodeBlock::isCaptured):
      (JSC::CodeBlock::validate):
      * bytecode/CodeBlock.h:
      * bytecode/Opcode.h:
      (JSC::padOpcodeName):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::resolveCallee):
      (JSC::BytecodeGenerator::emitMove):
      (JSC::BytecodeGenerator::isCaptured):
      (JSC::BytecodeGenerator::local):
      (JSC::BytecodeGenerator::constLocal):
      (JSC::BytecodeGenerator::emitNewFunction):
      (JSC::BytecodeGenerator::emitLazyNewFunction):
      (JSC::BytecodeGenerator::emitNewFunctionInternal):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::Local::Local):
      (JSC::Local::isCaptured):
      (JSC::Local::captureMode):
      (JSC::BytecodeGenerator::captureMode):
      (JSC::BytecodeGenerator::emitNode):
      (JSC::BytecodeGenerator::pushOptimisedForIn):
      * bytecompiler/NodesCodegen.cpp:
      (JSC::PostfixNode::emitResolve):
      (JSC::PrefixNode::emitResolve):
      (JSC::ReadModifyResolveNode::emitBytecode):
      (JSC::AssignResolveNode::emitBytecode):
      (JSC::ConstDeclNode::emitCodeSingle):
      (JSC::ForInNode::emitBytecode):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCapabilities.cpp:
      (JSC::DFG::capabilityLevel):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompileMainPass):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/SymbolTable.h:
      (JSC::SymbolTable::isCaptured):
      
      LayoutTests: 
      
      Reviewed by Mark Hahnenberg.
      
      * js/regress/captured-assignments-expected.txt: Added.
      * js/regress/captured-assignments.html: Added.
      * js/regress/script-tests/captured-assignments.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0309686b
  18. 26 Nov, 2013 1 commit
    • fpizlo@apple.com's avatar
      Restructure global variable constant inference so that it could work for any... · 8646834a
      fpizlo@apple.com authored
      Restructure global variable constant inference so that it could work for any kind of symbol table variable
      https://bugs.webkit.org/show_bug.cgi?id=124760
      
      Reviewed by Oliver Hunt.
              
      This changes the way global variable constant inference works so that it can be reused
      for closure variable constant inference. Some of the premises that originally motivated
      this patch are somewhat wrong, but it led to some simplifications anyway and I suspect
      that we'll be able to fix those premises in the future. The main point of this patch is
      to make it easy to reuse global variable constant inference for closure variable
      constant inference, and this will be possible provided we can also either (a) infer
      one-shot closures (easy) or (b) infer closure variables that are always assigned prior
      to first use.
              
      One of the things that this patch is meant to enable is constant inference for closure
      variables that may be part of a multi-shot closure. Closure variables may be
      instantiated multiple times, like:
              
          function foo() {
              var WIDTH = 45;
              function bar() {
                  ... use WIDTH ...
              }
              ...
          }
              
      Even if foo() is called many times and WIDTH is assigned to multiple times, that
      doesn't change the fact that it's a constant. The goal of closure variable constant
      inference is to catch any case where a closure variable has been assigned at least once
      and its value has never changed. This patch doesn't implement that, but it does change
      global variable constant inference to have most of the powers needed to do that. Note
      that most likely we will use this functionality only to implement constant inference
      for one-shot closures, but the resulting machinery is still simpler than what we had
      before.
              
      This involves three changes:
              
          - The watchpoint object now contains the inferred value. This involves creating a
            new kind of watchpoint set, the VariableWatchpointSet. We will reuse this object
            for closure variables.
              
          - Writing to a variable that is watchpointed still involves these three states that
            we proceed through monotonically (Uninitialized->Initialized->Invalidated) but
            now, the Initialized->Invalidated state transition only happens if we change the
            variable's value, rather than store to the variable. Repeatedly storing the same
            value won't change the variable's state.
              
          - On 64-bit systems (the only systems on which we do concurrent JIT), you no longer
            need fancy fencing to get a consistent view of the watchpoint in the JIT. The
            state of the VariableWatchpointSet for the purposes of constant folding is
            entirely encapsulated in the VariableWatchpointSet::m_inferredValue. If that is
            JSValue() then you cannot fold (either because the set is uninitialized or
            because it's invalidated - doesn't matter which); on the other hand if the value
            is anything other than JSValue() then you can fold, and that's the value you fold
            to. Simple!
              
      This also changes the way that DFG IR deals with variable watchpoints. It's now
      oblivious to global variables. You install a watchpoint using VariableWatchpoint and
      you notify write using NotifyWrite. Easy!
              
      Note that this will requires some more tweaks because of the fact that op_enter will
      store Undefined into every captured variable. Hence it won't even work for one-shot
      closures. One-shot closures are easily fixed by introducing another state (so we'll
      have Uninitialized->Undefined->Initialized->Invalidated). Multi-shot closures will
      require static analysis. One-shot closures are clearly a higher priority.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/Instruction.h:
      * bytecode/VariableWatchpointSet.h: Added.
      (JSC::VariableWatchpointSet::VariableWatchpointSet):
      (JSC::VariableWatchpointSet::~VariableWatchpointSet):
      (JSC::VariableWatchpointSet::inferredValue):
      (JSC::VariableWatchpointSet::notifyWrite):
      (JSC::VariableWatchpointSet::invalidate):
      (JSC::VariableWatchpointSet::finalizeUnconditionally):
      (JSC::VariableWatchpointSet::addressOfInferredValue):
      * bytecode/Watchpoint.h:
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::performNodeCSE):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasRegisterPointer):
      (JSC::DFG::Node::hasVariableWatchpointSet):
      (JSC::DFG::Node::variableWatchpointSet):
      * dfg/DFGNodeType.h:
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileArithMod):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGWatchpointCollectionPhase.cpp:
      (JSC::DFG::WatchpointCollectionPhase::handle):
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileNode):
      (JSC::FTL::LowerDFGToLLVM::compileNotifyWrite):
      * jit/JIT.h:
      * jit/JITOperations.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emitNotifyWrite):
      (JSC::JIT::emitPutGlobalVar):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::emitNotifyWrite):
      (JSC::JIT::emitPutGlobalVar):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::addGlobalVar):
      (JSC::JSGlobalObject::addFunction):
      * runtime/JSGlobalObject.h:
      * runtime/JSScope.h:
      (JSC::ResolveOp::ResolveOp):
      * runtime/JSSymbolTableObject.h:
      (JSC::symbolTablePut):
      (JSC::symbolTablePutWithAttributes):
      * runtime/SymbolTable.cpp:
      (JSC::SymbolTableEntry::inferredValue):
      (JSC::SymbolTableEntry::prepareToWatch):
      (JSC::SymbolTableEntry::addWatchpoint):
      (JSC::SymbolTableEntry::notifyWriteSlow):
      (JSC::SymbolTable::visitChildren):
      (JSC::SymbolTable::WatchpointCleanup::WatchpointCleanup):
      (JSC::SymbolTable::WatchpointCleanup::~WatchpointCleanup):
      (JSC::SymbolTable::WatchpointCleanup::finalizeUnconditionally):
      * runtime/SymbolTable.h:
      (JSC::SymbolTableEntry::watchpointSet):
      (JSC::SymbolTableEntry::notifyWrite):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8646834a
  19. 21 Nov, 2013 1 commit
  20. 20 Nov, 2013 1 commit
    • mark.lam@apple.com's avatar
      Introducing VMEntryScope to update the VM stack limit. · 30721257
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124634.
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      1. Introduced USE(SEPARATE_C_AND_JS_STACK) (defined in Platform.h).
         Currently, it is hardcoded to use separate C and JS stacks. Once we
         switch to using the C stack for JS frames, we'll need to fix this to
         only be enabled when ENABLE(LLINT_C_LOOP).
      
      2. Stack limits are now tracked in the VM.
      
         Logically, there are 2 stack limits:
         a. m_stackLimit for the native C stack, and
         b. m_jsStackLimit for the JS stack.
      
         If USE(SEPARATE_C_AND_JS_STACK), then the 2 limits are the same
         value, and are implemented as 2 fields in a union.
      
      3. The VM native stackLimit is set as follows:
         a. Initially, the VM sets it to the limit of the stack of the thread that
            instantiated the VM. This allows the parser and bytecode generator to
            run before we enter the VM to execute JS code.
      
         b. Upon entry into the VM to execute JS code (via one of the
            Interpreter::execute...() functions), we instantiate a VMEntryScope
            that sets the VM's stackLimit to the limit of the current thread's
            stack. The VMEntryScope will automatically restore the previous
            entryScope and stack limit upon destruction.
      
         If USE(SEPARATE_C_AND_JS_STACK), the JSStack's methods will set the VM's
         jsStackLimit whenever it grows or shrinks.
      
      4. The VM now provides a isSafeToRecurse() function that compares the
         current stack pointer against its native stackLimit. This subsumes and
         obsoletes the VMStackBounds class.
      
      5. The VMEntryScope class also subsumes DynamicGlobalObjectScope for
         tracking the JSGlobalObject that we last entered the VM with.
      
      6. Renamed dynamicGlobalObject() to vmEntryGlobalObject() since that is
         the value that the function retrieves.
      
      7. Changed JIT and LLINT code to do stack checks against the jsStackLimit
         in the VM class instead of the JSStack.
      
      * API/JSBase.cpp:
      (JSEvaluateScript):
      (JSCheckScriptSyntax):
      * API/JSContextRef.cpp:
      (JSGlobalContextRetain):
      (JSGlobalContextRelease):
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitNode):
      (JSC::BytecodeGenerator::emitNodeInConditionContext):
      * debugger/Debugger.cpp:
      (JSC::Debugger::detach):
      (JSC::Debugger::recompileAllJSFunctions):
      (JSC::Debugger::pauseIfNeeded):
      * debugger/DebuggerCallFrame.cpp:
      (JSC::DebuggerCallFrame::vmEntryGlobalObject):
      * debugger/DebuggerCallFrame.h:
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::compileFunction):
      * dfg/DFGOSREntry.cpp:
      * ftl/FTLLink.cpp:
      (JSC::FTL::link):
      * ftl/FTLOSREntry.cpp:
      * heap/Heap.cpp:
      (JSC::Heap::lastChanceToFinalize):
      (JSC::Heap::deleteAllCompiledCode):
      * interpreter/CachedCall.h:
      (JSC::CachedCall::CachedCall):
      * interpreter/CallFrame.cpp:
      (JSC::CallFrame::vmEntryGlobalObject):
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      (JSC::unwindCallFrame):
      (JSC::Interpreter::unwind):
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall):
      (JSC::Interpreter::debug):
      * interpreter/JSStack.cpp:
      (JSC::JSStack::JSStack):
      (JSC::JSStack::growSlowCase):
      * interpreter/JSStack.h:
      * interpreter/JSStackInlines.h:
      (JSC::JSStack::shrink):
      (JSC::JSStack::grow):
      - Moved these inlined functions here from JSStack.h. It reduces some
        #include dependencies of JSSTack.h which had previously resulted
        in some EWS bots' unhappiness with this patch.
      (JSC::JSStack::updateStackLimit):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompile):
      * jit/JITCall.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITOperations.cpp:
      * llint/LLIntSlowPaths.cpp:
      * llint/LowLevelInterpreter.asm:
      * parser/Parser.cpp:
      (JSC::::Parser):
      * parser/Parser.h:
      (JSC::Parser::canRecurse):
      * runtime/CommonSlowPaths.h:
      * runtime/Completion.cpp:
      (JSC::evaluate):
      * runtime/FunctionConstructor.cpp:
      (JSC::constructFunctionSkippingEvalEnabledCheck):
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/StringRecursionChecker.h:
      (JSC::StringRecursionChecker::performCheck):
      * runtime/VM.cpp:
      (JSC::VM::VM):
      (JSC::VM::releaseExecutableMemory):
      (JSC::VM::throwException):
      * runtime/VM.h:
      (JSC::VM::addressOfJSStackLimit):
      (JSC::VM::jsStackLimit):
      (JSC::VM::setJSStackLimit):
      (JSC::VM::stackLimit):
      (JSC::VM::setStackLimit):
      (JSC::VM::isSafeToRecurse):
      * runtime/VMEntryScope.cpp: Added.
      (JSC::VMEntryScope::VMEntryScope):
      (JSC::VMEntryScope::~VMEntryScope):
      (JSC::VMEntryScope::requiredCapacity):
      * runtime/VMEntryScope.h: Added.
      (JSC::VMEntryScope::globalObject):
      * runtime/VMStackBounds.h: Removed.
      
      Source/WebCore: 
      
      No new tests.
      
      Renamed dynamicGlobalObject() to vmEntryGlobalObject().
      Replaced uses of DynamicGlobalObjectScope with VMEntryScope.
      
      * ForwardingHeaders/runtime/VMEntryScope.h: Added.
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * bindings/js/JSCryptoAlgorithmBuilder.cpp:
      (WebCore::JSCryptoAlgorithmBuilder::add):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::create):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::firstDOMWindow):
      * bindings/js/JSErrorHandler.cpp:
      (WebCore::JSErrorHandler::handleEvent):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JavaScriptCallFrame.h:
      (WebCore::JavaScriptCallFrame::vmEntryGlobalObject):
      * bindings/js/PageScriptDebugServer.cpp:
      (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::evaluateBreakpointAction):
      (WebCore::ScriptDebugServer::handlePause):
      * bindings/js/WorkerScriptDebugServer.cpp:
      (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
      * bindings/objc/WebScriptObject.mm:
      (WebCore::addExceptionToConsole):
      * bridge/c/c_utility.cpp:
      (JSC::Bindings::convertValueToNPVariant):
      * bridge/objc/objc_instance.mm:
      (ObjcInstance::moveGlobalExceptionToExecState):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::convertValueToObjcObject):
      * bridge/objc/objc_utility.mm:
      (JSC::Bindings::convertValueToObjcValue):
      
      Source/WebKit/mac: 
      
      * WebView/WebScriptDebugger.mm:
      (WebScriptDebugger::sourceParsed):
      
      Source/WTF: 
      
      * wtf/Platform.h:
      * wtf/StackBounds.h:
      (WTF::StackBounds::StackBounds):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30721257
  21. 19 Nov, 2013 1 commit
  22. 18 Nov, 2013 1 commit
  23. 17 Nov, 2013 1 commit
    • fpizlo@apple.com's avatar
      FTL should have an explicit notion of bytecode liveness · 002405c0
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124181
      
      Source/JavaScriptCore: 
      
      Reviewed by Sam Weinig.
              
      This makes FTL OSR exit use bytecode liveness analysis to determine which variables
      to include values for. The decision of how to get the values of variables is based on
      forward propagation of MovHints and SetLocals.
              
      This fixes a bunch of bugs (like https://bugs.webkit.org/show_bug.cgi?id=124138 but
      also others that I noticed when I started writing more targetted tests) and allows us
      to remove some sketchy code.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/BytecodeBasicBlock.h:
      * bytecode/BytecodeLivenessAnalysis.cpp:
      (JSC::isValidRegisterForLiveness):
      (JSC::setForOperand):
      (JSC::computeUsesForBytecodeOffset):
      (JSC::computeDefsForBytecodeOffset):
      (JSC::stepOverInstruction):
      (JSC::computeLocalLivenessForBytecodeOffset):
      (JSC::BytecodeLivenessAnalysis::runLivenessFixpoint):
      (JSC::BytecodeLivenessAnalysis::operandIsLiveAtBytecodeOffset):
      (JSC::getLivenessInfo):
      (JSC::BytecodeLivenessAnalysis::getLivenessInfoAtBytecodeOffset):
      (JSC::BytecodeLivenessAnalysis::computeFullLiveness):
      * bytecode/BytecodeLivenessAnalysis.h:
      * bytecode/BytecodeLivenessAnalysisInlines.h: Added.
      (JSC::operandIsAlwaysLive):
      (JSC::operandThatIsNotAlwaysLiveIsLive):
      (JSC::operandIsLive):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::captureCount):
      (JSC::CodeBlock::captureStart):
      (JSC::CodeBlock::captureEnd):
      * bytecode/CodeOrigin.cpp:
      (JSC::InlineCallFrame::dumpInContext):
      * bytecode/FullBytecodeLiveness.h: Added.
      (JSC::FullBytecodeLiveness::FullBytecodeLiveness):
      (JSC::FullBytecodeLiveness::getOut):
      (JSC::FullBytecodeLiveness::operandIsLive):
      (JSC::FullBytecodeLiveness::getLiveness):
      * dfg/DFGAvailability.cpp: Added.
      (JSC::DFG::Availability::dump):
      (JSC::DFG::Availability::dumpInContext):
      * dfg/DFGAvailability.h: Added.
      (JSC::DFG::Availability::Availability):
      (JSC::DFG::Availability::unavailable):
      (JSC::DFG::Availability::withFlush):
      (JSC::DFG::Availability::withNode):
      (JSC::DFG::Availability::withUnavailableNode):
      (JSC::DFG::Availability::nodeIsUndecided):
      (JSC::DFG::Availability::nodeIsUnavailable):
      (JSC::DFG::Availability::hasNode):
      (JSC::DFG::Availability::node):
      (JSC::DFG::Availability::flushedAt):
      (JSC::DFG::Availability::operator!):
      (JSC::DFG::Availability::operator==):
      (JSC::DFG::Availability::merge):
      (JSC::DFG::Availability::mergeNodes):
      (JSC::DFG::Availability::unavailableMarker):
      * dfg/DFGBasicBlock.h:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGDisassembler.cpp:
      (JSC::DFG::Disassembler::Disassembler):
      * dfg/DFGFlushFormat.cpp:
      (WTF::printInternal):
      * dfg/DFGFlushFormat.h:
      (JSC::DFG::resultFor):
      (JSC::DFG::useKindFor):
      (JSC::DFG::dataFormatFor):
      * dfg/DFGFlushedAt.cpp:
      (JSC::DFG::FlushedAt::dump):
      * dfg/DFGFlushedAt.h:
      (JSC::DFG::FlushedAt::FlushedAt):
      (JSC::DFG::FlushedAt::merge):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump):
      (JSC::DFG::Graph::livenessFor):
      (JSC::DFG::Graph::isLiveInBytecode):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::baselineCodeBlockFor):
      * dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
      (JSC::DFG::OSRAvailabilityAnalysisPhase::run):
      * dfg/DFGOSRAvailabilityAnalysisPhase.h:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::compileInThreadImpl):
      * dfg/DFGResurrectionForValidationPhase.cpp: Added.
      (JSC::DFG::ResurrectionForValidationPhase::ResurrectionForValidationPhase):
      (JSC::DFG::ResurrectionForValidationPhase::run):
      (JSC::DFG::performResurrectionForValidation):
      * dfg/DFGResurrectionForValidationPhase.h: Added.
      * dfg/DFGSSAConversionPhase.cpp:
      (JSC::DFG::SSAConversionPhase::run):
      * dfg/DFGValueSource.h:
      (JSC::DFG::ValueSource::forFlushFormat):
      * dfg/DFGVariableAccessData.h:
      * ftl/FTLExitValue.cpp:
      (JSC::FTL::ExitValue::dumpInContext):
      * ftl/FTLInlineCacheSize.cpp:
      (JSC::FTL::sizeOfGetById):
      * ftl/FTLLocation.cpp:
      (JSC::FTL::Location::gpr):
      (JSC::FTL::Location::fpr):
      (JSC::FTL::Location::directGPR):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM):
      (JSC::FTL::LowerDFGToLLVM::compileBlock):
      (JSC::FTL::LowerDFGToLLVM::compileNode):
      (JSC::FTL::LowerDFGToLLVM::compileSetLocal):
      (JSC::FTL::LowerDFGToLLVM::compileZombieHint):
      (JSC::FTL::LowerDFGToLLVM::compilePutById):
      (JSC::FTL::LowerDFGToLLVM::compileInvalidationPoint):
      (JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock):
      (JSC::FTL::LowerDFGToLLVM::appendOSRExit):
      (JSC::FTL::LowerDFGToLLVM::emitOSRExitCall):
      (JSC::FTL::LowerDFGToLLVM::buildExitArguments):
      (JSC::FTL::LowerDFGToLLVM::addExitArgumentForNode):
      (JSC::FTL::LowerDFGToLLVM::observeMovHint):
      * ftl/FTLOutput.h:
      (JSC::FTL::Output::alloca):
      * ftl/FTLValueSource.cpp: Removed.
      * ftl/FTLValueSource.h: Removed.
      * llvm/LLVMAPIFunctions.h:
      * runtime/DumpContext.cpp:
      (JSC::DumpContext::DumpContext):
      * runtime/DumpContext.h:
      * runtime/Options.h:
      * runtime/SymbolTable.h:
      (JSC::SharedSymbolTable::captureStart):
      (JSC::SharedSymbolTable::captureEnd):
      (JSC::SharedSymbolTable::captureCount):
      
      Tools: 
      
      Reviewed by Mark Hahnenberg.
      
      * Scripts/run-jsc-stress-tests:
      
      LayoutTests: 
      
      Reviewed by Mark Hahnenberg or Sam Weinig.
              
      I totally added this test after the rest of the patch was r+'d. Under the right tier-up
      modes this triggers one of the bugs that the rest of the patch is trying to avoid.
      
      * js/regress/script-tests/weird-inlining-const-prop.js: Added.
      (foo):
      (bar):
      (fuzz):
      (testImpl):
      (test):
      * js/regress/weird-inlining-const-prop-expected.txt: Added.
      * js/regress/weird-inlining-const-prop.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      002405c0
  24. 15 Nov, 2013 3 commits
    • commit-queue@webkit.org's avatar
      [Win] JavaScript crashes on 64-bit with JIT enabled. · c5d9e32c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124409
      
      Patch by peavo@outlook.com <peavo@outlook.com> on 2013-11-15
      Reviewed by Michael Saboff.
      
      These are issues found with JIT on 64-bit:
      - The registers rsi and rdi in callToJavaScript needs to be saved and restored. This is required by the Windows 64-bit ABI.
      - The getHostCallReturnValue function needs to be updated according to it's GCC counterpart.
      - The poke argument offset needs to be 20h, because Windows 64-bit ABI requires stack space allocated for the 4 argument registers.
      
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Re-added JITStubsMSVC64.asm to project.
      * jit/CCallHelpers.h: Set poke argument offset.
      (JSC::CCallHelpers::setupArguments): Compile fix, added needed method.
      * jit/JITStubsMSVC64.asm: Save and restore registers rsi and rdi.
                                Update getHostCallReturnValue according to the GCC version.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5d9e32c
    • mhahnenberg@apple.com's avatar
      Remove VTableSpectrum · 5906583d
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124427
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/Heap.cpp:
      (JSC::Heap::lastChanceToFinalize):
      * heap/Heap.h:
      * heap/MarkedBlock.cpp:
      (JSC::MarkedBlock::callDestructor):
      * heap/SlotVisitor.cpp:
      (JSC::visitChildren):
      * heap/SlotVisitor.h:
      * heap/VTableSpectrum.cpp: Removed.
      * heap/VTableSpectrum.h: Removed.
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      
      Source/WTF:
      
      * wtf/Platform.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5906583d
    • mhahnenberg@apple.com's avatar
      -dealloc callbacks from wrapped Objective-C objects can happen at bad times · ac6f1fd4
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123821
      
      Reviewed by Darin Adler.
      
      Currently with the JSC Obj-C API, JS wrappers for client Obj-C objects retain their associated Obj-C 
      object. When they are swept, they release their Obj-C objects which can trigger a call to that 
      object's -dealloc method. These -dealloc methods can then call back into the same VM, which is not 
      allowed during sweeping or VM shutdown.
      
      We can handle this case by creating our own pool of Obj-C objects to be released when it is safe to do so.
      This is accomplished by using DelayedReleaseScope, an RAII-style object that will retain all objects
      that are unsafe to release until the end of the DelayedReleaseScope.
      
      * API/APIShims.h:
      (JSC::APICallbackShim::APICallbackShim):
      (JSC::APICallbackShim::vmForDropAllLocks):
      (JSC::APICallbackShim::execForDropAllLocks):
      * API/JSAPIWrapperObject.mm:
      (JSAPIWrapperObjectHandleOwner::finalize):
      * API/ObjCCallbackFunction.mm:
      (JSC::ObjCCallbackFunctionImpl::destroy):
      (JSC::ObjCCallbackFunction::destroy):
      * API/tests/testapi.mm:
      (-[TinyDOMNode initWithVirtualMachine:]):
      (-[TinyDOMNode dealloc]):
      (-[TinyDOMNode appendChild:]):
      (-[TinyDOMNode removeChildAtIndex:]):
      (-[EvilAllocationObject initWithContext:]):
      (-[EvilAllocationObject dealloc]):
      (-[EvilAllocationObject doEvilThingsWithContext:]):
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/DelayedReleaseScope.h: Added.
      (JSC::DelayedReleaseScope::DelayedReleaseScope):
      (JSC::DelayedReleaseScope::~DelayedReleaseScope):
      (JSC::DelayedReleaseScope::releaseSoon):
      (JSC::MarkedSpace::releaseSoon):
      * heap/Heap.cpp:
      (JSC::Heap::collectAllGarbage):
      * heap/Heap.h:
      (JSC::Heap::releaseSoon):
      * heap/MarkedAllocator.cpp:
      (JSC::MarkedAllocator::allocateSlowCase):
      * heap/MarkedSpace.cpp:
      (JSC::MarkedSpace::MarkedSpace):
      (JSC::MarkedSpace::lastChanceToFinalize):
      (JSC::MarkedSpace::sweep):
      * heap/MarkedSpace.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac6f1fd4
  25. 12 Nov, 2013 1 commit
    • mhahnenberg@apple.com's avatar
      CodeBlocks should be able to determine bytecode liveness · 3811e215
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=118546
      
      Reviewed by Filip Pizlo.
      
      This will simplify some things in the DFG related to OSR exits and determining 
      which bytecode variables are live at which points during execution. It will
      also be useful for making our conservative GC scan more precise. Currently it 
      doesn't properly account for liveness while the DFG is running, so it will be 
      off by default behing a runtime Options flag.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/BytecodeBasicBlock.cpp: Added.
      (JSC::isBranch): Used to determine the end of basic blocks.
      (JSC::isUnconditionalBranch): Used to determine when a branch at the end of a 
      basic block can't possibly fall through to the next basic block in program order.
      (JSC::isTerminal): Also used to detect the end of a block.
      (JSC::isThrow):
      (JSC::isJumpTarget): Used to correctly separate basic blocks. Any jump destination 
      must be the head of its own basic block.
      (JSC::linkBlocks): Links two blocks together in a bi-direcitonal fashion.
      (JSC::computeBytecodeBasicBlocks): Creates a set of basic blocks given a particular 
      CodeBlock and links them together.
      * bytecode/BytecodeBasicBlock.h: Added.
      (JSC::BytecodeBasicBlock::isEntryBlock): Entry blocks are a special basic blocks 
      that indicate the beginning of the function.
      (JSC::BytecodeBasicBlock::isExitBlock): Exit blocks are a special basic block that 
      all blocks that exit the function have as a successor. Entry and exit blocks allows 
      the various code paths to be more regular.
      (JSC::BytecodeBasicBlock::leaderBytecodeOffset): The leader bytecode offset is the 
      bytecode offset of the first instruction in the block.
      (JSC::BytecodeBasicBlock::totalBytecodeLength): The total length of all the bytecodes 
      in this block.
      (JSC::BytecodeBasicBlock::bytecodeOffsets): The bytecode offsets in this particular 
      basic block. This Vector allows us to iterate over the bytecodes in reverse order 
      which wouldn't be possible normally since they are of variable size.
      (JSC::BytecodeBasicBlock::addPredecessor): Links a block to a specified predecessor. 
      Only creates one direction of the link.
      (JSC::BytecodeBasicBlock::addSuccessor): Same as addPredecessor, but for successors.
      (JSC::BytecodeBasicBlock::predecessors): Getter for predecessors.
      (JSC::BytecodeBasicBlock::successors): Getter for successors.
      (JSC::BytecodeBasicBlock::in): Getter for the liveness info at the head of the block.
      (JSC::BytecodeBasicBlock::out): Getter for the liveness info at  the tail of the block.
      (JSC::BytecodeBasicBlock::BytecodeBasicBlock):
      (JSC::BytecodeBasicBlock::addBytecodeLength): When creating basic blocks we call 
      this function when we want to add the next bytecode in program order to this block.
      * bytecode/BytecodeLivenessAnalysis.cpp: Added.
      (JSC::BytecodeLivenessAnalysis::BytecodeLivenessAnalysis):
      (JSC::numberOfCapturedVariables): Convenience wrapper. Returns the
      number of captured variables for a particular CodeBlock, or 0 if 
      the CodeBlock has no SymbolTable.
      (JSC::captureStart): Ditto, but for captureStart().
      (JSC::captureEnd): Ditto, but for captureEnd().
      (JSC::isValidRegisterForLiveness): Returns true if the liveness analysis should 
      track the liveness of a particular operand. We ignore constants, arguments, and 
      captured variables. We ignore arguments because they're live for the duration of 
      a function call. We ignore captured variables because we also treat them as live 
      for the duration of the function. This could probably be improved to be more precise, 
      but it didn't seem worth it for now.
      (JSC::setForOperand): Convenience wrapper that sets the bit in the provided bit 
      vector for the provided operand. It handles skipping over captured variables.
      (JSC::computeUsesForBytecodeOffset): Computes which operands are used by a particular bytecode.
      (JSC::computeDefsForBytecodeOffset): Computes which operands are defined by a particular 
      bytecode. Typically this is just the left-most operand.
      (JSC::findBasicBlockWithLeaderOffset): 
      (JSC::findBasicBlockForBytecodeOffset): Scans over basic blocks to find the block 
      which contains a particular bytecode offset.
      (JSC::computeLocalLivenessForBytecodeOffset): Computes block-local liveness from the 
      bottom of the block until a specified bytecode offset is reached. 
      (JSC::computeLocalLivenessForBlock): Computes liveness for the entire block and 
      stores the resulting liveness at the head.
      (JSC::BytecodeLivenessAnalysis::runLivenessFixpoint): Runs backward flow liveness 
      analysis to fixpoint.
      (JSC::BytecodeLivenessAnalysis::getLivenessInfoForNonCapturedVarsAtBytecodeOffset): 
      Slow path to get liveness info for non-captured, non-argument variable.
      (JSC::BytecodeLivenessAnalysis::operandIsLiveAtBytecodeOffset): 
      (JSC::BytecodeLivenessAnalysis::getLivenessInfoAtBytecodeOffset): Returns the liveness 
      info for both captured and non-captured vars at a particular bytecode offset.
      (JSC::BytecodeLivenessAnalysis::dumpResults): Dumps the output of the liveness analysis. 
      Controlled by new flag in Options.h/.cpp.
      (JSC::BytecodeLivenessAnalysis::compute): Creates bytecode basic blocks and runs 
      full liveness analysis.
      * bytecode/BytecodeLivenessAnalysis.h: Added.
      (JSC::BytecodeLivenessAnalysis::hasBeenComputed):
      (JSC::BytecodeLivenessAnalysis::computeIfNecessary):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::livenessAnalysis):
      * bytecode/PreciseJumpTargets.cpp: Refactored to be able to get the jump targets for 
      a particular bytecode offset for use during bytecode basic block construction.
      (JSC::getJumpTargetsForBytecodeOffset):
      (JSC::computePreciseJumpTargets):
      (JSC::findJumpTargetsForBytecodeOffset):
      * bytecode/PreciseJumpTargets.h:
      * runtime/Options.cpp:
      (JSC::Options::initialize):
      * runtime/Options.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3811e215
  26. 10 Nov, 2013 1 commit
    • oliver@apple.com's avatar
      Implement Set iterators · 96cafa31
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124129
      
      Reviewed by Antti Koivisto.
      
      Source/JavaScriptCore:
      
      Add Set iterator classes and implementations
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * runtime/CommonIdentifiers.h:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSSetIterator.cpp: Added.
      (JSC::JSSetIterator::finishCreation):
      (JSC::JSSetIterator::visitChildren):
      (JSC::JSSetIterator::createPair):
      * runtime/JSSetIterator.h: Added.
      (JSC::JSSetIterator::createStructure):
      (JSC::JSSetIterator::create):
      (JSC::JSSetIterator::next):
      (JSC::JSSetIterator::JSSetIterator):
      * runtime/SetIteratorConstructor.cpp: Added.
      (JSC::SetIteratorConstructor::finishCreation):
      * runtime/SetIteratorConstructor.h: Added.
      (JSC::SetIteratorConstructor::create):
      (JSC::SetIteratorConstructor::createStructure):
      (JSC::SetIteratorConstructor::SetIteratorConstructor):
      * runtime/SetIteratorPrototype.cpp: Added.
      (JSC::SetIteratorPrototype::finishCreation):
      (JSC::SetIteratorPrototypeFuncIterator):
      (JSC::SetIteratorPrototypeFuncNext):
      * runtime/SetIteratorPrototype.h: Added.
      (JSC::SetIteratorPrototype::create):
      (JSC::SetIteratorPrototype::createStructure):
      (JSC::SetIteratorPrototype::SetIteratorPrototype):
      * runtime/SetPrototype.cpp:
      (JSC::SetPrototype::finishCreation):
      (JSC::setProtoFuncValues):
      (JSC::setProtoFuncEntries):
      (JSC::setProtoFuncKeys):
      
      LayoutTests:
      
      Move Set tests to more sensible location and add iterator tests
      
      * js/basic-set-expected.txt: Renamed from LayoutTests/js/dom/basic-set-expected.txt.
      * js/basic-set.html: Renamed from LayoutTests/js/dom/basic-set.html.
      * js/script-tests/basic-set.js: Renamed from LayoutTests/js/dom/script-tests/basic-set.js.
      (set new):
      (otherString.string_appeared_here.set add):
      (try.set forEach):
      (set forEach):
      (set gc):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96cafa31
  27. 09 Nov, 2013 1 commit
    • oliver@apple.com's avatar
      Add Map Iterators · 2d11c160
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124109
      
      Reviewed by Andreas Kling.
      
      Source/JavaScriptCore:
      
      Added new Map iterator implementation.  This is a mostly boilerplate patch
      however there's a a little bit of additional logic added to the MapData iterator
      to deal with the possibility of map mutation between creation of the iterator
      and use of it.  We'll be able to improve the performance of this substantially
      by using intrinsics, however I'm pondering coming up with a better way to define
      these thunks without requiring so much duplicated logic.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * runtime/CommonIdentifiers.h:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSMapIterator.cpp: Added.
      (JSC::JSMapIterator::finishCreation):
      (JSC::JSMapIterator::visitChildren):
      (JSC::JSMapIterator::createPair):
      * runtime/JSMapIterator.h: Added.
      (JSC::JSMapIterator::createStructure):
      (JSC::JSMapIterator::create):
      (JSC::JSMapIterator::next):
      (JSC::JSMapIterator::JSMapIterator):
      * runtime/MapData.h:
      (JSC::MapData::const_iterator::ensureSlot):
      * runtime/MapIteratorConstructor.cpp: Added.
      (JSC::MapIteratorConstructor::finishCreation):
      * runtime/MapIteratorConstructor.h: Added.
      (JSC::MapIteratorConstructor::create):
      (JSC::MapIteratorConstructor::createStructure):
      (JSC::MapIteratorConstructor::MapIteratorConstructor):
      * runtime/MapIteratorPrototype.cpp: Added.
      (JSC::MapIteratorPrototype::finishCreation):
      (JSC::MapIteratorPrototypeFuncIterator):
      (JSC::MapIteratorPrototypeFuncNext):
      * runtime/MapIteratorPrototype.h: Added.
      (JSC::MapIteratorPrototype::create):
      (JSC::MapIteratorPrototype::createStructure):
      (JSC::MapIteratorPrototype::MapIteratorPrototype):
      * runtime/MapPrototype.cpp:
      (JSC::MapPrototype::finishCreation):
      (JSC::mapProtoFuncValues):
      (JSC::mapProtoFuncEntries):
      (JSC::mapProtoFuncKeys):
      
      LayoutTests:
      
      Moved map tests to a more sensible location, and added new iteration tests.
      
      * js/basic-map-expected.txt: Renamed from LayoutTests/js/dom/basic-map-expected.txt.
      * js/basic-map.html: Renamed from LayoutTests/js/dom/basic-map.html.
      * js/script-tests/basic-map.js: Renamed from LayoutTests/js/dom/script-tests/basic-map.js.
      (set shouldBe):
      (set var):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d11c160