--- parser3/src/main/execute.C 2001/02/25 08:50:14 1.39 +++ parser3/src/main/execute.C 2001/02/25 10:11:50 1.41 @@ -1,5 +1,5 @@ /* - $Id: execute.C,v 1.39 2001/02/25 08:50:14 paf Exp $ + $Id: execute.C,v 1.41 2001/02/25 10:11:50 paf Exp $ */ #include "pa_array.h" @@ -232,18 +232,15 @@ void Request::execute(const Array& ops) frame->fill_unspecified_params(); PUSH(self); PUSH(root); PUSH(rcontext); PUSH(wcontext); - VClass *context_class=wcontext->get_class(); VClass *called_class=frame->junction.self.get_class(); - // context is some class? [variable already constructed?] - if(context_class) { // yes - // is it me or one of my parents? - if(context_class->is_or_derived_from(*called_class)) // yes - self=&frame->junction.self; // dynamic call - else // no - self=called_class; // static call - } else { // no, we have constructor call here: $some(^class:method(..)) + // variable already constructed? + if(wcontext->get_class()) { // yes + // static or dynamic call + self=&frame->junction.self; + } else { // no + // constructor call: $some(^class:method(..)) self=NEW VObject(pool(), *called_class); - frame->write(self); + frame->write(self); } frame->set_self(self);