{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/5698","repository_url":"https://api.github.com/repos/Microsoft/ChakraCore","labels_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/5698/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/5698/comments","events_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/5698/events","html_url":"https://github.com/Microsoft/ChakraCore/pull/5698","id":359352933,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0ODYzMzk5","number":5698,"title":"Share more code/ideas between JsBuiltIns and Intl","user":{"login":"jackhorton","id":4370013,"node_id":"MDQ6VXNlcjQzNzAwMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/4370013?v=4","gravatar_id":"","url":"https://api.github.com/users/jackhorton","html_url":"https://github.com/jackhorton","followers_url":"https://api.github.com/users/jackhorton/followers","following_url":"https://api.github.com/users/jackhorton/following{/other_user}","gists_url":"https://api.github.com/users/jackhorton/gists{/gist_id}","starred_url":"https://api.github.com/users/jackhorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackhorton/subscriptions","organizations_url":"https://api.github.com/users/jackhorton/orgs","repos_url":"https://api.github.com/users/jackhorton/repos","events_url":"https://api.github.com/users/jackhorton/events{/privacy}","received_events_url":"https://api.github.com/users/jackhorton/received_events","type":"User","site_admin":false},"labels":[{"id":1034800413,"node_id":"MDU6TGFiZWwxMDM0ODAwNDEz","url":"https://api.github.com/repos/Microsoft/ChakraCore/labels/Bytecode-Update","name":"Bytecode-Update","color":"ffee99","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-12T07:40:02Z","updated_at":"2018-09-12T22:33:50Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/pulls/5698","html_url":"https://github.com/Microsoft/ChakraCore/pull/5698","diff_url":"https://github.com/Microsoft/ChakraCore/pull/5698.diff","patch_url":"https://github.com/Microsoft/ChakraCore/pull/5698.patch"},"body":"Fixes #5644 \r\nFixes #5643 \r\nFixes an unlogged issue where all JsBuiltIns were constructable by default.\r\n\r\nThis mainly merged a lot of the code between tagPublicLibraryFunction, registerFunction, and registerChakraLibraryFunction. However, there are a number of smaller updates too:\r\n1. Stopped creating a new ScriptFunction on each JsBuiltIn registration. As far as I can tell, the only reason this existed before was to get a ScriptFunction without any framedisplay/environment, but since that can be set manually, its cheaper to just set it on the existing ScriptFunction.\r\n1. Intl functions no longer have to duplicate their name in the tagPublicLibraryCode argument and in script. I have edited a few Intl functions to confirm it works -- not sure if its worth it to go through and make all of the functions anonymous now. I also wanted to investigate changing JavascriptLibrary::InitializeFunction to not set the name attribute for these anonymous jsbuiltin functions since the name will always be overridden, but I am not sure if its possible.\r\n1. function length is now set using default parameters rather than manually/after the fact. Not sure if I like this better or worse than having the function macro list the length and have it set it explicitly. We could theoretically do the same optimization in InitializeFunction to avoid the extra property set.\r\n1. JsBuiltIns now uses a shared/projected enum for function registration like Intl.\r\n1. Ran into an error when using default parameters for functions marked explicitly as \"use strict,\" and I found the error message misleading, so I changed it to be the same as V8's which I found clearer.\r\n1. CheckArrayAndGetLen never hit its error case and reported a slightly worse-looking runtime/accidental error as a result when this == null\r\n\r\nStill need to run this through test262 to make sure there are no regressions.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/comments/420820369","html_url":"https://github.com/Microsoft/ChakraCore/pull/5698#issuecomment-420820369","issue_url":"https://api.github.com/repos/Microsoft/ChakraCore/issues/5698","id":420820369,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDgyMDM2OQ==","user":{"login":"rhuanjl","id":30090552,"node_id":"MDQ6VXNlcjMwMDkwNTUy","avatar_url":"https://avatars3.githubusercontent.com/u/30090552?v=4","gravatar_id":"","url":"https://api.github.com/users/rhuanjl","html_url":"https://github.com/rhuanjl","followers_url":"https://api.github.com/users/rhuanjl/followers","following_url":"https://api.github.com/users/rhuanjl/following{/other_user}","gists_url":"https://api.github.com/users/rhuanjl/gists{/gist_id}","starred_url":"https://api.github.com/users/rhuanjl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhuanjl/subscriptions","organizations_url":"https://api.github.com/users/rhuanjl/orgs","repos_url":"https://api.github.com/users/rhuanjl/repos","events_url":"https://api.github.com/users/rhuanjl/events{/privacy}","received_events_url":"https://api.github.com/users/rhuanjl/received_events","type":"User","site_admin":false},"created_at":"2018-09-12T22:33:50Z","updated_at":"2018-09-12T22:33:50Z","author_association":"CONTRIBUTOR","body":"Thanks for tagging me.\r\n\r\nThis looks like some very nice cleanup - also nice to see the stack trace issues fixed."}}
{"actor":{"display_login":"rhuanjl"}}