{"action":"created","comment":{"url":"https://api.github.com/repos/WebAssembly/design/pulls/comments/33957778","id":33957778,"diff_hunk":"@@ -96,107 +120,59 @@ following rules:\n Wrapping of integers simply discards any upper bits; i.e. wrapping does not\n perform saturation, trap on overflow, etc.\n \n-## Addressing local variables\n+In addition to storing a value to linear memory, store instructions also return\n+their value operand, with no conversion applied.\n \n-Each function has a fixed, pre-declared number of local variables which occupy a single\n-index space local to the function. Parameters are addressed as local variables. Local\n-variables do not have addresses and are not aliased in the globals or memory. Local\n-variables have *Local types* and are initialized to the appropriate zero value for their\n-type at the beginning of the function, except parameters which are initialized to the values\n-of the arguments passed to the function.\n+### Addressing\n \n-  * `get_local`: read the current value of a local variable\n-  * `set_local`: set the current value of a local variable\n-\n-The details of index space for local variables and their types will be further clarified,\n-e.g. whether locals with type `int32` and `int64` must be contiguous and separate from \n-others, etc.\n+Each linear memory access operation also has an address operand and an immediate\n+integer offset attribute. The infinite-precision sum of the address operand's\n+value with the offset attribute's value is called the *effective address*.\n \n-## Control flow structures\n+Effective addresses are interpreted as unsigned byte indices into the linear\n+memory storage, starting at `0`. Linear memory accesses access memory starting\n+at this byte and extending for the number of bytes implied by the memory\n+attribute.","path":"AstSemantics.md","position":128,"original_position":128,"commit_id":"f9c6ce2bdb5560b66e5481043bdf2ca4c7b1ff69","original_commit_id":"f9c6ce2bdb5560b66e5481043bdf2ca4c7b1ff69","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},"body":"I find this slightly confusing: is it `base_address_offset_from_0_in_byte + offset_in_bytes` or is the offset instead then number of elements to index from (so, multiply by `sizerof(type)` for number of bytes)?","created_at":"2015-07-06T17:13:01Z","updated_at":"2015-07-06T17:13:01Z","html_url":"https://github.com/WebAssembly/design/pull/245#discussion_r33957778","pull_request_url":"https://api.github.com/repos/WebAssembly/design/pulls/245","_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/comments/33957778"},"html":{"href":"https://github.com/WebAssembly/design/pull/245#discussion_r33957778"},"pull_request":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/245"}}},"pull_request":{"url":"https://api.github.com/repos/WebAssembly/design/pulls/245","id":39276393,"html_url":"https://github.com/WebAssembly/design/pull/245","diff_url":"https://github.com/WebAssembly/design/pull/245.diff","patch_url":"https://github.com/WebAssembly/design/pull/245.patch","issue_url":"https://api.github.com/repos/WebAssembly/design/issues/245","number":245,"state":"open","locked":false,"title":"Types and linear memory","user":{"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},"body":"The current AstSemantics sections on types and linear memory are a little disorganized at the moment. Linear memory access operations are described in the types section, and the linear memory section itself has an obsolete set of load and store opcodes.\r\n\r\nThis PR reorganizes and generally revises these sections, creating a simple section for just types, and putting all the linear memory content in the linear memory section. It doesn't make any semantic changes, though it does make a few terminology changes.","created_at":"2015-07-06T14:58:29Z","updated_at":"2015-07-06T17:13:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"371073fb308755891ccef9b7d19882e8607dccd8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WebAssembly/design/pulls/245/commits","review_comments_url":"https://api.github.com/repos/WebAssembly/design/pulls/245/comments","review_comment_url":"https://api.github.com/repos/WebAssembly/design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WebAssembly/design/issues/245/comments","statuses_url":"https://api.github.com/repos/WebAssembly/design/statuses/f9c6ce2bdb5560b66e5481043bdf2ca4c7b1ff69","head":{"label":"WebAssembly:types-and-linear-memory","ref":"types-and-linear-memory","sha":"f9c6ce2bdb5560b66e5481043bdf2ca4c7b1ff69","user":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"repo":{"id":34808241,"name":"design","full_name":"WebAssembly/design","owner":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WebAssembly/design","description":"WebAssembly Design Documents","fork":false,"url":"https://api.github.com/repos/WebAssembly/design","forks_url":"https://api.github.com/repos/WebAssembly/design/forks","keys_url":"https://api.github.com/repos/WebAssembly/design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebAssembly/design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebAssembly/design/teams","hooks_url":"https://api.github.com/repos/WebAssembly/design/hooks","issue_events_url":"https://api.github.com/repos/WebAssembly/design/issues/events{/number}","events_url":"https://api.github.com/repos/WebAssembly/design/events","assignees_url":"https://api.github.com/repos/WebAssembly/design/assignees{/user}","branches_url":"https://api.github.com/repos/WebAssembly/design/branches{/branch}","tags_url":"https://api.github.com/repos/WebAssembly/design/tags","blobs_url":"https://api.github.com/repos/WebAssembly/design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebAssembly/design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebAssembly/design/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebAssembly/design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebAssembly/design/statuses/{sha}","languages_url":"https://api.github.com/repos/WebAssembly/design/languages","stargazers_url":"https://api.github.com/repos/WebAssembly/design/stargazers","contributors_url":"https://api.github.com/repos/WebAssembly/design/contributors","subscribers_url":"https://api.github.com/repos/WebAssembly/design/subscribers","subscription_url":"https://api.github.com/repos/WebAssembly/design/subscription","commits_url":"https://api.github.com/repos/WebAssembly/design/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebAssembly/design/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebAssembly/design/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebAssembly/design/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebAssembly/design/contents/{+path}","compare_url":"https://api.github.com/repos/WebAssembly/design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebAssembly/design/merges","archive_url":"https://api.github.com/repos/WebAssembly/design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebAssembly/design/downloads","issues_url":"https://api.github.com/repos/WebAssembly/design/issues{/number}","pulls_url":"https://api.github.com/repos/WebAssembly/design/pulls{/number}","milestones_url":"https://api.github.com/repos/WebAssembly/design/milestones{/number}","notifications_url":"https://api.github.com/repos/WebAssembly/design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebAssembly/design/labels{/name}","releases_url":"https://api.github.com/repos/WebAssembly/design/releases{/id}","created_at":"2015-04-29T17:36:05Z","updated_at":"2015-07-06T15:57:04Z","pushed_at":"2015-07-06T14:58:29Z","git_url":"git://github.com/WebAssembly/design.git","ssh_url":"git@github.com:WebAssembly/design.git","clone_url":"https://github.com/WebAssembly/design.git","svn_url":"https://github.com/WebAssembly/design","homepage":"","size":3750,"stargazers_count":3828,"watchers_count":3828,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":183,"mirror_url":null,"open_issues_count":52,"forks":183,"open_issues":52,"watchers":3828,"default_branch":"master"}},"base":{"label":"WebAssembly:master","ref":"master","sha":"c49d569f6cd268201034b66a54814139d49746bd","user":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"repo":{"id":34808241,"name":"design","full_name":"WebAssembly/design","owner":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WebAssembly/design","description":"WebAssembly Design Documents","fork":false,"url":"https://api.github.com/repos/WebAssembly/design","forks_url":"https://api.github.com/repos/WebAssembly/design/forks","keys_url":"https://api.github.com/repos/WebAssembly/design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebAssembly/design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebAssembly/design/teams","hooks_url":"https://api.github.com/repos/WebAssembly/design/hooks","issue_events_url":"https://api.github.com/repos/WebAssembly/design/issues/events{/number}","events_url":"https://api.github.com/repos/WebAssembly/design/events","assignees_url":"https://api.github.com/repos/WebAssembly/design/assignees{/user}","branches_url":"https://api.github.com/repos/WebAssembly/design/branches{/branch}","tags_url":"https://api.github.com/repos/WebAssembly/design/tags","blobs_url":"https://api.github.com/repos/WebAssembly/design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebAssembly/design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebAssembly/design/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebAssembly/design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebAssembly/design/statuses/{sha}","languages_url":"https://api.github.com/repos/WebAssembly/design/languages","stargazers_url":"https://api.github.com/repos/WebAssembly/design/stargazers","contributors_url":"https://api.github.com/repos/WebAssembly/design/contributors","subscribers_url":"https://api.github.com/repos/WebAssembly/design/subscribers","subscription_url":"https://api.github.com/repos/WebAssembly/design/subscription","commits_url":"https://api.github.com/repos/WebAssembly/design/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebAssembly/design/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebAssembly/design/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebAssembly/design/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebAssembly/design/contents/{+path}","compare_url":"https://api.github.com/repos/WebAssembly/design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebAssembly/design/merges","archive_url":"https://api.github.com/repos/WebAssembly/design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebAssembly/design/downloads","issues_url":"https://api.github.com/repos/WebAssembly/design/issues{/number}","pulls_url":"https://api.github.com/repos/WebAssembly/design/pulls{/number}","milestones_url":"https://api.github.com/repos/WebAssembly/design/milestones{/number}","notifications_url":"https://api.github.com/repos/WebAssembly/design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebAssembly/design/labels{/name}","releases_url":"https://api.github.com/repos/WebAssembly/design/releases{/id}","created_at":"2015-04-29T17:36:05Z","updated_at":"2015-07-06T15:57:04Z","pushed_at":"2015-07-06T14:58:29Z","git_url":"git://github.com/WebAssembly/design.git","ssh_url":"git@github.com:WebAssembly/design.git","clone_url":"https://github.com/WebAssembly/design.git","svn_url":"https://github.com/WebAssembly/design","homepage":"","size":3750,"stargazers_count":3828,"watchers_count":3828,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":183,"mirror_url":null,"open_issues_count":52,"forks":183,"open_issues":52,"watchers":3828,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/245"},"html":{"href":"https://github.com/WebAssembly/design/pull/245"},"issue":{"href":"https://api.github.com/repos/WebAssembly/design/issues/245"},"comments":{"href":"https://api.github.com/repos/WebAssembly/design/issues/245/comments"},"review_comments":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/245/comments"},"review_comment":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/245/commits"},"statuses":{"href":"https://api.github.com/repos/WebAssembly/design/statuses/f9c6ce2bdb5560b66e5481043bdf2ca4c7b1ff69"}}}}