[Ironruby-core] ConvertTo vs Cast

Michael Letterle michael.letterle at gmail.com
Tue Feb 5 16:17:07 EST 2008

rbx /? is your friend :)

the quick answer is rbx -X:ShowASTs

For reference:

IronRuby command line:

Usage: [options] [file|- [arguments]]

 -opt                        dummy
 -c cmd                      Program passed in as string (terminates
option list)
 -h                          Display usage
 -i                          Inspect interactively after running script
 -V                          Print the version number and exit
 -O                          Enable optimizations
 -D                          EngineDebug mode
 -OO                         Remove doc-strings in addition to the -O
 -X:AssembliesDir            Set the directory for saving generated assemblies
 -X:ColorfulConsole          Enable ColorfulConsole
 -X:DumpASTs                 Dump all ASTs generated to a file
 -X:ExceptionDetail          Enable ExceptionDetail mode
 -X:Interpret                Enable interpreted mode
 -X:Frames                   Generate custom frames
 -X:GenerateAsSnippets       Generate code to run in snippet mode
 -X:ILDebug                  Output generated IL code to a text file
for debugging
 -X:MaxRecursion             Set the maximum recursion level
 -X:NoOptimize               Disable JIT optimization in generated code
 -X:NoTraceback              Do not emit traceback code
 -X:PassExceptions           Do not catch exceptions that are
unhandled by script code
 -X:PrivateBinding           Enable binding to private members
 -X:SaveAssemblies           Save generated assemblies
 -X:ShowASTs                 Print all ASTs to the console
 -X:ShowClrExceptions        Display CLS Exception information
 -X:ShowRules                Show the AST for rules generated
 -X:SlowOps                  Enable fast ops
 -X:StaticMethods            Generate static methods only
 -X:TabCompletion            Enable TabCompletion mode
 -X:TrackPerformance         Track performance sensitive areas
 -X:CachePointersInApartment Cache COM pointers per apartment (prototype)

On Feb 5, 2008 3:59 PM, Eric Nicholson <enicholson at gmail.com> wrote:
> Stupid question, but how do you dump the AST?  I've wanted to do that a
> couple times (most recently while hacking my own temporary "eval").
> On Feb 5, 2008 1:42 PM, Peter Bacon Darwin <bacondarwin at googlemail.com>
> wrote:
> >
> >
> >
> >
> >
> > OK, so I think that this is a problem with the AST to code generation,
> though I really don't understand it deeply enough to say exactly where.
> >
> >
> >
> > If you dump the ASTs from the ruby code the body of the loop looks like
> this:
> >
> >
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core

Michael Letterle
[Polymath Programmer]

More information about the Ironruby-core mailing list