Skip to content

Commit 77392df

Browse files
authored
Merge pull request #126 from BobHanson/master
Transpiler upgrade for 0b00 in unboxed parameters; text support for CTRL-C and CTRL-V
2 parents 8550e31 + 707549b commit 77392df

32 files changed

+130
-76
lines changed
-10 Bytes
Binary file not shown.

sources/net.sf.j2s.core/dist/swingjs/_j2sclasslist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,3 +391,5 @@ swingjs/plaf/JSWindowUI.js
391391
swingjs/plaf/LazyActionMap.js
392392
swingjs/plaf/Resizer.js
393393
swingjs/plaf/TextListener.js
394+
395+
-161 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20190828094643
1+
20190829124003
-10 Bytes
Binary file not shown.

sources/net.sf.j2s.core/dist/swingjs/ver/3.2.4/_j2sclasslist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,3 +391,5 @@ swingjs/plaf/JSWindowUI.js
391391
swingjs/plaf/LazyActionMap.js
392392
swingjs/plaf/Resizer.js
393393
swingjs/plaf/TextListener.js
394+
395+
-161 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20190828094643
1+
20190829124003

sources/net.sf.j2s.core/src/net/sf/j2s/core/Java2ScriptVisitor.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
import org.eclipse.jdt.core.dom.WhileStatement;
135135
import org.eclipse.jdt.core.dom.WildcardType;
136136

137+
// BH 2019.08.29 fix for boxing of binary representation 0b01... (Google Closure Compiler bug)
137138
// BH 2019.05.13 fix for Math.getExponent, ulp, nextDown, nextUp, nextAfter needing qualification
138139
// BH 2019.05.13 fix for Function reference in new Foo()::test(...)
139140
// BH 2019.04.03 fix for @j2sIgnore not including {}
@@ -3208,18 +3209,7 @@ public boolean visit(Modifier node) {
32083209
}
32093210

32103211
public boolean visit(NumberLiteral node) {
3211-
String token = node.getToken();
3212-
if (token.endsWith("L") || token.endsWith("l")) {
3213-
buffer.append(token.substring(0, token.length() - 1));
3214-
} else if (!token.startsWith("0x") && !token.startsWith("0X")) {
3215-
if (token.endsWith("F") || token.endsWith("f") || token.endsWith("D") || token.endsWith("d")) {
3216-
buffer.append(token.substring(0, token.length() - 1));
3217-
} else {
3218-
buffer.append(token);
3219-
}
3220-
} else {
3221-
buffer.append(token);
3222-
}
3212+
buffer.append(node.resolveConstantExpressionValue());
32233213
return false;
32243214
}
32253215

sources/net.sf.j2s.java.core/_j2sclasslist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,3 +391,5 @@ swingjs/plaf/JSWindowUI.js
391391
swingjs/plaf/LazyActionMap.js
392392
swingjs/plaf/Resizer.js
393393
swingjs/plaf/TextListener.js
394+
395+

0 commit comments

Comments
 (0)