diff options
author | Ayke van Laethem <[email protected]> | 2021-09-08 03:14:11 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-09-08 10:02:57 +0200 |
commit | 409688e67ab121efe0bf898dd45e3e4bf52b1b80 (patch) | |
tree | d46beb0b88c7da55060e12a9b78b06cd2550d83d /README.md | |
parent | d348db4a0d3b865f7b5bf7bfd4c3621de96c041a (diff) | |
download | tinygo-409688e67ab121efe0bf898dd45e3e4bf52b1b80.tar.gz tinygo-409688e67ab121efe0bf898dd45e3e4bf52b1b80.zip |
compiler: fix equally named structs in different scopes
For example, in this code:
type kv struct {
v float32
}
func foo(a *kv) {
type kv struct {
v byte
}
}
Both 'kv' types would be given the same LLVM type, even though they are
different types! This is fixed by only creating a LLVM type once per Go
type (types.Type).
As an added bonus, this change gives a performance improvement of about
0.4%. Not that much, but certainly not nothing for such a small change.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions