Ignore:
Timestamp:
Feb 11, 2012, 6:26:06 PM (14 years ago)
Author:
[email protected]
Message:

DFG CFA assumes that a WeakJSConstant's structure is known
https://bugs.webkit.org/show_bug.cgi?id=78428
<rdar://problem/10849492> <rdar://problem/10849621>

Source/JavaScriptCore:

Reviewed by Gavin Barraclough.

  • dfg/DFGAbstractState.cpp:

(JSC::DFG::AbstractState::execute):

LayoutTests:

Rubber stamped by Gavin Barraclough.

  • fast/js/dfg-put-by-id-prototype-check-expected.txt: Added.
  • fast/js/dfg-put-by-id-prototype-check.html: Added.
  • fast/js/script-tests/dfg-put-by-id-prototype-check.js: Added.

(foo):
(Foo):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractState.cpp

    r106879 r107496  
    198198    case WeakJSConstant: {
    199199        JSValue value = m_graph.valueOfJSConstant(m_codeBlock, nodeIndex);
    200         if (value.isCell())
    201             m_haveStructures = true;
    202         forNode(nodeIndex).set(value);
     200        // Have to be careful here! It's tempting to call set(value), but
     201        // that would be wrong, since that would constitute a proof that this
     202        // value will always have the same structure. The whole point of a value
     203        // having a structure is that it may change in the future - for example
     204        // between when we compile the code and when we run it.
     205        forNode(nodeIndex).set(predictionFromValue(value));
    203206        break;
    204207    }
Note: See TracChangeset for help on using the changeset viewer.