Yukihiro "Matz" Matsumoto
9e40586d43
Add cast to mrb_int in mrb_fixnum() when MRB_WORD_BOXING.
...
Without this cast, `long int:63` can cause warnings.
2017-05-26 02:16:18 +09:00
Yukihiro "Matz" Matsumoto
7e4731655f
Fixed off-by-one error in fiber_switch(); ref #3641
2017-05-26 01:24:28 +09:00
Yukihiro "Matz" Matsumoto
f75f506181
Revert 01f7825; fix #3650
...
Redundant `mark_context() is far better than crashes.
2017-05-25 21:58:15 +09:00
Yukihiro "Matz" Matsumoto
ac442bc1df
Raise an exception when transfer arguments are too many; fix #3641
...
The fix was proposed by @block8437. Thank you.
2017-05-25 21:39:13 +09:00
Yukihiro "Matz" Matsumoto
de48d95c6d
Avoid marking possibly freed stack; #3550 #3612
2017-05-25 19:58:06 +09:00
Yukihiro "Matz" Matsumoto
c53747dbdf
Revert "Use env preserved in Proc structure in ecall(); fix #3612 "
...
This reverts commit e26e118604 .
Fix #3664
2017-05-25 19:57:46 +09:00
Yukihiro "Matz" Matsumoto
517cd51cea
Invoke ensure clauses before switching context from fibers; fix #3662
2017-05-25 14:36:25 +09:00
Yukihiro "Matz" Matsumoto
ed16535c73
Clear top level env in mrb_top_run(); fix #3643
2017-05-25 14:13:54 +09:00
Yukihiro "Matz" Matsumoto
f88cb88073
Avoid unsharing stack if env refers top-level; ref #3643
2017-05-25 14:13:16 +09:00
Yukihiro "Matz" Matsumoto
e0931126ff
Check env stack length before OP_SETUPVAR; ref #3643
2017-05-25 14:12:16 +09:00
Yukihiro "Matz" Matsumoto
e969229b77
Check backtrace info may not be set (esp. NoMemError); fix #3663
2017-05-25 12:56:19 +09:00
Yukihiro "Matz" Matsumoto
5e1a6a2cc2
Make gen_assignment() to support NODE_SCALL; ref #3658
2017-05-25 12:40:49 +09:00
Yukihiro "Matz" Matsumoto
4566c80d7b
Free given pointer if realloc() fails; fix #3658
2017-05-25 12:36:38 +09:00
Yukihiro "Matz" Matsumoto
ff46957ef0
Avoid using mrb_raise() in mrb_vm_exec(); ref #3660
2017-05-25 11:11:40 +09:00
Yukihiro "Matz" Matsumoto
3ef97e3dd9
Under MRB_INT64, width may be bigger than INT_MAX; fix #3665
2017-05-25 10:40:35 +09:00
Yukihiro "Matz" Matsumoto
9bca887ac4
Preserve the current pc before method_missing(); fix #3660
2017-05-25 10:31:48 +09:00
Yukihiro "Matz" Matsumoto
9644ad51b4
Simplify backtrace mechanism; fix #3633 #3634 #3644
...
Instead of preserving a backtrace in `mrb_state`, `mrb_exc_set`
keeps packed backtrace in an exception object. `#backtrace` unpacks
it to an array of strings.
2017-05-23 23:50:42 +09:00
Yukihiro "Matz" Matsumoto
d2458e66c2
Remove class info from backtrace lines.
2017-05-23 23:50:42 +09:00
Yukihiro "Matz" Matsumoto
497b19ce22
Support the case when the backtrace is not an array.
2017-05-23 23:50:42 +09:00
Yukihiro "Matz" Matsumoto
a1ea2a670c
Use index in each_object.
2017-05-23 23:50:42 +09:00
Yukihiro "Matz" Matsumoto
24a24a41dd
Type check before print_backtrace()
2017-05-23 23:50:42 +09:00
Yukihiro "Matz" Matsumoto
bb0b52a568
Update comments regarding Exception#to_str
2017-05-23 23:50:42 +09:00
Yukihiro "Matz" Matsumoto
1bb6964db6
Merge pull request #3661 from ksss/string-concat
...
String#concat: Try to convert when not string
2017-05-21 22:53:01 +09:00
ksss
98f9c33fe0
String#concat: Try to convert when not string
2017-05-21 10:30:27 +09:00
Yukihiro "Matz" Matsumoto
78add72812
Merge pull request #3659 from craiglrock/master
...
Avoid call to_s during backtrace traversal
2017-05-16 10:04:19 +09:00
Craig Lehmann
3de2da409b
Avoid call to_s during backtrace traversal
2017-05-15 20:40:47 -04:00
Yukihiro "Matz" Matsumoto
82bc036a59
Merge pull request #3657 from ksss/str-embed
...
Make string embad from shared
2017-05-14 00:28:32 +09:00
ksss
bdb36b3404
Make string embad from shared
2017-05-13 22:44:52 +09:00
Yukihiro "Matz" Matsumoto
171e732dc7
Merge pull request #3656 from clayton-shopify/fix-codegen-default
...
Change return back to break in the default case.
2017-05-13 09:37:34 +09:00
Clayton Smith
bf30b8e8bf
Change return back to break in the default case.
2017-05-12 14:43:12 -04:00
Yukihiro "Matz" Matsumoto
011e0bb0d9
Merge pull request #3649 from ksss/sprintf
...
Fix segmentation fault ref: #3648
2017-05-09 07:40:08 +09:00
ksss
30df7c8762
Fix segmentation fault ref: #3648
2017-05-08 23:18:14 +09:00
Yukihiro "Matz" Matsumoto
ef305305b4
Merge pull request #3647 from ksss/split
...
Adjust to the optimum type
2017-05-05 21:34:59 +09:00
ksss
8cba9a9e42
Adjust to the optimum type
2017-05-05 14:20:21 +09:00
Yukihiro "Matz" Matsumoto
964a02f1fa
Merge pull request #3645 from nobu/sprintf-refactor
...
Sprintf refactor
2017-04-29 13:10:34 +09:00
Nobuyoshi Nakada
ef6e14ee2b
Better error message
...
Raise argument error with the better message, at the only place
where the size to fill can be negative.
2017-04-29 10:17:24 +09:00
Nobuyoshi Nakada
e05c30738e
Use FILL and PUSH
...
Instead of loop or `memcpy` after `CHECK`, use dedicated macros,
`FILL` and `PUSH`, respectively.
2017-04-29 10:10:31 +09:00
Yukihiro "Matz" Matsumoto
3c10783769
Merge pull request #3639 from Asmod4n/patch-1
...
Add macOS support to mrb_ro_data_p
2017-04-26 07:49:14 +09:00
Asmod4n
9057a3f3be
Add macOS support to mrb_ro_data_p
...
This adds macOS support to mrb_ro_data_p, fixes #3636
2017-04-25 20:34:07 +02:00
Yukihiro "Matz" Matsumoto
cef523cc19
Avoid duplicated envadjust() of env stacks; fix #3637
2017-04-25 22:31:02 +09:00
Yukihiro "Matz" Matsumoto
a3d80e8e73
Merge pull request #3637 from dabroz/fix-32-bit
...
Restore 32-bit OSX builds
2017-04-25 22:03:50 +09:00
Yukihiro "Matz" Matsumoto
3e07a2d77c
Silence warnings caused by implicit type casting.
2017-04-25 21:00:16 +09:00
Yukihiro "Matz" Matsumoto
92dcfbaab3
Add explicit cast from double to long.
2017-04-25 17:43:03 +09:00
Yukihiro "Matz" Matsumoto
b08dced2a6
Stop invoking GC before each_object to avoid test failure; #3616
2017-04-25 17:39:06 +09:00
Yukihiro "Matz" Matsumoto
aa8e490fd5
Prevent GC during each_object; fix #3616
2017-04-25 17:25:48 +09:00
Yukihiro "Matz" Matsumoto
88cd807379
Avoid use of snprintf() when DISABLE_STDIO is set; fix #3632
...
ref #3492 #3515 #3517
2017-04-25 10:41:50 +09:00
Yukihiro "Matz" Matsumoto
03cdb8e9dd
Should terminate nested iterations in each_object; ref #3359
2017-04-25 10:41:50 +09:00
Yukihiro "Matz" Matsumoto
058da1fed2
Revert "Disable GC during gc_each_objects(); fix #3616 "
...
This reverts commit d2cad9ac5b .
2017-04-25 10:41:50 +09:00
Yukihiro "Matz" Matsumoto
01f7825852
Use fiber marking instead of mark_context.
...
To avoid redundant `mark_context()`.
2017-04-25 10:41:50 +09:00
Tomasz Dąbrowski
b1120464e0
Revert "Simplify pointer calculation in envadjust."
...
This reverts commit a1d32af916 .
2017-04-24 23:57:39 +02:00