Changeset 152742 in webkit


Ignore:
Timestamp:
Jul 16, 2013, 2:41:06 PM (12 years ago)
Author:
fpizlo@apple.com
Message:

MakeRope fixup shouldn't lead to an Identity without kids
https://bugs.webkit.org/show_bug.cgi?id=118745

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

Make the empty string pruning part of fixupMakeRope() stop if it's on the last child.

Make Node::convertToIdentity release-assert that it has exactly one kid.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupMakeRope):

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToIdentity):

LayoutTests:

Reviewed by Mark Hahnenberg.

  • fast/js/dfg-make-rope-all-empty-strings.html: Added.
  • fast/js/dfg-make-rope-all-empty-strings-expected.txt: Added.
  • fast/js/jsc-test-list:
  • fast/js/script-tests/dfg-make-rope-all-empty-strings.js: Added.

(foo):
(bar):

Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r152736 r152742  
     12013-07-16  Filip Pizlo  <fpizlo@apple.com>
     2
     3        MakeRope fixup shouldn't lead to an Identity without kids
     4        https://bugs.webkit.org/show_bug.cgi?id=118745
     5
     6        Reviewed by Mark Hahnenberg.
     7
     8        * fast/js/dfg-make-rope-all-empty-strings.html: Added.
     9        * fast/js/dfg-make-rope-all-empty-strings-expected.txt: Added.
     10        * fast/js/jsc-test-list:
     11        * fast/js/script-tests/dfg-make-rope-all-empty-strings.js: Added.
     12        (foo):
     13        (bar):
     14
    1152013-07-16  Roger Fong  <roger_fong@apple.com>
    216
  • trunk/LayoutTests/fast/js/jsc-test-list

    r150694 r152742  
    182182fast/js/dfg-intrinsic-unused-this
    183183fast/js/dfg-intrinsic-unused-this-method-check
     184fast/js/dfg-make-rope-all-empty-strings
    184185fast/js/dfg-max-backwards-propagation
    185186fast/js/dfg-min-backwards-propagation
  • trunk/Source/JavaScriptCore/ChangeLog

    r152737 r152742  
     12013-07-16  Filip Pizlo  <fpizlo@apple.com>
     2
     3        MakeRope fixup shouldn't lead to an Identity without kids
     4        https://bugs.webkit.org/show_bug.cgi?id=118745
     5
     6        Reviewed by Mark Hahnenberg.
     7       
     8        Make the empty string pruning part of fixupMakeRope() stop if it's on the last child.
     9       
     10        Make Node::convertToIdentity release-assert that it has exactly one kid.
     11
     12        * dfg/DFGFixupPhase.cpp:
     13        (JSC::DFG::FixupPhase::fixupMakeRope):
     14        * dfg/DFGNode.h:
     15        (JSC::DFG::Node::convertToIdentity):
     16
    1172013-07-16  Mark Hahnenberg  <mhahnenberg@apple.com>
    218
  • trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

    r149395 r152742  
    961961            if (string->length())
    962962                continue;
     963           
     964            // Don't allow the MakeRope to have zero children.
     965            if (!i && !node->child2())
     966                break;
     967           
    963968            node->children.removeEdge(i--);
    964969        }
  • trunk/Source/JavaScriptCore/dfg/DFGNode.h

    r149152 r152742  
    222222    void convertToIdentity()
    223223    {
     224        RELEASE_ASSERT(child1());
     225        RELEASE_ASSERT(!child2());
    224226        setOpAndDefaultNonExitFlags(Identity);
    225227    }
Note: See TracChangeset for help on using the changeset viewer.