{"action":"created","issue":{"url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/246","repository_url":"https://api.github.com/repos/LuaJIT/LuaJIT","labels_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/246/comments","events_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/246/events","html_url":"https://github.com/LuaJIT/LuaJIT/issues/246","id":192371210,"number":246,"title":"Immutability of FFI metatypes","user":{"login":"lukego","id":13791,"avatar_url":"https://avatars.githubusercontent.com/u/13791?v=3","gravatar_id":"","url":"https://api.github.com/users/lukego","html_url":"https://github.com/lukego","followers_url":"https://api.github.com/users/lukego/followers","following_url":"https://api.github.com/users/lukego/following{/other_user}","gists_url":"https://api.github.com/users/lukego/gists{/gist_id}","starred_url":"https://api.github.com/users/lukego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukego/subscriptions","organizations_url":"https://api.github.com/users/lukego/orgs","repos_url":"https://api.github.com/users/lukego/repos","events_url":"https://api.github.com/users/lukego/events{/privacy}","received_events_url":"https://api.github.com/users/lukego/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-29T19:09:46Z","updated_at":"2016-12-13T20:21:03Z","closed_at":"2016-12-13T20:21:03Z","body":"I am curious about the motivation for the immutability of FFI metatypes:\r\n\r\n> The association with a metatable is permanent and cannot be changed afterwards. Neither the contents of the metatable nor the contents of an __index table (if any) may be modified afterwards.\r\n\r\nIs the purpose of this restriction to make more information fixed at recording time in order to generate tight code? If so then, in principle, could this restriction be replaced with a mechanism that detects when an FFI metatype is changed and automatically flushes all traces that reference the relevant FFI type?\r\n\r\n(Generally I am wondering whether more aggressive optimizations would be possible without restricting language semantics, by detecting barrier operations and flushing traces that may need to be re-recorded.)"},"comment":{"url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/comments/266850448","html_url":"https://github.com/LuaJIT/LuaJIT/issues/246#issuecomment-266850448","issue_url":"https://api.github.com/repos/LuaJIT/LuaJIT/issues/246","id":266850448,"user":{"login":"MikePall","id":496664,"avatar_url":"https://avatars.githubusercontent.com/u/496664?v=3","gravatar_id":"","url":"https://api.github.com/users/MikePall","html_url":"https://github.com/MikePall","followers_url":"https://api.github.com/users/MikePall/followers","following_url":"https://api.github.com/users/MikePall/following{/other_user}","gists_url":"https://api.github.com/users/MikePall/gists{/gist_id}","starred_url":"https://api.github.com/users/MikePall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikePall/subscriptions","organizations_url":"https://api.github.com/users/MikePall/orgs","repos_url":"https://api.github.com/users/MikePall/repos","events_url":"https://api.github.com/users/MikePall/events{/privacy}","received_events_url":"https://api.github.com/users/MikePall/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T20:21:03Z","updated_at":"2016-12-13T20:21:03Z","body":"Given the FFI is a new API, it makes sense to add well-considered restrictions that don't pose any problems in practice and that are beneficial for performance."}}
{"actor":{"display_login":"MikePall"}}