Commit Graph

15426 Commits

Author SHA1 Message Date
Ross Hanson bbbdfd25d9 KT-4820: Added new tests, introduced functionality to detect overridden functions, other minor fixes 2014-05-09 05:48:50 -04:00
Ross Hanson 35c5a62b11 KT-4820: Intention to remove an unused index variable from a for loop. 2014-05-09 05:48:50 -04:00
Ross Hanson 97010c7d7f KT-4820: Intention to introduce an index variable to a for loop over an ordered collection via "withIndices()." 2014-05-09 05:45:30 -04:00
Zalim Bashorov 399c9c1175 JS backend: fixed compiler crash when use compareTo in infix call.
#EA-54661 fixed
2014-05-08 19:57:28 +04:00
Zalim Bashorov a578fc6762 JS backend: fixed infix calls.
#KT-3998   fixed
#EA-56241 fixed
2014-05-08 19:57:28 +04:00
Zalim Bashorov 898275e658 JS backend: added tests for infix calls.
#KT-3998   in progress
 #EA-56241 in progress
2014-05-08 19:57:28 +04:00
Zalim Bashorov 235b03c407 Minor in JS backend: added useful message to assert(for EA-48931) and drop unnecessary code. 2014-05-08 19:57:27 +04:00
Tal Man 814b558bcf Inspection to report negated binary expressions that can be simplified 2014-05-08 19:02:58 +04:00
Alexander Udalov 22e21b4db0 Unextend InlineCodegen from ParentCodegenAware 2014-05-08 18:42:35 +04:00
Alexander Udalov 13728e1598 Minor, pull non-null getParentContext() to MethodContext 2014-05-08 17:48:40 +04:00
Alexander Udalov 5fe7bfdd83 Move 'earlierScripts' from ScriptCodegen to ScriptContext
To get rid of a questionable usage of getParentCodegen() in ExpressionCodegen
2014-05-08 17:48:40 +04:00
Alexander Udalov 6bd46d38f5 Add missing copyrights 2014-05-08 17:38:51 +04:00
Alexander Udalov 271f2f562c Delete unused parameter in SamWrapperCodegen 2014-05-08 17:21:11 +04:00
Alexander Udalov 8041cac9dd Remove GenerationStateAware 2014-05-08 16:45:16 +04:00
Alexander Udalov 985e9a5f31 Make JvmFunctionImplTypes lazy
It shouldn't compute all FunctionImpls at least until first asked
2014-05-08 16:45:16 +04:00
Alexander Udalov 3a0aac4857 Simplify type mapping logic in CodegenBinding
- inline asmType to calling getAsmType, which does something more
- refactor getJvmInternalName to use getAsmType as well
- simplify getAsmType and fix a probable bug in mapping singletons nested in
  enums (which wasn't reproduced, though a test is added)
- delete unnnecessary ASM_TYPE recording for enum entries in
  CodegenAnnotatingVisitor
2014-05-08 16:45:15 +04:00
Alexander Udalov 372bf17982 Remove BindingTraceAware, TypeMapperAware, BindingContextAware
- delete suspicious caching logic from CodegenBinding.getAsmType(), which makes
  JetTypeMapper now depend only on BindingContext
- inline all of these classes into GenerationStateAware and the latter into
  JetTypeMapper
2014-05-08 16:45:15 +04:00
Alexander Udalov fb54ecf443 Rename FunctionTypesUtil -> JvmFunctionImplTypes
It's not an util class anymore
2014-05-08 16:45:15 +04:00
Alexander Udalov c7277250d9 Use ReflectionTypes instead of KotlinBuiltIns in type checker 2014-05-08 16:45:15 +04:00
Alexander Udalov 6004c6cefe Introduce ReflectionTypes, use it in JVM back-end
Make FunctionTypesUtil a component
2014-05-08 16:45:14 +04:00
Alexander Udalov 3ac89030c7 Make CodegenBinding.ASM_TYPE a collective slice
Change Type->JetFile mapping logic in PsiCodegenPredictor to be less hackish,
but probably the compiler will start requiring a little more memory due to a
collective slice multimap
2014-05-08 16:45:14 +04:00
Alexander Udalov d737932bc7 Remove usages of CodegenBinding.initTrace
This is a low level JVM back-end detail; clients should be using
GenerationState instead
2014-05-08 16:45:14 +04:00
Alexander Udalov d42598a935 Move default inline flag to JVM back-end
- other back-ends are likely to have its own value of this flag
- get rid of DEFAULT_INLINE_FLAG_FOR_TEST
- the main goal was to simplify the default GenerationState constructor, which
  now always uses default inline flag value
2014-05-08 16:45:14 +04:00
Tal Man 9679e3ce4a insert type intention now only applicable in function names (KT-4950)
#KT-4950 Fixed
2014-05-08 14:11:21 +04:00
Valentin Kipyatkov 442f47bbe5 Removed unused constructor 2014-05-07 22:50:23 +04:00
Valentin Kipyatkov dab6045f6a Fixed Code completion does not work inside function variable invocation
#KT-4978 Fixed
2014-05-07 22:50:23 +04:00
Valentin Kipyatkov 7bb84c139d Smart completion: fixed logic in elvis operator 2014-05-07 22:50:23 +04:00
Valentin Kipyatkov ab563bd891 Added utility extension methods to not use TypeUtils 2014-05-07 22:50:22 +04:00
Valentin Kipyatkov a65bd1a74d Added test data for future use 2014-05-07 22:50:22 +04:00
Valentin Kipyatkov 1b034c5fc3 Smart completion works for block's result 2014-05-07 22:50:22 +04:00
Valentin Kipyatkov 45f518a907 Smart completion after ?: works incorrectly
#KT-4926 Fixed
2014-05-07 22:50:22 +04:00
Valentin Kipyatkov 5e34791e68 Smart completion should not suggest variants for private signatures
#KT-4899 Fixed
2014-05-07 22:50:22 +04:00
Valentin Kipyatkov 57c41ce0b0 Smart completion: added test for KT-4929 fixed by svtk 2014-05-07 22:50:22 +04:00
Valentin Kipyatkov 0920ab2c25 Fixed mock jdk 2014-05-07 22:50:21 +04:00
Valentin Kipyatkov e7c87b2391 Minor rename 2014-05-07 22:50:21 +04:00
Valentin Kipyatkov d781626201 Smart completion: only overloads with all previous arguments matched are considered 2014-05-07 22:50:21 +04:00
Valentin Kipyatkov 717977af61 No more java lookup elements in code completion (except for one case) 2014-05-07 22:50:21 +04:00
Valentin Kipyatkov 33de0e8393 Smart completion for then and else branches of if
#KT-4910 Fixed
2014-05-07 22:50:20 +04:00
Valentin Kipyatkov 7aa11a4207 Smart completion: auto-cast to non-null type is not recognized for field from constructor
#KT-4906 Fixed
2014-05-07 22:50:20 +04:00
Valentin Kipyatkov 3c75e9ec28 Smart completion: "null" when nullable value expected 2014-05-07 22:50:20 +04:00
Valentin Kipyatkov 32405e57e6 Smart completion: checking constructor's visibility + true and false for Boolean
#KT-4916 Fixed
2014-05-07 22:50:20 +04:00
Valentin Kipyatkov 9ae59db329 Smart completion: more correct Tab key handling
#KT-4954 Fixed
2014-05-07 22:50:20 +04:00
Valentin Kipyatkov 5f931be39b Smart completion after == and !=
#KT-4912 Fixed
2014-05-07 22:50:19 +04:00
Alexander Udalov 74da6929a6 Update to IDEA 135.815 EAP 2014-05-07 21:12:56 +04:00
Pradyoth Kukkapalli 33fd82cf45 New Intention: Replace for loop with forEach
Replaces an expression of the form “for (i in list) { … }” with an
expression of the form “list.forEach { i -> … }”
2014-05-07 14:01:37 +04:00
Pradyoth Kukkapalli dbb28c571b New Intention Action: Replace a call to forEach function with for loop.
Replaces an expression of form x.forEach { … } with for (a in x) { … }.
2014-05-07 14:00:50 +04:00
Alexander Udalov bd056d037f Init slice debug names for CodegenBinding 2014-05-07 03:30:24 +04:00
Alexander Udalov 02e805b06e Minor, rename accidentally named "context1" back to "context" 2014-05-07 03:30:24 +04:00
Alexander Udalov 68313172c2 Don't use KFunctionN types in smart completion
FunctionN should be enough
2014-05-07 03:30:14 +04:00
Alexander Udalov c2594d7695 Delete "println" from production code in KotlinResolveCache 2014-05-07 03:28:48 +04:00