Skip to content

Commit e00e063

Browse files
hansonrhansonr
authored andcommitted
J2S 3.2.2.03 all stream tests working
performance could be better. Test_J8_Speed map with 40,000 4-element ArrayLists flattened to one list with 160,000 elements using: map.values().stream().flatMap(c -> c.stream()).collect(Collectors.toList()) stream for-loop Chrome 182 ms 174 ms FireFox 728 ms 396 ms Edge 366 ms 186 ms Java 14 ms 14 ms So there is no real advantage without parallelism, I think. Still, it is important to cover this. - arity worked out - static vs. nonstatic calling in functional interfaces worked out
1 parent eecc81a commit e00e063

File tree

17 files changed

+1668
-635
lines changed

17 files changed

+1668
-635
lines changed
-4.64 KB
Binary file not shown.
686 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20180809173713
1+
20180811224521
-4.64 KB
Binary file not shown.
686 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20180809173713
1+
20180811224521

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

Lines changed: 246 additions & 176 deletions
Large diffs are not rendered by default.
-4.64 KB
Binary file not shown.

sources/net.sf.j2s.java.core/src/test/Test_Array.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public static void main(String[] args) {
4747
Class<?> c = i3.getClass().getComponentType();
4848
int[] i3b = (int[]) Array.newInstance(c, 5);
4949

50-
50+
int hc = i3.hashCode();
51+
52+
System.out.println(hc);
5153
assert(i3.getClass().getComponentType().getName() == "int");
5254
assert(i33.getClass().getComponentType().getName() == "[I");
5355
assert(i33.getClass().getComponentType().getName() == "[I");

sources/net.sf.j2s.java.core/src/test/Test_Byte.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ public static void main(String[] args) {
1515
System.out.println(i3/5);
1616

1717

18+
byte b1 = 30;
19+
20+
int ib = i3 | b1;
21+
22+
assert(ib == 31);
23+
1824
// integer division must be turned back into an integer in JavaScript
1925

2026
di /= 'c';

0 commit comments

Comments
 (0)