Fix incremental compilation to JS with new inliner
This commit is contained in:
+91
-13
@@ -46984,6 +46984,15 @@ public final class DebugJsAstProtoBuf {
|
|||||||
* <code>optional int32 identifier = 2;</code>
|
* <code>optional int32 identifier = 2;</code>
|
||||||
*/
|
*/
|
||||||
int getIdentifier();
|
int getIdentifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
boolean hasLocalNameId();
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
int getLocalNameId();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.Name}
|
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.Name}
|
||||||
@@ -47047,6 +47056,11 @@ public final class DebugJsAstProtoBuf {
|
|||||||
identifier_ = input.readInt32();
|
identifier_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 24: {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
localNameId_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -47117,9 +47131,25 @@ public final class DebugJsAstProtoBuf {
|
|||||||
return identifier_;
|
return identifier_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int LOCAL_NAME_ID_FIELD_NUMBER = 3;
|
||||||
|
private int localNameId_;
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasLocalNameId() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public int getLocalNameId() {
|
||||||
|
return localNameId_;
|
||||||
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
temporary_ = false;
|
temporary_ = false;
|
||||||
identifier_ = 0;
|
identifier_ = 0;
|
||||||
|
localNameId_ = 0;
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -47144,6 +47174,9 @@ public final class DebugJsAstProtoBuf {
|
|||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
output.writeInt32(2, identifier_);
|
output.writeInt32(2, identifier_);
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
output.writeInt32(3, localNameId_);
|
||||||
|
}
|
||||||
getUnknownFields().writeTo(output);
|
getUnknownFields().writeTo(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47161,6 +47194,10 @@ public final class DebugJsAstProtoBuf {
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(2, identifier_);
|
.computeInt32Size(2, identifier_);
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(3, localNameId_);
|
||||||
|
}
|
||||||
size += getUnknownFields().getSerializedSize();
|
size += getUnknownFields().getSerializedSize();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -47282,6 +47319,8 @@ public final class DebugJsAstProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
identifier_ = 0;
|
identifier_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
localNameId_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47318,6 +47357,10 @@ public final class DebugJsAstProtoBuf {
|
|||||||
to_bitField0_ |= 0x00000002;
|
to_bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
result.identifier_ = identifier_;
|
result.identifier_ = identifier_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.localNameId_ = localNameId_;
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
onBuilt();
|
onBuilt();
|
||||||
return result;
|
return result;
|
||||||
@@ -47340,6 +47383,9 @@ public final class DebugJsAstProtoBuf {
|
|||||||
if (other.hasIdentifier()) {
|
if (other.hasIdentifier()) {
|
||||||
setIdentifier(other.getIdentifier());
|
setIdentifier(other.getIdentifier());
|
||||||
}
|
}
|
||||||
|
if (other.hasLocalNameId()) {
|
||||||
|
setLocalNameId(other.getLocalNameId());
|
||||||
|
}
|
||||||
this.mergeUnknownFields(other.getUnknownFields());
|
this.mergeUnknownFields(other.getUnknownFields());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -47435,6 +47481,38 @@ public final class DebugJsAstProtoBuf {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int localNameId_ ;
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasLocalNameId() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public int getLocalNameId() {
|
||||||
|
return localNameId_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public Builder setLocalNameId(int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
localNameId_ = value;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearLocalNameId() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
localNameId_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.Name)
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48926,18 +49004,18 @@ public final class DebugJsAstProtoBuf {
|
|||||||
" \002(\005\022\025\n\rexpression_id\030\002 \002(\005\"\034\n\013StringTab" +
|
" \002(\005\022\025\n\rexpression_id\030\002 \002(\005\"\034\n\013StringTab" +
|
||||||
"le\022\r\n\005entry\030\001 \003(\t\"K\n\tNameTable\022>\n\005entry\030" +
|
"le\022\r\n\005entry\030\001 \003(\t\"K\n\tNameTable\022>\n\005entry\030" +
|
||||||
"\001 \003(\0132/.org.jetbrains.kotlin.serializati",
|
"\001 \003(\0132/.org.jetbrains.kotlin.serializati",
|
||||||
"on.js.ast.Name\"-\n\004Name\022\021\n\ttemporary\030\001 \002(" +
|
"on.js.ast.Name\"D\n\004Name\022\021\n\ttemporary\030\001 \002(" +
|
||||||
"\010\022\022\n\nidentifier\030\002 \001(\005\"\346\001\n\005Chunk\022L\n\014strin" +
|
"\010\022\022\n\nidentifier\030\002 \001(\005\022\025\n\rlocal_name_id\030\003" +
|
||||||
"g_table\030\001 \002(\01326.org.jetbrains.kotlin.ser" +
|
" \001(\005\"\346\001\n\005Chunk\022L\n\014string_table\030\001 \002(\01326.o" +
|
||||||
"ialization.js.ast.StringTable\022H\n\nname_ta" +
|
"rg.jetbrains.kotlin.serialization.js.ast" +
|
||||||
"ble\030\002 \002(\01324.org.jetbrains.kotlin.seriali" +
|
".StringTable\022H\n\nname_table\030\002 \002(\01324.org.j" +
|
||||||
"zation.js.ast.NameTable\022E\n\010fragment\030\003 \002(" +
|
"etbrains.kotlin.serialization.js.ast.Nam" +
|
||||||
"\01323.org.jetbrains.kotlin.serialization.j" +
|
"eTable\022E\n\010fragment\030\003 \002(\01323.org.jetbrains" +
|
||||||
"s.ast.Fragment*@\n\013SideEffects\022\021\n\rAFFECTS" +
|
".kotlin.serialization.js.ast.Fragment*@\n" +
|
||||||
"_STATE\020\001\022\024\n\020DEPENDS_ON_STATE\020\002\022\010\n\004PURE\020\003" +
|
"\013SideEffects\022\021\n\rAFFECTS_STATE\020\001\022\024\n\020DEPEN" +
|
||||||
"*?\n\016InlineStrategy\022\017\n\013AS_FUNCTION\020\000\022\014\n\010I",
|
"DS_ON_STATE\020\002\022\010\n\004PURE\020\003*?\n\016InlineStrateg",
|
||||||
"N_PLACE\020\001\022\016\n\nNOT_INLINE\020\002B\024B\022DebugJsAstP" +
|
"y\022\017\n\013AS_FUNCTION\020\000\022\014\n\010IN_PLACE\020\001\022\016\n\nNOT_" +
|
||||||
"rotoBuf"
|
"INLINE\020\002B\024B\022DebugJsAstProtoBuf"
|
||||||
};
|
};
|
||||||
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||||
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||||
@@ -49274,7 +49352,7 @@ public final class DebugJsAstProtoBuf {
|
|||||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_Name_fieldAccessorTable = new
|
internal_static_org_jetbrains_kotlin_serialization_js_ast_Name_fieldAccessorTable = new
|
||||||
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
|
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_Name_descriptor,
|
internal_static_org_jetbrains_kotlin_serialization_js_ast_Name_descriptor,
|
||||||
new java.lang.String[] { "Temporary", "Identifier", });
|
new java.lang.String[] { "Temporary", "Identifier", "LocalNameId", });
|
||||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_Chunk_descriptor =
|
internal_static_org_jetbrains_kotlin_serialization_js_ast_Chunk_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(54);
|
getDescriptor().getMessageTypes().get(54);
|
||||||
internal_static_org_jetbrains_kotlin_serialization_js_ast_Chunk_fieldAccessorTable = new
|
internal_static_org_jetbrains_kotlin_serialization_js_ast_Chunk_fieldAccessorTable = new
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ message NameTable {
|
|||||||
message Name {
|
message Name {
|
||||||
required bool temporary = 1;
|
required bool temporary = 1;
|
||||||
optional int32 identifier = 2;
|
optional int32 identifier = 2;
|
||||||
|
optional int32 local_name_id = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -432,6 +432,9 @@ class JsAstDeserializer(program: JsProgram, private val sourceRoots: Iterable<Fi
|
|||||||
else {
|
else {
|
||||||
JsDynamicScope.declareName(identifier)
|
JsDynamicScope.declareName(identifier)
|
||||||
}
|
}
|
||||||
|
if (nameProto.hasLocalNameId()) {
|
||||||
|
name.localAlias = deserializeName(nameProto.localNameId)
|
||||||
|
}
|
||||||
nameCache[id] = name
|
nameCache[id] = name
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34676,6 +34676,15 @@ public final class JsAstProtoBuf {
|
|||||||
* <code>optional int32 identifier = 2;</code>
|
* <code>optional int32 identifier = 2;</code>
|
||||||
*/
|
*/
|
||||||
int getIdentifier();
|
int getIdentifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
boolean hasLocalNameId();
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
int getLocalNameId();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.Name}
|
* Protobuf type {@code org.jetbrains.kotlin.serialization.js.ast.Name}
|
||||||
@@ -34737,6 +34746,11 @@ public final class JsAstProtoBuf {
|
|||||||
identifier_ = input.readInt32();
|
identifier_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 24: {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
localNameId_ = input.readInt32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -34801,9 +34815,25 @@ public final class JsAstProtoBuf {
|
|||||||
return identifier_;
|
return identifier_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int LOCAL_NAME_ID_FIELD_NUMBER = 3;
|
||||||
|
private int localNameId_;
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasLocalNameId() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public int getLocalNameId() {
|
||||||
|
return localNameId_;
|
||||||
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
temporary_ = false;
|
temporary_ = false;
|
||||||
identifier_ = 0;
|
identifier_ = 0;
|
||||||
|
localNameId_ = 0;
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -34828,6 +34858,9 @@ public final class JsAstProtoBuf {
|
|||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
output.writeInt32(2, identifier_);
|
output.writeInt32(2, identifier_);
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
output.writeInt32(3, localNameId_);
|
||||||
|
}
|
||||||
output.writeRawBytes(unknownFields);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34845,6 +34878,10 @@ public final class JsAstProtoBuf {
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(2, identifier_);
|
.computeInt32Size(2, identifier_);
|
||||||
}
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(3, localNameId_);
|
||||||
|
}
|
||||||
size += unknownFields.size();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -34943,6 +34980,8 @@ public final class JsAstProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
identifier_ = 0;
|
identifier_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
localNameId_ = 0;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34974,6 +35013,10 @@ public final class JsAstProtoBuf {
|
|||||||
to_bitField0_ |= 0x00000002;
|
to_bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
result.identifier_ = identifier_;
|
result.identifier_ = identifier_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.localNameId_ = localNameId_;
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -34986,6 +35029,9 @@ public final class JsAstProtoBuf {
|
|||||||
if (other.hasIdentifier()) {
|
if (other.hasIdentifier()) {
|
||||||
setIdentifier(other.getIdentifier());
|
setIdentifier(other.getIdentifier());
|
||||||
}
|
}
|
||||||
|
if (other.hasLocalNameId()) {
|
||||||
|
setLocalNameId(other.getLocalNameId());
|
||||||
|
}
|
||||||
setUnknownFields(
|
setUnknownFields(
|
||||||
getUnknownFields().concat(other.unknownFields));
|
getUnknownFields().concat(other.unknownFields));
|
||||||
return this;
|
return this;
|
||||||
@@ -35082,6 +35128,38 @@ public final class JsAstProtoBuf {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int localNameId_ ;
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasLocalNameId() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public int getLocalNameId() {
|
||||||
|
return localNameId_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public Builder setLocalNameId(int value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
localNameId_ = value;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional int32 local_name_id = 3;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearLocalNameId() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
localNameId_ = 0;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.Name)
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.js.ast.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -547,11 +547,15 @@ class JsAstSerializer(private val pathResolver: (File) -> String) {
|
|||||||
KotlinInlineStrategy.NOT_INLINE -> InlineStrategy.NOT_INLINE
|
KotlinInlineStrategy.NOT_INLINE -> InlineStrategy.NOT_INLINE
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun serialize(name: JsName) = nameMap.getOrPut(name) {
|
private fun serialize(name: JsName): Int = nameMap.getOrPut(name) {
|
||||||
val result = nameTableBuilder.entryCount
|
|
||||||
val builder = Name.newBuilder()
|
val builder = Name.newBuilder()
|
||||||
builder.identifier = serialize(name.ident)
|
builder.identifier = serialize(name.ident)
|
||||||
builder.temporary = name.isTemporary
|
builder.temporary = name.isTemporary
|
||||||
|
name.localAlias?.let {
|
||||||
|
builder.localNameId = serialize(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
val result = nameTableBuilder.entryCount
|
||||||
nameTableBuilder.addEntry(builder)
|
nameTableBuilder.addEntry(builder)
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user