Yukihiro Matsumoto
be8181a99a
raise SyntaxError only when capture_errors is set
2012-07-03 21:39:21 +09:00
Yukihiro Matsumoto
137570acf0
capture_errors can be specified by mrbc_context
2012-07-03 21:32:37 +09:00
Yukihiro Matsumoto
daee2e5ad3
preserve toplevel local variable info in mrbc_context
2012-07-03 21:26:05 +09:00
Yukihiro Matsumoto
39689441e7
add context arg to mrb_parser_parse()
2012-07-03 21:13:10 +09:00
Yukihiro Matsumoto
65096c4c1b
add context to parser, that would hold local variable info, filename, and line number. mrbc_context argument has been added to mrb_parse_xxx() functions. Normally, you just to need to add NULL (or 0) to the last argument of the above functions.
2012-07-03 20:59:07 +09:00
Yukihiro Matsumoto
ce49d90dc8
modify compiler API; replace mrb_compie_xxx with mrb_load_xxx() that combines compilatoin and execution
2012-07-03 15:26:11 +09:00
Yukihiro Matsumoto
97b1c57600
constify parser input strings
2012-07-03 14:28:19 +09:00
Yukihiro Matsumoto
3be4e91376
remove size_t from parser
2012-07-03 14:27:34 +09:00
Masamitsu MURASE
8746cb2ac1
Initialize mt of module with khash.
2012-07-01 18:34:22 +09:00
Yukihiro "Matz" Matsumoto
660f64b1d0
Merge pull request #337 from masamitsu-murase/fix_str_replace
...
Fix str_replace in string.c
2012-06-30 13:50:54 -07:00
Masamitsu MURASE
780f54e1eb
Free iv of MRB_TT_DATA instance.
2012-07-01 01:52:37 +09:00
Masamitsu MURASE
866f797125
Fix str_replace in string.c
...
- Increment refcnt of shared string.
- Free buffer before replacing.
- Clear MRB_STR_SHARED after decref is called.
- Fix target of aux.capa.
2012-06-30 21:42:10 +09:00
Daniel Bovensiepen
2c8886c80d
Make strucdata optional if ENABLE_STRUCT is activitated
2012-06-29 22:59:53 +08:00
Yukihiro Matsumoto
4a98d5c8fd
allow string interpolation in symbols like :"a=#{15}"
2012-06-28 23:35:17 +09:00
Yukihiro Matsumoto
4fd932548e
allow :"text" form; close #321
2012-06-28 23:28:54 +09:00
Yukihiro Matsumoto
04d24b3168
always define POOL_ALIGNMENT (default 4); reduce strength as well; close #333
2012-06-28 15:07:11 +09:00
Yukihiro Matsumoto
3de0a62522
resolve conflict in class.c
2012-06-27 15:22:08 +09:00
Yukihiro Matsumoto
0a88499f32
sizeof("a") is bigger by one than strlen("a")
2012-06-27 15:19:40 +09:00
Yukihiro Matsumoto
6f9ed1c5b2
use return value from sprintf/snprintf
2012-06-27 15:14:56 +09:00
Yukihiro "Matz" Matsumoto
50f38a7df3
Merge pull request #330 from monaka/pr-fix-parser-y-to-supress-warning-array-subscript
...
Supress "warning: array subscript has type ‘char’"
2012-06-26 22:43:52 -07:00
Masaki Muranaka
cd5476c6ae
Supress "warning: array subscript has type ‘char’"
2012-06-27 13:19:32 +09:00
Masaki Muranaka
2042684b6e
Use sizeof to get char array sizes.
2012-06-27 13:01:22 +09:00
Masaki Muranaka
d534f26f16
Use sizeof to get char array sizes.
2012-06-27 10:36:39 +09:00
Yukihiro "Matz" Matsumoto
cf8b6ec841
Merge pull request #326 from masamitsu-murase/modify_str_format_len
...
Fix str_format_len.
2012-06-26 13:57:31 -07:00
Yukihiro Matsumoto
6410cdf3bf
do not undef config macros
2012-06-27 01:13:21 +09:00
Masamitsu MURASE
0b4d96741b
Fix str_format_len.
2012-06-27 00:38:59 +09:00
Masaki Muranaka
568af55187
Refactor hex_to_str().
2012-06-26 20:41:42 +09:00
Yukihiro "Matz" Matsumoto
ed9488f2ca
Merge pull request #323 from monaka/pr-fix-str_to_format
...
Fix str_to_format.
2012-06-25 20:36:26 -07:00
Masaki Muranaka
b18ab1dc3f
Fix str_to_format. See also #314 .
2012-06-26 12:03:12 +09:00
Masamitsu MURASE
c152c194a1
Prevent memory leak when string literal is created.
2012-06-26 01:34:41 +09:00
Yukihiro Matsumoto
c99b806f8b
ci->acc should not be left uninitialized; close #303
2012-06-25 19:24:57 +09:00
Yukihiro Matsumoto
8dc533ed5f
Merge branch 'master' of github.com:mruby/mruby
2012-06-25 17:30:28 +09:00
Yukihiro Matsumoto
19638ded73
use mrb_intern_str instead of mrb_intern if possible
2012-06-25 17:30:12 +09:00
Yukihiro "Matz" Matsumoto
52b6d1c001
Merge pull request #318 from masamitsu-murase/fix_instance_tt
...
Patch for inheritance of built-in class
2012-06-24 13:43:44 -07:00
Yukihiro "Matz" Matsumoto
bf747efdd1
Merge pull request #317 from masamitsu-murase/fix_struct_new_gc
...
Fix GC of struct
2012-06-24 06:32:48 -07:00
Yukihiro "Matz" Matsumoto
431d1c8e2b
Merge pull request #316 from masamitsu-murase/modify_obj_clone
...
Modify Kernel#clone and Kernel#dup
2012-06-24 06:26:49 -07:00
Yukihiro "Matz" Matsumoto
97c9c859d1
Merge pull request #313 from masamitsu-murase/fix_struct_new
...
Fix Struct#new and GC
2012-06-24 06:11:28 -07:00
Yukihiro Matsumoto
8121e0d354
should mark child env from method (proc) objects
2012-06-24 21:46:24 +09:00
Masamitsu MURASE
e53eea76eb
Modify gc_gray_mark for Struct.
2012-06-24 17:38:20 +09:00
Masamitsu MURASE
9a1f588749
Modify obj_free to free instances of Struct.
2012-06-24 17:29:41 +09:00
Masamitsu MURASE
2a2ffe7f7d
Modify Kernel#clone and Kernel#dup.
...
Kernel#clone, Kernel#dup:
- 'iv' should not be shared with the original object,
but it should be copied.
Kernel#clone:
- 'mt' of singleton_class should be copied.
2012-06-24 16:39:08 +09:00
Masamitsu MURASE
1deb31320a
Modify instance tt.
2012-06-24 15:15:55 +09:00
Masamitsu MURASE
7778b5ca1c
Implement garbage collection for struct.
2012-06-24 06:28:17 +09:00
Masamitsu MURASE
7a17377c64
Fix Struct.new and Struct.[].
...
Instances of Struct's subclass should have MRB_TT_STRUCT.
2012-06-24 04:06:53 +09:00
Yukihiro Matsumoto
d657e26d35
pacify const assignment warning
2012-06-24 01:12:05 +09:00
Yukihiro Matsumoto
c261e4f360
resolve crash issue on LLVM; longjmp cleared some local variable
2012-06-24 00:15:22 +09:00
Yukihiro Matsumoto
f045e64675
reduce calling mrb_str_new_cstr() to avoid strlen(); #301
2012-06-23 13:51:50 +09:00
Yukihiro Matsumoto
1fa63930fd
check object type before retrieving instance variabls; close #311
2012-06-23 10:40:17 +09:00
Yukihiro Matsumoto
2d781f5c1d
remove assertion for false assumption; mrb_str_new(0, len) where len > 0 can be used to allocate an unintialized string
2012-06-23 09:49:14 +09:00
Masaki Muranaka
21f2e5364b
Use mrb_str_new() instead of mrb_str_new2() as possible.
2012-06-22 17:02:08 +09:00