Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix translate-o in unshift.
  • Loading branch information
jnthn committed Feb 1, 2013
1 parent 9b42430 commit b56b607
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/org/perl6/nqp/sixmodel/reprs/VMArrayInstance.java
Expand Up @@ -122,11 +122,13 @@ public void unshift_boxed(ThreadContext tc, SixModelObject value) {
int i;

/* grow the array */
int origElems = elems;
set_size_internal(tc, elems + n);

/* move elements and set start */
memmove(slots, n, 0, elems);
memmove(slots, n, 0, origElems);
start = n;
elems = origElems;

/* clear out beginning elements */
for (i = 0; i < n; i++)
Expand Down

0 comments on commit b56b607

Please sign in to comment.