Permalink
Browse files

Implement 'is copy' hash params.

  • Loading branch information...
1 parent af39d66 commit e7ad7742a00efa0a8bad15b5730c43fb60cbd415 @jnthn jnthn committed Jun 30, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/vm/jvm/runtime/org/perl6/rakudo/Binder.java
@@ -406,7 +406,11 @@ else if ((paramFlags & SIG_ELEM_IS_PARCEL) != 0) {
else if ((paramFlags & SIG_ELEM_HASH_SIGIL) != 0) {
SixModelObject bindee = decontValue;
if ((paramFlags & SIG_ELEM_IS_COPY) != 0) {
- throw new RuntimeException("is copy hash param NYI");
+ SixModelObject BOOTHash = tc.gc.BOOTHash;
+ bindee = gcx.Hash.st.REPR.allocate(tc, gcx.Hash.st);
+ bindee.bind_attribute_boxed(tc, gcx.EnumMap, "$!storage",
+ HINT_ENUMMAP_storage, BOOTHash.st.REPR.allocate(tc, BOOTHash.st));
+ Ops.p6store(bindee, decontValue, tc);
}
cf.oLex[sci.oTryGetLexicalIdx(varName)] = bindee;
}

0 comments on commit e7ad774

Please sign in to comment.