Adjust js codegen and lib to 'charAt' -> 'get' transformation

This commit is contained in:
Denis Zharkov
2015-10-11 12:32:41 +03:00
parent 6f4579213c
commit 1c7fa42b86
2 changed files with 5 additions and 5 deletions
@@ -28,7 +28,7 @@ public final class StringOperationFIF extends CompositeFIF {
private StringOperationFIF() {
add(pattern("kotlin", "String", "get"), new BuiltInFunctionIntrinsic("charAt"));
// This intrinsic is needed because charAt is a public function taking one parameter and thus its name would be mangled otherwise
add(pattern("kotlin", "CharSequence", "charAt").checkOverridden(), new BuiltInFunctionIntrinsic("charAt"));
add(pattern("kotlin", "CharSequence", "get").checkOverridden(), new BuiltInFunctionIntrinsic("charAt"));
add(pattern("kotlin", "CharSequence", "length").checkOverridden(), LENGTH_PROPERTY_INTRINSIC);
add(pattern("kotlin", "CharSequence", "subSequence").checkOverridden(), new BuiltInFunctionIntrinsic("substring"));
}
+4 -4
View File
@@ -474,7 +474,7 @@
remove_za3rmp$: function (o) {
var index = this.indexOf_za3rmp$(o);
if (index !== -1) {
this.remove_za3lpa$(index);
this.removeAt_za3lpa$(index);
return true;
}
return false;
@@ -546,9 +546,9 @@
}
this.list.add_vux3hl$(index + this.offset, element);
},
remove_za3lpa$: function (index) {
removeAt_za3lpa$: function (index) {
this.checkRange(index);
var result = this.list.remove_za3lpa$(index + this.offset);
var result = this.list.removeAt_za3lpa$(index + this.offset);
this._size--;
return result;
@@ -597,7 +597,7 @@
this.array[i++] = it.next();
}
},
remove_za3lpa$: function (index) {
removeAt_za3lpa$: function (index) {
this.checkRange(index);
return this.array.splice(index, 1)[0];
},