]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - bytecode/LazyOperandValueProfile.cpp
JavaScriptCore-1218.tar.gz
[apple/javascriptcore.git] / bytecode / LazyOperandValueProfile.cpp
index f199b69230a9ba009e6591f3d490174c95e6157d..97b8f3bcd96d7270f5d1909c6d4e5c3ba8fa1395 100644 (file)
 
 #if ENABLE(VALUE_PROFILER)
 
+#include "Operations.h"
+
 namespace JSC {
 
 CompressedLazyOperandValueProfileHolder::CompressedLazyOperandValueProfileHolder() { }
 CompressedLazyOperandValueProfileHolder::~CompressedLazyOperandValueProfileHolder() { }
 
-void CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions()
+void CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions(OperationInProgress operation)
 {
     if (!m_data)
         return;
     
     for (unsigned i = 0; i < m_data->size(); ++i)
-        m_data->at(i).computeUpdatedPrediction();
+        m_data->at(i).computeUpdatedPrediction(operation);
 }
 
 LazyOperandValueProfile* CompressedLazyOperandValueProfileHolder::add(
@@ -81,15 +83,15 @@ LazyOperandValueProfile* LazyOperandValueProfileParser::getIfPresent(
     if (iter == m_map.end())
         return 0;
     
-    return iter->second;
+    return iter->value;
 }
 
-PredictedType LazyOperandValueProfileParser::prediction(
+SpeculatedType LazyOperandValueProfileParser::prediction(
     const LazyOperandValueProfileKey& key) const
 {
     LazyOperandValueProfile* profile = getIfPresent(key);
     if (!profile)
-        return PredictNone;
+        return SpecNone;
     
     return profile->computeUpdatedPrediction();
 }