Skip to content

AssemblyScript conflicts #43

Closed
Closed
@Dudeplayz

Description

@Dudeplayz

This issue collects conflicts of the current code base and AssemblyScript. See #35 and the research project.

Found problems:

  1. Data types must be specified explicitly
  2. AssemblyScript has a restricted data type set
    • The current types file can be adapted to keep JS compatibility
  3. Interfaces are currently not supported. Breaks e.g. ICPU and CPU. (further research required)
  4. Declaring variables as constructor parameters brings up memory access errors because the instantiation works differently. E.g. CPU with progMem, which has to be declared outside the constructor and the following instantiations have to be done in the constructor body:
    constructor(progMem: Uint16Array, private sramBytes: u64 = 8192) {
        this.progMem = progMem;
        this.progBytes = Uint8Array.wrap(this.progMem.buffer);
        this.pc22Bits = this.progBytes.length > 0x20000;
        this.reset();
    }

(The research is still ongoing.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions