Skip to content

Commit f966d20

Browse files
committed
Merge branch 'master-2.5' into dist/2.5/bionic
2 parents 680f611 + ed361e9 commit f966d20

Some content is hidden

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

79 files changed

+8978
-22092
lines changed

ChangeLog

Lines changed: 735 additions & 3640 deletions
Large diffs are not rendered by default.

array.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
array.c -
44
5-
$Author: nagachika $
5+
$Author: usa $
66
created at: Fri Aug 6 09:46:12 JST 1993
77
88
Copyright (C) 1993-2007 Yukihiro Matsumoto
@@ -1118,6 +1118,8 @@ ary_ensure_room_for_unshift(VALUE ary, int argc)
11181118
rb_raise(rb_eIndexError, "index %ld too big", new_len);
11191119
}
11201120

1121+
rb_ary_modify(ary);
1122+
11211123
if (ARY_SHARED_P(ary)) {
11221124
VALUE shared = ARY_SHARED(ary);
11231125
capa = RARRAY_LEN(shared);
@@ -1128,7 +1130,6 @@ ary_ensure_room_for_unshift(VALUE ary, int argc)
11281130
}
11291131
}
11301132

1131-
rb_ary_modify(ary);
11321133
capa = ARY_CAPA(ary);
11331134
if (capa - (capa >> 6) <= new_len) {
11341135
ary_double_capa(ary, new_len);

compile.c

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
compile.c - ruby node tree -> VM instruction sequence
44
5-
$Author: nagachika $
5+
$Author: usa $
66
created at: 04/01/01 03:42:15 JST
77
88
Copyright (C) 2004-2007 Koichi Sasada
@@ -482,6 +482,7 @@ static TRACE *new_trace_body(rb_iseq_t *iseq, rb_event_flag_t event);
482482

483483
static int iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *anchor, const NODE *n, int);
484484
static int iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
485+
static int iseq_setup_insn(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
485486
static int iseq_optimize(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
486487
static int iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *const anchor);
487488

@@ -610,6 +611,20 @@ validate_labels(rb_iseq_t *iseq, st_table *labels_table)
610611
st_free_table(labels_table);
611612
}
612613

614+
VALUE
615+
rb_iseq_compile_ifunc(rb_iseq_t *iseq, const struct vm_ifunc *ifunc)
616+
{
617+
DECL_ANCHOR(ret);
618+
INIT_ANCHOR(ret);
619+
620+
(*ifunc->func)(iseq, ret, ifunc->data);
621+
622+
ADD_INSN(ret, ISEQ_COMPILE_DATA(iseq)->last_line, leave);
623+
624+
CHECK(iseq_setup_insn(iseq, ret));
625+
return iseq_setup(iseq, ret);
626+
}
627+
613628
VALUE
614629
rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
615630
{
@@ -723,6 +738,7 @@ rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
723738
validate_labels(iseq, labels_table);
724739
}
725740
#endif
741+
CHECK(iseq_setup_insn(iseq, ret));
726742
return iseq_setup(iseq, ret);
727743
}
728744

@@ -1226,8 +1242,29 @@ new_child_iseq(rb_iseq_t *iseq, const NODE *const node,
12261242
return ret_iseq;
12271243
}
12281244

1245+
static void
1246+
iseq_insert_nop_between_end_and_cont(rb_iseq_t *iseq)
1247+
{
1248+
VALUE catch_table_ary = ISEQ_COMPILE_DATA(iseq)->catch_table_ary;
1249+
unsigned int i, tlen = (unsigned int)RARRAY_LEN(catch_table_ary);
1250+
const VALUE *tptr = RARRAY_CONST_PTR(catch_table_ary);
1251+
for (i = 0; i < tlen; i++) {
1252+
const VALUE *ptr = RARRAY_CONST_PTR(tptr[i]);
1253+
LINK_ELEMENT *end = (LINK_ELEMENT *)(ptr[2] & ~1);
1254+
LINK_ELEMENT *cont = (LINK_ELEMENT *)(ptr[4] & ~1);
1255+
LINK_ELEMENT *e;
1256+
for (e = end; e && (IS_LABEL(e) || IS_TRACE(e)); e = e->next) {
1257+
if (e == cont) {
1258+
INSN *nop = new_insn_core(iseq, 0, BIN(nop), 0, 0);
1259+
ELEM_INSERT_NEXT(end, &nop->link);
1260+
break;
1261+
}
1262+
}
1263+
}
1264+
}
1265+
12291266
static int
1230-
iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
1267+
iseq_setup_insn(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
12311268
{
12321269
if (RTEST(ISEQ_COMPILE_DATA(iseq)->err_info))
12331270
return COMPILE_NG;
@@ -1257,6 +1294,18 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
12571294
dump_disasm_list(FIRST_ELEMENT(anchor));
12581295
}
12591296

1297+
debugs("[compile step 3.4 (iseq_insert_nop_between_end_and_cont)]\n");
1298+
iseq_insert_nop_between_end_and_cont(iseq);
1299+
1300+
return COMPILE_OK;
1301+
}
1302+
1303+
static int
1304+
iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
1305+
{
1306+
if (RTEST(ISEQ_COMPILE_DATA(iseq)->err_info))
1307+
return COMPILE_NG;
1308+
12601309
debugs("[compile step 4.1 (iseq_set_sequence)]\n");
12611310
if (!iseq_set_sequence(iseq, anchor)) return COMPILE_NG;
12621311
if (compile_debug > 5)
@@ -2464,7 +2513,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
24642513
ELEM_INSERT_NEXT(&iobj->link, &pop->link);
24652514
goto again;
24662515
}
2467-
else if ((piobj = (INSN *)get_prev_insn(iobj)) != 0 &&
2516+
else if (IS_INSN(iobj->link.prev) &&
2517+
(piobj = (INSN *)iobj->link.prev) &&
24682518
(IS_INSN_ID(piobj, branchif) ||
24692519
IS_INSN_ID(piobj, branchunless))) {
24702520
INSN *pdiobj = (INSN *)get_destination_insn(piobj);
@@ -5382,15 +5432,8 @@ compile_ensure(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node,
53825432
ADD_LABEL(ret, lstart);
53835433
CHECK(COMPILE_(ret, "ensure head", node->nd_head, (popped | last_leave)));
53845434
ADD_LABEL(ret, lend);
5385-
if (LIST_INSN_SIZE_ZERO(ensr)) {
5386-
ADD_INSN(ret, line, nop);
5387-
}
5388-
else {
5389-
ADD_SEQ(ret, ensr);
5390-
if (!popped && last_leave) {
5391-
ADD_INSN(ret, line, putnil);
5392-
}
5393-
}
5435+
ADD_SEQ(ret, ensr);
5436+
if (!popped && last_leave) ADD_INSN(ret, line, putnil);
53945437
ADD_LABEL(ret, lcont);
53955438
if (last_leave) ADD_INSN(ret, line, pop);
53965439

configure

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ infodir
892892
docdir
893893
oldincludedir
894894
includedir
895+
runstatedir
895896
localstatedir
896897
sharedstatedir
897898
sysconfdir
@@ -1022,6 +1023,7 @@ datadir='${datarootdir}'
10221023
sysconfdir='${prefix}/etc'
10231024
sharedstatedir='${prefix}/com'
10241025
localstatedir='${prefix}/var'
1026+
runstatedir='${localstatedir}/run'
10251027
includedir='${prefix}/include'
10261028
oldincludedir='/usr/include'
10271029
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1274,6 +1276,15 @@ do
12741276
| -silent | --silent | --silen | --sile | --sil)
12751277
silent=yes ;;
12761278

1279+
-runstatedir | --runstatedir | --runstatedi | --runstated \
1280+
| --runstate | --runstat | --runsta | --runst | --runs \
1281+
| --run | --ru | --r)
1282+
ac_prev=runstatedir ;;
1283+
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1284+
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1285+
| --run=* | --ru=* | --r=*)
1286+
runstatedir=$ac_optarg ;;
1287+
12771288
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
12781289
ac_prev=sbindir ;;
12791290
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1411,7 +1422,7 @@ fi
14111422
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
14121423
datadir sysconfdir sharedstatedir localstatedir includedir \
14131424
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1414-
libdir localedir mandir
1425+
libdir localedir mandir runstatedir
14151426
do
14161427
eval ac_val=\$$ac_var
14171428
# Remove trailing slashes.
@@ -1564,6 +1575,7 @@ Fine tuning of the installation directories:
15641575
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
15651576
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
15661577
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1578+
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
15671579
--libdir=DIR object code libraries [EPREFIX/lib]
15681580
--includedir=DIR C header files [PREFIX/include]
15691581
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -10740,7 +10752,7 @@ else
1074010752
We can't simply define LARGE_OFF_T to be 9223372036854775807,
1074110753
since some C++ compilers masquerading as C compilers
1074210754
incorrectly reject 9223372036854775807. */
10743-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10755+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1074410756
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1074510757
&& LARGE_OFF_T % 2147483647 == 1)
1074610758
? 1 : -1];
@@ -10786,7 +10798,7 @@ else
1078610798
We can't simply define LARGE_OFF_T to be 9223372036854775807,
1078710799
since some C++ compilers masquerading as C compilers
1078810800
incorrectly reject 9223372036854775807. */
10789-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10801+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1079010802
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1079110803
&& LARGE_OFF_T % 2147483647 == 1)
1079210804
? 1 : -1];
@@ -10810,7 +10822,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1081010822
We can't simply define LARGE_OFF_T to be 9223372036854775807,
1081110823
since some C++ compilers masquerading as C compilers
1081210824
incorrectly reject 9223372036854775807. */
10813-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10825+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1081410826
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1081510827
&& LARGE_OFF_T % 2147483647 == 1)
1081610828
? 1 : -1];
@@ -10855,7 +10867,7 @@ else
1085510867
We can't simply define LARGE_OFF_T to be 9223372036854775807,
1085610868
since some C++ compilers masquerading as C compilers
1085710869
incorrectly reject 9223372036854775807. */
10858-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10870+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1085910871
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1086010872
&& LARGE_OFF_T % 2147483647 == 1)
1086110873
? 1 : -1];
@@ -10879,7 +10891,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1087910891
We can't simply define LARGE_OFF_T to be 9223372036854775807,
1088010892
since some C++ compilers masquerading as C compilers
1088110893
incorrectly reject 9223372036854775807. */
10882-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10894+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
1088310895
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
1088410896
&& LARGE_OFF_T % 2147483647 == 1)
1088510897
? 1 : -1];

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
ruby2.5 (2.5.6-0nkmi1~dist) unstable; urgency=medium
2+
3+
* Ruby 2.5.6
4+
5+
-- Sorah Fukumori <[email protected]> Wed, 28 Aug 2019 10:33:10 +0000
6+
17
ruby2.5 (2.5.5-0nkmi1~dist) unstable; urgency=medium
28

39
* Ruby 2.5.5

debian/control

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ Architecture: any
3434
Depends: rubygems-integration (>= 1.8),
3535
${misc:Depends},
3636
${shlibs:Depends}
37-
Recommends: fonts-lato,
38-
libjs-jquery
37+
Recommends: fonts-lato
3938
Description: Interpreter of object-oriented scripting language Ruby
4039
Ruby is the interpreted scripting language for quick and easy
4140
object-oriented programming. It has many features to process text

0 commit comments

Comments
 (0)