Commit Graph

7851 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto ff262f2133 Update ci->mid according to surrounding scope; fix #3490 2017-03-10 12:37:19 +09:00
Yukihiro "Matz" Matsumoto 2f299cf4dc Simplify expression; ref #3490 2017-03-10 12:36:58 +09:00
Yukihiro "Matz" Matsumoto e8f09f9393 Raise special Exception when exception class is redefined; fix #3493 2017-03-10 11:43:25 +09:00
Yukihiro "Matz" Matsumoto c6e5659fec Use string#upto() if available; fix #3489
Terminate loop if the value is longer than the last otherwise.
2017-03-10 10:39:43 +09:00
Yukihiro "Matz" Matsumoto 4763312fb8 Terminate loop if generated string longer than the last; ref #3489 2017-03-10 10:38:28 +09:00
Yukihiro "Matz" Matsumoto 63dbed0094 __FILE__ should not update p->filename; fix #3485 2017-03-07 15:01:09 +09:00
Yukihiro "Matz" Matsumoto 513f4fbf14 Merge pull request #3484 from ksss/string-frozen
Check modifiable for String `bang' methods
2017-03-06 07:38:56 +09:00
Yukihiro "Matz" Matsumoto 8a15abdac2 Avoid trampoline code if mrb_f_send is called from funcall; fix #3383 2017-03-06 07:35:41 +09:00
ksss eba4b1fd76 Check modifiable for String `bang' methods 2017-03-05 23:04:22 +09:00
Yukihiro "Matz" Matsumoto d050694580 Merge pull request #3483 from ksss/string-index
String#index shouldn't return nil when "".index ""
2017-03-05 20:27:28 +09:00
ksss 76e10351fa String#index shouldn't return nil when "".index "" 2017-03-05 14:15:18 +09:00
Yukihiro "Matz" Matsumoto 4f43db862a Unshare popped TT_ENV objects. 2017-03-04 22:45:44 +09:00
Yukihiro "Matz" Matsumoto 3b40a2f6b5 Limit ecall() recursion levels; fix #3466 2017-03-04 18:56:20 +09:00
Yukihiro "Matz" Matsumoto ecee8c51b0 Avoid tracing shared TT_ENV object. 2017-03-04 18:53:36 +09:00
Yukihiro "Matz" Matsumoto c789acbc36 Save/restore arena index in the loop. 2017-03-04 18:52:51 +09:00
Yukihiro "Matz" Matsumoto ffdf7be723 Define jmpbuf_id outside of extern "C"; ref #3470 2017-03-02 20:42:06 +09:00
Yukihiro "Matz" Matsumoto 2d858cab3d Use C++ ABI only when MRB_ENABLE_CXX_ABI is set; ref #3470 2017-03-02 20:37:21 +09:00
Yukihiro "Matz" Matsumoto 1ab7e7e4dc Fixed a bug in register size calculation; fix #3479 2017-03-02 18:14:36 +09:00
Yukihiro "Matz" Matsumoto 3390020fd0 The method_missing removal condition in a76dc04a was wrong. 2017-03-02 17:59:27 +09:00
Yukihiro "Matz" Matsumoto 27ec2437fd Fix possible stack overflow for method_missing; fix #3478
Instead of shifting mruby VM stack, we always use CALL_MAXARGS.
2017-03-02 17:55:15 +09:00
Yukihiro "Matz" Matsumoto 0bcf9e28fc Reorganize C++ exceptions; ref #3470
There are 3 levels of C++ exception handling:
* default - no C++ exception (use setjmp/longjmp)
* enable_cxx_exception (use C++ exceptions with C ABI)
* enable_cxx_abi (use C++ ABI including exceptions)
2017-03-02 10:58:26 +09:00
Yukihiro "Matz" Matsumoto fdd92750fe Create NoMethodError instance using mrb_obj_new(). 2017-03-02 10:56:23 +09:00
Yukihiro "Matz" Matsumoto 9b176a1ca8 Avoid using <mruby/throw.h> in mruby.c 2017-03-02 10:51:44 +09:00
Yukihiro "Matz" Matsumoto eca35df4ff ci may be moved during mrb_convert_type(); ref #3474 2017-03-01 12:06:18 +09:00
Yukihiro "Matz" Matsumoto 8b089c09f7 Keep space for safe navigation operator; fix #3475 2017-03-01 10:37:43 +09:00
Yukihiro "Matz" Matsumoto cd0ac59dd3 Newlines in strings should be counted; fix #3477 2017-03-01 00:05:54 +09:00
Yukihiro "Matz" Matsumoto 1a1f834ade Compile C files by C compiler when C++ files mixed.
ref #3267 #3470

By this commit, mruby do not use C++ ABI mode unless
you specify explicitly. It compiles C files by C
compilers, with C++ exception enabled when it sees
C++ files in your configured mrbgems.

I haven't tried visualcpp, so please submit an issue
if you see any problem with C++ gems on Windows.
2017-02-28 23:27:13 +09:00
Yukihiro "Matz" Matsumoto dc56bbecc8 Ignore empty ensure clause. 2017-02-28 11:51:17 +09:00
Yukihiro "Matz" Matsumoto fb3243e096 return (and break) should handle splat correctly; fix #3472 2017-02-28 11:34:54 +09:00
Yukihiro "Matz" Matsumoto 22eb41ab20 Fix NODE_DREGX dump; ref #3471 2017-02-28 10:56:34 +09:00
Yukihiro "Matz" Matsumoto c52bbe1b4e Fixed a bug in dregex option generation; fix #3471 2017-02-28 10:43:22 +09:00
Yukihiro "Matz" Matsumoto 89eac4f59d Update codegen.c comments 2017-02-28 10:32:40 +09:00
Yukihiro "Matz" Matsumoto 7db0786abd Fix integer overflow; fix #3473
The fix is suggested by https://hackerone.com/lucnguyen
2017-02-28 09:54:56 +09:00
Yukihiro "Matz" Matsumoto 405f5a2d2a Add type check by mrb_get_args(); ref #3476 2017-02-28 09:30:06 +09:00
Yukihiro "Matz" Matsumoto 74dbee8e52 Add check before calling str_substr(); ref #3476 2017-02-28 09:21:24 +09:00
Yukihiro "Matz" Matsumoto bdac7dfae8 Check if the value is fixnum before mrb_funcall(); fix #3476
The issue is reported by https://hackerone.com/aerodudrizzt
2017-02-28 09:14:42 +09:00
Yukihiro "Matz" Matsumoto a76dc04aa8 Remove default Kernel#method_missing.
Internal method_missing works without problems.
2017-02-27 23:11:39 +09:00
Yukihiro "Matz" Matsumoto b563bcb7ff Check if OP_RETURN cross C function boundary; fix #3462 2017-02-27 20:13:01 +09:00
Yukihiro "Matz" Matsumoto 50bbdbb11b Fixed ecall() invoked too early; fix #3464 2017-02-27 18:40:35 +09:00
Yukihiro "Matz" Matsumoto 3fc9bf3d5f Update local variable only after the value is checked. 2017-02-27 18:39:42 +09:00
Yukihiro "Matz" Matsumoto d219e63a74 Clear block arg when method_missing takes *args. 2017-02-27 18:38:56 +09:00
Yukihiro "Matz" Matsumoto 9e93d5dbf0 Stack may be reallocated in mrb_run(); fix #3465 2017-02-27 16:17:57 +09:00
Yukihiro "Matz" Matsumoto 736be0e98b Always keep block argument space in stack; fix #3469 2017-02-27 13:05:26 +09:00
Yukihiro "Matz" Matsumoto 83a6c0e0a4 Merge pull request #3458 from dabroz/gitlab-ci
GitLab.com tests for multiple configurations
2017-02-27 08:59:33 +09:00
Yukihiro "Matz" Matsumoto fecbde328a Merge pull request #3461 from iij/build-with-byacc
Build with byacc
2017-02-24 18:39:20 +09:00
Tomoyuki Sahara da4f8e19fa replace "yylval" with "pylval" to make it compile with byacc. 2017-02-24 11:47:48 +09:00
Yukihiro "Matz" Matsumoto a9f7b41219 Merge pull request #3460 from AltimitSystems/android.rake-ndk-clang
Additional options for Android build script.
2017-02-17 01:13:37 +09:00
Felix Jones fd08e0ea3a Added example build script for Android armeabi-v7a NEON hardware FPU 2017-02-16 15:07:18 +00:00
Felix Jones 324231a733 Android toolchain separated target architecture compile flags (ctarget) from shared compile flags (cflags). Added support for custom mfpu and float-abi switches for the armeabi-v7a target. 2017-02-16 15:02:10 +00:00
Yukihiro "Matz" Matsumoto 73e5a19c39 Configure callinfo target_class as CRuby; ref #3429 2017-02-16 23:43:02 +09:00