Skip to content

Commit

Permalink
Update the pointers implementation guide
Browse files Browse the repository at this point in the history
- Remove warning about specification deficiency
- Describe resize evaluation implementation
  • Loading branch information
gnidan committed Jun 25, 2024
1 parent 79c98e9 commit 5a17935
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ Evaluating remainders:
sourceFile => sourceFile.getFunction("evaluateArithmeticRemainder")
} />

## Evaluating resize expressions

This schema provides the `{ "$sized<N>": <expression> }` construct to allow
explicitly resizing a subexpression. This implementation uses the
[`Data.prototype.resizeTo()`](/docs/implementation-guides/pointers/types/data-and-machines)
method to perform this operation.

<CodeListing
packageName="@ethdebug/pointers"
sourcePath="src/evaluate.ts"
extract={
sourceFile => sourceFile.getFunction("evaluateResize")
} />

## Evaluating keccak256 hashes

Many data types in storage are addressed by way of keccak256 hashing. This
Expand All @@ -137,15 +151,6 @@ See Solidity's
documentation for an example of how one high-level EVM language makes heavy
use of hashing to allocate persistent data.

:::warning
This area of the schema is likely incomplete and could still use additional
specification. Be warned that, while this implementation may match the schema
itself, it may not be fully sufficient for expressing all kinds of data
allocations.

Please stay tuned as this work continues being refined.
:::

<CodeListing
packageName="@ethdebug/pointers"
sourcePath="src/evaluate.ts"
Expand Down

0 comments on commit 5a17935

Please sign in to comment.