mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
compiler, reflect: add map key and element type info
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
// - map types (this is still missing the key and element types)
|
||||
// meta uint8
|
||||
// ptrTo *typeStruct
|
||||
// elem *typeStruct
|
||||
// key *typeStruct
|
||||
// - struct types (see structType):
|
||||
// meta uint8
|
||||
// numField uint16
|
||||
@@ -408,6 +410,13 @@ type arrayType struct {
|
||||
arrayLen uintptr
|
||||
}
|
||||
|
||||
type mapType struct {
|
||||
rawType
|
||||
ptrTo *rawType
|
||||
elem *rawType
|
||||
key *rawType
|
||||
}
|
||||
|
||||
// Type for struct types. The numField value is intentionally put before ptrTo
|
||||
// for better struct packing on 32-bit and 64-bit architectures. On these
|
||||
// architectures, the ptrTo field still has the same offset as in all the other
|
||||
|
||||
Reference in New Issue
Block a user