Skip to content

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