Skip to content

frozen constant objects should live in the data segment #11

@toshok

Description

@toshok

similar to #10.

pirouette does the following to map objective-c enums:

var enum = Object.create(null);
Object.defineProperty (enum, "foo", 5);
...
Object.freeze(enum);

esprima does the same with its syntax object, which is a set of constant strings.

If we can statically determine that an object is constructed and populated with constants - and then frozen, we can move the construction/population out of code entirely, and put it in the data segment of the executable instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions