7458 Commits

Author SHA1 Message Date
James Strachan dc4952c8b1 enabled the test cases and turned into a main() to avoid being run by default in unit tests (as we really need to do a maven build first) 2012-07-05 11:04:15 +01:00
James Strachan c166a38f22 switch QUnit to use the output from CompileMavenGeneratedJSLibrary 2012-07-05 11:03:36 +01:00
James Strachan 925e5b2236 refactored the JS kotlin code so that we've a simple naming convention (*Code.kt") to refer to library code which needs to generate JS code to separate those files from the pure definitions which just refer to existing JS code already - this will help make it easier to keep the maven build and the js test cases in sync 2012-07-05 10:34:00 +01:00
James Strachan 038f79a77a add extra diagnostics if there's a failure 2012-07-05 10:30:28 +01:00
James Strachan 276bfae401 added another test case to check vars work in object declarations 2012-07-05 08:51:47 +01:00
James Strachan 98f6650236 added a (currently disabled) test case for compiling the JS code from the kotlin-js-library maven build 2012-07-04 22:03:08 +01:00
James Strachan c2ca06a8cf simplified the code to try get the JS generation to work (seems to not like fully qualified classes) 2012-07-04 22:02:39 +01:00
James Strachan 85782179c6 added extra diagnostics on assertions so its clear which bit of code caused the problem 2012-07-04 22:02:09 +01:00
Pavel V. Talanov c296197c0f Comment out MapTest (compared to last version by James) 2012-07-04 21:00:47 +04:00
Pavel V. Talanov 92231d2eae Merge remote-tracking branch 'origin/master'
Conflicts:
	js/js.tests/test/org/jetbrains/k2js/test/SingleFileTranslationTest.java
	js/js.tests/test/org/jetbrains/k2js/test/semantics/StdLibTestToJSTest.java
2012-07-04 18:32:24 +04:00
Pavel V. Talanov cbf83c14bd Log exception instead of rethrowing it. 2012-07-04 18:26:03 +04:00
Pavel V. Talanov 165c70c34c Generate kotlinLib.js using closure compiler 2012-07-04 18:22:07 +04:00
Pavel V. Talanov 6f47555d70 Move JsConfiguration class to top level 2012-07-04 17:15:54 +04:00
Pavel V. Talanov d6d5a8c25b Fix tests for now
Comment out builder test for convenience
2012-07-04 17:04:35 +04:00
Pavel V. Talanov c3972d9c58 Remove "rawStatements" from APIs and refactor CodeGenerator 2012-07-04 13:05:30 +04:00
Pavel V. Talanov 0cd1097dd0 Better test generator step1, isolate testing functionality
Also move defineModule to TranslationUtils
2012-07-04 12:56:06 +04:00
Pavel V. Talanov 9f4a48bb1c Remove some strange code from StaticContext. Also use Collection<JetFile> instead of List<JetFile> in some APIs 2012-07-04 12:42:46 +04:00
Pavel V. Talanov a3a2f51c9c More missing "public" 2012-07-04 12:40:39 +04:00
James Strachan bb8dc49692 added more iterator based tests to the JS compilation; exposes some issue with enums... 2012-07-04 09:19:03 +01:00
Pavel V. Talanov 35f5e8a075 Extract and move method from StaticContext to Namer 2012-07-04 12:01:12 +04:00
James Strachan 64b00f0a19 fixed bug in generated dom (missing public on the Node class object) and split the JVM specific Iterator standard library to a separate file for easier JS reuse 2012-07-04 08:46:26 +01:00
James Strachan b9edbea926 latest code generated standard library apis 2012-07-04 08:28:39 +01:00
James Strachan 8f94f5e43f added a bunch more JS test cases from standard library test cases 2012-07-03 22:20:00 +01:00
James Strachan ffffe84fcb added more working DOM test cases for JS 2012-07-03 19:54:32 +01:00
Pavel V. Talanov 592b0e9c37 Specify visibility in some files in jslibs 2012-07-03 21:36:04 +04:00
Pavel V. Talanov dd43f6b699 Deal with absence of js library. fix K2JSMessagingTest 2012-07-03 17:58:58 +04:00
Pavel V. Talanov 508b241553 Remove dead code. 2012-07-03 17:56:22 +04:00
James Strachan 3068af7324 test case for KT-2356 2012-07-03 14:29:47 +01:00
James Strachan b9ffce68e4 added test case for KT-2355 2012-07-03 13:57:21 +01:00
James Strachan 25bf753369 added test case for KT-2354 2012-07-03 13:55:49 +01:00
Pavel V. Talanov e1ecdead75 Turn off the failing StdLibToJSTest. It fails due to some frontend bug. 2012-07-03 16:41:03 +04:00
Pavel V. Talanov 30a01a674d Fix a problem which caused temporary variables to be created in invalid context when creating object literal.
Only 2 tests failing atm.
2012-07-03 15:53:16 +04:00
Pavel V. Talanov d6ffb42497 pull https://github.com/develar/kotlin ecma5-iter3 Make most of the tests work.
Thanks to develar.
2012-07-03 15:27:37 +04:00
Evgeny Gerashchenko a4ab2afa94 Better method names. 2012-07-03 13:35:53 +04:00
James Strachan 9b2e28c76e fixed test case 2012-07-03 08:54:25 +01:00
James Strachan b960bea2d9 added test cases to try reproduce yesterdays JS bug with missing "this.drop(1)" in List.tail property, found another JS compile issue... 2012-07-03 08:45:26 +01:00
James Strachan 541f3d4e78 got more map code compiling to JS and running as unit tests 2012-07-03 07:43:15 +01:00
Pavel V. Talanov 4b15023aec Turn off inlining. May be it'll help with KT-2314. 2012-07-02 17:29:10 +04:00
Pavel V. Talanov da24b36071 Turn on tests. 2012-07-02 17:29:09 +04:00
Pavel V. Talanov 5004b2e01b Separate library files which contain code and those which declarations only. Fixes builder test/ 2012-07-02 17:29:08 +04:00
Pavel V. Talanov 53e77abefc Fix most of the tests. Turn off 3 of the tests temporarily. 2012-07-02 17:29:07 +04:00
Pavel V. Talanov 3504106981 JsTests speed up: Analyze standard library only once. 2012-07-02 17:29:05 +04:00
Pavel V. Talanov 9878b60462 Fix KotlinLibTest and remove redundant tests. 2012-07-02 17:29:03 +04:00
Pavel V. Talanov 49c6555e5e JsTests speed up: cash the scope with Kotlin library. Refactor CodeGenerator class.
About 10% speed up (not much but still...)
2012-07-02 17:29:02 +04:00
James Strachan 63e0f169fc re-enabled compiling to JS test cases now we've fixed the compilation of the latest comparator based standard library code 2012-06-29 23:13:05 +01:00
develar 77320e07f2 ArrayList improvements:
1) remove must compare object using Kotlin.equals (the same as in contains)
2) use ArrayIterator instead of ListIterator (perfomance)
3) remove duplicated code (refactor)
4) toArray
5) fix "add((index, item)" — correct translation to JavaScript "addAt"
2012-06-28 11:13:48 +04:00
develar 07ae3afc95 update rhino 1.7R4 2012-06-28 10:30:36 +04:00
develar 1041837122 implement comparator more correct, so, we can get rid of skipSeal flag for std classes 2012-06-28 10:30:16 +04:00
develar 4ce4cdfbd5 when translator: don't add break after return 2012-06-28 10:29:00 +04:00
develar d6c725bcd9 classes declaration:
fix: class of the same unqualified name in package inside module (see MultiFileTest.testClassOfTheSameNameInAnotherPackage)

We don't ever try to use meaningful var name for temp class declaration — we remember about incremental compilation  inline final class declaration don't generate scope function if we don't need it

failed and fixed test: fast fix Kt817 (we must investigate, actually, it seems dart ast bug — we must have ability to declare name in our scope without check the same name in the parent scope)

perfomance: delete ClassSortingUtils, we don't need it
2012-06-28 10:28:33 +04:00