--- parser3/src/main/execute.C 2002/09/20 09:26:32 1.275 +++ parser3/src/main/execute.C 2002/10/14 12:16:06 1.280 @@ -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/10/14 12:16:06 $"; #include "pa_opcode.h" #include "pa_array.h" @@ -392,15 +392,22 @@ 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 + // [disabling these contstructions:] + // $junction{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 +830,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; @@ -831,7 +838,7 @@ Value *Request::get_element(const String if(Method* method=OP.get_method(name)) { // looking operator of that name FIRST // as if that method were in self and we have normal dynamic method here Junction& junction=*NEW Junction(pool(), - *method_frame, method, 0,0,0,0); + *main_class, method, 0,0,0,0); value=NEW VJunction(junction); } } @@ -852,7 +859,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()); @@ -1001,11 +1008,10 @@ void Request::execute_method(Value& asel } void Request::execute_nonvirtual_method(VStateless_class& aclass, - const String& method_name, VString *optional_param, + const Method *method, VString *optional_param, const String **return_string, const Method **return_method) { - const Method *method=aclass.get_method(method_name); if(return_string) *return_string=0; if(return_method)