Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box.getReg #772

Closed
SethDusek opened this issue Sep 20, 2024 · 0 comments · Fixed by #773
Closed

Box.getReg #772

SethDusek opened this issue Sep 20, 2024 · 0 comments · Fixed by #773
Assignees
Labels
6.0 Functionality needed for Ergo v6.0 (interpreter v3) Bounty - 200 ERG

Comments

@SethDusek
Copy link
Collaborator

SethDusek commented Sep 20, 2024

Add v6.0 getReg support:

{
   val x = SELF
   x.getReg[Long](0).get == SELF.value &&
   x.getReg[Coll[(Coll[Byte], Long)]](2).get == SELF.tokens &&
   x.getReg[Int](9).isEmpty
}

sigma-rust already has support for non-constant register indices in getReg, but does not allow all numeric types as input (only Byte). Add support for numeric indices in getReg which should only be enabled on v6.0 activation

Also fix getReg/ExtractRegister not doing type-checking. For example the following should fail if R4 is a type other than Int, but it does not currently:

{
    SELF.R4[Int].isDefined
}
@SethDusek SethDusek added the 6.0 Functionality needed for Ergo v6.0 (interpreter v3) label Sep 20, 2024
@SethDusek SethDusek self-assigned this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.0 Functionality needed for Ergo v6.0 (interpreter v3) Bounty - 200 ERG
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants