Commit Graph

10908 Commits

Author SHA1 Message Date
Evgeny Gerashchenko 5e2c3fcb50 Loading SAM adapters for constructors. 2013-06-25 20:16:20 +04:00
Evgeny Gerashchenko 50eb14c525 Rendering member kind for constructor. 2013-06-25 20:16:20 +04:00
Alexander Udalov fea85476b7 Cast int to byte/short/char in for loop generation
Similar to the previous commit, don't use iinc or iadd+istore where the value
can overflow the byte/short/char limits. This fixes Android tests
2013-06-25 18:48:28 +04:00
Alexander Udalov 356c32893b Don't use 'iinc' instruction on byte/short/char variables
Android run-time verifier complains when there's any possibility that a
byte/short/char local variable could contain a value not fitting into the
type's limits.
2013-06-25 18:48:28 +04:00
Alexander Udalov db41329e67 Exclude KT-3574 from Android tests due to jet.Nothing bug 2013-06-25 18:48:27 +04:00
Alexander Udalov 68b0ad53c4 Regression test for KT-24
#KT-24 Obsolete
2013-06-25 18:48:20 +04:00
Alexander Udalov 9b3115a10b Fix EA-47308
Don't always cast PsiFile to JetFile, first check if it really is a Kotlin
source
2013-06-25 18:22:20 +04:00
Nikolay Krasko 69dffe8358 Optimize searching for kotlin classes 2013-06-25 17:33:09 +04:00
develar 7f1f2aa641 Dropped get_hasNext (hasNext property) from js library files. 2013-06-22 01:34:38 +04:00
Zalim Bashorov 9d1e319f0f JS backend: implemented PrimitiveHashMap#putAll. 2013-06-22 01:34:38 +04:00
develar fa10a3289d Use PrimitiveHashMap and PrimitiveHashSet when possible.
Kotlin.AbstractList splitted to AbstractCollection and AbstractList.
2013-06-22 01:34:37 +04:00
develar 9cd22942e2 Translate when as if-else instead for loop. 2013-06-22 01:34:36 +04:00
develar bc043fb964 Used convenient JsNameRef ctor instead setQualifier for create JsNameRef with name and qualifier. 2013-06-22 01:34:36 +04:00
develar d64a896c12 Used idea SmartList and SingletonList in some cases instead ArrayList.
Removed unused imports.
2013-06-22 01:34:36 +04:00
Zalim Bashorov 2cce4c575a Fixed the comment of the native vararg test. 2013-06-22 01:34:36 +04:00
Alexey Sedunov 8f7d623682 Rename: Fix spelling mistake 2013-06-21 19:32:20 +04:00
Alexey Sedunov d019c23395 Implement general expresion remover 2013-06-21 19:32:14 +04:00
Alexey Sedunov 0b634cc918 Implement Unwrap/Remove for try expressions 2013-06-21 19:32:09 +04:00
Alexey Sedunov 9d46c90165 Implement Unwrap/Remove for lambdas 2013-06-21 19:32:03 +04:00
Alexey Sedunov 8964e0e152 Implement Unwrap/Remove for conditionals and loops 2013-06-21 18:18:08 +04:00
Alexey Sedunov fa01d59ef8 Fixed moving of classes without body 2013-06-21 18:18:07 +04:00
Alexander Kirillin 07ede8898b EA-46365 2013-06-21 16:58:26 +04:00
Alexander Kirillin 9b9c85cdca EA-46366 2013-06-21 16:58:26 +04:00
Alexander Kirillin 7e628a6d02 EA-46007 2013-06-21 16:58:26 +04:00
Alexander Udalov 33bcee7d6d Fix iterators for one-element progressions
In case of start==end hasNext was always false, which resulted in iterators
over one-element progressions not iterating that element
2013-06-20 23:27:11 +04:00
Alexander Udalov 9a6979aa6c Minor, rename method 2013-06-20 22:23:02 +04:00
Alexander Udalov aea8f3bcee Fix and test ProgressionUtil
Arithmetical modulo implementation was incorrect (-10 mod 1 == 0, but was 1)
2013-06-20 22:23:02 +04:00
Alexander Udalov 53cc582040 Minor, use incrementType in for-progression codegen
This doesn't fix anything, just makes it easier to figure out values of what
types are used where. Progression increment is of its own type, which may be
different from asmElementType in case of Byte, Char, Short progressions
2013-06-20 22:23:02 +04:00
Alexander Udalov 980e409768 Optimize integer progression iterators
With the help of ProgressionUtil hasNext and next* consist now of only several
bytecode instructions
2013-06-20 22:20:39 +04:00
Alexander Udalov d85ca47184 Generate optimized bytecode for 'for' in progression
Instead of checking for overflow at the end of each iteration, calculate the
actual final loop parameter value before the loop, save it to the local
variable and at the end of the iteration check if the loop parameter is exactly
equal to this final value.

ProgressionUtil.getProgressionFinalElement() credits go to @geevee
2013-06-20 20:19:54 +04:00
Alexander Udalov 8a14b62a23 KT-3574 Assertion error when using ?: in for range
#KT-3574 Fixed

Do not assert that resolvedCall is non-null, since getRangeAsBinaryCall can
return a BinaryCall that doesn't represent a range at all (as specified by the
comment in getRangeAsBinaryCall)
2013-06-20 16:03:00 +04:00
Alexander Udalov 3ff5acd69c Minor, ignore android dependencies when looking for @author 2013-06-20 16:03:00 +04:00
Alexander Udalov e22947281c Minor, cut down unnecessary 'load' in for-progression codegen 2013-06-20 16:03:00 +04:00
Alexander Udalov ee80e0b8ca Fix loops over progressions near to MAX_VALUE/MIN_VALUE
#KT-492 Fixed

For Byte, Char and Short ranges, promote the type of the loop parameter to int
to avoid overflows. For Int and Long ranges at the end of the loop over a
progression we now check if the new (incremented) value of the loop parameter
is greater than the old value iff increment > 0
2013-06-20 16:03:00 +04:00
Alexander Udalov 33d6347876 Fix loop over a range literal up to MAX_VALUE
#KT-492 In Progress

For Byte, Char and Short explicit casting from Int is removed -- loop parameter
is already stored in an Int anyway. For Int and Long comparison "i < end" at
the beginning of the loop is replaced to "i != end" at the end of the loop + a
special check for an empty loop
2013-06-20 16:02:59 +04:00
Alexander Udalov f1a6d27d35 Minor, prevent infinite loops in range tests 2013-06-20 16:02:59 +04:00
Nikolay Krasko b0484c9680 Refactorings in counting parameters tips 2013-06-20 14:56:50 +04:00
Nikolay Krasko e7bdee7994 Fix color for highlighting resolved method 2013-06-20 14:56:49 +04:00
Nikolay Krasko 1c2ee72322 Lazy analyze in counting parameters tips 2013-06-20 14:56:49 +04:00
Svetlana Isakova 9bf5f16bb7 refactoring
extracted checkReceiverTypeError method to avoid 'checkOnlyReceiverTypeError' boolean flag
2013-06-20 13:43:04 +04:00
Svetlana Isakova eb85e9abce fixed npe in comparing results 2013-06-20 13:43:04 +04:00
Svetlana Isakova 4403ea7b1d added ThrowingScope 2013-06-20 13:43:04 +04:00
Svetlana Isakova 041505f5b8 report UNRESOLVED_REFERENCE_WRONG_RECEIVER
mentioning candidates with wrong receiver
2013-06-20 13:43:03 +04:00
Svetlana Isakova 3340b94bd8 refactoring
extracted methods
2013-06-20 13:43:02 +04:00
Svetlana Isakova 342e9ebe7a KT-3563 Compiler requiring java.io.File, and it's unclear why
#KT-3563 fixed
2013-06-20 13:43:02 +04:00
Svetlana Isakova 3cf133bff7 changed local extensions priority
local extensions aren't longer chosen before members
2013-06-20 13:43:01 +04:00
Mikhael Bogdanov 132d74200b Partial fix for KT-3698: properly write field initializer 2013-06-19 17:02:28 +04:00
Nikolay Krasko 935c5ec16d Add folding doc and multiline comments 2013-06-18 17:46:02 +04:00
Nikolay Krasko 9c604267f8 Extract setting configurator to utility class 2013-06-18 17:46:01 +04:00
Mikhael Bogdanov 86f2a6dc69 Tests for not reproduced KT-1770, KT-3001 and KT-3414
#KT-3414 Can't Reproduced
 #KT-3001 Can't Reproduced
 #KT-1770 Can't Reproduced
2013-06-18 14:46:14 +04:00