diff options
| author | kimu_shu <[email protected]> | 2013-05-26 09:43:30 +0900 |
|---|---|---|
| committer | kimu_shu <[email protected]> | 2013-05-26 10:09:17 +0900 |
| commit | e720782f815b809a692818851582be019afe52a9 (patch) | |
| tree | a3c25239fb5afe2a33708e38d185a142f1c543a3 /src/codegen.c | |
| parent | d78f23d28b4706e58622493de60e17818b491fde (diff) | |
| download | mruby-e720782f815b809a692818851582be019afe52a9.tar.gz mruby-e720782f815b809a692818851582be019afe52a9.zip | |
Add MRB_WORD_BOXING mode (represent mrb_value as a word)
Diffstat (limited to 'src/codegen.c')
| -rw-r--r-- | src/codegen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen.c b/src/codegen.c index 581d13280..cfbbe7286 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -1901,7 +1901,7 @@ codegen(codegen_scope *s, node *tree, int val) i = readint_mrb_int(s, p, base, FALSE, &overflow); if (overflow) { double f = readint_float(s, p, base); - int off = new_lit(s, mrb_float_value(f)); + int off = new_lit(s, mrb_float_value(s->mrb, f)); genop(s, MKOP_ABx(OP_LOADL, cursp(), off)); } @@ -1923,7 +1923,7 @@ codegen(codegen_scope *s, node *tree, int val) if (val) { char *p = (char*)tree; mrb_float f = str_to_mrb_float(p); - int off = new_lit(s, mrb_float_value(f)); + int off = new_lit(s, mrb_float_value(s->mrb, f)); genop(s, MKOP_ABx(OP_LOADL, cursp(), off)); push(); @@ -1939,7 +1939,7 @@ codegen(codegen_scope *s, node *tree, int val) { char *p = (char*)tree; mrb_float f = str_to_mrb_float(p); - int off = new_lit(s, mrb_float_value(-f)); + int off = new_lit(s, mrb_float_value(s->mrb, -f)); genop(s, MKOP_ABx(OP_LOADL, cursp(), off)); push(); @@ -1957,7 +1957,7 @@ codegen(codegen_scope *s, node *tree, int val) i = readint_mrb_int(s, p, base, TRUE, &overflow); if (overflow) { double f = readint_float(s, p, base); - int off = new_lit(s, mrb_float_value(-f)); + int off = new_lit(s, mrb_float_value(s->mrb, -f)); genop(s, MKOP_ABx(OP_LOADL, cursp(), off)); } |
