summaryrefslogtreecommitdiff
path: root/js/src/jit/IonBuilder.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-14 19:04:34 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:45 -0400
commit6b39e4dcb3022d97235ae5367d02cfea521228bb (patch)
tree7e22a358e60b66fd67e838416210d727d83a030d /js/src/jit/IonBuilder.h
parent48f3b1035a64253c390105df883ea95aaa80bb26 (diff)
downloaduxp-6b39e4dcb3022d97235ae5367d02cfea521228bb.tar.gz
1344477 - Part 1: Add JSOP_CALL_IGNORES_RV for function call that ignores return value.
Diffstat (limited to 'js/src/jit/IonBuilder.h')
-rw-r--r--js/src/jit/IonBuilder.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/js/src/jit/IonBuilder.h b/js/src/jit/IonBuilder.h
index dd40b4bd69..9e40b39592 100644
--- a/js/src/jit/IonBuilder.h
+++ b/js/src/jit/IonBuilder.h
@@ -699,6 +699,7 @@ class IonBuilder
MOZ_MUST_USE bool jsop_funapplyarguments(uint32_t argc);
MOZ_MUST_USE bool jsop_funapplyarray(uint32_t argc);
MOZ_MUST_USE bool jsop_call(uint32_t argc, bool constructing);
+ MOZ_MUST_USE bool jsop_call(uint32_t argc, bool constructing, bool ignoresReturnValue);
MOZ_MUST_USE bool jsop_eval(uint32_t argc);
MOZ_MUST_USE bool jsop_ifeq(JSOp op);
MOZ_MUST_USE bool jsop_try();
@@ -1352,16 +1353,21 @@ class CallInfo
MDefinition* newTargetArg_;
MDefinitionVector args_;
- bool constructing_;
- bool setter_;
+ bool constructing_:1;
+
+ // True if the caller does not use the return value.
+ bool ignoresReturnValue_:1;
+
+ bool setter_:1;
public:
- CallInfo(TempAllocator& alloc, bool constructing)
+ CallInfo(TempAllocator& alloc, bool constructing, bool ignoresReturnValue)
: fun_(nullptr),
thisArg_(nullptr),
newTargetArg_(nullptr),
args_(alloc),
constructing_(constructing),
+ ignoresReturnValue_(ignoresReturnValue),
setter_(false)
{ }
@@ -1370,6 +1376,7 @@ class CallInfo
fun_ = callInfo.fun();
thisArg_ = callInfo.thisArg();
+ ignoresReturnValue_ = callInfo.ignoresReturnValue();
if (constructing())
newTargetArg_ = callInfo.getNewTarget();
@@ -1466,6 +1473,10 @@ class CallInfo
return constructing_;
}
+ bool ignoresReturnValue() const {
+ return ignoresReturnValue_;
+ }
+
void setNewTarget(MDefinition* newTarget) {
MOZ_ASSERT(constructing());
newTargetArg_ = newTarget;