Compare commits

...

17 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 7ac96912e9 pre-commit: fix prettier formatting in doc/guides/capi.md
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 13:09:44 +09:00
Yukihiro "Matz" Matsumoto 6a7561da5f pre-commit: remove JSON references from prettier hook
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 11:41:17 +09:00
Yukihiro "Matz" Matsumoto 628cf498a7 pre-commit: remove markdown-link-check hook
External link checkers are inherently flaky in CI due to
websites blocking automated requests (e.g. 403 errors).
Also remove JSON hooks (pretty-format-json, check-json)
since no JSON files remain in the repository.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-12 11:32:37 +09:00
Yukihiro "Matz" Matsumoto cfc83bb6ac Merge pull request #6734 from mruby/fix/array-chunking 2026-03-10 17:01:28 +09:00
Yukihiro "Matz" Matsumoto 46e8101c03 Merge pull request #6733 from mruby/fix/presym-include 2026-03-10 16:59:51 +09:00
Yukihiro "Matz" Matsumoto fff7db05bf Merge pull request #6732 from mruby/fix/language-md-markup 2026-03-10 16:58:34 +09:00
Yukihiro "Matz" Matsumoto f98d6414dc codegen.c: chunk array literals at 64 elements to reduce register pressure
Array literals were being built by loading all elements into registers
before constructing the array, requiring nregs proportional to the array
size (e.g. nregs=99 for 100 elements). This exceeds mruby/c's register
limit. Restore 3.4-era chunking at GEN_LIT_ARY_MAX (64) elements.

fixes mruby/mruby#6731

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 16:50:59 +09:00
Yukihiro "Matz" Matsumoto 8956c5abb5 mruby.h: include mruby/presym.h for all source files
Since presym is now mandatory, mruby.h includes presym.h so that
MRB_SYM() macros are available everywhere without explicit include.
Remove redundant #include <mruby/presym.h> from all source files.

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 16:50:58 +09:00
Yukihiro "Matz" Matsumoto 8f3917f361 language.md: remove unnecessary bold markup from "operator"
Co-authored-by: Claude <noreply@anthropic.com>
2026-03-09 16:50:54 +09:00
Yukihiro "Matz" Matsumoto 72c9e5d027 Merge pull request #6598 from dearblue/method_missing 2026-03-09 16:38:08 +09:00
Yukihiro "Matz" Matsumoto 295b40534f Merge pull request #6730 from dearblue/presym 2026-03-09 10:35:42 +09:00
Yukihiro "Matz" Matsumoto 5acc520a1e Merge pull request #6729 from dearblue/gensym 2026-03-09 10:34:02 +09:00
dearblue f6f1a42039 Simplifying presym file generation actions
By performing output to presym files after header files, there is no longer a need to check for the existence of header files.
Furthermore, concentrating the file output logic into an "if" block eliminates the need for the `update` variable.

Strict atomicity between presym files and header files is still not guaranteed, as before.
If atomicity is truly required, it can be achieved by deleting the presym file before updating the header files.
2026-03-08 22:45:45 +09:00
dearblue 9fff63b436 Simplifying dependency addition for gensym task
The `gensym_task` variable was only used for dependency addition and is no longer needed.
2026-03-08 22:43:47 +09:00
Yukihiro "Matz" Matsumoto 17ab42d4c9 Merge pull request #6728 from mruby/dependabot/github_actions/actions/upload-artifact-7 2026-03-06 08:17:12 +09:00
dependabot[bot] fcb665b88c build(deps): bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 14:52:19 +00:00
dearblue 550d10adb7 Fixed heap buffer overflow in #method_missing
When `ci->n == CALL_MAXARGS`, the correct value is `argv[1] = argv[1]`.
However, it was always `args[1] = args[ci->n]`, which caused objects outside the range to be picked up.

fixed #6584
2025-07-30 21:35:55 +09:00
78 changed files with 89 additions and 200 deletions
-26
View File
@@ -1,26 +0,0 @@
{
"retryOn429": true,
"retryCount": 3,
"aliveStatusCodes": [
200,
206,
502
],
"ignorePatterns": [
{
"pattern": "^https://github.com/mruby/mruby/commit/"
},
{
"pattern": "^http://jp.rubyist.net/magazine/\\?0034-Enumerable_lz"
},
{
"pattern": "^https://ruby-doc.org/core-2.3.3"
},
{
"pattern": "^mailto:"
},
{
"pattern": "^https://www.iso.org/"
}
]
}
+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
echo \`\`\`
} > "$GITHUB_STEP_SUMMARY"
- name: Upload coverage report
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: coverage-${{ github.sha }}
path: coverage/
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
if: failure()
with:
name: artifacts
+2 -15
View File
@@ -20,8 +20,8 @@ repos:
- id: prettier
name: run prettier
description: format files with prettier
entry: prettier --write '**/*.json' '**/*.md' '**/*.yaml' '**/*.yml'
files: \.(json|md|ya?ml)$
entry: prettier --write '**/*.md' '**/*.yaml' '**/*.yml'
files: \.(md|ya?ml)$
language: node
additional_dependencies: ["prettier@3.7.4"]
stages: [manual]
@@ -55,9 +55,6 @@ repos:
- id: check-executables-have-shebangs
exclude: ^test/t/lang\.rb$
- id: check-illegal-windows-names
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-vcs-permalinks
@@ -107,16 +104,6 @@ repos:
args: [--config=.github/linters/.markdown-lint.yml]
types: [markdown]
files: \.md$
- repo: https://github.com/tcort/markdown-link-check
rev: v3.14.2
hooks:
- id: markdown-link-check
name: run markdown-link-check
description: checks hyperlinks in Markdown files
args: [--config=.github/linters/mlc_config.json, -q]
stages: [manual]
types: [markdown]
files: \.md$
- repo: https://github.com/rubocop/rubocop
rev: v1.81.7
hooks:
+68 -68
View File
@@ -99,23 +99,23 @@ mrb_str_to_cstr(mrb, v) /* const char* from String value */
### Value Types
| `mrb_vtype` | Ruby Class | Notes |
| ----------- | ---------- | ----- |
| `MRB_TT_FALSE` | FalseClass/NilClass | `nil` has `MRB_TT_FALSE` |
| `MRB_TT_TRUE` | TrueClass | |
| `MRB_TT_INTEGER` | Integer | Immediate value |
| `MRB_TT_FLOAT` | Float | May be immediate |
| `MRB_TT_SYMBOL` | Symbol | Immediate value |
| `MRB_TT_STRING` | String | Heap object |
| `MRB_TT_ARRAY` | Array | Heap object |
| `MRB_TT_HASH` | Hash | Heap object |
| `MRB_TT_OBJECT` | Object | User-defined classes |
| `MRB_TT_CLASS` | Class | |
| `MRB_TT_MODULE` | Module | |
| `MRB_TT_PROC` | Proc | |
| `MRB_TT_CDATA` | (C data) | Wrapped C structs |
| `MRB_TT_EXCEPTION` | Exception | |
| `MRB_TT_FIBER` | Fiber | |
| `mrb_vtype` | Ruby Class | Notes |
| ------------------ | ------------------- | ------------------------ |
| `MRB_TT_FALSE` | FalseClass/NilClass | `nil` has `MRB_TT_FALSE` |
| `MRB_TT_TRUE` | TrueClass | |
| `MRB_TT_INTEGER` | Integer | Immediate value |
| `MRB_TT_FLOAT` | Float | May be immediate |
| `MRB_TT_SYMBOL` | Symbol | Immediate value |
| `MRB_TT_STRING` | String | Heap object |
| `MRB_TT_ARRAY` | Array | Heap object |
| `MRB_TT_HASH` | Hash | Heap object |
| `MRB_TT_OBJECT` | Object | User-defined classes |
| `MRB_TT_CLASS` | Class | |
| `MRB_TT_MODULE` | Module | |
| `MRB_TT_PROC` | Proc | |
| `MRB_TT_CDATA` | (C data) | Wrapped C structs |
| `MRB_TT_EXCEPTION` | Exception | |
| `MRB_TT_FIBER` | Fiber | |
## Defining Classes and Modules
@@ -165,15 +165,15 @@ mrb_define_module_function(mrb, mod, "name", my_method, MRB_ARGS_ANY());
### Argument Specifiers
| Macro | Meaning |
| ----- | ------- |
| `MRB_ARGS_NONE()` | No arguments |
| `MRB_ARGS_REQ(n)` | `n` required arguments |
| `MRB_ARGS_OPT(n)` | `n` optional arguments |
| `MRB_ARGS_ARG(r,o)` | `r` required + `o` optional |
| `MRB_ARGS_REST()` | Splat (`*args`) |
| `MRB_ARGS_BLOCK()` | Block (`&block`) |
| `MRB_ARGS_ANY()` | Any number (same as REST) |
| Macro | Meaning |
| ---------------------- | ------------------------------------- |
| `MRB_ARGS_NONE()` | No arguments |
| `MRB_ARGS_REQ(n)` | `n` required arguments |
| `MRB_ARGS_OPT(n)` | `n` optional arguments |
| `MRB_ARGS_ARG(r,o)` | `r` required + `o` optional |
| `MRB_ARGS_REST()` | Splat (`*args`) |
| `MRB_ARGS_BLOCK()` | Block (`&block`) |
| `MRB_ARGS_ANY()` | Any number (same as REST) |
| `MRB_ARGS_KEY(n,rest)` | `n` keyword args, `rest`=1 for `**kw` |
These can be combined with `|`:
@@ -192,27 +192,27 @@ mrb_int mrb_get_args(mrb_state *mrb, const char *format, ...);
### Format Specifiers
| Spec | Ruby Type | C Type(s) | Notes |
| ---- | --------- | --------- | ----- |
| `o` | any | `mrb_value` | No type check |
| `i` | Numeric | `mrb_int` | Coerces to integer |
| `f` | Numeric | `mrb_float` | Coerces to float |
| `b` | any | `mrb_bool` | Truthiness |
| `n` | String/Symbol | `mrb_sym` | Converts to symbol |
| `s` | String | `const char*, mrb_int` | Pointer + length |
| `z` | String | `const char*` | Null-terminated |
| `S` | String | `mrb_value` | String value |
| `A` | Array | `mrb_value` | Array value |
| `H` | Hash | `mrb_value` | Hash value |
| `C` | Class | `mrb_value` | Class/Module value |
| `c` | Class | `struct RClass*` | Class pointer |
| `a` | Array | `const mrb_value*, mrb_int` | Array pointer + length |
| `d` | C Data | `void*` | Requires `mrb_data_type*` |
| `&` | Block | `mrb_value` | Block argument |
| `*` | rest | `const mrb_value*, mrb_int` | Rest arguments |
| `\|` | — | — | Following args are optional |
| `?` | — | `mrb_bool` | Was previous optional arg given? |
| `:` | keywords | `mrb_kwargs` | Keyword arguments |
| Spec | Ruby Type | C Type(s) | Notes |
| ---- | ------------- | --------------------------- | -------------------------------- |
| `o` | any | `mrb_value` | No type check |
| `i` | Numeric | `mrb_int` | Coerces to integer |
| `f` | Numeric | `mrb_float` | Coerces to float |
| `b` | any | `mrb_bool` | Truthiness |
| `n` | String/Symbol | `mrb_sym` | Converts to symbol |
| `s` | String | `const char*, mrb_int` | Pointer + length |
| `z` | String | `const char*` | Null-terminated |
| `S` | String | `mrb_value` | String value |
| `A` | Array | `mrb_value` | Array value |
| `H` | Hash | `mrb_value` | Hash value |
| `C` | Class | `mrb_value` | Class/Module value |
| `c` | Class | `struct RClass*` | Class pointer |
| `a` | Array | `const mrb_value*, mrb_int` | Array pointer + length |
| `d` | C Data | `void*` | Requires `mrb_data_type*` |
| `&` | Block | `mrb_value` | Block argument |
| `*` | rest | `const mrb_value*, mrb_int` | Rest arguments |
| `\|` | — | — | Following args are optional |
| `?` | — | `mrb_bool` | Was previous optional arg given? |
| `:` | keywords | `mrb_kwargs` | Keyword arguments |
Adding `!` to `S`, `A`, `H`, `C`, `c`, `s`, `z`, `a`, `d` allows `nil`
(returns NULL/zero for nil).
@@ -608,14 +608,14 @@ my_yield_method(mrb_state *mrb, mrb_value self)
### Fiber States
| State | Meaning |
| ----- | ------- |
| `MRB_FIBER_CREATED` | Created but not yet resumed |
| `MRB_FIBER_RUNNING` | Currently executing |
| `MRB_FIBER_RESUMED` | Resumed another fiber |
| `MRB_FIBER_SUSPENDED` | Yielded, waiting to resume |
| State | Meaning |
| ----------------------- | -------------------------------- |
| `MRB_FIBER_CREATED` | Created but not yet resumed |
| `MRB_FIBER_RUNNING` | Currently executing |
| `MRB_FIBER_RESUMED` | Resumed another fiber |
| `MRB_FIBER_SUSPENDED` | Yielded, waiting to resume |
| `MRB_FIBER_TRANSFERRED` | Transferred via `Fiber#transfer` |
| `MRB_FIBER_TERMINATED` | Finished execution |
| `MRB_FIBER_TERMINATED` | Finished execution |
**Limitation:** fibers cannot yield across C function boundaries.
You cannot call `mrb_fiber_yield` from within a C-implemented
@@ -644,13 +644,13 @@ mrb_ccontext_free(mrb, cxt);
The `mrb_ccontext` structure provides several flags:
| Field | Purpose |
| ----- | ------- |
| Field | Purpose |
| ---------------- | --------------------------------------- |
| `capture_errors` | Collect parse errors instead of raising |
| `no_exec` | Compile without executing (get RProc) |
| `no_optimize` | Disable peephole optimizations |
| `no_ext_ops` | Disable extended operand instructions |
| `keep_lv` | Preserve local variables across loads |
| `no_exec` | Compile without executing (get RProc) |
| `no_optimize` | Disable peephole optimizations |
| `no_ext_ops` | Disable extended operand instructions |
| `keep_lv` | Preserve local variables across loads |
### Loading with Context
@@ -843,14 +843,14 @@ $ build/host/bin/mruby-config --libs # libraries
Key macros that affect ABI:
| Macro | Effect |
| ----- | ------ |
| `MRB_NO_BOXING` | Struct-based values (larger, debuggable) |
| `MRB_WORD_BOXING` | Single-word values (fast, 32-bit safe) |
| `MRB_NAN_BOXING` | NaN-tagged values (default on 32-bit) |
| `MRB_NO_FLOAT` | Disable Float support |
| `MRB_INT64` | 64-bit integers |
| `MRB_USE_FLOAT32` | 32-bit floats |
| Macro | Effect |
| ----------------- | ---------------------------------------- |
| `MRB_NO_BOXING` | Struct-based values (larger, debuggable) |
| `MRB_WORD_BOXING` | Single-word values (fast, 32-bit safe) |
| `MRB_NAN_BOXING` | NaN-tagged values (default on 32-bit) |
| `MRB_NO_FLOAT` | Disable Float support |
| `MRB_INT64` | 64-bit integers |
| `MRB_USE_FLOAT32` | 32-bit floats |
Mismatching these between library and application causes silent
data corruption.
+2 -2
View File
@@ -378,8 +378,8 @@ This means subclassing `Array` or `String` and adding `@fields` will raise an er
### Operator Overriding
Operators of primitive classes cannot be overridden by user code.
Redefining `String#+` has no effect on the behavior of the `+` __operator__.
Operators of primitive classes cannot be overridden by user code.
Redefining `String#+` has no effect on the behavior of the `+` operator.
### Module Loading Hooks
-1
View File
@@ -79,7 +79,6 @@ Include `<mruby/class.h>` (which provides `mrb_mt_entry`,
```c
#include <mruby/class.h>
#include <mruby/presym.h>
static const mrb_mt_entry my_rom_entries[] = {
MRB_MT_ENTRY(my_method_a, MRB_SYM(method_a), MRB_ARGS_REQ(1)),
@@ -15,11 +15,6 @@
*/
#include <mruby/internal.h>
/*
* The "mruby/presym.h" file is placed at the end of the mruby header file.
*/
#include <mruby/presym.h>
/*
* Define your own struct RBigint.
*
+3 -1
View File
@@ -1015,7 +1015,7 @@ typedef const char *mrb_args_format;
* mrb_value str, kw_rest;
* uint32_t kw_num = 3;
* uint32_t kw_required = 1;
* // Note that `#include <mruby/presym.h>` is required beforehand because `MRB_SYM()` is used.
* // `MRB_SYM()` is available via `mruby.h` (which includes `mruby/presym.h`).
* // If the usage of `MRB_SYM()` is not desired, replace it with `mrb_intern_lit()`.
* mrb_sym kw_names[] = { MRB_SYM(x), MRB_SYM(y), MRB_SYM(z) };
* mrb_value kw_values[kw_num];
@@ -1594,6 +1594,8 @@ MRB_API mrb_value mrb_format(mrb_state *mrb, const char *format, ...);
#ifdef MRB_PRESYM_SCANNING
# include <mruby/presym/scanning.h>
#else
# include <mruby/presym.h>
#endif
#if 0
@@ -11,7 +11,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include "socket_hal.h"
#include <sys/types.h>
-1
View File
@@ -15,7 +15,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include "socket_hal.h"
#include <winsock2.h>
#include <ws2tcpip.h>
-1
View File
@@ -7,7 +7,6 @@
#include <mruby/data.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/khash.h>
#include <mruby/error.h>
@@ -12,7 +12,6 @@
#include <mruby/numeric.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "apiprint.h"
static void
-1
View File
@@ -19,7 +19,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <mruby/internal.h>
#include <stdlib.h>
@@ -12,7 +12,6 @@
#include <mruby/variable.h>
#include <mruby/proc.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#if defined(_WIN32)
# include <io.h> /* for setmode */
-1
View File
@@ -4,7 +4,6 @@
#include <mruby/hash.h>
#include <mruby/proc.h>
#include <mruby/variable.h>
#include <mruby/presym.h>
#include <mruby/opcode.h>
#include <mruby/debug.h>
#include <mruby/internal.h>
-1
View File
@@ -1,5 +1,4 @@
#include <mruby.h>
#include <mruby/presym.h>
static mrb_value
binding_in_c(mrb_state *mrb, mrb_value self)
-1
View File
@@ -4,7 +4,6 @@
#include <mruby/error.h>
#include <mruby/proc.h>
#include <mruby/opcode.h>
#include <mruby/presym.h>
/* Pre-defined symbols used by catch implementation */
MRB_PRESYM_DEFINE_VAR_AND_INITER(catch_syms, 3, MRB_SYM(Object), MRB_SYM(new), MRB_SYM(call))
-1
View File
@@ -5,7 +5,6 @@
#include <mruby/proc.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* Get the name of a module/class.
-1
View File
@@ -10,7 +10,6 @@
*/
#include <mruby.h>
#include <mruby/presym.h>
#ifdef MRB_NO_FLOAT
# error CMath conflicts with 'MRB_NO_FLOAT' configuration
+2 -3
View File
@@ -46,7 +46,6 @@
#include <mruby/numeric.h>
#include <mruby/string.h>
#include <mruby/debug.h>
#include <mruby/presym.h>
#include "node.h"
#include <mruby/opcode.h>
#include <mruby/re.h>
@@ -3821,7 +3820,7 @@ codegen_array(codegen_scope *s, node *varnode, int val)
node *elements = array->elements;
int regular_elements = 0;
int first = 1;
int slimit = GEN_VAL_STACK_MAX;
int slimit = GEN_LIT_ARY_MAX;
if (!val) return;
@@ -3831,7 +3830,7 @@ codegen_array(codegen_scope *s, node *varnode, int val)
return;
}
if (cursp() >= GEN_LIT_ARY_MAX) slimit = INT16_MAX;
if (cursp() >= slimit) slimit = GEN_VAL_STACK_MAX;
/* Process each element using cons-list iteration, handling splats */
node *current = elements;
-1
View File
@@ -23,7 +23,6 @@
#include <mruby/string.h>
#include <mruby/dump.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "node.h"
#define YYLEX_PARAM p
-1
View File
@@ -85,7 +85,6 @@
#include <mruby/string.h>
#include <mruby/dump.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "node.h"
#define YYLEX_PARAM p
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/class.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <float.h>
#ifdef MRB_NO_FLOAT
-1
View File
@@ -13,7 +13,6 @@
#include <mruby/hash.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define RDATA_LEN(st) RARRAY_LEN(st)
#define RDATA_PTR(st) RARRAY_PTR(st)
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/data.h>
#include <mruby/error.h>
#include <mruby/string.h>
#include <mruby/presym.h>
#include "dir_hal.h"
#include <string.h>
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define ENC_ASCII_8BIT "ASCII-8BIT"
#define ENC_BINARY "BINARY"
-1
View File
@@ -7,7 +7,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <errno.h>
#include <string.h>
-1
View File
@@ -6,7 +6,6 @@
#include <mruby/proc.h>
#include <mruby/opcode.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
-1
View File
@@ -2,7 +2,6 @@
#include <mruby.h>
#include <mruby/error.h>
#include <mruby/variable.h>
#include <mruby/presym.h>
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
-1
View File
@@ -6,7 +6,6 @@
#include <mruby/numeric.h>
#include <mruby/proc.h>
#include <mruby/string.h>
#include <mruby/presym.h>
#define fiber_ptr(o) ((struct RFiber*)mrb_ptr(o))
-1
View File
@@ -9,7 +9,6 @@
#include <mruby/hash.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/io.h>
#include <mruby/error.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "io_hal.h"
#include <sys/types.h>
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/io.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <mruby/internal.h>
#include "io_hal.h"
-1
View File
@@ -12,7 +12,6 @@
#include <mruby/io.h>
#include <mruby/error.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "io_hal.h"
#include <sys/types.h>
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/proc.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -11,7 +11,6 @@
#endif
#include <mruby/array.h>
#include <mruby/presym.h>
static void
domain_error(mrb_state *mrb, const char *func)
-1
View File
@@ -7,7 +7,6 @@
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/khash.h>
#include <mruby/presym.h>
#define MT_PROTECTED MRB_METHOD_PROTECTED_FL
#define MT_NOPRIV (MRB_METHOD_PRIVATE_FL|MT_PROTECTED)
-1
View File
@@ -5,7 +5,6 @@
#include <mruby/proc.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
// Defined by mruby-proc-ext on which mruby-method depends
mrb_value mrb_proc_parameters(mrb_state *mrb, mrb_value proc);
@@ -4,7 +4,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifndef MRB_NO_FLOAT
static mrb_value flo_remainder(mrb_state *mrb, mrb_value self);
-1
View File
@@ -4,7 +4,6 @@
#include <mruby/hash.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
@@ -10,7 +10,6 @@
#include <mruby/proc.h>
#include <mruby/value.h>
#include <mruby/range.h>
#include <mruby/presym.h>
struct os_count_struct {
mrb_int total;
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/variable.h>
#include <mruby/endian.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <ctype.h>
#include <string.h>
@@ -1,5 +1,4 @@
#include <mruby.h>
#include <mruby/presym.h>
#include <mruby/proc.h>
#include <mruby/variable.h>
-1
View File
@@ -6,7 +6,6 @@
#include <mruby/string.h>
#include <mruby/debug.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/data.h>
#include <mruby/array.h>
#include <mruby/istruct.h>
#include <mruby/presym.h>
#include <mruby/range.h>
#include <mruby/string.h>
#include <mruby/internal.h>
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/range.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
static mrb_bool
r_less(mrb_state *mrb, mrb_value a, mrb_value b, mrb_bool excl)
-1
View File
@@ -2,7 +2,6 @@
#include <mruby/class.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifndef MRB_NO_FLOAT
#include <math.h>
-1
View File
@@ -13,7 +13,6 @@
#include <mruby/proc.h>
#include <mruby/data.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/error.h>
#include <mruby/khash.h>
-1
View File
@@ -37,7 +37,6 @@
#endif
#include <mruby.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -36,7 +36,6 @@
#include <mruby/variable.h>
#include <mruby/error.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/io.h>
#include "socket_hal.h"
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/hash.h>
#include <mruby/numeric.h>
#include <mruby/presym.h>
#include <mruby/internal.h>
#include <string.h>
#include <ctype.h>
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/time.h>
#include <mruby/class.h>
#include <mruby/presym.h>
#include <time.h>
#include <string.h>
-1
View File
@@ -5,7 +5,6 @@
#include <mruby/string.h>
#include <mruby/range.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define ENC_ASCII_8BIT "ASCII-8BIT"
#define ENC_BINARY "BINARY"
-1
View File
@@ -14,7 +14,6 @@
#include <mruby/range.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define RSTRUCT_LEN(st) RARRAY_LEN(st)
#define RSTRUCT_PTR(st) RARRAY_PTR(st)
-1
View File
@@ -3,7 +3,6 @@
#include <mruby/class.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
-1
View File
@@ -12,7 +12,6 @@
#include <mruby/gc.h>
#include <mruby/hash.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <mruby/proc.h>
#include <mruby/string.h>
#include <mruby/variable.h>
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/time.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifdef MRB_NO_STDIO
#include <string.h>
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/range.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include "value_array.h"
#define ARY_DEFAULT_LEN 4
-1
View File
@@ -15,7 +15,6 @@
#include <mruby/numeric.h>
#include <mruby/data.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define MAX_IREP_REFCNT UINT16_MAX
#define UNKNOWN_LINENO -1
-1
View File
@@ -456,7 +456,6 @@ mrb_dump_irep_cstruct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE
"#include <mruby/irep.h>\n"
"#include <mruby/debug.h>\n"
"#include <mruby/proc.h>\n"
"#include <mruby/presym.h>\n"
"\n") < 0) {
return MRB_DUMP_WRITE_FAULT;
}
-1
View File
@@ -17,7 +17,6 @@
#include <mruby/istruct.h>
#include <mruby/opcode.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/* mrb_mt_tbl, union mrb_mt_ptr, mrb_mt_entry defined in internal.h */
#define MT_PROTECTED MRB_METHOD_PROTECTED_FL
-1
View File
@@ -6,7 +6,6 @@
#include <mruby.h>
#include <mruby/proc.h>
#include <mruby/presym.h>
/* internal method `__update_hash(oldhash, index, itemhash)` */
static mrb_value
-1
View File
@@ -16,7 +16,6 @@
#include <mruby/class.h>
#include <mruby/throw.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
void
mrb_exc_mesg_set(mrb_state *mrb, struct RException *exc, mrb_value mesg)
-1
View File
@@ -22,7 +22,6 @@
#include <mruby/error.h>
#include <mruby/throw.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifdef MRB_GC_STRESS
#include <stdlib.h>
-1
View File
@@ -13,7 +13,6 @@
#include <mruby/variable.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
-1
View File
@@ -14,7 +14,6 @@
#include <mruby/error.h>
#include <mruby/istruct.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* Checks if the method `mid` for object `obj` is implemented by
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <string.h>
#ifndef MRB_NO_FLOAT
-1
View File
@@ -7,7 +7,6 @@
#include <mruby.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
MRB_API mrb_value
mrb_num_add(mrb_state *mrb, mrb_value x, mrb_value y)
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/string.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* Checks if two mruby values, `v1` and `v2`, are identical.
-1
View File
@@ -8,7 +8,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <string.h>
#if defined(_WIN32)
# include <windows.h>
-1
View File
@@ -12,7 +12,6 @@
#include <mruby/array.h>
#include <mruby/hash.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
static const mrb_code call_iseq[] = {
OP_CALL,
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/array.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#define RANGE_INITIALIZED_FLAG 1
#define RANGE_INITIALIZED(p) ((p)->flags |= RANGE_INITIALIZED_FLAG)
-1
View File
@@ -16,7 +16,6 @@
#include <mruby/string.h>
#include <mruby/numeric.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <string.h>
typedef struct mrb_shared_string {
-1
View File
@@ -10,7 +10,6 @@
#include <mruby/dump.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifndef MRB_PRESYM_SCANNING
/* const uint16_t presym_length_table[] */
-1
View File
@@ -11,7 +11,6 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/* Instance variable table structure */
typedef struct iv_tbl {
+3 -2
View File
@@ -20,7 +20,6 @@
#include <mruby/throw.h>
#include <mruby/dump.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifdef MRB_NO_STDIO
#if defined(__cplusplus)
@@ -708,7 +707,9 @@ prepare_missing(mrb_state *mrb, mrb_callinfo *ci, mrb_value recv, mrb_sym mid, m
}
else {
mrb_assert(ci->nk == 15);
argv[1] = argv[ci->n];
if (ci->n != CALL_MAXARGS) {
argv[1] = argv[ci->n]; /* keyword arguments */
}
argv[2] = blk;
}
argv[0] = args; /* must be replaced after saving argv[0] as it may be a keyword argument */
+7 -9
View File
@@ -7,8 +7,6 @@ all_prerequisites = ->(task_name, prereqs) do
end
MRuby.each_target do |build|
gensym_task = task(:gensym)
presym = build.presym
include_dir = "#{build.build_dir}/include"
@@ -34,12 +32,12 @@ MRuby.each_target do |build|
file presym.list_path => ppps do
presyms = presym.scan(ppps)
current_presyms = presym.read_list if File.exist?(presym.list_path)
update = presyms != current_presyms
presym.write_list(presyms) if update
mkdir_p presym.header_dir
%w[id table].each do |type|
next if !update && File.exist?(presym.send("#{type}_header_path"))
presym.send("write_#{type}_header", presyms)
if presyms != current_presyms
mkdir_p presym.header_dir
%w[id table].each do |type|
presym.send("write_#{type}_header", presyms)
end
presym.write_list(presyms)
end
end
@@ -55,5 +53,5 @@ MRuby.each_target do |build|
file prereq => presym.list_path
end
gensym_task.enhance([presym.list_path])
task gensym: presym.list_path
end