Skip to content

Commit

Permalink
address 2 of Daniel's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-emrich committed Sep 20, 2023
1 parent f28058c commit 0756270
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions cranelift/wasm/src/code_translator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2642,11 +2642,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(

// We have an actual handling block for this tag, rather than just forwarding.
// Detatch the continuation object by setting its parent to NULL.
let pointer_type = environ.pointer_type();
// TODO(frank-emrich): Would be nice to use a target-specific
// constant for the null pointer here, rather than the literal
// 0.
let null = builder.ins().iconst(pointer_type, 0);
let null = builder.ins().null(environ.pointer_type());
environ.typed_continuations_store_parent(builder, resumed_contobj, null);

state.pushn(&params);
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime/src/continuation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ pub fn resume(

// Note that this function updates the typed continuation store field in the
// VMContext (i.e., the currently running continuation), but does not update
// any parent pointers. The latter has to happend elsewhere.
// any parent pointers. The latter has to happen elsewhere.

// We mark `contobj` as the currently running one
instance.set_typed_continuations_store(contobj);
Expand Down

0 comments on commit 0756270

Please sign in to comment.