mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 22:43:40 +00:00
runtime (gc_blocks.go): simplify scanning logic
Loop over valid pointer locations in heap objects instead of checking if each location is valid. The conservative scanning code is now shared between markRoots and the heap scan. This also removes the ending alignment requirement from markRoots, since the new scan* functions do not require an aligned length. This requirement was occasionally violated by the linux global marking code. This saves some code space and has negligible impact on performance.
This commit is contained in:
@@ -42,9 +42,9 @@ func TestBinarySize(t *testing.T) {
|
||||
// This is a small number of very diverse targets that we want to test.
|
||||
tests := []sizeTest{
|
||||
// microcontrollers
|
||||
{"hifive1b", "examples/echo", 3756, 280, 0, 2268},
|
||||
{"microbit", "examples/serial", 2756, 340, 8, 2272},
|
||||
{"wioterminal", "examples/pininterrupt", 7297, 1491, 116, 6912},
|
||||
{"hifive1b", "examples/echo", 3568, 280, 0, 2268},
|
||||
{"microbit", "examples/serial", 2630, 342, 8, 2272},
|
||||
{"wioterminal", "examples/pininterrupt", 7175, 1493, 116, 6912},
|
||||
|
||||
// TODO: also check wasm. Right now this is difficult, because
|
||||
// wasm binaries are run through wasm-opt and therefore the
|
||||
|
||||
Reference in New Issue
Block a user