JavaScriptCore:
[WebKit.git] / JavaScriptCore / VM / CodeGenerator.cpp
index 258e3bcb1c2a8386c1fc7622847e02874acb97f6..d28d5a604f8d6859b5275d5938312b5a7f4f15d1 100644 (file)
@@ -363,6 +363,14 @@ RegisterID* CodeGenerator::newTemporary()
     return &m_temporaries.last();
 }
 
     return &m_temporaries.last();
 }
 
+
+RegisterID* CodeGenerator::highestUsedRegister()
+{
+    while (m_temporaries.size() < static_cast<unsigned>(m_codeBlock->numTemporaries))
+        m_temporaries.append(m_temporaries.size());
+    return &m_temporaries.last();
+}
+
 PassRefPtr<LabelID> CodeGenerator::newLabel()
 {
     // Reclaim free label IDs.
 PassRefPtr<LabelID> CodeGenerator::newLabel()
 {
     // Reclaim free label IDs.