int be_visitor_xplicit_pre_proc::visit_sequence (be_sequence *node) { be_type *bt = be_type::narrow_from_decl (node->base_type ()); bool tmp = this->ref_type_; this->ref_type_ = true; if (bt->accept (this) != 0) { ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("be_visitor_xplicit_pre_proc::") ACE_TEXT ("visit_sequence - code generation ") ACE_TEXT ("for element type failed\n")), -1); } this->ref_type_ = tmp; AST_Expression *v = node->max_size (); AST_Expression *bound = 0; ACE_NEW_RETURN (bound, AST_Expression (v, AST_Expression::EV_ulong), -1); Identifier id ("sequence"); UTL_ScopedName sn (&id, 0); AST_Type *ft = AST_Type::narrow_from_decl (this->type_holder_); ACE_NEW_RETURN (this->type_holder_, be_sequence (bound, ft, &sn, false, false), -1); // No need to add this new node to any scope - it's anonymous // and owned by the node that references it. return 0; }
AST_Sequence * be_generator::create_sequence (AST_Expression *v, AST_Type *bt, UTL_ScopedName *n, bool is_local, bool is_abstract) { be_sequence *retval = 0; ACE_NEW_RETURN (retval, be_sequence (v, bt, n, is_local, is_abstract), 0); return retval; }