--- parser3/src/main/execute.C 2001/04/06 10:32:20 1.140 +++ parser3/src/main/execute.C 2001/04/11 15:45:50 1.145 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: execute.C,v 1.140 2001/04/06 10:32:20 paf Exp $ + $Id: execute.C,v 1.145 2001/04/11 15:45:50 paf Exp $ */ #include "pa_config_includes.h" @@ -15,13 +15,14 @@ #include "pa_vstring.h" #include "pa_vhash.h" #include "pa_vunknown.h" -#include "pa_vcframe.h" -#include "pa_vmframe.h" +#include "pa_vcode_frame.h" +#include "pa_vmethod_frame.h" #include "pa_vobject.h" #include "pa_vdouble.h" #include "pa_vbool.h" #include "pa_vtable.h" #include "pa_vfile.h" +#include "pa_vimage.h" #include @@ -177,7 +178,7 @@ void Request::execute(const Array& ops) if(!value) THROW(0,0, &name, - ": undefined class"); + "class is undefined"); PUSH(value); break; @@ -379,6 +380,8 @@ void Request::execute(const Array& ops) self=NEW VTable(pool()); else if(called_class==file_class) self=NEW VFile(pool()); + else if(called_class==image_class) + self=NEW VImage(pool()); else // stateful object self=NEW VObject(pool(), *called_class); frame->write(*self, @@ -665,9 +668,12 @@ Value *Request::get_element() { Value *ncontext=POP(); Value *value=ncontext->get_element(name); if(!value) - if(Method* method=OP.get_method(name)) // operator? - value=NEW VJunction(*NEW Junction(pool(), - *self, self->get_class(), method, 0,0,0,0)); + if(Method* method=OP.get_method(name)) { // operator? + // as if that method were in self and we have normal dynamic method here + Junction& junction=*NEW Junction(pool(), + *self, self->get_class(), method, 0,0,0,0); + value=NEW VJunction(junction); + } if(value) value=&process(*value, &name); // process possible code-junction else {