Yukihiro "Matz" Matsumoto
6744d69d3d
errno.c: replace string literals by MRB_SYM().
2022-01-25 10:39:13 +09:00
Yukihiro "Matz" Matsumoto
1e866dffc4
errno.c: bundled mrbgem need not to support mruby 1.x.
2022-01-25 10:28:50 +09:00
Yukihiro "Matz" Matsumoto
0f5829795e
errno.c: use MRB_SYM() instead of mrb_intern_lit().
2022-01-25 10:26:34 +09:00
Yukihiro "Matz" Matsumoto
3b5486e3ae
mruby-errno/test: update test suites not to report warnings.
2022-01-25 10:22:28 +09:00
Yukihiro "Matz" Matsumoto
3a15d18ebb
errno.c: hide internal _sys_fail from backtrace.
2022-01-24 18:14:28 +09:00
Yukihiro "Matz" Matsumoto
c8d96ed782
stdlib.gembox: add mruby-errno
2022-01-24 18:13:28 +09:00
Yukihiro "Matz" Matsumoto
a60073d7b9
mruby-errno: remove .gitkeep.
2022-01-24 18:07:59 +09:00
Yukihiro "Matz" Matsumoto
0a6d57ab3c
Merge remote-tracking branch 'mruby-errno/master'
2022-01-24 17:58:41 +09:00
Yukihiro "Matz" Matsumoto
2adf32a3f4
add mruby-errno directory
2022-01-24 16:42:36 +09:00
Yukihiro "Matz" Matsumoto
7bedd5e05d
codegen.c: generate OP_SETIDX from attribute assignments.
2022-01-24 11:18:27 +09:00
Yukihiro "Matz" Matsumoto
cda4d9bcb4
codegen.c: refactor gen_call and gen_values.
...
Remove no longer used arguments from the functions.
2022-01-22 16:40:21 +09:00
Yukihiro "Matz" Matsumoto
b611c43a5d
codegen.c: no OP_HASHADD required when val is false.
2022-01-21 15:42:51 +09:00
Yukihiro "Matz" Matsumoto
adb16fc6df
codegen.c: adjust indentation after OP_STRCAT.
2022-01-21 10:51:07 +09:00
Yukihiro "Matz" Matsumoto
ebb5287e29
codedump.c: omit raw c operand for OP_SEND etc.
2022-01-21 10:41:14 +09:00
Yukihiro "Matz" Matsumoto
b53cd3ce25
codegen.c: fix evaluation order of attribute assignment.
2022-01-21 10:41:14 +09:00
Yukihiro "Matz" Matsumoto
f8944792be
parse.y: consistent argument pass for new_call().
2022-01-21 10:41:13 +09:00
Yukihiro "Matz" Matsumoto
ef98eb2c29
codegen.c: fix evaluation order of constant initialization.
...
`a::B = c` should evaluate `a` then `c`. It used to be `c` then `a`. The
`OP_SETMCNST` instruction operands are designed for older order in mind.
Should we changed the operand order?
2022-01-21 10:41:13 +09:00
Yukihiro "Matz" Matsumoto
b68ba2df49
Merge pull request #5634 from hasumikin/fix_mruby-bin-example_tree
...
Fix tree of mruby-bin-example
2022-01-17 23:27:29 +09:00
HASUMI Hitoshi
fb9bba34fb
Fix tree of mruby-bin-example
2022-01-17 22:36:41 +09:00
Yukihiro "Matz" Matsumoto
31fa330404
class.c: add obj->c check before prepare_singleton_class().
2022-01-16 22:22:46 +09:00
Yukihiro "Matz" Matsumoto
475b868b72
time.c: remove duplicated UTC condition check.
2022-01-15 18:24:39 +09:00
Yukihiro "Matz" Matsumoto
171d32c007
time.c: 1969-12-31 23:59:59 is a valid time.
...
But `mktime(3)` for the date returns `-1` which happen to be the
error value.
2022-01-14 11:40:52 +09:00
Yukihiro "Matz" Matsumoto
8f09d8feb4
time.c: check year range before creating Time object.
2022-01-13 15:40:09 +09:00
Yukihiro "Matz" Matsumoto
9f012724fb
vm.c: need to adjust argument after packing keyword args; fix #5632
...
It was caused by #5628 .
2022-01-12 12:44:23 +09:00
Yukihiro "Matz" Matsumoto
7e7f1b2f1d
parse.y: numbered parameters should not appear on toplevel.
...
Toplevel includes the top of the method/class/module definitions.
2022-01-11 14:52:05 +09:00
Yukihiro "Matz" Matsumoto
3a30cc27da
parse.y: move numbered parameter indexing to lexer.
2022-01-11 14:49:41 +09:00
Yukihiro "Matz" Matsumoto
5dfbfb3ecd
parse.y: p->nvar (numbered argument index list) may be NULL.
2022-01-10 15:44:15 +09:00
Yukihiro "Matz" Matsumoto
8c7b995962
AUTHORS: update entries [ci skip]
2022-01-10 12:33:01 +09:00
Yukihiro "Matz" Matsumoto
69b1667b5b
Merge pull request #5630 from dearblue/dumps
...
Fixes file header in src/{cdump,dump}.c [ci skip]
2022-01-09 21:46:40 +09:00
dearblue
178daf1a75
Fixes file header in src/{cdump,dump}.c [ci skip]
...
The file headers were pointing to each other's files.
2022-01-09 16:30:06 +09:00
Yukihiro "Matz" Matsumoto
696589cf27
Merge pull request #5628 from dearblue/super-kwargs
...
Fixing keyword arguments with `super`
2022-01-06 10:05:05 +09:00
Yukihiro "Matz" Matsumoto
b1fc0dd5a4
Merge pull request #5629 from dearblue/nanbox
...
Allows handling of unaligned cptrs for `MRB_NAN_BOXING`
2022-01-06 10:02:49 +09:00
Yukihiro "Matz" Matsumoto
dfa21f2e58
class.c: cancel #5620 which is no longer needed since #5622
...
This reverts commit d3b7601af9 .
2022-01-05 19:40:55 +09:00
Yukihiro "Matz" Matsumoto
aaa3bd0e80
mrbc.c: simplify place holder functions; #5622
2022-01-05 19:39:39 +09:00
Yukihiro "Matz" Matsumoto
c088af87b8
object.c: Call functions directly from mrb_ensure_int_type(); #5622
2022-01-05 19:00:14 +09:00
dearblue
88b1654725
Allows handling of unaligned cptrs for MRB_NAN_BOXING
...
It seems to be preferable to be able to handle pointers of type `char` as well.
For this purpose, `mrb_nanbox_tt_inline` has been reorganized.
- `MRB_NANBOX_TT_POINTER` has been split into `MRB_NANBOX_TT_OBJECT` and `MRB_NANBOX_TT_CPTR`
- `MRB_NANBOX_TT_SYMBOL` has been merged into `MRB_NANBOX_TT_MISC`
2022-01-05 17:23:35 +09:00
dearblue
55b2e45a26
Fixing keyword arguments with super
...
fix #5627
2022-01-05 16:40:13 +09:00
Yukihiro "Matz" Matsumoto
d34e1cb84c
Merge pull request #5623 from dearblue/more-presym
...
Improves presym scanning
2022-01-04 11:54:09 +09:00
Yukihiro "Matz" Matsumoto
6c68b516ff
Merge pull request #5624 from dearblue/powerof2
...
Assert that `MRB_METHOD_CACHE_SIZE` is a power of 2
2022-01-04 11:51:00 +09:00
Yukihiro "Matz" Matsumoto
5c75dc9edc
Merge pull request #5625 from dearblue/proc_new
...
Assign after `mrb_irep_incref()` in `mrb_proc_new()`
2022-01-03 08:54:01 +09:00
Yukihiro "Matz" Matsumoto
4e0b162253
Merge pull request #5622 from dearblue/to_f
...
Call functions directly from `mrb_ensure_float_type()`
2022-01-02 18:04:18 +09:00
Yukihiro "Matz" Matsumoto
ab4baba283
Merge pull request #5620 from dearblue/adjust-stacks
...
Adjusting the stack for after it enters the virtual machine
2022-01-02 18:01:53 +09:00
dearblue
bee9665400
Assign after mrb_irep_incref() in mrb_proc_new()
...
ref. 28ccc664e5
2022-01-02 16:43:43 +09:00
dearblue
82a1b00eb6
Assert that MRB_METHOD_CACHE_SIZE is a power of 2
...
The `mrb_static_assert_powerof2()` macro has been introduced for this purpose.
2022-01-02 14:59:55 +09:00
dearblue
f2d19aaaac
Improves presym scanning
...
The main purpose is to increase the chances of finding presym and to prevent errors due to C++11 lambda expressions.
- The argument to receive the class may be written, for example, `mrb_class_get()`.
- The argument that receives the implementation function of the method may be a C++ lambda expression.
In this case, if multiple variable declarations are separated by colons, the preprocessor will recognize them as argument delimiters and report an error.
This patch prevents it from happening.
```c++
// When preprocessing...
func([] { int x, y, z; })
// ^^^^^^^^^^ 1st argument?
// ^ 2nd argument?
// ^^^^ 3rd argument?
```
2022-01-02 11:52:19 +09:00
Yukihiro "Matz" Matsumoto
28ccc664e5
proc.c: should not reference irep when copying failed.
...
It may cause broken reference count numbers.
2022-01-01 21:02:58 +09:00
dearblue
ac22a63ae3
Call functions directly from mrb_ensure_float_type()
...
ref. commit 7f40b645d2
Currently, the build configurations `MRB_USE_COMPLEX` and `MRB_USE_RATIONAL` are not listed in the documentation.
In other words, they are hidden settings.
They are defined in `mrbgems/mruby-{complex,rational}/mrbgem.rake`.
So this patch assumes that it is safe to refer to these functions in core-gems directly from core functions.
However, applications that link with `libmruby_core.a` will have compatibility issues.
In fact, `mrbgems/mruby-bin-mrbc` links with `libmruby_core.a`, so I had to prepare a dummy function.
2021-12-31 19:12:11 +09:00
Yukihiro "Matz" Matsumoto
3de9ddfb39
vm.c: use prepare_missing in mrb_funcall_with_block
...
Remove code duplication.
2021-12-31 18:15:41 +09:00
Yukihiro "Matz" Matsumoto
5ca17c2dce
Merge pull request #5621 from dearblue/ci-cygwin
...
Extend the Cygwin CI time limit to 15 minutes.
2021-12-31 16:32:33 +09:00
Yukihiro "Matz" Matsumoto
9fc26eacd1
Merge pull request #5619 from dearblue/properties
...
Get object properties after `mrb_get_args()`
2021-12-31 15:28:11 +09:00