Compare commits

...

6 Commits

Author SHA1 Message Date
mimaki 7d3bc5c3d7 Update version to 3.1.0RC2. 2022-03-31 15:17:17 +09:00
Yukihiro "Matz" Matsumoto f71d389649 codegen.c: fix the negative division regression; fix #5678 2022-03-31 13:05:06 +09:00
Yukihiro "Matz" Matsumoto eaadc5e79f parse.y: empty here-doc delimiter caused infinite loop; fix #5676 2022-03-31 13:01:27 +09:00
Yukihiro "Matz" Matsumoto c627e3b2ab codegen.c: fix a bug in super with keyword arguments; fix #5660 2022-03-31 13:00:34 +09:00
Yukihiro "Matz" Matsumoto 9424e4d4cf parse.y: revert 9e064f2; fix #5647
Need to declare unnamed parameter when argument decomposition used.
2022-03-31 12:59:44 +09:00
Yukihiro "Matz" Matsumoto 64d3f4c730 vm.c: need to adjust argument after packing keyword args; fix #5632
It was caused by #5628.
2022-03-31 12:58:48 +09:00
6 changed files with 1640 additions and 1620 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ of the Ministry of Economy, Trade and Industry of Japan.
## How to get mruby
The release candidate version 3.1.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.1.0-rc.zip](https://github.com/mruby/mruby/archive/3.1.0-rc.zip)
The release candidate version 3.1.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.1.0-rc2.zip](https://github.com/mruby/mruby/archive/3.1.0-rc2.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)
+3 -3
View File
@@ -57,7 +57,7 @@ MRB_BEGIN_DECL
/*
* Patch level string. (optional)
*/
#define MRUBY_PATCHLEVEL_STR "RC"
#define MRUBY_PATCHLEVEL_STR "RC2"
#ifndef MRUBY_PATCHLEVEL_STR
# if MRUBY_PATCHLEVEL < 0
@@ -85,12 +85,12 @@ MRB_BEGIN_DECL
/*
* Release month.
*/
#define MRUBY_RELEASE_MONTH 1
#define MRUBY_RELEASE_MONTH 3
/*
* Release day.
*/
#define MRUBY_RELEASE_DAY 7
#define MRUBY_RELEASE_DAY 31
/*
* Release date as a string.
+2 -2
View File
@@ -839,7 +839,7 @@ gen_muldiv(codegen_scope *s, uint8_t op, uint16_t dst)
}
else { /* OP_DIV */
if (n0 == MRB_INT_MIN && n == -1) goto normal;
n = n0 / n;
n = mrb_div_int(s->mrb, n0, n);
}
s->pc = addr_pc(s, data0.addr);
gen_int(s, dst, n);
@@ -2851,7 +2851,7 @@ codegen(codegen_scope *s, node *tree, int val)
}
}
/* keyword arguments */
if (s2 && (s2->ainfo & 0x1) && tree->cdr->car) {
if (tree->cdr->car) {
nk = gen_hash(s, tree->cdr->car->cdr, VAL, 14);
if (nk < 0) {st++; nk = 15;}
else st += nk*2;
+10 -3
View File
@@ -2962,6 +2962,7 @@ f_margs : f_arg
}
| f_arg ',' tSTAR
{
local_add_f(p, intern_op(mul));
$$ = list3($1, nint(-1), 0);
}
| f_arg ',' tSTAR ',' f_arg
@@ -2978,11 +2979,16 @@ f_margs : f_arg
}
| tSTAR
{
local_add_f(p, intern_op(mul));
$$ = list3(0, nint(-1), 0);
}
| tSTAR ',' f_arg
| tSTAR ','
{
$$ = list3(0, nint(-1), $3);
local_add_f(p, intern_op(mul));
}
f_arg
{
$$ = list3(0, nint(-1), $4);
}
;
@@ -3864,6 +3870,7 @@ f_arg_item : f_norm_arg
{
$$ = new_masgn_param(p, $3, p->locals->car);
local_resume(p, $<nd>2);
local_add_f(p, 0);
}
;
@@ -4849,7 +4856,7 @@ parse_string(parser_state *p)
--len;
}
}
if ((len-1 == hinf->term_len) && (strncmp(s, hinf->term, len-1) == 0)) {
if (hinf->term_len > 0 && len-1 == hinf->term_len && strncmp(s, hinf->term, len-1) == 0) {
heredoc_remove_indent(p, hinf);
return tHEREDOC_END;
}
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -1729,6 +1729,7 @@ RETRY_TRY_BLOCK:
}
mrb_assert(bidx < irep->nregs);
blk = regs[bidx];
uint8_t nk = (b >> 4) & 0x0f;
if (nk > 0 && nk < CALL_MAXARGS) { /* pack keyword arguments */
uint8_t n = b & 0x0f;
@@ -1737,6 +1738,8 @@ RETRY_TRY_BLOCK:
regs[kidx] = kdict;
nk = 15;
b = n | (nk<<4);
bidx = kidx + 1;
regs[bidx] = blk;
}
if (mid == 0 || !target_class) {
@@ -1761,7 +1764,6 @@ RETRY_TRY_BLOCK:
mrb_exc_set(mrb, exc);
goto L_RAISE;
}
blk = regs[bidx];
if (!mrb_nil_p(blk) && !mrb_proc_p(blk)) {
blk = mrb_type_convert(mrb, blk, MRB_TT_PROC, MRB_SYM(to_proc));
/* The stack or ci stack might have been reallocated during