Commit Graph

69 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 78f2902c06 need to initialize flags for pooled strings; close #1768 2014-03-01 10:48:22 +09:00
Yukihiro "Matz" Matsumoto 7ba4612956 use mrb_str_new_lit() more widely 2014-02-06 08:54:47 +09: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 c70e2f7099 wrong operator precedence fixed 2013-12-25 13:30:03 +09:00
Yukihiro "Matz" Matsumoto 673d9183cf avoid copying when the original string comes with MRB_STR_NOFREE 2013-12-25 10:30:48 +09:00
Yukihiro "Matz" Matsumoto 9fab01caee remove MRB_IREP_ARRAY_INIT_SIZE which is no longer used 2013-12-24 07:26:35 +09:00
Yukihiro "Matz" Matsumoto 9ac386923d float objects in pool are objects when MRB_WORD_BOXING is set 2013-11-27 17:29:28 +09: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 fb386011df rename API mrb_str_dup_static() -> mrb_str_pool() 2013-11-20 08:37:16 +09:00
Yukihiro "Matz" Matsumoto 217595c325 need to free pooled string bodies as well 2013-11-20 07:38:53 +09:00
Miura Hideki 54c5b12fb7 irep->pool struct pool -> mrb_value 2013-11-19 20:38:02 +09:00
Yukihiro "Matz" Matsumoto 71354b91cb enum mrb_vtype varies on compile time configuration, namely MRB_NAN_BOXING 2013-11-15 02:45:52 +09:00
Yukihiro "Matz" Matsumoto de790bdc27 allow irep to be GCed 2013-11-08 20:39:50 +09:00
Yukihiro "Matz" Matsumoto c8936754e8 wrong return value from read_lineno_record() 2013-11-07 08:20:03 +09:00
Yukihiro "Matz" Matsumoto d8913dae3f forgot to free irep->reps 2013-11-07 04:22:10 +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
Cremno 12997cebc3 BUG: mrb_irep_free (access of freed memory) 2013-09-03 21:21:49 +02:00
take_cheeze 3d1fffbd6b support multiple filename in irep 2013-09-02 00:48:06 +09:00
fleuria 620e323d15 replace assert with mrb_assert 2013-07-25 03:00:03 +08:00
Yukihiro "Matz" Matsumoto ae288fe78d add assertion that check sizeof(void*) should be 4 bytes when MRB_NAN_BOXING is in use 2013-06-11 12:43:42 +09:00
Yukihiro "Matz" Matsumoto 5c0b9b703c primary mruby fiber implementation 2013-05-20 17:54:07 +09:00
Carson McDonald 546d1626e3 Fix early free of irep->filename 2013-05-13 10:15:37 -04:00
Yukihiro "Matz" Matsumoto 30d580ecbc rename every ARGS_XXX to MRB_ARGS_XXX; ref #1206 2013-04-25 09:47:36 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
Yukihiro Matz Matsumoto 66fa14a333 main.to_s should also return "main" 2013-03-26 22:25:58 +09:00
Yukihiro Matz Matsumoto b1bd62e047 remove all MRB_TT_MAIN from source 2013-03-26 21:25:00 +09:00
Yukihiro Matz Matsumoto 5c6be2e518 Merge branch 'selftopiv' of https://github.com/carsonmcdonald/mruby into carsonmcdonald-selftopiv 2013-03-26 21:07:20 +09:00
Yukihiro Matz Matsumoto 471ad60688 use C99 flexible array member instead of [1] 2013-03-26 17:11:55 +09:00
Yukihiro Matz Matsumoto a7842b6451 zero length array is GCC extension 2013-03-26 16:42:17 +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
Masaki Muranaka 3aa3b4af90 Remove stdlib.h from mruby.h. It is for portability (care for freestanding environments).
This is a first step. It will be reduced stdlib.h in each files later.
2013-03-16 21:29:39 +09:00
mattn 089d3c2a2d Remove compiler warning 2013-03-14 13:40:28 +09:00
kano4 718a748799 Add null check 2013-03-13 22:24:06 +09:00
Yukihiro Matz Matsumoto 2e95f638cd Cut off mrb_irep_free from mrb_close; based on a patch from @matsumoto-r; close #951 2013-03-06 15:22:46 +09:00
Yukihiro "Matz" Matsumoto e13248bedf Merge pull request #884 from monaka/pr-use-MRB_IREP_ARRY_INIT_SIZE-macro
Use MRB_IREP_ARRAY_INIT_SIZE macro.
2013-03-03 16:40:27 -08:00
Cremno 7ba301c201 mrb_open takes no arguments: (void) instead of () 2013-03-02 01:42:06 +01:00
Masaki Muranaka 6dda588503 Use MRB_IREP_ARRAY_INIT_SIZE macro. It should be configurable since it is possible to reduce RAM size. 2013-02-25 13:59:20 +09:00
Carson McDonald 8f83f6674c Fixes a number of "comparison between signed and unsigned" warnings. 2013-01-27 09:44:47 -05:00
Yukihiro Matz Matsumoto 410d58a555 resolve conflict 2013-01-23 22:32:17 +09:00
Yuichiro MASUI 10c264d4bb Removed ext 2013-01-22 20:24:33 +09:00
Yuichiro MASUI 310b0dce8f Added finalizer of mrbgems 2013-01-22 20:18:48 +09:00
Yukihiro Matz Matsumoto f486774352 refactor and move irep malloc away to mrb_add_irep() 2012-12-07 15:57:40 +09:00
skandhas 70eaf92d8a fix incorrect mrb->irep initialization 2012-11-09 15:55:09 +08:00
Xuejie Xiao 4bbf7a3e12 Fix build on c++ compiler 2012-11-08 11:32:45 -05:00
Masaki Muranaka 1933e2660c Use substitution instead of memset in structure initialization. 2012-10-25 15:47:45 +09:00
Yukihiro Matsumoto 70abbb423a should not free() static iseq from cdump 2012-10-17 02:57:40 +09:00
Masamitsu MURASE ab5a5813c4 Free mrb->rescue and mrb->ensure. 2012-09-05 02:42:49 +09:00
Yukihiro Matsumoto 4f7a1a167d remove memleaks using linked allocator 2012-09-03 08:34:31 +09:00