Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some serialization/SC management fixes.
  • Loading branch information
jnthn committed Apr 15, 2013
1 parent 598d177 commit 2afee8f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
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
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
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
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
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
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 2afee8f

Please sign in to comment.