Skip to content

Commit 7463f1a

Browse files
hansonrhansonr
authored andcommitted
SwingJS-site.zip and transpiler for long l = (long) double
- sets upper/lower limit for long values to 53 bits (+/-1FFFFFFFFFFFFF) - fixes issues with number parsing involving limits and "0x"
1 parent efe4a37 commit 7463f1a

File tree

7 files changed

+4
-12
lines changed

7 files changed

+4
-12
lines changed
0 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20201206104534
1+
20201206104919
0 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20201206104534
1+
20201206104919
0 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3699,11 +3699,7 @@ var decorateAsNumber = function (clazz, qClazzName, type, PARAMCODE, hcOffset) {
36993699
};
37003700

37013701
Clazz.toLong = function(v) {
3702-
v = parseInt(v);
3703-
if (isNaN(v) || v < minLong || v > maxLong){
3704-
return 0;
3705-
}
3706-
return v;
3702+
return (isNaN(v = parseInt(v)) || v < minLong || v > maxLong ? 0 : v);
37073703
}
37083704

37093705
var parseIntLimit = function(s,radix, min, max) {

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17711,11 +17711,7 @@ var decorateAsNumber = function (clazz, qClazzName, type, PARAMCODE, hcOffset) {
1771117711
};
1771217712

1771317713
Clazz.toLong = function(v) {
17714-
v = parseInt(v);
17715-
if (isNaN(v) || v < minLong || v > maxLong){
17716-
return 0;
17717-
}
17718-
return v;
17714+
return (isNaN(v = parseInt(v)) || v < minLong || v > maxLong ? 0 : v);
1771917715
}
1772017716

1772117717
var parseIntLimit = function(s,radix, min, max) {

0 commit comments

Comments
 (0)