{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1145","labels_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1145/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1145/comments","events_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1145/events","html_url":"https://github.com/ethereum/cpp-ethereum/issues/1145","id":58984709,"number":1145,"title":"Solidity- The \"stack too deep\" compiler errors are getting out of hand","user":{"login":"drcode","id":1125,"avatar_url":"https://avatars.githubusercontent.com/u/1125?v=3","gravatar_id":"","url":"https://api.github.com/users/drcode","html_url":"https://github.com/drcode","followers_url":"https://api.github.com/users/drcode/followers","following_url":"https://api.github.com/users/drcode/following{/other_user}","gists_url":"https://api.github.com/users/drcode/gists{/gist_id}","starred_url":"https://api.github.com/users/drcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drcode/subscriptions","organizations_url":"https://api.github.com/users/drcode/orgs","repos_url":"https://api.github.com/users/drcode/repos","events_url":"https://api.github.com/users/drcode/events{/privacy}","received_events_url":"https://api.github.com/users/drcode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-25T23:00:25Z","updated_at":"2015-02-25T23:14:11Z","closed_at":null,"body":"...I'm guessing you folks are starting to repurpose some EVM \"stack registers\" for alternate purposes, breaking existing contracts by progressively shortening the stack...\r\n\r\nThis contract compiled a couple of weeks ago, now gives the dreaded \"stack too deep\" all of a sudden: https://github.com/drcode/ethereum-order-statistic-tree/blob/master/OrderStatisticTree.sol\r\n\r\nIs this regression expected? Is there any relief in sight (i.e. pushing stack data into memory?)\r\nOr, is my best course of action to refactor my code for a lower stack depth?\r\n\r\nThanks for any tips!"},"comment":{"url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/comments/76082428","html_url":"https://github.com/ethereum/cpp-ethereum/issues/1145#issuecomment-76082428","issue_url":"https://api.github.com/repos/ethereum/cpp-ethereum/issues/1145","id":76082428,"user":{"login":"chriseth","id":9073706,"avatar_url":"https://avatars.githubusercontent.com/u/9073706?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T23:14:11Z","updated_at":"2015-02-25T23:14:11Z","body":"Basically every local variables occupies a slot on the stack. We plan to optimize this at some point, but we are not yet there.\r\nIt seems like Solidity has problems to compile `rotate` or `remove_helper`.\r\nIs it possible to refactor them to use less local variables? You can introduce helper functions at almost no cost."}}