-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Builtins] Replace 'EvaluationResult' with 'BuiltinResult' (#5926)
This replaces several `Emitter (EvaluationResult a)` occurrences with `BuiltinResult`, something that I missed the last [time](#5728). In addition to that, it also replaces `EvaluationResult` with `BuiltinResult` in general. It doesn't matter performance-wise (modulo a regression that we didn't notice some time ago), but `BuiltinResult`, unlike `EvaluationResult`, allows one to attach an error message to a failure, which we do in this PR as well, meaning we now get better error messages. And we also now respect the operational vs structural evaluation errors distinction. The PR also replaces `Emitter` with `BuiltinResult`. And makes the GHC Core of builtins smaller by making error-throwing functions (not) inline (see `Note [INLINE and OPAQUE on error-related definitions]` for details).
- Loading branch information
1 parent
cc12361
commit a94bffd
Showing
19 changed files
with
322 additions
and
216 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...og.d/20240618_023306_effectfully_replace_EvaluationResult_with_BuiltinResult.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Changed | ||
|
||
- Forbade using `EvaluationResult` in the builtins code in favor of `BuiltinResult` in #5926, so that builtins throw errors with more helpful messages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a94bffd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.05
.validation-auction_2-3
878.2
μs832.5
μs1.05
validation-auction_2-4
668.3
μs632.2
μs1.06
validation-crowdfunding-success-1
218.2
μs205.2
μs1.06
validation-game-sm-success_1-1
412.2
μs386.5
μs1.07
validation-game-sm-success_1-2
209.4
μs198.9
μs1.05
validation-game-sm-success_1-4
238.1
μs224.6
μs1.06
validation-game-sm-success_2-1
411.2
μs387.8
μs1.06
validation-game-sm-success_2-2
210
μs198.8
μs1.06
validation-game-sm-success_2-4
239.1
μs225.1
μs1.06
validation-game-sm-success_2-6
238.1
μs225
μs1.06
validation-multisig-sm-1
422.4
μs397.5
μs1.06
validation-multisig-sm-2
413.2
μs386.4
μs1.07
validation-multisig-sm-3
413.6
μs390.2
μs1.06
validation-multisig-sm-4
417.2
μs395.9
μs1.05
validation-multisig-sm-5
591.1
μs562.7
μs1.05
validation-multisig-sm-6
421.8
μs396.5
μs1.06
validation-multisig-sm-7
409.3
μs385.1
μs1.06
validation-multisig-sm-8
413.6
μs393.4
μs1.05
validation-multisig-sm-9
419.2
μs394.7
μs1.06
validation-multisig-sm-10
593.4
μs563.3
μs1.05
validation-prism-1
176.8
μs167.8
μs1.05
validation-prism-2
434.9
μs413
μs1.05
validation-pubkey-1
149.3
μs141.2
μs1.06
validation-stablecoin_1-2
204.7
μs193.9
μs1.06
validation-stablecoin_1-4
217.6
μs205.2
μs1.06
validation-stablecoin_1-6
269.3
μs253.9
μs1.06
validation-stablecoin_2-2
204.9
μs194
μs1.06
validation-stablecoin_2-4
217.3
μs205.2
μs1.06
validation-token-account-1
201.2
μs190.2
μs1.06
validation-token-account-2
357.6
μs335.7
μs1.07
validation-uniswap-1
438.6
μs417.3
μs1.05
validation-uniswap-2
234.2
μs220.4
μs1.06
validation-uniswap-4
351
μs333.5
μs1.05
validation-uniswap-6
338.8
μs319.9
μs1.06
This comment was automatically generated by workflow using github-action-benchmark.
CC: @IntersectMBO/plutus-core