Skip to content

[AnyRef] AnyRefType Implementation - #637

Open
dnguyen-23 wants to merge 11 commits into
titzer:masterfrom
dnguyen-23:ooptype
Open

[AnyRef] AnyRefType Implementation#637
dnguyen-23 wants to merge 11 commits into
titzer:masterfrom
dnguyen-23:ooptype

Conversation

@dnguyen-23

@dnguyen-23 dnguyen-23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Added AnyRefType as a Type with a width. MachModule updated with functionality for installing AnyRefType for a target. Every target installs either Pointer, AnyRef, or both types at configureProgram. If no target specified, then the compiler defaults to using AnyRef where the width is 0.

@dnguyen-23 dnguyen-23 changed the title [oop] OopType Implementation [AnyRef] AnyRefType Implementation May 1, 2026
Comment thread aeneas/src/mach/MachModule.v3
// See LICENSE for details of Apache 2.0 license.

// Module which provides the "Pointer" and "AnyRef" types
component MachModule {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I like that this is factored out now.

Comment thread aeneas/src/main/Compiler.v3 Outdated
Comment thread aeneas/src/wasm/WasmGcTarget.v3 Outdated
def lookupAnyRefTypeMember(expr: VarExpr, etype: Type) -> VarBinding {
var name = expr.ident.name.image;
var op: Operator, typeParams: List<TypeParamType>;
var opcache = MachModule.getAnyRefType().opcache();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Is there a missing call here to lookup the operator in the opcache?

var optimize_bounds: bool; // activates bounds check elimination
var last_block: SsaBlock;

new() { }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Spurious constructor.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants