From: Scott Wood Date: Thu, 27 Sep 2007 21:52:28 +0000 (-0500) Subject: xfer to laptop X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=commitdiff_plain;h=bc696ad9b0d5a2ad04e2de5ad8b89f746dd78491 xfer to laptop --- diff --git a/doc/orb/parameter-info-block b/doc/orb/parameter-info-block index a39372b..b868a44 100644 --- a/doc/orb/parameter-info-block +++ b/doc/orb/parameter-info-block @@ -24,7 +24,9 @@ Parameter Info Block (PIB) This is like buffer_size, but for Copy segments. objlist_ptr pointer Pointer to the object list + newobj_ptr pointer Pointer to the new object list. objlist_len 32-bit Length of the object list, in IDs + newobj_len 32-bit Length of the new object list. The object list is a special segment that contains object IDs rather than arbitrary data. Each object ID will be translated @@ -33,6 +35,13 @@ Parameter Info Block (PIB) regardless of the pointer size. The first object in the list is the object to receive the message. + Objects which live in this address space have the high bit + clear; remote objects have the high bit set. When sending + an object reference that has not been exposed to the kernel + before, its interface hash should exist in the newobj list. + + + num_segments 32-bit Number of data segments segment.ptr pointer Pointer to data segment diff --git a/idlcomp/languages/c++/main.cc b/idlcomp/languages/c++/main.cc index 7c6ebe8..12cb65c 100644 --- a/idlcomp/languages/c++/main.cc +++ b/idlcomp/languages/c++/main.cc @@ -481,7 +481,10 @@ void CPPFile::output_vstruct_info(Struct *sym) file << indent << "};\n\n" << indent << "static const __attribute__((unused)) " "::System::RunTime::VStructInfo _info = {\n" - << indent << "\t_guids, " << sym->chainlen << '\n' + << indent << "\t_guids, " << sym->chainlen << ",\n" +#if 0 + << indent << "\t_marshall, _unmarshall,\n" +#endif << indent << "};\n"; diff --git a/idlcomp/languages/c++/marshall.cc b/idlcomp/languages/c++/marshall.cc index 2391b37..ca7a2f9 100644 --- a/idlcomp/languages/c++/marshall.cc +++ b/idlcomp/languages/c++/marshall.cc @@ -18,6 +18,13 @@ void CPPFile::output_ifaceinfo(Interface *iface) { extra_newline(); +#if 0 + file << indent << "void _invoke(::System::RunTime::Array" + << "< ::System::RunTime::ID> objlist,\n" + << indent << " ::System::RunTime::ParamInfoBlock::Segment *segs,\n" + << indent << " int nsegs);\n\n"; +#endif + file << indent << "static const __attribute__((unused))\n" << indent << "::System::RunTime::IFaceInfo _info = {\n" << indent << "\t&_guid,\n" diff --git a/include/c++/orb.h b/include/c++/orb.h index 72daad8..484c142 100644 --- a/include/c++/orb.h +++ b/include/c++/orb.h @@ -309,24 +309,13 @@ namespace System { } struct IFaceInfo; + typedef uint32_t ID; struct IFaceTable { const IFaceInfo *info; const ptrdiff_t offset; }; - struct VStructInfo { - // List of GUIDs of the struct and its superstructs, - // starting with System.VStruct and ending with - // the concrete struct. - - const unsigned long *const *const guids; - - // Length of inheritance chain; 1 for System.VStruct - - const int chainlen; - }; - union GUID { unsigned char c[16]; unsigned long l[]; @@ -345,7 +334,6 @@ namespace System { guid1[3] == guid2[3]))); } - typedef uint32_t ID; struct ParamInfoBlock { uint32_t buffer_size; uint32_t copy_size; @@ -398,6 +386,23 @@ namespace System { struct IFaceInfo { const GUID *guid; + void (*invoke)(Array objlist, + ParamInfoBlock::Segment *segs, + int nsegs); + ::System::_i_Object *(*wrapper)(ID id); + }; + + struct VStructInfo { + // List of GUIDs of the struct and its superstructs, + // starting with System.VStruct and ending with + // the concrete struct. + + const unsigned long *const *const guids; + + // Length of inheritance chain; 1 for System.VStruct + + const int chainlen; + int (*marshall)(GrowableArray &buf, GrowableArray &objlist, ParamInfoBlock::Segment *segs, diff --git a/lib/c++/orb.cc b/lib/c++/orb.cc index 8533f52..636ee9a 100644 --- a/lib/c++/orb.cc +++ b/lib/c++/orb.cc @@ -48,6 +48,8 @@ namespace RunTime { return ptr; }; +// ::System::Object create_wrapper( + namespace Priv { typedef void (*MethodEntry)(ParamInfoBlock *pib);