Ejemplo n.º 1
0
	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;
	}
Ejemplo n.º 2
0
	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));
		}
	}
Ejemplo n.º 3
0
	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);
	}
Ejemplo n.º 4
0
	void LightController::removeSceneLight(const SceneLight *constSceneLight)
	{
		SceneLight *sceneLight = findSceneLight(constSceneLight);
		mapHandler->getMap()->removeSceneLight(sceneLight);

		markModified();
	}
Ejemplo n.º 5
0
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();
}
Ejemplo n.º 6
0
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();
}
Ejemplo n.º 7
0
void IRCRoom::UserDetails::setVoice(bool voice)
{
	OS_LOCK(*m_cs);

	if(m_voice != voice)
	{
		m_voice = voice;
		markModified();
	}
}
Ejemplo n.º 8
0
void IRCRoom::UserDetails::setType(IRCUserType type)
{
	OS_LOCK(*m_cs);

	if(m_type != type)
	{
		m_type = type;
		markModified();
	}
}
Ejemplo n.º 9
0
void IRCRoom::UserDetails::setBanned(bool banned)
{
	OS_LOCK(*m_cs);

	if(m_banned != banned)
	{
		m_banned = banned;
		markModified();
	}
}
Ejemplo n.º 10
0
void IRCRoom::UserDetails::setInvisible(bool invisible)
{
	OS_LOCK(*m_cs);

	if(m_invisible != invisible)
	{
		m_invisible = invisible;
		markModified();
	}
}
Ejemplo n.º 11
0
	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;
	}
Ejemplo n.º 12
0
	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;
	}
Ejemplo n.º 13
0
	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));
		}
	}
Ejemplo n.º 14
0
	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;
	}
Ejemplo n.º 15
0
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();
}
Ejemplo n.º 16
0
 void ArtworkMetadata::clearModel() {
     m_KeywordsModel.clearModel();
     markModified();
 }
Ejemplo n.º 17
0
void GfxPointsData::addPoint(QPointF p, bool hush) {
  xx_.append(p.x());
  yy_.append(p.y());
  if (!hush)
    markModified();
}
Ejemplo n.º 18
0
void GfxPointsData::removePoint(int i) {
  xx_.removeAt(i);
  yy_.removeAt(i);
  markModified();
}
Ejemplo n.º 19
0
 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;
 }
Ejemplo n.º 20
0
 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;
 }
Ejemplo n.º 21
0
 bool ArtworkMetadata::appendKeyword(const QString &keyword) {
     bool result = m_KeywordsModel.appendKeyword(keyword);
     if (result) { markModified(); }
     return result;
 }
Ejemplo n.º 22
0
 bool ArtworkMetadata::removeLastKeyword() {
     QString removed;
     bool result = m_KeywordsModel.takeLastKeyword(removed);
     if (result) { markModified(); }
     return result;
 }
Ejemplo n.º 23
0
 bool ArtworkMetadata::removeKeywordAt(int index) {
     QString removed;
     bool result = m_KeywordsModel.takeKeywordAt(index, removed);
     if (result) { markModified(); }
     return result;
 }
Ejemplo n.º 24
0
 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;
 }
Ejemplo n.º 25
0
void TOCEntry::setSheetCount(int n) {
  sheetCount_ = n;
  markModified();
}
Ejemplo n.º 26
0
void TOCEntry::setStartPage(int n) {
  startPage_ = n;
  markModified();
}
Ejemplo n.º 27
0
void TOCEntry::setTitle(QString t) {
  title_ = t;
  markModified();
}
Ejemplo n.º 28
0
 bool ArtworkMetadata::clearKeywords() {
     bool result = m_KeywordsModel.clearKeywords();
     if (result) { markModified(); }
     return result;
 }
Ejemplo n.º 29
0
void TOCEntry::setLastSeen(QDateTime const &t) {
  seen_ = t;
  markModified();
}
Ejemplo n.º 30
0
 bool ArtworkMetadata::editKeyword(int index, const QString &replacement) {
     bool result = m_KeywordsModel.editKeyword(index, replacement);
     if (result) { markModified(); }
     return result;
 }