Commit Graph

608 Commits

Author SHA1 Message Date
Alexey Andreev c285e5ba3b JS: add tests too prove that operator conventions are correctly inlined. Support inlining of invoke operator. See KT-7588 2016-12-20 15:47:39 +03:00
Alexey Andreev d3d406356c JS: use optimized emulation of int32 multiplication. Add test for emulated int32 multiplication 2016-12-20 15:47:39 +03:00
Alexey Andreev 7d8df5c81c JS: optimize integer overflow emulation when possible 2016-12-20 15:47:38 +03:00
Alexey Andreev eb5c79c70d JS: support int overflow behaviour in augmented assignment 2016-12-20 15:47:38 +03:00
Alexey Andreev c411a8febe JS: update tests 2016-12-20 15:47:37 +03:00
Alexey Andreev c854b81a09 JS: trying to implement integer overflow for increment and decrement 2016-12-20 15:47:37 +03:00
Alexey Andreev 446c4c0a33 JS: provide overflow behaviour for int binary operations (see KT-7733) 2016-12-20 15:47:36 +03:00
Dmitry Petrov 33ed98a0d3 Update typing rules for class literal expressions.
C::class : KClass<C>
expr: T => expr::class : KClass<out T>

NB: this means Obj::class : KClass<out Obj> for object Obj.
2016-12-19 10:41:49 +03:00
Alexey Andreev 22ff7c6c45 JS: when translating content of js() function, rename all free references if they point to Kotlin local variable with the same name. See KT-15212 2016-12-17 12:12:36 +03:00
Alexey Andreev 91aeeb20e8 JS: add test to prove that anonymous function that declares lambda is translated correctly. See KT-11589 2016-12-15 19:53:37 +03:00
Alexey Andreev b21f906856 JS: add tests to prove that compiler does not optimize RTTI and safe calls based on type information. Remove corresponding optimization for !! operation. See KT-14033 2016-12-15 19:05:33 +03:00
Alexey Andreev e6501591fa JS: serialize type of local anonymous class as its denotable supertype. See KT-14888 2016-12-15 19:05:32 +03:00
Anton Bannykh 1957ac347a JS: make enum valueOf() throw if not found. 2016-12-15 17:58:40 +03:00
Zalim Bashorov 2277239ab3 KJS: don't export declarations marked as external or annotated by native or library annotations 2016-12-15 14:49:31 +03:00
Zalim Bashorov b42fe06933 KJS: fix compiler crash when using inline function inside string template
#KT-12586 Fixed
2016-12-15 14:49:31 +03:00
Zalim Bashorov 8ccc00f3d4 KJS: deprecate enumerable annotation since it's no longer has any effect and rewrite test which checks enumerability of members 2016-12-15 14:49:31 +03:00
Alexey Andreev 39de1a7659 JS: generate temporary names for function parameters. Remove tests for js() function that references parameters. Remove such usages of js() function from stdlib 2016-12-12 14:30:45 +03:00
Alexey Andreev b634c2cbe3 JS: declare names for native declaration in root scope, to avoid clashing between inner names and global native names. Fix KT-14806 2016-12-12 14:30:45 +03:00
Alexey Andreev 9c9b23a0fb JS: fix translation of local function in lambdas 2016-12-12 14:30:44 +03:00
Alexey Andreev 8ef72935a8 JS: fix translation of try statements with multiple catches 2016-12-12 14:30:44 +03:00
Alexey Andreev e54138b74f JS: use temporary names while translation, replace with fixed name during post-processing pass 2016-12-12 14:30:42 +03:00
Alexey Andreev fff1af4ff6 JS: allow to inherit external classes with overloaded functions in case we don't override them (see KT-13910). 2016-12-09 15:13:09 +03:00
Alexey Andreev ecb498717a JS: rework diagnostics names. Prohibit external inner classes (see KT-14027) 2016-12-09 15:13:08 +03:00
Alexey Andreev 3882bf7564 JS: prohibit native (external) extension properties and functions. See KT-13896 2016-12-09 15:13:07 +03:00
Alexey Andreev cc819928de JS: prevent Any.equals from mangling 2016-12-09 12:04:31 +03:00
Alexey Andreev a2d45153ba JS: prohibit dynamic on RHS of in and !in operators (see KT-6579) 2016-12-09 12:03:52 +03:00
Alexey Andreev d0ffb5bd32 JS: add restrictions to external modifier according to KT-13893 2016-12-08 15:41:42 +03:00
Alexey Andreev 68412ae94f JS: replace all usages of @native annotation with external modifier, in tests, stdlib, etc 2016-12-08 15:41:39 +03:00
Alexey Andreev 0302fcbb72 JS: don't write native superclass to metadata. Fix KT-15007 2016-12-06 15:42:34 +03:00
Alexey Andreev d63a727474 KT-12877: support plain reference to declaration in UMD wrapper, support plain reference to package 2016-12-03 17:15:09 +03:00
Alexey Andreev 495c876b3b KT-12877: add tests for UMD modules 2016-12-03 17:15:09 +03:00
Alexey Andreev 08a7f9c298 KT-12877: reorganize JS module tests to support different module systems. Test JsModule in conjunction with JsNonModule and plain module type 2016-12-03 17:15:08 +03:00
Alexey Andreev 7be872ebca KT-12877: modify tests to check whether mutable top-level properties of JsModule files are supported 2016-12-03 17:14:29 +03:00
Alexey Andreev b1d8f91212 KT-12877: fix how native calls and property references are translated to be make them work with JsModule annotation 2016-12-03 17:14:29 +03:00
Alexey Andreev ac703dfda6 KT-12877: serialize information about file annotations. For each top-level declaration store containing file. Use this information to properly handle file-targeted JsModule. 2016-12-03 17:14:29 +03:00
Alexey Andreev 6df40559f0 KT-12877: initial simple implementation of JsModule. Remove unnecessary ModuleDescriptor from several classes in pipeline 2016-12-03 17:14:28 +03:00
Anton Bannykh 3e4376f4ba JS: don't omit guard for catch with Throwable type (KT-13616); don't generate guard for catch with dynamic type (KT-13615) 2016-12-02 17:13:02 +03:00
Anton Bannykh 6301e3ec30 JS: Fix capturing class construction function for lambdas inside inline functions with reified type parameters (KT-13522). 2016-12-02 13:42:42 +03:00
Anton Bannykh 159df7964a JS: bound callable references (KT-13573). 2016-11-28 16:33:58 +03:00
Alexey Andreev 66c78be10f JS: don't optimize RTTI when possible, i.e. don't remove is and as when object is known at compile time to have type in RHS of expression. Substitute kotlin.Any with Object. Fix #KT-7665, #KT-7664 2016-11-25 14:08:13 +03:00
Alexey Andreev 46242f4430 JS: when RHS of as cast is non-nullable native interface, check LHS for null 2016-11-25 14:07:30 +03:00
Alexey Andreev 2eb54f234c JS: prohibit passing native interfaces to reified type parameters 2016-11-25 14:07:29 +03:00
Alexey Andreev acf7fcaebf JS: prohibit is checks against native interfaces. Warn about casts to native interfaces. Fix #KT-14037, fix #KT-14038 2016-11-25 14:07:29 +03:00
Sergey Mashkov d3afb683a3 Update tests expected files 2016-11-24 12:14:31 +03:00
Sergey Mashkov ecbf2c023d Upgrade example 2016-11-24 12:14:31 +03:00
Alexey Andreev ea1e196e9a JS: remove unused imports from generated JS. Fix KT-14748 2016-11-23 12:19:04 +03:00
Alexey Andreev cf89e24b49 JS: fix removal of unused lambdas after inlining 2016-11-23 12:19:04 +03:00
Alexey Andreev be196789d2 JS: fix bug in temporary variable elimination 2016-11-23 12:19:03 +03:00
Alexey Andreev 8b9852edec JS: remove Kotlin.createClass/definePackage/etc functions from stdlib. Reimplement some classes in Kotlin 2016-11-23 12:13:54 +03:00
Alexey Andreev 85a775375a JS: when deciding whether inner class of a local class captures this, don't check for subtyping, since frontend generates strict classes in descriptors. Remove fix for #KT-13583, since it's no more needed. Fix #KT-13792 2016-11-21 12:57:59 +03:00