|
| 1 | + |
| 2 | +void TypeInfoOf<Abstraction>::printReprToStream(VM vm, RichNode self, std::ostream& out, |
| 3 | + int depth, int width) const { |
| 4 | + assert(self.is<Abstraction>()); |
| 5 | + self.as<Abstraction>().printReprToStream(vm, out, depth, width); |
| 6 | +} |
| 7 | + |
| 8 | +UnstableNode TypeInfoOf<Abstraction>::serialize(VM vm, SE s, RichNode from) const { |
| 9 | + assert(from.is<Abstraction>()); |
| 10 | + return from.as<Abstraction>().serialize(vm, s); |
| 11 | +} |
| 12 | + |
| 13 | +GlobalNode* TypeInfoOf<Abstraction>::globalize(VM vm, RichNode from) const { |
| 14 | + assert(from.is<Abstraction>()); |
| 15 | + return from.as<Abstraction>().globalize(vm); |
| 16 | +} |
| 17 | + |
| 18 | +void TypeInfoOf<Abstraction>::gCollect(GC gc, RichNode from, StableNode& to) const { |
| 19 | + assert(from.type() == type()); |
| 20 | + to.make<Abstraction>(gc->vm, from.as<Abstraction>().getArraySize(), gc, from.access<Abstraction>()); |
| 21 | +} |
| 22 | + |
| 23 | +void TypeInfoOf<Abstraction>::gCollect(GC gc, RichNode from, UnstableNode& to) const { |
| 24 | + assert(from.type() == type()); |
| 25 | + to.make<Abstraction>(gc->vm, from.as<Abstraction>().getArraySize(), gc, from.access<Abstraction>()); |
| 26 | +} |
| 27 | + |
| 28 | +void TypeInfoOf<Abstraction>::sClone(SC sc, RichNode from, StableNode& to) const { |
| 29 | + assert(from.type() == type()); |
| 30 | + if (from.as<Abstraction>().home()->shouldBeCloned()) { |
| 31 | + to.make<Abstraction>(sc->vm, from.as<Abstraction>().getArraySize(), sc, from.access<Abstraction>()); |
| 32 | + } else { |
| 33 | + to.init(sc->vm, from); |
| 34 | + } |
| 35 | +} |
| 36 | + |
| 37 | +void TypeInfoOf<Abstraction>::sClone(SC sc, RichNode from, UnstableNode& to) const { |
| 38 | + assert(from.type() == type()); |
| 39 | + if (from.as<Abstraction>().home()->shouldBeCloned()) { |
| 40 | + to.make<Abstraction>(sc->vm, from.as<Abstraction>().getArraySize(), sc, from.access<Abstraction>()); |
| 41 | + } else { |
| 42 | + to.init(sc->vm, from); |
| 43 | + } |
| 44 | +} |
| 45 | + |
| 46 | +size_t TypedRichNode<Abstraction>::getArraySize() { |
| 47 | + return _self.access<Abstraction>().getArraySize(); |
| 48 | +} |
| 49 | + |
| 50 | +StaticArray<class mozart::StableNode> TypedRichNode<Abstraction>::getElementsArray() { |
| 51 | + return _self.access<Abstraction>().getElementsArray(); |
| 52 | +} |
| 53 | + |
| 54 | +class mozart::StableNode& TypedRichNode<Abstraction>::getElements(size_t i) { |
| 55 | + return _self.access<Abstraction>().getElements(i); |
| 56 | +} |
| 57 | + |
| 58 | +inline |
| 59 | +class mozart::Space * TypedRichNode<Abstraction>::home() { |
| 60 | + return _self.access<Abstraction>().home(); |
| 61 | +} |
| 62 | + |
| 63 | +inline |
| 64 | +size_t TypedRichNode<Abstraction>::getArraySizeImpl() { |
| 65 | + return _self.access<Abstraction>().getArraySizeImpl(); |
| 66 | +} |
| 67 | + |
| 68 | +inline |
| 69 | +atom_t TypedRichNode<Abstraction>::getPrintName(VM vm) { |
| 70 | + return _self.access<Abstraction>().getPrintName(vm); |
| 71 | +} |
| 72 | + |
| 73 | +inline |
| 74 | +bool TypedRichNode<Abstraction>::isCallable(VM vm) { |
| 75 | + return _self.access<Abstraction>().isCallable(vm); |
| 76 | +} |
| 77 | + |
| 78 | +inline |
| 79 | +bool TypedRichNode<Abstraction>::isProcedure(VM vm) { |
| 80 | + return _self.access<Abstraction>().isProcedure(vm); |
| 81 | +} |
| 82 | + |
| 83 | +inline |
| 84 | +size_t TypedRichNode<Abstraction>::procedureArity(VM vm) { |
| 85 | + return _self.access<Abstraction>().procedureArity(vm); |
| 86 | +} |
| 87 | + |
| 88 | +inline |
| 89 | +void TypedRichNode<Abstraction>::getCallInfo(VM vm, size_t & arity, ProgramCounter & start, size_t & Xcount, StaticArray<class mozart::StableNode> & Gs, StaticArray<class mozart::StableNode> & Ks) { |
| 90 | + _self.access<Abstraction>().getCallInfo(vm, arity, start, Xcount, Gs, Ks); |
| 91 | +} |
| 92 | + |
| 93 | +inline |
| 94 | +void TypedRichNode<Abstraction>::getDebugInfo(VM vm, atom_t & printName, class mozart::UnstableNode & debugData) { |
| 95 | + _self.access<Abstraction>().getDebugInfo(vm, printName, debugData); |
| 96 | +} |
| 97 | + |
| 98 | +inline |
| 99 | +void TypedRichNode<Abstraction>::printReprToStream(VM vm, std::ostream & out, int depth, int width) { |
| 100 | + _self.access<Abstraction>().printReprToStream(vm, out, depth, width); |
| 101 | +} |
| 102 | + |
| 103 | +inline |
| 104 | +class mozart::UnstableNode TypedRichNode<Abstraction>::serialize(VM vm, SE se) { |
| 105 | + return _self.access<Abstraction>().serialize(vm, se); |
| 106 | +} |
| 107 | + |
| 108 | +inline |
| 109 | +class mozart::GlobalNode * TypedRichNode<Abstraction>::globalize(VM vm) { |
| 110 | + return _self.access<Abstraction>().globalize(_self, vm); |
| 111 | +} |
| 112 | + |
| 113 | +inline |
| 114 | +void TypedRichNode<Abstraction>::setUUID(VM vm, const struct mozart::UUID & uuid) { |
| 115 | + _self.access<Abstraction>().setUUID(_self, vm, uuid); |
| 116 | +} |
0 commit comments