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
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
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
Yukihiro "Matz" Matsumoto
16028442e6
Merge pull request #6443 from hoshiumiarata/node_negate_for_bigint
2024-12-04 20:50:22 +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
Yukihiro "Matz" Matsumoto
bd5ece3a26
dump.h: remove obsolete flag DUMP_DEBUG_INFO
2024-11-29 07:39:26 +09:00
Yukihiro "Matz" Matsumoto
4751e385c3
dump.h: add new dump flag MRB_DUMP_NO_LVAR
2024-11-29 07:38:47 +09:00
Yukihiro "Matz" Matsumoto
673d71ffca
dump.c (mrb_dump_irep): reorganize if-structure
2024-11-28 10:14:06 +09:00
Yukihiro "Matz" Matsumoto
8a25c424a4
dump.c: remove unnecessary braces around return
2024-11-28 04:54:20 +09:00
Yukihiro "Matz" Matsumoto
b1091e7c64
dump.c: use post-decrements
2024-11-28 04:54:19 +09:00
Yukihiro "Matz" Matsumoto
a5c6cb5afb
Merge pull request #6434 from dearblue/doc/hier
2024-11-28 04:53:55 +09:00
dearblue
26f949e612
Added document "The mruby directory structure"
...
This text was translated from Japanese to English by https://www.deepl.com/ .
2024-11-27 23:04:23 +09:00
Yukihiro "Matz" Matsumoto
3505874f72
Merge pull request #6437 from jbampton/pre-commit-config-add-more-details
2024-11-27 14:40:38 +09:00
Yukihiro "Matz" Matsumoto
85eeeda0b3
Merge pull request #6438 from dearblue/task/install
2024-11-27 14:36:21 +09:00
dearblue
c7ca1038d2
Remove unused MRuby::Build#list_install_excludes method
...
This method was added by commit 0ac755dbc8 (#6407 ).
It was added during the initial conception, but was ultimately no longer needed.
2024-11-26 22:05:47 +09:00