Alexander Udalov
bd5eee5cc2
Put enum entries into enum in lazy resolve
2013-12-02 19:56:07 +04:00
Alexander Udalov
5a4cc1e2fe
Put enum entries into enum class in JDR
2013-12-02 19:56:07 +04:00
Alexander Udalov
60e7722a82
Enum entries are put into enum class, not its class object
2013-12-02 19:56:06 +04:00
Alexander Udalov
a5d6d6719c
EnumValue now has a ClassDescriptor for its enum entry
2013-12-02 19:56:06 +04:00
Alexander Udalov
83ef095093
Change enum entry resolution strategy in JDR
...
Enum entry is now resolved into a class with a class object, which inherits
from the former class, as in the other parts of the compiler. Create a special
class EnumEntrySyntheticClassDescriptor which will be reused in deserialization
later
2013-12-02 19:56:06 +04:00
Alexander Udalov
57678a5506
Fix AnnotationDescriptorResolveTest, objects are now classes in scopes
2013-12-02 19:56:06 +04:00
Alexander Udalov
6f930ef725
Support updated enum entry hierarchy in JVM codegen
2013-12-02 19:56:05 +04:00
Alexander Udalov
edc37bd499
Change local objects resolution, delete LocalVariableDescriptorForObject
...
Local objects are now resolved as global ones (with derived class objects)
2013-12-02 19:56:05 +04:00
Alexander Udalov
2967b69c4a
Update enum entry resolution strategy in lazy resolve
2013-12-02 19:56:05 +04:00
Alexander Udalov
bf1ea5fb01
Drop NamespaceLikeBuilder.addObjectDescriptor
2013-12-02 19:56:05 +04:00
Alexander Udalov
dd6cfcdc78
Resolve enum entries similar to objects in TypeHierarchyResolver
2013-12-02 19:56:04 +04:00
Alexander Udalov
c04f63e157
Change object deserialization strategy
...
Objects now have synthetic class objects in deserialization as well. "Class"
proto message now can have a synthetic class object proto within, if it's not
contained in any external class file, which is the case with objects. Drop
"class_object_present" field from binary format, since its value is equivalent
to the presence of "class_object" field
2013-12-02 19:55:21 +04:00
Alexander Udalov
26bd1ff189
Change object resolution strategy in lazy resolve
2013-12-02 19:55:20 +04:00
Alexander Udalov
ae116c6d9a
Support updated object hierarchy in JVM codegen
2013-12-02 19:55:20 +04:00
Alexander Udalov
197eaa0b2e
Drop BodiesResolveContext.getObjects()
...
Objects are stored in the same place where classes are
2013-12-02 19:55:20 +04:00
Alexander Udalov
6c74b10f6c
Change object resolution strategy in TypeHierarchyResolver
...
Instead of creating a synthetic property descriptor for objects, create a
synthetic class object in it and make it inherit from the object. This way all
of object's members will be accessible via its class object
2013-12-02 19:55:20 +04:00
Alexander Udalov
18c59d5495
Treat anonymous objects as classes (ClassKind.CLASS)
...
They're not objects per se, i.e. they're not singletons
2013-12-02 19:55:19 +04:00
Alexander Udalov
27f832a713
BodiesResolveContext.getClasses()'s key is JetClassOrObject
...
This has no effect right now, but is a preparation for the objects refactoring,
when BodiesResolveContext.getObjects() will be dropped
2013-12-02 19:55:19 +04:00
Alexander Udalov
008e5f0b13
Don't serialize default primary constructors
...
Drop "Callable primary_constructor" field, because it requires serializer to
serialize the fact that a class has a primary constructor. Default primary
constructors for objects etc. may not be serialized, because they can be
re-created trivially when they're loaded. There are three options: a class
doesn't have a primary constructor, a class has a default primary constructor,
a class has a custom primary constructor. This explains the change in
descriptors.proto
2013-12-02 19:52:44 +04:00
Mikhael Bogdanov
606b3aa4a9
Test for local fun
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
59dbf75d80
Added test for sam
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
712dcaac91
Added tests for && and ||
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
0728428814
Change renderer for descriptors
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
0b2c3efc40
Inline recursion diagnostic
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
9a9527906b
Don't lost diagnostics on real elements when processing fake resolveCall
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
621a4002e4
Binary and unary expression support
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
431e61ef74
Beatify code
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
771501912e
Comment 'inline' annotation that brokes build
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
1391676281
Support parenthesized, typed and labeled expressions
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
ceda72e0ca
Deserialization of function descriptors via DesirializedSimpleFunctionDescriptor
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
8533fd64ff
Compiler inline on/off flag
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
4079735bf2
Diagnostic for nullable parameter of Function type
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
40239c42a7
Fix cli
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
d11311ec20
Test compilation fix
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
191891963c
Fixed warning with 'orEmpty' function
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
382b2d4a96
Fix compilation warnings with redundant inline annotation
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
16f554b6bf
Removed inline annotation from downTo functions
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
0e0f950140
Replacing callable and rullable funs with SAM constructor
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
1dba69186c
Stdlib compilation error fixes with new diagnostics
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
339e639135
Stdlib regenerated
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
40d7841892
Added inline flag to templates
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
eb3edeb527
Nothing to inline diagnostic
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
f7c62fe631
Checking modality and visibility of inline function
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
87e66a6e57
Diagnostric for default
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
7329a7a9ef
Diagnostic for vararg parameters
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
558687f20f
Inline visibility checking
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
c89c465fec
Diagnostics for wrong inlinable usage
2013-12-02 18:28:24 +04:00
nik
ac6dc9fa54
standard library: 'maxBy' and 'minBy' functions added (#KT-4267 fixed)
2013-12-02 18:24:24 +04:00
nik
45e9211943
standard library: added isEmpty/isNotEmpty functions for primitive arrays
2013-12-02 18:24:24 +04:00
nik
b636538422
standard library: variance for Array functions corrected
2013-12-02 18:24:24 +04:00