From 06ba5905f019ca1a8d8e498fe6dce7a94702c9ad Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 6 Feb 2019 22:01:45 +0900 Subject: Implement inline packed symbols. Small symbols with all alphanumeric characters (<5) are packed in 32bit symbol integer a la base64. This means those small symbols are not listed in `Symbol.all_symbols`. --- include/mruby.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/mruby.h') diff --git a/include/mruby.h b/include/mruby.h index 2f2d98677..e9fd08102 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -242,6 +242,9 @@ typedef struct mrb_state { struct symbol_name *symtbl; /* symbol table */ mrb_sym symhash[256]; size_t symcapa; +#ifndef MRB_ENABLE_SYMBOLL_ALL + char symbuf[8]; /* buffer for small symbol names */ +#endif #ifdef MRB_ENABLE_DEBUG_HOOK void (*code_fetch_hook)(struct mrb_state* mrb, struct mrb_irep *irep, mrb_code *pc, mrb_value *regs); -- cgit v1.2.3