* tool/instruction.rb: fix to follow current implementation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d2d4c936d
commit
e5b436cd76
@ -1,3 +1,7 @@
|
|||||||
|
Wed Apr 27 16:10:35 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* tool/instruction.rb: fix to follow current implementation.
|
||||||
|
|
||||||
Wed Apr 27 15:47:54 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Apr 27 15:47:54 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/stringio/stringio.c (strio_s_new): warn if a block is given,
|
* ext/stringio/stringio.c (strio_s_new): warn if a block is given,
|
||||||
|
@ -453,9 +453,9 @@ class RubyVM
|
|||||||
pops.concat e_pops
|
pops.concat e_pops
|
||||||
rets.concat e_rets
|
rets.concat e_rets
|
||||||
defopes.concat e_defs
|
defopes.concat e_defs
|
||||||
sp_inc += "#{insn.sp_inc}"
|
sp_inc << "#{insn.sp_inc}"
|
||||||
|
|
||||||
body += "{ /* unif: #{i} */\n" +
|
body << "{ /* unif: #{i} */\n" +
|
||||||
passed_vars.map{|rpvars|
|
passed_vars.map{|rpvars|
|
||||||
pv = rpvars[0]
|
pv = rpvars[0]
|
||||||
rv = rpvars[1]
|
rv = rpvars[1]
|
||||||
@ -463,15 +463,22 @@ class RubyVM
|
|||||||
}.join("\n") +
|
}.join("\n") +
|
||||||
"\n" +
|
"\n" +
|
||||||
redef_vars.map{|v, type|
|
redef_vars.map{|v, type|
|
||||||
"#define #{v} #{v}_#{i}"
|
"#{type} #{v} = #{v}_#{i};"
|
||||||
}.join("\n") + "\n" +
|
}.join("\n") + "\n"
|
||||||
insn.body +
|
if line = insn.body.instance_variable_get(:@line_no)
|
||||||
passed_vars.map{|rpvars|
|
file = insn.body.instance_variable_get(:@file)
|
||||||
"#undef #{rpvars[0][1]}"
|
body << "#line #{line+1} \"#{file}\"\n"
|
||||||
|
body << insn.body
|
||||||
|
body << "\n#line __CURRENT_LINE__ \"__CURRENT_FILE__\"\n"
|
||||||
|
else
|
||||||
|
body << insn.body
|
||||||
|
end
|
||||||
|
body << redef_vars.keys.map{|v|
|
||||||
|
"#{v}_#{i} = #{v};"
|
||||||
}.join("\n") +
|
}.join("\n") +
|
||||||
"\n" +
|
"\n" +
|
||||||
redef_vars.keys.map{|v|
|
passed_vars.map{|rpvars|
|
||||||
"#undef #{v}"
|
"#undef #{rpvars[0][1]}"
|
||||||
}.join("\n") +
|
}.join("\n") +
|
||||||
"\n}\n"
|
"\n}\n"
|
||||||
}
|
}
|
||||||
@ -893,7 +900,7 @@ class RubyVM
|
|||||||
commit insn.body
|
commit insn.body
|
||||||
commit '#line __CURRENT_LINE__ "__CURRENT_FILE__"'
|
commit '#line __CURRENT_LINE__ "__CURRENT_FILE__"'
|
||||||
else
|
else
|
||||||
insn.body
|
commit insn.body
|
||||||
end
|
end
|
||||||
make_footer(insn)
|
make_footer(insn)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user