Erokhin Stanislav
ddda69c0a6
JS Backend: hack nested object access
2013-12-02 19:56:12 +04:00
Alexander Udalov
97ad75a9f9
JS Backend: fix tests after object refactoring
2013-12-02 19:56:12 +04:00
Alexander Udalov
ba693d3e38
Delete nested_object_name from binary format
...
It's useless now: nested objects are stored along with classes
2013-12-02 19:56:12 +04:00
Alexander Udalov
4526d96186
Delete JetScope.getObjectDescriptor()
2013-12-02 19:56:11 +04:00
Alexander Udalov
550df37056
Delete JetScope.getObjectDescriptors()
2013-12-02 19:56:11 +04:00
Alexander Udalov
31c84951dc
Fix objects appearing in type position in completion
...
After the object refactoring they're present as classes in scopes, not as
object descriptors
2013-12-02 19:56:11 +04:00
Alexander Udalov
9e6cc829fb
Delete WritableScopeImpl.addObjectDescriptor()
2013-12-02 19:56:10 +04:00
Alexander Udalov
c2c4123f64
Don't store object descriptors separately in lazy member scope
...
Object descriptors are refactored to be the usual classes, so the scope can't
contain any 'objects'
2013-12-02 19:56:10 +04:00
Alexander Udalov
9890f2e5ac
Simplify CodegenBinding.canHaveOuter(), make it work for objects
...
This fixes CompileKotlinAgainstKotlinTest
2013-12-02 19:56:10 +04:00
Alexander Udalov
90490b5c0c
Delete OBJECT_DECLARATION_NAME slice and relevant usages
...
JetObjectDeclarationName is almost useless now, since properties aren't created
for objects anymore
2013-12-02 19:56:10 +04:00
Alexander Udalov
0792af5f85
JetObjectDeclarationName is no longer JetDeclaration
...
Fix lazy resolve descriptor renderer tests after object refactoring
2013-12-02 19:56:09 +04:00
Alexander Udalov
f0e230cf23
Fix test data of recursive processor and renderer
...
After object refactoring
2013-12-02 19:56:09 +04:00
Alexander Udalov
c6cfeec6fc
Delete VariableDescriptorForObject
2013-12-02 19:56:09 +04:00
Alexander Udalov
e3fffa6b0b
Fix decompiled data for objects and enum entries
...
Also prettify it for enum entries: output only names
2013-12-02 19:56:09 +04:00
Alexander Udalov
ce481b08d8
Fix CompileKotlinAgainstCustomBinariesTest
...
The two cases are almost irrelevant now that objects aren't resolved to
properties anymore
2013-12-02 19:56:08 +04:00
Alexander Udalov
cb6c98d4d6
Delete OBJECT_PROPERTY kind from binary format
...
We never create properties for objects anymore, except enum entries of Java
enums. Delete PropertyDescriptorForObjectImpl and its usages
2013-12-02 19:56:08 +04:00
Alexander Udalov
42839fa061
Delete LoadKotlinCustomTest
...
It's useless now because enums are loaded the same way from binaries as well as
from sources
2013-12-02 19:56:08 +04:00
Alexander Udalov
dd290bbeb9
Create classes when deserializing enum entries
2013-12-02 19:56:07 +04:00
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