58
59 if (thisString.length() == 0) {
60 return true;
61 }
62 if (getCoder(thisString) != getCoder(thatString)) {
63 return false;
64 }
65
66 final byte[] array1 = getValue(thisString);
67 final byte[] array2 = getValue(thatString);
68
69 return ArrayEqualsNode.equals(array1, array2, array1.length);
70 }
71
72 /**
73 * Will be intrinsified with an {@link InvocationPlugin} to a {@link LoadFieldNode}.
74 */
75 public static native byte[] getValue(String s);
76
77 public static native int getCoder(String s);
78 }
|
58
59 if (thisString.length() == 0) {
60 return true;
61 }
62 if (getCoder(thisString) != getCoder(thatString)) {
63 return false;
64 }
65
66 final byte[] array1 = getValue(thisString);
67 final byte[] array2 = getValue(thatString);
68
69 return ArrayEqualsNode.equals(array1, array2, array1.length);
70 }
71
72 /**
73 * Will be intrinsified with an {@link InvocationPlugin} to a {@link LoadFieldNode}.
74 */
75 public static native byte[] getValue(String s);
76
77 public static native int getCoder(String s);
78
79 public static boolean isCompactString(String s) {
80 return getCoder(s) == 0;
81 }
82 }
|