summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-05-05 18:00:59 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-05-10 16:51:10 +0900
commit4fca592e8c707c76e8afea2a0b5dd4d17e97cd8f (patch)
tree19173db93f8e0280a209b536e965365a27ab8f8a /tool
parent191cfcc407e83ddd99212db4ba7b3df9f4608a05 (diff)
delete mk_builtin_binary.rb
To generate what is necessary via generic_erb.rb instead.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3097
Diffstat (limited to 'tool')
-rw-r--r--tool/mk_builtin_binary.rb44
1 files changed, 0 insertions, 44 deletions
diff --git a/tool/mk_builtin_binary.rb b/tool/mk_builtin_binary.rb
deleted file mode 100644
index 1b3fe50ac9..0000000000
--- a/tool/mk_builtin_binary.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# make builtin_binary.inc file.
-#
-
-def dump_bin iseq
- bin = iseq.to_binary
- bin.each_byte.with_index{|b, index|
- print "\n " if (index%20) == 0
- print " 0x#{'%02x' % b.ord},"
- }
- print "\n"
-end
-
-$stdout = open('builtin_binary.inc', 'wb')
-
-puts <<H
-// -*- c -*-
-// DO NOT MODIFY THIS FILE DIRECTLY.
-// auto-generated file by #{File.basename(__FILE__)}
-
-H
-
-if ARGV.include?('--cross=yes')
- # do nothing
-else
- ary = []
- RubyVM::each_builtin{|feature, iseq|
- ary << [feature, iseq]
- }
-
- ary.each{|feature, iseq|
- print "\n""static const unsigned char #{feature}_bin[] = {"
- dump_bin(iseq)
- puts "};"
- }
-
- print "\n""static const struct builtin_binary builtin_binary[] = {\n"
- ary.each{|feature, iseq|
- puts " {#{feature.dump}, #{feature}_bin, sizeof(#{feature}_bin)},"
- }
- puts " {NULL}," # dummy sentry
- puts "};"
- puts "#define BUILTIN_BINARY_SIZE #{ary.size}"
-end