diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-29 08:34:56 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:22 +0900 |
| commit | 3d8a38bea4de5ca3a65ec9bce9359b9c62326f9f (patch) | |
| tree | 3f8ebdcc96896f7cdde31064026ffa588c77776d /include | |
| parent | 639946a006c29f648551512af8aa0bb0cd969412 (diff) | |
| download | mruby-3d8a38bea4de5ca3a65ec9bce9359b9c62326f9f.tar.gz mruby-3d8a38bea4de5ca3a65ec9bce9359b9c62326f9f.zip | |
You don't need to keep index in local variables info in `irep`.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mrbconf.h | 7 | ||||
| -rw-r--r-- | include/mruby/boxing_word.h | 3 | ||||
| -rw-r--r-- | include/mruby/irep.h | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h index 81ab36977..1cf72ece9 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -31,6 +31,13 @@ /* exclude floating point numbers */ //#define MRB_WITHOUT_FLOAT +/* stop inlining floating point numbers in mrb_value (effective only with MRB_WORD_BOXING)*/ +/* floating numbers are rounded to fit in 30 bits (float) and 62 bits respectively, */ +/* by inlining. If you need full precision of floating numbers on the platform, */ +/* you have to define this option. when mrb_int is 32bit and mrb_float is double, */ +/* this option is set automatically. */ +// #define MRB_NO_FLOAT_INLINE + /* add -DMRB_NO_METHOD_CACHE to disable method cache to save memory */ //#define MRB_NO_METHOD_CACHE /* size of the method cache (need to be the power of 2) */ diff --git a/include/mruby/boxing_word.h b/include/mruby/boxing_word.h index 56202a420..6eae789fa 100644 --- a/include/mruby/boxing_word.h +++ b/include/mruby/boxing_word.h @@ -11,7 +11,7 @@ #error MRB_INT64 cannot be used with MRB_WORD_BOXING in 32-bit mode. #endif -#ifndef MRB_WITHOUT_FLOAT +#if !defined(MRB_WITHOUT_FLOAT) || defined(MRB_NO_FLOAT_INLINE) struct RFloat { MRB_OBJECT_HEADER; mrb_float f; @@ -64,6 +64,7 @@ enum mrb_special_consts { * undef : ...0001 0100 * fixnum: ...IIII III1 * symbol: ...SSSS SS10 (use only upper 32-bit as symbol value on 64-bit CPU) + * symbol: ...SSSS SS10 (use only upper 32-bit as symbol value on 64-bit CPU) * object: ...PPPP P000 (any bits are 1) */ typedef union mrb_value { diff --git a/include/mruby/irep.h b/include/mruby/irep.h index 5d860273f..0a5b3f1a3 100644 --- a/include/mruby/irep.h +++ b/include/mruby/irep.h @@ -39,11 +39,6 @@ typedef struct mrb_pool_value { } u; } mrb_pool_value; -struct mrb_lvinfo { /* local variable info (name, idx) */ - mrb_sym name; - uint16_t r; -}; - /* Program data array struct */ typedef struct mrb_irep { uint16_t nlocals; /* Number of local variables */ @@ -55,7 +50,7 @@ typedef struct mrb_irep { const mrb_sym *syms; const struct mrb_irep * const *reps; - const struct mrb_lvinfo *lv; + const mrb_sym *lv; /* debug info */ struct mrb_irep_debug_info* debug_info; |
