Skip to content

Optimize native array initialization #5

Description

@bamboo

Currently the code:

var foo: int[] = [1, 2, 3];

expands to:

var foo: int[] = new Array(new Object[] { 1, 2, 3 }).ToBuiltin(int) cast int[];

The compiler should detect the pattern and remove the array creation altogether.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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