Skip to content

Commit

Permalink
issue #169 nan and inf literal generated by JIT C codegen, but these …
Browse files Browse the repository at this point in the history
…are not valid literals. Temporarily use macros to replace these but a better fix is needed
  • Loading branch information
dibyendumajumdar committed Dec 30, 2019
1 parent e85d471 commit b57e778
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ravi_jitshared.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,12 @@ static const char Lua_header[] =
" (ttisfloat(o) ? ((n) = fltvalue(o), 1) : \\\n"
" (ttisinteger(o) ? ((n) = cast_num(ivalue(o)), 1) : 0))\n"
"#define intop(op,v1,v2) l_castU2S(l_castS2U(v1) op l_castS2U(v2))\n"
"#define nan (0./0.)\n"
"#define inf (1./0.)\n"
"#define luai_numunm(L,a) (-(a))\n";

// FIXME - 'inf' and 'nan' above need to be sorted!

// We can only compile a subset of op codes
// and not all features are supported
bool raviJ_cancompile(Proto *p) { (void)p; return true; }
Expand Down

0 comments on commit b57e778

Please sign in to comment.