mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Avoid warning in MSVC compilation.
This commit is contained in:
@@ -2378,9 +2378,9 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
#endif
|
||||
{
|
||||
if (i == -1) genop_1(s, OP_LOADI__1, cursp());
|
||||
else if (i < 0) genop_2(s, OP_LOADINEG, cursp(), -i);
|
||||
else if (i < 8) genop_1(s, OP_LOADI_0 + i, cursp());
|
||||
else if (i <= 0xffff) genop_2(s, OP_LOADI, cursp(), i);
|
||||
else if (i < 0) genop_2(s, OP_LOADINEG, cursp(), (uint16_t)-i);
|
||||
else if (i < 8) genop_1(s, OP_LOADI_0 + (uint8_t)i, cursp());
|
||||
else if (i <= 0xffff) genop_2(s, OP_LOADI, cursp(), (uint16_t)i);
|
||||
else {
|
||||
int off = new_lit(s, mrb_fixnum_value(i));
|
||||
genop_2(s, OP_LOADL, cursp(), off);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#define open _open
|
||||
#define close _close
|
||||
#define unlink _unlink
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ envadjust(mrb_state *mrb, mrb_value *oldbase, mrb_value *newbase, size_t oldsize
|
||||
/** def rec ; $deep =+ 1 ; if $deep > 1000 ; return 0 ; end ; rec ; end */
|
||||
|
||||
static void
|
||||
stack_extend_alloc(mrb_state *mrb, int room)
|
||||
stack_extend_alloc(mrb_state *mrb, mrb_int room)
|
||||
{
|
||||
mrb_value *oldbase = mrb->c->stbase;
|
||||
mrb_value *newstack;
|
||||
@@ -333,7 +333,7 @@ ecall(mrb_state *mrb)
|
||||
struct REnv *env;
|
||||
ptrdiff_t cioff;
|
||||
int ai = mrb_gc_arena_save(mrb);
|
||||
uint8_t i = --c->eidx;
|
||||
uint16_t i = --c->eidx;
|
||||
int nregs;
|
||||
|
||||
if (i<0) return;
|
||||
|
||||
Reference in New Issue
Block a user