Skip to content

Commit e4acdcf

Browse files
committed
Update serialization
1 parent 8c88eb6 commit e4acdcf

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/sst/ArgListBuilder.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ public SSTNode getNakedForComp() {
198198
}
199199

200200
public void addNakedForComp(SSTNode node) {
201-
this.nakedForComp = node;
201+
setNakedForComp(node);
202202
addArg(node);
203203
}
204+
205+
public void setNakedForComp(SSTNode nakedForComp) {
206+
this.nakedForComp = nakedForComp;
207+
}
204208
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/sst/SSTDeserializer.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,17 @@
4040
*/
4141
package com.oracle.graal.python.parser.sst;
4242

43+
import java.io.DataInputStream;
44+
import java.io.IOException;
45+
import java.math.BigInteger;
46+
import java.util.ArrayList;
47+
4348
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
4449
import com.oracle.graal.python.nodes.expression.BinaryArithmetic;
4550
import com.oracle.graal.python.nodes.expression.UnaryArithmetic;
4651
import com.oracle.graal.python.nodes.literal.FormatStringLiteralNode.StringPart;
4752
import com.oracle.graal.python.parser.ScopeInfo;
4853
import com.oracle.graal.python.parser.sst.SerializationUtils.SSTId;
49-
import java.io.DataInputStream;
50-
import java.io.IOException;
51-
import java.math.BigInteger;
52-
import java.util.ArrayList;
5354

5455
public final class SSTDeserializer {
5556

@@ -773,6 +774,7 @@ private ArgListBuilder readArgListBuilder() throws IOException {
773774
for (int i = 0; i < kwArgCount; i++) {
774775
alb.addKwArg(readNode());
775776
}
777+
alb.setNakedForComp(readNode());
776778
return alb;
777779
}
778780

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/sst/SSTSerializerVisitor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ private void writeArgListBuilder(ArgListBuilder alb) throws IOException {
183183
for (SSTNode arg : kwArg) {
184184
writeNodeOrNull(arg);
185185
}
186+
writeNodeOrNull(alb.getNakedForComp());
186187
}
187188

188189
private void writeArguments(ArgDefListBuilder argBuilder) throws IOException {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/sst/SerializationUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import com.oracle.graal.python.nodes.expression.UnaryArithmetic;
4646

4747
public class SerializationUtils {
48-
public static byte VERSION = 2;
48+
public static byte VERSION = 3;
4949

5050
public static enum SSTId {
5151
AndID,

0 commit comments

Comments
 (0)