From e898243c23c82247ec01b32f551402ca52f32927 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 10 Jun 2019 21:34:12 +0000 Subject: compiler: support inlining functions that use index expressions Also move the determine_types pass on an inlined function body to one place, rather than doing it ad hoc as needed. This adds 79 new inlinable functions in the standard library, such as bytes.HasPrefix and bytes.LastIndexByte. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/181261 From-SVN: r272133 --- gcc/go/gofrontend/gogo.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/go/gofrontend/gogo.cc') diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 62d6870..42a7674 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -7282,6 +7282,7 @@ Function_declaration::import_function_body(Gogo* gogo, Named_object* no) return; gogo->lower_block(no, outer); + outer->determine_types(); gogo->add_imported_inline_function(no); } -- cgit v1.1