MIRType BaselineInspector::expectedBinaryArithSpecialization(jsbytecode *pc) { MIRType result; ICStub *stubs[2]; const ICEntry &entry = icEntryFromPC(pc); ICStub *stub = entry.fallbackStub(); if (stub->isBinaryArith_Fallback() && stub->toBinaryArith_Fallback()->hadUnoptimizableOperands()) { return MIRType_None; } stubs[0] = monomorphicStub(pc); if (stubs[0]) { if (TryToSpecializeBinaryArithOp(stubs, 1, &result)) return result; } if (dimorphicStub(pc, &stubs[0], &stubs[1])) { if (TryToSpecializeBinaryArithOp(stubs, 2, &result)) return result; } return MIRType_None; }
bool BaselineInspector::hasSeenDoubleResult(jsbytecode* pc) { if (!hasICScript()) { return false; } const ICEntry& entry = icEntryFromPC(pc); ICStub* stub = entry.fallbackStub(); MOZ_ASSERT(stub->isUnaryArith_Fallback() || stub->isBinaryArith_Fallback()); if (stub->isUnaryArith_Fallback()) { return stub->toUnaryArith_Fallback()->sawDoubleResult(); } return stub->toBinaryArith_Fallback()->sawDoubleResult(); }