rust/src/libstd/sys/cloudabi
Alex Crichton 0b7ba6ec54 std: Improve downstream codegen in Command::env
This commit rejiggers the generics used in the implementation of
`Command::env` with the purpose of reducing the amount of codegen that
needs to happen in consumer crates, instead preferring to generate code
into libstd.

This was found when profiling the compile times of the `cc` crate where
the binary rlib produced had a lot of `BTreeMap` code compiled into it
but the crate doesn't actually use `BTreeMap`. It turns out that
`Command::env` is generic enough to codegen the entire implementation in
calling crates, but in this case there's no performance concern so it's
fine to compile the code into the standard library.

This change is done by removing the generic on the `CommandEnv` map
which is intended to handle case-insensitive variables on Windows.
Instead now a generic isn't used but rather a `use` statement defined
per-platform is used.

With this commit a debug build of `Command::new("foo").env("a", "b")`
drops from 21k lines of LLVM IR to 10k.
2019-09-05 11:43:35 -07:00
..
abi Remove uses of mem::uninitialized() from cloudabi 2019-08-15 09:04:49 +00:00
shims std: Improve downstream codegen in Command::env 2019-09-05 11:43:35 -07:00
args.rs libstd => 2018 2019-02-28 04:06:15 +09:00
condvar.rs Use raw pointers in std::sys::cloudabi when passing MaybeUninit values 2019-07-23 13:51:28 -04:00
io.rs Add {IoSlice, IoSliceMut}::advance 2019-08-03 10:44:45 +02:00
mod.rs Remove uses of mem::uninitialized() from cloudabi 2019-08-15 09:04:49 +00:00
mutex.rs Remove uses of mem::uninitialized() from cloudabi 2019-08-15 09:04:49 +00:00
os.rs libstd => 2018 2019-02-28 04:06:15 +09:00
rwlock.rs Remove uses of mem::uninitialized() from cloudabi 2019-08-15 09:04:49 +00:00
stack_overflow.rs Remove licenses 2018-12-25 21:08:33 -07:00
stdio.rs libstd => 2018 2019-02-28 04:06:15 +09:00
thread.rs Remove uses of mem::uninitialized() from cloudabi 2019-08-15 09:04:49 +00:00
time.rs Use raw pointers in std::sys::cloudabi when passing MaybeUninit values 2019-07-23 13:51:28 -04:00