For interpreter looping over extra newline nodes ends up making a
measurable perf difference.  I figured this would be an ok change, but
I guess not.  I will revert this at least until I can figure out
perhaps what newlines can be safely removed which don't break tracing.

-Tom

On 10/30/07, Peter Brant <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've been trying to make test_trace_func.rb work again in the
> interpreter.  test_block_and_vars fails because the NewlineNode (and
> indirectly the line event) has been deleted by this code in
> ParserSupport:
>
> // Reduces overhead in interp by not set position every single line we
> encounter.
> if (!configuration.hasExtraPositionInformation()) {
>     while (head instanceof NewlineNode) {
>         head = ((NewlineNode) head).getNextNode();
>     }
> }
>
> I'm a little puzzled by this.  On the one hand, I'm sure there is a
> good reason for it.  OTOH, doesn't it mean we'll lose the NewlineNode
> for the first line of any block? (which, in turn, seems a little odd).
>
> The test passes if I hardcode
> configuration.hasExtraPositionInformation() = true.
>
> Pete
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


-- 
Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [EMAIL PROTECTED] , [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to