Test code gen

This commit is contained in:
Tristan B. Kildaire 2021-06-07 15:56:43 +02:00
parent 2ac8137bc1
commit b4aa08808f
2 changed files with 10 additions and 3 deletions

View File

@ -93,6 +93,16 @@ public final class TypeChecker
StructuralOrganizer so = new StructuralOrganizer(this);
so.generate();
so.printPool();
import compiler.codegen.core;
foreach(Entity entity; so.initQueue)
{
if(cast(Emittable)entity)
{
Emittable emittable = cast(Emittable)entity;
gprintln("Emit code: "~emittable.emit());
}
}
}
/**

View File

@ -251,9 +251,6 @@ public final class StructuralOrganizer
/* Statically initialize the static class */
TreeNode staticMemberClass = staticInitializeClass(cast(Clazz)entity);
/* Make it depend on us */
//staticMemberClass.addDep(treeNode);
/* We need to init it first as part of our initialization */
treeNode.addDep(staticMemberClass);
gprintln("brgfdfgdfgdu");