summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
AgeCommit message (Collapse)Author
2017-10-19Add `main.define_method`Yukihiro "Matz" Matsumoto
2017-10-17Remove `mrb_vm_get_argc`; ref #3826Yukihiro "Matz" Matsumoto
2017-10-10correctly handle *splat arguments in mrb_get_argc, also add mrb_vm_get_argc ↵Tomasz Dąbrowski
and mrb_get_argv Fixes #3825
2017-09-27fix: src\class.c(949): warning C4244: '=': conversion from 'mrb_int' to ↵Tomasz Dąbrowski
'int', possible loss of data
2017-09-27fix: src\class.c(949): warning C4244: '=': conversion from 'mrb_int' to ↵Tomasz Dąbrowski
'int', possible loss of data
2017-09-27fix: src\class.c(583): warning C4244: '=': conversion from 'mrb_int' to ↵Tomasz Dąbrowski
'int', possible loss of data
2017-09-06Avoid calling `mrb_funcall` to invoke `#initialize` from `Class.new`.Yukihiro "Matz" Matsumoto
If `#initialize` is implemented in C, we don't need stack consuming `mrb_funcall`.
2017-09-04Call `initialize` only when it's not empty.Yukihiro "Matz" Matsumoto
2017-09-01Update method cache clearing.Yukihiro "Matz" Matsumoto
2017-08-26Check for ability to skip optional argument parsing.Yukihiro "Matz" Matsumoto
2017-08-22Added method cache.Yukihiro "Matz" Matsumoto
To enable method cache, define `MRB_METHOD_CACHE` or `MRB_METHOD_CACHE_SIZE`. The cache size must be power of 2. The default cache size is 128. The measurement: I measured simple benchmarks found in benchmark/ directory. With method cache enabled, we gained 6-8% performance improvement, with 97-99% cache hit rate.
2017-08-22`mrb_obj_respond_to` to use `mrb_method_search_vm`.Yukihiro "Matz" Matsumoto
2017-08-18Separate `mrb_str_buf_new` and `mrb_str_new_capa`.Yukihiro "Matz" Matsumoto
`mrb_str_buf_new` is an old function that ensures capacity size of `MRB_STR_BUF_MIN_SIZE` minimum. Usually one need to use `mrb_str_new_capa` instead.
2017-08-01Better class name management.Yukihiro "Matz" Matsumoto
The change removes several internal instance variables used by class name management. The variables `__classid__` and `__classpath__` are no longer available. `__outer__` is used only for unnamed outer classes/modules (and will be removed after they are named). [Important note] Along with this change we removed several public functions. - mrb_class_outer_module() - mrb_class_sym() We believe no one have used those functions, but if you do, please ask us for the workaround.
2017-08-01Cosmetic changes (removing spaces before `*` in return types).Yukihiro "Matz" Matsumoto
2017-08-01Move naming unnamed classes/modulesYukihiro "Matz" Matsumoto
From `mrb_mod_const_set` to `mrb_const_set`.
2017-08-01Implements `Module::nesting' (15.2.2.3.2); ref #600, #3200Yukihiro "Matz" Matsumoto
2017-07-28Extended Module#const_get to support class pathsChristopher Aue
2017-07-27Embed small size array elements in the heap.Yukihiro "Matz" Matsumoto
It reduces the memory consumption and sometimes improve the performance as well. For example, the consumed memory size of `bench/bm_ao_render.rb` is reduced from 1.2GB to 1GB, and its total execution time become 18.795 sec from 22.229 sec.
2017-07-19Avoid constant-set duplication; ref #3747Yukihiro "Matz" Matsumoto
2017-07-18Fixed Module#to_s and #name for #const_set modulesChristopher Aue
2017-07-12Update `mrb_get_args()` document.Yukihiro "Matz" Matsumoto
2017-07-12Add "*!" argument specifier to avoid stack copying.Yukihiro "Matz" Matsumoto
2017-06-27Copy argv from VM stack to avoid use-after-free; fix #3722Yukihiro "Matz" Matsumoto
2017-05-30Avoid using C++ style comments (//).Yukihiro "Matz" Matsumoto
2017-05-29Mark proc objects representing methods as internal objects; fix #3621Yukihiro "Matz" Matsumoto
2017-05-26Add new range check macro FIXABLE_FLOAT(); ref #3652Yukihiro "Matz" Matsumoto
When MRB_INT64, valid value range of mrb_int is bigger than double, which only has 53 bits significant precision.
2017-04-21Add missing `arg_i++` to fix bug of `s!` in mrb_get_args.take_cheeze
2017-04-12Refactor check before `mrb_class_ptr()`; ref #3602Yukihiro "Matz" Matsumoto
2017-04-12The attached object may not be a class; fix #3602Yukihiro "Matz" Matsumoto
2017-04-06Get constant of parent class even if child class is defined in signleton ↵Kouichi Nakanishi
class; fix #3575
2017-04-03Unify `else` clause styleYukihiro "Matz" Matsumoto
2017-04-03Remove spaces around parensYukihiro "Matz" Matsumoto
2017-03-19`super class error` formats the superclass by `inspect`; rerf #3515Yukihiro "Matz" Matsumoto
2017-03-18Need to setup singleton_class chain; fix #3509Yukihiro "Matz" Matsumoto
2017-03-16Singleton classes do not have outer class set; fix #3505Yukihiro "Matz" Matsumoto
2017-03-10Raise special Exception when exception class is redefined; fix #3493Yukihiro "Matz" Matsumoto
2017-02-15Move #__id__ to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move #instance_eval to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move #__send__ to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move #== and #!= to BasicObject; ref #3417Yukihiro "Matz" Matsumoto
2017-02-15Move BasicObject#method_missing to Kernel#method_missing; ref #3417Yukihiro "Matz" Matsumoto
More compatibility to CRuby. Updated tests that assume old mruby behavior.
2017-02-15Avoid calling hook methods if they are not overridden.Yukihiro "Matz" Matsumoto
2017-01-24Outer class may be same as the class; fix #3382Yukihiro "Matz" Matsumoto
2017-01-12Kernel#initialize should not break existing mt; fix #3397Yukihiro "Matz" Matsumoto
This issue was reported by https://hackerone.com/icanthack The solution is suggested by @clayton-shopify.
2017-01-11Raises Exception if raising exception class is redefinedYukihiro "Matz" Matsumoto
close #3384 This issue was reported by https://hackerone.com/brakhane
2016-12-12should not try to set classpath for frozen classes; ref #3340Yukihiro "Matz" Matsumoto
2016-12-12freeze classes/modules; ref #3340Yukihiro "Matz" Matsumoto
2016-12-04Add symbol type check for Module#undef_methodYukihiro "Matz" Matsumoto
2016-11-30Prohibit instantiation of immediate objectsYukihiro "Matz" Matsumoto