diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-26 14:52:44 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-26 16:15:10 -0700 |
commit | 79a928333e2c988ce022aad16a801138ca23ffe8 (patch) | |
tree | 195b57f3668b7d100f78e55b76ac7c3ffc2a9954 | |
parent | 40047b77dedd11a01ed117adfb59a0578511cc94 (diff) |
remove makeGetPos and part of noNeedFirst
-rw-r--r-- | src/parseTools.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 034748e7..c6760641 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1583,12 +1583,8 @@ function getFastValues(list, op, type) { } function calcFastOffset(ptr, pos, noNeedFirst) { - var offset = noNeedFirst ? '0' : makeGetPos(ptr); - return getFastValue(offset, '+', pos, 'i32'); -} - -function makeGetPos(ptr) { - return ptr; + assert(!noNeedFirst); + return getFastValue(ptr, '+', pos, 'i32'); } var IHEAP_FHEAP = set('IHEAP', 'IHEAPU', 'FHEAP'); @@ -1825,7 +1821,7 @@ function getGetElementPtrIndexes(item) { // struct, and possibly further substructures, all embedded // can also be to 'blocks': [8 x i32]*, not just structs type = removePointing(type); - var indexes = [makeGetPos(ident)]; + var indexes = [ident]; var offset = item.params[1]; if (offset != 0) { if (isStructType(type)) { |