Title: [243857] trunk/Source/_javascript_Core
Revision
243857
Author
[email protected]
Date
2019-04-03 22:27:25 -0700 (Wed, 03 Apr 2019)

Log Message

Unreviewed, rolling in r243843 with the build fix
https://bugs.webkit.org/show_bug.cgi?id=196586

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:
* runtime/RandomizingFuzzerAgent.cpp:
(JSC::RandomizingFuzzerAgent::getPrediction):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (243856 => 243857)


--- trunk/Source/_javascript_Core/ChangeLog	2019-04-04 04:32:47 UTC (rev 243856)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-04-04 05:27:25 UTC (rev 243857)
@@ -1,3 +1,14 @@
+2019-04-03  Yusuke Suzuki  <[email protected]>
+
+        Unreviewed, rolling in r243843 with the build fix
+        https://bugs.webkit.org/show_bug.cgi?id=196586
+
+        * runtime/Options.cpp:
+        (JSC::recomputeDependentOptions):
+        * runtime/Options.h:
+        * runtime/RandomizingFuzzerAgent.cpp:
+        (JSC::RandomizingFuzzerAgent::getPrediction):
+
 2019-04-03  Ryan Haddad  <[email protected]>
 
         Unreviewed, rolling out r243843.

Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (243856 => 243857)


--- trunk/Source/_javascript_Core/runtime/Options.cpp	2019-04-04 04:32:47 UTC (rev 243856)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp	2019-04-04 05:27:25 UTC (rev 243857)
@@ -451,7 +451,8 @@
         || Options::logPhaseTimes()
         || Options::verboseCFA()
         || Options::verboseDFGFailure()
-        || Options::verboseFTLFailure())
+        || Options::verboseFTLFailure()
+        || Options::dumpRandomizingFuzzerAgentPredictions())
         Options::alwaysComputeHash() = true;
     
     if (!Options::useConcurrentGC())

Modified: trunk/Source/_javascript_Core/runtime/Options.h (243856 => 243857)


--- trunk/Source/_javascript_Core/runtime/Options.h	2019-04-04 04:32:47 UTC (rev 243856)
+++ trunk/Source/_javascript_Core/runtime/Options.h	2019-04-04 05:27:25 UTC (rev 243857)
@@ -436,6 +436,7 @@
     \
     v(bool, useRandomizingFuzzerAgent, false, Normal, nullptr) \
     v(unsigned, seedOfRandomizingFuzzerAgent, 1, Normal, nullptr) \
+    v(bool, dumpRandomizingFuzzerAgentPredictions, false, Normal, nullptr) \
     \
     v(bool, logPhaseTimes, false, Normal, nullptr) \
     v(double, rareBlockPenalty, 0.001, Normal, nullptr) \

Modified: trunk/Source/_javascript_Core/runtime/RandomizingFuzzerAgent.cpp (243856 => 243857)


--- trunk/Source/_javascript_Core/runtime/RandomizingFuzzerAgent.cpp	2019-04-04 04:32:47 UTC (rev 243856)
+++ trunk/Source/_javascript_Core/runtime/RandomizingFuzzerAgent.cpp	2019-04-04 05:27:25 UTC (rev 243857)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "RandomizingFuzzerAgent.h"
 
+#include "CodeBlock.h"
+
 namespace JSC {
 
 RandomizingFuzzerAgent::RandomizingFuzzerAgent(VM&)
@@ -33,13 +35,15 @@
 {
 }
 
-SpeculatedType RandomizingFuzzerAgent::getPrediction(CodeBlock*, int, SpeculatedType)
+SpeculatedType RandomizingFuzzerAgent::getPrediction(CodeBlock* codeBlock, int bytecodeIndex, SpeculatedType original)
 {
     auto locker = holdLock(m_lock);
     uint32_t high = m_random.getUint32();
     uint32_t low = m_random.getUint32();
-    uint64_t result = (static_cast<uint64_t>(high) << 32) | low;
-    return static_cast<SpeculatedType>(result) & SpecFullTop;
+    SpeculatedType generated = static_cast<SpeculatedType>((static_cast<uint64_t>(high) << 32) | low) & SpecFullTop;
+    if (Options::dumpRandomizingFuzzerAgentPredictions())
+        dataLogLn("getPrediction name:(", codeBlock->inferredName(), "#", codeBlock->hashAsStringIfPossible(), "),bytecodeIndex:(", bytecodeIndex, "),original:(", SpeculationDump(original), "),generated:(", SpeculationDump(generated), ")");
+    return generated;
 }
 
 } // namespace JSC
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to