summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-23 06:48:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-23 06:48:28 +0000
commit288d0808046f75860cafe3aa34c376d2eb616731 (patch)
treeb72e0a09ec579ef27719d21fa5a23eff85d178d4 /template
parent290f0b352c2f2194a5afa5985e9e073d3395a074 (diff)
downloadruby-288d0808046f75860cafe3aa34c376d2eb616731.tar.gz
ruby-288d0808046f75860cafe3aa34c376d2eb616731.tar.xz
ruby-288d0808046f75860cafe3aa34c376d2eb616731.zip
* compile.c (make_masgn_lhs, iseq_compile_each): fixed indent.
* compile.c (iseq_translate_threaded_code), vm_evalbody.ci (get_insns_address_table), template/vmtc.inc.tmpl (insns_address_table): constified. * vm_evalbody.ci (vm_eval), template/insns_info.inc.tmpl (insn_stack_increase, insn_ret_num): suppress warnings. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/insns_info.inc.tmpl6
-rw-r--r--template/vmtc.inc.tmpl2
2 files changed, 7 insertions, 1 deletions
diff --git a/template/insns_info.inc.tmpl b/template/insns_info.inc.tmpl
index 5ac92f82f..d7e745bca 100644
--- a/template/insns_info.inc.tmpl
+++ b/template/insns_info.inc.tmpl
@@ -23,10 +23,13 @@ static int insn_len_info[] = {
<%= operands_num_info %>
};
+#ifdef USE_INSN_RET_NUM
static int insn_stack_push_num_info[] = {
<%= stack_num_info %>
};
+#endif
+#ifdef USE_INSN_STACK_INCREASE
static int
insn_stack_increase(int depth, int insn, VALUE *opes)
{
@@ -37,6 +40,7 @@ insn_stack_increase(int depth, int insn, VALUE *opes)
}
return 0;
}
+#endif
/* some utilities */
@@ -70,8 +74,10 @@ insn_op_type(int insn, int pos)
}
}
+#ifdef USE_INSN_RET_NUM
static int
insn_ret_num(int insn)
{
return insn_stack_push_num_info[insn];
}
+#endif
diff --git a/template/vmtc.inc.tmpl b/template/vmtc.inc.tmpl
index 244f7767c..f73bbc632 100644
--- a/template/vmtc.inc.tmpl
+++ b/template/vmtc.inc.tmpl
@@ -12,7 +12,7 @@
or insns2vm.rb
*/
-static const void *insns_address_table[] = {
+static const void *const insns_address_table[] = {
<%= insns_table %>
};