Title: [158989] trunk/Source/_javascript_Core
Revision
158989
Author
[email protected]
Date
2013-11-08 20:24:27 -0800 (Fri, 08 Nov 2013)

Log Message

FTL should support Phantom(FinalObject:)
https://bugs.webkit.org/show_bug.cgi?id=124092

Reviewed by Oliver Hunt.

* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::speculate):
(JSC::FTL::LowerDFGToLLVM::isType):
(JSC::FTL::LowerDFGToLLVM::isNotType):
(JSC::FTL::LowerDFGToLLVM::speculateFinalObject):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (158988 => 158989)


--- trunk/Source/_javascript_Core/ChangeLog	2013-11-09 04:20:47 UTC (rev 158988)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-11-09 04:24:27 UTC (rev 158989)
@@ -1,5 +1,21 @@
 2013-11-08  Filip Pizlo  <[email protected]>
 
+        FTL should support Phantom(FinalObject:)
+        https://bugs.webkit.org/show_bug.cgi?id=124092
+
+        Reviewed by Oliver Hunt.
+
+        * ftl/FTLAbstractHeapRepository.h:
+        * ftl/FTLCapabilities.cpp:
+        (JSC::FTL::canCompile):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::speculate):
+        (JSC::FTL::LowerDFGToLLVM::isType):
+        (JSC::FTL::LowerDFGToLLVM::isNotType):
+        (JSC::FTL::LowerDFGToLLVM::speculateFinalObject):
+
+2013-11-08  Filip Pizlo  <[email protected]>
+
         Get rid of the FTL tail call APIs since they are unused
         https://bugs.webkit.org/show_bug.cgi?id=124093
 

Modified: trunk/Source/_javascript_Core/ftl/FTLAbstractHeapRepository.h (158988 => 158989)


--- trunk/Source/_javascript_Core/ftl/FTLAbstractHeapRepository.h	2013-11-09 04:20:47 UTC (rev 158988)
+++ trunk/Source/_javascript_Core/ftl/FTLAbstractHeapRepository.h	2013-11-09 04:24:27 UTC (rev 158989)
@@ -58,7 +58,8 @@
     macro(Structure_classInfo, Structure::classInfoOffset()) \
     macro(Structure_globalObject, Structure::globalObjectOffset()) \
     macro(Structure_indexingType, Structure::indexingTypeOffset()) \
-    macro(Structure_typeInfoFlags, Structure::typeInfoFlagsOffset())
+    macro(Structure_typeInfoFlags, Structure::typeInfoFlagsOffset()) \
+    macro(Structure_typeInfoType, Structure::typeInfoTypeOffset())
 
 #define FOR_EACH_INDEXED_ABSTRACT_HEAP(macro) \
     macro(characters8, sizeof(LChar)) \

Modified: trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp (158988 => 158989)


--- trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp	2013-11-09 04:20:47 UTC (rev 158988)
+++ trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp	2013-11-09 04:24:27 UTC (rev 158989)
@@ -273,6 +273,7 @@
                 case ObjectUse:
                 case ObjectOrOtherUse:
                 case StringUse:
+                case FinalObjectUse:
                     // These are OK.
                     break;
                 default:

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp (158988 => 158989)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp	2013-11-09 04:20:47 UTC (rev 158988)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp	2013-11-09 04:24:27 UTC (rev 158989)
@@ -3502,6 +3502,9 @@
         case ObjectOrOtherUse:
             speculateObjectOrOther(edge);
             break;
+        case FinalObjectUse:
+            speculateFinalObject(edge);
+            break;
         case StringUse:
             speculateString(edge);
             break;
@@ -3611,6 +3614,20 @@
             m_out.constIntPtr(classInfo));
     }
     
+    LValue isType(LValue cell, JSType type)
+    {
+        return m_out.equal(
+            m_out.load8(
+                m_out.loadPtr(cell, m_heaps.JSCell_structure),
+                m_heaps.Structure_typeInfoType),
+            m_out.constInt8(type));
+    }
+    
+    LValue isNotType(LValue cell, JSType type)
+    {
+        return m_out.bitNot(isType(cell, type));
+    }
+    
     void speculateObject(Edge edge, LValue cell)
     {
         FTL_TYPE_CHECK(jsValueValue(cell), edge, SpecObject, isNotObject(cell));
@@ -3657,6 +3674,17 @@
         m_out.appendTo(continuation, lastNext);
     }
     
+    void speculateFinalObject(Edge edge, LValue cell)
+    {
+        FTL_TYPE_CHECK(
+            jsValueValue(cell), edge, SpecFinalObject, isNotType(cell, FinalObjectType));
+    }
+    
+    void speculateFinalObject(Edge edge)
+    {
+        speculateFinalObject(edge, lowCell(edge));
+    }
+    
     void speculateString(Edge edge, LValue cell)
     {
         FTL_TYPE_CHECK(jsValueValue(cell), edge, SpecString, isNotString(cell));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to