--- parser3/src/main/execute.C 2003/03/04 10:15:01 1.295.2.22 +++ parser3/src/main/execute.C 2003/03/12 10:47:13 1.295.2.26 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_EXECUTE_C="$Date: 2003/03/04 10:15:01 $"; +static const char* IDENT_EXECUTE_C="$Date: 2003/03/12 10:47:13 $"; #include "pa_opcode.h" #include "pa_array.h" @@ -116,15 +116,17 @@ void Request::execute(ArrayOperation& op //ArrayOperationPtr b_code; StringPtr name; - Value* ncontext; + ValuePtr ncontext; ArrayOperationPtr local_ops; while(i.has_next()) { - if(interrupted()) + if(get_interrupted()) { + set_interrupted(false); throw Exception("parser.interrupted", Exception::undefined_source, "execution stopped"); + } Operation& op=i.next(); #ifdef DEBUG_EXECUTE @@ -178,7 +180,7 @@ void Request::execute(ArrayOperation& op { if(wcontext==method_frame) throw Exception("parser.runtime", - Exception::undefined_source, + Exception::undefined_source, "$.name outside of $name[...]"); stack.push(ValuePtr(wcontext)); @@ -190,7 +192,7 @@ void Request::execute(ArrayOperation& op { value=stack.pop().value; name=stack.pop().string(pool()); - ncontext=stack.pop().value.get(); + ncontext=stack.pop().value; ncontext->put_element(name, value, false); break; } @@ -201,7 +203,7 @@ void Request::execute(ArrayOperation& op value=stack.pop().value; name=stack.pop().string(pool()); - ncontext=stack.pop().value.get(); + ncontext=stack.pop().value; ncontext->put_element(name, value->as_expr_result(), false); break; } @@ -220,7 +222,7 @@ void Request::execute(ArrayOperation& op local_ops)))); name=stack.pop().string(pool()); - ncontext=stack.pop().value.get(); + ncontext=stack.pop().value; ncontext->put_element(name, value, false); break; } @@ -454,7 +456,9 @@ void Request::execute(ArrayOperation& op if( method.call_type==Method::CT_ANY || method.call_type==call_type) { // allowed call type? +#if _MSC_VER & !defined(_DEBUG) try { +#endif method_frame=&frame; if(method.native_code) { // native code? method.check_actual_numbered_params( @@ -465,11 +469,13 @@ void Request::execute(ArrayOperation& op frame.name(), frame.numbered_params()); // execute it } else // parser code, execute it recoursion_checked_execute(frame.name(), *method.parser_code); +#if _MSC_VER & !defined(_DEBUG) } catch(...) { // record it to stack trace exception_trace.push(frame.name()); rethrow; } +#endif } else throw Exception("parser.runtime", frame.name(),