Skip to content

Instantly share code, notes, and snippets.

@tanishiking
Created July 15, 2025 08:53
Show Gist options
  • Save tanishiking/ecea6ab294dca240117093296ff4aa8e to your computer and use it in GitHub Desktop.
Save tanishiking/ecea6ab294dca240117093296ff4aa8e to your computer and use it in GitHub Desktop.
--- 121.mjs 2025-07-15 15:01:18
+++ 125.mjs 2025-07-15 17:53:11
@@ -2302,7 +2302,7 @@
this$1.assumingES6 = true;
this$1.isWebAssembly = false;
this$1.productionMode = true;
- this$1.linkerVersion = "1.21.0-SNAPSHOT";
+ this$1.linkerVersion = "1.25.0-SNAPSHOT";
this$1.fileLevelThis = $fileLevelThis;
return this$1;
})();
@@ -3096,13 +3096,17 @@
}
$h_ju_PriorityQueue$$anon$1.prototype = $c_ju_PriorityQueue$$anon$1.prototype;
$c_ju_PriorityQueue$$anon$1.prototype.hasNext__Z = (function() {
- return (this.ju_PriorityQueue$$anon$1__f_nextIdx < (this.ju_PriorityQueue$$anon$1__f_inner.length | 0));
+ var $x_1 = this.ju_PriorityQueue$$anon$1__f_nextIdx;
+ var v = this.ju_PriorityQueue$$anon$1__f_inner;
+ return ($x_1 < (v.length | 0));
});
$c_ju_PriorityQueue$$anon$1.prototype.next__O = (function() {
if ((!this.hasNext__Z())) {
throw new $c_ju_NoSuchElementException("empty iterator");
}
- this.ju_PriorityQueue$$anon$1__f_last = this.ju_PriorityQueue$$anon$1__f_inner[this.ju_PriorityQueue$$anon$1__f_nextIdx];
+ var v = this.ju_PriorityQueue$$anon$1__f_inner;
+ var index = this.ju_PriorityQueue$$anon$1__f_nextIdx;
+ this.ju_PriorityQueue$$anon$1__f_last = v[index];
this.ju_PriorityQueue$$anon$1__f_nextIdx = ((1 + this.ju_PriorityQueue$$anon$1__f_nextIdx) | 0);
return this.ju_PriorityQueue$$anon$1__f_last;
});
@@ -5338,7 +5342,8 @@
var innerAtParent = inner[parent];
if (($thiz.ju_PriorityQueue__f_java$util$PriorityQueue$$comp.compare__O__O__I(innerAtParent, innerAtM) > 0)) {
inner[parent] = innerAtM;
- inner[m$1] = innerAtParent;
+ var index = m$1;
+ inner[index] = innerAtParent;
m$1 = parent;
continue;
}
@@ -5354,17 +5359,22 @@
while (true) {
var j = (m$1 << 1);
if ((j <= size)) {
- var innerAtJ = inner[j];
+ var index = j;
+ var innerAtJ = inner[index];
if ((j < size)) {
- var innerAtJPlus1 = inner[((1 + j) | 0)];
+ var index$1 = ((1 + j) | 0);
+ var innerAtJPlus1 = inner[index$1];
if (($thiz.ju_PriorityQueue__f_java$util$PriorityQueue$$comp.compare__O__O__I(innerAtJ, innerAtJPlus1) > 0)) {
j = ((1 + j) | 0);
innerAtJ = innerAtJPlus1;
}
}
if (($thiz.ju_PriorityQueue__f_java$util$PriorityQueue$$comp.compare__O__O__I(innerAtM, innerAtJ) > 0)) {
- inner[m$1] = innerAtJ;
- inner[j] = innerAtM;
+ var index$2 = m$1;
+ var e = innerAtJ;
+ inner[index$2] = e;
+ var index$3 = j;
+ inner[index$3] = innerAtM;
m$1 = j;
continue;
}
@@ -5372,17 +5382,25 @@
break;
}
}
-function $ct_ju_PriorityQueue__ju_Comparator__Z__($thiz, comp, internal) {
+function $ct_ju_PriorityQueue__ju_Comparator__Z__I__($thiz, comp, internal, initialCapacity) {
$thiz.ju_PriorityQueue__f_java$util$PriorityQueue$$comp = comp;
$thiz.ju_PriorityQueue__f_java$util$PriorityQueue$$inner = [null];
return $thiz;
}
function $ct_ju_PriorityQueue__($thiz) {
- $ct_ju_PriorityQueue__ju_Comparator__Z__($thiz, $m_ju_NaturalComparator$(), true);
+ $ct_ju_PriorityQueue__ju_Comparator__Z__I__($thiz, $m_ju_NaturalComparator$(), true, 16);
return $thiz;
}
function $ct_ju_PriorityQueue__ju_Collection__($thiz, c) {
- $ct_ju_PriorityQueue__ju_Comparator__Z__($thiz, ((c instanceof $c_ju_PriorityQueue) ? c.ju_PriorityQueue__f_java$util$PriorityQueue$$comp : ($is_ju_SortedSet(c) ? $m_ju_NaturalComparator$().select__ju_Comparator__ju_Comparator(c.comparator__ju_Comparator()) : $m_ju_NaturalComparator$())), true);
+ var $x_2 = ((c instanceof $c_ju_PriorityQueue) ? c.ju_PriorityQueue__f_java$util$PriorityQueue$$comp : ($is_ju_SortedSet(c) ? $m_ju_NaturalComparator$().select__ju_Comparator__ju_Comparator(c.comparator__ju_Comparator()) : $m_ju_NaturalComparator$()));
+ var i = ((1 + c.size__I()) | 0);
+ if ((i > 1073741824)) {
+ var $x_1 = i;
+ } else {
+ var i$1 = (((-1) + i) | 0);
+ var $x_1 = (((-2147483648) >>> (((-1) + Math.clz32(i$1)) | 0)) | 0);
+ }
+ $ct_ju_PriorityQueue__ju_Comparator__Z__I__($thiz, $x_2, true, $x_1);
$thiz.addAll__ju_Collection__Z(c);
return $thiz;
}
@@ -5401,25 +5419,35 @@
if ((e === null)) {
throw new $c_jl_NullPointerException();
}
- this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner.push(e);
- $p_ju_PriorityQueue__fixUp__I__V(this, (((-1) + (this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner.length | 0)) | 0));
+ var v = this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner;
+ v.push(e);
+ var v$1 = this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner;
+ $p_ju_PriorityQueue__fixUp__I__V(this, (((-1) + (v$1.length | 0)) | 0));
return true;
});
$c_ju_PriorityQueue.prototype.peek__O = (function() {
- return (((this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner.length | 0) > 1) ? this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner[1] : null);
+ var v = this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner;
+ if (((v.length | 0) > 1)) {
+ var v$1 = this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner;
+ return v$1[1];
+ } else {
+ return null;
+ }
});
$c_ju_PriorityQueue.prototype.iterator__ju_Iterator = (function() {
return new $c_ju_PriorityQueue$$anon$1(this);
});
$c_ju_PriorityQueue.prototype.size__I = (function() {
- return (((-1) + (this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner.length | 0)) | 0);
+ var v = this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner;
+ return (((-1) + (v.length | 0)) | 0);
});
$c_ju_PriorityQueue.prototype.poll__O = (function() {
var inner = this.ju_PriorityQueue__f_java$util$PriorityQueue$$inner;
if (((inner.length | 0) > 1)) {
var newSize = (((-1) + (inner.length | 0)) | 0);
var result = inner[1];
- inner[1] = inner[newSize];
+ var e = inner[newSize];
+ inner[1] = e;
inner.length = newSize;
$p_ju_PriorityQueue__fixDown__I__V(this, 1);
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment