Compare commits

..

4 Commits

Author SHA1 Message Date
mimaki 1d34c3bed5 Update version to 4.0.0RC. 2026-03-05 11:58:41 +09:00
mimaki 18a1c33fd4 Merge remote-tracking branch 'origin' into stable 2026-03-05 11:14:03 +09:00
Yukihiro "Matz" Matsumoto 40436e4e3c Merge pull request #6627 from suetanvil/stable-3.4.0-plus-fixes 2025-09-23 07:54:35 +01:00
Hendrik 651a183228 fix bigint on raspberry pi
this fixes an issue where base can be out of range on a raspberry pi.
2025-09-18 12:39:05 -04:00
80 changed files with 206 additions and 93 deletions
+26
View File
@@ -0,0 +1,26 @@
{
"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@v7
uses: actions/upload-artifact@v6
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@v7
uses: actions/upload-artifact@v6
if: failure()
with:
name: artifacts
+15 -2
View File
@@ -20,8 +20,8 @@ repos:
- id: prettier
name: run prettier
description: format files with prettier
entry: prettier --write '**/*.md' '**/*.yaml' '**/*.yml'
files: \.(md|ya?ml)$
entry: prettier --write '**/*.json' '**/*.md' '**/*.yaml' '**/*.yml'
files: \.(json|md|ya?ml)$
language: node
additional_dependencies: ["prettier@3.7.4"]
stages: [manual]
@@ -55,6 +55,9 @@ 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
@@ -104,6 +107,16 @@ 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:
+2
View File
@@ -51,6 +51,8 @@ To get mruby, you can download the stable version 4.0.0 from the official mruby
GitHub repository or clone the trunk of the mruby source tree with the "git
clone" command. You can also install and compile mruby using [ruby-install](https://github.com/postmodern/ruby-install), [ruby-build](https://github.com/rbenv/ruby-build), [rvm](https://github.com/rvm/rvm), [conda](https://anaconda.org/channels/conda-forge/packages/mruby/overview) or [Homebrew](https://formulae.brew.sh/formula/mruby).
The release candidate version 4.0.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/4.0.0-rc.zip](https://github.com/mruby/mruby/archive/4.0.0-rc.zip)
The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master)
The trunk of the mruby source tree can be checked out with the
+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,6 +79,7 @@ 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,6 +15,11 @@
*/
#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.
*
+1 -3
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;
* // `MRB_SYM()` is available via `mruby.h` (which includes `mruby/presym.h`).
* // Note that `#include <mruby/presym.h>` is required beforehand because `MRB_SYM()` is used.
* // 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,8 +1594,6 @@ 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
+4 -4
View File
@@ -57,7 +57,7 @@ MRB_BEGIN_DECL
/*
* Patch level string. (optional)
*/
#define MRUBY_PATCHLEVEL_STR ""
#define MRUBY_PATCHLEVEL_STR "RC"
#ifndef MRUBY_PATCHLEVEL_STR
# if MRUBY_PATCHLEVEL < 0
@@ -80,17 +80,17 @@ MRB_BEGIN_DECL
/*
* Release year.
*/
#define MRUBY_RELEASE_YEAR 2025
#define MRUBY_RELEASE_YEAR 2026
/*
* Release month.
*/
#define MRUBY_RELEASE_MONTH 4
#define MRUBY_RELEASE_MONTH 3
/*
* Release day.
*/
#define MRUBY_RELEASE_DAY 20
#define MRUBY_RELEASE_DAY 5
/*
* Release date as a string.
@@ -11,6 +11,7 @@
#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,6 +15,7 @@
#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,6 +7,7 @@
#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,6 +12,7 @@
#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,6 +19,7 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/error.h>
#include <mruby/presym.h>
#include <mruby/internal.h>
#include <stdlib.h>
@@ -12,6 +12,7 @@
#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,6 +4,7 @@
#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,4 +1,5 @@
#include <mruby.h>
#include <mruby/presym.h>
static mrb_value
binding_in_c(mrb_state *mrb, mrb_value self)
+1
View File
@@ -4,6 +4,7 @@
#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,6 +5,7 @@
#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,6 +10,7 @@
*/
#include <mruby.h>
#include <mruby/presym.h>
#ifdef MRB_NO_FLOAT
# error CMath conflicts with 'MRB_NO_FLOAT' configuration
+3 -2
View File
@@ -46,6 +46,7 @@
#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>
@@ -3820,7 +3821,7 @@ codegen_array(codegen_scope *s, node *varnode, int val)
node *elements = array->elements;
int regular_elements = 0;
int first = 1;
int slimit = GEN_LIT_ARY_MAX;
int slimit = GEN_VAL_STACK_MAX;
if (!val) return;
@@ -3830,7 +3831,7 @@ codegen_array(codegen_scope *s, node *varnode, int val)
return;
}
if (cursp() >= slimit) slimit = GEN_VAL_STACK_MAX;
if (cursp() >= GEN_LIT_ARY_MAX) slimit = INT16_MAX;
/* Process each element using cons-list iteration, handling splats */
node *current = elements;
+1
View File
@@ -23,6 +23,7 @@
#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,6 +85,7 @@
#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,6 +2,7 @@
#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,6 +13,7 @@
#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,6 +10,7 @@
#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,6 +2,7 @@
#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,6 +7,7 @@
#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,6 +6,7 @@
#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,6 +2,7 @@
#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,6 +6,7 @@
#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,6 +9,7 @@
#include <mruby/hash.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
+1
View File
@@ -10,6 +10,7 @@
#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,6 +8,7 @@
#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,6 +12,7 @@
#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,6 +8,7 @@
#include <mruby/proc.h>
#include <mruby/class.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
+1
View File
@@ -11,6 +11,7 @@
#endif
#include <mruby/array.h>
#include <mruby/presym.h>
static void
domain_error(mrb_state *mrb, const char *func)
+1
View File
@@ -7,6 +7,7 @@
#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,6 +5,7 @@
#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,6 +4,7 @@
#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,6 +4,7 @@
#include <mruby/hash.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
@@ -10,6 +10,7 @@
#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,6 +11,7 @@
#include <mruby/variable.h>
#include <mruby/endian.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#include <ctype.h>
#include <string.h>
@@ -1,4 +1,5 @@
#include <mruby.h>
#include <mruby/presym.h>
#include <mruby/proc.h>
#include <mruby/variable.h>
+1
View File
@@ -6,6 +6,7 @@
#include <mruby/string.h>
#include <mruby/debug.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
+1
View File
@@ -11,6 +11,7 @@
#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,6 +2,7 @@
#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,6 +2,7 @@
#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,6 +13,7 @@
#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,6 +37,7 @@
#endif
#include <mruby.h>
#include <mruby/presym.h>
/*
* call-seq:
+1
View File
@@ -36,6 +36,7 @@
#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,6 +8,7 @@
#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,6 +8,7 @@
#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,6 +5,7 @@
#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,6 +14,7 @@
#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,6 +3,7 @@
#include <mruby/class.h>
#include <mruby/string.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
* call-seq:
+1
View File
@@ -12,6 +12,7 @@
#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,6 +11,7 @@
#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,6 +11,7 @@
#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,6 +15,7 @@
#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,6 +456,7 @@ 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,6 +17,7 @@
#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,6 +6,7 @@
#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,6 +16,7 @@
#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,6 +22,7 @@
#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,6 +13,7 @@
#include <mruby/variable.h>
#include <mruby/proc.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/*
+1
View File
@@ -14,6 +14,7 @@
#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,6 +10,7 @@
#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,6 +7,7 @@
#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,6 +10,7 @@
#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,6 +8,7 @@
#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,6 +12,7 @@
#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,6 +11,7 @@
#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,6 +16,7 @@
#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,6 +10,7 @@
#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,6 +11,7 @@
#include <mruby/string.h>
#include <mruby/variable.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
/* Instance variable table structure */
typedef struct iv_tbl {
+2 -3
View File
@@ -20,6 +20,7 @@
#include <mruby/throw.h>
#include <mruby/dump.h>
#include <mruby/internal.h>
#include <mruby/presym.h>
#ifdef MRB_NO_STDIO
#if defined(__cplusplus)
@@ -707,9 +708,7 @@ prepare_missing(mrb_state *mrb, mrb_callinfo *ci, mrb_value recv, mrb_sym mid, m
}
else {
mrb_assert(ci->nk == 15);
if (ci->n != CALL_MAXARGS) {
argv[1] = argv[ci->n]; /* keyword arguments */
}
argv[1] = argv[ci->n];
argv[2] = blk;
}
argv[0] = args; /* must be replaced after saving argv[0] as it may be a keyword argument */
+9 -7
View File
@@ -7,6 +7,8 @@ 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"
@@ -32,12 +34,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)
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)
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)
end
end
@@ -53,5 +55,5 @@ MRuby.each_target do |build|
file prereq => presym.list_path
end
task gensym: presym.list_path
gensym_task.enhance([presym.list_path])
end