diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-02-22 23:11:47 +0000 |
commit | 5c6357cdb820b4f628d036ba7b2248f221d50c0b (patch) | |
tree | 6365552f2737faaffe63a395272da242ee2c4f03 /Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua | |
parent | b4568bc71e054f3d1fd6404b45d2322631778284 (diff) |
ConTeXt version 2019.02.22 19:35
git-svn-id: svn://tug.org/texlive/trunk@50086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua b/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua index e04b37eab3c..7d7fafefde2 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/l-macro-imp-optimize.lua @@ -46,17 +46,22 @@ if LUAVERSION >= 5.3 and lua.macros then -- #define rshift(a,b) ((a >> b) & 0xFFFFFFFF) -- ]] - lua.macros.resolvestring [[ - #define band(a,b) (a&b) - #define bnot(a) (~a&0xFFFFFFFF) - #define bor(a,b) ((a|b)&0xFFFFFFFF) - #define btest(a,b) ((a&b)~=0) - #define bxor(a,b) ((a~b)&0xFFFFFFFF) - #define rshift(a,b) ((a&b)~=0) - #define extract(a,b,c) ((a>>b)&~(-1<<c)) - #define extract(a,b) ((a>>b)&0x1)) - #define lshift(a,b) ((a<<b)&0xFFFFFFFF) - #define rshift(a,b) ((a>>b)&0xFFFFFFFF) - ]] +lua.macros.resolvestring [[ +#define band(a,b) ((a)&(b)) +#define bnot(a) (~(a)&0xFFFFFFFF) +#define bor(a,b) (((a)|(b))&0xFFFFFFFF) +#define btest(a,b) (((a)&(b))~=0) +#define bxor(a,b) (((a)~(b))&0xFFFFFFFF) +#define rshift(a,b) (((a)&(b))~=0) +#define extract(a,b,c) (((a)>>(b))&~(-1<<(c))) +#define extract(a,b) (((a)>>(b))&0x1) +#define extract1(a,b) ((a >> b) & 0x01) +#define extract2(a,b) ((a >> b) & 0x03) +#define extract4(a,b) ((a >> b) & 0x0F) +#define lshift(a,b) (((a)<<(b))&0xFFFFFFFF) +#define rshift(a,b) (((a)>>(b))&0xFFFFFFFF) +#define intdiv(a,b) ((a)//(b)) +#define idiv(a,b) ((a)//(b)) +]] end |