dynamic-language-runtime

Making a CLR/.NET Language Debuggable

随声附和 提交于 2019-11-28 05:56:44
What are some resources for making a CLR/.NET language debuggable? I'm developing an ActionScript 3 to IL compiler, which uses DLR CallSites and CallSiteBinders to handle the dynamic aspects of the otherwise static programming language. I'm looking for any information on making the emitted IL map back to the source code, and I'd also like to know how I can make the dynamic call sites map back as well. So this is ultimately two questions: How can I make the IL debuggable? How can I make the DLR call sites debuggable? Any help would be greatly appreciated! What I'm looking for in terms of

Where can you download Managed JScript for the DLR?

为君一笑 提交于 2019-11-28 05:22:33
问题 The lastest release (0.9 Stable) of the Dynamic Language Runtime contains IronPython and IronRuby, but it doesn't contain Managed JScript. Does anyone know where I can download the latest release of Managed JScript for use with ASP.NET and/or WPF? In case you aren't aware, JScript.NET and Managed JScript are too different things. What I'm looking for is Managed JScript. 回答1: Update... The Silverlight Dynamic Language SDK 0.5.0 Release Notes posted March 23rd, 2009 on CodePlex, contained this

Dynamically adding members to a dynamic object

六眼飞鱼酱① 提交于 2019-11-27 21:36:29
I'm looking for a way to add members dynamically to an dynamic object. OK, I guess a little clarification is needed... When you do that : dynamic foo = new ExpandoObject(); foo.Bar = 42; The Bar property will be added dynamically at runtime. But the code still refers "statically" to Bar (the name "Bar" is hard-coded)... What if I want to add a property at runtime without knowing its name at compile time ? I know how to do this with a custom dynamic object (I actually blogged about it a few months ago), using the methods of the DynamicObject class, but how can I do it with any dynamic object ?

F# dynamic object access

早过忘川 提交于 2019-11-27 14:03:58
问题 Is there a way to access DLR object (eg. DynamicObject subclass instance) members (properties and methods) in F# that is similar to C# dynamic ? 回答1: There is a module now on nuget that uses the dlr to implement the dynamic operator. FSharp.Interop.Dynamic It has several advantages over a lot of the snippets out there. Performance it uses Dynamitey for the dlr call which implements caching and is a PCL library Handles methods that return void, you'll get a binding exception if you don't

How do I express a void method call as the result of DynamicMetaObject.BindInvokeMember?

∥☆過路亽.° 提交于 2019-11-27 10:39:35
问题 I'm trying to give a short example of IDynamicMetaObjectProvider for the second edition of C# in Depth, and I'm running into issues. I want to be able to express a void call, and I'm failing. I'm sure it's possible, because if I dynamically call a void method using the reflection binder, all is fine. Here's a short but complete example: using System; using System.Dynamic; using System.Linq.Expressions; class DynamicDemo : IDynamicMetaObjectProvider { public DynamicMetaObject GetMetaObject

Are there any .NET CLR/DLR implementations of ECMAScript?

拟墨画扇 提交于 2019-11-27 09:22:13
问题 Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR ? Ideally something like what Rhino is for Java . A solid port of Rhino running on .NET Framework / Mono Framework would be perfect. I've only seen a handful of projects mentioned but never seen any come to light or in reality anything that I've ever been able to run script on. Here's what I know about already: MSScriptControl ActiveX Control : AFAIK, this was Microsoft's last real ECMAScript

Memory Overflow: Having an increasing number of Microsoft.CSharp.RuntimeBinder.Semantics

本小妞迷上赌 提交于 2019-11-27 07:38:50
问题 We are currently hunting some memory leaks in our application, when doing some operation(loading and closing one project inside our application), we know that the memory increase always a little bit. We have already found a lot of them, but now, the 10+ most increasing classes are (according to our tool, ANTS Memory Profiler 8.2): Microsoft.CSharp.RuntimeBinder.Semantics.SYMTBL+Key Microsoft.CSharp.RuntimeBinder.Semantics.LocalVariableSymbol Microsoft.CSharp.RuntimeBinder.Semantics.CONSTVAL

Dynamic Lang. Runtime vs Reflection

徘徊边缘 提交于 2019-11-27 03:18:00
I am planning to use dynamic keyword for my new project. But before stepping in, I would like to know about the pros and cons in using dynamic keyword over Reflection. Following where the pros, I could find in respect to dynamic keyword: Readable\Maintainable code. Fewer lines of code. While the negatives associated with using dynamic keyword, I came to hear was like: Affects application performance. Dynamic keyword is internally a wrapper of Reflection. Dynamic typing might turn into breeding ground for hard to find bugs. Affects interoperability with previous .NET versions. Please help me on

Expression Tree Copy or Convert

a 夏天 提交于 2019-11-27 01:54:59
问题 How to convert a ExpressionTree of form Expression<Func<POCO1, bool>> exp = p => p.Age > 50; to Expression<Func<POCO2, bool>> exp2 = p => p.Age > 50; where POCO1 and POCO2 are C# objects and both have Int32 Age property 回答1: well, you can make custom expression visitor that will replace parameter references and patch member access expressions class Converter<TTo> { class ConversionVisitor : ExpressionVisitor { private readonly ParameterExpression newParameter; private readonly

Making a CLR/.NET Language Debuggable

懵懂的女人 提交于 2019-11-27 01:13:24
问题 What are some resources for making a CLR/.NET language debuggable? I'm developing an ActionScript 3 to IL compiler, which uses DLR CallSites and CallSiteBinders to handle the dynamic aspects of the otherwise static programming language. I'm looking for any information on making the emitted IL map back to the source code, and I'd also like to know how I can make the dynamic call sites map back as well. So this is ultimately two questions: How can I make the IL debuggable? How can I make the