Skip to content

M12 A runtime of your own, capstone B #21

Description

@tamnd

Twelve weeks, started at M4 and finished here. A metadata reader, a type loader, a collector and an IL interpreter in Rust, run against assemblies the real C# compiler produced.

Exit criterion. The three canonical programs run on a minimal core library the reader wrote, the conformance results are published with every failure named, and the wall is enumerated. The number this milestone is actually graded on is the count of blueprint defects it filed.

Content

  • Rungs 1 to 5: the PE image, the tables, tokens, signatures and method bodies, graded against System.Reflection.Metadata as an oracle
  • Rungs 6 to 9: type layout, straight line interpretation, calls and the stack, objects and virtual dispatch
  • Rung 10: a collector with an explicit shadow stack for roots, mark, sweep, then compaction with index fix up
  • Rungs 11 to 14: two pass exception dispatch, generics, interfaces, and the three canonical programs running

The wall

  • Try to run the real System.Private.CoreLib and fail
  • Publish the inventory: every runtime provided entry point reached, categorized into FCall, QCall, JIT intrinsic and layout assumption, and counted

Standing decision

Rust rather than a second C++ implementation, because a different memory model is what actually tests a specification. A blueprint sentence saying the collector may move an object is a sentence in C++ and a design problem in Rust, and the design problem is where the blueprint's silences become visible.

The wall is not a failure to be fixed later. System.Private.CoreLib is one half of a single product and the private contract binding it to the other half has never been published as far as anybody here can determine. Producing that list is a better outcome than passing would have been.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/capstoneThe pluggable runtime and the runtime of your ownarea/metadataPE, metadata tables, signatures, tokens and ILkind/milestoneA milestone checklist, tracking the issues that close itpriority/p2Wanted, not scheduled

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions