Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiler/build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ roc_gen = { path = "../gen" }
roc_reporting = { path = "../reporting" }
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1.0"
libloading = "0.6"
tempfile = "3.1.0"
Expand Down
2 changes: 1 addition & 1 deletion compiler/can/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ roc_builtins = { path = "../builtins" }
ven_graph = { path = "../../vendor/pathfinding" }
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"

[dev-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion compiler/collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ edition = "2018"
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
wyhash = "0.3"
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
hashbrown = { version = "0.11.2", features = [ "bumpalo" ] }
2 changes: 2 additions & 0 deletions compiler/collections/src/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ pub type SendMap<K, V> = im::hashmap::HashMap<K, V, BuildHasher>;

pub type SendSet<K> = im::hashset::HashSet<K, BuildHasher>;

pub type BumpMap<'a, K, V> = hashbrown::HashMap<K, V, BuildHasher, hashbrown::BumpWrapper<'a>>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great name! 😄


pub fn arena_join<'a, I>(arena: &'a Bump, strings: &mut I, join_str: &str) -> String<'a>
where
I: Iterator<Item = &'a str>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/fmt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ roc_module = { path = "../module" }
roc_parse = { path = "../parse" }
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions compiler/gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ roc_solve = { path = "../solve" }
roc_mono = { path = "../mono" }
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"
either = "1.6.1"
# NOTE: rtfeldman/inkwell is a fork of TheDan64/inkwell which does not change anything.
Expand Down Expand Up @@ -53,5 +53,5 @@ indoc = "0.3.3"
quickcheck = "0.8"
quickcheck_macros = "0.8"
tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded"] }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
libc = "0.2"
4 changes: 2 additions & 2 deletions compiler/gen_dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ roc_solve = { path = "../solve" }
roc_mono = { path = "../mono" }
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"
target-lexicon = "0.10"
libloading = "0.6"
Expand All @@ -37,7 +37,7 @@ indoc = "0.3.3"
quickcheck = "0.8"
quickcheck_macros = "0.8"
tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded"] }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
libc = "0.2"
tempfile = "3.1.0"
itertools = "0.9"
Expand Down
2 changes: 1 addition & 1 deletion compiler/load/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ roc_solve = { path = "../solve" }
roc_mono = { path = "../mono" }
roc_reporting = { path = "../reporting" }
ven_pretty = { path = "../../vendor/pretty" }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"
parking_lot = { version = "0.11", features = ["deadlock_detection"] }
crossbeam = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion compiler/module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
[dependencies]
roc_region = { path = "../region" }
roc_collections = { path = "../collections" }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"
lazy_static = "1.4"

Expand Down
3 changes: 2 additions & 1 deletion compiler/mono/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ roc_unify = { path = "../unify" }
roc_solve = { path = "../solve" }
roc_problem = { path = "../problem" }
ven_pretty = { path = "../../vendor/pretty" }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
hashbrown = { version = "0.11.2", features = [ "bumpalo" ] }
ven_ena = { path = "../../vendor/ena" }
linked-hash-map = "0.5.4"

Expand Down
14 changes: 9 additions & 5 deletions compiler/mono/src/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::layout::{
};
use bumpalo::collections::Vec;
use bumpalo::Bump;
use roc_collections::all::{default_hasher, MutMap, MutSet};
use roc_collections::all::{default_hasher, BumpMap, MutMap, MutSet};
use roc_module::ident::{ForeignSymbol, Lowercase, TagName};
use roc_module::low_level::LowLevel;
use roc_module::symbol::{IdentIds, ModuleId, Symbol};
Expand Down Expand Up @@ -126,8 +126,8 @@ pub struct Proc<'a> {
pub enum HostExposedLayouts<'a> {
NotHostExposed,
HostExposed {
rigids: MutMap<Lowercase, Layout<'a>>,
aliases: MutMap<Symbol, Layout<'a>>,
rigids: BumpMap<'a, Lowercase, Layout<'a>>,
aliases: BumpMap<'a, Symbol, Layout<'a>>,
},
}

Expand Down Expand Up @@ -1833,7 +1833,8 @@ fn specialize_external<'a>(
let host_exposed_layouts = if host_exposed_variables.is_empty() {
HostExposedLayouts::NotHostExposed
} else {
let mut aliases = MutMap::default();
let mut aliases =
hashbrown::HashMap::with_hasher_in(default_hasher(), hashbrown::BumpWrapper(env.arena));

for (symbol, variable) in host_exposed_variables {
let layout = layout_cache
Expand All @@ -1843,7 +1844,10 @@ fn specialize_external<'a>(
}

HostExposedLayouts::HostExposed {
rigids: MutMap::default(),
rigids: hashbrown::HashMap::with_hasher_in(
default_hasher(),
hashbrown::BumpWrapper(env.arena),
),
aliases,
}
};
Expand Down
2 changes: 1 addition & 1 deletion compiler/parse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2018"
roc_collections = { path = "../collections" }
roc_region = { path = "../region" }
roc_module = { path = "../module" }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"
encode_unicode = "0.3"

Expand Down
2 changes: 1 addition & 1 deletion compiler/parse/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.3"
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }

[dependencies.roc_parse]
path = ".."
Expand Down
2 changes: 1 addition & 1 deletion compiler/reporting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inlinable_string = "0.1"
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
distance = "0.4.0"
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }

[dev-dependencies]
roc_constrain = { path = "../constrain" }
Expand Down
2 changes: 1 addition & 1 deletion compiler/solve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ indoc = "0.3.3"
tempfile = "3.1.0"
quickcheck = "0.8"
quickcheck_macros = "0.8"
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
2 changes: 1 addition & 1 deletion compiler/str/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ roc_types = { path = "../types" }
roc_can = { path = "../can" }
roc_unify = { path = "../unify" }
roc_problem = { path = "../problem" }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }

[dev-dependencies]
roc_constrain = { path = "../constrain" }
Expand Down
4 changes: 2 additions & 2 deletions compiler/test_gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ roc_build = { path = "../build" }
roc_std = { path = "../../roc_std" }
im = "14" # im and im-rc should always have the same version!
im-rc = "14" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"
either = "1.6.1"
indoc = "0.3.3"
Expand Down Expand Up @@ -58,4 +58,4 @@ maplit = "1.0.1"
quickcheck = "0.8"
quickcheck_macros = "0.8"
tokio = { version = "0.2", features = ["blocking", "fs", "sync", "rt-threaded"] }
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
2 changes: 1 addition & 1 deletion editor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ roc_solve = { path = "../compiler/solve" }
ven_graph = { path = "../vendor/pathfinding" }
im = "15" # im and im-rc should always have the same version!
im-rc = "15" # im and im-rc should always have the same version!
bumpalo = { version = "3.2", features = ["collections"] }
bumpalo = { version = "3.6.1", features = ["collections"] }
inlinable_string = "0.1"
arraystring = "0.3.0"
libc = "0.2"
Expand Down