Skip to content

Commit

Permalink
Clarify any extra arguments on boot-constant dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jan 20, 2024
1 parent f651e9d commit 5dd9086
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/dispatchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ immutable, thus providing the optimizer with options.

### boot-constant
```
nqp::dispatch('boot-constant', $value);
nqp::dispatch('boot-constant', $value, …);
```
Take the first argument and produce it as the result, but also treat it as
a constant value that will always be produced (thus meaning the optimizer
could consider any pure code used to calculate the value as dead).

Ignores all other arguments: this allows calls to this dispatcher to be
using an existing capture by just inserting a value as the first argument,
thus removing the need to remove any superfluous arguments.

### boot-resume
```
nqp::dispatch('boot-resume');
Expand Down

0 comments on commit 5dd9086

Please sign in to comment.