File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 26
26
%BootPickle(pack:Pack unpack:Unpack) at 'x-oz://boot/Pickle'
27
27
Pickle(pack:Pack unpack:Unpack packWithReplacements:PackWithReplacements)
28
28
BootName(newUnique:NewUniqueName newNamed:NewNamedName) at 'x-oz://boot/Name'
29
- System
30
29
export
31
30
Return
32
31
define
@@ -140,5 +139,16 @@ define
140
139
true = (A \= B)
141
140
end
142
141
)
142
+
143
+ packWithReplacementsTopLevel(
144
+ proc {$}
145
+ A = {NewCell 1 }
146
+ VBS = {PackWithReplacements A [A#(a(b))]}
147
+ U = {Unpack VBS}
148
+ in
149
+ true = {IsCell A}
150
+ U = a(b)
151
+ end
152
+ )
143
153
])
144
154
end
Original file line number Diff line number Diff line change @@ -75,10 +75,6 @@ void Pickler::pickle(RichNode value, RichNode temporaryReplacement) {
75
75
auto typesRecord = RichNode (*vm->getPickleTypesRecord ()).as <Record>();
76
76
auto statelessTypes = RichNode (*typesRecord.getArity ()).as <Arity>();
77
77
78
- SerializationCallback cb (vm);
79
- UnstableNode topLevelIndex = OptVar::build (vm);
80
- cb.copy (topLevelIndex, value);
81
-
82
78
bool futures = false ;
83
79
nativeint count = 0 ;
84
80
VMAllocatedList<NodeBackup> nodeBackups;
@@ -104,10 +100,15 @@ void Pickler::pickle(RichNode value, RichNode temporaryReplacement) {
104
100
nodeReplacementBackups.push_front (vm, replacement.first .makeBackup ());
105
101
replacement.first .reinit (vm, replacement.second );
106
102
}
103
+ value.update ();
107
104
108
105
replacements.clear (vm);
109
106
}
110
107
108
+ SerializationCallback cb (vm);
109
+ UnstableNode topLevelIndex = OptVar::build (vm);
110
+ cb.copy (topLevelIndex, value);
111
+
111
112
// Replace serialized nodes by Serialized(index)
112
113
// and add them to the nodes list
113
114
while (!cb.todoFrom .empty ()) {
You can’t perform that action at this time.
0 commit comments