Changeset 233906 in webkit


Ignore:
Timestamp:
Jul 17, 2018 10:14:25 PM (6 years ago)
Author:
keith_miller@apple.com
Message:

Revert r233630 since it broke internal wasm benchmarks
https://bugs.webkit.org/show_bug.cgi?id=187746

Unreviewed revert.

Source/JavaScriptCore:

This patch seems to have broken internal Wasm benchmarks. This
issue is likely due to an underlying bug but let's rollout while
we investigate.

  • bytecode/CodeType.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::codeType const):
(JSC::UnlinkedCodeBlock::didOptimize const):
(JSC::UnlinkedCodeBlock::setDidOptimize):

  • bytecode/VirtualRegister.h:

(JSC::VirtualRegister::VirtualRegister):
(): Deleted.

Source/WTF:

  • wtf/TriState.h:
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r233893 r233906  
     12018-07-17  Keith Miller  <keith_miller@apple.com>
     2
     3        Revert r233630 since it broke internal wasm benchmarks
     4        https://bugs.webkit.org/show_bug.cgi?id=187746
     5
     6        Unreviewed revert.
     7
     8        This patch seems to have broken internal Wasm benchmarks. This
     9        issue is likely due to an underlying bug but let's rollout while
     10        we investigate.
     11
     12        * bytecode/CodeType.h:
     13        * bytecode/UnlinkedCodeBlock.cpp:
     14        (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
     15        * bytecode/UnlinkedCodeBlock.h:
     16        (JSC::UnlinkedCodeBlock::codeType const):
     17        (JSC::UnlinkedCodeBlock::didOptimize const):
     18        (JSC::UnlinkedCodeBlock::setDidOptimize):
     19        * bytecode/VirtualRegister.h:
     20        (JSC::VirtualRegister::VirtualRegister):
     21        (): Deleted.
     22
    1232018-07-17  Mark Lam  <mark.lam@apple.com>
    224
  • trunk/Source/JavaScriptCore/bytecode/CodeType.h

    r233629 r233906  
    2828namespace JSC {
    2929
    30 // CodeType should be within 2 bits (0b00 - 0b11).
    31 enum CodeType : uint8_t {
    32     GlobalCode,
    33     EvalCode,
    34     FunctionCode,
    35     ModuleCode
    36 };
     30enum CodeType { GlobalCode, EvalCode, FunctionCode, ModuleCode };
    3731
    3832} // namespace JSC
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r233862 r233906  
    5555UnlinkedCodeBlock::UnlinkedCodeBlock(VM* vm, Structure* structure, CodeType codeType, const ExecutableInfo& info, DebuggerMode debuggerMode)
    5656    : Base(*vm, structure)
     57    , m_globalObjectRegister(VirtualRegister())
    5758    , m_usesEval(info.usesEval())
    5859    , m_isStrictMode(info.isStrictMode())
     
    6970    , m_evalContextType(static_cast<unsigned>(info.evalContextType()))
    7071    , m_hasTailCalls(false)
    71     , m_codeType(codeType)
     72    , m_features(0)
    7273    , m_didOptimize(MixedTriState)
    7374    , m_parseMode(info.parseMode())
     75    , m_codeType(codeType)
     76    , m_arrayProfileCount(0)
     77    , m_arrayAllocationProfileCount(0)
     78    , m_objectAllocationProfileCount(0)
     79    , m_valueProfileCount(0)
     80    , m_llintCallLinkInfoCount(0)
    7481{
    7582    for (auto& constantRegisterIndex : m_linkTimeConstants)
    7683        constantRegisterIndex = 0;
    77     ASSERT(codeType == this->codeType());
    78     ASSERT(MixedTriState == this->didOptimize());
    7984    ASSERT(m_constructorKind == static_cast<unsigned>(info.constructorKind()));
    8085}
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h

    r233765 r233906  
    301301    unsigned numberOfLLintCallLinkInfos() { return m_llintCallLinkInfoCount; }
    302302
    303     CodeType codeType() const { return static_cast<CodeType>(m_codeType); }
     303    CodeType codeType() const { return m_codeType; }
    304304
    305305    VirtualRegister thisRegister() const { return m_thisRegister; }
     
    362362    bool wasCompiledWithDebuggingOpcodes() const { return m_wasCompiledWithDebuggingOpcodes; }
    363363
    364     TriState didOptimize() const { return static_cast<TriState>(m_didOptimize); }
    365     void setDidOptimize(TriState didOptimize)
    366     {
    367         m_didOptimize = static_cast<unsigned>(didOptimize);
    368         ASSERT(didOptimize == this->didOptimize());
    369     }
     364    TriState didOptimize() const { return m_didOptimize; }
     365    void setDidOptimize(TriState didOptimize) { m_didOptimize = didOptimize; }
    370366
    371367    void dump(PrintStream&) const;
     
    421417    std::unique_ptr<UnlinkedInstructionStream> m_unlinkedInstructions;
    422418    std::unique_ptr<BytecodeLivenessAnalysis> m_liveness;
     419
     420    VirtualRegister m_thisRegister;
     421    VirtualRegister m_scopeRegister;
     422    VirtualRegister m_globalObjectRegister;
    423423
    424424    String m_sourceURLDirective;
     
    443443    unsigned m_evalContextType : 2;
    444444    unsigned m_hasTailCalls : 1;
    445     unsigned m_codeType : 2; // CodeType
    446     unsigned m_didOptimize : 2; // TriState
     445
    447446    unsigned m_lineCount { 0 };
    448447    unsigned m_endColumn { UINT_MAX };
     
    451450    int m_numCalleeLocals { 0 };
    452451    int m_numParameters { 0 };
    453 
    454     VirtualRegister m_thisRegister;
    455     VirtualRegister m_scopeRegister;
    456     VirtualRegister m_globalObjectRegister;
    457 
    458     SourceParseMode m_parseMode;
    459452
    460453public:
     
    462455private:
    463456    CodeFeatures m_features { 0 };
     457    TriState m_didOptimize;
     458    SourceParseMode m_parseMode;
     459    CodeType m_codeType;
    464460
    465461    Vector<unsigned> m_jumpTargets;
  • trunk/Source/JavaScriptCore/bytecode/VirtualRegister.h

    r233629 r233906  
    4848    friend VirtualRegister virtualRegisterForArgument(int, int);
    4949
    50     VirtualRegister() = default;
     50    VirtualRegister()
     51        : m_virtualRegister(s_invalidVirtualRegister)
     52    { }
    5153
    5254    explicit VirtualRegister(int virtualRegister)
     
    108110    static int argumentToOperand(int argument) { return argument + CallFrame::thisArgumentOffset(); }
    109111
    110     int m_virtualRegister { s_invalidVirtualRegister };
     112    int m_virtualRegister;
    111113};
    112114
  • trunk/Source/WTF/ChangeLog

    r233837 r233906  
     12018-07-17  Keith Miller  <keith_miller@apple.com>
     2
     3        Revert r233630 since it broke internal wasm benchmarks
     4        https://bugs.webkit.org/show_bug.cgi?id=187746
     5
     6        Unreviewed revert.
     7
     8        * wtf/TriState.h:
     9
    1102018-07-14  Kocsen Chung  <kocsen_chung@apple.com>
    211
  • trunk/Source/WTF/wtf/TriState.h

    r233629 r233906  
    2929namespace WTF {
    3030
    31 // TriState should be within 2 bits (0b00 - 0b10).
    32 enum TriState : uint8_t {
     31enum TriState {
    3332    FalseTriState,
    3433    TrueTriState,
Note: See TracChangeset for help on using the changeset viewer.