]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/BatchedTransitionOptimizer.h
JavaScriptCore-554.1.tar.gz
[apple/javascriptcore.git] / runtime / BatchedTransitionOptimizer.h
index 13dd95c2e51293591cade73a27147b251405f7ae..8a954af1dbfafc4b01317635c35208868631a2bc 100644 (file)
@@ -38,12 +38,12 @@ namespace JSC {
             : m_object(object)
         {
             if (!m_object->structure()->isDictionary())
-                m_object->setStructure(Structure::toDictionaryTransition(m_object->structure()));
+                m_object->setStructure(Structure::toCacheableDictionaryTransition(m_object->structure()));
         }
 
         ~BatchedTransitionOptimizer()
         {
-            m_object->setStructure(Structure::fromDictionaryTransition(m_object->structure()));
+            m_object->flattenDictionaryObject();
         }
 
     private: