Title: Get pointer from instance in JS · Issue #817 · AssemblyScript/assemblyscript · GitHub
Open Graph Title: Get pointer from instance in JS · Issue #817 · AssemblyScript/assemblyscript
X Title: Get pointer from instance in JS · Issue #817 · AssemblyScript/assemblyscript
Description: If I have an instance of a class defined in WASM and instantiated in JavaScript, is there any way to get its address? The loader unit tests suggest that it's possible, but I can't replicate it. For example (from that test): var car = new...
Open Graph Description: If I have an instance of a class defined in WASM and instantiated in JavaScript, is there any way to get its address? The loader unit tests suggest that it's possible, but I can't replicate it. For...
X Description: If I have an instance of a class defined in WASM and instantiated in JavaScript, is there any way to get its address? The loader unit tests suggest that it's possible, but I can't replicate...
Opengraph URL: https://github.com/AssemblyScript/assemblyscript/issues/817
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get pointer from instance in JS","articleBody":"If I have an instance of a class defined in WASM and instantiated in JavaScript, is there any way to get its address? The loader unit tests [suggest that it's possible](https://github.com/AssemblyScript/assemblyscript/blob/master/lib/loader/tests/index.js#L150), but I can't replicate it.\r\n\r\nFor example (from that test):\r\n\r\n```typescript\r\nvar car = new module.Car(5);\r\n//...\r\nmodule.__release(car); // uses Car.prototype.valueOf to obtain `thisPtr`\r\n```\r\n\r\nHow does `__release()` get `thisPtr`? Is there some way of extracting is programmatically?","author":{"url":"https://github.com/yourheropaul","@type":"Person","name":"yourheropaul"},"datePublished":"2019-09-05T16:14:23Z","url":"https://github.com/AssemblyScript/assemblyscript/issues/817"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9a654897-c08f-4210-bf68-de84113a2399 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3DE:1CDFD1:114CC:18A0C:6B005FF7 |
| html-safe-nonce | 8450f017dfaff117281985576434f867ed5e2bb61ddc67c0a1941d72219fed3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0RFOjFDREZEMToxMTRDQzoxOEEwQzo2QjAwNUZGNyIsInZpc2l0b3JfaWQiOiI4NjEyODI5MzU5MzQ4MTQ2MTY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1f57dc7b249156bd55d1e9a2694973c19d2bd61eed629281729efc8696f42df7 |
| hovercard-subject-tag | issue:489863223 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/AssemblyScript/assemblyscript/817/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6e35151482c29b7f86b08ee2b802adb043951830645f418092caf46cc5913cb7/AssemblyScript/assemblyscript/issues/817 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6e35151482c29b7f86b08ee2b802adb043951830645f418092caf46cc5913cb7/AssemblyScript/assemblyscript/issues/817 |
| og:image:alt | If I have an instance of a class defined in WASM and instantiated in JavaScript, is there any way to get its address? The loader unit tests suggest that it's possible, but I can't replicate it. For... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yourheropaul |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| turbo-cache-control | no-preview |
| go-import | github.com/AssemblyScript/assemblyscript git https://github.com/AssemblyScript/assemblyscript.git |
| octolytics-dimension-user_id | 28916798 |
| octolytics-dimension-user_login | AssemblyScript |
| octolytics-dimension-repository_id | 105138356 |
| octolytics-dimension-repository_nwo | AssemblyScript/assemblyscript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 105138356 |
| octolytics-dimension-repository_network_root_nwo | AssemblyScript/assemblyscript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width