about summary refs log tree commit diff
path: root/src/librustdoc/html/static/source-script.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-04 11:47:07 +0000
committerbors <bors@rust-lang.org>2018-12-04 11:47:07 +0000
commit431e0ab62f7730f11db693c23f48403e4c719f82 (patch)
treed4dbd9fd5427d64d10b39bd13cfe56f36b3f3b85 /src/librustdoc/html/static/source-script.js
parent58e9832a0d1681916cbcf9d7cf3de7d79dbaa8d5 (diff)
parent2043d30c2e8c912dd04be2913528979a1977c330 (diff)
downloadrust-431e0ab62f7730f11db693c23f48403e4c719f82.tar.gz
rust-431e0ab62f7730f11db693c23f48403e4c719f82.zip
Auto merge of #55871 - ljedrz:llvm_back_allocations, r=nagisa
codegen_llvm_back: improve allocations

This commit was split out from https://github.com/rust-lang/rust/pull/54864. Last time it was causing an LLVM OOM, which was most probably caused by not collecting the globals.

- preallocate vectors of known length
- `extend` instead of `append` where the argument is consumable
- turn 2 `push` loops into `extend`s
- create a vector from a function producing one instead of using `extend_from_slice` on it
- consume `modules` when no longer needed
- ~~return an `impl Iterator` from `generate_lto_work`~~
- ~~don't `collect` `globals`, as they are iterated over and consumed right afterwards~~

While I'm hoping it won't cause an OOM anymore, I would still consider this a "high-risk" PR and not roll it up.
Diffstat (limited to 'src/librustdoc/html/static/source-script.js')
0 files changed, 0 insertions, 0 deletions