void StatsAnalyzer::WriteConstantLiterals(std::ostream& out) { out << "Constant literals" << std::endl; out << "Float 32" << std::endl; WriteFreq(out, GetPrevalence(stats_.f32_constant_hist), KeyIsLabel); out << std::endl << "Float 64" << std::endl; WriteFreq(out, GetPrevalence(stats_.f64_constant_hist), KeyIsLabel); out << std::endl << "Unsigned int 16" << std::endl; WriteFreq(out, GetPrevalence(stats_.u16_constant_hist), KeyIsLabel); out << std::endl << "Signed int 16" << std::endl; WriteFreq(out, GetPrevalence(stats_.s16_constant_hist), KeyIsLabel); out << std::endl << "Unsigned int 32" << std::endl; WriteFreq(out, GetPrevalence(stats_.u32_constant_hist), KeyIsLabel); out << std::endl << "Signed int 32" << std::endl; WriteFreq(out, GetPrevalence(stats_.s32_constant_hist), KeyIsLabel); out << std::endl << "Unsigned int 64" << std::endl; WriteFreq(out, GetPrevalence(stats_.u64_constant_hist), KeyIsLabel); out << std::endl << "Signed int 64" << std::endl; WriteFreq(out, GetPrevalence(stats_.s64_constant_hist), KeyIsLabel); }
static void ChannelOn (byte channel) { if (!sound_on) return; if ((channel==3 && channelfreq[channel]!=0) || (channelfreq[channel]!=0 && channelfreq[channel]<=MAXFREQ)) { invalidfreq[channel]=0; WriteFreq (channel,channelfreq[channel]); WriteVolume (channel,channelvolume[channel]); } else { WriteVolume (channel,0); invalidfreq[channel]=1; } }
void StatsAnalyzer::WriteOpcode(std::ostream& out) { out << "Total unique opcodes used: " << opcode_freq_.size() << std::endl; WriteFreq(out, opcode_freq_, GetOpcodeString); }
void StatsAnalyzer::WriteExtension(std::ostream& out) { WriteFreq(out, extension_freq_, KeyIsLabel); }
void StatsAnalyzer::WriteCapability(std::ostream& out) { WriteFreq(out, capability_freq_, GetCapabilityString); }
void StatsAnalyzer::WriteGenerator(std::ostream& out) { WriteFreq(out, generator_freq_, GetGeneratorString); }
void StatsAnalyzer::WriteVersion(std::ostream& out) { WriteFreq(out, version_freq_, GetVersionString); }