mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 23:43:40 +00:00
compiler: fix emission of large object layouts
Large object layouts don't fit in a pointer-sized integer and therefore need to be stored in a global instead. However, the way the data was stored in these globals was not correct for buffers that don't have pointers near the end. This commit fixes this issue by using math/big FillBytes() instead of Bytes(). This gets the unicode package to compile on AVR.
This commit is contained in:
committed by
Ron Evans
parent
39c8711332
commit
21b89ef327
Vendored
+8
@@ -20,6 +20,10 @@ var (
|
||||
y [60]uintptr
|
||||
z *byte
|
||||
}
|
||||
struct4 *struct {
|
||||
x *byte
|
||||
y [61]uintptr
|
||||
}
|
||||
|
||||
slice1 []byte
|
||||
slice2 []*int
|
||||
@@ -50,6 +54,10 @@ func newStruct() {
|
||||
y [60]uintptr
|
||||
z *byte
|
||||
})
|
||||
struct4 = new(struct {
|
||||
x *byte
|
||||
y [61]uintptr
|
||||
})
|
||||
}
|
||||
|
||||
func newFuncValue() *func() {
|
||||
|
||||
Reference in New Issue
Block a user