{"action":"created","comment":{"url":"https://api.github.com/repos/WebAssembly/design/pulls/comments/54271052","id":54271052,"diff_hunk":"@@ -73,27 +73,37 @@ Strings referenced by the module (i.e. function names) are encoded as null-termi\n The following documents the current prototype format. This format is based on and supersedes the v8-native prototype format, originally in a [public design doc](https://docs.google.com/document/d/1-G11CnMA0My20KI9D7dBR6ZCPOBCRD0oCH6SHCPFGx0/edit?usp=sharing).\n \n ## High-level structure\n-A module contains a sequence of sections, each identified by a *section identifier byte* whose encodings\n-are listed below.\n+A module contains a sequence of sections. Sections can in general be repeated, but some can occur only once or have dependant sections that must preceed them. Each section is identified by an immediate string. Sections whose identity is unknown to the WebAssembly implementation are ignored and this is supported by including the size in bytes for all sections. The encoding of all sections begins as follows:\n+\n+| Field | Type | Description |\n+| ----- |  ----- | ----- |\n+| id_len | `varuint32` | section identifier string length |\n+| id_str | `char*` | section identifier string |\n+| size  | `varuint32` | size of this section in bytes, excluding the ID string and this size |","path":"BinaryEncoding.md","position":12,"original_position":12,"commit_id":"8841b6ca071002adb5c6f53de428daffc14b5ff7","original_commit_id":"8841b6ca071002adb5c6f53de428daffc14b5ff7","user":{"login":"titzer","id":12184276,"avatar_url":"https://avatars.githubusercontent.com/u/12184276?v=3","gravatar_id":"","url":"https://api.github.com/users/titzer","html_url":"https://github.com/titzer","followers_url":"https://api.github.com/users/titzer/followers","following_url":"https://api.github.com/users/titzer/following{/other_user}","gists_url":"https://api.github.com/users/titzer/gists{/gist_id}","starred_url":"https://api.github.com/users/titzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/titzer/subscriptions","organizations_url":"https://api.github.com/users/titzer/orgs","repos_url":"https://api.github.com/users/titzer/repos","events_url":"https://api.github.com/users/titzer/events{/privacy}","received_events_url":"https://api.github.com/users/titzer/received_events","type":"User","site_admin":false},"body":"How about putting the size first, which makes it easier to simply stride through the sections.","created_at":"2016-02-26T17:08:30Z","updated_at":"2016-02-26T17:08:30Z","html_url":"https://github.com/WebAssembly/design/pull/557#discussion_r54271052","pull_request_url":"https://api.github.com/repos/WebAssembly/design/pulls/557","_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/comments/54271052"},"html":{"href":"https://github.com/WebAssembly/design/pull/557#discussion_r54271052"},"pull_request":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/557"}}},"pull_request":{"url":"https://api.github.com/repos/WebAssembly/design/pulls/557","id":60779628,"html_url":"https://github.com/WebAssembly/design/pull/557","diff_url":"https://github.com/WebAssembly/design/pull/557.diff","patch_url":"https://github.com/WebAssembly/design/pull/557.patch","issue_url":"https://api.github.com/repos/WebAssembly/design/issues/557","number":557,"state":"open","locked":false,"title":"Name the sections by strings, and add a size for all sections.","user":{"login":"JSStats","id":11826073,"avatar_url":"https://avatars.githubusercontent.com/u/11826073?v=3","gravatar_id":"","url":"https://api.github.com/users/JSStats","html_url":"https://github.com/JSStats","followers_url":"https://api.github.com/users/JSStats/followers","following_url":"https://api.github.com/users/JSStats/following{/other_user}","gists_url":"https://api.github.com/users/JSStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JSStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSStats/subscriptions","organizations_url":"https://api.github.com/users/JSStats/orgs","repos_url":"https://api.github.com/users/JSStats/repos","events_url":"https://api.github.com/users/JSStats/events{/privacy}","received_events_url":"https://api.github.com/users/JSStats/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-26T01:46:06Z","updated_at":"2016-02-26T17:08:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf361f58c2c782542e0fd043777a8fcd0bd66b08","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WebAssembly/design/pulls/557/commits","review_comments_url":"https://api.github.com/repos/WebAssembly/design/pulls/557/comments","review_comment_url":"https://api.github.com/repos/WebAssembly/design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WebAssembly/design/issues/557/comments","statuses_url":"https://api.github.com/repos/WebAssembly/design/statuses/8841b6ca071002adb5c6f53de428daffc14b5ff7","head":{"label":"JSStats:named-sections","ref":"named-sections","sha":"8841b6ca071002adb5c6f53de428daffc14b5ff7","user":{"login":"JSStats","id":11826073,"avatar_url":"https://avatars.githubusercontent.com/u/11826073?v=3","gravatar_id":"","url":"https://api.github.com/users/JSStats","html_url":"https://github.com/JSStats","followers_url":"https://api.github.com/users/JSStats/followers","following_url":"https://api.github.com/users/JSStats/following{/other_user}","gists_url":"https://api.github.com/users/JSStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JSStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSStats/subscriptions","organizations_url":"https://api.github.com/users/JSStats/orgs","repos_url":"https://api.github.com/users/JSStats/repos","events_url":"https://api.github.com/users/JSStats/events{/privacy}","received_events_url":"https://api.github.com/users/JSStats/received_events","type":"User","site_admin":false},"repo":{"id":47906726,"name":"design","full_name":"JSStats/design","owner":{"login":"JSStats","id":11826073,"avatar_url":"https://avatars.githubusercontent.com/u/11826073?v=3","gravatar_id":"","url":"https://api.github.com/users/JSStats","html_url":"https://github.com/JSStats","followers_url":"https://api.github.com/users/JSStats/followers","following_url":"https://api.github.com/users/JSStats/following{/other_user}","gists_url":"https://api.github.com/users/JSStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JSStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSStats/subscriptions","organizations_url":"https://api.github.com/users/JSStats/orgs","repos_url":"https://api.github.com/users/JSStats/repos","events_url":"https://api.github.com/users/JSStats/events{/privacy}","received_events_url":"https://api.github.com/users/JSStats/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JSStats/design","description":"WebAssembly Design Documents","fork":true,"url":"https://api.github.com/repos/JSStats/design","forks_url":"https://api.github.com/repos/JSStats/design/forks","keys_url":"https://api.github.com/repos/JSStats/design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JSStats/design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JSStats/design/teams","hooks_url":"https://api.github.com/repos/JSStats/design/hooks","issue_events_url":"https://api.github.com/repos/JSStats/design/issues/events{/number}","events_url":"https://api.github.com/repos/JSStats/design/events","assignees_url":"https://api.github.com/repos/JSStats/design/assignees{/user}","branches_url":"https://api.github.com/repos/JSStats/design/branches{/branch}","tags_url":"https://api.github.com/repos/JSStats/design/tags","blobs_url":"https://api.github.com/repos/JSStats/design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JSStats/design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JSStats/design/git/refs{/sha}","trees_url":"https://api.github.com/repos/JSStats/design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JSStats/design/statuses/{sha}","languages_url":"https://api.github.com/repos/JSStats/design/languages","stargazers_url":"https://api.github.com/repos/JSStats/design/stargazers","contributors_url":"https://api.github.com/repos/JSStats/design/contributors","subscribers_url":"https://api.github.com/repos/JSStats/design/subscribers","subscription_url":"https://api.github.com/repos/JSStats/design/subscription","commits_url":"https://api.github.com/repos/JSStats/design/commits{/sha}","git_commits_url":"https://api.github.com/repos/JSStats/design/git/commits{/sha}","comments_url":"https://api.github.com/repos/JSStats/design/comments{/number}","issue_comment_url":"https://api.github.com/repos/JSStats/design/issues/comments{/number}","contents_url":"https://api.github.com/repos/JSStats/design/contents/{+path}","compare_url":"https://api.github.com/repos/JSStats/design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JSStats/design/merges","archive_url":"https://api.github.com/repos/JSStats/design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JSStats/design/downloads","issues_url":"https://api.github.com/repos/JSStats/design/issues{/number}","pulls_url":"https://api.github.com/repos/JSStats/design/pulls{/number}","milestones_url":"https://api.github.com/repos/JSStats/design/milestones{/number}","notifications_url":"https://api.github.com/repos/JSStats/design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JSStats/design/labels{/name}","releases_url":"https://api.github.com/repos/JSStats/design/releases{/id}","deployments_url":"https://api.github.com/repos/JSStats/design/deployments","created_at":"2015-12-13T05:01:02Z","updated_at":"2016-02-11T22:11:03Z","pushed_at":"2016-02-26T09:17:58Z","git_url":"git://github.com/JSStats/design.git","ssh_url":"git@github.com:JSStats/design.git","clone_url":"https://github.com/JSStats/design.git","svn_url":"https://github.com/JSStats/design","homepage":"","size":997,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WebAssembly:master","ref":"master","sha":"4dec2849ad6d79fae63e7a8529da9358ac8cffe8","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}","deployments_url":"https://api.github.com/repos/WebAssembly/design/deployments","created_at":"2015-04-29T17:36:05Z","updated_at":"2016-02-26T09:25:17Z","pushed_at":"2016-02-26T09:17:59Z","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":"http://webassembly.github.io/","size":2001,"stargazers_count":5193,"watchers_count":5193,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":257,"mirror_url":null,"open_issues_count":63,"forks":257,"open_issues":63,"watchers":5193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/557"},"html":{"href":"https://github.com/WebAssembly/design/pull/557"},"issue":{"href":"https://api.github.com/repos/WebAssembly/design/issues/557"},"comments":{"href":"https://api.github.com/repos/WebAssembly/design/issues/557/comments"},"review_comments":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/557/comments"},"review_comment":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WebAssembly/design/pulls/557/commits"},"statuses":{"href":"https://api.github.com/repos/WebAssembly/design/statuses/8841b6ca071002adb5c6f53de428daffc14b5ff7"}}}}