зеркало из https://github.com/github/ruby.git
* insns.def, tool/instruction.rb: fixed types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7259c3f2e0
Коммит
d06f74d736
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Jun 30 16:46:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* insns.def, tool/instruction.rb: fixed types.
|
||||||
|
|
||||||
Tue Jun 30 11:08:49 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jun 30 11:08:49 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,
|
* include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,
|
||||||
|
|
25
insns.def
25
insns.def
|
@ -113,7 +113,7 @@ getdynamic
|
||||||
()
|
()
|
||||||
(VALUE val)
|
(VALUE val)
|
||||||
{
|
{
|
||||||
int i;
|
rb_num_t i;
|
||||||
VALUE *dfp2 = GET_DFP();
|
VALUE *dfp2 = GET_DFP();
|
||||||
for (i = 0; i < level; i++) {
|
for (i = 0; i < level; i++) {
|
||||||
dfp2 = GET_PREV_DFP(dfp2);
|
dfp2 = GET_PREV_DFP(dfp2);
|
||||||
|
@ -134,7 +134,7 @@ setdynamic
|
||||||
(VALUE val)
|
(VALUE val)
|
||||||
()
|
()
|
||||||
{
|
{
|
||||||
int i;
|
rb_num_t i;
|
||||||
VALUE *dfp2 = GET_DFP();
|
VALUE *dfp2 = GET_DFP();
|
||||||
for (i = 0; i < level; i++) {
|
for (i = 0; i < level; i++) {
|
||||||
dfp2 = GET_PREV_DFP(dfp2);
|
dfp2 = GET_PREV_DFP(dfp2);
|
||||||
|
@ -387,10 +387,10 @@ concatstrings
|
||||||
(...)
|
(...)
|
||||||
(VALUE val) // inc += 1 - num;
|
(VALUE val) // inc += 1 - num;
|
||||||
{
|
{
|
||||||
int i;
|
rb_num_t i = num;
|
||||||
|
|
||||||
val = rb_str_new(0, 0);
|
val = rb_str_new(0, 0);
|
||||||
for (i = num - 1; i >= 0; i--) {
|
while (i-- > 0) {
|
||||||
const VALUE v = TOPN(i);
|
const VALUE v = TOPN(i);
|
||||||
rb_str_append(val, v);
|
rb_str_append(val, v);
|
||||||
}
|
}
|
||||||
|
@ -424,13 +424,13 @@ toregexp
|
||||||
(VALUE val) // inc += 1 - cnt;
|
(VALUE val) // inc += 1 - cnt;
|
||||||
{
|
{
|
||||||
VALUE rb_reg_new_ary(VALUE ary, int options);
|
VALUE rb_reg_new_ary(VALUE ary, int options);
|
||||||
int i;
|
rb_num_t i;
|
||||||
const VALUE ary = rb_ary_tmp_new(cnt);
|
const VALUE ary = rb_ary_tmp_new(cnt);
|
||||||
for (i = 0; i < cnt; i++) {
|
for (i = 0; i < cnt; i++) {
|
||||||
rb_ary_store(ary, cnt-i-1, TOPN(i));
|
rb_ary_store(ary, cnt-i-1, TOPN(i));
|
||||||
}
|
}
|
||||||
POPN(cnt);
|
POPN(cnt);
|
||||||
val = rb_reg_new_ary(ary, opt);
|
val = rb_reg_new_ary(ary, (int)opt);
|
||||||
rb_ary_clear(ary);
|
rb_ary_clear(ary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ expandarray
|
||||||
(..., VALUE ary)
|
(..., VALUE ary)
|
||||||
(...) // inc += num - 1 + (flag & 1 ? 1 : 0);
|
(...) // inc += num - 1 + (flag & 1 ? 1 : 0);
|
||||||
{
|
{
|
||||||
vm_expandarray(GET_CFP(), ary, num, flag);
|
vm_expandarray(GET_CFP(), ary, num, (int)flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -605,7 +605,7 @@ newrange
|
||||||
(VALUE low, VALUE high)
|
(VALUE low, VALUE high)
|
||||||
(VALUE val)
|
(VALUE val)
|
||||||
{
|
{
|
||||||
val = rb_range_new(low, high, flag);
|
val = rb_range_new(low, high, (int)flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
|
@ -652,7 +652,7 @@ dupn
|
||||||
(...)
|
(...)
|
||||||
(...) // inc += n;
|
(...) // inc += n;
|
||||||
{
|
{
|
||||||
int i;
|
rb_num_t i;
|
||||||
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
GET_SP()[i] = sp[i];
|
GET_SP()[i] = sp[i];
|
||||||
|
@ -851,7 +851,7 @@ trace
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
{
|
{
|
||||||
rb_event_flag_t flag = nf;
|
rb_event_flag_t flag = (rb_event_flag_t)nf;
|
||||||
|
|
||||||
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* TODO: id, klass */);
|
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* TODO: id, klass */);
|
||||||
}
|
}
|
||||||
|
@ -982,7 +982,7 @@ send
|
||||||
NODE *mn;
|
NODE *mn;
|
||||||
VALUE recv, klass;
|
VALUE recv, klass;
|
||||||
rb_block_t *blockptr = 0;
|
rb_block_t *blockptr = 0;
|
||||||
rb_num_t num = caller_setup_args(th, GET_CFP(), op_flag, op_argc,
|
rb_num_t num = caller_setup_args(th, GET_CFP(), op_flag, (int)op_argc,
|
||||||
(rb_iseq_t *)blockiseq, &blockptr);
|
(rb_iseq_t *)blockiseq, &blockptr);
|
||||||
rb_num_t flag = op_flag;
|
rb_num_t flag = op_flag;
|
||||||
ID id = op_id;
|
ID id = op_id;
|
||||||
|
@ -1014,7 +1014,8 @@ invokesuper
|
||||||
(VALUE val) // inc += - (int)(op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0));
|
(VALUE val) // inc += - (int)(op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0));
|
||||||
{
|
{
|
||||||
rb_block_t *blockptr = !(op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? GET_BLOCK_PTR() : 0;
|
rb_block_t *blockptr = !(op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? GET_BLOCK_PTR() : 0;
|
||||||
int num = caller_setup_args(th, GET_CFP(), op_flag, op_argc, blockiseq, &blockptr);
|
rb_num_t num = caller_setup_args(th, GET_CFP(), op_flag,
|
||||||
|
(int)op_argc, blockiseq, &blockptr);
|
||||||
VALUE recv, klass;
|
VALUE recv, klass;
|
||||||
NODE *mn;
|
NODE *mn;
|
||||||
ID id;
|
ID id;
|
||||||
|
|
|
@ -63,7 +63,7 @@ class RubyVM
|
||||||
rets.any?{|t, v| v == '...'})
|
rets.any?{|t, v| v == '...'})
|
||||||
# user definision
|
# user definision
|
||||||
raise "no sp increase definition" if @sp_inc.nil?
|
raise "no sp increase definition" if @sp_inc.nil?
|
||||||
ret = "int inc = 0;\n"
|
ret = "rb_num_t inc = 0;\n"
|
||||||
|
|
||||||
@opes.each_with_index{|(t, v), i|
|
@opes.each_with_index{|(t, v), i|
|
||||||
if t == 'rb_num_t' && ((re = /\b#{v}\b/n) =~ @sp_inc ||
|
if t == 'rb_num_t' && ((re = /\b#{v}\b/n) =~ @sp_inc ||
|
||||||
|
|
Загрузка…
Ссылка в новой задаче