--- parser3/src/main/execute.C 2002/09/20 09:26:32 1.275 +++ parser3/src/main/execute.C 2002/09/21 12:36:10 1.277 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_EXECUTE_C="$Date: 2002/09/20 09:26:32 $"; +static const char* IDENT_EXECUTE_C="$Date: 2002/09/21 12:36:10 $"; #include "pa_opcode.h" #include "pa_array.h" @@ -392,15 +392,19 @@ void Request::execute(const Array& ops) #endif value=POP(); - // info: - // code compiled so that this one's always method-junction, - // not a code-junction Junction *junction=value->get_junction(); if(!junction) throw Exception("parser.runtime", last_get_element_name, "(%s) not a method or junction, can not call it", value->type()); + // check: + // that this is method-junction, not a code-junction + if(!junction->method) + throw Exception("parser.runtime", + last_get_element_name, + "(%s) is code junction, can not call it", + value->type()); VMethodFrame frame(pool(), *last_get_element_name, *junction); if(local_ops){ // store param code goes here @@ -823,7 +827,7 @@ void Request::execute(const Array& ops) /// @test cache|prepare junctions Value *Request::get_element(const String *& remember_name, - bool can_call_operator, bool sould_explode_junction) { + bool can_call_operator, bool should_explode_junction) { const String& name=POP_NAME(); remember_name=&name; Value *ncontext=POP(); Value *value=0; @@ -852,7 +856,7 @@ Value *Request::get_element(const String _void: if(value) { - if(sould_explode_junction) // process $junction, but leave $junction.xxx as is + if(should_explode_junction) // process $junction, but leave $junction.xxx as is value=&process_to_value(*value); // process possible code-junction } else value=NEW VVoid(pool());