diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-09-13 17:49:07 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-09-13 17:49:07 +0000 |
commit | 9fd1ec33710add80fb8efbe7ef31a0ab92d0540f (patch) | |
tree | 4209f3db4df15a319a10803731dc95a5fdb863ee /gcc/go/gofrontend/lex.cc | |
parent | f0d89c7759e7be18895868e0c4e7f9e120f7890f (diff) | |
download | gcc-9fd1ec33710add80fb8efbe7ef31a0ab92d0540f.zip gcc-9fd1ec33710add80fb8efbe7ef31a0ab92d0540f.tar.gz gcc-9fd1ec33710add80fb8efbe7ef31a0ab92d0540f.tar.bz2 |
compiler: implement //go:nowritebarrierrec
Reviewed-on: https://go-review.googlesource.com/134228
From-SVN: r264283
Diffstat (limited to 'gcc/go/gofrontend/lex.cc')
-rw-r--r-- | gcc/go/gofrontend/lex.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/lex.cc b/gcc/go/gofrontend/lex.cc index 560f5f9..3965f30 100644 --- a/gcc/go/gofrontend/lex.cc +++ b/gcc/go/gofrontend/lex.cc @@ -1922,9 +1922,15 @@ Lex::skip_cpp_comment() // function that it calls, needs to use any write barriers, it // should emit an error instead. // FIXME: Should only work when compiling the runtime package. - // FIXME: currently treated the same as go:nowritebarrier this->pragmas_ |= GOPRAGMA_NOWRITEBARRIERREC; } + else if (verb == "go:yeswritebarrierrec") + { + // Applies to the next function. Disables go:nowritebarrierrec + // when looking at callees; write barriers are permitted here. + // FIXME: Should only work when compiling the runtime package. + this->pragmas_ |= GOPRAGMA_YESWRITEBARRIERREC; + } else if (verb == "go:cgo_unsafe_args") { // Applies to the next function. Taking the address of any |