Yukihiro "Matz" Matsumoto
29d3a40418
stack adjustment after NODE_OP_ASGN with NODE_CALL was wrong; fix #3159
2016-05-16 01:49:24 +09:00
Yukihiro "Matz" Matsumoto
2e81fee731
parser_dump() to show symbol number for NODE_SYM
2016-05-16 01:49:24 +09:00
Yukihiro "Matz" Matsumoto
5933651ac7
Merge pull request #3157 from cremno/add-mrb_int_mul_overflow
...
add function for checked mrb_int multiplication
2016-05-11 09:41:19 +09:00
cremno
7453a5dfea
use mrb_int_mul_overflow()
2016-05-10 19:12:02 +02:00
cremno
6369374f79
add mrb_int_mul_overflow(); close #3149
...
- call __builtin_mul_overflow() if it's available
- perform a 64-bit multiplication for 32-bit mrb_int (default)
- otherwise a much slower method is used
2016-05-10 19:10:49 +02:00
Yukihiro "Matz" Matsumoto
0be4b8960e
Merge pull request #3156 from cremno/fix-mruby_version-value
...
fix MRUBY_VERSION value
2016-05-10 10:04:31 +09:00
Yukihiro "Matz" Matsumoto
4fd0cb61d7
Merge pull request #3154 from cremno/improve-checked-mrb_int-arithmetic-implementation
...
improve checked mrb int arithmetic implementation
2016-05-10 10:04:04 +09:00
Yukihiro "Matz" Matsumoto
bc715f9938
Merge pull request #3155 from cremno/fix-3152
...
fix #3152
2016-05-10 09:18:25 +09:00
cremno
bf63cff46e
fix MRUBY_VERSION value
...
RUBY_ENGINE_VERSION and MRUBY_VERSION should refer to the same string.
2016-05-09 17:19:47 +02:00
cremno
309791b3ae
raise the error at runtime; fix #3152
2016-05-09 16:57:56 +02:00
cremno
7276e84637
use type-generic checked arithmetic builtins
...
Version checking is not reliable - especially with Clang.
E.g. Apple's Clang (Xcode) uses different version numbers.
A feature check (__has_builtin) is the recommened way.
Add the MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS
macro which may be used in other files.
2016-05-09 16:52:57 +02:00
cremno
39b6a9dafc
define macros only if builtins are n/a
2016-05-09 16:34:20 +02:00
Yukihiro "Matz" Matsumoto
b4e1889813
Merge pull request #3153 from kou/remove-needless-assignment
...
Remove needless assignment
2016-05-09 17:35:19 +09:00
Kouhei Sutou
51cc35dc09
Remove needless assignment
...
d4ee409ae9 should remove this line.
2016-05-09 14:05:51 +09:00
Yukihiro "Matz" Matsumoto
ea033526fb
Merge pull request #3151 from okkez/use-stack-directly
...
Use stack directly
2016-04-27 12:14:54 +09:00
Kenji Okimoto
d4ee409ae9
Use stack directly
...
See https://github.com/mruby/mruby/pull/3142#issuecomment-201138873
2016-04-27 10:18:13 +09:00
Yukihiro "Matz" Matsumoto
8f0c1c7d3c
mruby-sprintf:fix double negative signs in printf; fix #3148
...
MRB_INT_MAX does not have corresponding positive integer
2016-04-23 23:50:01 +09:00
Yukihiro "Matz" Matsumoto
c5229074bb
mruby-sprintf: format specifiers o,u,x,b ignore sign(+); ref #3148
2016-04-23 22:20:11 +09:00
Yukihiro "Matz" Matsumoto
e5c2013829
Merge pull request #3147 from ksss/1.8
...
Avoid Syntax Error on CRuby v1.8
2016-04-16 23:27:15 +09:00
ksss
451523ff02
Avoid Syntax Error on CRuby v1.8
...
CRuby v1.8 dose not support named capture
2016-04-16 22:39:09 +09:00
Yukihiro "Matz" Matsumoto
fa1a17cbc4
Merge pull request #3145 from timoschilling/patch-1
...
fix syntax highlighting
2016-04-14 00:04:54 +09:00
Timo Schilling
1863f325c0
fix syntax highlighting
2016-04-13 13:41:31 +02:00
Yukihiro "Matz" Matsumoto
8c67e915b4
mruby-eval: instance_eval should keep target_class; close #3141
2016-04-11 14:28:44 +09:00
Yukihiro "Matz" Matsumoto
ae5b5ce575
vm.c: mrb_hash_set() may reallocate VM stack; close #3133
2016-04-11 14:11:44 +09:00
Yukihiro "Matz" Matsumoto
d97a37eb7b
fix possible memory leak in mruby-time gem
2016-04-04 21:58:46 +09:00
Yukihiro "Matz" Matsumoto
e1e888e354
fix too much optimization for ||=
2016-04-01 01:22:16 +09:00
Yukihiro "Matz" Matsumoto
d098d823de
fix duplicated eval in op_asgn
...
`a` in `a.m += c` or `a[b] += c` should be evaluated only once.
2016-03-30 20:43:57 +09:00
Yukihiro "Matz" Matsumoto
4979b52d61
reduce OP_ARRAY in argument splat
2016-03-30 01:35:11 +09:00
Yukihiro "Matz" Matsumoto
0e03a7f2a3
mruby-enum-ext: refine minmax
2016-03-30 01:12:18 +09:00
Yukihiro "Matz" Matsumoto
4d909d8b2b
Merge pull request #3142 from kou/add-missing-regs-update
...
Add missing regs update
2016-03-25 13:41:35 +09:00
Kouhei Sutou
c69cba2ad9
Add missing regs update
...
mrb_vm_define_class() may realloc() mrb->c->stack because it calls
mrb_funcall() for inherited hook. If mrb->c->stack is realloc()-ed, regs
refers orphan address.
2016-03-25 00:25:48 +09:00
Yukihiro "Matz" Matsumoto
dd072b5364
remove wrong ISO section from safe navigation test; ref 4c1ce0f6
2016-03-24 23:35:04 +09:00
Yukihiro "Matz" Matsumoto
3886becec5
better code generation for ||=; #3138
2016-03-24 16:03:58 +09:00
Yukihiro "Matz" Matsumoto
1ce471c1cc
||= with cvars and constants should work with false values; #3138
2016-03-24 07:59:58 +09:00
Yukihiro "Matz" Matsumoto
4fcff34747
||= reference error can happen with constants as well; #3138
2016-03-23 23:51:23 +09:00
Yukihiro "Matz" Matsumoto
817b884343
add #dig tests
2016-03-23 12:34:32 +09:00
Yukihiro "Matz" Matsumoto
daf83946bb
add #dig to Array,Hash and Struct
2016-03-23 11:49:28 +09:00
Yukihiro "Matz" Matsumoto
4c1ce0f61c
add safe-navigation operator tests
2016-03-23 08:51:25 +09:00
Yukihiro "Matz" Matsumoto
21a3ae08f7
add safe-navigation (aka lonely) operator &.
2016-03-23 08:51:25 +09:00
Yukihiro "Matz" Matsumoto
7d0612528e
Merge pull request #3139 from cremno/fix-vs2010-build
...
deprecate and fix VS2010/2012 build
2016-03-23 00:22:26 +09:00
cremno
30b0100e6c
fix VS2010/2012 build
...
They don't have <inttypes.h>, only <stdint.h>.
2016-03-22 11:46:49 +01:00
cremno
bfc7b2e30f
deprecate Visual Studio 2010 and 2012
2016-03-22 11:41:16 +01:00
cremno
611e99e741
remove unnecessary array/each
2016-03-22 11:38:09 +01:00
Yukihiro "Matz" Matsumoto
2b0baec32a
fixed silly class variable/constant confusion; #3138
2016-03-22 00:06:32 +09:00
Yukihiro "Matz" Matsumoto
a02acf2635
rescue NameError from class variable access like @@foo ||= 42; fix #3138
2016-03-21 03:49:08 +09:00
Yukihiro "Matz" Matsumoto
643d967b10
Merge pull request #3131 from bggd/fix_bintest_on_windows
...
Fix doesn't work bintest on :visualcpp toolchain
2016-03-16 16:29:14 +09:00
Yukihiro "Matz" Matsumoto
52d388515f
Merge pull request #3132 from pbosetti/edison
...
Added example for cross-compiling on Intel Edison
2016-03-16 16:28:35 +09:00
Yukihiro "Matz" Matsumoto
273eac6b64
Merge pull request #3136 from bggd/add_appveyor
...
Add appveyor.yml
2016-03-16 16:27:58 +09:00
bggd
51cb72962d
Create appveyor_config.rb
2016-03-15 20:43:51 +09:00
bggd
87e5b0f30c
Add appveyor.yml for Visual Studio 2015/2013
2016-03-15 20:41:15 +09:00