--- parser3/src/main/execute.C 2001/03/19 15:29:39 1.116 +++ parser3/src/main/execute.C 2001/03/19 22:11:09 1.121 @@ -1,13 +1,15 @@ -/* - Parser +/** @file + Parser: executor part of request class. + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) - $Id: execute.C,v 1.116 2001/03/19 15:29:39 paf Exp $ + $Id: execute.C,v 1.121 2001/03/19 22:11:09 paf Exp $ */ -#include "pa_array.h" #include "code.h" +#include "pa_array.h" #include "pa_request.h" #include "pa_vstring.h" #include "pa_vhash.h" @@ -154,13 +156,13 @@ void Request::execute(const Array& ops) wcontext->set_somebody_entered_some_class(); const String& name=POP_NAME(); - VClass *vclass=static_cast(classes().get(name)); - if(!vclass) + Value *value=static_cast(classes().get(name)); + if(!value) THROW(0,0, &name, ": undefined class"); - PUSH(vclass); + PUSH(value); break; } @@ -345,11 +347,9 @@ void Request::execute(const Array& ops) wcontext->somebody_entered_some_class()) { // ^class:method[..]? // yes, this is a constructor call // some stateless_object derivates with constructors - if(called_class->name()==TABLE_CLASS_NAME) + if(called_class==table_class)///called_class->name()==TABLE_CLASS_NAME) self=NEW VTable(pool()); - else /*if(called_class->name()==ENV_CLASS_NAME) - self=NEW VEnv(pool()); - else */ // stateful object + else // stateful object self=NEW VObject(pool(), *called_class); frame->write(*self, String::Untaint_lang::NO // not used, always an object, not string