{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/prepack/issues/630","repository_url":"https://api.github.com/repos/facebook/prepack","labels_url":"https://api.github.com/repos/facebook/prepack/issues/630/labels{/name}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/630/comments","events_url":"https://api.github.com/repos/facebook/prepack/issues/630/events","html_url":"https://github.com/facebook/prepack/issues/630","id":227779539,"number":630,"title":"Implement Classes In The Interpreter","user":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars1.githubusercontent.com/u/63648?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"labels":[{"id":589224632,"url":"https://api.github.com/repos/facebook/prepack/labels/ES6","name":"ES6","color":"bfd4f2","default":false},{"id":279345228,"url":"https://api.github.com/repos/facebook/prepack/labels/help%20wanted","name":"help wanted","color":"159818","default":true},{"id":383044863,"url":"https://api.github.com/repos/facebook/prepack/labels/interpreter","name":"interpreter","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-05-10T19:04:31Z","updated_at":"2017-06-19T20:53:58Z","closed_at":null,"body":"This would be a good start to being able to fully serialize classes. The serialization part is difficult because we have to serialize some features like methods with super calls using the class syntax.\r\n\r\nHowever this issue is only about implementing the interpreter.\r\n\r\nA good starting point is here: \r\n\r\nhttps://github.com/facebook/prepack/blob/master/src/evaluators/ClassDeclaration.js\r\n\r\nThen copying the spec piece by piece.\r\n\r\nhttps://www.ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-classdefinitionevaluation\r\n\r\nThe syntax is already in the Babel AST. Most of the Value model such as HomeObject and new.target is already in place.\r\n\r\nAny previously unimplemented methods of the spec will need to be implemented. Such as MakeClassConstructor.\r\n\r\nRunning `yarn test-test262` will run the full test suite which can be used to validate the final result.\r\n\r\n`yarn repl` is good for experiments."},"comment":{"url":"https://api.github.com/repos/facebook/prepack/issues/comments/309570604","html_url":"https://github.com/facebook/prepack/issues/630#issuecomment-309570604","issue_url":"https://api.github.com/repos/facebook/prepack/issues/630","id":309570604,"user":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars1.githubusercontent.com/u/63648?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"created_at":"2017-06-19T20:53:58Z","updated_at":"2017-06-19T20:53:58Z","body":"I believe [that line](https://github.com/facebook/prepack/blob/57cc59c07d164e4827c24637af9c1002b0c4a3c8/src/methods/function.js#L597) is wrong in master. It should do:\r\n\r\n```js\r\nthrow realm.createErrorThrowCompletion(realm.intrinsics.TypeError, \"not callable\");\r\n```"}}
{"actor":{"display_login":"sebmarkbage"}}