--- parser3/src/main/execute.C 2002/10/15 08:31:56 1.282 +++ parser3/src/main/execute.C 2002/10/15 14:28:57 1.284 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_EXECUTE_C="$Date: 2002/10/15 08:31:56 $"; +static const char* IDENT_EXECUTE_C="$Date: 2002/10/15 14:28:57 $"; #include "pa_opcode.h" #include "pa_array.h" @@ -44,8 +44,7 @@ char *opcode_name[]={ "GET_CLASS", "CONSTRUCT_VALUE", "CONSTRUCT_EXPR", "CURLY_CODE__CONSTRUCT", "WRITE_VALUE", "WRITE_EXPR_RESULT", "STRING__WRITE", - "GET_ELEMENT_OR_OPERATOR", "OP_GET_ELEMENT_OR_JUNCTION_EXPAND", - "GET_ELEMENT", "GET_ELEMENT__WRITE", + "GET_ELEMENT_OR_OPERATOR", "GET_ELEMENT", "GET_ELEMENT__WRITE", "OBJECT_POOL", "STRING_POOL", "STORE_PARAM", "PREPARE_TO_CONSTRUCT_OBJECT", "PREPARE_TO_EXPRESSION", @@ -264,12 +263,6 @@ void Request::execute(const Array& ops) PUSH(value); break; } - case OP_GET_ELEMENT_OR_JUNCTION_EXPAND: - { - value=get_element(last_get_element_name, false, true/* the only user */); - PUSH(value); - break; - } case OP_GET_ELEMENT: { value=get_element(last_get_element_name, false); @@ -462,19 +455,16 @@ void Request::execute(const Array& ops) method.call_type==Method::CT_ANY || method.call_type==call_type) { // allowed call type? try { + method_frame=&frame; if(method.native_code) { // native code? - // method_frame unchanged, so that ^for ^foreach & co may write to locals method.check_actual_numbered_params( frame.junction.self, frame.name(), frame.numbered_params()); method.native_code( *this, frame.name(), frame.numbered_params()); // execute it - } else { // parser code - method_frame=&frame; - // execute it + } else // parser code, execute it recoursion_checked_execute(&frame.name(), *method.parser_code); - } } catch(...) { // record it to stack trace exception_trace.push((void *)&frame.name()); @@ -831,8 +821,7 @@ void Request::execute(const Array& ops) } /// @test cache|prepare junctions -Value *Request::get_element(const String *& remember_name, - bool can_call_operator, bool should_explode_junction) { +Value *Request::get_element(const String *& remember_name, bool can_call_operator) { const String& name=POP_NAME(); remember_name=&name; Value *ncontext=POP(); Value *value=0; @@ -860,10 +849,9 @@ Value *Request::get_element(const String value=ncontext->get_element(name, ncontext, false); _void: - if(value) { - if(should_explode_junction) // process $junction, but leave $junction.xxx as is + if(value) value=&process_to_value(*value); // process possible code-junction - } else + else value=NEW VVoid(pool()); return value;