[webkit-dev] JavaScriptCore AST generator bug?

Filip Pizlo fpizlo at apple.com
Sun Jul 8 13:46:23 PDT 2012


Yes that's a bug. 

In future, if in doubt, file a bug. No need to email the list first. 

-Filip

On Jul 8, 2012, at 10:59 AM, Laurent Desegur <laurent at gameclosure.com> wrote:

> 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?
> 
> Before filing a bug, I'd like to get the opinion of someone familiar
> with the code base.
> 
> Thanks,
> 
> LdS
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


More information about the webkit-dev mailing list