Commit Graph

894 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 0debca9bdf Merge pull request #500 from monaka/pr-avoid-memcpy-on-copying-structure
Avoid memcpy() on copying structures.
2012-10-21 16:42:56 -07:00
Masaki Muranaka d5c4439013 Avoid memcpy() on copying structures. 2012-10-21 00:49:39 +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 9bb6f0b331 pool string need not to convert 2012-10-20 03:32:02 +09:00
Yukihiro Matsumoto da637cac4a should handle break in rescue 2012-10-20 03:30:58 +09:00
Yukihiro Matsumoto 400a9d8101 shuld handle return in rescue; close #497 2012-10-19 23:18:57 +09:00
Yukihiro Matsumoto 651e8b7e9c empty NODE_BEGIN should push nil; close #496 2012-10-19 23:04:20 +09:00
Yukihiro "Matz" Matsumoto eaf26aa57e Merge pull request #495 from iij/pr-hexstr-load-broken
Fix wrong storage of data when hex-style string is loaded
2012-10-19 05:31:58 -07:00
Yukihiro Matsumoto ac3b1c4c5a lshift must not assume sizeof(long) >= sizeof(mrb_int) 2012-10-19 01:50:40 +09:00
Takashi Sogabe c2a6ff7af8 Fix wrong storage of data when hex-style string is loaded
This patch fixes corruption of data when hex-style string is
loaded.

I saw following phenomenon in an ubuntu/amd64 environment.

Test code:
str = "\x0\x1\x2\x03\x04\x05\x06\a\b\t\n\v\f\r\x0E\x0F\x10"
p str[-1] == "\0x10"

Output(binary program with mrbc -B):
false

Output(script with mruby):
true
2012-10-18 17:35:56 +09:00
Yukihiro Matsumoto ace6fe76e4 Merge branch 'master' of github.com:mruby/mruby 2012-10-17 22:26:18 +09:00
Yukihiro "Matz" Matsumoto 73e9c78bc4 Merge pull request #493 from iij/pr-return-breaks-sp
Fix disappearance of a local variable when return statement is called
2012-10-17 06:25:59 -07:00
Masaki Muranaka e84dfd4337 Fix degrades by #490. (Some changes are reverted.) 2012-10-17 21:32:50 +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 8d977981b7 no memory copy for call_iseq 2012-10-17 05:59:29 +09:00
Yukihiro Matsumoto 70abbb423a should not free() static iseq from cdump 2012-10-17 02:57:40 +09:00
Yukihiro Matsumoto 18dd60c162 remove wasting stack space 2012-10-16 23:47:16 +09:00
Yukihiro Matsumoto 8271863fe5 Kernel#block_given? always gave false 2012-10-16 23:46:34 +09:00
Yukihiro Matsumoto 27f002496f true/false should print proper inspect string 2012-10-16 22:33:34 +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 1bf70ea255 1.divmod(0) should not crash, but return [Inf,NaN] (CRuby incompat); close #492 2012-10-16 21:18:28 +09:00
Masaki Muranaka 93b56e70ee Avoid memcpy() on copying structure. 2012-10-15 13:56:45 +09:00
Masaki Muranaka e8abf03ae5 Avoid memcpy() on copying structure. 2012-10-15 13:53:44 +09:00
Masaki Muranaka 170d5e7181 Avoid memcpy() on copying structure. 2012-10-15 13:15:29 +09:00
Beoran 8949e3c7fb Bugfix for crash if main was extended with a module. 2012-10-09 21:45:41 +02:00
Yukihiro Matsumoto 2830624410 fix indent of mrb_exc_raise 2012-10-04 14:20:33 +09:00
Yukihiro Matsumoto 3a6b6518d6 should handle exception from Ruby implemented method called from funcall; close #484 2012-10-04 11:30:28 +09:00
Yukihiro "Matz" Matsumoto be8f3909f7 Merge pull request #481 from monaka/pr-tiny-cleanup-20120929
Tiny clean-up
2012-09-29 16:43:29 -07:00
Yukihiro Matsumoto a3d7960a44 wrong termination of mrb_run on exception; close #480 2012-09-30 08:42:10 +09:00
Masaki Muranaka d085ac228e mrb_long2int(n) : Remove as unused.
defines.h : Remove as already commented out.
2012-09-29 17:00:32 +09:00
Yukihiro Matsumoto 5adbbe66d8 should adjust array size 2012-09-27 17:17:14 +09:00
Yukihiro Matsumoto 7171e5aa18 load_exec should return undef on syntax errors 2012-09-27 11:28:15 +09:00
Yukihiro Matsumoto 190fc76091 should not call mrb_parser_free() on NULL pointer 2012-09-26 08:15:09 +09:00
Yukihiro Matsumoto 84008f99d5 should adjust pc after OP_CALL 2012-09-21 15:10:38 +09:00
Yukihiro Matsumoto 44b28a83f8 OP_CALL for cfunc must restore callinfo; close #476 2012-09-20 18:26:51 +09:00
Yukihiro Matsumoto f0f113ef0e should define String#+ (non inlined); close #469 2012-09-13 22:28:04 +09:00
Yukihiro Matsumoto 8d97a8e069 Merge branch 'master' of github.com:mruby/mruby 2012-09-13 05:56:46 +09:00
Tomoyuki Sahara 7a7f267b88 check if an Exception instance has a "mesg" attribute
fix the issue that "Exception.new.inspect" causes SIGSEGV.
2012-09-12 20:08:56 +09:00
Yukihiro Matsumoto 540066c9e2 mrb_sym can be short integer; reduced 10KB 2012-09-12 16:20:32 +09:00
Yukihiro Matsumoto 3a49dfd198 remoce duplicate declaration of TOUPPER/TOLOWER 2012-09-12 16:09:03 +09:00
Tomoyuki Sahara 32b88c72af two more wrapper macros for ctype.h
we need them on the platform where 'char' is signed.
2012-09-12 14:02:58 +09:00
Yukihiro Matsumoto 54101eec43 typo fixed 2012-09-12 07:41:28 +09:00
Yukihiro Matsumoto cdbd116c49 Merge branch 'master' of github.com:mruby/mruby 2012-09-12 07:40:38 +09:00
Yukihiro "Matz" Matsumoto bcd77200ac Merge pull request #463 from emboss/define_dbl_dig_conditionally
Define DBL_DIG only if it wasn't previously defined
2012-09-10 23:00:30 -07:00
Shannen Saez 4df4dc9ecd Fixes #464. 2012-09-11 14:30:44 +10:00
emboss a24fde1889 Define DBL_DIG only if it wasn't previously defined
DBL_DIG may already be defined on the target system,
defining it without checking first may overwrite
system values.
2012-09-11 03:02:28 +02:00
Yukihiro "Matz" Matsumoto 835eac6234 Merge pull request #461 from bovi/makefile-writing-fixes
Fix writing errors in Makefiles
2012-09-10 17:04:39 -07:00
Daniel Bovensiepen f6a9846d0e Fix writing errors in Makefiles 2012-09-10 23:25:50 +08:00