summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-07-08 07:10:11 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-07-08 07:24:12 +0900
commitf16ea05a178a0ffd38a054d28a01c1780d63d03a (patch)
treeec1ef57c79004a555a81631600e561ad792c89ea /include
parentfb1d4ff6826098c5d44be1cd8500dd4cf97ed57c (diff)
downloadmruby-f16ea05a178a0ffd38a054d28a01c1780d63d03a.tar.gz
mruby-f16ea05a178a0ffd38a054d28a01c1780d63d03a.zip
debug.c: new debug line information format `mrb_debug_line_packed_map`.
It uses BER number compression of delta of instruction positions and line numbers. BER compression is a variable length number representation. * `mrb_debug_line_ary`: array of line numbers represented in `uint16_t`. `[lineno, lineno, ...]` * `mrb_debug_line_flat_map`: array of `mrb_irep_debug_info_line`, which is `struct {uint32_t pos; uint16_t lineno}`, for each line. * `mrb_debug_line_packed_map` [new]: sequence of BER compressed 2 numbers, `pos_delta, lineno_delta`. Deltas are differences from previous values (starting `0`). `line_entry_counts` represents total length of a packed map string for this type.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/debug.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mruby/debug.h b/include/mruby/debug.h
index 2062a9308..2e6898e39 100644
--- a/include/mruby/debug.h
+++ b/include/mruby/debug.h
@@ -16,7 +16,8 @@ MRB_BEGIN_DECL
typedef enum mrb_debug_line_type {
mrb_debug_line_ary = 0,
- mrb_debug_line_flat_map = 1
+ mrb_debug_line_flat_map,
+ mrb_debug_line_packed_map
} mrb_debug_line_type;
typedef struct mrb_irep_debug_info_line {
@@ -31,8 +32,9 @@ typedef struct mrb_irep_debug_info_file {
mrb_debug_line_type line_type;
union {
void *ptr;
- mrb_irep_debug_info_line *flat_map;
uint16_t *ary;
+ mrb_irep_debug_info_line *flat_map;
+ char *packed_map;
} lines;
} mrb_irep_debug_info_file;