--- parser3/src/main/execute.C 2003/11/20 16:34:26 1.302 +++ parser3/src/main/execute.C 2005/08/08 07:44:47 1.306.6.2 @@ -1,11 +1,11 @@ /** @file Parser: executor part of request class. - Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_EXECUTE_C="$Date: 2003/11/20 16:34:26 $"; +static const char * const IDENT_EXECUTE_C="$Date: 2005/08/08 07:44:47 $"; #include "pa_opcode.h" #include "pa_array.h" @@ -105,7 +105,7 @@ void debug_dump(SAPI_Info& sapi_info, in void Request::execute(ArrayOperation& ops) { register Stack& stack=this->stack; // helps a lot on MSVC: 'esi' - const String* debug_name=0; Operation::Origin debug_origin={0}; + const String* debug_name=0; Operation::Origin debug_origin={0, 0, 0}; try{ #ifdef DEBUG_EXECUTE debug_printf(sapi_info, "source----------------------------\n"); @@ -207,12 +207,12 @@ void Request::execute(ArrayOperation& op debug_printf(sapi_info, " (%d)\n", local_ops.count()); debug_dump(sapi_info, 1, local_ops); #endif - Value& value=*new VJunction(new Junction( + Value& value=*new VJunction( get_self(), 0, method_frame, rcontext, wcontext, - &local_ops)); + &local_ops); const String& name=stack.pop().string(); debug_name=&name; Value& ncontext=stack.pop().value(); @@ -350,12 +350,12 @@ void Request::execute(ArrayOperation& op // hence, we zero junction.wcontext here, and later // in .process we would test that field // in decision "which wwrapper to use" - Value& value=*new VJunction(new Junction( + Value& value=*new VJunction( get_self(), 0, method_frame, rcontext, opcode==OP_EXPR_CODE__STORE_PARAM?0:wcontext, - &local_ops)); + &local_ops); // store param // this op is executed from CALL local_ops only, so can not check method_frame_to_fill==0 frame.store_param(value); @@ -812,7 +812,7 @@ void Request::execute(ArrayOperation& op "invalid opcode %d", opcode); } } - } catch(...) { + } catch(const Exception&) { // record it to stack trace if(debug_name) exception_trace.push(Trace(debug_name, debug_origin)); @@ -828,8 +828,7 @@ Value& Request::get_element(Value& ncont Value* value=0; if(can_call_operator) { if(Method* method=main_class.get_method(name)) // looking operator of that name FIRST - value=new VJunction(new Junction( - main_class, method, 0,0,0, 0)); + value=new VJunction(main_class, method, 0,0,0, 0); } if(!value) { if(!wcontext->get_constructing() // not constructing @@ -907,7 +906,7 @@ StringOrValue Request::process(Value& in wcontext=&local; // execute it - recoursion_checked_execute(/*0/*result_name* /, */ *junction->code); + recoursion_checked_execute(*junction->code); // CodeFrame soul: // string writes were intercepted @@ -919,7 +918,7 @@ StringOrValue Request::process(Value& in wcontext=&local; // execute it - recoursion_checked_execute(/*0/*result_name* /, */ *junction->code); + recoursion_checked_execute(*junction->code); result=wcontext->result(); }