{"action":"created","comment":{"url":"https://api.github.com/repos/solson/miri/pulls/comments/66225836","id":66225836,"diff_hunk":"@@ -0,0 +1,923 @@\n+use rustc::hir::def_id::DefId;\n+use rustc::mir::repr as mir;\n+use rustc::ty::layout::{self, Layout, Size};\n+use rustc::ty::subst::{self, Subst, Substs};\n+use rustc::ty::{self, Ty};\n+use std::{iter, mem};\n+use syntax::attr;\n+use syntax::codemap::{self, Span};\n+\n+use error::{EvalError, EvalResult};\n+use memory::Pointer;\n+use primval::{self, PrimVal};\n+\n+use interpreter::global::GlobalEvalContext;\n+\n+use super::{\n+    CachedMir,\n+    ConstantId,\n+    Lvalue,\n+    LvalueExtra,\n+    pointee_type,\n+    StructExt,\n+    IntegerExt,\n+    TerminatorTarget,\n+};\n+\n+/// A stack frame.\n+pub(super) struct Frame<'mir, 'tcx: 'mir> {\n+    /// The def_id of the current function\n+    pub def_id: DefId,\n+\n+    /// The span of the call site\n+    pub span: codemap::Span,\n+\n+    /// type substitutions for the current function invocation\n+    pub substs: &'tcx Substs<'tcx>,\n+\n+    /// The MIR for the function called on this frame.\n+    pub mir: CachedMir<'mir, 'tcx>,\n+\n+    /// The block that is currently executed (or will be executed after the above call stacks return)\n+    pub next_block: mir::BasicBlock,\n+\n+    /// A pointer for writing the return value of the current call if it's not a diverging call.\n+    pub return_ptr: Option<Pointer>,\n+\n+    /// The list of locals for the current function, stored in order as\n+    /// `[arguments..., variables..., temporaries...]`. The variables begin at `self.var_offset`\n+    /// and the temporaries at `self.temp_offset`.\n+    pub locals: Vec<Pointer>,\n+\n+    /// The offset of the first variable in `self.locals`.\n+    pub var_offset: usize,\n+\n+    /// The offset of the first temporary in `self.locals`.\n+    pub temp_offset: usize,\n+\n+    /// The index of the currently evaluated statment\n+    pub stmt: usize,\n+\n+    // Constants that need to be evaluated before the next statement can be evaluated\n+    pub constants: Vec<(ConstantId<'tcx>, Span, Pointer, CachedMir<'mir, 'tcx>)>,\n+}\n+\n+pub(super) struct FrameInterpreter<'a, 'b: 'a, 'mir: 'a, 'tcx: 'a + 'mir + 'b> {","path":"src/interpreter/frame.rs","position":65,"original_position":65,"commit_id":"068302e0458ad7791acd4d839df0cfa02e3df4e8","original_commit_id":"068302e0458ad7791acd4d839df0cfa02e3df4e8","user":{"login":"oli-obk","id":332036,"avatar_url":"https://avatars.githubusercontent.com/u/332036?v=3","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"body":"I reverted it.","created_at":"2016-06-08T09:50:21Z","updated_at":"2016-06-08T09:50:21Z","html_url":"https://github.com/solson/miri/pull/18#discussion_r66225836","pull_request_url":"https://api.github.com/repos/solson/miri/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/solson/miri/pulls/comments/66225836"},"html":{"href":"https://github.com/solson/miri/pull/18#discussion_r66225836"},"pull_request":{"href":"https://api.github.com/repos/solson/miri/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/solson/miri/pulls/18","id":72215995,"html_url":"https://github.com/solson/miri/pull/18","diff_url":"https://github.com/solson/miri/pull/18.diff","patch_url":"https://github.com/solson/miri/pull/18.patch","issue_url":"https://api.github.com/repos/solson/miri/issues/18","number":18,"state":"open","locked":false,"title":"Hold the state","user":{"login":"oli-obk","id":332036,"avatar_url":"https://avatars.githubusercontent.com/u/332036?v=3","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"body":"precursor to #14\r\n\r\nok... iterator style was much easier than anticipated... The current design would require streaming iterators though...\r\n\r\nBasically it returns the statement or the terminator that is going to be interpreted *next*. Then it actually interprets that at the next `step` call and returns the statement after that.","created_at":"2016-06-01T16:57:16Z","updated_at":"2016-06-08T09:50:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82f825ecf6c9cda8ed28b0bc0999eb21b98a1622","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solson/miri/pulls/18/commits","review_comments_url":"https://api.github.com/repos/solson/miri/pulls/18/comments","review_comment_url":"https://api.github.com/repos/solson/miri/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solson/miri/issues/18/comments","statuses_url":"https://api.github.com/repos/solson/miri/statuses/068302e0458ad7791acd4d839df0cfa02e3df4e8","head":{"label":"oli-obk:hold_the_state","ref":"hold_the_state","sha":"068302e0458ad7791acd4d839df0cfa02e3df4e8","user":{"login":"oli-obk","id":332036,"avatar_url":"https://avatars.githubusercontent.com/u/332036?v=3","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"repo":{"id":51430710,"name":"miri","full_name":"oli-obk/miri","owner":{"login":"oli-obk","id":332036,"avatar_url":"https://avatars.githubusercontent.com/u/332036?v=3","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oli-obk/miri","description":"An experimental interpreter for Rust MIR","fork":true,"url":"https://api.github.com/repos/oli-obk/miri","forks_url":"https://api.github.com/repos/oli-obk/miri/forks","keys_url":"https://api.github.com/repos/oli-obk/miri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oli-obk/miri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oli-obk/miri/teams","hooks_url":"https://api.github.com/repos/oli-obk/miri/hooks","issue_events_url":"https://api.github.com/repos/oli-obk/miri/issues/events{/number}","events_url":"https://api.github.com/repos/oli-obk/miri/events","assignees_url":"https://api.github.com/repos/oli-obk/miri/assignees{/user}","branches_url":"https://api.github.com/repos/oli-obk/miri/branches{/branch}","tags_url":"https://api.github.com/repos/oli-obk/miri/tags","blobs_url":"https://api.github.com/repos/oli-obk/miri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oli-obk/miri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oli-obk/miri/git/refs{/sha}","trees_url":"https://api.github.com/repos/oli-obk/miri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oli-obk/miri/statuses/{sha}","languages_url":"https://api.github.com/repos/oli-obk/miri/languages","stargazers_url":"https://api.github.com/repos/oli-obk/miri/stargazers","contributors_url":"https://api.github.com/repos/oli-obk/miri/contributors","subscribers_url":"https://api.github.com/repos/oli-obk/miri/subscribers","subscription_url":"https://api.github.com/repos/oli-obk/miri/subscription","commits_url":"https://api.github.com/repos/oli-obk/miri/commits{/sha}","git_commits_url":"https://api.github.com/repos/oli-obk/miri/git/commits{/sha}","comments_url":"https://api.github.com/repos/oli-obk/miri/comments{/number}","issue_comment_url":"https://api.github.com/repos/oli-obk/miri/issues/comments{/number}","contents_url":"https://api.github.com/repos/oli-obk/miri/contents/{+path}","compare_url":"https://api.github.com/repos/oli-obk/miri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oli-obk/miri/merges","archive_url":"https://api.github.com/repos/oli-obk/miri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oli-obk/miri/downloads","issues_url":"https://api.github.com/repos/oli-obk/miri/issues{/number}","pulls_url":"https://api.github.com/repos/oli-obk/miri/pulls{/number}","milestones_url":"https://api.github.com/repos/oli-obk/miri/milestones{/number}","notifications_url":"https://api.github.com/repos/oli-obk/miri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oli-obk/miri/labels{/name}","releases_url":"https://api.github.com/repos/oli-obk/miri/releases{/id}","deployments_url":"https://api.github.com/repos/oli-obk/miri/deployments","created_at":"2016-02-10T09:10:02Z","updated_at":"2016-02-10T09:10:02Z","pushed_at":"2016-06-07T13:16:26Z","git_url":"git://github.com/oli-obk/miri.git","ssh_url":"git@github.com:oli-obk/miri.git","clone_url":"https://github.com/oli-obk/miri.git","svn_url":"https://github.com/oli-obk/miri","homepage":null,"size":543,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"solson:master","ref":"master","sha":"66a812f3e133400f269f2e2beea2c67c8ba7d181","user":{"login":"solson","id":26806,"avatar_url":"https://avatars.githubusercontent.com/u/26806?v=3","gravatar_id":"","url":"https://api.github.com/users/solson","html_url":"https://github.com/solson","followers_url":"https://api.github.com/users/solson/followers","following_url":"https://api.github.com/users/solson/following{/other_user}","gists_url":"https://api.github.com/users/solson/gists{/gist_id}","starred_url":"https://api.github.com/users/solson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solson/subscriptions","organizations_url":"https://api.github.com/users/solson/orgs","repos_url":"https://api.github.com/users/solson/repos","events_url":"https://api.github.com/users/solson/events{/privacy}","received_events_url":"https://api.github.com/users/solson/received_events","type":"User","site_admin":false},"repo":{"id":46083140,"name":"miri","full_name":"solson/miri","owner":{"login":"solson","id":26806,"avatar_url":"https://avatars.githubusercontent.com/u/26806?v=3","gravatar_id":"","url":"https://api.github.com/users/solson","html_url":"https://github.com/solson","followers_url":"https://api.github.com/users/solson/followers","following_url":"https://api.github.com/users/solson/following{/other_user}","gists_url":"https://api.github.com/users/solson/gists{/gist_id}","starred_url":"https://api.github.com/users/solson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solson/subscriptions","organizations_url":"https://api.github.com/users/solson/orgs","repos_url":"https://api.github.com/users/solson/repos","events_url":"https://api.github.com/users/solson/events{/privacy}","received_events_url":"https://api.github.com/users/solson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/solson/miri","description":"An experimental interpreter for Rust MIR","fork":false,"url":"https://api.github.com/repos/solson/miri","forks_url":"https://api.github.com/repos/solson/miri/forks","keys_url":"https://api.github.com/repos/solson/miri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solson/miri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solson/miri/teams","hooks_url":"https://api.github.com/repos/solson/miri/hooks","issue_events_url":"https://api.github.com/repos/solson/miri/issues/events{/number}","events_url":"https://api.github.com/repos/solson/miri/events","assignees_url":"https://api.github.com/repos/solson/miri/assignees{/user}","branches_url":"https://api.github.com/repos/solson/miri/branches{/branch}","tags_url":"https://api.github.com/repos/solson/miri/tags","blobs_url":"https://api.github.com/repos/solson/miri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solson/miri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solson/miri/git/refs{/sha}","trees_url":"https://api.github.com/repos/solson/miri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solson/miri/statuses/{sha}","languages_url":"https://api.github.com/repos/solson/miri/languages","stargazers_url":"https://api.github.com/repos/solson/miri/stargazers","contributors_url":"https://api.github.com/repos/solson/miri/contributors","subscribers_url":"https://api.github.com/repos/solson/miri/subscribers","subscription_url":"https://api.github.com/repos/solson/miri/subscription","commits_url":"https://api.github.com/repos/solson/miri/commits{/sha}","git_commits_url":"https://api.github.com/repos/solson/miri/git/commits{/sha}","comments_url":"https://api.github.com/repos/solson/miri/comments{/number}","issue_comment_url":"https://api.github.com/repos/solson/miri/issues/comments{/number}","contents_url":"https://api.github.com/repos/solson/miri/contents/{+path}","compare_url":"https://api.github.com/repos/solson/miri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solson/miri/merges","archive_url":"https://api.github.com/repos/solson/miri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solson/miri/downloads","issues_url":"https://api.github.com/repos/solson/miri/issues{/number}","pulls_url":"https://api.github.com/repos/solson/miri/pulls{/number}","milestones_url":"https://api.github.com/repos/solson/miri/milestones{/number}","notifications_url":"https://api.github.com/repos/solson/miri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solson/miri/labels{/name}","releases_url":"https://api.github.com/repos/solson/miri/releases{/id}","deployments_url":"https://api.github.com/repos/solson/miri/deployments","created_at":"2015-11-12T21:51:25Z","updated_at":"2016-06-08T02:58:48Z","pushed_at":"2016-06-06T15:49:07Z","git_url":"git://github.com/solson/miri.git","ssh_url":"git@github.com:solson/miri.git","clone_url":"https://github.com/solson/miri.git","svn_url":"https://github.com/solson/miri","homepage":null,"size":450,"stargazers_count":68,"watchers_count":68,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":5,"forks":12,"open_issues":5,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solson/miri/pulls/18"},"html":{"href":"https://github.com/solson/miri/pull/18"},"issue":{"href":"https://api.github.com/repos/solson/miri/issues/18"},"comments":{"href":"https://api.github.com/repos/solson/miri/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/solson/miri/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/solson/miri/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solson/miri/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/solson/miri/statuses/068302e0458ad7791acd4d839df0cfa02e3df4e8"}}}}
{"actor":{"display_login":"oli-obk"}}