Skip to content

Polymorphic externals #113

Open
Open
@Champii

Description

@Champii

We are currently highly limited by the externals definitions, that can only return concrete types.

We want to be able to call malloc for instance to allocate contiguous memory on the heap, and we want to do that for any arbitrary sized type.
Actually, the prototype definition is too strict and doesn't allow for generic types:

extern malloc: Int64 => String

We want to be able to alias the void * returned by malloc to any type we want.

extern malloc: Int64 => a

This implies to rework the prototype_call mechanism to be more like function_call with signature resolution and mangling/monomorphization

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions