Skip to content

Deduplicate translation of constant expressions and general operators in func_environ.rs #13501

@alexcrichton

Description

@alexcrichton

In #13487 the processing of ConstExpr has moved from the runtime to compiled code. As pointed out here, however, this results in some duplication of processing ConstOp internally within Wasmtime. It should in theory be possible to more-or-less implement From<ConstOp> for wasmparser::Operator and reuse the existing operator translation in FuncEnvironment instead of duplicating it in translate_const_expr. This isn't being done in #13487, but it's still a worthwhile thing to look into in the future. The main blocker right now is creation of the FuncValidator which translate_operator requires, likely resulting in modifications to wasmparser to create a special kind of validator for const expressions (or something like that)

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasmtimeIssues about wasmtime that don't fall into another label

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions