Yukihiro Matsumoto
7fe6d00ff5
avoid duplicated OP_RETURN
2012-10-20 09:48:04 +09:00
Yukihiro Matsumoto
750b7c209c
pop register stack before rescue
2012-10-20 08:44:25 +09:00
Yukihiro Matsumoto
89a18e4f22
unexpect break/next/redo/retry should raise LocalJumpError
2012-10-20 03:59:13 +09:00
Yukihiro Matsumoto
da637cac4a
should handle break in rescue
2012-10-20 03:30:58 +09:00
Yukihiro Matsumoto
651e8b7e9c
empty NODE_BEGIN should push nil; close #496
2012-10-19 23:04:20 +09:00
Takashi Sogabe
8d6f1b04a1
Fix disappearance of a local variable when return statement is called
...
Commit of #18dd60c causes disappearance of a local variable
if return statement is called without arguments.
This patch fixes incorrect value of stack pointer.
test program:
def test_return_cond
return if nil
obj = 123
p obj
p obj.class
end
test_return_cond
output(commit #18dd60c):
main
Object
output(includes this patch):
123
Fixnum
2012-10-17 12:55:50 +09:00
Yukihiro Matsumoto
18dd60c162
remove wasting stack space
2012-10-16 23:47:16 +09:00
Yukihiro Matsumoto
f2da76b6ef
register number adjustment for case statement was wrong; close #487
2012-10-16 22:24:40 +09:00
Yukihiro Matsumoto
540066c9e2
mrb_sym can be short integer; reduced 10KB
2012-09-12 16:20:32 +09:00
Tomoyuki Sahara
20e9d53fb8
fix out-of-bound access on compiling empty blocks.
2012-09-04 15:59:39 +09:00
Yukihiro Matsumoto
4e8317f5df
do no generate lineno info if no filename is specified
2012-09-03 15:33:35 +09:00
Yukihiro Matsumoto
4f7a1a167d
remove memleaks using linked allocator
2012-09-03 08:34:31 +09:00
Yukihiro Matsumoto
5340126443
remove OP_LOADNIL before OP_SEND by introducing OP_SENDB (send with block)
2012-09-03 08:32:57 +09:00
Yukihiro Matsumoto
9c12b47d73
peephole optimization to generatio OP_ADDI/OP_SUBI
2012-09-03 00:05:28 +09:00
Yukihiro Matsumoto
f114916610
source position added to exception representation
2012-08-31 15:58:33 +09:00
Yukihiro Matsumoto
3e924e887f
save debugging lineno info in irep
2012-08-31 11:12:33 +09:00
Yukihiro Matsumoto
950204bc4d
remove flags from irep
2012-08-29 11:45:36 +09:00
Yukihiro Matsumoto
376266959f
close pool in toplevel scope
2012-08-28 02:05:42 +09:00
Yukihiro Matsumoto
15725eb4f6
file/line info passed to codegen; argument type of mrb_generate_code() has changed
2012-08-22 22:36:44 +09:00
Yukihiro Matsumoto
1ed39d5c05
use TRUE/FALSE instead of 1/0
2012-08-13 04:19:24 +09:00
Yukihiro Matsumoto
4debf651a3
optimize assignment just before OP_RETURN
2012-08-10 05:15:58 +09:00
Yukihiro Matsumoto
7c4bd7fffd
remove OP_MOVE just before OP_RETURN
2012-08-05 17:07:43 +09:00
Yukihiro Matsumoto
b8b22c1d17
use mrb_obj_equal to check pool
2012-08-02 22:15:49 +09:00
Yukihiro Matsumoto
a7f0e3bc80
small return optimization: use R0 to set return value if possible
2012-08-02 13:13:41 +09:00
Yukihiro Matsumoto
91318da3bc
wrong return value from empty block/lambda
2012-08-02 12:57:57 +09:00
Yukihiro Matsumoto
dcfff971ff
remove OP_LOADNIL from NODE_OP_ASGN
2012-08-02 00:48:50 +09:00
Yukihiro Matsumoto
0220953efe
no OP_LOADNIL for operators (OP_ADD, etc)
2012-08-01 02:33:55 +09:00
Yukihiro Matsumoto
cde3c35666
too much peephole optimization
2012-08-01 01:11:16 +09:00
Yukihiro Matsumoto
1563cdfcce
float do not have enough precision to represent Fixnum if MRB_USE_FLOAT is set
2012-08-01 00:06:50 +09:00
Yukihiro Matsumoto
e87c95eba7
codegen optimization based on http://d.hatena.ne.jp/mirichi/20120730/p1 [Japanese].
2012-07-31 22:21:42 +09:00
Max Anselm
5a4beeed2d
Make all(?) void casts explicit for C++
2012-07-29 19:48:48 -04:00
Yukihiro Matsumoto
7f8076ef90
more peephole optimization on OP_MOVE
2012-07-28 11:23:29 +09:00
Yukihiro Matsumoto
b60baedae5
replace strcpy by memcpy; close #383
2012-07-19 08:23:49 +09:00
Yukihiro Matsumoto
49cac5f97d
case should care about return value; close #372
2012-07-16 11:54:35 +09:00
Junji Sawada
96366117ea
Remove unnecessary header inclusion
2012-07-14 11:39:25 +09:00
Yukihiro Matsumoto
737eaea038
allow DISABLE/ENABLE_SATDIO
2012-07-13 15:00:45 +09:00
Yukihiro Matsumoto
bbec03bb7a
add missing (empty) default for swtch; close #364
2012-07-13 14:35:18 +09:00
Yukihiro Matsumoto
fbd5305c1b
remove comma from OP_ERR
2012-07-13 10:11:11 +09:00
Yukihiro Matsumoto
ca930538ea
prepare for OP_TAILCALL
2012-07-05 01:40:23 +09:00
Yukihiro Matsumoto
ee32521f90
add input check to readint_float()
2012-07-04 17:14:59 +09:00
Yukihiro Matsumoto
472847adc2
input cast to unsigned char for unqualified tolower(); close #342
2012-07-04 17:12:47 +09:00
Yukihiro Matsumoto
4a98d5c8fd
allow string interpolation in symbols like :"a=#{15}"
2012-06-28 23:35:17 +09:00
Masaki Muranaka
d534f26f16
Use sizeof to get char array sizes.
2012-06-27 10:36:39 +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
9936ce997c
forgot to rename function mrb_sym2name -> mrb_sym2name_len
2012-06-21 16:27:05 +09:00
Yukihiro Matsumoto
a70c4e0c79
reduce calling of strlen(); #301
2012-06-21 16:22:29 +09:00
Masaki Muranaka
aa1bbe67b6
Simplify. Should not use strlen() as possible. It needs complexity.
2012-06-21 11:17:16 +09:00
Yukihiro Matsumoto
4aa9111f9a
escape codedump strings/symbols
2012-06-15 14:45:03 +09:00
Masaki Muranaka
f564ec7e82
Remove some redundant code.
2012-06-15 00:56:00 +09:00
Yukihiro Matsumoto
3fb20bc72a
BLKPUSH (and super) need to detect surrounding method scope (not block)
2012-06-14 03:45:28 +09:00