mirror of
https://github.com/fadden/6502bench.git
synced 2025-09-26 12:17:49 +00:00
Don't do plugin interface checks during code analysis
The plugin objects are MarshalByRefObject stubs, which means they don't actually implement the interfaces we're checking for. There's some additional overhead to do the interface check. We can avoid it by doing the interface queries during initialization, and just checking some bit flags later on. Also, in the extension script info window, show a list of implemented interfaces.
This commit is contained in:
@@ -220,6 +220,20 @@ namespace SourceGen.Sandbox {
|
||||
}
|
||||
private void DebugGetScriptInfo(IPlugin plugin, StringBuilder sb) {
|
||||
sb.Append(plugin.Identifier);
|
||||
sb.Append(":");
|
||||
|
||||
// The plugin is actually a MarshalByRefObject, so we can't use reflection
|
||||
// to gather the list of interfaces.
|
||||
// TODO(maybe): add a call that does the query on the remote site
|
||||
if (plugin is PluginCommon.IPlugin_InlineJsr) {
|
||||
sb.Append(" InlineJsr");
|
||||
}
|
||||
if (plugin is PluginCommon.IPlugin_InlineJsl) {
|
||||
sb.Append(" InlineJsl");
|
||||
}
|
||||
if (plugin is PluginCommon.IPlugin_InlineBrk) {
|
||||
sb.Append(" InlineBrk");
|
||||
}
|
||||
sb.Append("\r\n");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user