Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Do not reset ids

-12
-3
compiler-core/src/build/project_compiler.rs
··· 107 107 CheckpointState { 108 108 importable_modules: self.importable_modules.clone(), 109 109 defined_modules: self.defined_modules.clone(), 110 - ids: self.ids.fork(), 111 110 } 112 111 } 113 112 ··· 115 114 pub fn restore(&mut self, checkpoint: CheckpointState) { 116 115 self.importable_modules = checkpoint.importable_modules; 117 116 self.defined_modules = checkpoint.defined_modules; 118 - self.ids = checkpoint.ids; 119 117 } 120 118 121 119 pub fn mode(&self) -> Mode { ··· 503 501 pub struct CheckpointState { 504 502 importable_modules: im::HashMap<String, type_::Module>, 505 503 defined_modules: im::HashMap<String, PathBuf>, 506 - ids: UniqueIdGenerator, 507 504 }
-9
compiler-core/src/uid.rs
··· 15 15 Self::default() 16 16 } 17 17 18 - /// Fork the id generator into a new one that does not share the same 19 - /// internal id. It will increment independantly. Not to be used in the same 20 - /// compilation run. 21 - pub fn fork(&self) -> Self { 22 - let current = self.id.load(Ordering::Relaxed); 23 - let id = AtomicU64::new(current); 24 - Self { id: Arc::new(id) } 25 - } 26 - 27 18 pub fn next(&self) -> u64 { 28 19 self.id.fetch_add(1, Ordering::Relaxed) 29 20 }