edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs;C1682458
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyContext.cs;C1708575
File: RubyContext.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyContext.cs;C1708575  (server)    3/17/2010 10:43 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyContext.cs;InterpretInterop
@@ -2777,6 +2777,16 @@
             return _metaBinderFactory.InteropGetMember(name);
         }
 
+        public override SetMemberBinder/*!*/ CreateSetMemberBinder(string name, bool ignoreCase) {
+            // TODO:
+            if (ignoreCase) {
+                return base.CreateSetMemberBinder(name, ignoreCase);
+            }
+
+            // TODO: name mangling
+            return _metaBinderFactory.InteropSetMemberExact(name);
+        }
+
         public override InvokeMemberBinder/*!*/ CreateCallBinder(string/*!*/ name, bool ignoreCase, CallInfo/*!*/ callInfo) {
             // TODO:
             if (ignoreCase || callInfo.ArgumentNames.Count != 0) {
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/InteropBinder.cs;C1610422
File: InteropBinder.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/InteropBinder.cs;C1610422  (server)    3/17/2010 10:45 AM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/InteropBinder.cs;InterpretInterop
@@ -24,6 +24,7 @@
 using System.Diagnostics;
 using System.Dynamic;
 using System.Reflection;
+using System.Runtime.CompilerServices;
 using Microsoft.Scripting.Runtime;
 using Microsoft.Scripting.Utils;
 using Microsoft.Scripting.Generation;
@@ -55,6 +56,16 @@
                 get { return _context; }
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             public override DynamicMetaObject/*!*/ FallbackCreateInstance(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ args,
                 DynamicMetaObject errorSuggestion) {
 
@@ -82,6 +93,16 @@
                 get { return _context; }
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             public override DynamicMetaObject/*!*/ FallbackInvoke(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ args, 
                 DynamicMetaObject errorSuggestion) {
 
@@ -126,6 +147,16 @@
                 get { return _context; }
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             public override DynamicMetaObject/*!*/ FallbackInvoke(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ args, 
                 DynamicMetaObject errorSuggestion) {
 #if !SILVERLIGHT
@@ -185,6 +216,16 @@
                 get { return _context; }
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             #region Ruby -> DLR
 
             public override DynamicMetaObject/*!*/ FallbackInvokeMember(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ args, DynamicMetaObject errorSuggestion) {
@@ -300,6 +341,16 @@
                 get { return false; }
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             #region Ruby -> DLR
 
             public override DynamicMetaObject/*!*/ FallbackGetMember(DynamicMetaObject/*!*/ target, DynamicMetaObject errorSuggestion) {
@@ -360,14 +411,28 @@
         /// No name mangling is performed.
         /// </summary>
         internal sealed class TryGetMemberExact : GetMemberBinder, IInvokeOnGetBinder {
-            internal TryGetMemberExact(string/*!*/ name)
+            private readonly RubyContext/*!*/ _context;
+
+            internal TryGetMemberExact(RubyContext/*!*/ context, string/*!*/ name)
                 : base(name, false) {
+                Assert.NotNull(context);
+                _context = context;
             }
 
             bool IInvokeOnGetBinder.InvokeOnGet {
                 get { return false; }
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             #region Ruby -> DLR
 
             public override DynamicMetaObject/*!*/ FallbackGetMember(DynamicMetaObject/*!*/ target, DynamicMetaObject errorSuggestion) {
@@ -404,13 +469,13 @@
 
                 _name = name;
                 _context = context;
-                _tryGetMember = RubyMetaBinderFactory.InteropTryGetMemberExact(name);
-                _setMember = RubyMetaBinderFactory.InteropSetMemberExact(name);
+                _tryGetMember = context.MetaBinderFactory.InteropTryGetMemberExact(name);
+                _setMember = context.MetaBinderFactory.InteropSetMemberExact(name);
 
                 string unmanagled = RubyUtils.TryUnmangleMethodName(name);
                 if (unmanagled != null) {
-                    _setMemberUnmangled = RubyMetaBinderFactory.InteropSetMemberExact(unmanagled);
-                    _tryGetMemberUnmangled = RubyMetaBinderFactory.InteropTryGetMemberExact(unmanagled);
+                    _setMemberUnmangled = context.MetaBinderFactory.InteropSetMemberExact(unmanagled);
+                    _tryGetMemberUnmangled = context.MetaBinderFactory.InteropTryGetMemberExact(unmanagled);
                 }
             }
 
@@ -418,6 +483,16 @@
                 get { return _context; }
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             #region Ruby -> DLR
 
             public override DynamicMetaObject/*!*/ Bind(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ args) {
@@ -485,8 +560,22 @@
         }
 
         internal sealed class SetMemberExact : SetMemberBinder {
-            internal SetMemberExact(string/*!*/ name)
+            private readonly RubyContext/*!*/ _context;
+
+            internal SetMemberExact(RubyContext/*!*/ context, string/*!*/ name)
                 : base(name, false) {
+                Assert.NotNull(context);
+                _context = context;
+            }
+
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
             }
 
             public override DynamicMetaObject/*!*/ FallbackSetMember(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/ value,
@@ -526,6 +615,16 @@
                 _context = context;
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             #region Ruby -> DLR
 
             public override DynamicMetaObject/*!*/ FallbackGetIndex(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ indexes, 
@@ -579,6 +678,16 @@
                 _context = context;
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             #region Ruby -> DLR
 
             public override DynamicMetaObject/*!*/ FallbackSetIndex(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ indexes,
@@ -641,6 +750,16 @@
                 _setIndex = context.MetaBinderFactory.InteropSetIndex(callInfo);
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             #region Ruby -> DLR
 
             public override DynamicMetaObject/*!*/ Bind(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/[]/*!*/ args) {
@@ -675,6 +794,16 @@
                 _context = context;
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             public override DynamicMetaObject/*!*/ FallbackBinaryOperation(DynamicMetaObject/*!*/ target, DynamicMetaObject/*!*/ arg, DynamicMetaObject errorSuggestion) {
                 return InvokeMember.FallbackInvokeMember(this, RubyUtils.MapOperator(Operation), _CallInfo, target, new[] { arg }, errorSuggestion);
             }
@@ -707,6 +836,16 @@
                 _context = context;
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             public override DynamicMetaObject/*!*/ FallbackUnaryOperation(DynamicMetaObject/*!*/ target, DynamicMetaObject errorSuggestion) {
                 return InvokeMember.FallbackInvokeMember(this, RubyUtils.MapOperator(Operation), _CallInfo, target, DynamicMetaObject.EmptyMetaObjects, errorSuggestion);
             }
@@ -736,6 +875,16 @@
                 _context = context;
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             public override DynamicMetaObject/*!*/ FallbackConvert(DynamicMetaObject/*!*/ target, DynamicMetaObject errorSuggestion) {
 #if !SILVERLIGHT
                 DynamicMetaObject result;
@@ -776,6 +925,16 @@
                 _context = context;
             }
 
+            public override T BindDelegate<T>(CallSite<T>/*!*/ site, object[]/*!*/ args) {
+                if (_context.Options.NoAdaptiveCompilation) {
+                    return null;
+                }
+
+                var result = this.LightBind(site, args, _context.Options.CompilationThreshold);
+                CacheTarget(result);
+                return result;
+            }
+
             public override DynamicMetaObject/*!*/ FallbackConvert(DynamicMetaObject/*!*/ target, DynamicMetaObject errorSuggestion) {
 #if !SILVERLIGHT
                 DynamicMetaObject result;
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyMetaBinderFactory.cs;C1594104
File: RubyMetaBinderFactory.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyMetaBinderFactory.cs;C1594104  (server)    3/17/2010 5:57 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyMetaBinderFactory.cs;InterpretInterop
@@ -64,9 +64,9 @@
         private Dictionary<CallInfo, InteropBinder.Invoke> _interopInvoke;
         private Dictionary<Key<string, CallInfo>, InteropBinder.InvokeMember> _interopInvokeMember;
         private Dictionary<string, InteropBinder.GetMember> _interopGetMember;
-        private static Dictionary<string, InteropBinder.TryGetMemberExact> _interopTryGetMemberExact;
+        private Dictionary<string, InteropBinder.TryGetMemberExact> _interopTryGetMemberExact;
         private Dictionary<string, InteropBinder.SetMember> _interopSetMember;
-        private static Dictionary<string, InteropBinder.SetMemberExact> _interopSetMemberExact;
+        private Dictionary<string, InteropBinder.SetMemberExact> _interopSetMemberExact;
         private Dictionary<CallInfo, InteropBinder.GetIndex> _interopGetIndex;
         private Dictionary<CallInfo, InteropBinder.SetIndex> _interopSetIndex;
         private Dictionary<Key<string, CallInfo>, InteropBinder.SetIndexedProperty> _interopSetIndexedProperty;
@@ -213,7 +213,7 @@
             }
         }
 
-        public static InteropBinder.TryGetMemberExact/*!*/ InteropTryGetMemberExact(string/*!*/ name) {
+        public InteropBinder.TryGetMemberExact/*!*/ InteropTryGetMemberExact(string/*!*/ name) {
             if (_interopTryGetMemberExact == null) {
                 _interopTryGetMemberExact = new Dictionary<string, InteropBinder.TryGetMemberExact>();
             }
@@ -221,7 +221,7 @@
             lock (_interopTryGetMemberExact) {
                 InteropBinder.TryGetMemberExact result;
                 if (!_interopTryGetMemberExact.TryGetValue(name, out result)) {
-                    _interopTryGetMemberExact.Add(name, result = new InteropBinder.TryGetMemberExact(name));
+                    _interopTryGetMemberExact.Add(name, result = new InteropBinder.TryGetMemberExact(_context, name));
                 }
                 return result;
             }
@@ -241,7 +241,7 @@
             }
         }
 
-        public static InteropBinder.SetMemberExact/*!*/ InteropSetMemberExact(string/*!*/ name) {
+        public InteropBinder.SetMemberExact/*!*/ InteropSetMemberExact(string/*!*/ name) {
             if (_interopSetMemberExact == null) {
                 _interopSetMemberExact = new Dictionary<string, InteropBinder.SetMemberExact>();
             }
@@ -249,7 +249,7 @@
             lock (_interopSetMemberExact) {
                 InteropBinder.SetMemberExact result;
                 if (!_interopSetMemberExact.TryGetValue(name, out result)) {
-                    _interopSetMemberExact.Add(name, result = new InteropBinder.SetMemberExact(name));
+                    _interopSetMemberExact.Add(name, result = new InteropBinder.SetMemberExact(_context, name));
                 }
                 return result;
             }
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyScopeMethodMissingInfo.cs;C1594871
File: RubyScopeMethodMissingInfo.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyScopeMethodMissingInfo.cs;C1594871  (server)    3/17/2010 6:03 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Runtime/Calls/RubyScopeMethodMissingInfo.cs;InterpretInterop
@@ -138,7 +138,7 @@
                 }
 
                 var scopeLookup = Ast.NotEqual(
-                    Ast.Assign(scopeLookupResultVar, AstUtils.LightDynamic(RubyMetaBinderFactory.InteropTryGetMemberExact(name), typeof(object), scopeVar)),
+                    Ast.Assign(scopeLookupResultVar, AstUtils.LightDynamic(context.MetaBinderFactory.InteropTryGetMemberExact(name), typeof(object), scopeVar)),
                     Expression.Constant(OperationFailed.Value)
                 );
 
@@ -147,7 +147,7 @@
                     scopeLookup = Ast.OrElse(
                         scopeLookup,
                         Ast.NotEqual(
-                            Ast.Assign(scopeLookupResultVar, AstUtils.LightDynamic(RubyMetaBinderFactory.InteropTryGetMemberExact(unmanagled), typeof(object), scopeVar)),
+                            Ast.Assign(scopeLookupResultVar, AstUtils.LightDynamic(context.MetaBinderFactory.InteropTryGetMemberExact(unmanagled), typeof(object), scopeVar)),
                             Expression.Constant(OperationFailed.Value)
                         )
                     );
===================================================================
