Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fuzz: annotate chaos todos
Co-authored-by: Falk Zwimpfer <[email protected]>
Co-authored-by: Moritz Waser <[email protected]>
  • Loading branch information
3 people committed Apr 3, 2023
commit 5f2cfc18daafb2a560abfd71bdd57205e4d9b3e1
2 changes: 1 addition & 1 deletion cranelift/control/src/chaos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl ControlPlane {
}
}

/// TODO: should be explained
/// TODO chaos: should be explained
pub fn no_chaos() -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

I think this body makes sense as the Default impl (an empty ControlPlane should have no affect on Cranelift's behavior as it is today -- this also implies how to use bools, i.e. false should make no change).

Self::new(Vec::new(), false)
}
Expand Down
6 changes: 3 additions & 3 deletions crates/cranelift/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Default for CompilerContext {
/// A compiler that compiles a WebAssembly module with Compiler, translating
/// the Wasm to Compiler IR, optimizing it and then translating to assembly.
pub(crate) struct Compiler {
// TODO: can a context be requested in different orders?
// TODO chaos: can a context be requested in different orders?
contexts: Mutex<Vec<CompilerContext>>,
isa: OwnedTargetIsa,
linkopts: LinkOptions,
Expand Down Expand Up @@ -117,7 +117,7 @@ impl Compiler {
}

fn take_context(&self) -> CompilerContext {
// TODO: In chaos mode, we want to construct the ControlPlane ourself
// TODO: chaos In chaos mode, we want to construct the ControlPlane ourself
let candidate = self.contexts.lock().unwrap().pop();
candidate
.map(|mut ctx| {
Expand All @@ -138,7 +138,7 @@ impl Compiler {
}

fn save_context(&self, ctx: CompilerContext) {
// TODO: In chaos mode, we do not want to recycle contexts
// TODO chaos: In chaos mode, we do not want to recycle contexts
self.contexts.lock().unwrap().push(ctx);
}

Expand Down