Diff for /parser3/src/main/execute.C between versions 1.366 and 1.384

version 1.366, 2010/10/09 23:17:26 version 1.384, 2016/07/20 17:01:48
Line 1 Line 1
 /** @file  /** @file
         Parser: executor part of request class.          Parser: executor part of request class.
   
         Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com)          Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
         Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
 */  */
   
 static const char * const IDENT_EXECUTE_C="$Date$";  
   
 #include "pa_opcode.h"  #include "pa_opcode.h"
 #include "pa_array.h"   #include "pa_array.h" 
 #include "pa_request.h"  #include "pa_request.h"
Line 23  static const char * const IDENT_EXECUTE_ Line 21  static const char * const IDENT_EXECUTE_
 #include "pa_vimage.h"  #include "pa_vimage.h"
 #include "pa_wwrapper.h"  #include "pa_wwrapper.h"
   
   volatile const char * IDENT_EXECUTE_C="$Id$" IDENT_PA_OPCODE_H IDENT_PA_OPERATION_H IDENT_PA_VCODE_FRAME_H IDENT_PA_WWRAPPER_H;
   
 //#define DEBUG_EXECUTE  //#define DEBUG_EXECUTE
   
 #ifdef DEBUG_EXECUTE  #ifdef DEBUG_EXECUTE
Line 60  char *opcode_name[]={ Line 60  char *opcode_name[]={
         "WITH_SELF__VALUE__GET_ELEMENT",          "WITH_SELF__VALUE__GET_ELEMENT",
         "WITH_SELF__VALUE__GET_ELEMENT__WRITE",          "WITH_SELF__VALUE__GET_ELEMENT__WRITE",
 #endif  #endif
   
   #ifdef FEATURE_GET_ELEMENT4CALL
           "GET_ELEMENT4CALL",
   #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT
           "GET_OBJECT_ELEMENT4CALL",
   #endif
   #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_VAR_ELEMENT
           "GET_OBJECT_VAR_ELEMENT4CALL",
   #endif
   #endif // FEATURE_GET_ELEMENT4CALL
   
         "OBJECT_POOL",  "STRING_POOL",          "OBJECT_POOL",  "STRING_POOL",
         "PREPARE_TO_CONSTRUCT_OBJECT",          "PREPARE_TO_CONSTRUCT_OBJECT",
         "CONSTRUCT_OBJECT",          "CONSTRUCT_OBJECT",
Line 76  char *opcode_name[]={ Line 87  char *opcode_name[]={
         "WITH_SELF__VALUE__CONSTRUCT_VALUE",          "WITH_SELF__VALUE__CONSTRUCT_VALUE",
 #endif  #endif
   
   #ifdef OPTIMIZE_BYTECODE_GET_ELEMENT__SPECIAL
           "GET_ELEMENT__SPECIAL",
           "GET_ELEMENT__SPECIAL__WRITE",
   #endif
         // expression ops: unary          // expression ops: unary
         "NEG", "INV", "NOT", "DEF", "IN", "FEXISTS", "DEXISTS",          "NEG", "INV", "NOT", "DEF", "IN", "FEXISTS", "DEXISTS",
         // expression ops: binary          // expression ops: binary
Line 124  void debug_dump(SAPI_Info& sapi_info, in Line 139  void debug_dump(SAPI_Info& sapi_info, in
 #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT  #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT
                         || opcode==OP::OP_GET_OBJECT_ELEMENT                          || opcode==OP::OP_GET_OBJECT_ELEMENT
                         || opcode==OP::OP_GET_OBJECT_ELEMENT__WRITE                          || opcode==OP::OP_GET_OBJECT_ELEMENT__WRITE
   #ifdef FEATURE_GET_ELEMENT4CALL
                           || opcode==OP::OP_GET_OBJECT_ELEMENT4CALL
   #endif
 #endif  #endif
 #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_VAR_ELEMENT  #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_VAR_ELEMENT
                         || opcode==OP::OP_GET_OBJECT_VAR_ELEMENT                          || opcode==OP::OP_GET_OBJECT_VAR_ELEMENT
                         || opcode==OP::OP_GET_OBJECT_VAR_ELEMENT__WRITE                          || opcode==OP::OP_GET_OBJECT_VAR_ELEMENT__WRITE
   #ifdef FEATURE_GET_ELEMENT4CALL
                           || opcode==OP::OP_GET_OBJECT_VAR_ELEMENT4CALL
   #endif
 #endif  #endif
                 ){                  ){
                         i.next(); // skip origin                          i.next(); // skip origin
Line 164  void debug_dump(SAPI_Info& sapi_info, in Line 185  void debug_dump(SAPI_Info& sapi_info, in
                         opcode==OP::OP_VALUE                          opcode==OP::OP_VALUE
                         || opcode==OP::OP_STRING__WRITE                          || opcode==OP::OP_STRING__WRITE
                         || opcode==OP::OP_VALUE__GET_CLASS                          || opcode==OP::OP_VALUE__GET_CLASS
                           || opcode==OP::OP_VALUE__GET_BASE_CLASS
 #ifdef OPTIMIZE_BYTECODE_GET_ELEMENT  #ifdef OPTIMIZE_BYTECODE_GET_ELEMENT
                         || opcode==OP::OP_VALUE__GET_ELEMENT                          || opcode==OP::OP_VALUE__GET_ELEMENT
                         || opcode==OP::OP_VALUE__GET_ELEMENT__WRITE                          || opcode==OP::OP_VALUE__GET_ELEMENT__WRITE
Line 259  void Request::execute(ArrayOperation& op Line 281  void Request::execute(ArrayOperation& op
                         }                          }
                 case OP::OP_VALUE__GET_CLASS:                  case OP::OP_VALUE__GET_CLASS:
                         {                          {
                                 // maybe they do ^class:method[] call, remember the fact                                  debug_origin=i.next().origin;
                                 wcontext->set_somebody_entered_some_class();                                  const String& name=*i.next().value->get_string(); debug_name=&name;
   
                                   DEBUG_PRINT_STRING(name)
   
                                   VStateless_class* vclass=get_class(name);
                                   if(!vclass)
                                           throw Exception(PARSER_RUNTIME, &name, "class is undefined"); 
   
                                   stack.push(*vclass);
                                   break;
                           }
   
                   case OP::OP_VALUE__GET_BASE_CLASS:
                           {
                                   // ^class:method[] call
   
                                 debug_origin=i.next().origin;                                  debug_origin=i.next().origin;
                                 Value& value=*i.next().value;                                  const String& name=*i.next().value->get_string(); debug_name=&name;
                                 const String& name=*value.get_string(); debug_name=&name;  
   
                                 DEBUG_PRINT_STRING(name)                                  DEBUG_PRINT_STRING(name)
   
                                 Value* class_value=get_class(name);                                  VStateless_class* vclass=get_class(name);
                                 if(!class_value)                                  if(!vclass)
                                         throw Exception(PARSER_RUNTIME,                                          throw Exception(PARSER_RUNTIME, &name, "class is undefined"); 
                                                 &name,  
                                                 "class is undefined");                                   stack.push(*new VBaseClassWrapper(*vclass, get_self()));
                                   break;
                           }
   
   #ifdef OPTIMIZE_BYTECODE_GET_ELEMENT__SPECIAL
                   case OP::OP_GET_ELEMENT__SPECIAL:
                   case OP::OP_GET_ELEMENT__SPECIAL__WRITE:
                           {
                                   const String& name=stack.pop().string();  debug_name=&name;
                                   Value& ncontext=stack.pop().value();
   
                                 stack.push(*class_value);                                  Value* value=0;
                                   if(VStateless_class* vclass=ncontext.get_class()){
                                           if(SYMBOLS_EQ(name,CLASS_SYMBOL)){
                                                   value=vclass;
                                           } else if(SYMBOLS_EQ(name,CLASS_NAME_SYMBOL)){
                                                   value=new VString(*new String(vclass->type()));
                                           }
                                   } else {
                                           // VJunction is without class, returning self
                                           if(SYMBOLS_EQ(name,CLASS_SYMBOL)){
                                                   value=&ncontext;
                                           } else if(SYMBOLS_EQ(name,CLASS_NAME_SYMBOL)){
                                                   value=new VString(*new String(ncontext.type()));
                                           }
                                   }
                                   if(opcode==OP::OP_GET_ELEMENT__SPECIAL){
                                           stack.push(*value);
                                   } else {
                                           write_assign_lang(*value);
                                   }
                                 break;                                  break;
                         }                          }
   #endif
   
                 // OP_WITH                  // OP_WITH
                 case OP::OP_WITH_ROOT:                  case OP::OP_WITH_ROOT:
                         {                          {
Line 296  void Request::execute(ArrayOperation& op Line 361  void Request::execute(ArrayOperation& op
                 case OP::OP_WITH_WRITE:                  case OP::OP_WITH_WRITE:
                         {                          {
                                 if(wcontext==method_frame)                                  if(wcontext==method_frame)
                                         throw Exception(PARSER_RUNTIME,                                          throw Exception(PARSER_RUNTIME, 0, "$.name outside of $name[...]");
                                                 0,  
                                                 "$.name outside of $name[...]");  
   
                                 stack.push(*wcontext);                                  stack.push(*wcontext);
                                 break;                                  break;
Line 397  void Request::execute(ArrayOperation& op Line 460  void Request::execute(ArrayOperation& op
   
                                 const String& name=stack.pop().string();  debug_name=&name;                                  const String& name=stack.pop().string();  debug_name=&name;
                                 Value& ncontext=stack.pop().value();                                  Value& ncontext=stack.pop().value();
                                 if(const VJunction* vjunction=ncontext.put_element(name, &value, false))                                  if(const VJunction* vjunction=ncontext.put_element(name, &value))
                                         if(vjunction!=PUT_ELEMENT_REPLACED_ELEMENT)                                          if(vjunction!=PUT_ELEMENT_REPLACED_ELEMENT)
                                                 throw Exception(PARSER_RUNTIME,                                                  throw Exception(PARSER_RUNTIME, 0, "property value can not be code, use [] or () brackets");
                                                         0,  
                                                         "property value can not be code, use [] or () brackets");  
                                                                                   
                                 break;                                  break;
                         }                          }
Line 476  void Request::execute(ArrayOperation& op Line 537  void Request::execute(ArrayOperation& op
 #endif  #endif
   
 #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT  #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT
                 case OP::OP_GET_OBJECT_ELEMENT:  
                 case OP::OP_GET_OBJECT_ELEMENT__WRITE:  
                         {  
                                 debug_origin=i.next().origin;  
                                 const String& context_name=*i.next().value->get_string();  debug_name=&context_name;  
   
                                 DEBUG_PRINT_STRING(context_name)  
   
                                 Value& object=get_element(*rcontext, context_name);  
   
                                 debug_origin=i.next().origin;  #define DO_GET_OBJECT_ELEMENT(code) {\
                                 const String& field_name=*i.next().value->get_string();  debug_name=&field_name;                                  debug_origin=i.next().origin;                                                           \
                                   const String& context_name=*i.next().value->get_string();  debug_name=&context_name;    \
                                 DEBUG_PRINT_STRING(field_name)                                  DEBUG_PRINT_STRING(context_name)                                                        \
                                   Value& object=get_element(*rcontext, context_name);                                     \
                                   debug_origin=i.next().origin;                                                           \
                                   const String& field_name=*i.next().value->get_string();  debug_name=&field_name;        \
                                   DEBUG_PRINT_STRING(field_name)                                                          \
                                   code;                                                                                   \
                                   break;                                                                                  \
                           }
   
                   case OP::OP_GET_OBJECT_ELEMENT: DO_GET_OBJECT_ELEMENT({
                                 Value& value=get_element(object, field_name);                                  Value& value=get_element(object, field_name);
                                   stack.push(value);
                                 if(opcode==OP::OP_GET_OBJECT_ELEMENT){                          })
                                         stack.push(value);                  case OP::OP_GET_OBJECT_ELEMENT__WRITE: DO_GET_OBJECT_ELEMENT({
                                 } else {                                  Value& value=get_element(object, field_name);
                                         write_assign_lang(value);                                  write_assign_lang(value);
                                 }                          })
                                 break;  #ifdef FEATURE_GET_ELEMENT4CALL
                         }                  case OP::OP_GET_OBJECT_ELEMENT4CALL: DO_GET_OBJECT_ELEMENT({
                                   Value& value=get_element4call(object, field_name);
                                   stack.push(value);
                           })
   #endif
 #endif  #endif
   
 #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_VAR_ELEMENT  #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_VAR_ELEMENT
                 case OP::OP_GET_OBJECT_VAR_ELEMENT:  
                 case OP::OP_GET_OBJECT_VAR_ELEMENT__WRITE:  
                         {  
                                 debug_origin=i.next().origin;  
                                 const String& context_name=*i.next().value->get_string();  debug_name=&context_name;  
   
                                 DEBUG_PRINT_STRING(context_name)  #define DO_GET_OBJECT_VAR_ELEMENT(code) {\
                                   debug_origin=i.next().origin;                                                           \
                                 Value& object=get_element(*rcontext, context_name);                                  const String& context_name=*i.next().value->get_string();  debug_name=&context_name;    \
                                   DEBUG_PRINT_STRING(context_name)                                                        \
                                 debug_origin=i.next().origin;                                  Value& object=get_element(*rcontext, context_name);                                     \
                                 const String& var_name=*i.next().value->get_string();  debug_name=&var_name;                                  debug_origin=i.next().origin;                                                           \
                                   const String& var_name=*i.next().value->get_string();  debug_name=&var_name;            \
                                 DEBUG_PRINT_STRING(var_name)                                  DEBUG_PRINT_STRING(var_name)                                                            \
                                   const String* field=&get_element(*rcontext, var_name).as_string();                      \
                                 const String* field=&get_element(*rcontext, var_name).as_string();                                  code;                                                                                   \
                                   break;                                                                                  \
                           }
   
                   case OP::OP_GET_OBJECT_VAR_ELEMENT: DO_GET_OBJECT_VAR_ELEMENT({
                                 Value& value=get_element(object, *field);                                  Value& value=get_element(object, *field);
                                   stack.push(value);
                                 if(opcode==OP::OP_GET_OBJECT_VAR_ELEMENT){                          })
                                         stack.push(value);                  case OP::OP_GET_OBJECT_VAR_ELEMENT__WRITE: DO_GET_OBJECT_VAR_ELEMENT({
                                 } else {                                  Value& value=get_element(object, *field);
                                         write_assign_lang(value);                                  write_assign_lang(value);
                                 }                          })
                                 break;  #ifdef FEATURE_GET_ELEMENT4CALL
                         }                  case OP::OP_GET_OBJECT_VAR_ELEMENT4CALL: DO_GET_OBJECT_VAR_ELEMENT({
                                   Value& value=get_element4call(object, *field);
                                   stack.push(value);
                           })
   #endif
 #endif  #endif
   
                 case OP::OP_GET_ELEMENT:                  case OP::OP_GET_ELEMENT:
Line 540  void Request::execute(ArrayOperation& op Line 606  void Request::execute(ArrayOperation& op
                                 break;                                  break;
                         }                          }
   
   #ifdef FEATURE_GET_ELEMENT4CALL
                   case OP::OP_GET_ELEMENT4CALL:
                           {
                                   const String& name=stack.pop().string();  debug_name=&name;
                                   Value& ncontext=stack.pop().value();
                                   Value& value=get_element4call(ncontext, name);
                                   stack.push(value);
                                   break;
                           }
   #endif
   
                 case OP::OP_GET_ELEMENT__WRITE:                  case OP::OP_GET_ELEMENT__WRITE:
                         {                          {
                                 const String& name=stack.pop().string();  debug_name=&name;                                  const String& name=stack.pop().string();  debug_name=&name;
Line 639  void Request::execute(ArrayOperation& op Line 716  void Request::execute(ArrayOperation& op
   
                                 execute(local_ops);                                  execute(local_ops);
   
                                 Value* value;  
                                 // from "$a $b" part of expression taking only string value,                                  // from "$a $b" part of expression taking only string value,
                                 // ignoring any other content of wcontext                                  // ignoring any other content of wcontext
                                 if(const String* string=wcontext->get_string())                                  const String* string=wcontext->get_string();
                                         value=new VString(*string);                                  Value* value=string ? new VString(*string) : new VString();
                                 else  
                                         value=VVoid::get();  
                                 stack.push(*value);                                  stack.push(*value);
   
                                 wcontext=saved_wcontext;                                  wcontext=saved_wcontext;
Line 723  void Request::execute(ArrayOperation& op Line 797  void Request::execute(ArrayOperation& op
                                                                 value.type());                                                                  value.type());
                                 }                                  }
   
                                 VMethodFrame frame(*junction->method, method_frame, junction->self);                                  Value *result;
                                 METHOD_FRAME_ACTION(op_call(frame));                                  {
                                 stack.push(frame.result().as_value());                                          VMethodFrame frame(*junction->method, method_frame, junction->self);
                                           METHOD_FRAME_ACTION(op_call(frame));
                                           result=&frame.result().as_value();
                                           // VMethodFrame desctructor deletes junctions in stack params here
                                   }
                                   stack.push(*result);
   
                                 DEBUG_PRINT_STR("<-returned")                                  DEBUG_PRINT_STR("<-returned")
   
Line 813  void Request::execute(ArrayOperation& op Line 892  void Request::execute(ArrayOperation& op
   
                                 DEBUG_PRINT_STRING(class_name)                                  DEBUG_PRINT_STRING(class_name)
   
                                 Value* class_value=get_class(class_name);                                  VStateless_class* vclass=get_class(class_name);
                                 if(!class_value)                                  if(!vclass)
                                         throw Exception(PARSER_RUNTIME,                                          throw Exception(PARSER_RUNTIME, &class_name, "class is undefined"); 
                                                 &class_name,  
                                                 "class is undefined");   
   
                                 debug_origin=i.next().origin;                                  debug_origin=i.next().origin;
                                 Value& vconstructor_name=*i.next().value;                                  Value& vconstructor_name=*i.next().value;
Line 825  void Request::execute(ArrayOperation& op Line 902  void Request::execute(ArrayOperation& op
   
                                 DEBUG_PRINT_STRING(constructor_name)                                  DEBUG_PRINT_STRING(constructor_name)
   
                                 Junction* constructor_junction=get_element(*class_value, constructor_name).get_junction();                                  Junction* constructor_junction=get_element(*vclass, constructor_name).get_junction();
                                 if(!constructor_junction)                                  if(!constructor_junction)
                                         throw Exception(PARSER_RUNTIME,                                          throw Exception(PARSER_RUNTIME, &constructor_name, "constructor must be declared in class '%s'", vclass->type());
                                                 &constructor_name,  
                                                 "constructor must be declared in class '%s'",   
                                                 class_value->get_class()->name_cstr());  
   
                                 ArrayOperation* local_ops=i.next().ops;                                  ArrayOperation* local_ops=i.next().ops;
                                 DEBUG_PRINT_OPS(local_ops)                                  DEBUG_PRINT_OPS(local_ops)
                                 DEBUG_PRINT_STR("->\n")                                  DEBUG_PRINT_STR("->\n")
   
                                 Value &object=construct(*class_value, *constructor_junction->method);                                  Value *result;
                                 VConstructorFrame frame(*constructor_junction->method, method_frame, object);                                  {
                                 METHOD_FRAME_ACTION(op_call(frame));                                          Value& object=construct(*vclass, *constructor_junction->method);
                                 object.enable_default_setter();                                          VConstructorFrame frame(*constructor_junction->method, method_frame, object);
                                           METHOD_FRAME_ACTION(op_call(frame));
                                           object.enable_default_setter();
                                           result=&frame.result().as_value();
                                           // VMethodFrame desctructor deletes junctions in stack params here
                                   }
   
                                 if(opcode==OP::OP_CONSTRUCT_OBJECT)                                  if(opcode==OP::OP_CONSTRUCT_OBJECT)
                                         stack.push(frame.result().as_value());                                          stack.push(*result);
                                 else                                  else
                                         write_pass_lang(frame.result());                                          write_pass_lang(*result);
   
                                 DEBUG_PRINT_STR("<-returned")                                  DEBUG_PRINT_STR("<-returned")
                                 break;                                  break;
Line 1182  void Request::execute(ArrayOperation& op Line 1261  void Request::execute(ArrayOperation& op
         method_frame=saved_method_frame;          method_frame=saved_method_frame;
   
   
 Value& Request::construct(Value &class_value, const Method &method){  Value& Request::construct(VStateless_class &called_class, const Method &method){
         VStateless_class& called_class=*class_value.get_class();  
   
         if(method.call_type!=Method::CT_STATIC) {          if(method.call_type!=Method::CT_STATIC) {
                 // this is a constructor call                  // this is a constructor call
Line 1194  Value& Request::construct(Value &class_v Line 1272  Value& Request::construct(Value &class_v
                         throw Exception(PARSER_RUNTIME,                          throw Exception(PARSER_RUNTIME,
                                 0, //&frame.name(),                                  0, //&frame.name(),
                                 "is not a constructor, system class '%s' can be constructed only implicitly",                                   "is not a constructor, system class '%s' can be constructed only implicitly", 
                                         called_class.name().cstr());                                          called_class.type());
         } else          } else
                 throw Exception(PARSER_RUNTIME,                  throw Exception(PARSER_RUNTIME,
                         0, //&frame.name(),                          0, //&frame.name(),
Line 1256  void Request::op_call_write(VMethodFrame Line 1334  void Request::op_call_write(VMethodFrame
 }  }
   
 Value& Request::get_element(Value& ncontext, const String& name) {  Value& Request::get_element(Value& ncontext, const String& name) {
         if(wcontext->get_somebody_entered_some_class()) // ^class:method  
                 if(VStateless_class *called_class=ncontext.get_class())  
                         if(VStateless_class *read_class=rcontext->get_class())  
                                 if(read_class->derived_from(*called_class)){ // current derived from called  
                                         Value *value=called_class->get_element(get_self(), name);  
                                         return *(value ? &process_to_value(*value) : VVoid::get());  
                                 }  
   
         Value* value=ncontext.get_element(name);          Value* value=ncontext.get_element(name);
           return *(value ? &process_to_value(*value) : VVoid::get());
   }
   
   #ifdef FEATURE_GET_ELEMENT4CALL
   Value& Request::get_element4call(Value& ncontext, const String& name) {
           Value* value=ncontext.get_element4call(name);
         return *(value ? &process_to_value(*value) : VVoid::get());          return *(value ? &process_to_value(*value) : VVoid::get());
 }  }
   #endif
   
 void Request::put_element(Value& ncontext, const String& name, Value* value) {  void Request::put_element(Value& ncontext, const String& name, Value* value) {
         // put_element can return property-setting-junction          // put_element can return property-setting-junction
         if(const VJunction* vjunction=ncontext.put_element(name, value, false))          if(const VJunction* vjunction=ncontext.put_element(name, value))
                 if(vjunction!=PUT_ELEMENT_REPLACED_ELEMENT) {                  if(vjunction!=PUT_ELEMENT_REPLACED_ELEMENT) {
                         const Junction& junction = vjunction->junction();                          const Junction& junction = vjunction->junction();
                         VConstructorFrame frame(*junction.method, method_frame /*caller*/, junction.self);                          VConstructorFrame frame(*junction.method, method_frame /*caller*/, junction.self);
Line 1352  StringOrValue Request::process(Value& in Line 1428  StringOrValue Request::process(Value& in
         Junction* junction=input_value.get_junction();          Junction* junction=input_value.get_junction();
         if(junction) {          if(junction) {
                 if(junction->is_getter) { // is it a getter-junction?                  if(junction->is_getter) { // is it a getter-junction?
                         return process_getter(*junction);                          return process(process_getter(*junction).as_value(), intercept_string);
                 }                  }
   
                 if(junction->code) { // is it a code-junction?                  if(junction->code) { // is it a code-junction?
Line 1414  StringOrValue Request::process(Value& in Line 1490  StringOrValue Request::process(Value& in
 void Request::process_write(Value& input_value) {  void Request::process_write(Value& input_value) {
         Junction* junction=input_value.get_junction();          Junction* junction=input_value.get_junction();
         if(junction) {          if(junction) {
                 if(junction->is_getter) { // is it a getter-junction?                  // no getter-junction check as process_write is called
                         write_pass_lang(process_getter(*junction));                  // to process method arguments, not from get_element
                         return;  
                 }  
   
                 if(junction->code) { // is it a code-junction?                  if(junction->code) { // is it a code-junction?
                                                         // process it                                                          // process it
Line 1557  const String* Request::get_method_filena Line 1631  const String* Request::get_method_filena
                                         case OP::OP_VALUE:                                          case OP::OP_VALUE:
                                         case OP::OP_STRING__WRITE:                                          case OP::OP_STRING__WRITE:
                                         case OP::OP_VALUE__GET_CLASS:                                          case OP::OP_VALUE__GET_CLASS:
                                           case OP::OP_VALUE__GET_BASE_CLASS:
 #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT  #ifdef OPTIMIZE_BYTECODE_GET_OBJECT_ELEMENT
                                         case OP::OP_GET_OBJECT_ELEMENT:                                          case OP::OP_GET_OBJECT_ELEMENT:
                                         case OP::OP_GET_OBJECT_ELEMENT__WRITE:                                          case OP::OP_GET_OBJECT_ELEMENT__WRITE:
Line 1575  const String* Request::get_method_filena Line 1650  const String* Request::get_method_filena
                                         case OP::OP_WITH_SELF__VALUE__GET_ELEMENT:                                          case OP::OP_WITH_SELF__VALUE__GET_ELEMENT:
                                         case OP::OP_WITH_SELF__VALUE__GET_ELEMENT__WRITE:                                          case OP::OP_WITH_SELF__VALUE__GET_ELEMENT__WRITE:
 #endif  #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  #ifdef OPTIMIZE_BYTECODE_CONSTRUCT
                                         case OP::OP_WITH_ROOT__VALUE__CONSTRUCT_EXPR:                                          case OP::OP_WITH_ROOT__VALUE__CONSTRUCT_EXPR:
                                         case OP::OP_WITH_ROOT__VALUE__CONSTRUCT_VALUE:                                          case OP::OP_WITH_ROOT__VALUE__CONSTRUCT_VALUE:
Line 1587  const String* Request::get_method_filena Line 1673  const String* Request::get_method_filena
                                                         origin=i.next().origin;                                                          origin=i.next().origin;
                                                         break;                                                          break;
                                                 }                                                  }
                                           default: break;
                                 }                                  }
                                 if(origin.file_no)                                  if(origin.file_no)
                                         return get_used_filename(origin.file_no);                                          return get_used_filename(origin.file_no);

Removed from v.1.366  
changed lines
  Added in v.1.384


E-mail: