Mercurial > repos > tabletprog
changeset 89:f23ecd4e22af
Remove some cruft from cbackend
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 23 Jul 2012 07:59:34 -0700 |
parents | 474f17ebaaa0 |
children | b5152f5ac138 |
files | cbackend.js |
diffstat | 1 files changed, 0 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/cbackend.js Mon Jul 23 07:58:20 2012 -0700 +++ b/cbackend.js Mon Jul 23 07:59:34 2012 -0700 @@ -12,33 +12,6 @@ return methodIds[methodName]; } -function importSym(obj, src, key) -{ - if(!(key in src)) { - throw new Error(key +' not found in source object for import'); - } - if(key in obj) { - throw new Error(key +' already exists in target object for import') - } - obj[key] = src[key]; -} - -function doImport(obj, src, symlist) -{ - if (symlist === undefined) { - each(src, function(key,val) { - if (key != 'parent') { - importSym(obj, src, key); - } - }); - } else { - for (var i = 0; i < symlist.length; ++i) { - importSym(obj, src, symlist[i]); - } - } - return obj; -} - op.prototype.toC = function(isReceiver) { var optoMeth = {'+': 'ADD_', '-': 'SUB_', '*': 'MUL_', '/': 'DIV_', '%': 'MOD_', '=': 'EQ_', '!=': 'NEQ_', '<': 'LT_', '>': 'GT_', '>=': 'GEQ_', '<=': 'LEQ_', '.': 'CAT_'}; var method = optoMeth[this.op];