Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit76dc748

Browse files
committed
Transpiler and SwingJS library update.
Version remains 3.3.1-v7; only affects BigInteger and BigDecimal;specifically in division.
1 parent068cea2 commit76dc748

File tree

7 files changed

+36
-49
lines changed

7 files changed

+36
-49
lines changed
-244 KB
Binary file not shown.
36.8 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20240204101011
1+
20240225103130
-498 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20240204101011
1+
20240225103130
-498 Bytes
Binary file not shown.

‎sources/net.sf.j2s.java.core/srcjs/swingjs2.js‎

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14121,6 +14121,7 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
1412114121

1412214122
// Google closure compiler cannot handle Clazz.new or Clazz.super
1412314123

14124+
// BH 2024.02.23 fixes missing Long.signum
1412414125
// BH 2023.04.30 fixes issues when Info.console == window.console
1412514126
// BH 2023.03.01 upgrade for Java11 String, including String.isBlank() and CharSequence.lines(String) (in Java11 this is StringRoman1.lines(byte[])
1412614127
// BH 2023.02.12 upgrade for (asynchronous?) packaging
@@ -18567,66 +18568,54 @@ var fixLongAB = function(a,b) {
1856718568
}
1856818569

1856918570

18570-
Long.$eq=function(a,b){
18571+
Long.$cmp=function(a,b, unsigned){
1857118572
if (fixLongAB(a,b)) {
18572-
returna == b;
18573+
return(a < b ? -1 : a > b ? 1 : 0);
1857318574
}
1857418575
a = ab[0];b = ab[1];
18575-
return (a[0] == b[0] && a[1] == b[1] && a[2]== b[2]);
18576-
}
18577-
18578-
Long.$ne=function(a,b){
18579-
if (fixLongAB(a,b)) {
18580-
return a != b;
18576+
if (unsigned) {
18577+
a = toLongRLH(a);
18578+
b = toLongRLH(b);
18579+
for (let i = 2; i >= 0; i--) {
18580+
if (a[i] < b[i]) return -1;
18581+
if (a[i] > b[i]) return 1;
18582+
}
18583+
return 0;
1858118584
}
18582-
a = ab[0];b = ab[1];
18583-
return (a[0] != b[0] || a[1] != b[1] || a[2]!= b[2]);
18585+
return (
18586+
a[2] < b[2] ? -1
18587+
: a[2] > b[2] ? 1
18588+
: a[2] == 0 ? 0
18589+
: a[1] < b[1] ? -a[2]
18590+
: a[1] > b[1] ? a[2]
18591+
: a[0] < b[0] ? -a[2]
18592+
: a[0] > b[0] ? a[2]
18593+
: 0
18594+
);
1858418595
}
1858518596

18586-
Long.$gt=function(a,b){
18587-
if (fixLongAB(a,b)) {
18588-
return a > b;
18589-
}
18590-
a = ab[0];b = ab[1];
18591-
return (a[2] > b[2] || a[2] == b[2] && (a[1] > b[1] || a[1] == b[1] && a[0] > b[0]));
18597+
Long.$eq=function(a,b){
18598+
return Long.$cmp(a, b) == 0;
1859218599
}
1859318600

18594-
Long.$cmp=function(a,b, unsigned){
18595-
if (fixLongAB(a,b)) {
18596-
return (a < b ? -1 : a > b ? 1 : 0);
18597-
}
18598-
a = ab[0];b = ab[1];
18599-
if (unsigned) {
18600-
a = toLongRLH(a);
18601-
b = toLongRLH(b);
18602-
}
18603-
return (a[2] < b[2] ? -1 : a[2] > b[2] ? 1
18604-
: a[2] == 0 ? 0 : a[1] < b[1] ? -1 : a[1] > b[1] ? 1
18605-
: a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0);
18601+
Long.$ne=function(a,b){
18602+
return Long.$cmp(a, b) != 0;
1860618603
}
1860718604

1860818605
Long.$ge=function(a,b){
18609-
if (fixLongAB(a,b)) {
18610-
return a >= b;
18611-
}
18612-
a = ab[0];b = ab[1];
18613-
return(a[2] > b[2] || a[2] == b[2] && (a[1] > b[1] || a[1] == b[1] && a[0] >= b[0]));
18606+
return Long.$cmp(a, b) >= 0;
18607+
}
18608+
18609+
Long.$gt=function(a,b){
18610+
returnLong.$cmp(a, b) > 0;
1861418611
}
1861518612

1861618613
Long.$le=function(a,b){
18617-
if (fixLongAB(a,b)) {
18618-
return a <= b;
18619-
}
18620-
a = ab[0];b = ab[1];
18621-
return (a[2] < b[2] || a[2] == b[2] && (a[1] < b[1] || a[1] == b[1] && a[0] <= b[0]));
18614+
return Long.$cmp(a, b) <= 0;
1862218615
}
1862318616

1862418617
Long.$lt=function(a,b){
18625-
if (fixLongAB(a,b)) {
18626-
return a < b;
18627-
}
18628-
a = ab[0];b = ab[1];
18629-
return (a[2] < b[2] || a[2] == b[2] && (a[1] < b[1] || a[1] == b[1] && a[0] < b[0]));
18618+
return Long.$cmp(a, b) < 0;
1863018619
}
1863118620

1863218621

@@ -19210,7 +19199,8 @@ return i;
1921019199
}, 1);
1921119200

1921219201
m$(C$, 'signum$J', function (i) {
19213-
return Long.$ival((Long.$or((Long.$sr(i,63)),(Long.$usr((Long.$neg(i)),63)))));
19202+
return Long.$sign(i);
19203+
//Long.$ival((Long.$or((Long.$sr(i,63)),(Long.$usr((Long.$neg(i)),63)))));
1921419204
}, 1);
1921519205

1921619206
m$(C$, 'reverseBytes$J', function (i) {
@@ -19318,10 +19308,7 @@ Long.toUnsignedBigInteger$J = function(i) {
1931819308
bi || (bi=(Clazz.load("java.math.BigInteger"), Clazz.new_(java.math.BigInteger.c$$S,["18446744073709551616"])));
1931919309
return (i >= 0 ? bi.valueOf$J(i) : bi.valueOf$J(i).add$java_math_BigInteger(bi));
1932019310
}
19321-
1932219311

19323-
m$(Long,"signum$J", function(i){ return i < 0 ? -1 : i > 0 ? 1 : 0; }, 1);
19324-
1932519312
Clazz._setDeclared("java.lang.Short", java.lang.Short = Short = function(){
1932619313
if (arguments[0] === null || typeof arguments[0] != "object")this.c$(arguments[0]);
1932719314
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp