Skip to content

feat: add ability to create arrays with capacity for __newArray in loader #2024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Sep 4, 2021

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Aug 7, 2021

  • Usual __newArray usage
const ptr = __newArray(Array_ID, [1, 2, 3])

which allocate and fill wasm array by 1, 2, 3 values

  • New __newArray usage:
const ptr = __newArray(Array_ID, 64);

or

const ptr = __newArray(Array_ID); // same as __newArray(Array_ID, 0)

which only allocate array with some capacity without filling array.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@MaxGraey MaxGraey changed the title feat: add ability create arrays with capacity for __newArray in loader feat: add ability to create arrays with capacity for __newArray in loader Aug 7, 2021
@MaxGraey MaxGraey requested a review from dcodeIO August 7, 2021 13:10
@MaxGraey MaxGraey requested a review from dcodeIO August 10, 2021 07:30
@MaxGraey MaxGraey merged commit 8eaa44a into AssemblyScript:main Sep 4, 2021
@MaxGraey MaxGraey deleted the opt-loader-new-array branch September 4, 2021 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants