{"action":"created","issue":{"url":"https://api.github.com/repos/dlang/dmd/issues/5812","repository_url":"https://api.github.com/repos/dlang/dmd","labels_url":"https://api.github.com/repos/dlang/dmd/issues/5812/labels{/name}","comments_url":"https://api.github.com/repos/dlang/dmd/issues/5812/comments","events_url":"https://api.github.com/repos/dlang/dmd/issues/5812/events","html_url":"https://github.com/dlang/dmd/pull/5812","id":157284838,"number":5812,"title":"[Don't Merge | Just for review]add Stack-Mode to allocator","user":{"login":"UplinkCoder","id":2844936,"avatar_url":"https://avatars.githubusercontent.com/u/2844936?v=3","gravatar_id":"","url":"https://api.github.com/users/UplinkCoder","html_url":"https://github.com/UplinkCoder","followers_url":"https://api.github.com/users/UplinkCoder/followers","following_url":"https://api.github.com/users/UplinkCoder/following{/other_user}","gists_url":"https://api.github.com/users/UplinkCoder/gists{/gist_id}","starred_url":"https://api.github.com/users/UplinkCoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UplinkCoder/subscriptions","organizations_url":"https://api.github.com/users/UplinkCoder/orgs","repos_url":"https://api.github.com/users/UplinkCoder/repos","events_url":"https://api.github.com/users/UplinkCoder/events{/privacy}","received_events_url":"https://api.github.com/users/UplinkCoder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-27T20:28:17Z","updated_at":"2016-05-27T21:35:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dlang/dmd/pulls/5812","html_url":"https://github.com/dlang/dmd/pull/5812","diff_url":"https://github.com/dlang/dmd/pull/5812.diff","patch_url":"https://github.com/dlang/dmd/pull/5812.patch"},"body":"Hi,\r\n\r\nThis is the first change on the long road to a good CTFE implementation. \r\nI am adding the ability to switch to a stack-allocation mode. \r\nusage :\r\n```\r\nauto stackBegin = beginStack(/* optional size */);\r\ne = interpret(Bla);\r\n/* not Implemented yet */\r\n return e.copytoHeapOrNextStackLevel();\r\nscope (exit) {\r\n endStack(stackBegin);\r\n}\r\n``` \r\n\r\nIn this allocation mode all memory will be reused after the stackEnd-call.\r\nIt is build to nest stacks inside each other so one can discard an inner stack but not the outer one.\r\n\r\nThis is just for a initial reviews.\r\nFor example should grow backwards so we can save the top of the stack without much hassle.\r\n"},"comment":{"url":"https://api.github.com/repos/dlang/dmd/issues/comments/222258478","html_url":"https://github.com/dlang/dmd/pull/5812#issuecomment-222258478","issue_url":"https://api.github.com/repos/dlang/dmd/issues/5812","id":222258478,"user":{"login":"klickverbot","id":19335,"avatar_url":"https://avatars.githubusercontent.com/u/19335?v=3","gravatar_id":"","url":"https://api.github.com/users/klickverbot","html_url":"https://github.com/klickverbot","followers_url":"https://api.github.com/users/klickverbot/followers","following_url":"https://api.github.com/users/klickverbot/following{/other_user}","gists_url":"https://api.github.com/users/klickverbot/gists{/gist_id}","starred_url":"https://api.github.com/users/klickverbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klickverbot/subscriptions","organizations_url":"https://api.github.com/users/klickverbot/orgs","repos_url":"https://api.github.com/users/klickverbot/repos","events_url":"https://api.github.com/users/klickverbot/events{/privacy}","received_events_url":"https://api.github.com/users/klickverbot/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T21:35:37Z","updated_at":"2016-05-27T21:35:37Z","body":"I'd much rather see CTFE use arena allocators explicitly where applicable than overriding the global, druntime-internal allocator. The later is very brittle, and is only just about allowable in the current implementation because we never actually free the memory. The latter makes it \"safe\" even though it interacts in unknown ways with compiler and runtime internals."}}
{"actor":{"display_login":"klickverbot"}}