{"action":"created","comment":{"url":"https://api.github.com/repos/ewasm/hera/pulls/comments/214753535","pull_request_review_id":151871595,"id":214753535,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDc1MzUzNQ==","diff_hunk":"@@ -158,27 +84,26 @@ namespace wavm_host_module {\n   }\n \n \n-  /*\n-  useGas\n-    Subtracts an amount to the gas counter\n-  Parameters\n-    amount i64 the amount to subtract to the gas counter\n-  Returns\n-    nothing\n-  */\n-  I64 gas = 0;\n-  DEFINE_INTRINSIC_FUNCTION_WITH_MEM_AND_TABLE(ethereum, \"useGas\", void, useGas, I64 amount)\n+  DEFINE_INTRINSIC_FUNCTION(ethereum, \"call\", U32, call, I64 gas, U32 addressOffset, U32 valueOffset, U32 dataOffset, U32 dataLength)\n   {\n-    printf(\"useGas  amount=%lu\\n\",amount);\n+    printf(\"call  gas=%lu  addressOffset=%i  valueOffset=%i  dataOffset=%i  dataLength=%i\\n\", gas, addressOffset, valueOffset, dataOffset, dataLength);\n \n-    try{\n-      interface->eeiUseGas(gas);\n-    }\n-    catch(hera::HeraException e){\n-      throwException(Runtime::Exception::calledAbortType);\n-    }\n+    // save a pointer to the interface before the call\n+    WavmEthereumInterface* interface_before_call = interface;","path":"src/wavm.cpp","position":null,"original_position":173,"commit_id":"8717478105b7e5d9ab0df0349f93161f1756807d","original_commit_id":"8717478105b7e5d9ab0df0349f93161f1756807d","user":{"login":"chfast","id":573380,"node_id":"MDQ6VXNlcjU3MzM4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/573380?v=4","gravatar_id":"","url":"https://api.github.com/users/chfast","html_url":"https://github.com/chfast","followers_url":"https://api.github.com/users/chfast/followers","following_url":"https://api.github.com/users/chfast/following{/other_user}","gists_url":"https://api.github.com/users/chfast/gists{/gist_id}","starred_url":"https://api.github.com/users/chfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chfast/subscriptions","organizations_url":"https://api.github.com/users/chfast/orgs","repos_url":"https://api.github.com/users/chfast/repos","events_url":"https://api.github.com/users/chfast/events{/privacy}","received_events_url":"https://api.github.com/users/chfast/received_events","type":"User","site_admin":false},"body":"Oh, if you back it up, replace and restore the backup in the end that will work too. I don't see the full picture, but I feel more comfortable with putting such magic features in execute() rather than in eeiCall().","created_at":"2018-09-03T20:37:44Z","updated_at":"2018-09-03T20:37:44Z","html_url":"https://github.com/ewasm/hera/pull/394#discussion_r214753535","pull_request_url":"https://api.github.com/repos/ewasm/hera/pulls/394","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ewasm/hera/pulls/comments/214753535"},"html":{"href":"https://github.com/ewasm/hera/pull/394#discussion_r214753535"},"pull_request":{"href":"https://api.github.com/repos/ewasm/hera/pulls/394"}},"in_reply_to_id":214746399},"pull_request":{"url":"https://api.github.com/repos/ewasm/hera/pulls/394","id":212221548,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMjIxNTQ4","html_url":"https://github.com/ewasm/hera/pull/394","diff_url":"https://github.com/ewasm/hera/pull/394.diff","patch_url":"https://github.com/ewasm/hera/pull/394.patch","issue_url":"https://api.github.com/repos/ewasm/hera/issues/394","number":394,"state":"open","locked":false,"title":"architecture for wavm execution","user":{"login":"poemm","id":36397285,"node_id":"MDQ6VXNlcjM2Mzk3Mjg1","avatar_url":"https://avatars2.githubusercontent.com/u/36397285?v=4","gravatar_id":"","url":"https://api.github.com/users/poemm","html_url":"https://github.com/poemm","followers_url":"https://api.github.com/users/poemm/followers","following_url":"https://api.github.com/users/poemm/following{/other_user}","gists_url":"https://api.github.com/users/poemm/gists{/gist_id}","starred_url":"https://api.github.com/users/poemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poemm/subscriptions","organizations_url":"https://api.github.com/users/poemm/orgs","repos_url":"https://api.github.com/users/poemm/repos","events_url":"https://api.github.com/users/poemm/events{/privacy}","received_events_url":"https://api.github.com/users/poemm/received_events","type":"User","site_admin":false},"body":"Early version of wavm execution in Hera. Should compile with `cmake -DHERA_WAVM=ON`. May need some work.","created_at":"2018-08-30T21:52:11Z","updated_at":"2018-09-03T20:37:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d981eac5d012a9bacab70ef3ab1b3250862e6ec9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ewasm/hera/pulls/394/commits","review_comments_url":"https://api.github.com/repos/ewasm/hera/pulls/394/comments","review_comment_url":"https://api.github.com/repos/ewasm/hera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ewasm/hera/issues/394/comments","statuses_url":"https://api.github.com/repos/ewasm/hera/statuses/8717478105b7e5d9ab0df0349f93161f1756807d","head":{"label":"poemm:master","ref":"master","sha":"8717478105b7e5d9ab0df0349f93161f1756807d","user":{"login":"poemm","id":36397285,"node_id":"MDQ6VXNlcjM2Mzk3Mjg1","avatar_url":"https://avatars2.githubusercontent.com/u/36397285?v=4","gravatar_id":"","url":"https://api.github.com/users/poemm","html_url":"https://github.com/poemm","followers_url":"https://api.github.com/users/poemm/followers","following_url":"https://api.github.com/users/poemm/following{/other_user}","gists_url":"https://api.github.com/users/poemm/gists{/gist_id}","starred_url":"https://api.github.com/users/poemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poemm/subscriptions","organizations_url":"https://api.github.com/users/poemm/orgs","repos_url":"https://api.github.com/users/poemm/repos","events_url":"https://api.github.com/users/poemm/events{/privacy}","received_events_url":"https://api.github.com/users/poemm/received_events","type":"User","site_admin":false},"repo":{"id":146809637,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY4MDk2Mzc=","name":"hera","full_name":"poemm/hera","owner":{"login":"poemm","id":36397285,"node_id":"MDQ6VXNlcjM2Mzk3Mjg1","avatar_url":"https://avatars2.githubusercontent.com/u/36397285?v=4","gravatar_id":"","url":"https://api.github.com/users/poemm","html_url":"https://github.com/poemm","followers_url":"https://api.github.com/users/poemm/followers","following_url":"https://api.github.com/users/poemm/following{/other_user}","gists_url":"https://api.github.com/users/poemm/gists{/gist_id}","starred_url":"https://api.github.com/users/poemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poemm/subscriptions","organizations_url":"https://api.github.com/users/poemm/orgs","repos_url":"https://api.github.com/users/poemm/repos","events_url":"https://api.github.com/users/poemm/events{/privacy}","received_events_url":"https://api.github.com/users/poemm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/poemm/hera","description":"Hera: ewasm virtual machine conforming to the EVMC API","fork":true,"url":"https://api.github.com/repos/poemm/hera","forks_url":"https://api.github.com/repos/poemm/hera/forks","keys_url":"https://api.github.com/repos/poemm/hera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poemm/hera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poemm/hera/teams","hooks_url":"https://api.github.com/repos/poemm/hera/hooks","issue_events_url":"https://api.github.com/repos/poemm/hera/issues/events{/number}","events_url":"https://api.github.com/repos/poemm/hera/events","assignees_url":"https://api.github.com/repos/poemm/hera/assignees{/user}","branches_url":"https://api.github.com/repos/poemm/hera/branches{/branch}","tags_url":"https://api.github.com/repos/poemm/hera/tags","blobs_url":"https://api.github.com/repos/poemm/hera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poemm/hera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poemm/hera/git/refs{/sha}","trees_url":"https://api.github.com/repos/poemm/hera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poemm/hera/statuses/{sha}","languages_url":"https://api.github.com/repos/poemm/hera/languages","stargazers_url":"https://api.github.com/repos/poemm/hera/stargazers","contributors_url":"https://api.github.com/repos/poemm/hera/contributors","subscribers_url":"https://api.github.com/repos/poemm/hera/subscribers","subscription_url":"https://api.github.com/repos/poemm/hera/subscription","commits_url":"https://api.github.com/repos/poemm/hera/commits{/sha}","git_commits_url":"https://api.github.com/repos/poemm/hera/git/commits{/sha}","comments_url":"https://api.github.com/repos/poemm/hera/comments{/number}","issue_comment_url":"https://api.github.com/repos/poemm/hera/issues/comments{/number}","contents_url":"https://api.github.com/repos/poemm/hera/contents/{+path}","compare_url":"https://api.github.com/repos/poemm/hera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poemm/hera/merges","archive_url":"https://api.github.com/repos/poemm/hera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poemm/hera/downloads","issues_url":"https://api.github.com/repos/poemm/hera/issues{/number}","pulls_url":"https://api.github.com/repos/poemm/hera/pulls{/number}","milestones_url":"https://api.github.com/repos/poemm/hera/milestones{/number}","notifications_url":"https://api.github.com/repos/poemm/hera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poemm/hera/labels{/name}","releases_url":"https://api.github.com/repos/poemm/hera/releases{/id}","deployments_url":"https://api.github.com/repos/poemm/hera/deployments","created_at":"2018-08-30T21:42:25Z","updated_at":"2018-09-03T02:50:34Z","pushed_at":"2018-09-03T02:50:32Z","git_url":"git://github.com/poemm/hera.git","ssh_url":"git@github.com:poemm/hera.git","clone_url":"https://github.com/poemm/hera.git","svn_url":"https://github.com/poemm/hera","homepage":"","size":695,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ewasm:master","ref":"master","sha":"0206f1b4ba839c6086734035ea76e5a38c06425f","user":{"login":"ewasm","id":20602854,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjAyODU0","avatar_url":"https://avatars1.githubusercontent.com/u/20602854?v=4","gravatar_id":"","url":"https://api.github.com/users/ewasm","html_url":"https://github.com/ewasm","followers_url":"https://api.github.com/users/ewasm/followers","following_url":"https://api.github.com/users/ewasm/following{/other_user}","gists_url":"https://api.github.com/users/ewasm/gists{/gist_id}","starred_url":"https://api.github.com/users/ewasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewasm/subscriptions","organizations_url":"https://api.github.com/users/ewasm/orgs","repos_url":"https://api.github.com/users/ewasm/repos","events_url":"https://api.github.com/users/ewasm/events{/privacy}","received_events_url":"https://api.github.com/users/ewasm/received_events","type":"Organization","site_admin":false},"repo":{"id":66198886,"node_id":"MDEwOlJlcG9zaXRvcnk2NjE5ODg4Ng==","name":"hera","full_name":"ewasm/hera","owner":{"login":"ewasm","id":20602854,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjAyODU0","avatar_url":"https://avatars1.githubusercontent.com/u/20602854?v=4","gravatar_id":"","url":"https://api.github.com/users/ewasm","html_url":"https://github.com/ewasm","followers_url":"https://api.github.com/users/ewasm/followers","following_url":"https://api.github.com/users/ewasm/following{/other_user}","gists_url":"https://api.github.com/users/ewasm/gists{/gist_id}","starred_url":"https://api.github.com/users/ewasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewasm/subscriptions","organizations_url":"https://api.github.com/users/ewasm/orgs","repos_url":"https://api.github.com/users/ewasm/repos","events_url":"https://api.github.com/users/ewasm/events{/privacy}","received_events_url":"https://api.github.com/users/ewasm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ewasm/hera","description":"Hera: ewasm virtual machine conforming to the EVMC API","fork":false,"url":"https://api.github.com/repos/ewasm/hera","forks_url":"https://api.github.com/repos/ewasm/hera/forks","keys_url":"https://api.github.com/repos/ewasm/hera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ewasm/hera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ewasm/hera/teams","hooks_url":"https://api.github.com/repos/ewasm/hera/hooks","issue_events_url":"https://api.github.com/repos/ewasm/hera/issues/events{/number}","events_url":"https://api.github.com/repos/ewasm/hera/events","assignees_url":"https://api.github.com/repos/ewasm/hera/assignees{/user}","branches_url":"https://api.github.com/repos/ewasm/hera/branches{/branch}","tags_url":"https://api.github.com/repos/ewasm/hera/tags","blobs_url":"https://api.github.com/repos/ewasm/hera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ewasm/hera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ewasm/hera/git/refs{/sha}","trees_url":"https://api.github.com/repos/ewasm/hera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ewasm/hera/statuses/{sha}","languages_url":"https://api.github.com/repos/ewasm/hera/languages","stargazers_url":"https://api.github.com/repos/ewasm/hera/stargazers","contributors_url":"https://api.github.com/repos/ewasm/hera/contributors","subscribers_url":"https://api.github.com/repos/ewasm/hera/subscribers","subscription_url":"https://api.github.com/repos/ewasm/hera/subscription","commits_url":"https://api.github.com/repos/ewasm/hera/commits{/sha}","git_commits_url":"https://api.github.com/repos/ewasm/hera/git/commits{/sha}","comments_url":"https://api.github.com/repos/ewasm/hera/comments{/number}","issue_comment_url":"https://api.github.com/repos/ewasm/hera/issues/comments{/number}","contents_url":"https://api.github.com/repos/ewasm/hera/contents/{+path}","compare_url":"https://api.github.com/repos/ewasm/hera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ewasm/hera/merges","archive_url":"https://api.github.com/repos/ewasm/hera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ewasm/hera/downloads","issues_url":"https://api.github.com/repos/ewasm/hera/issues{/number}","pulls_url":"https://api.github.com/repos/ewasm/hera/pulls{/number}","milestones_url":"https://api.github.com/repos/ewasm/hera/milestones{/number}","notifications_url":"https://api.github.com/repos/ewasm/hera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ewasm/hera/labels{/name}","releases_url":"https://api.github.com/repos/ewasm/hera/releases{/id}","deployments_url":"https://api.github.com/repos/ewasm/hera/deployments","created_at":"2016-08-21T12:58:03Z","updated_at":"2018-09-03T18:59:42Z","pushed_at":"2018-09-03T18:59:41Z","git_url":"git://github.com/ewasm/hera.git","ssh_url":"git@github.com:ewasm/hera.git","clone_url":"https://github.com/ewasm/hera.git","svn_url":"https://github.com/ewasm/hera","homepage":"","size":684,"stargazers_count":68,"watchers_count":68,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":25,"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":20,"open_issues":25,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ewasm/hera/pulls/394"},"html":{"href":"https://github.com/ewasm/hera/pull/394"},"issue":{"href":"https://api.github.com/repos/ewasm/hera/issues/394"},"comments":{"href":"https://api.github.com/repos/ewasm/hera/issues/394/comments"},"review_comments":{"href":"https://api.github.com/repos/ewasm/hera/pulls/394/comments"},"review_comment":{"href":"https://api.github.com/repos/ewasm/hera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ewasm/hera/pulls/394/commits"},"statuses":{"href":"https://api.github.com/repos/ewasm/hera/statuses/8717478105b7e5d9ab0df0349f93161f1756807d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"chfast"}}