Diff for /parser3/src/main/execute.C between versions 1.149 and 1.151

version 1.149, 2001/04/28 08:43:57 version 1.151, 2001/05/04 11:08:09
Line 221  void Request::execute(const Array& ops) Line 221  void Request::execute(const Array& ops)
                         {                          {
                                 Value *value=POP();                                  Value *value=POP();
                                 write_assign_lang(*value);                                  write_assign_lang(*value);
   
                                   // forget the fact they've entered some ^object.method[].
                                   // see OP_GET_ELEMENT
                                   wcontext->clear_somebody_entered_some_object();
                                 break;                                  break;
                         }                          }
                 case OP_WRITE_EXPR_RESULT:                  case OP_WRITE_EXPR_RESULT:
Line 239  void Request::execute(const Array& ops) Line 243  void Request::execute(const Array& ops)
                                                   
                 case OP_GET_ELEMENT:                  case OP_GET_ELEMENT:
                         {                          {
                                   // maybe they do ^object.method[] call, remember the fact
                                   wcontext->inc_somebody_entered_some_object();
   
                                 Value *value=get_element();                                  Value *value=get_element();
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
Line 357  void Request::execute(const Array& ops) Line 364  void Request::execute(const Array& ops)
                                 PUSH(wcontext);                                   PUSH(wcontext); 
                                                                   
                                 VStateless_class *called_class=frame->junction.self.get_class();                                  VStateless_class *called_class=frame->junction.self.get_class();
                                   // not ^name.method call and
                                 // is context object or class & is it my class or my parent's class?                                  // is context object or class & is it my class or my parent's class?
                                 VStateless_class *read_class=rcontext->get_class();                                  VStateless_class *read_class=rcontext->get_class();
                                 if(read_class && read_class->is_or_derived_from(*called_class)) // yes                                  if(
                                           !wcontext->somebody_entered_some_object() && 
                                           read_class && read_class->is_or_derived_from(*called_class)) // yes
                                         self=rcontext; // class dynamic call                                          self=rcontext; // class dynamic call
                                 else // no, not me or relative of mine (total stranger)                                  else // no, not me or relative of mine (total stranger)
                                         if(frame->is_constructor) {                                          if(frame->is_constructor) {
Line 449  void Request::execute(const Array& ops) Line 459  void Request::execute(const Array& ops)
                         {                          {
                                 Value *operand=POP();                                  Value *operand=POP();
                                 const char *path=operand->as_string().cstr();                                  const char *path=operand->as_string().cstr();
                                 Value *value=NEW VBool(pool(), info.uri && strcmp(path, info.uri)<=0);                                  Value *value=NEW VBool(pool(), 
                                           info.uri && strncmp(path, info.uri, strlen(path))==0);
                                 PUSH(value);                                  PUSH(value);
                                 break;                                  break;
                         }                          }

Removed from v.1.149  
changed lines
  Added in v.1.151


E-mail: