# 9.4 代码结构

Go 的逃逸分析发生在内联操作之后，入口代码如下：

```go
// file: cmd/compile/internal/gc/main.go

func Main() {
    // 忽略之前代码

    // 逃逸分析
    escape.Funcs(typecheck.Target.Decls)

    // 忽略之后代码
}
```

逃逸分析在内联操作之后是因为内联减少了函数调用，同时可能会减少局部变量的逃逸情况。逃逸分析的所有代码都在文件 `cmd/compile/internal/escape/escape.go` 中。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gocompiler.shizhz.me/9.-golang-bian-yi-qi-tao-yi-fen-xi/9.4-dai-ma-jie-gou.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
