Yukihiro "Matz" Matsumoto
8a6e600562
avoid using rewind(3) to load mrb files
2014-11-04 14:05:36 +09:00
Yukihiro "Matz" Matsumoto
0e2ab2210c
read whole mrb file at once to calculate correct padding offset; ref #2630
2014-11-04 10:12:46 +09:00
Yukihiro "Matz" Matsumoto
0e40468809
specify alignment specifier for GCC and MSC; ref #2630
2014-11-04 07:10:41 +09:00
Yukihiro "Matz" Matsumoto
be844f9284
Fix misaligned access when reading irep; close #2630
...
Add padding bytes before iseq block that may be used as mrb_code[].
Note that dumped mrb format has changed.
Based on a patch from kimu_shu <alfvegardrisc@gmail.com >
2014-11-04 02:41:42 +09:00
Yukihiro "Matz" Matsumoto
378aa8a9c8
avoid wrong ArgumentError from mrb_get_args() when surrounding method takes more than one argument; ref #2627
2014-10-30 10:31:06 +09:00
Yukihiro "Matz" Matsumoto
5bd3d9bc27
add cast to return from aget_index(); ref #2627
2014-10-30 10:27:05 +09:00
mattn
eaa0296fc5
Handle Array#[float, int] Close #2626
2014-10-29 19:27:20 +09:00
Jun Hiroe
5235e54137
Fix mrb_convert_to_integer.
2014-10-29 01:30:30 +09:00
Jun Hiroe
ad77ed8bf3
Refactor for_body func
2014-10-28 23:31:25 +09:00
Yukihiro "Matz" Matsumoto
f4260a851a
Merge pull request #2623 from suzukaze/fix-indent
...
Fix indent
2014-10-28 23:26:48 +09:00
Yukihiro "Matz" Matsumoto
5347fb923d
Merge pull request #2621 from suzukaze/fix-parse_string
...
Replace int with mrb_bool in parse_string func
2014-10-28 23:26:23 +09:00
Jun Hiroe
ec7dbee4b1
Fix indent
2014-10-28 01:52:50 +09:00
Jun Hiroe
832b529679
Replace int with mrb_bool in parse_string func
2014-10-28 00:11:34 +09:00
Jun Hiroe
9ca1745833
Replace int with mrb_bool in local_var_p func
2014-10-28 00:11:16 +09:00
Jun Hiroe
34175bf41f
Refactor yylex func
2014-10-27 01:27:00 +09:00
Jun Hiroe
7bd2a8508e
Refactor mrbc_context_new func
2014-10-27 00:29:00 +09:00
Yukihiro "Matz" Matsumoto
69ba4f0ed5
instance_methods etc should not include undef'ed method names; based on a patch from @cremno; fix #2613
2014-10-20 11:11:26 +09:00
Jan Berdajs
aff2be4b40
fix typo (i->idx)
2014-10-15 14:11:00 +02:00
Hiroyuki Matsuzaki
e77ea4e5f2
fixed. cygwin-gcc(ver4.8.3) warning in conv_digit()
2014-10-02 19:50:58 +09:00
Yukihiro "Matz" Matsumoto
83992ee163
cast MRB_ENV_STACK_LEN to (mrb_int); ref #2600
2014-10-02 17:59:01 +09:00
Hiroshi Mimaki
ed15477c74
Pacify MSVC warnings for numeric.c, proc.c, and symbol.c
2014-10-02 13:37:49 +09:00
Yukihiro "Matz" Matsumoto
ae1403004b
load.c to use mrb_ro_data_p()
2014-10-01 00:01:36 +09:00
Yukihiro "Matz" Matsumoto
b72e94fa6b
mrbconf.h option MRB_USE_ETEXT_EDATA to reduce memory.
...
on platforms with _etext and _edata, mruby can distinguish string literals so that it avoids memory allocation to copy them.
for example, on my Linux box (x86 32bit), memory consumed by mrbtest decreased from 8,168,203 to 8,078,848 (reduced 88KB).
2014-09-30 23:48:57 +09:00
Yukihiro "Matz" Matsumoto
bbf24b8463
mrb_sym2name_len() should initialize lenp even when proper symbol does not exist
2014-09-30 22:46:19 +09:00
Yukihiro "Matz" Matsumoto
7a7dcd12e5
remove unnecessary trailing comma to remove pre C99 declaration error with -Wdeclaration-after-statement
2014-09-30 22:40:55 +09:00
Yukihiro "Matz" Matsumoto
4a55b42984
O(1) mrb_sym2name_len(); close #2591
...
instead of adding sym->name hash table, linear symbol table is added, and reduced name->sym hash table size.
2014-09-30 20:15:27 +09:00
take_cheeze
524c9152d3
Fix mrb_get_args arguments types found by mruby-clang-plugin.
2014-09-21 22:43:13 +09:00
Yukihiro "Matz" Matsumoto
5f7b0580b7
code reduce by using mrb_get_args("n")
2014-09-19 03:03:53 +09:00
Yukihiro "Matz" Matsumoto
147fbf1c12
Module#const_defined? to take second optional argument as CRuby; fix #2593
2014-09-19 03:02:07 +09:00
Yukihiro "Matz" Matsumoto
95c7f570e1
change class argument of mrb_const_defined_at from struct RClass* to mrb_value to make it consistent with mrb_const_defined; ref #2593
2014-09-19 02:51:52 +09:00
Yukihiro "Matz" Matsumoto
6b34166ba5
const_defined? to check superclasses; ref #2593
2014-09-19 02:41:20 +09:00
Yukihiro "Matz" Matsumoto
6057b2e378
change mrb_sym type from uint16_t to uint32_t
2014-09-15 01:48:08 +09:00
Yukihiro "Matz" Matsumoto
48c5321dca
constify pointer from RARRAY_PTR to detect potential write barrier bugs.
...
if you see compiler errors due to this commit, you'd better to use array-modifying
functions, e.g. mrb_ary_set() or mrb_ary_push(), otherwise you might see nasty
GC bugs in the future. if you are sure what you are doing, replace `RARRAY_PTR(ary)`
by `mrb_ary_ptr(ary)->ptr`. but be warned.
2014-09-12 12:42:39 +09:00
Tatsuhiko Kubo
cfb321e877
Add inline to str_with_class().
2014-09-09 00:44:49 +09:00
Yukihiro "Matz" Matsumoto
89e9df2681
fixed wandering filename problem
2014-09-08 01:20:43 +09:00
Yukihiro "Matz" Matsumoto
3f70edbd16
support native byteorder in mrb files; ref 3492be
2014-09-05 11:09:44 +09:00
Yukihiro "Matz" Matsumoto
5b235a8bfa
condition refactoring in load.c
2014-09-05 10:55:09 +09:00
Yukihiro "Matz" Matsumoto
81c894a1c6
add some MRB_API to function prototypes
2014-09-05 00:54:51 +09:00
Yukihiro "Matz" Matsumoto
9b4ec380d2
use uint16_t instead of short; ref #2568
2014-09-05 00:47:22 +09:00
cremno
610d1d4afa
fix strict aliasing rule violation
2014-09-04 12:34:37 +02:00
Yukihiro "Matz" Matsumoto
6b302d80a3
instance variable name validation based on <ctype.h>; fix #2584
2014-09-04 18:36:28 +09:00
Yukihiro "Matz" Matsumoto
32aee72d29
wrong iseq conversion flag
2014-09-04 18:28:56 +09:00
Yukihiro "Matz" Matsumoto
3492be401a
avoid iseq allocation from static irep binary. it reduces 424KB allocation for mrbtest
2014-09-04 17:16:34 +09:00
Yukihiro "Matz" Matsumoto
dc3c91dfdc
rename a local variable current_node -> nodetype; ref #2583
2014-09-04 08:33:18 +09:00
cremno
26bbc81e12
get rid of shadowing variables
...
Mostly by renaming the shadowing variable.
If a shadowing variable was deleted,
the shadowed one can be used instead.
2014-09-03 10:00:37 +02:00
Yukihiro "Matz" Matsumoto
1fdf47d71a
Merge pull request #2582 from iij/pr-attr-accessor-save-arena
...
save and restore arena index to prevent arena overflow.
2014-09-03 11:02:52 +09:00
Tomoyuki Sahara
2fd49b2b9f
save and restore arena index to prevent arena overflow.
2014-09-03 10:44:38 +09:00
Tatsuhiko Kubo
b9acd20aef
Use mrb_str_cat_lit() instead of mrb_str_cat_cstr() for string-literals.
2014-09-03 01:43:46 +09:00
Jun Hiroe
f7a7426d7e
Refactor mrb_obj_is_kind_of_m() in kernel.c
2014-09-02 19:40:29 +09:00
Jun Hiroe
3e40cc6974
Refactor obj_is_instance_of() in kernel.c
2014-09-02 19:40:23 +09:00