aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/parse.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-06-23 16:03:49 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-06-23 16:03:49 +0000
commit5f0b897b2ee47bf3845d924dd5bc3beb949bc78b (patch)
tree3f8b464d9ac9de6affa319ea9639ee19ef983302 /gcc/go/gofrontend/parse.h
parentef2361cbd8462374b28e9e8becf8710a9b30d125 (diff)
downloadgcc-5f0b897b2ee47bf3845d924dd5bc3beb949bc78b.zip
gcc-5f0b897b2ee47bf3845d924dd5bc3beb949bc78b.tar.gz
gcc-5f0b897b2ee47bf3845d924dd5bc3beb949bc78b.tar.bz2
compiler: add go:notinheap magic comment
Implement go:notinheap as the gc compiler does. A type marked as go:notinheap may not live in the heap, and does not require a write barrier. Struct and array types that incorporate notinheap types are themselves notinheap. Allocating a value of a notinheap type on the heap is an error. This is not just an optimization. There is code where a write barrier may not occur that was getting a write barrier with gccgo but not gc, because the types in question were notinheap. The case I found was setting the mcache field in exitsyscallfast. Reviewed-on: https://go-review.googlesource.com/46490 From-SVN: r249594
Diffstat (limited to 'gcc/go/gofrontend/parse.h')
-rw-r--r--gcc/go/gofrontend/parse.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/go/gofrontend/parse.h b/gcc/go/gofrontend/parse.h
index e13dcc9..e416072 100644
--- a/gcc/go/gofrontend/parse.h
+++ b/gcc/go/gofrontend/parse.h
@@ -182,14 +182,14 @@ class Parse
void method_spec(Typed_identifier_list*);
void declaration();
bool declaration_may_start_here();
- void decl(void (Parse::*)(void*), void*);
- void list(void (Parse::*)(void*), void*, bool);
+ void decl(void (Parse::*)(void*, unsigned int), void*, unsigned int pragmas);
+ void list(void (Parse::*)(void*, unsigned int), void*, bool);
void const_decl();
void const_spec(Type**, Expression_list**);
- void type_decl();
- void type_spec(void*);
+ void type_decl(unsigned int pragmas);
+ void type_spec(void*, unsigned int pragmas);
void var_decl();
- void var_spec(void*);
+ void var_spec(void*, unsigned int pragmas);
void init_vars(const Typed_identifier_list*, Type*, Expression_list*,
bool is_coloneq, Location);
bool init_vars_from_call(const Typed_identifier_list*, Type*, Expression*,
@@ -278,7 +278,7 @@ class Parse
void goto_stat();
void package_clause();
void import_decl();
- void import_spec(void*);
+ void import_spec(void*, unsigned int pragmas);
void reset_iota();
int iota_value();