{"action":"created","issue":{"url":"https://api.github.com/repos/gasman/bonsai-c/issues/8","repository_url":"https://api.github.com/repos/gasman/bonsai-c","labels_url":"https://api.github.com/repos/gasman/bonsai-c/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/gasman/bonsai-c/issues/8/comments","events_url":"https://api.github.com/repos/gasman/bonsai-c/issues/8/events","html_url":"https://github.com/gasman/bonsai-c/issues/8","id":162998566,"number":8,"title":"Unimplemented rule for shift_expression: 3","user":{"login":"darkoverlordofdata","id":1262194,"avatar_url":"https://avatars.githubusercontent.com/u/1262194?v=3","gravatar_id":"","url":"https://api.github.com/users/darkoverlordofdata","html_url":"https://github.com/darkoverlordofdata","followers_url":"https://api.github.com/users/darkoverlordofdata/followers","following_url":"https://api.github.com/users/darkoverlordofdata/following{/other_user}","gists_url":"https://api.github.com/users/darkoverlordofdata/gists{/gist_id}","starred_url":"https://api.github.com/users/darkoverlordofdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkoverlordofdata/subscriptions","organizations_url":"https://api.github.com/users/darkoverlordofdata/orgs","repos_url":"https://api.github.com/users/darkoverlordofdata/repos","events_url":"https://api.github.com/users/darkoverlordofdata/events{/privacy}","received_events_url":"https://api.github.com/users/darkoverlordofdata/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-29T18:47:51Z","updated_at":"2016-06-29T22:59:44Z","closed_at":null,"body":"Referring to issue #7 (https://github.com/gasman/bonsai-c/issues/), I decided to use the compiler and paste the code into a correctly formatted module. However, I still cannot access the heap due to lack of shift operators. Per the spec (http://asmjs.org/spec/latest/), you need to use shift operators to access the heap, for example:\r\n\r\n\r\n  var HEAP8 = new stdlib.Int8Array(buffer);\r\n  var HEAP16 = new stdlib.Int16Array(buffer);\r\n  var HEAP32 = new stdlib.Int32Array(buffer);\r\n  var HEAPU8 = new stdlib.Uint8Array(buffer);\r\n  var HEAPU16 = new stdlib.Uint16Array(buffer);\r\n  var HEAPU32 = new stdlib.Uint32Array(buffer);\r\n  var HEAPF32 = new stdlib.Float32Array(buffer);\r\n  var HEAPF64 = new stdlib.Float64Array(buffer);\r\n\r\n\r\nHEAPF64[p>>3]\r\nHEAPF32[p>>2]\r\nHEAPU16[p>>1]\r\nHEAP8[p>>0]\r\n\r\nWithout this idiom, FireFox rejects the code declared by a \"use asm\" pragma, it's part of the detection algorithm. "},"comment":{"url":"https://api.github.com/repos/gasman/bonsai-c/issues/comments/229514701","html_url":"https://github.com/gasman/bonsai-c/issues/8#issuecomment-229514701","issue_url":"https://api.github.com/repos/gasman/bonsai-c/issues/8","id":229514701,"user":{"login":"gasman","id":85097,"avatar_url":"https://avatars.githubusercontent.com/u/85097?v=3","gravatar_id":"","url":"https://api.github.com/users/gasman","html_url":"https://github.com/gasman","followers_url":"https://api.github.com/users/gasman/followers","following_url":"https://api.github.com/users/gasman/following{/other_user}","gists_url":"https://api.github.com/users/gasman/gists{/gist_id}","starred_url":"https://api.github.com/users/gasman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasman/subscriptions","organizations_url":"https://api.github.com/users/gasman/orgs","repos_url":"https://api.github.com/users/gasman/repos","events_url":"https://api.github.com/users/gasman/events{/privacy}","received_events_url":"https://api.github.com/users/gasman/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T22:59:44Z","updated_at":"2016-06-29T22:59:44Z","body":"Hi @darkoverlordofdata - thanks for the report! I don't quite follow what you're doing to arrive at this error, though. It sounds like you're writing this code (`HEAPF64[p>>3]` etc) into the C source file, which isn't going to work - this is code that would be generated in response to a heap access such as `some_int_array[p]` (once we actually get round to implementing heap storage!), not code that would be written inside your source file.\r\n\r\nPerhaps it would be helpful to share your code, in case I'm misunderstanding something?"}}
{"actor":{"display_login":"gasman"}}