Commit Graph

111 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto b6fc3f831d change return value of mrb_free from void* to void 2013-04-29 09:12:44 +09:00
Yukihiro "Matz" Matsumoto 443b2c2a2b rename hash related gc functions 2013-04-29 07:48:33 +09:00
Yukihiro "Matz" Matsumoto a1df3fdb0c fix mrb_string_shared memory leaks 2013-04-29 07:47:12 +09:00
Yukihiro "Matz" Matsumoto 5c68195c88 mrb_str_new_static(): zero copy string creation 2013-04-28 02:47:22 +09:00
Yukihiro "Matz" Matsumoto 30d580ecbc rename every ARGS_XXX to MRB_ARGS_XXX; ref #1206 2013-04-25 09:47:36 +09:00
h2so5 9b798114bb Use mrb_bool for the 'b' format specifier of mrb_get_args 2013-04-22 10:41:53 +09:00
Masaki Muranaka c7ff1bd881 Add the care for malloc failed.
At the first time, mrb_realloc raise RuntimeError.
At the time fails twice in a row, it causes panic.
2013-04-01 08:40:05 +09:00
Masaki Muranaka 74f04849c4 Rearrange SIZE_MAX. It is supported also VC++ since its version10. And there seems SIZE_MAX is defined in stdint.h. And it possibly (depends on the version of VC++) conflicts with SIZE_MAX in limits.h. This patch is no need if I did not support VC++. 2013-03-29 11:02:35 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
Yukihiro Matz Matsumoto b1bd62e047 remove all MRB_TT_MAIN from source 2013-03-26 21:25:00 +09:00
Carson McDonald 930e4c71c0 Make mrb_top_self return a real instance. 2013-03-25 00:23:22 -04:00
Yukihiro Matz Matsumoto f0ac204f21 Use size_t instead of int. This is for portability. 2013-03-24 00:20:35 +09:00
Yukihiro Matz Matsumoto d0d920e909 rename mrb_true_or_false_value() to mrb_bool_value() 2013-03-19 12:03:54 +09:00
Masaki Muranaka e827f774c6 Use mrb_true_or_false_value() / in gc_generational_mode_set(). 2013-03-19 11:04:21 +09:00
Masaki Muranaka 58c0f9da1c Use mrb_true_or_false_value() / in change_gen_gc_mode(). 2013-03-19 11:04:20 +09:00
Masaki Muranaka 0ee0eb916b Use mrb_true_or_false_value() / in gc_disable(). 2013-03-19 11:04:20 +09:00
Masaki Muranaka c102526434 Use mrb_true_or_false_value() / in gc_enable(). 2013-03-19 11:04:20 +09:00
Yukihiro Matz Matsumoto 88483fad00 rename mrb_basic to mrb_basic_ptr; close #1011 2013-03-15 23:21:13 +09:00
Masaki Muranaka 1ffc9ba325 Define type mrb_bool. It is typedef-ed to _Bool on C99, unsigned int on MSVC.
It is safer than applying 1bit bit-fields to signed int.

For forward compatibility, you should substiture only 1 or 0 for the variable typed mrb_bool.
2013-03-14 15:13:12 +09:00
MATSUMOTO Ryosuke 809732ab40 Adjust some indents 2013-03-02 10:26:54 -08:00
mattn 261efd8e9d Merge branch 'master' into pluggable_struct 2013-03-01 14:42:42 +09:00
mattn 4c4cf0a4ce Pluggable Struct 2013-03-01 14:42:34 +09:00
mattn 138ecf4723 Pluggable Struct 2013-03-01 13:37:46 +09:00
Carson McDonald 3d3ebbc9cd Fix arena size check. 2013-02-28 09:24:08 -05:00
Masaki Muranaka d864648506 Clean code up. 2013-02-26 19:16:48 +09:00
Yukihiro Matz Matsumoto 59cf4bca15 rename RVALUE union members 2013-02-20 23:19:48 +09:00
Yukihiro Matz Matsumoto 8b44e8dbd8 add RData entrie to RVALUE union 2013-02-20 23:15:11 +09:00
mattn b1a5146ea8 Pluggable Regexp 2013-02-15 04:38:27 +09:00
Narihiro Nakamura 7841a0cac5 Clear all old flags, even if we change the gc mode during the major gc. 2013-01-17 10:20:21 +09:00
Yukihiro "Matz" Matsumoto 016e821736 Merge pull request #739 from cremno/use-b-specifier
Use new mrb_get_args binary specifier.
2013-01-16 01:40:27 -08:00
Narihiro Nakamura 3620cc674c mrb_field_write_barrier paints also gray in the major collector.
These objects will be traversed after a minor collect cycle.
2013-01-16 16:01:40 +09:00
Cremno 0a22c59938 use the new specifier b instead of o 2013-01-15 09:15:10 +01:00
Yukihiro "Matz" Matsumoto 315ecb60cd Merge pull request #730 from masamitsu-murase/modify_range_initialize
Modify `Range#initialize`
2013-01-13 18:11:19 -08:00
Masamitsu MURASE f9b836a677 Initialize edges of RRange. 2013-01-13 22:04:45 +09:00
Narihiro Nakamura a80e9b5bc8 Doesn't clear black of all marked objects in major collections.
Since the minor collector doesn't need to mark these objects, the worst-case pause time is reduced.
2013-01-13 18:56:23 +09:00
Yukihiro "Matz" Matsumoto bcabae43a4 Merge pull request #703 from authorNari/skip_sweeping_old
Skip sweeping old slots which don't contain any young object in the minor GC
2013-01-07 01:29:56 -08:00
Narihiro Nakamura 542eda83ab Skip sweeping old slots which don't contain any young object. 2013-01-07 16:37:32 +09:00
Masaki Muranaka 0f99322f27 gc.c: Enable DEBUG(x) if GC_DEBUG is defined.
vm.c: Enable DEBUG(x) if VM_DEBUG is defined.
2013-01-07 15:28:05 +09:00
Narihiro Nakamura 5dfefb95df Add the generational gc 2013-01-07 01:47:21 +09:00
Narihiro Nakamura 8c27e43779 Fix a wrong comment 2012-12-31 15:59:23 +09:00
Xuejie Xiao 4bbf7a3e12 Fix build on c++ compiler 2012-11-08 11:32:45 -05:00
Yukihiro Matz Matsumoto 3ceadfa5b2 inline include/mruby/object.h 2012-11-05 06:10:22 +09:00
Yukihiro Matz Matsumoto c903910c6b replace RBASIC by mrb_basic 2012-11-04 13:56:08 +09:00
Yukihiro Matz Matsumoto 902dd63803 remove FL_XXX macros 2012-11-04 05:15:22 +09:00
Masaki Muranaka f3090c3000 Use substitution instead of memset in structure initialization. 2012-10-29 11:29:57 +09:00
Yukihiro Matsumoto 950204bc4d remove flags from irep 2012-08-29 11:45:36 +09:00
Yukihiro Matsumoto d04a7ec632 free heap pages from mrb_close() 2012-08-28 02:11:00 +09:00
Masamitsu MURASE a851bcd631 Refer to irep_capa as well as irep_len when irep is marked by GC.
Initialize mrb->irep array with 0 when realloc is called.
2012-08-21 02:01:26 +09:00
Yukihiro Matsumoto e27cc402da replace RiteVM in comments by mruby 2012-08-19 08:35:23 +09:00
Yukihiro Matsumoto b8fc484d2e allocf should take ud; https://twitter.com/junjis0203/status/236949976461221889 2012-08-19 07:48:40 +09:00