
org.objectweb.fractal.juliac.opt.ultracomp.InvocationCounterMixin Maven / Gradle / Ivy
/***
* Juliac
* Copyright (C) 2008-2010 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: [email protected]
*
* Author: Lionel Seinturier
*/
package org.objectweb.fractal.juliac.opt.ultracomp;
public abstract class InvocationCounterMixin implements InvocationCounter {
// -------------------------------------------------------------------------
// Private constructor
// -------------------------------------------------------------------------
private InvocationCounterMixin() {}
// -------------------------------------------------------------------------
// Fields and methods added and overriden by the mixin class
// -------------------------------------------------------------------------
public synchronized void incrementFcInvocationCounter() {
if( _this_fcState != 2 ) {
_super_incrementFcInvocationCounter();
}
else {
_this_fcInvocationCounter++;
}
}
public synchronized void decrementFcInvocationCounter() {
if( _this_fcState != 2 ) {
_super_decrementFcInvocationCounter();
}
else {
_this_fcInvocationCounter--;
}
}
// -------------------------------------------------------------------------
// Fields and methods required by the mixin class in the base class
// -------------------------------------------------------------------------
public int _this_fcState;
public int _this_fcInvocationCounter;
public abstract void _super_incrementFcInvocationCounter();
public abstract void _super_decrementFcInvocationCounter();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy