Supporting data class for JS backend

This commit is contained in:
Peter Rybin
2014-04-14 04:13:21 +04:00
committed by Zalim Bashorov
parent 535cc3eed8
commit ab81d2e261
13 changed files with 534 additions and 7 deletions
+5 -5
View File
@@ -64,12 +64,12 @@
}
function equals_fixedValueHasEquals(fixedValue, variableValue) {
return fixedValue.equals(variableValue);
return fixedValue.equals_za3rmp$(variableValue);
}
function equals_fixedValueNoEquals(fixedValue, variableValue) {
return (typeof variableValue.equals == FUNCTION) ?
variableValue.equals(fixedValue) : (fixedValue === variableValue);
return (typeof variableValue.equals_za3rmp$ == FUNCTION) ?
variableValue.equals_za3rmp$(fixedValue) : (fixedValue === variableValue);
}
function createKeyValCheck(kvStr) {
@@ -138,7 +138,7 @@
Bucket.prototype = {
getEqualityFunction: function (searchValue) {
return (typeof searchValue.equals == FUNCTION) ? equals_fixedValueHasEquals : equals_fixedValueNoEquals;
return (typeof searchValue.equals_za3rmp$ == FUNCTION) ? equals_fixedValueHasEquals : equals_fixedValueNoEquals;
},
getEntryForKey: createBucketSearcher(ENTRY),
@@ -687,7 +687,7 @@ Kotlin.PrimitiveHashSet = Kotlin.createClassNow(Kotlin.AbstractCollection,
return h;
};
this.equals = function (o) {
this.equals_za3rmp$ = function (o) {
if (o === null || o === undefined) return false;
if (this.size() === o.size()) {
var iter1 = this.iterator();