Ignore:
Timestamp:
Apr 21, 2014, 12:51:54 PM (11 years ago)
Author:
[email protected]
Message:

OSR exit should know about Int52 and Double constants
https://bugs.webkit.org/show_bug.cgi?id=131945

Reviewed by Oliver Hunt.

The DFG OSR exit machinery's ignorance would lead to some constants becoming
jsUndefined() after OSR exit.

The FTL OSR exit machinery's ignorance just meant that we would sometimes use a
stackmap constant rather than baking the constant into the OSRExit data structure.
So, not a big deal, but worth fixing.

Also added some helpful hacks to jsc.cpp for testing such OSR exit pathologies.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsic):

  • dfg/DFGMinifiedNode.h:

(JSC::DFG::belongsInMinifiedGraph):
(JSC::DFG::MinifiedNode::hasConstantNumber):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::tryToSetConstantExitArgument):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionOtherFalse):
(functionUndefined):

  • runtime/Intrinsic.h:
  • tests/stress/fold-to-double-constant-then-exit.js: Added.

(foo):

  • tests/stress/fold-to-int52-constant-then-exit.js: Added.

(foo):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGMinifiedNode.h

    r164424 r167612  
    4141    switch (type) {
    4242    case JSConstant:
     43    case Int52Constant:
     44    case DoubleConstant:
    4345    case WeakJSConstant:
    4446    case PhantomArguments:
     
    8587    static bool hasConstantNumber(NodeType type)
    8688    {
    87         return type == JSConstant;
     89        return type == JSConstant || type == Int52Constant || type == DoubleConstant;
    8890    }
    8991    static bool hasWeakConstant(NodeType type)
Note: See TracChangeset for help on using the changeset viewer.