summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGVariableAccessData.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGVariableAccessData.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGVariableAccessData.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGVariableAccessData.h b/Source/JavaScriptCore/dfg/DFGVariableAccessData.h
index 1d99ed516..3dfd94d01 100644
--- a/Source/JavaScriptCore/dfg/DFGVariableAccessData.h
+++ b/Source/JavaScriptCore/dfg/DFGVariableAccessData.h
@@ -47,16 +47,20 @@ public:
, m_argumentAwarePrediction(PredictNone)
, m_flags(0)
, m_doubleFormatState(EmptyDoubleFormatState)
+ , m_isCaptured(false)
+ , m_isArgumentsAlias(false)
{
clearVotes();
}
- VariableAccessData(VirtualRegister local)
+ VariableAccessData(VirtualRegister local, bool isCaptured)
: m_local(local)
, m_prediction(PredictNone)
, m_argumentAwarePrediction(PredictNone)
, m_flags(0)
, m_doubleFormatState(EmptyDoubleFormatState)
+ , m_isCaptured(isCaptured)
+ , m_isArgumentsAlias(false)
{
clearVotes();
}
@@ -72,6 +76,34 @@ public:
return static_cast<int>(local());
}
+ bool mergeIsCaptured(bool isCaptured)
+ {
+ bool newIsCaptured = m_isCaptured | isCaptured;
+ if (newIsCaptured == m_isCaptured)
+ return false;
+ m_isCaptured = newIsCaptured;
+ return true;
+ }
+
+ bool isCaptured()
+ {
+ return m_isCaptured;
+ }
+
+ bool mergeIsArgumentsAlias(bool isArgumentsAlias)
+ {
+ bool newIsArgumentsAlias = m_isArgumentsAlias | isArgumentsAlias;
+ if (newIsArgumentsAlias == m_isArgumentsAlias)
+ return false;
+ m_isArgumentsAlias = newIsArgumentsAlias;
+ return true;
+ }
+
+ bool isArgumentsAlias()
+ {
+ return m_isArgumentsAlias;
+ }
+
bool predict(PredictedType prediction)
{
VariableAccessData* self = find();
@@ -220,6 +252,9 @@ private:
float m_votes[2];
DoubleFormatState m_doubleFormatState;
+
+ bool m_isCaptured;
+ bool m_isArgumentsAlias;
};
} } // namespace JSC::DFG