diff --git a/compiler/frontend/builtins/jet/Any.kotlin_class b/compiler/frontend/builtins/jet/Any.kotlin_class index ef6c918b55f..5318f352bd5 100644 --- a/compiler/frontend/builtins/jet/Any.kotlin_class +++ b/compiler/frontend/builtins/jet/Any.kotlin_class @@ -1,2 +1,3 @@ -R Æ0B +j + Æ0B  \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/Array.kotlin_class b/compiler/frontend/builtins/jet/Array.kotlin_class index 67f0538a5c7..dd17bd8d5e2 100644 Binary files a/compiler/frontend/builtins/jet/Array.kotlin_class and b/compiler/frontend/builtins/jet/Array.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Boolean.kotlin_class b/compiler/frontend/builtins/jet/Boolean.kotlin_class index 48876f24ce9..058a85afa03 100644 Binary files a/compiler/frontend/builtins/jet/Boolean.kotlin_class and b/compiler/frontend/builtins/jet/Boolean.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/BooleanArray.kotlin_class b/compiler/frontend/builtins/jet/BooleanArray.kotlin_class index 59a95a485a3..c63f56907d3 100644 Binary files a/compiler/frontend/builtins/jet/BooleanArray.kotlin_class and b/compiler/frontend/builtins/jet/BooleanArray.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/BooleanIterator.kotlin_class b/compiler/frontend/builtins/jet/BooleanIterator.kotlin_class index cd5af886994..e431fb41a6e 100644 --- a/compiler/frontend/builtins/jet/BooleanIterator.kotlin_class +++ b/compiler/frontend/builtins/jet/BooleanIterator.kotlin_class @@ -1,8 +1,9 @@ & 2  - R Æ0B - Z + Z 0B  Z &0B - \ No newline at end of file + j + Æ0B + \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/Byte.kotlin_class b/compiler/frontend/builtins/jet/Byte.kotlin_class index 96e16f171d7..939a717dd97 100644 Binary files a/compiler/frontend/builtins/jet/Byte.kotlin_class and b/compiler/frontend/builtins/jet/Byte.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/ByteArray.kotlin_class b/compiler/frontend/builtins/jet/ByteArray.kotlin_class index a649c48a69a..168414bf61f 100644 Binary files a/compiler/frontend/builtins/jet/ByteArray.kotlin_class and b/compiler/frontend/builtins/jet/ByteArray.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/ByteIterator.kotlin_class b/compiler/frontend/builtins/jet/ByteIterator.kotlin_class index cddee191648..0c5f9e97d81 100644 --- a/compiler/frontend/builtins/jet/ByteIterator.kotlin_class +++ b/compiler/frontend/builtins/jet/ByteIterator.kotlin_class @@ -1,8 +1,9 @@ &2  - R Æ0B -Z + Z 0B  Z &0?B - \ No newline at end of file + j + Æ0B + \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/ByteProgression.kotlin_class b/compiler/frontend/builtins/jet/ByteProgression.kotlin_class index 7c90b10e667..3d29b0e00c7 100644 Binary files a/compiler/frontend/builtins/jet/ByteProgression.kotlin_class and b/compiler/frontend/builtins/jet/ByteProgression.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/ByteRange.kotlin_class b/compiler/frontend/builtins/jet/ByteRange.kotlin_class index 77d9ab60673..0102268d2c4 100644 Binary files a/compiler/frontend/builtins/jet/ByteRange.kotlin_class and b/compiler/frontend/builtins/jet/ByteRange.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/ByteRange.object.kotlin_class b/compiler/frontend/builtins/jet/ByteRange.object.kotlin_class index 234b12335aa..8a94951587f 100644 Binary files a/compiler/frontend/builtins/jet/ByteRange.object.kotlin_class and b/compiler/frontend/builtins/jet/ByteRange.object.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Char.kotlin_class b/compiler/frontend/builtins/jet/Char.kotlin_class index a3ff15dabad..ab6607d04d3 100644 Binary files a/compiler/frontend/builtins/jet/Char.kotlin_class and b/compiler/frontend/builtins/jet/Char.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/CharArray.kotlin_class b/compiler/frontend/builtins/jet/CharArray.kotlin_class index 5697327d4b3..2ca8847f220 100644 Binary files a/compiler/frontend/builtins/jet/CharArray.kotlin_class and b/compiler/frontend/builtins/jet/CharArray.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/CharIterator.kotlin_class b/compiler/frontend/builtins/jet/CharIterator.kotlin_class index 3ef3ea40e68..1d27898c159 100644 --- a/compiler/frontend/builtins/jet/CharIterator.kotlin_class +++ b/compiler/frontend/builtins/jet/CharIterator.kotlin_class @@ -1,8 +1,9 @@ &!2  -R Æ0B -!Z +Z 0B Z &0LB - \ No newline at end of file +j + Æ0B +! \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/CharProgression.kotlin_class b/compiler/frontend/builtins/jet/CharProgression.kotlin_class index f46036e3c86..3f8e60afbb6 100644 Binary files a/compiler/frontend/builtins/jet/CharProgression.kotlin_class and b/compiler/frontend/builtins/jet/CharProgression.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/CharRange.kotlin_class b/compiler/frontend/builtins/jet/CharRange.kotlin_class index cf73b03419f..2a9c5b567f6 100644 Binary files a/compiler/frontend/builtins/jet/CharRange.kotlin_class and b/compiler/frontend/builtins/jet/CharRange.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/CharRange.object.kotlin_class b/compiler/frontend/builtins/jet/CharRange.object.kotlin_class index 412b9e2cb4c..926b720449d 100644 Binary files a/compiler/frontend/builtins/jet/CharRange.object.kotlin_class and b/compiler/frontend/builtins/jet/CharRange.object.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Double.kotlin_class b/compiler/frontend/builtins/jet/Double.kotlin_class index a8e5be96986..eae62d73918 100644 Binary files a/compiler/frontend/builtins/jet/Double.kotlin_class and b/compiler/frontend/builtins/jet/Double.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/DoubleArray.kotlin_class b/compiler/frontend/builtins/jet/DoubleArray.kotlin_class index 1f3e7a4af6a..1c74994f879 100644 Binary files a/compiler/frontend/builtins/jet/DoubleArray.kotlin_class and b/compiler/frontend/builtins/jet/DoubleArray.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/DoubleIterator.kotlin_class b/compiler/frontend/builtins/jet/DoubleIterator.kotlin_class index 4241312b851..5846b220330 100644 --- a/compiler/frontend/builtins/jet/DoubleIterator.kotlin_class +++ b/compiler/frontend/builtins/jet/DoubleIterator.kotlin_class @@ -1,8 +1,9 @@ &*2  -R Æ0B -*Z +Z 0B Z &0]B - \ No newline at end of file +j + Æ0B +* \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/DoubleProgression.kotlin_class b/compiler/frontend/builtins/jet/DoubleProgression.kotlin_class index 1652bce93c9..947ec762ca4 100644 Binary files a/compiler/frontend/builtins/jet/DoubleProgression.kotlin_class and b/compiler/frontend/builtins/jet/DoubleProgression.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/DoubleRange.kotlin_class b/compiler/frontend/builtins/jet/DoubleRange.kotlin_class index e48ab9c0230..492a35a0f03 100644 Binary files a/compiler/frontend/builtins/jet/DoubleRange.kotlin_class and b/compiler/frontend/builtins/jet/DoubleRange.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/DoubleRange.object.kotlin_class b/compiler/frontend/builtins/jet/DoubleRange.object.kotlin_class index 44f79c3165a..96abdce5a93 100644 Binary files a/compiler/frontend/builtins/jet/DoubleRange.object.kotlin_class and b/compiler/frontend/builtins/jet/DoubleRange.object.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Enum.kotlin_class b/compiler/frontend/builtins/jet/Enum.kotlin_class index 199d47fb0a5..bbc9231d9e5 100644 Binary files a/compiler/frontend/builtins/jet/Enum.kotlin_class and b/compiler/frontend/builtins/jet/Enum.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Float.kotlin_class b/compiler/frontend/builtins/jet/Float.kotlin_class index 98d14ff176f..2e34a417402 100644 Binary files a/compiler/frontend/builtins/jet/Float.kotlin_class and b/compiler/frontend/builtins/jet/Float.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/FloatArray.kotlin_class b/compiler/frontend/builtins/jet/FloatArray.kotlin_class index d914e488bb3..40cf79be1eb 100644 Binary files a/compiler/frontend/builtins/jet/FloatArray.kotlin_class and b/compiler/frontend/builtins/jet/FloatArray.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/FloatIterator.kotlin_class b/compiler/frontend/builtins/jet/FloatIterator.kotlin_class index 6b97e4ef406..6e99cfb6f1c 100644 --- a/compiler/frontend/builtins/jet/FloatIterator.kotlin_class +++ b/compiler/frontend/builtins/jet/FloatIterator.kotlin_class @@ -1,7 +1,8 @@ &F2  -R Æ0B -FZ +Z 0B Z &0ªB - \ No newline at end of file +j + Æ0B +F \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/FloatProgression.kotlin_class b/compiler/frontend/builtins/jet/FloatProgression.kotlin_class index 905c0f91faf..6028a1cfe58 100644 Binary files a/compiler/frontend/builtins/jet/FloatProgression.kotlin_class and b/compiler/frontend/builtins/jet/FloatProgression.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/FloatRange.kotlin_class b/compiler/frontend/builtins/jet/FloatRange.kotlin_class index 35c06e5e172..cf697889c3e 100644 Binary files a/compiler/frontend/builtins/jet/FloatRange.kotlin_class and b/compiler/frontend/builtins/jet/FloatRange.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/FloatRange.object.kotlin_class b/compiler/frontend/builtins/jet/FloatRange.object.kotlin_class index f3db15ae1a1..8e33bc92374 100644 Binary files a/compiler/frontend/builtins/jet/FloatRange.object.kotlin_class and b/compiler/frontend/builtins/jet/FloatRange.object.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/InlineStrategy.kotlin_class b/compiler/frontend/builtins/jet/InlineStrategy.kotlin_class index b1299bc58f5..6db15d8e2f5 100644 --- a/compiler/frontend/builtins/jet/InlineStrategy.kotlin_class +++ b/compiler/frontend/builtins/jet/InlineStrategy.kotlin_class @@ -1,4 +1,5 @@ †_2 - -_HR Â0B -_`Ä`Å \ No newline at end of file +_H`Ä`Åj + Â0B +_ \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/InlineStrategy.object.AS_FUNCTION.kotlin_class b/compiler/frontend/builtins/jet/InlineStrategy.object.AS_FUNCTION.kotlin_class index 5756388c7d4..1707fc330b1 100644 Binary files a/compiler/frontend/builtins/jet/InlineStrategy.object.AS_FUNCTION.kotlin_class and b/compiler/frontend/builtins/jet/InlineStrategy.object.AS_FUNCTION.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/InlineStrategy.object.IN_PLACE.kotlin_class b/compiler/frontend/builtins/jet/InlineStrategy.object.IN_PLACE.kotlin_class index 5495d9259d8..edc2c9ecf13 100644 Binary files a/compiler/frontend/builtins/jet/InlineStrategy.object.IN_PLACE.kotlin_class and b/compiler/frontend/builtins/jet/InlineStrategy.object.IN_PLACE.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/InlineStrategy.object.kotlin_class b/compiler/frontend/builtins/jet/InlineStrategy.object.kotlin_class index 6841d23c3bd..b45465f52a3 100644 Binary files a/compiler/frontend/builtins/jet/InlineStrategy.object.kotlin_class and b/compiler/frontend/builtins/jet/InlineStrategy.object.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Int.kotlin_class b/compiler/frontend/builtins/jet/Int.kotlin_class index c725c793e47..e4a48bc1e51 100644 Binary files a/compiler/frontend/builtins/jet/Int.kotlin_class and b/compiler/frontend/builtins/jet/Int.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/IntArray.kotlin_class b/compiler/frontend/builtins/jet/IntArray.kotlin_class index 4eb53a39a00..7979962addf 100644 Binary files a/compiler/frontend/builtins/jet/IntArray.kotlin_class and b/compiler/frontend/builtins/jet/IntArray.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/IntIterator.kotlin_class b/compiler/frontend/builtins/jet/IntIterator.kotlin_class index f1769a66882..ddef68df2d4 100644 --- a/compiler/frontend/builtins/jet/IntIterator.kotlin_class +++ b/compiler/frontend/builtins/jet/IntIterator.kotlin_class @@ -1,7 +1,8 @@ &d2  -R Æ0B -dZ +Z 0B Z &0ÐB - \ No newline at end of file +j + Æ0B +d \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/IntProgression.kotlin_class b/compiler/frontend/builtins/jet/IntProgression.kotlin_class index 04a7c9ee2b1..9658c696bcc 100644 Binary files a/compiler/frontend/builtins/jet/IntProgression.kotlin_class and b/compiler/frontend/builtins/jet/IntProgression.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/IntRange.kotlin_class b/compiler/frontend/builtins/jet/IntRange.kotlin_class index 32e63720ff7..e4664f6d2c7 100644 Binary files a/compiler/frontend/builtins/jet/IntRange.kotlin_class and b/compiler/frontend/builtins/jet/IntRange.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/IntRange.object.kotlin_class b/compiler/frontend/builtins/jet/IntRange.object.kotlin_class index 4f8b2126aff..0e7066b9cd7 100644 Binary files a/compiler/frontend/builtins/jet/IntRange.object.kotlin_class and b/compiler/frontend/builtins/jet/IntRange.object.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Long.kotlin_class b/compiler/frontend/builtins/jet/Long.kotlin_class index 6dd7bd1712f..9aac6a73712 100644 Binary files a/compiler/frontend/builtins/jet/Long.kotlin_class and b/compiler/frontend/builtins/jet/Long.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/LongArray.kotlin_class b/compiler/frontend/builtins/jet/LongArray.kotlin_class index d320d3a885b..77d3d8a0fa4 100644 Binary files a/compiler/frontend/builtins/jet/LongArray.kotlin_class and b/compiler/frontend/builtins/jet/LongArray.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/LongIterator.kotlin_class b/compiler/frontend/builtins/jet/LongIterator.kotlin_class index 3cca28e0802..6661b7970fe 100644 --- a/compiler/frontend/builtins/jet/LongIterator.kotlin_class +++ b/compiler/frontend/builtins/jet/LongIterator.kotlin_class @@ -1,7 +1,8 @@ &¯2  -R Æ0B -¯Z +Z 0B Z &0§B - \ No newline at end of file +j + Æ0B +¯ \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/LongProgression.kotlin_class b/compiler/frontend/builtins/jet/LongProgression.kotlin_class index 38482d2e6ed..49ab66d78d2 100644 Binary files a/compiler/frontend/builtins/jet/LongProgression.kotlin_class and b/compiler/frontend/builtins/jet/LongProgression.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/LongRange.kotlin_class b/compiler/frontend/builtins/jet/LongRange.kotlin_class index cd4540dccc6..d9b5489efd2 100644 Binary files a/compiler/frontend/builtins/jet/LongRange.kotlin_class and b/compiler/frontend/builtins/jet/LongRange.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/LongRange.object.kotlin_class b/compiler/frontend/builtins/jet/LongRange.object.kotlin_class index 63b62c3374f..b7e8f8ade6a 100644 Binary files a/compiler/frontend/builtins/jet/LongRange.object.kotlin_class and b/compiler/frontend/builtins/jet/LongRange.object.kotlin_class differ diff --git a/compiler/frontend/builtins/jet/Nothing.kotlin_class b/compiler/frontend/builtins/jet/Nothing.kotlin_class index e3d349d8608..3ed54d4b45b 100644 --- a/compiler/frontend/builtins/jet/Nothing.kotlin_class +++ b/compiler/frontend/builtins/jet/Nothing.kotlin_class @@ -1,2 +1,3 @@ -½R Â0B +½j + Â0B ½ \ No newline at end of file diff --git a/compiler/frontend/builtins/jet/Number.kotlin_class b/compiler/frontend/builtins/jet/Number.kotlin_class index b2c01ede094..fa727325b22 100644 --- a/compiler/frontend/builtins/jet/Number.kotlin_class +++ b/compiler/frontend/builtins/jet/Number.kotlin_class @@ -1,6 +1,5 @@ & 2 -(R Æ0B - Z +(Z &06B  Z &07B @@ -14,4 +13,6 @@ &0;B Z &0optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-     * todo: other constructors?
-     * 
- */ - boolean hasPrimaryConstructor(); - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-     * todo: other constructors?
-     * 
- */ - org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getPrimaryConstructor(); - // repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11; /** * repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11; @@ -4483,6 +4465,24 @@ public final class ProtoBuf { * repeated int32 enum_entry = 12; */ int getEnumEntry(int index); + + // optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+     * This field is present if and only if the class has a primary constructor
+     * 
+ */ + boolean hasPrimaryConstructor(); + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+     * This field is present if and only if the class has a primary constructor
+     * 
+ */ + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getPrimaryConstructor(); } /** * Protobuf type {@code org.jetbrains.jet.descriptors.serialization.Class} @@ -4605,31 +4605,18 @@ public final class ProtoBuf { classObjectPresent_ = input.readBool(); break; } - case 82: { - org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = primaryConstructor_.toBuilder(); - } - primaryConstructor_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(primaryConstructor_); - primaryConstructor_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } case 90: { - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { member_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; + mutable_bitField0_ |= 0x00000100; } member_.add(input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.PARSER, extensionRegistry)); break; } case 96: { - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { enumEntry_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; + mutable_bitField0_ |= 0x00000200; } enumEntry_.add(input.readInt32()); break; @@ -4637,9 +4624,9 @@ public final class ProtoBuf { case 98: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) { + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { enumEntry_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; + mutable_bitField0_ |= 0x00000200; } while (input.getBytesUntilLimit() > 0) { enumEntry_.add(input.readInt32()); @@ -4647,6 +4634,19 @@ public final class ProtoBuf { input.popLimit(limit); break; } + case 106: { + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.Builder subBuilder = null; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + subBuilder = primaryConstructor_.toBuilder(); + } + primaryConstructor_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(primaryConstructor_); + primaryConstructor_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000010; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -4667,10 +4667,10 @@ public final class ProtoBuf { if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { nestedObjectName_ = java.util.Collections.unmodifiableList(nestedObjectName_); } - if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { member_ = java.util.Collections.unmodifiableList(member_); } - if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { + if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); } makeExtensionsImmutable(); @@ -4800,6 +4800,437 @@ public final class ProtoBuf { // @@protoc_insertion_point(enum_scope:org.jetbrains.jet.descriptors.serialization.Class.Kind) } + public interface PrimaryConstructorOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+       * If this field is present, it contains serialized data for the primary constructor.
+       * Otherwise it's default and can be created manually upon deserialization
+       * 
+ */ + boolean hasData(); + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+       * If this field is present, it contains serialized data for the primary constructor.
+       * Otherwise it's default and can be created manually upon deserialization
+       * 
+ */ + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getData(); + } + /** + * Protobuf type {@code org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor} + */ + public static final class PrimaryConstructor extends + com.google.protobuf.GeneratedMessageLite + implements PrimaryConstructorOrBuilder { + // Use PrimaryConstructor.newBuilder() to construct. + private PrimaryConstructor(com.google.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + + } + private PrimaryConstructor(boolean noInit) {} + + private static final PrimaryConstructor defaultInstance; + public static PrimaryConstructor getDefaultInstance() { + return defaultInstance; + } + + public PrimaryConstructor getDefaultInstanceForType() { + return defaultInstance; + } + + private PrimaryConstructor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + makeExtensionsImmutable(); + } + } + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PrimaryConstructor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimaryConstructor(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + public static final int DATA_FIELD_NUMBER = 1; + private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable data_; + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+       * If this field is present, it contains serialized data for the primary constructor.
+       * Otherwise it's default and can be created manually upon deserialization
+       * 
+ */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+       * If this field is present, it contains serialized data for the primary constructor.
+       * Otherwise it's default and can be created manually upon deserialization
+       * 
+ */ + public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getData() { + return data_; + } + + private void initFields() { + data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (hasData()) { + if (!getData().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, data_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, data_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor, Builder> + implements org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructorOrBuilder { + // Construct using org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getDefaultInstanceForType() { + return org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance(); + } + + public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor build() { + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor buildPartial() { + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor result = new org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.data_ = data_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor other) { + if (other == org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance()) return this; + if (other.hasData()) { + mergeData(other.getData()); + } + return this; + } + + public final boolean isInitialized() { + if (hasData()) { + if (!getData().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+         * If this field is present, it contains serialized data for the primary constructor.
+         * Otherwise it's default and can be created manually upon deserialization
+         * 
+ */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+         * If this field is present, it contains serialized data for the primary constructor.
+         * Otherwise it's default and can be created manually upon deserialization
+         * 
+ */ + public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getData() { + return data_; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+         * If this field is present, it contains serialized data for the primary constructor.
+         * Otherwise it's default and can be created manually upon deserialization
+         * 
+ */ + public Builder setData(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+         * If this field is present, it contains serialized data for the primary constructor.
+         * Otherwise it's default and can be created manually upon deserialization
+         * 
+ */ + public Builder setData( + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder builderForValue) { + data_ = builderForValue.build(); + + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+         * If this field is present, it contains serialized data for the primary constructor.
+         * Otherwise it's default and can be created manually upon deserialization
+         * 
+ */ + public Builder mergeData(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + data_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance()) { + data_ = + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.newBuilder(data_).mergeFrom(value).buildPartial(); + } else { + data_ = value; + } + + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Callable data = 1; + * + *
+         * If this field is present, it contains serialized data for the primary constructor.
+         * Otherwise it's default and can be created manually upon deserialization
+         * 
+ */ + public Builder clearData() { + data_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor) + } + + static { + defaultInstance = new PrimaryConstructor(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor) + } + private int bitField0_; // optional int32 flags = 1 [default = 0]; public static final int FLAGS_FIELD_NUMBER = 1; @@ -5055,30 +5486,6 @@ public final class ProtoBuf { return classObjectPresent_; } - // optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - public static final int PRIMARY_CONSTRUCTOR_FIELD_NUMBER = 10; - private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable primaryConstructor_; - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-     * todo: other constructors?
-     * 
- */ - public boolean hasPrimaryConstructor() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-     * todo: other constructors?
-     * 
- */ - public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getPrimaryConstructor() { - return primaryConstructor_; - } - // repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11; public static final int MEMBER_FIELD_NUMBER = 11; private java.util.List member_; @@ -5138,6 +5545,30 @@ public final class ProtoBuf { return enumEntry_.get(index); } + // optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + public static final int PRIMARY_CONSTRUCTOR_FIELD_NUMBER = 13; + private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor primaryConstructor_; + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+     * This field is present if and only if the class has a primary constructor
+     * 
+ */ + public boolean hasPrimaryConstructor() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+     * This field is present if and only if the class has a primary constructor
+     * 
+ */ + public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getPrimaryConstructor() { + return primaryConstructor_; + } + private void initFields() { flags_ = 0; extraVisibility_ = ""; @@ -5147,9 +5578,9 @@ public final class ProtoBuf { nestedClassName_ = java.util.Collections.emptyList(); nestedObjectName_ = java.util.Collections.emptyList(); classObjectPresent_ = false; - primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); member_ = java.util.Collections.emptyList(); enumEntry_ = java.util.Collections.emptyList(); + primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -5172,14 +5603,14 @@ public final class ProtoBuf { return false; } } - if (hasPrimaryConstructor()) { - if (!getPrimaryConstructor().isInitialized()) { + for (int i = 0; i < getMemberCount(); i++) { + if (!getMember(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } - for (int i = 0; i < getMemberCount(); i++) { - if (!getMember(i).isInitialized()) { + if (hasPrimaryConstructor()) { + if (!getPrimaryConstructor().isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -5215,15 +5646,15 @@ public final class ProtoBuf { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(9, classObjectPresent_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(10, primaryConstructor_); - } for (int i = 0; i < member_.size(); i++) { output.writeMessage(11, member_.get(i)); } for (int i = 0; i < enumEntry_.size(); i++) { output.writeInt32(12, enumEntry_.get(i)); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(13, primaryConstructor_); + } } private int memoizedSerializedSize = -1; @@ -5274,10 +5705,6 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeBoolSize(9, classObjectPresent_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, primaryConstructor_); - } for (int i = 0; i < member_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, member_.get(i)); @@ -5291,6 +5718,10 @@ public final class ProtoBuf { size += dataSize; size += 1 * getEnumEntryList().size(); } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, primaryConstructor_); + } memoizedSerializedSize = size; return size; } @@ -5398,11 +5829,11 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000040); classObjectPresent_ = false; bitField0_ = (bitField0_ & ~0x00000080); - primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000100); member_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); enumEntry_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000400); return this; } @@ -5463,20 +5894,20 @@ public final class ProtoBuf { to_bitField0_ |= 0x00000008; } result.classObjectPresent_ = classObjectPresent_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { + member_ = java.util.Collections.unmodifiableList(member_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.member_ = member_; + if (((bitField0_ & 0x00000200) == 0x00000200)) { + enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.enumEntry_ = enumEntry_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { to_bitField0_ |= 0x00000010; } result.primaryConstructor_ = primaryConstructor_; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - member_ = java.util.Collections.unmodifiableList(member_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.member_ = member_; - if (((bitField0_ & 0x00000400) == 0x00000400)) { - enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.enumEntry_ = enumEntry_; result.bitField0_ = to_bitField0_; return result; } @@ -5537,13 +5968,10 @@ public final class ProtoBuf { if (other.hasClassObjectPresent()) { setClassObjectPresent(other.getClassObjectPresent()); } - if (other.hasPrimaryConstructor()) { - mergePrimaryConstructor(other.getPrimaryConstructor()); - } if (!other.member_.isEmpty()) { if (member_.isEmpty()) { member_ = other.member_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensureMemberIsMutable(); member_.addAll(other.member_); @@ -5553,13 +5981,16 @@ public final class ProtoBuf { if (!other.enumEntry_.isEmpty()) { if (enumEntry_.isEmpty()) { enumEntry_ = other.enumEntry_; - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000200); } else { ensureEnumEntryIsMutable(); enumEntry_.addAll(other.enumEntry_); } } + if (other.hasPrimaryConstructor()) { + mergePrimaryConstructor(other.getPrimaryConstructor()); + } return this; } @@ -5580,14 +6011,14 @@ public final class ProtoBuf { return false; } } - if (hasPrimaryConstructor()) { - if (!getPrimaryConstructor().isInitialized()) { + for (int i = 0; i < getMemberCount(); i++) { + if (!getMember(i).isInitialized()) { return false; } } - for (int i = 0; i < getMemberCount(); i++) { - if (!getMember(i).isInitialized()) { + if (hasPrimaryConstructor()) { + if (!getPrimaryConstructor().isInitialized()) { return false; } @@ -6264,98 +6695,13 @@ public final class ProtoBuf { return this; } - // optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-       * todo: other constructors?
-       * 
- */ - public boolean hasPrimaryConstructor() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-       * todo: other constructors?
-       * 
- */ - public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable getPrimaryConstructor() { - return primaryConstructor_; - } - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-       * todo: other constructors?
-       * 
- */ - public Builder setPrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) { - if (value == null) { - throw new NullPointerException(); - } - primaryConstructor_ = value; - - bitField0_ |= 0x00000100; - return this; - } - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-       * todo: other constructors?
-       * 
- */ - public Builder setPrimaryConstructor( - org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.Builder builderForValue) { - primaryConstructor_ = builderForValue.build(); - - bitField0_ |= 0x00000100; - return this; - } - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-       * todo: other constructors?
-       * 
- */ - public Builder mergePrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable value) { - if (((bitField0_ & 0x00000100) == 0x00000100) && - primaryConstructor_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance()) { - primaryConstructor_ = - org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.newBuilder(primaryConstructor_).mergeFrom(value).buildPartial(); - } else { - primaryConstructor_ = value; - } - - bitField0_ |= 0x00000100; - return this; - } - /** - * optional .org.jetbrains.jet.descriptors.serialization.Callable primary_constructor = 10; - * - *
-       * todo: other constructors?
-       * 
- */ - public Builder clearPrimaryConstructor() { - primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Callable.getDefaultInstance(); - - bitField0_ = (bitField0_ & ~0x00000100); - return this; - } - // repeated .org.jetbrains.jet.descriptors.serialization.Callable member = 11; private java.util.List member_ = java.util.Collections.emptyList(); private void ensureMemberIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { member_ = new java.util.ArrayList(member_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000100; } } @@ -6460,7 +6806,7 @@ public final class ProtoBuf { */ public Builder clearMember() { member_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); return this; } @@ -6477,9 +6823,9 @@ public final class ProtoBuf { // repeated int32 enum_entry = 12; private java.util.List enumEntry_ = java.util.Collections.emptyList(); private void ensureEnumEntryIsMutable() { - if (!((bitField0_ & 0x00000400) == 0x00000400)) { + if (!((bitField0_ & 0x00000200) == 0x00000200)) { enumEntry_ = new java.util.ArrayList(enumEntry_); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; } } /** @@ -6535,11 +6881,96 @@ public final class ProtoBuf { */ public Builder clearEnumEntry() { enumEntry_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000200); return this; } + // optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + private org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance(); + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+       * This field is present if and only if the class has a primary constructor
+       * 
+ */ + public boolean hasPrimaryConstructor() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+       * This field is present if and only if the class has a primary constructor
+       * 
+ */ + public org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor getPrimaryConstructor() { + return primaryConstructor_; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+       * This field is present if and only if the class has a primary constructor
+       * 
+ */ + public Builder setPrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor value) { + if (value == null) { + throw new NullPointerException(); + } + primaryConstructor_ = value; + + bitField0_ |= 0x00000400; + return this; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+       * This field is present if and only if the class has a primary constructor
+       * 
+ */ + public Builder setPrimaryConstructor( + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.Builder builderForValue) { + primaryConstructor_ = builderForValue.build(); + + bitField0_ |= 0x00000400; + return this; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+       * This field is present if and only if the class has a primary constructor
+       * 
+ */ + public Builder mergePrimaryConstructor(org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor value) { + if (((bitField0_ & 0x00000400) == 0x00000400) && + primaryConstructor_ != org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance()) { + primaryConstructor_ = + org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.newBuilder(primaryConstructor_).mergeFrom(value).buildPartial(); + } else { + primaryConstructor_ = value; + } + + bitField0_ |= 0x00000400; + return this; + } + /** + * optional .org.jetbrains.jet.descriptors.serialization.Class.PrimaryConstructor primary_constructor = 13; + * + *
+       * This field is present if and only if the class has a primary constructor
+       * 
+ */ + public Builder clearPrimaryConstructor() { + primaryConstructor_ = org.jetbrains.jet.descriptors.serialization.ProtoBuf.Class.PrimaryConstructor.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.jet.descriptors.serialization.Class) } diff --git a/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/descriptors/DeserializedClassDescriptor.java b/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/descriptors/DeserializedClassDescriptor.java index 115e39330d8..01b7fdf4aa9 100644 --- a/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/descriptors/DeserializedClassDescriptor.java +++ b/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/descriptors/DeserializedClassDescriptor.java @@ -209,8 +209,14 @@ public class DeserializedClassDescriptor extends AbstractClassDescriptor impleme private ConstructorDescriptor computePrimaryConstructor() { if (!classProto.hasPrimaryConstructor()) return null; - ProtoBuf.Callable constructorProto = classProto.getPrimaryConstructor(); - return (ConstructorDescriptor) deserializer.loadCallable(constructorProto); + ProtoBuf.Class.PrimaryConstructor constructorProto = classProto.getPrimaryConstructor(); + if (!constructorProto.hasData()) { + ConstructorDescriptorImpl descriptor = DescriptorFactory.createPrimaryConstructorForObject(this); + descriptor.setReturnType(getDefaultType()); + return descriptor; + } + + return (ConstructorDescriptor) deserializer.loadCallable(constructorProto.getData()); } @Nullable diff --git a/core/descriptors/src/org/jetbrains/jet/lang/resolve/DescriptorFactory.java b/core/descriptors/src/org/jetbrains/jet/lang/resolve/DescriptorFactory.java index 0a2bcea0dbe..edc3b943276 100644 --- a/core/descriptors/src/org/jetbrains/jet/lang/resolve/DescriptorFactory.java +++ b/core/descriptors/src/org/jetbrains/jet/lang/resolve/DescriptorFactory.java @@ -35,6 +35,14 @@ public class DescriptorFactory { public static final Name VALUE_OF_METHOD_NAME = Name.identifier("valueOf"); public static final Name VALUES_METHOD_NAME = Name.identifier("values"); + private static class DefaultConstructorDescriptor extends ConstructorDescriptorImpl { + public DefaultConstructorDescriptor(@NotNull ClassDescriptor containingClass) { + super(containingClass, Collections.emptyList(), true); + initialize(Collections.emptyList(), Collections.emptyList(), + getDefaultConstructorVisibility(containingClass)); + } + } + private DescriptorFactory() { } @@ -68,12 +76,11 @@ public class DescriptorFactory { @NotNull public static ConstructorDescriptorImpl createPrimaryConstructorForObject(@NotNull ClassDescriptor containingClass) { - ConstructorDescriptorImpl constructorDescriptor = - new ConstructorDescriptorImpl(containingClass, Collections.emptyList(), true); - constructorDescriptor.initialize(Collections.emptyList(), - Collections.emptyList(), - getDefaultConstructorVisibility(containingClass)); - return constructorDescriptor; + return new DefaultConstructorDescriptor(containingClass); + } + + public static boolean isDefaultPrimaryConstructor(@NotNull ConstructorDescriptor constructor) { + return constructor instanceof DefaultConstructorDescriptor; } @NotNull