--- parser3/src/main/execute.C 2003/02/24 16:28:09 1.295.2.18 +++ parser3/src/main/execute.C 2003/03/04 10:15:01 1.295.2.22 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_EXECUTE_C="$Date: 2003/02/24 16:28:09 $"; +static const char* IDENT_EXECUTE_C="$Date: 2003/03/04 10:15:01 $"; #include "pa_opcode.h" #include "pa_array.h" @@ -147,7 +147,7 @@ void Request::execute(ArrayOperation& op // maybe they do ^class:method[] call, remember the fact wcontext->set_somebody_entered_some_class(); - name=stack.pop().string(); + name=stack.pop().string(pool()); value=classes().get(name); if(!value) throw Exception("parser.runtime", @@ -189,7 +189,7 @@ void Request::execute(ArrayOperation& op case OP_CONSTRUCT_VALUE: { value=stack.pop().value; - name=stack.pop().string(); + name=stack.pop().string(pool()); ncontext=stack.pop().value.get(); ncontext->put_element(name, value, false); break; @@ -200,7 +200,7 @@ void Request::execute(ArrayOperation& op wcontext->set_in_expression(false); value=stack.pop().value; - name=stack.pop().string(); + name=stack.pop().string(pool()); ncontext=stack.pop().value.get(); ncontext->put_element(name, value->as_expr_result(), false); break; @@ -219,7 +219,7 @@ void Request::execute(ArrayOperation& op wcontext, local_ops)))); - name=stack.pop().string(); + name=stack.pop().string(pool()); ncontext=stack.pop().value.get(); ncontext->put_element(name, value, false); break; @@ -286,7 +286,7 @@ void Request::execute(ArrayOperation& op local_ops=i.next().ops; WContext *saved_wcontext=wcontext; - uchar saved_lang= flang; + String_UL saved_lang=flang; flang=String::UL_PASS_APPENDED; WWrapper local(ValuePtr(0)/*empty*/, wcontext); local.ref(); wcontext=&local; @@ -759,42 +759,42 @@ void Request::execute(ArrayOperation& op case OP_STR_LT: { b=stack.pop().value; a=stack.pop().value; - value=ValuePtr(new VBool(a->as_string(&pool()) < b->as_string(&pool()))); + value=ValuePtr(new VBool(*a->as_string(&pool()) < *b->as_string(&pool()))); stack.push(value); break; } case OP_STR_GT: { b=stack.pop().value; a=stack.pop().value; - value=ValuePtr(new VBool(a->as_string(&pool()) > b->as_string(&pool()))); + value=ValuePtr(new VBool(*a->as_string(&pool()) > *b->as_string(&pool()))); stack.push(value); break; } case OP_STR_LE: { b=stack.pop().value; a=stack.pop().value; - value=ValuePtr(new VBool(a->as_string(&pool()) <= b->as_string(&pool()))); + value=ValuePtr(new VBool(*a->as_string(&pool()) <= *b->as_string(&pool()))); stack.push(value); break; } case OP_STR_GE: { b=stack.pop().value; a=stack.pop().value; - value=ValuePtr(new VBool(a->as_string(&pool()) >= b->as_string(&pool()))); + value=ValuePtr(new VBool(*a->as_string(&pool()) >= *b->as_string(&pool()))); stack.push(value); break; } case OP_STR_EQ: { b=stack.pop().value; a=stack.pop().value; - value=ValuePtr(new VBool(a->as_string(&pool()) == b->as_string(&pool()))); + value=ValuePtr(new VBool(*a->as_string(&pool()) == *b->as_string(&pool()))); stack.push(value); break; } case OP_STR_NE: { b=stack.pop().value; a=stack.pop().value; - value=ValuePtr(new VBool(a->as_string(&pool()) != b->as_string(&pool()))); + value=ValuePtr(new VBool(*a->as_string(&pool()) != *b->as_string(&pool()))); stack.push(value); break; } @@ -819,9 +819,9 @@ void Request::execute(ArrayOperation& op @bug ^superbase:method would dynamically call ^base:method if there is any */ ValuePtr Request::get_element(StringPtr& remember_name, bool can_call_operator) { - StringPtr name=stack.pop().string(); remember_name=name; + StringPtr name=stack.pop().string(pool()); remember_name=name; ValuePtr ncontext=stack.pop().value; - ValuePtr value(0); + ValuePtr value; if(can_call_operator) { if(MethodPtr method=main_class->get_method(name)) // looking operator of that name FIRST value=ValuePtr(new VJunction(JunctionPtr(new Junction( @@ -847,7 +847,8 @@ ValuePtr Request::get_element(StringPtr& if(junction->self->get_class()!=ncontext.get()) throw Exception("parser.runtime", name, - "constructor must be declared in class %s", ncontext->get_class()->name_cstr()); + "constructor must be declared in class '%s'", + ncontext->get_class()->name_cstr()); } value_ready: