Commit 2b6be163 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #61 from pbhogan/fix-warnings

Fix various warnings
parents fdd4920f f9647592
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
int mrb_dump_irep(mrb_state*,int,FILE*); int mrb_dump_irep(mrb_state*,int,FILE*);
int mrb_load_irep(mrb_state*,FILE*); int mrb_load_irep(mrb_state*,FILE*);
int mrb_load_irep_offset(mrb_state*,FILE*,long); int mrb_load_irep_offset(mrb_state*,FILE*,long);
int mrb_read_irep(mrb_state*,char*); int mrb_read_irep(mrb_state*,const char*);
int mrb_bdump_irep(mrb_state *mrb, int n, FILE *f,const char *initname); int mrb_bdump_irep(mrb_state *mrb, int n, FILE *f,const char *initname);
......
...@@ -108,7 +108,6 @@ static uint8_t __m[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; ...@@ -108,7 +108,6 @@ static uint8_t __m[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
while( new_n_buckets < limit ) new_n_buckets *= 2; \ while( new_n_buckets < limit ) new_n_buckets *= 2; \
} \ } \
uint8_t *old_e_flags = h->e_flags; \ uint8_t *old_e_flags = h->e_flags; \
uint8_t *old_d_flags = h->d_flags; \
khkey_t *old_keys = h->keys; \ khkey_t *old_keys = h->keys; \
khval_t *old_vals = h->vals; \ khval_t *old_vals = h->vals; \
khint_t old_n_buckets = h->n_buckets; \ khint_t old_n_buckets = h->n_buckets; \
...@@ -168,7 +167,7 @@ static uint8_t __m[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; ...@@ -168,7 +167,7 @@ static uint8_t __m[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
#define kh_destroy(name, h) kh_destroy_##name(h) #define kh_destroy(name, h) kh_destroy_##name(h)
#define kh_clear(name, h) kh_clear_##name(h) #define kh_clear(name, h) kh_clear_##name(h)
#define kh_resize(name, h, s) kh_resize_##name(h, s) #define kh_resize(name, h, s) kh_resize_##name(h, s)
#define kh_put(name, h, k, r) kh_put_##name(h, k) #define kh_put(name, h, k) kh_put_##name(h, k)
#define kh_get(name, h, k) kh_get_##name(h, k) #define kh_get(name, h, k) kh_get_##name(h, k)
#define kh_del(name, h, k) kh_del_##name(h, k) #define kh_del(name, h, k) kh_del_##name(h, k)
#define kh_debug(name, h) kh_debug_##name(h) #define kh_debug(name, h) kh_debug_##name(h)
......
...@@ -906,6 +906,7 @@ mrb_ary_sort_bang(mrb_value ary) ...@@ -906,6 +906,7 @@ mrb_ary_sort_bang(mrb_value ary)
} }
#endif #endif
#if 0
mrb_value mrb_value
mrb_ary_dup(mrb_state *mrb, mrb_value self) mrb_ary_dup(mrb_state *mrb, mrb_value self)
{ {
...@@ -928,7 +929,6 @@ mrb_ary_dup(mrb_state *mrb, mrb_value self) ...@@ -928,7 +929,6 @@ mrb_ary_dup(mrb_state *mrb, mrb_value self)
return ary; return ary;
} }
#if 0
/* /*
* call-seq: * call-seq:
* ary.sort -> new_ary * ary.sort -> new_ary
......
...@@ -292,10 +292,9 @@ mrb_define_method_raw(mrb_state *mrb, struct RClass *c, mrb_sym mid, struct RPro ...@@ -292,10 +292,9 @@ mrb_define_method_raw(mrb_state *mrb, struct RClass *c, mrb_sym mid, struct RPro
{ {
khash_t(mt) *h = c->mt; khash_t(mt) *h = c->mt;
khiter_t k; khiter_t k;
int ret;
if (!h) h = c->mt = kh_init(mt, mrb); if (!h) h = c->mt = kh_init(mt, mrb);
k = kh_put(mt, h, mid, &ret); k = kh_put(mt, h, mid);
kh_value(h, k) = p; kh_value(h, k) = p;
} }
...@@ -320,10 +319,9 @@ mrb_define_method_vm(mrb_state *mrb, struct RClass *c, mrb_sym name, mrb_value b ...@@ -320,10 +319,9 @@ mrb_define_method_vm(mrb_state *mrb, struct RClass *c, mrb_sym name, mrb_value b
{ {
khash_t(mt) *h = c->mt; khash_t(mt) *h = c->mt;
khiter_t k; khiter_t k;
int ret;
if (!h) h = c->mt = kh_init(mt, mrb); if (!h) h = c->mt = kh_init(mt, mrb);
k = kh_put(mt, h, name, &ret); k = kh_put(mt, h, name);
kh_value(h, k) = mrb_proc_ptr(body); kh_value(h, k) = mrb_proc_ptr(body);
} }
...@@ -945,9 +943,13 @@ mrb_mod_to_s(mrb_state *mrb, mrb_value klass) ...@@ -945,9 +943,13 @@ mrb_mod_to_s(mrb_state *mrb, mrb_value klass)
case MRB_TT_CLASS: case MRB_TT_CLASS:
snprintf(buf, 256, "#<Class:%p>", c); snprintf(buf, 256, "#<Class:%p>", c);
break; break;
case MRB_TT_MODULE: case MRB_TT_MODULE:
snprintf(buf, 256, "#<Module:%p>", c); snprintf(buf, 256, "#<Module:%p>", c);
break; break;
default:
break;
} }
return mrb_str_dup(mrb, mrb_str_new_cstr(mrb, buf)); return mrb_str_dup(mrb, mrb_str_new_cstr(mrb, buf));
} }
......
...@@ -31,7 +31,7 @@ mrb_data_object_alloc(mrb_state *mrb, struct RClass *klass, void *ptr, const str ...@@ -31,7 +31,7 @@ mrb_data_object_alloc(mrb_state *mrb, struct RClass *klass, void *ptr, const str
data = mrb_obj_alloc(mrb, MRB_TT_DATA, klass); data = mrb_obj_alloc(mrb, MRB_TT_DATA, klass);
data->data = ptr; data->data = ptr;
data->type = type; data->type = (struct mrb_data_type *) type;
return data; return data;
} }
......
...@@ -347,6 +347,7 @@ gc_mark_children(mrb_state *mrb, struct RBasic *obj) ...@@ -347,6 +347,7 @@ gc_mark_children(mrb_state *mrb, struct RBasic *obj)
case MRB_TT_HASH: case MRB_TT_HASH:
mrb_gc_mark_ht(mrb, (struct RClass*)obj); mrb_gc_mark_ht(mrb, (struct RClass*)obj);
break; break;
case MRB_TT_STRING: case MRB_TT_STRING:
{ {
struct RString *s = (struct RString*)obj; struct RString *s = (struct RString*)obj;
...@@ -357,6 +358,7 @@ gc_mark_children(mrb_state *mrb, struct RBasic *obj) ...@@ -357,6 +358,7 @@ gc_mark_children(mrb_state *mrb, struct RBasic *obj)
} }
} }
break; break;
case MRB_TT_RANGE: case MRB_TT_RANGE:
{ {
struct RRange *r = (struct RRange*)obj; struct RRange *r = (struct RRange*)obj;
...@@ -365,9 +367,8 @@ gc_mark_children(mrb_state *mrb, struct RBasic *obj) ...@@ -365,9 +367,8 @@ gc_mark_children(mrb_state *mrb, struct RBasic *obj)
mrb_gc_mark_value(mrb, r->edges->end); mrb_gc_mark_value(mrb, r->edges->end);
} }
break; break;
case MRB_TT_REGEX:
case MRB_TT_STRUCT: default:
case MRB_TT_EXCEPTION:
break; break;
} }
} }
...@@ -397,12 +398,14 @@ obj_free(mrb_state *mrb, struct RBasic *obj) ...@@ -397,12 +398,14 @@ obj_free(mrb_state *mrb, struct RBasic *obj)
case MRB_TT_OBJECT: case MRB_TT_OBJECT:
mrb_gc_free_iv(mrb, (struct RObject*)obj); mrb_gc_free_iv(mrb, (struct RObject*)obj);
break; break;
case MRB_TT_CLASS: case MRB_TT_CLASS:
case MRB_TT_MODULE: case MRB_TT_MODULE:
case MRB_TT_SCLASS: case MRB_TT_SCLASS:
mrb_gc_free_mt(mrb, (struct RClass*)obj); mrb_gc_free_mt(mrb, (struct RClass*)obj);
mrb_gc_free_iv(mrb, (struct RObject*)obj); mrb_gc_free_iv(mrb, (struct RObject*)obj);
break; break;
case MRB_TT_ENV: case MRB_TT_ENV:
{ {
struct REnv *e = (struct REnv *)obj; struct REnv *e = (struct REnv *)obj;
...@@ -413,26 +416,24 @@ obj_free(mrb_state *mrb, struct RBasic *obj) ...@@ -413,26 +416,24 @@ obj_free(mrb_state *mrb, struct RBasic *obj)
} }
} }
break; break;
case MRB_TT_PROC:
case MRB_TT_ICLASS:
break;
case MRB_TT_ARRAY: case MRB_TT_ARRAY:
mrb_free(mrb, ((struct RArray*)obj)->buf); mrb_free(mrb, ((struct RArray*)obj)->buf);
break; break;
case MRB_TT_HASH: case MRB_TT_HASH:
mrb_gc_free_ht(mrb, (struct RClass*)obj); mrb_gc_free_ht(mrb, (struct RClass*)obj);
break; break;
case MRB_TT_STRING: case MRB_TT_STRING:
if (!(obj->flags & MRB_STR_SHARED)) if (!(obj->flags & MRB_STR_SHARED))
mrb_free(mrb, ((struct RString*)obj)->buf); mrb_free(mrb, ((struct RString*)obj)->buf);
break; break;
case MRB_TT_RANGE: case MRB_TT_RANGE:
mrb_free(mrb, ((struct RRange*)obj)->edges); mrb_free(mrb, ((struct RRange*)obj)->edges);
break; break;
case MRB_TT_REGEX:
case MRB_TT_STRUCT:
case MRB_TT_EXCEPTION:
break;
case MRB_TT_DATA: case MRB_TT_DATA:
{ {
struct RData *d = (struct RData *)obj; struct RData *d = (struct RData *)obj;
...@@ -441,6 +442,9 @@ obj_free(mrb_state *mrb, struct RBasic *obj) ...@@ -441,6 +442,9 @@ obj_free(mrb_state *mrb, struct RBasic *obj)
} }
} }
break; break;
default:
break;
} }
obj->tt = MRB_TT_FREE; obj->tt = MRB_TT_FREE;
} }
...@@ -529,16 +533,12 @@ gc_gray_mark(mrb_state *mrb, struct RBasic *obj) ...@@ -529,16 +533,12 @@ gc_gray_mark(mrb_state *mrb, struct RBasic *obj)
children += mrb_gc_mark_ht_size(mrb, (struct RClass*)obj); children += mrb_gc_mark_ht_size(mrb, (struct RClass*)obj);
break; break;
case MRB_TT_STRING:
break;
case MRB_TT_PROC: case MRB_TT_PROC:
case MRB_TT_RANGE: case MRB_TT_RANGE:
children+=2; children+=2;
break; break;
case MRB_TT_REGEX: default:
case MRB_TT_STRUCT:
case MRB_TT_EXCEPTION:
break; break;
} }
return children; return children;
......
...@@ -164,7 +164,6 @@ mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val) /* mr ...@@ -164,7 +164,6 @@ mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val) /* mr
{ {
khash_t(ht) *h; khash_t(ht) *h;
khiter_t k; khiter_t k;
int r;
mrb_hash_modify(mrb, hash); mrb_hash_modify(mrb, hash);
h = RHASH_H_TBL(hash); h = RHASH_H_TBL(hash);
...@@ -172,7 +171,7 @@ mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val) /* mr ...@@ -172,7 +171,7 @@ mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val) /* mr
k = kh_get(ht, h, key); k = kh_get(ht, h, key);
if (k == kh_end(h)) { if (k == kh_end(h)) {
/* expand */ /* expand */
k = kh_put(ht, h, KEY(key), &r); k = kh_put(ht, h, KEY(key));
} }
kh_value(h, k) = val; kh_value(h, k) = val;
...@@ -220,7 +219,6 @@ mrb_hash_dup(mrb_state *mrb, mrb_value hash) ...@@ -220,7 +219,6 @@ mrb_hash_dup(mrb_state *mrb, mrb_value hash)
struct RHash* ret; struct RHash* ret;
khash_t(ht) *h, *ret_h; khash_t(ht) *h, *ret_h;
khiter_t k, ret_k; khiter_t k, ret_k;
int r;
ret = mrb_obj_alloc(mrb, MRB_TT_HASH, mrb->hash_class); ret = mrb_obj_alloc(mrb, MRB_TT_HASH, mrb->hash_class);
ret->ht = kh_init(ht, mrb); ret->ht = kh_init(ht, mrb);
...@@ -231,7 +229,7 @@ mrb_hash_dup(mrb_state *mrb, mrb_value hash) ...@@ -231,7 +229,7 @@ mrb_hash_dup(mrb_state *mrb, mrb_value hash)
for (k = kh_begin(h); k != kh_end(h); k++) { for (k = kh_begin(h); k != kh_end(h); k++) {
if (kh_exist(h,k)) { if (kh_exist(h,k)) {
ret_k = kh_put(ht, ret_h, KEY(kh_key(h,k)), &r); ret_k = kh_put(ht, ret_h, KEY(kh_key(h,k)));
kh_val(ret_h, ret_k) = kh_val(h,k); kh_val(ret_h, ret_k) = kh_val(h,k);
} }
} }
...@@ -616,7 +614,6 @@ mrb_hash_shift(mrb_state *mrb, mrb_value hash) ...@@ -616,7 +614,6 @@ mrb_hash_shift(mrb_state *mrb, mrb_value hash)
khiter_t k; khiter_t k;
mrb_value delKey, delVal; mrb_value delKey, delVal;
mrb_value result; mrb_value result;
int r;
mrb_hash_modify(mrb, hash); mrb_hash_modify(mrb, hash);
if (h) { if (h) {
...@@ -628,7 +625,7 @@ mrb_hash_shift(mrb_state *mrb, mrb_value hash) ...@@ -628,7 +625,7 @@ mrb_hash_shift(mrb_state *mrb, mrb_value hash)
delVal = mrb_hash_delete_key(mrb, hash, delKey); delVal = mrb_hash_delete_key(mrb, hash, delKey);
result = mrb_hash_new(mrb, 1); result = mrb_hash_new(mrb, 1);
k = kh_put(ht, RHASH_H_TBL(result), KEY(delKey), &r); k = kh_put(ht, RHASH_H_TBL(result), KEY(delKey));
kh_value(RHASH_H_TBL(result), k) = delVal; kh_value(RHASH_H_TBL(result), k) = delVal;
return result; return result;
} }
......
...@@ -397,6 +397,10 @@ init_copy(mrb_state *mrb, mrb_value dest, mrb_value obj) ...@@ -397,6 +397,10 @@ init_copy(mrb_state *mrb, mrb_value dest, mrb_value obj)
if (ROBJECT(obj)->iv) { if (ROBJECT(obj)->iv) {
ROBJECT(dest)->iv = ROBJECT(obj)->iv; ROBJECT(dest)->iv = ROBJECT(obj)->iv;
} }
break;
default:
break;
} }
mrb_funcall(mrb, dest, "initialize_copy", 1, obj); mrb_funcall(mrb, dest, "initialize_copy", 1, obj);
} }
...@@ -628,9 +632,7 @@ mrb_obj_init_copy(mrb_state *mrb, mrb_value self) ...@@ -628,9 +632,7 @@ mrb_obj_init_copy(mrb_state *mrb, mrb_value self)
mrb_value mrb_value
mrb_obj_instance_eval(mrb_state *mrb, mrb_value self) mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
{ {
mrb_value *argv; mrb_value b;
int argc;
mrb_value b, klass;
mrb_get_args(mrb, "&", &b); mrb_get_args(mrb, "&", &b);
return mrb_yield_with_self(mrb, b, 0, 0, self); return mrb_yield_with_self(mrb, b, 0, 0, self);
......
...@@ -495,7 +495,7 @@ error_exit: ...@@ -495,7 +495,7 @@ error_exit:
} }
int int
mrb_read_irep(mrb_state *mrb, char *bin) mrb_read_irep(mrb_state *mrb, const char *bin)
{ {
int ret = MRB_DUMP_OK, i, n, nirep, sirep; int ret = MRB_DUMP_OK, i, n, nirep, sirep;
uint32_t len; uint32_t len;
......
...@@ -4658,7 +4658,7 @@ parser_new(mrb_state *mrb) ...@@ -4658,7 +4658,7 @@ parser_new(mrb_state *mrb)
p->cmd_start = TRUE; p->cmd_start = TRUE;
p->in_def = p->in_single = FALSE; p->in_def = p->in_single = FALSE;
p->capture_errors = NULL; p->capture_errors = 0;
p->lineno = 1; p->lineno = 1;
#if defined(PARSER_TEST) || defined(PARSER_DEBUG) #if defined(PARSER_TEST) || defined(PARSER_DEBUG)
......
...@@ -30,7 +30,7 @@ mrb_closure_new(mrb_state *mrb, mrb_irep *irep) ...@@ -30,7 +30,7 @@ mrb_closure_new(mrb_state *mrb, mrb_irep *irep)
struct REnv *e; struct REnv *e;
if (!mrb->ci->env) { if (!mrb->ci->env) {
e = mrb_obj_alloc(mrb, MRB_TT_ENV, mrb->ci->proc->env); e = mrb_obj_alloc(mrb, MRB_TT_ENV, (struct RClass *) mrb->ci->proc->env);
e->flags= (unsigned int)irep->nlocals; e->flags= (unsigned int)irep->nlocals;
e->mid = mrb->ci->mid; e->mid = mrb->ci->mid;
e->cioff = mrb->ci - mrb->cibase; e->cioff = mrb->ci - mrb->cibase;
......
...@@ -148,10 +148,6 @@ mrb_str_resize(mrb_state *mrb, mrb_value str, size_t len) ...@@ -148,10 +148,6 @@ mrb_str_resize(mrb_state *mrb, mrb_value str, size_t len)
{ {
size_t slen; size_t slen;
if (len < 0) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "negative string size (or size too big)");
}
mrb_str_modify(mrb, str); mrb_str_modify(mrb, str);
slen = RSTRING_LEN(str); slen = RSTRING_LEN(str);
if (len != slen) { if (len != slen) {
...@@ -509,10 +505,6 @@ str_new(mrb_state *mrb, enum mrb_vtype ttype, const char *p, size_t len) ...@@ -509,10 +505,6 @@ str_new(mrb_state *mrb, enum mrb_vtype ttype, const char *p, size_t len)
{ {
mrb_value str; mrb_value str;
if (len < 0) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "negative string size (or size too big)");
}
//str = str_alloc(mrb); //str = str_alloc(mrb);
str = mrb_str_buf_new(mrb, len); str = mrb_str_buf_new(mrb, len);
#ifdef INCLUDE_ENCODING #ifdef INCLUDE_ENCODING
...@@ -600,9 +592,6 @@ mrb_value ...@@ -600,9 +592,6 @@ mrb_value
mrb_str_buf_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len) mrb_str_buf_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len)
{ {
if (len == 0) return str; if (len == 0) return str;
if (len < 0) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "negative string size (or size too big)");
}
return str_buf_cat(mrb, str, ptr, len); return str_buf_cat(mrb, str, ptr, len);
} }
......
...@@ -32,7 +32,6 @@ mrb_intern(mrb_state *mrb, const char *name) ...@@ -32,7 +32,6 @@ mrb_intern(mrb_state *mrb, const char *name)
khash_t(n2s) *h = mrb->name2sym; khash_t(n2s) *h = mrb->name2sym;
khash_t(s2n) *rh = mrb->sym2name; khash_t(s2n) *rh = mrb->sym2name;
khiter_t k; khiter_t k;
int r;
size_t len; size_t len;
char *p; char *p;
mrb_sym sym; mrb_sym sym;
...@@ -46,10 +45,10 @@ mrb_intern(mrb_state *mrb, const char *name) ...@@ -46,10 +45,10 @@ mrb_intern(mrb_state *mrb, const char *name)
p = mrb_malloc(mrb, len+1); p = mrb_malloc(mrb, len+1);
memcpy(p, name, len); memcpy(p, name, len);
p[len] = 0; p[len] = 0;
k = kh_put(n2s, h, p, &r); k = kh_put(n2s, h, p);
kh_value(h, k) = sym; kh_value(h, k) = sym;
k = kh_put(s2n, rh, sym, &r); k = kh_put(s2n, rh, sym);
kh_value(rh, k) = p; kh_value(rh, k) = p;
return sym; return sym;
......
...@@ -61,7 +61,6 @@ mrb_gc_mark_iv(mrb_state *mrb, struct RObject *obj) ...@@ -61,7 +61,6 @@ mrb_gc_mark_iv(mrb_state *mrb, struct RObject *obj)
size_t size_t
mrb_gc_mark_iv_size(mrb_state *mrb, struct RObject *obj) mrb_gc_mark_iv_size(mrb_state *mrb, struct RObject *obj)
{ {
khiter_t k;
struct kh_iv *h = obj->iv; struct kh_iv *h = obj->iv;
if (!h) return 0; if (!h) return 0;
...@@ -115,9 +114,8 @@ static void ...@@ -115,9 +114,8 @@ static void
ivset(mrb_state *mrb, struct kh_iv *h, mrb_sym sym, mrb_value v) ivset(mrb_state *mrb, struct kh_iv *h, mrb_sym sym, mrb_value v)
{ {
khiter_t k; khiter_t k;
int r;
k = kh_put(iv, h, sym, &r); k = kh_put(iv, h, sym);
kh_value(h, k) = v; kh_value(h, k) = v;
} }
...@@ -180,14 +178,13 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v) ...@@ -180,14 +178,13 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
struct RClass *c = mrb->ci->target_class; struct RClass *c = mrb->ci->target_class;
khash_t(iv) *h; khash_t(iv) *h;
khiter_t k; khiter_t k;
int r;
while (c) { while (c) {
if (c->iv) { if (c->iv) {
h = c->iv; h = c->iv;
k = kh_get(iv, h, sym); k = kh_get(iv, h, sym);
if (k != kh_end(h)) { if (k != kh_end(h)) {
k = kh_put(iv, h, sym, &r); k = kh_put(iv, h, sym);
kh_value(h, k) = v; kh_value(h, k) = v;
} }
} }
...@@ -195,7 +192,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v) ...@@ -195,7 +192,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
} }
c = mrb->ci->target_class; c = mrb->ci->target_class;
h = c->iv = kh_init(iv, mrb); h = c->iv = kh_init(iv, mrb);
k = kh_put(iv, h, sym, &r); k = kh_put(iv, h, sym);
kh_value(h, k) = v; kh_value(h, k) = v;
} }
......
...@@ -877,9 +877,11 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) ...@@ -877,9 +877,11 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
int o = (ax>>13)&0x1f; int o = (ax>>13)&0x1f;
int r = (ax>>12)&0x1; int r = (ax>>12)&0x1;
int m2 = (ax>>7)&0x1f; int m2 = (ax>>7)&0x1f;
/* unused
int k = (ax>>2)&0x1f; int k = (ax>>2)&0x1f;
int kd = (ax>>1)&0x1; int kd = (ax>>1)&0x1;
int b = (ax>>0)& 0x1; int b = (ax>>0)& 0x1;
*/
int argc = mrb->ci->argc; int argc = mrb->ci->argc;
mrb_value *argv = regs+1; mrb_value *argv = regs+1;
int len = m1 + o + r + m2; int len = m1 + o + r + m2;
...@@ -953,7 +955,6 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) ...@@ -953,7 +955,6 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
if (mrb->exc) { if (mrb->exc) {
mrb_callinfo *ci; mrb_callinfo *ci;
int ridx;
L_RAISE: L_RAISE:
ci = mrb->ci; ci = mrb->ci;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment