Ignore:
Timestamp:
Jul 24, 2013, 8:59:09 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: ASSERT that commonly used not-thread-safe methods in the runtime are not being called during compilation
https://bugs.webkit.org/show_bug.cgi?id=115297

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Put in assertions that we're not doing bad things in compilation threads. Also
factored compilation into compile+link so that even though we don't yet have
concurrent compilation, we can be explicit about which parts of DFG work are
meant to be concurrent, and which aren't.

Also fix a handful of bugs found by these assertions.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/ResolveGlobalStatus.cpp:

(JSC::computeForStructure):

  • bytecode/Watchpoint.cpp:

(JSC::WatchpointSet::add):
(JSC::InlineWatchpointSet::inflateSlow):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compile):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::~JITCompiler):
(DFG):
(JSC::DFG::JITCompiler::compileBody):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compileFunction):
(JSC::DFG::JITCompiler::linkFunction):

  • dfg/DFGJITCompiler.h:

(JITCompiler):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLCompile.h:

(FTL):

  • ftl/FTLLink.cpp: Added.

(FTL):
(JSC::FTL::compileEntry):
(JSC::FTL::link):

  • ftl/FTLLink.h: Added.

(FTL):

  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

  • ftl/FTLState.h:

(FTL):
(State):

  • runtime/Structure.cpp:

(JSC::Structure::get):
(JSC::Structure::prototypeChainMayInterceptStoreTo):

  • runtime/Structure.h:

(JSC::Structure::materializePropertyMapIfNecessary):

  • runtime/StructureInlines.h:

(JSC::Structure::get):

Source/WTF:

Reviewed by Geoffrey Garen.

Taught WTF the notion of compilation threads. This allows all parts of our stack
to assert that we're not being called from a JSC compilation thread. This is in
WTF because it will probably end up being used in StringImpl and WTFString.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CompilationThread.cpp: Added.

(WTF):
(WTF::initializeCompilationThreadsOnce):
(WTF::initializeCompilationThreads):
(WTF::isCompilationThread):
(WTF::exchangeIsCompilationThread):

  • wtf/CompilationThread.h: Added.

(WTF):
(CompilationScope):
(WTF::CompilationScope::CompilationScope):
(WTF::CompilationScope::~CompilationScope):
(WTF::CompilationScope::leaveEarly):

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLLink.h

    r153133 r153134  
    2424 */
    2525
    26 #ifndef FTLCompile_h
    27 #define FTLCompile_h
     26#ifndef FTLLink_h
     27#define FTLLink_h
    2828
    2929#include <wtf/Platform.h>
     
    3535namespace JSC { namespace FTL {
    3636
    37 bool compile(State&, RefPtr<JSC::JITCode>&, MacroAssemblerCodePtr& jitCodeWithArityCheck);
     37bool link(State&, RefPtr<JSC::JITCode>&, MacroAssemblerCodePtr& jitCodeWithArityCheck);
    3838
    3939} } // namespace JSC::FTL
     
    4141#endif // ENABLE(FTL_JIT)
    4242
    43 #endif // FTLCompile_h
     43#endif // FTLLink_h
    4444
Note: See TracChangeset for help on using the changeset viewer.