|
|
| version 1.97, 2001/03/12 21:18:01 | version 1.98, 2001/03/12 22:21:02 |
|---|---|
| Line 128 void Request::execute(const Array& ops) | Line 128 void Request::execute(const Array& ops) |
| } | } |
| case OP_GET_CLASS: | case OP_GET_CLASS: |
| { | { |
| // maybe the do ^class:method[] call, remember the fact | |
| wcontext->set_somebody_entered_some_class(); | |
| const String& name=POP_NAME(); | const String& name=POP_NAME(); |
| VClass *vclass=static_cast<VClass *>(classes().get(name)); | VClass *vclass=static_cast<VClass *>(classes().get(name)); |
| if(!vclass) | if(!vclass) |
| Line 308 void Request::execute(const Array& ops) | Line 311 void Request::execute(const Array& ops) |
| if(read_class && read_class->is_or_derived_from(*called_class)) // yes | if(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(wcontext->constructing()) { // constructing? | if( |
| // yes, constructor call: $some[^class:method[..]] | wcontext->constructing() && // constructing? |
| wcontext->somebody_entered_some_class()) { // ^class:method[..]? | |
| // yes, this is a constructor call | |
| if(called_class->name()==TABLE_CLASS_NAME) | if(called_class->name()==TABLE_CLASS_NAME) |
| self=NEW VTable(pool()); | self=NEW VTable(pool()); |
| else | else |