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

Compiler Milestone 3 #3769

Open
9 of 22 tasks
Tracked by #3692
SupunS opened this issue Feb 14, 2025 · 2 comments
Open
9 of 22 tasks
Tracked by #3692

Compiler Milestone 3 #3769

SupunS opened this issue Feb 14, 2025 · 2 comments
Assignees
Labels

Comments

@SupunS
Copy link
Member

SupunS commented Feb 14, 2025

Needed for realistic FT

In order of complexity and priority:

  • Compiler + VM:

    • Function expressions (closure functions) (needed for meta data / view resolver?) @turbolent
  • Entitlements (subset needed for FT; only access modifier?) @SupunS

    • Needs entitlements in static types (might need storage migration; alternative: use sema type)
  • Standard library functionality / function injection (mostly, no work in compiler / VM. Should be fairly easy:

    • Type
    • Address
    • Account.Storage (e.g. copy)
    • Account.Capabilities (e.g. borrow)
    • Number conversion functions (e.g. UFix64())
  • Computed fields:

    • Contract account field
    • Resource owner (uuid?) field

Tech-debt

Optimizations

  • Disable pre-loading types in the VM for executable (unnecessarily loads all types, even if they are not used)
  • Maybe produce an un-encoded/decoded executable directly from the compiler, to avoid encoding-decoding times (e.g: for static types, etc).

Done

@turbolent
Copy link
Member

turbolent commented Feb 27, 2025

Questions / discussion points:

  • Value / stdlib code reuse:
    • Refactor existing code and make it reusable?
    • Copy/reimplement temporarily? End goal: get rid of interpreter.
      • Concerns: 100% re-implementation.
      • Also switch interpreter to use "VM values" (maybe better than refactoring to make it reusable?)
    • Easy for primitive values, harder for more complex data structures, most difficult is stdlib (mostly in stdlib, account storage, cap cons, etc.)
  • How to "re-use" tests?
    • Switch with flag
    • Keep tests as-is, convert from interpreter value to VM value and back (for result)

@turbolent turbolent mentioned this issue Feb 27, 2025
20 tasks
@turbolent
Copy link
Member

Created #3804 for the remaining items / next milestone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants