diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
commit | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch) | |
tree | b7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/JavaScriptCore/dfg/DFGVariableAccessData.h | |
parent | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff) | |
download | qtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz |
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGVariableAccessData.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGVariableAccessData.h | 37 |
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 |