Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

[interpreter] Implement basic reference types and multiple tables #2

Merged
merged 8 commits into from
Mar 24, 2018

Conversation

rossberg
Copy link
Member

@rossberg rossberg commented Mar 5, 2018

First go at implementing the baseline proposal:

  • types anyref and eqref (and internal nullref) and respective subtyping
  • instructions ref.null, ref.isnull, ref.eq, get_table, set_table
  • multiple tables
  • ref.null and ref N literals in assertion language
  • tests for all these

Opcode allocation should be considered preliminary.

@rossberg rossberg requested a review from lukewagner March 5, 2018 17:36
module: ( module <name>? <typedef>* <func>* <import>* <export>* <table>? <memory>? <global>* <elem>* <data>* <start>? )
<typedef>* <func>* <import>* <export>* <table>? <memory>? <global>* <elem>* <data>* <start>? ;; =
( module <typedef>* <func>* <import>* <export>* <table>? <memory>? <global>* <elem>* <data>* <start>? )
module: ( module <name>? <typedef>* <func>* <import>* <export>* <table>* <memory>? <global>* <elem>* <data>* <start>? )
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does elem_type need to change in this file as well to support eqref and anyref in addition to anyfunc?

Copy link

@cretz cretz Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, val_type I suppose (or rather, split it and change what param, result, local, etc can handle to include refs)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, you're right. Fixed.

Copy link
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, well, modulo the one null type issue, everything lgtm; happy to discuss null type at April CG meeting.

@rossberg rossberg merged commit 1d7785d into master Mar 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants