Skip to content

Commit

Permalink
[change] 移除HybridCLR.Runtime中DHE相关代码
Browse files Browse the repository at this point in the history
  • Loading branch information
walon committed Dec 4, 2022
1 parent e7fac5b commit 3861550
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 124 deletions.
33 changes: 0 additions & 33 deletions Runtime/DifferentialHybridAssemblyOptions.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/DifferentialHybridAssemblyOptions.cs.meta

This file was deleted.

50 changes: 0 additions & 50 deletions Runtime/RuntimeApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,56 +46,6 @@ public static unsafe LoadImageErrorCode LoadMetadataForAOTAssembly(byte[] dllByt
public static extern unsafe int LoadMetadataForAOTAssembly(byte* dllBytes, int dllSize, int mode);


//[DllImport(dllName, EntryPoint = "RuntimeApi_UseDifferentialHybridAOTAssembly")]
//public static unsafe LoadImageErrorCode UseDifferentialHybridAOTAssembly(string assemblyName)
//{
// byte[] nameBytes = System.Text.Encoding.UTF8.GetBytes(assemblyName);
// fixed(byte* namePtr = nameBytes)
// {

// }
//}

/// <summary>
/// 指示混合执行assembly使用原始的AOT代码。当assembly没有发生变化时必须调用此接口。
/// </summary>
/// <param name="assemblyName"></param>
/// <returns></returns>
#if UNITY_EDITOR
public static LoadImageErrorCode UseDifferentialHybridAOTAssembly(string assemblyName)
{
return LoadImageErrorCode.OK;
}
#else
[DllImport(dllName, EntryPoint = "RuntimeApi_UseDifferentialHybridAOTAssembly")]
public static extern LoadImageErrorCode UseDifferentialHybridAOTAssembly(string assemblyName);
#endif


/// <summary>
/// 加载差分混合执行 assembly
/// </summary>
/// <param name="dllBytes"></param>
/// <param name="optionBytes"></param>
/// <returns></returns>
public static unsafe LoadImageErrorCode LoadDifferentialHybridAssembly(byte[] dllBytes, byte[] optionBytes)
{
#if UNITY_EDITOR
return LoadImageErrorCode.OK;
#else
fixed(byte* dllBytesPtr = dllBytes)
{
fixed(byte* optionBytesPtr = optionBytes)
{
return (LoadImageErrorCode)LoadDifferentialHybridAssembly(dllBytesPtr, dllBytes.Length, optionBytesPtr, optionBytes.Length);
}
}
#endif
}

[DllImport(dllName, EntryPoint = "RuntimeApi_LoadDifferentialHybridAssembly")]
public static extern unsafe int LoadDifferentialHybridAssembly(byte* dllBytes, int dllSize, byte* optionBytesPtr, int optionBytesLength);

/// <summary>
/// 获取解释器线程栈的最大StackObject个数(size*8 为最终占用的内存大小)
/// </summary>
Expand Down
18 changes: 0 additions & 18 deletions Runtime/UnchangedAttribute.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Runtime/UnchangedAttribute.cs.meta

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.focus-creative-games.hybridclr_unity",
"version": "1.1.5",
"version": "1.1.6",
"displayName": "HybridCLR",
"description": "Unity package for HybridCLR. It includes editor and runtime scripts and assets for HybridCLR",
"category": "Runtime",
Expand Down

0 comments on commit 3861550

Please sign in to comment.