18 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto e471d37ca5 Separate meta-programming features to mruby-metaprog gem.
We assume meta-programming is less used in embedded environments.
We have moved following methods:

 * Kernel module
   global_variables, local_variables, singleton_class,
   instance_variables, instance_variables_defined?, instance_variable_get,
   instance_variable_set, methods, private_methods, public_methods,
   protected_methods, singleton_methods, define_singleton_methods

 * Module class
   class_variables, class_variables_defined?, class_variable_get,
   class_variable_set, remove_class_variable, included_modules,
   instance_methods, remove_method, method_removed, constants

 * Module class methods
   constants, nesting

Note:
Following meta-programming methods are kept in the core:

 * Module class
   alias_method, undef_method, ancestors, const_defined?, const_get,
   const_set, remove_const, method_defined?, define_method

 * Toplevel object
   define_method

`mruby-metaprog` gem is linked by default (specified in default.gembox).
When it is removed, it will save 40KB (stripped:8KB) on x86-64
environment last time I measured.
2018-08-30 22:30:36 +09:00
yuri dabb20ddbb add mrbc option --remove-lv
* refactor: move `irep_remove_lv` from `mruby-bin-strip` gem to src/dump and rename to `mrb_irep_remove_lv`
* add: mrbc option `--remove-lv` to remove LVAR section
2018-07-10 01:42:33 +09:00
Yukihiro "Matz" Matsumoto 8bf492f127 Reduce integer type mismatch warnings in VC. 2017-08-12 09:35:35 +09:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
Yasuhiro Matsumoto 545d649eff fix tests on windows.
'bin/mruby' not work on windows. so correct command name and quoted arguments.
2015-09-30 16:13:02 +09:00
murase_syuka 77c6bfe287 fix usage message 2014-12-11 06:54:15 +09:00
cremno cc4c22c5f5 mruby-strip doesn't need mrbgems
Reduces executable size by more than 50% (409->171 KB).
2014-08-04 12:26:36 +02:00
cremno 02d4949d5d initialize args in parse_args 2014-07-12 20:36:45 +09:00
cremno a0912df6f6 coding style adjustments 2014-07-12 20:36:44 +09:00
cremno fbcb4c20e1 update expected error message in bintest 2014-07-12 20:36:44 +09:00
cremno 85bb1f92ef rewrite stripping
Previous version ignored some errors, and didn't free memory and close files.
Now no memory will be dynamically allocated to simplify error handling.

This commit also fixes a wrong check:

  files[i] = fopen(argv[i], "wb");
  if (!ireps[i]) {

Improve error messages a bit and add missing newline to one.
2014-07-12 20:36:44 +09:00
cremno c9b7cee2f6 check mrb_open return value 2014-07-12 20:36:44 +09:00
take_cheeze d8d07a2345 Move Kernel.local_variables to core. 2014-05-19 22:05:02 +09:00
Yukihiro "Matz" Matsumoto f0b86f36c3 move mrb_irep_remove_lv from etc.c to mruby-bin-strip gem 2014-05-15 17:13:16 +09:00
take_cheeze e0064acac7 Implement LVAR section removing option in mruby-strip. 2014-05-15 15:15:06 +09:00
take_cheeze c35b0c5245 add summary to mrbgems without it 2014-03-17 00:34:25 +09:00
take_cheeze fa5c3d4f51 add test to check striped binary works correctly 2014-03-03 16:58:27 +09:00
take_cheeze 1266ab6500 add mruby-strip tool to strip irep's debug info 2014-02-28 00:36:08 +09:00