Displaying 5 results from an estimated 5 matches for "plugininterfac".
Did you mean:
plugininterface
2017 Dec 06
2
Question about visibility analysis for whole program devirtualization pass
...nalysis at that level would not always give correct results because the symbol information provided by the linker is insufficient to make determinations about which type hierarchies are closed at LTO time. For example, consider a main program with a plugin interface class defined like this:
struct PluginInterface {
virtual void f();
};
where plugins in external shared objects implement the plugin interface by deriving from PluginInterface. The problem is that deriving from PluginInterface in a shared object does not necessarily result in a reference to any of the symbols associated with PluginInterface,...
2017 Nov 30
3
Question about visibility analysis for whole program devirtualization pass
Hi!
I have a question about whole program devirtualization pass. According to my understanding devirtualization is performed only for the classes that have hidden LTO visibility and this visibility is controlled by attributes in the source level or command line options. So visibility analysis is currently performed only in the front-end. But LLVM has LTO internalization pass that uses
2020 Apr 21
2
[PATCH nbdkit v2] Add the ability to write plugins in golang.
...tional, use 0 if not available)
+}
+
+func (e PluginError) String() string {
+ if e.Errno != 0 {
+ return e.Errmsg
+ } else {
+ return fmt.Sprintf("%s (errno %d)", e.Errmsg, e.Errno)
+ }
+}
+
+func (e PluginError) Error() string {
+ return e.String()
+}
+
+// The plugin interface.
+type PluginInterface interface {
+ // Open, GetSize and PRead are required for all plugins.
+ // Other methods are optional.
+ Config(key string, value string) error
+ ConfigComplete() error
+ Open(readonly bool) (uintptr, error)
+ Close(handle uintptr)
+ GetSize(handle uintptr) (uint64, error)
+ PRead(handle uintptr,...
2020 Apr 21
0
Re: [PATCH nbdkit v2] Add the ability to write plugins in golang.
...e value, so we don't actually have to store any valid pointer
as the handle at all. It can be literally any value that fits in
a 32-bit pointer. Thus we can keep a global variable mapping the
GO objects to fake C "pointers"
So it would look like this:
// The plugin interface.
type PluginInterface interface {
// Open, GetSize and PRead are required for all plugins.
// Other methods are optional.
Config(key string, value string) error
ConfigComplete() error
Open(readonly bool) (PluginConnectionInterface, error)
}
type PluginConnectionInterface interface {
// Open, GetSize and...
2020 Apr 23
2
Re: [PATCH nbdkit v2] Add the ability to write plugins in golang.
...tional, use 0 if not available)
+}
+
+func (e PluginError) String() string {
+ if e.Errno != 0 {
+ return e.Errmsg
+ } else {
+ return fmt.Sprintf("%s (errno %d)", e.Errmsg, e.Errno)
+ }
+}
+
+func (e PluginError) Error() string {
+ return e.String()
+}
+
+// The plugin interface.
+type PluginInterface interface {
+ // Open is required for all plugins.
+ // Other methods are optional.
+ Load()
+ Unload()
+ Config(key string, value string) error
+ ConfigComplete() error
+ Open(readonly bool) (ConnectionInterface, error)
+}
+
+// The client connection interface.
+type ConnectionInterface interface...