append()的实现在哪里? [英] Where is append() implementation?

查看:224
本文介绍了append()的实现在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在任何地方找到append()或任何其他内置函数的实现代码?我尝试通过godoc找到代码并使用IDE的跳转到定义功能。可能是我看错了地方。任何人都可以看到实际执行的方式吗?

I cannot find implementation code of append() or any other builtin functions anywhere? I tried finding the code through godoc and using jump-to-definition feature of IDE's. May be i am looking at wrong places. Could anyone show me the way to see actual implementation?

推荐答案

您可能感兴趣:

  • the code generating bit append is in here https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/ssa.go
  • and growslice, used by the former, and that lives in here : https://github.com/golang/go/blob/master/src/runtime/slice.go

这篇关于append()的实现在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆