--- parser3/src/main/execute.C 2001/05/07 14:00:49 1.152 +++ parser3/src/main/execute.C 2001/05/11 17:45:10 1.155 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: execute.C,v 1.152 2001/05/07 14:00:49 paf Exp $ + $Id: execute.C,v 1.155 2001/05/11 17:45:10 parser Exp $ */ #include "pa_config_includes.h" @@ -372,7 +372,10 @@ void Request::execute(const Array& ops) read_class && read_class->is_or_derived_from(*called_class)) // yes self=rcontext; // class dynamic call else // no, not me or relative of mine (total stranger) - if(frame->is_constructor) { + // were are constructing something and + // our constructor is just method call + if(frame->is_constructor && + wcontext->somebody_entered_some_object()==1) { // this is a constructor call // some stateless_object creatable derivates if(Value *value=called_class->create_new_value(pool())) @@ -399,7 +402,7 @@ void Request::execute(const Array& ops) method.call_type==Method::CT_ANY || method.call_type==call_type) // allowed call type? if(method.native_code) { // native code? - method.check_actual_numbered_params( + method.check_actual_numbered_params(pool(), frame->junction.self, frame->name(), frame->numbered_params()); (*method.native_code)( @@ -437,7 +440,7 @@ void Request::execute(const Array& ops) case OP_INV: { Value *operand=POP(); - Value *value=NEW VDouble(pool(), ~(int)operand->as_double()); + Value *value=NEW VDouble(pool(), ~operand->as_int()); PUSH(value); break; } @@ -514,8 +517,8 @@ void Request::execute(const Array& ops) { Value *b=POP(); Value *a=POP(); Value *value=NEW VDouble(pool(), - (int)a->as_double() % - (int)b->as_double()); + a->as_int() % + b->as_int()); PUSH(value); break; } @@ -523,8 +526,8 @@ void Request::execute(const Array& ops) { Value *b=POP(); Value *a=POP(); Value *value=NEW VDouble(pool(), - (int)a->as_double() & - (int)b->as_double()); + a->as_int() & + b->as_int()); PUSH(value); break; } @@ -532,8 +535,8 @@ void Request::execute(const Array& ops) { Value *b=POP(); Value *a=POP(); Value *value=NEW VDouble(pool(), - (int)a->as_double() | - (int)b->as_double()); + a->as_int() | + b->as_int()); PUSH(value); break; } @@ -541,8 +544,8 @@ void Request::execute(const Array& ops) { Value *b=POP(); Value *a=POP(); Value *value=NEW VDouble(pool(), - (int)a->as_double() ^ - (int)b->as_double()); + a->as_int() ^ + b->as_int()); PUSH(value); break; }