Yukihiro "Matz" Matsumoto
298177fd6a
Merge pull request #3813 from dabroz/feature-fix-date
...
Change DISABLE_STDIO to MRB_DISABLE_STDIO in mruby-time/time.c
2017-09-25 20:19:13 +09:00
Tomasz Dabrowski
e00b48be4a
change DISABLE_STDIO to MRB_DISABLE_STDIO in mruby-time/time.c
2017-09-25 13:11:20 +02:00
Yukihiro "Matz" Matsumoto
7450a774a5
The first instruction was skipped mistakenly in ensure clause; fix #3811
2017-09-23 10:12:04 +09:00
Yukihiro "Matz" Matsumoto
0ceaa0960a
OP_EPOP operand may be bigger than mrb->c->eidx; fix #3810
2017-09-22 13:00:58 +09:00
Yukihiro "Matz" Matsumoto
5760226e71
Remove temporary limitation of OP_EPOP.
...
After f68f5f6 , the operand of `OP_EPOP` should have been `1`.
Now we have removed the limitation.
2017-09-12 12:41:02 +09:00
Yukihiro "Matz" Matsumoto
d6e41c3e51
The callinfo stack may be reallocated in cipush; fix rest of #3809
...
fix #3809
2017-09-11 23:13:47 +09:00
Yukihiro "Matz" Matsumoto
3d8c1a7e97
The ensure stack may be empty at OP_EPOP; fix 1st part of #3809
2017-09-11 22:46:34 +09:00
Yukihiro "Matz" Matsumoto
2a1e616e4d
Avoid calling mrb_funcall to invoke #initialize from Class.new.
...
If `#initialize` is implemented in C, we don't need stack consuming
`mrb_funcall`.
2017-09-06 14:35:24 +09:00
Yukihiro "Matz" Matsumoto
cbfa2b3588
Avoid recursion from mark_context().
2017-09-05 21:13:16 +09:00
Yukihiro "Matz" Matsumoto
f68f5f6b97
Avoid crossing C function boundary from OP_EPOP; ref #3789
2017-09-05 21:12:36 +09:00
Yukihiro "Matz" Matsumoto
7f4b57bb20
Restrict OP_EPOP operand to 1; ref #3789
2017-09-05 21:11:41 +09:00
Yukihiro "Matz" Matsumoto
3acaa44a70
Restructure irep->outer chain; fix #3804
...
Instead of `irep -> proc` chain, we use `irep -> irep` chain to
avoid GC bugs like #3804 . We added `target_class` reference to
`mrb_irep` struct. That means one more word consumption per `irep`.
2017-09-04 06:51:31 +09:00
Yukihiro "Matz" Matsumoto
8a5d783f2e
Call initialize only when it's not empty.
2017-09-04 06:49:05 +09:00
Yukihiro "Matz" Matsumoto
5d7e4957e0
Merge pull request #3806 from flaviommedeiros/master
...
Trying to make the code more readable
2017-09-03 07:51:12 +09:00
Yukihiro "Matz" Matsumoto
da97715e11
Merge pull request #3805 from fl0l0u/patch-1
...
Update print.c
2017-09-03 07:48:33 +09:00
fl0l0u
e03042ec19
Update print.c
...
Strings not containing a newline are not printed synchronously
ex. bin/mruby -e '["a", "b", "c", "\n", "d", "e", "f", "\n"].each {|e| print e ; usleep 200000}'
2017-09-02 18:26:50 +02:00
Flavio Medeiros
9f677b72db
Trying to make the source code more understandable by removing mixing of ternary if statements with attributions.
2017-09-02 13:25:09 -03:00
Yukihiro "Matz" Matsumoto
476af3c647
Merge pull request #3802 from christopheraue/proc_break_tests
...
Tested local jump errors caused by break in a proc
2017-09-02 22:19:15 +09:00
Yukihiro "Matz" Matsumoto
ab99e2c293
Avoid copying over initialized procs using initialize_copy; fix #3803
...
It may be better to raise exceptions, but CRuby doesn't.
2017-09-01 06:51:59 +09:00
Yukihiro "Matz" Matsumoto
57610091ce
Update method cache clearing.
2017-09-01 06:51:59 +09:00
Yukihiro "Matz" Matsumoto
f0f4a1088a
Make the default integer size to be MRB_INT64 on 64bit systems; close #3800
...
Unless `MRB_NAN_BOXING` is specified.
2017-09-01 06:51:59 +09:00
Christopher Aue
35deaae776
Tested LocalJumpErrors caused by break in a proc
2017-08-30 12:25:55 +02:00
Yukihiro "Matz" Matsumoto
71357ff1d8
Merge pull request #3801 from christopheraue/assert_raise_refactoring
...
Allowed to pass multiple exceptions to assert_raise
2017-08-30 18:56:59 +09:00
Christopher Aue
bf32265743
Allowed to pass multiple exceptions to assert_raise
2017-08-30 11:03:51 +02:00
Yukihiro "Matz" Matsumoto
fe3227cd5c
Set the ORPHAN flag in Proc.new; fix #3798
2017-08-30 16:51:40 +09:00
Yukihiro "Matz" Matsumoto
483a038d39
Fixed a critical typo; ref #3798
2017-08-30 16:51:17 +09:00
Yukihiro "Matz" Matsumoto
2c85213298
Need to mark mrb->range_class; fix #3797
2017-08-30 16:12:12 +09:00
Yukihiro "Matz" Matsumoto
79b4f61b02
Merge pull request #3799 from christopheraue/assert_raise_refactoring
...
Refactored #assert_raise and #assert_nothing_raised
2017-08-30 14:47:12 +09:00
Christopher Aue
4b0b8f7e1a
Refactored #assert_raise and #assert_nothing_raised
2017-08-29 23:25:53 +02:00
Yukihiro "Matz" Matsumoto
8976f47e0a
Need to update ci after callinfo stack reallocation; fix #3796
2017-08-29 11:06:34 +09:00
Yukihiro "Matz" Matsumoto
c082249838
Exclude the top-level closure from each_object; fix #3793
2017-08-29 09:29:14 +09:00
Yukihiro "Matz" Matsumoto
786cbf06c3
Revert "Clear irep->outer when no Proc reference the irep; fix #3793 "
...
This reverts commit 15d48efa4b .
2017-08-29 09:27:45 +09:00
Yukihiro "Matz" Matsumoto
1260d3b68a
Add `__ENCODING__' support.
...
`__ENCODING__' returns the current encoding name (string), unlike
CRuby that returns the encoding object.
2017-08-28 22:42:06 +09:00
Yukihiro "Matz" Matsumoto
f1fa5bf1c6
Remove integer type mismatch warnings from parse.y.
2017-08-28 22:31:02 +09:00
Yukihiro "Matz" Matsumoto
15d48efa4b
Clear irep->outer when no Proc reference the irep; fix #3793
2017-08-28 10:06:04 +09:00
Yukihiro "Matz" Matsumoto
fd927d786e
Merge pull request #3795 from christopheraue/array_refactoring
...
Array refactorings and speed improvements
2017-08-27 08:56:41 +09:00
Christopher Aue
c956e17c02
Replaced Array#each with while loop for performance reasons
...
Example benchmark:
$ time build/bench/bin/mruby -e "Array.new(2_000_000){ |i| i }.index{ |i| i == 1_999_999 }"
Before:
real 0m0.934s
user 0m0.922s
sys 0m0.003s
After:
real 0m0.590s
user 0m0.583s
sys 0m0.007s
2017-08-26 15:57:25 +02:00
Christopher Aue
6c9013e22b
Removed unneeded block check in Array#uniq
2017-08-26 15:57:25 +02:00
Christopher Aue
f3fb43c729
Reimplemented Array#flatten with #flatten!
2017-08-26 15:57:25 +02:00
Yukihiro "Matz" Matsumoto
ccd555421a
Merge pull request #3794 from dabroz/fix-flt-epsilon
...
Fix building with MRB_USE_FLOAT=1
2017-08-26 22:29:00 +09:00
Tomasz Dąbrowski
01b9b71902
fix mrbgems/mruby-range-ext/src/range.c:142:71: error: use of undeclared identifier 'FLT_EPSILON'
2017-08-26 12:11:57 +02:00
Yukihiro "Matz" Matsumoto
85a400e43d
Reimplement Array#shift to be faster.
2017-08-26 02:03:21 +09:00
Yukihiro "Matz" Matsumoto
cec53ff77e
Array#first to treat 1 argument case specially to improve performance.
2017-08-26 02:03:21 +09:00
Yukihiro "Matz" Matsumoto
1b545a6b63
Check for ability to skip optional argument parsing.
2017-08-26 02:03:21 +09:00
Yukihiro "Matz" Matsumoto
60104ce41d
Silence compiler warning regarding float condition; fix #3790
2017-08-26 02:02:45 +09:00
Yukihiro "Matz" Matsumoto
43ec918be1
Remove unused mrb_obj_iv_ifnone() from API.
2017-08-26 02:01:50 +09:00
Yukihiro "Matz" Matsumoto
0e10a23d7a
Add checks if iv_tbl is NULL.
2017-08-26 02:01:50 +09:00
Yukihiro "Matz" Matsumoto
0c52112dd4
Keep Range class in mrb_state structure for performance.
2017-08-26 02:01:50 +09:00
Yukihiro "Matz" Matsumoto
04dbbff3c1
Use khash for instance variables tables instead of segment list.
...
For performance reason. Segmented list consumes slightly less memory
but takes a lot of time especially when there are many slots in the
segment lists (e.g. class constants).
2017-08-26 02:01:50 +09:00
Yukihiro "Matz" Matsumoto
f2cc1239a5
Turn on method cache for Travis CI.
2017-08-26 02:01:50 +09:00