1. 08 Apr, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-04-07 Geoffrey Garen <ggaren@apple.com> · 264f9e28
      ggaren@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * bytecode/SamplingTool.h: Sorted alphabetically because that's the
              WebKit style. Added a Global.h #include that was previously missing
              but harmless.
      
              * collector/handles/Global.h:
              (JSC::Global::Global): Added a null constructor. No need for a special
              tag, and the tag is incompatible with some data structures.
              
              (JSC::Global::isHashTableDeletedValue):
              (JSC::Global::~Global):
              (JSC::Global::set):
              (JSC::Global::operator=):
              (JSC::Global::clear):
              (JSC::Global::hashTableDeletedValue): Reordered constructors to be near
              each other.
      
              (JSC::Global::setWithWriteBarrier): Renamed internalSet to
              setWithWriteBarrier for clarity, and funneled more code into using set
              and setWithWriteBarrier to reduce duplication.
      
              * collector/handles/Handle.h:
              (JSC::HandleBase::operator!):
              (JSC::HandleBase::HandleBase): Removed isEmpty(), since we already have
              boolean and ! operators.
      
              (JSC::HandleBase::slot):
              (JSC::HandleBase::setSlot):
              (JSC::Handle::Handle): Added general support for null Handles. This was
              previously outlawed by ASSERTs, but our code has grown to support and
              rely on null Handles.
              
              * collector/handles/HandleHeap.cpp:
              (JSC::HandleHeap::markWeakHandles):
              (JSC::HandleHeap::finalizeWeakHandles):
              (JSC::HandleHeap::isValidWeakNode): Migrated from isValidWeakHandle,
              and beefed this up a bit.
      
              * collector/handles/HandleHeap.h:
              (JSC::HandleHeap::globalData): Added accessor, used by some new set functions.
      
              * collector/handles/Local.h: Moved hash traits to the bottom of the file,
              since this file is about the Local class, not the traits.
      
              (JSC::::Local): Updated for removal of invalidate().
      
              (JSC::::operator): Deployed "using" to avoid a lot of this->
              template funny business.
      
              (JSC::::setWithSlotCheck): Renamed from internalSet, more specific now.
      
              * interpreter/RegisterFile.h:
              (JSC::RegisterFile::RegisterFile): Updated to use null constructor.
      
              * jit/JITStubs.cpp:
              (JSC::JITThunks::hostFunctionStub):
      
              * runtime/JSPropertyNameIterator.h:
              (JSC::Structure::setEnumerationCache):
              * runtime/Structure.h: Removed clearEnumerationCache
              because it was an unused holdover from when the enumeration cache was
              not a handle.
      
              * runtime/WeakGCMap.h:
              (JSC::WeakGCMap::set): Finish initializing our handle before putting it
              in the table. This seemed more logical, and at one point was required
              to avoid triggering an ASSERT.
      
              * runtime/WeakGCPtr.h: Inherit from Handle instead of rolling our own
              handle-like behavior, to avoid duplication.
      
              (JSC::WeakGCPtr::WeakGCPtr):
              (JSC::WeakGCPtr::~WeakGCPtr):
              (JSC::WeakGCPtr::get):
              (JSC::WeakGCPtr::clear):
              (JSC::WeakGCPtr::set):
              (JSC::WeakGCPtr::setWithWriteBarrier): Removed duplicate code and
              standardized on Handle idioms.
      2011-04-07  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * JSRun.h:
              * JSValueWrapper.h: #include a file that was missing before, but was
              harmlessly so until now.
      2011-04-07  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Maciej Stachowiak.
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * bindings/js/ScriptValue.h:
              (WebCore::ScriptValue::ScriptValue): Updated for new null constructor.
              (WebCore::ScriptValue::hasNoValue): Updated for removal of isEmpty().
      2011-04-07  Geoffrey Garen  <ggaren@apple.com>
      
              Some Handle<T> cleanup
              https://bugs.webkit.org/show_bug.cgi?id=58109
      
              * WebProcess/Plugins/Netscape/NPJSObject.cpp:
              (WebKit::NPJSObject::NPJSObject): Updated for new null constructor.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      264f9e28
  2. 13 Mar, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this. · 66184e2c
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      The JIT need to 'friend' other classes in order to be able to calculate offsets
      of various properties, or the absolute addresses of members within specific objects,
      in order to JIT generate code that will access members within the class when run.
      
      Instead of using friends in these cases, switch to providing specific accessor
      methods to provide this information.  In the case of offsets, these can be static
      functions, and in the case of pointers to members within a specific object these can
      be const methods returning pointers to const values, to prevent clients from
      modifying values otherwise encapsulated within classes.
      
      * bytecode/SamplingTool.h:
      * interpreter/Register.h:
      * interpreter/RegisterFile.h:
      * runtime/JSArray.h:
      * runtime/JSCell.h:
      * runtime/JSTypeInfo.h:
      * runtime/JSVariableObject.h:
      * runtime/Structure.h:
      * wtf/RefCounted.h:
          - Change these classes to no longer friend the JIT, add accessors for member offsets.
      * jit/JIT.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITInlineMethods.h:
      * jit/JITOpcodes.cpp:
      * jit/JITOpcodes32_64.cpp:
      * jit/JITPropertyAccess.cpp:
      * jit/JITPropertyAccess32_64.cpp:
          - Change the JIT to use class accessors, rather than taking object ofsets directly.
      * assembler/AbstractMacroAssembler.h:
      * assembler/MacroAssemblerX86_64.h:
      * assembler/X86Assembler.h:
          - Since the accessors for objects members return const pointers to retain encapsulation,
            methods generating code with absolute addresses must be able to handle const pointers
            (the JIT doesn't write to these values, do dies treat the pointer to value as const
            from within the C++ code of the JIT, if not at runtime!).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66184e2c
  3. 08 Mar, 2011 1 commit
    • oliver@apple.com's avatar
      2011-03-07 Oliver Hunt <oliver@apple.com> · ba10bec9
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Make CodeBlock GC write barrier safe
              https://bugs.webkit.org/show_bug.cgi?id=55910
      
              In order to make CodeBlock WriteBarrier safe it was necessary
              to make it have a single GC owner, and for that reason I have
              made ExecutableBase a GC allocated object.  This required
              updating their creation routines as well as all sites that hold
              a reference to them.  GC objects that held Executable's have been
              converted to WriteBarriers, and all other sites now use Global<>.
      
              As an added benefit this gets rid of JSGlobalData's list of
              GlobalCodeBlocks.
      
              Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
              on SunSpider.  Given none of the tests that show regressions
              demonstrate a regression on their own, and sampling shows up nothing.
              I suspect we're just getting one or two additional gc passes at
              the end of the run.
      
              * bytecode/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::CodeBlock):
              (JSC::EvalCodeCache::markAggregate):
              (JSC::CodeBlock::markAggregate):
              * bytecode/CodeBlock.h:
              (JSC::CodeBlock::ownerExecutable):
              (JSC::CodeBlock::addConstant):
              (JSC::CodeBlock::constantRegister):
              (JSC::CodeBlock::getConstant):
              (JSC::CodeBlock::addFunctionDecl):
              (JSC::CodeBlock::addFunctionExpr):
              (JSC::GlobalCodeBlock::GlobalCodeBlock):
              (JSC::ExecState::r):
              * bytecode/EvalCodeCache.h:
              (JSC::EvalCodeCache::get):
              * bytecode/SamplingTool.h:
              (JSC::ScriptSampleRecord::ScriptSampleRecord):
              * bytecompiler/BytecodeGenerator.cpp:
              (JSC::BytecodeGenerator::addConstantValue):
              (JSC::BytecodeGenerator::emitEqualityOp):
              * bytecompiler/BytecodeGenerator.h:
              (JSC::BytecodeGenerator::makeFunction):
              * debugger/Debugger.cpp:
              (JSC::evaluateInGlobalCallFrame):
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::callEval):
              * jit/JITInlineMethods.h:
              (JSC::JIT::emitLoadDouble):
              (JSC::JIT::emitLoadInt32ToDouble):
              * jit/JITStubs.cpp:
              (JSC::JITThunks::JITThunks):
              (JSC::JITThunks::hostFunctionStub):
              (JSC::JITThunks::clearHostFunctionStubs):
              * jit/JITStubs.h:
              * runtime/Completion.cpp:
              (JSC::checkSyntax):
              (JSC::evaluate):
              * runtime/Executable.cpp:
              (JSC::EvalExecutable::EvalExecutable):
              (JSC::ProgramExecutable::ProgramExecutable):
              (JSC::FunctionExecutable::FunctionExecutable):
              (JSC::FunctionExecutable::~FunctionExecutable):
              (JSC::EvalExecutable::markChildren):
              (JSC::ProgramExecutable::markChildren):
              (JSC::FunctionExecutable::markChildren):
              (JSC::FunctionExecutable::fromGlobalCode):
              * runtime/Executable.h:
              (JSC::ExecutableBase::ExecutableBase):
              (JSC::ExecutableBase::createStructure):
              (JSC::NativeExecutable::create):
              (JSC::NativeExecutable::NativeExecutable):
              (JSC::VPtrHackExecutable::VPtrHackExecutable):
              (JSC::ScriptExecutable::ScriptExecutable):
              (JSC::EvalExecutable::create):
              (JSC::EvalExecutable::createStructure):
              (JSC::ProgramExecutable::create):
              (JSC::ProgramExecutable::createStructure):
              (JSC::FunctionExecutable::create):
              (JSC::FunctionExecutable::createStructure):
              * runtime/FunctionConstructor.cpp:
              (JSC::constructFunction):
              * runtime/Heap.cpp:
              (JSC::Heap::destroy):
              (JSC::Heap::markRoots):
              * runtime/Heap.h:
              * runtime/JSActivation.cpp:
              (JSC::JSActivation::JSActivation):
              (JSC::JSActivation::markChildren):
              * runtime/JSActivation.h:
              (JSC::JSActivation::JSActivationData::JSActivationData):
              * runtime/JSCell.h:
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              (JSC::JSFunction::~JSFunction):
              (JSC::JSFunction::markChildren):
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::storeVPtrs):
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::getHostFunction):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncEval):
              * runtime/JSObject.cpp:
              * runtime/JSStaticScopeObject.cpp:
              (JSC::JSStaticScopeObject::markChildren):
              * runtime/JSStaticScopeObject.h:
              (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
              (JSC::JSStaticScopeObject::JSStaticScopeObject):
              * runtime/JSZombie.cpp:
              (JSC::JSZombie::leakedZombieStructure):
              * runtime/JSZombie.h:
              (JSC::JSZombie::createStructure):
              * runtime/MarkedSpace.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba10bec9
  4. 20 Jan, 2011 1 commit
    • ossy@webkit.org's avatar
      Refactoring of the custom allocation framework · 95c1bc42
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=49897
      
      Patch by Zoltan Horvath <zoltan@webkit.org> on 2011-01-20
      Reviewed by Csaba Osztrogonác.
      
      Source/JavaScriptCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
      
      Source/WebCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Source/WebKit:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Source/WebKit2:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Tools:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95c1bc42
  5. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  6. 29 Sep, 2009 1 commit
  7. 22 Sep, 2009 1 commit
  8. 29 Jul, 2009 1 commit
  9. 14 Jul, 2009 1 commit
    • bfulgham@webkit.org's avatar
      JavaScriptCore: · 8a8a2f45
      bfulgham@webkit.org authored
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * bytecode/SamplingTool.h:
              * bytecompiler/RegisterID.h:
              * interpreter/CachedCall.h:
              * interpreter/RegisterFile.h:
              * parser/Lexer.h:
              * parser/Parser.h:
              * runtime/ArgList.h:
              * runtime/BatchedTransitionOptimizer.h:
              * runtime/Collector.h:
              * runtime/CommonIdentifiers.h:
              * runtime/JSCell.h:
              * runtime/JSGlobalObject.h:
              * runtime/JSLock.h:
              * runtime/JSONObject.cpp:
              * runtime/SmallStrings.cpp:
              * runtime/SmallStrings.h:
              * wtf/CrossThreadRefCounted.h:
              * wtf/GOwnPtr.h:
              * wtf/Locker.h:
              * wtf/MessageQueue.h:
              * wtf/OwnArrayPtr.h:
              * wtf/OwnFastMallocPtr.h:
              * wtf/OwnPtr.h:
              * wtf/RefCounted.h:
              * wtf/ThreadSpecific.h:
              * wtf/Threading.h:
              * wtf/Vector.h:
              * wtf/unicode/Collator.h:
      
      WebCore:
      
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * bindings/js/GCController.h:
              * bindings/js/WorkerScriptController.h:
              * bindings/v8/V8DOMMap.cpp:
              (WebCore::):
              * bridge/runtime.h:
              * css/CSSSelector.h:
              * css/CSSSelectorList.h:
              * css/CSSStyleSelector.h:
              * dom/ClassNames.h:
              * dom/MessagePortChannel.h:
              * dom/XMLTokenizerLibxml2.cpp:
              * dom/XMLTokenizerScope.h:
              * editing/ReplaceSelectionCommand.cpp:
              * editing/SelectionController.h:
              * editing/TextIterator.cpp:
              * history/PageCache.h:
              * html/CanvasRenderingContext2D.h:
              * html/HTMLParser.h:
              * html/HTMLParserQuirks.h:
              * html/PreloadScanner.h:
              * loader/Cache.h:
              * loader/CrossOriginPreflightResultCache.h:
              * loader/FrameLoader.h:
              * loader/ProgressTracker.h:
              * loader/ThreadableLoader.h:
              * loader/appcache/ApplicationCacheGroup.h:
              * loader/archive/ArchiveResourceCollection.h:
              * loader/icon/IconDatabase.h:
              * loader/icon/IconLoader.h:
              * loader/icon/PageURLRecord.h:
              * loader/loader.h:
              * page/ContextMenuController.h:
              * page/EventHandler.h:
              * page/FrameTree.h:
              * page/Page.h:
              * page/PageGroup.h:
              * page/PageGroupLoadDeferrer.h:
              * page/mac/EventHandlerMac.mm:
              * platform/AutodrainedPool.h:
              * platform/ContextMenu.h:
              * platform/EventLoop.h:
              * platform/HostWindow.h:
              * platform/Pasteboard.h:
              * platform/PurgeableBuffer.h:
              * platform/RunLoopTimer.h:
              * platform/ThreadGlobalData.h:
              * platform/ThreadTimers.h:
              * platform/Timer.h:
              * platform/TreeShared.h:
              * platform/graphics/FontData.h:
              * platform/graphics/GlyphWidthMap.h:
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/ImageBuffer.h:
              * platform/graphics/ImageSource.h:
              * platform/graphics/MediaPlayer.h:
              * platform/graphics/skia/GraphicsContextPlatformPrivate.h:
              * platform/graphics/skia/PlatformContextSkia.h:
              * platform/graphics/win/QTMovieWin.cpp:
              * platform/mac/LocalCurrentGraphicsContext.h:
              * platform/network/FormDataBuilder.h:
              * platform/network/ResourceHandleInternal.h:
              * platform/network/soup/ResourceHandleSoup.cpp:
              * platform/text/StringBuffer.h:
              * platform/text/TextCodec.h:
              * platform/win/WindowMessageBroadcaster.h:
              * rendering/CounterNode.h:
              * rendering/LayoutState.h:
              * rendering/RenderFrameSet.h:
              * rendering/RenderView.h:
              * rendering/TransformState.h:
              * svg/SVGAnimatedProperty.h:
              * svg/SynchronizableTypeWrapper.h:
              * workers/WorkerMessagingProxy.h:
              * workers/WorkerRunLoop.cpp:
              * xml/XPathExpressionNode.h:
              * xml/XPathParser.h:
              * xml/XPathPredicate.h:
              * xml/XPathStep.h:
      
      WebKit/gtk:
      
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * webkit/webkitdownload.cpp:
      
      WebKit/win:
      
      2009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
      
              Reviewed by Darin Adler.
      
              Change all Noncopyable inheriting visibility to public.
              https://bugs.webkit.org/show_bug.cgi?id=27225
      
              Change all Noncopyable inheriting visibility to public because
              it is needed to the custom allocation framework (bug #20422).
      
              * COMEnumVariant.h:
              * WebDatabaseManager.cpp:
              * WebInspector.h:
              * WebLocalizableStrings.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a8a2f45
  10. 13 May, 2009 2 commits
    • dimich@chromium.org's avatar
      JavaScriptCore: · c85b91df
      dimich@chromium.org authored
      2009-05-13  Dmitry Titov  <dimich@chromium.org>
      
              Rubber-stamped by Mark Rowe.
      
              https://bugs.webkit.org/show_bug.cgi?id=25746
              Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4.
      
              * JavaScriptCore.exp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
              * bytecode/SamplingTool.cpp:
              (JSC::SamplingThread::start):
              (JSC::SamplingThread::stop):
              * bytecode/SamplingTool.h:
              * wtf/CrossThreadRefCounted.h:
              (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
              (WTF::::ref):
              (WTF::::deref):
              * wtf/Threading.h:
              * wtf/ThreadingNone.cpp:
              * wtf/ThreadingPthreads.cpp:
              (WTF::threadMapMutex):
              (WTF::initializeThreading):
              (WTF::threadMap):
              (WTF::identifierByPthreadHandle):
              (WTF::establishIdentifierForPthreadHandle):
              (WTF::pthreadHandleForIdentifier):
              (WTF::clearPthreadHandleForIdentifier):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::detachThread):
              (WTF::currentThread):
              * wtf/ThreadingWin.cpp:
              (WTF::threadMapMutex):
              (WTF::initializeThreading):
              (WTF::threadMap):
              (WTF::storeThreadHandleByIdentifier):
              (WTF::threadHandleForIdentifier):
              (WTF::clearThreadHandleForIdentifier):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::detachThread):
              (WTF::currentThread):
              * wtf/gtk/ThreadingGtk.cpp:
              (WTF::threadMapMutex):
              (WTF::initializeThreading):
              (WTF::threadMap):
              (WTF::identifierByGthreadHandle):
              (WTF::establishIdentifierForThread):
              (WTF::threadForIdentifier):
              (WTF::clearThreadForIdentifier):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::currentThread):
              * wtf/qt/ThreadingQt.cpp:
              (WTF::threadMapMutex):
              (WTF::threadMap):
              (WTF::identifierByQthreadHandle):
              (WTF::establishIdentifierForThread):
              (WTF::clearThreadForIdentifier):
              (WTF::threadForIdentifier):
              (WTF::initializeThreading):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::currentThread):
      
      WebCore:
      
      2009-05-13  Dmitry Titov  <dimich@chromium.org>
      
              Rubber-stamped by Mark Rowe.
      
              https://bugs.webkit.org/show_bug.cgi?id=25746
              Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4.
      
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::matchFunc):
              (WebCore::openFunc):
              (WebCore::createStringParser):
              (WebCore::createMemoryParser):
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::open):
              * platform/sql/SQLiteDatabase.cpp:
              (WebCore::SQLiteDatabase::SQLiteDatabase):
              (WebCore::SQLiteDatabase::close):
              * storage/DatabaseThread.cpp:
              (WebCore::DatabaseThread::DatabaseThread):
              (WebCore::DatabaseThread::start):
              (WebCore::DatabaseThread::databaseThread):
              * storage/LocalStorageThread.cpp:
              (WebCore::LocalStorageThread::LocalStorageThread):
              (WebCore::LocalStorageThread::start):
              (WebCore::LocalStorageThread::localStorageThread):
              (WebCore::LocalStorageThread::scheduleImport):
              (WebCore::LocalStorageThread::scheduleSync):
              (WebCore::LocalStorageThread::terminate):
              * workers/WorkerThread.cpp:
              (WebCore::WorkerThread::WorkerThread):
              (WebCore::WorkerThread::start):
      
      WebKit/win:
      
      2009-05-13  Dmitry Titov  <dimich@chromium.org>
      
              Rubber-stamped by Mark Rowe.
      
              https://bugs.webkit.org/show_bug.cgi?id=25746
              Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4.
      
              * WebKit.vcproj/WebKit.def:
              * WebKit.vcproj/WebKit_debug.def:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c85b91df
    • barraclough@apple.com's avatar
      2009-05-12 Gavin Barraclough <barraclough@apple.com> · c32f32e2
      barraclough@apple.com authored
              Reviewed by Oliver Hunt.
      
              Add SamplingCounter tool to provide a simple mechanism for counting events in JSC
              (enabled using ENABLE(SAMPLING_COUNTERS)).  To count events within a single function
              use the class 'SamplingCounter', where the counter may be incremented from multiple
              functions 'GlobalSamplingCounter' may be convenient; all other counters (stack or
              heap allocated, rather than statically declared) should use the DeletableSamplingCounter.
              Further description of these classes is provided alongside their definition in 
              SamplingTool.h.
      
              Counters may be incremented from c++ by calling the 'count()' method on the counter,
              or may be incremented by JIT code by using the 'emitCount()' method within the JIT.
      
              This patch also fixes CODEBLOCK_SAMPLING, which was missing a null pointer check.
      
              * JavaScriptCore.exp:
              * assembler/MacroAssemblerX86.h:
              (JSC::MacroAssemblerX86::addWithCarry32):
              (JSC::MacroAssemblerX86::and32):
              (JSC::MacroAssemblerX86::or32):
              * assembler/MacroAssemblerX86Common.h:
              (JSC::MacroAssemblerX86Common::and32):
              (JSC::MacroAssemblerX86Common::or32):
              * assembler/MacroAssemblerX86_64.h:
              (JSC::MacroAssemblerX86_64::and32):
              (JSC::MacroAssemblerX86_64::or32):
              (JSC::MacroAssemblerX86_64::addPtr):
              * assembler/X86Assembler.h:
              (JSC::X86Assembler::):
              (JSC::X86Assembler::adcl_im):
              (JSC::X86Assembler::addq_im):
              (JSC::X86Assembler::andl_im):
              (JSC::X86Assembler::orl_im):
              * bytecode/SamplingTool.cpp:
              (JSC::AbstractSamplingCounter::dump):
              * bytecode/SamplingTool.h:
              (JSC::AbstractSamplingCounter::count):
              (JSC::GlobalSamplingCounter::name):
              (JSC::SamplingCounter::SamplingCounter):
              * jit/JIT.h:
              * jit/JITCall.cpp:
              (JSC::):
              * jit/JITInlineMethods.h:
              (JSC::JIT::setSamplingFlag):
              (JSC::JIT::clearSamplingFlag):
              (JSC::JIT::emitCount):
              * jsc.cpp:
              (runWithScripts):
              * parser/Nodes.cpp:
              (JSC::ScopeNode::ScopeNode):
              * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c32f32e2
  11. 12 May, 2009 1 commit
  12. 11 May, 2009 1 commit
    • dimich@chromium.org's avatar
      JavaScriptCore: · 558a0efc
      dimich@chromium.org authored
      2009-05-11  Dmitry Titov  <dimich@chromium.org>
      
              Reviewed by Alexey Proskuryakov and Adam Roben.
      
              https://bugs.webkit.org/show_bug.cgi?id=25348
              Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
      
              * wtf/Threading.h:
              (WTF::ThreadIdentifier::ThreadIdentifier):
              (WTF::ThreadIdentifier::isValid):
              (WTF::ThreadIdentifier::invalidate):
              (WTF::ThreadIdentifier::platformId):
              ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and
              methods that are used across the code on thread ids: construction, comparisons,
              check for 'valid' state etc. '0' is used as invalid id, which happens to just work
              with all platform-specific thread id implementations.
      
              All the following files repeatedly reflect the new ThreadIdentifier for each platform.
              We remove ThreadMap and threadMapMutex from all of them, remove the functions that
              populated/searched/cleared the map and add platform-specific comparison operators
              for ThreadIdentifier.
      
              There are specific temporary workarounds for Safari 4 beta on OSX and Win32 since the
              public build uses WTF threading functions with old type of ThreadingIdentifier.
              The next time Safari 4 is rebuilt, it will 'automatically' pick up the new type and new
              functions so the deprecated ones can be removed.
      
              * wtf/gtk/ThreadingGtk.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::currentThread):
      
              * wtf/ThreadingNone.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
      
              * wtf/ThreadingPthreads.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::detachThread):
              (WTF::currentThread):
              (WTF::waitForThreadCompletion): This is a workaround for Safari 4 beta on Mac.
              Safari 4 is linked against old definition of ThreadIdentifier so it treats it as uint32_t.
              This 'old' variant of waitForThreadCompletion takes uint32_t and has the old decorated name, so Safari can
              load it from JavaScriptCore library. The other functions (CurrentThread() etc) happen to match their previous
              decorated names and, while they return pthread_t now, it is a pointer which round-trips through a uint32_t.
              This function will be removed as soon as Safari 4 will release next public build.
      
              * wtf/qt/ThreadingQt.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::currentThread):
      
              * wtf/ThreadingWin.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal): All the platforms (except Windows) used a sequential
              counter as a thread ID and mapped it into platform ID. Windows was using native thread
              id and mapped it into thread handle. Since we can always obtain a thread handle
              by thread id, createThread now closes the handle.
              (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle,
              it means the thread already exited.
              (WTF::detachThread):
              (WTF::currentThread):
              (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now).
              (WTF::waitForThreadCompletionDeprecated): same.
              (WTF::currentThreadDeprecated): same.
              (WTF::createThreadDeprecated): same.
      
              * bytecode/SamplingTool.h:
              * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor.
      
              * JavaScriptCore.exp: export lists - updated decorated names of the WTF threading functions
              since they now take a different type as a parameter.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions
              that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto.
      
      WebCore:
      
      2009-05-11  Dmitry Titov  <dimich@chromium.org>
      
              Reviewed by Alexey Proskuryakov and Adam Roben.
      
              https://bugs.webkit.org/show_bug.cgi?id=25348
              Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
      
              Most of the change is in WTF.
              Unless noted, all the following files changed to use the new ThreadIdentifier::isValid()
              method instead of just doing 'if(m_threadID)' kind of checks, since ThreadIdentifier
              is now a class rather then an integer.
              Also, there is no need to initialize threadID in constructors to 0 now.
      
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::libxmlLoaderThread): use DEFINE_STATIC_LOCAL and accessor function for static thread id,
              since now ThreadIdentifier needs construction and we avoid having global initializers.
              (WebCore::matchFunc): use the new accessor function.
              (WebCore::openFunc): ditto.
              (WebCore::createStringParser): ditto.
              (WebCore::createMemoryParser): ditto.
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::open):
              * platform/sql/SQLiteDatabase.cpp:
              (WebCore::SQLiteDatabase::SQLiteDatabase):
              (WebCore::SQLiteDatabase::close):
              * storage/DatabaseThread.cpp:
              (WebCore::DatabaseThread::start):
              (WebCore::DatabaseThread::databaseThread): remove m_threadID from debug output.
              * storage/LocalStorageThread.cpp:
              (WebCore::LocalStorageThread::start):
              (WebCore::LocalStorageThread::scheduleImport):
              (WebCore::LocalStorageThread::scheduleSync):
              (WebCore::LocalStorageThread::terminate):
              * workers/WorkerThread.cpp:
              (WebCore::WorkerThread::start):
              (WebCore::WorkerThread::WorkerThread):
              (WebCore::WorkerThread::start):
      
      WebKit/win:
      
      2009-05-11  Dmitry Titov  <dimich@chromium.org>
      
              Reviewed by Alexey Proskuryakov and Adam Roben.
      
              https://bugs.webkit.org/show_bug.cgi?id=25348
              Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
      
              Most of the change is in WTF and WebCore.
      
              * WebKit.vcproj/WebKit.def: replaced decorated names of WTF threading functions with new ones.
              Also, aliased the old implementations so the public Safari 4 beta can load the old WTF functions
              which it uses. Next time Safari 4 builds, it will pick up new functions and the deprecated ones
              can be removed.
              * WebKit.vcproj/WebKit_debug.def: same.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      558a0efc
  13. 08 May, 2009 3 commits
    • barraclough@apple.com's avatar
      2009-05-08 Gavin Barraclough <barraclough@apple.com> · b2b93af2
      barraclough@apple.com authored
              Rubber stamped by Oliver Hunt.
      
              Removing an empty constructor and an uncalled, empty function seems to be a
              pretty solid 1% regeression on my machine, so I'm going to put them back.
              Um.  Yeah, this this pretty pointles and makes no sense at all.  I officially
              lose the will to live in 3... 2...
      
              * bytecode/SamplingTool.cpp:
              (JSC::SamplingTool::notifyOfScope):
              * bytecode/SamplingTool.h:
              (JSC::SamplingTool::~SamplingTool):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2b93af2
    • barraclough@apple.com's avatar
      2009-05-08 Gavin Barraclough <barraclough@apple.com> · afdb5b0f
      barraclough@apple.com authored
              Reviewed by Oliver "I see lots of ifdefs" Hunt.
      
              Fix (kinda) for sampling tool breakage.  The codeblock sampling tool has become
              b0rked due to recent changes in native function calling.  The initialization of
              a ScopeNode appears to now occur before the sampling tool (or possibly the
              interpreter has been brought into existence, wihich leads to crashyness).
      
              This patch doesn't fix the problem.  The crash occurs when tracking a Scope, but
              we shouldn't need to track scopes when we're just sampling opcodes, not
              codeblocks.  Not retaining Scopes when just opcode sampling will reduce sampling
              overhead reducing any instrumentation skew, which is a good thing.  As a side
              benefit this patch also gets the opcode sampling going again, albeit in a bit of
              a lame way.  Will come back later with a proper fix from codeblock sampling. 
      
              * JavaScriptCore.exp:
              * bytecode/SamplingTool.cpp:
              (JSC::compareLineCountInfoSampling):
              (JSC::SamplingTool::dump):
              * bytecode/SamplingTool.h:
              (JSC::SamplingTool::SamplingTool):
              * parser/Nodes.cpp:
              (JSC::ScopeNode::ScopeNode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afdb5b0f
    • mrowe@apple.com's avatar
      Fix <https://bugs.webkit.org/show_bug.cgi?id=25640>. · 6851589a
      mrowe@apple.com authored
      Bug 25640: Crash on quit in r43384 nightly build on Leopard w/ Safari 4 beta installed
      
      Rubber-stamped by Oliver Hunt.
      
      Roll out r43366 as it removed symbols that Safari 4 Beta uses.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6851589a
  14. 07 May, 2009 1 commit
    • dimich@chromium.org's avatar
      JavaScriptCore: · 4b43290e
      dimich@chromium.org authored
      2009-05-07  Dmitry Titov  <dimich@chromium.org>
      
              Reviewed by Alexey Proskuryakov and Adam Roben.
      
              https://bugs.webkit.org/show_bug.cgi?id=25348
              Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
      
              * wtf/Threading.h:
              (WTF::ThreadIdentifier::ThreadIdentifier):
              (WTF::ThreadIdentifier::isValid):
              (WTF::ThreadIdentifier::invalidate):
              (WTF::ThreadIdentifier::platformId):
              ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and
              methods that are used across the code on thread ids: construction, comparisons,
              check for 'valid' state etc. '0' is used as invalid id, which happens to just work
              with all platform-specific thread id implementations.
      
              All the following files repeatedly reflect the new ThreadIdentifier for each platform.
              We remove ThreadMap and threadMapMutex from all of them, remove the functions that
              populated/searched/cleared the map and add platform-specific comparison operators
              for ThreadIdentifier.
      
              * wtf/gtk/ThreadingGtk.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::currentThread):
      
              * wtf/ThreadingNone.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
      
              * wtf/ThreadingPthreads.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::detachThread):
              (WTF::currentThread):
      
              * wtf/qt/ThreadingQt.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal):
              (WTF::waitForThreadCompletion):
              (WTF::currentThread):
      
              * wtf/ThreadingWin.cpp:
              (WTF::ThreadIdentifier::operator==):
              (WTF::ThreadIdentifier::operator!=):
              (WTF::initializeThreading):
              (WTF::createThreadInternal): All the platforms (except Windows) used a sequential
              counter as a thread ID and mapped it into platform ID. Windows was using native thread
              id and mapped it into thread handle. Since we can always obtain a thread handle
              by thread id, createThread now closes the handle.
              (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle,
              it means the thread already exited.
              (WTF::detachThread):
              (WTF::currentThread):
              (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now).
              (WTF::waitForThreadCompletionDeprecated): same.
              (WTF::currentThreadDeprecated): same.
              (WTF::createThreadDeprecated): same.
      
              * bytecode/SamplingTool.h:
              * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor.
      
              * JavaScriptCore.exp: export lists - updated the WTF threading functions decorated names
              since they now take a different type as a parameter.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions
              that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto.
      
      WebCore:
      
      2009-05-07  Dmitry Titov  <dimich@chromium.org>
      
              Reviewed by Alexey Proskuryakov and Adam Roben.
      
              https://bugs.webkit.org/show_bug.cgi?id=25348
              Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
      
              Most of the change is in WTF.
              Unless noted, all the following files changed to use the new ThreadIdentifier::isValid()
              method instead of just doing 'if(m_threadID)' kind of checks, since ThreadIdentifier
              is now a class rather then an integer.
              Also, there is no need to initialize threadID in constructors to 0 now.
      
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::libxmlLoaderThread): use DEFINE_STATIC_LOCAL and accessor function for static thread id,
              since now ThreadIdentifier needs construction and we avoid having global initializers.
              (WebCore::matchFunc): use the new accessor function.
              (WebCore::openFunc): ditto.
              (WebCore::createStringParser): ditto.
              (WebCore::createMemoryParser): ditto.
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::open):
              * platform/sql/SQLiteDatabase.cpp:
              (WebCore::SQLiteDatabase::SQLiteDatabase):
              (WebCore::SQLiteDatabase::close):
              * storage/DatabaseThread.cpp:
              (WebCore::DatabaseThread::start):
              (WebCore::DatabaseThread::databaseThread): remove m_threadID from debug output.
              * storage/LocalStorageThread.cpp:
              (WebCore::LocalStorageThread::start):
              (WebCore::LocalStorageThread::scheduleImport):
              (WebCore::LocalStorageThread::scheduleSync):
              (WebCore::LocalStorageThread::terminate):
              * workers/WorkerThread.cpp:
              (WebCore::WorkerThread::start):
              (WebCore::WorkerThread::WorkerThread):
              (WebCore::WorkerThread::start):
      
      WebKit/win:
      
      2009-05-07  Dmitry Titov  <dimich@chromium.org>
      
              Reviewed by Alexey Proskuryakov and Adam Roben.
      
              https://bugs.webkit.org/show_bug.cgi?id=25348
              Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
      
              Most of the change is in WTF and WebCore.
      
              * WebKit.vcproj/WebKit.def: replaced decorated names of WTF threading functions with new ones.
              Also, aliased the old implementations so the public Safari 4 beta can load the old WTF functions
              which it uses. Next time Safari 4 builds, it will pick up new functions and the deprecated ones
              can be removed.
              * WebKit.vcproj/WebKit_debug.def: same.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b43290e
  15. 30 Apr, 2009 3 commits
    • barraclough@apple.com's avatar
      2009-04-30 Gavin Barraclough <barraclough@apple.com> · 2945305f
      barraclough@apple.com authored
              Reviewed by Oliver Hunt.
      
              OPCODE_SAMPLING without CODEBLOCK_SAMPLING is currently broken,
              since SamplingTool::Sample::isNull() checks the m_codeBlock
              member (which is always null without CODEBLOCK_SAMPLING).
      
              Restructure the checks so make this work again.
      
              * bytecode/SamplingTool.cpp:
              (JSC::SamplingTool::doRun):
              * bytecode/SamplingTool.h:
              (JSC::SamplingTool::Sample::isNull):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2945305f
    • barraclough@apple.com's avatar
      2009-04-30 Gavin Barraclough <barraclough@apple.com> · 066b94ec
      barraclough@apple.com authored
              Reviewed by Oliver Hunt.
      
              Two quick improvements to SamplingFlags mechanism.
      
              SamplingFlags::ScopedFlag class to provide support for automagically
              clearing a flag as it goes out of scope, and add a little more detail
              to the output generated by the tool.
      
              * bytecode/SamplingTool.cpp:
              (JSC::SamplingFlags::stop):
              * bytecode/SamplingTool.h:
              (JSC::SamplingFlags::ScopedFlag::ScopedFlag):
              (JSC::SamplingFlags::ScopedFlag::~ScopedFlag):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      066b94ec
    • barraclough@apple.com's avatar
      2009-04-30 Gavin Barraclough <barraclough@apple.com> · f91cd6b5
      barraclough@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Add SamplingFlags mechanism.
      
              This mechanism allows fine-grained JSC and JavaScript program aware
              performance measurement.  The mechanism provides a set of 32 flags,
              numbered #1..#32.  Flag #16 is initially set, and all other flags
              are cleared.  Flags may be set and cleared from within
      
              Enable by setting ENABLE_SAMPLING_FLAGS to 1 in wtf/Platform.h.
              Disabled by default, no performance impact.  Flags may be modified
              by calling SamplingFlags::setFlag() and SamplingFlags::clearFlag()
              from within JSC implementation, or by calling setSamplingFlag() and
              clearSamplingFlag() from JavaScript.
      
              The flags are sampled with a frequency of 10000Hz, and the highest
              set flag in recorded, allowing multiple events to be measured (with
              the highest flag number representing the highest priority).
      
              Disabled by default; no performance impact.
      
              * JavaScriptCore.exp:
              * bytecode/SamplingTool.cpp:
              (JSC::SamplingFlags::sample):
              (JSC::SamplingFlags::start):
              (JSC::SamplingFlags::stop):
              (JSC::SamplingThread::threadStartFunc):
              (JSC::SamplingThread::start):
              (JSC::SamplingThread::stop):
              (JSC::ScopeSampleRecord::sample):
              (JSC::SamplingTool::doRun):
              (JSC::SamplingTool::sample):
              (JSC::SamplingTool::start):
              (JSC::SamplingTool::stop):
              * bytecode/SamplingTool.h:
              (JSC::SamplingFlags::setFlag):
              (JSC::SamplingFlags::clearFlag):
              (JSC::SamplingTool::SamplingTool):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              (functionSetSamplingFlag):
              (functionClearSamplingFlag):
              (runWithScripts):
              * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f91cd6b5
  16. 16 Jan, 2009 1 commit
  17. 17 Nov, 2008 1 commit
    • ggaren@apple.com's avatar
      2008-11-17 Geoffrey Garen <ggaren@apple.com> · 7c4c1d67
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
              
              Moved VM/SamplingTool.* => bytecode/SamplingTool.*.
      
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.scons:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/SamplingTool.cpp: Removed.
              * VM/SamplingTool.h: Removed.
              * bytecode/SamplingTool.cpp: Copied from VM/SamplingTool.cpp.
              * bytecode/SamplingTool.h: Copied from VM/SamplingTool.h.
              * jsc.cpp:
              (runWithScripts):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c4c1d67
  18. 16 Nov, 2008 3 commits
    • ggaren@apple.com's avatar
      2008-11-16 Geoffrey Garen <ggaren@apple.com> · 031563ef
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
              
              Renamed BytecodeInterpreter => Interpreter.
      
              * JavaScriptCore.exp:
              * VM/CTI.cpp:
              (JSC::):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::emitSlowScriptCheck):
              (JSC::CTI::compileBinaryArithOpSlowCase):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              (JSC::CTI::privateCompileGetByIdSelf):
              (JSC::CTI::privateCompileGetByIdProto):
              (JSC::CTI::privateCompileGetByIdChain):
              (JSC::CTI::privateCompilePutByIdReplace):
              (JSC::CTI::privateCompilePutByIdTransition):
              (JSC::CTI::privateCompileCTIMachineTrampolines):
              (JSC::CTI::freeCTIMachineTrampolines):
              (JSC::CTI::patchGetByIdSelf):
              (JSC::CTI::patchPutByIdReplace):
              (JSC::CTI::privateCompilePatchGetArrayLength):
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::printStructures):
              (JSC::CodeBlock::derefStructures):
              (JSC::CodeBlock::refStructures):
              * VM/Machine.cpp:
              (JSC::jsLess):
              (JSC::jsLessEq):
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveBase):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::resolveBaseAndFunc):
              (JSC::Interpreter::slideRegisterWindowForCall):
              (JSC::Interpreter::callEval):
              (JSC::Interpreter::Interpreter):
              (JSC::Interpreter::initialize):
              (JSC::Interpreter::~Interpreter):
              (JSC::Interpreter::dumpCallFrame):
              (JSC::Interpreter::dumpRegisters):
              (JSC::Interpreter::isOpcode):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::Interpreter::throwException):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::debug):
              (JSC::Interpreter::resetTimeoutCheck):
              (JSC::Interpreter::checkTimeout):
              (JSC::Interpreter::createExceptionScope):
              (JSC::Interpreter::tryCachePutByID):
              (JSC::Interpreter::uncachePutByID):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::uncacheGetByID):
              (JSC::Interpreter::privateExecute):
              (JSC::Interpreter::retrieveArguments):
              (JSC::Interpreter::retrieveCaller):
              (JSC::Interpreter::retrieveLastCaller):
              (JSC::Interpreter::findFunctionCallFrame):
              (JSC::Interpreter::tryCTICachePutByID):
              (JSC::Interpreter::tryCTICacheGetByID):
              (JSC::Interpreter::cti_op_convert_this):
              (JSC::Interpreter::cti_op_end):
              (JSC::Interpreter::cti_op_add):
              (JSC::Interpreter::cti_op_pre_inc):
              (JSC::Interpreter::cti_timeout_check):
              (JSC::Interpreter::cti_register_file_check):
              (JSC::Interpreter::cti_op_loop_if_less):
              (JSC::Interpreter::cti_op_loop_if_lesseq):
              (JSC::Interpreter::cti_op_new_object):
              (JSC::Interpreter::cti_op_put_by_id):
              (JSC::Interpreter::cti_op_put_by_id_second):
              (JSC::Interpreter::cti_op_put_by_id_generic):
              (JSC::Interpreter::cti_op_put_by_id_fail):
              (JSC::Interpreter::cti_op_get_by_id):
              (JSC::Interpreter::cti_op_get_by_id_second):
              (JSC::Interpreter::cti_op_get_by_id_generic):
              (JSC::Interpreter::cti_op_get_by_id_fail):
              (JSC::Interpreter::cti_op_instanceof):
              (JSC::Interpreter::cti_op_del_by_id):
              (JSC::Interpreter::cti_op_mul):
              (JSC::Interpreter::cti_op_new_func):
              (JSC::Interpreter::cti_op_call_JSFunction):
              (JSC::Interpreter::cti_op_call_arityCheck):
              (JSC::Interpreter::cti_vm_dontLazyLinkCall):
              (JSC::Interpreter::cti_vm_lazyLinkCall):
              (JSC::Interpreter::cti_op_push_activation):
              (JSC::Interpreter::cti_op_call_NotJSFunction):
              (JSC::Interpreter::cti_op_create_arguments):
              (JSC::Interpreter::cti_op_create_arguments_no_params):
              (JSC::Interpreter::cti_op_tear_off_activation):
              (JSC::Interpreter::cti_op_tear_off_arguments):
              (JSC::Interpreter::cti_op_profile_will_call):
              (JSC::Interpreter::cti_op_profile_did_call):
              (JSC::Interpreter::cti_op_ret_scopeChain):
              (JSC::Interpreter::cti_op_new_array):
              (JSC::Interpreter::cti_op_resolve):
              (JSC::Interpreter::cti_op_construct_JSConstruct):
              (JSC::Interpreter::cti_op_construct_NotJSConstruct):
              (JSC::Interpreter::cti_op_get_by_val):
              (JSC::Interpreter::cti_op_resolve_func):
              (JSC::Interpreter::cti_op_sub):
              (JSC::Interpreter::cti_op_put_by_val):
              (JSC::Interpreter::cti_op_put_by_val_array):
              (JSC::Interpreter::cti_op_lesseq):
              (JSC::Interpreter::cti_op_loop_if_true):
              (JSC::Interpreter::cti_op_negate):
              (JSC::Interpreter::cti_op_resolve_base):
              (JSC::Interpreter::cti_op_resolve_skip):
              (JSC::Interpreter::cti_op_resolve_global):
              (JSC::Interpreter::cti_op_div):
              (JSC::Interpreter::cti_op_pre_dec):
              (JSC::Interpreter::cti_op_jless):
              (JSC::Interpreter::cti_op_not):
              (JSC::Interpreter::cti_op_jtrue):
              (JSC::Interpreter::cti_op_post_inc):
              (JSC::Interpreter::cti_op_eq):
              (JSC::Interpreter::cti_op_lshift):
              (JSC::Interpreter::cti_op_bitand):
              (JSC::Interpreter::cti_op_rshift):
              (JSC::Interpreter::cti_op_bitnot):
              (JSC::Interpreter::cti_op_resolve_with_base):
              (JSC::Interpreter::cti_op_new_func_exp):
              (JSC::Interpreter::cti_op_mod):
              (JSC::Interpreter::cti_op_less):
              (JSC::Interpreter::cti_op_neq):
              (JSC::Interpreter::cti_op_post_dec):
              (JSC::Interpreter::cti_op_urshift):
              (JSC::Interpreter::cti_op_bitxor):
              (JSC::Interpreter::cti_op_new_regexp):
              (JSC::Interpreter::cti_op_bitor):
              (JSC::Interpreter::cti_op_call_eval):
              (JSC::Interpreter::cti_op_throw):
              (JSC::Interpreter::cti_op_get_pnames):
              (JSC::Interpreter::cti_op_next_pname):
              (JSC::Interpreter::cti_op_push_scope):
              (JSC::Interpreter::cti_op_pop_scope):
              (JSC::Interpreter::cti_op_typeof):
              (JSC::Interpreter::cti_op_is_undefined):
              (JSC::Interpreter::cti_op_is_boolean):
              (JSC::Interpreter::cti_op_is_number):
              (JSC::Interpreter::cti_op_is_string):
              (JSC::Interpreter::cti_op_is_object):
              (JSC::Interpreter::cti_op_is_function):
              (JSC::Interpreter::cti_op_stricteq):
              (JSC::Interpreter::cti_op_nstricteq):
              (JSC::Interpreter::cti_op_to_jsnumber):
              (JSC::Interpreter::cti_op_in):
              (JSC::Interpreter::cti_op_push_new_scope):
              (JSC::Interpreter::cti_op_jmp_scopes):
              (JSC::Interpreter::cti_op_put_by_index):
              (JSC::Interpreter::cti_op_switch_imm):
              (JSC::Interpreter::cti_op_switch_char):
              (JSC::Interpreter::cti_op_switch_string):
              (JSC::Interpreter::cti_op_del_by_val):
              (JSC::Interpreter::cti_op_put_getter):
              (JSC::Interpreter::cti_op_put_setter):
              (JSC::Interpreter::cti_op_new_error):
              (JSC::Interpreter::cti_op_debug):
              (JSC::Interpreter::cti_vm_throw):
              * VM/Machine.h:
              * VM/Register.h:
              * VM/SamplingTool.h:
              (JSC::SamplingTool::SamplingTool):
              * bytecompiler/CodeGenerator.cpp:
              (JSC::BytecodeGenerator::generate):
              (JSC::BytecodeGenerator::BytecodeGenerator):
              * jsc.cpp:
              (runWithScripts):
              * runtime/ExecState.h:
              (JSC::ExecState::interpreter):
              * runtime/JSCell.h:
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSString.h:
              * wrec/WREC.cpp:
              (WREC::compileRegExp):
              * wrec/WREC.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      031563ef
    • ggaren@apple.com's avatar
      2008-11-16 Geoffrey Garen <ggaren@apple.com> · a509e640
      ggaren@apple.com authored
              Roll out r38461 (my last patch) because it broke the world.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a509e640
    • ggaren@apple.com's avatar
      2008-11-16 Geoffrey Garen <ggaren@apple.com> · b9dd3e31
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              A few more renames:
      
              BytecodeInterpreter => Interpreter
              WREC => JSC::WREC, removing JSC:: prefix in a lot of places
              X86Assembler::copy => X86Assembler::executableCopy
              AssemblerBuffer::copy => AssemblerBuffer::executableCopy
              WRECFunction => WREC::RegExpFunction
              OBJECT_OFFSET => FIELD_OFFSET
              
              Also:
      
              Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in more places.
              Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs
      
              * JavaScriptCore.exp:
              * VM/CTI.cpp:
              (JSC::):
              (JSC::CTI::emitGetVirtualRegister):
              (JSC::CTI::emitGetVirtualRegisters):
              (JSC::CTI::emitPutCTIArgFromVirtualRegister):
              (JSC::CTI::emitPutCTIArg):
              (JSC::CTI::emitGetCTIArg):
              (JSC::CTI::emitPutCTIParam):
              (JSC::CTI::emitGetCTIParam):
              (JSC::CTI::emitPutToCallFrameHeader):
              (JSC::CTI::emitGetFromCallFrameHeader):
              (JSC::CTI::emitPutVirtualRegister):
              (JSC::CTI::emitNakedCall):
              (JSC::CTI::emitNakedFastCall):
              (JSC::CTI::emitCTICall):
              (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
              (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
              (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
              (JSC::CTI::emitFastArithDeTagImmediate):
              (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero):
              (JSC::CTI::emitFastArithReTagImmediate):
              (JSC::CTI::emitFastArithPotentiallyReTagImmediate):
              (JSC::CTI::emitFastArithImmToInt):
              (JSC::CTI::emitFastArithIntToImmOrSlowCase):
              (JSC::CTI::emitFastArithIntToImmNoCheck):
              (JSC::CTI::emitArithIntToImmWithJump):
              (JSC::CTI::emitTagAsBoolImmediate):
              (JSC::CTI::compileOpCallInitializeCallFrame):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::compileOpStrictEq):
              (JSC::CTI::emitSlowScriptCheck):
              (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
              (JSC::CTI::compileBinaryArithOp):
              (JSC::CTI::compileBinaryArithOpSlowCase):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              (JSC::CTI::privateCompileGetByIdSelf):
              (JSC::CTI::privateCompileGetByIdProto):
              (JSC::CTI::privateCompileGetByIdChain):
              (JSC::CTI::privateCompilePutByIdReplace):
              (JSC::CTI::privateCompilePutByIdTransition):
              (JSC::CTI::privateCompileCTIMachineTrampolines):
              (JSC::CTI::freeCTIMachineTrampolines):
              (JSC::CTI::patchGetByIdSelf):
              (JSC::CTI::patchPutByIdReplace):
              (JSC::CTI::privateCompilePatchGetArrayLength):
              (JSC::CTI::emitGetVariableObjectRegister):
              (JSC::CTI::emitPutVariableObjectRegister):
              * VM/CTI.h:
              (JSC::CallRecord::CallRecord):
              (JSC::JmpTable::JmpTable):
              (JSC::SlowCaseEntry::SlowCaseEntry):
              (JSC::CTI::JSRInfo::JSRInfo):
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::printStructures):
              (JSC::CodeBlock::derefStructures):
              (JSC::CodeBlock::refStructures):
              * VM/Machine.cpp:
              (JSC::jsLess):
              (JSC::jsLessEq):
              (JSC::Interpreter::resolve):
              (JSC::Interpreter::resolveSkip):
              (JSC::Interpreter::resolveGlobal):
              (JSC::Interpreter::resolveBase):
              (JSC::Interpreter::resolveBaseAndProperty):
              (JSC::Interpreter::resolveBaseAndFunc):
              (JSC::Interpreter::slideRegisterWindowForCall):
              (JSC::Interpreter::callEval):
              (JSC::Interpreter::Interpreter):
              (JSC::Interpreter::initialize):
              (JSC::Interpreter::~Interpreter):
              (JSC::Interpreter::dumpCallFrame):
              (JSC::Interpreter::dumpRegisters):
              (JSC::Interpreter::isOpcode):
              (JSC::Interpreter::unwindCallFrame):
              (JSC::Interpreter::throwException):
              (JSC::Interpreter::execute):
              (JSC::Interpreter::debug):
              (JSC::Interpreter::resetTimeoutCheck):
              (JSC::Interpreter::checkTimeout):
              (JSC::Interpreter::createExceptionScope):
              (JSC::Interpreter::tryCachePutByID):
              (JSC::Interpreter::uncachePutByID):
              (JSC::Interpreter::tryCacheGetByID):
              (JSC::Interpreter::uncacheGetByID):
              (JSC::Interpreter::privateExecute):
              (JSC::Interpreter::retrieveArguments):
              (JSC::Interpreter::retrieveCaller):
              (JSC::Interpreter::retrieveLastCaller):
              (JSC::Interpreter::findFunctionCallFrame):
              (JSC::Interpreter::tryCTICachePutByID):
              (JSC::Interpreter::tryCTICacheGetByID):
              (JSC::):
              (JSC::Interpreter::cti_op_convert_this):
              (JSC::Interpreter::cti_op_end):
              (JSC::Interpreter::cti_op_add):
              (JSC::Interpreter::cti_op_pre_inc):
              (JSC::Interpreter::cti_timeout_check):
              (JSC::Interpreter::cti_register_file_check):
              (JSC::Interpreter::cti_op_loop_if_less):
              (JSC::Interpreter::cti_op_loop_if_lesseq):
              (JSC::Interpreter::cti_op_new_object):
              (JSC::Interpreter::cti_op_put_by_id):
              (JSC::Interpreter::cti_op_put_by_id_second):
              (JSC::Interpreter::cti_op_put_by_id_generic):
              (JSC::Interpreter::cti_op_put_by_id_fail):
              (JSC::Interpreter::cti_op_get_by_id):
              (JSC::Interpreter::cti_op_get_by_id_second):
              (JSC::Interpreter::cti_op_get_by_id_generic):
              (JSC::Interpreter::cti_op_get_by_id_fail):
              (JSC::Interpreter::cti_op_instanceof):
              (JSC::Interpreter::cti_op_del_by_id):
              (JSC::Interpreter::cti_op_mul):
              (JSC::Interpreter::cti_op_new_func):
              (JSC::Interpreter::cti_op_call_JSFunction):
              (JSC::Interpreter::cti_op_call_arityCheck):
              (JSC::Interpreter::cti_vm_dontLazyLinkCall):
              (JSC::Interpreter::cti_vm_lazyLinkCall):
              (JSC::Interpreter::cti_op_push_activation):
              (JSC::Interpreter::cti_op_call_NotJSFunction):
              (JSC::Interpreter::cti_op_create_arguments):
              (JSC::Interpreter::cti_op_create_arguments_no_params):
              (JSC::Interpreter::cti_op_tear_off_activation):
              (JSC::Interpreter::cti_op_tear_off_arguments):
              (JSC::Interpreter::cti_op_profile_will_call):
              (JSC::Interpreter::cti_op_profile_did_call):
              (JSC::Interpreter::cti_op_ret_scopeChain):
              (JSC::Interpreter::cti_op_new_array):
              (JSC::Interpreter::cti_op_resolve):
              (JSC::Interpreter::cti_op_construct_JSConstruct):
              (JSC::Interpreter::cti_op_construct_NotJSConstruct):
              (JSC::Interpreter::cti_op_get_by_val):
              (JSC::Interpreter::cti_op_resolve_func):
              (JSC::Interpreter::cti_op_sub):
              (JSC::Interpreter::cti_op_put_by_val):
              (JSC::Interpreter::cti_op_put_by_val_array):
              (JSC::Interpreter::cti_op_lesseq):
              (JSC::Interpreter::cti_op_loop_if_true):
              (JSC::Interpreter::cti_op_negate):
              (JSC::Interpreter::cti_op_resolve_base):
              (JSC::Interpreter::cti_op_resolve_skip):
              (JSC::Interpreter::cti_op_resolve_global):
              (JSC::Interpreter::cti_op_div):
              (JSC::Interpreter::cti_op_pre_dec):
              (JSC::Interpreter::cti_op_jless):
              (JSC::Interpreter::cti_op_not):
              (JSC::Interpreter::cti_op_jtrue):
              (JSC::Interpreter::cti_op_post_inc):
              (JSC::Interpreter::cti_op_eq):
              (JSC::Interpreter::cti_op_lshift):
              (JSC::Interpreter::cti_op_bitand):
              (JSC::Interpreter::cti_op_rshift):
              (JSC::Interpreter::cti_op_bitnot):
              (JSC::Interpreter::cti_op_resolve_with_base):
              (JSC::Interpreter::cti_op_new_func_exp):
              (JSC::Interpreter::cti_op_mod):
              (JSC::Interpreter::cti_op_less):
              (JSC::Interpreter::cti_op_neq):
              (JSC::Interpreter::cti_op_post_dec):
              (JSC::Interpreter::cti_op_urshift):
              (JSC::Interpreter::cti_op_bitxor):
              (JSC::Interpreter::cti_op_new_regexp):
              (JSC::Interpreter::cti_op_bitor):
              (JSC::Interpreter::cti_op_call_eval):
              (JSC::Interpreter::cti_op_throw):
              (JSC::Interpreter::cti_op_get_pnames):
              (JSC::Interpreter::cti_op_next_pname):
              (JSC::Interpreter::cti_op_push_scope):
              (JSC::Interpreter::cti_op_pop_scope):
              (JSC::Interpreter::cti_op_typeof):
              (JSC::Interpreter::cti_op_is_undefined):
              (JSC::Interpreter::cti_op_is_boolean):
              (JSC::Interpreter::cti_op_is_number):
              (JSC::Interpreter::cti_op_is_string):
              (JSC::Interpreter::cti_op_is_object):
              (JSC::Interpreter::cti_op_is_function):
              (JSC::Interpreter::cti_op_stricteq):
              (JSC::Interpreter::cti_op_nstricteq):
              (JSC::Interpreter::cti_op_to_jsnumber):
              (JSC::Interpreter::cti_op_in):
              (JSC::Interpreter::cti_op_push_new_scope):
              (JSC::Interpreter::cti_op_jmp_scopes):
              (JSC::Interpreter::cti_op_put_by_index):
              (JSC::Interpreter::cti_op_switch_imm):
              (JSC::Interpreter::cti_op_switch_char):
              (JSC::Interpreter::cti_op_switch_string):
              (JSC::Interpreter::cti_op_del_by_val):
              (JSC::Interpreter::cti_op_put_getter):
              (JSC::Interpreter::cti_op_put_setter):
              (JSC::Interpreter::cti_op_new_error):
              (JSC::Interpreter::cti_op_debug):
              (JSC::Interpreter::cti_vm_throw):
              * VM/Machine.h:
              * VM/Register.h:
              * VM/SamplingTool.cpp:
              (JSC::SamplingTool::dump):
              * VM/SamplingTool.h:
              (JSC::SamplingTool::SamplingTool):
              * bytecompiler/CodeGenerator.cpp:
              (JSC::BytecodeGenerator::generate):
              (JSC::BytecodeGenerator::BytecodeGenerator):
              * jsc.cpp:
              (runWithScripts):
              * masm/X86Assembler.h:
              (JSC::AssemblerBuffer::executableCopy):
              (JSC::X86Assembler::executableCopy):
              * runtime/ExecState.h:
              (JSC::ExecState::interpreter):
              * runtime/JSCell.h:
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSImmediate.h:
              * runtime/JSString.h:
              * runtime/JSValue.h:
              * runtime/JSVariableObject.h:
              * runtime/RegExp.cpp:
              (JSC::RegExp::RegExp):
              (JSC::RegExp::~RegExp):
              (JSC::RegExp::match):
              * runtime/RegExp.h:
              * wrec/CharacterClassConstructor.cpp:
              * wrec/CharacterClassConstructor.h:
              * wrec/WREC.cpp:
              (JSC::WREC::compileRegExp):
              * wrec/WREC.h:
              (JSC::WREC::Generator::Generator):
              (JSC::WREC::Parser::):
              (JSC::WREC::Parser::Parser):
              (JSC::WREC::Parser::parseAlternative):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b9dd3e31
  19. 15 Nov, 2008 3 commits
    • ggaren@apple.com's avatar
      2008-11-15 Geoffrey Garen <ggaren@apple.com> · 47d3f059
      ggaren@apple.com authored
              Suggested by Maciej Stachowiak.
              
              Reverted most "opcode" => "bytecode" renames. We use "bytecode" as a
              mass noun to refer to a stream of instructions. Each instruction may be
              an opcode or an operand.
      
              * VM/CTI.cpp:
              (JSC::CTI::emitCTICall):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::compileBinaryArithOp):
              (JSC::CTI::compileBinaryArithOpSlowCase):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::printStructureIDs):
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::derefStructureIDs):
              (JSC::CodeBlock::refStructureIDs):
              * VM/CodeBlock.h:
              * VM/ExceptionHelpers.cpp:
              (JSC::createNotAnObjectError):
              * VM/Instruction.h:
              (JSC::Instruction::Instruction):
              (JSC::Instruction::):
              * VM/Machine.cpp:
              (JSC::BytecodeInterpreter::isOpcode):
              (JSC::BytecodeInterpreter::throwException):
              (JSC::BytecodeInterpreter::tryCachePutByID):
              (JSC::BytecodeInterpreter::uncachePutByID):
              (JSC::BytecodeInterpreter::tryCacheGetByID):
              (JSC::BytecodeInterpreter::uncacheGetByID):
              (JSC::BytecodeInterpreter::privateExecute):
              (JSC::BytecodeInterpreter::tryCTICachePutByID):
              (JSC::BytecodeInterpreter::tryCTICacheGetByID):
              * VM/Machine.h:
              (JSC::BytecodeInterpreter::getOpcode):
              (JSC::BytecodeInterpreter::getOpcodeID):
              (JSC::BytecodeInterpreter::isCallBytecode):
              * VM/Opcode.cpp:
              (JSC::):
              (JSC::OpcodeStats::OpcodeStats):
              (JSC::compareOpcodeIndices):
              (JSC::compareOpcodePairIndices):
              (JSC::OpcodeStats::~OpcodeStats):
              (JSC::OpcodeStats::recordInstruction):
              (JSC::OpcodeStats::resetLastInstruction):
              * VM/Opcode.h:
              (JSC::):
              (JSC::padOpcodeName):
              * VM/SamplingTool.cpp:
              (JSC::ScopeSampleRecord::sample):
              (JSC::SamplingTool::run):
              (JSC::compareOpcodeIndicesSampling):
              (JSC::SamplingTool::dump):
              * VM/SamplingTool.h:
              (JSC::ScopeSampleRecord::ScopeSampleRecord):
              (JSC::SamplingTool::SamplingTool):
              * bytecompiler/CodeGenerator.cpp:
              (JSC::BytecodeGenerator::BytecodeGenerator):
              (JSC::BytecodeGenerator::emitLabel):
              (JSC::BytecodeGenerator::emitOpcode):
              (JSC::BytecodeGenerator::emitJump):
              (JSC::BytecodeGenerator::emitJumpIfTrue):
              (JSC::BytecodeGenerator::emitJumpIfFalse):
              (JSC::BytecodeGenerator::emitMove):
              (JSC::BytecodeGenerator::emitUnaryOp):
              (JSC::BytecodeGenerator::emitPreInc):
              (JSC::BytecodeGenerator::emitPreDec):
              (JSC::BytecodeGenerator::emitPostInc):
              (JSC::BytecodeGenerator::emitPostDec):
              (JSC::BytecodeGenerator::emitBinaryOp):
              (JSC::BytecodeGenerator::emitEqualityOp):
              (JSC::BytecodeGenerator::emitUnexpectedLoad):
              (JSC::BytecodeGenerator::emitInstanceOf):
              (JSC::BytecodeGenerator::emitResolve):
              (JSC::BytecodeGenerator::emitGetScopedVar):
              (JSC::BytecodeGenerator::emitPutScopedVar):
              (JSC::BytecodeGenerator::emitResolveBase):
              (JSC::BytecodeGenerator::emitResolveWithBase):
              (JSC::BytecodeGenerator::emitResolveFunction):
              (JSC::BytecodeGenerator::emitGetById):
              (JSC::BytecodeGenerator::emitPutById):
              (JSC::BytecodeGenerator::emitPutGetter):
              (JSC::BytecodeGenerator::emitPutSetter):
              (JSC::BytecodeGenerator::emitDeleteById):
              (JSC::BytecodeGenerator::emitGetByVal):
              (JSC::BytecodeGenerator::emitPutByVal):
              (JSC::BytecodeGenerator::emitDeleteByVal):
              (JSC::BytecodeGenerator::emitPutByIndex):
              (JSC::BytecodeGenerator::emitNewObject):
              (JSC::BytecodeGenerator::emitNewArray):
              (JSC::BytecodeGenerator::emitNewFunction):
              (JSC::BytecodeGenerator::emitNewRegExp):
              (JSC::BytecodeGenerator::emitNewFunctionExpression):
              (JSC::BytecodeGenerator::emitCall):
              (JSC::BytecodeGenerator::emitReturn):
              (JSC::BytecodeGenerator::emitUnaryNoDstOp):
              (JSC::BytecodeGenerator::emitConstruct):
              (JSC::BytecodeGenerator::emitPopScope):
              (JSC::BytecodeGenerator::emitDebugHook):
              (JSC::BytecodeGenerator::emitComplexJumpScopes):
              (JSC::BytecodeGenerator::emitJumpScopes):
              (JSC::BytecodeGenerator::emitNextPropertyName):
              (JSC::BytecodeGenerator::emitCatch):
              (JSC::BytecodeGenerator::emitNewError):
              (JSC::BytecodeGenerator::emitJumpSubroutine):
              (JSC::BytecodeGenerator::emitSubroutineReturn):
              (JSC::BytecodeGenerator::emitPushNewScope):
              (JSC::BytecodeGenerator::beginSwitch):
              * bytecompiler/CodeGenerator.h:
              * jsc.cpp:
              (runWithScripts):
              * masm/X86Assembler.h:
              (JSC::X86Assembler::):
              (JSC::X86Assembler::emitModRm_opr):
              (JSC::X86Assembler::emitModRm_opr_Unchecked):
              (JSC::X86Assembler::emitModRm_opm):
              (JSC::X86Assembler::emitModRm_opm_Unchecked):
              (JSC::X86Assembler::emitModRm_opmsib):
              * parser/Nodes.cpp:
              (JSC::UnaryOpNode::emitBytecode):
              (JSC::BinaryOpNode::emitBytecode):
              (JSC::ReverseBinaryOpNode::emitBytecode):
              (JSC::ThrowableBinaryOpNode::emitBytecode):
              (JSC::emitReadModifyAssignment):
              (JSC::ScopeNode::ScopeNode):
              * parser/Nodes.h:
              (JSC::UnaryPlusNode::):
              (JSC::NegateNode::):
              (JSC::BitwiseNotNode::):
              (JSC::LogicalNotNode::):
              (JSC::MultNode::):
              (JSC::DivNode::):
              (JSC::ModNode::):
              (JSC::AddNode::):
              (JSC::SubNode::):
              (JSC::LeftShiftNode::):
              (JSC::RightShiftNode::):
              (JSC::UnsignedRightShiftNode::):
              (JSC::LessNode::):
              (JSC::GreaterNode::):
              (JSC::LessEqNode::):
              (JSC::GreaterEqNode::):
              (JSC::InstanceOfNode::):
              (JSC::InNode::):
              (JSC::EqualNode::):
              (JSC::NotEqualNode::):
              (JSC::StrictEqualNode::):
              (JSC::NotStrictEqualNode::):
              (JSC::BitAndNode::):
              (JSC::BitOrNode::):
              (JSC::BitXOrNode::):
              * runtime/StructureID.cpp:
              (JSC::StructureID::fromDictionaryTransition):
              * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47d3f059
    • ggaren@apple.com's avatar
      2008-11-15 Geoffrey Garen <ggaren@apple.com> · 77dd3c6a
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
              
              Renamed all forms of "byte code" "opcode" "op code" "code" "bitcode"
              etc. to "bytecode".
      
              * VM/CTI.cpp:
              (JSC::CTI::printBytecodeOperandTypes):
              (JSC::CTI::emitAllocateNumber):
              (JSC::CTI::emitNakedCall):
              (JSC::CTI::emitNakedFastCall):
              (JSC::CTI::emitCTICall):
              (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
              (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
              (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
              (JSC::CTI::emitFastArithIntToImmOrSlowCase):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::emitSlowScriptCheck):
              (JSC::CTI::compileBinaryArithOp):
              (JSC::CTI::compileBinaryArithOpSlowCase):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              * VM/CTI.h:
              (JSC::CallRecord::CallRecord):
              (JSC::SwitchRecord::SwitchRecord):
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::printStructureIDs):
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::~CodeBlock):
              (JSC::CodeBlock::derefStructureIDs):
              (JSC::CodeBlock::refStructureIDs):
              * VM/CodeBlock.h:
              (JSC::StructureStubInfo::StructureStubInfo):
              * VM/ExceptionHelpers.cpp:
              (JSC::createNotAnObjectError):
              * VM/Instruction.h:
              (JSC::Instruction::Instruction):
              (JSC::Instruction::):
              * VM/Machine.cpp:
              (JSC::BytecodeInterpreter::isBytecode):
              (JSC::BytecodeInterpreter::throwException):
              (JSC::BytecodeInterpreter::execute):
              (JSC::BytecodeInterpreter::tryCachePutByID):
              (JSC::BytecodeInterpreter::uncachePutByID):
              (JSC::BytecodeInterpreter::tryCacheGetByID):
              (JSC::BytecodeInterpreter::uncacheGetByID):
              (JSC::BytecodeInterpreter::privateExecute):
              (JSC::BytecodeInterpreter::tryCTICachePutByID):
              (JSC::BytecodeInterpreter::tryCTICacheGetByID):
              (JSC::BytecodeInterpreter::cti_op_call_JSFunction):
              (JSC::BytecodeInterpreter::cti_vm_dontLazyLinkCall):
              (JSC::BytecodeInterpreter::cti_vm_lazyLinkCall):
              * VM/Machine.h:
              (JSC::BytecodeInterpreter::getBytecode):
              (JSC::BytecodeInterpreter::getBytecodeID):
              (JSC::BytecodeInterpreter::isCallBytecode):
              * VM/Opcode.cpp:
              (JSC::):
              (JSC::BytecodeStats::BytecodeStats):
              (JSC::compareBytecodeIndices):
              (JSC::compareBytecodePairIndices):
              (JSC::BytecodeStats::~BytecodeStats):
              (JSC::BytecodeStats::recordInstruction):
              (JSC::BytecodeStats::resetLastInstruction):
              * VM/Opcode.h:
              (JSC::):
              (JSC::padBytecodeName):
              * VM/SamplingTool.cpp:
              (JSC::ScopeSampleRecord::sample):
              (JSC::SamplingTool::run):
              (JSC::compareBytecodeIndicesSampling):
              (JSC::SamplingTool::dump):
              * VM/SamplingTool.h:
              (JSC::ScopeSampleRecord::ScopeSampleRecord):
              (JSC::SamplingTool::SamplingTool):
              * bytecompiler/CodeGenerator.cpp:
              (JSC::CodeGenerator::generate):
              (JSC::CodeGenerator::CodeGenerator):
              (JSC::CodeGenerator::emitLabel):
              (JSC::CodeGenerator::emitBytecode):
              (JSC::CodeGenerator::emitJump):
              (JSC::CodeGenerator::emitJumpIfTrue):
              (JSC::CodeGenerator::emitJumpIfFalse):
              (JSC::CodeGenerator::emitMove):
              (JSC::CodeGenerator::emitUnaryOp):
              (JSC::CodeGenerator::emitPreInc):
              (JSC::CodeGenerator::emitPreDec):
              (JSC::CodeGenerator::emitPostInc):
              (JSC::CodeGenerator::emitPostDec):
              (JSC::CodeGenerator::emitBinaryOp):
              (JSC::CodeGenerator::emitEqualityOp):
              (JSC::CodeGenerator::emitUnexpectedLoad):
              (JSC::CodeGenerator::emitInstanceOf):
              (JSC::CodeGenerator::emitResolve):
              (JSC::CodeGenerator::emitGetScopedVar):
              (JSC::CodeGenerator::emitPutScopedVar):
              (JSC::CodeGenerator::emitResolveBase):
              (JSC::CodeGenerator::emitResolveWithBase):
              (JSC::CodeGenerator::emitResolveFunction):
              (JSC::CodeGenerator::emitGetById):
              (JSC::CodeGenerator::emitPutById):
              (JSC::CodeGenerator::emitPutGetter):
              (JSC::CodeGenerator::emitPutSetter):
              (JSC::CodeGenerator::emitDeleteById):
              (JSC::CodeGenerator::emitGetByVal):
              (JSC::CodeGenerator::emitPutByVal):
              (JSC::CodeGenerator::emitDeleteByVal):
              (JSC::CodeGenerator::emitPutByIndex):
              (JSC::CodeGenerator::emitNewObject):
              (JSC::CodeGenerator::emitNewArray):
              (JSC::CodeGenerator::emitNewFunction):
              (JSC::CodeGenerator::emitNewRegExp):
              (JSC::CodeGenerator::emitNewFunctionExpression):
              (JSC::CodeGenerator::emitCall):
              (JSC::CodeGenerator::emitReturn):
              (JSC::CodeGenerator::emitUnaryNoDstOp):
              (JSC::CodeGenerator::emitConstruct):
              (JSC::CodeGenerator::emitPopScope):
              (JSC::CodeGenerator::emitDebugHook):
              (JSC::CodeGenerator::emitComplexJumpScopes):
              (JSC::CodeGenerator::emitJumpScopes):
              (JSC::CodeGenerator::emitNextPropertyName):
              (JSC::CodeGenerator::emitCatch):
              (JSC::CodeGenerator::emitNewError):
              (JSC::CodeGenerator::emitJumpSubroutine):
              (JSC::CodeGenerator::emitSubroutineReturn):
              (JSC::CodeGenerator::emitPushNewScope):
              (JSC::CodeGenerator::beginSwitch):
              (JSC::CodeGenerator::endSwitch):
              * bytecompiler/CodeGenerator.h:
              (JSC::CodeGenerator::emitNode):
              * jsc.cpp:
              (runWithScripts):
              * masm/X86Assembler.h:
              (JSC::X86Assembler::):
              (JSC::X86Assembler::emitModRm_opr):
              (JSC::X86Assembler::emitModRm_opr_Unchecked):
              (JSC::X86Assembler::emitModRm_opm):
              (JSC::X86Assembler::emitModRm_opm_Unchecked):
              (JSC::X86Assembler::emitModRm_opmsib):
              * parser/Nodes.cpp:
              (JSC::NullNode::emitBytecode):
              (JSC::BooleanNode::emitBytecode):
              (JSC::NumberNode::emitBytecode):
              (JSC::StringNode::emitBytecode):
              (JSC::RegExpNode::emitBytecode):
              (JSC::ThisNode::emitBytecode):
              (JSC::ResolveNode::emitBytecode):
              (JSC::ArrayNode::emitBytecode):
              (JSC::ObjectLiteralNode::emitBytecode):
              (JSC::PropertyListNode::emitBytecode):
              (JSC::BracketAccessorNode::emitBytecode):
              (JSC::DotAccessorNode::emitBytecode):
              (JSC::ArgumentListNode::emitBytecode):
              (JSC::NewExprNode::emitBytecode):
              (JSC::EvalFunctionCallNode::emitBytecode):
              (JSC::FunctionCallValueNode::emitBytecode):
              (JSC::FunctionCallResolveNode::emitBytecode):
              (JSC::FunctionCallBracketNode::emitBytecode):
              (JSC::FunctionCallDotNode::emitBytecode):
              (JSC::PostfixResolveNode::emitBytecode):
              (JSC::PostfixBracketNode::emitBytecode):
              (JSC::PostfixDotNode::emitBytecode):
              (JSC::PostfixErrorNode::emitBytecode):
              (JSC::DeleteResolveNode::emitBytecode):
              (JSC::DeleteBracketNode::emitBytecode):
              (JSC::DeleteDotNode::emitBytecode):
              (JSC::DeleteValueNode::emitBytecode):
              (JSC::VoidNode::emitBytecode):
              (JSC::TypeOfResolveNode::emitBytecode):
              (JSC::TypeOfValueNode::emitBytecode):
              (JSC::PrefixResolveNode::emitBytecode):
              (JSC::PrefixBracketNode::emitBytecode):
              (JSC::PrefixDotNode::emitBytecode):
              (JSC::PrefixErrorNode::emitBytecode):
              (JSC::UnaryOpNode::emitBytecode):
              (JSC::BinaryOpNode::emitBytecode):
              (JSC::EqualNode::emitBytecode):
              (JSC::StrictEqualNode::emitBytecode):
              (JSC::ReverseBinaryOpNode::emitBytecode):
              (JSC::ThrowableBinaryOpNode::emitBytecode):
              (JSC::InstanceOfNode::emitBytecode):
              (JSC::LogicalOpNode::emitBytecode):
              (JSC::ConditionalNode::emitBytecode):
              (JSC::emitReadModifyAssignment):
              (JSC::ReadModifyResolveNode::emitBytecode):
              (JSC::AssignResolveNode::emitBytecode):
              (JSC::AssignDotNode::emitBytecode):
              (JSC::ReadModifyDotNode::emitBytecode):
              (JSC::AssignErrorNode::emitBytecode):
              (JSC::AssignBracketNode::emitBytecode):
              (JSC::ReadModifyBracketNode::emitBytecode):
              (JSC::CommaNode::emitBytecode):
              (JSC::ConstDeclNode::emitBytecode):
              (JSC::ConstStatementNode::emitBytecode):
              (JSC::BlockNode::emitBytecode):
              (JSC::EmptyStatementNode::emitBytecode):
              (JSC::DebuggerStatementNode::emitBytecode):
              (JSC::ExprStatementNode::emitBytecode):
              (JSC::VarStatementNode::emitBytecode):
              (JSC::IfNode::emitBytecode):
              (JSC::IfElseNode::emitBytecode):
              (JSC::DoWhileNode::emitBytecode):
              (JSC::WhileNode::emitBytecode):
              (JSC::ForNode::emitBytecode):
              (JSC::ForInNode::emitBytecode):
              (JSC::ContinueNode::emitBytecode):
              (JSC::BreakNode::emitBytecode):
              (JSC::ReturnNode::emitBytecode):
              (JSC::WithNode::emitBytecode):
              (JSC::SwitchNode::emitBytecode):
              (JSC::LabelNode::emitBytecode):
              (JSC::ThrowNode::emitBytecode):
              (JSC::TryNode::emitBytecode):
              (JSC::ScopeNode::ScopeNode):
              (JSC::EvalNode::emitBytecode):
              (JSC::FunctionBodyNode::emitBytecode):
              (JSC::ProgramNode::emitBytecode):
              (JSC::FuncDeclNode::emitBytecode):
              (JSC::FuncExprNode::emitBytecode):
              * parser/Nodes.h:
              (JSC::UnaryPlusNode::):
              (JSC::NegateNode::):
              (JSC::BitwiseNotNode::):
              (JSC::LogicalNotNode::):
              (JSC::MultNode::):
              (JSC::DivNode::):
              (JSC::ModNode::):
              (JSC::AddNode::):
              (JSC::SubNode::):
              (JSC::LeftShiftNode::):
              (JSC::RightShiftNode::):
              (JSC::UnsignedRightShiftNode::):
              (JSC::LessNode::):
              (JSC::GreaterNode::):
              (JSC::LessEqNode::):
              (JSC::GreaterEqNode::):
              (JSC::InstanceOfNode::):
              (JSC::InNode::):
              (JSC::EqualNode::):
              (JSC::NotEqualNode::):
              (JSC::StrictEqualNode::):
              (JSC::NotStrictEqualNode::):
              (JSC::BitAndNode::):
              (JSC::BitOrNode::):
              (JSC::BitXOrNode::):
              (JSC::ProgramNode::):
              (JSC::EvalNode::):
              (JSC::FunctionBodyNode::):
              * runtime/JSNotAnObject.h:
              * runtime/StructureID.cpp:
              (JSC::StructureID::fromDictionaryTransition):
              * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      77dd3c6a
    • ggaren@apple.com's avatar
      JavaScriptCore: · b7024cd0
      ggaren@apple.com authored
      2008-11-15  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Renamed Machine to BytecodeInterpreter.
              
              Nixed the Interpreter class, and changed its two functions to stand-alone
              functions.
      
              * JavaScriptCore.exp:
              * VM/CTI.cpp:
              (JSC::):
              (JSC::CTI::emitCTICall):
              (JSC::CTI::CTI):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::emitSlowScriptCheck):
              (JSC::CTI::compileBinaryArithOpSlowCase):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              (JSC::CTI::privateCompileGetByIdSelf):
              (JSC::CTI::privateCompileGetByIdProto):
              (JSC::CTI::privateCompileGetByIdChain):
              (JSC::CTI::privateCompilePutByIdReplace):
              (JSC::CTI::privateCompilePutByIdTransition):
              (JSC::CTI::privateCompileCTIMachineTrampolines):
              (JSC::CTI::freeCTIMachineTrampolines):
              (JSC::CTI::patchGetByIdSelf):
              (JSC::CTI::patchPutByIdReplace):
              (JSC::CTI::privateCompilePatchGetArrayLength):
              (JSC::CTI::compileRegExp):
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::printStructureIDs):
              (JSC::CodeBlock::dump):
              (JSC::CodeBlock::derefStructureIDs):
              (JSC::CodeBlock::refStructureIDs):
              * VM/ExceptionHelpers.cpp:
              (JSC::createNotAnObjectError):
              * VM/Machine.cpp:
              (JSC::jsLess):
              (JSC::jsLessEq):
              (JSC::BytecodeInterpreter::resolve):
              (JSC::BytecodeInterpreter::resolveSkip):
              (JSC::BytecodeInterpreter::resolveGlobal):
              (JSC::BytecodeInterpreter::resolveBase):
              (JSC::BytecodeInterpreter::resolveBaseAndProperty):
              (JSC::BytecodeInterpreter::resolveBaseAndFunc):
              (JSC::BytecodeInterpreter::slideRegisterWindowForCall):
              (JSC::BytecodeInterpreter::callEval):
              (JSC::BytecodeInterpreter::BytecodeInterpreter):
              (JSC::BytecodeInterpreter::initialize):
              (JSC::BytecodeInterpreter::~BytecodeInterpreter):
              (JSC::BytecodeInterpreter::dumpCallFrame):
              (JSC::BytecodeInterpreter::dumpRegisters):
              (JSC::BytecodeInterpreter::isOpcode):
              (JSC::BytecodeInterpreter::unwindCallFrame):
              (JSC::BytecodeInterpreter::throwException):
              (JSC::BytecodeInterpreter::execute):
              (JSC::BytecodeInterpreter::debug):
              (JSC::BytecodeInterpreter::resetTimeoutCheck):
              (JSC::BytecodeInterpreter::checkTimeout):
              (JSC::BytecodeInterpreter::createExceptionScope):
              (JSC::BytecodeInterpreter::tryCachePutByID):
              (JSC::BytecodeInterpreter::uncachePutByID):
              (JSC::BytecodeInterpreter::tryCacheGetByID):
              (JSC::BytecodeInterpreter::uncacheGetByID):
              (JSC::BytecodeInterpreter::privateExecute):
              (JSC::BytecodeInterpreter::retrieveArguments):
              (JSC::BytecodeInterpreter::retrieveCaller):
              (JSC::BytecodeInterpreter::retrieveLastCaller):
              (JSC::BytecodeInterpreter::findFunctionCallFrame):
              (JSC::BytecodeInterpreter::tryCTICachePutByID):
              (JSC::BytecodeInterpreter::tryCTICacheGetByID):
              (JSC::BytecodeInterpreter::cti_op_convert_this):
              (JSC::BytecodeInterpreter::cti_op_end):
              (JSC::BytecodeInterpreter::cti_op_add):
              (JSC::BytecodeInterpreter::cti_op_pre_inc):
              (JSC::BytecodeInterpreter::cti_timeout_check):
              (JSC::BytecodeInterpreter::cti_register_file_check):
              (JSC::BytecodeInterpreter::cti_op_loop_if_less):
              (JSC::BytecodeInterpreter::cti_op_loop_if_lesseq):
              (JSC::BytecodeInterpreter::cti_op_new_object):
              (JSC::BytecodeInterpreter::cti_op_put_by_id):
              (JSC::BytecodeInterpreter::cti_op_put_by_id_second):
              (JSC::BytecodeInterpreter::cti_op_put_by_id_generic):
              (JSC::BytecodeInterpreter::cti_op_put_by_id_fail):
              (JSC::BytecodeInterpreter::cti_op_get_by_id):
              (JSC::BytecodeInterpreter::cti_op_get_by_id_second):
              (JSC::BytecodeInterpreter::cti_op_get_by_id_generic):
              (JSC::BytecodeInterpreter::cti_op_get_by_id_fail):
              (JSC::BytecodeInterpreter::cti_op_instanceof):
              (JSC::BytecodeInterpreter::cti_op_del_by_id):
              (JSC::BytecodeInterpreter::cti_op_mul):
              (JSC::BytecodeInterpreter::cti_op_new_func):
              (JSC::BytecodeInterpreter::cti_op_call_JSFunction):
              (JSC::BytecodeInterpreter::cti_op_call_arityCheck):
              (JSC::BytecodeInterpreter::cti_vm_dontLazyLinkCall):
              (JSC::BytecodeInterpreter::cti_vm_lazyLinkCall):
              (JSC::BytecodeInterpreter::cti_op_push_activation):
              (JSC::BytecodeInterpreter::cti_op_call_NotJSFunction):
              (JSC::BytecodeInterpreter::cti_op_create_arguments):
              (JSC::BytecodeInterpreter::cti_op_create_arguments_no_params):
              (JSC::BytecodeInterpreter::cti_op_tear_off_activation):
              (JSC::BytecodeInterpreter::cti_op_tear_off_arguments):
              (JSC::BytecodeInterpreter::cti_op_profile_will_call):
              (JSC::BytecodeInterpreter::cti_op_profile_did_call):
              (JSC::BytecodeInterpreter::cti_op_ret_scopeChain):
              (JSC::BytecodeInterpreter::cti_op_new_array):
              (JSC::BytecodeInterpreter::cti_op_resolve):
              (JSC::BytecodeInterpreter::cti_op_construct_JSConstruct):
              (JSC::BytecodeInterpreter::cti_op_construct_NotJSConstruct):
              (JSC::BytecodeInterpreter::cti_op_get_by_val):
              (JSC::BytecodeInterpreter::cti_op_resolve_func):
              (JSC::BytecodeInterpreter::cti_op_sub):
              (JSC::BytecodeInterpreter::cti_op_put_by_val):
              (JSC::BytecodeInterpreter::cti_op_put_by_val_array):
              (JSC::BytecodeInterpreter::cti_op_lesseq):
              (JSC::BytecodeInterpreter::cti_op_loop_if_true):
              (JSC::BytecodeInterpreter::cti_op_negate):
              (JSC::BytecodeInterpreter::cti_op_resolve_base):
              (JSC::BytecodeInterpreter::cti_op_resolve_skip):
              (JSC::BytecodeInterpreter::cti_op_resolve_global):
              (JSC::BytecodeInterpreter::cti_op_div):
              (JSC::BytecodeInterpreter::cti_op_pre_dec):
              (JSC::BytecodeInterpreter::cti_op_jless):
              (JSC::BytecodeInterpreter::cti_op_not):
              (JSC::BytecodeInterpreter::cti_op_jtrue):
              (JSC::BytecodeInterpreter::cti_op_post_inc):
              (JSC::BytecodeInterpreter::cti_op_eq):
              (JSC::BytecodeInterpreter::cti_op_lshift):
              (JSC::BytecodeInterpreter::cti_op_bitand):
              (JSC::BytecodeInterpreter::cti_op_rshift):
              (JSC::BytecodeInterpreter::cti_op_bitnot):
              (JSC::BytecodeInterpreter::cti_op_resolve_with_base):
              (JSC::BytecodeInterpreter::cti_op_new_func_exp):
              (JSC::BytecodeInterpreter::cti_op_mod):
              (JSC::BytecodeInterpreter::cti_op_less):
              (JSC::BytecodeInterpreter::cti_op_neq):
              (JSC::BytecodeInterpreter::cti_op_post_dec):
              (JSC::BytecodeInterpreter::cti_op_urshift):
              (JSC::BytecodeInterpreter::cti_op_bitxor):
              (JSC::BytecodeInterpreter::cti_op_new_regexp):
              (JSC::BytecodeInterpreter::cti_op_bitor):
              (JSC::BytecodeInterpreter::cti_op_call_eval):
              (JSC::BytecodeInterpreter::cti_op_throw):
              (JSC::BytecodeInterpreter::cti_op_get_pnames):
              (JSC::BytecodeInterpreter::cti_op_next_pname):
              (JSC::BytecodeInterpreter::cti_op_push_scope):
              (JSC::BytecodeInterpreter::cti_op_pop_scope):
              (JSC::BytecodeInterpreter::cti_op_typeof):
              (JSC::BytecodeInterpreter::cti_op_is_undefined):
              (JSC::BytecodeInterpreter::cti_op_is_boolean):
              (JSC::BytecodeInterpreter::cti_op_is_number):
              (JSC::BytecodeInterpreter::cti_op_is_string):
              (JSC::BytecodeInterpreter::cti_op_is_object):
              (JSC::BytecodeInterpreter::cti_op_is_function):
              (JSC::BytecodeInterpreter::cti_op_stricteq):
              (JSC::BytecodeInterpreter::cti_op_nstricteq):
              (JSC::BytecodeInterpreter::cti_op_to_jsnumber):
              (JSC::BytecodeInterpreter::cti_op_in):
              (JSC::BytecodeInterpreter::cti_op_push_new_scope):
              (JSC::BytecodeInterpreter::cti_op_jmp_scopes):
              (JSC::BytecodeInterpreter::cti_op_put_by_index):
              (JSC::BytecodeInterpreter::cti_op_switch_imm):
              (JSC::BytecodeInterpreter::cti_op_switch_char):
              (JSC::BytecodeInterpreter::cti_op_switch_string):
              (JSC::BytecodeInterpreter::cti_op_del_by_val):
              (JSC::BytecodeInterpreter::cti_op_put_getter):
              (JSC::BytecodeInterpreter::cti_op_put_setter):
              (JSC::BytecodeInterpreter::cti_op_new_error):
              (JSC::BytecodeInterpreter::cti_op_debug):
              (JSC::BytecodeInterpreter::cti_vm_throw):
              * VM/Machine.h:
              * VM/Register.h:
              * VM/SamplingTool.cpp:
              (JSC::SamplingTool::run):
              * VM/SamplingTool.h:
              (JSC::SamplingTool::SamplingTool):
              * bytecompiler/CodeGenerator.cpp:
              (JSC::CodeGenerator::generate):
              (JSC::CodeGenerator::CodeGenerator):
              (JSC::CodeGenerator::emitOpcode):
              * debugger/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::evaluate):
              * jsc.cpp:
              (runWithScripts):
              * parser/Nodes.cpp:
              (JSC::ScopeNode::ScopeNode):
              * profiler/ProfileGenerator.cpp:
              (JSC::ProfileGenerator::addParentForConsoleStart):
              * runtime/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncPop):
              (JSC::arrayProtoFuncPush):
              * runtime/Collector.cpp:
              (JSC::Heap::collect):
              * runtime/ExecState.h:
              (JSC::ExecState::interpreter):
              * runtime/FunctionPrototype.cpp:
              (JSC::functionProtoFuncApply):
              * runtime/Interpreter.cpp:
              (JSC::Interpreter::evaluate):
              * runtime/JSCell.h:
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::call):
              (JSC::JSFunction::argumentsGetter):
              (JSC::JSFunction::callerGetter):
              (JSC::JSFunction::construct):
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::~JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::~JSGlobalObject):
              (JSC::JSGlobalObject::setTimeoutTime):
              (JSC::JSGlobalObject::startTimeoutCheck):
              (JSC::JSGlobalObject::stopTimeoutCheck):
              (JSC::JSGlobalObject::mark):
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncEval):
              * runtime/JSString.h:
              * runtime/RegExp.cpp:
              (JSC::RegExp::RegExp):
      
      JavaScriptGlue:
      
      2008-11-15  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Updated for JavaScriptCore renames.
      
              * JSRun.cpp:
              (JSRun::Evaluate):
              (JSRun::CheckSyntax):
      
      WebCore:
      
      2008-11-15  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Updated for JavaScriptCore renames.
      
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::JSNode::mark):
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              (WebCore::JSXMLHttpRequest::send):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::evaluate):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::evaluate):
              * bindings/objc/WebScriptObject.mm:
              (-[WebScriptObject evaluateWebScript:]):
              * bridge/NP_jsobject.cpp:
              (_NPN_Evaluate):
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::eval):
              * page/Console.cpp:
              (WebCore::retrieveLastCaller):
              (WebCore::Console::trace):
      
      WebKit/win:
      
      2008-11-15  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Updated for JavaScriptCore renames.
      
              * WebScriptCallFrame.cpp:
              (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7024cd0
  20. 06 Nov, 2008 1 commit
    • cwzwarich@webkit.org's avatar
      2008-11-06 Cameron Zwarich <zwarich@apple.com> · 3ff0e6a7
      cwzwarich@webkit.org authored
              Reviewed by Geoff Garen.
      
              Move the remaining files in the kjs subdirectory of JavaScriptCore to
              a new parser subdirectory, and remove the kjs subdirectory entirely.
      
              JavaScriptCore:
      
              * AllInOneFile.cpp:
              * DerivedSources.make:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.vcproj/WTF/WTF.vcproj:
              * JavaScriptCore.vcproj/jsc/jsc.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/CodeBlock.h:
              * VM/ExceptionHelpers.cpp:
              * VM/SamplingTool.h:
              * bytecompiler/CodeGenerator.h:
              * jsc.pro:
              * jscore.bkl:
              * kjs: Removed.
              * kjs/NodeInfo.h: Removed.
              * kjs/Parser.cpp: Removed.
              * kjs/Parser.h: Removed.
              * kjs/ResultType.h: Removed.
              * kjs/SourceCode.h: Removed.
              * kjs/SourceProvider.h: Removed.
              * kjs/grammar.y: Removed.
              * kjs/keywords.table: Removed.
              * kjs/lexer.cpp: Removed.
              * kjs/lexer.h: Removed.
              * kjs/nodes.cpp: Removed.
              * kjs/nodes.h: Removed.
              * kjs/nodes2string.cpp: Removed.
              * parser: Added.
              * parser/Grammar.y: Copied from kjs/grammar.y.
              * parser/Keywords.table: Copied from kjs/keywords.table.
              * parser/Lexer.cpp: Copied from kjs/lexer.cpp.
              * parser/Lexer.h: Copied from kjs/lexer.h.
              * parser/NodeInfo.h: Copied from kjs/NodeInfo.h.
              * parser/Nodes.cpp: Copied from kjs/nodes.cpp.
              * parser/Nodes.h: Copied from kjs/nodes.h.
              * parser/Parser.cpp: Copied from kjs/Parser.cpp.
              * parser/Parser.h: Copied from kjs/Parser.h.
              * parser/ResultType.h: Copied from kjs/ResultType.h.
              * parser/SourceCode.h: Copied from kjs/SourceCode.h.
              * parser/SourceProvider.h: Copied from kjs/SourceProvider.h.
              * parser/nodes2string.cpp: Copied from kjs/nodes2string.cpp.
              * pcre/pcre.pri:
              * pcre/pcre_exec.cpp:
              * runtime/FunctionConstructor.cpp:
              * runtime/JSActivation.h:
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.cpp:
              * runtime/JSGlobalObjectFunctions.cpp:
              * runtime/JSObject.cpp:
              (JSC::JSObject::toNumber):
              * runtime/RegExp.cpp:
      
              WebCore:
      
              * ForwardingHeaders/kjs: Removed.
              * ForwardingHeaders/kjs/Parser.h: Removed.
              * ForwardingHeaders/kjs/SavedBuiltins.h: Removed.
              * ForwardingHeaders/kjs/SourceCode.h: Removed.
              * ForwardingHeaders/kjs/SourceProvider.h: Removed.
              * ForwardingHeaders/parser: Added.
              * ForwardingHeaders/parser/Parser.h: Copied from ForwardingHeaders/kjs/Parser.h.
              * ForwardingHeaders/parser/SourceCode.h: Copied from ForwardingHeaders/kjs/SourceCode.h.
              * ForwardingHeaders/parser/SourceProvider.h: Copied from ForwardingHeaders/kjs/SourceProvider.h.
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * bindings/js/StringSourceProvider.h:
              * bindings/js/WorkerScriptController.cpp:
              * bridge/NP_jsobject.cpp:
              * bridge/jni/jni_jsobject.mm:
              * bridge/testbindings.pro:
              * inspector/JavaScriptDebugServer.cpp:
      
              WebKit/mac:
      
              * ForwardingHeaders/kjs: Removed.
              * ForwardingHeaders/kjs/SavedBuiltins.h: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ff0e6a7
  21. 27 Oct, 2008 2 commits
    • ggaren@apple.com's avatar
      2008-10-27 Geoffrey Garen <ggaren@apple.com> · 83eb037e
      ggaren@apple.com authored
              Reviewed by Maciej Stachowiak.
              
              Stop discarding CodeBlock samples that can't be charged to a specific
              opcode. Instead, charge the relevant CodeBlock, and provide a footnote
              explaining the situation.
              
              This will help us tell which CodeBlocks are hot, even if we can't
              identify specific lines of code within the CodeBlocks.
      
              * VM/SamplingTool.cpp:
              (JSC::ScopeSampleRecord::sample):
              (JSC::compareScopeSampleRecords):
              (JSC::SamplingTool::dump):
      
              * VM/SamplingTool.h:
              (JSC::ScopeSampleRecord::ScopeSampleRecord):
              (JSC::ScopeSampleRecord::~ScopeSampleRecord):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83eb037e
    • ggaren@apple.com's avatar
      2008-10-27 Geoffrey Garen <ggaren@apple.com> · 763ffc17
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
              
              Added a mutex around the SamplingTool's ScopeNode* map, to solve a crash
              when sampling the v8 tests.
      
              * VM/SamplingTool.cpp:
              (JSC::SamplingTool::run):
              (JSC::SamplingTool::notifyOfScope):
              * VM/SamplingTool.h: Since new ScopeNodes can be created after
              the SamplingTools has begun sampling, reads and writes to / from the
              map need to be synchronized. Shark says this doesn't measurably increase
              sampling overhead.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      763ffc17
  22. 25 Oct, 2008 2 commits
    • ggaren@apple.com's avatar
      2008-10-25 Geoffrey Garen <ggaren@apple.com> · d2fd0655
      ggaren@apple.com authored
              Not reviewed.
              
              Try to fix Windows build.
      
              * VM/SamplingTool.h:
              (JSC::SamplingTool::encodeSample): Explicitly cast bool to int, to
              silence compiler warning.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2fd0655
    • ggaren@apple.com's avatar
      2008-10-25 Geoffrey Garen <ggaren@apple.com> · be95ccfc
      ggaren@apple.com authored
              Reviewed by Sam Weinig, with Gavin Barraclough's help.
              
              Fixed Sampling Tool:
                  - Made CodeBlock sampling work with CTI
                  - Improved accuracy by unifying most sampling data into a single
                    32bit word, which can be written / read atomically.
                  - Split out three different #ifdefs for modularity: OPCODE_SAMPLING;
                    CODEBLOCK_SAMPLING; OPCODE_STATS.
                  - Improved reporting clarity
                  - Refactored for code clarity
      
              * JavaScriptCore.exp: Exported another symbol.
      
              * VM/CTI.cpp:
              (JSC::CTI::emitCTICall):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::emitSlowScriptCheck):
              (JSC::CTI::compileBinaryArithOpSlowCase):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              * VM/CTI.h: Updated CTI codegen to use the unified SamplingTool interface
              for encoding samples. (This required passing the current vPC to a lot
              more functions, since the unified interface samples the current vPC.)
              Added hooks for writing the current CodeBlock* on function entry and
              after a function call, for the sake of the CodeBlock sampler. Removed
              obsolete hook for clearing the current sample inside op_end. Also removed
              the custom enum used to differentiate flavors of op_call, since the
              OpcodeID enum works just as well. (This was important in an earlier
              version of the patch, but now it's just cleanup.)
      
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::lineNumberForVPC):
              * VM/CodeBlock.h: Upated for refactored #ifdefs. Changed lineNumberForVPC
              to be robust against vPCs not recorded for exception handling, since
              the Sampler may ask for an arbitrary vPC.
      
              * VM/Machine.cpp:
              (JSC::Machine::execute):
              (JSC::Machine::privateExecute):
              (JSC::Machine::cti_op_call_NotJSFunction):
              (JSC::Machine::cti_op_construct_NotJSConstruct):
              * VM/Machine.h:
              (JSC::Machine::setSampler):
              (JSC::Machine::sampler):
              (JSC::Machine::jitCodeBuffer): Upated for refactored #ifdefs. Changed
              Machine to use SamplingTool helper objects to record movement in and
              out of host code. This makes samples a bit more precise.
              
              * VM/Opcode.cpp:
              (JSC::OpcodeStats::~OpcodeStats):
              * VM/Opcode.h: Upated for refactored #ifdefs. Added a little more padding,
              to accomodate our more verbose opcode names.
      
              * VM/SamplingTool.cpp:
              (JSC::ScopeSampleRecord::sample): Only count a sample toward our total
              if we actually record it. This solves cases where a CodeBlock will
              claim to have been sampled many times, with reported samples that don't
              match.
      
              (JSC::SamplingTool::run): Read the current sample into a Sample helper
              object, to ensure that the data doesn't change while we're analyzing it,
              and to help decode the data. Only access the CodeBlock sampling hash
              table if CodeBlock sampling has been enabled, so non-CodeBlock sampling
              runs can operate with even less overhead.
      
              (JSC::SamplingTool::dump): I reorganized this code a lot to print the
              most important info at the top, print as a table, annotate and document
              the stuff I didn't understand when I started, etc.
      
              * VM/SamplingTool.h: New helper classes, described above.
      
              * kjs/Parser.h:
              * kjs/Shell.cpp:
              (runWithScripts):
              * kjs/nodes.cpp:
              (JSC::ScopeNode::ScopeNode): Updated for new sampling APIs.
      
              * wtf/Platform.h: Moved sampling #defines here, since our custom is to
              put ENABLE #defines into Platform.h. Made explicit the fact that
              CODEBLOCK_SAMPLING depends on OPCODE_SAMPLING.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be95ccfc
  23. 05 Oct, 2008 1 commit
    • barraclough@apple.com's avatar
      2008-10-05 Gavin Barraclough <barraclough@apple.com> · 6bd3e165
      barraclough@apple.com authored
              Reviewed by Cameron Zwarich.
      
              Fix for bug #21387 - using SamplingTool with CTI.
      
              (1) A repatch offset offset changes due to an additional instruction to update SamplingTool state.
              (2) Fix an incusion order problem due to ExecState changes.
              (3) Change to a MACHINE_SAMPLING macro, use of exec should now be accessing global data.
      
              * VM/CTI.h:
              (JSC::CTI::execute):
              * VM/SamplingTool.h:
              (JSC::SamplingTool::privateExecuteReturned):
              * kjs/Shell.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6bd3e165
  24. 14 Sep, 2008 1 commit
  25. 07 Sep, 2008 1 commit
    • cwzwarich@webkit.org's avatar
      2008-09-07 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 3f782f6a
      cwzwarich@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Bug 20704: Replace the KJS namespace
              <https://bugs.webkit.org/show_bug.cgi?id=20704>
      
              Rename the KJS namespace to JSC. There are still some uses of KJS in
              preprocessor macros and comments, but these will also be changed some
              time in the near future. There are also some uses in the names of JNI
              functions, but I will check if these are safe to change as well.
      
              JavaScriptCore:
      
              * API/APICast.h:
              (toJS):
              (toRef):
              (toGlobalRef):
              * API/JSBase.cpp:
              * API/JSCallbackConstructor.cpp:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.cpp:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSClassRef.cpp:
              (OpaqueJSClass::staticValues):
              (OpaqueJSClass::staticFunctions):
              * API/JSClassRef.h:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSProfilerPrivate.cpp:
              * API/JSStringRef.cpp:
              * API/JSValueRef.cpp:
              (JSValueGetType):
              * API/OpaqueJSString.cpp:
              * API/OpaqueJSString.h:
              * JavaScriptCore.Debug.exp:
              * JavaScriptCore.base.exp:
              * VM/CTI.cpp:
              (JSC::):
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/CodeGenerator.h:
              * VM/ExceptionHelpers.cpp:
              * VM/ExceptionHelpers.h:
              * VM/Instruction.h:
              * VM/JSPropertyNameIterator.cpp:
              * VM/JSPropertyNameIterator.h:
              * VM/LabelID.h:
              * VM/Machine.cpp:
              * VM/Machine.h:
              * VM/Opcode.cpp:
              * VM/Opcode.h:
              * VM/Register.h:
              (WTF::):
              * VM/RegisterFile.cpp:
              * VM/RegisterFile.h:
              * VM/RegisterID.h:
              (WTF::):
              * VM/SamplingTool.cpp:
              * VM/SamplingTool.h:
              * VM/SegmentedVector.h:
              * kjs/ArgList.cpp:
              * kjs/ArgList.h:
              * kjs/Arguments.cpp:
              * kjs/Arguments.h:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayConstructor.h:
              * kjs/ArrayPrototype.cpp:
              * kjs/ArrayPrototype.h:
              * kjs/BatchedTransitionOptimizer.h:
              * kjs/BooleanConstructor.cpp:
              * kjs/BooleanConstructor.h:
              * kjs/BooleanObject.cpp:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp:
              * kjs/BooleanPrototype.h:
              * kjs/CallData.cpp:
              * kjs/CallData.h:
              * kjs/ClassInfo.h:
              * kjs/CommonIdentifiers.cpp:
              * kjs/CommonIdentifiers.h:
              * kjs/ConstructData.cpp:
              * kjs/ConstructData.h:
              * kjs/DateConstructor.cpp:
              * kjs/DateConstructor.h:
              * kjs/DateInstance.cpp:
              (JSC::DateInstance::msToGregorianDateTime):
              * kjs/DateInstance.h:
              * kjs/DateMath.cpp:
              * kjs/DateMath.h:
              * kjs/DatePrototype.cpp:
              * kjs/DatePrototype.h:
              * kjs/DebuggerCallFrame.cpp:
              * kjs/DebuggerCallFrame.h:
              * kjs/Error.cpp:
              * kjs/Error.h:
              * kjs/ErrorConstructor.cpp:
              * kjs/ErrorConstructor.h:
              * kjs/ErrorInstance.cpp:
              * kjs/ErrorInstance.h:
              * kjs/ErrorPrototype.cpp:
              * kjs/ErrorPrototype.h:
              * kjs/ExecState.cpp:
              * kjs/ExecState.h:
              * kjs/FunctionConstructor.cpp:
              * kjs/FunctionConstructor.h:
              * kjs/FunctionPrototype.cpp:
              * kjs/FunctionPrototype.h:
              * kjs/GetterSetter.cpp:
              * kjs/GetterSetter.h:
              * kjs/GlobalEvalFunction.cpp:
              * kjs/GlobalEvalFunction.h:
              * kjs/IndexToNameMap.cpp:
              * kjs/IndexToNameMap.h:
              * kjs/InitializeThreading.cpp:
              * kjs/InitializeThreading.h:
              * kjs/InternalFunction.cpp:
              * kjs/InternalFunction.h:
              (JSC::InternalFunction::InternalFunction):
              * kjs/JSActivation.cpp:
              * kjs/JSActivation.h:
              * kjs/JSArray.cpp:
              * kjs/JSArray.h:
              * kjs/JSCell.cpp:
              * kjs/JSCell.h:
              * kjs/JSFunction.cpp:
              * kjs/JSFunction.h:
              (JSC::JSFunction::JSFunction):
              * kjs/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObjectFunctions.cpp:
              * kjs/JSGlobalObjectFunctions.h:
              * kjs/JSImmediate.cpp:
              * kjs/JSImmediate.h:
              * kjs/JSLock.cpp:
              * kjs/JSLock.h:
              * kjs/JSNotAnObject.cpp:
              * kjs/JSNotAnObject.h:
              * kjs/JSNumberCell.cpp:
              * kjs/JSNumberCell.h:
              * kjs/JSObject.cpp:
              * kjs/JSObject.h:
              * kjs/JSStaticScopeObject.cpp:
              * kjs/JSStaticScopeObject.h:
              * kjs/JSString.cpp:
              * kjs/JSString.h:
              * kjs/JSType.h:
              * kjs/JSValue.cpp:
              * kjs/JSValue.h:
              * kjs/JSVariableObject.cpp:
              * kjs/JSVariableObject.h:
              * kjs/JSWrapperObject.cpp:
              * kjs/JSWrapperObject.h:
              * kjs/LabelStack.cpp:
              * kjs/LabelStack.h:
              * kjs/MathObject.cpp:
              * kjs/MathObject.h:
              * kjs/NativeErrorConstructor.cpp:
              * kjs/NativeErrorConstructor.h:
              * kjs/NativeErrorPrototype.cpp:
              * kjs/NativeErrorPrototype.h:
              * kjs/NodeInfo.h:
              * kjs/NumberConstructor.cpp:
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.cpp:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp:
              * kjs/NumberPrototype.h:
              * kjs/ObjectConstructor.cpp:
              * kjs/ObjectConstructor.h:
              * kjs/ObjectPrototype.cpp:
              * kjs/ObjectPrototype.h:
              * kjs/Parser.cpp:
              * kjs/Parser.h:
              * kjs/PropertyMap.cpp:
              (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger):
              * kjs/PropertyMap.h:
              * kjs/PropertyNameArray.cpp:
              * kjs/PropertyNameArray.h:
              * kjs/PropertySlot.cpp:
              * kjs/PropertySlot.h:
              * kjs/PrototypeFunction.cpp:
              * kjs/PrototypeFunction.h:
              * kjs/PutPropertySlot.h:
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpConstructor.h:
              * kjs/RegExpObject.cpp:
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp:
              * kjs/RegExpPrototype.h:
              * kjs/ScopeChain.cpp:
              * kjs/ScopeChain.h:
              * kjs/ScopeChainMark.h:
              * kjs/Shell.cpp:
              (jscmain):
              * kjs/SmallStrings.cpp:
              * kjs/SmallStrings.h:
              * kjs/SourceProvider.h:
              * kjs/SourceRange.h:
              * kjs/StringConstructor.cpp:
              * kjs/StringConstructor.h:
              * kjs/StringObject.cpp:
              * kjs/StringObject.h:
              * kjs/StringObjectThatMasqueradesAsUndefined.h:
              * kjs/StringPrototype.cpp:
              * kjs/StringPrototype.h:
              * kjs/StructureID.cpp:
              * kjs/StructureID.h:
              * kjs/SymbolTable.h:
              * kjs/collector.cpp:
              * kjs/collector.h:
              * kjs/completion.h:
              * kjs/create_hash_table:
              * kjs/debugger.cpp:
              * kjs/debugger.h:
              * kjs/dtoa.cpp:
              * kjs/dtoa.h:
              * kjs/grammar.y:
              * kjs/identifier.cpp:
              * kjs/identifier.h:
              (JSC::Identifier::equal):
              * kjs/interpreter.cpp:
              * kjs/interpreter.h:
              * kjs/lexer.cpp:
              (JSC::Lexer::Lexer):
              (JSC::Lexer::clear):
              (JSC::Lexer::makeIdentifier):
              * kjs/lexer.h:
              * kjs/lookup.cpp:
              * kjs/lookup.h:
              * kjs/nodes.cpp:
              * kjs/nodes.h:
              * kjs/nodes2string.cpp:
              * kjs/operations.cpp:
              * kjs/operations.h:
              * kjs/protect.h:
              * kjs/regexp.cpp:
              * kjs/regexp.h:
              * kjs/ustring.cpp:
              * kjs/ustring.h:
              (JSC::operator!=):
              (JSC::IdentifierRepHash::hash):
              (WTF::):
              * masm/MacroAssembler.h:
              * masm/MacroAssemblerWin.cpp:
              * masm/X86Assembler.h:
              * pcre/pcre_exec.cpp:
              * profiler/CallIdentifier.h:
              (WTF::):
              * profiler/HeavyProfile.cpp:
              * profiler/HeavyProfile.h:
              * profiler/Profile.cpp:
              * profiler/Profile.h:
              * profiler/ProfileGenerator.cpp:
              * profiler/ProfileGenerator.h:
              * profiler/ProfileNode.cpp:
              * profiler/ProfileNode.h:
              * profiler/Profiler.cpp:
              * profiler/Profiler.h:
              * profiler/TreeProfile.cpp:
              * profiler/TreeProfile.h:
              * wrec/WREC.cpp:
              * wrec/WREC.h:
              * wtf/AVLTree.h:
      
              WebCore:
      
              * WebCore.base.exp:
              * bindings/js/GCController.cpp:
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSAudioConstructor.cpp:
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::classInfo):
              * bindings/js/JSCSSRuleCustom.cpp:
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              * bindings/js/JSCSSValueCustom.cpp:
              * bindings/js/JSCanvasPixelArrayCustom.cpp:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp:
              * bindings/js/JSConsoleCustom.cpp:
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              (WebCore::JSCustomSQLStatementCallback::handleEvent):
              * bindings/js/JSCustomSQLStatementCallback.h:
              (WebCore::JSCustomSQLStatementCallback::create):
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
              * bindings/js/JSCustomSQLStatementErrorCallback.h:
              (WebCore::JSCustomSQLStatementErrorCallback::create):
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              (WebCore::JSCustomSQLTransactionCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionCallback.h:
              (WebCore::JSCustomSQLTransactionCallback::create):
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionErrorCallback.h:
              (WebCore::JSCustomSQLTransactionErrorCallback::create):
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::JSCustomVoidCallback::handleEvent):
              * bindings/js/JSCustomVoidCallback.h:
              (WebCore::JSCustomVoidCallback::create):
              * bindings/js/JSCustomXPathNSResolver.cpp:
              (WebCore::JSCustomXPathNSResolver::create):
              * bindings/js/JSCustomXPathNSResolver.h:
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              (WebCore::JSDOMApplicationCache::dispatchEvent):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::jsOwnedStringOrNull):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObject::DOMObject):
              (WebCore::cacheDOMObject):
              (WebCore::cacheSVGDOMObject):
              (WebCore::DOMExceptionTranslator::DOMExceptionTranslator):
              (WebCore::toJS):
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::classInfo):
              (WebCore::JSDOMWindowBase::d):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::getPropertyAttributes):
              * bindings/js/JSDOMWindowCustom.h:
              (WebCore::asJSDOMWindow):
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              (WebCore::JSDOMWindow::customPut):
              (WebCore::JSDOMWindowBase::allowsAccessFrom):
              (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::getPropertyAttributes):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::classInfo):
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSDocumentFragmentCustom.cpp:
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSEventListener.cpp:
              * bindings/js/JSEventListener.h:
              (WebCore::JSUnprotectedEventListener::create):
              (WebCore::JSEventListener::create):
              * bindings/js/JSEventTargetBase.cpp:
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetBase::getValueProperty):
              (WebCore::JSEventTargetBase::putValueProperty):
              (WebCore::JSEventTargetBase::getOwnPropertySlot):
              (WebCore::JSEventTargetBase::put):
              (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
              (WebCore::JSEventTargetPrototype::self):
              (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
              (WebCore::JSEventTargetPrototype::classInfo):
              * bindings/js/JSEventTargetNode.cpp:
              * bindings/js/JSEventTargetNode.h:
              (WebCore::JSEventTargetNode::getOwnPropertySlot):
              (WebCore::JSEventTargetNode::getValueProperty):
              (WebCore::JSEventTargetNode::put):
              (WebCore::JSEventTargetNode::putValueProperty):
              * bindings/js/JSHTMLAllCollection.h:
              (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
              (WebCore::JSHTMLAllCollection::toBoolean):
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLCollectionCustom.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLElementCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
              * bindings/js/JSHTMLInputElementBase.h:
              (WebCore::JSHTMLInputElementBase::classInfo):
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              * bindings/js/JSHTMLOptionElementConstructor.h:
              (WebCore::JSHTMLOptionElementConstructor::classInfo):
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              (WebCore::selectIndexSetter):
              (WebCore::JSHTMLSelectElement::indexSetter):
              * bindings/js/JSHTMLSelectElementCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSImageConstructor.cpp:
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::classInfo):
              * bindings/js/JSInspectedObjectWrapper.cpp:
              * bindings/js/JSInspectedObjectWrapper.h:
              (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue):
              (WebCore::JSInspectedObjectWrapper::classInfo):
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              * bindings/js/JSInspectorCallbackWrapper.h:
              (WebCore::JSInspectorCallbackWrapper::classInfo):
              (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              * bindings/js/JSLocationCustom.cpp:
              * bindings/js/JSMimeTypeArrayCustom.cpp:
              * bindings/js/JSNSResolver.cpp:
              * bindings/js/JSNSResolver.h:
              (WebCore::JSNSResolver::create):
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
              * bindings/js/JSNamedNodesCollection.h:
              (WebCore::JSNamedNodesCollection::classInfo):
              * bindings/js/JSNavigatorCustom.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              (WebCore::JSNodeFilterCondition::create):
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSNodeIteratorCustom.cpp:
              * bindings/js/JSNodeListCustom.cpp:
              * bindings/js/JSPluginArrayCustom.cpp:
              * bindings/js/JSPluginCustom.cpp:
              * bindings/js/JSPluginElementFunctions.cpp:
              (WebCore::getRuntimeObject):
              * bindings/js/JSPluginElementFunctions.h:
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              (WebCore::JSQuarantinedObjectWrapper::construct):
              (WebCore::JSQuarantinedObjectWrapper::call):
              * bindings/js/JSQuarantinedObjectWrapper.h:
              (WebCore::JSQuarantinedObjectWrapper::unwrappedObject):
              (WebCore::JSQuarantinedObjectWrapper::unwrappedGlobalObject):
              (WebCore::JSQuarantinedObjectWrapper::className):
              * bindings/js/JSRGBColor.cpp:
              * bindings/js/JSRGBColor.h:
              (WebCore::JSRGBColor::classInfo):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSSVGLazyEventListener.cpp:
              * bindings/js/JSSVGLazyEventListener.h:
              * bindings/js/JSSVGLengthCustom.cpp:
              * bindings/js/JSSVGMatrixCustom.cpp:
              (WebCore::JSSVGMatrix::inverse):
              (WebCore::JSSVGMatrix::rotateFromVector):
              * bindings/js/JSSVGPathSegCustom.cpp:
              * bindings/js/JSSVGPathSegListCustom.cpp:
              (WebCore::JSSVGPathSegList::initialize):
              (WebCore::JSSVGPathSegList::getItem):
              (WebCore::JSSVGPathSegList::insertItemBefore):
              (WebCore::JSSVGPathSegList::replaceItem):
              (WebCore::JSSVGPathSegList::removeItem):
              (WebCore::JSSVGPathSegList::appendItem):
              * bindings/js/JSSVGPointListCustom.cpp:
              * bindings/js/JSSVGTransformListCustom.cpp:
              * bindings/js/JSStorageCustom.cpp:
              * bindings/js/JSStyleSheetCustom.cpp:
              * bindings/js/JSStyleSheetListCustom.cpp:
              * bindings/js/JSTextCustom.cpp:
              * bindings/js/JSTreeWalkerCustom.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.h:
              (WebCore::JSXMLHttpRequestConstructor::classInfo):
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              * bindings/js/JSXSLTProcessorConstructor.cpp:
              * bindings/js/JSXSLTProcessorConstructor.h:
              (WebCore::JSXSLTProcessorConstructor::classInfo):
              * bindings/js/JSXSLTProcessorCustom.cpp:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/ScheduledAction.h:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::attachDebugger):
              (WebCore::ScriptController::windowScriptNPObject):
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptControllerGtk.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerMac.mm:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              (WebCore::ScriptController::windowScriptObject):
              (WebCore::ScriptController::clearPlatformScriptObjects):
              (WebCore::updateRenderingForBindings):
              (WebCore::ScriptController::initJavaJSBindings):
              * bindings/js/ScriptControllerQt.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerWin.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerWx.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/StringSourceProvider.h:
              (WebCore::StringSourceProvider::getRange):
              * bindings/objc/DOM.mm:
              (-[DOMNode JSC::Bindings::]):
              * bindings/objc/DOMInternal.h:
              * bindings/objc/DOMInternal.mm:
              (-[WebScriptObject _initializeScriptDOMNodeImp]):
              * bindings/objc/DOMUtility.mm:
              (JSC::createDOMWrapper):
              (WebCore::createDOMWrapper):
              * bindings/objc/WebScriptObject.mm:
              (WebCore::createJSWrapper):
              (-[WebScriptObject _initWithJSObject:JSC::originRootObject:JSC::Bindings::rootObject:JSC::Bindings::]):
              * bindings/objc/WebScriptObjectPrivate.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              * bridge/NP_jsobject.h:
              * bridge/c/c_class.cpp:
              * bridge/c/c_class.h:
              * bridge/c/c_instance.cpp:
              * bridge/c/c_instance.h:
              * bridge/c/c_runtime.cpp:
              * bridge/c/c_runtime.h:
              * bridge/c/c_utility.cpp:
              * bridge/c/c_utility.h:
              * bridge/jni/jni_class.cpp:
              * bridge/jni/jni_class.h:
              * bridge/jni/jni_instance.cpp:
              * bridge/jni/jni_instance.h:
              * bridge/jni/jni_jsobject.h:
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::call):
              (JavaJSObject::convertJObjectToValue):
              * bridge/jni/jni_objc.mm:
              (JSC::Bindings::dispatchJNICall):
              * bridge/jni/jni_runtime.cpp:
              * bridge/jni/jni_runtime.h:
              * bridge/jni/jni_utility.cpp:
              * bridge/jni/jni_utility.h:
              * bridge/npruntime.cpp:
              (_NPN_GetStringIdentifier):
              * bridge/objc/WebScriptObject.h:
              * bridge/objc/objc_class.h:
              * bridge/objc/objc_class.mm:
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_instance.mm:
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_runtime.mm:
              * bridge/objc/objc_utility.h:
              * bridge/objc/objc_utility.mm:
              * bridge/qt/qt_class.cpp:
              * bridge/qt/qt_class.h:
              * bridge/qt/qt_instance.cpp:
              * bridge/qt/qt_instance.h:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::convertQVariantToValue):
              (JSC::Bindings::):
              * bridge/qt/qt_runtime.h:
              * bridge/runtime.cpp:
              * bridge/runtime.h:
              * bridge/runtime_array.cpp:
              * bridge/runtime_array.h:
              * bridge/runtime_method.cpp:
              * bridge/runtime_method.h:
              * bridge/runtime_object.cpp:
              * bridge/runtime_object.h:
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              (JSC::Bindings::RootObject::gcProtect):
              (JSC::Bindings::RootObject::gcUnprotect):
              * bridge/runtime_root.h:
              * bridge/testbindings.cpp:
              * bridge/testbindings.mm:
              * bridge/testqtbindings.cpp:
              * dom/Document.cpp:
              (WebCore::Document::~Document):
              * dom/NSResolver.h:
              * dom/Node.cpp:
              (WebCore::Node::setDocument):
              (WebCore::ResolveNamespaceFunctor::ResolveNamespaceFunctor):
              (WebCore::resolveNamespacesForSelector):
              (WebCore::Node::querySelector):
              (WebCore::Node::querySelectorAll):
              * dom/Node.h:
              * dom/NodeFilter.cpp:
              * dom/NodeFilter.h:
              * dom/NodeFilterCondition.cpp:
              * dom/NodeFilterCondition.h:
              * dom/NodeIterator.cpp:
              * dom/NodeIterator.h:
              * dom/Traversal.cpp:
              * dom/Traversal.h:
              * dom/TreeWalker.cpp:
              * dom/TreeWalker.h:
              * dom/make_names.pl:
              * history/CachedPage.cpp:
              * history/CachedPage.h:
              * html/HTMLPlugInElement.cpp:
              (WebCore::HTMLPlugInElement::getInstance):
              * html/HTMLPlugInElement.h:
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * loader/icon/IconDatabase.cpp:
              (WebCore::iconDatabase):
              * page/Console.cpp:
              * page/Console.h:
              * page/InspectorController.cpp:
              (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
              (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource):
              (WebCore::InspectorResource::setXMLHttpRequestProperties):
              (WebCore::InspectorResource::sourceString):
              (WebCore::getResourceDocumentNode):
              (WebCore::search):
              (WebCore::InspectorController::focusNode):
              (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
              (WebCore::InspectorController::addDatabaseScriptResource):
              (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
              * page/InspectorController.h:
              (WebCore::InspectorController::profiles):
              * page/JavaScriptCallFrame.cpp:
              (WebCore::JavaScriptCallFrame::scopeChain):
              * page/JavaScriptCallFrame.h:
              (WebCore::JavaScriptCallFrame::create):
              (WebCore::JavaScriptCallFrame::update):
              * page/JavaScriptDebugListener.h:
              * page/JavaScriptDebugServer.cpp:
              (WebCore::dispatchDidParseSource):
              * page/JavaScriptDebugServer.h:
              * page/JavaScriptProfile.cpp:
              * page/JavaScriptProfile.h:
              * page/JavaScriptProfileNode.cpp:
              (WebCore::getTotalTime):
              (WebCore::getSelfTime):
              (WebCore::getTotalPercent):
              (WebCore::getSelfPercent):
              (WebCore::getNumberOfCalls):
              (WebCore::getChildren):
              (WebCore::getVisible):
              * page/JavaScriptProfileNode.h:
              * page/Page.cpp:
              (WebCore::Page::setDebuggerForAllPages):
              (WebCore::Page::setDebugger):
              * page/Page.h:
              (WebCore::Page::debugger):
              * page/mac/FrameMac.mm:
              * platform/KURL.h:
              (WebCore::KURL::operator JSC::UString):
              * platform/text/AtomicString.cpp:
              (WebCore::AtomicString::add):
              (WebCore::AtomicString::find):
              * platform/text/AtomicString.h:
              (WebCore::AtomicString::AtomicString):
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              (WebCore::charactersToDouble):
              * platform/win/BString.cpp:
              * platform/win/BString.h:
              * plugins/MimeTypeArray.h:
              * plugins/Plugin.h:
              * plugins/PluginArray.h:
              * plugins/PluginView.cpp:
              (WebCore::PluginView::start):
              (WebCore::PluginView::performRequest):
              (WebCore::PluginView::bindingInstance):
              * plugins/PluginView.h:
              * plugins/gtk/PluginViewGtk.cpp:
              (WebCore::PluginView::paint):
              (WebCore::PluginView::handleKeyboardEvent):
              (WebCore::PluginView::handleMouseEvent):
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              (WebCore::PluginView::init):
              * plugins/qt/PluginViewQt.cpp:
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              (WebCore::PluginView::init):
              * plugins/win/PluginViewWin.cpp:
              (WebCore::PluginView::dispatchNPEvent):
              (WebCore::PluginView::handleKeyboardEvent):
              (WebCore::PluginView::handleMouseEvent):
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              * storage/Database.cpp:
              (WebCore::Database::Database):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::responseText):
              (WebCore::XMLHttpRequest::loadRequestAsynchronously):
              (WebCore::XMLHttpRequest::clearResponse):
              (WebCore::XMLHttpRequest::dropProtection):
              (WebCore::XMLHttpRequest::didFinishLoading):
              (WebCore::XMLHttpRequest::didReceiveData):
              * xml/XMLHttpRequest.h:
      
              WebKit/gtk:
      
              * webkit/webkitprivate.cpp:
              (webkit_init):
      
              WebKit/mac:
      
              * Misc/WebCoreStatistics.mm:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
              (-[WebBaseNetscapePluginView setWindowIfNecessary]):
              (-[WebBaseNetscapePluginView start]):
              (-[WebBaseNetscapePluginView createPluginScriptableObject]):
              (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
              (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
              (-[WebBaseNetscapePluginView loadPluginRequest:]):
              (-[WebBaseNetscapePluginView _printedPluginBitmap]):
              * Plugins/WebPluginController.mm:
              (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
              (-[WebPluginController startAllPlugins]):
              (-[WebPluginController stopAllPlugins]):
              (-[WebPluginController addPlugin:]):
              (-[WebPluginController destroyPlugin:]):
              (-[WebPluginController destroyAllPlugins]):
              * WebView/WebFrame.mm:
              * WebView/WebScriptDebugDelegate.mm:
              * WebView/WebScriptDebugger.h:
              * WebView/WebScriptDebugger.mm:
              * WebView/WebView.mm:
              (-[WebViewPrivate init]):
      
              WebKit/qt:
              
              * Api/qwebframe.cpp:
              (QWebFrame::addToJavaScriptWindowObject):
              (QWebFrame::evaluateJavaScript):
      
              WebKit/win:
      
              * WebCoreStatistics.cpp:
              * WebJavaScriptCollector.cpp:
              * WebScriptCallFrame.cpp:
              (WebScriptCallFrame::jsValueToString):
              * WebScriptCallFrame.h:
              (WebScriptCallFrame::state):
              * WebView.cpp:
              (WebView::WebView):
              (WebView::stringByEvaluatingJavaScriptFromString):
      
              WebKit/wx:
      
              * WebFrame.cpp:
              (wxWebFrame::RunScript):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f782f6a
  26. 06 Sep, 2008 1 commit
  27. 02 Sep, 2008 1 commit
  28. 30 Jul, 2008 1 commit
    • barraclough@apple.com's avatar
      2008-07-30 Gavin Barraclough <barraclough@apple.com> · eb51bd9b
      barraclough@apple.com authored
              Reviewed by Geoff Garen.
      
              Fixes for Windows and non-AllInOne file build with SamplingTool, plus review fixes.
      
              * GNUmakefile.am:              Adding SamplingTool.cpp to build.
              * JavaScriptCore.exp:          Export hooks to init & control SamplingTool.
              * JavaScriptCore.pri:          Adding SamplingTool.cpp to build.
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Adding SamplingTool.cpp to build.
              * JavaScriptCore.xcodeproj/project.pbxproj: Adding SamplingTool.cpp to build.
              * JavaScriptCoreSources.bkl:   Adding SamplingTool.cpp to build.
              * VM/Machine.cpp:              MACHINE_SAMPLING_callingNativeFunction renamed MACHINE_SAMPLING_callingHostFunction
              * VM/Machine.h:
              * VM/Opcode.cpp:               SamplingTool moved to SamplingTool.cpp/.h, opcodeNames generated from FOR_EACH_OPCODE_ID.
              * VM/Opcode.h:
              * VM/SamplingTool.cpp:         Added .cpp/.h for SamplingTool.
              * VM/SamplingTool.h:
              * kjs/Shell.cpp:               Switched SAMPLING_TOOL_ENABLED to ENABLE_SAMPLING_TOOL.
              * wtf/Platform.h:              Added ENABLE_SAMPLING_TOOL config option.
              * kjs/nodes.cpp:               Header include to fix non-AllInOne builds.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb51bd9b
  29. 23 Jul, 2008 1 commit
    • aroben@apple.com's avatar
      Windows build fixes · 42e34ef3
      aroben@apple.com authored
              Build fix after r35293:
      
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add API/
              to the include path.
      
              Build fix after r35305:
      
              * VM/Machine.cpp:
              * VM/Machine.h:
              * VM/Opcode.cpp:
              * VM/Opcode.h:
              Completely compile out all sampler-related code when
              SAMPLING_TOOL_ENABLED is 0. The sampler code can't be compiled 1) on
              non-AllInOne configurations due to circular header dependencies, and
              2) on platforms that don't have a usleep() function, such as Windows.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42e34ef3