--- parser3/src/main/execute.C 2001/03/16 09:52:59 1.109 +++ parser3/src/main/execute.C 2001/03/16 12:46:35 1.113 @@ -3,7 +3,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: execute.C,v 1.109 2001/03/16 09:52:59 paf Exp $ + $Id: execute.C,v 1.113 2001/03/16 12:46:35 paf Exp $ */ #include "pa_array.h" @@ -20,6 +20,7 @@ #include "pa_vtable.h" #include +#include #define PUSH(value) stack.push(value) #define POP() static_cast(stack.pop()) @@ -299,12 +300,14 @@ void Request::execute(const Array& ops) case OP_GET_METHOD_FRAME: { Value *value=POP(); - // info: this one's always method-junction, not a code-junction + // info: + // code compiled so that this one's always method-junction, + // not a code-junction Junction *junction=value->get_junction(); if(!junction) THROW(0,0, &value->name(), - "(%s) uncallable, must be method or junction", + "(%s) not a method or junction, can not call it", value->type()); VMethodFrame *frame=NEW VMethodFrame(pool(), *junction); @@ -362,8 +365,10 @@ void Request::execute(const Array& ops) const Method& method=*frame->junction.method; if(method.native_code) { // native code? method.check_actual_numbered_params( + frame->junction.self, frame->name(), frame->numbered_params()); - (*method.native_code)(*this, + (*method.native_code)( + *this, frame->name(), frame->numbered_params()); // execute it } else // parser code execute(*method.parser_code); // execute it @@ -412,7 +417,8 @@ void Request::execute(const Array& ops) case OP_IN: { Value *operand=POP(); - Value *value=NEW VBool(pool(), true/*TODO*/); + const char *path=operand->as_string().cstr(); + Value *value=NEW VBool(pool(), strcmp(path, info.uri)<=0); PUSH(value); break; }