diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/dfg/DFGPlan.h | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGPlan.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGPlan.h | 56 |
1 files changed, 16 insertions, 40 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGPlan.h b/Source/JavaScriptCore/dfg/DFGPlan.h index 091e3cb18..a60269798 100644 --- a/Source/JavaScriptCore/dfg/DFGPlan.h +++ b/Source/JavaScriptCore/dfg/DFGPlan.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2015 Apple Inc. All rights reserved. + * Copyright (C) 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,107 +26,83 @@ #ifndef DFGPlan_h #define DFGPlan_h +#include <wtf/Platform.h> + #include "CompilationResult.h" #include "DFGCompilationKey.h" #include "DFGCompilationMode.h" #include "DFGDesiredIdentifiers.h" +#include "DFGDesiredStructureChains.h" #include "DFGDesiredTransitions.h" #include "DFGDesiredWatchpoints.h" #include "DFGDesiredWeakReferences.h" +#include "DFGDesiredWriteBarriers.h" #include "DFGFinalizer.h" #include "DeferredCompilationCallback.h" #include "Operands.h" #include "ProfilerCompilation.h" -#include <wtf/HashMap.h> #include <wtf/ThreadSafeRefCounted.h> -#include <wtf/text/CString.h> namespace JSC { class CodeBlock; -class SlotVisitor; namespace DFG { class LongLivedState; -class ThreadData; #if ENABLE(DFG_JIT) struct Plan : public ThreadSafeRefCounted<Plan> { Plan( - CodeBlock* codeBlockToCompile, CodeBlock* profiledDFGCodeBlock, - CompilationMode, unsigned osrEntryBytecodeIndex, + PassRefPtr<CodeBlock>, CompilationMode, unsigned osrEntryBytecodeIndex, const Operands<JSValue>& mustHandleValues); ~Plan(); - - void compileInThread(LongLivedState&, ThreadData*); + + void compileInThread(LongLivedState&); CompilationResult finalizeWithoutNotifyingCallback(); void finalizeAndNotifyCallback(); - void notifyCompiling(); - void notifyCompiled(); void notifyReady(); CompilationKey key(); - void rememberCodeBlocks(); - void checkLivenessAndVisitChildren(SlotVisitor&); - bool isKnownToBeLiveDuringGC(); - void cancel(); - VM& vm; - - // These can be raw pointers because we visit them during every GC in checkLivenessAndVisitChildren. - CodeBlock* codeBlock; - CodeBlock* profiledDFGCodeBlock; - + RefPtr<CodeBlock> codeBlock; CompilationMode mode; const unsigned osrEntryBytecodeIndex; Operands<JSValue> mustHandleValues; - - ThreadData* threadData; RefPtr<Profiler::Compilation> compilation; - std::unique_ptr<Finalizer> finalizer; + OwnPtr<Finalizer> finalizer; - RefPtr<InlineCallFrameSet> inlineCallFrames; DesiredWatchpoints watchpoints; DesiredIdentifiers identifiers; + DesiredStructureChains chains; DesiredWeakReferences weakReferences; + DesiredWriteBarriers writeBarriers; DesiredTransitions transitions; - - bool willTryToTierUp { false }; - bool canTierUpAndOSREnter { false }; - enum Stage { Preparing, Compiling, Compiled, Ready, Cancelled }; - Stage stage; + double beforeFTL; + + bool isCompiled; RefPtr<DeferredCompilationCallback> callback; - JS_EXPORT_PRIVATE static HashMap<CString, double> compileTimeStats(); - private: - bool computeCompileTimes() const; - bool reportCompileTimes() const; - - enum CompilationPath { FailPath, DFGPath, FTLPath, CancelPath }; + enum CompilationPath { FailPath, DFGPath, FTLPath }; CompilationPath compileInThreadImpl(LongLivedState&); bool isStillValid(); void reallyAdd(CommonData*); - - double m_timeBeforeFTL; }; #else // ENABLE(DFG_JIT) class Plan : public RefCounted<Plan> { // Dummy class to allow !ENABLE(DFG_JIT) to build. -public: - static HashMap<CString, double> compileTimeStats() { return HashMap<CString, double>(); } }; #endif // ENABLE(DFG_JIT) |