summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGCommonData.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/dfg/DFGCommonData.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGCommonData.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGCommonData.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGCommonData.h b/Source/JavaScriptCore/dfg/DFGCommonData.h
index 17c5cce11..e58a2ebe6 100644
--- a/Source/JavaScriptCore/dfg/DFGCommonData.h
+++ b/Source/JavaScriptCore/dfg/DFGCommonData.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013, 2015 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,26 +23,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DFGCommonData_h
-#define DFGCommonData_h
-
-#include <wtf/Platform.h>
+#pragma once
#if ENABLE(DFG_JIT)
#include "CodeBlockJettisoningWatchpoint.h"
+#include "DFGAdaptiveInferredPropertyValueWatchpoint.h"
+#include "DFGAdaptiveStructureWatchpoint.h"
#include "DFGJumpReplacement.h"
#include "InlineCallFrameSet.h"
#include "JSCell.h"
-#include "ProfiledCodeBlockJettisoningWatchpoint.h"
#include "ProfilerCompilation.h"
#include "SymbolTable.h"
+#include <wtf/Bag.h>
#include <wtf/Noncopyable.h>
namespace JSC {
class CodeBlock;
class Identifier;
+class TrackedReferences;
namespace DFG {
@@ -73,13 +73,15 @@ class CommonData {
public:
CommonData()
: isStillValid(true)
- , machineCaptureStart(std::numeric_limits<int>::max())
, frameRegisterCount(std::numeric_limits<unsigned>::max())
, requiredRegisterCountForExit(std::numeric_limits<unsigned>::max())
{ }
void notifyCompilingStructureTransition(Plan&, CodeBlock*, Node*);
- unsigned addCodeOrigin(CodeOrigin codeOrigin);
+ CallSiteIndex addCodeOrigin(CodeOrigin);
+ CallSiteIndex addUniqueCallSiteIndex(CodeOrigin);
+ CallSiteIndex lastCallSite() const;
+ void removeCallSiteIndex(CallSiteIndex);
void shrinkToFit();
@@ -89,15 +91,21 @@ public:
{
return std::max(frameRegisterCount, requiredRegisterCountForExit);
}
+
+ void validateReferences(const TrackedReferences&);
- OwnPtr<InlineCallFrameSet> inlineCallFrames;
+ static ptrdiff_t frameRegisterCountOffset() { return OBJECT_OFFSETOF(CommonData, frameRegisterCount); }
+
+ RefPtr<InlineCallFrameSet> inlineCallFrames;
Vector<CodeOrigin, 0, UnsafeVectorOverflow> codeOrigins;
Vector<Identifier> dfgIdentifiers;
Vector<WeakReferenceTransition> transitions;
Vector<WriteBarrier<JSCell>> weakReferences;
- SegmentedVector<CodeBlockJettisoningWatchpoint, 1, 0> watchpoints;
- SegmentedVector<ProfiledCodeBlockJettisoningWatchpoint, 1, 0> profiledWatchpoints;
+ Vector<WriteBarrier<Structure>> weakStructureReferences;
+ Bag<CodeBlockJettisoningWatchpoint> watchpoints;
+ Bag<AdaptiveStructureWatchpoint> adaptiveStructureWatchpoints;
+ Bag<AdaptiveInferredPropertyValueWatchpoint> adaptiveInferredPropertyValueWatchpoints;
Vector<JumpReplacement> jumpReplacements;
RefPtr<Profiler::Compilation> compilation;
@@ -105,16 +113,18 @@ public:
bool allTransitionsHaveBeenMarked; // Initialized and used on every GC.
bool isStillValid;
- int machineCaptureStart;
- std::unique_ptr<SlowArgument[]> slowArguments;
+#if USE(JSVALUE32_64)
+ std::unique_ptr<Bag<double>> doubleConstants;
+#endif
unsigned frameRegisterCount;
unsigned requiredRegisterCountForExit;
+
+private:
+ HashSet<unsigned, WTF::IntHash<unsigned>, WTF::UnsignedWithZeroKeyHashTraits<unsigned>> callSiteIndexFreeList;
+
};
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)
-
-#endif // DFGCommonData_h
-