forked from JetBrains/kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JS: drop support of old library format
- Loading branch information
Alexey Andreev
authored and
Alexey Andreev
committed
Feb 10, 2017
1 parent
82320bd
commit 7192529
Showing
37 changed files
with
143 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
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'; | ||
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); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+432 Bytes
compiler/testData/cli/js/folderAsLib/LibraryExample/library/sample/sample.kjsm
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# jslib | ||
|
||
Path to sources: `compiler/testData/cli/js/jslib` | ||
|
||
`folderAsLib/LibraryExample.js`, `folderAsLib/LibraryExample.meta.js` and `LibraryExample.jar` should be updated after changing some files in source folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
$TESTDATA_DIR$/withLib.kt | ||
-libraries | ||
compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib | ||
compiler/testData/integration/ant/js/simpleWithStdlibAndJsFileAsAnotherLib | ||
-output | ||
$TEMP_DIR$/out.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
$TESTDATA_DIR$/withLib.kt | ||
-libraries | ||
compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/jslib-example | ||
$TESTDATA_DIR$/folderAsLib | ||
-output | ||
$TEMP_DIR$/out.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
$TESTDATA_DIR$/withLib.kt | ||
-libraries | ||
compiler/testData/integration/ant/js/simpleWithStdlibAndAnotherLib/jslib-example.jar | ||
$TESTDATA_DIR$/lib/LibraryExample.jar | ||
-output | ||
$TEMP_DIR$/out.js |
11 changes: 0 additions & 11 deletions
11
compiler/testData/integration/ant/js/simpleWithStdlibAndAnotherLib/build.log.expected
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
compiler/testData/integration/ant/js/simpleWithStdlibAndAnotherLib/build.xml
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-1.74 KB
compiler/testData/integration/ant/js/simpleWithStdlibAndAnotherLib/jslib-example.jar
Binary file not shown.
14 changes: 0 additions & 14 deletions
14
compiler/testData/integration/ant/js/simpleWithStdlibAndAnotherLib/root1/foo.kt
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...iler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/build.log.expected
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/build.xml
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...tegration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/jslib-example/META-INF/MANIFEST.MF
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...ntegration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/jslib-example/ReadMe.md
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...a/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/jslib-example/jslib-example.js
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/root1/foo.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...a/general/KotlinJavaScriptProjectWithDirectoryAsLibrary/jslib-example/ReadMe.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
Oops, something went wrong.