/[ascend]/trunk/base/generic/compiler/atomvalue.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/atomvalue.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1067 by johnpye, Sun Jan 7 09:15:56 2007 UTC revision 1068 by johnpye, Mon Jan 8 04:45:47 2007 UTC
# Line 116  unsigned DepthAssigned(CONST struct Inst Line 116  unsigned DepthAssigned(CONST struct Inst
116    case BOOLEAN_INST:    case BOOLEAN_INST:
117      return B_INST(i)->depth;      return B_INST(i)->depth;
118    default:    default:
119      Asc_Panic(2, __FUNCTION__, "Incorrect type passed");      ASC_PANIC("Incorrect type passed");
120            
121    }    }
122  }  }
# Line 132  double RealAtomValue(CONST struct Instan Line 132  double RealAtomValue(CONST struct Instan
132    case REAL_ATOM_INST:    case REAL_ATOM_INST:
133      return RA_INST(i)->value;      return RA_INST(i)->value;
134    default:    default:
135      Asc_Panic(2, __FUNCTION__, "called with non-real instance");      ASC_PANIC("called with non-real instance");
136    }    }
137  }  }
138    
# Line 170  void SetRealAtomValue(struct Instance *i Line 170  void SetRealAtomValue(struct Instance *i
170      RA_INST(i)->depth = depth;      RA_INST(i)->depth = depth;
171      break;      break;
172    default:    default:
173      Asc_Panic(2, __FUNCTION__, "called on non-real instance.\n");      ASC_PANIC("called on non-real instance.\n");
174    }    }
175  }  }
176    
# Line 200  void SetRealAtomDims(struct Instance *i, Line 200  void SetRealAtomDims(struct Instance *i,
200      RA_INST(i)->dimen = dim;      RA_INST(i)->dimen = dim;
201      break;      break;
202    default:    default:
203      Asc_Panic(2, __FUNCTION__, "called on non-real instance.");      ASC_PANIC("called on non-real instance.");
204    }    }
205  }  }
206    
# Line 215  CONST dim_type *RealAtomDims(CONST struc Line 215  CONST dim_type *RealAtomDims(CONST struc
215    case REAL_ATOM_INST:    case REAL_ATOM_INST:
216      return RA_INST(i)->dimen;      return RA_INST(i)->dimen;
217    default:    default:
218      Asc_Panic(2, __FUNCTION__, "called on non-real instance.");      ASC_PANIC("called on non-real instance.");
219    }    }
220  }  }
221    
# Line 233  long GetIntegerAtomValue(CONST struct In Line 233  long GetIntegerAtomValue(CONST struct In
233      }      }
234      return IC_INST(i)->value;      return IC_INST(i)->value;
235    default:    default:
236      Asc_Panic(2, __FUNCTION__,"called on non-integer instance");      ASC_PANIC("called on non-integer instance");
237    }    }
238  }  }
239    
# Line 287  int GetBooleanAtomValue(CONST struct Ins Line 287  int GetBooleanAtomValue(CONST struct Ins
287      }      }
288      return BCV(i);      return BCV(i);
289    default:    default:
290      Asc_Panic(2, __FUNCTION__,"called on non-boolean instance.");      ASC_PANIC("called on non-boolean instance.");
291    }    }
292  }  }
293    
# Line 332  void SetBooleanAtomValue(struct Instance Line 332  void SetBooleanAtomValue(struct Instance
332      }      }
333      break;      break;
334    default:    default:
335      Asc_Panic(2, NULL, __FUNCTION__,"called on non-boolean instance.\n");      ASC_PANIC("called on non-boolean instance.\n");
336    }    }
337  }  }
338    
# Line 405  CONST struct set_t *SetAtomList(CONST st Line 405  CONST struct set_t *SetAtomList(CONST st
405    case SET_ATOM_INST:    case SET_ATOM_INST:
406      return SA_INST(i)->list;      return SA_INST(i)->list;
407    default:    default:
408      Asc_Panic(2, __FUNCTION__, "called on non-set instance.");      ASC_PANIC("called on non-set instance.");
409    }    }
410  }  }
411    
# Line 418  int GetSetAtomKind(CONST struct Instance Line 418  int GetSetAtomKind(CONST struct Instance
418    case SET_ATOM_INST:    case SET_ATOM_INST:
419      return (int)(SA_INST(i)->int_set);      return (int)(SA_INST(i)->int_set);
420    default:    default:
421      Asc_Panic(2, __FUNCTION__, "called on non-set instance.");      ASC_PANIC("called on non-set instance.");
422    }    }
423  }  }
424    
# Line 437  symchar *GetSymbolAtomValue(CONST struct Line 437  symchar *GetSymbolAtomValue(CONST struct
437      }      }
438      return SYMC_INST(i)->value;      return SYMC_INST(i)->value;
439    default:    default:
440      Asc_Panic(2, __FUNCTION__, "called on non-symbol instance.");      ASC_PANIC("called on non-symbol instance.");
441    }    }
442  }  }
443    
# Line 477  void SetSymbolAtomValue(struct Instance Line 477  void SetSymbolAtomValue(struct Instance
477      }      }
478      break;      break;
479    default:    default:
480      Asc_Panic(2, __FUNCTION__, "called on non-symbol instance.");      ASC_PANIC("called on non-symbol instance.");
481    }    }
482  }  }
483    
# Line 539  int CmpAtomValues(CONST struct Instance Line 539  int CmpAtomValues(CONST struct Instance
539    case SET_ATOM_INST:    case SET_ATOM_INST:
540      return CmpSetInstVal(SetAtomList(i1),SetAtomList(i2));      return CmpSetInstVal(SetAtomList(i1),SetAtomList(i2));
541    default:    default:
542      Asc_Panic(2, __FUNCTION__, "Bad call!");      ASC_PANIC("Bad call!");
543    }    }
544  }  }

Legend:
Removed from v.1067  
changed lines
  Added in v.1068

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22