Christian Mauceri
06ca237bab
pull request issue 553
2012-11-22 12:55:03 +01:00
Yukihiro Matz Matsumoto
0ab7ff81d6
should initialize irep->flags
2012-11-09 05:51:18 +09:00
Takashi Sogabe
c0c1c4da32
Fix stack underflow in scope_body()
...
Commit #18dd60c causes side effects.
This patch fixes stack underflow in scope_body().
2012-11-02 17:49:56 +09:00
Kouki Ooyatsu
35699424a9
fix: broken variable reference, use 'next' statement
...
Because the tree is gone pop() even if it is empty.
2012-10-31 20:20:36 +09:00
Yukihiro "Matz" Matsumoto
c6c4da8c48
Merge pull request #510 from masuidrive/master
...
define convert method mrb_int/mrb_float with C string
2012-10-28 10:45:43 -07:00
Yuichiro MASUI
15f46a1feb
define convert method mrb_int/mrb_float with C string
2012-10-27 14:26:50 +09:00
Masaki Muranaka
1933e2660c
Use substitution instead of memset in structure initialization.
2012-10-25 15:47:45 +09:00
Yukihiro Matsumoto
32f9cdc97d
adjust regsiter stack for NODE_OP_ASGN that use OP_SEND
2012-10-23 14:15:29 +09:00
Yukihiro Matsumoto
09376f9b2a
skip useless OP_MOVE in peephole optimization
2012-10-23 14:14:26 +09:00
Yukihiro Matsumoto
413528ce80
adjust regsiter stack for NODE_OP_ASGN; close #499
2012-10-23 11:35:26 +09:00
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