(memoryLayout *device.MemoryLayout)
| 34 | } |
| 35 | |
| 36 | func newConstantEncoder(memoryLayout *device.MemoryLayout) *constantEncoder { |
| 37 | buffer := &bytes.Buffer{} |
| 38 | writer := endian.Writer(buffer, memoryLayout.GetEndian()) |
| 39 | return &constantEncoder{ |
| 40 | writer: writer, |
| 41 | buffer: buffer, |
| 42 | constantMap: make(map[id.ID]uint64), |
| 43 | alignment: uint64(memoryLayout.GetPointer().GetAlignment()), |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func (e *constantEncoder) writeValues(v ...value.Value) value.Pointer { |
| 48 | if len(v) == 0 { |