public GetSymbol ( string name, SectionKind kind ) : |
||
name | string | |
kind | SectionKind | |
Результат |
/// <summary> /// Initializes a new instance of <see cref="BaseCodeEmitter" />. /// </summary> /// <param name="methodName">Name of the method.</param> /// <param name="linker">The linker.</param> /// <param name="codeStream">The stream the machine code is written to.</param> public void Initialize(string methodName, BaseLinker linker, Stream codeStream) { Debug.Assert(codeStream != null); Debug.Assert(linker != null); MethodName = methodName; this.linker = linker; this.codeStream = codeStream; // only necessary if method is being recompiled (due to inline optimization, for example) var symbol = linker.GetSymbol(MethodName, SectionKind.Text); symbol.RemovePatches(); }
public void Resolve(TypeSystem typeSystem, BaseLinker linker) { // Find the test method to execute RuntimeMethod = FindMethod( typeSystem, MethodNamespaceName, MethodTypeName, MethodName, Parameters ); Debug.Assert(RuntimeMethod != null, MethodNamespaceName + "." + MethodTypeName + "." + MethodName); var symbol = linker.GetSymbol(RuntimeMethod.FullName, SectionKind.Text); Address = symbol.VirtualAddress; }