Quote:
Originally Posted by v4.11rc2pre1 - November 7 2011
+ JS: now supports << and >> (bitwise shift) operators -- note parameters are converted to integer so 3.4 << 2 == 12, etc
|
http://dl.dropbox.com/u/1627980/reap...mod_091111.zip
includes updated files for eel2 to add xor (+ xor=), not (+ redundant not=), <<=, =>>.
not sending patches, since git diff and other tools make a mess out of it (for other WDL files as well); independent of text editors it seems... there is something very wrong with line endings and encoding in there. i'm pretty sure UNIX/UTF-8 for *all* WDL files, a consistent coding style and whitespaces, might be a very good idea!
the 3 character shift assignment operators are solved like:
Code:
...
DECL_ASMFUNC(shl)
DECL_ASMFUNC(shr)
DECL_ASMFUNC(shl_op)
DECL_ASMFUNC(shr_op)
Code:
static struct
{
char op[3];
char lscan,rscan;
char *func;
} preprocSymbols[] =
{
{{'+','='}, 0, 3, "_addop" },
...
{{'<','<','='}, 0, 3, "_shlop" },
{{'>','>','='}, 0, 3, "_shrop" },
Code:
...
if (preprocSymbols[n].op[1]) expression++;
if (preprocSymbols[n].op[2]) expression++;
Code:
compiler/platform spec. assembly in asm-nseel-*
these are only tested on msvc-x86, as i don't have x86-apple machine (for a build without mods for x86-gcc) and couldn't be arsed to boot the qemu ppc-linux and transfer files via ftp for each test iteration.
should work in general, if the logic is correct, but there might be typos that break the build or execution...
--