mirror of
https://github.com/golang/go
synced 2024-11-08 19:06:26 -07:00
a509cae90d
Previously, we were treating cross-package function calls as free for inlining budgeting. In theory, we should be able to recompute InlCost from the exported/reimported function bodies. However, that process mutates the structure of the Node AST enough that it doesn't preserve InlCost. To avoid unexpected issues, just record and restore InlCost in the export data. Fixes #19261. Change-Id: Iac2bc0d32d4f948b64524aca657051f9fc96d92d Reviewed-on: https://go-review.googlesource.com/70151 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
18 lines
465 B
Go
18 lines
465 B
Go
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package q
|
|
|
|
import "./p"
|
|
|
|
func H() {
|
|
p.F() // ERROR "inlining call to p.F"
|
|
print(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
|
print(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
|
print(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
|
print(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
|
print(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
|
print(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
|
}
|