Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Give some boot types a bool spec.
  • Loading branch information
jnthn committed Jan 28, 2013
1 parent 056979a commit 4ab9860
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/org/perl6/nqp/sixmodel/KnowHOWBootstrapper.java
Expand Up @@ -10,6 +10,7 @@ public static void bootstrap(ThreadContext tc)
knowhowUnit.initializeCompilationUnit(tc);
bootstrapKnowHOW(tc, knowhowUnit);
bootstrapKnowHOWAttribute(tc, knowhowUnit);

tc.gc.BOOTArray = bootType(tc, "BOOTArray", "VMArray");
tc.gc.BOOTHash = bootType(tc, "BOOTHash", "VMHash");
tc.gc.BOOTIter = bootType(tc, "BOOTIter", "VMIter");
Expand All @@ -18,7 +19,11 @@ public static void bootstrap(ThreadContext tc)
tc.gc.BOOTStr = bootType(tc, "BOOTStr", "P6str");
tc.gc.SCRef = bootType(tc, "SCRef", "SCRef");
tc.gc.ContextRef = bootType(tc, "ContextRef", "ContextRef");

Ops.setboolspec(tc.gc.BOOTIter, BoolificationSpec.MODE_ITER, null, tc);
Ops.setboolspec(tc.gc.BOOTInt, BoolificationSpec.MODE_UNBOX_INT, null, tc);
Ops.setboolspec(tc.gc.BOOTNum, BoolificationSpec.MODE_UNBOX_NUM, null, tc);
Ops.setboolspec(tc.gc.BOOTStr, BoolificationSpec.MODE_UNBOX_STR_NOT_EMPTY_OR_ZERO, null, tc);
}

private static void bootstrapKnowHOW(ThreadContext tc, CompilationUnit knowhowUnit) {
Expand Down

0 comments on commit 4ab9860

Please sign in to comment.