Skip to content

Commit

Permalink
Bug 933932 - OdinMonkey: provide a better warning message for uncoerc…
Browse files Browse the repository at this point in the history
…ed calls (r=bbouvier)

UltraBlame original commit: a3ace05661dc27bb6a925017b3f736814fe21318
  • Loading branch information
marco-c committed Sep 29, 2019
1 parent 92a4b88 commit 1696986
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/src/jit/AsmJS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4339,16 +4339,18 @@ CheckExpr(FunctionCompiler &f, ParseNode *expr, MDefinition **def, Type *type)
case PNK_NAME: return CheckVarRef(f, expr, def, type);
case PNK_ELEM: return CheckArrayLoad(f, expr, def, type);
case PNK_ASSIGN: return CheckAssign(f, expr, def, type);
case PNK_CALL: return f.fail(expr, "non-expression-statement call must be coerced");
case PNK_POS: return CheckPos(f, expr, def, type);
case PNK_NOT: return CheckNot(f, expr, def, type);
case PNK_NEG: return CheckNeg(f, expr, def, type);
case PNK_BITNOT: return CheckBitNot(f, expr, def, type);
case PNK_COMMA: return CheckComma(f, expr, def, type);
case PNK_CONDITIONAL: return CheckConditional(f, expr, def, type);

case PNK_STAR: return CheckMultiply(f, expr, def, type);

case PNK_CALL: return f.fail(expr, "all function calls must either be ignored (via "
"f(); or comma-expression), coerced to signed "
"(via f()|0) or coerced to double (via +f())");

case PNK_ADD:
case PNK_SUB: return CheckAddOrSub(f, expr, def, type);

Expand Down

0 comments on commit 1696986

Please sign in to comment.