ruby-changes:3088
From: ko1@a...
Date: 24 Dec 2007 16:06:18 +0900
Subject: [ruby-changes:3088] ko1 - Ruby:r14580 (trunk): * tool/compile.rb, getrev.rb, runruby.rb: remove unused tools.
ko1 2007-12-24 16:06:03 +0900 (Mon, 24 Dec 2007)
New Revision: 14580
Removed files:
trunk/tool/compile.rb
trunk/tool/getrev.rb
trunk/tool/runruby.rb
Modified files:
trunk/ChangeLog
Log:
* tool/compile.rb, getrev.rb, runruby.rb: remove unused tools.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/tool/compile.rb
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/tool/getrev.rb
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14580&r2=14579
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/tool/runruby.rb
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14579)
+++ ChangeLog (revision 14580)
@@ -1,3 +1,7 @@
+Mon Dec 24 15:55:50 2007 Koichi Sasada <ko1@a...>
+
+ * tool/compile.rb, getrev.rb, runruby.rb: remove unused tools.
+
Mon Dec 24 15:42:04 2007 Nobuyoshi Nakada <nobu@r...>
* configure.in, cygwin/GNUmakefile.in, */Makefile.sub,
Index: tool/runruby.rb
===================================================================
--- tool/runruby.rb (revision 14579)
+++ tool/runruby.rb (revision 14580)
@@ -1,4 +0,0 @@
-require 'rbconfig'
-$:.unshift File.join('.ext', Config::CONFIG['arch'])
-$:.unshift '.ext'
-load ARGV[0]
Index: tool/compile.rb
===================================================================
--- tool/compile.rb (revision 14579)
+++ tool/compile.rb (revision 14580)
@@ -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
-}
-
Index: tool/getrev.rb
===================================================================
--- tool/getrev.rb (revision 14579)
+++ tool/getrev.rb (revision 14580)
@@ -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
-
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml