| Age | Commit message (Collapse) | Author |
|
|
|
mruby-io: Fixing compilation issue under the legacy MinGW environment
|
|
Reported by @shuujii.
|
|
Should have handled the case `to_a` returns `nil`.
|
|
Adding MRB_MINGW32_LEGACY in common.h in order to identify the legacy MinGW environment (i.e. NOT to be confused with MinGW-w64).
For more info about MinGW defined macros, see: https://sourceforge.net/p/predef/wiki/Compilers/
|
|
|
|
|
|
shuujii/simplify-MSVC-detection-to-mrb_static_assert
Simplify MSVC detection to `mrb_static_assert`
|
|
|
|
shuujii/use-normal-static_assert-in-mrb_static_assert-as-much-as-possible
Use normal `static_assert` in `mrb_static_assert` as much as possible
|
|
Use `struct _stat32` instead of `struct __stat32`
|
|
It is described as `struct __stat32` in the MSVC reference manual.
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=vs-2019
But it doesn't really exist, so it must use `struct _stat32`.
It also replaces `struct __stat64` with `struct _stat64` to make it look
nicer.
|
|
* `_Static_assert` can also be used with `-std=gnu99` on GCC >= 4.6.
* `static_assert` can be used on MSVC.
* `static_assert` can be used even on old G++/Clang++ if
`__GXX_EXPERIMENTAL_CXX0X__` is defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shuujii/allow-mrb_static_assert-to-be-used-outside-of-functions
Allow `mrb_static_assert()` to be used outside of functions
|
|
The use of `struct` is an idea by @dearblue.
|
|
|
|
|
|
Note that the home brew version of `mrb_static_assert` only works within
the function body. This reverts commit 8f99689.
|
|
|
|
Merge mruby 2.1.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Extend the `cipush()` and `cipop()` functions
|
|
Improve `rake benchmark`
|
|
- Use POSIX format instead of GNU extension for `time` command.
For example FreeBSD's `time(1)` does not have GNU extensions available.
- Sort `benchmark/bm_*.rb`.
This is because the order of the bar graph cannot be uniquely
determined depending on the result of `Dir.glob`.
|
|
|
|
|
|
|
|
- Remove ` kh_put_prepare` function used only internally
- Remove `n_occupied` member from `kh_` struct
|
|
`puts` should print newline when called without arguments.
|
|
The function corresponding to `ht_hash_func()` was as follows in the days of
khash implementation (before d78acc7a).
```c
mrb_hash_ht_hash_func(mrb_state *mrb, mrb_value key)
{
enum mrb_vtype t = mrb_type(key);
...
switch (t) {
...
default:
hv = mrb_funcall(mrb, key, "hash", 0);
h = (khint_t)t ^ (khint_t)mrb_fixnum(hv);
break;
}
...
}
```
When switched to the segmented list implementation (d78acc7a), this function
was changed as follows.
```c
sg_hash_func(mrb_state *mrb, seglist *t, mrb_value key)
{
enum mrb_vtype tt = mrb_type(key);
...
switch (tt) {
...
default:
hv = mrb_funcall(mrb, key, "hash", 0);
h = (size_t)t ^ (size_t)mrb_fixnum(hv);
break;
}
...
}
```
Since the argument `t` was added, the variable for type tag was changed from
`t` to `tt`, but the variable used in the expression of `h` remained `t`.
Probably this is an omission of change, so fixed it.
|
|
|
|
ref c07f24cd1 and close #5035
|
|
Update document for `ObjectSpace.memsize_of` [ci skip]
|
|
- Returns the updated call info.
- Unify the processing around `cipush()`.
- `cipop()` restores the stack.
|
|
The `recurse` keyword is removed by f00657ead7c3e5f6f9a346d7797a280b5c9f02fa.
|
|
Use type tag for hash code in `ht_hash_func()`
|
|
The function corresponding to `ht_hash_func()` was as follows in the days of
khash implementation (before d78acc7a).
```c
mrb_hash_ht_hash_func(mrb_state *mrb, mrb_value key)
{
enum mrb_vtype t = mrb_type(key);
...
switch (t) {
...
default:
hv = mrb_funcall(mrb, key, "hash", 0);
h = (khint_t)t ^ (khint_t)mrb_fixnum(hv);
break;
}
...
}
```
When switched to the segmented list implementation (d78acc7a), this function
was changed as follows.
```c
sg_hash_func(mrb_state *mrb, seglist *t, mrb_value key)
{
enum mrb_vtype tt = mrb_type(key);
...
switch (tt) {
...
default:
hv = mrb_funcall(mrb, key, "hash", 0);
h = (size_t)t ^ (size_t)mrb_fixnum(hv);
break;
}
...
}
```
Since the argument `t` was added, the variable for type tag was changed from
`t` to `tt`, but the variable used in the expression of `h` remained `t`.
Probably this is an omission of change, so fixed it.
|
|
|
|
Improve `mruby-os-memsize`
|