--- parser3/src/main/compile_tools.h 2015/03/16 09:47:34 1.106 +++ parser3/src/main/compile_tools.h 2016/05/24 15:42:43 1.111 @@ -1,14 +1,14 @@ /** @file Parser: compiler support helper functions decls. - 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) */ #ifndef COMPILE_TOOLS #define COMPILE_TOOLS -#define IDENT_COMPILE_TOOLS_H "$Id: compile_tools.h,v 1.106 2015/03/16 09:47:34 misha Exp $" +#define IDENT_COMPILE_TOOLS_H "$Id: compile_tools.h,v 1.111 2016/05/24 15:42:43 moko Exp $" #include "pa_opcode.h" #include "pa_types.h" @@ -18,11 +18,6 @@ /// used to track source column number #define TAB_SIZE 8 -#define METHOD_CALL_TYPE_STATIC "static" -#define METHOD_CALL_TYPE_DYNAMIC "dynamic" -const String method_call_type_static(METHOD_CALL_TYPE_STATIC); -const String method_call_type_dynamic(METHOD_CALL_TYPE_DYNAMIC); - enum lexical_state { LS_USER, LS_NAME_SQUARE_PART, LS_USER_COMMENT, @@ -133,8 +128,8 @@ public: append=false; // append to request's classes if(!request.allow_class_replace) - return request.classes().put_dont_replace(cclass->name(), cclass) != 0; - request.classes().put(cclass->name(), cclass); + return request.classes().put_dont_replace(cclass->type(), cclass) != 0; + request.classes().put(cclass->type(), cclass); } return false; } @@ -143,7 +138,7 @@ public: // checking existence of the class during processing @OPTIONS\npartial // method should't use get_class because the last one will call operator @autouse[] if the class wasn't loaded if(aclass) - if(Value* class_value=request.classes().get(aclass->name())) + if(Value* class_value=request.classes().get(aclass->type())) return class_value->get_class(); return 0; } @@ -281,7 +276,7 @@ inline void change_or_append(ArrayOperat return; opcodes+=Operation(notfound); -}; +} bool change_first(ArrayOperation& opcodes, OP::OPCODE find, OP::OPCODE replace); @@ -366,6 +361,7 @@ inline bool maybe_optimize_construct(Arr with=0x30; break; } + default: break; } if(with && var_ops[1].code==OP::OP_VALUE && var_ops.count()==4){