--- parser3/src/main/execute.C 2003/02/17 15:41:26 1.295.2.14 +++ parser3/src/main/execute.C 2003/02/20 16:09:01 1.295.2.16 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_EXECUTE_C="$Date: 2003/02/17 15:41:26 $"; +static const char* IDENT_EXECUTE_C="$Date: 2003/02/20 16:09:01 $"; #include "pa_opcode.h" #include "pa_array.h" @@ -288,7 +288,7 @@ void Request::execute(ArrayOperation& op WContext *saved_wcontext=wcontext; uchar saved_lang= flang; flang=String::UL_PASS_APPENDED; - WWrapper local(ValuePtr(0)/*empty*/, wcontext); + WWrapper local(ValuePtr(0)/*empty*/, wcontext); local.ref(); wcontext=&local; execute(*local_ops); @@ -305,7 +305,7 @@ void Request::execute(ArrayOperation& op local_ops=i.next().ops; WContext *saved_wcontext=wcontext; - WWrapper local(ValuePtr(0) /*empty*/, wcontext); + WWrapper local(ValuePtr(0) /*empty*/, wcontext); local.ref(); wcontext=&local; execute(*local_ops); @@ -823,9 +823,9 @@ ValuePtr Request::get_element(StringPtr& Value* ncontext=stack.pop().value.get(); ValuePtr value(0); if(can_call_operator) { - if(Method* method=main_class->get_method(name)) // looking operator of that name FIRST + if(MethodPtr method=main_class->get_method(name)) // looking operator of that name FIRST value=ValuePtr(new VJunction(JunctionPtr(new Junction( - main_class, method, 0,0,0, ArrayOperationPtr(0))))); + main_class, method.get(), 0,0,0, ArrayOperationPtr(0))))); } if(!value) { if(!wcontext->get_constructing() // not constructing @@ -898,7 +898,7 @@ StringOrValue Request::process(ValuePtr if(using_code_frame) { // almost plain wwrapper about junction wcontext, // BUT intercepts string writes - VCodeFrame local(*junction->wcontext, junction->wcontext); + VCodeFrame local(*junction->wcontext, junction->wcontext); local.ref(); wcontext=&local; // execute it @@ -910,7 +910,7 @@ StringOrValue Request::process(ValuePtr result.set_string(wcontext->get_string(&pool())); } else { // plain wwrapper - WWrapper local(ValuePtr(0)/*empty*/, wcontext); + WWrapper local(ValuePtr(0)/*empty*/, wcontext); local.ref(); wcontext=&local; // execute it @@ -989,20 +989,16 @@ StringPtr Request::execute_method(ValueP return result; } -StringPtr Request::execute_nonvirtual_method(VStateless_class& aclass, +Request::Execute_nonvirtual_method_result +Request::execute_nonvirtual_method(VStateless_class& aclass, StringPtr method_name, VStringPtr optional_param, - bool do_return_string, - const Method **return_method) { - - const Method *method=aclass.get_method(method_name); - StringPtr result(0); - if(return_method) - *return_method=method; - - if(method) - return execute_method(ValuePtr(&aclass), *method, optional_param, do_return_string); - else - return StringPtr(0); + bool do_return_string) { + Execute_nonvirtual_method_result result; + result.method=aclass.get_method(method_name); + if(result.method) + result.string=execute_method(ValuePtr(&aclass), *result.method, optional_param, + do_return_string); + return result; } StringPtr Request::execute_virtual_method(ValuePtr aself,