Skip to content

asm2wasm: disable mutable globals #2011

@mnater

Description

@mnater

Hi

Since asm.js requires globals to be mutable asm2wasm converts all imported globals to mutable globals (https://github.com/WebAssembly/binaryen/blob/master/src/asm2wasm.h#L922).

This is not necessary if the imported globals isn't reassigned a new value. I don't reassign values to imported globals (and if so I'd copy the value to a local variable). Is there a way to disable this assignment upon compiling from asm2wasm or when optimizing code?

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