* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fcab7ebb71
commit
aa071a3b26
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
Thu Aug 23 15:48:26 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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.
|
||||
|
||||
Thu Aug 23 13:19:43 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (f_norm_arg): check also nested arguments. [ruby-dev:31502]
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "ruby/ruby.h"
|
||||
#include "ruby/node.h"
|
||||
|
||||
#define USE_INSN_STACK_INCREASE 1
|
||||
#include "vm_core.h"
|
||||
#include "compile.h"
|
||||
#include "insns.inc"
|
||||
@ -226,10 +227,10 @@ iseq_translate_threaded_code(rb_iseq_t *iseq)
|
||||
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
|
||||
|
||||
#if OPT_DIRECT_THREADED_CODE
|
||||
void **table = (void **)vm_eval(0);
|
||||
const void *const *table = (const void **)vm_eval(0);
|
||||
#else
|
||||
extern void **get_insns_address_table();
|
||||
void **table = get_insns_address_table();
|
||||
extern const void *const *get_insns_address_table();
|
||||
const void *const *table = get_insns_address_table();
|
||||
#endif
|
||||
int i;
|
||||
|
||||
|
@ -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
|
||||
|
@ -12,7 +12,7 @@
|
||||
or insns2vm.rb
|
||||
*/
|
||||
|
||||
static const void *insns_address_table[] = {
|
||||
static const void *const insns_address_table[] = {
|
||||
<%= insns_table %>
|
||||
};
|
||||
|
||||
|
@ -102,7 +102,7 @@ vm_eval(rb_thread_t *th, VALUE initial)
|
||||
|
||||
/* unreachable */
|
||||
rb_bug("vm_eval: unreachable");
|
||||
return Qundef;
|
||||
goto first;
|
||||
}
|
||||
|
||||
#else
|
||||
@ -110,10 +110,10 @@ vm_eval(rb_thread_t *th, VALUE initial)
|
||||
#include "vm.inc"
|
||||
#include "vmtc.inc"
|
||||
|
||||
void **
|
||||
const void *const *
|
||||
get_insns_address_table()
|
||||
{
|
||||
return (void **)insns_address_table;
|
||||
return insns_address_table;
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
Loading…
x
Reference in New Issue
Block a user