Commit Graph

224 Commits

Author SHA1 Message Date
develar 995f898116 JS backend: added String.isEmpty
(cherry picked from commit 6cf1761)
2013-08-09 14:29:52 +04:00
develar 7c18ab3ca8 JS backend: cleanup strings code.
Added String.size and String.length().
2013-08-09 14:29:52 +04:00
develar 678f6601dd JS backend: made as intrinsic map accessing methods and fixed accessing to native map. 2013-08-09 14:29:52 +04:00
Zalim Bashorov 9b09d5f6df JS backend: fixed String.split for the case when using regexp.
Added(overload) String.split with limit parameter.
2013-08-09 14:29:51 +04:00
develar 0341d875a9 JS backend: cleanup code.
Drop Kotlin.toString and jet.sure.
2013-08-09 14:29:51 +04:00
develar 8302879991 JS backend: added reviver parameter to JSON.parse.
Fixed code style in json.kt.

(cherry picked from commit b3bf97c)
2013-08-09 14:29:51 +04:00
Zalim Bashorov d4bf98de97 JS backend: fixed intrinsic of the typed array factory methods(intArray etc). 2013-08-09 14:29:50 +04:00
develar 1af35a6aff JS backend: make intrinsic array factory methods.
#KT-2511 fixed

(cherry picked from commit 31843c5)
2013-08-09 14:29:50 +04:00
Zalim Bashorov bf60cb2fee JS backend: fixed the division operation for integral types.
#KT-2342 fixed
2013-07-23 19:10:54 +04:00
Zalim Bashorov e8b95ca074 JS backend: simplify and rename tests for closure in nested functions. 2013-07-23 19:10:54 +04:00
develar 462e1bdc98 JS backend: fixed the variable capturing in deeply nested functions which mixed with the object declaration.
(cherry picked from commit 41cb0ab)
2013-07-23 19:10:54 +04:00
develar 4a37d56a1b JS backend: fixed the variable capturing in deeply nested functions.
(cherry picked from commit cee29a6)
2013-07-23 19:10:54 +04:00
develar 66325808c4 JS backend: switched to use native Function.bind(from ES5) instead library function b0-b4.
Removed unnecessary functions from jslib.

(cherry picked from commit f6550e9)
2013-07-23 19:10:54 +04:00
develar 2419fc36ed JS backend: partial fix for #KT-2670 -- throw NPE when unsafe cast null value to not nullable type. 2013-07-23 19:10:54 +04:00
develar 12d19dd9d8 JS backend: added wraping to object the local vars which captured in closure.
Moved local functions and function literals to class/namespace definition.

(cherry picked from commit 36c954b)
2013-07-18 16:04:42 +04:00
Zalim Bashorov e292034141 JS backend: fixed trait inheritance implementation in ES3.
Now each traits in same hierarchy represent separate object, instead a single object.
2013-07-18 16:04:42 +04:00
Zalim Bashorov c5f53df70d JS backend: fixed wrong result when compare null and undefined using Kotlin.equals. 2013-07-18 16:04:42 +04:00
develar 7f1f2aa641 Dropped get_hasNext (hasNext property) from js library files. 2013-06-22 01:34:38 +04:00
Zalim Bashorov 9d1e319f0f JS backend: implemented PrimitiveHashMap#putAll. 2013-06-22 01:34:38 +04:00
develar fa10a3289d Use PrimitiveHashMap and PrimitiveHashSet when possible.
Kotlin.AbstractList splitted to AbstractCollection and AbstractList.
2013-06-22 01:34:37 +04:00
develar 9cd22942e2 Translate when as if-else instead for loop. 2013-06-22 01:34:36 +04:00
Zalim Bashorov 2cce4c575a Fixed the comment of the native vararg test. 2013-06-22 01:34:36 +04:00
Svetlana Isakova 3cf133bff7 changed local extensions priority
local extensions aren't longer chosen before members
2013-06-20 13:43:01 +04:00
Zalim Bashorov a69744e6fb Introduced the cache of temporary variables and expressions.
Used the cached temporary variables in SafeCall and SureCall instead create a new temporary variable.
2013-06-15 15:55:10 +04:00
Zalim Bashorov ee5c7c8f5c Added support spread operator in JS-Backend. 2013-06-15 00:52:02 +04:00
Zalim Bashorov 2bae647412 Make nullable check less verbose in JS-backend.
For check what variable is equal null or undefined enough to compare with null (or undefined).
See ECMAScript specification 11.9.1, 11.9.2, 11.9.3
2013-06-15 00:52:02 +04:00
Zalim Bashorov 7680203de2 Fixed wrong linearization for open classes and traits.
openList changed during neighbors calculation because the same TLinkable object cannot be put into more than one TLinkedList at the same time.

#KT-3499 fixed
2013-04-11 20:26:47 +04:00
Zalim Bashorov 282c69eb6b Fixed return value for ArrayList#remove in js library.
Removed unnecessary Kotlin.IndexOutOfBounds.
2013-03-27 18:40:10 +04:00
Zalim Bashorov 7350e14e18 Fixed bug when class or trait declared early than its parent, traits and abstract classes which declared after doesn't translated
#KT-3437 Fixed
2013-03-27 18:40:09 +04:00
Evgeny Gerashchenko 5ccbce6de6 Got rid of "tuple" word all over the code. 2013-03-22 16:38:25 +04:00
Evgeny Gerashchenko 655f9e01a2 Renamed tuples from other code. 2013-03-22 16:37:16 +04:00
Zalim Bashorov 9c2d5a8ddb Fixed translating primitive arrays to js. 2013-03-19 16:31:02 +04:00
Zalim Bashorov 322d35ac2f Added some tests for JS implementation of HashMap
Fixed JS implementation of HashMap#putAll
2013-03-12 21:09:33 +04:00
Zalim Bashorov e53270ad3f Fixed ECMAScript3 implementation of Kotlin.$new.
Added bind polyfill.
2013-03-11 13:13:54 +04:00
Zalim Bashorov 220682afe2 fixed mapping sort and max functions from java.util.Collections 2013-03-06 19:16:14 +04:00
Zalim Bashorov 61217a36e7 Merge pull request #145 from tomhal/maps.js-changes
Prevent infinite loop when HashMap is empty and values() method is called
#KT-3035 Fixed
2013-03-05 00:59:51 -08:00
Mikhael Bogdanov 029b2d9770 Test fixes for 'New diagnostic error for ambiguous object expression type' 2013-02-19 17:56:56 +04:00
Evgeny Gerashchenko b9e5704057 Updated test data and stdlib sources. 2013-02-13 18:08:37 +04:00
Evgeny Gerashchenko 58f37f38f4 Renamed NumberSequence to Progression. 2013-01-29 22:55:10 +04:00
Evgeny Gerashchenko 72b8c4b3c8 Refactored structure of ranges in JS backend. 2013-01-29 22:55:08 +04:00
Evgeny Gerashchenko 4a19cd758c Changed JS ranges test so it will fail now. 2013-01-29 22:55:08 +04:00
Evgeny Gerashchenko b2e74b1473 Adapted code to new structure of ranges. 2013-01-29 22:55:06 +04:00
Evgeny Gerashchenko 3acf284a4a Reverted some copyrights. 2013-01-28 19:20:39 +04:00
Evgeny Gerashchenko 52b7ee6447 Happy new year 2013! 2013-01-28 18:58:08 +04:00
Tommy Hallgren 31480385c1 Prevent infinite loop when HasMap is empty and values() method is valled 2012-11-18 15:34:27 +01:00
pTalanov 5bc4fc458a Don't call redundant toString for variables of type Int
Refactor StringTemplateTranslator a little
2012-10-01 21:15:13 +04:00
Andrey Breslav 5eaa5b396b Removing usages of tuples from test data
(KT-2358 Drop tuples)
 #KT-2358 In progress
2012-09-18 20:27:09 +04:00
Evgeny Gerashchenko ffc4792071 Replaced sure() invocations with '!!' operator in JS tests. 2012-09-17 18:00:21 +04:00
Svetlana Isakova e622be8a2d changed js tests/library after collections mapping 2012-09-05 18:55:17 +04:00
Svetlana Isakova a3194e9a46 removed unnecessary import jet.Iterator 2012-09-05 18:55:16 +04:00