Changeset 225880 in webkit


Ignore:
Timestamp:
Dec 13, 2017 4:31:58 PM (6 years ago)
Author:
sbarati@apple.com
Message:

Take a value driven approach to how we emit structure checks in TypeCheckHoistingPhase to obviate the need for static_assert guards
https://bugs.webkit.org/show_bug.cgi?id=180771

Reviewed by JF Bastien.

  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::run):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r225865 r225880  
     12017-12-13  Saam Barati  <sbarati@apple.com>
     2
     3        Take a value driven approach to how we emit structure checks in TypeCheckHoistingPhase to obviate the need for static_assert guards
     4        https://bugs.webkit.org/show_bug.cgi?id=180771
     5
     6        Reviewed by JF Bastien.
     7
     8        * dfg/DFGTypeCheckHoistingPhase.cpp:
     9        (JSC::DFG::TypeCheckHoistingPhase::run):
     10
    1112017-12-13  Saam Barati  <sbarati@apple.com>
    212
  • trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp

    r225865 r225880  
    146146                    if (iter->value.m_structure) {
    147147                        auto checkOp = CheckStructure;
    148                         if (is64Bit()) {
    149                             static_assert(is64Bit() || !(SpecCellCheck & SpecEmpty), "");
     148                        if (SpecCellCheck & SpecEmpty) {
    150149                            VirtualRegister local = node->variableAccessData()->local();
    151150                            auto* inlineCallFrame = node->origin.semantic.inlineCallFrame;
     
    196195                        // will be folded to CheckStructure because AI proves that the incoming value is
    197196                        // definitely not empty.
    198                         static_assert(is64Bit() || !(SpecCellCheck & SpecEmpty), "");
    199197                        insertionSet.insertNode(
    200                             indexForChecks, SpecNone, is64Bit() ? CheckStructureOrEmpty : CheckStructure,
     198                            indexForChecks, SpecNone, (SpecCellCheck & SpecEmpty) ? CheckStructureOrEmpty : CheckStructure,
    201199                            originForChecks.withSemantic(origin.semantic),
    202200                            OpInfo(m_graph.addStructureSet(iter->value.m_structure)),
Note: See TracChangeset for help on using the changeset viewer.