const RegisterAllocator::State RegisterAllocator::capture() { State state; if(!minimalRestore) { spillAll(); return state; // Empty state } for(int i = 0; i < 8; i++) { // Prevent optimizations markModified(OperandREG32(i)); markModified(OperandMMREG(i)); markModified(OperandXMMREG(i)); } for(int i = 0; i < 8; i++) { state.GPR[i] = GPR[i]; state.MMX[i] = MMX[i]; state.XMM[i] = XMM[i]; } return state; }
void RegisterAllocator::restore(const State &state) { if(!minimalRestore) { spillAll(); return; } for(int i = 0; i < 8; i++) { if(GPR[i].reference != state.GPR[i].reference) { spill32(i); } if(MMX[i].reference != state.MMX[i].reference) { spill64(i); } if(XMM[i].reference != state.XMM[i].reference) { spill128(i); } } for(int i = 0; i < 8; i++) { if(GPR[i].reference != state.GPR[i].reference && state.GPR[i].reference != 0) { allocate32(i, state.GPR[i].reference, true, state.GPR[i].partial); } if(MMX[i].reference != state.MMX[i].reference && state.MMX[i].reference != 0) { allocate64(i, state.MMX[i].reference, true); } if(XMM[i].reference != state.XMM[i].reference && state.XMM[i].reference != 0) { allocate128(i, state.XMM[i].reference, true, state.XMM[i].partial != 0); } } for(int i = 0; i < 8; i++) { // Prevent optimizations markModified(OperandREG32(i)); markModified(OperandMMREG(i)); markModified(OperandXMMREG(i)); } }
Encoding *RegisterAllocator::x86(int instructionID, const Operand &firstOperand, const Operand &secondOperand, const Operand &thirdOperand) { markModified(firstOperand); markReferenced(secondOperand); return Assembler::x86(instructionID, firstOperand, secondOperand, thirdOperand); }
void LightController::removeSceneLight(const SceneLight *constSceneLight) { SceneLight *sceneLight = findSceneLight(constSceneLight); mapHandler->getMap()->removeSceneLight(sceneLight); markModified(); }
void GfxPointsData::setPoint(int i, QPointF p, bool hush) { if (xx_[i]==p.x() && yy_[i]==p.y()) return; xx_[i] = p.x(); yy_[i] = p.y(); if (!hush) markModified(); }
void OSPRayMaterial::commit(const std::string& renderer) { if (!isModified()) return; ospRelease(_ospMaterial); _ospMaterial = ospNewMaterial2(renderer.c_str(), "default_material"); markModified(false); // Ensure commit recreates the ISPC object commit(); }
void IRCRoom::UserDetails::setVoice(bool voice) { OS_LOCK(*m_cs); if(m_voice != voice) { m_voice = voice; markModified(); } }
void IRCRoom::UserDetails::setType(IRCUserType type) { OS_LOCK(*m_cs); if(m_type != type) { m_type = type; markModified(); } }
void IRCRoom::UserDetails::setBanned(bool banned) { OS_LOCK(*m_cs); if(m_banned != banned) { m_banned = banned; markModified(); } }
void IRCRoom::UserDetails::setInvisible(bool invisible) { OS_LOCK(*m_cs); if(m_invisible != invisible) { m_invisible = invisible; markModified(); } }
const SceneLight *LightController::updateSceneSunLightProperties(const SceneLight *constSceneLight, const Vector3<float> &direction) { SceneLight *sceneLight = findSceneLight(constSceneLight); SunLight *light = static_cast<SunLight *>(sceneLight->getLight()); light->setDirection(direction); markModified(); return sceneLight; }
const SceneLight *LightController::updateSceneOmnidirectionalLightProperties(const SceneLight *constSceneLight, float attenuation, const Point3<float> &position) { SceneLight *sceneLight = findSceneLight(constSceneLight); OmnidirectionalLight *light = static_cast<OmnidirectionalLight *>(sceneLight->getLight()); light->setAttenuation(attenuation); light->setPosition(position); markModified(); return sceneLight; }
void RegisterAllocator::spillAll() { for(int i = 0; i < 8; i++) { // Prevent optimizations markModified(OperandREG32(i)); markModified(OperandMMREG(i)); markModified(OperandXMMREG(i)); } for(int i = 0; i < 8; i++) { spill32(i); spill64(i); spill128(i); } for(int i = 0; i < 8; i++) { // Prevent optimizations markModified(OperandREG32(i)); markModified(OperandMMREG(i)); markModified(OperandXMMREG(i)); } }
const SceneLight *LightController::updateSceneLightGeneralProperties(const SceneLight *constSceneLight, const Point3<float> &ambientColor, bool isProduceShadow) { SceneLight *sceneLight = findSceneLight(constSceneLight); Light *light = sceneLight->getLight(); light->setAmbientColor(ambientColor); if(light->isProduceShadow()!=isProduceShadow) { light->setProduceShadow(isProduceShadow); } markModified(); return sceneLight; }
void Config::set(const std::string &key, const std::string &val) { ensureLoaded(); try { if (get(key) == val) { return; } } catch (pt::ptree_bad_path &) { // Skip the check if field doesn't exist. } props.put(key, val); markModified(); }
void ArtworkMetadata::clearModel() { m_KeywordsModel.clearModel(); markModified(); }
void GfxPointsData::addPoint(QPointF p, bool hush) { xx_.append(p.x()); yy_.append(p.y()); if (!hush) markModified(); }
void GfxPointsData::removePoint(int i) { xx_.removeAt(i); yy_.removeAt(i); markModified(); }
bool ArtworkMetadata::removeKeywords(const QSet<QString> &keywordsSet, bool caseSensitive) { bool result = m_KeywordsModel.removeKeywords(keywordsSet, caseSensitive); LOG_INFO << "Removed keywords:" << result; if (result) { markModified(); } return result; }
int ArtworkMetadata::appendKeywords(const QStringList &keywordsList) { int result = m_KeywordsModel.appendKeywords(keywordsList); LOG_INFO << "Appended" << result << "keywords out of" << keywordsList.length(); if (result > 0) { markModified(); } return result; }
bool ArtworkMetadata::appendKeyword(const QString &keyword) { bool result = m_KeywordsModel.appendKeyword(keyword); if (result) { markModified(); } return result; }
bool ArtworkMetadata::removeLastKeyword() { QString removed; bool result = m_KeywordsModel.takeLastKeyword(removed); if (result) { markModified(); } return result; }
bool ArtworkMetadata::removeKeywordAt(int index) { QString removed; bool result = m_KeywordsModel.takeKeywordAt(index, removed); if (result) { markModified(); } return result; }
bool ArtworkMetadata::replace(const QString &replaceWhat, const QString &replaceTo, Common::SearchFlags flags) { bool result = m_KeywordsModel.replace(replaceWhat, replaceTo, flags); if (result) { markModified(); } return result; }
void TOCEntry::setSheetCount(int n) { sheetCount_ = n; markModified(); }
void TOCEntry::setStartPage(int n) { startPage_ = n; markModified(); }
void TOCEntry::setTitle(QString t) { title_ = t; markModified(); }
bool ArtworkMetadata::clearKeywords() { bool result = m_KeywordsModel.clearKeywords(); if (result) { markModified(); } return result; }
void TOCEntry::setLastSeen(QDateTime const &t) { seen_ = t; markModified(); }
bool ArtworkMetadata::editKeyword(int index, const QString &replacement) { bool result = m_KeywordsModel.editKeyword(index, replacement); if (result) { markModified(); } return result; }