[Ironruby-core] Code Review: RubyReflectionCache
curth at microsoft.com
Tue Oct 14 23:36:08 EDT 2008
Nice! Looks good.
From: Tomas Matousek
Sent: Tuesday, October 14, 2008 8:07 PM
To: IronRuby External Code Reviewers
Cc: ironruby-core at rubyforge.org
Subject: Code Review: RubyReflectionCache
tfpt review "/shelveset:RubyReflectionCache;REDMOND\tomat"
Implements profiling of Ruby methods: Given -profile on command line the compiler instruments each Ruby method by code that captures the current timestamp (in ticks) in method prologue and updates a global variable associated with the method in its epilogue. At the end, it dumps all values into "profile.log" file.
Implements reflection cache: a static class Methods that contains properties for each method that is emitted into IL. The properties return MethodInfo for the method and cache it. The properties are generated for methods in RubyOps marked by [Emitted] attribute. The generator ("ClassInitGenerator") now refers to internal classes so it needs to be signed and a friend assembly of IronRuby.dll
Adds alias "gencache" that generates ReflectionCache.Generated.cs file.
More information about the Ironruby-core