Commit Graph

42 Commits

Author SHA1 Message Date
Yukihiro Matsumoto c99b806f8b ci->acc should not be left uninitialized; close #303 2012-06-25 19:24:57 +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 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
Yukihiro Matsumoto ef50e63a63 remove RuntimeError from mrb_state 2012-06-20 20:43:27 +09:00
Yukihiro Matsumoto 88db589e7f protect crash from empty irep 2012-06-20 15:12:35 +09:00
Yukihiro Matsumoto 5353b8555c exception jump should not cross mrb_funcall border; close #276 2012-06-15 22:57:11 +09:00
Yukihiro Matsumoto 4913311155 should not swallow exceptions from ensure clause 2012-06-15 16:20:25 +09:00
Yukihiro Matsumoto 2eeaab4e81 do not offset jump from OP_ENTER if no optional argument given 2012-06-14 04:44:02 +09:00
Yukihiro Matsumoto 36a1c80d3c uvenv(): proc->env may be NULL be before uplevel 2012-06-14 03:44:45 +09:00
Yukihiro Matsumoto 6adaf3b80f should invoke ensure clauses just before terminating mrb_sun; close #270 2012-06-14 01:47:31 +09:00
Yukihiro Matsumoto 6a5019d37f optimized OP_{ADD,SUB,MUL,DIV} to use numeric function for fixnums to handle overflow 2012-06-13 15:38:18 +09:00
Yukihiro Matsumoto 6247eafc71 should raise error on top-level super/yield 2012-06-12 01:24:11 +09:00
Yukihiro Matsumoto 13a542d48d zsuper should respect block given; close #185 2012-06-11 15:55:04 +09:00
Yukihiro Matsumoto 85901e0546 fixed typo DISPACTH to DISPATCH 2012-06-10 21:44:57 +09:00
Yukihiro Matsumoto 4c01f002fd mruby/array.h: rename buf to ptr 2012-06-05 23:20:36 +09:00
Yukihiro Matsumoto e88e30524e should have adjusted stack address kept in closures; close #222 2012-06-03 14:44:46 +09:00
Yukihiro Matsumoto 27c2416d20 stack_extend boundary condition was wrong 2012-06-03 14:13:25 +09:00
Yukihiro Matsumoto ea9bb1e38f adjust stack position before exiting mrb_run(); close #193 2012-05-25 13:48:54 +09:00
Yukihiro Matsumoto ad9e841c53 made mrb_get_args() better (optinal args, type checks); close #173 #176 2012-05-24 01:09:36 +09:00
Yukihiro Matsumoto 4523bee953 cast style consistency 2012-05-23 03:31:55 +09:00
Yukihiro Matsumoto 84a2fb102c wrong stack position in rescue clause 2012-05-21 10:25:26 +09:00
Mitchell Blank Jr 9e336b00e5 More C++ compilability work: mrb_obj_alloc void* conversions
One of the biggest set of changes needed to make C++ compile, is that you
can't autoconvert "void*" to a different pointer type without a cast (you
can of course, convert pointers *to* "void*"!)

For the first part, convert the users of "mrb_obj_alloc".  Since it has
to return something, make it RBasic* (that's what mrb_obj_alloc() is
operating on anyway).  This way, even in C you'll get a warning if you
don't cast it.

For places where there are a lot of similar calls to mrb_obj_alloc(),
this can be easily hidden through a macro.  I did this in string.c:
    #define mrb_obj_alloc_string(mrb) ((struct RString *) mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))

I also updated the mrb_object() macro to also return a RBasic* -- my
previous commit changed that from "void*" -> "RObject*", but I figure
it should be consistent with mrb_obj_alloc()
2012-05-20 09:43:14 -07:00
Masaki Muranaka 6250d06b94 Avoid "may be used uninitialized in this function" warning. 2012-05-16 16:28:07 +09:00
Yukihiro Matsumoto 1c6621d5f0 OP_STOP to return exception object on error 2012-05-14 23:22:08 +09:00
Yukihiro "Matz" Matsumoto 96819cf881 Merge pull request #117 from k-tsj/toplevel-return
Raise LocalJumpError when returning from top-level
2012-05-12 02:58:00 -07:00
Kazuki Tsujimoto 66df0ad0a8 Raise LocalJumpError when returning from top-level 2012-05-12 10:59:36 +09:00
Kazuki Tsujimoto 632556bc6f Move stack values to heap whenever ci is popped 2012-05-12 10:47:15 +09:00
Yukihiro Matsumoto 878593430a mrb_run to return last evaluated value 2012-05-10 18:20:49 +09:00
Yukihiro Matsumoto 164c0463b2 use DIRECT_THREADED only on GCC 2012-05-09 10:58:32 +09:00
Yukihiro Matsumoto f4cf8ea423 partial VC support 2012-05-09 08:49:38 +09:00
Yukihiro Matsumoto b0e94d8c14 Time class available; based on code from @beoran; sorry for jumbo patch 2012-05-06 00:52:22 +09:00
Yukihiro "Matz" Matsumoto 91a9054073 Merge pull request #96 from k-tsj/fix-return-segv
Fix SEGV when returning from terminated method
2012-05-04 05:23:34 -07:00
Kazuki Tsujimoto 7e1df10517 Fix SEGV when returning from terminated method 2012-05-04 18:34:13 +09:00
Kazuki Tsujimoto 1c2f37434b LocalJumpError message contained garbage characters 2012-05-04 18:18:54 +09:00
Carson McDonald 88cdb52133 Fixed issue with reference to i in union, should have been sym 2012-05-01 13:08:37 -04:00
roco 4ec6d41f16 rm whitespace 2012-04-30 14:29:19 -07:00
Patrick Hogan 132dd25528 Remove a bunch of unused variables.
Removed or commented out to stop compiler whining about them.

Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
2012-04-26 08:36:32 -05:00
Yukihiro Matsumoto 8b367098ac move header files {irep,dump,cdump,ritehash}.h to /include/mruby 2012-04-24 17:41:28 +09:00
Yukihiro Matsumoto 2fc1b8af2d mv variable.h to mruby/variable.h 2012-04-24 15:59:50 +09:00
mimaki 835443614d add file header 2012-04-23 11:46:16 +09:00
mimaki e0d6430f63 add mruby sources 2012-04-20 09:39:03 +09:00