Skip to content

Commit 869fa46

Browse files
layusazarzadavila
authored andcommitted
Add generated sources for simplification
1 parent 181ebf7 commit 869fa46

File tree

389 files changed

+28386
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

389 files changed

+28386
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
template <>
2+
class TypeInfoOf<Abstraction>: public TypeInfo {
3+
4+
static constexpr UUID uuid() {
5+
return UUID();
6+
}
7+
public:
8+
TypeInfoOf() : TypeInfo("Abstraction", uuid(), false, false, false, sbTokenEq, 0) {}
9+
10+
static const TypeInfoOf<Abstraction>* const instance() {
11+
return &RawType<Abstraction>::rawType;
12+
}
13+
14+
static Type type() {
15+
return Type(instance());
16+
}
17+
18+
atom_t getTypeAtom(VM vm) const {
19+
return Abstraction::getTypeAtom(vm);
20+
}
21+
22+
inline
23+
void printReprToStream(VM vm, RichNode self, std::ostream& out,
24+
int depth, int width) const;
25+
26+
inline
27+
UnstableNode serialize(VM vm, SE s, RichNode from) const;
28+
29+
inline
30+
GlobalNode* globalize(VM vm, RichNode from) const;
31+
32+
inline
33+
void gCollect(GC gc, RichNode from, StableNode& to) const;
34+
35+
inline
36+
void gCollect(GC gc, RichNode from, UnstableNode& to) const;
37+
38+
inline
39+
void sClone(SC sc, RichNode from, StableNode& to) const;
40+
41+
inline
42+
void sClone(SC sc, RichNode from, UnstableNode& to) const;
43+
};
44+
45+
template <>
46+
class TypedRichNode<Abstraction>: public BaseTypedRichNode {
47+
public:
48+
explicit TypedRichNode(RichNode self) : BaseTypedRichNode(self) {}
49+
50+
inline
51+
size_t getArraySize();
52+
53+
inline
54+
StaticArray<class mozart::StableNode> getElementsArray();
55+
56+
inline
57+
class mozart::StableNode& getElements(size_t i);
58+
59+
inline
60+
class mozart::Space * home();
61+
62+
inline
63+
size_t getArraySizeImpl();
64+
65+
inline
66+
atom_t getPrintName(VM vm);
67+
68+
inline
69+
bool isCallable(VM vm);
70+
71+
inline
72+
bool isProcedure(VM vm);
73+
74+
inline
75+
size_t procedureArity(VM vm);
76+
77+
inline
78+
void getCallInfo(VM vm, size_t & arity, ProgramCounter & start, size_t & Xcount, StaticArray<class mozart::StableNode> & Gs, StaticArray<class mozart::StableNode> & Ks);
79+
80+
inline
81+
void getDebugInfo(VM vm, atom_t & printName, class mozart::UnstableNode & debugData);
82+
83+
inline
84+
void printReprToStream(VM vm, std::ostream & out, int depth, int width);
85+
86+
inline
87+
class mozart::UnstableNode serialize(VM vm, SE se);
88+
89+
inline
90+
class mozart::GlobalNode * globalize(VM vm);
91+
92+
inline
93+
void setUUID(VM vm, const struct mozart::UUID & uuid);
94+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Abstraction;
2+
3+
template <>
4+
class Storage<Abstraction> {
5+
public:
6+
typedef ImplWithArray<Abstraction, class mozart::StableNode> Type;
7+
};
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
template <>
2+
class TypeInfoOf<Arity>: public TypeInfo {
3+
4+
static constexpr UUID uuid() {
5+
return UUID();
6+
}
7+
public:
8+
TypeInfoOf() : TypeInfo("Arity", uuid(), false, false, false, sbStructural, 0) {}
9+
10+
static const TypeInfoOf<Arity>* const instance() {
11+
return &RawType<Arity>::rawType;
12+
}
13+
14+
static Type type() {
15+
return Type(instance());
16+
}
17+
18+
atom_t getTypeAtom(VM vm) const {
19+
return Arity::getTypeAtom(vm);
20+
}
21+
22+
inline
23+
void printReprToStream(VM vm, RichNode self, std::ostream& out,
24+
int depth, int width) const;
25+
26+
inline
27+
UnstableNode serialize(VM vm, SE s, RichNode from) const;
28+
29+
inline
30+
void gCollect(GC gc, RichNode from, StableNode& to) const;
31+
32+
inline
33+
void gCollect(GC gc, RichNode from, UnstableNode& to) const;
34+
35+
inline
36+
void sClone(SC sc, RichNode from, StableNode& to) const;
37+
38+
inline
39+
void sClone(SC sc, RichNode from, UnstableNode& to) const;
40+
};
41+
42+
template <>
43+
class TypedRichNode<Arity>: public BaseTypedRichNode {
44+
public:
45+
explicit TypedRichNode(RichNode self) : BaseTypedRichNode(self) {}
46+
47+
inline
48+
size_t getArraySize();
49+
50+
inline
51+
StaticArray<class mozart::StableNode> getElementsArray();
52+
53+
inline
54+
class mozart::StableNode& getElements(size_t i);
55+
56+
inline
57+
size_t getArraySizeImpl();
58+
59+
inline
60+
class mozart::StableNode * getLabel();
61+
62+
inline
63+
size_t getWidth();
64+
65+
inline
66+
class mozart::StableNode * getElement(size_t index);
67+
68+
inline
69+
bool equals(VM vm, class mozart::RichNode right, class mozart::WalkStack & stack);
70+
71+
inline
72+
bool lookupFeature(VM vm, class mozart::RichNode feature, size_t & offset);
73+
74+
inline
75+
void printReprToStream(VM vm, std::ostream & out, int depth, int width);
76+
77+
inline
78+
class mozart::UnstableNode serialize(VM vm, SE se);
79+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Arity;
2+
3+
template <>
4+
class Storage<Arity> {
5+
public:
6+
typedef ImplWithArray<Arity, class mozart::StableNode> Type;
7+
};
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
2+
void TypeInfoOf<Arity>::printReprToStream(VM vm, RichNode self, std::ostream& out,
3+
int depth, int width) const {
4+
assert(self.is<Arity>());
5+
self.as<Arity>().printReprToStream(vm, out, depth, width);
6+
}
7+
8+
UnstableNode TypeInfoOf<Arity>::serialize(VM vm, SE s, RichNode from) const {
9+
assert(from.is<Arity>());
10+
return from.as<Arity>().serialize(vm, s);
11+
}
12+
13+
void TypeInfoOf<Arity>::gCollect(GC gc, RichNode from, StableNode& to) const {
14+
assert(from.type() == type());
15+
to.make<Arity>(gc->vm, from.as<Arity>().getArraySize(), gc, from.access<Arity>());
16+
}
17+
18+
void TypeInfoOf<Arity>::gCollect(GC gc, RichNode from, UnstableNode& to) const {
19+
assert(from.type() == type());
20+
to.make<Arity>(gc->vm, from.as<Arity>().getArraySize(), gc, from.access<Arity>());
21+
}
22+
23+
void TypeInfoOf<Arity>::sClone(SC sc, RichNode from, StableNode& to) const {
24+
assert(from.type() == type());
25+
to.make<Arity>(sc->vm, from.as<Arity>().getArraySize(), sc, from.access<Arity>());
26+
}
27+
28+
void TypeInfoOf<Arity>::sClone(SC sc, RichNode from, UnstableNode& to) const {
29+
assert(from.type() == type());
30+
to.make<Arity>(sc->vm, from.as<Arity>().getArraySize(), sc, from.access<Arity>());
31+
}
32+
33+
size_t TypedRichNode<Arity>::getArraySize() {
34+
return _self.access<Arity>().getArraySize();
35+
}
36+
37+
StaticArray<class mozart::StableNode> TypedRichNode<Arity>::getElementsArray() {
38+
return _self.access<Arity>().getElementsArray();
39+
}
40+
41+
class mozart::StableNode& TypedRichNode<Arity>::getElements(size_t i) {
42+
return _self.access<Arity>().getElements(i);
43+
}
44+
45+
inline
46+
size_t TypedRichNode<Arity>::getArraySizeImpl() {
47+
return _self.access<Arity>().getArraySizeImpl();
48+
}
49+
50+
inline
51+
class mozart::StableNode * TypedRichNode<Arity>::getLabel() {
52+
return _self.access<Arity>().getLabel();
53+
}
54+
55+
inline
56+
size_t TypedRichNode<Arity>::getWidth() {
57+
return _self.access<Arity>().getWidth();
58+
}
59+
60+
inline
61+
class mozart::StableNode * TypedRichNode<Arity>::getElement(size_t index) {
62+
return _self.access<Arity>().getElement(index);
63+
}
64+
65+
inline
66+
bool TypedRichNode<Arity>::equals(VM vm, class mozart::RichNode right, class mozart::WalkStack & stack) {
67+
return _self.access<Arity>().equals(vm, right, stack);
68+
}
69+
70+
inline
71+
bool TypedRichNode<Arity>::lookupFeature(VM vm, class mozart::RichNode feature, size_t & offset) {
72+
return _self.access<Arity>().lookupFeature(vm, feature, offset);
73+
}
74+
75+
inline
76+
void TypedRichNode<Arity>::printReprToStream(VM vm, std::ostream & out, int depth, int width) {
77+
_self.access<Arity>().printReprToStream(vm, out, depth, width);
78+
}
79+
80+
inline
81+
class mozart::UnstableNode TypedRichNode<Arity>::serialize(VM vm, SE se) {
82+
return _self.access<Arity>().serialize(vm, se);
83+
}

0 commit comments

Comments
 (0)