GetById->GetByOffset and PutById->PutByOffset folding should mark haveStructures...
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Nov 2013 18:53:04 +0000 (18:53 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Nov 2013 18:53:04 +0000 (18:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123788

Reviewed by Geoffrey Garen.

haveStructures is true if there are any currentlyKnownStructures that have
interesting values, since that's the only time when clobbering needs to do things.
It's a really important compile-time optimization. But that also means that anytime
we might cause currentlyKnownStructures to get set - like when we might insert some
structure transition watchpoints - we need to set haveStructures. We were forgetting
to do that for GetById->GetByOffset and PutById->PutByOffset because, I guess, we
forgot that those might insert structure transition watchpoints.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158680 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

index d06972e..b8027e7 100644 (file)
@@ -1,3 +1,21 @@
+2013-11-04  Filip Pizlo  <fpizlo@apple.com>
+
+        GetById->GetByOffset and PutById->PutByOffset folding should mark haveStructures since it may result in structure transition watchpoints
+        https://bugs.webkit.org/show_bug.cgi?id=123788
+
+        Reviewed by Geoffrey Garen.
+        
+        haveStructures is true if there are any currentlyKnownStructures that have
+        interesting values, since that's the only time when clobbering needs to do things.
+        It's a really important compile-time optimization. But that also means that anytime
+        we might cause currentlyKnownStructures to get set - like when we might insert some
+        structure transition watchpoints - we need to set haveStructures. We were forgetting
+        to do that for GetById->GetByOffset and PutById->PutByOffset because, I guess, we
+        forgot that those might insert structure transition watchpoints.
+
+        * dfg/DFGAbstractInterpreterInlines.h:
+        (JSC::DFG::::executeEffects):
+
 2013-11-05  Julien Brianceau  <jbriance@cisco.com>
 
         [mips] Make regTx registers match between JSInterfaceJIT and GPRInfo.
index 42fea04..09fd14a 100644 (file)
@@ -1282,6 +1282,7 @@ bool AbstractInterpreter<AbstractStateType>::executeEffects(unsigned clobberLimi
                     filter(node->child1(), status.structureSet());
                     
                     m_state.setFoundConstants(true);
+                    m_state.setHaveStructures(true);
                     break;
                 }
             }
@@ -1479,6 +1480,7 @@ bool AbstractInterpreter<AbstractStateType>::executeEffects(unsigned clobberLimi
             if (status.isSimpleReplace()) {
                 filter(node->child1(), structure);
                 m_state.setFoundConstants(true);
+                m_state.setHaveStructures(true);
                 break;
             }
             if (status.isSimpleTransition()) {