{"action":"created","comment":{"url":"https://api.github.com/repos/tc39/ecma262/pulls/comments/58907295","id":58907295,"diff_hunk":"@@ -6235,6 +6236,63 @@\n         1. If _result_ is an abrupt completion, perform HostReportErrors(&laquo; _result_.[[Value]] &raquo;).\n     </emu-alg>\n   </emu-clause>\n+\n+  <emu-clause id=\"sec-agents\">\n+    <h1>Agents</h1>\n+\n+    <p> An <dfn id=\"agent\">agent</dfn> comprises a set of ECMAScript execution contexts, an execution context stack, a running execution context, a set of named job queues, an <dfn id=\"agent-record\">Agent Record</dfn>, and an <dfn id=\"executing-thread\">executing thread</dfn>.  Except for the executing thread, the constituents of an agent belong exclusively to that agent. </p>\n+\n+    <p> An agent's executing thread executes the jobs in the agent's job queues on the agent's execution contexts independently of other agents, except that an executing thread may be used as the executing thread by multiple agents if none of the agents sharing the thread have an Agent Record whose [[CanBlock]] property that is ~true~. </p>\n+\n+    <emu-note>\n+      <p> Some web browsers share an executing thread across the documents of a browser window, for example. </p>\n+    </emu-note>\n+\n+    <p> While an agent's executing thread executes the jobs in the agent's job queues, the agent is the <dfn id=\"surrounding-agent\">surrounding agent</dfn> for the code in those jobs.  The code uses the surrounding agent to access the specification level execution objects held within the agent: the running execution context, the execution context stack, the named job queues, and the Agent Record's fields. </p>\n+\n+    <emu-table id=\"table-agent-record\" caption=\"Agent Record Fields\">\n+      <table>\n+        <tbody>\n+          <tr>\n+            <th> Field name </th>\n+            <th> Value </th>\n+            <th> Meaning </th>\n+          </tr>\n+          <tr>\n+            <td> [[LittleEndian]] </td>\n+            <td> Boolean </td>\n+            <td> The default value computed for the <em>isLittleEndian</em> parameter when it is needed by the algorithms GetValueFromBuffer and SetValueInBuffer.  The choice is implementation dependent and should be the alternative that is most efficient for the implementation. Constant. </td>","path":"spec.html","position":46,"original_position":46,"commit_id":"a67d79a6423ca02c6f7b015cc989487ea693c542","original_commit_id":"a67d79a6423ca02c6f7b015cc989487ea693c542","user":{"login":"bterlson","id":11236,"avatar_url":"https://avatars.githubusercontent.com/u/11236?v=3","gravatar_id":"","url":"https://api.github.com/users/bterlson","html_url":"https://github.com/bterlson","followers_url":"https://api.github.com/users/bterlson/followers","following_url":"https://api.github.com/users/bterlson/following{/other_user}","gists_url":"https://api.github.com/users/bterlson/gists{/gist_id}","starred_url":"https://api.github.com/users/bterlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bterlson/subscriptions","organizations_url":"https://api.github.com/users/bterlson/orgs","repos_url":"https://api.github.com/users/bterlson/repos","events_url":"https://api.github.com/users/bterlson/events{/privacy}","received_events_url":"https://api.github.com/users/bterlson/received_events","type":"User","site_admin":false},"body":"No other records indicate which of their fields is constant. I also worry that constant could be confusing without defining what it means in the context of a spec internal record. Maybe I'm being overly pedantic :-P","created_at":"2016-04-07T17:02:30Z","updated_at":"2016-04-07T17:02:30Z","html_url":"https://github.com/tc39/ecma262/pull/522#discussion_r58907295","pull_request_url":"https://api.github.com/repos/tc39/ecma262/pulls/522","_links":{"self":{"href":"https://api.github.com/repos/tc39/ecma262/pulls/comments/58907295"},"html":{"href":"https://github.com/tc39/ecma262/pull/522#discussion_r58907295"},"pull_request":{"href":"https://api.github.com/repos/tc39/ecma262/pulls/522"}}},"pull_request":{"url":"https://api.github.com/repos/tc39/ecma262/pulls/522","id":65408429,"html_url":"https://github.com/tc39/ecma262/pull/522","diff_url":"https://github.com/tc39/ecma262/pull/522.diff","patch_url":"https://github.com/tc39/ecma262/pull/522.patch","issue_url":"https://api.github.com/repos/tc39/ecma262/issues/522","number":522,"state":"open","locked":false,"title":"Add language to define Agents","user":{"login":"lars-t-hansen","id":4823190,"avatar_url":"https://avatars.githubusercontent.com/u/4823190?v=3","gravatar_id":"","url":"https://api.github.com/users/lars-t-hansen","html_url":"https://github.com/lars-t-hansen","followers_url":"https://api.github.com/users/lars-t-hansen/followers","following_url":"https://api.github.com/users/lars-t-hansen/following{/other_user}","gists_url":"https://api.github.com/users/lars-t-hansen/gists{/gist_id}","starred_url":"https://api.github.com/users/lars-t-hansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lars-t-hansen/subscriptions","organizations_url":"https://api.github.com/users/lars-t-hansen/orgs","repos_url":"https://api.github.com/users/lars-t-hansen/repos","events_url":"https://api.github.com/users/lars-t-hansen/events{/privacy}","received_events_url":"https://api.github.com/users/lars-t-hansen/received_events","type":"User","site_admin":false},"body":"This PR creates a minimal amount of infrastructure around executing \"agents\".  Informally, agents are bundles of the existing execution machinery and a few additional bits.\r\n\r\nThe shared memory spec needs to talk about the relation between multiple executing agents at the semantic level.  For example, some executing agents can enter a synchronous wait state by calling Atomics.wait, and other executing agents can wake waiting agents by calling Atomics.wake.  It thus becomes necessary to treat agents as semantics objects.  In addition, the shared memory spec will need to attach properties to agents, making it even more convenient for them to be semantic objects.\r\n\r\nFinally, a notion of forward progress is introduced here.  That notion is required for the shared memory work but it is also implicit in the existing ECMAScript spec: guarantees that exist (or don't) on forward progress of agents and their jobs.  It is possible to formalize forward progress more than I've done here but it's not yet obvious that it's necessary to do so.\r\n\r\nI'm presenting this as a PR since it really just bundles and formalizes existing machinery.  The shared memory spec will build on what is introduced here.","created_at":"2016-04-06T04:24:47Z","updated_at":"2016-04-07T17:02:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff7245a542a2a9c4a8f64539f9097ee9abb9d2ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tc39/ecma262/pulls/522/commits","review_comments_url":"https://api.github.com/repos/tc39/ecma262/pulls/522/comments","review_comment_url":"https://api.github.com/repos/tc39/ecma262/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tc39/ecma262/issues/522/comments","statuses_url":"https://api.github.com/repos/tc39/ecma262/statuses/a67d79a6423ca02c6f7b015cc989487ea693c542","head":{"label":"lars-t-hansen:agents","ref":"agents","sha":"a67d79a6423ca02c6f7b015cc989487ea693c542","user":{"login":"lars-t-hansen","id":4823190,"avatar_url":"https://avatars.githubusercontent.com/u/4823190?v=3","gravatar_id":"","url":"https://api.github.com/users/lars-t-hansen","html_url":"https://github.com/lars-t-hansen","followers_url":"https://api.github.com/users/lars-t-hansen/followers","following_url":"https://api.github.com/users/lars-t-hansen/following{/other_user}","gists_url":"https://api.github.com/users/lars-t-hansen/gists{/gist_id}","starred_url":"https://api.github.com/users/lars-t-hansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lars-t-hansen/subscriptions","organizations_url":"https://api.github.com/users/lars-t-hansen/orgs","repos_url":"https://api.github.com/users/lars-t-hansen/repos","events_url":"https://api.github.com/users/lars-t-hansen/events{/privacy}","received_events_url":"https://api.github.com/users/lars-t-hansen/received_events","type":"User","site_admin":false},"repo":{"id":50607559,"name":"ecma262","full_name":"lars-t-hansen/ecma262","owner":{"login":"lars-t-hansen","id":4823190,"avatar_url":"https://avatars.githubusercontent.com/u/4823190?v=3","gravatar_id":"","url":"https://api.github.com/users/lars-t-hansen","html_url":"https://github.com/lars-t-hansen","followers_url":"https://api.github.com/users/lars-t-hansen/followers","following_url":"https://api.github.com/users/lars-t-hansen/following{/other_user}","gists_url":"https://api.github.com/users/lars-t-hansen/gists{/gist_id}","starred_url":"https://api.github.com/users/lars-t-hansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lars-t-hansen/subscriptions","organizations_url":"https://api.github.com/users/lars-t-hansen/orgs","repos_url":"https://api.github.com/users/lars-t-hansen/repos","events_url":"https://api.github.com/users/lars-t-hansen/events{/privacy}","received_events_url":"https://api.github.com/users/lars-t-hansen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lars-t-hansen/ecma262","description":"Status, process, and documents for ECMA262","fork":true,"url":"https://api.github.com/repos/lars-t-hansen/ecma262","forks_url":"https://api.github.com/repos/lars-t-hansen/ecma262/forks","keys_url":"https://api.github.com/repos/lars-t-hansen/ecma262/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lars-t-hansen/ecma262/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lars-t-hansen/ecma262/teams","hooks_url":"https://api.github.com/repos/lars-t-hansen/ecma262/hooks","issue_events_url":"https://api.github.com/repos/lars-t-hansen/ecma262/issues/events{/number}","events_url":"https://api.github.com/repos/lars-t-hansen/ecma262/events","assignees_url":"https://api.github.com/repos/lars-t-hansen/ecma262/assignees{/user}","branches_url":"https://api.github.com/repos/lars-t-hansen/ecma262/branches{/branch}","tags_url":"https://api.github.com/repos/lars-t-hansen/ecma262/tags","blobs_url":"https://api.github.com/repos/lars-t-hansen/ecma262/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lars-t-hansen/ecma262/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lars-t-hansen/ecma262/git/refs{/sha}","trees_url":"https://api.github.com/repos/lars-t-hansen/ecma262/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lars-t-hansen/ecma262/statuses/{sha}","languages_url":"https://api.github.com/repos/lars-t-hansen/ecma262/languages","stargazers_url":"https://api.github.com/repos/lars-t-hansen/ecma262/stargazers","contributors_url":"https://api.github.com/repos/lars-t-hansen/ecma262/contributors","subscribers_url":"https://api.github.com/repos/lars-t-hansen/ecma262/subscribers","subscription_url":"https://api.github.com/repos/lars-t-hansen/ecma262/subscription","commits_url":"https://api.github.com/repos/lars-t-hansen/ecma262/commits{/sha}","git_commits_url":"https://api.github.com/repos/lars-t-hansen/ecma262/git/commits{/sha}","comments_url":"https://api.github.com/repos/lars-t-hansen/ecma262/comments{/number}","issue_comment_url":"https://api.github.com/repos/lars-t-hansen/ecma262/issues/comments{/number}","contents_url":"https://api.github.com/repos/lars-t-hansen/ecma262/contents/{+path}","compare_url":"https://api.github.com/repos/lars-t-hansen/ecma262/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lars-t-hansen/ecma262/merges","archive_url":"https://api.github.com/repos/lars-t-hansen/ecma262/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lars-t-hansen/ecma262/downloads","issues_url":"https://api.github.com/repos/lars-t-hansen/ecma262/issues{/number}","pulls_url":"https://api.github.com/repos/lars-t-hansen/ecma262/pulls{/number}","milestones_url":"https://api.github.com/repos/lars-t-hansen/ecma262/milestones{/number}","notifications_url":"https://api.github.com/repos/lars-t-hansen/ecma262/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lars-t-hansen/ecma262/labels{/name}","releases_url":"https://api.github.com/repos/lars-t-hansen/ecma262/releases{/id}","deployments_url":"https://api.github.com/repos/lars-t-hansen/ecma262/deployments","created_at":"2016-01-28T19:27:02Z","updated_at":"2016-01-28T19:27:03Z","pushed_at":"2016-04-06T16:59:47Z","git_url":"git://github.com/lars-t-hansen/ecma262.git","ssh_url":"git@github.com:lars-t-hansen/ecma262.git","clone_url":"https://github.com/lars-t-hansen/ecma262.git","svn_url":"https://github.com/lars-t-hansen/ecma262","homepage":"https://tc39.github.io/ecma262/","size":7895,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"tc39:master","ref":"master","sha":"44adca8433fe7fb9163b7f535765f7b0def55e3d","user":{"login":"tc39","id":1725583,"avatar_url":"https://avatars.githubusercontent.com/u/1725583?v=3","gravatar_id":"","url":"https://api.github.com/users/tc39","html_url":"https://github.com/tc39","followers_url":"https://api.github.com/users/tc39/followers","following_url":"https://api.github.com/users/tc39/following{/other_user}","gists_url":"https://api.github.com/users/tc39/gists{/gist_id}","starred_url":"https://api.github.com/users/tc39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tc39/subscriptions","organizations_url":"https://api.github.com/users/tc39/orgs","repos_url":"https://api.github.com/users/tc39/repos","events_url":"https://api.github.com/users/tc39/events{/privacy}","received_events_url":"https://api.github.com/users/tc39/received_events","type":"Organization","site_admin":false},"repo":{"id":18609427,"name":"ecma262","full_name":"tc39/ecma262","owner":{"login":"tc39","id":1725583,"avatar_url":"https://avatars.githubusercontent.com/u/1725583?v=3","gravatar_id":"","url":"https://api.github.com/users/tc39","html_url":"https://github.com/tc39","followers_url":"https://api.github.com/users/tc39/followers","following_url":"https://api.github.com/users/tc39/following{/other_user}","gists_url":"https://api.github.com/users/tc39/gists{/gist_id}","starred_url":"https://api.github.com/users/tc39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tc39/subscriptions","organizations_url":"https://api.github.com/users/tc39/orgs","repos_url":"https://api.github.com/users/tc39/repos","events_url":"https://api.github.com/users/tc39/events{/privacy}","received_events_url":"https://api.github.com/users/tc39/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tc39/ecma262","description":"Status, process, and documents for ECMA262","fork":false,"url":"https://api.github.com/repos/tc39/ecma262","forks_url":"https://api.github.com/repos/tc39/ecma262/forks","keys_url":"https://api.github.com/repos/tc39/ecma262/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tc39/ecma262/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tc39/ecma262/teams","hooks_url":"https://api.github.com/repos/tc39/ecma262/hooks","issue_events_url":"https://api.github.com/repos/tc39/ecma262/issues/events{/number}","events_url":"https://api.github.com/repos/tc39/ecma262/events","assignees_url":"https://api.github.com/repos/tc39/ecma262/assignees{/user}","branches_url":"https://api.github.com/repos/tc39/ecma262/branches{/branch}","tags_url":"https://api.github.com/repos/tc39/ecma262/tags","blobs_url":"https://api.github.com/repos/tc39/ecma262/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tc39/ecma262/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tc39/ecma262/git/refs{/sha}","trees_url":"https://api.github.com/repos/tc39/ecma262/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tc39/ecma262/statuses/{sha}","languages_url":"https://api.github.com/repos/tc39/ecma262/languages","stargazers_url":"https://api.github.com/repos/tc39/ecma262/stargazers","contributors_url":"https://api.github.com/repos/tc39/ecma262/contributors","subscribers_url":"https://api.github.com/repos/tc39/ecma262/subscribers","subscription_url":"https://api.github.com/repos/tc39/ecma262/subscription","commits_url":"https://api.github.com/repos/tc39/ecma262/commits{/sha}","git_commits_url":"https://api.github.com/repos/tc39/ecma262/git/commits{/sha}","comments_url":"https://api.github.com/repos/tc39/ecma262/comments{/number}","issue_comment_url":"https://api.github.com/repos/tc39/ecma262/issues/comments{/number}","contents_url":"https://api.github.com/repos/tc39/ecma262/contents/{+path}","compare_url":"https://api.github.com/repos/tc39/ecma262/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tc39/ecma262/merges","archive_url":"https://api.github.com/repos/tc39/ecma262/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tc39/ecma262/downloads","issues_url":"https://api.github.com/repos/tc39/ecma262/issues{/number}","pulls_url":"https://api.github.com/repos/tc39/ecma262/pulls{/number}","milestones_url":"https://api.github.com/repos/tc39/ecma262/milestones{/number}","notifications_url":"https://api.github.com/repos/tc39/ecma262/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tc39/ecma262/labels{/name}","releases_url":"https://api.github.com/repos/tc39/ecma262/releases{/id}","deployments_url":"https://api.github.com/repos/tc39/ecma262/deployments","created_at":"2014-04-09T19:04:33Z","updated_at":"2016-04-07T15:13:29Z","pushed_at":"2016-04-06T23:34:16Z","git_url":"git://github.com/tc39/ecma262.git","ssh_url":"git@github.com:tc39/ecma262.git","clone_url":"https://github.com/tc39/ecma262.git","svn_url":"https://github.com/tc39/ecma262","homepage":"https://tc39.github.io/ecma262/","size":8584,"stargazers_count":2437,"watchers_count":2437,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":149,"mirror_url":null,"open_issues_count":78,"forks":149,"open_issues":78,"watchers":2437,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tc39/ecma262/pulls/522"},"html":{"href":"https://github.com/tc39/ecma262/pull/522"},"issue":{"href":"https://api.github.com/repos/tc39/ecma262/issues/522"},"comments":{"href":"https://api.github.com/repos/tc39/ecma262/issues/522/comments"},"review_comments":{"href":"https://api.github.com/repos/tc39/ecma262/pulls/522/comments"},"review_comment":{"href":"https://api.github.com/repos/tc39/ecma262/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tc39/ecma262/pulls/522/commits"},"statuses":{"href":"https://api.github.com/repos/tc39/ecma262/statuses/a67d79a6423ca02c6f7b015cc989487ea693c542"}}}}