Commit Graph

35607 Commits

Author SHA1 Message Date
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
Alexander Udalov 8c65379711 Support injecting custom module into KotlinBuiltIns
Provide a command-line option to load built-ins from the module and its
dependencies instead of looking for them in kotlin-compiler.jar; built-ins must
be found this way, or an error will be reported (or, most likely at this
moment, an exception will be thrown).

Note that this does not affect whether built-ins (loaded from one place or the
other) are added to the _dependencies_ of the module, this is controlled by
another option. The option added in this commit only makes the KotlinBuiltIns
instance which is used via ModuleDescriptor throughout the compiler front-end
(and also injected in a bunch of places) a sort of "helper" which always goes
to that same module to find descriptors for built-in classes
2016-11-08 12:14:24 +03:00
Alexander Udalov 7898e2447d Minor, rename JVMConfigurationKeys.ADD_BUILT_INS_TO_DEPENDENCIES 2016-11-08 12:14:24 +03:00
Alexander Udalov 5cd9e11f44 Refactor initialization of JvmBuiltIns instance
Use lazy val instead of lateinit var + implicit dependency on the code in
KotlinBuiltIns constructor
2016-11-08 12:14:23 +03:00
Alexander Udalov 5adb22ed65 Do not evaluate anything eagerly in KotlinBuiltIns constructor 2016-11-08 12:14:23 +03:00
Simon Ogorodnik 2be4800307 Fix for KT-14604 J2K Yet another floating point with exponent format 2016-11-08 12:04:05 +03:00
Simon Ogorodnik 7e82dd9adc Fix for KT-14585 J2K, ConvertJavaCopyPasteProcessor shows a dialog under write action 2016-11-08 12:04:04 +03:00