Evgeny Gerashchenko
01311a1793
Moved and renamed DescriptorUtils.getInnerClasses
2012-10-30 18:41:01 +04:00
Alexander Udalov
3ca976ee77
Generate bridges for delegates
2012-10-30 16:48:02 +04:00
Alexander Udalov
dc5174670d
Minor, kill useless param
2012-10-30 16:48:00 +04:00
Alexander Udalov
8a0c057bd0
Remove OwnerKind.DelegateKind
...
It's not used anywhere anymore.
Add another assertion to checkMustGenerateCode()
2012-10-30 16:47:58 +04:00
Alexander Udalov
fcbb5fe191
DelegateKind is not needed when generating delegates
...
"this.context" is correct and more useful
2012-10-30 16:47:56 +04:00
Alexander Udalov
c3854e9bd4
Minor refactoring in delegate codegen
2012-10-30 16:47:54 +04:00
Alexander Udalov
142acba6f1
Remove unused method
2012-10-30 16:47:52 +04:00
Alexander Udalov
288e3a7b40
Cast arguments to proper types when generating delegates
...
Also minor refactoring in a couple places to adopt this style
2012-10-30 16:47:50 +04:00
Alexander Udalov
4cfe68da1e
Coerce any type to Number before unboxing
2012-10-30 16:47:46 +04:00
Peter Kofler
28160ecb11
fix KT-2892
2012-10-29 22:16:43 +01:00
Peter Brachwitz
81de3cd46a
Fix compilation of infix calls (KT-2929)
...
#KT-2929 Fixed
2012-10-29 22:01:56 +01:00
Svetlana Isakova
d45db0a331
created subpackage 'util'
2012-10-29 17:11:58 +04:00
Svetlana Isakova
152368eb04
ResolvedCall, ResolvedValueArgument moved to 'model' subpackage
2012-10-29 17:11:57 +04:00
Svetlana Isakova
06cee8bc16
AutoCastReceiver moved to autocasts package
2012-10-29 17:11:56 +04:00
Svetlana Isakova
b395d33ff0
debug names for temporary traces added
2012-10-29 14:41:49 +04:00
Alexander Udalov
880852861c
A couple utility methods
...
PsiCodegenPredictor.getFileForCodegenNamedClass() returns JetFile which
contains a declaration which will produce a class with a given name.
PsiCodegenPredictor.getFileForNamespacePartName() returns JetFile which
produces a namespace part with the given name.
BindingContextUtils.getContainingFile() returns JetFile which contains a
declaration which is matched to a given descriptor.
DescriptorUtils.findTopLevelParent() finds a top-level (i.e. its containing
declaration is NamespaceDescriptor) parent for a descriptor.
Also DescriptorUtils.isTopLevelFunction() is changed a little to accept not
only a function, but any descriptor
2012-10-25 21:28:43 +04:00
Alexander Udalov
a8798de8d0
NamespaceCodegen.getNamespacePartInternalName()
...
Should be used instead of getMultiFileNamespaceInternalName()
2012-10-25 21:28:42 +04:00
Alexander Udalov
e7a7afa0be
Sort all namespace files by name prior to assigning names in codegen
...
This helps to make names of closures etc. stable across compilation, should
also probably help to implement incremental compilation.
No new tests added
2012-10-25 21:28:41 +04:00
Sergey Mashkov
edb8797fa6
KT-2987 java.lang.AbstractMethodError/java.lang.NoSuchMethodError for delegated class by parameterized parent
...
#KT-2987 Fixed
2012-10-25 16:26:58 +04:00
Natalia.Ukhorskaya
a79a31cf01
#KT-2811 Fixed VerifyError on smart-cast 'this'
2012-10-23 13:20:29 +04:00
Natalia.Ukhorskaya
29ca8faa4e
Replace CodegenUtils.isDeprecated to KotlinBuiltIns.isDeprecated
2012-10-18 19:03:34 +04:00
Alexander Udalov
ce2b915645
Generate line numbers for static delegates
...
Fixes debugger's "step into" for multi-file package
2012-10-17 17:57:54 +04:00
Andrey Breslav
e81f38b6a8
JetStandardLibrary -> KotlinBuiltIns
2012-10-17 13:48:05 +04:00
Andrey Breslav
c719ae427a
JetStandardClasses -> KotlinBuiltIns
2012-10-17 13:48:05 +04:00
Natalia.Ukhorskaya
482fabfcce
Write ACC_DEPRECATED in byte codes.
...
#KT-2950 Fixed
2012-10-16 14:41:19 +04:00
Natalia.Ukhorskaya
d55a0fcacb
Move isDeprecated function to CodegenUtil
2012-10-16 14:41:18 +04:00
Alexander Udalov
8bfb2ddcce
Generate bridges for properties declared in constructor
...
#KT-2926 Fixed
#KT-2833 Fixed
2012-10-11 17:38:46 +04:00
Alexander Udalov
5bc9291d61
Refactor PropertyCodegen
...
1) Introduce AsmUtil.getModalityAccessFlag()
2) Inline private methods generateDefaultGetter() and generateDefaultSetter() not
to confuse them with anything else
3) Remove dead code in PropertyCodegen.gen(), assert that it never happens
2012-10-11 17:38:46 +04:00
Natalia.Ukhorskaya
78d22e9f81
KT-2823 TypeCastException has no message
...
#KT-2823 Fixed
2012-10-11 15:41:49 +04:00
Alexander Udalov
a31b748092
JavaElementFinder now correctly finds namespace$src$ classes
...
No new tests added
#KT-2839 Fixed
2012-10-10 18:11:11 +04:00
Alexander Udalov
e869568196
Generate bridges for property accessors
...
Use existing FunctionCodegen.generateBridgeIfNeeded() on property getters &
setters
#KT-2920 Fixed
2012-10-09 16:36:24 +04:00
Alexander Udalov
c9984c3d06
Generate not-null assertions on method parameters
...
Intrinsics.checkParameterIsNotNull() gets its caller's class and method names
from the stack trace to render them in an exception message.
Fix codegen tests because now it's now allowed to pass null to non-null
argument in tests
2012-10-08 19:13:20 +04:00
Alexander Udalov
753ae9e550
Add a compiler parameter to generate not-null parameter assertions
...
Enable/disable assertion generation on parameters in the beginning of
methods accessible from Java
2012-10-08 19:03:36 +04:00
Alexander Udalov
12ce447c24
Refactor FunctionCodegen.generateMethod()
2012-10-08 19:03:33 +04:00
Alexander Udalov
bf779b4ca5
Generate not-null assertions only for descriptors coming from Java
...
Introduce BindingContext.IS_DECLARED_IN_JAVA, store that info in
JavaDescriptorResolver
2012-10-08 19:03:29 +04:00
Alexander Udalov
fcbc95bbb4
Generate not-null assertions after getting a field
2012-10-08 14:11:57 +04:00
Alexander Udalov
27bea0a607
Pass state and property descriptor to StackValue.Property
2012-10-08 14:11:57 +04:00
Alexander Udalov
95ec2448eb
Generate not-null assertions after method calls
...
If a method comes from Java and is annotated as returning NotNull, after
calling it we should check if it actually returned something other than null.
Introduce checkReturnedValueIsNotNull() in jet/runtime/Intrinsics which does
exactly that.
CallableMethod's invoke() and invokeDefault() are now private, use asserted
versions instead
2012-10-08 14:11:56 +04:00
Alexander Udalov
19a6a3f390
Add a compiler parameter to generate not-null assertions on method call sites
...
It is off by default when invoking compiler directly, and on by default when
compiling from IDE
2012-10-08 14:11:52 +04:00
Evgeny Gerashchenko
998095c55c
KT-1973 Added class kind to JetClass annotations to distinguish object declarations and regular classes.
...
#KT-1973 in progress
2012-10-03 23:33:15 +04:00
Evgeny Gerashchenko
889a238fbc
KT-1973 Made classes for objects declarations/expressions final.
...
#KT-1973 in progress
2012-10-03 23:30:55 +04:00
Evgeny Gerashchenko
069ef8ef91
KT-2712 Debugger should show value of receiver of extension functions
...
#KT-2712 fixed
2012-10-01 21:23:09 +04:00
Evgeny Gerashchenko
e4f2fdc5f2
Better names for THIS$0 and RECEIVER$0 constants.
2012-10-01 21:23:09 +04:00
Evgeny Gerashchenko
3d8b6e758a
Typo.
2012-10-01 21:23:09 +04:00
Alexander Udalov
acf8702ccf
KT-2822 Can't make a super call from an object literal
...
#KT-2822 Fixed
2012-09-27 16:30:58 +04:00
Svetlana Isakova
0c89c57a10
optimize imports in injectors rollback
2012-09-26 15:23:59 +04:00
Andrey Breslav
92ac865c72
KT-2819 Duplicate toString() method generated in data class
...
#KT-2819 Fixed
2012-09-26 12:32:16 +04:00
Alex Tkachman
4600990d52
JetValueParameter.nullable is deprecated as it duplicates info in type field
2012-09-23 13:19:51 +02:00
Alex Tkachman
edc0bf0b15
returnTypeNullable in flags duplicates info in returnType annotation field
2012-09-23 12:22:57 +02:00
Alex Tkachman
1ec32810f4
- small optimizations of JavaDescriptorResolver
...
- kind of method encoded in flags
- nullable return type encoded in flags
2012-09-23 12:08:55 +02:00