summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/ValueRecovery.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/bytecode/ValueRecovery.h')
-rw-r--r--Source/JavaScriptCore/bytecode/ValueRecovery.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/bytecode/ValueRecovery.h b/Source/JavaScriptCore/bytecode/ValueRecovery.h
index 4d2134e0a..007c6d3b7 100644
--- a/Source/JavaScriptCore/bytecode/ValueRecovery.h
+++ b/Source/JavaScriptCore/bytecode/ValueRecovery.h
@@ -192,6 +192,8 @@ public:
ValueRecoveryTechnique technique() const { return m_technique; }
+ bool isConstant() const { return m_technique == Constant; }
+
bool isInRegisters() const
{
switch (m_technique) {
@@ -208,6 +210,20 @@ public:
}
}
+ bool isAlreadyInRegisterFile() const
+ {
+ switch (technique()) {
+ case AlreadyInRegisterFile:
+ case AlreadyInRegisterFileAsUnboxedInt32:
+ case AlreadyInRegisterFileAsUnboxedCell:
+ case AlreadyInRegisterFileAsUnboxedBoolean:
+ case AlreadyInRegisterFileAsUnboxedDouble:
+ return true;
+ default:
+ return false;
+ }
+ }
+
MacroAssembler::RegisterID gpr() const
{
ASSERT(m_technique == InGPR || m_technique == UnboxedInt32InGPR || m_technique == UnboxedBooleanInGPR || m_technique == UInt32InGPR);