1 require 'compiler/text'
7 c = Compiler.new(Compiler::TextGenerator)
8 puts "Enter ? for help, ^D to exit."
10 while code = Readline.readline("rbx:describe> ")
12 puts "Enter any valid Ruby expression to see its compilation process."
19 puts code.indented_inspect
20 puts c.into_script(code).to_description.generator.text
35 sexp = if File.exist? file then
44 top = if File.exist? file then
45 Compiler.compile_file file
47 exit # HACK - Can't figure out compile_string problems
48 # Compiler.compile_string file
54 extra = top.literals.to_a.find_all { |l| l.kind_of? CompiledMethod }
58 puts "= #{cm.name} (0x#{cm.object_id.to_s(16)}) ======================"
60 extra += cm.literals.to_a.find_all { |l| l.kind_of? CompiledMethod }