Commit Graph

184 Commits

Author SHA1 Message Date
Jun Hiroe 3988597afc Fix indent 2014-05-03 02:20:23 +09:00
Yukihiro "Matz" Matsumoto 29f6cdcd4d stack may be uncleared 2014-04-29 10:36:30 +09:00
Yukihiro "Matz" Matsumoto 57e6a783bc fiber context may be NULL 2014-04-29 10:32:49 +09:00
Yukihiro "Matz" Matsumoto 4e790fc1b6 forgot to remove abort() 2014-04-27 02:50:41 +09:00
Yukihiro "Matz" Matsumoto 4bfd25d405 mark may be missed when eval() is called 2014-04-27 02:48:11 +09:00
kyab e248097a17 Fix MSVC warning for gc.c 2014-04-24 01:18:41 +09:00
take_cheeze 755ded2ef0 Use MRB_ENV_STACK_SHARED_P to check cioff field of REnv. 2014-04-01 01:53:28 +09:00
take_cheeze 80534b6d14 Use MRB_ENV_STACK_LEN instead of accessing flags directly to get REnv's stack length. 2014-04-01 01:13:39 +09:00
Yukihiro "Matz" Matsumoto 9201af7d36 mark root fiber object; close #1865 2014-03-18 12:39:11 +09:00
cubicdaiya 042c9f95a5 add comments at end of include guard 2014-03-10 12:37:47 +09:00
Yukihiro "Matz" Matsumoto 90c54d1ead remove break altogether in ci loop 2014-02-28 01:25:50 +09:00
Yukihiro "Matz" Matsumoto d1526b0409 should not continue loop when ci = NULL 2014-02-27 19:00:37 +09:00
Yukihiro "Matz" Matsumoto 19a08b8455 Merge pull request #1674 from cremno/mrb_bool-FALSE-TRUE
use mrb_bool, FALSE and TRUE more
2014-02-09 18:35:20 +09:00
Yukihiro "Matz" Matsumoto ed1bf9aa80 introduce mrb_str_new_lit() to create strings from C string litrals 2014-02-06 07:50:34 +09:00
cremno 4507985c3e use mrb_bool, FALSE and TRUE more
It doesn't matter to me if one is using FALSE/TRUE instead of 1/0
but I prefer a type (alias) which emphasizes boolean vars to int.
I changed 1/0 to FALSE/TRUE anyway.
2014-01-31 18:00:36 +01:00
cremno a2cfc9a9af rework mruby-objectspace and gc.[ch]
- functions should have C linkage (for C++ code)
- add prefix to each_object_callback
- use more appropriate variable types / initialization
- ObjectSpace::count_objects has 1 opt. arg.
- prefer mrb_intern_lit to mrb_intern_cstr for str. lit.
- mruby/value.h is included by mruby.h
- adjust coding style
2014-01-31 17:42:05 +01:00
cremno aa655b9ee1 remove superfluous includes
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
Yukihiro "Matz" Matsumoto a26a6fecee Merge pull request #1637 from h2so5/extended-arena-size
Fix extended arena check in gc_protect
2014-01-02 15:44:31 -08:00
h2so5 a44cc14e1c Fix extended arena check in gc_protect 2014-01-02 18:23:26 +09:00
cremno 18433731ed remove various preprocessor conditionals
- HAVE_IEEEFP_H is nowhere defined or needed at all
- FreeBSD < 4 is unsupported since years
- MSVC workaround (around what exactly?)
2014-01-02 07:33:33 +01:00
Yukihiro "Matz" Matsumoto 07b8a5b042 Make mrb->arena variable sized. Use MRB_GC_FIXED_ARENA for old behavior.
You will not see "arena overflow" error anymore, but I encourage gem authors
to check your gems with MRB_GC_FIXED_ARENA to avoid memory broat.
2013-11-22 09:20:06 +09:00
Yukihiro "Matz" Matsumoto de790bdc27 allow irep to be GCed 2013-11-08 20:39:50 +09:00
Yukihiro "Matz" Matsumoto 677a2ac226 irep->pool not to be GCed 2013-11-07 04:20:46 +09:00
Yukihiro "Matz" Matsumoto e92d4e2680 modified to use irep->reps to reference child ireps. preparation for
removing irep array from mrb_state.  note that instructions OP_LAMBDA,
OP_EXEC and OP_EPUSH are incompatible, and dumped mrb format has changed.
2013-11-07 03:54:22 +09:00
Yukihiro "Matz" Matsumoto e386760cc7 add Fiber.current 2013-11-04 23:58:32 +09:00
Daniel Bovensiepen 302e20333b Improve Grammar of Documentation 2013-10-02 00:50:55 +08:00
Yukihiro "Matz" Matsumoto f8454e53ba check d->type before accessing d->type->dfree; #1474 #858 2013-08-14 16:51:50 +09:00
fleuria b3b4f2dbdb clean up the warnings when GC_PROFILE is on 2013-08-09 17:38:09 +08:00
Yukihiro "Matz" Matsumoto 3d3ca985b0 remove duplicated incremental_gc_until() in generational GC; #1449 2013-08-09 18:11:16 +09:00
fleuria 7e7943322b add comments for major GC 2013-08-09 15:43:06 +08:00
Yukihiro "Matz" Matsumoto 30f86069de finish half-baked GC cycle before starting full GC; #1447 2013-08-08 22:08:12 +09:00
Yukihiro "Matz" Matsumoto 1e87bf6d2f allow turning off GC generational mode by default by MRB_GC_TURN_OFF_GENERATIONAL; #1447 2013-08-08 21:42:20 +09:00
fleuria 22ac62a4f1 fix #1442
in the marking root phase, we only marked the root context, but leaving
the current context unmarked. when we execute a fiber, the current
context would be changed and trigger this issue.
2013-08-07 19:42:56 +08:00
fleuria 107906e3cb revise the comment in mrb_full_gc()
the old comment "clean all the black object as old" looks confusing,
it looks like "transform black object to old object", but indeed black
is old,
2013-08-01 17:50:13 +08:00
fleuria c1469a57a2 add comment for clear_all_old() 2013-08-01 17:30:57 +08:00
fleuria bbbe996e0d replace gc_assert with mrb_assert 2013-07-25 02:55:51 +08:00
Yukihiro "Matz" Matsumoto 8a298605e6 remove an unused local variable 2013-07-24 23:58:10 +09:00
Yukihiro "Matz" Matsumoto 5146219cbd revise gc_mark_gray_list() not to cause SEGV on Ubuntu 32bit 2013-07-24 23:47:52 +09:00
Yukihiro "Matz" Matsumoto 4ad4ce6caf restore once removed mrb_garbage_collect() 2013-07-24 23:31:46 +09:00
Yukihiro "Matz" Matsumoto e1706e65f9 Merge pull request #1407 from Fleurer/gc-introduce-incremental-gc-step
separate out `incremental_gc_step()` from `mrb_incremental_gc()`, and misc minor rename
2013-07-24 07:18:50 -07:00
fleuria 7bfdcace52 fix warning 2013-07-24 18:27:23 +08:00
fleuria 2591922ec2 rename variable_gray_list to atomic_gray_list 2013-07-24 18:22:53 +08:00
fleuria 88eb0f54e9 introduce gc_mark_gray_list(), and cleanup redaunt code with it 2013-07-24 18:22:53 +08:00
fleuria 0c0efc16b0 gc: replace comment "a round of GC" to "a GC cycle" 2013-07-24 16:22:38 +08:00
fleuria c852626ea7 rename mrb_garbage_collect() to mrb_full_gc() 2013-07-24 16:17:53 +08:00
fleuria 9cc43a970c introduce incremental_gc_step() 2013-07-24 16:17:53 +08:00
fleuria 9bce2eb8b3 gc: add comments for Generational Mode 2013-07-23 17:04:54 +08:00
fleuria 6a1cb4465b revise the Two White Parts comments in gc.c 2013-07-22 16:26:59 +08:00
Yukihiro "Matz" Matsumoto 84991d6388 Merge pull request #1392 from Fleurer/gc-rename-advance-phase
rename advance_phace() to incremental_gc_until(), and cleanup some redundant codes with it.
2013-07-21 17:58:57 -07:00
Yukihiro "Matz" Matsumoto 2daf39ddc8 change else formatting 2013-07-22 09:52:06 +09:00