-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Ensure Unique Keys in @memoize Decorator #20218
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, the key used in the @memoize decorator was not unique. By including the method's arguments in the key, we now ensure that the key is unique for each call. Fixes emscripten-core#20217
sbc100
approved these changes
Sep 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Although all this code is internal to emscripten.. its not really designed to be called by external code. What code are you writing that uses this?
vikram-kangotra
added a commit
to vikram-kangotra/emscripten
that referenced
this pull request
Sep 10, 2023
In this commit, we introduce functionality to read strings from a custom section in WebAssembly modules. This is crucial for enabling Rust code to work seamlessly with Emscripten, as Rust writes to custom sections rather than the em_asm section (emscripten-core#13838 (comment)). The changes made in this commit include: - The addition of the `get_wasm_custom_section` function, which retrieves custom sections by name from a WebAssembly module. - Reading and parsing strings from the specified custom section. - Storing the extracted strings in a dictionary for further processing. This enhancement addresses an issue emscripten-core#13838 where Rust code interacts with Emscripten, and the ability to read strings from custom sections is necessary for proper integration. This commit is a work in progress, as we still need to determine the correct offset value for the `string_key` variable. Please note that this commit depends on the changes introduced in Merge Request emscripten-core#20218.
vikram-kangotra
added a commit
to vikram-kangotra/emscripten
that referenced
this pull request
Sep 10, 2023
In this commit, we introduce functionality to read strings from a custom section in WebAssembly modules. This is crucial for enabling Rust code to work seamlessly with Emscripten, as Rust writes to custom sections rather than the em_asm section (emscripten-core#13838 (comment)). The changes made in this commit include: - The addition of the `get_wasm_custom_section` function, which retrieves custom sections by name from a WebAssembly module. - Reading and parsing strings from the specified custom section. - Storing the extracted strings in a dictionary for further processing. This enhancement addresses an issue emscripten-core#13838 where Rust code interacts with Emscripten, and the ability to read strings from custom sections is necessary for proper integration. This commit is a work in progress, as we still need to determine the correct offset value for the `string_key` variable. Please note that this commit depends on the changes introduced in Merge Request emscripten-core#20218.
vikram-kangotra
added a commit
to vikram-kangotra/emscripten
that referenced
this pull request
Sep 10, 2023
In this commit, we introduce functionality to read strings from a custom section in WebAssembly modules. This is crucial for enabling Rust code to work seamlessly with Emscripten, as Rust writes to custom sections rather than the em_asm section (emscripten-core#13838 (comment)). The changes made in this commit include: - The addition of the `get_wasm_custom_section` function, which retrieves custom sections by name from a WebAssembly module. - Reading and parsing strings from the specified custom section. - Storing the extracted strings in a dictionary for further processing. This enhancement addresses an issue emscripten-core#13838 where Rust code interacts with Emscripten, and the ability to read strings from custom sections is necessary for proper integration. This commit is a work in progress, as we still need to determine the correct offset value for the `string_key` variable. Please note that this commit depends on the changes introduced in Merge Request emscripten-core#20218.
vikram-kangotra
added a commit
to vikram-kangotra/emscripten
that referenced
this pull request
Sep 10, 2023
In this commit, we introduce functionality to read strings from a custom section in WebAssembly modules. This is crucial for enabling Rust code to work seamlessly with Emscripten, as Rust writes to custom sections rather than the em_asm section (emscripten-core#13838 (comment)). The changes made in this commit include: - The addition of the `get_wasm_custom_section` function, which retrieves custom sections by name from a WebAssembly module. - Reading and parsing strings from the specified custom section. - Storing the extracted strings in a dictionary for further processing. This enhancement addresses an issue emscripten-core#13838 where Rust code interacts with Emscripten, and the ability to read strings from custom sections is necessary for proper integration. This commit is a work in progress, as we still need to determine the correct offset value for the `string_key` variable. Please note that this commit depends on the changes introduced in Merge Request emscripten-core#20218.
It's required for this MR: #20219 |
vikram-kangotra
added a commit
to vikram-kangotra/emscripten
that referenced
this pull request
Sep 10, 2023
In this commit, we introduce functionality to read strings from a custom section in WebAssembly modules. This is crucial for enabling Rust code to work seamlessly with Emscripten, as Rust writes to custom sections rather than the em_asm section (emscripten-core#13838 (comment)). The changes made in this commit include: - The addition of the `get_wasm_custom_section` function, which retrieves custom sections by name from a WebAssembly module. - Reading and parsing strings from the specified custom section. - Storing the extracted strings in a dictionary for further processing. This enhancement addresses an issue emscripten-core#13838 where Rust code interacts with Emscripten, and the ability to read strings from custom sections is necessary for proper integration. This commit is a work in progress, as we still need to determine the correct offset value for the `string_key` variable. Please note that this commit depends on the changes introduced in Merge Request emscripten-core#20218.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the key used in the @memoize decorator was not unique. By including the method's arguments in the key, we now ensure that the key is unique for each call.
Fixes #20217