Yukihiro "Matz" Matsumoto
76df8d737d
Merge pull request #5960 from dearblue/gem-init-final.2
...
Shrink `<BUILD-DIR>/mrbgems/gem_init.c` if possible
2023-04-04 11:30:21 +09:00
Yukihiro "Matz" Matsumoto
5265e35ad2
mruby-time/time.c: remove mrb_ prefix from static functions
2023-04-03 08:58:33 +09:00
Yukihiro "Matz" Matsumoto
3d2cf0d9bf
mruby-bigint/bigint.c: fix int64/uint64 conversion
...
The functions were totally wrong in digit order and sign treatment. We
didn't notice since they are only called from mruby-time in the m64-i32
configuration.
2023-04-03 08:55:48 +09:00
Yukihiro "Matz" Matsumoto
65897145aa
mruby-time/time.c (mrb_to_time_t): should always initialize usec
2023-04-03 08:46:30 +09:00
Yukihiro "Matz" Matsumoto
875e0b0b59
mruby-time/time.c (time_value_from_time_t): should raise exception
...
When time_t does not fit in mrb_int; ref #5958
2023-04-03 08:38:52 +09:00
Yukihiro "Matz" Matsumoto
dd453080e0
Merge pull request #5958 from dearblue/fixable_time_t_p
...
Need `fixable_time_t_p()` always
2023-04-03 07:34:11 +09:00
John Bampton
f0d6674352
docs: add language console to code blocks
...
https://github.com/github/linguist/blob/79c4aa4706e08f9eb36e46535f0e909f51f3b74d/lib/linguist/languages.yml#L6392
2023-04-03 08:28:59 +10:00
dearblue
73b2e0bf76
Shrink <BUILD-DIR>/mrbgems/gem_init.c if possible
...
If none of the GEMs have `mrblib/` or `src/` directories, generate `mrb_init_mrbgems()` which does nothing, and omit `mrb_final_mrbgems()`.
The impetus was to avoid `gem_funcs[]` becoming a zero-length array, which is not allowed by the C standard.
The problem is caused by #5938 .
2023-04-02 20:28:14 +09:00
Yukihiro "Matz" Matsumoto
c6e7dfe9e5
Merge pull request #5959 from dearblue/mruby-strip
...
Need a dependency to `mruby-compiler` for `mruby-bin-strip`
2023-04-02 08:58:58 +09:00
dearblue
96190dba59
Need a dependency to mruby-compiler for mruby-bin-strip
...
It uses `mrb_irep_remove_lv()` defined in `mrbgems/mruby-compiler/core/codegen.c`.
2023-04-01 23:32:36 +09:00
dearblue
bcce4b7141
Need fixable_time_t_p() always
2023-04-01 23:22:08 +09:00
Yukihiro "Matz" Matsumoto
2de602b869
mruby-eval: add dependency to mruby-binding
2023-04-01 10:37:56 +09:00
Yukihiro "Matz" Matsumoto
eaaa474630
mruby-method/method.c: fix proc comparison for uncovered case
2023-04-01 10:37:16 +09:00
Yukihiro "Matz" Matsumoto
a3fc6ae53c
mruby-proc-ext/proc.c: use mrb_debug_get_position()
2023-04-01 10:37:15 +09:00
Yukihiro "Matz" Matsumoto
6629112291
Merge pull request #5957 from jbampton/clean-up-doc-limitations-md
...
doc/limitations.md: remove whitespace, add code block languages
2023-04-01 10:37:08 +09:00
John Bampton
e76525568a
doc/limitations.md: remove whitespace, add code block languages
2023-04-01 07:52:29 +10:00
Yukihiro "Matz" Matsumoto
58a83f3b9a
codeql-analysis.yml: stop running codeql workflow
2023-03-31 09:43:30 +09:00
Yukihiro "Matz" Matsumoto
85aefa8992
Merge pull request #5955 from LanzaSchneider/master
...
fix: wrong comment for ```mrb_debug_get_filename```
2023-03-31 08:27:27 +09:00
Yukihiro "Matz" Matsumoto
d482eabfa2
mruby-bigint/bigint.c: int.pow(n,m) to take bigint as exponential
2023-03-31 08:26:47 +09:00
Yukihiro "Matz" Matsumoto
62c52d5a28
mruby-bigint/bigint.c: remove unreachable line
2023-03-30 08:18:27 +09:00
Yukihiro "Matz" Matsumoto
35cedfb400
mruby-numeric-ext/numeric.c: Integer#pow fix for 2nd argument type
...
`int.pow()` takes 2nd argument only if 1st argument is an integer.
2023-03-30 08:18:27 +09:00
Lanza
01b03d852f
fix: wrong comment for ``mrb_debug_get_filename``
2023-03-30 06:57:33 +08:00
Yukihiro "Matz" Matsumoto
f1568af0d2
gc.c: fix GC regressions
...
The past fix was wrong.
2023-03-29 08:46:10 +09:00
Yukihiro "Matz" Matsumoto
1f5a4d5386
mruby-method/method.c (method_eql): simplify the logic
2023-03-27 19:21:40 +09:00
Yukihiro "Matz" Matsumoto
553f9ba802
mruby-method/method.c (method_eql): use mrb_proc_eql
2023-03-27 19:15:03 +09:00
Yukihiro "Matz" Matsumoto
fbb3a2426f
proc.c (mrb_proc_eql): define == and eql? for Proc class
2023-03-27 19:14:21 +09:00
Yukihiro "Matz" Matsumoto
ddb2240b5e
proc.c: update ISO section numbers for methods
2023-03-27 11:39:58 +09:00
Yukihiro "Matz" Matsumoto
b885d7387d
proc.c: no need to define Proc.lambda
...
Since Kernel is an ancestor of Kernel module itself recursively.
2023-03-27 11:33:13 +09:00
Yukihiro "Matz" Matsumoto
0f63551def
mruby-method/method.c (method_p): stricter method type check
2023-03-27 11:32:15 +09:00
Yukihiro "Matz" Matsumoto
f4cff664e6
mruby-proc-ext/proc.c: no need to define Kernel.proc
...
Since Kernel is an ancestor of Kernel module itself recursively.
2023-03-27 00:18:57 +09:00
Yukihiro "Matz" Matsumoto
3e7ced5d63
mruby-proc-ext/proc.c: remove prefix from static functions
2023-03-27 00:12:18 +09:00
Yukihiro "Matz" Matsumoto
0bbfec3e8b
mruby-eval: use functions from mruby-binding to simplify the code
2023-03-25 19:12:46 +09:00
Yukihiro "Matz" Matsumoto
11af5db1c3
mruby-binding: renamed from mruby-binding-core
...
The dependency is now:
mruby-binding-eval:
- mruby-binding
- mruby-eval
mruby-proc-binding:
- mruby-binding
mruby-eval:
- mruby-binding [new]
2023-03-24 12:25:57 +09:00
Yukihiro "Matz" Matsumoto
3ef41672ab
mruby-biding-eval: move essential part of the gem to mruby-eval
...
This change makes mruby-binding-eval gem nearly empty, but needed to
make `eval(str, binding)` works as well as `binding.eval(str)`.
2023-03-24 07:33:13 +09:00
Yukihiro "Matz" Matsumoto
910afdc691
mruby-binding-eval: modify struct initialization
2023-03-23 22:10:20 +09:00
Yukihiro "Matz" Matsumoto
5914d9e9d4
mruby-binding-eval: remove unused members from binding_eval_prepar_body
2023-03-23 16:16:52 +09:00
Yukihiro "Matz" Matsumoto
bf9a2501d1
mruby-binding-eval: move non raising code to the parent function
2023-03-22 23:22:45 +09:00
Yukihiro "Matz" Matsumoto
bdbc613ccb
parse.y (mrbc_filename): should not raise exceptions
2023-03-22 17:33:49 +09:00
Yukihiro "Matz" Matsumoto
feabcfe29e
doc/limitations.md: remove an entry regarding binding
...
Since it's no longer a limitation.
2023-03-22 15:26:29 +09:00
Yukihiro "Matz" Matsumoto
501b22a2ac
mruby-binding-eval: renamed from mruby-binding
...
Since this gem only provides `Binding#eval`.
2023-03-22 15:25:23 +09:00
Yukihiro "Matz" Matsumoto
979e8602dd
mruby-binding-core: make mrb_binding_wrap_lvspace static
2023-03-21 16:18:15 +09:00
Yukihiro "Matz" Matsumoto
66ca9722b6
mruby-binding-core (mrb_binding_new): new function
...
Use this function instead of `mrb_binding_alloc` (removed).
2023-03-21 16:17:08 +09:00
Yukihiro "Matz" Matsumoto
88ae5e8cf8
mruby-binding-core: use mrb_binding_wrap_lvspace if possible
2023-03-21 16:10:15 +09:00
Yukihiro "Matz" Matsumoto
495845443c
mruby-binding-core (mrb_binding_p) add new function
2023-03-21 16:10:15 +09:00
Yukihiro "Matz" Matsumoto
35e2779575
Small cosmetic changes (adjust indent, and remove extra space)
2023-03-21 16:10:15 +09:00
Yukihiro "Matz" Matsumoto
0c8404a3e2
mruby-binding: use C implementation of Kernel#eval directly
2023-03-21 16:10:15 +09:00
Yukihiro "Matz" Matsumoto
1c765dc37a
Merge pull request #5902 from dearblue/threadedcode
...
Replace `MRB_NO_DIRECT_THREADING` with `MRB_USE_VM_SWITCH_DISPATCH`
2023-03-18 23:56:04 +09:00
dearblue
f6c9191cd0
Replace MRB_NO_DIRECT_THREADING with MRB_USE_VM_SWITCH_DISPATCH
...
The correct technique now is "Token Threading".
However, the new name was chosen because it was felt that if a different technique was added in the future, there would be no need to replace it.
2023-03-18 17:39:41 +09:00
Yukihiro "Matz" Matsumoto
db11e07497
Merge pull request #5951 from dearblue/mrb_yield
...
Safely retrieve `self` from proc in `mrb_yield()`
2023-03-17 22:54:05 +09:00
dearblue
2675477f07
Safely retrieve self from proc in mrb_yield()
...
Passing a proc generated by the following method to `mrb_yield()` or `mrb_yield_argv()` no longer causes `SIGSEGV`:
- C functions made into proc objects with `mrb_proc_new_cfunc()`.
- A proc object which is the top level of a program generated by `mrb_load_string_cxt()` etc. with `mrbc_context::no_exec` enabled.
See also: #5932
2023-03-17 21:20:48 +09:00