This commit is contained in:
Sasha Koshka 2022-10-13 13:30:11 -04:00
parent 561e893327
commit d5687d7b0e
3 changed files with 6 additions and 13 deletions

View File

@ -41,11 +41,13 @@ var PrimitiveU64 = createPrimitive("U64", Type {})
// PrimitiveObj is a blank object primitive.
var PrimitiveObj = createPrimitive("Obj", Type {})
// TODO: make these two be interface sections
// PrimitiveFace is a blank interface primitive. It accepts any value.
var PrimitiveFace = createPrimitive("Face", Type {})
// var PrimitiveFace = createPrimitive("Face", Type {})
// PrimitiveFunc is a blank function interface primitive. It is useless.
var PrimitiveFunc = createPrimitive("Func", Type {})
// var PrimitiveFunc = createPrimitive("Func", Type {})
// BuiltInString is a built in string type. It is a dynamic array of UTF-32
// codepoints.

View File

@ -11,10 +11,6 @@ type TypeSection struct {
what Type
complete bool
argument Argument
// TODO: do not add members from parent type. instead have a member
// function to discern whether this type contains a particular member,
// and have it recurse all the way up the family tree. it will be the
// translator's job to worry about what members are placed where.
members []ObjectMember
}

View File

@ -25,7 +25,7 @@ type Type struct {
locatable
// one of these must be nil.
actual *TypeSection
actual Section
points *Type
mutable bool
@ -91,8 +91,6 @@ func (what Type) underlyingPrimitive () (underlying *TypeSection) {
case
&PrimitiveF32,
&PrimitiveF64,
&PrimitiveFunc,
&PrimitiveFace,
&PrimitiveObj,
&PrimitiveU64,
&PrimitiveU32,
@ -105,7 +103,7 @@ func (what Type) underlyingPrimitive () (underlying *TypeSection) {
&PrimitiveUInt,
&PrimitiveInt:
underlying = actual
underlying = actual.(*TypeSection)
return
case nil:
@ -235,9 +233,6 @@ func (analyzer analysisOperation) analyzeType (
}
}
// TODO
// TODO: figure out what todo ???
return
}