I'm able to find it in /trunk/cecil/flowanalysis, but it doesn't seem
to be in /trunk/mcs/class/Mono.Cecil -- is it meant to be compatible
with the mcs/class/ version of Cecil?
Yes, it works along with the current Cecil which lives in mcs/class.
Cecil.FlowAnalysis has been developed for the specific needs of db4o,
and hasn't been developed afterwards. The focus shifted to
Cecil.Decompiler afterwards, but its development is paused until I
complete the cecil refactoring (should be a matter of a couple of
weeks now).
--
Jb Evain <j...@nurv.fr>
--
--
mono-cecil
To unsubscribe from this group, send email to mono-cecil+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
On Tue, Mar 23, 2010 at 7:34 PM, Alex Lyman <mail.al...@gmail.com> wrote:
> Is there any chance that the refactoring is happening on a publicly-readable
> branch?
I'm keeping the current development private until it reaches Cecil's
feature set. A few people have access to it and are helping testing
it. Good news is that it's almost complete, so with some more tests,
it should be publicly available in a couple of weeks at most.
> Is there a wish-list for Cecil.Decompiler?
Not really. It still have to undergo quite a few changes in the API.
But it has some cool foundations I think.
> I've recently come into
> a metric load of spare time (I was nicked in the second round of layoffs at
> my old company, and the job hunt seems to have stabilized to only fill about
> an hour each day)
I'm sorry to hear that. Good hunting :)
--
Jb Evain <j...@nurv.fr>
I have one wish list item. :)
Some way of knowing the argument stack at any given instruction. (count and
what types in what order)
Specifically I want to be able to inject code to save the current stack,
jump elsewhere for some fun-fun action and then later return to resume the
stack. (Implementing fiber support for .Net assemblies)
Unsuccessfully tried to find if Cecil could currently provide this info, so
I guess it can't.
Br,
Tedd
Hey Alex,
--
Jb Evain <j...@nurv.fr>
--
On Wed, Mar 24, 2010 at 11:00 AM, Tedd Hansen <te...@konge.net> wrote:
> I have one wish list item. :)
>
> Some way of knowing the argument stack at any given instruction. (count and
> what types in what order)
There's code in the decompiler (Mono's svn, /cecil/decompiler) to
compute the stack height at any instruction. You can certainly enhance
it to provide type information on top of that.
--
Jb Evain <j...@nurv.fr>
The end result I'm working towards is statically checking a program for
NullReferenceExceptions. Basically "code contracts lite" - where lite
should refer both to runtime of the tool (I want to be faster than
Microsofts static contract checking tool) and to the ease of use
(annotate parameters with [NonNull] instead of writing a "contract
class"; automatically infer stuff whenever possible). But then again
it'll be focused on introducing non-nullable variables, and not do
anything else that contracts do.
I don't know how useful my SSA classes would be to someone who wants to
modify IL - I'm focusing on the code analysis part and give up the 1:1
correspondence with IL instructions.
You can take a look yourself - here's the CFG and SSA form for a method
using a foreach loop to sum up the length of all strings in a List<string>:
http://www.danielgrunwald.de/coding/null/ForEach.cfg.png (green edges
aren't control flow edges but represent dominance)
http://www.danielgrunwald.de/coding/null/ForEach.ssa.png (ldloca
instructions are eliminated where possible because SSA form can't be
used with them)
The code is a work is progress, but I'm planning on making the CFG and
SSA code available as open-source code when it's done.
Daniel
Pretty cool!
--
Jb Evain <j...@nurv.fr>
Could use some input on
http://teddhansen.wordpress.com/2010/03/20/bug-in-mono-cecil/
Is it a bug? If not, how do I ensure correct pos?
Br,
Tedd
I added a comment on the blog when this was posted, but somehow it got
removed. It's not a bug, you're injecting too much code into a short
form branch.
If you don't want to deal with it manually, call:
method_body.Simplify ()
before instrumenting. That will transform all short forms to normal
forms. And when're you're done you can call:
method_body.Optimize ()
to turn them back to short forms if possible.
Here, “bug” is gone.
--
Jb Evain <j...@nurv.fr>
Comments are moderated I guess, and my inbox would make most db admins
scared - so it probably got lost in the unread category.
Br,
Tedd
-----Original Message-----
From: mono-...@googlegroups.com [mailto:mono-...@googlegroups.com] On
Behalf Of Jb Evain
Sent: 27. mars 2010 00:31
To: mono-...@googlegroups.com
Subject: Re: [mono-cecil] Bug?
Hey,
method_body.Simplify ()
method_body.Optimize ()
Here, "bug" is gone.
--
Jb Evain <j...@nurv.fr>
--
Do you have a link where I could read about this? (or could you explain
quickly?) :)
I added them around my method processing and it works fine. PEVerify seems
happy (except for the 19 stack-related errors I now have;)).
Now my next step is to keep track of the argument stack. You mentioned
Mono.Decompiler for that, will look into it.
Br,
Tedd
-----Original Message-----
From: mono-...@googlegroups.com [mailto:mono-...@googlegroups.com] On
Behalf Of Jb Evain
Sent: 27. mars 2010 00:31
Hey,
method_body.Simplify ()
method_body.Optimize ()
Here, "bug" is gone.
--
Jb Evain <j...@nurv.fr>
--