This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r242024 - in /trunk/gcc/go/gofrontend: MERGE ex...


Author: ian
Date: Wed Nov  9 21:41:58 2016
New Revision: 242024

URL: https://gcc.gnu.org/viewcvs?rev=242024&root=gcc&view=rev
Log:
    compiler: rework static initializer code
    
    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

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/gcc/go/gofrontend/expressions.cc
    trunk/gcc/go/gofrontend/expressions.h
    trunk/gcc/go/gofrontend/gogo.cc


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]