mirror of
https://github.com/creeperlv/SVM.git
synced 2026-01-11 04:49:53 +00:00
28 lines
582 B
C#
28 lines
582 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
namespace SVM.Core
|
|
{
|
|
[Serializable]
|
|
public class DebugSymbol
|
|
{
|
|
public Dictionary<string, uint> Functions = new Dictionary<string, uint>();
|
|
}
|
|
public unsafe class RuntimeBinary
|
|
{
|
|
public SVMProgram* program;
|
|
public SimpleVirtualMachine? BindedMachine;
|
|
public DebugSymbol? Symbol;
|
|
public bool Invoke(string funcName)
|
|
{
|
|
if (BindedMachine == null) return false;
|
|
if (Symbol == null) return false;
|
|
if (!Symbol.Functions.TryGetValue(funcName, out var func))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|