Stanislav Erokhin
dbe867e2c0
Minor. Change upper bound for collection of given candidates.
2017-04-26 13:47:52 +03:00
Stanislav Erokhin
1af733da05
Added isAllowedTypeVariable inside KotlinTypeChecker
2017-04-26 13:47:51 +03:00
Stanislav Erokhin
53ccfcf195
Add util functions getKPropertyType for both receivers and isNumberedKFunction
2017-04-26 13:47:50 +03:00
Stanislav Erokhin
22e667ad65
Removed generic hell from tower resolver
2017-04-26 13:47:49 +03:00
Stanislav Erokhin
863b9f7603
Minor. Change parameter type from Set to Collection.
2017-04-26 13:47:48 +03:00
Stanislav Erokhin
83a82cdd04
Refactoring. Remove descriptor from resolution Candidate.
2017-04-26 13:47:47 +03:00
Zalim Bashorov
794e65b5d6
KJS: remove Rhino library
2017-04-26 13:07:35 +03:00
Zalim Bashorov
fb1c4320b6
KJS: check hashCode property only for objects to avoid extra boxing for primitive values
...
Also in Nashorn everything has hashCode including primitive types,
so the result can be different at Nashorn and at other engines.
2017-04-26 13:07:34 +03:00
Zalim Bashorov
678d2e7c21
KJS: transform labeled blocks to labeled do-while
...
It's a workaround for JDK-8177691.
Such code can appear during inline.
2017-04-26 13:07:33 +03:00
Zalim Bashorov
76fa6ad5c2
KJS: switch to using Nashorn instead of Rhino for JS backend tests
2017-04-26 13:07:30 +03:00
Dmitry Petrov
a39a0abb2a
Traverse store-load chains for POP instructions
...
POP instructions can be only live usages for functional parameters,
e.g., when corresponding invoke is in dead code (KT-17591).
2017-04-26 12:42:45 +03:00
Dmitry Petrov
fe571a7dfa
Normalize local returns before other inlining transformations
...
Local returns normalization can generate POP instructions.
These POP instructions can drop functional parameters, as in KT-17590,
and should be processed in markPlacesForInlineAndRemoveInlinable just
as other POP instructions.
KT-17590 conditional return in inline function parameter argument causes compilation exception
2017-04-26 12:42:33 +03:00
Dmitry Petrov
996a08a3f7
Add tests with loop in store-load chains on noinline function parameters
2017-04-26 12:42:33 +03:00
Dmitry Petrov
e1731373d8
Do not restore stack in default handler for try-finally
...
It never terminates, so the corresponding value on stack can't be used.
However, if this happens in an inlined lambda argument, the inliner is
unable to remove the corresponding ALOAD instruction (because default
handler never terminates, and thus corresponding ALOAD is not used for
lambda invocation).
KT-17573 try-finally expression in inlined function parameter argument fails with VerifyError
2017-04-26 12:42:33 +03:00
Dmitry Petrov
e91f4cf65a
Print generated text to System.err in failed DxChecker.check
...
Otherwise it can mix with exception from test.
2017-04-26 12:42:33 +03:00
Dmitry Petrov
08fb9c2122
Traverse multiple store-load chains for inlined lambda parameters
...
When a try-catch expression is passed as an argument to the inline
lambda parameter, lambda variable on stack is spilled and restored in
several different locations (1 for try-block, 1 for each catch-blocks).
So it's possible that lambda to be invoked comes from multiple loads,
all of which should have the same "root" lambda parameter.
2017-04-26 12:42:33 +03:00
Dmitry Petrov
441be56a40
During inlining, remove POP instructions popping inlined lambdas
...
In cases like KT-17384, where 'break' or 'continue' happens in an argument
to an inlined lambda call, fix-stack transformation sees corresponding
ALOAD for lambda, and inserts corresponding POP instruction before jump.
However, this ALOAD is later removed during inlining.
So, we should also remove the related POP instructions.
2017-04-26 12:42:33 +03:00
Alexey Andreev
38aecb14a2
Improve Number.hashCode implementation in JavaScript
...
Fix KT-13577
2017-04-26 11:52:54 +03:00
Vyacheslav Gerasimov
c0542f7dc0
Remove from changelog items about multiplatform
2017-04-26 11:29:45 +03:00
Dmitry Neverov
f84c5b0339
Do not suggest 'Convert to secondary constructor' for annotation classes
...
#KT-17408 Fixed
2017-04-26 06:37:30 +02:00
Zalim Bashorov
d5867c1ee3
Changes in list of files which size is printed for TeamCity statistics
...
Fix path to kotlin.meta.js;
Add kotlin-test.js to list.
2017-04-25 22:40:16 +03:00
Vyacheslav Gerasimov
a8227461f1
Prettify changelog for 1.1.2 again
2017-04-25 17:29:19 +03:00
Vyacheslav Gerasimov
3c1ff566c5
Prettify changelog for 1.1.2
2017-04-25 16:57:01 +03:00
Kirill Rakhman
76507caf4b
Add intention to convert concatenation to raw string #KT-17503 Fixed
2017-04-25 16:43:52 +03:00
Alexey Tsvetkov
50085722d1
Fix internal visibility check for deserialized typealiases
...
#KT-15495 fixed
2017-04-25 16:27:23 +03:00
Mikhael Bogdanov
b9409523b0
Fix for KT-17588: Compiler error while optimizer tries to get rid of captured variable
...
#KT-17588 Fixed
2017-04-25 15:06:41 +02:00
Simon Ogorodnik
6e8406f73c
Fix completion of 'else' keyword
...
#KT-14665 fixed
2017-04-25 14:44:24 +03:00
Simon Ogorodnik
bd2ad6a089
Tweak keyword completion for lateinit and companion object
...
#KT-13673 fixed
#KT-12293 fixed
2017-04-25 14:42:50 +03:00
Alexey Andreev
3fb15a4423
Fix iml file of js.serializer module
2017-04-25 13:31:26 +03:00
Mikhail Zarechenskiy
63d015ec70
Merge pull request #1055 from JetBrains/rr/matveev
...
Ignore native backend in some box tests
2017-04-25 11:42:51 +03:00
Mikhael Bogdanov
9d021ee1ac
Add infrastructure to run codegen test on jdk 6
...
Perform actual codegen test execution in separate process.
One server process is used to run all codegen tests
through socket connection.
2017-04-25 09:31:17 +02:00
Dmitry Petrov
1ee337d976
Optimize iteration over CharSequence's on JVM
...
KT-7931 Optimize iteration over strings/charsequences on JVM
2017-04-25 10:07:05 +03:00
Dmitry Petrov
bc1e1515fd
Move for-loop generators out of ExpressionCodegen, convert them to Kotlin
2017-04-25 10:07:05 +03:00
Sergey Mashkov
e03a842317
KT-15050 Use more stable way to specify idea compatible version
...
Here we have to specify build number static field
as system properties are out of our control
and they could be wiped out externally
#KT-15050 Fixed
2017-04-25 01:56:08 +03:00
Pavel V. Talanov
f3dd09beaf
Lighter classes: DeprecationLevel.HIDDEN affects codegen
2017-04-24 20:55:50 +03:00
Pavel V. Talanov
337eb883b3
IDELightClassContexts: Use CallResolver to resolve relevant annotation calls
...
Drop code that made decisions based on text
Use CallResolver directly to avoid calling TypeResolver which only returns error types in ad hoc resolve
2017-04-24 20:55:49 +03:00
Pavel V. Talanov
46c6aaddeb
Light classes: do not try to build lighter classes if failed once
...
Avoid multiple exceptions thrown and analysis being unable to complete
2017-04-24 20:55:48 +03:00
Alexey Sedunov
a8c57f11af
Move: Implement more accurate 'protected' visibility check
...
#KT-17545 Fixed
2017-04-24 20:52:12 +03:00
Alexey Sedunov
480982b690
Shorten References: Wrap elements to shorten in smart pointers
...
#KT-17526 Fixed
2017-04-24 20:52:11 +03:00
Alexey Sedunov
c690761715
Move: Do not process imported references when moving entire file
...
#KT-17538 Fixed
2017-04-24 20:52:10 +03:00
Alexey Sedunov
eab6c024c2
Move: Warn about moving to non-Kotlin class
...
#KT-17472 Fixed
2017-04-24 20:52:09 +03:00
Alexey Sedunov
d71b02f972
Move: Improve filtering in "Move nested class" dialog member list
...
Do not suggest inner classes and companion objects
#KT-17515 Fixed
2017-04-24 20:52:08 +03:00
Simon Ogorodnik
3acebc3001
Fix KNPE in KotlinAddImportActionKt.createSingleImportActionForConstructor
...
#KT-17525 fixed
2017-04-24 19:18:13 +03:00
Alexey Andreev
0d7b39eb57
JS: minor code cleanup
2017-04-24 18:39:04 +03:00
Alexey Andreev
feb968e66d
JS: fix generation of names for local declarations
...
Local declarations obtain names prefixed with outer function's name.
Only simple name (i.e. without mangling) of outer function used
in this case. This raises a problem in case of inline functions
with object literals. Currently, they are not copied, but exported
from module. Consider two inline functions foo with different
signatures, both declare object literals. In this case both literals
are exported as foo$f, so only one will be accessible from outside.
2017-04-24 18:39:04 +03:00
Alexey Andreev
88cf37951b
JS: always create aliases for function parameters
...
This is required to make translateAndAliasParameters
behaviour a little more clear.
Also, fix destructuring declaration translator to use parameter aliases
from TranslationContext, when possible.
2017-04-24 18:39:04 +03:00
Alexey Andreev
524dd122e7
JS: move deserialization logic out of createTopDownAnalyzerForJs
...
Remove code that deserializes unchanged descriptors from
`createTopDownAnalyzerForJs`, deserialize in caller instead.
2017-04-24 18:39:03 +03:00
Alexey Andreev
df46417cd7
JS: fix NPE in incremental compilation
...
Fix NPE when compiling project incrementally and a file which
is not recompiled contains try/catch statement
2017-04-24 18:39:03 +03:00
Alexey Andreev
f916d83978
JS: replace consumer in with returning value
...
Refactor some utility functions that take consumer of JsStatement
to return actual statements, so that caller now responsible
for putting these statements to corresponding lists.
2017-04-24 18:39:02 +03:00
Alexey Andreev
a055a038a8
JS: minor fixes after rebasing
...
Multiple minor fixes after rebasing incremental compilation related
branch to actual master
2017-04-24 18:39:02 +03:00