英文:
Where is append() implementation?
问题
我无法找到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?
答案1
得分: 15
你可能对以下内容感兴趣:
- 生成代码的部分
append
在这里:https://github.com/golang/go/blob/go1.16.7/src/cmd/compile/internal/gc/ssa.go growslice
是被前者使用的,它位于这里:https://github.com/golang/go/blob/go1.16.7/src/runtime/slice.go
英文:
You may be interested by :
- the code generating bit
append
is in here https://github.com/golang/go/blob/go1.16.7/src/cmd/compile/internal/gc/ssa.go - and
growslice
, used by the former, and that lives in here : https://github.com/golang/go/blob/go1.16.7/src/runtime/slice.go
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论