JS: drop support of old library format
This commit is contained in:
-1
@@ -5,5 +5,4 @@ Built-By: JetBrains
|
||||
Implementation-Vendor: JetBrains
|
||||
Implementation-Version: snapshot
|
||||
Specification-Title: Kotlin JavaScript Lib
|
||||
Kotlin-JS-Module-Name: jslib-example
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
# jslib-example
|
||||
|
||||
Path to sources: compiler/integration-tests/testData/ant/js/simpleWithStdlibAndFolderAsAnotherLib/jslib-example
|
||||
Path to sources: `compiler/testData/cli/js/jslib`
|
||||
|
||||
The archive compiler/integration-tests/testData/ant/js/simpleWithStdlibAndAnotherLib/jslib-example.jar should be updated after
|
||||
changing some files in source folder.
|
||||
+43
-36
@@ -1,37 +1,44 @@
|
||||
(function (Kotlin) {
|
||||
if (typeof kotlin === 'undefined') {
|
||||
throw new Error("Error loading module 'LibraryExample'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'LibraryExample'.");
|
||||
}
|
||||
var LibraryExample = function (_, Kotlin) {
|
||||
'use strict';
|
||||
var _ = Kotlin.defineRootPackage(null, /** @lends _ */ {
|
||||
library: Kotlin.definePackage(null, /** @lends _.library */ {
|
||||
sample: Kotlin.definePackage(null, /** @lends _.library.sample */ {
|
||||
pairAdd_bunuun$: function (p) {
|
||||
return p.first + p.second;
|
||||
},
|
||||
pairMul_bunuun$: function (p) {
|
||||
return p.first * p.second;
|
||||
},
|
||||
IntHolder: Kotlin.createClass(null, function (value) {
|
||||
this.value = value;
|
||||
}, /** @lends _.library.sample.IntHolder.prototype */ {
|
||||
component1: function () {
|
||||
return this.value;
|
||||
},
|
||||
copy_za3lpa$: function (value) {
|
||||
return new _.library.sample.IntHolder(value === void 0 ? this.value : value);
|
||||
},
|
||||
toString: function () {
|
||||
return 'IntHolder(value=' + Kotlin.toString(this.value) + ')';
|
||||
},
|
||||
hashCode: function () {
|
||||
var result = 0;
|
||||
result = result * 31 + Kotlin.hashCode(this.value) | 0;
|
||||
return result;
|
||||
},
|
||||
equals_za3rmp$: function (other) {
|
||||
return this === other || (other !== null && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.value, other.value)));
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
Kotlin.defineModule('jslib-example', _);
|
||||
}(Kotlin));
|
||||
function pairAdd(p) {
|
||||
return p.first + p.second | 0;
|
||||
}
|
||||
function pairMul(p) {
|
||||
return Kotlin.imul(p.first, p.second);
|
||||
}
|
||||
function IntHolder(value) {
|
||||
this.value = value;
|
||||
}
|
||||
IntHolder.$metadata$ = {
|
||||
kind: Kotlin.Kind.CLASS,
|
||||
simpleName: 'IntHolder',
|
||||
interfaces: []
|
||||
};
|
||||
IntHolder.prototype.component1 = function () {
|
||||
return this.value;
|
||||
};
|
||||
IntHolder.prototype.copy_za3lpa$ = function (value) {
|
||||
return new IntHolder(value === void 0 ? this.value : value);
|
||||
};
|
||||
IntHolder.prototype.toString = function () {
|
||||
return 'IntHolder(value=' + Kotlin.toString(this.value) + ')';
|
||||
};
|
||||
IntHolder.prototype.hashCode = function () {
|
||||
var result = 0;
|
||||
result = result * 31 + Kotlin.hashCode(this.value) | 0;
|
||||
return result;
|
||||
};
|
||||
IntHolder.prototype.equals = function (other) {
|
||||
return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.value, other.value))));
|
||||
};
|
||||
var package$library = _.library || (_.library = {});
|
||||
var package$sample = package$library.sample || (package$library.sample = {});
|
||||
package$sample.pairAdd_1fzo63$ = pairAdd;
|
||||
package$sample.pairMul_1fzo63$ = pairMul;
|
||||
package$sample.IntHolder = IntHolder;
|
||||
Kotlin.defineModule('LibraryExample', _);
|
||||
return _;
|
||||
}(typeof LibraryExample === 'undefined' ? {} : LibraryExample, kotlin);
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
// Kotlin.kotlin_module_metadata(1, "LibraryExample", "H4sIAAAAA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