Rename is_immutable to is_static_initializer to try to capture what it really means. Be more precise about when an address expression, or a binary expression, can be a static initializer. Don't check whether a type has pointers when deciding whether an initializer must be read-write, just check whether it is being used to initialize a global variable. To make that work set the Translate_context function to NULL for a global variable with a static initializer. The effect of this is to let more global variables be initialized directly, rather than being initialized in the generated init function. Reviewed-on: https://go-review.googlesource.com/32917 From-SVN: r242024
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
gofrontend | Loading commit data... | |
ChangeLog | Loading commit data... | |
Make-lang.in | Loading commit data... | |
README.gcc | Loading commit data... | |
config-lang.in | Loading commit data... | |
gccgo.texi | Loading commit data... | |
go-backend.c | Loading commit data... | |
go-c.h | Loading commit data... | |
go-gcc-diagnostics.cc | Loading commit data... | |
go-gcc.cc | Loading commit data... | |
go-gcc.h | Loading commit data... | |
go-lang.c | Loading commit data... | |
go-linemap.cc | Loading commit data... | |
go-location.h | Loading commit data... | |
go-sha1.cc | Loading commit data... | |
go-system.h | Loading commit data... | |
gospec.c | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lang.opt | Loading commit data... |