示例#1
0
bool MemoryMgr::freeRegister(Register r) {
	bool* table = getTable(r.isInt());
	if(r.val() <0 || r.val() >= NUM_REGISTERS || !table[r.val()]){
		return false;
	}
	table[r.val()] = false;
	return true;
}
示例#2
0
bool operator==(const Register& r1,const Register& r2){
	return r1.isInt() == r2.isInt() && r1.val() == r2.val();
}