Diff for /parser3/src/main/execute.C between versions 1.76 and 1.78.2.2

version 1.76, 2001/03/08 15:32:52 version 1.78.2.2, 2001/03/09 04:31:30
Line 215  void Request::execute(const Array& ops) Line 215  void Request::execute(const Array& ops)
                 case OP_REDUCE_RWPOOL:                  case OP_REDUCE_RWPOOL:
                         {                          {
                                 String *string=wcontext->get_string();                                  String *string=wcontext->get_string();
                                 Value *value=string?NEW VString(*string):NEW VString(pool());                                  Value *value=string?NEW VString(*string):NEW VString();
                                 wcontext=static_cast<WContext *>(POP());                                  wcontext=static_cast<WContext *>(POP());
                                 rcontext=POP();                                  rcontext=POP();
                                 PUSH(value);                                  PUSH(value);
Line 232  void Request::execute(const Array& ops) Line 232  void Request::execute(const Array& ops)
                                 // from "$a $b" part of expression taking only string value,                                  // from "$a $b" part of expression taking only string value,
                                 // ignoring any other content of wcontext                                  // ignoring any other content of wcontext
                                 String *string=wcontext->get_string();                                  String *string=wcontext->get_string();
                                 Value *value=string?NEW VString(*string):NEW VString(pool());                                  Value *value=string?NEW VString(*string):NEW VString();
                                 wcontext=static_cast<WContext *>(POP());                                  wcontext=static_cast<WContext *>(POP());
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
Line 281  void Request::execute(const Array& ops) Line 281  void Request::execute(const Array& ops)
                                 else // no, not me or relative of mine (total stranger)                                  else // no, not me or relative of mine (total stranger)
                                         if(wcontext->constructing()) {  // constructing?                                          if(wcontext->constructing()) {  // constructing?
                                                 // yes, constructor call: $some(^class:method(..))                                                  // yes, constructor call: $some(^class:method(..))
                                                 self=NEW VObject(pool(), *called_class);                                                  self=NEW VObject(*called_class);
                                                 frame->write(*self);                                                  frame->write(*self);
                                         } else                                           } else 
                                                 self=&frame->junction.self; // no, static or simple dynamic call                                                  self=&frame->junction.self; // no, static or simple dynamic call
Line 316  void Request::execute(const Array& ops) Line 316  void Request::execute(const Array& ops)
                 case OP_NEG:                  case OP_NEG:
                         {                          {
                                 Value *operand=POP();                                  Value *operand=POP();
                                 Value *value=NEW VDouble(pool(), -operand->get_double());                                  Value *value=NEW VDouble(pool(), 
                                           -operand->get_double());
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
                         }                          }
Line 361  void Request::execute(const Array& ops) Line 362  void Request::execute(const Array& ops)
                 case OP_SUB:                   case OP_SUB: 
                         {                          {
                                 Value *b=POP();  Value *a=POP();                                  Value *b=POP();  Value *a=POP();
                                 Value *value=NEW VDouble(pool(), a->get_double() - b->get_double());                                  Value *value=NEW VDouble(pool(), 
                                           a->get_double() - b->get_double());
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
                         }                          }
                 case OP_ADD:                   case OP_ADD: 
                         {                          {
                                 Value *b=POP();  Value *a=POP();                                  Value *b=POP();  Value *a=POP();
                                 Value *value=NEW VDouble(pool(), a->get_double() + b->get_double());                                  Value *value=NEW VDouble(pool(), 
                                           a->get_double() + b->get_double());
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
                         }                          }
                 case OP_MUL:                   case OP_MUL: 
                         {                          {
                                 Value *b=POP();  Value *a=POP();                                  Value *b=POP();  Value *a=POP();
                                 Value *value=NEW VDouble(pool(), a->get_double() * b->get_double());                                  Value *value=NEW VDouble(pool(), 
                                           a->get_double() * b->get_double());
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
                         }                          }
                 case OP_DIV:                   case OP_DIV: 
                         {                          {
                                 Value *b=POP();  Value *a=POP();                                  Value *b=POP();  Value *a=POP();
                                 Value *value=NEW VDouble(pool(), a->get_double() / b->get_double());                                  Value *value=NEW VDouble(pool(), 
                                           a->get_double() / b->get_double());
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
                         }                          }
Line 596  Value& Request::autocalc(Value& value, b Line 601  Value& Request::autocalc(Value& value, b
         } else          } else
                 return value;                  return value;
 }  }
   
 void Request::write(Value& avalue) {  
         wcontext->write(avalue);  
 }  
   

Removed from v.1.76  
changed lines
  Added in v.1.78.2.2


E-mail: