{"action":"created","comment":{"url":"https://api.github.com/repos/svaarala/duktape/pulls/comments/85043454","pull_request_review_id":5782202,"id":85043454,"diff_hunk":"@@ -0,0 +1,110 @@\n+/*\n+ *  'Reflect' built-in (ES7 Section 26.1)\n+ *  http://www.ecma-international.org/ecma-262/7.0/#sec-reflect-object\n+ */\n+\n+#include \"duk_internal.h\"\n+\n+#if defined(DUK_USE_REFLECT_BUILTIN)\n+DUK_INTERNAL duk_ret_t duk_bi_reflect_object_delete_property(duk_context *ctx) {\n+\tduk_hthread *thr;\n+\tduk_hobject *hobj;\n+\tduk_hstring *key;\n+\tduk_bool_t ret;\n+\n+\tDUK_ASSERT_TOP(ctx, 2);\n+\tthr = (duk_hthread *) ctx;\n+\tDUK_ASSERT(thr != NULL);\n+\n+\t/* [ target key ] */\n+\n+\thobj = duk_require_hobject(ctx, 0);\n+\tkey = duk_to_hstring(ctx, 1);\n+\n+\tret = duk_hobject_delprop_raw(thr, hobj, key, 0 /*flags*/);\n+\tduk_push_boolean(ctx, ret);\n+\treturn 1;\n+}\n+\n+DUK_INTERNAL duk_ret_t duk_bi_reflect_object_get(duk_context *ctx) {\n+\tduk_hthread *thr;\n+\tduk_tval *tv_obj;\n+\tduk_tval *tv_key;\n+\tduk_idx_t nargs;\n+\n+\tthr = (duk_hthread *) ctx;\n+\tDUK_ASSERT(thr != NULL);\n+\n+\tnargs = duk_get_top(ctx);\n+\tif (nargs < 2) {\n+\t\tDUK_DCERROR_TYPE_INVALID_ARGS((duk_hthread *) ctx);\n+\t}\n+\n+\t/* [ target key receiver? ...? ] */\n+\n+\t(void) duk_require_hobject(ctx, 0);\n+\ttv_obj = duk_require_tval(ctx, 0);\n+\t(void) duk_to_string(ctx, 1);","path":"src-input/duk_bi_reflect.c","position":47,"original_position":47,"commit_id":"6410e06b4471eb630be211ea8d5f3ca7a3f153fb","original_commit_id":"6410e06b4471eb630be211ea8d5f3ca7a3f153fb","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"body":"Agree, the code also reads much cleaner that way (better separation of concerns).","created_at":"2016-10-26T03:19:18Z","updated_at":"2016-10-26T03:19:18Z","html_url":"https://github.com/svaarala/duktape/pull/1025#discussion_r85043454","pull_request_url":"https://api.github.com/repos/svaarala/duktape/pulls/1025","_links":{"self":{"href":"https://api.github.com/repos/svaarala/duktape/pulls/comments/85043454"},"html":{"href":"https://github.com/svaarala/duktape/pull/1025#discussion_r85043454"},"pull_request":{"href":"https://api.github.com/repos/svaarala/duktape/pulls/1025"}}},"pull_request":{"url":"https://api.github.com/repos/svaarala/duktape/pulls/1025","id":89753414,"html_url":"https://github.com/svaarala/duktape/pull/1025","diff_url":"https://github.com/svaarala/duktape/pull/1025.diff","patch_url":"https://github.com/svaarala/duktape/pull/1025.patch","issue_url":"https://api.github.com/repos/svaarala/duktape/issues/1025","number":1025,"state":"open","locked":false,"title":"Implement built-in Reflect object (ES6+)","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"body":"_Work in progress._\r\n\r\nImplement the built-in `Reflect` object, first introduced with Ecmascript 2015 (ES6).  Concrete implementation based on the latest Ecmascript standard at the time of writing (2016/ES7).\r\n\r\nNew Ecmascript calls introduced:\r\n* `Reflect.apply()`\r\n* `Reflect.construct()`\r\n* `Reflect.defineProperty()`\r\n* `Reflect.deleteProperty()`\r\n* `Reflect.get()`\r\n* `Reflect.getOwnPropertyDescriptor()`\r\n* `Reflect.getPrototypeOf()`\r\n* `Reflect.has()`\r\n* `Reflect.isExtensible()`\r\n* `Reflect.ownKeys()`\r\n* `Reflect.preventExtensions()`\r\n* `Reflect.set()`\r\n* `Reflect.setPrototypeOf()`\r\n\r\n`Reflect.enumerate()` will **NOT** be implemented.  It was dropped in ES7 for placing too many constraints on Ecmascript implementors, see this GitHub issue:\r\nhttps://github.com/tc39/ecma262/issues/161\r\n\r\nChecklist:\r\n- [x] Implement `Reflect`, all ES7 methods\r\n- [ ] Update `Object` equivalents to match ES7 (ToObject coercion vs TypeError) => Not here, see #1028\r\n- [x] Testcases for all `Reflect` methods\r\n- [x] Feed the pig before it eats everyone => Fed to a cow, so fixed\r\n- [x] Website changes for new feature\r\n- [x] Find out why website diffs affect entire file\r\n- [x] Investigate if `Reflect.construct()` newTarget is visible to ES5 code => it is, TypeError if newTarget !== target\r\n- [ ] Fix broken low-memory stripped builds\r\n- [x] RELEASES entry","created_at":"2016-10-18T06:23:27Z","updated_at":"2016-10-26T03:19:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a3b700ba152f554568ed5e7891d4c5d20bb3202","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/svaarala/duktape/pulls/1025/commits","review_comments_url":"https://api.github.com/repos/svaarala/duktape/pulls/1025/comments","review_comment_url":"https://api.github.com/repos/svaarala/duktape/pulls/comments{/number}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/1025/comments","statuses_url":"https://api.github.com/repos/svaarala/duktape/statuses/6410e06b4471eb630be211ea8d5f3ca7a3f153fb","head":{"label":"fatcerberus:es6-reflect-builtin","ref":"es6-reflect-builtin","sha":"6410e06b4471eb630be211ea8d5f3ca7a3f153fb","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"repo":{"id":35036428,"name":"duktape","full_name":"fatcerberus/duktape","owner":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fatcerberus/duktape","description":"Duktape - embeddable Javascript engine with a focus on portability and compact footprint","fork":true,"url":"https://api.github.com/repos/fatcerberus/duktape","forks_url":"https://api.github.com/repos/fatcerberus/duktape/forks","keys_url":"https://api.github.com/repos/fatcerberus/duktape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fatcerberus/duktape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fatcerberus/duktape/teams","hooks_url":"https://api.github.com/repos/fatcerberus/duktape/hooks","issue_events_url":"https://api.github.com/repos/fatcerberus/duktape/issues/events{/number}","events_url":"https://api.github.com/repos/fatcerberus/duktape/events","assignees_url":"https://api.github.com/repos/fatcerberus/duktape/assignees{/user}","branches_url":"https://api.github.com/repos/fatcerberus/duktape/branches{/branch}","tags_url":"https://api.github.com/repos/fatcerberus/duktape/tags","blobs_url":"https://api.github.com/repos/fatcerberus/duktape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fatcerberus/duktape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fatcerberus/duktape/git/refs{/sha}","trees_url":"https://api.github.com/repos/fatcerberus/duktape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fatcerberus/duktape/statuses/{sha}","languages_url":"https://api.github.com/repos/fatcerberus/duktape/languages","stargazers_url":"https://api.github.com/repos/fatcerberus/duktape/stargazers","contributors_url":"https://api.github.com/repos/fatcerberus/duktape/contributors","subscribers_url":"https://api.github.com/repos/fatcerberus/duktape/subscribers","subscription_url":"https://api.github.com/repos/fatcerberus/duktape/subscription","commits_url":"https://api.github.com/repos/fatcerberus/duktape/commits{/sha}","git_commits_url":"https://api.github.com/repos/fatcerberus/duktape/git/commits{/sha}","comments_url":"https://api.github.com/repos/fatcerberus/duktape/comments{/number}","issue_comment_url":"https://api.github.com/repos/fatcerberus/duktape/issues/comments{/number}","contents_url":"https://api.github.com/repos/fatcerberus/duktape/contents/{+path}","compare_url":"https://api.github.com/repos/fatcerberus/duktape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fatcerberus/duktape/merges","archive_url":"https://api.github.com/repos/fatcerberus/duktape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fatcerberus/duktape/downloads","issues_url":"https://api.github.com/repos/fatcerberus/duktape/issues{/number}","pulls_url":"https://api.github.com/repos/fatcerberus/duktape/pulls{/number}","milestones_url":"https://api.github.com/repos/fatcerberus/duktape/milestones{/number}","notifications_url":"https://api.github.com/repos/fatcerberus/duktape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fatcerberus/duktape/labels{/name}","releases_url":"https://api.github.com/repos/fatcerberus/duktape/releases{/id}","deployments_url":"https://api.github.com/repos/fatcerberus/duktape/deployments","created_at":"2015-05-04T13:30:42Z","updated_at":"2016-01-11T04:56:49Z","pushed_at":"2016-10-25T15:06:26Z","git_url":"git://github.com/fatcerberus/duktape.git","ssh_url":"git@github.com:fatcerberus/duktape.git","clone_url":"https://github.com/fatcerberus/duktape.git","svn_url":"https://github.com/fatcerberus/duktape","homepage":null,"size":62710,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"svaarala:master","ref":"master","sha":"3e98fd56e261067c65f9d372b337bfdfe54aa81a","user":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"repo":{"id":15852088,"name":"duktape","full_name":"svaarala/duktape","owner":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/svaarala/duktape","description":"Duktape - embeddable Javascript engine with a focus on portability and compact footprint","fork":false,"url":"https://api.github.com/repos/svaarala/duktape","forks_url":"https://api.github.com/repos/svaarala/duktape/forks","keys_url":"https://api.github.com/repos/svaarala/duktape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/svaarala/duktape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/svaarala/duktape/teams","hooks_url":"https://api.github.com/repos/svaarala/duktape/hooks","issue_events_url":"https://api.github.com/repos/svaarala/duktape/issues/events{/number}","events_url":"https://api.github.com/repos/svaarala/duktape/events","assignees_url":"https://api.github.com/repos/svaarala/duktape/assignees{/user}","branches_url":"https://api.github.com/repos/svaarala/duktape/branches{/branch}","tags_url":"https://api.github.com/repos/svaarala/duktape/tags","blobs_url":"https://api.github.com/repos/svaarala/duktape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/svaarala/duktape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/svaarala/duktape/git/refs{/sha}","trees_url":"https://api.github.com/repos/svaarala/duktape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/svaarala/duktape/statuses/{sha}","languages_url":"https://api.github.com/repos/svaarala/duktape/languages","stargazers_url":"https://api.github.com/repos/svaarala/duktape/stargazers","contributors_url":"https://api.github.com/repos/svaarala/duktape/contributors","subscribers_url":"https://api.github.com/repos/svaarala/duktape/subscribers","subscription_url":"https://api.github.com/repos/svaarala/duktape/subscription","commits_url":"https://api.github.com/repos/svaarala/duktape/commits{/sha}","git_commits_url":"https://api.github.com/repos/svaarala/duktape/git/commits{/sha}","comments_url":"https://api.github.com/repos/svaarala/duktape/comments{/number}","issue_comment_url":"https://api.github.com/repos/svaarala/duktape/issues/comments{/number}","contents_url":"https://api.github.com/repos/svaarala/duktape/contents/{+path}","compare_url":"https://api.github.com/repos/svaarala/duktape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/svaarala/duktape/merges","archive_url":"https://api.github.com/repos/svaarala/duktape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/svaarala/duktape/downloads","issues_url":"https://api.github.com/repos/svaarala/duktape/issues{/number}","pulls_url":"https://api.github.com/repos/svaarala/duktape/pulls{/number}","milestones_url":"https://api.github.com/repos/svaarala/duktape/milestones{/number}","notifications_url":"https://api.github.com/repos/svaarala/duktape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/svaarala/duktape/labels{/name}","releases_url":"https://api.github.com/repos/svaarala/duktape/releases{/id}","deployments_url":"https://api.github.com/repos/svaarala/duktape/deployments","created_at":"2014-01-12T22:16:14Z","updated_at":"2016-10-25T13:30:02Z","pushed_at":"2016-10-25T21:35:35Z","git_url":"git://github.com/svaarala/duktape.git","ssh_url":"git@github.com:svaarala/duktape.git","clone_url":"https://github.com/svaarala/duktape.git","svn_url":"https://github.com/svaarala/duktape","homepage":null,"size":78275,"stargazers_count":2414,"watchers_count":2414,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":224,"mirror_url":null,"open_issues_count":247,"forks":224,"open_issues":247,"watchers":2414,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/svaarala/duktape/pulls/1025"},"html":{"href":"https://github.com/svaarala/duktape/pull/1025"},"issue":{"href":"https://api.github.com/repos/svaarala/duktape/issues/1025"},"comments":{"href":"https://api.github.com/repos/svaarala/duktape/issues/1025/comments"},"review_comments":{"href":"https://api.github.com/repos/svaarala/duktape/pulls/1025/comments"},"review_comment":{"href":"https://api.github.com/repos/svaarala/duktape/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/svaarala/duktape/pulls/1025/commits"},"statuses":{"href":"https://api.github.com/repos/svaarala/duktape/statuses/6410e06b4471eb630be211ea8d5f3ca7a3f153fb"}}}}
{"actor":{"display_login":"fatcerberus"}}