summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGArgumentPosition.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGArgumentPosition.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentPosition.h b/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
index ed447ff91..05d1cb048 100644
--- a/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
+++ b/Source/JavaScriptCore/dfg/DFGArgumentPosition.h
@@ -28,14 +28,14 @@
#include "DFGDoubleFormatState.h"
#include "DFGVariableAccessData.h"
-#include "PredictedType.h"
+#include "SpeculatedType.h"
namespace JSC { namespace DFG {
class ArgumentPosition {
public:
ArgumentPosition()
- : m_prediction(PredictNone)
+ : m_prediction(SpecNone)
, m_doubleFormatState(EmptyDoubleFormatState)
{
}
@@ -49,7 +49,7 @@ public:
{
bool changed = false;
for (unsigned i = 0; i < m_variables.size(); ++i) {
- changed |= mergePrediction(m_prediction, m_variables[i]->argumentAwarePrediction());
+ changed |= mergeSpeculation(m_prediction, m_variables[i]->argumentAwarePrediction());
changed |= mergeDoubleFormatState(m_doubleFormatState, m_variables[i]->doubleFormatState());
}
if (!changed)
@@ -62,8 +62,15 @@ public:
return changed;
}
+ SpeculatedType prediction() const { return m_prediction; }
+ DoubleFormatState doubleFormatState() const { return m_doubleFormatState; }
+ bool shouldUseDoubleFormat() const
+ {
+ return doubleFormatState() == UsingDoubleFormat;
+ }
+
private:
- PredictedType m_prediction;
+ SpeculatedType m_prediction;
DoubleFormatState m_doubleFormatState;
Vector<VariableAccessData*, 2> m_variables;