--- parser3/src/main/execute.C 2017/01/13 13:50:28 1.403 +++ parser3/src/main/execute.C 2018/02/02 22:59:55 1.406 @@ -1,7 +1,7 @@ /** @file Parser: executor part of request class. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -21,7 +21,7 @@ #include "pa_vimage.h" #include "pa_wwrapper.h" -volatile const char * IDENT_EXECUTE_C="$Id: execute.C,v 1.403 2017/01/13 13:50:28 moko Exp $" IDENT_PA_OPCODE_H IDENT_PA_OPERATION_H IDENT_PA_VCODE_FRAME_H IDENT_PA_WWRAPPER_H; +volatile const char * IDENT_EXECUTE_C="$Id: execute.C,v 1.406 2018/02/02 22:59:55 moko Exp $" IDENT_PA_OPCODE_H IDENT_PA_OPERATION_H IDENT_PA_VCODE_FRAME_H IDENT_PA_WWRAPPER_H; //#define DEBUG_EXECUTE @@ -672,6 +672,8 @@ void Request::execute(ArrayOperation& op case OP::OP_OBJECT_POOL: { + debug_name=0; + ArrayOperation& local_ops=*i.next().ops; WContext *saved_wcontext=wcontext; @@ -1470,9 +1472,15 @@ const String* Request::execute_virtual_m } const String* Request::get_method_filespec(const Method* method){ + Operation::Origin origin=get_method_origin(method); + return origin.file_no ? get_used_filespec(origin.file_no) : NULL; +} + +const Operation::Origin Request::get_method_origin(const Method* method){ + Operation::Origin origin={0, 0, 0}; + if(ArrayOperation* code=method->parser_code) if(code){ - Operation::Origin origin={0, 0, 0}; Array_iterator i(*code); while( i.has_next() ){ switch( i.next().code ){ @@ -1539,9 +1547,9 @@ const String* Request::get_method_filesp default: break; } if(origin.file_no) - return get_used_filespec(origin.file_no); + return origin; } } - return 0; + return origin; }