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 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.