Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Assorted serialization fixes.
  • Loading branch information
jnthn committed Apr 15, 2013
1 parent 07377b2 commit ed0eb2d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/org/perl6/nqp/sixmodel/SerializationReader.java
Expand Up @@ -86,6 +86,7 @@ public void deserialize() {

// Put code refs in place.
for (int i = 0; i < cr.length; i++) {
cr[i].isStaticCodeRef = true;
cr[i].sc = sc;
sc.root_codes.add(cr[i]);
}
Expand Down
1 change: 1 addition & 0 deletions src/org/perl6/nqp/sixmodel/reprs/VMArrayInstance.java
Expand Up @@ -253,6 +253,7 @@ private void memmove(SixModelObject[] slots, long dest_start, long src_start, lo
public SixModelObject clone(ThreadContext tc) {
try {
VMArrayInstance clone = (VMArrayInstance)this.clone();
clone.sc = null;
if (this.slots != null)
clone.slots = this.slots.clone();
return clone;
Expand Down
1 change: 1 addition & 0 deletions src/org/perl6/nqp/sixmodel/reprs/VMArrayInstance_i.java
Expand Up @@ -258,6 +258,7 @@ private void memmove(long[] slots, long dest_start, long src_start, long l_n) {
public SixModelObject clone(ThreadContext tc) {
try {
VMArrayInstance_i clone = (VMArrayInstance_i)this.clone();
clone.sc = null;
if (clone.slots != null)
clone.slots = this.slots.clone();
return clone;
Expand Down
1 change: 1 addition & 0 deletions src/org/perl6/nqp/sixmodel/reprs/VMArrayInstance_n.java
Expand Up @@ -258,6 +258,7 @@ private void memmove(double[] slots, long dest_start, long src_start, long l_n)
public SixModelObject clone(ThreadContext tc) {
try {
VMArrayInstance_n clone = (VMArrayInstance_n)this.clone();
clone.sc = null;
if (clone.slots != null)
clone.slots = this.slots.clone();
return clone;
Expand Down
1 change: 1 addition & 0 deletions src/org/perl6/nqp/sixmodel/reprs/VMArrayInstance_s.java
Expand Up @@ -258,6 +258,7 @@ private void memmove(String[] slots, long dest_start, long src_start, long l_n)
public SixModelObject clone(ThreadContext tc) {
try {
VMArrayInstance_s clone = (VMArrayInstance_s)this.clone();
clone.sc = null;
if (clone.slots != null)
clone.slots = this.slots.clone();
return clone;
Expand Down
1 change: 1 addition & 0 deletions src/org/perl6/nqp/sixmodel/reprs/VMHashInstance.java
Expand Up @@ -36,6 +36,7 @@ public long elems(ThreadContext tc) {
public SixModelObject clone(ThreadContext tc) {
try {
VMHashInstance copy = (VMHashInstance)this.clone();
copy.sc = null;
copy.storage = (HashMap<String, SixModelObject>)storage.clone();
return copy;
} catch (CloneNotSupportedException e) {
Expand Down

0 comments on commit ed0eb2d

Please sign in to comment.