Not so important, but why the AST is shown twice?

> rbx /X:ShowASTs
IronRuby 0.1 on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.

Note that local variables do not work today in the console.
As a workaround, use globals instead (eg $x = 42 instead of x = 42).

>>> 1
//
// AST wrapper
//

.codeblock Object wrapper ( global,)() {

    .return (RubyOps.RunMain)(
        .context,
        (Boolean)True,
        (Object).block (main #1),
    );
}
//
// CODE BLOCK: main (1)
//

.codeblock Object main ()() {
    .var RuntimeFlowControl #rfc (Local)
    .var Object #self (Local)
    .var RubyScope #scope (Local)

    {
        (.bound #scope) = (RubyOps.GetScope)(
            .context,
        )
        (.bound #rfc) = (RubyOps.GetRfc)(
            (.bound #scope),
        )
        (.bound #self) = (RubyOps.GetSelf)(
            (.bound #scope),
        )
        {
            .return 1;
        }
    }
}
//
// AST wrapper
//

.codeblock Object wrapper ( global,)() {

    .return (RubyOps.RunMain)(
        .context,
        (Boolean)True,
        (Object).block (main #1),
    );
}
//
// CODE BLOCK: main (1)
//

.codeblock Object main ()() {
    .var RuntimeFlowControl #rfc (Local)
    .var Object #self (Local)
    .var RubyScope #scope (Local)

    {
        (.bound #scope) = (RubyOps.GetScope)(
            .context,
        )
        (.bound #rfc) = (RubyOps.GetRfc)(
            (.bound #scope),
        )
        (.bound #self) = (RubyOps.GetSelf)(
            (.bound #scope),
        )
        {
            .return 1;
        }
    }
}
=> 1
>>>

On Wed, Mar 12, 2008 at 8:47 AM, Ivan Porto Carrero <[EMAIL PROTECTED]>
wrote:

> Cool it's working for me too, it was just me being stupid.
>
>
> On Wed, Mar 12, 2008 at 11:33 PM, Sanghyeon Seo <[EMAIL PROTECTED]> wrote:
>
> > -X:ShowASTs works for me. Linux, Mono 1.2.6, IronRuby r76.
> >
> > --
> > Seo Sanghyeon
> > _______________________________________________
> > Ironruby-core mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/ironruby-core
> >
>
>
> _______________________________________________
> Ironruby-core mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>


-- 
Brian J. Cardiff
bcardiff(?)gmail.com
.
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to