|
7 | 7 |
|
8 | 8 | // Google closure compiler cannot handle Clazz.new or Clazz.super |
9 | 9 |
|
10 | | -// BH 2020.03.11 2.3.9-v1 fixes numerous subtle issues with boxed primatives Integer, Float, etc. |
11 | | -// BH 2020.03.07 2.3.9-v1 fixes array.hashCode() to be System.identityHashCode(array). |
12 | | -// BH 2020.02.18 2.3.8-v2 upgrades String, Integer, ClassLoader, Package, various Exceptions |
| 10 | +// BH 2020.03.19 3.2.9-v1c fixes new String("xxx") !== "xxx" |
| 11 | +// BH 2020.03.11 3.2.9-v1b fixes numerous subtle issues with boxed primatives Integer, Float, etc. |
| 12 | +// BH 2020.03.07 3.2.9-v1a fixes array.hashCode() to be System.identityHashCode(array). |
| 13 | +// BH 2020.02.18 3.2.8-v2 upgrades String, Integer, ClassLoader, Package, various Exceptions |
13 | 14 | // BH 2020.02.12 3.2.8-v1 new Throwable().getStackTrace() should not include j2sClazz methods |
14 | 15 | // BH 2020.02.02 3.2.7-v5 fixes array.getClass().getName() and getArrayClass() for short -- should be [S, not [H, for Java |
15 | 16 | // BH 2019.12.29 3.2.6 fixes Float.parseFloat$S("NaN") [and Double] |
@@ -3200,7 +3201,7 @@ C$.arraycopy$O$I$O$I$I=function (src, srcPos, dest, destPos, length) { |
3200 | 3201 | } |
3201 | 3202 |
|
3202 | 3203 | C$.identityHashCode$O=function (x, offset) { |
3203 | | - return x==null ? 0 : x._$hashcode || (x._$hashcode = ++hashCode + (offset || 0)); |
| 3204 | + return x==null ? 0 : x._$hashcode || (typeof x == "string" ? x.hashCode$() : (x._$hashcode = ++hashCode + (offset || 0))); |
3204 | 3205 | } |
3205 | 3206 |
|
3206 | 3207 | C$.getProperties$=function () { |
@@ -4933,9 +4934,9 @@ case 1: |
4933 | 4934 | // String(StringBuilder builder) |
4934 | 4935 | // String(String original) |
4935 | 4936 | if (x.__BYTESIZE || x instanceof Array){ |
4936 | | - return (x.length == 0 ? "" : typeof x[0]=="number" ? Encoding.readUTF8Array(x) : x.join('')); |
| 4937 | + return new String(x.length == 0 ? "" : typeof x[0]=="number" ? Encoding.readUTF8Array(x) : x.join('')); |
4937 | 4938 | } |
4938 | | - return x.toString(); |
| 4939 | + return new String(x.toString()); |
4939 | 4940 | case 2: |
4940 | 4941 | // String(char[] value, boolean share) |
4941 | 4942 | // String(byte[] ascii, int hibyte) |
|
0 commit comments