Title: [248195] trunk/Source/_javascript_Core
Revision
248195
Author
[email protected]
Date
2019-08-02 21:01:35 -0700 (Fri, 02 Aug 2019)

Log Message

Address comments on r248178
https://bugs.webkit.org/show_bug.cgi?id=200411

Reviewed by Saam Barati.

* b3/B3Opcode.h:
* b3/B3Procedure.h:
(JSC::B3::Procedure::tuples const):
* b3/B3Validate.cpp:
* b3/testb3_1.cpp:
(main):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (248194 => 248195)


--- trunk/Source/_javascript_Core/ChangeLog	2019-08-03 01:10:43 UTC (rev 248194)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-08-03 04:01:35 UTC (rev 248195)
@@ -1,3 +1,17 @@
+2019-08-02  Keith Miller  <[email protected]>
+
+        Address comments on r248178
+        https://bugs.webkit.org/show_bug.cgi?id=200411
+
+        Reviewed by Saam Barati.
+
+        * b3/B3Opcode.h:
+        * b3/B3Procedure.h:
+        (JSC::B3::Procedure::tuples const):
+        * b3/B3Validate.cpp:
+        * b3/testb3_1.cpp:
+        (main):
+
 2019-08-02  Mark Lam  <[email protected]>
 
         [ARM64E] Harden the diversity of the DOMJIT::Signature::unsafeFunction pointer.

Modified: trunk/Source/_javascript_Core/b3/B3Opcode.h (248194 => 248195)


--- trunk/Source/_javascript_Core/b3/B3Opcode.h	2019-08-03 01:10:43 UTC (rev 248194)
+++ trunk/Source/_javascript_Core/b3/B3Opcode.h	2019-08-03 04:01:35 UTC (rev 248195)
@@ -296,8 +296,8 @@
     // stack.
     Patchpoint,
 
-    // This is a projection out of a tuple. Currently only patchpoints can generate a tuple. It's assumumed that
-    // each entry in a tuple has a fixed Numeric B3 Type (i.e. not Void or Tuple).
+    // This is a projection out of a tuple. Currently only Patchpoints, Get, and Phi can produce tuples.
+    // It's assumumed that each entry in a tuple has a fixed Numeric B3 Type (i.e. not Void or Tuple).
     Extract,
 
     // Checked math. Use the CheckValue class. Like a Patchpoint, this takes a code generation

Modified: trunk/Source/_javascript_Core/b3/B3Procedure.h (248194 => 248195)


--- trunk/Source/_javascript_Core/b3/B3Procedure.h	2019-08-03 01:10:43 UTC (rev 248194)
+++ trunk/Source/_javascript_Core/b3/B3Procedure.h	2019-08-03 04:01:35 UTC (rev 248195)
@@ -113,6 +113,7 @@
     JS_EXPORT_PRIVATE Variable* addVariable(Type);
 
     JS_EXPORT_PRIVATE Type addTuple(Vector<Type>&& types);
+    const Vector<Vector<Type>>& tuples() const { return m_tuples; };
     bool isValidTuple(Type tuple) const;
     Type extractFromTuple(Type tuple, unsigned index) const;
     const Vector<Type>& tupleForType(Type tuple) const;

Modified: trunk/Source/_javascript_Core/b3/B3Validate.cpp (248194 => 248195)


--- trunk/Source/_javascript_Core/b3/B3Validate.cpp	2019-08-03 01:10:43 UTC (rev 248194)
+++ trunk/Source/_javascript_Core/b3/B3Validate.cpp	2019-08-03 04:01:35 UTC (rev 248195)
@@ -74,6 +74,12 @@
         HashMap<Value*, unsigned> valueIndex;
         HashMap<Value*, Vector<Optional<Type>>> extractions;
 
+        for (unsigned tuple = 0; tuple < m_procedure.tuples().size(); ++tuple) {
+            VALIDATE(m_procedure.tuples()[tuple].size(), ("In tuple ", tuple));
+            for (unsigned i = 0; i < m_procedure.tuples()[tuple].size(); ++i)
+                VALIDATE(m_procedure.tuples()[tuple][i].isNumeric(), ("In tuple ", tuple, " at index", i));
+        }
+
         for (BasicBlock* block : m_procedure) {
             blocks.add(block);
             for (unsigned i = 0; i < block->size(); ++i) {

Modified: trunk/Source/_javascript_Core/b3/testb3_1.cpp (248194 => 248195)


--- trunk/Source/_javascript_Core/b3/testb3_1.cpp	2019-08-03 01:10:43 UTC (rev 248194)
+++ trunk/Source/_javascript_Core/b3/testb3_1.cpp	2019-08-03 04:01:35 UTC (rev 248195)
@@ -904,7 +904,7 @@
 
     JSC::initializeThreading();
     
-    for (unsigned i = 1; i <= 2; ++i) {
+    for (unsigned i = 0; i <= 2; ++i) {
         JSC::Options::defaultB3OptLevel() = i;
         run(filter);
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to