Commit Graph

16493 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto d13e6ff8c9 include/presym.h: MRB_GVSYM() for global variables is now available 2024-12-14 16:03:35 +09:00
Yukihiro "Matz" Matsumoto 46019f3871 Merge pull request #6444 from hoshiumiarata/tests_for_bigint 2024-12-13 17:57:16 +09:00
Hoshiumi Arata 03ed952600 Merge branch 'master' into tests_for_bigint 2024-12-13 17:31:54 +09:00
Yukihiro "Matz" Matsumoto b561abd46b Merge pull request #6457 from hoshiumiarata/fix_division_of_smallint_by_bigint 2024-12-13 14:23:52 +09:00
Hoshiumi Arata 6fb93ce6f7 mruby-bigint: fix bug with division of a small number by a bigint; fix #6456 2024-12-13 12:07:34 +09:00
Yukihiro "Matz" Matsumoto 917066647e Merge pull request #6450 from dearblue/io-pread-pwrite 2024-12-13 08:19:55 +09:00
dearblue ce1abfb2c9 Change MRB_WITH_IO_PREAD_PWRITE configuration name
Change to `MRB_USE_IO_PREAD_PWRITE` for consistency with mruby configuration macros.
Similarly, `MRB_WITHOUT_IO_PREAD_PWRITE` is changed to `MRB_NO_IO_PREAD_PWRITE`.

The previous names are available for compatibility but are deprecated.
2024-12-12 22:18:34 +09:00
Yukihiro "Matz" Matsumoto 29a2bc19a3 mruby-bigint (mpz_get_str): use UL suffix for mp_limb table 2024-12-12 17:15:02 +09:00
Hoshiumi Arata 3152402fa6 Merge branch 'master' into tests_for_bigint 2024-12-12 17:01:06 +09:00
Yukihiro "Matz" Matsumoto c495d08c5b mruby-io (mrb_file__gethome): add casts to stop type warnings 2024-12-12 16:13:56 +09:00
Yukihiro "Matz" Matsumoto 423c12e985 Merge pull request #6455 from hoshiumiarata/bigint_fix_div_rounding 2024-12-12 16:13:47 +09:00
Yukihiro "Matz" Matsumoto ceb1885121 Merge pull request #6454 from hoshiumiarata/fix_rhs_bigint_mod_and_divmod 2024-12-12 13:45:48 +09:00
Yukihiro "Matz" Matsumoto d8e6de28e9 mruby-bigint (mrb_bint_add_n): fixed a memory leak 2024-12-11 21:29:22 +09:00
Yukihiro "Matz" Matsumoto 8bd62ca311 mruby-bigint (mrb_bint_xor): fix a bug in bigint ^ int operation
Fix #6453; ref #6444
2024-12-11 21:29:21 +09:00
Yukihiro "Matz" Matsumoto b807c0a27d mruby-bigint (mpz_pow): combine mpz_init and mpz_set 2024-12-11 21:29:21 +09:00
Yukihiro "Matz" Matsumoto 8da0db545e mruby-bigint (mpz_get_str): reduce one division 2024-12-11 21:29:21 +09:00
Hoshiumi Arata 94a3a3eb6e mruby-bigint: fix rounding behavior in mpz_mdiv and mpz_mdivmod functions 2024-12-11 21:09:46 +09:00
Hoshiumi Arata 52e1ebe191 mruby-bigint: handle rhs bigint in int_mod and int_divmod functions 2024-12-11 20:58:03 +09:00
Yukihiro "Matz" Matsumoto 989c133c9f Merge pull request #6449 from dearblue/presym.2 2024-12-11 10:46:27 +09:00
Yukihiro "Matz" Matsumoto a77e917d78 Merge pull request #6448 from dearblue/presym.1 2024-12-11 10:08:22 +09:00
Yukihiro "Matz" Matsumoto 19cb0fc374 Merge pull request #6447 from dearblue/File.expand_path
Fixed `File.expand_path`
2024-12-10 13:54:46 +09:00
Hoshiumi Arata 7dfbbd1eaa Merge branch 'master' into tests_for_bigint 2024-12-09 22:38:32 +09:00
dearblue 27082d143c Using presym in the mruby-io/src/file_test.c file 2024-12-09 22:09:15 +09:00
dearblue 384db9054d Suppress presym in mruby/ext/io.h file
When defining macro constants for error classes in public header files, it is preferable to use `MRB_ERROR_SYM()`.
2024-12-09 22:05:01 +09:00
Yukihiro "Matz" Matsumoto 9af061a4ce mruby-bigint: fixed a bug in string conversion; ref #6444 2024-12-09 13:14:22 +09:00
Yukihiro "Matz" Matsumoto 6d2e7f50e2 mruby-bigint: compact mpz_add_int,mpz_sub_int calling conditions 2024-12-09 13:04:01 +09:00
Yukihiro "Matz" Matsumoto 441d4be0ad mruby-bigint: fixed a bug with bigint +/- mrb_int; close #6445 2024-12-08 23:45:25 +09:00
Yukihiro "Matz" Matsumoto 33841519a9 AUTHORS: update entries [ci skip] 2024-12-08 19:35:41 +09:00
Yukihiro "Matz" Matsumoto 7b0dcaaa34 Merge pull request #6446 from dearblue/win64 2024-12-08 19:35:27 +09:00
dearblue 88e3ce1b58 Fix File.expand_path for Windows
- The inner method `File._gethome` could be read as intending to use the `USERPROFILE` environment variable instead on Windows when the `HOME` environment variable is not available.
    In reality, however, this was not the case.
  - The result of `File.expand_path` should unify path separators with `/`, but it did not.
2024-12-08 10:43:20 +09:00
dearblue 06bb54d380 Improved File.expand_path test in `mruby-io
Since `mruby-io` does not depend on `mruby-env` even for test builds, it is impossible that `ENV` constants are defined.
Therefore, define `MRubyIOTestUtil::ENV_HOME` for alternative use.
2024-12-08 10:43:20 +09:00
dearblue 1326017d1d Omit the _WIN64 definition check
Checking the official MSVC documentation, if `_WIN64` is defined, then `_WIN32` is also defined.
https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros

I could not find any documentation on MinGW, but I assume it is not a problem.
2024-12-07 22:47:28 +09:00
Yukihiro "Matz" Matsumoto 1dfd3d9043 Merge pull request #6442 from dearblue/jmpuw 2024-12-06 23:43:31 +09:00
Yukihiro "Matz" Matsumoto ac6436556b Merge pull request #6440 from dearblue/redo
Fix `redo` keyword
2024-12-06 23:42:44 +09:00
Hoshiumi Arata 9a02daaca0 Merge branch 'master' into tests_for_bigint 2024-12-04 20:58:55 +09:00
Yukihiro "Matz" Matsumoto 16028442e6 Merge pull request #6443 from hoshiumiarata/node_negate_for_bigint 2024-12-04 20:50:22 +09:00
Hoshiumi Arata 21ccbf965e bigint: expand test cases for arithmetic operations 2024-12-04 18:34:21 +09:00
Hoshiumi Arata 3034b0847a codegen: fix NODE_NEGATE for bigints 2024-12-04 17:57:50 +09:00
dearblue 95e2f8e844 Fixed wrong range condition in OP_JMPUW
fixed #6441
2024-12-03 22:14:50 +09:00
Yukihiro "Matz" Matsumoto 4a99f28ec3 Revert "vm.c (cipush): small refactoring"
This reverts commit d6e23f3cdc.
Caused some memory crashes.
2024-12-03 16:48:48 +09:00
Yukihiro "Matz" Matsumoto 94a4b95b5d test/lang.rb: update compiled code in comments
- variable sized instructions
- new instruction names
- remove OP_ prefix as code dump does
2024-12-02 15:23:06 +09:00
Yukihiro "Matz" Matsumoto 77e08c9193 ops.h: rename OP_LOADI to OP_LOADI8
OP_LOADI stores an 8 bit integer to a register, so we renamed the
instruction name to describe the behavior more precisely, like
OP_LOADI16 and OP_LOADI32.
2024-12-01 19:16:54 +09:00
dearblue 9a67bdb6aa Fix redo keyword
Add `OP_NOP` to distinguish `retry` and jump targets while maintaining instruction compatibility.
Ideally, it might be preferable to separate them into `OP_REDO`.

fixed #6439
2024-12-01 11:40:17 +09:00
dearblue 939659e2db Allow redo from nested LOOP_BEGIN and LOOP_RESCUE 2024-12-01 11:34:10 +09:00
dearblue 01ea2c088d Add more tests for redo keyword 2024-12-01 11:33:23 +09:00
Yukihiro "Matz" Matsumoto d6e23f3cdc vm.c (cipush): small refactoring
- simplified if-statement
- rename local variable size to diff (means diff between cibase & ci).
2024-11-30 11:13:38 +09:00
Yukihiro "Matz" Matsumoto e05dbf7bbc mruby-compiler (mrb_irep_remove_lv): remove the function altogether
Recent changes make mrb_irep_remove_lv() used no longer.  Removing this
function would not make any compatibility issue, since it's an internal
function.
2024-11-29 17:09:44 +09:00
Yukihiro "Matz" Matsumoto 28d2dfbb11 mruby-bin-mrbc: use MRB_DUMP_NO_LVAR flag
Instead of `mrb_irep_remove_lv()` function.
2024-11-29 16:45:26 +09:00
Yukihiro "Matz" Matsumoto 3a6272d9e9 mruby-bin-strip: use MRB_DUMP_NO_LVAR flags
Instead of `mrb_irep_remove_lv()` function.
2024-11-29 16:41:27 +09:00
Yukihiro "Matz" Matsumoto 5b69185171 dump.c (mrb_dump_irep): skip lv section if MRB_DUMP_NO_LVAR is set 2024-11-29 16:29:18 +09:00