Skip to content

Commit 0975bb6

Browse files
committed
New upstream version 2.7.2
1 parent 9ed6a36 commit 0975bb6

File tree

221 files changed

+6423
-3229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+6423
-3229
lines changed

ChangeLog

Lines changed: 955 additions & 0 deletions
Large diffs are not rendered by default.

ast.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,10 @@ node_children(rb_ast_t *ast, NODE *node)
407407
NEW_CHILD(ast, node->nd_args->nd_head),
408408
NEW_CHILD(ast, node->nd_args->nd_body));
409409
case NODE_OP_ASGN2:
410-
return rb_ary_new_from_args(4, NEW_CHILD(ast, node->nd_recv),
410+
return rb_ary_new_from_args(5, NEW_CHILD(ast, node->nd_recv),
411411
node->nd_next->nd_aid ? Qtrue : Qfalse,
412412
ID2SYM(node->nd_next->nd_vid),
413+
ID2SYM(node->nd_next->nd_mid),
413414
NEW_CHILD(ast, node->nd_value));
414415
case NODE_OP_ASGN_AND:
415416
return rb_ary_new_from_args(3, NEW_CHILD(ast, node->nd_head), ID2SYM(idANDOP),
@@ -569,7 +570,9 @@ node_children(rb_ast_t *ast, NODE *node)
569570
var_name(ainfo->first_post_arg),
570571
INT2NUM(ainfo->post_args_num),
571572
NEW_CHILD(ast, ainfo->post_init),
572-
var_name(ainfo->rest_arg),
573+
(ainfo->rest_arg == NODE_SPECIAL_EXCESSIVE_COMMA
574+
? ID2SYM(rb_intern("NODE_SPECIAL_EXCESSIVE_COMMA"))
575+
: var_name(ainfo->rest_arg)),
573576
(ainfo->no_kwarg ? Qfalse : NEW_CHILD(ast, ainfo->kw_args)),
574577
(ainfo->no_kwarg ? Qfalse : NEW_CHILD(ast, ainfo->kw_rest_arg)),
575578
var_name(ainfo->block_arg));

bootstraptest/test_thread.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
puts "Thread count: #{threads.count} (#{error})"
99
break
1010
end while true
11-
}
11+
} if false # disable to pass CI
12+
1213
assert_equal %q{ok}, %q{
1314
Thread.new{
1415
}.join

compile.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2719,7 +2719,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
27192719
ELEM_REMOVE(&iobj->link);
27202720
return COMPILE_OK;
27212721
}
2722-
else if (iobj != diobj && IS_INSN_ID(diobj, jump) &&
2722+
else if (iobj != diobj && IS_INSN(&diobj->link) &&
2723+
IS_INSN_ID(diobj, jump) &&
27232724
OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0)) {
27242725
/*
27252726
* useless jump elimination:
@@ -2897,7 +2898,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
28972898
}
28982899

28992900
for (;;) {
2900-
if (IS_INSN_ID(nobj, jump)) {
2901+
if (IS_INSN(&nobj->link) && IS_INSN_ID(nobj, jump)) {
29012902
replace_destination(iobj, nobj);
29022903
}
29032904
else if (prev_dup && IS_INSN_ID(nobj, dup) &&
@@ -4240,7 +4241,7 @@ compile_hash(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int popp
42404241
FLUSH_CHUNK();
42414242

42424243
const NODE *kw = node->nd_next->nd_head;
4243-
int empty_kw = nd_type(kw) == NODE_LIT; /* foo( ..., **{}, ...) */
4244+
int empty_kw = nd_type(kw) == NODE_LIT && RB_TYPE_P(kw->nd_lit, T_HASH); /* foo( ..., **{}, ...) */
42444245
int first_kw = first_chunk && stack_len == 0; /* foo(1,2,3, **kw, ...) */
42454246
int last_kw = !node->nd_next->nd_next; /* foo( ..., **kw) */
42464247
int only_kw = last_kw && first_kw; /* foo(1,2,3, **kw) */

configure

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6487,6 +6487,9 @@ $as_echo_n "checking for real target cpu... " >&6; }
64876487
#ifdef __ppc64__
64886488
"processor-name=powerpc64"
64896489
#endif
6490+
#ifdef __arm64__
6491+
"processor-name=arm64"
6492+
#endif
64906493
EOF
64916494
sed -n 's/^"processor-name=\(.*\)"/\1/p'`
64926495
target="$target_cpu${target}"
@@ -8455,7 +8458,7 @@ fi
84558458
-Wsuggest-attribute=format \
84568459
-Wsuggest-attribute=noreturn \
84578460
-Wunused-variable \
8458-
-diag-disable=175,188,2259 \
8461+
-diag-disable=175,188,1684,2259,2312 \
84598462
$extra_warnflags \
84608463
; do
84618464
if test "$particular_werror_flags" != yes; then :
@@ -26556,6 +26559,10 @@ $as_echo_n "checking native coroutine implementation for ${target_cpu}-${target_
2655626559

2655726560
rb_cv_coroutine=amd64
2655826561
;; #(
26562+
arm64-darwin*) :
26563+
26564+
rb_cv_coroutine=arm64
26565+
;; #(
2655926566
x*64-linux*) :
2656026567

2656126568
case "$ac_cv_sizeof_voidp" in #(

configure.ac

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
530530
-Wsuggest-attribute=format \
531531
-Wsuggest-attribute=noreturn \
532532
-Wunused-variable \
533-
-diag-disable=175,188,2259 \
533+
-diag-disable=175,188,1684,2259,2312 \
534534
$extra_warnflags \
535535
; do
536536
AS_IF([test "$particular_werror_flags" != yes], [
@@ -2309,6 +2309,9 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [
23092309
[x*64-darwin*], [
23102310
rb_cv_coroutine=amd64
23112311
],
2312+
[arm64-darwin*], [
2313+
rb_cv_coroutine=arm64
2314+
],
23122315
[x*64-linux*], [
23132316
AS_CASE(["$ac_cv_sizeof_voidp"],
23142317
[8], [ rb_cv_coroutine=amd64 ],

coroutine/amd64/Context.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## This file is part of the "Coroutine" project and released under the MIT License.
33
##
44
## Created by Samuel Williams on 10/5/2018.
5-
## Copyright, 2018, by Samuel Williams. All rights reserved.
5+
## Copyright, 2018, by Samuel Williams.
66
##
77

88
#define TOKEN_PASTE(x,y) x##y

coroutine/amd64/Context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of the "Coroutine" project and released under the MIT License.
33
*
44
* Created by Samuel Williams on 10/5/2018.
5-
* Copyright, 2018, by Samuel Williams. All rights reserved.
5+
* Copyright, 2018, by Samuel Williams.
66
*/
77

88
#pragma once

coroutine/arm32/Context.S

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,28 @@
22
## This file is part of the "Coroutine" project and released under the MIT License.
33
##
44
## Created by Samuel Williams on 10/5/2018.
5-
## Copyright, 2018, by Samuel Williams. All rights reserved.
5+
## Copyright, 2018, by Samuel Williams.
66
##
77

8+
#define TOKEN_PASTE(x,y) x##y
9+
#define PREFIXED_SYMBOL(prefix,name) TOKEN_PASTE(prefix,name)
10+
11+
.file "Context.S"
812
.text
13+
.globl PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer)
14+
.align 2
15+
.type PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer),%function
16+
.syntax unified
917

10-
.globl coroutine_transfer
11-
coroutine_transfer:
18+
PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer):
1219
# Save caller state (8 registers + return address)
1320
push {r4-r11,lr}
14-
21+
1522
# Save caller stack pointer
1623
str sp, [r0]
17-
24+
1825
# Restore callee stack pointer
1926
ldr sp, [r1]
20-
27+
2128
# Restore callee state (8 registers program counter)
2229
pop {r4-r11,pc}

coroutine/arm32/Context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file is part of the "Coroutine" project and released under the MIT License.
33
*
44
* Created by Samuel Williams on 10/5/2018.
5-
* Copyright, 2018, by Samuel Williams. All rights reserved.
5+
* Copyright, 2018, by Samuel Williams.
66
*/
77

88
#pragma once

0 commit comments

Comments
 (0)