diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-15 20:15:10 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-15 21:01:56 +0900 |
| commit | 61f49690e43cea3df6ebbdf424cf6777826056b0 (patch) | |
| tree | 25d4f8e4ecec412c79ac4232fae00bfe93663cda /include | |
| parent | 1bea1e2050ee4c1b3e558a307c7d2731f6b52823 (diff) | |
| download | mruby-61f49690e43cea3df6ebbdf424cf6777826056b0.tar.gz mruby-61f49690e43cea3df6ebbdf424cf6777826056b0.zip | |
Remove `filename`&`lines` from `mrb_irep` struct.
This patch slightly reduce memory consumption (2% for my test).
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/debug.h | 5 | ||||
| -rw-r--r-- | include/mruby/irep.h | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/mruby/debug.h b/include/mruby/debug.h index d1de34882..f0a40dfcf 100644 --- a/include/mruby/debug.h +++ b/include/mruby/debug.h @@ -55,10 +55,11 @@ MRB_API const char *mrb_debug_get_filename(mrb_irep *irep, ptrdiff_t pc); */ MRB_API int32_t mrb_debug_get_line(mrb_irep *irep, ptrdiff_t pc); +MRB_API mrb_irep_debug_info *mrb_debug_info_alloc(mrb_state *mrb, mrb_irep *irep); MRB_API mrb_irep_debug_info_file *mrb_debug_info_append_file( - mrb_state *mrb, mrb_irep *irep, + mrb_state *mrb, mrb_irep_debug_info *info, + const char *filename, uint16_t *lines, uint32_t start_pos, uint32_t end_pos); -MRB_API mrb_irep_debug_info *mrb_debug_info_alloc(mrb_state *mrb, mrb_irep *irep); MRB_API void mrb_debug_info_free(mrb_state *mrb, mrb_irep_debug_info *d); MRB_END_DECL diff --git a/include/mruby/irep.h b/include/mruby/irep.h index 76bafb25c..78cbc2b74 100644 --- a/include/mruby/irep.h +++ b/include/mruby/irep.h @@ -39,9 +39,6 @@ typedef struct mrb_irep { struct mrb_locals *lv; /* debug info */ - mrb_bool own_filename; - const char *filename; - uint16_t *lines; struct mrb_irep_debug_info* debug_info; uint16_t ilen, plen, slen, rlen; |
