From a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 25 May 2012 15:09:11 +0200 Subject: Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516) --- Source/JavaScriptCore/dfg/DFGVariableAccessData.h | 37 ++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'Source/JavaScriptCore/dfg/DFGVariableAccessData.h') 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(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 -- cgit v1.2.1