Commit 78a88fb6 by Ian Lance Taylor

compiler: containing small bfunction mixup in Gogo::write_globals

    
    Fix buglet in Gogo::write_globals-- in a couple of places the
    wrong Bfunction was being used for the containing (not target)
    function when creating calls for init functions.
    
    Reviewed-on: https://go-review.googlesource.com/45510

From-SVN: r249159
parent 45b2222a
c4ecdd3edb9febe72b5527481ae3d7310105ca67 be5fa26b2b1b5d0755bc1c7ce25f3aa26bea9d9c
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.
...@@ -1504,10 +1504,10 @@ Gogo::write_globals() ...@@ -1504,10 +1504,10 @@ Gogo::write_globals()
Bfunction* initfn = func->get_or_make_decl(this, *p); Bfunction* initfn = func->get_or_make_decl(this, *p);
Bexpression* func_code = Bexpression* func_code =
this->backend()->function_code_expression(initfn, func_loc); this->backend()->function_code_expression(initfn, func_loc);
Bexpression* call = this->backend()->call_expression(initfn, func_code, Bexpression* call = this->backend()->call_expression(init_bfn, func_code,
empty_args, empty_args,
NULL, func_loc); NULL, func_loc);
Bstatement* ist = this->backend()->expression_statement(initfn, call); Bstatement* ist = this->backend()->expression_statement(init_bfn, call);
init_stmts.push_back(ist); init_stmts.push_back(ist);
} }
......
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