Ignore:
Timestamp:
Dec 1, 2015, 5:37:19 PM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r192914.
https://bugs.webkit.org/show_bug.cgi?id=151734

JSC tests for this change are failing on 32 and 64-bit bots
(Requested by ryanhaddad on #webkit).

Reverted changeset:

"[ES6] Implement LLInt/Baseline Support for ES6 Generators and
enable this feature"
https://bugs.webkit.org/show_bug.cgi?id=150792
http://trac.webkit.org/changeset/192914

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/CodeCache.h

    r192914 r192935  
    3030#include "ParserModes.h"
    3131#include "SourceCode.h"
    32 #include "SourceCodeKey.h"
    3332#include "Strong.h"
    3433#include "VariableEnvironment.h"
     
    5857class SourceProvider;
    5958
     59class SourceCodeKey {
     60public:
     61    enum CodeType { EvalType, ProgramType, FunctionType, ModuleType };
     62
     63    SourceCodeKey()
     64    {
     65    }
     66
     67    SourceCodeKey(const SourceCode& sourceCode, const String& name, CodeType codeType, JSParserBuiltinMode builtinMode,
     68        JSParserStrictMode strictMode, ThisTDZMode thisTDZMode = ThisTDZMode::CheckIfNeeded)
     69        : m_sourceCode(sourceCode)
     70        , m_name(name)
     71        , m_flags(
     72            (static_cast<unsigned>(codeType) << 3)
     73            | (static_cast<unsigned>(builtinMode) << 2)
     74            | (static_cast<unsigned>(strictMode) << 1)
     75            | static_cast<unsigned>(thisTDZMode))
     76        , m_hash(string().impl()->hash())
     77    {
     78    }
     79
     80    SourceCodeKey(WTF::HashTableDeletedValueType)
     81        : m_sourceCode(WTF::HashTableDeletedValue)
     82    {
     83    }
     84
     85    bool isHashTableDeletedValue() const { return m_sourceCode.isHashTableDeletedValue(); }
     86
     87    unsigned hash() const { return m_hash; }
     88
     89    size_t length() const { return m_sourceCode.length(); }
     90
     91    bool isNull() const { return m_sourceCode.isNull(); }
     92
     93    // To save memory, we compute our string on demand. It's expected that source
     94    // providers cache their strings to make this efficient.
     95    String string() const { return m_sourceCode.toString(); }
     96
     97    bool operator==(const SourceCodeKey& other) const
     98    {
     99        return m_hash == other.m_hash
     100            && length() == other.length()
     101            && m_flags == other.m_flags
     102            && m_name == other.m_name
     103            && string() == other.string();
     104    }
     105
     106private:
     107    SourceCode m_sourceCode;
     108    String m_name;
     109    unsigned m_flags;
     110    unsigned m_hash;
     111};
     112
     113struct SourceCodeKeyHash {
     114    static unsigned hash(const SourceCodeKey& key) { return key.hash(); }
     115    static bool equal(const SourceCodeKey& a, const SourceCodeKey& b) { return a == b; }
     116    static const bool safeToCompareToEmptyOrDeleted = false;
     117};
     118
     119struct SourceCodeKeyHashTraits : SimpleClassHashTraits<SourceCodeKey> {
     120    static const bool hasIsEmptyValueFunction = true;
     121    static bool isEmptyValue(const SourceCodeKey& sourceCodeKey) { return sourceCodeKey.isNull(); }
     122};
     123
    60124struct SourceCodeValue {
    61125    SourceCodeValue()
Note: See TracChangeset for help on using the changeset viewer.