1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/vm/instruction.rb (make_header_analysys): add to separate

header addition process.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-08-06 09:38:51 +00:00
parent 7bc137942d
commit fe0f6734bf
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Mon Aug 6 18:33:22 2007 Koichi Sasada <ko1@atdot.net>
* lib/vm/instruction.rb (make_header_analysys): add to separate
header addition process.
Mon Aug 6 17:36:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rexml/encodings/{ISO-8859-15,CP-1252}.rb: fixed invalid syntax.

View file

@ -786,6 +786,14 @@ module RubyVM
ret.join("\n") + "\n"
end
def make_header_analysys insn
ret = " USAGE_ANALYSIS_INSN(BIN(#{insn.name}));\n"
insn.opes.each_with_index{|op, i|
ret += " USAGE_ANALYSIS_OPERAND(BIN(#{insn.name}), #{i}, #{op[1]});\n"
}
ret
end
def make_header insn
ret = "\nINSN_ENTRY(#{insn.name}){\n"
ret += " /* prepare stack status */\n" if verbose?
@ -814,10 +822,7 @@ module RubyVM
ret += " #define LABEL_IS_SC(lab) LABEL_##lab##_###{insn.sc.size == 0 ? 't' : 'f'}\n"
ret += " USAGE_ANALYSIS_INSN(BIN(#{insn.name}));\n"
insn.opes.each_with_index{|op, i|
ret += " USAGE_ANALYSIS_OPERAND(BIN(#{insn.name}), #{i}, #{op[1]});\n"
}
ret += make_header_analysys insn
ret += "{\n"
end