diff --git a/build-common/test/org/jetbrains/kotlin/serialization/js/ast/DebugJsAstProtoBuf.java b/build-common/test/org/jetbrains/kotlin/serialization/js/ast/DebugJsAstProtoBuf.java
index f5f4153bb84..fa8cde4df95 100644
--- a/build-common/test/org/jetbrains/kotlin/serialization/js/ast/DebugJsAstProtoBuf.java
+++ b/build-common/test/org/jetbrains/kotlin/serialization/js/ast/DebugJsAstProtoBuf.java
@@ -41276,6 +41276,30 @@ public final class DebugJsAstProtoBuf {
* optional .org.jetbrains.kotlin.serialization.js.ast.Statement main_invocation = 12;
*/
org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.StatementOrBuilder getMainInvocationOrBuilder();
+
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ java.util.List
+ getInlinedFunctionWrappersList();
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper getInlinedFunctionWrappers(int index);
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ int getInlinedFunctionWrappersCount();
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ java.util.List extends org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder>
+ getInlinedFunctionWrappersOrBuilderList();
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder getInlinedFunctionWrappersOrBuilder(
+ int index);
}
/**
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.Fragment}
@@ -41448,6 +41472,14 @@ public final class DebugJsAstProtoBuf {
bitField0_ |= 0x00000020;
break;
}
+ case 106: {
+ if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00001000;
+ }
+ inlinedFunctionWrappers_.add(input.readMessage(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.PARSER, extensionRegistry));
+ break;
+ }
}
}
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
@@ -41474,6 +41506,9 @@ public final class DebugJsAstProtoBuf {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
inlineModule_ = java.util.Collections.unmodifiableList(inlineModule_);
}
+ if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = java.util.Collections.unmodifiableList(inlinedFunctionWrappers_);
+ }
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
@@ -41863,6 +41898,41 @@ public final class DebugJsAstProtoBuf {
return mainInvocation_;
}
+ public static final int INLINED_FUNCTION_WRAPPERS_FIELD_NUMBER = 13;
+ private java.util.List inlinedFunctionWrappers_;
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List getInlinedFunctionWrappersList() {
+ return inlinedFunctionWrappers_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List extends org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder>
+ getInlinedFunctionWrappersOrBuilderList() {
+ return inlinedFunctionWrappers_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public int getInlinedFunctionWrappersCount() {
+ return inlinedFunctionWrappers_.size();
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper getInlinedFunctionWrappers(int index) {
+ return inlinedFunctionWrappers_.get(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder getInlinedFunctionWrappersOrBuilder(
+ int index) {
+ return inlinedFunctionWrappers_.get(index);
+ }
+
private void initFields() {
importedModule_ = java.util.Collections.emptyList();
importEntry_ = java.util.Collections.emptyList();
@@ -41876,6 +41946,7 @@ public final class DebugJsAstProtoBuf {
packageFqn_ = "";
testsInvocation_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Statement.getDefaultInstance();
mainInvocation_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.Statement.getDefaultInstance();
+ inlinedFunctionWrappers_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@@ -41949,6 +42020,12 @@ public final class DebugJsAstProtoBuf {
return false;
}
}
+ for (int i = 0; i < getInlinedFunctionWrappersCount(); i++) {
+ if (!getInlinedFunctionWrappers(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
memoizedIsInitialized = 1;
return true;
}
@@ -41992,6 +42069,9 @@ public final class DebugJsAstProtoBuf {
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeMessage(12, mainInvocation_);
}
+ for (int i = 0; i < inlinedFunctionWrappers_.size(); i++) {
+ output.writeMessage(13, inlinedFunctionWrappers_.get(i));
+ }
getUnknownFields().writeTo(output);
}
@@ -42049,6 +42129,10 @@ public final class DebugJsAstProtoBuf {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(12, mainInvocation_);
}
+ for (int i = 0; i < inlinedFunctionWrappers_.size(); i++) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(13, inlinedFunctionWrappers_.get(i));
+ }
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
@@ -42169,6 +42253,7 @@ public final class DebugJsAstProtoBuf {
getInlineModuleFieldBuilder();
getTestsInvocationFieldBuilder();
getMainInvocationFieldBuilder();
+ getInlinedFunctionWrappersFieldBuilder();
}
}
private static Builder create() {
@@ -42245,6 +42330,12 @@ public final class DebugJsAstProtoBuf {
mainInvocationBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000800);
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ inlinedFunctionWrappers_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00001000);
+ } else {
+ inlinedFunctionWrappersBuilder_.clear();
+ }
return this;
}
@@ -42371,6 +42462,15 @@ public final class DebugJsAstProtoBuf {
} else {
result.mainInvocation_ = mainInvocationBuilder_.build();
}
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ if (((bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = java.util.Collections.unmodifiableList(inlinedFunctionWrappers_);
+ bitField0_ = (bitField0_ & ~0x00001000);
+ }
+ result.inlinedFunctionWrappers_ = inlinedFunctionWrappers_;
+ } else {
+ result.inlinedFunctionWrappers_ = inlinedFunctionWrappersBuilder_.build();
+ }
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
@@ -42563,6 +42663,32 @@ public final class DebugJsAstProtoBuf {
if (other.hasMainInvocation()) {
mergeMainInvocation(other.getMainInvocation());
}
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ if (!other.inlinedFunctionWrappers_.isEmpty()) {
+ if (inlinedFunctionWrappers_.isEmpty()) {
+ inlinedFunctionWrappers_ = other.inlinedFunctionWrappers_;
+ bitField0_ = (bitField0_ & ~0x00001000);
+ } else {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.addAll(other.inlinedFunctionWrappers_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.inlinedFunctionWrappers_.isEmpty()) {
+ if (inlinedFunctionWrappersBuilder_.isEmpty()) {
+ inlinedFunctionWrappersBuilder_.dispose();
+ inlinedFunctionWrappersBuilder_ = null;
+ inlinedFunctionWrappers_ = other.inlinedFunctionWrappers_;
+ bitField0_ = (bitField0_ & ~0x00001000);
+ inlinedFunctionWrappersBuilder_ =
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getInlinedFunctionWrappersFieldBuilder() : null;
+ } else {
+ inlinedFunctionWrappersBuilder_.addAllMessages(other.inlinedFunctionWrappers_);
+ }
+ }
+ }
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
@@ -42634,6 +42760,12 @@ public final class DebugJsAstProtoBuf {
return false;
}
}
+ for (int i = 0; i < getInlinedFunctionWrappersCount(); i++) {
+ if (!getInlinedFunctionWrappers(i).isInitialized()) {
+
+ return false;
+ }
+ }
return true;
}
@@ -44752,6 +44884,246 @@ public final class DebugJsAstProtoBuf {
return mainInvocationBuilder_;
}
+ private java.util.List inlinedFunctionWrappers_ =
+ java.util.Collections.emptyList();
+ private void ensureInlinedFunctionWrappersIsMutable() {
+ if (!((bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = new java.util.ArrayList(inlinedFunctionWrappers_);
+ bitField0_ |= 0x00001000;
+ }
+ }
+
+ private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder<
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder> inlinedFunctionWrappersBuilder_;
+
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List getInlinedFunctionWrappersList() {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(inlinedFunctionWrappers_);
+ } else {
+ return inlinedFunctionWrappersBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public int getInlinedFunctionWrappersCount() {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ return inlinedFunctionWrappers_.size();
+ } else {
+ return inlinedFunctionWrappersBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper getInlinedFunctionWrappers(int index) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ return inlinedFunctionWrappers_.get(index);
+ } else {
+ return inlinedFunctionWrappersBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder setInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper value) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.set(index, value);
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder setInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder builderForValue) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper value) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(value);
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper value) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(index, value);
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder builderForValue) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(builderForValue.build());
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder builderForValue) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addAllInlinedFunctionWrappers(
+ java.lang.Iterable extends org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper> values) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ ensureInlinedFunctionWrappersIsMutable();
+ org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
+ values, inlinedFunctionWrappers_);
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder clearInlinedFunctionWrappers() {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ inlinedFunctionWrappers_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00001000);
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder removeInlinedFunctionWrappers(int index) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.remove(index);
+ onChanged();
+ } else {
+ inlinedFunctionWrappersBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder getInlinedFunctionWrappersBuilder(
+ int index) {
+ return getInlinedFunctionWrappersFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder getInlinedFunctionWrappersOrBuilder(
+ int index) {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ return inlinedFunctionWrappers_.get(index); } else {
+ return inlinedFunctionWrappersBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List extends org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder>
+ getInlinedFunctionWrappersOrBuilderList() {
+ if (inlinedFunctionWrappersBuilder_ != null) {
+ return inlinedFunctionWrappersBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(inlinedFunctionWrappers_);
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder addInlinedFunctionWrappersBuilder() {
+ return getInlinedFunctionWrappersFieldBuilder().addBuilder(
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.getDefaultInstance());
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder addInlinedFunctionWrappersBuilder(
+ int index) {
+ return getInlinedFunctionWrappersFieldBuilder().addBuilder(
+ index, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.getDefaultInstance());
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List
+ getInlinedFunctionWrappersBuilderList() {
+ return getInlinedFunctionWrappersFieldBuilder().getBuilderList();
+ }
+ private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder<
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder>
+ getInlinedFunctionWrappersFieldBuilder() {
+ if (inlinedFunctionWrappersBuilder_ == null) {
+ inlinedFunctionWrappersBuilder_ = new org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder<
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder>(
+ inlinedFunctionWrappers_,
+ ((bitField0_ & 0x00001000) == 0x00001000),
+ getParentForChildren(),
+ isClean());
+ inlinedFunctionWrappers_ = null;
+ }
+ return inlinedFunctionWrappersBuilder_;
+ }
+
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.Fragment)
}
@@ -44763,6 +45135,695 @@ public final class DebugJsAstProtoBuf {
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.js.ast.Fragment)
}
+ public interface InlinedWrapperOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ org.jetbrains.kotlin.protobuf.MessageOrBuilder {
+
+ /**
+ * required string tag = 1;
+ */
+ boolean hasTag();
+ /**
+ * required string tag = 1;
+ */
+ java.lang.String getTag();
+ /**
+ * required string tag = 1;
+ */
+ org.jetbrains.kotlin.protobuf.ByteString
+ getTagBytes();
+
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ boolean hasBlock();
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock getBlock();
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlockOrBuilder getBlockOrBuilder();
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper}
+ */
+ public static final class InlinedWrapper extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ InlinedWrapperOrBuilder {
+ // Use InlinedWrapper.newBuilder() to construct.
+ private InlinedWrapper(org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private InlinedWrapper(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final InlinedWrapper defaultInstance;
+ public static InlinedWrapper getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public InlinedWrapper getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final org.jetbrains.kotlin.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final org.jetbrains.kotlin.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private InlinedWrapper(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ org.jetbrains.kotlin.protobuf.UnknownFieldSet.Builder unknownFields =
+ org.jetbrains.kotlin.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000001;
+ tag_ = bs;
+ break;
+ }
+ case 18: {
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ subBuilder = block_.toBuilder();
+ }
+ block_ = input.readMessage(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(block_);
+ block_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000002;
+ break;
+ }
+ }
+ }
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_descriptor;
+ }
+
+ protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.class, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder.class);
+ }
+
+ public static org.jetbrains.kotlin.protobuf.Parser PARSER =
+ new org.jetbrains.kotlin.protobuf.AbstractParser() {
+ public InlinedWrapper parsePartialFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return new InlinedWrapper(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public org.jetbrains.kotlin.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ public static final int TAG_FIELD_NUMBER = 1;
+ private java.lang.Object tag_;
+ /**
+ * required string tag = 1;
+ */
+ public boolean hasTag() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string tag = 1;
+ */
+ public java.lang.String getTag() {
+ java.lang.Object ref = tag_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ org.jetbrains.kotlin.protobuf.ByteString bs =
+ (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tag_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string tag = 1;
+ */
+ public org.jetbrains.kotlin.protobuf.ByteString
+ getTagBytes() {
+ java.lang.Object ref = tag_;
+ if (ref instanceof java.lang.String) {
+ org.jetbrains.kotlin.protobuf.ByteString b =
+ org.jetbrains.kotlin.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BLOCK_FIELD_NUMBER = 2;
+ private org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock block_;
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public boolean hasBlock() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock getBlock() {
+ return block_;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlockOrBuilder getBlockOrBuilder() {
+ return block_;
+ }
+
+ private void initFields() {
+ tag_ = "";
+ block_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.getDefaultInstance();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasTag()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasBlock()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getBlock().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, getTagBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeMessage(2, block_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeBytesSize(1, getTagBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(2, block_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ 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.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(byte[] data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(
+ byte[] data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseDelimitedFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.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.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper}
+ */
+ public static final class Builder extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapperOrBuilder {
+ public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_descriptor;
+ }
+
+ protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.class, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.Builder.class);
+ }
+
+ // Construct using org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getBlockFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ tag_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (blockBuilder_ == null) {
+ block_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.getDefaultInstance();
+ } else {
+ blockBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_descriptor;
+ }
+
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper getDefaultInstanceForType() {
+ return org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.getDefaultInstance();
+ }
+
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper build() {
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper buildPartial() {
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper result = new org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.tag_ = tag_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ if (blockBuilder_ == null) {
+ result.block_ = block_;
+ } else {
+ result.block_ = blockBuilder_.build();
+ }
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.protobuf.Message other) {
+ if (other instanceof org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper) {
+ return mergeFrom((org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper other) {
+ if (other == org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper.getDefaultInstance()) return this;
+ if (other.hasTag()) {
+ bitField0_ |= 0x00000001;
+ tag_ = other.tag_;
+ onChanged();
+ }
+ if (other.hasBlock()) {
+ mergeBlock(other.getBlock());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasTag()) {
+
+ return false;
+ }
+ if (!hasBlock()) {
+
+ return false;
+ }
+ if (!getBlock().isInitialized()) {
+
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.InlinedWrapper) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object tag_ = "";
+ /**
+ * required string tag = 1;
+ */
+ public boolean hasTag() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string tag = 1;
+ */
+ public java.lang.String getTag() {
+ java.lang.Object ref = tag_;
+ if (!(ref instanceof java.lang.String)) {
+ org.jetbrains.kotlin.protobuf.ByteString bs =
+ (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tag_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string tag = 1;
+ */
+ public org.jetbrains.kotlin.protobuf.ByteString
+ getTagBytes() {
+ java.lang.Object ref = tag_;
+ if (ref instanceof String) {
+ org.jetbrains.kotlin.protobuf.ByteString b =
+ org.jetbrains.kotlin.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string tag = 1;
+ */
+ public Builder setTag(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ tag_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string tag = 1;
+ */
+ public Builder clearTag() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ tag_ = getDefaultInstance().getTag();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string tag = 1;
+ */
+ public Builder setTagBytes(
+ org.jetbrains.kotlin.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ tag_ = value;
+ onChanged();
+ return this;
+ }
+
+ private org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock block_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.getDefaultInstance();
+ private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlockOrBuilder> blockBuilder_;
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public boolean hasBlock() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock getBlock() {
+ if (blockBuilder_ == null) {
+ return block_;
+ } else {
+ return blockBuilder_.getMessage();
+ }
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder setBlock(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock value) {
+ if (blockBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ block_ = value;
+ onChanged();
+ } else {
+ blockBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder setBlock(
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.Builder builderForValue) {
+ if (blockBuilder_ == null) {
+ block_ = builderForValue.build();
+ onChanged();
+ } else {
+ blockBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder mergeBlock(org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock value) {
+ if (blockBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002) &&
+ block_ != org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.getDefaultInstance()) {
+ block_ =
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.newBuilder(block_).mergeFrom(value).buildPartial();
+ } else {
+ block_ = value;
+ }
+ onChanged();
+ } else {
+ blockBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder clearBlock() {
+ if (blockBuilder_ == null) {
+ block_ = org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.getDefaultInstance();
+ onChanged();
+ } else {
+ blockBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.Builder getBlockBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getBlockFieldBuilder().getBuilder();
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlockOrBuilder getBlockOrBuilder() {
+ if (blockBuilder_ != null) {
+ return blockBuilder_.getMessageOrBuilder();
+ } else {
+ return block_;
+ }
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlockOrBuilder>
+ getBlockFieldBuilder() {
+ if (blockBuilder_ == null) {
+ blockBuilder_ = new org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlock.Builder, org.jetbrains.kotlin.serialization.js.ast.DebugJsAstProtoBuf.GlobalBlockOrBuilder>(
+ getBlock(),
+ getParentForChildren(),
+ isClean());
+ block_ = null;
+ }
+ return blockBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ }
+
+ static {
+ defaultInstance = new InlinedWrapper(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ }
+
public interface ImportedModuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.js.ast.ImportedModule)
org.jetbrains.kotlin.protobuf.MessageOrBuilder {
@@ -51459,6 +52520,11 @@ public final class DebugJsAstProtoBuf {
private static
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_org_jetbrains_kotlin_serialization_js_ast_Fragment_fieldAccessorTable;
+ private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_descriptor;
+ private static
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_fieldAccessorTable;
private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
internal_static_org_jetbrains_kotlin_serialization_js_ast_ImportedModule_descriptor;
private static
@@ -51762,7 +52828,7 @@ public final class DebugJsAstProtoBuf {
"r\030\001 \002(\01324.org.jetbrains.kotlin.serializa" +
"tion.js.ast.Parameter\022B\n\004body\030\002 \002(\01324.or" +
"g.jetbrains.kotlin.serialization.js.ast." +
- "Statement\"\007\n\005Empty\"\213\007\n\010Fragment\022R\n\017impor" +
+ "Statement\"\007\n\005Empty\"\351\007\n\010Fragment\022R\n\017impor" +
"ted_module\030\001 \003(\01329.org.jetbrains.kotlin." +
"serialization.js.ast.ImportedModule\022G\n\014i" +
"mport_entry\030\002 \003(\01321.org.jetbrains.kotlin" +
@@ -51785,44 +52851,48 @@ public final class DebugJsAstProtoBuf {
"g.jetbrains.kotlin.serialization.js.ast." +
"Statement\022M\n\017main_invocation\030\014 \001(\01324.org" +
".jetbrains.kotlin.serialization.js.ast.S" +
- "tatement\"\224\001\n\016ImportedModule\022\030\n\020external_" +
- "name_id\030\001 \002(\005\022\030\n\020internal_name_id\030\002 \002(\005\022" +
- "N\n\017plain_reference\030\003 \001(\01325.org.jetbrains",
- ".kotlin.serialization.js.ast.Expression\"" +
- "i\n\006Import\022\024\n\014signature_id\030\001 \002(\005\022I\n\nexpre" +
- "ssion\030\002 \002(\01325.org.jetbrains.kotlin.seria" +
- "lization.js.ast.Expression\"3\n\013NameBindin" +
- "g\022\024\n\014signature_id\030\001 \002(\005\022\016\n\006nameId\030\002 \002(\005\"" +
- "\247\001\n\nClassModel\022\017\n\007name_id\030\001 \002(\005\022\025\n\rsuper" +
- "_name_id\030\002 \001(\005\022\031\n\021interface_name_id\030\004 \003(" +
- "\005\022V\n\026post_declaration_block\030\003 \001(\01326.org." +
- "jetbrains.kotlin.serialization.js.ast.Gl" +
- "obalBlock\";\n\014InlineModule\022\024\n\014signature_i",
- "d\030\001 \002(\005\022\025\n\rexpression_id\030\002 \002(\005\"\034\n\013String" +
- "Table\022\r\n\005entry\030\001 \003(\t\"K\n\tNameTable\022>\n\005ent" +
- "ry\030\001 \003(\0132/.org.jetbrains.kotlin.serializ" +
- "ation.js.ast.Name\"\263\001\n\004Name\022\021\n\ttemporary\030" +
- "\001 \002(\010\022\022\n\nidentifier\030\002 \001(\005\022\025\n\rlocal_name_" +
- "id\030\003 \001(\005\022\027\n\010imported\030\004 \001(\010:\005false\022T\n\020spe" +
- "cial_function\030\005 \001(\0162:.org.jetbrains.kotl" +
- "in.serialization.js.ast.SpecialFunction\"" +
- "\346\001\n\005Chunk\022L\n\014string_table\030\001 \002(\01326.org.je" +
- "tbrains.kotlin.serialization.js.ast.Stri",
- "ngTable\022H\n\nname_table\030\002 \002(\01324.org.jetbra" +
- "ins.kotlin.serialization.js.ast.NameTabl" +
- "e\022E\n\010fragment\030\003 \002(\01323.org.jetbrains.kotl" +
- "in.serialization.js.ast.Fragment\"&\n\006Head" +
- "er\022\034\n\024inline_function_tags\030\001 \003(\t*@\n\013Side" +
- "Effects\022\021\n\rAFFECTS_STATE\020\001\022\024\n\020DEPENDS_ON" +
- "_STATE\020\002\022\010\n\004PURE\020\003*?\n\016InlineStrategy\022\017\n\013" +
- "AS_FUNCTION\020\000\022\014\n\010IN_PLACE\020\001\022\016\n\nNOT_INLIN" +
- "E\020\002*\327\001\n\017SpecialFunction\022\032\n\026DEFINE_INLINE" +
- "_FUNCTION\020\001\022\021\n\rWRAP_FUNCTION\020\002\022\021\n\rTO_BOX",
- "ED_CHAR\020\003\022\016\n\nUNBOX_CHAR\020\004\022\020\n\014SUSPEND_CAL" +
- "L\020\005\022\024\n\020COROUTINE_RESULT\020\006\022\030\n\024COROUTINE_C" +
- "ONTROLLER\020\007\022\026\n\022COROUTINE_RECEIVER\020\010\022\030\n\024S" +
- "ET_COROUTINE_RESULT\020\tB\024B\022DebugJsAstProto" +
- "Buf"
+ "tatement\022\\\n\031inlined_function_wrappers\030\r " +
+ "\003(\01329.org.jetbrains.kotlin.serialization" +
+ ".js.ast.InlinedWrapper\"d\n\016InlinedWrapper",
+ "\022\013\n\003tag\030\001 \002(\t\022E\n\005block\030\002 \002(\01326.org.jetbr" +
+ "ains.kotlin.serialization.js.ast.GlobalB" +
+ "lock\"\224\001\n\016ImportedModule\022\030\n\020external_name" +
+ "_id\030\001 \002(\005\022\030\n\020internal_name_id\030\002 \002(\005\022N\n\017p" +
+ "lain_reference\030\003 \001(\01325.org.jetbrains.kot" +
+ "lin.serialization.js.ast.Expression\"i\n\006I" +
+ "mport\022\024\n\014signature_id\030\001 \002(\005\022I\n\nexpressio" +
+ "n\030\002 \002(\01325.org.jetbrains.kotlin.serializa" +
+ "tion.js.ast.Expression\"3\n\013NameBinding\022\024\n" +
+ "\014signature_id\030\001 \002(\005\022\016\n\006nameId\030\002 \002(\005\"\247\001\n\n",
+ "ClassModel\022\017\n\007name_id\030\001 \002(\005\022\025\n\rsuper_nam" +
+ "e_id\030\002 \001(\005\022\031\n\021interface_name_id\030\004 \003(\005\022V\n" +
+ "\026post_declaration_block\030\003 \001(\01326.org.jetb" +
+ "rains.kotlin.serialization.js.ast.Global" +
+ "Block\";\n\014InlineModule\022\024\n\014signature_id\030\001 " +
+ "\002(\005\022\025\n\rexpression_id\030\002 \002(\005\"\034\n\013StringTabl" +
+ "e\022\r\n\005entry\030\001 \003(\t\"K\n\tNameTable\022>\n\005entry\030\001" +
+ " \003(\0132/.org.jetbrains.kotlin.serializatio" +
+ "n.js.ast.Name\"\263\001\n\004Name\022\021\n\ttemporary\030\001 \002(" +
+ "\010\022\022\n\nidentifier\030\002 \001(\005\022\025\n\rlocal_name_id\030\003",
+ " \001(\005\022\027\n\010imported\030\004 \001(\010:\005false\022T\n\020special" +
+ "_function\030\005 \001(\0162:.org.jetbrains.kotlin.s" +
+ "erialization.js.ast.SpecialFunction\"\346\001\n\005" +
+ "Chunk\022L\n\014string_table\030\001 \002(\01326.org.jetbra" +
+ "ins.kotlin.serialization.js.ast.StringTa" +
+ "ble\022H\n\nname_table\030\002 \002(\01324.org.jetbrains." +
+ "kotlin.serialization.js.ast.NameTable\022E\n" +
+ "\010fragment\030\003 \002(\01323.org.jetbrains.kotlin.s" +
+ "erialization.js.ast.Fragment\"&\n\006Header\022\034" +
+ "\n\024inline_function_tags\030\001 \003(\t*@\n\013SideEffe",
+ "cts\022\021\n\rAFFECTS_STATE\020\001\022\024\n\020DEPENDS_ON_STA" +
+ "TE\020\002\022\010\n\004PURE\020\003*?\n\016InlineStrategy\022\017\n\013AS_F" +
+ "UNCTION\020\000\022\014\n\010IN_PLACE\020\001\022\016\n\nNOT_INLINE\020\002*" +
+ "\327\001\n\017SpecialFunction\022\032\n\026DEFINE_INLINE_FUN" +
+ "CTION\020\001\022\021\n\rWRAP_FUNCTION\020\002\022\021\n\rTO_BOXED_C" +
+ "HAR\020\003\022\016\n\nUNBOX_CHAR\020\004\022\020\n\014SUSPEND_CALL\020\005\022" +
+ "\024\n\020COROUTINE_RESULT\020\006\022\030\n\024COROUTINE_CONTR" +
+ "OLLER\020\007\022\026\n\022COROUTINE_RECEIVER\020\010\022\030\n\024SET_C" +
+ "OROUTINE_RESULT\020\tB\024B\022DebugJsAstProtoBuf"
};
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -52117,63 +53187,69 @@ public final class DebugJsAstProtoBuf {
internal_static_org_jetbrains_kotlin_serialization_js_ast_Fragment_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_Fragment_descriptor,
- new java.lang.String[] { "ImportedModule", "ImportEntry", "DeclarationBlock", "ExportBlock", "InitializerBlock", "NameBinding", "ClassModel", "ModuleExpression", "InlineModule", "PackageFqn", "TestsInvocation", "MainInvocation", });
- internal_static_org_jetbrains_kotlin_serialization_js_ast_ImportedModule_descriptor =
+ new java.lang.String[] { "ImportedModule", "ImportEntry", "DeclarationBlock", "ExportBlock", "InitializerBlock", "NameBinding", "ClassModel", "ModuleExpression", "InlineModule", "PackageFqn", "TestsInvocation", "MainInvocation", "InlinedFunctionWrappers", });
+ internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_descriptor =
getDescriptor().getMessageTypes().get(47);
+ internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_fieldAccessorTable = new
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_jetbrains_kotlin_serialization_js_ast_InlinedWrapper_descriptor,
+ new java.lang.String[] { "Tag", "Block", });
+ internal_static_org_jetbrains_kotlin_serialization_js_ast_ImportedModule_descriptor =
+ getDescriptor().getMessageTypes().get(48);
internal_static_org_jetbrains_kotlin_serialization_js_ast_ImportedModule_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_ImportedModule_descriptor,
new java.lang.String[] { "ExternalNameId", "InternalNameId", "PlainReference", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_Import_descriptor =
- getDescriptor().getMessageTypes().get(48);
+ getDescriptor().getMessageTypes().get(49);
internal_static_org_jetbrains_kotlin_serialization_js_ast_Import_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_Import_descriptor,
new java.lang.String[] { "SignatureId", "Expression", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_NameBinding_descriptor =
- getDescriptor().getMessageTypes().get(49);
+ getDescriptor().getMessageTypes().get(50);
internal_static_org_jetbrains_kotlin_serialization_js_ast_NameBinding_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_NameBinding_descriptor,
new java.lang.String[] { "SignatureId", "NameId", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_ClassModel_descriptor =
- getDescriptor().getMessageTypes().get(50);
+ getDescriptor().getMessageTypes().get(51);
internal_static_org_jetbrains_kotlin_serialization_js_ast_ClassModel_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_ClassModel_descriptor,
new java.lang.String[] { "NameId", "SuperNameId", "InterfaceNameId", "PostDeclarationBlock", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_InlineModule_descriptor =
- getDescriptor().getMessageTypes().get(51);
+ getDescriptor().getMessageTypes().get(52);
internal_static_org_jetbrains_kotlin_serialization_js_ast_InlineModule_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_InlineModule_descriptor,
new java.lang.String[] { "SignatureId", "ExpressionId", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_StringTable_descriptor =
- getDescriptor().getMessageTypes().get(52);
+ getDescriptor().getMessageTypes().get(53);
internal_static_org_jetbrains_kotlin_serialization_js_ast_StringTable_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_StringTable_descriptor,
new java.lang.String[] { "Entry", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_NameTable_descriptor =
- getDescriptor().getMessageTypes().get(53);
+ getDescriptor().getMessageTypes().get(54);
internal_static_org_jetbrains_kotlin_serialization_js_ast_NameTable_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_NameTable_descriptor,
new java.lang.String[] { "Entry", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_Name_descriptor =
- getDescriptor().getMessageTypes().get(54);
+ getDescriptor().getMessageTypes().get(55);
internal_static_org_jetbrains_kotlin_serialization_js_ast_Name_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_Name_descriptor,
new java.lang.String[] { "Temporary", "Identifier", "LocalNameId", "Imported", "SpecialFunction", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_Chunk_descriptor =
- getDescriptor().getMessageTypes().get(55);
+ getDescriptor().getMessageTypes().get(56);
internal_static_org_jetbrains_kotlin_serialization_js_ast_Chunk_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_Chunk_descriptor,
new java.lang.String[] { "StringTable", "NameTable", "Fragment", });
internal_static_org_jetbrains_kotlin_serialization_js_ast_Header_descriptor =
- getDescriptor().getMessageTypes().get(56);
+ getDescriptor().getMessageTypes().get(57);
internal_static_org_jetbrains_kotlin_serialization_js_ast_Header_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_js_ast_Header_descriptor,
diff --git a/js/js.ast/src/org/jetbrains/kotlin/js/backend/ast/JsProgramFragment.kt b/js/js.ast/src/org/jetbrains/kotlin/js/backend/ast/JsProgramFragment.kt
index b1113891991..5ec29a3c48b 100644
--- a/js/js.ast/src/org/jetbrains/kotlin/js/backend/ast/JsProgramFragment.kt
+++ b/js/js.ast/src/org/jetbrains/kotlin/js/backend/ast/JsProgramFragment.kt
@@ -17,6 +17,5 @@ class JsProgramFragment(val scope: JsScope, val packageFqn: String) {
val inlineModuleMap: MutableMap = LinkedHashMap()
var tests: JsStatement? = null
var mainFunction: JsStatement? = null
- // TODO serialize/deserialize; teach Merger about this thing
val inlinedFunctionWrappers = mutableMapOf()
}
diff --git a/js/js.serializer/src/js-ast.proto b/js/js.serializer/src/js-ast.proto
index 07ae8e2d02e..7fc501d2f5e 100644
--- a/js/js.serializer/src/js-ast.proto
+++ b/js/js.serializer/src/js-ast.proto
@@ -394,6 +394,12 @@ message Fragment {
optional string package_fqn = 10;
optional Statement tests_invocation = 11;
optional Statement main_invocation = 12;
+ repeated InlinedWrapper inlined_function_wrappers = 13;
+}
+
+message InlinedWrapper {
+ required string tag = 1;
+ required GlobalBlock block = 2;
}
message ImportedModule {
diff --git a/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstDeserializer.kt b/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstDeserializer.kt
index 11ad15f6f91..9415af65ffc 100644
--- a/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstDeserializer.kt
+++ b/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstDeserializer.kt
@@ -106,6 +106,10 @@ class JsAstDeserializer(program: JsProgram, private val sourceRoots: Iterableoptional .org.jetbrains.kotlin.serialization.js.ast.Statement main_invocation = 12;
*/
org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Statement getMainInvocation();
+
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ java.util.List
+ getInlinedFunctionWrappersList();
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper getInlinedFunctionWrappers(int index);
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ int getInlinedFunctionWrappersCount();
}
/**
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.Fragment}
@@ -30622,6 +30636,14 @@ public final class JsAstProtoBuf {
bitField0_ |= 0x00000020;
break;
}
+ case 106: {
+ if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00001000;
+ }
+ inlinedFunctionWrappers_.add(input.readMessage(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper.PARSER, extensionRegistry));
+ break;
+ }
}
}
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
@@ -30648,6 +30670,9 @@ public final class JsAstProtoBuf {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
inlineModule_ = java.util.Collections.unmodifiableList(inlineModule_);
}
+ if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = java.util.Collections.unmodifiableList(inlinedFunctionWrappers_);
+ }
try {
unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) {
@@ -31001,6 +31026,41 @@ public final class JsAstProtoBuf {
return mainInvocation_;
}
+ public static final int INLINED_FUNCTION_WRAPPERS_FIELD_NUMBER = 13;
+ private java.util.List inlinedFunctionWrappers_;
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List getInlinedFunctionWrappersList() {
+ return inlinedFunctionWrappers_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List extends org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapperOrBuilder>
+ getInlinedFunctionWrappersOrBuilderList() {
+ return inlinedFunctionWrappers_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public int getInlinedFunctionWrappersCount() {
+ return inlinedFunctionWrappers_.size();
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper getInlinedFunctionWrappers(int index) {
+ return inlinedFunctionWrappers_.get(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapperOrBuilder getInlinedFunctionWrappersOrBuilder(
+ int index) {
+ return inlinedFunctionWrappers_.get(index);
+ }
+
private void initFields() {
importedModule_ = java.util.Collections.emptyList();
importEntry_ = java.util.Collections.emptyList();
@@ -31014,6 +31074,7 @@ public final class JsAstProtoBuf {
packageFqn_ = "";
testsInvocation_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Statement.getDefaultInstance();
mainInvocation_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Statement.getDefaultInstance();
+ inlinedFunctionWrappers_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@@ -31087,6 +31148,12 @@ public final class JsAstProtoBuf {
return false;
}
}
+ for (int i = 0; i < getInlinedFunctionWrappersCount(); i++) {
+ if (!getInlinedFunctionWrappers(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
memoizedIsInitialized = 1;
return true;
}
@@ -31130,6 +31197,9 @@ public final class JsAstProtoBuf {
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeMessage(12, mainInvocation_);
}
+ for (int i = 0; i < inlinedFunctionWrappers_.size(); i++) {
+ output.writeMessage(13, inlinedFunctionWrappers_.get(i));
+ }
output.writeRawBytes(unknownFields);
}
@@ -31187,6 +31257,10 @@ public final class JsAstProtoBuf {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(12, mainInvocation_);
}
+ for (int i = 0; i < inlinedFunctionWrappers_.size(); i++) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(13, inlinedFunctionWrappers_.get(i));
+ }
size += unknownFields.size();
memoizedSerializedSize = size;
return size;
@@ -31305,6 +31379,8 @@ public final class JsAstProtoBuf {
bitField0_ = (bitField0_ & ~0x00000400);
mainInvocation_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.Statement.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00000800);
+ inlinedFunctionWrappers_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00001000);
return this;
}
@@ -31382,6 +31458,11 @@ public final class JsAstProtoBuf {
to_bitField0_ |= 0x00000020;
}
result.mainInvocation_ = mainInvocation_;
+ if (((bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = java.util.Collections.unmodifiableList(inlinedFunctionWrappers_);
+ bitField0_ = (bitField0_ & ~0x00001000);
+ }
+ result.inlinedFunctionWrappers_ = inlinedFunctionWrappers_;
result.bitField0_ = to_bitField0_;
return result;
}
@@ -31468,6 +31549,16 @@ public final class JsAstProtoBuf {
if (other.hasMainInvocation()) {
mergeMainInvocation(other.getMainInvocation());
}
+ if (!other.inlinedFunctionWrappers_.isEmpty()) {
+ if (inlinedFunctionWrappers_.isEmpty()) {
+ inlinedFunctionWrappers_ = other.inlinedFunctionWrappers_;
+ bitField0_ = (bitField0_ & ~0x00001000);
+ } else {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.addAll(other.inlinedFunctionWrappers_);
+ }
+
+ }
setUnknownFields(
getUnknownFields().concat(other.unknownFields));
return this;
@@ -31540,6 +31631,12 @@ public final class JsAstProtoBuf {
return false;
}
}
+ for (int i = 0; i < getInlinedFunctionWrappersCount(); i++) {
+ if (!getInlinedFunctionWrappers(i).isInitialized()) {
+
+ return false;
+ }
+ }
return true;
}
@@ -32688,6 +32785,131 @@ public final class JsAstProtoBuf {
return this;
}
+ private java.util.List inlinedFunctionWrappers_ =
+ java.util.Collections.emptyList();
+ private void ensureInlinedFunctionWrappersIsMutable() {
+ if (!((bitField0_ & 0x00001000) == 0x00001000)) {
+ inlinedFunctionWrappers_ = new java.util.ArrayList(inlinedFunctionWrappers_);
+ bitField0_ |= 0x00001000;
+ }
+ }
+
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public java.util.List getInlinedFunctionWrappersList() {
+ return java.util.Collections.unmodifiableList(inlinedFunctionWrappers_);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public int getInlinedFunctionWrappersCount() {
+ return inlinedFunctionWrappers_.size();
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper getInlinedFunctionWrappers(int index) {
+ return inlinedFunctionWrappers_.get(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder setInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.set(index, value);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder setInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper.Builder builderForValue) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.set(index, builderForValue.build());
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(value);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(index, value);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper.Builder builderForValue) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(builderForValue.build());
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addInlinedFunctionWrappers(
+ int index, org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper.Builder builderForValue) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.add(index, builderForValue.build());
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder addAllInlinedFunctionWrappers(
+ java.lang.Iterable extends org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper> values) {
+ ensureInlinedFunctionWrappersIsMutable();
+ org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
+ values, inlinedFunctionWrappers_);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder clearInlinedFunctionWrappers() {
+ inlinedFunctionWrappers_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00001000);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper inlined_function_wrappers = 13;
+ */
+ public Builder removeInlinedFunctionWrappers(int index) {
+ ensureInlinedFunctionWrappersIsMutable();
+ inlinedFunctionWrappers_.remove(index);
+
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.Fragment)
}
@@ -32699,6 +32921,575 @@ public final class JsAstProtoBuf {
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.js.ast.Fragment)
}
+ public interface InlinedWrapperOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
+
+ /**
+ * required string tag = 1;
+ */
+ boolean hasTag();
+ /**
+ * required string tag = 1;
+ */
+ java.lang.String getTag();
+ /**
+ * required string tag = 1;
+ */
+ org.jetbrains.kotlin.protobuf.ByteString
+ getTagBytes();
+
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ boolean hasBlock();
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock getBlock();
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper}
+ */
+ public static final class InlinedWrapper extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
+ // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ InlinedWrapperOrBuilder {
+ // Use InlinedWrapper.newBuilder() to construct.
+ private InlinedWrapper(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private InlinedWrapper(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
+
+ private static final InlinedWrapper defaultInstance;
+ public static InlinedWrapper getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public InlinedWrapper getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
+ private InlinedWrapper(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
+ org.jetbrains.kotlin.protobuf.ByteString.newOutput();
+ org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+ org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
+ unknownFieldsOutput, 1);
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFieldsCodedOutput,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000001;
+ tag_ = bs;
+ break;
+ }
+ case 18: {
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ subBuilder = block_.toBuilder();
+ }
+ block_ = input.readMessage(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(block_);
+ block_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000002;
+ break;
+ }
+ }
+ }
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ try {
+ unknownFieldsCodedOutput.flush();
+ } catch (java.io.IOException e) {
+ // Should not happen
+ } finally {
+ unknownFields = unknownFieldsOutput.toByteString();
+ }
+ makeExtensionsImmutable();
+ }
+ }
+ public static org.jetbrains.kotlin.protobuf.Parser PARSER =
+ new org.jetbrains.kotlin.protobuf.AbstractParser() {
+ public InlinedWrapper parsePartialFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return new InlinedWrapper(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public org.jetbrains.kotlin.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ public static final int TAG_FIELD_NUMBER = 1;
+ private java.lang.Object tag_;
+ /**
+ * required string tag = 1;
+ */
+ public boolean hasTag() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string tag = 1;
+ */
+ public java.lang.String getTag() {
+ java.lang.Object ref = tag_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ org.jetbrains.kotlin.protobuf.ByteString bs =
+ (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tag_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string tag = 1;
+ */
+ public org.jetbrains.kotlin.protobuf.ByteString
+ getTagBytes() {
+ java.lang.Object ref = tag_;
+ if (ref instanceof java.lang.String) {
+ org.jetbrains.kotlin.protobuf.ByteString b =
+ org.jetbrains.kotlin.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BLOCK_FIELD_NUMBER = 2;
+ private org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock block_;
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public boolean hasBlock() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock getBlock() {
+ return block_;
+ }
+
+ private void initFields() {
+ tag_ = "";
+ block_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.getDefaultInstance();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasTag()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasBlock()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!getBlock().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, getTagBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeMessage(2, block_);
+ }
+ output.writeRawBytes(unknownFields);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeBytesSize(1, getTagBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(2, block_);
+ }
+ size += unknownFields.size();
+ 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.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(byte[] data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(
+ byte[] data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseDelimitedFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.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.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper}
+ */
+ public static final class Builder extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper, Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapperOrBuilder {
+ // Construct using org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ tag_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ block_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.getDefaultInstance();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper getDefaultInstanceForType() {
+ return org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper.getDefaultInstance();
+ }
+
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper build() {
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper buildPartial() {
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper result = new org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.tag_ = tag_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.block_ = block_;
+ result.bitField0_ = to_bitField0_;
+ return result;
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper other) {
+ if (other == org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper.getDefaultInstance()) return this;
+ if (other.hasTag()) {
+ bitField0_ |= 0x00000001;
+ tag_ = other.tag_;
+
+ }
+ if (other.hasBlock()) {
+ mergeBlock(other.getBlock());
+ }
+ setUnknownFields(
+ getUnknownFields().concat(other.unknownFields));
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasTag()) {
+
+ return false;
+ }
+ if (!hasBlock()) {
+
+ return false;
+ }
+ if (!getBlock().isInitialized()) {
+
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.InlinedWrapper) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object tag_ = "";
+ /**
+ * required string tag = 1;
+ */
+ public boolean hasTag() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string tag = 1;
+ */
+ public java.lang.String getTag() {
+ java.lang.Object ref = tag_;
+ if (!(ref instanceof java.lang.String)) {
+ org.jetbrains.kotlin.protobuf.ByteString bs =
+ (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tag_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string tag = 1;
+ */
+ public org.jetbrains.kotlin.protobuf.ByteString
+ getTagBytes() {
+ java.lang.Object ref = tag_;
+ if (ref instanceof String) {
+ org.jetbrains.kotlin.protobuf.ByteString b =
+ org.jetbrains.kotlin.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ tag_ = b;
+ return b;
+ } else {
+ return (org.jetbrains.kotlin.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string tag = 1;
+ */
+ public Builder setTag(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ tag_ = value;
+
+ return this;
+ }
+ /**
+ * required string tag = 1;
+ */
+ public Builder clearTag() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ tag_ = getDefaultInstance().getTag();
+
+ return this;
+ }
+ /**
+ * required string tag = 1;
+ */
+ public Builder setTagBytes(
+ org.jetbrains.kotlin.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ tag_ = value;
+
+ return this;
+ }
+
+ private org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock block_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.getDefaultInstance();
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public boolean hasBlock() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock getBlock() {
+ return block_;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder setBlock(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ block_ = value;
+
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder setBlock(
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.Builder builderForValue) {
+ block_ = builderForValue.build();
+
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder mergeBlock(org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock value) {
+ if (((bitField0_ & 0x00000002) == 0x00000002) &&
+ block_ != org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.getDefaultInstance()) {
+ block_ =
+ org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.newBuilder(block_).mergeFrom(value).buildPartial();
+ } else {
+ block_ = value;
+ }
+
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * required .org.jetbrains.kotlin.serialization.js.ast.GlobalBlock block = 2;
+ */
+ public Builder clearBlock() {
+ block_ = org.jetbrains.kotlin.serialization.js.ast.JsAstProtoBuf.GlobalBlock.getDefaultInstance();
+
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ }
+
+ static {
+ defaultInstance = new InlinedWrapper(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.js.ast.InlinedWrapper)
+ }
+
public interface ImportedModuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.js.ast.ImportedModule)
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
diff --git a/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstSerializer.kt b/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstSerializer.kt
index 7fd1d457867..364a5d721e4 100644
--- a/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstSerializer.kt
+++ b/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/ast/JsAstSerializer.kt
@@ -113,6 +113,15 @@ class JsAstSerializer(private val pathResolver: (File) -> String) {
fragmentBuilder.setMainInvocation(serialize(it))
}
+ fragment.inlinedFunctionWrappers.forEach {(tag, block) ->
+ val builder = InlinedWrapper.newBuilder().apply {
+ setTag(tag)
+ setBlock(serializeBlock(block))
+ }
+
+ fragmentBuilder.addInlinedFunctionWrappers(builder.build())
+ }
+
return fragmentBuilder.build()
}
diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/Merger.kt b/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/Merger.kt
index 33fdd7baa0d..e5dc6508e76 100644
--- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/Merger.kt
+++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/Merger.kt
@@ -177,6 +177,7 @@ class Merger(
fragment.tests?.let { rename(it) }
fragment.mainFunction?.let { rename(it) }
+ fragment.inlinedFunctionWrappers.values.forEach { rename(it) }
}
private fun Map.rename(rootNode: T): T {
@@ -210,6 +211,8 @@ class Merger(
return rootNode
}
+ private val importedFunctionWrappers = mutableMapOf()
+
private fun mergeNames() {
for (fragment in fragments) {
val nameMap = buildNameMap(fragment)
@@ -228,6 +231,10 @@ class Merger(
fragment.tryUpdateMain()
addExportStatements(fragment)
+ fragment.inlinedFunctionWrappers.forEach { (tag, imports) ->
+ importedFunctionWrappers.putIfAbsent(tag, imports)
+ }
+
classes += fragment.classes
}
}
@@ -240,6 +247,12 @@ class Merger(
addImportForInlineDeclarationIfNecessary()
this += importBlock.statements
addClassPrototypes(this)
+
+ // TODO better placing?
+ importedFunctionWrappers.values.forEach {
+ this += it.statements
+ }
+
this += declarationBlock.statements
this += exportBlock.statements
addClassPostDeclarations(this)