[Webkit-unassigned] [Bug 90740] New: children method in LLINT AST Not class should return [child]

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 8 15:37:53 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=90740

           Summary: children method in LLINT AST Not class should return
                    [child]
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: laurent at gameclosure.com
                CC: fpizlo at apple.com


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?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list