/[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 916 by johnpye, Thu Jun 29 16:18:54 2006 UTC revision 917 by johnpye, Thu Nov 2 21:34:59 2006 UTC
# Line 139  double RealAtomValue(CONST struct Instan Line 139  double RealAtomValue(CONST struct Instan
139  void SetRealAtomValue(struct Instance *i, double d, unsigned int depth){  void SetRealAtomValue(struct Instance *i, double d, unsigned int depth){
140    assert(i!=NULL);    assert(i!=NULL);
141    AssertMemory(i);    AssertMemory(i);
142      
143    switch(i->t) {    switch(i->t) {
144    case REAL_CONSTANT_INST:    case REAL_CONSTANT_INST:
145      if (AtomAssigned(i)) {      if (AtomAssigned(i)) {
# Line 163  void SetRealAtomValue(struct Instance *i Line 164  void SetRealAtomValue(struct Instance *i
164      R_INST(i)->depth = depth;      R_INST(i)->depth = depth;
165      break;      break;
166    case REAL_ATOM_INST:    case REAL_ATOM_INST:
167        CONSOLE_DEBUG("SETTING REAL ATOM INSTANCE %p TO VALUE %f, DEPTH %u (WAS %f)",i,d,depth,RA_INST(i)->value);
168      RA_INST(i)->assigned++;      RA_INST(i)->assigned++;
169      RA_INST(i)->value = d;      RA_INST(i)->value = d;
170      RA_INST(i)->depth = depth;      RA_INST(i)->depth = depth;
# Line 294  void SetBooleanAtomValue(struct Instance Line 296  void SetBooleanAtomValue(struct Instance
296    AssertMemory(i);    AssertMemory(i);
297    switch(i->t) {    switch(i->t) {
298    case BOOLEAN_INST:    case BOOLEAN_INST:
299        CONSOLE_DEBUG("SETTING BOOLEAN INSTANCE %p TO VALUE %d, DEPTH %u (WAS %d)",i,truth?1:0,depth,B_INST(i)->value);
300      B_INST(i)->value = truth ? 1 : 0;      B_INST(i)->value = truth ? 1 : 0;
301      B_INST(i)->assigned++;      B_INST(i)->assigned++;
302      B_INST(i)->depth = depth;      B_INST(i)->depth = depth;

Legend:
Removed from v.916  
changed lines
  Added in v.917

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