Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nqp for openSUSE:Factory checked in at 2021-07-10 22:54:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nqp (Old) and /work/SRC/openSUSE:Factory/.nqp.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nqp" Sat Jul 10 22:54:48 2021 rev:37 rq:905574 version:2021.06 Changes: -------- --- /work/SRC/openSUSE:Factory/nqp/nqp.changes 2021-06-01 10:35:34.752620743 +0200 +++ /work/SRC/openSUSE:Factory/.nqp.new.2625/nqp.changes 2021-07-10 22:55:21.191364609 +0200 @@ -1,0 +2,8 @@ +Sat Jul 10 15:49:27 CEST 2021 - n...@detonation.org + +- update to version 2021.06 + * Simplify loop in optimizer's incorporate_inner + * Micro-optimize the sift_down sub in sorted_keys + * Remove no longer needed JVM workaround + +------------------------------------------------------------------- Old: ---- nqp-2021.05.tar.gz New: ---- nqp-2021.06.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nqp.spec ++++++ --- /var/tmp/diff_new_pack.oiYUlD/_old 2021-07-10 22:55:21.723360503 +0200 +++ /var/tmp/diff_new_pack.oiYUlD/_new 2021-07-10 22:55:21.723360503 +0200 @@ -17,15 +17,15 @@ Name: nqp -Version: 2021.05 +Version: 2021.06 Release: 1.1 Summary: Not Quite Perl License: Artistic-2.0 Group: Development/Languages/Other URL: http://rakudo.org/ Source: nqp-%{version}.tar.gz -BuildRequires: moarvm-devel >= 2021.05 -Requires: moarvm >= 2021.05 +BuildRequires: moarvm-devel >= 2021.06 +Requires: moarvm >= 2021.06 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description ++++++ nqp-2021.05.tar.gz -> nqp-2021.06.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/VERSION new/nqp-2021.06/VERSION --- old/nqp-2021.05/VERSION 2021-05-22 21:29:15.000000000 +0200 +++ new/nqp-2021.06/VERSION 2021-06-19 19:01:04.000000000 +0200 @@ -1 +1 @@ -2021.05 +2021.06 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/HLL/SysConfig.nqp new/nqp-2021.06/src/HLL/SysConfig.nqp --- old/nqp-2021.05/src/HLL/SysConfig.nqp 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/HLL/SysConfig.nqp 2021-06-19 19:00:51.000000000 +0200 @@ -14,13 +14,7 @@ $!path-sep := nqp::backendconfig<osname> eq 'MSWin32' ?? '\\' !! '/'; # Determine NQP home -#?if jvm - # TODO could be replaced by nqp::execname() after the next bootstrap for JVM - my $execname := nqp::atkey(nqp::jvmgetproperties,'nqp.execname') // ''; -#?endif -#?if !jvm my $execname := nqp::execname; -#?endif my $install-dir := $execname eq '' ?? %!build-config<prefix> !! nqp::substr($execname, 0, nqp::rindex($execname, $!path-sep, nqp::rindex($execname, $!path-sep) - 1)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/NQP/Optimizer.nqp new/nqp-2021.06/src/NQP/Optimizer.nqp --- old/nqp-2021.05/src/NQP/Optimizer.nqp 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/NQP/Optimizer.nqp 2021-06-19 19:00:51.000000000 +0200 @@ -69,8 +69,7 @@ next if nqp::existskey(%exclude, $name); my @existing := %set{$name}; if @existing { - for %to_add{$name} { nqp::push(@existing, $_) } - #nqp::splice(@existing, $_.value, 0, 0); + nqp::splice(@existing, %to_add{$name}, nqp::elems(@existing), 0); } else { %set{$name} := %to_add{$name}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/core/Hash.nqp new/nqp-2021.06/src/core/Hash.nqp --- old/nqp-2021.05/src/core/Hash.nqp 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/core/Hash.nqp 2021-06-19 19:00:51.000000000 +0200 @@ -15,10 +15,12 @@ sub sift_down(@a, int $start, int $end) { my int $root := $start; + my int $child; + my int $swap; while 2*$root + 1 <= $end { - my $child := 2*$root + 1; - my $swap := $root; + $child := 2*$root + 1; + $swap := $root; if @a[$swap] gt @a[$child] { $swap := $child; @@ -38,13 +40,19 @@ } my int $count := +@keys; + if $count < 3 { + if $count == 2 && @keys[0] gt @keys[1] { + nqp::push(@keys, nqp::shift(@keys)); + } + return @keys; + } my int $start := $count / 2 - 1; + my int $end := $count - 1; while $start >= 0 { - sift_down(@keys, $start, $count - 1); + sift_down(@keys, $start, $end); $start := $start - 1; } - my int $end := +@keys - 1; while $end > 0 { my str $swap := @keys[$end]; @keys[$end] := @keys[0]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPR.java new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPR.java --- old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPR.java 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPR.java 2021-06-19 19:00:51.000000000 +0200 @@ -22,6 +22,14 @@ public String name; /** + * A name that is used to differentiate between different (sub)types that + * have the same representation otherwise. + * Can be left unset for most representations, but is used to detect + * native VMArrays during deserialization. + */ + public String subtype_name; + + /** * Creates a new type object of this representation, and associates it * with the given HOW. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPRRegistry.java new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPRRegistry.java --- old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPRRegistry.java 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/REPRRegistry.java 2021-06-19 19:00:51.000000000 +0200 @@ -62,8 +62,16 @@ private static void addREPR(String name, REPR REPR) { REPR.ID = reprs.size(); - REPR.name = name; reprIdMap.put(name, reprs.size()); + if (name.startsWith("VMArray")) { + /* To detect native VMArrays during deserialization we use an extra + * field. We can set the correct name (VMArray) at this point, since + * lookup will be done from reprIdMap, which knows the long name. + */ + REPR.subtype_name = name; + name = "VMArray"; + } + REPR.name = name; reprs.add(REPR); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/SerializationWriter.java new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/SerializationWriter.java --- old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/SerializationWriter.java 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/SerializationWriter.java 2021-06-19 19:00:51.000000000 +0200 @@ -550,11 +550,11 @@ growToHold(STABLES, STABLES_TABLE_ENTRY_SIZE); /* Make STables table entry. */ + String reprNameForSerialization = st.REPR.name; if (st.REPRData instanceof VMArrayREPRData) { /* Workaround for native arrays. If they end up as VMArray in the * string heap, a plain VMArray will be created in deserialize_stub. * So we cheat and add a suffix to the real REPR name. */ - String reprNameForSerialization; StorageSpec ss = ((VMArrayREPRData)st.REPRData).ss; switch (ss.boxed_primitive) { case StorageSpec.BP_INT: @@ -584,11 +584,8 @@ default: throw ExceptionHandling.dieInternal(tc, "Invalid REPR data for VMArray"); } - outputs[STABLES].putInt(addStringToHeap(reprNameForSerialization)); - } - else { - outputs[STABLES].putInt(addStringToHeap(st.REPR.name)); } + outputs[STABLES].putInt(addStringToHeap(reprNameForSerialization)); outputs[STABLES].putInt(outputs[STABLE_DATA].position()); /* Make sure we're going to write to the correct place. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/DecoderInstance.java new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/DecoderInstance.java --- old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/DecoderInstance.java 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/DecoderInstance.java 2021-06-19 19:00:51.000000000 +0200 @@ -24,6 +24,7 @@ private List<ByteBuffer> toDecode; private List<CharBuffer> decoded; private List<String> lineSeps; + private boolean translate_newlines = false; public void configure(ThreadContext tc, String encoding, SixModelObject config) { if (decoder == null) { @@ -33,6 +34,8 @@ lineSeps = new ArrayList<String>(); lineSeps.add("\n"); lineSeps.add("\r\n"); + if (config.exists_key(tc, "translate_newlines") != 0) + translate_newlines = (long) config.at_key_boxed(tc, "translate_newlines").get_int(tc) != 0; } else { throw ExceptionHandling.dieInternal(tc, "Decoder already configured"); @@ -66,6 +69,10 @@ } } + public synchronized String maybe_translate_newlines(ThreadContext tc, String str) { + return translate_newlines ? str.replace("\r\n", "\n") : str; + } + public synchronized String takeChars(ThreadContext tc, long chars, boolean eof) { ensureConfigured(tc); @@ -89,6 +96,7 @@ String normalized = Normalizer.normalize( decodedBuffer(target), Normalizer.Form.NFC); + normalized = maybe_translate_newlines(tc, normalized); if (normalized.length() > chars) { String result = normalized.substring(0, (int)chars); String remaining = normalized.substring((int)chars, normalized.length()); @@ -128,6 +136,7 @@ String normalized = Normalizer.normalize( decodedBuffer(target), Normalizer.Form.NFC); + normalized = maybe_translate_newlines(tc, normalized); if (normalized.length() == 0 || isNormTerminated(normalized)) return normalized; String result = normalized.substring(0, normalized.length() - 1); @@ -156,7 +165,8 @@ decoder.flush(target); decoder.reset(); } - return Normalizer.normalize(decodedBuffer(target), Normalizer.Form.NFC); + String normalized = Normalizer.normalize(decodedBuffer(target), Normalizer.Form.NFC); + return maybe_translate_newlines(tc, normalized); } public synchronized String takeLine(ThreadContext tc, boolean chomp, boolean eof) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/VMArray.java new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/VMArray.java --- old/nqp-2021.05/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/VMArray.java 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/src/vm/jvm/runtime/org/raku/nqp/sixmodel/reprs/VMArray.java 2021-06-19 19:00:51.000000000 +0200 @@ -89,7 +89,7 @@ SixModelObject obj; if (st.REPRData == null) { // Either a real VMArray or REPRData not yet known. - switch (st.REPR.name) { + switch (st.REPR.subtype_name) { case "VMArray": obj = new VMArrayInstance(); break; @@ -123,8 +123,6 @@ default: throw ExceptionHandling.dieInternal(tc, "Invalid REPR name for VMArray"); } - // Set real REPR name (we cheated during serialization). - st.REPR.name = "VMArray"; } else { StorageSpec ss = ((VMArrayREPRData)st.REPRData).ss; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/t/nqp/019-file-ops.t new/nqp-2021.06/t/nqp/019-file-ops.t --- old/nqp-2021.05/t/nqp/019-file-ops.t 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/t/nqp/019-file-ops.t 2021-06-19 19:00:51.000000000 +0200 @@ -363,7 +363,7 @@ is($fh.readchars(2), '??1', 'readchars the second time with a multi byte character'); $fh.get; is($fh.readchars(5), 'line3', 'readchars after get'); - is($fh.readchars(150), "line4\n", 'readchars with more chars then they are in the file'); + is($fh.readchars(150), "line4\n", 'readchars with more chars than are in the file'); close($fh); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/tools/templates/MOAR_REVISION new/nqp-2021.06/tools/templates/MOAR_REVISION --- old/nqp-2021.05/tools/templates/MOAR_REVISION 2021-05-22 21:29:15.000000000 +0200 +++ new/nqp-2021.06/tools/templates/MOAR_REVISION 2021-06-19 19:01:04.000000000 +0200 @@ -1 +1 @@ -2021.05 +2021.06 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nqp-2021.05/tools/templates/moar/Makefile.in new/nqp-2021.06/tools/templates/moar/Makefile.in --- old/nqp-2021.05/tools/templates/moar/Makefile.in 2021-05-22 21:28:51.000000000 +0200 +++ new/nqp-2021.06/tools/templates/moar/Makefile.in 2021-06-19 19:00:51.000000000 +0200 @@ -25,9 +25,6 @@ @moar::ccinc@@nfpq(@moar::prefix@/include/moar)@ \ @moar::ccinc@@nfpq(@moar::prefix@/include/libatomic_ops)@ \ @moar::ccinc@@nfpq(@moar::prefix@/include/dyncall)@ \ - @moar::ccinc@@nfpq(@moar::prefix@/include/moar)@ \ - @moar::ccinc@@nfpq(@moar::prefix@/include/sha1)@ \ - @moar::ccinc@@nfpq(@moar::prefix@/include/tinymt)@ \ @moar::ccinc@@nfpq(@moar::prefix@/include/libtommath)@ \ @moar::ccinc@@nfpq(@moar::prefix@/include/libuv)@