Skip to content

Change StateLoad/StoreQuad intrinsics and FuelVMInstruction to use untyped Pointer for for dest/source instead of TypedPointer(b256) #7571

@ironcev

Description

@ironcev

Currently, StateLoad/StoreQuad intrinsics and FuelVMInstructions use TypedPointer(b256) to represent memory destination and source pointers, respectively.

Indeed, we might see the dest/source memory locations as a sequence of b256 values. But even in that case, it would strictly be *[b256; N]. In reality, destination/source locations are just pointers and the len actually defines how much data we copy.

This distinction becomes more prominent with the new dynamic storage opcodes where we cannot talk about pointers to data of certain known size like b256 or their multipliers.

To unify the approaches and the validation of all FuelVMInstructions, the proposal is to model StateLoad/StoreQuad intrinsics and FuelVMInstructions to use untyped Pointer for modeling the memory destination and source pointer.

Metadata

Metadata

Assignees

Labels

compilerGeneral compiler. Should eventually become more specific as the issue is triagedcompiler: codegenEverything to do with IR->ASM, register allocation, etc.compiler: irIRgen and sway-ir including optimization passes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions