diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-07-14 19:04:34 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:45 -0400 |
commit | 449ea84dcc7dffb2f042fc414eb7238ae842d596 (patch) | |
tree | 7e22a358e60b66fd67e838416210d727d83a030d /js/src/jsopcode.cpp | |
parent | aa65e8a189d81cba75f101d07ef591b751881fe8 (diff) | |
download | UXP-449ea84dcc7dffb2f042fc414eb7238ae842d596.tar UXP-449ea84dcc7dffb2f042fc414eb7238ae842d596.tar.gz UXP-449ea84dcc7dffb2f042fc414eb7238ae842d596.tar.lz UXP-449ea84dcc7dffb2f042fc414eb7238ae842d596.tar.xz UXP-449ea84dcc7dffb2f042fc414eb7238ae842d596.zip |
1344477 - Part 1: Add JSOP_CALL_IGNORES_RV for function call that ignores return value.
Diffstat (limited to 'js/src/jsopcode.cpp')
-rw-r--r-- | js/src/jsopcode.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index b6897908b..d1ae3cd5e 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -132,7 +132,8 @@ js::StackUses(JSScript* script, jsbytecode* pc) return 2 + GET_ARGC(pc) + 1; default: /* stack: fun, this, [argc arguments] */ - MOZ_ASSERT(op == JSOP_CALL || op == JSOP_EVAL || op == JSOP_CALLITER || + MOZ_ASSERT(op == JSOP_CALL || op == JSOP_CALL_IGNORES_RV || op == JSOP_EVAL || + op == JSOP_CALLITER || op == JSOP_STRICTEVAL || op == JSOP_FUNCALL || op == JSOP_FUNAPPLY); return 2 + GET_ARGC(pc); } @@ -1363,6 +1364,7 @@ ExpressionDecompiler::decompilePC(jsbytecode* pc) case JSOP_NEWTARGET: return write("new.target"); case JSOP_CALL: + case JSOP_CALL_IGNORES_RV: case JSOP_CALLITER: case JSOP_FUNCALL: return decompilePCForStackOperand(pc, -int32_t(GET_ARGC(pc) + 2)) && @@ -1662,7 +1664,7 @@ DecompileArgumentFromStack(JSContext* cx, int formalIndex, char** res) /* Don't handle getters, setters or calls from fun.call/fun.apply. */ JSOp op = JSOp(*current); - if (op != JSOP_CALL && op != JSOP_NEW) + if (op != JSOP_CALL && op != JSOP_CALL_IGNORES_RV && op != JSOP_NEW) return true; if (static_cast<unsigned>(formalIndex) >= GET_ARGC(current)) @@ -1725,6 +1727,8 @@ js::CallResultEscapes(jsbytecode* pc) if (*pc == JSOP_CALL) pc += JSOP_CALL_LENGTH; + else if (*pc == JSOP_CALL_IGNORES_RV) + pc += JSOP_CALL_IGNORES_RV_LENGTH; else if (*pc == JSOP_SPREADCALL) pc += JSOP_SPREADCALL_LENGTH; else |