{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/design/issues/682","repository_url":"https://api.github.com/repos/WebAssembly/design","labels_url":"https://api.github.com/repos/WebAssembly/design/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/design/issues/682/comments","events_url":"https://api.github.com/repos/WebAssembly/design/issues/682/events","html_url":"https://github.com/WebAssembly/design/pull/682","id":153336865,"number":682,"title":"Add JS Memory and Table API and multi-import/export of these","user":{"login":"lukewagner","id":9660325,"avatar_url":"https://avatars.githubusercontent.com/u/9660325?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewagner","html_url":"https://github.com/lukewagner","followers_url":"https://api.github.com/users/lukewagner/followers","following_url":"https://api.github.com/users/lukewagner/following{/other_user}","gists_url":"https://api.github.com/users/lukewagner/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewagner/subscriptions","organizations_url":"https://api.github.com/users/lukewagner/orgs","repos_url":"https://api.github.com/users/lukewagner/repos","events_url":"https://api.github.com/users/lukewagner/events{/privacy}","received_events_url":"https://api.github.com/users/lukewagner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/WebAssembly/design/milestones/2","html_url":"https://github.com/WebAssembly/design/milestones/MVP","labels_url":"https://api.github.com/repos/WebAssembly/design/milestones/2/labels","id":1138963,"number":2,"title":"MVP","description":"See [here](https://github.com/WebAssembly/design/blob/master/MVP.md) for details.","creator":{"login":"sunfishcode","id":4503403,"avatar_url":"https://avatars.githubusercontent.com/u/4503403?v=3","gravatar_id":"","url":"https://api.github.com/users/sunfishcode","html_url":"https://github.com/sunfishcode","followers_url":"https://api.github.com/users/sunfishcode/followers","following_url":"https://api.github.com/users/sunfishcode/following{/other_user}","gists_url":"https://api.github.com/users/sunfishcode/gists{/gist_id}","starred_url":"https://api.github.com/users/sunfishcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunfishcode/subscriptions","organizations_url":"https://api.github.com/users/sunfishcode/orgs","repos_url":"https://api.github.com/users/sunfishcode/repos","events_url":"https://api.github.com/users/sunfishcode/events{/privacy}","received_events_url":"https://api.github.com/users/sunfishcode/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":71,"state":"open","created_at":"2015-05-29T00:13:49Z","updated_at":"2016-05-05T22:06:29Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-05-05T22:06:29Z","updated_at":"2016-05-06T01:06:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WebAssembly/design/pulls/682","html_url":"https://github.com/WebAssembly/design/pull/682","diff_url":"https://github.com/WebAssembly/design/pull/682.diff","patch_url":"https://github.com/WebAssembly/design/pull/682.patch"},"body":"This PR adds first-class `WebAssembly.Memory` and `WebAssembly.Table` objects along with the ability for modules to import and export any number of these from a given module.  This generalizes the current linear memory / table design wherein a module cannot import linear memory and is limited to 1 linear memory / table for internal use and export.  This PR also generalizes tables to be resizable (symmetric to memory) and parameterized by an element type which is, in the MVP, restricted to either \"any callable function\" or \"any callable function with a given signature\".  Since there can be multiple memories/tables, the memory and table opcodes are given an index immediate.\r\n\r\nWith this PR, it should be possible to implement dynamic linking in a toolchain so this PR also updates DynamicLinking.md to explain how.  See the note at the bottom of DynamicLinking.md for an obvious omission which we should consider adding (viz., constant-value imports/exports, which would be used to position data segments and function-table-elements at load time).\r\n\r\nThis PR also punts on the precise way to describe a signature in JS when calling the `WebAssembly.Table` constructor, saving that for its own PR where we can bikeshed; see TODO in `ToTypeDescriptor`."},"comment":{"url":"https://api.github.com/repos/WebAssembly/design/issues/comments/217322517","html_url":"https://github.com/WebAssembly/design/pull/682#issuecomment-217322517","issue_url":"https://api.github.com/repos/WebAssembly/design/issues/682","id":217322517,"user":{"login":"jfbastien","id":298127,"avatar_url":"https://avatars.githubusercontent.com/u/298127?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbastien","html_url":"https://github.com/jfbastien","followers_url":"https://api.github.com/users/jfbastien/followers","following_url":"https://api.github.com/users/jfbastien/following{/other_user}","gists_url":"https://api.github.com/users/jfbastien/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbastien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbastien/subscriptions","organizations_url":"https://api.github.com/users/jfbastien/orgs","repos_url":"https://api.github.com/users/jfbastien/repos","events_url":"https://api.github.com/users/jfbastien/events{/privacy}","received_events_url":"https://api.github.com/users/jfbastien/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T01:06:50Z","updated_at":"2016-05-06T01:06:50Z","body":"I'm quite a fan of memories, it'll also make it easier to separate stuff out of the current single heap, such as the user stack, reducing user-side bugs / security issues, and it'll potentially also reduce fragmentation if the compiler is clever about certain things (I think that'll be a longer term gain)."}}