From 89fe273e06e6f8e7ed289717a79447ba1d46a396 Mon Sep 17 00:00:00 2001 From: Xanathar Date: Sat, 23 Jan 2016 22:42:26 +0100 Subject: [PATCH] Final ver of proxy objects. Commented AOT tests in Travis build. Seems the CI server is going through arch changes and AOT breaks long before reaching moonsharp code :( --- .travis.yml | 8 ++++---- .../StandardDescriptors/ProxyUserDataDescriptor.cs | 6 +++--- .../Interop/UserDataRegistries/TypeDescriptorRegistry.cs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30d055bc..de786af8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ script: - xbuild /p:TargetFrameworkProfile='' /p:Configuration=Release src/moonsharp_ci_net35.sln - cd src/TestRunners/ConsoleTestRunner/bin/Release - mono ConsoleTestRunner.exe - - chmod 777 aotregen.sh - - chmod 777 aottest.sh - - sudo ./aotregen.sh - - sudo ./aottest.sh +# - chmod 777 aotregen.sh +# - chmod 777 aottest.sh +# - sudo ./aotregen.sh +# - sudo ./aottest.sh diff --git a/src/MoonSharp.Interpreter/Interop/StandardDescriptors/ProxyUserDataDescriptor.cs b/src/MoonSharp.Interpreter/Interop/StandardDescriptors/ProxyUserDataDescriptor.cs index a9f274d7..4e3a0d2c 100644 --- a/src/MoonSharp.Interpreter/Interop/StandardDescriptors/ProxyUserDataDescriptor.cs +++ b/src/MoonSharp.Interpreter/Interop/StandardDescriptors/ProxyUserDataDescriptor.cs @@ -10,14 +10,14 @@ namespace MoonSharp.Interpreter.Interop /// public sealed class ProxyUserDataDescriptor : IUserDataDescriptor { - StandardUserDataDescriptor m_ProxyDescriptor; + IUserDataDescriptor m_ProxyDescriptor; IProxyFactory m_ProxyFactory; - internal ProxyUserDataDescriptor(IProxyFactory proxyFactory, InteropAccessMode accessMode = InteropAccessMode.Default, string friendlyName = null) + internal ProxyUserDataDescriptor(IProxyFactory proxyFactory, IUserDataDescriptor proxyDescriptor, string friendlyName = null) { m_ProxyFactory = proxyFactory; Name = friendlyName ?? (proxyFactory.TargetType.Name + "::proxy"); - m_ProxyDescriptor = new StandardUserDataDescriptor(proxyFactory.ProxyType, accessMode, friendlyName + "::proxied"); + m_ProxyDescriptor = proxyDescriptor; } /// diff --git a/src/MoonSharp.Interpreter/Interop/UserDataRegistries/TypeDescriptorRegistry.cs b/src/MoonSharp.Interpreter/Interop/UserDataRegistries/TypeDescriptorRegistry.cs index 31544cda..51e98ba1 100644 --- a/src/MoonSharp.Interpreter/Interop/UserDataRegistries/TypeDescriptorRegistry.cs +++ b/src/MoonSharp.Interpreter/Interop/UserDataRegistries/TypeDescriptorRegistry.cs @@ -120,8 +120,8 @@ internal static InteropAccessMode DefaultAccessMode /// internal static IUserDataDescriptor RegisterProxyType_Impl(IProxyFactory proxyFactory, InteropAccessMode accessMode, string friendlyName) { - accessMode = ResolveDefaultAccessModeForType(accessMode, proxyFactory.ProxyType); - return RegisterType_Impl(proxyFactory.TargetType, accessMode, friendlyName, new ProxyUserDataDescriptor(proxyFactory, accessMode, friendlyName)); + IUserDataDescriptor proxyDescriptor = RegisterType_Impl(proxyFactory.ProxyType, accessMode, friendlyName, null); + return RegisterType_Impl(proxyFactory.TargetType, accessMode, friendlyName, new ProxyUserDataDescriptor(proxyFactory, proxyDescriptor, friendlyName)); }