diff options
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLState.h')
-rw-r--r-- | Source/JavaScriptCore/ftl/FTLState.h | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/Source/JavaScriptCore/ftl/FTLState.h b/Source/JavaScriptCore/ftl/FTLState.h index c82db6728..bc434304d 100644 --- a/Source/JavaScriptCore/ftl/FTLState.h +++ b/Source/JavaScriptCore/ftl/FTLState.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,23 +23,40 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef FTLState_h -#define FTLState_h - -#include <wtf/Platform.h> +#pragma once #if ENABLE(FTL_JIT) +#include "B3Procedure.h" +#include "DFGCommon.h" #include "DFGGraph.h" -#include "FTLAbbreviations.h" +#include "FTLAbbreviatedTypes.h" #include "FTLGeneratedFunction.h" -#include "FTLInlineCacheDescriptor.h" #include "FTLJITCode.h" #include "FTLJITFinalizer.h" -#include "FTLStackMaps.h" +#include <wtf/Box.h> #include <wtf/Noncopyable.h> -namespace JSC { namespace FTL { +namespace JSC { + +namespace B3 { +class PatchpointValue; +class StackSlot; +} // namespace B3 + +namespace FTL { + +class PatchpointExceptionHandle; + +inline bool verboseCompilationEnabled() +{ + return DFG::verboseCompilationEnabled(DFG::FTLMode); +} + +inline bool shouldDumpDisassembly() +{ + return DFG::shouldDumpDisassembly(DFG::FTLMode); +} class State { WTF_MAKE_NONCOPYABLE(State); @@ -51,24 +68,18 @@ public: // None of these things is owned by State. It is the responsibility of // FTL phases to properly manage the lifecycle of the module and function. DFG::Graph& graph; - LContext context; - LModule module; - LValue function; + std::unique_ptr<B3::Procedure> proc; + bool allocationFailed { false }; // Throw out the compilation once B3 returns. RefPtr<JITCode> jitCode; GeneratedFunction generatedFunction; JITFinalizer* finalizer; - SegmentedVector<GetByIdDescriptor> getByIds; - SegmentedVector<PutByIdDescriptor> putByIds; - Vector<CString> codeSectionNames; - Vector<CString> dataSectionNames; - RefCountedArray<LSectionWord> stackmapsSection; - - void dumpState(const char* when); + // Top-level exception handler. Jump here if you know that you have to genericUnwind() and there + // are no applicable catch blocks anywhere in the Graph. + RefPtr<PatchpointExceptionHandle> defaultExceptionHandle; + Box<CCallHelpers::Label> exceptionHandler { Box<CCallHelpers::Label>::create() }; + B3::StackSlot* capturedValue { nullptr }; }; } } // namespace JSC::FTL #endif // ENABLE(FTL_JIT) - -#endif // FTLState_h - |