Commit Graph

35163 Commits

Author SHA1 Message Date
Denis Zharkov da5c81448b Add CoroutineImpl to rendered public API 2016-11-09 12:25:31 +03:00
Denis Zharkov 50a5c08603 Optimize visibility for controller field in CoroutineImpl
While it's impossible to declare a property with protected field and public
getter we split these entities

- `_controller` field is used inside coroutines
- `controller` getter is used for accesing controller from noinline lambdas
 (also it can be used to obtain controller from continuation by explicit cast)
2016-11-09 12:25:31 +03:00
Denis Zharkov 020bab1d7c Minor. Get rid of possible exception when no runtime in class-path
This change is made under the assumption that some version of built-in
classes will always be available through `module.builtIns.getBuiltInClassByFqName`
2016-11-09 12:25:31 +03:00
Denis Zharkov bd5c08f598 Make fields for storing lambda parameters non-final
Because they get assigned within `invoke` call that contradicts with JVM spec
where it's told that they must not be assigned outside of constructors
2016-11-09 12:25:31 +03:00
Denis Zharkov e54b466010 Make fields representing variables in coroutines non-volatile
#KT-14636 Fixed
2016-11-09 12:25:31 +03:00
Denis Zharkov 7e49db8768 Introduce CoroutineImpl as a common super class for coroutines
The main benefit are class-files sizes for them
(not repeating the same declaration for each coroutine)
Also it helped to simplify coroutine codegen code a little

Note that controller/label field become non-volatile (see KT-14636)

 #KT-14636 In Progress
2016-11-09 12:25:31 +03:00
Denis Zharkov fc9605b94e Minor. Drop unused property in GenerationState 2016-11-09 12:25:31 +03:00
Dmitry Petrov 03d8aa272b Infer type arguments of type alias constructors. 2016-11-09 10:48:07 +03:00
Valentin Kipyatkov 9b55ad82a0 KT-14370 Completion inserts fully qualified name for any Java interface with single abstract method (SAM-interface)
#KT-14370 Fixed
2016-11-08 19:14:41 +03:00
Valentin Kipyatkov b8981ec546 Minor 2016-11-08 19:14:41 +03:00
Valentin Kipyatkov 869b177823 Introduced KtExpression.analyzeAsReplacement() utility 2016-11-08 19:14:40 +03:00
Valentin Kipyatkov e850446f17 Introduced BindingContext.DATA_FLOW_INFO_BEFORE 2016-11-08 19:14:40 +03:00
Mikhail Zarechenskiy 3df5efb236 Introduce language feature: underscores in numeric literals
#KT-2964 Fixed
2016-11-08 19:04:53 +03:00
Mikhail Zarechenskiy a77290e572 Lexer: support underscores in numeric literals 2016-11-08 18:46:51 +03:00
Mikhail Zarechenskiy c956428d96 Update JFlex to 1.7.0
Previous patched version (1.4.3) from Itellij was dropped. As we are using skeleton from Intellij, we should update our jflex version accordingly
2016-11-08 18:46:51 +03:00
Ilya Gorbunov 8feaaf4df0 Allow to annotate generated API with SinceKotlin and annotate new array functions. 2016-11-08 18:08:59 +03:00
Ilya Gorbunov dceec89572 JS: Array.toString is const, Array.contentToString is shallow, Array.contentDeepToString is deep and self-reference aware
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov f3da656d6e contentEquals, contentHashCode, contentToString: Add js implementation and tests
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov a868eecb1a Introduce contentEquals/HashCode/ToString for Arrays. Different methods for deep equals/hashCode/toString rather than overloads with a parameter, because most of the time it would be constant, and make these methods inline-only.
Make `contentEquals` infix function.
Add docs.
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov ab2facf030 Remove special source generation for js stdlib, use same template, rename generated file. 2016-11-08 17:23:45 +03:00
Valentin Kipyatkov 8cd35f67fd More correct implementation of addImportingScopes 2016-11-08 12:51:34 +03:00
Valentin Kipyatkov 109ec11d51 Changes after rebase on master 2016-11-08 12:46:46 +03:00
Valentin Kipyatkov 4915b049c4 Extracted methods 2016-11-08 12:46:46 +03:00
Valentin Kipyatkov 85e1e53354 Checking for unsupported return's 2016-11-08 12:46:45 +03:00
Valentin Kipyatkov 779ed32a4b Renames + merged all back into module idea 2016-11-08 12:46:45 +03:00
Valentin Kipyatkov e5748f7a86 Renames 2016-11-08 12:46:45 +03:00
Valentin Kipyatkov 4c4c85e37a Supported unit return type functions 2016-11-08 12:46:45 +03:00
Valentin Kipyatkov 152e77bad3 Added comment 2016-11-08 12:46:44 +03:00
Valentin Kipyatkov 553bb6281b Extracted method 2016-11-08 12:46:43 +03:00
Valentin Kipyatkov a42be4f60f Refactoring 2016-11-08 12:46:43 +03:00
Valentin Kipyatkov 6168e50e7d Other way of handling post-insertion actions 2016-11-08 12:46:43 +03:00
Valentin Kipyatkov 08c6a21ac1 Handling safe calls of multi-statement function 2016-11-08 12:46:43 +03:00
Valentin Kipyatkov 330d3a255a introduceValue() always adds statement before except for safe call case 2016-11-08 12:46:42 +03:00
Valentin Kipyatkov 8f9f2027f2 Adding block to control structure when needed 2016-11-08 12:46:42 +03:00
Valentin Kipyatkov a4aa9bab8d Very basic version of inline function for block body 2016-11-08 12:46:42 +03:00
Valentin Kipyatkov 66c815968b Refactoring 2016-11-08 12:46:42 +03:00
Valentin Kipyatkov 3b97a3feb1 Supported case when explicit function type is used 2016-11-08 12:46:41 +03:00
Valentin Kipyatkov 9490d1bb1c Reused code of analyzeInContext 2016-11-08 12:46:41 +03:00
Valentin Kipyatkov 129b4b507f Made not data class 2016-11-08 12:46:41 +03:00
Valentin Kipyatkov 7df3c577f5 Refactored ConstructedExpressionWrapper into ConstructedExpressionHolder merging it with CallKindHandler 2016-11-08 12:46:40 +03:00
Valentin Kipyatkov ca28d02300 Minor 2016-11-08 12:46:40 +03:00
Valentin Kipyatkov 1e9ce5b10f Moved nested classes out 2016-11-08 12:46:40 +03:00
Valentin Kipyatkov dc04263aeb Minor 2016-11-08 12:46:40 +03:00
Valentin Kipyatkov 0932e178e2 Made private 2016-11-08 12:46:39 +03:00
Valentin Kipyatkov 57411b4d5e Supported inline function for expression body case 2016-11-08 12:46:39 +03:00
Valentin Kipyatkov 67e5ed802f More correct 2016-11-08 12:46:39 +03:00
Valentin Kipyatkov 7324ae145e Refactoring 2016-11-08 12:46:39 +03:00
Valentin Kipyatkov f2b32f6d90 Minor refactoring 2016-11-08 12:45:29 +03:00
Valentin Kipyatkov 02f4b883f9 One more code refactoring 2016-11-08 12:45:28 +03:00
Valentin Kipyatkov 29175e96e9 Code refactoring 2016-11-08 12:45:28 +03:00