Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Presize arrays when deserializing.
  • Loading branch information
donaldh committed Oct 4, 2013
1 parent bb33397 commit 5ef6bcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/VMArray.java
Expand Up @@ -117,10 +117,11 @@ else if (ss.bits == 32)
obj.st = st;
return obj;
}

public void deserialize_finish(ThreadContext tc, STable st,
SerializationReader reader, SixModelObject obj) {
int elems = reader.readInt32();
obj.set_elems(tc, elems);
if (st.REPRData == null) {
for (int i = 0; i < elems; i++)
obj.bind_pos_boxed(tc, i, reader.readRef());
Expand Down

0 comments on commit 5ef6bcc

Please sign in to comment.