Skip to content

Commit d97dabb

Browse files
authored
Merge pull request #77 from BobHanson/yadav1
Yadav1
2 parents c6f6d20 + 6e75b15 commit d97dabb

File tree

305 files changed

+63428
-5251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+63428
-5251
lines changed
-4 MB
Binary file not shown.
21 Bytes
Binary file not shown.
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
20180819230621
1+
<<<<<<< Upstream, based on branch 'yadav1' of https://github.com/BobHanson/java2script.git
2+
20180827111114
3+
=======
4+
20180827113308
5+
>>>>>>> 7e507a2 refactoring mouse events and tooltip
Binary file not shown.
21 Bytes
Binary file not shown.
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
20180819230621
1+
<<<<<<< Upstream, based on branch 'yadav1' of https://github.com/BobHanson/java2script.git
2+
20180827111114
3+
=======
4+
20180827113308
5+
>>>>>>> 7e507a2 refactoring mouse events and tooltip

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@
132132
import org.eclipse.jdt.core.dom.WhileStatement;
133133
import org.eclipse.jdt.core.dom.WildcardType;
134134

135+
// BH 8/20/2018 -- fix for return (short)++;
136+
135137
// BH 8/19/2018 -- refactored to simplify $finals$
136138
// BH 8/12/2018 -- refactored to simplify naming issues
137139
// BH 8/6/2018 -- additional Java 8 fixes; enum $valueOf$S to valueOf$S
@@ -2795,8 +2797,6 @@ private boolean fixAssignArray(ArrayAccess leftArray, int ptArray, int ptArray2,
27952797
buffer.setLength(ptArray);
27962798
String name = left.substring(0, ptIndex1);
27972799
if (name.indexOf("(") >= 0) {
2798-
// test/Test_Static: getByteArray()[p++] += (byte) ++p;
2799-
// ($j$=C$.getByteArray())[$k$=p++]=($j$[$k$]+((++p|0))|0);
28002800
buffer.append("($j$=" + name + ")");
28012801
name = "$j$";
28022802
trailingBuffer.addType("j");
@@ -3513,7 +3513,7 @@ private void addPrePostFix(Expression left, ASTNode parent, IVariableBinding var
35133513
boolean isChar = (type == 'c');
35143514
if (isChar)
35153515
type = 'p';
3516-
boolean isStatement = (parent instanceof Statement);
3516+
boolean isStatement = (parent instanceof Statement && !(parent instanceof ReturnStatement));
35173517
boolean addAnonymousWrapper = (!isChar || !isPrefix && !isStatement);
35183518
String key = "$" + type + (isChar ? "$" : "$[0]");
35193519
if (addAnonymousWrapper) {
@@ -3555,8 +3555,9 @@ private void addPrePostFix(Expression left, ASTNode parent, IVariableBinding var
35553555
// ($b$[0]=++b,b=$b$[0]);
35563556
buffer.append(key);
35573557
} else {
3558-
// i = ($b$[0]=b,b=(++$b$[0],$b$[0]),--$b$[0],$b$[0]);
3559-
// ($b$[0]=b,b=(++$b$[0],$b$[0]));
3558+
// postfix
3559+
// statement: ($b$[0]=b,b=(++$b$[0] ,$b$[0]))
3560+
// not statement: i = ($b$[0]=b,b=(++$b$[0] ,$b$[0]),--$b$[0],$b$[0]);
35603561
buffer.append("(");
35613562
buffer.append(op);
35623563
buffer.append(key);
-4 MB
Binary file not shown.

sources/net.sf.j2s.java.core/src/java/awt/AWTKeyStroke.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ public VKCollection() {
840840
* for (var k in C$)
841841
* if (k.indexOf("VK_") == 0) {
842842
* try {
843-
* this.put$S$I(k, Integer.valueOf$I(C$[k]));
843+
* this.put$S$Integer(k, Integer.valueOf$I(C$[k]));
844844
* } catch (e) {}
845845
* }
846846
*/

0 commit comments

Comments
 (0)