diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 07:06:03 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 07:06:03 +0000 |
commit | 835c8d9d48683192784a00a811fdb8fd39bce02d (patch) | |
tree | e8a035cacbf9cbcaaf8fa77fcbbfa18ce0240286 /tool | |
parent | e5988f74040f8b073a1e315053801023cb957774 (diff) | |
download | ruby-835c8d9d48683192784a00a811fdb8fd39bce02d.tar.gz |
* tool/compile.rb, getrev.rb, runruby.rb: remove unused tools.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/compile.rb | 67 | ||||
-rw-r--r-- | tool/getrev.rb | 13 | ||||
-rw-r--r-- | tool/runruby.rb | 4 |
3 files changed, 0 insertions, 84 deletions
diff --git a/tool/compile.rb b/tool/compile.rb deleted file mode 100644 index 66960f9851..0000000000 --- a/tool/compile.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'optparse' -require 'pp' - -OutputCompileOption = { - # enable - :peephole_optimization =>true, - :inline_const_cache =>true, - - # disable - :specialized_instruction =>false, - :operands_unification =>false, - :instructions_unification =>false, - :stack_caching =>false, -} - -def compile_to_rb infile, outfile - iseq = VM::InstructionSequence.compile_file(infile, OutputCompileOption) - - open(outfile, 'w'){|f| - f.puts "VM::InstructionSequence.load(" + - "Marshal.load(<<EOS____.unpack('m*')[0])).eval" - f.puts [Marshal.dump(iseq.to_a)].pack('m*') - f.puts "EOS____" - } -end - -def compile_to_rbc infile, outfile, type - iseq = VM::InstructionSequence.compile_file(infile, OutputCompileOption) - - case type - when 'm' - open(outfile, 'wb'){|f| - f.print "RBCM" - f.puts Marshal.dump(iseq.to_a, f) - } - else - raise "Unsupported compile type: #{type}" - end -end - -## main - -outfile = 'a.rb' -type = 'm' -opt = OptionParser.new{|opt| - opt.on('-o file'){|o| - outfile = o - } - opt.on('-t type', '--type type'){|o| - type = o - } - opt.version = '0.0.1' -} - -opt.parse!(ARGV) - -ARGV.each{|file| - case outfile - when /\.rb\Z/ - compile_to_rb file, outfile - when /\.rbc\Z/ - compile_to_rbc file, outfile, type - else - raise - end -} - diff --git a/tool/getrev.rb b/tool/getrev.rb deleted file mode 100644 index 1d24a17829..0000000000 --- a/tool/getrev.rb +++ /dev/null @@ -1,13 +0,0 @@ -str = ARGF.gets -if /ChangeLog (\d+)/ =~ str - puts %Q{char *rev = "#{$1}";} -else - raise -end - -if /ChangeLog \d+ ([\d-]+)/ =~ str - puts %Q{char *date = "#{$1}";} -else - raise -end - diff --git a/tool/runruby.rb b/tool/runruby.rb deleted file mode 100644 index 9de75cd388..0000000000 --- a/tool/runruby.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'rbconfig' -$:.unshift File.join('.ext', Config::CONFIG['arch']) -$:.unshift '.ext' -load ARGV[0] |