Commit Graph

1764 Commits

Author SHA1 Message Date
Alexey Tsvetkov 012bc8f1db Revert "Simple workaround for problem described in KT-6437"
This reverts commit 34d408eb7b.
2015-04-24 18:19:34 +03:00
Alexey Tsvetkov 764c506aaa JS: do not generate break for top level return during inline 2015-04-24 18:19:34 +03:00
Alexey Tsvetkov cbdfaeb998 Minor in JS: store js test directives in a list 2015-04-24 18:19:34 +03:00
Alexey Tsvetkov bced28ee41 Minor in JS: simplify count vars directive 2015-04-24 18:19:34 +03:00
Alexey Tsvetkov 900147385d JS: do not alias 'this' literal in a receiver position 2015-04-24 18:19:34 +03:00
Alexey Tsvetkov 6b09b4c2b6 JS: do not create variable for result, if inline call is only return subexpression 2015-04-24 18:19:34 +03:00
Alexey Tsvetkov ea41bc4231 JS: do not create variable for result, if inline function has one top level return 2015-04-24 18:19:34 +03:00
Alexey Tsvetkov c9b24510bb JS: do not create var for result if statement is 'someVar = inlineCall()' 2015-04-24 18:19:33 +03:00
Alexey Tsvetkov fd09d4d837 Minor in JS: moved test for additional vars during inline to separate directory 2015-04-24 18:19:33 +03:00
Alexey Tsvetkov 7a0787bc25 JS: converted FunctionInlineMutator to Kotlin 2015-04-24 18:19:33 +03:00
Alexey Tsvetkov 3bad62840e JS: changed file extension FunctionInlineMutator.kt->.java 2015-04-24 18:19:33 +03:00
Ilya Ryzhenkov c2b3bcc95f SymbolUsageValidator infrastructure 2015-04-24 15:44:28 +03:00
Alexander Udalov d2cd7b00bb Map intrinsic companion objects in JavaToKotlinClassMap
Get rid of multiple usages of IntrinsicObjects where JavaToKotlinClassMap was
already used, simplify code, and support loading of *CompanionObject as Kotlin
built-in companions from Java code.

Also fix a small bug where Boolean was considered a class with an intrinsic
companion in IntrinsicObjects, although it was not
2015-04-24 02:09:26 +03:00
Alexander Udalov 34fa61675d Replace more eager asserts in project with lazy 2015-04-24 02:08:22 +03:00
Mikhail Glukhikh b40fe9d5ba Refactoring: TypeInfoFactory.createTypeInfo() without type -> noTypeInfo(), getNotNullType -> getTypeNotNull, nullability refined, style fixes 2015-04-23 18:25:47 +03:00
Michael Bogdanov df2900c4e4 Introduced ParameterDescriptor type 2015-04-23 15:41:59 +03:00
Alexander Udalov a0502d99f4 Minor, use substringBeforeLast instead of hand-written code 2015-04-23 03:20:11 +03:00
Michael Nedzelsky 7e69c414d4 JS: support new names for built-in metadata files starting with dot 2015-04-23 03:17:31 +03:00
Alexander Udalov 20cd360b07 Rename built-in metadata files starting with dot
Files starting with dot are considered as hidden on Unix systems, and sometimes
are ignored by the tools. For example, Android build tools do not package such
files to the resulting application, which causes Kotlin reflection to fail
there

 #KT-7088 Fixed
2015-04-23 03:17:29 +03:00
Ilya Gorbunov 9759be5493 Generate sum() methods for arrays, iterables and sequences of Byte and Short. These overloads got explicit platformName.
Heuristics to decide when to set platformName.
#KT-3714
2015-04-22 18:21:24 +03:00
Zalim Bashorov 5ec8d72949 Minor: download Rhino as dependency instead of store it in the repository 2015-04-22 15:46:02 +03:00
Zalim Bashorov f59506c5e0 Minor: update rhino to 1.7.6 2015-04-22 12:48:22 +03:00
Zalim Bashorov 1ef9b9db1f JS backend: add the support function expression
#KT-7242 Fixed
2015-04-22 12:48:22 +03:00
Zalim Bashorov 6e60a31b73 JS backend: don't translate labels on expression
#KT-7487 Fixed
2015-04-22 12:48:20 +03:00
Zalim Bashorov 1fe93c302a Minor in JS tests: move dummy abstract classes into one file 2015-04-22 12:48:20 +03:00
Ilya Gorbunov be11394adf Rename copyToArray() to toTypedArray(). 2015-04-21 21:27:28 +03:00
Ilya Gorbunov 5eb3c0bb5e Rename *array() factory methods to *arrayOf(). 2015-04-21 21:27:26 +03:00
Mikhail Glukhikh 27625b04e1 Refactoring of JetTypeInfo / BindingContext. Loop data flow analysis corrected.
Now BindingContext includes expression type info instead of jump out possible, data flow info and expression type.
getType() was added into BindingContext, getType() and recordType() were added into BindingTrace.
JetTypeInfo now includes also jump possible flag and jump point data flow info.
Old TypeInfoWithJumpInfo deleted.
TypeInfoFactory introduced to create JetTypeInfo instances.
A pack of extra tests for break / continue in loops added.
2015-04-21 15:29:07 +03:00
Michael Nedzelsky d0616ed8bd fix KT-7512 JS: project with external library lead to deadlock and IDEA freeze due to wrong storage manager configured
#KT-7512 Fixed
2015-04-20 21:02:01 +03:00
Alexander Udalov ba927318d9 Minor, add PackageFragmentProvider.Empty 2015-04-20 19:09:36 +03:00
Alexander Udalov 3d928a0842 Refactor deserialization initialization in built-ins and JS
BuiltinsPackageFragment was only designed to work with a single instance alive.
Because of this, it was creating deserialization subsystem upon initialization.
This was not working perfectly in JS where it was used, because multiple
storage managers, class caches and other components were created for each
package, leading to different concurrency errors and performance hits. Also in
the near future another package fragment will be needed to represent the
built-in package "kotlin.reflect"
2015-04-20 19:09:35 +03:00
Alexander Udalov 2a3f658ea7 Minor, add missing space to error message 2015-04-20 18:57:31 +03:00
Alexander Udalov 02f05a1d9a Don't use private Sun API in JsContext 2015-04-20 18:57:30 +03:00
Alexey Tsvetkov 8c01298930 JS: generated tests 2015-04-16 21:17:12 +03:00
Alexey Tsvetkov ff5090136c JS: do not extract expressions, when inline call can be expression 2015-04-16 21:17:12 +03:00
Alexey Tsvetkov bf5300a849 JS: fixed tryCatchFinally test because of KT-7328 bug 2015-04-16 21:17:12 +03:00
Alexey Tsvetkov 78a6b95f5a JS: added test case, where inline call in "for" is used 2015-04-16 21:17:12 +03:00
Alexey Tsvetkov 27a1861263 JS: lambda constructor cannot have sideEffect 2015-04-16 21:17:12 +03:00
Alexey Tsvetkov 97a1a13235 JS: inline componentN functions
#KT-7294 fixed
2015-04-16 21:17:12 +03:00
Alexey Tsvetkov a9d38e8d22 JS: decomposition of vars 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov e80059e4a2 JS: decomposition of "while" and "do while" 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov 71ea487828 JS: decomposition of "if" 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov c0111d6e33 JS: decomposition of binary operator
#KT-6437 fixed
 #KT-7359 fixed
2015-04-16 21:17:11 +03:00
Alexey Tsvetkov fd844ad6e3 JS: decomposition of ternary operator 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov 3782b9d382 JS: decomposition of array access 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov 8b68f6d9ab JS: decomposition of array literal 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov 92942fd1c5 JS: decomposition of invocation/"new" 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov b7e26c3bf7 JS: extract expressions preceding inline call 2015-04-16 21:17:11 +03:00
Alexey Tsvetkov f900cb36c5 JS: added inline evaluation order tests generation 2015-04-16 21:17:10 +03:00
Alexey Tsvetkov 616872558c Minor in JS: made JsNew qualifier mutable 2015-04-16 21:17:10 +03:00