Skip to content

Expose predefined class_ids for efficient lookup? #758

@richarddd

Description

@richarddd

When checking if an object is an instance of a an added intrinsic object such a uint8 typed array it would be useful to check the class id directly.

We can access the class id via JS_GetClassID but we can't compare with anything as the already defined tags are stored in an private unnamed enum.

This is currently rather brittle in rquckjs as typed arrays are checked by looking at the constructor name in global scope and calling qjs::JS_IsInstanceOf

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