Commit Graph

13055 Commits

Author SHA1 Message Date
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
Alexey Sedunov f5f394cf15 Added read action wrapper
#KT-4268 Fixed
2013-12-02 15:52:24 +04:00
Mikhael Bogdanov 4f017df237 Fix kt-1800 test 2013-12-02 10:40:54 +04:00
Svetlana Isakova 08befe02ee Merge pull request #322 from chashnikov/stdlib-min-max
standard library: 'max' and 'min' functions added (KT-3714, KT-3843, KT-3126)
2013-11-29 06:43:35 -08:00
Mikhael Bogdanov ff40005973 Record resolved call for this expression 2013-11-29 16:27:31 +04:00
Mikhael Bogdanov e7cc7d92c2 Make ReceiverParameterDescriptorImpl extends CallableDescriptor 2013-11-29 16:27:30 +04:00
Nikolay Krasko 48382803ac Refactoring: remove absent annotation warning 2013-11-29 15:04:16 +04:00
Nikolay Krasko 61e190c3e6 Move stub index 2013-11-29 15:04:15 +04:00
Nikolay Krasko 6e229af400 Disable getting variants from kotlin references 2013-11-29 15:04:15 +04:00
Nikolay Krasko b437fca321 Don't download idea for invalid branch 2013-11-29 15:04:14 +04:00
Andrey Breslav 8f45f73340 JetControlFlowTest rewritten to generator 2013-11-29 14:48:31 +04:00
Andrey Breslav 93160431f9 Fix recusrive calls in infix and prefix form
The infamous invokeOperation() method removed
2013-11-29 12:52:58 +04:00