Bug 90740 - children method in LLINT AST Not class should return [@child]
Summary: children method in LLINT AST Not class should return [@child]
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 111568
  Show dependency treegraph
 
Reported: 2012-07-08 15:37 PDT by lds
Modified: 2013-03-07 00:20 PST (History)
7 users (show)

See Also:


Attachments
Fix for the children method (1006 bytes, patch)
2013-03-06 05:43 PST, Peter Gal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lds 2012-07-08 15:37:53 PDT
While experimenting with the new llint in JSCore,  I noticed that the
Not class (located in offlineasm/ast.rb) may have an incorrect method:

class Not < Node
    attr_reader :child

    def initialize(codeOrigin, child)
        super(codeOrigin)
        @child = child
    end

    def children
        [@left, @right]
    end

    def mapChildren
        Not.new(codeOrigin, (yield @child))
    end

    def dump
        "(not #{child.dump})"
    end
end



Shouldn't children of this 'Not' class be

    def children
        [@child]
    end

instead, since it's  a unary operator?
Comment 1 Peter Gal 2013-03-06 05:43:57 PST
Created attachment 191731 [details]
Fix for the children method

I think this is also a problem. So this patch should fix it.
Comment 2 Build Bot 2013-03-07 00:09:51 PST
Comment on attachment 191731 [details]
Fix for the children method

Attachment 191731 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17067209

New failing tests:
editing/selection/selection-modify-crash.html
Comment 3 Peter Gal 2013-03-07 00:18:55 PST
(In reply to comment #2)
> (From update of attachment 191731 [details])
> Attachment 191731 [details] did not pass mac-ews (mac):
> Output: http://webkit-commit-queue.appspot.com/results/17067209
> 
> New failing tests:
> editing/selection/selection-modify-crash.html

This patch can not cause this fail, because at this time the 'Not' node is not used at all.
Comment 4 Filip Pizlo 2013-03-07 00:19:13 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 191731 [details] [details])
> > Attachment 191731 [details] [details] did not pass mac-ews (mac):
> > Output: http://webkit-commit-queue.appspot.com/results/17067209
> > 
> > New failing tests:
> > editing/selection/selection-modify-crash.html
> 
> This patch can not cause this fail, because at this time the 'Not' node is not used at all.

Agreed.
Comment 5 WebKit Review Bot 2013-03-07 00:20:51 PST
Comment on attachment 191731 [details]
Fix for the children method

Clearing flags on attachment: 191731

Committed r145047: <http://trac.webkit.org/changeset/145047>
Comment 6 WebKit Review Bot 2013-03-07 00:20:55 PST
All reviewed patches have been landed.  Closing bug.