summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-18 07:29:23 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-18 07:29:23 +0000
commit1d12c129be1eaf51472160c851f124743dbc5f23 (patch)
treef22ca4809aa9ef76c4a09b1feaece6dca3c38993
parentf160b447991864a60b77bce6ae4c837923152233 (diff)
downloadATCD-1d12c129be1eaf51472160c851f124743dbc5f23.tar.gz
ChangeLogTag:Tue Apr 18 02:03:12 2000 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a17
-rw-r--r--TAO/TAO_IDL/ast/ast_interface.cpp11
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp10
-rw-r--r--TAO/TAO_IDL/be_include/be_interface.h4
-rw-r--r--TAO/TAO_IDL/fe/fe_interface_header.cpp18
-rw-r--r--TAO/TAO_IDL/include/fe_interface_header.h6
6 files changed, 47 insertions, 19 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 18eb832aac7..3a6aa1044f3 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,20 @@
+Tue Apr 18 02:03:12 2000 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be_include/be_interface.h: Forgot to initialize other
+ virtual base classes in be_local_interface and
+ be_abstract_interface.
+
+ * TAO_IDL/ast/ast_interface.cpp (fwd_redefinition_helper): Added
+ redefinition check for local interface (forward declaration must
+ match with the actual definition.)
+
+ * TAO_IDL/fe/fe_interface_header.h:
+ * TAO_IDL/fe/fe_interface_header.cpp (check_further): Added check
+ for inproper inheritance of local interface. A remote interface
+ can not inherit from local interfaces. Also changed to compile
+ the inheritance in the derived class'es constructors.
+
Mon Apr 17 20:48:42 2000 Nanbor Wang <nanbor@cs.wustl.edu>
* TAO_IDL/fe/y.tab.h:
diff --git a/TAO/TAO_IDL/ast/ast_interface.cpp b/TAO/TAO_IDL/ast/ast_interface.cpp
index 31f2217d514..fad72997c72 100644
--- a/TAO/TAO_IDL/ast/ast_interface.cpp
+++ b/TAO/TAO_IDL/ast/ast_interface.cpp
@@ -925,12 +925,16 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i,
// All OK, do the redefinition
else
{
-# ifdef IDL_HAS_VALUETYPE
// only redefinition of the same kind
- if ((i->is_valuetype () != fd->is_valuetype ())
+ if ((i->is_local_interface () != fd->is_local_interface ())
+# ifdef IDL_HAS_VALUETYPE
+ ||(i->is_valuetype () != fd->is_valuetype ())
|| (i->is_abstract_valuetype () != fd->is_abstract_valuetype ())
- || (i->is_abstract_interface () != fd->is_abstract_interface ()))
+ || (i->is_abstract_interface () != fd->is_abstract_interface ())
+# endif /* IDL_HAS_VALUETYPE */
+ )
+
{
idl_global->err ()->error2 (UTL_Error::EIDL_REDEF,
i,
@@ -938,7 +942,6 @@ AST_Interface::fwd_redefinition_helper (AST_Interface *&i,
return;
}
-# endif /* IDL_HAS_VALUETYPE */
fd->redefine (i,
p);
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index b5a0afa46f6..15f75ae1e15 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -2088,7 +2088,10 @@ be_local_interface::be_local_interface (UTL_ScopedName *n,
AST_Interface **ih_flat,
long nih_flat,
UTL_StrList *p)
- : be_interface (n, ih, nih, ih_flat, nih_flat, p)
+ : be_interface (n, ih, nih, ih_flat, nih_flat, p),
+ AST_Interface (n, ih, nih, ih_flat, nih_flat, p),
+ AST_Decl (AST_Decl::NT_interface, n, p),
+ UTL_Scope (AST_Decl::NT_interface)
{
}
@@ -2104,7 +2107,10 @@ be_abstract_interface::be_abstract_interface (UTL_ScopedName *n,
AST_Interface **ih_flat,
long nih_flat,
UTL_StrList *p)
- : be_interface (n, ih, nih, ih_flat, nih_flat, p)
+ : be_interface (n, ih, nih, ih_flat, nih_flat, p),
+ AST_Interface (n, ih, nih, ih_flat, nih_flat, p),
+ AST_Decl (AST_Decl::NT_interface, n, p),
+ UTL_Scope (AST_Decl::NT_interface)
{
}
diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h
index d025711c3bc..5af4dca2f31 100644
--- a/TAO/TAO_IDL/be_include/be_interface.h
+++ b/TAO/TAO_IDL/be_include/be_interface.h
@@ -293,7 +293,7 @@ private:
be_interface *original_interface_;
};
-class be_local_interface : public be_interface
+class be_local_interface : public virtual be_interface
{
public:
be_local_interface (UTL_ScopedName *n,
@@ -308,7 +308,7 @@ public:
virtual idl_bool is_local_interface ();
};
-class be_abstract_interface : public be_interface
+class be_abstract_interface : public virtual be_interface
{
public:
be_abstract_interface (UTL_ScopedName *n,
diff --git a/TAO/TAO_IDL/fe/fe_interface_header.cpp b/TAO/TAO_IDL/fe/fe_interface_header.cpp
index 2d6054398cf..c5cffcb47ba 100644
--- a/TAO/TAO_IDL/fe/fe_interface_header.cpp
+++ b/TAO/TAO_IDL/fe/fe_interface_header.cpp
@@ -430,7 +430,8 @@ FE_InterfaceHeader::check_first (AST_Interface *i)
idl_bool
FE_InterfaceHeader::check_further (AST_Interface *i)
{
- if (i && ! i->is_valuetype ())
+ if (i && ! i->is_valuetype () &&
+ (this->is_local () || !i->is_local_interface ()))
{
return 1;
}
@@ -491,10 +492,11 @@ FE_InterfaceHeader::n_inherits_flat (void)
FE_Local_InterfaceHeader::FE_Local_InterfaceHeader (UTL_ScopedName *n,
UTL_NameList *nl,
- UTL_NameList *supports,
- idl_bool compile_now)
- : FE_InterfaceHeader (n, nl, supports, compile_now)
+ UTL_NameList *supports)
+ : FE_InterfaceHeader (n, nl, supports, 0)
{
+ compile_inheritance (nl,
+ supports);
}
idl_bool
@@ -505,10 +507,12 @@ FE_Local_InterfaceHeader::is_local (void)
FE_Abstract_InterfaceHeader::FE_Abstract_InterfaceHeader (UTL_ScopedName *n,
UTL_NameList *nl,
- UTL_NameList *supports,
- idl_bool compile_now)
- : FE_InterfaceHeader (n, nl, supports, compile_now)
+ UTL_NameList *supports)
+
+ : FE_InterfaceHeader (n, nl, supports, 0)
{
+ compile_inheritance (nl,
+ supports);
}
idl_bool
diff --git a/TAO/TAO_IDL/include/fe_interface_header.h b/TAO/TAO_IDL/include/fe_interface_header.h
index 7cdef57a3a2..51df10dde2e 100644
--- a/TAO/TAO_IDL/include/fe_interface_header.h
+++ b/TAO/TAO_IDL/include/fe_interface_header.h
@@ -142,8 +142,7 @@ class FE_Local_InterfaceHeader : public FE_InterfaceHeader
public:
FE_Local_InterfaceHeader (UTL_ScopedName *n,
UTL_NameList *l,
- UTL_NameList *supports = 0,
- idl_bool compile_now = 1);
+ UTL_NameList *supports = 0);
virtual idl_bool is_local (void);
// See if we are a local interface.
@@ -154,8 +153,7 @@ class FE_Abstract_InterfaceHeader : public FE_InterfaceHeader
public:
FE_Abstract_InterfaceHeader (UTL_ScopedName *n,
UTL_NameList *l,
- UTL_NameList *supports = 0,
- idl_bool compile_now = 1);
+ UTL_NameList *supports = 0);
virtual idl_bool is_abstract (void);
// See if we are a local interface.