Skip to content

Commit

Permalink
Prepare hooking into rubinius build system
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Nov 4, 2013
1 parent c1efa5f commit e91f244
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -12,3 +12,5 @@ gem "rubinius-melbourne", "~> 2.0"
gem "rubinius-processor", "~> 2.0"
gem "rubinius-compiler", "~> 2.0"
gem "rubinius-ast", "~> 2.0"
gem "ruby-graphviz"
gem "awesome_print"
2 changes: 2 additions & 0 deletions rakelib/kernel.rake
Expand Up @@ -25,6 +25,8 @@ end
# TODO: Build this functionality into the compiler
class KernelCompiler
def self.compile(file, output, line, transforms)
require './scripts/optimizer'

compiler = Rubinius::ToolSet::Build::Compiler.new :file, :compiled_file

parser = compiler.parser
Expand Down
5 changes: 4 additions & 1 deletion scripts/inject.rb
Expand Up @@ -2352,6 +2352,8 @@ def optimize
end
end

if __FILE__ == $0

#code = Rubinius::Optimizer::Inst.instance_method(:stack_consumed).executable
#code = File.method(:absolute_path).executable

Expand Down Expand Up @@ -2491,7 +2493,7 @@ def measure

p result

return
#return
#puts code.decode
#puts
#puts code.decode
Expand Down Expand Up @@ -2583,3 +2585,4 @@ def inspect
#guards:
# :__block__ => (inlined) original CompiledMethod (= def aa)
# :Rubinius, :Type, :compatible? => (inlined) CompiledMethod
end

0 comments on commit e91f244

Please sign in to comment.