diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-09 14:39:38 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:08 +0900 |
| commit | d428fa0c4acfe4f70ab534d420052c193bd83281 (patch) | |
| tree | 903e5ab41d1c358e3b512be90d36837e54580e29 /src/etc.c | |
| parent | daa37be5495393ce3e4654e00e44099f627e6cd4 (diff) | |
| download | mruby-d428fa0c4acfe4f70ab534d420052c193bd83281.tar.gz mruby-d428fa0c4acfe4f70ab534d420052c193bd83281.zip | |
Replace entire `irep->pool`.
Changes:
- `pool format is completely replaced
- supported types: `STR`, `INT32`, `INT64`, `FLOAT`
- `FLOAT` may be replaced by binary representation in the future
- insert `NUL` after string literals in `mrb` files
- `irep->pool` no longer store values in `mrb_value`
- instead it stores in `mrb_pool_value`
- less allocation
- `mrb_irep` can be stored in ROM
Diffstat (limited to 'src/etc.c')
| -rw-r--r-- | src/etc.c | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -158,17 +158,6 @@ mrb_word_boxing_float_value(mrb_state *mrb, mrb_float f) MRB_SET_FROZEN_FLAG(v.value.bp); return v; } - -MRB_API mrb_value -mrb_word_boxing_float_pool(mrb_state *mrb, mrb_float f) -{ - struct RFloat *nf = (struct RFloat *)mrb_malloc(mrb, sizeof(struct RFloat)); - nf->tt = MRB_TT_FLOAT; - nf->c = mrb->float_class; - nf->f = f; - MRB_SET_FROZEN_FLAG(nf); - return mrb_obj_value(nf); -} #endif /* MRB_WITHOUT_FLOAT */ #endif /* MRB_WORD_BOXING */ |
