Split presym_table for reduced program size

Because a structure that is an element of `presym_table` has padding, split
it into individual arrays for name and length.

#### Result (64-bit CPU with full-core gembox)

|        |   mruby    | libmruby.a |
|--------|------------|------------|
| Before | 1,087,444B | 1,476,872B |
| After  | 1,079,340B | 1,469,784B |
This commit is contained in:
KOBAYASHI Shuji
2021-01-27 20:47:10 +09:00
parent 251fd74315
commit 3104aed8c6
4 changed files with 45 additions and 38 deletions
+1 -10
View File
@@ -7,16 +7,7 @@
#ifndef MRUBY_PRESYM_ENABLE_H
#define MRUBY_PRESYM_ENABLE_H
#undef MRB_PRESYM_MAX
#define MRB_PRESYM_NAMED(lit, num, type, name) MRB_##type##__##name = (num),
#define MRB_PRESYM_UNNAMED(lit, num)
enum mruby_presym {
# include <mruby/presym.inc>
};
#undef MRB_PRESYM_NAMED
#undef MRB_PRESYM_UNNAMED
#include <mruby/presym/id.h>
#define MRB_OPSYM(name) MRB_OPSYM__##name
#define MRB_CVSYM(name) MRB_CVSYM__##name