{"action":"created","comment":{"url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/comments/230882427","pull_request_review_id":171722143,"id":230882427,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDg4MjQyNw==","diff_hunk":"@@ -0,0 +1,81 @@\n+/*\n+ * Copyright 2018 wasmjit-omr project participants\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#include \"stack.h\"\n+#include \"infra/Assert.hpp\"\n+\n+namespace wabt {\n+namespace jit {\n+\n+void VirtualStack::Push(TR::IlValue* v) {\n+  values_.push_back(v);\n+}\n+\n+TR::IlValue* CheckResult(TR::IlValue* v) {\n+  TR_ASSERT(v, \"Attempt to pick/pop an invalid value on the stack\");\n+  return v;\n+}\n+\n+TR::IlValue* VirtualStack::Pop() {\n+  TR_ASSERT(values_.size() > 0, \"Attempt to pop off an empty stack\");\n+\n+  auto* v = values_.back();\n+  values_.pop_back();\n+\n+  return CheckResult(v);\n+}\n+\n+void VirtualStack::DropKeep(size_t drop_count, size_t keep_count) {\n+  TR_ASSERT(drop_count + keep_count >= drop_count && values_.size() > drop_count + keep_count,","path":"src/jit/stack.cc","position":42,"original_position":42,"commit_id":"cb9a4472b6e9b1a07edf0a7d573c92dd40450060","original_commit_id":"cb9a4472b6e9b1a07edf0a7d573c92dd40450060","user":{"login":"Leonardo2718","id":6710130,"node_id":"MDQ6VXNlcjY3MTAxMzA=","avatar_url":"https://avatars0.githubusercontent.com/u/6710130?v=4","gravatar_id":"","url":"https://api.github.com/users/Leonardo2718","html_url":"https://github.com/Leonardo2718","followers_url":"https://api.github.com/users/Leonardo2718/followers","following_url":"https://api.github.com/users/Leonardo2718/following{/other_user}","gists_url":"https://api.github.com/users/Leonardo2718/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonardo2718/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonardo2718/subscriptions","organizations_url":"https://api.github.com/users/Leonardo2718/orgs","repos_url":"https://api.github.com/users/Leonardo2718/repos","events_url":"https://api.github.com/users/Leonardo2718/events{/privacy}","received_events_url":"https://api.github.com/users/Leonardo2718/received_events","type":"User","site_admin":false},"body":"I see.","created_at":"2018-11-05T19:32:46Z","updated_at":"2018-11-05T19:32:46Z","html_url":"https://github.com/wasmjit-omr/wasmjit-omr/pull/107#discussion_r230882427","pull_request_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/comments/230882427"},"html":{"href":"https://github.com/wasmjit-omr/wasmjit-omr/pull/107#discussion_r230882427"},"pull_request":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107"}},"in_reply_to_id":230602046},"pull_request":{"url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107","id":203407128,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNDA3MTI4","html_url":"https://github.com/wasmjit-omr/wasmjit-omr/pull/107","diff_url":"https://github.com/wasmjit-omr/wasmjit-omr/pull/107.diff","patch_url":"https://github.com/wasmjit-omr/wasmjit-omr/pull/107.patch","issue_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/107","number":107,"state":"open","locked":false,"title":"WIP: Experimental virtual stack support","user":{"login":"aviansie-ben","id":667951,"node_id":"MDQ6VXNlcjY2Nzk1MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/667951?v=4","gravatar_id":"","url":"https://api.github.com/users/aviansie-ben","html_url":"https://github.com/aviansie-ben","followers_url":"https://api.github.com/users/aviansie-ben/followers","following_url":"https://api.github.com/users/aviansie-ben/following{/other_user}","gists_url":"https://api.github.com/users/aviansie-ben/gists{/gist_id}","starred_url":"https://api.github.com/users/aviansie-ben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviansie-ben/subscriptions","organizations_url":"https://api.github.com/users/aviansie-ben/orgs","repos_url":"https://api.github.com/users/aviansie-ben/repos","events_url":"https://api.github.com/users/aviansie-ben/events{/privacy}","received_events_url":"https://api.github.com/users/aviansie-ben/received_events","type":"User","site_admin":false},"body":"This PR adds experimental support for a custom virtual stack that should eliminate most unnecessary reads and writes to/from the value stack that were caused by the previous naive implementation (#24). This should hopefully give a considerable performance boost once complete.\r\n\r\nCurrently, support has been added for all opcodes other than `call`, `call_host`, and `indirect_call`, meaning that all JIT tests other than `call.txt` and `callindirect.txt` should pass.","created_at":"2018-07-24T04:30:44Z","updated_at":"2018-11-05T19:32:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c010faad040d79906fb1af9ed920f0a4cf4d96a7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107/commits","review_comments_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107/comments","review_comment_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/107/comments","statuses_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/statuses/cb9a4472b6e9b1a07edf0a7d573c92dd40450060","head":{"label":"wasmjit-omr:virtual-stack","ref":"virtual-stack","sha":"cb9a4472b6e9b1a07edf0a7d573c92dd40450060","user":{"login":"wasmjit-omr","id":32720250,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzIwMjUw","avatar_url":"https://avatars0.githubusercontent.com/u/32720250?v=4","gravatar_id":"","url":"https://api.github.com/users/wasmjit-omr","html_url":"https://github.com/wasmjit-omr","followers_url":"https://api.github.com/users/wasmjit-omr/followers","following_url":"https://api.github.com/users/wasmjit-omr/following{/other_user}","gists_url":"https://api.github.com/users/wasmjit-omr/gists{/gist_id}","starred_url":"https://api.github.com/users/wasmjit-omr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasmjit-omr/subscriptions","organizations_url":"https://api.github.com/users/wasmjit-omr/orgs","repos_url":"https://api.github.com/users/wasmjit-omr/repos","events_url":"https://api.github.com/users/wasmjit-omr/events{/privacy}","received_events_url":"https://api.github.com/users/wasmjit-omr/received_events","type":"Organization","site_admin":false},"repo":{"id":107053167,"node_id":"MDEwOlJlcG9zaXRvcnkxMDcwNTMxNjc=","name":"wasmjit-omr","full_name":"wasmjit-omr/wasmjit-omr","private":false,"owner":{"login":"wasmjit-omr","id":32720250,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzIwMjUw","avatar_url":"https://avatars0.githubusercontent.com/u/32720250?v=4","gravatar_id":"","url":"https://api.github.com/users/wasmjit-omr","html_url":"https://github.com/wasmjit-omr","followers_url":"https://api.github.com/users/wasmjit-omr/followers","following_url":"https://api.github.com/users/wasmjit-omr/following{/other_user}","gists_url":"https://api.github.com/users/wasmjit-omr/gists{/gist_id}","starred_url":"https://api.github.com/users/wasmjit-omr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasmjit-omr/subscriptions","organizations_url":"https://api.github.com/users/wasmjit-omr/orgs","repos_url":"https://api.github.com/users/wasmjit-omr/repos","events_url":"https://api.github.com/users/wasmjit-omr/events{/privacy}","received_events_url":"https://api.github.com/users/wasmjit-omr/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wasmjit-omr/wasmjit-omr","description":"The WebAssembly Binary Toolkit","fork":true,"url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr","forks_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/forks","keys_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/teams","hooks_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/hooks","issue_events_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/events{/number}","events_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/events","assignees_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/assignees{/user}","branches_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/branches{/branch}","tags_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/tags","blobs_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/refs{/sha}","trees_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/statuses/{sha}","languages_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/languages","stargazers_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/stargazers","contributors_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/contributors","subscribers_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/subscribers","subscription_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/subscription","commits_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/commits{/sha}","git_commits_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/commits{/sha}","comments_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/comments{/number}","issue_comment_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/comments{/number}","contents_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/contents/{+path}","compare_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/merges","archive_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/downloads","issues_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues{/number}","pulls_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls{/number}","milestones_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/milestones{/number}","notifications_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/labels{/name}","releases_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/releases{/id}","deployments_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/deployments","created_at":"2017-10-15T22:17:01Z","updated_at":"2018-11-05T15:14:14Z","pushed_at":"2018-11-05T00:33:40Z","git_url":"git://github.com/wasmjit-omr/wasmjit-omr.git","ssh_url":"git@github.com:wasmjit-omr/wasmjit-omr.git","clone_url":"https://github.com/wasmjit-omr/wasmjit-omr.git","svn_url":"https://github.com/wasmjit-omr/wasmjit-omr","homepage":"","size":11579,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":18,"watchers":4,"default_branch":"master"}},"base":{"label":"wasmjit-omr:master","ref":"master","sha":"fc4f1debf34f0237849a5fb9aeaa8a62b236ed2e","user":{"login":"wasmjit-omr","id":32720250,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzIwMjUw","avatar_url":"https://avatars0.githubusercontent.com/u/32720250?v=4","gravatar_id":"","url":"https://api.github.com/users/wasmjit-omr","html_url":"https://github.com/wasmjit-omr","followers_url":"https://api.github.com/users/wasmjit-omr/followers","following_url":"https://api.github.com/users/wasmjit-omr/following{/other_user}","gists_url":"https://api.github.com/users/wasmjit-omr/gists{/gist_id}","starred_url":"https://api.github.com/users/wasmjit-omr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasmjit-omr/subscriptions","organizations_url":"https://api.github.com/users/wasmjit-omr/orgs","repos_url":"https://api.github.com/users/wasmjit-omr/repos","events_url":"https://api.github.com/users/wasmjit-omr/events{/privacy}","received_events_url":"https://api.github.com/users/wasmjit-omr/received_events","type":"Organization","site_admin":false},"repo":{"id":107053167,"node_id":"MDEwOlJlcG9zaXRvcnkxMDcwNTMxNjc=","name":"wasmjit-omr","full_name":"wasmjit-omr/wasmjit-omr","private":false,"owner":{"login":"wasmjit-omr","id":32720250,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzIwMjUw","avatar_url":"https://avatars0.githubusercontent.com/u/32720250?v=4","gravatar_id":"","url":"https://api.github.com/users/wasmjit-omr","html_url":"https://github.com/wasmjit-omr","followers_url":"https://api.github.com/users/wasmjit-omr/followers","following_url":"https://api.github.com/users/wasmjit-omr/following{/other_user}","gists_url":"https://api.github.com/users/wasmjit-omr/gists{/gist_id}","starred_url":"https://api.github.com/users/wasmjit-omr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasmjit-omr/subscriptions","organizations_url":"https://api.github.com/users/wasmjit-omr/orgs","repos_url":"https://api.github.com/users/wasmjit-omr/repos","events_url":"https://api.github.com/users/wasmjit-omr/events{/privacy}","received_events_url":"https://api.github.com/users/wasmjit-omr/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wasmjit-omr/wasmjit-omr","description":"The WebAssembly Binary Toolkit","fork":true,"url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr","forks_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/forks","keys_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/teams","hooks_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/hooks","issue_events_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/events{/number}","events_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/events","assignees_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/assignees{/user}","branches_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/branches{/branch}","tags_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/tags","blobs_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/refs{/sha}","trees_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/statuses/{sha}","languages_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/languages","stargazers_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/stargazers","contributors_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/contributors","subscribers_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/subscribers","subscription_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/subscription","commits_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/commits{/sha}","git_commits_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/git/commits{/sha}","comments_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/comments{/number}","issue_comment_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/comments{/number}","contents_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/contents/{+path}","compare_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/merges","archive_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/downloads","issues_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues{/number}","pulls_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls{/number}","milestones_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/milestones{/number}","notifications_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/labels{/name}","releases_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/releases{/id}","deployments_url":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/deployments","created_at":"2017-10-15T22:17:01Z","updated_at":"2018-11-05T15:14:14Z","pushed_at":"2018-11-05T00:33:40Z","git_url":"git://github.com/wasmjit-omr/wasmjit-omr.git","ssh_url":"git@github.com:wasmjit-omr/wasmjit-omr.git","clone_url":"https://github.com/wasmjit-omr/wasmjit-omr.git","svn_url":"https://github.com/wasmjit-omr/wasmjit-omr","homepage":"","size":11579,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":18,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107"},"html":{"href":"https://github.com/wasmjit-omr/wasmjit-omr/pull/107"},"issue":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/107"},"comments":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/wasmjit-omr/wasmjit-omr/statuses/cb9a4472b6e9b1a07edf0a7d573c92dd40450060"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Leonardo2718"}}