Evgeny Gerashchenko
43b9a9d434
Renamed Name.getName() and FqName.getFqName() to asString()
2013-05-21 17:56:05 +04:00
Andrey Breslav
a2b82095da
Using the version of ASM that has debug information in it
...
No more need for extra ASM jars (analysis and util)
2013-05-21 13:56:34 +04:00
Natalia.Ukhorskaya
a5f1a8b3f8
TypeCastException when casting null to T with nullable upper-bound
...
#KT-3637 Fixed
2013-05-21 13:21:52 +04:00
Alexey Sedunov
033e82666d
Extract method for else branch check in when expression
2013-05-15 12:57:32 +04:00
Natalia.Ukhorskaya
32c5f5f59d
EA-46019 - assert: PropertyCodegen.generatePropertyDelegateAccess: delegate type can be null when delegate expression is unresolved and back-end called from light class generation
2013-05-14 15:38:49 +04:00
Natalia.Ukhorskaya
9e584ded11
ClassFormatError because of initializing variable with Any type with primitive value
...
#KT-3524 Fixed
2013-05-14 15:38:42 +04:00
Mikhael Bogdanov
6da8ba3fec
Default function generation refactoring
2013-05-08 16:13:53 +04:00
Mikhael Bogdanov
702dadccf4
CodegenContext replaced by more specific MethodContext in method generation, mapToCallableMethod call replaced by mapSignature for method header generation
2013-05-08 16:11:17 +04:00
Evgeny Gerashchenko
516a5b76e8
Fixed calling inherited SAM adapter.
2013-05-06 16:45:36 +04:00
Mikhael Bogdanov
22ddd05e09
KT-3576 Getters for float constants in objects always return 0.0 when constants are less than 1.0
...
#KT-3576 Fixed
2013-05-06 10:41:48 +04:00
Natalia.Ukhorskaya
6e2584d0de
Generate bytecode for delegated properties
2013-04-30 21:47:22 +04:00
Mikhael Bogdanov
e72b177adc
KT-3561 Bad RuntimeInvisibleParameterAnnotations on attempt to annotate enum constructor hidden parametrs - name and ordinal
2013-04-30 18:46:07 +04:00
Mikhael Bogdanov
b0b6728c7e
KT-3118 NoSuchFieldError on private property without backing field &&
...
KT-3551 Wrong synthetic accessor implementation
2013-04-30 15:28:02 +04:00
Mikhael Bogdanov
b1c2d9035a
Removed JvmPropertyAccessorSignature.getJvmMethodSignature() method
2013-04-30 15:17:03 +04:00
Mikhael Bogdanov
83d8930c02
Primary constructor generation via FunctionCodegen Strategy, local variable table generation via JvmMethodSignature and FunctionDescriptor
2013-04-30 15:17:03 +04:00
Mikhael Bogdanov
5fe6e32882
Make JvmPropertyAccessorSignature extends JvmMethodSignature
2013-04-30 15:17:03 +04:00
Mikhael Bogdanov
ffed25f48c
Fixed wrong JvmMethodParameterKind for captured local function
2013-04-30 15:17:03 +04:00
Mikhael Bogdanov
b6fc0c5c13
KT-3538: Super call to trait implemetation invokes method from base class
2013-04-24 15:52:09 +04:00
Mikhael Bogdanov
aa2db75266
KT-3389: Local class construction results in CompilationException && KT-2873 && KT-3210
...
KT-2873: VerifyError on instantiating a local class inside a closure
KT-3210 Inline Class: CompilationException: Back-end (JVM) Internal error: wrong code generated java.lang.ArrayIndexOutOfBoundsException null
#KT-3389 Fixed
2013-04-24 13:49:47 +04:00
Mikhael Bogdanov
9682b72643
Inner class generation now performed on visiting appropriate declaration
2013-04-23 16:08:02 +04:00
Alexander Udalov
56f8f021f9
Generate proper generic signature for closure classes
2013-04-22 17:59:32 +04:00
Alexander Udalov
ace7bd9bc8
Fix StackValue.coerce void to Object
...
We can only put Unit.VALUE on stack if we're requested an instance of Object or
Unit. In other cases (arbitrary objects / arrays) we put null instead
2013-04-22 17:59:32 +04:00
Alexander Udalov
36ddfaa24b
Minor refactoring in CodegenAnnotatingVisitor
...
Create a private helper method
2013-04-22 17:59:32 +04:00
Alexander Udalov
054e5fb5e7
Codegen for callable reference expressions
...
#KT-1183 In Progress
2013-04-22 17:59:32 +04:00
Alexander Udalov
1eeaaad05d
Refactor method/constructor calls in codegen
...
- use ResolvedCall where possible
- 'call' parameter to invokeMethodWithArguments was used only to generate
callee, e.g. in "A()" where A is an expression which can be invoke()'d.
In case of constructors and enum entry delegation specifiers there's no need
to generate callee, so 'call' is made Nullable with a subsequent assert
- remove generateJavaConstructorCall() method, since it did no useful work.
Java constructor invocation is broken anyway and needs to be fixed (KT-3532)
- minor code style / formatting issues fixed, several methods renamed to better
reflect semantics
2013-04-22 17:59:32 +04:00
Alexander Udalov
db65237989
Refactor ClosureCodegen
...
- make several commonly used parameters ClosureCodegen's fields
- take an arbitrary strategy for closure function body codegen
- don't make extra binding context lookups
2013-04-22 17:59:31 +04:00
Alexander Udalov
80b78f0f6d
invokeinterface FunctionN.invoke()
...
Instead of invokevirtual on FunctionImpl class, do invokeinterface on a
Function trait. This will allow to invoke functions on classes which don't
inherit from FunctionImpl classes.
Also rename the method to the more sensible name
2013-04-22 17:59:31 +04:00
Alexander Udalov
141b996709
Minor refactoring in ExpressionCodegen
...
Inline useless method, factor out resolveToCallableMethod logic from
resolveToCallable
2013-04-22 17:59:31 +04:00
Alexander Udalov
f509407852
Extract static helpers to FunctionTypesUtil
...
Also move 'getInternalClassName' method from CodegenUtil to FunctionTypesUtil,
since it's related to function types
2013-04-22 17:59:31 +04:00
Alexander Udalov
121cb13883
Minor refactoring in CodegenBinding
...
- CLASS_FOR_FUNCTION slice was used for two purposes: to record closure classes
for functions and for scripts. Separate this slice into two slices:
CLASS_FOR_FUNCTION and CLASS_FOR_SCRIPT
- add classNameForAnonymousClass() overloaded method to CodegenBinding, taking
a function descriptor (not a PSI element)
2013-04-22 17:59:31 +04:00
Alexander Udalov
f907d008e7
Refactor ClosureCodegen
...
Extract some methods, replace types with more generic (ExpressionCodegen ->
LocalLookup), make more stuff fields instead of parameters passed to every
method, annotate with Nullable/NotNull
2013-04-22 17:59:31 +04:00
Alexander Udalov
76fa9642f0
toString() for FunctionN classes
...
It's implemented as if the types were reified: getting the real type parameters
of the corresponding FunctionN class
2013-04-22 17:59:29 +04:00
Alexander Udalov
0ec1f20140
Write generic signature for closure FunctionN superclass
...
ClosureCodegen.appendType() now appends any Type as a type parameter correctly
2013-04-22 17:59:29 +04:00
Alexander Udalov
974df0ed8e
Use FunctionImplN instead of FunctionN in codegen
...
Superclass of closures should now be FunctionImplN instead of FunctionN. Since
these -Impl classes are needed only in JVM, the corresponding descriptors and
types are created in the back-end only.
2013-04-22 17:59:29 +04:00
Wojciech Lopata
3e76fc2902
Rename method
2013-04-19 08:21:00 +02:00
Evgeny Gerashchenko
7bd11718de
Supported simplest cases of SAM adapter in backend.
2013-04-18 22:01:26 +04:00
Evgeny Gerashchenko
c5b9c6a7dc
Minor. Removed index counter. Renamed variable.
2013-04-18 21:59:49 +04:00
Mikhael Bogdanov
82d7f07cb3
Fixed bug in fix for KT 3492: Bug in bytecode generation for labeled super call from inner class & Property generation refactoring
2013-04-18 18:33:25 +04:00
Mikhael Bogdanov
c69e7f059d
Duplicated JetTypeMapper.mapSignature removed
2013-04-18 15:03:43 +04:00
Mikhael Bogdanov
a1d295638a
ExpressionCOdegen.visitSimpleNameExpression simplification
2013-04-18 14:05:15 +04:00
Andrey Breslav
edbbc6ec7b
Unused method removed
2013-04-17 17:11:21 +04:00
Natalia.Ukhorskaya
f2b3be7416
Unify properties initialization for init and clinit
2013-04-17 16:18:10 +04:00
Mikhael Bogdanov
57b161b08a
KT-3500: ClassFormatError: Duplicate method name&signature in class file && KT-3429: Traits override bug
2013-04-17 15:23:33 +04:00
Mikhael Bogdanov
3da3f94b4e
KT 3492: Bug in bytecode generation for labeled super call from inner class & Property generation refactoring
2013-04-17 15:23:33 +04:00
Mikhael Bogdanov
8a14087c91
Refactoring: property processing generalization
2013-04-17 15:23:33 +04:00
Mikhael Bogdanov
0ba38b9f09
Removed code duplication and unnecessary branch
2013-04-17 15:23:33 +04:00
Mikhael Bogdanov
48d153e8b2
General class for Field, Property, FieldForSharedVar extracted
2013-04-17 15:23:33 +04:00
Andrey Breslav
df9f4ea6d6
Better diagnostics in CompilationException
2013-04-12 21:06:54 +04:00
Andrey Breslav
8c967e0c73
Unused parameters removed from injectors
2013-04-12 21:06:52 +04:00
Alexander Udalov
57f6870e68
Remove useless parameter from FunctionGenerationStrategy
2013-04-10 20:25:16 +04:00