--- parser3/src/main/execute.C 2015/09/28 22:26:13 1.376 +++ parser3/src/main/execute.C 2016/04/06 22:52:12 1.381 @@ -1,7 +1,7 @@ /** @file Parser: executor part of request class. - Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2015 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.376 2015/09/28 22:26:13 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.381 2016/04/06 22:52:12 moko Exp $" IDENT_PA_OPCODE_H IDENT_PA_OPERATION_H IDENT_PA_VCODE_FRAME_H IDENT_PA_WWRAPPER_H; //#define DEBUG_EXECUTE @@ -310,16 +310,16 @@ void Request::execute(ArrayOperation& op if(name==class_element_name){ value=vclass; } else if(name==class_name_element_name){ - value=new VString(vclass->name()); + value=new VString(*new String(vclass->type())); } } else { - // Value + // VJunction is without class, returning self if(name==class_element_name){ value=&ncontext; - }else if(name==class_name_element_name){ + } else if(name==class_name_element_name){ value=new VString(*new String(ncontext.type())); } - }; + } if(opcode==OP::OP_GET_ELEMENT__SPECIAL){ stack.push(*value); } else { @@ -900,7 +900,7 @@ void Request::execute(ArrayOperation& op throw Exception(PARSER_RUNTIME, &constructor_name, "constructor must be declared in class '%s'", - class_value->get_class()->name_cstr()); + class_value->type()); ArrayOperation* local_ops=i.next().ops; DEBUG_PRINT_OPS(local_ops) @@ -1269,7 +1269,7 @@ Value& Request::construct(Value &class_v throw Exception(PARSER_RUNTIME, 0, //&frame.name(), "is not a constructor, system class '%s' can be constructed only implicitly", - called_class.name().cstr()); + called_class.type()); } else throw Exception(PARSER_RUNTIME, 0, //&frame.name(), @@ -1658,6 +1658,17 @@ const String* Request::get_method_filena case OP::OP_WITH_SELF__VALUE__GET_ELEMENT: case OP::OP_WITH_SELF__VALUE__GET_ELEMENT__WRITE: #endif + +#ifdef FEATURE_GET_ELEMENT4CALL + case OP::OP_GET_ELEMENT4CALL: +#ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT + case OP::OP_GET_OBJECT_ELEMENT4CALL: +#endif +#ifdef OPTIMIZE_BYTECODE_GET_OBJECT_VAR_ELEMENT + case OP::OP_GET_OBJECT_VAR_ELEMENT4CALL: +#endif +#endif // FEATURE_GET_ELEMENT4CALL + #ifdef OPTIMIZE_BYTECODE_CONSTRUCT case OP::OP_WITH_ROOT__VALUE__CONSTRUCT_EXPR: case OP::OP_WITH_ROOT__VALUE__CONSTRUCT_VALUE: