Alexander Udalov
4e8d6d4882
Report ABI version errors before diagnostics and other errors
...
Otherwise they're difficult to find in the end of the compiler messages
2014-05-20 19:22:53 +04:00
Valentin Kipyatkov
c56b5bfd61
Added 2 tests
2014-05-20 18:56:48 +04:00
Valentin Kipyatkov
5ce3df4845
KT-5025 Unnecessary qualifier inserted for class
...
#KT-5025 Fixed
2014-05-20 18:56:48 +04:00
Natalia Ukhorskaya
58b82baa2b
Remove unnecessary error report from extract function
2014-05-20 16:12:55 +04:00
Natalia Ukhorskaya
d263621ef5
Evaluate expression: refactor error messages
2014-05-20 16:12:53 +04:00
Natalia Ukhorskaya
47ecfd0f8d
Evaluate expression: rethrow exceptions from evaluate expression
2014-05-20 15:38:14 +04:00
Svetlana Isakova
cab8709f1c
Rename: JetNodeTypes.LABEL_REFERENCE -> LABEL
...
There is LABEL_REFERENCE node in LabeledExpression, but it isn't a reference there
2014-05-20 15:07:03 +04:00
Svetlana Isakova
e0f37bbef0
Generate parse error on label without name '@'
2014-05-20 15:07:03 +04:00
Svetlana Isakova
f109cfc303
Replaced PrefixExpression with LabeledExpression
...
where labeled expression is used
Added 'visitLabeledExpression'
2014-05-20 15:07:02 +04:00
Svetlana Isakova
04729f5985
Added JetLabeledExpression; added support to parser
2014-05-20 15:07:01 +04:00
Svetlana Isakova
f187c4f093
Minor: added annotation, used util method
2014-05-20 15:07:01 +04:00
Svetlana Isakova
07c0d87a8f
Rename
...
JetLabelQualifiedExpression -> JetExpressionWithLabel
JetLabelQualifiedInstanceExpression -> JetInstanceExpressionWithLabel
2014-05-20 15:07:00 +04:00
Svetlana Isakova
9b70ab7d16
Removed AT, ATAT tokens
...
Checks 'in LABELS token set' replaced with LABEL_IDENTIFIER equality
2014-05-20 15:07:00 +04:00
Svetlana Isakova
012953529c
Don't parse @, @@ as independent tokens
...
Regenerated lexer
2014-05-20 15:06:59 +04:00
Svetlana Isakova
69e5444ddf
Added tests on labels
...
#KT-1703 Fixed
#KT-361 Fixed
#KT-3920 Fixed
#KT-3988 Fixed
#KT-4247 Fixed
#KT-4586 Fixed
#KT-4603 Fixed
#KT-591 Fixed
2014-05-20 15:06:59 +04:00
Svetlana Isakova
a02af7344e
LabelResolver refactoring: rename public methods
...
resolveLabel -> resolveControlLabel
resolveThisLabel -> resolveThisOrSuperLabel
+ small improvements
2014-05-20 14:58:50 +04:00
Svetlana Isakova
8c8db832f1
LabelResolver refactoring: removed 'reportUnresolved' parameter
2014-05-20 14:58:50 +04:00
Svetlana Isakova
2952ff558a
Made LabelResolver a singleton
2014-05-20 14:58:50 +04:00
Svetlana Isakova
f3f2bf5123
Removed cache for labeled elements
...
Resolve labels on the fly
2014-05-20 14:58:50 +04:00
Svetlana Isakova
3bcdbee2bf
Removed LabelName class, used Name instead
2014-05-20 14:58:49 +04:00
Alexander Udalov
98f80fe1e0
Increase ABI version after changes to FunctionImpl* classes
2014-05-19 19:50:59 +04:00
Alexander Udalov
54c21ffbf3
Delete K*FunctionNImpl classes
...
In favor of KFunctionImpl, KMemberFunctionImpl and KExtensionFunctionImpl
2014-05-19 19:50:59 +04:00
Alexander Udalov
8f7c0f0b65
Introduce KFunctionImpl, KMemberFunctionImpl, KExtensionFunctionImpl
...
Old 23*3 classes will be dropped, since they have no value.
Simplify JvmFunctionImplTypes significantly because of that
2014-05-19 19:50:59 +04:00
Alexander Udalov
ccead8e337
Replace some usages of ERROR_CLASS with new instance creation
...
Because when some class is unresolved, we can still hold some information such
as its FQ name, for debugging purposes and better error messages
2014-05-19 19:50:59 +04:00
Alexander Udalov
54a44b1533
Introduce AbstractTypeParameterDescriptor
...
- pull the logic up from TypeParameterDescriptorImpl and
AbstractLazyTypeParameterDescriptor (it was mostly duplicated)
- delete some unused methods
2014-05-19 19:50:59 +04:00
Alexander Udalov
31e8622471
Remove suspicious JetTypeImpl constructors
...
Most of the time they were used for classes without type parameters, and
getDefaultType() is supposed to be used there (additionally it may be cached)
2014-05-19 19:50:59 +04:00
Alexander Udalov
3ffa7cdcf8
Minor optimization in KotlinBuiltIns.isSpecialClassWithNoSupertypes
2014-05-19 19:50:58 +04:00
Alexander Udalov
5fdb9e6218
Change logic of loading "suppress" annotation class descriptor
...
Instead of loading the descriptor and checking equals(), we now check if the
annotation is in fact "suppress" by simply comparing its FQ name. This allows
us to suppress warnings while compiling built-ins: the problem is that
built-ins have its own "suppress" annotation class (defined in the sources)
which differs from the one loaded by the compiler (from kotlin-compiler.jar)
2014-05-19 19:50:58 +04:00
Alexander Udalov
5488a8402f
Move and rename KFunctionImpl classes
...
Move from package "kotlin.reflect" to "kotlin.reflect.jvm.internal". They are
internal detail of the compiler and should not be used directly (especially now
that "kotlin.reflect" is in default import paths).
Also rename "KFunctionImplN" to "KFunctionNImpl", because this name makes more
sense
2014-05-19 19:50:58 +04:00
Alexander Udalov
de8b2b3668
Fix generic signature for SAM adapters and constructors
...
SAM-related code in codegen was using JavaClassDescriptor directly, which has
an erased signature. Create and use a new abstraction SamType which has a full
generic signature of a type which was used in the SAM construct
2014-05-19 19:50:58 +04:00
Alexander Udalov
51a16fe491
Drop FunctionImplN and ExtensionFunctionImplN
...
We have FunctionImpl and ExtensionFunctionImpl classes now (2 classes, not 46)
2014-05-19 19:50:58 +04:00
Alexander Udalov
41eb0deaa0
Introduce FunctionImpl and ExtensionFunctionImpl classes
...
Old FunctionImpl0,1,2,... will be dropped since they had no purpose
2014-05-19 19:50:58 +04:00
Alexander Udalov
845e3323f9
Create error type if reflection class isn't found
...
Introduce a new diagnostic fired when reflection types aren't found in the
classpath
2014-05-19 19:50:57 +04:00
Alexander Udalov
9503056dd5
Add default import "kotlin.reflect"
2014-05-19 19:50:57 +04:00
Alexander Udalov
0c2c203e96
Move KFunctionN classes to package "kotlin.reflect"
2014-05-19 19:50:57 +04:00
Alexander Udalov
3dc92c209f
Don't compile Java sources of built-ins
...
Module 'builtins' no longer has (and is not supposed to have) Java sources
2014-05-19 19:50:57 +04:00
Alexander Udalov
c7a7f31e82
Introduce module 'reflection', move KFunctionN to it
...
Metadata for KFunction classes is now longer serialized along with built-in
classes. This effectively means that it's no longer possible to find KFunction
classes via dependency on built-ins. There should be a kotlin-runtime library
in the specified classpath for reflection types to be resolvable.
A lot of tests were moved and changed, because tests on callable references
require stdlib in classpath from now on
2014-05-19 19:50:57 +04:00
Alexander Udalov
c1cd8bf069
Use module instead of KotlinBuiltIns in ReflectionTypes
2014-05-19 19:50:56 +04:00
Alexander Udalov
357fe5cb17
Pass module to GenerationState
...
- get rid of a hack there which was used to obtain any module, to be used in
ReflectionTypes
- delete unused getError() in LightClassConstructionContext which was always
null
- fix some minor warnings
2014-05-19 19:50:56 +04:00
Alexander Udalov
b27b8bf8b2
Extract DescriptorUtils.getContainingModule()
2014-05-19 19:50:56 +04:00
Alexander Udalov
a26ed665d9
Don't log stack trace for warning
...
These stack traces are confusing and create a feeling that an exception was
thrown
2014-05-19 19:50:56 +04:00
Alexander Udalov
972ef525ed
Regenerate tests
2014-05-19 19:48:30 +04:00
Alexander Udalov
7b21c5c8c3
Fix .gitignore
...
Specific paths needs to be excluded only from the root directory. Otherwise you
couldn't for example create a directory named 'dependencies' somewhere in tests
2014-05-19 19:45:55 +04:00
Andrey Breslav
7bce9060e2
Better handling of PackageTypes in KotlinBuiltIns
2014-05-19 19:28:14 +04:00
Andrey Breslav
a05c8a3d96
Minor. Duplication eliminated
2014-05-19 18:56:38 +04:00
Andrey Breslav
38954fc2ba
Utility method used instead of manual creation of an injector
2014-05-19 18:56:38 +04:00
Andrey Breslav
f72dcb8ee2
Fix for EA-53605 - UOE: PackageType.throwException
2014-05-19 17:02:18 +04:00
Andrey Breslav
8885d5709e
Private inside a package should be visible only inside this package in the same module
2014-05-19 13:02:25 +04:00
Andrey Breslav
9983a567d4
Multi-module diagnostic tests supported
...
Test added for internal visibility
2014-05-19 13:02:25 +04:00
Andrey Breslav
236f38a26b
Support modules in multi-file tests
2014-05-19 11:39:37 +04:00