Skip to content

feat: optimize the active init operation of zero-initialized memory of makeFieldInitializationInConstructor#2948

Closed
KKiiim wants to merge 11 commits into
AssemblyScript:mainfrom
KKiiim:opt-zero-init
Closed

feat: optimize the active init operation of zero-initialized memory of makeFieldInitializationInConstructor#2948
KKiiim wants to merge 11 commits into
AssemblyScript:mainfrom
KKiiim:opt-zero-init

Conversation

@KKiiim

@KKiiim KKiiim commented Sep 17, 2025

Copy link
Copy Markdown
  • Reduce unnecessary zero-initialization memory in the constructor

  • According to wasm-spec, grown memories should initialized with value 0x00

  • I've read the contributing guidelines

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

@KKiiim KKiiim changed the title feat: remove the active init operation of zero-initialized memory of makeFieldInitializationInConstructor feat: optimize the active init operation of zero-initialized memory of makeFieldInitializationInConstructor Sep 17, 2025

@HerrCai0907 HerrCai0907 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optimization goal LGTM. But I think we should only check whether the field is straightly initialized by zero and ignore it.

Comment thread src/compiler.ts Outdated
Comment thread src/compiler.ts Outdated
Comment thread src/compiler.ts Outdated
Comment thread src/compiler.ts
@KKiiim

KKiiim commented Sep 25, 2025

Copy link
Copy Markdown
Author

@CountBleck Could you please have a look on this PR (^_^)

@CountBleck CountBleck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems mostly okay, but I'm wondering what all the removed $~lib/arraybuffer/ArrayBufferView#set:buffer is about...what is that setter function supposed to be doing anyway?

I'd like @MaxGraey to sign off before merging.

Comment thread src/compiler.ts Outdated
@KKiiim KKiiim requested a review from CountBleck October 2, 2025 07:01
Comment thread src/compiler.ts Outdated
HerrCai0907 pushed a commit to wasm-ecosystem/warpo that referenced this pull request Oct 11, 2025
@KKiiim

KKiiim commented Oct 11, 2025

Copy link
Copy Markdown
Author

@coderabbitai summary

@KKiiim

KKiiim commented Oct 15, 2025

Copy link
Copy Markdown
Author

Ping @MaxGraey @CountBleck Thanks for review again

@KKiiim KKiiim requested a review from HerrCai0907 October 25, 2025 08:56
@KKiiim

KKiiim commented Oct 30, 2025

Copy link
Copy Markdown
Author

Ping for review @MaxGraey @CountBleck @HerrCai0907

@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!

@github-actions github-actions Bot added the stale label Dec 29, 2025
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

This PR has been automatically closed due to lack of recent activity, but feel free to reopen it as long as you merge in the main branch afterwards.

@github-actions github-actions Bot closed this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants