Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G general-issue-tracker
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mumu
  • general-issue-tracker
  • Issues
  • #36
Closed
Open
Issue created Jun 23, 2015 by John Zhang@u5157779Developer

Metacircular Client Interface

Created by: wks

It has been proposed long ago that "everything the API can do should also be possible in the Mu IR".

This issue maintains a checklist of features not in the Mu IR. These functions should be gradually added to the IR.

Features in the API but not the IR:

  • bundle loading
  • stack introspection: current_func_ver, current_instruction, dump_keepalives
  • OSR: pop_frame, push_frame
  • Handle traps and undefined functions in Mu IR. It depends on how the Mu VM itself is implemented.
  • Handle watchpoint in Mu IR: an instruction which is a no-op when disabled, but a (maybe limited kind of) Mu function call when enabled.

Things that can be done dynamically via handles in the API, but can only be done statically in the IR. I am not sure how dynamic Mu should be, or need to be, because some of the items below can be worked around with some Mu IR code, such as maintaining a hash table implemented in Mu IR, or writing wrapper functions.

  • Opaque handle type: a handle that holds any Mu value. ref<T> can be a candidate for this purpose.
  • Getting a Mu constant value (including constants, globals and functions) by its ID. This is a kind of introspection.
    • This can be done with a type argument: %c = GET_CONST <@T> %id, %c is a @T
    • Or return a handle: %ch = GET_CONST_H %id, %ch is a ref<void>
  • Creating Mu heap objects by a type ID.
  • Calling a Mu function (or constructing a Mu frame) with both the callee and the arguments as handles. This allows calling a Mu function with a run-time-determined arity and arg types.
  • Dump keepalive variables.
    • This can be done with a type argument: %sixth_ka = GET_KEEPALIVE <@T> %frame 6
    • or return handle: %sixth_ka_handle = GET_KEEPALIVE_H %frame 6
Assignee
Assign to
Time tracking