Commit 74d82e6b by Ian Lance Taylor

compiler: don't insert write barriers if we've seen errors

    
    The compiler skips the escape analysis pass if it has seen any errors.
    The write barrier pass, especially the check-escapes portion, relies
    on escape analysis running.  So don't run this pass if there have been
    any errors, as it may cause further unreliable error reports.
    
    Reviewed-on: https://go-review.googlesource.com/90575

From-SVN: r257163
parent dcbb27dd
4164071703c531b5234b790b76df4931c37a8d9c 6517e6731aeb4512d12c341c7111959a44547ba0
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -410,6 +410,9 @@ Write_barriers::statement(Block* block, size_t* pindex, Statement* s) ...@@ -410,6 +410,9 @@ Write_barriers::statement(Block* block, size_t* pindex, Statement* s)
void void
Gogo::add_write_barriers() Gogo::add_write_barriers()
{ {
if (saw_errors())
return;
Mark_address_taken mat(this); Mark_address_taken mat(this);
this->traverse(&mat); this->traverse(&mat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment