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. // PrimitiveObj is a blank object primitive.
var PrimitiveObj = createPrimitive("Obj", Type {}) var PrimitiveObj = createPrimitive("Obj", Type {})
// TODO: make these two be interface sections
// PrimitiveFace is a blank interface primitive. It accepts any value. // 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. // 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 // BuiltInString is a built in string type. It is a dynamic array of UTF-32
// codepoints. // codepoints.

View File

@ -11,10 +11,6 @@ type TypeSection struct {
what Type what Type
complete bool complete bool
argument Argument 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 members []ObjectMember
} }

View File

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