Yukihiro "Matz" Matsumoto
89e9df2681
fixed wandering filename problem
2014-09-08 01:20:43 +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
607795ffdd
more OP_MOVE swap detection in peephole optimization
2014-08-29 16:24:12 +09:00
Yukihiro "Matz" Matsumoto
3c4cd5428a
allow no_optimize esp. for debugger
2014-08-29 15:09:14 +09:00
Tatsuhiko Kubo
5fa30aeaea
Fix mismatches for MRB_API declarations.
2014-08-29 01:06:22 +09:00
Tatsuhiko Kubo
3202938099
Add a missing space after ",".
2014-08-27 19:13:40 +09:00
cremno
bdf6ce34ce
printf: cast variables to the expected type
...
%x expects unsigned int and %p expects void *
GCC emits a diagnostic about %p/void* in pedantic mode:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26542
2014-08-26 00:30:33 +02:00
Yukihiro "Matz" Matsumoto
05ede52239
should use non NULL scope for raise_error(); ref #2547
2014-08-20 23:38:37 +09:00
Tatsuhiko Kubo
ae2d49811a
Fix allocation-error-handlings for scope_new().
2014-08-20 12:25:29 +09:00
Tatsuhiko Kubo
ae306793f2
Use specified macro(NULL) instead of magic-number.
2014-08-20 04:34:03 +09:00
kkkkkt
9da37cdfd1
refactor mruby method(fix indent. remove temporary value, duplicate procedure)
2014-08-18 10:58:48 +09:00
cremno
ef59f553a3
invalid base shouldn't silently fail
...
Revert 44a5809224 and check range of
`base` with `mrb_assert`.
It actually can only be either 2, 8, 10 or 16 (and never 0), unless
mruby sources are modified. But I don't see a reason to impose further
limits.
2014-07-09 13:55:08 +02:00
Jose Narvaez
45b8562d8d
Using 'mrb_assert' instead of an returning 0 while checking s->irep in codegen.c.
2014-06-13 16:44:22 +01:00
Jose Narvaez
13abc9c4a1
Revert "Fixed dereference to null pointer in 'codegen.c' reported by 'clang-analyzer'"
...
This reverts commit 29f14e728d .
2014-06-13 10:54:18 +01:00
Jose Narvaez
e344d662f1
Fixed dereference to null pointer in 'codegen.c' reported by 'clang-analyzer'
2014-06-13 10:50:26 +01:00
Jose Narvaez
29f14e728d
Fixed dereference to null pointer in 'codegen.c' reported by 'clang-analyzer'
2014-06-13 10:50:15 +01:00
Jose Narvaez
44a5809224
Fixed possible division by zero in 'codegen.c' reported by 'clang-analyzer'
2014-06-13 10:09:28 +01:00
Yukihiro "Matz" Matsumoto
c2f6c33fef
reserve a register for a block parameter in a for statement body; ref #2375
2014-06-10 13:15:19 +09:00
Yukihiro "Matz" Matsumoto
6c524af646
NODE_FOR does not introduce new local variables
2014-06-10 00:03:54 +09:00
Yukihiro "Matz" Matsumoto
4c69a9d09e
codedump should display proper L(n) for OP_STRING op
2014-06-09 23:37:20 +09:00
Yukihiro "Matz" Matsumoto
41b46ca1ed
register<nlocals may not have a local variable name (e.g. a block arg); fix #2258
2014-05-16 00:04:55 +09:00
Mitchell Blank Jr
493025c3af
print_r() and print_lv() should only be compiled in for ENABLE_STDIO
2014-05-14 14:13:56 -07:00
Yukihiro "Matz" Matsumoto
2be348a0f1
mv opcode.h -> include/mruby/opcode.h and remove duplication from mruby-eval gem
2014-05-14 23:14:08 +09:00
Yukihiro "Matz" Matsumoto
9184d254e2
resize register number in LVAR section from 32bits to 16bits
2014-05-14 17:32:30 +09:00
Yukihiro "Matz" Matsumoto
10459a5eb2
Merge branch 'dump_lv' of https://github.com/take-cheeze/mruby into take-cheeze-dump_lv
2014-05-14 11:27:41 +09:00
take_cheeze
f2450928b2
Remove unnecessary newline in OP_GETGLOBAL codedump.
2014-05-13 22:47:43 +09:00
take_cheeze
5073d14e28
Remove lv_len and use nlocals - 1 instead.
...
Check that `lv`'s length is always `nlocals - 1`.
2014-04-29 22:06:59 +09:00
take_cheeze
4c7f9897c2
Support local variables information dumping.
2014-04-29 20:47:50 +09:00
Yukihiro "Matz" Matsumoto
0bdc87d239
indent codedump when file/line info is not available; ref #2147
2014-04-29 19:08:47 +09:00
take_cheeze
46d8c08a14
Use int32_t as line variable type.
2014-04-28 22:17:40 +09:00
take_cheeze
197f3cb901
Print file name and line number in codedump if available.
2014-04-28 22:12:45 +09:00
Yukihiro "Matz" Matsumoto
b1ec92f7cd
fix OP_BLKPUSH dump format
2014-04-28 11:59:46 +09:00
Yukihiro "Matz" Matsumoto
2e59cd43de
prevent printf warning
2014-04-28 08:30:57 +09:00
Yukihiro "Matz" Matsumoto
b53e69f18d
better codedump formatting
2014-04-28 08:02:47 +09:00
Yukihiro "Matz" Matsumoto
3244ddf0c3
presreve local variables names in irep->lv
2014-04-28 07:29:37 +09:00
cremno
91c22f32f4
rename mrb_str_buf_append to mrb_str_cat_str
...
The new name is better and less confusing, because:
- `mrb_str_append` calls `mrb_str_to_str` and this function doesn't
- `mrb_str_buf_append` _is_ `mrb_str_cat` for `mrb_value` strings
2014-04-27 22:33:22 +02:00
Yukihiro "Matz" Matsumoto
bbc237044d
NODE_SUPER should preserve stack region for block; ref #2136
2014-04-27 09:22:35 +09:00
Yukihiro "Matz" Matsumoto
26758d89bd
NODE_DEF should preserve stack region for lambda; ref #2136
2014-04-27 09:05:23 +09:00
mirichi
71395aba52
area of implicit nil is not enough to nregs
2014-04-26 20:20:23 +09:00
Yukihiro "Matz" Matsumoto
5bf327497f
bit more peephole optimization for NODE_LVAR
2014-04-26 17:19:52 +09:00
Yukihiro "Matz" Matsumoto
2202e412ea
Merge branch 'master' of github.com:mruby/mruby
2014-04-26 01:53:15 +09:00
Yukihiro "Matz" Matsumoto
44ec41a772
should use plain int for index, since i may be printed using %d; close #2127
2014-04-26 01:52:30 +09:00
Yukihiro "Matz" Matsumoto
c15da653b2
Merge pull request #2118 from ksss/range-bool
...
RRange excl flag use mrb_bool insteard of int
2014-04-26 01:30:04 +09:00
Yukihiro "Matz" Matsumoto
48f36d3f0e
better integer size assertion suggested by usak
2014-04-25 04:33:08 +09:00
Yukihiro "Matz" Matsumoto
83c1399af0
eliminate plain int except for a few cases like arena_index
2014-04-25 04:01:57 +09:00
Yukihiro "Matz" Matsumoto
320f0711f0
remove -Wsign-compare warnings
2014-04-25 02:33:33 +09:00
ksss
f1d85c2f97
mrb_range_new excl flag use mrb_bool insteard of int
2014-04-24 13:18:57 +00:00
take_cheeze
c0eaaf3559
Move src/re.h to include/mruby/re.h .
2014-04-16 22:39:57 +09:00
Yukihiro "Matz" Matsumoto
19c3c957fc
add assertion before casting
2014-04-03 20:23:39 +09:00
Yukihiro "Matz" Matsumoto
5be2bfb523
too much peephole optimization; close #1992
2014-04-03 10:14:38 +09:00