--- parser3/src/main/execute.C 2001/04/09 10:08:30 1.142 +++ parser3/src/main/execute.C 2001/04/12 13:15:22 1.146 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: execute.C,v 1.142 2001/04/09 10:08:30 paf Exp $ + $Id: execute.C,v 1.146 2001/04/12 13:15:22 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 @@ -148,8 +149,8 @@ void Request::execute(const Array& ops) // the object expression result // does not need to be written into calling frame // it must go into any expressions using that parameter - // hence, zeroing junction.wcontext being created - // later, in .process we would test that field + // hence, we zero junction.wcontext here, and later + // in .process we would test that field // in decision "which wwrapper to use" Junction& j=*NEW Junction(pool(), *self, 0, 0, @@ -177,7 +178,7 @@ void Request::execute(const Array& ops) if(!value) THROW(0,0, &name, - "class undefined"); + "class is undefined"); PUSH(value); break; @@ -228,6 +229,10 @@ void Request::execute(const Array& ops) { Value *value=POP(); write_assign_lang(*value); + + // forget the fact they've entered some ^object.method[]. + // see OP_GET_ELEMENT + wcontext->clear_somebody_entered_some_object(); break; } case OP_WRITE_EXPR_RESULT: @@ -283,8 +288,8 @@ void Request::execute(const Array& ops) { Value *ncontext=POP(); PUSH(rcontext); - rcontext=ncontext; PUSH(wcontext); + rcontext=ncontext; wcontext=NEW WWrapper(pool(), ncontext, false /*not constructing*/); break; } @@ -379,6 +384,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,