summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/ftl/FTLState.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/ftl/FTLState.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/ftl/FTLState.h')
-rw-r--r--Source/JavaScriptCore/ftl/FTLState.h55
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
-