⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243857 in webkit


Ignore:
Timestamp:
Apr 3, 2019, 10:27:25 PM (7 years ago)
Author:
ysuzuki@apple.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r243853 r243857  
     12019-04-03  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Unreviewed, rolling in r243843 with the build fix
     4        https://bugs.webkit.org/show_bug.cgi?id=196586
     5
     6        * runtime/Options.cpp:
     7        (JSC::recomputeDependentOptions):
     8        * runtime/Options.h:
     9        * runtime/RandomizingFuzzerAgent.cpp:
     10        (JSC::RandomizingFuzzerAgent::getPrediction):
     11
    1122019-04-03  Ryan Haddad  <ryanhaddad@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/Options.cpp

    r243853 r243857  
    452452        || Options::verboseCFA()
    453453        || Options::verboseDFGFailure()
    454         || Options::verboseFTLFailure())
     454        || Options::verboseFTLFailure()
     455        || Options::dumpRandomizingFuzzerAgentPredictions())
    455456        Options::alwaysComputeHash() = true;
    456457   
  • trunk/Source/JavaScriptCore/runtime/Options.h

    r243853 r243857  
    437437    v(bool, useRandomizingFuzzerAgent, false, Normal, nullptr) \
    438438    v(unsigned, seedOfRandomizingFuzzerAgent, 1, Normal, nullptr) \
     439    v(bool, dumpRandomizingFuzzerAgentPredictions, false, Normal, nullptr) \
    439440    \
    440441    v(bool, logPhaseTimes, false, Normal, nullptr) \
  • trunk/Source/JavaScriptCore/runtime/RandomizingFuzzerAgent.cpp

    r243853 r243857  
    2727#include "RandomizingFuzzerAgent.h"
    2828
     29#include "CodeBlock.h"
     30
    2931namespace JSC {
    3032
     
    3436}
    3537
    36 SpeculatedType RandomizingFuzzerAgent::getPrediction(CodeBlock*, int, SpeculatedType)
     38SpeculatedType RandomizingFuzzerAgent::getPrediction(CodeBlock* codeBlock, int bytecodeIndex, SpeculatedType original)
    3739{
    3840    auto locker = holdLock(m_lock);
    3941    uint32_t high = m_random.getUint32();
    4042    uint32_t low = m_random.getUint32();
    41     uint64_t result = (static_cast<uint64_t>(high) << 32) | low;
    42     return static_cast<SpeculatedType>(result) & SpecFullTop;
     43    SpeculatedType generated = static_cast<SpeculatedType>((static_cast<uint64_t>(high) << 32) | low) & SpecFullTop;
     44    if (Options::dumpRandomizingFuzzerAgentPredictions())
     45        dataLogLn("getPrediction name:(", codeBlock->inferredName(), "#", codeBlock->hashAsStringIfPossible(), "),bytecodeIndex:(", bytecodeIndex, "),original:(", SpeculationDump(original), "),generated:(", SpeculationDump(generated), ")");
     46    return generated;
    4347}
    4448
Note: See TracChangeset for help on using the changeset viewer.