Commit Graph

23999 Commits

Author SHA1 Message Date
Natalia Ukhorskaya e2fa9397c8 Debugger: fix context element in SourcePositionProvider 2015-07-16 13:09:45 +03:00
Natalia Ukhorskaya 98da75c768 Debugger: check that file isn't shorter than breakpoint line (ex. after deleting some lines in file during debug) 2015-07-16 13:09:43 +03:00
Natalia Ukhorskaya 03de31f1b6 Debugger: do not throw assert when context for codeFragment is null (ex. when file was changed and psi isn't valid any more) 2015-07-16 13:09:41 +03:00
Natalia Ukhorskaya ec3c667f38 Debugger: allow Evaluate Expression in context of File (for some synthetic methods or when file was changed during debug and breakpoint line no longer match the actual line) 2015-07-16 13:09:26 +03:00
Natalia Ukhorskaya 75edfa6527 Debugger: do not resolve symbols on breakpoint line in Evaluate Expression 2015-07-16 13:08:31 +03:00
Natalia Ukhorskaya 9a53142b26 Refactoring: move similar part for obtaining scope for codeFragment to JetCodeFragment 2015-07-16 13:04:04 +03:00
Natalia Ukhorskaya fdfabebcce Fix debugger test on Java7 2015-07-16 10:24:33 +03:00
Pavel V. Talanov c313887641 Split CompileTimeConstant into two entities
1. ConstantValue
	* just holds some value and its type
	* implementations for concrete constants
2. CompileTimeConstant
	* is only produced by ConstantExpressionEvaluator
	* has additional flags (canBeUsedInAnnotation etc)
	* has two implementations TypedCompileTimeConstant containing a constant value
		and IntegerValueConstant which does not have exact type
	* can be converted to ConstantValue

Adjustt usages to use ConstantValue if flags are not needed
Add tests for some uncovered cases
2015-07-16 02:28:05 +03:00
Pavel V. Talanov 155f00578d Builtins are passed into builtins module
Fixes circular dependency
2015-07-15 21:09:59 +03:00
Pavel V. Talanov 5dc5d77e60 Inject builtins in constants 2015-07-15 21:09:52 +03:00
Pavel V. Talanov ea1a85e78c Introduce CompileTimeConstantFactory 2015-07-15 21:09:40 +03:00
Pavel V. Talanov b0a4520710 Refactor compile constants to reduce boolean parameter hell 2015-07-15 20:57:02 +03:00
Pavel V. Talanov f97767e159 Drop ArrayValue redundant constructor parameter 2015-07-15 20:56:55 +03:00
Pavel V. Talanov ae88dd3f1f Convert compile constant classes to kotlin: prettify 2015-07-15 20:56:48 +03:00
Pavel V. Talanov 0369de86c7 Convert compile constant classes to kotlin: j2k 2015-07-15 20:56:41 +03:00
Pavel V. Talanov a6180611f4 Convert compile constant classes to kotlin: rename files 2015-07-15 19:44:18 +03:00
Pavel V. Talanov 7fef1c4613 Minor: inject builtIns to CallCompleter 2015-07-15 19:44:17 +03:00
Pavel V. Talanov 44dffa7bbc Minor: remove a couple of usages of KotlinBuiltIns.getInstance() 2015-07-15 19:44:17 +03:00
Mikhail Glukhikh c19785252c Sealed classes now are decompiled correctly + test #EA-70762 Fixed 2015-07-15 17:55:16 +03:00
Ilya Gorbunov 8b325e8a30 Make ByteArray.inputStream a method, not a property.
#KT-8360 Fixed
2015-07-15 17:48:56 +03:00
Ilya Gorbunov 4de5dd9aeb Drop deprecated FunctionalList, FunctionalQueue.
Remove dependency on FunctionalList from tests.
2015-07-15 17:45:56 +03:00
Ilya Gorbunov 0a320a13e5 Stdlib generators: change constants for Long: ZERO, ONE, -ONE. 2015-07-15 17:21:52 +03:00
Ilya Gorbunov 10c376975a Stdlib generators: refactor and eliminate warnings, add families of Sets and InvariantArrays, allow to specify custom signature for particular families. 2015-07-15 17:21:43 +03:00
Ilya Gorbunov d1a12aa2a7 plus, plusAssign, minus, minusAssign for all possible parameter types for Maps.
#KT-6594 Fixed
2015-07-15 17:12:45 +03:00
Ilya Gorbunov e080753dc2 Provide toMap and putAll for Arrays and Sequences of key-value pairs.
#KT-4166 Fixed
2015-07-15 17:12:43 +03:00
Ilya Gorbunov 96b79eebe7 asSequence returns empty sequence singleton for empty arrays and strings.
#KT-8450 Fixed
2015-07-15 17:08:27 +03:00
Valentin Kipyatkov 5f8a652a38 KT-4592 Parameter info shows signatures of inaccessible methods
#KT-4592 Fixed
2015-07-15 16:32:20 +03:00
Dmitry Jemerov d34d54ba47 nicer looking action to create a new Kotlin file
#KT-8445 Fixed
2015-07-15 13:58:51 +02:00
Denis Zharkov e82adc9d90 Drop unused Approximation type capabilities 2015-07-15 10:01:15 +03:00
Denis Zharkov d19cb747be Emit not-null assertions for enhanced types 2015-07-15 10:01:14 +03:00
Denis Zharkov e23c7f457b Preserve type annotations on type parameter when substituting
Subsitute(@A T, T:@B String) = @B @A String

Nullability when loading Java:
Subsitute(@NotNull T, T:String) = @NotNull String
Subsitute(@NotNull T, T:String!) = @NotNull String
Subsitute(@NotNull T, T:String?) = @NotNull String

Subsitute(@Nullable T, T:String) = @Nullable String?
Subsitute(@Nullable T, T:String!) = @Nullable String?
Subsitute(@Nullable T, T:String?) = @Nullable String?
2015-07-15 10:01:14 +03:00
Alexander Udalov 2b541a560e Make function references compiled with old compiler work with new runtime 2015-07-14 21:23:59 +03:00
Dmitry Jemerov 0295b13cc7 couple more tuple leftovers 2015-07-14 17:14:33 +02:00
Dmitry Jemerov 64860345e3 drop tuple type support from parser 2015-07-14 17:09:09 +02:00
Dmitry Jemerov 55c11539f8 drop tuples support from parser 2015-07-14 17:06:17 +02:00
Mikhail Glukhikh a84fe53256 Minor refactoring of LookupElementsCollector 2015-07-14 16:25:11 +03:00
Mikhail Glukhikh 37b2e97e56 Rendering changed: "annotation class" is now just "class" (with kotlin.annotation.annotation if it's kotlin annotation).
A swarm of tests fixed accordingly.
2015-07-14 16:25:08 +03:00
Mikhail Glukhikh 0d2a81f098 Annotation target checking in front-end, a set of tests for different annotation targets, existing test fixes
No checks for erroneous annotations. Additional checks for identifiers.
2015-07-14 16:25:04 +03:00
Mikhail Glukhikh 609d696202 Annotations have now retention of "RUNTIME" by default. Java retention is generated as given by kotlin annotation. Annotation rendering changed.
Annotation arguments with default values are rendered as ... if renderDefaultAnnotationArguments is true.
Tests: java retention does not taken into account by Descriptor comparator.
Java retentinon changed to kotlin retention in some tests + one new test with java retention added.
More accurate tests for intentions in byte code (visibility controlled).
2015-07-14 16:25:01 +03:00
Mikhail Glukhikh 4a27b4d614 JetClassOrObject.isAnnotation() is deprecated 2015-07-14 16:24:59 +03:00
Mikhail Glukhikh 1eac4d67de "annotation" is now parsed as an identifier. It is no longer a soft keyword.
Sometimes it's allowed to parse "annotation" unescaped even if other annotations must be escaped.
A set of annotations and their options tests.
A swarm of existing tests fixed (mostly kotlin.annotation.annotation() added to txt-files).
STUB_VERSION increased. Some quick fixes slightly changed.
2015-07-14 16:24:55 +03:00
Mikhail Glukhikh 7a6e5f66bd Regression test: char + int = char 2015-07-14 16:24:52 +03:00
Mikhail Glukhikh 5126f01452 kotlin.annotation package with annotations "target" and "annotation" and enums AnnotationTarget and AnnotationRetention introduced.
Targets for existing built-in annotations.
Access to annotation package from packageFragmentProvider.
Documentation for all classes in the package.
2015-07-14 16:24:45 +03:00
Svetlana Isakova b162a65e85 Changed the way the constraints are written in tests
SUBTYPE T Int -> T <: Int
2015-07-13 21:57:59 +03:00
Valentin Kipyatkov d32ba08cb7 KT-8394 ReplaceWith for Delegates.lazy fails outside of stdlib
#KT-8394 Fixed
2015-07-13 19:41:42 +03:00
Evgeny Gerashchenko 1346d98bf3 Merge pull request #721 from JetBrains/rr/yole/unwhatever
don't use "whatever" as implementation of getFamilyName(), provide co…
2015-07-13 19:18:35 +03:00
Dmitry Jemerov 31f6405e07 don't use "whatever" as implementation of getFamilyName(), provide correct implementation instead 2015-07-13 18:11:44 +02:00
Ilya Gorbunov 4ad6a8e301 Ensure type of a stack value is coerced to the expected return type after the binary operation instruction with the different return type. 2015-07-13 17:27:37 +03:00
Zalim Bashorov f7ccb3819e JS: don't pollute object with $metadata$
#KT-8126 Fixed
2015-07-13 15:52:57 +03:00
Alexander Udalov 4de2c5a5c8 Don't generate default no-args constructor for enums
#KT-8438 Fixed
2015-07-13 11:59:35 +03:00