mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0784aa131 |
No files matched your search
+11
@@ -0,0 +1,11 @@
|
||||
config.h
|
||||
Makefile
|
||||
config.cache
|
||||
stamp-h.in
|
||||
config.status
|
||||
aclocal.m4
|
||||
configure
|
||||
stamp-h
|
||||
libtool
|
||||
Makefile.in
|
||||
config.log
|
||||
@@ -0,0 +1 @@
|
||||
Miguel de Icaza ([email protected])
|
||||
@@ -0,0 +1,36 @@
|
||||
2001-07-15 Joe Shaw <[email protected]>
|
||||
|
||||
* configure.in: Don't create doc/Makefile as there's nothing there
|
||||
to make.
|
||||
|
||||
* Makefile.am: Don't build the doc directory because there's no
|
||||
Makefile.am there.
|
||||
|
||||
* autogen.sh: Call aclocal with the $ACLOCAL_FLAGS env var.
|
||||
|
||||
2001-07-15 Miguel de Icaza <[email protected]>
|
||||
|
||||
* doc/class-library (A): Updated FAQ with question on error 1595.
|
||||
|
||||
2001-07-14 Miguel de Icaza <[email protected]>
|
||||
|
||||
* doc/index:
|
||||
|
||||
Wed Jul 11 00:36:36 CEST 2001 Paolo Molaro <[email protected]>
|
||||
|
||||
* status/*: scripts and data to create statistics about the
|
||||
class library status.
|
||||
|
||||
2001-07-09 Alex Graveley <[email protected]>
|
||||
|
||||
* doc/makefile (clean): Add clean target.
|
||||
* doc/web/makefile (clean): Ditto.
|
||||
|
||||
2001-07-09 Alex Graveley <[email protected]>
|
||||
|
||||
* doc/makefile (all-docs): Fix typo.
|
||||
|
||||
2001-05-30 Miguel de Icaza <[email protected]>
|
||||
|
||||
* NEWS:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SUBDIRS = mono doc
|
||||
@@ -0,0 +1,13 @@
|
||||
2001-07-12 Miguel de Icaza <[email protected]>
|
||||
|
||||
New XSLT file from Sergey Chaban for CIL opcodes
|
||||
|
||||
Paolo got the beginning of an interpreter in.
|
||||
|
||||
Further work on the dissasembler.
|
||||
|
||||
Fix various parts of the metadata library
|
||||
|
||||
2001-05-30 Miguel de Icaza <[email protected]>
|
||||
|
||||
Project started
|
||||
@@ -0,0 +1,8 @@
|
||||
This is MonoNet.
|
||||
|
||||
Ximian's portable implementation of .NET
|
||||
|
||||
|
||||
----------
|
||||
|
||||
To edit the go-mono website, see doc/README.
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
libtoolize --automake
|
||||
automake -a
|
||||
autoheader
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
autoconf
|
||||
./configure $*
|
||||
@@ -0,0 +1,37 @@
|
||||
AC_INIT(README)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono, 0.3)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Set STDC_HEADERS
|
||||
AC_HEADER_STDC
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl ***************************
|
||||
dnl *** Checks for glib 1.2 ***
|
||||
dnl ***************************
|
||||
AM_PATH_GLIB(1.2.0,,
|
||||
AC_MSG_ERROR([Cannot find GLIB: Is glib-config in path?]))
|
||||
|
||||
GLIB_CFLAGS=`glib-config --cflags glib`
|
||||
GLIB_LIBS=`glib-config --libs glib`
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
|
||||
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
mono/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/doc/Makefile
|
||||
])
|
||||
@@ -0,0 +1,3 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
all-docs
|
||||
@@ -0,0 +1,16 @@
|
||||
WEB_FILES=
|
||||
c-sharp class-library contact contributing documentation download \
|
||||
faq gcc-frontend ideas index makefile passport rationale resources \
|
||||
roadmap runtime status team testing thanks tools
|
||||
|
||||
OTHERS= pending resources-pending todo
|
||||
|
||||
EXTRA_DIST = $(WEB_FILES) README $(OTHERS)
|
||||
|
||||
all-docs: $(WEB_FILES)
|
||||
cat rationale roadmap c-sharp tools class-library \
|
||||
runtime documentation download faq contributing \
|
||||
resources status > all-docs
|
||||
|
||||
webit:
|
||||
(cd web; make && make push)
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
To edit the website appearance:
|
||||
|
||||
cd doc/web
|
||||
edit template.html.in
|
||||
make
|
||||
|
||||
To edit website content:
|
||||
|
||||
cd doc (this directory)
|
||||
edit files carefully
|
||||
cd web
|
||||
make
|
||||
|
||||
To publish changes:
|
||||
|
||||
cd web
|
||||
make push
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
* MCS: The Ximian C# compiler
|
||||
|
||||
MCS began as an experiment to learn the features of C# by
|
||||
writing a large C# program. MCS is currently able to parse C#
|
||||
programs and create an internal tree representation of the
|
||||
program. MCS can parse itself.
|
||||
|
||||
Work is progressing quickly on various fronts in the C#
|
||||
compiler. Recently I started using the System.Reflection API
|
||||
to load system type definitions and avoid self-population of
|
||||
types in the compiler and dropped my internal Type
|
||||
representation in favor of using the CLI's System.Type.
|
||||
|
||||
** Phases of the compiler
|
||||
|
||||
The compiler has a number of phases:
|
||||
|
||||
<ul>
|
||||
* Lexical analyzer: hand-coded lexical analyzer that
|
||||
provides tokens to the parser.
|
||||
|
||||
* The Parser: the parser is implemented using Jay (A
|
||||
Berkeley Yacc port to Java, that I ported to C#).
|
||||
The parser does minimal work and syntax checking,
|
||||
and only constructs a parsed tree.
|
||||
|
||||
Each language element gets its own class. The code
|
||||
convention is to use an uppercase name for the
|
||||
language element. So a C# class and its associated
|
||||
information is kept in a "Class" class, a "struct"
|
||||
in a "Struct" class and so on. Statements derive
|
||||
from the "Statement" class, and Expressions from the
|
||||
Expr class.
|
||||
|
||||
* Parent class resolution: before the actual code
|
||||
generation, we need to resolve the parents and
|
||||
interfaces for interface, classe and struct
|
||||
definitions.
|
||||
|
||||
* Semantic analysis: since C# can not resolve in a
|
||||
top-down pass what identifiers actually mean, we
|
||||
have to postpone this decision until the above steps
|
||||
are finished.
|
||||
|
||||
* Code generation: nothing done so far, but I do not
|
||||
expect this to be hard, as I will just use
|
||||
System.Reflection.Emit to generate the code.
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="tasks">
|
||||
** Current pending tasks
|
||||
|
||||
Simple tasks:
|
||||
|
||||
<ul>
|
||||
* Array declarations are currently being ignored,
|
||||
|
||||
* PInvoke declarations are not supported.
|
||||
|
||||
* Pre-processing is not supported.
|
||||
|
||||
* Attribute declarations and passing currently ignored.
|
||||
|
||||
* Compiler does not pass around line/col information from tokenizer for error reporting.
|
||||
|
||||
* Jay does not work correctly with `error'
|
||||
productions, making parser errors hard to point. It
|
||||
would be best to port the Bison-To-Java compiler to
|
||||
become Bison-to-C# compiler ([email protected]
|
||||
might have more information)
|
||||
</ul>
|
||||
|
||||
Critical tasks:
|
||||
|
||||
<ul>
|
||||
* Resolve "base" classes and "base" interfaces for
|
||||
classes, structs and interfaces.
|
||||
|
||||
Once this is done, we can actually do the semantic
|
||||
analysis, because otherwise we do not know who our
|
||||
parents are.
|
||||
</ul>
|
||||
|
||||
Interesting tasks:
|
||||
|
||||
<ul>
|
||||
* Finishing the JB port from Java to C#. If you are
|
||||
interested in working on this, please contact Brian
|
||||
Jepson (bjepson at oreilly d-o-t com).
|
||||
|
||||
More on JB at: <a href="http://www.cs.colorado.edu/~dennis/software/jb.html">
|
||||
http://www.cs.colorado.edu/~dennis/software/jb.html</a>
|
||||
|
||||
JB will allow us to move from the Berkeley Yacc
|
||||
based Jay to a Bison-based compiler (better error
|
||||
reporting and recovery).
|
||||
</ul>
|
||||
|
||||
** Questions and Answers
|
||||
|
||||
Q: Why not write a C# front-end for GCC?
|
||||
|
||||
A: I wanted to learn about C#, and this was an exercise in this
|
||||
task. The resulting compiler is highly object-oriented, which has
|
||||
lead to a very nice, easy to follow and simple implementation of
|
||||
the compiler.
|
||||
|
||||
I found that the design of this compiler is very similar to
|
||||
Guavac's implementation.
|
||||
|
||||
Targeting the CIL/MSIL byte codes would require to re-architecting
|
||||
GCC, as GCC is mostly designed to be used for register machines.
|
||||
|
||||
The GCC Java engine that generates Java byte codes cheats: it does
|
||||
not use the GCC backend; it has a special backend just for Java, so
|
||||
you can not really generate Java bytecodes from the other languages
|
||||
supported by GCC.
|
||||
|
||||
Q: If your C# compiler is written in C#, how do you plan on getting
|
||||
this working on a non-Microsoft environment.
|
||||
|
||||
We will do this through an implementation of the CLI Virtual
|
||||
Execution System for Unix (our JIT engine).
|
||||
|
||||
Q: Do you use Bison?
|
||||
|
||||
A: No, currently I am using Jay which is a port of Berkeley Yacc to
|
||||
Java that I later ported to C#. This means that error recovery is
|
||||
not as nice as I would like to, and for some reason error
|
||||
productions are not being caught.
|
||||
|
||||
In the future I want to port one of the Bison/Java ports to C# for
|
||||
the parser.
|
||||
|
||||
Q: How do I compile it?
|
||||
|
||||
A: Compiling MCS currently requires you to run my port of <a
|
||||
href="http://primates.ximian.com/~miguel/code/jay.cs.tar.gz">Jay to
|
||||
C#</a> on a Unix system to generate the parser, and then you need
|
||||
to use Microsoft's .NET csc.exe compiler to compile the compiler.
|
||||
|
||||
You only need to compile the compiler compiler (C code), the
|
||||
samples are Java samples that I did not port, and you do not need
|
||||
them.
|
||||
|
||||
It might be simple to port Jay.cs to Windows, but I have not tried
|
||||
this.
|
||||
|
||||
You might also want to look at the <a href="faq.html#gcc">GCC</a>
|
||||
section on the main FAQ
|
||||
@@ -0,0 +1,174 @@
|
||||
* The Class Library
|
||||
|
||||
The Class Library should be compatible with Microsoft's .NET
|
||||
implementation.
|
||||
|
||||
Please see the <a href="class-status.html">Class Status</a>
|
||||
page for a status of who is working on which classes.
|
||||
|
||||
We will write as much code as possible in C#. We may need to
|
||||
interface with code written in C to gain access to the
|
||||
functionality of libraries like libart, Gtk+, and libc.
|
||||
|
||||
** Contributing
|
||||
|
||||
We welcome contributions to the the Class Library. To get
|
||||
started, check the status page for information about which
|
||||
APIs are being worked on, and how to get in touch with
|
||||
individual maintainers.
|
||||
|
||||
If you want to work on a class, first check the <a
|
||||
href="download.html">Classes Distribution</a> to see if it is
|
||||
not implemented yet, if not, check the <a
|
||||
href="class-status.html">Class Status</a> to see if someone is
|
||||
already working on it, and maybe contact them.
|
||||
|
||||
If nobody is working on it, mail <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
with the class you want to implement and CC <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
** Layout
|
||||
|
||||
The Class Library resides in the `mcs' module in the directoy
|
||||
`class'.
|
||||
|
||||
Each directory in the directory represents the assembly where
|
||||
the code belongs to, and inside each directory we divide the
|
||||
code based on the namespace they implement.
|
||||
|
||||
There are two cases when we should consider portability: when
|
||||
we are dealing with a couple of classes only that differ from
|
||||
system to system (Consider System.Net and System.IO for Win32
|
||||
and Unix). In those cases we will just place the files for
|
||||
example on <t>corlib/System/System.IO/Unix-Console.cs</t> and
|
||||
<t>corlib/System/System.IO/Win32-Console.cs</t>.
|
||||
|
||||
For classes that might differ more (for example, the
|
||||
implementation of Windows.Forms), we might have different
|
||||
directories altogether: <t>System.Windows.Forms/Win32</t>,
|
||||
<t>System.Windows.Forms/Gtk+</t> and
|
||||
<t>System.Windows.Forms/Cocoa</t>.
|
||||
|
||||
** Using existing components from GNOME.
|
||||
|
||||
Our current plan is to implement the GUI tools on top of
|
||||
Gtk+. The only obstacle here is that applications from Windows
|
||||
might expect to be able to pull the HWND property from the
|
||||
widgets and use PInvoke to call Windows functions.
|
||||
|
||||
** Class Library and Win32 dependencies.
|
||||
|
||||
There are a few spots where the Win32 foundation is exposed to
|
||||
the class library (for example, the HDC and HWND properties in
|
||||
the GDI+). Casual inspection suggests that these can be
|
||||
safely mapped to Gdk's GC and GdkWindow pointers without
|
||||
breaking anything.
|
||||
|
||||
The only drawback is that support for PInvoke of Win32 code
|
||||
won't be available. An alternate solution would be to use
|
||||
portions of Wine, or even to use Wine as our toolkit.
|
||||
|
||||
*** Initial GDI+ and WinForms implementation
|
||||
|
||||
The initial implementation will use Gtk+ as the underlying
|
||||
toolkit. Since GTK+ has already been ported to many windowing
|
||||
systems other than X (including frame buffer, Win32, and BeOS)
|
||||
its use should cover most applications for most users.
|
||||
|
||||
*** Database access
|
||||
|
||||
We will implement ADO.NET functionality by reusing <a
|
||||
href="http://www.gnome-db.org">GNOME-DB</a>. This is an ideal
|
||||
choice, since GNOME-DB was implemented precisely to provide an
|
||||
ADO-like system for GNOME.
|
||||
|
||||
*** Component Integration
|
||||
|
||||
We will provide a new namespace to use GNOME specific features
|
||||
as well as a namespace to host Bonobo interfaces and classes
|
||||
in Mono.
|
||||
|
||||
** Licensing
|
||||
|
||||
The class library will be licensed under the terms of the GNU
|
||||
LGPL. Some people have pointed out that the plain LGPL is
|
||||
troublesome for embedded use of the Mono class libraries. So
|
||||
we are considering to use the GPL with a special exception
|
||||
(like the <a
|
||||
href="http://www.gnu.org/software/classpath/classpath.html">GNU
|
||||
Classpath</a> project did.
|
||||
|
||||
The exception to the GPL would be:
|
||||
|
||||
<i>The library is distributed under the terms of the GNU General
|
||||
Public License with the following exception:
|
||||
|
||||
If you link this library against your own program, then you do not
|
||||
need to release the source code for that program. However, any
|
||||
changes that you make to the library itself, or to any native
|
||||
methods upon which the library relies, must be re-distributed in
|
||||
accordance with the terms of the GPL.</i>
|
||||
|
||||
If you are going to contribute, please keep in mind that we
|
||||
might require you to agree that Ximian might adjust the
|
||||
license to enable the use of the class libraries on embedded
|
||||
systems or to develop proprietary applications using Mono.
|
||||
|
||||
We suggest that you assign the copyright of your work to the
|
||||
GNOME Foundation or the Free Software Foundation to simplify
|
||||
defending the code in case it is used inappropiately.
|
||||
|
||||
** Class Library testing
|
||||
|
||||
We need to write regression tests that will verify
|
||||
the correctness of the class library, compiler, and JIT
|
||||
engine.
|
||||
|
||||
** Coding conventions
|
||||
|
||||
Please follow the conventions on the ECMA specification (On
|
||||
the Annex Partition) for your coding your libraries.
|
||||
|
||||
Use 8 space tabs for writing your code (hopefully we can keep
|
||||
this consistent). If you are modifying someone else's code, try
|
||||
to keep the coding style similar.
|
||||
|
||||
For a rationale on 8 space tabs, read Linus Torvald's Coding
|
||||
Style guidelines in the Linux kernel source for a rationale.
|
||||
|
||||
*** Missing implementation bits
|
||||
|
||||
If you implement a class and you are missing implementation bits,
|
||||
please put in the code the word "TODO" and a description of what
|
||||
is missing to be implemented.
|
||||
|
||||
*** Tagging buggy code
|
||||
|
||||
If there is a bug in your implementation tag the problem by using
|
||||
the word "FIXME" in the code, together with a description of the
|
||||
problem.
|
||||
|
||||
Do not use XXX or obscure descriptions, because otherwise people
|
||||
will not be able to understand what you mean.
|
||||
|
||||
*** Tagging Lame specs
|
||||
|
||||
Sometimes the specification will be lame (consider Version.ToString (fieldCount)
|
||||
where there is no way of knowing how many fields are available, making the API
|
||||
not only stupid, but leading to unreliable code).
|
||||
|
||||
In those cases, use the keyword "LAMESPEC".
|
||||
|
||||
** FAQ
|
||||
|
||||
Frequently asked questions about the class library:
|
||||
|
||||
Q: I am writing a new class that overrides one of the system classes,
|
||||
and I am getting a 1595 warning from the compiler. Should we use a
|
||||
different namespace?
|
||||
|
||||
A: There is a quick solution to the problem, you can pass the command
|
||||
line argument /nowarn:1595 and this will effectively let you use
|
||||
your implementation of the code, while overriding the ones from the
|
||||
system assemblies.
|
||||
@@ -0,0 +1,27 @@
|
||||
* Status of the various pieces of the class library
|
||||
|
||||
You can browse the status of the class library and see who has
|
||||
registered to work on what parts of the system. These list
|
||||
work-in-progress components currently.
|
||||
|
||||
<ul>
|
||||
* Per <a href="class-status/per-assembly.html">Assembly</a>
|
||||
|
||||
* Per <a href="class-status/per-completion.html">Completion</a>
|
||||
|
||||
* Per <a href="class-status/per-maintainer.html">Maintainer</a>
|
||||
|
||||
* Per <a href="class-status/per-unimplemented.html">Unimplemented</a>
|
||||
</ul>
|
||||
|
||||
A better mechanism will soon be in place, I just did this
|
||||
really quickly, as we already got one duplicated implementation.
|
||||
|
||||
You can also download the XML <a
|
||||
href="class-status/maintainers.xml">maintainers</a> file that
|
||||
contains the actual maintainers list.
|
||||
|
||||
I am sure we can generate better reports, if you are
|
||||
interested in contributing, let <a
|
||||
href="mailto:[email protected]">me</a> know.
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
* Contacting the Mono team.
|
||||
|
||||
You can contact the Mono Team by sending e-mail to `<a
|
||||
href="mailto:[email protected]">mailto:[email protected]</a>'.
|
||||
|
||||
You can contact the general forum of discussion by sending
|
||||
e-mail to <a href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
You can contact me (Miguel de Icaza) by sending e-mail to <a
|
||||
href="mailto:[email protected]">[email protected]</a>. My web
|
||||
page is <a
|
||||
href="http://primates.ximian.com/~miguel">http://primates.ximian.com/~miguel"</a>
|
||||
|
||||
You can also <a
|
||||
href="http://www.ximian.com/about/contact.php3">reach Ximian.</a>
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
* Contributing to the Mono project
|
||||
|
||||
There are many ways in which you can help in the Mono project:
|
||||
|
||||
<ul>
|
||||
* <b>Programmers:</b> You can work on a free
|
||||
implementation of the <a
|
||||
href="class-library.html">class libraries</a>, the
|
||||
<a href="runtime.html">runtime engine</a>, <a
|
||||
href="tools.html">the tools</a>, the <a
|
||||
href="testing.html">testing framework</a>
|
||||
|
||||
* <b>Writers:</b> You can help us with writing <a
|
||||
href="documentation.html">documentation</a>.
|
||||
</ul>
|
||||
|
||||
Those are just broad things that need to be worked on, but
|
||||
something that would help tremendously would be to help with
|
||||
small duties in the project that need to be addressed.
|
||||
|
||||
** Small tasks
|
||||
|
||||
A few smaller tasks are here, dropped in no particular order:
|
||||
<ul>
|
||||
* <b>MCS compilation process:</b> Currently MCS does
|
||||
not build with a single `make' command. This should
|
||||
be fixed (this being part of the `Joel Test' that
|
||||
software has to pass).
|
||||
|
||||
* <b>Mono/doc and web site:</b> They need to be
|
||||
packaged up in the official `distribution'
|
||||
|
||||
* <b>Enthusiasts: </b>
|
||||
</ul>
|
||||
|
||||
* Special note
|
||||
|
||||
If you have looked at Microsoft's implementation of .NET or
|
||||
their shared source code, you may not be able to contribute
|
||||
to Mono. Details will follow when we know more about this.
|
||||
|
||||
In general be careful when you are implementing free software
|
||||
and you have access to proprietary code. We need to make sure
|
||||
that we are not using someone else's copyrighted code
|
||||
accidentally.
|
||||
|
||||
Please do not use the <b>ildasm</b> program to disassemble
|
||||
proprietary code when you are planning to reimplement a class
|
||||
for Mono. If you have done this, we might not be able to use
|
||||
your code.
|
||||
|
||||
Please stick to published documentation for implementing any
|
||||
classes.
|
||||
@@ -0,0 +1,50 @@
|
||||
* Documentation
|
||||
|
||||
Although most of the concepts from Microsoft.NET can
|
||||
be applied to the completed Mono platform, we do need to
|
||||
have a complete set of free documentation written specifically
|
||||
for Mono.
|
||||
|
||||
The documentation license we have chosen is the GNU Free
|
||||
Documentation License (FDL), the standard for most documents
|
||||
in the free software world.
|
||||
|
||||
We need documentation on a number of topics:
|
||||
|
||||
<ul>
|
||||
|
||||
* The development tools (compilers, assembler tools,
|
||||
language reference, design time features).
|
||||
|
||||
* Frequently Asked Question compilations.
|
||||
|
||||
* HOWTO documents.
|
||||
|
||||
* The Class Libraries
|
||||
|
||||
* Tutorials on Mono and the specifics of running it.
|
||||
|
||||
* A guide to Mono as compared to the Microsoft.NET
|
||||
Framework SDK
|
||||
|
||||
</ul>
|
||||
|
||||
** Class Library documentation
|
||||
|
||||
When contributing to the Class Library effort, please use the
|
||||
inline XML documentation tags to document your classes so we
|
||||
can automatically generate the documentation from the class
|
||||
libraries.
|
||||
|
||||
If you provide examples, please do not embed them into the
|
||||
source code, as that will make the source code harder to read
|
||||
and maintain. Instead, put examples for your code into a
|
||||
subdirectory of the class libraries. Make your sample
|
||||
code a full standalone application that people can compile.
|
||||
Ideally the Mono documentation browser will let you edit, modify
|
||||
and run the sample programs.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
* Software Availability
|
||||
|
||||
The Virtual Execution System is available in package `mono'.
|
||||
Currently this contains a metadata library and the
|
||||
disassembler. Please reffer to our <a
|
||||
href="runtime.html">Runtime</a> description for more details
|
||||
on this part of the project.
|
||||
|
||||
The code for the C# compiler as well as the language error
|
||||
test suite and the class library are in the `mcs' package, we
|
||||
will move this later into `mono' itself.
|
||||
|
||||
The mcs compiler requires the `jay' parser generator, this is
|
||||
available in module `jay'.
|
||||
|
||||
** Sources
|
||||
|
||||
Currently we will be providing CVS snapshots every day, until
|
||||
we make the first tarball release.
|
||||
|
||||
<ul>
|
||||
<a name="july-14">
|
||||
<b>July 14th, 2001</b>
|
||||
<ul>
|
||||
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources to Jay.
|
||||
* <a href="archive/mcs-12-Jul-2001.tar.gz">mcs-12-Jul-2001.tar.gz</a>: CVS snapshot.
|
||||
* <a href="archive/mono-0.3.tar.gz">mono-0.3.tar.gz</a>: Packaged Source Code.
|
||||
</ul>
|
||||
|
||||
<a name="july-8">
|
||||
<b>July 8th, 2001</b>
|
||||
|
||||
<ul>
|
||||
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources.
|
||||
* <a href="archive/mcs-08-Jul-2001.tar.gz">mcs-08-Jul-2001.tar.gz</a>: CVS Snapshot
|
||||
* <a href="archive/mono-08-Jul-2001.tar.gz">mono-08-Jul-2001.tar.gz</a>: CVS Snapshot
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
** CVS
|
||||
|
||||
We are trying to figure out where to put our CVS repository.
|
||||
We are debating between the GNOME CVS or SourceForge. Watch
|
||||
this spot.
|
||||
@@ -0,0 +1,609 @@
|
||||
** Basics
|
||||
|
||||
Q: Is Mono the same as Microsoft's .NET initiative?
|
||||
|
||||
A: It is not.
|
||||
|
||||
.NET is a company-wide initiative at Microsoft that
|
||||
encompasses many different areas. The .NET development framework,
|
||||
Passport, Biztalk, new server products, and anything that is
|
||||
remotely connected to .NET gets the ".NET-stamping" treatment.
|
||||
Some components of Microsoft's .NET initiative have been announced
|
||||
and some others are in the works.
|
||||
|
||||
Mono is a project to implement several technologies developed by
|
||||
Microsoft that have now been submitted to the ECMA Standards Body.
|
||||
|
||||
Q: What technologies are included in Mono?
|
||||
|
||||
A: Mono contains a number of components useful for building new
|
||||
software:
|
||||
|
||||
<ul>
|
||||
* A Common Language Infrastructure (CLI) virtual
|
||||
machine that contains a class loader, Just-in-time
|
||||
compiler, and a garbage collecting runtime.
|
||||
|
||||
* A class library that can work with any language
|
||||
which works on the CLR.
|
||||
|
||||
* A compiler for the C# language. In the future we
|
||||
might work on other compilers that target the Common
|
||||
Language Runtime.
|
||||
|
||||
Windows has compilers that target the
|
||||
virtual machine from
|
||||
<a href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
|
||||
number of languages:</a> Managed C++, Java Script,
|
||||
Eiffel, Component Pascal, APL, Cobol, Oberon, Perl,
|
||||
Python, Scheme, Smalltalk, Standard ML, Haskell,
|
||||
Mercury and Oberon.
|
||||
</ul>
|
||||
|
||||
The CLR and the Common Type System (CTS) enables applications and
|
||||
libraries to be written in a number of languages. Classes and
|
||||
methods created in one language can be used from a different
|
||||
language.
|
||||
|
||||
This means for example that if you define a class to do algebraic
|
||||
manipulation in C#, that class can be reused from any other
|
||||
language that supports the CLI. You could create a class in C#,
|
||||
subclass it in C++ and instantiate it in an Eiffel program.
|
||||
|
||||
A single object system, threading system, class libraries, and
|
||||
garbage collection system can be shared across all these languages.
|
||||
|
||||
Q: Where can I find the specification for these technologies?
|
||||
|
||||
A: You can find the work-in-progress documentation from the T3G ECMA
|
||||
group here:
|
||||
|
||||
<a href="http://www.dotnetexperts.com">http://www.dotnetexperts.com</a>
|
||||
|
||||
Q: Will you implement the .NET Framework SDK class libraries?
|
||||
|
||||
A: Yes, we will be implementing the APIs of the .NET Framework SDK
|
||||
class libraries.
|
||||
|
||||
Q: What does Mono stand for?
|
||||
|
||||
A: Mono is the word for `Monkey' in Spanish. We like monkeys.
|
||||
|
||||
Q: When will you ship it?
|
||||
|
||||
A: We do not know when the code will be shipped. The more
|
||||
contributions we get to the project, the sooner it will ship.
|
||||
|
||||
A rough estimate is that we might be able to run our C# compiler on
|
||||
Linux by the end of the year. That means running the Windows
|
||||
Executable generated by a Microsoft .NET compiler on the Linux
|
||||
platform.
|
||||
|
||||
We expect that doing GUI applications will require more work on the
|
||||
class libraries. That could take another six months.
|
||||
|
||||
Q: How can I contribute?
|
||||
|
||||
A: Check the <a href="contributing.html">contributing</a> section.
|
||||
|
||||
Q: You guys should innovate instead of copying.
|
||||
|
||||
A: In this particular case, we see a clear advantage in the platform
|
||||
and we are interested in using the features of the CLI on open source systems.
|
||||
|
||||
We have decided that we should spend our limited resources towards
|
||||
implementing an existing specification instead of designing and
|
||||
implementing our own.
|
||||
|
||||
Designing and implementing our own would be possible, but it doesn't make
|
||||
sense to do that just because the specification comes from a
|
||||
proprietary vendor.
|
||||
|
||||
** Ximian
|
||||
|
||||
Q: Why is Ximian working on .NET?
|
||||
|
||||
A: We are interested in providing the best tools for programmers to
|
||||
develop applications for Free Operating Systems.
|
||||
|
||||
For more information, read the project <a
|
||||
href="rationale.html">rationale</a> page.
|
||||
|
||||
Q: Will Ximian be able to take on a project of this size?
|
||||
|
||||
A: Ximian will not be able to taken on the whole project on its own.
|
||||
Mono will be a free software/open source community project, that is
|
||||
the only way we can hope to implement something of this size. You
|
||||
can <a href="contributing.html">contribute</a> to this effort.
|
||||
|
||||
Q: What pieces will Ximian be working on?
|
||||
|
||||
A: We will focus on building a development and execution
|
||||
environment.
|
||||
|
||||
The idea is to get Mono to a state of that would allow
|
||||
third parties to actually be able to use it real-world development.
|
||||
|
||||
Q: Why does Ximian even care?
|
||||
|
||||
A: We like the features that the CLI and its related technologies
|
||||
bring to the table. An exciting addition to the developer toolkit.
|
||||
The goal of Mono is to bring this technology to non-Windows
|
||||
platforms (although we hope Mono will also run on Windows, for
|
||||
debugging and comparative purposes).
|
||||
|
||||
|
||||
** Licensing
|
||||
|
||||
Q: Will I be able to write proprietary applications that run with
|
||||
Mono?
|
||||
|
||||
A: Yes. We will make sure that the licensing will allow developers to
|
||||
create proprietary applications.
|
||||
|
||||
Q: What license is Mono on?
|
||||
|
||||
A: The C# Compiler is released under the terms of the GPL. The class
|
||||
libraries will be under the LGPL or the GPL with a special
|
||||
exception. The runtime libraries are under the LGPL.
|
||||
|
||||
Here is the exception for the class libraries:
|
||||
|
||||
The library is distributed under the terms of the GNU General
|
||||
Public License with the following exception:
|
||||
|
||||
If you link this library against your own program, then you do not
|
||||
need to release the source code for that program. However, any
|
||||
changes that you make to the library itself, or to any native
|
||||
methods upon which the library relies, must be re-distributed in
|
||||
accordance with the terms of the GPL.
|
||||
|
||||
This is similar in spirit to <a
|
||||
href="http://www.gnu.org/software/classpath/classpath.html">GNU
|
||||
Classpath.</a>
|
||||
|
||||
Q: Will you accept code under the XXX License?
|
||||
|
||||
A: If the XXX License is compatible with the license we use in that
|
||||
specific piece of code, then yes. If you want to use the BSD license, make
|
||||
sure you use the BSD license without the advertisement clause (The
|
||||
`Ousterhout License').
|
||||
|
||||
** Mono and .NET
|
||||
|
||||
Q: If applications use Mono, does that mean that I have to pay a service fee?
|
||||
|
||||
A: No. Mono is not related to Microsoft's initiative of
|
||||
software-as-a-service.
|
||||
|
||||
Q: If you implement .NET, will I depend on Microsoft Passport to run my software?
|
||||
|
||||
A: No. The .NET Framework is a runtime infrastructure and collection
|
||||
of class libraries. Passport may be required to access certain web
|
||||
services written for that framework, but only if the programmer
|
||||
chooses Passport as the authentication mechanism.
|
||||
|
||||
Q: Is .NET just a bunch of marketing slogans?
|
||||
|
||||
A: Although the `.NET initiative' is still quite nebulous, The .NET Framework
|
||||
has been available for some time. Mono is not an implementation of the .NET
|
||||
initiative, just the development framework.
|
||||
|
||||
Q: What is a 100% .NET application?
|
||||
|
||||
A: A `100% .NET application' is one that only uses the APIs defined
|
||||
under the System namespace and does not use PInvoke. These
|
||||
applications would in theory run unmodified on Windows, Linux,
|
||||
HP-UX, Solaris, MacOS X and others.
|
||||
|
||||
Q: But Microsoft will release a port of the real thing under the
|
||||
`Shared Source' license, why bother with anything else?
|
||||
|
||||
A: The Shared Source implementation will not be usable for commercial
|
||||
purposes. We are working towards an implementation that will grant
|
||||
a number of rights to recipients: use for any purpose,
|
||||
redistribution, modification, and redistribution of modifications.
|
||||
|
||||
This is what we call <a
|
||||
href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
|
||||
|
||||
** Passport
|
||||
|
||||
Q: Is this a free implementation of Passport?
|
||||
|
||||
A: No. Passport is part of Microsoft's Hailstorm initiative. Mono
|
||||
is just a runtime, a compiler and a set of class libraries.
|
||||
|
||||
Q: Will the System.Web.Security.PassportIdentity class, mean
|
||||
that my software will depend on Passport?
|
||||
|
||||
A: No. That just means that applications might use that API to
|
||||
contact a Passport site.
|
||||
|
||||
As long as your application does not use Passport, you will not
|
||||
need Passport.
|
||||
|
||||
It might even be possible to implement that class with
|
||||
a set of dummy functions, or use an alternate Passport implementation.
|
||||
|
||||
We do not know at this time whether the Passport protocol is
|
||||
documented and whether we will be able to talk to
|
||||
passport.com
|
||||
|
||||
Q: What is your opinion?
|
||||
|
||||
A: You can read my personal <a href="passport.html">opinion on
|
||||
passport</a>.
|
||||
|
||||
** Mono and Windows
|
||||
|
||||
Q: Will Mono allow me to run Microsoft Office on Linux?
|
||||
|
||||
A: No, it will not. Microsoft Office is a Windows application. To
|
||||
run Windows applications on Intel Unix systems refer to <a
|
||||
href="http://www.winehq.com">the Wine Project</a>
|
||||
|
||||
** GNOME
|
||||
|
||||
Q: How is this related to GNOME?
|
||||
|
||||
A: In a number of ways:
|
||||
|
||||
* Mono will use existing
|
||||
components that have been developed for GNOME when it makes
|
||||
sense. For example on X systems, we will use Gtk+ and
|
||||
Libart to implement Winforms and the Drawing2D API.
|
||||
|
||||
For database access, we will use LibGDA (not really
|
||||
depending on GNOME, but related to).
|
||||
|
||||
* This project was born out of the need of providing improved
|
||||
tools for the GNOME community.
|
||||
|
||||
* We would like to add support to our CLR implementation to
|
||||
deal with GObjects (in GNOME 1.x, they are called
|
||||
GtkObjects), and allow Mono developers to provide GObjects
|
||||
or use and extend existing GObjects.
|
||||
|
||||
Q: Has the GNOME Foundation or the GNOME team adopted Mono?
|
||||
|
||||
A: Mono is too new to be adopted by those groups. We hope that the
|
||||
tools that we will provide will be adopted by free software
|
||||
programmers including the GNOME Foundation members and the GNOME
|
||||
project generally.
|
||||
|
||||
Q: Should GNOME programmers switch over to Mono?
|
||||
|
||||
A: Mono will not be ready even within the next six months, and a
|
||||
complete implementation is probably one year away.
|
||||
|
||||
We encourage GNOME developers to continue using the existing tools,
|
||||
libraries and components. Improvements made to GNOME will have an
|
||||
impact on Mono, as they will provide the "backend" for various
|
||||
classes.
|
||||
|
||||
Q: Will Mono include compatibility with Bonobo components?
|
||||
|
||||
A: Yes, we will provide a set of classes for implementing and using
|
||||
Bonobo components from within Mono.
|
||||
|
||||
** Mono and the Web
|
||||
|
||||
Q: Is Mono a way of running Java applets?
|
||||
|
||||
A: No.
|
||||
|
||||
** Web Services
|
||||
|
||||
Q: Is Mono just a new way of writing Web Services?
|
||||
|
||||
A: No.
|
||||
|
||||
Q: If this implements the SDK classes, will I be able to write and
|
||||
execute .NET Web Services with this?
|
||||
|
||||
A: Yes, you will.
|
||||
|
||||
When the project is finished, you will be able to use the same
|
||||
technologies that are available through the .NET Framework SDK on
|
||||
Windows to write Web Services.
|
||||
|
||||
Q: What about Soup?
|
||||
|
||||
A: Soup is a library for GNOME applications to create SOAP server and
|
||||
SOAP clients. You can browse the source code for soup using <a
|
||||
href="http://cvs.gnome.org/bonsai">GNOME's Bonsai</a>
|
||||
|
||||
Q: Can I use CORBA?
|
||||
|
||||
A: Yes. The CLI contains enough information about a class that
|
||||
exposing it to other RPC systems (like CORBA) is really simple, and
|
||||
does not even require support from an object.
|
||||
|
||||
We will be implementing CORBA interoperation as an extension to the
|
||||
Mono classes so that we can integrate with Bonobo, just like
|
||||
Microsoft provides COM interoperation classes and support
|
||||
mechanisms.
|
||||
|
||||
Q: Can I serialize my objects to other things other than XML?
|
||||
|
||||
A: Yes, although the serializing tools have not yet been planned, and
|
||||
you would probably have to implement them yourself.
|
||||
|
||||
** Development Tools
|
||||
|
||||
Q: Will it be possible to use the CLI features without using bytecodes
|
||||
or the JIT?
|
||||
|
||||
A: Yes. The CLI engine will be made available as a shared library.
|
||||
The garbage collection engine, the threading abstraction, the
|
||||
object system, the dynamic type code system and the JIT will be
|
||||
available for C developers to integreate with their applications if
|
||||
they wish to do so.
|
||||
|
||||
Q: Will you have new development tools?
|
||||
|
||||
A: Hopefully Free Software enthusiasts will contribute tools to
|
||||
improve the developer environment. These tools could be developed
|
||||
initially using Microsoft implementation of the CLI and then
|
||||
executed later with Mono.
|
||||
|
||||
** Mono and Java
|
||||
|
||||
Q: What about using Java? After all there are many languages that
|
||||
target the Java VM.
|
||||
|
||||
A: You can get very good tools for doing Java development on free
|
||||
systems right now. <a href="http://www.redhat.com">Red Hat</a> has
|
||||
contributed a <a href="http://gcc.gnu.org">GCC</a> <a
|
||||
href="http://gcc.gnu.org/java">frontend for Java</a> that can take
|
||||
Java sources or Java byte codes and generate native executables; <a
|
||||
href="http://www.transvirtual.com">Transvirtual</a> has implemented
|
||||
<a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
|
||||
Intel also has a Java VM called <a
|
||||
href="http://www.intel.com/research/mrl/orp">ORP</a>.
|
||||
|
||||
The JVM is not designed to be a general purpose virtual machine.
|
||||
The Common Intermediate Language (CIL), on the other hand, is
|
||||
designed to be a target for a
|
||||
wide variety of programming languages, and has a set of rules
|
||||
designed to be optimal for JITers.
|
||||
|
||||
|
||||
Q: What kind of rules make the Common Intermediate Language useful for
|
||||
JITers?
|
||||
|
||||
A: The main rule is that the stack in the CLI is not a general purpose
|
||||
stack. You are not allowed to use it for other purposes than
|
||||
computing values and passing arguments to functions or return
|
||||
values.
|
||||
|
||||
At any given call or return instruction, the types on the stack
|
||||
have to be the same independently of the flow of execution of your
|
||||
code.
|
||||
|
||||
Q: I heard that the CIL is ideal for JITing and not efficient for
|
||||
interpreters, is this the case?
|
||||
|
||||
A: The CIL is better suited to be JITed than JVM byte codes, but you
|
||||
can interpret them as trivially as you can interpret JVM byte
|
||||
codes.
|
||||
|
||||
** Extending Mono
|
||||
|
||||
Q: Would you allow other classes other than those in the
|
||||
specification?
|
||||
|
||||
A: Yes. The Microsoft class collection is very big, but it is by no
|
||||
means complete. It would be nice to have a port of `Camel' (the
|
||||
Mail API used by Evolution inspired by Java Mail) for Mono
|
||||
applications.
|
||||
|
||||
You might also want to look into implementing CORBA for Mono. Not
|
||||
only because it would be useful, but because it sounds like a fun
|
||||
thing to do, given the fact that the CLI is such a type rich
|
||||
system.
|
||||
|
||||
For more information on extending Mono, see our <a
|
||||
href="ideas.html">ideas</a> page.
|
||||
|
||||
** Mono and portability
|
||||
|
||||
Q: Will Mono only work on Linux?
|
||||
|
||||
A: Currently, we are doing our work on Linux-based systems and
|
||||
Windows. We do not expect many Linux-isms in the code, so it
|
||||
should be easy to port Mono to other UNIX variants.
|
||||
|
||||
Q: What about Mono on non X-based systems?
|
||||
|
||||
A: Our main intention at Ximian is to be able to develop GNOME
|
||||
applications with Mono, but if you are interested in providing a
|
||||
port of the Winform classes to other platforms (frame buffer or
|
||||
MacOS X for example), we would gladly integrate them, as long
|
||||
they are under a Free Software License.
|
||||
|
||||
** Reusing existing Code
|
||||
|
||||
Q: What projects will you reuse or build upon?
|
||||
|
||||
A: We want to get Mono in the hands of programmers soon. We are
|
||||
interested in reusing existing open source software.
|
||||
|
||||
Q: What about Intel's research JIT framework, ORP?
|
||||
|
||||
A: At this time, we are investigating whether we can use elements of
|
||||
ORP for Mono. ORP is a research JIT engine that has a clear
|
||||
defined API that splits the JIT from the GC system and the actual
|
||||
byte code implementation. It is a research product.
|
||||
|
||||
Q: What about using GNU Lightning?
|
||||
|
||||
A: We are also researching <a
|
||||
href="http://www.gnu.org/software/lightning/lightning.html">GNU
|
||||
Lightning</a>.
|
||||
|
||||
** Ximian and Microsoft
|
||||
|
||||
Q: Didn't Miguel de Icaza say that `Unix Sucks'?
|
||||
|
||||
A: Yes, he did, as a catch phrase in his opening remark on the Ottawa
|
||||
Linux Symposium. His talk focused on various ways to improve Unix.
|
||||
|
||||
There is a paper describing some ways to improve Unix at:
|
||||
|
||||
<a href="http://primates.ximian.com/~miguel/bongo-bong.html">
|
||||
http://primates.ximian.com/~miguel/bongo-bong.html</a>
|
||||
|
||||
Q: Didn't Ximian's Miguel work for Microsoft?
|
||||
|
||||
A: Actually, Nat Friedman (Ximian's co-founder) did work as an
|
||||
intern for Microsoft for one summer but Miguel did not.
|
||||
|
||||
Q: Did Nat and Miguel meet at Microsoft?
|
||||
|
||||
A: They met online on the Linux IRC network; They met in person for
|
||||
the first time in 1997.
|
||||
|
||||
** Mono and Microsoft
|
||||
|
||||
Q: How can you expect Mono to compete with Microsoft, wont this
|
||||
require an effort too large?
|
||||
|
||||
A: You are right. Mono will never become a reality without the help
|
||||
of other contributors. Ximian is a small company that can not
|
||||
finish Mono alone. We will be working with members of the
|
||||
community to deliver the product.
|
||||
|
||||
Q: Is Microsoft and Corel involved in the Mono implementation?
|
||||
|
||||
A: No, they are not.
|
||||
|
||||
Q: Are you writing Mono from the ECMA specs?
|
||||
|
||||
A: yes, we are writing them from the ECMA specs and the published
|
||||
materials in print about .NET
|
||||
|
||||
** Acronyms
|
||||
|
||||
Q: What is the difference between CLR (Common Language Runtime) and
|
||||
CLI (Common Language Infrastructure)?
|
||||
|
||||
A: CLI is the specification of an execution system. The Microsoft
|
||||
implementation of this specification is named CLR.
|
||||
|
||||
Unless we come up with our own acronym, we could just call ours
|
||||
also CLR, just because it would do exactly the same thing the
|
||||
Microsoft implementation does.
|
||||
|
||||
<a name="gcc">
|
||||
** Mono and GCC
|
||||
|
||||
Q: Should someone work on a GCC front-end to C#?
|
||||
|
||||
A: I would love if someone does, and we would love to help anyone that
|
||||
takes on that task, but we do not have the time or expertise to
|
||||
build a C# compiler with the GCC engine. I find it a lot more fun
|
||||
personally to work on C# on a C# compiler, which has an intrinsic
|
||||
beauty.
|
||||
|
||||
Q: Should someone make a GCC backend that will generate CIL images?
|
||||
|
||||
A: I would love to see a backend to GCC that generates CIL images. It
|
||||
would provide a ton of free compilers that would generate CIL
|
||||
code. This is something that people would want to look into
|
||||
anyways for Windows interoperation in the future.
|
||||
|
||||
Q: What about making a front-end to GCC that takes CIL images and
|
||||
generates native code?
|
||||
|
||||
A: I would love to see this, specially since GCC supports this same
|
||||
feature for Java Byte Codes. You could use the metadata library
|
||||
from Mono to read the byte codes (ie, this would be your
|
||||
"front-end") and generate the trees that get passed to the
|
||||
optimizer.
|
||||
|
||||
Ideally our implementation of the CLI will be available as a shared
|
||||
library that could be linked with your application as its runtime
|
||||
support.
|
||||
|
||||
Q: But would this work around the GPL in the GCC compiler and allow
|
||||
people to work on non-free front-ends?
|
||||
|
||||
A: People can already do this by targeting the JVM byte codes (there
|
||||
are about 130 compilers for various languages that target the JVM).
|
||||
|
||||
Q: Why are you writing a JIT engine instead of a front-end to GCC?
|
||||
|
||||
A: The JIT engine and runtime engine will be able to execute CIL
|
||||
executables generated on Windows.
|
||||
|
||||
** Mono and GNU
|
||||
|
||||
Q: Is Mono part of the GNU project?
|
||||
|
||||
A: Mono is a Ximian project, that is also part of the GNU project.
|
||||
|
||||
** Mono and Portability
|
||||
|
||||
Q: Will Mono work on other variants of Unix?
|
||||
|
||||
A: Yes. We do not expect to add any gratuitous incompatibilities.
|
||||
|
||||
Q: Will Mono run on Windows?
|
||||
|
||||
A: Hopefully yes. Currently some parts of Mono only run on Windows
|
||||
(the C# compiler is a .NET executable) and other parts have only
|
||||
been compiled on Linux, but work on Windows with Cygwin.
|
||||
|
||||
Q: Will Mono depend on GNOME?
|
||||
|
||||
A: It will depend only if you are using a particular assembly (for
|
||||
example, for doing GUI applications). If you are just interested
|
||||
in Mono for implementing a `Hello World Enterprise P2P Web
|
||||
Service', you will not need any GNOME component.
|
||||
|
||||
** Performance
|
||||
|
||||
Q: How fast will be Mono?
|
||||
|
||||
A: We can not predict the future, but a conservative estimate is that
|
||||
it would be at least `as fast as other JIT engines'.
|
||||
|
||||
Now, wishfully thinking I hope that we will ship various JITs with
|
||||
Mono just like Microsoft has done. A fast JITer when maximum
|
||||
performance is not needed, but fast load times are important; And
|
||||
an optimizing JITer that would be slower at generating code but
|
||||
produce more optimal output.
|
||||
|
||||
The CIL has some advantages over the Java byte code: it is really
|
||||
an intermediate representation and there are a number of
|
||||
restrictions on how you can emit CIL code that simplify creating
|
||||
better JIT engines.
|
||||
|
||||
For example, on the CIL the stack is not really an abstraction
|
||||
available for the code generator to use at will: it is just a way
|
||||
of creating a postfix representation of the parsed tree. At any
|
||||
given call point or return point, the contents of the stack are
|
||||
expected to contain the same object types independently of how the
|
||||
instructions was reached.
|
||||
|
||||
** Assorted questions
|
||||
|
||||
Q: You say that the CLI allows multiple languages to execute on the
|
||||
same environment. Isn't this the purpose of CORBA?
|
||||
|
||||
A: CORBA can be used for this purpose, but think of CORBA mostly as a
|
||||
inter-process (local machine or remote machine) communication
|
||||
system.
|
||||
|
||||
Think of the CLI to be targeted to interoperation of languages in
|
||||
the same process, and CORBA as being a nifty addition for
|
||||
out-of-process.
|
||||
|
||||
Sure, we have used CORBA for in-proc components, but the lack of an
|
||||
ABI for in-proc components does not translate into a good framework
|
||||
for in-proc systems
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
* The GCC front-end
|
||||
|
||||
The GCC front-end will accept input in a binary file with
|
||||
codes in the Common Intermediate Language (CIL), and generate
|
||||
native code.
|
||||
|
||||
This will allow pre-compilation and full optimization to take
|
||||
place before a program is executed.
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
* Ideas
|
||||
|
||||
Here are a few ideas of tools, classes and projects that you
|
||||
could start. More are forthcoming.
|
||||
|
||||
<a name="classes">
|
||||
** Classes
|
||||
|
||||
<ul>
|
||||
* Implement a JXTA protocol implementation:
|
||||
<a href="http://www.jxta.org">http://www.jxta.org</a>
|
||||
|
||||
* Implement a Mail API, similar to Camel or JavaMail (Camel has
|
||||
significant architecture features that are required on a real
|
||||
mailer).
|
||||
|
||||
You can check the current C
|
||||
<a href="http://cvs.gnome.org/bonsai/rview.cgi?dir=evolution%2Fcamel">
|
||||
Camel implementation</a>.
|
||||
|
||||
* Interfacing to Multimedia systems. You might want
|
||||
to look into the Quicktime API. I know <a
|
||||
href="mailto:[email protected]">Vladimir</a> has
|
||||
researched the problem before
|
||||
</ul>
|
||||
|
||||
<a name="projects">
|
||||
** Projects
|
||||
|
||||
<ul>
|
||||
* Implement an xmlStorageSystem for the CLI:
|
||||
<a href="http://www.soapware.org/xmlStorageSystem">
|
||||
http://www.soapware.org/xmlStorageSystem</a>
|
||||
|
||||
* Build a CORBA interoperability engine for the CLR.
|
||||
You do not need to do all of the work, just talking
|
||||
the protocol will get us a long way (<a
|
||||
href="http://www.omg.org">The OMG site</a> has the CORBA specs).
|
||||
|
||||
</ul>
|
||||
@@ -0,0 +1,39 @@
|
||||
** Jul 14, 2001
|
||||
|
||||
A <a
|
||||
href="http://mail.ximian.com/archives/public/mono-list/2001-July/000399.html">new
|
||||
release</a> of the
|
||||
runtime, compiler and classes has been made. Get it <a href="download.html#july-14">here</a>
|
||||
|
||||
** Jul 12, 2001
|
||||
|
||||
I keep getting questions about my opinion on Passport, even when
|
||||
Mono has <b>nothing</b> to do with it. I finally <a
|
||||
href="passport.html">wrote something.</a>
|
||||
|
||||
** Jul 9, 2001
|
||||
|
||||
Today <a href="http://www.ximian.com">Ximian</a> announced the
|
||||
launch of the Mono
|
||||
project, an effort to create a free software
|
||||
(sometimes called open source) implementation of the .NET
|
||||
Development Framework.
|
||||
|
||||
If you have questions about the
|
||||
project, please read our list of <a
|
||||
href="faq.html">Frequently Asked Questions</a>.
|
||||
|
||||
You might also want to <a href="download.html">Download the
|
||||
source</a> for our work so far.
|
||||
|
||||
You might want to <a
|
||||
href="resources.html#mailing">subscribe</a> to our mono-list
|
||||
and mono-announce-list
|
||||
|
||||
You can contact the team at: <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
** O'Reilly
|
||||
|
||||
Brian posted a story on <a
|
||||
href="http://www.oreillynet.com/dotnet">O'Reilly Network .NET</a>
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
* Microsoft Hailstorm and Passport
|
||||
|
||||
Microsoft Passport is a centralized database hosted by
|
||||
Microsoft that enhances the consumer experience with the Web
|
||||
by providing a single logon system that they can use across a
|
||||
number of participant web sites.
|
||||
|
||||
As you might know by now from our extensive <a
|
||||
href="faq.html">FAQ</a>, the Mono project has nothing to do
|
||||
with Microsoft Hailstorm or <a
|
||||
href="http://www.passport.com">Microsoft Passport.</a>
|
||||
|
||||
Still a lot of people have asked us our opinion on them.
|
||||
|
||||
** Passport
|
||||
|
||||
Passport is important not because of it being breaktrough
|
||||
technologically speaking, but because the company is in a
|
||||
position to drive most people toward being suscribers of it.
|
||||
|
||||
At the time of this writing passport is required to use the
|
||||
free mail service <a href="http://www.hotmail.com">Hotmail</a>
|
||||
to get customized support for the <a
|
||||
href="http://www.msn.com">MSN portal</a>, <a
|
||||
href="http://msdn.microsoft.com">Microsoft Developers
|
||||
Network</a> and according to the original announcement from
|
||||
Microsoft <a href="http://www.americanexpress.com">American
|
||||
Express</a> and <a href="http://www.ebay.com">EBay</a> will be
|
||||
adopting it.
|
||||
|
||||
There is already a <a
|
||||
href="http://www.passport.com/Directory/Default.asp?PPDir=C&lc=1033">Large
|
||||
list</a> of participating sites.
|
||||
|
||||
There are many current users of it and Microsoft will be
|
||||
driving more users towards Passport as it <a
|
||||
href="http://news.cnet.com/news/0-1003-200-6343275.html">integrates
|
||||
it</a> in their upcoming release of Windows.
|
||||
|
||||
Microsoft has also <a
|
||||
href="http://www.passport.com/Business/JoinPassportNetwork.asp?lc=1033">developed
|
||||
a toolkit</a> to enable current web merchants to integrate
|
||||
their services with passport.
|
||||
|
||||
To the end user, there is a clear benefit: they only have to
|
||||
log into a single network and not remember multiple passwords
|
||||
across sites on the internet. Companies that adopt passport
|
||||
will have a competition advantage over those that dont.
|
||||
Microsoft lists a list of <a
|
||||
href="http://www.passport.com/Business/Default.asp?lc=1033">benefits</a>
|
||||
to companies.
|
||||
|
||||
|
||||
** The problems of Passport
|
||||
|
||||
There are a number of concerns that different groups have over
|
||||
Passport. Sometimes I have some, sometimes I do not. But
|
||||
overall, consumers and businesses can have better solutions.
|
||||
|
||||
<ul>
|
||||
* <b>Single Point of Failure:</b> As more services and
|
||||
components depend on remote servers, functionality can
|
||||
grind to a halt if there is a failure on the
|
||||
centralized Passport system.
|
||||
|
||||
Such a failure was predicted, and we recently <a
|
||||
href="http://news.cnet.com/news/0-1005-200-6473003.html">witnessed</a>
|
||||
got a lot of people worried.
|
||||
|
||||
The outgage lasted for seven days. Think what this
|
||||
could do to your business.
|
||||
|
||||
* <b>Trust:</b> Not everyone trusts Microsoft to keep
|
||||
their information confidential. Concerns are not only
|
||||
at the corporate level policy, but also the fact that
|
||||
the source code for Microsoft products is not
|
||||
available, means that trojans or worms could be built
|
||||
into the products by malicious engineers. This is not
|
||||
unheard of, as the <a
|
||||
href="http://slashdot.org/articles/00/04/14/0619206.shtml">Microsoft
|
||||
Internet Server</a> had a trojan horse built into that
|
||||
allowed anyone that knew about this to control any
|
||||
server running IIS.
|
||||
|
||||
* <b>Security:</b> With a centralized system like
|
||||
Passport, imagine the repercussions of a malicious
|
||||
hacker gaining access to the Passport database.
|
||||
Personal information and credit card information about
|
||||
almost everyone using a computer could be stored there.
|
||||
|
||||
Hackers have already <a
|
||||
href="http://slashdot.org/articles/00/10/27/1147248.shtml">broken
|
||||
into Microsoft</a> in the past. And the company was
|
||||
unable to figure out for how long their systems had been hacked.
|
||||
</ul>
|
||||
|
||||
Microsoft might or might not realize this. The idea behind
|
||||
Passport is indeed a good one (I can start to get rid of my
|
||||
file that keeps track of the 30 logins and passwords or so
|
||||
that I use across the various services on the net myself).
|
||||
|
||||
** Alternatives to Microsoft Passport
|
||||
|
||||
An alternative to Microsoft Passport needs to take the above
|
||||
problems into consideration. Any solution of the form `We
|
||||
will just have a competing offering' will not work.
|
||||
|
||||
The system thus has to be:
|
||||
|
||||
<ul>
|
||||
* <b>Distributed:</b> The entire authentication
|
||||
system should not create an internet `blackout' in the
|
||||
case of failure.
|
||||
|
||||
* <b>Allow for multiple registrars:</b> Users should
|
||||
be able to choose a registrar (their banks, local
|
||||
phone company, service provider, Swiss bank, or any
|
||||
other entity they trust.
|
||||
|
||||
* <b>Mandate good security measures:</b> As a
|
||||
principle, only Open Source software should be used
|
||||
for servers in the registrar, and they should conform
|
||||
to a standard set of tools and software that can be
|
||||
examined by third parties.
|
||||
</ul>
|
||||
|
||||
An implementation of this protocol could use the DNS or a
|
||||
DNS-like setup to distribute the information of users with the
|
||||
possibility of replicating and caching public information
|
||||
about the user.
|
||||
|
||||
For instant messaging (another pieces of the Hailstorm bit),
|
||||
you want to use a non-centralized system like Sun's <a
|
||||
href="http://www.jxta.org">JXTA</a>. Some people mailed me to
|
||||
mention Jabber as a messaging platform.
|
||||
|
||||
It could also just use the user e-mail address as the `key' to
|
||||
choose the registrar (msn.com, hotmail.com -> passport.com;
|
||||
aol.com -> aol.passport.com; you get the idea).
|
||||
|
||||
The <a
|
||||
href="http://www.soapware.org/xmlStorageSystem">xmlStorage</a>
|
||||
idea from <a href="http://www.scripting.com">Dave Winer</a>
|
||||
could be used to store the information.
|
||||
|
||||
A toolkit for various popular web servers could be provided,
|
||||
authenticated and should be open sourced (for those of you who
|
||||
think that a binary program would give more security and would
|
||||
prevent people from tampering: you are wrong. You can always
|
||||
use a proxy system that "behaves" like the binary, and passes
|
||||
information back and forth from the real program, and snoops
|
||||
in-transit information).
|
||||
|
||||
Good cryptographers need to be involved in this problem to
|
||||
figure out the details and the possible insecure pieces of a
|
||||
proposal like this.
|
||||
|
||||
** Implementation: In short
|
||||
|
||||
To keep it short: <b>DNS, JXTA, xmlStorage.</b>
|
||||
|
||||
|
||||
** Deploying it
|
||||
|
||||
The implementation of such a system should be a pretty
|
||||
straightforward tasks once security cryptographers have
|
||||
designed such a beast.
|
||||
|
||||
The major problems are:
|
||||
|
||||
<ul>
|
||||
* <b>People might just not care:</b> In a poll to US
|
||||
citizens a couple of decades ago, it was found that
|
||||
most people did not care about the rights they were
|
||||
given by the Bill of Rights, which lead to a number of
|
||||
laws to be passed in the US that eliminated most of
|
||||
the rights people had.
|
||||
|
||||
* <b>The industry will move way too slow:</b>
|
||||
Microsoft's implementation is out in the open now: it
|
||||
is being deployed, and soon it will be insinuated to
|
||||
many, many users. The industry needs to get together
|
||||
soon if they care about this issue.
|
||||
|
||||
By the time the industry reacts, it might be too
|
||||
late.
|
||||
</ul>
|
||||
|
||||
** Passport and Mono
|
||||
|
||||
The .NET class libraries includes a Passport class that
|
||||
applications might use to authenticate with Passport. Since
|
||||
we do not have information at this point on the exact protocol
|
||||
of Passport, it is not even feasible to implement it.
|
||||
|
||||
If at some point the information is disclosed, it could be
|
||||
implemented.
|
||||
|
||||
If a competing system to Passport existed, we could probably
|
||||
hide all the authentication information to use a number of
|
||||
different passport-like systems.
|
||||
|
||||
If a user does not want to use Passport at all, he could
|
||||
always turn it off (or completely remove the class from the
|
||||
library). After all, this is free software.
|
||||
|
||||
Currently, we are too far from the point where this is a real
|
||||
issue.
|
||||
|
||||
** Disclaimer
|
||||
|
||||
This is just a group of personal thoughts of mine that I have
|
||||
placed here because I get asked this question a lot lately.
|
||||
The views of this page are not a statement from my employer
|
||||
(Ximian, Inc).
|
||||
|
||||
This is not part of Mono. We are not trying to deal with this
|
||||
problem.
|
||||
|
||||
Nat Friedman (Ximian's co-founder) has his own ideas on how a
|
||||
competing system to Passport could be designed, but I will let
|
||||
<a href="http://www.nat.org/gym">him</a> post his own story.
|
||||
|
||||
** Other Alternatives
|
||||
|
||||
Some people have pointed out <a
|
||||
href="http://www.xns.org">XNS</a>
|
||||
|
||||
Send comments to me: Miguel de Icaza (<a
|
||||
href="mailto:[email protected]">[email protected]</a>)
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
** Microsoft and GNU and Linux.
|
||||
|
||||
Q: Does this mean that Microsoft is better than Linux?
|
||||
|
||||
A: Many of us are working on <a
|
||||
href="http://www.gnu.org/philosophy/free-sw.html">free software<a>
|
||||
and want to have an <a href="http://www.opensource.org">open
|
||||
source</a> environment that we can change, modify, improve, learn
|
||||
from, and share with others. Some of us also think that this will
|
||||
lead on the long run to better software: more efficient, faster,
|
||||
more robust and more.
|
||||
|
||||
We are willing to take good ideas from any source they come from.
|
||||
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
* The Mono Project
|
||||
|
||||
** Background.
|
||||
|
||||
The GNOME project goal was to bring missing technologies to
|
||||
Unix and make it competitive in the current market place for
|
||||
desktop applications. We also realized early on that language
|
||||
independence was important, and that is why GNOME APIs were
|
||||
coded using a standard that allowed the APIs to be easily
|
||||
wrapped for other languages. Our APIs are available to most
|
||||
programming languages on Unix (Perl, Python, Scheme, C++,
|
||||
Objective-C, Ada).
|
||||
|
||||
Later on we decided to use better methods for encapsulating
|
||||
our APIs, and we started to use CORBA to define interfaces to
|
||||
components. We complemented it with policy and a set of
|
||||
standard GNOME interfaces for easily creating reusable,
|
||||
language independent components, controls and compound
|
||||
documents. This technology is known as <a
|
||||
href="http://www.ximian.com/tech/bonobo.php3">Bonobo</a>.
|
||||
Interfaces to Bonobo exist for C, Perl, Python, and
|
||||
Java.
|
||||
|
||||
CORBA is good when you define coarse interfaces, and most
|
||||
Bonobo interfaces are coarse. The only problem is that
|
||||
Bonobo/CORBA interfaces are not good for small interfaces.
|
||||
For example, an XML parsing Bonobo/CORBA component would be
|
||||
inefficient compared to a C API.
|
||||
|
||||
** Another explanation
|
||||
|
||||
I recently explained our motivations to Dave Winer, and he posted
|
||||
it <a
|
||||
href="http://scriptingnews.userland.com/stories/storyReader$1275">here</a>
|
||||
|
||||
** Microsoft's .NET
|
||||
|
||||
The Microsoft .NET initiative is confusing because it is a
|
||||
company wide effort that ranges from development tools to end
|
||||
user applications. .NET is a branding formative that
|
||||
has been applied to:
|
||||
|
||||
<ul>
|
||||
* The .NET development platform, a new platform for
|
||||
writing software.
|
||||
|
||||
* Web services.
|
||||
|
||||
* Microsoft Server Applications.
|
||||
|
||||
* New tools that use the new development platform.
|
||||
|
||||
* Hailstorm, the Passport centralized single-signon
|
||||
system that is being integrated into Windows XP.
|
||||
|
||||
</ul>
|
||||
|
||||
Mono is an implementation of the .NET development platform.
|
||||
|
||||
** The Common Language Infrastructure platform.
|
||||
|
||||
Microsoft has created a new development platform. The
|
||||
highlights of this new development platform are:
|
||||
|
||||
<ul>
|
||||
* A runtime environment that provides garbage
|
||||
collection, threading and a virtual machine
|
||||
specification (The Virtual Execution System, VES)
|
||||
|
||||
* A comprehensive class library.
|
||||
|
||||
* A new language, C#. Very similar to Java, C#
|
||||
allows programmers to use all the features available
|
||||
on the .NET runtime.
|
||||
|
||||
* A language specification that compilers can
|
||||
follow if they want to generate classes and code
|
||||
that can interoperate with other programming
|
||||
languages (The Common Language Specification: CLS)
|
||||
</ul>
|
||||
|
||||
The Common Language Infrastructure platform is similar to the
|
||||
goals we had in GNOME of giving language independence to
|
||||
programmers. It is more mature, documented, larger in scope,
|
||||
and has a consistent design.
|
||||
|
||||
Any API that is written using a CLS provider language can be
|
||||
used by any language that is a CLS consumer. Compilers
|
||||
generate code in a format called Common Intermediate Language
|
||||
(CIL) which is an intermediate representation of a compiled
|
||||
program and is easy to compile to native code or compiled
|
||||
using Just-in-Time (JIT) engines. The restrictions placed by
|
||||
the runtime on the CIL byte codes ensures that it is possible
|
||||
to do a good job at optimizing the code in a JIT compiler.
|
||||
|
||||
There is not really a lot of innovation in this platform: we
|
||||
have seen all of these concepts before, and we are all
|
||||
familiar with how these things work.
|
||||
|
||||
What makes the Common Language Infrastructure development
|
||||
platform interesting is that it is a good mix of technologies
|
||||
that have been nicely integrated.
|
||||
|
||||
The .NET development platform is essentially a new foundation
|
||||
for program development that gives Microsoft a room to grow
|
||||
for the coming years.
|
||||
|
||||
** ECMA standards.
|
||||
|
||||
Microsoft has submitted the
|
||||
specifications of C#, the runtime, the metadata and the
|
||||
other various bits of the .NET development platform to the
|
||||
<a href="http://www.ecma.ch">ECMA</a> for standarization.
|
||||
|
||||
You can get a copy of the specifications submitted to ECMA
|
||||
from: <a href="http://www.dotnetexperts.com/ecma">http://www.dotnetexperts.com/ecma</a>
|
||||
|
||||
** Mono: an Open Source Common Language Infrastructure implementation.
|
||||
|
||||
Ximian has begun work on Mono, a project that aims to bring
|
||||
the Common Language Infrastructure platform to free systems.
|
||||
|
||||
When the GNU project was launched, they picked the best
|
||||
operating system that was available out there, and they
|
||||
began to clone it: Unix.
|
||||
|
||||
The .NET development platform is a very rich, powerful, and
|
||||
well designed platform that would help improve the free
|
||||
software development platform. Just like the GNU project
|
||||
began to clone Unix sixteen years ago, we will be cloning the
|
||||
.NET development platform because it is a great platform to
|
||||
build on.
|
||||
|
||||
** What makes up Mono?
|
||||
|
||||
There are various pieces that will make up Mono:
|
||||
|
||||
<ul>
|
||||
* A C# compiler.
|
||||
|
||||
* The Virtual Execution System: that will have the
|
||||
Just-in-Time compiler, garbage collector, loader,
|
||||
threading engine.
|
||||
|
||||
A byte code interpreter will be provided for quickly
|
||||
porting Mono to new systems and debugging the JIT
|
||||
purposes, but it is not intended to be the ideal
|
||||
execution environment.
|
||||
|
||||
* An implemenation of the .NET class library.
|
||||
|
||||
* Visual development tools.
|
||||
|
||||
* A CIL GCC frontend.
|
||||
</ul>
|
||||
|
||||
** Why use GNOME components?
|
||||
|
||||
GNOME is an umbrella project that consists of infrastructural
|
||||
components (GUI toolkit, XML libraries, CORBA implementation,
|
||||
printing architecture, imaging system), a desktop environment,
|
||||
and productivity applications.
|
||||
|
||||
The GNOME infrastructural components can be used to quickly
|
||||
implement various pieces of the class libraries without reinventing
|
||||
the wheel, and since all those components are licensed under
|
||||
the terms of the GNU LGPL it is a perfect fit.
|
||||
|
||||
Libart will be used to implement the Drawing.2D API; Gtk+ and
|
||||
the GNOME libraries will be used to implement the WinForms
|
||||
API and of course Glib and libxml will be used in various
|
||||
places.
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
|
||||
* Resources
|
||||
|
||||
There are a number of resources available for those of you who
|
||||
want to contribute to the Mono project. Here are a few links.
|
||||
|
||||
If you want to send suggestions for links, address them to <a
|
||||
mailto="[email protected]">[email protected]</a>.
|
||||
|
||||
** ECMA Documentation.
|
||||
|
||||
You can get the documentation for the ECMA specs from a number of sites:
|
||||
<ul>
|
||||
* <a href="http://msdn.microsoft.com/net/ecma">At MSDN</a>
|
||||
* <a href="http://www.dotnetexperts.com">Dot Net Experts</a>
|
||||
* <a href="http://developer.intel.com/software/idap/ecma">Intel</a>
|
||||
* <a href="http://lightning.csse.monash.edu.au/.net/CLI">Monash University</a>
|
||||
</ul>
|
||||
|
||||
These contain specifications for the assembler, the metadata,
|
||||
byte codes supported by the CLI virtual machine, the C#
|
||||
language and the core class libraries.
|
||||
|
||||
For details on the .NET class libraries, you can
|
||||
visit the Microsoft's Developer Network:
|
||||
|
||||
<ul>
|
||||
* <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp">.NET Framework Class Library</a>
|
||||
</ul>
|
||||
|
||||
You can also get this information if you install the Beta2
|
||||
release of the .NET Framework.
|
||||
|
||||
<a name="mailing">
|
||||
** Mailing Lists
|
||||
|
||||
There are a number of mailing lists for Mono
|
||||
|
||||
<ul>
|
||||
|
||||
* <b><a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-list">mono-list:</a></b>
|
||||
The general Mono discussion list.
|
||||
* <b><a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list:</a></b>
|
||||
Announcements of Mono developments.
|
||||
* <b><a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-docs-list">mono-docs-list:</a></b>
|
||||
Discussion on the documentation of Mono.
|
||||
* <b><a
|
||||
href="http://discuss.develop.com/dotnet.html">Dotnet mailing
|
||||
list at Develop.com:</a></b> The guys at Develop Mentor run
|
||||
this general purpose mailing list.
|
||||
</ul>
|
||||
|
||||
** Discussion Groups.
|
||||
|
||||
<ul>
|
||||
|
||||
* <a href="http://www.oreillynet.com">O'Reilly
|
||||
Network</a> has a <a
|
||||
href="http://www.oreillynet.com/dotnet">section devoted to
|
||||
.NET</a>
|
||||
* <a
|
||||
href="http://msdn.microsoft.com/newsgroups">MSDN</a> also
|
||||
lists various newsgroups related to .NET</ul>
|
||||
</ul>
|
||||
|
||||
** Other .NET related projects
|
||||
|
||||
There are a number of related projects to Mono:
|
||||
|
||||
<ul>
|
||||
* <a
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
* <a
|
||||
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
|
||||
|
||||
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
|
||||
testing framework for .NET classes.
|
||||
|
||||
* <a href="http://www.kaffe.org">Kaffe:</a> A popular
|
||||
Free Software JIT engine for Java.
|
||||
|
||||
* <a href="http://www.intel.com/research/mrl/orp">ORP:</a> A research
|
||||
JIT/VM/GC system from Intel.
|
||||
</ul>
|
||||
|
||||
** GNOME Documentation
|
||||
|
||||
Documnetation on GNOME, and the GNOME APIs is available from
|
||||
the <a href="http://developer.gnome.org">developer</a> site at
|
||||
GNOME:
|
||||
|
||||
<ul>
|
||||
* <a href="http://developer.gnome.org/doc/API/">GNOME
|
||||
API documentation</a>
|
||||
|
||||
* <a href="http://developer.gnome.org/doc/books">GNOME
|
||||
Online books</a>
|
||||
|
||||
* <A
|
||||
href="http://developer.gnome.org/arch/">Architecture Overview</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
** MacOS Documentation
|
||||
|
||||
** Assembly Language Manuals online
|
||||
Intel
|
||||
MIPS
|
||||
SPARC
|
||||
|
||||
** Microsoft
|
||||
msdn.microsoft.com/net
|
||||
Research.microsoft.com
|
||||
|
||||
** Related Technologies
|
||||
|
||||
<ul>
|
||||
|
||||
* The CLI allows people to create Web Services using the SOAP
|
||||
protocol. SOAP is based on XML, XML schemas an the HTTP
|
||||
protocol.
|
||||
<ul>
|
||||
* XML specification.
|
||||
* XML Namespaces.
|
||||
* XML Schemas.
|
||||
* SOAP Specification.
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
** Compiler Information
|
||||
GCC
|
||||
GCC Sample front-end tutorial
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
* Roadmap
|
||||
|
||||
We are working on the following three projects at Ximian:
|
||||
|
||||
The C# Compiler (mcs/mcs)
|
||||
|
||||
A .NET compatible Class Library (mcs/class)
|
||||
|
||||
The JIT/interpreter (mono)
|
||||
|
||||
|
||||
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
The MonoNet runtime
|
||||
|
||||
The MonoNet runtime will implement the JIT engine (and a byte
|
||||
code interpreter for quickly porting to new systems), the
|
||||
class loader, the garbage collector, threading system and
|
||||
metadata access libraries.
|
||||
|
||||
Currently the runtime contains the beginning of an image
|
||||
loader and metadata access entry points. Since Beta2 has been
|
||||
now released, it is possible to resume work using the ECMA
|
||||
specs and testing with Beta2-generated executables.
|
||||
|
||||
The runtime core will be implemented in C, in a library
|
||||
"libMonoVES.so".
|
||||
|
||||
** Executing MSIL/CIL images
|
||||
|
||||
The code will load an executable and map the references to
|
||||
external assemblies to our own version of the assemblies on
|
||||
GNU/Linux.
|
||||
|
||||
Our roadmap looks like this, this has been updated as of
|
||||
<b>Jul 15, 2001</b>:
|
||||
|
||||
<ul>
|
||||
|
||||
* Milestone 1: Fully read and parse all CIL byte-codes
|
||||
and metadata tokens (ie, a disassembler).
|
||||
|
||||
* Milestone 2: Complete an interpreter for CIL byte
|
||||
codes. This interpreter can be used temporarly to
|
||||
run CIL byte code on a system where no JIT is
|
||||
available.
|
||||
|
||||
* Milestone 3: Define an <i>lburg</i> instruction
|
||||
selector for the JITer for Intel. Although slower
|
||||
at JITing than a streaming JITer, it generates
|
||||
better code. The same grammar can later be used for
|
||||
the stream jitter.
|
||||
|
||||
* Milestone 4: Implement JITer.
|
||||
|
||||
* Milestone 5: Port of the JITer to non IA32 systems.
|
||||
</ul>
|
||||
|
||||
A setup similar to the Kaffe JIT engine can be used to
|
||||
layout the code to support non-IA32 architectures. Our work
|
||||
will be focused on getting a IA32 version running first.
|
||||
|
||||
The JIT engine should work on Linux and Win32, although you
|
||||
will need to install the CygWin32 development tools to get a
|
||||
Unix-like compilation environment.
|
||||
|
||||
** JIT Engine (<b>updated, Jul 14th, 2001</b>)
|
||||
|
||||
We will be using a code-generator generator approach for our
|
||||
JITer. Given the properties of CIL byte codes, we can take
|
||||
full advantage of a real instruction selector for our code
|
||||
generator.
|
||||
|
||||
There are a couple of books that deal with this technique: "A
|
||||
Retargetable C Compiler" and "Advanced Compiler Design and
|
||||
Implementation" are good references. You can also get a
|
||||
technical description of <a
|
||||
href="http://research.microsoft.com/copyright/accept.asp?path=http://www.research.microsoft.com/~drh/pubs/iburg.pdf&pub=ACM">lbrug</a>
|
||||
|
||||
Previously we had looked at a number of JIT engines and tools,
|
||||
but they would not take full advantage of the CIL properties:
|
||||
|
||||
<ul>
|
||||
* <a
|
||||
href="http://www.intel.com/research/mrl/orp/">ORP</a>
|
||||
|
||||
* <a
|
||||
href="http://www.gnu.org/software/lightning/">GNU
|
||||
Lightning</a>
|
||||
|
||||
* href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine
|
||||
Toolkit</a>.).
|
||||
|
||||
* VCODE.
|
||||
</ul>
|
||||
|
||||
** Garbage Collection
|
||||
|
||||
We have decided to implement a generational tracing garbage
|
||||
collector, which is very similar to the one being used by
|
||||
.NET. For an introduction to the garbage collection system
|
||||
used by Microsoft's CLR implementation, you can read this book
|
||||
on <a
|
||||
href="http://www.amazon.com/exec/obidos/ASIN/0471941484/o/qid=992556433/sr=2-1/ref=aps_sr_b_1_1/103-5866388-0492603">Garbage
|
||||
Collection.</a>
|
||||
|
||||
Although using a conservative garbage collector like Bohem's
|
||||
would work, all the type information is available at runtime,
|
||||
so we can actually implement a better collector than a
|
||||
conservative collector.
|
||||
|
||||
<ul>
|
||||
* Garbage collection list and FAQ:<br>
|
||||
<a href="http://www.iecc.com/gclist/">http://www.iecc.com/gclist/</a>
|
||||
|
||||
* The Microsoft .NET Garbage Collection Implementation:<br>
|
||||
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp</a>
|
||||
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp</a>
|
||||
</ul>
|
||||
|
||||
** Useful links
|
||||
|
||||
Paolo Molaro found a few interesting links:
|
||||
|
||||
<ul>
|
||||
|
||||
* On compilation of stack-based languages:<br>
|
||||
<a href="http://www.complang.tuwien.ac.at/projects/rafts.html">
|
||||
http://www.complang.tuwien.ac.at/projects/rafts.html</a>
|
||||
|
||||
* A paper on fast JIT compilation of a stack-based language:<br>
|
||||
<a href="http://www.research.microsoft.com/~cwfraser/pldi99codegen.pdf">
|
||||
http://www.research.microsoft.com/~cwfraser/pldi99codegen.pdf</a>
|
||||
|
||||
* Vmgen generates much of the code for efficient virtual machine (VM)
|
||||
interpreters from simple descriptions of the VM instructions:<br>
|
||||
<a href="http://www.complang.tuwien.ac.at/anton/vmgen/">
|
||||
http://www.complang.tuwien.ac.at/anton/vmgen</a>
|
||||
</ul>
|
||||
|
||||
** PInvoke
|
||||
|
||||
PInvoke will be supported, and will be used to wrap Unix API
|
||||
calls, these in turn are required for reusing some of the
|
||||
GNOME libraries that will reduce the work we have to do to
|
||||
deliver a complete class library.
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
* Project Status
|
||||
|
||||
|
||||
Pieces of Mono that have been implemented:
|
||||
|
||||
<ul>
|
||||
* C# compiler: The C# parser can now generate parse
|
||||
trees. Next up: semantic analysis, compiler lever optimizations
|
||||
and code generation.
|
||||
|
||||
* Metadata library: Can currently parse and load
|
||||
information from .NET modules (executables and DLL
|
||||
files). It has a few bugs outstanding (table
|
||||
dimension computation is incorrect).
|
||||
|
||||
Parsing of Exception tables is missing.
|
||||
|
||||
It lacks Token to (Table, Index) mapping, but this
|
||||
should be trivial to write.
|
||||
|
||||
* Disassembler: Can disassemble .NET modules. Still
|
||||
lacking exception handling as well as useful debugging
|
||||
tools (hex dumping, token dumping).
|
||||
|
||||
* Class Libraries: Only a few classes have been
|
||||
implemented.
|
||||
</ul>
|
||||
|
||||
Tasks on the critical path:
|
||||
|
||||
<ul>
|
||||
* Method and Field resolution.
|
||||
|
||||
* Bytecode interpreter: Not implemented yet.
|
||||
|
||||
* Simple JIT: Not implemented yet.
|
||||
|
||||
* Garbage collection engine.
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
* Testing
|
||||
|
||||
All classes in Mono libraries should have comprehensive unit test
|
||||
suites to go with them. Unit testing is a software engineering
|
||||
methodology that makes it easier to build correct code. Every
|
||||
method in every class should have a set of tests to verify
|
||||
that they work correctly. Mono also needs a testing framework
|
||||
to make it easy to write and run lots of tests.
|
||||
|
||||
Try <a href="http://nunit.sourceforge.net">NUnit</a>
|
||||
|
||||
Why do unit testing? It becomes simple to run automated tests
|
||||
for the whole library. Unit tests are a safety net - you can
|
||||
change part of the code and verify that you haven't broken
|
||||
anything. Ideally, tests are written before the actual library
|
||||
code itself. And every time a bug is discovered, a test should
|
||||
be written to demonstrate the bug and its fix. Then, if
|
||||
you ever reintroduce the bug, you will know immediately. For
|
||||
more info, read <a
|
||||
href="http://nunit.sourceforge.net/doc/testinfected/testing.html">
|
||||
JUnit Test Infected: Programmers Love Writing Tests</a>.
|
||||
@@ -0,0 +1,6 @@
|
||||
* Thanks
|
||||
|
||||
We would like to thank Tim O'Reilly, Brian Jepson and Nathan
|
||||
Torkington for their help.
|
||||
|
||||
Dave Winer for provided interesting comments and a to read.
|
||||
@@ -0,0 +1,25 @@
|
||||
* Tools
|
||||
|
||||
We need a number of tools to make people productive using a
|
||||
Mono-based solution. Some of these tools can be developed on
|
||||
Windows before Mono is fully finished.
|
||||
|
||||
** Debugger
|
||||
|
||||
We will need a debugging API to debug CLI applications and
|
||||
then a debugger component that can be used in an IDE
|
||||
environment.
|
||||
|
||||
** Integrated Development Environment
|
||||
|
||||
There is already a project to create a C# development
|
||||
environment (SharpDevelop). People could work with the
|
||||
SharpDevelop hackers to produce a unified development environment.
|
||||
|
||||
** Help Browser
|
||||
|
||||
We need a good help browser that can be used to browse all the
|
||||
Mono documentation.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
*.src
|
||||
*.html
|
||||
@@ -0,0 +1,17 @@
|
||||
0,Home,index.html,index.src
|
||||
1,FAQ,faq.html,faq.src
|
||||
0,Mono,rationale.html,rationale.src
|
||||
1,Runtime,runtime.html,runtime.src
|
||||
1,Classes,class-library.html,class-library.src
|
||||
2,Class Status,class-status.html,class-status.src
|
||||
1,C# Compiler,c-sharp.html,c-sharp.src
|
||||
1,Status,status.html,status.src
|
||||
0,Contributing,contributing.html,contributing.src
|
||||
1,Documentation,documentation.html,documentation.src
|
||||
1,Test Suite,testing.html,testing.src
|
||||
1,Tools,tools.html,tools.src
|
||||
0,Download,download.html,download.src
|
||||
0,Resources,resources.html,resources.src
|
||||
1,Ideas,ideas.html,ideas.src
|
||||
1,Passport,passport.html,passport.src
|
||||
0,Contact,contact.html,contact.src
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/perl
|
||||
$q = 1;
|
||||
|
||||
while (<>){
|
||||
chop;
|
||||
if (/^\* (.*)$/){
|
||||
print "<h1>$1</h1>\n";
|
||||
} elsif (/^\*\* (.*)$/) {
|
||||
print "<h2>$1</h2>\n";
|
||||
} elsif (/^\*\*\* (.*)$/) {
|
||||
print "<h3>$1</h3>\n";
|
||||
} elsif (/^$/) {
|
||||
print "<p>\n";
|
||||
} elsif (/^\t\t\* (.*)$/) {
|
||||
print "<li>$1\n";
|
||||
} elsif (/^Q: (.*)$/){
|
||||
print "<p><a name=\"q$q\"><b>Question $q:</b> $1\n";
|
||||
$q++;
|
||||
} elsif (/^A: (.*)$/){
|
||||
print "$1\n";
|
||||
} else {
|
||||
print "$_\n";
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 49 B |
Binary file not shown.
|
After Width: | Height: | Size: 157 B |
@@ -0,0 +1,39 @@
|
||||
SOURCES= \
|
||||
../contributing \
|
||||
../class-library \
|
||||
../class-status \
|
||||
../contact \
|
||||
../c-sharp \
|
||||
../documentation \
|
||||
../download \
|
||||
../faq \
|
||||
../gcc-frontend \
|
||||
../index \
|
||||
../ideas \
|
||||
../passport \
|
||||
../rationale \
|
||||
../resources \
|
||||
../roadmap \
|
||||
../runtime \
|
||||
../status \
|
||||
../testing \
|
||||
../tools
|
||||
|
||||
all:
|
||||
-mkdir site
|
||||
for i in $(SOURCES); do \
|
||||
perl htmlify $$i > `basename $$i`.src; \
|
||||
done;
|
||||
|
||||
perl process.pl commands template.html.in .
|
||||
|
||||
clean:
|
||||
for i in $(SOURCES); do \
|
||||
rm -f `basename $$i`.src `basename $$i`.html; \
|
||||
done;
|
||||
|
||||
push:
|
||||
scp *.html [email protected]:/web/cvsmodules/mono
|
||||
|
||||
push2:
|
||||
scp *.html primates:public_html/xxx
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Author:
|
||||
# Sean MacIsaac
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $full_expand = 1;
|
||||
my @template;
|
||||
my $n;
|
||||
|
||||
if ($#ARGV != 2) {
|
||||
print "process.pl command_file template_file directory_prefix\n";
|
||||
exit ();
|
||||
}
|
||||
|
||||
my $menu = "";
|
||||
|
||||
open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
|
||||
while (<COMMANDS>) {
|
||||
chop;
|
||||
my @command = split /,/;
|
||||
if ($command[0] != -1) {
|
||||
$menu .= "\t\t";
|
||||
if ($command[0] == 0){
|
||||
$menu .= "<tr><td valign=\"top\" class=\"navi\"><a class=\"navi\"";
|
||||
} else {
|
||||
$menu .= "<tr><td valign=\"top\" class=\"subnavi\">  <a class=\"subnavi\"";
|
||||
}
|
||||
$menu .= "HREF=\"$command[2]\">$command[1]</A></td></tr>\n\n";
|
||||
}
|
||||
}
|
||||
close COMMANDS;
|
||||
|
||||
open TEMPLATE, $ARGV[1] || die "Can not open $ARGV[1]";
|
||||
while (<TEMPLATE>) {
|
||||
push @template, $_;
|
||||
}
|
||||
close TEMPLATE;
|
||||
|
||||
open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
|
||||
while (<COMMANDS>) {
|
||||
chop;
|
||||
my @command = split /,/;
|
||||
|
||||
$n = $ARGV[2] . "/" . $command[2];
|
||||
open OUTPUT, ">" . $n || die "Can not create $n";
|
||||
|
||||
my $content = "";
|
||||
open INPUT, $command[3] || die "Can not open $command[3]";
|
||||
while (<INPUT>) {
|
||||
$content .= $_;
|
||||
}
|
||||
close INPUT;
|
||||
|
||||
my $line;
|
||||
my $temp;
|
||||
my $tit;
|
||||
my $title;
|
||||
|
||||
$tit = $command[1];
|
||||
foreach $line (@template) {
|
||||
$temp = $line;
|
||||
$title = "$tit / Mono";
|
||||
$temp =~ s/#TITLE#/$title/;
|
||||
$temp =~ s/#CONTENT#/$content/;
|
||||
$temp =~ s/#MENU#/$menu/;
|
||||
print OUTPUT $temp;
|
||||
}
|
||||
|
||||
close OUTPUT;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>#TITLE#</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
background-image: url("images/bgsquares.gif");
|
||||
background-attachment: fixed; }
|
||||
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
font-size: 12px; }
|
||||
|
||||
.navi { font-size: 14px; background: #444444; }
|
||||
.subnavi { font-size: 12px; }
|
||||
.footnote { font-size: 10px; color: #aaaaaa; }
|
||||
|
||||
a.navi { color: #ffffff; text-decoration: none; font-weight: bold; }
|
||||
a.navi:visited { color: #cccccc; }
|
||||
a.navi:hover { color: #ee9900; text-decoration: underline; }
|
||||
|
||||
a.subnavi { color: #ffffff; text-decoration: none; font-weight: bold; }
|
||||
a.subnavi:visited { color: #cccccc; }
|
||||
a.subnavi:hover { color: #ee9900; text-decoration: underline; }
|
||||
|
||||
// -->
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#555555" text="#000000">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="images/pixel.gif"></td><!-- left border -->
|
||||
<td colspan="4">
|
||||
<a href="/"><img src="images/mono.gif" border="0"></a></td>
|
||||
<td><img src="images/pixel.gif"></td><!-- right border -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="images/pixel.gif" width="1" height="1"></td>
|
||||
<td colspan="3" bgcolor="black"><img src="images/pixel.gif" height="2"></td>
|
||||
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
|
||||
<td><img src="images/pixel.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100"><img src="images/pixel.gif"></td>
|
||||
<td valign="top">
|
||||
<table cellpadding="2" valign="top" cellspacing="0" border="0">
|
||||
#MENU#
|
||||
</table>
|
||||
</td>
|
||||
<td bgcolor="black" width="1"><img src="images/pixel.gif" width="1"></td>
|
||||
<td bgcolor="white">
|
||||
<table cellpadding="16">
|
||||
<tr><td>
|
||||
#CONTENT#
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
|
||||
<td width="100"><img src="images/pixel.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<img src="images/pixel.gif"></td>
|
||||
<td colspan="2" bgcolor="black"><img src="images/pixel.gif" height="1"></td>
|
||||
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
|
||||
<td><img src="images/pixel.gif"></td>
|
||||
</tr>
|
||||
|
||||
<td colspan="2"></td>
|
||||
<td colspan="2" align="center">
|
||||
<a class="footnote" href="mailto: [email protected]">[email protected]</a>
|
||||
</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
C# Compiler:
|
||||
Miguel de Icaza ([email protected])
|
||||
|
||||
Class Libraries:
|
||||
Jeff Stedfast ([email protected])
|
||||
Joe Shaw ([email protected])
|
||||
Miguel de Icaza ([email protected])
|
||||
Sean MacIsaac ([email protected])
|
||||
Vladimir Vukicevic ([email protected])
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
|
||||
This is the Ximian MCS C# compiler written in C#
|
||||
@@ -1 +0,0 @@
|
||||
Jb Evain <[email protected]>
|
||||
@@ -1,23 +0,0 @@
|
||||
2007-08-28 Jb Evain <[email protected]>
|
||||
|
||||
* Mono.Cecil.Mdb/MdbWriter.cs:
|
||||
Rewrite variables infos.
|
||||
|
||||
2007-08-27 Jb Evain <[email protected]>
|
||||
|
||||
* Mono.Cecil.Mdb/MdbWriter.cs:
|
||||
Rewrite using the direct mdb api.
|
||||
|
||||
2007-02-21 Jb Evain <[email protected]>
|
||||
|
||||
* Start working on local var debug infos emitting.
|
||||
|
||||
2006-09-24 Jb Evain <[email protected]>
|
||||
|
||||
* start some work on the reader.
|
||||
|
||||
2006-09-19 Jb Evain <[email protected]>
|
||||
|
||||
* first checkin in SVN:
|
||||
This is the assembly to support reading and writing
|
||||
from Mono's mdb symbol store.
|
||||
@@ -1,12 +0,0 @@
|
||||
thisdir = class/Mono.Cecil.Mdb
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.Cecil.Mdb.dll
|
||||
LIBRARY_SNK = ../mono.snk
|
||||
LIBRARY_PACKAGE = none
|
||||
|
||||
LIB_MCS_FLAGS = /r:$(corlib) /r:Mono.Cecil.dll /d:CECIL -keyfile:$(LIBRARY_SNK)
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include ../../build/library.make
|
||||
@@ -1,61 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{C5D12431-9C20-4789-8FEC-46094B0F81B5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Mono.Cecil.Mdb</RootNamespace>
|
||||
<AssemblyName>Mono.Cecil.Mdb</AssemblyName>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\mcs\class\mono.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Compile Include="Mono.Cecil.Mdb\AssemblyInfo.cs" />
|
||||
<Compile Include="Mono.Cecil.Mdb\MdbFactory.cs" />
|
||||
<Compile Include="Mono.Cecil.Mdb\MdbReader.cs" />
|
||||
<Compile Include="Mono.Cecil.Mdb\MdbWriter.cs" />
|
||||
<Compile Include="Mono.CompilerServices.SymbolWriter\MonoSymbolFile.cs" />
|
||||
<Compile Include="Mono.CompilerServices.SymbolWriter\MonoSymbolTable.cs" />
|
||||
<Compile Include="Mono.CompilerServices.SymbolWriter\MonoSymbolWriter.cs" />
|
||||
<Compile Include="Mono.CompilerServices.SymbolWriter\SymbolWriterImpl.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\mcs\class\Mono.Cecil\Mono.Cecil.csproj">
|
||||
<Project>{D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}</Project>
|
||||
<Name>Mono.Cecil</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,8 +0,0 @@
|
||||
./Mono.Cecil.Mdb/AssemblyInfo.cs
|
||||
./Mono.Cecil.Mdb/MdbFactory.cs
|
||||
./Mono.Cecil.Mdb/MdbReader.cs
|
||||
./Mono.Cecil.Mdb/MdbWriter.cs
|
||||
../Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
|
||||
../Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
|
||||
../Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
|
||||
../Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
|
||||
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle ("Mono.Cecil.Mdb")]
|
||||
[assembly: AssemblyDescription ("Support for the mdb symbols store in Cecil")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyProduct ("Mono.Cecil")]
|
||||
[assembly: AssemblyCopyright ("(C) 2006, Jb Evain")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
|
||||
[assembly: CLSCompliant (false)]
|
||||
[assembly: ComVisible (false)]
|
||||
|
||||
[assembly: AssemblyVersion ("0.2.0.0")]
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// MdbFactory.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Mdb {
|
||||
|
||||
using System;
|
||||
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
using Mono.CompilerServices.SymbolWriter;
|
||||
|
||||
public class MdbFactory : ISymbolStoreFactory {
|
||||
|
||||
public ISymbolReader CreateReader (ModuleDefinition module, string assembly)
|
||||
{
|
||||
return new MdbReader (MonoSymbolFile.ReadSymbolFile (module.Assembly, assembly));
|
||||
}
|
||||
|
||||
public ISymbolWriter CreateWriter (ModuleDefinition module, string assembly)
|
||||
{
|
||||
return new MdbWriter (module.Mvid, assembly);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
//
|
||||
// MdbReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Mdb {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
using Mono.CompilerServices.SymbolWriter;
|
||||
|
||||
class MdbReader : ISymbolReader {
|
||||
|
||||
MonoSymbolFile m_symFile;
|
||||
Hashtable m_documents;
|
||||
Hashtable m_scopes;
|
||||
|
||||
public MdbReader (MonoSymbolFile symFile)
|
||||
{
|
||||
m_symFile = symFile;
|
||||
m_documents = new Hashtable ();
|
||||
m_scopes = new Hashtable ();
|
||||
}
|
||||
|
||||
Hashtable GetInstructions (MethodBody body)
|
||||
{
|
||||
Hashtable instructions = new Hashtable (body.Instructions.Count);
|
||||
foreach (Instruction i in body.Instructions)
|
||||
instructions.Add (i.Offset, i);
|
||||
|
||||
return instructions;
|
||||
}
|
||||
|
||||
Instruction GetInstruction (MethodBody body, Hashtable instructions, int offset)
|
||||
{
|
||||
Instruction instr = (Instruction) instructions [offset];
|
||||
if (instr != null)
|
||||
return instr;
|
||||
|
||||
return body.Instructions.Outside;
|
||||
}
|
||||
|
||||
public void Read (MethodBody body)
|
||||
{
|
||||
MethodEntry entry = m_symFile.GetMethodByToken ((int) body.Method.MetadataToken.ToUInt ());
|
||||
if (entry == null)
|
||||
return;
|
||||
|
||||
Hashtable instructions = GetInstructions(body);
|
||||
ReadScopes (entry, body, instructions);
|
||||
ReadLineNumbers (entry, instructions);
|
||||
ReadLocalVariables (entry, body);
|
||||
}
|
||||
|
||||
void ReadLocalVariables (MethodEntry entry, MethodBody body)
|
||||
{
|
||||
foreach (LocalVariableEntry loc in entry.Locals) {
|
||||
Scope scope = m_scopes [loc.BlockIndex] as Scope;
|
||||
if (scope == null)
|
||||
continue;
|
||||
|
||||
VariableDefinition var = body.Variables [loc.Index];
|
||||
var.Name = loc.Name;
|
||||
scope.Variables.Add (var);
|
||||
}
|
||||
}
|
||||
|
||||
void ReadLineNumbers (MethodEntry entry, Hashtable instructions)
|
||||
{
|
||||
foreach (LineNumberEntry line in entry.LineNumbers) {
|
||||
Instruction instr = instructions [line.Offset] as Instruction;
|
||||
if (instr == null)
|
||||
continue;
|
||||
|
||||
Document doc = GetDocument (entry.SourceFile);
|
||||
instr.SequencePoint = new SequencePoint (doc);
|
||||
instr.SequencePoint.StartLine = line.Row;
|
||||
instr.SequencePoint.EndLine = line.Row;
|
||||
}
|
||||
}
|
||||
|
||||
Document GetDocument (SourceFileEntry file)
|
||||
{
|
||||
Document doc = m_documents [file.FileName] as Document;
|
||||
if (doc != null)
|
||||
return doc;
|
||||
|
||||
doc = new Document (file.FileName);
|
||||
|
||||
m_documents [file.FileName] = doc;
|
||||
return doc;
|
||||
}
|
||||
|
||||
void ReadScopes (MethodEntry entry, MethodBody body, Hashtable instructions)
|
||||
{
|
||||
foreach (LexicalBlockEntry scope in entry.LexicalBlocks) {
|
||||
Scope s = new Scope ();
|
||||
s.Start = GetInstruction (body, instructions, scope.StartOffset);
|
||||
s.End = GetInstruction(body, instructions, scope.EndOffset);
|
||||
m_scopes [scope.Index] = s;
|
||||
|
||||
if (!AddScope (body, s))
|
||||
body.Scopes.Add (s);
|
||||
}
|
||||
}
|
||||
|
||||
bool AddScope (IScopeProvider provider, Scope s)
|
||||
{
|
||||
foreach (Scope scope in provider.Scopes) {
|
||||
if (AddScope (scope, s))
|
||||
return true;
|
||||
|
||||
if (s.Start.Offset >= scope.Start.Offset && s.End.Offset <= scope.End.Offset) {
|
||||
scope.Scopes.Add (s);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
m_symFile.Dispose ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,179 +0,0 @@
|
||||
//
|
||||
// MdbWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2007 Novell, Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
// Inspired by the pdb2mdb tool written by Robert Jordan, thanks Robert!
|
||||
|
||||
namespace Mono.Cecil.Mdb {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
using Mono.CompilerServices.SymbolWriter;
|
||||
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
class MdbWriter : ISymbolWriter {
|
||||
|
||||
Guid m_mvid;
|
||||
MonoSymbolWriter m_writer;
|
||||
|
||||
Hashtable m_documents;
|
||||
|
||||
public MdbWriter (Guid mvid, string assembly)
|
||||
{
|
||||
m_mvid = mvid;
|
||||
m_writer = new MonoSymbolWriter (assembly);
|
||||
m_documents = new Hashtable ();
|
||||
}
|
||||
|
||||
static Instruction [] GetInstructions (MethodBody body)
|
||||
{
|
||||
ArrayList list = new ArrayList ();
|
||||
foreach (Instruction instruction in body.Instructions)
|
||||
if (instruction.SequencePoint != null)
|
||||
list.Add (instruction);
|
||||
|
||||
return list.ToArray (typeof (Instruction)) as Instruction [];
|
||||
}
|
||||
|
||||
SourceFile GetSourceFile (Document document)
|
||||
{
|
||||
string url = document.Url;
|
||||
SourceFile file = m_documents [url] as SourceFile;
|
||||
if (file != null)
|
||||
return file;
|
||||
|
||||
file = new SourceFile (m_writer.DefineDocument (url));
|
||||
m_documents [url] = file;
|
||||
return file;
|
||||
}
|
||||
|
||||
void Populate (Instruction [] instructions, int [] offsets,
|
||||
int [] startRows, int [] startCols, int [] endRows, int [] endCols,
|
||||
out SourceFile file)
|
||||
{
|
||||
SourceFile document = null;
|
||||
|
||||
for (int i = 0; i < instructions.Length; i++) {
|
||||
Instruction instr = (Instruction) instructions [i];
|
||||
offsets [i] = instr.Offset;
|
||||
|
||||
if (document == null)
|
||||
document = GetSourceFile (instr.SequencePoint.Document);
|
||||
|
||||
startRows [i] = instr.SequencePoint.StartLine;
|
||||
startCols [i] = instr.SequencePoint.StartColumn;
|
||||
endRows [i] = instr.SequencePoint.EndLine;
|
||||
endCols [i] = instr.SequencePoint.EndColumn;
|
||||
}
|
||||
|
||||
file = document;
|
||||
}
|
||||
|
||||
public void Write (MethodBody body, byte [][] variables)
|
||||
{
|
||||
SourceMethod meth = new SourceMethod (body.Method);
|
||||
|
||||
SourceFile file;
|
||||
|
||||
Instruction [] instructions = GetInstructions (body);
|
||||
int length = instructions.Length;
|
||||
if (length == 0)
|
||||
return;
|
||||
|
||||
int [] offsets = new int [length];
|
||||
int [] startRows = new int [length];
|
||||
int [] startCols = new int [length];
|
||||
int [] endRows = new int [length];
|
||||
int [] endCols = new int [length];
|
||||
|
||||
Populate (instructions, offsets, startRows, startCols, endRows, endCols, out file);
|
||||
|
||||
m_writer.OpenMethod (file, meth,
|
||||
startRows [0], startCols [0],
|
||||
endRows [length - 1], endCols [length - 1]);
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
m_writer.MarkSequencePoint (offsets [i], startRows [i], startCols [i]);
|
||||
|
||||
MarkVariables (body, variables);
|
||||
|
||||
m_writer.CloseMethod ();
|
||||
}
|
||||
|
||||
void MarkVariables (MethodBody body, byte [][] variables)
|
||||
{
|
||||
for (int i = 0; i < body.Variables.Count; i++) {
|
||||
VariableDefinition var = body.Variables [i];
|
||||
m_writer.DefineLocalVariable (i, var.Name, variables [i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
m_writer.WriteSymbolFile (m_mvid);
|
||||
}
|
||||
|
||||
class SourceFile : ISourceFile {
|
||||
|
||||
SourceFileEntry m_entry;
|
||||
|
||||
public SourceFileEntry Entry {
|
||||
get { return m_entry; }
|
||||
}
|
||||
|
||||
public SourceFile (SourceFileEntry entry)
|
||||
{
|
||||
m_entry = entry;
|
||||
}
|
||||
}
|
||||
|
||||
class SourceMethod : ISourceMethod {
|
||||
|
||||
MethodDefinition m_method;
|
||||
|
||||
public string Name {
|
||||
get { return m_method.Name; }
|
||||
}
|
||||
|
||||
public int NamespaceID {
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public int Token {
|
||||
get { return (int) m_method.MetadataToken.ToUInt (); }
|
||||
}
|
||||
|
||||
public SourceMethod (MethodDefinition method)
|
||||
{
|
||||
m_method = method;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
Mono.Cecil.Mdb is an internal assembly used by Mono.Cecil to
|
||||
read and write the Mono Debugging Symbols file format.
|
||||
@@ -1,31 +0,0 @@
|
||||
2007-02-21 Jb Evain <[email protected]>
|
||||
|
||||
* Start working on local var debug infos emitting.
|
||||
|
||||
2007-02-21 Jb Evain <[email protected]>
|
||||
|
||||
* Mono.Cecil.Pdb/PdbReader.cs
|
||||
Mono.Cecil.Pdb/PdbHelper.cs
|
||||
Mono.Cecil.Pdb/IMetaDataDispenser.cs:
|
||||
Refactor patches from:
|
||||
Sverre Boschman <[email protected]>
|
||||
|
||||
- Force the release of the lock on the pdb on reading
|
||||
- Implement the ability to read a pdb in memory
|
||||
|
||||
2006-09-24 Jb Evain <[email protected]>
|
||||
|
||||
* Handle the fact that a scope end points outside the cil stream.
|
||||
|
||||
2006-09-20 Jb Evain <[email protected]>
|
||||
|
||||
* implement somes bits of the writing stuff.
|
||||
|
||||
2006-09-19 Jb Evain <[email protected]>
|
||||
|
||||
* first checkin in SVN:
|
||||
This is the assembly to support reading and writing
|
||||
from Microsoft's pdb symbols store.
|
||||
|
||||
It will only work on Windows until Microsoft release
|
||||
the spec for the pdb files.
|
||||
@@ -1,61 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{4FEBBB25-D5C0-48F0-A822-2E0D6F3D777E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Mono.Cecil.Pdb</RootNamespace>
|
||||
<AssemblyName>Mono.Cecil.Pdb</AssemblyName>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\mcs\class\mono.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Compile Include="Mono.Cecil.Pdb\AssemblyInfo.cs" />
|
||||
<Compile Include="Mono.Cecil.Pdb\IMetadataDispenser.cs" />
|
||||
<Compile Include="Mono.Cecil.Pdb\IMetadataImport.cs" />
|
||||
<Compile Include="Mono.Cecil.Pdb\PdbFactory.cs" />
|
||||
<Compile Include="Mono.Cecil.Pdb\PdbReader.cs" />
|
||||
<Compile Include="Mono.Cecil.Pdb\PdbWriter.cs" />
|
||||
<Compile Include="Mono.Cecil.Pdb\PdbHelper.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ISymWrapper" />
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\mcs\class\Mono.Cecil\Mono.Cecil.csproj">
|
||||
<Project>{D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}</Project>
|
||||
<Name>Mono.Cecil</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle ("Mono.Cecil.Pdb")]
|
||||
[assembly: AssemblyDescription ("Support for the pdb symbols store in Cecil")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyProduct ("Mono.Cecil")]
|
||||
[assembly: AssemblyCopyright ("(C) 2006, Jb Evain")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
|
||||
[assembly: CLSCompliant (false)]
|
||||
[assembly: ComVisible (false)]
|
||||
|
||||
[assembly: AssemblyVersion ("0.2.0.0")]
|
||||
@@ -1,56 +0,0 @@
|
||||
//
|
||||
// IMetadataImport.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
// from: http://blogs.msdn.com/jmstall/articles/sample_pdb2xml.aspx
|
||||
|
||||
namespace Mono.Cecil.Pdb {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[Guid ("809c652e-7396-11d2-9771-00a0c9b4d50c")]
|
||||
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
|
||||
[ComVisible (true)]
|
||||
interface IMetaDataDispenser {
|
||||
|
||||
void DefineScope_Placeholder();
|
||||
|
||||
void OpenScope (
|
||||
[In, MarshalAs (UnmanagedType.LPWStr)] string szScope,
|
||||
[In] int dwOpenFlags,
|
||||
[In] ref Guid riid,
|
||||
[Out, MarshalAs (UnmanagedType.IUnknown)] out object punk);
|
||||
|
||||
void OpenScopeOnMemory (
|
||||
[In] IntPtr pData,
|
||||
[In] uint cbData,
|
||||
[In] uint dwOpenFlags,
|
||||
[In] ref Guid riid,
|
||||
[Out, MarshalAs (UnmanagedType.Interface)] out object punk);
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// IMetadataImport.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
// from: http://blogs.msdn.com/jmstall/articles/sample_pdb2xml.aspx
|
||||
|
||||
namespace Mono.Cecil.Pdb {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[Guid ("7DAC8207-D3AE-4c75-9B67-92801A497D44")]
|
||||
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
|
||||
[ComVisible (true)]
|
||||
[CLSCompliant (true)]
|
||||
public interface IMetadataImport {
|
||||
void Placeholder();
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// PdbFactory.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Pdb {
|
||||
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
public class PdbFactory : ISymbolStoreFactory {
|
||||
|
||||
public ISymbolReader CreateReader (ModuleDefinition module, string assembly)
|
||||
{
|
||||
return new PdbReader (PdbHelper.CreateReader (assembly));
|
||||
}
|
||||
|
||||
public ISymbolWriter CreateWriter (ModuleDefinition module, string assembly)
|
||||
{
|
||||
string pdb = string.Concat(assembly.Substring(0, assembly.LastIndexOf(".")), ".pdb");
|
||||
return new PdbWriter (PdbHelper.CreateWriter (assembly, pdb), module, pdb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
//
|
||||
// PdbHelper.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
// from: http://blogs.msdn.com/jmstall/articles/sample_pdb2xml.aspx
|
||||
|
||||
namespace Mono.Cecil.Pdb {
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
internal class PdbHelper {
|
||||
|
||||
[DllImport("ole32.dll")]
|
||||
static extern int CoCreateInstance (
|
||||
[In] ref Guid rclsid,
|
||||
[In, MarshalAs (UnmanagedType.IUnknown)] object pUnkOuter,
|
||||
[In] uint dwClsContext,
|
||||
[In] ref Guid riid,
|
||||
[Out, MarshalAs(UnmanagedType.Interface)] out object ppv);
|
||||
|
||||
static Guid s_dispenserClassID = new Guid (0xe5cb7a31, 0x7512, 0x11d2, 0x89, 0xce, 0x00, 0x80, 0xc7, 0x92, 0xe5, 0xd8);
|
||||
static Guid s_dispenserIID = new Guid (0x809c652e, 0x7396, 0x11d2, 0x97, 0x71, 0x00, 0xa0, 0xc9, 0xb4, 0xd5, 0x0c);
|
||||
static Guid s_importerIID = new Guid (0x7dac8207, 0xd3ae, 0x4c75, 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44);
|
||||
|
||||
public static ISymbolReader CreateReader (string filename)
|
||||
{
|
||||
SymBinder binder;
|
||||
object objImporter;
|
||||
|
||||
IMetaDataDispenser dispenser = InstantiateDispenser (out binder);
|
||||
dispenser.OpenScope (filename, 0, ref s_importerIID, out objImporter);
|
||||
|
||||
return InstantiateReader (binder, filename, objImporter);
|
||||
}
|
||||
|
||||
public static ISymbolReader CreateReader (string filename, byte [] binaryFile)
|
||||
{
|
||||
SymBinder binder;
|
||||
object objImporter;
|
||||
|
||||
IntPtr filePtr = Marshal.AllocHGlobal (binaryFile.Length);
|
||||
Marshal.Copy (binaryFile, 0, filePtr, binaryFile.Length);
|
||||
|
||||
IMetaDataDispenser dispenser = InstantiateDispenser (out binder);
|
||||
dispenser.OpenScopeOnMemory (filePtr, (uint) binaryFile.Length, 0, ref s_importerIID, out objImporter);
|
||||
|
||||
return InstantiateReader (binder, filename, objImporter);
|
||||
}
|
||||
|
||||
static IMetaDataDispenser InstantiateDispenser (out SymBinder binder)
|
||||
{
|
||||
binder = new SymBinder ();
|
||||
object dispenser;
|
||||
CoCreateInstance (ref s_dispenserClassID, null, 1, ref s_dispenserIID, out dispenser);
|
||||
return (IMetaDataDispenser) dispenser;
|
||||
}
|
||||
|
||||
static ISymbolReader InstantiateReader (SymBinder binder, string filename, object objImporter)
|
||||
{
|
||||
IntPtr importerPtr = IntPtr.Zero;
|
||||
ISymbolReader reader;
|
||||
try {
|
||||
importerPtr = Marshal.GetComInterfaceForObject (objImporter, typeof (IMetadataImport));
|
||||
|
||||
reader = binder.GetReader (importerPtr, filename, null);
|
||||
} finally {
|
||||
if (importerPtr != IntPtr.Zero)
|
||||
Marshal.Release (importerPtr);
|
||||
}
|
||||
|
||||
return reader;
|
||||
}
|
||||
|
||||
public static ISymbolWriter CreateWriter (string assembly, string pdb)
|
||||
{
|
||||
SymWriter writer = new SymWriter (false);
|
||||
|
||||
object objDispenser, objImporter;
|
||||
CoCreateInstance (ref s_dispenserClassID, null, 1, ref s_dispenserIID, out objDispenser);
|
||||
|
||||
IMetaDataDispenser dispenser = (IMetaDataDispenser) objDispenser;
|
||||
dispenser.OpenScope (assembly, 1, ref s_importerIID, out objImporter);
|
||||
|
||||
IntPtr importerPtr = Marshal.GetComInterfaceForObject (objImporter, typeof (IMetadataImport));
|
||||
|
||||
try {
|
||||
if (File.Exists (pdb))
|
||||
File.Delete (pdb);
|
||||
|
||||
writer.Initialize (importerPtr, pdb, false);
|
||||
} finally {
|
||||
if (importerPtr != IntPtr.Zero) {
|
||||
Marshal.Release (importerPtr);
|
||||
Marshal.ReleaseComObject (objDispenser);
|
||||
Marshal.ReleaseComObject (objImporter);
|
||||
Marshal.ReleaseComObject (dispenser);
|
||||
}
|
||||
}
|
||||
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
//
|
||||
// PdbReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Pdb {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class PdbReader : Cil.ISymbolReader {
|
||||
|
||||
ISymbolReader m_reader;
|
||||
|
||||
Hashtable m_documents;
|
||||
|
||||
internal PdbReader (ISymbolReader reader)
|
||||
{
|
||||
m_reader = reader;
|
||||
m_documents = new Hashtable ();
|
||||
}
|
||||
|
||||
public void Read (Cil.MethodBody body)
|
||||
{
|
||||
try {
|
||||
ISymbolMethod method = m_reader.GetMethod (new SymbolToken ((int) body.Method.MetadataToken.ToUInt ()));
|
||||
Hashtable instructions = GetInstructions (body);
|
||||
|
||||
ReadSequencePoints (method, instructions);
|
||||
ReadScopeAndLocals (method.RootScope, null, body, instructions);
|
||||
} catch (COMException) {}
|
||||
}
|
||||
|
||||
static Hashtable GetInstructions (Cil.MethodBody body)
|
||||
{
|
||||
Hashtable instructions = new Hashtable (body.Instructions.Count);
|
||||
foreach (Cil.Instruction i in body.Instructions)
|
||||
instructions.Add (i.Offset, i);
|
||||
|
||||
return instructions;
|
||||
}
|
||||
|
||||
static Cil.Instruction GetInstruction (Cil.MethodBody body, Hashtable instructions, int offset)
|
||||
{
|
||||
Cil.Instruction instr = (Cil.Instruction) instructions [offset];
|
||||
if (instr != null)
|
||||
return instr;
|
||||
|
||||
return body.Instructions.Outside;
|
||||
}
|
||||
|
||||
static void ReadScopeAndLocals (ISymbolScope scope, Cil.Scope parent, Cil.MethodBody body, Hashtable instructions)
|
||||
{
|
||||
Cil.Scope s = new Cil.Scope ();
|
||||
s.Start = GetInstruction (body, instructions, scope.StartOffset);
|
||||
s.End = GetInstruction (body, instructions, scope.EndOffset);
|
||||
|
||||
if (parent != null)
|
||||
parent.Scopes.Add (s);
|
||||
else
|
||||
body.Scopes.Add (s);
|
||||
|
||||
foreach (ISymbolVariable local in scope.GetLocals ()) {
|
||||
Cil.VariableDefinition variable = body.Variables [local.AddressField1];
|
||||
variable.Name = local.Name;
|
||||
|
||||
s.Variables.Add (variable);
|
||||
}
|
||||
|
||||
foreach (ISymbolScope child in scope.GetChildren ())
|
||||
ReadScopeAndLocals (child, s, body, instructions);
|
||||
}
|
||||
|
||||
void ReadSequencePoints(ISymbolMethod method, Hashtable instructions)
|
||||
{
|
||||
int count = method.SequencePointCount;
|
||||
int [] offsets = new int [count];
|
||||
ISymbolDocument [] docs = new ISymbolDocument [count];
|
||||
int [] startColumn = new int [count];
|
||||
int [] endColumn = new int [count];
|
||||
int [] startRow = new int [count];
|
||||
int [] endRow = new int [count];
|
||||
method.GetSequencePoints (offsets, docs, startRow, startColumn, endRow, endColumn);
|
||||
|
||||
for (int i = 0; i < offsets.Length; i++) {
|
||||
Cil.Instruction instr = (Cil.Instruction) instructions [offsets [i]];
|
||||
|
||||
Cil.SequencePoint sp = new Cil.SequencePoint (GetDocument (docs [i]));
|
||||
sp.StartLine = startRow [i];
|
||||
sp.StartColumn = startColumn [i];
|
||||
sp.EndLine = endRow [i];
|
||||
sp.EndColumn = endColumn [i];
|
||||
|
||||
instr.SequencePoint = sp;
|
||||
}
|
||||
}
|
||||
|
||||
Cil.Document GetDocument (ISymbolDocument document)
|
||||
{
|
||||
Cil.Document doc = m_documents [document.URL] as Cil.Document;
|
||||
if (doc != null)
|
||||
return doc;
|
||||
|
||||
doc = new Cil.Document (document.URL);
|
||||
doc.Type = (Cil.DocumentType) Cil.GuidAttribute.GetValueFromGuid (
|
||||
document.DocumentType, typeof (Cil.DocumentType));
|
||||
doc.Language = (Cil.DocumentLanguage) Cil.GuidAttribute.GetValueFromGuid (
|
||||
document.Language, typeof (Cil.DocumentLanguage));
|
||||
doc.LanguageVendor = (Cil.DocumentLanguageVendor) Cil.GuidAttribute.GetValueFromGuid (
|
||||
document.LanguageVendor, typeof (Cil.DocumentLanguageVendor));
|
||||
|
||||
m_documents [doc.Url] = doc;
|
||||
return doc;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
m_reader = null;
|
||||
// force the release of the pdb lock
|
||||
GC.Collect ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
//
|
||||
// PdbWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2006 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
namespace Mono.Cecil.Pdb {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using System.IO;
|
||||
|
||||
public class PdbWriter : Cil.ISymbolWriter {
|
||||
|
||||
ModuleDefinition m_module;
|
||||
ISymbolWriter m_writer;
|
||||
Hashtable m_documents;
|
||||
string m_pdb;
|
||||
|
||||
internal PdbWriter (ISymbolWriter writer, ModuleDefinition module, string pdb)
|
||||
{
|
||||
m_writer = writer;
|
||||
m_module = module;
|
||||
m_documents = new Hashtable ();
|
||||
m_pdb = pdb;
|
||||
}
|
||||
|
||||
public void Write (MethodBody body, byte [][] variables)
|
||||
{
|
||||
CreateDocuments (body);
|
||||
m_writer.OpenMethod (new SymbolToken ((int) body.Method.MetadataToken.ToUInt ()));
|
||||
CreateScopes (body, body.Scopes, variables);
|
||||
m_writer.CloseMethod ();
|
||||
}
|
||||
|
||||
void CreateScopes (MethodBody body, ScopeCollection scopes, byte [][] variables)
|
||||
{
|
||||
foreach (Scope s in scopes) {
|
||||
int startOffset = s.Start.Offset;
|
||||
int endOffset = s.End == body.Instructions.Outside ?
|
||||
body.Instructions[body.Instructions.Count - 1].Offset + 1 :
|
||||
s.End.Offset;
|
||||
|
||||
m_writer.OpenScope (startOffset);
|
||||
m_writer.UsingNamespace (body.Method.DeclaringType.Namespace);
|
||||
m_writer.OpenNamespace (body.Method.DeclaringType.Namespace);
|
||||
|
||||
int start = body.Instructions.IndexOf (s.Start);
|
||||
int end = s.End == body.Instructions.Outside ?
|
||||
body.Instructions.Count - 1 :
|
||||
body.Instructions.IndexOf (s.End);
|
||||
|
||||
ArrayList instructions = new ArrayList();
|
||||
for (int i = start; i <= end; i++)
|
||||
if (body.Instructions [i].SequencePoint != null)
|
||||
instructions.Add (body.Instructions [i]);
|
||||
|
||||
Document doc = null;
|
||||
|
||||
int [] offsets = new int [instructions.Count];
|
||||
int [] startRows = new int [instructions.Count];
|
||||
int [] startCols = new int [instructions.Count];
|
||||
int [] endRows = new int [instructions.Count];
|
||||
int [] endCols = new int [instructions.Count];
|
||||
|
||||
for (int i = 0; i < instructions.Count; i++) {
|
||||
Instruction instr = (Instruction) instructions [i];
|
||||
offsets [i] = instr.Offset;
|
||||
|
||||
if (doc == null)
|
||||
doc = instr.SequencePoint.Document;
|
||||
|
||||
startRows [i] = instr.SequencePoint.StartLine;
|
||||
startCols [i] = instr.SequencePoint.StartColumn;
|
||||
endRows [i] = instr.SequencePoint.EndLine;
|
||||
endCols [i] = instr.SequencePoint.EndColumn;
|
||||
}
|
||||
|
||||
m_writer.DefineSequencePoints (GetDocument (doc),
|
||||
offsets, startRows, startCols, endRows, endCols);
|
||||
|
||||
CreateLocalVariable (s, startOffset, endOffset, variables);
|
||||
|
||||
CreateScopes (body, s.Scopes, variables);
|
||||
m_writer.CloseNamespace ();
|
||||
|
||||
m_writer.CloseScope (endOffset);
|
||||
}
|
||||
}
|
||||
|
||||
void CreateLocalVariable (IVariableDefinitionProvider provider, int startOffset, int endOffset, byte [][] variables)
|
||||
{
|
||||
for (int i = 0; i < provider.Variables.Count; i++) {
|
||||
VariableDefinition var = provider.Variables [i];
|
||||
m_writer.DefineLocalVariable (
|
||||
var.Name,
|
||||
0,
|
||||
variables [i],
|
||||
SymAddressKind.ILOffset,
|
||||
i,
|
||||
0,
|
||||
0,
|
||||
startOffset,
|
||||
endOffset);
|
||||
}
|
||||
}
|
||||
|
||||
void CreateDocuments (MethodBody body)
|
||||
{
|
||||
foreach (Instruction instr in body.Instructions) {
|
||||
if (instr.SequencePoint == null)
|
||||
continue;
|
||||
|
||||
GetDocument (instr.SequencePoint.Document);
|
||||
}
|
||||
}
|
||||
|
||||
ISymbolDocumentWriter GetDocument (Document document)
|
||||
{
|
||||
if (document == null)
|
||||
return null;
|
||||
|
||||
ISymbolDocumentWriter docWriter = m_documents [document.Url] as ISymbolDocumentWriter;
|
||||
if (docWriter != null)
|
||||
return docWriter;
|
||||
|
||||
docWriter = m_writer.DefineDocument (
|
||||
document.Url,
|
||||
GuidAttribute.GetGuidFromValue ((int) document.Language, typeof (DocumentLanguage)),
|
||||
GuidAttribute.GetGuidFromValue ((int) document.LanguageVendor, typeof (DocumentLanguageVendor)),
|
||||
GuidAttribute.GetGuidFromValue ((int) document.Type, typeof (DocumentType)));
|
||||
|
||||
m_documents [document.Url] = docWriter;
|
||||
return docWriter;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
m_writer.Close ();
|
||||
Patch ();
|
||||
}
|
||||
|
||||
void Patch ()
|
||||
{
|
||||
FileStream fs = new FileStream (m_pdb, FileMode.Open, FileAccess.ReadWrite);
|
||||
uint age = m_module.Image.DebugHeader.Age;
|
||||
Guid g = m_module.Image.DebugHeader.Signature;
|
||||
|
||||
BinaryReader reader = new BinaryReader (fs);
|
||||
reader.BaseStream.Position = 32;
|
||||
|
||||
uint pageSize = reader.ReadUInt32 ();
|
||||
reader.BaseStream.Position += 4;
|
||||
|
||||
uint pageCount = reader.ReadUInt32 ();
|
||||
reader.BaseStream.Position += pageSize - 44;
|
||||
|
||||
uint magic = 0x1312e94;
|
||||
int page = 0;
|
||||
for (int i = 1; i < pageCount; i++) {
|
||||
if (magic == reader.ReadUInt32 ()) {
|
||||
page = i;
|
||||
break;
|
||||
}
|
||||
reader.BaseStream.Position += pageSize - 4;
|
||||
}
|
||||
|
||||
BinaryWriter writer = new BinaryWriter (fs);
|
||||
writer.BaseStream.Position = page * pageSize + 8;
|
||||
|
||||
writer.Write (age);
|
||||
writer.Write (g.ToByteArray ());
|
||||
|
||||
fs.Close ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<project name="Mono.Cecil.Pdb" default="build">
|
||||
|
||||
<!-- allow properties to be customized in external file" -->
|
||||
<include buildfile="build.properties" if="${file::exists('build.properties')}" />
|
||||
|
||||
<property name="Mono.Cecil.dll" value="../../mcs/class/Mono.Cecil/bin/Mono.Cecil.dll" />
|
||||
<property name="build.dir" value="bin" />
|
||||
<property name="optimize" value="false" />
|
||||
<property name="debug" value="true" />
|
||||
<property name="keyfile" value="../../mcs/class/mono.snk" />
|
||||
<property name="csc.defines" value="NO_DEFINE" />
|
||||
|
||||
<target name="release" depends="clean, set-release, build">
|
||||
</target>
|
||||
|
||||
<target name="set-release">
|
||||
<property name="optimize" value="true" />
|
||||
<property name="debug" value="false" />
|
||||
</target>
|
||||
|
||||
<target name="build" depends="init">
|
||||
<csc
|
||||
target="library"
|
||||
output="${build.dir}/Mono.Cecil.Pdb.dll"
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
keyfile="${keyfile}"
|
||||
define="${csc.defines}">
|
||||
<sources basedir="Mono.Cecil.Pdb">
|
||||
<include name="**/*.cs" />
|
||||
</sources>
|
||||
<references basedir="${build.dir}">
|
||||
<include name="Mono.Cecil.dll" />
|
||||
<include name="ISymWrapper.dll" />
|
||||
</references>
|
||||
</csc>
|
||||
</target>
|
||||
|
||||
<target name="init">
|
||||
<mkdir dir="${build.dir}" unless="${directory::exists(build.dir)}" />
|
||||
<copy todir="${build.dir}" file="${Mono.Cecil.dll}" />
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${build.dir}" if="${directory::exists(build.dir)}" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -1 +0,0 @@
|
||||
Jb Evain ([email protected])
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,226 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
$providers = []
|
||||
|
||||
$mapping = {
|
||||
"Assem" => "IsAssembly",
|
||||
"FamORAssem" => "IsFamilyOrAssembly",
|
||||
"FamANDAssem" => "IsFamilyAndAssembly",
|
||||
"NestedFamORAssem" => "IsNestedFamilyOrAssembly",
|
||||
"NestedFamANDAssem" => "IsNestedFamilyAndAssembly",
|
||||
"RTSpecialName" => "IsRuntimeSpecialName",
|
||||
"Compilercontrolled" => "IsCompilerControlled",
|
||||
"NotNullableValueTypeConstraint" => "HasNotNullableValueTypeConstraint",
|
||||
"ReferenceTypeConstraint" => "HasReferenceTypeConstraint",
|
||||
"DefaultConstructorConstraint" => "HasDefaultConstructorConstraint",
|
||||
"SupportsLastError" => "SupportsLastError",
|
||||
"NoInlining" => "NoInlining",
|
||||
}
|
||||
|
||||
$black_list = [
|
||||
"None", "Unused", "RequireSecObject",
|
||||
"HasFieldMarshal", "HasFieldRVA",
|
||||
"OPTIL", "MaxMethodImplVal"
|
||||
]
|
||||
|
||||
class Attribute
|
||||
|
||||
attr_accessor(:name)
|
||||
attr_accessor(:type)
|
||||
|
||||
def initialize(name, type)
|
||||
@name = name
|
||||
@type = type
|
||||
end
|
||||
|
||||
def full_name
|
||||
"#{@type}.#{@name}"
|
||||
end
|
||||
|
||||
def to_csharp
|
||||
""" public bool #{get_name()} {
|
||||
#{getter()}#{setter()} }
|
||||
"""
|
||||
end
|
||||
|
||||
def to_s
|
||||
"Attribute #{full_name}"
|
||||
end
|
||||
|
||||
protected
|
||||
def getter
|
||||
""" get { return (m_attributes & #{full_name()}) != 0; }
|
||||
"""
|
||||
end
|
||||
|
||||
def setter
|
||||
""" set {
|
||||
if (value)
|
||||
m_attributes |= #{full_name()};
|
||||
else
|
||||
m_attributes &= ~#{full_name()};
|
||||
}
|
||||
"""
|
||||
end
|
||||
|
||||
private
|
||||
def get_name
|
||||
name = @name
|
||||
return $mapping[name] if $mapping.include?(name)
|
||||
return name if name.rindex("Has") == 0
|
||||
"Is#{name}"
|
||||
end
|
||||
end
|
||||
|
||||
class MaskedAttribute < Attribute
|
||||
|
||||
attr_accessor(:mask)
|
||||
|
||||
def initialize(name, type, mask)
|
||||
super(name, type)
|
||||
@mask = mask
|
||||
end
|
||||
|
||||
def mask_full_name
|
||||
"#{@type}.#{@mask}"
|
||||
end
|
||||
|
||||
def to_s
|
||||
"MaskedAttribute #{full_name()}, masked by #{mask_full_name()}"
|
||||
end
|
||||
|
||||
protected
|
||||
def getter
|
||||
""" get { return (m_attributes & #{mask_full_name()}) == #{full_name()}; }
|
||||
"""
|
||||
end
|
||||
|
||||
def setter
|
||||
""" set {
|
||||
if (value) {
|
||||
m_attributes &= ~#{mask_full_name()};
|
||||
m_attributes |= #{full_name()};
|
||||
} else
|
||||
m_attributes &= ~(#{mask_full_name()} & #{full_name()});
|
||||
}
|
||||
"""
|
||||
end
|
||||
end
|
||||
|
||||
class Provider
|
||||
|
||||
attr_accessor(:type)
|
||||
attr_accessor(:attributes_file)
|
||||
attr_accessor(:target_file)
|
||||
attr_accessor(:attributes)
|
||||
|
||||
def initialize(type, attributes_file, target_file)
|
||||
@type = type
|
||||
@attributes_file = attributes_file
|
||||
@target_file = target_file
|
||||
@attributes = []
|
||||
end
|
||||
|
||||
def parse
|
||||
f = File.open(@attributes_file, File::RDONLY)
|
||||
have_mask = false
|
||||
mask = ""
|
||||
f.readlines.each { |line|
|
||||
if line.chomp().length == 0
|
||||
have_mask = false
|
||||
else
|
||||
name = get_name(line)
|
||||
if not name.nil? and name.index("Mask")
|
||||
mask = name
|
||||
have_mask = true
|
||||
elsif not name.nil?
|
||||
attr = nil
|
||||
if (have_mask)
|
||||
attr = MaskedAttribute.new(name, @type, mask)
|
||||
else
|
||||
attr = Attribute.new(name, @type)
|
||||
end
|
||||
@attributes << attr
|
||||
end
|
||||
end
|
||||
}
|
||||
f.close
|
||||
end
|
||||
|
||||
def patch
|
||||
buffer = read_target_content()
|
||||
buffer = patch_buffer(buffer)
|
||||
if buffer != read_target_content()
|
||||
puts("#{@target_file} patched")
|
||||
write_target_content (buffer)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def patch_buffer(buffer)
|
||||
region = "#region " + @type
|
||||
endregion = "#endregion"
|
||||
|
||||
endpart = buffer[(buffer.index(endregion) - 3)..buffer.length]
|
||||
|
||||
rep = buffer[0..(buffer.index(region) + region.length)]
|
||||
|
||||
rep += "\n"
|
||||
|
||||
@attributes.each { |attr|
|
||||
rep += attr.to_csharp
|
||||
rep += "\n" if attr != @attributes.last
|
||||
}
|
||||
|
||||
rep += endpart
|
||||
|
||||
rep
|
||||
end
|
||||
|
||||
def read_target_content
|
||||
f = File.new(@target_file, File::RDONLY)
|
||||
content = f.readlines.join
|
||||
f.close
|
||||
content
|
||||
end
|
||||
|
||||
def write_target_content(content)
|
||||
File.open(@target_file, File::WRONLY | File::TRUNC) { |f|
|
||||
f.write(content)
|
||||
}
|
||||
end
|
||||
|
||||
def get_name(line)
|
||||
pos = line.index("=")
|
||||
return nil if not pos
|
||||
name = line[0..(pos - 1)].strip
|
||||
|
||||
return nil if $black_list.include?(name)
|
||||
name
|
||||
end
|
||||
end
|
||||
|
||||
def to_cecil_file(file)
|
||||
"../Mono.Cecil/#{file}.cs"
|
||||
end
|
||||
|
||||
[ "Event", "Field", "Method", "Parameter", "Property", "Type" ].each { |name|
|
||||
attributes = "#{name}Attributes"
|
||||
definition = "#{name}Definition"
|
||||
$providers << Provider.new(attributes, to_cecil_file(attributes), to_cecil_file(definition))
|
||||
}
|
||||
|
||||
{ "GenericParameter" => "GenericParameter",
|
||||
"ManifestResource" => "Resource",
|
||||
"PInvoke" => "PInvokeInfo",
|
||||
# "MethodImpl" => "MethodDefinition",
|
||||
# "MethodSemantics" => "MethodDefinition",
|
||||
}.each { |k, v|
|
||||
attributes = "#{k}Attributes"
|
||||
$providers << Provider.new(attributes, to_cecil_file(attributes), to_cecil_file(v))
|
||||
}
|
||||
|
||||
$providers.each { |p|
|
||||
p.parse
|
||||
p.patch
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
f = File.new("../Mono.Cecil.dll.sources", File::CREAT | File::WRONLY | File::TRUNC)
|
||||
|
||||
[ "Mono.Cecil", "Mono.Cecil.Binary",
|
||||
"Mono.Cecil.Metadata", "Mono.Cecil.Cil",
|
||||
"Mono.Cecil.Signatures", "Mono.Xml" ].each { |dir|
|
||||
|
||||
Dir.foreach("../" + dir) { |file|
|
||||
f.print("./#{dir}/#{file}\n") if file[(file.length - 3)..file.length] == ".cs"
|
||||
}
|
||||
}
|
||||
|
||||
f.close
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'erb'
|
||||
|
||||
class Language
|
||||
|
||||
attr_reader(:name)
|
||||
attr_reader(:compiler)
|
||||
attr_reader(:ext)
|
||||
attr_reader(:command)
|
||||
|
||||
def initialize(name, compiler, ext, command)
|
||||
@name = name
|
||||
@compiler = compiler
|
||||
@ext = ext
|
||||
@command = command
|
||||
end
|
||||
end
|
||||
|
||||
class TestCase
|
||||
|
||||
attr_reader(:lang)
|
||||
attr_reader(:file)
|
||||
|
||||
def initialize(lang, file)
|
||||
@lang = lang
|
||||
@file = file
|
||||
end
|
||||
|
||||
def method()
|
||||
meth = @file.gsub(/[^a-zA-Z1-9]/, "_")
|
||||
return meth[1..meth.length] if (meth[0].chr == "_")
|
||||
return meth
|
||||
end
|
||||
end
|
||||
|
||||
$languages = [
|
||||
Language.new("cil", "ilasm", ".il", "{0} /exe /output:{2} {1}"),
|
||||
Language.new("csharp", "mcs", ".cs", "{0} /t:exe /o:{2} {1}")
|
||||
]
|
||||
|
||||
$tests = [
|
||||
]
|
||||
|
||||
def analyze(dir)
|
||||
$languages.each { |l|
|
||||
pattern = File.join(dir, "**", "*" + l.ext)
|
||||
Dir[pattern].each { |file|
|
||||
$tests.push(TestCase.new(l, File.expand_path(file)))
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
ARGV.each { |dir|
|
||||
analyze(dir)
|
||||
}
|
||||
|
||||
if $tests.length > 0
|
||||
erb = ERB.new(IO.read("./templates/Tests.cs"))
|
||||
print(erb.result)
|
||||
end
|
||||
@@ -1,262 +0,0 @@
|
||||
|
||||
# types used in templates
|
||||
|
||||
module Cecil
|
||||
|
||||
class Evolutive # abstract
|
||||
|
||||
attr_reader(:requ)
|
||||
|
||||
def initialize(requ)
|
||||
@requ = requ
|
||||
end
|
||||
end
|
||||
|
||||
class FieldWorker # abstract
|
||||
|
||||
attr_reader(:field_name)
|
||||
attr_reader(:property_name)
|
||||
attr_reader(:type)
|
||||
attr_reader(:ns)
|
||||
attr_reader(:size)
|
||||
attr_reader(:target)
|
||||
|
||||
def initialize(name, type, target)
|
||||
@property_name = name
|
||||
@target = target
|
||||
@field_name = to_field(name)
|
||||
|
||||
@objtype = type
|
||||
|
||||
ar = type.name.split(".")
|
||||
@type = ar.pop()
|
||||
@ns = ar.join(".")
|
||||
|
||||
@size = type.size
|
||||
end
|
||||
|
||||
def to_field(name)
|
||||
name = String.new(name)
|
||||
name[0] = name[0].chr.downcase
|
||||
return "m_" + name
|
||||
end
|
||||
|
||||
def write_binary(inst, writer)
|
||||
pre = writer + ".Write ("
|
||||
prp = inst + "." + @property_name
|
||||
suf = ")"
|
||||
return case @type
|
||||
when "byte", "ushort", "short", "uint", "int"
|
||||
pre + prp + suf
|
||||
when "RVA"
|
||||
pre + prp + ".Value" + suf
|
||||
when "DataDirectory"
|
||||
pre + prp + ".VirtualAddress" + suf + ";\n\t\t\t" + pre + prp + ".Size" + suf
|
||||
else
|
||||
pre + "(" + @objtype.underlying + ") " + prp + suf
|
||||
end
|
||||
end
|
||||
|
||||
def read_binary(inst)
|
||||
return case @type
|
||||
when "byte"
|
||||
inst + ".ReadByte ()"
|
||||
when "ushort"
|
||||
inst + ".ReadUInt16 ()";
|
||||
when "short"
|
||||
inst + ".ReadInt16 ()";
|
||||
when "uint"
|
||||
inst + ".ReadUInt32 ()";
|
||||
when "int"
|
||||
inst + ".ReadInt32 ()";
|
||||
when "RVA"
|
||||
"new RVA (" + inst + ".ReadUInt32 ())"
|
||||
when "DataDirectory"
|
||||
"new DataDirectory (\n new RVA (" + inst + ".ReadUInt32 ()),\n " + inst + ".ReadUInt32 ())"
|
||||
else
|
||||
"(" + @objtype.name + ") " + case @objtype.underlying
|
||||
when "int"
|
||||
inst + ".ReadInt32 ()";
|
||||
when "short"
|
||||
inst + ".ReadInt16 ()";
|
||||
when "ushort"
|
||||
inst + ".ReadUInt16 ()";
|
||||
when "uint"
|
||||
inst + ".ReadUInt32 ()";
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Type
|
||||
|
||||
attr_reader(:name)
|
||||
attr_reader(:size)
|
||||
attr_reader(:underlying)
|
||||
|
||||
def initialize(name, size, underlying = nil)
|
||||
@name = name
|
||||
@size = size
|
||||
@underlying = underlying
|
||||
end
|
||||
end
|
||||
|
||||
class Table < Evolutive
|
||||
|
||||
attr_reader(:ref_ns)
|
||||
attr_reader(:rid)
|
||||
attr_reader(:name)
|
||||
attr_reader(:table_name)
|
||||
attr_reader(:row_name)
|
||||
attr_reader(:columns)
|
||||
|
||||
def initialize(name, rid, requ)
|
||||
super(requ)
|
||||
@name = name
|
||||
@table_name = name + "Table"
|
||||
@row_name = name + "Row"
|
||||
@rid = rid
|
||||
@ref_ns = Array.new
|
||||
@columns = Array.new
|
||||
end
|
||||
|
||||
def add_column(col)
|
||||
if (!@ref_ns.include?(col.ns) && col.ns.length != 0 && col.ns != "Mono.Cecil.Metadata") then
|
||||
@ref_ns.push(col.ns)
|
||||
@ref_ns.sort!()
|
||||
end
|
||||
@columns.push(col)
|
||||
end
|
||||
|
||||
def row_size()
|
||||
size = 0
|
||||
@columns.each { |col|
|
||||
size += col.size
|
||||
}
|
||||
return size
|
||||
end
|
||||
end
|
||||
|
||||
class Column < FieldWorker
|
||||
|
||||
def initialize(name, type, target)
|
||||
super(name, type, target)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Collection
|
||||
|
||||
attr_reader(:type)
|
||||
attr_reader(:intf)
|
||||
attr_reader(:name)
|
||||
attr_reader(:container)
|
||||
attr_reader(:container_impl)
|
||||
attr_reader(:item_name)
|
||||
attr_reader(:visitable)
|
||||
attr_reader(:visitor)
|
||||
attr_reader(:visitThis)
|
||||
attr_reader(:visitItem)
|
||||
attr_reader(:lazyload)
|
||||
attr_reader(:pathtoloader)
|
||||
attr_reader(:target)
|
||||
attr_reader(:indexed)
|
||||
|
||||
def initialize(type, container, visit, name, lazyload, pathtoloader, target, indexed = false, usecntintf = false)
|
||||
@type = type
|
||||
basename = (name.nil? ? type : name)
|
||||
@intf = "I" + basename + "Collection"
|
||||
@name = @intf[1..@intf.length]
|
||||
@item_name = basename[0..basename.length]
|
||||
@container = container
|
||||
@container_impl = usecntintf ? @container : @container[0..@container.length]
|
||||
if (!visit.nil?) then
|
||||
@visitable = visit + "Visitable"
|
||||
@visitor = visit + "Visitor"
|
||||
@visitThis = "Visit" + @name
|
||||
@visitItem = "Visit" + @item_name
|
||||
end
|
||||
@lazyload = lazyload
|
||||
@pathtoloader = pathtoloader
|
||||
@target = target
|
||||
@indexed = indexed
|
||||
end
|
||||
end
|
||||
|
||||
class OpCode < Evolutive
|
||||
|
||||
attr_reader(:name)
|
||||
attr_reader(:field_name)
|
||||
attr_reader(:op1)
|
||||
attr_reader(:op2)
|
||||
attr_reader(:size)
|
||||
attr_reader(:flowcontrol)
|
||||
attr_reader(:opcodetype)
|
||||
attr_reader(:operandtype)
|
||||
attr_reader(:stackbehaviourpop)
|
||||
attr_reader(:stackbehaviourpush)
|
||||
|
||||
def initialize(name, op1, op2, flowcontrol, opcodetype, operandtype, stackbehaviourpop, stackbehaviourpush, requ)
|
||||
super(requ)
|
||||
@name = name
|
||||
@field_name = name_to_prop(name)
|
||||
@op1 = op1 ; @op2 = op2
|
||||
@size = @op1 == "0xff" ? 1 : 2
|
||||
@flowcontrol = "FlowControl." + flowcontrol
|
||||
@opcodetype = "OpCodeType." + opcodetype
|
||||
@operandtype = "OperandType." + operandtype
|
||||
@stackbehaviourpop = "StackBehaviour." + stackbehaviourpop
|
||||
@stackbehaviourpush = "StackBehaviour." + stackbehaviourpush
|
||||
end
|
||||
|
||||
def name_to_prop(name)
|
||||
field = ""
|
||||
ar = name.split(".")
|
||||
ar.each { |part|
|
||||
field += part.capitalize()
|
||||
field += "_" unless ar.last == part
|
||||
}
|
||||
return field
|
||||
end
|
||||
end
|
||||
|
||||
class Field < FieldWorker
|
||||
|
||||
attr_reader(:default)
|
||||
|
||||
def initialize(name, type, default)
|
||||
super(name, type, nil)
|
||||
@default = default
|
||||
end
|
||||
end
|
||||
|
||||
class CodedIndexTable
|
||||
|
||||
attr_reader(:name)
|
||||
attr_reader(:tag)
|
||||
|
||||
def initialize(name, tag)
|
||||
@name = name
|
||||
@tag = tag
|
||||
end
|
||||
end
|
||||
|
||||
class CodedIndex < Evolutive
|
||||
|
||||
attr_reader(:name)
|
||||
attr_reader(:size)
|
||||
attr_reader(:tables)
|
||||
|
||||
def initialize(name, size, requ)
|
||||
super(requ)
|
||||
@name = name
|
||||
@size = size
|
||||
@tables = Array.new
|
||||
end
|
||||
|
||||
def add_table(name, tag)
|
||||
@tables.push(CodedIndexTable.new(name, tag))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,161 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
# extern libraries used by code generator
|
||||
|
||||
require 'erb'
|
||||
require 'rexml/document'
|
||||
|
||||
# our library
|
||||
|
||||
require 'cecil-gen-types'
|
||||
|
||||
# time to generate code now
|
||||
|
||||
$types = Hash.new
|
||||
$tables = Array.new
|
||||
$colls = Array.new
|
||||
$coded_indexes = Array.new
|
||||
$ops = Array.new
|
||||
|
||||
doc = REXML::Document.new(File.open("cecil.xml"))
|
||||
|
||||
doc.root.each_element("/cecil/types//type") { |node|
|
||||
type = Cecil::Type.new(
|
||||
node.attribute("name").value,
|
||||
node.attribute("size").value.to_i,
|
||||
(node.attribute("underlying").nil? ? nil : node.attribute("underlying").value))
|
||||
$types[type.name] = type
|
||||
}
|
||||
|
||||
doc.root.each_element("/cecil/metadata/tables//table") { |node|
|
||||
table = Cecil::Table.new(node.attribute("name").value,
|
||||
node.attribute("rid").value,
|
||||
node.attribute("requires").nil? ? nil : node.attribute("requires").value)
|
||||
node.each_element("column") { |col|
|
||||
column = Cecil::Column.new(col.attribute("name").value,
|
||||
$types[col.attribute("type").value],
|
||||
col.attribute("target").nil? ? nil : col.attribute("target").value)
|
||||
table.add_column(column)
|
||||
}
|
||||
$tables.push(table)
|
||||
}
|
||||
|
||||
$tables.sort!() { |a, b|
|
||||
a.name <=> b.name
|
||||
}
|
||||
|
||||
$stables = $tables.sort { |a, b|
|
||||
eval(a.rid) <=> eval(b.rid)
|
||||
}
|
||||
|
||||
doc.root.each_element("/cecil/metadata/codedindexes//codedindex") { |node|
|
||||
ci = Cecil::CodedIndex.new(node.attribute("name").value,
|
||||
node.attribute("size").value,
|
||||
node.attribute("requires").nil? ? nil : node.attribute("requires").value)
|
||||
node.each_element("table") { |table|
|
||||
ci.add_table(table.attribute("name").value, table.attribute("tag").value)
|
||||
}
|
||||
$coded_indexes.push(ci)
|
||||
}
|
||||
|
||||
doc.root.each_element("/cecil/metadata/opcodes//opcode") { |node|
|
||||
$ops.push(Cecil::OpCode.new(node.attribute("name").value, node.attribute("op1").value,
|
||||
node.attribute("op2").value, node.attribute("flowcontrol").value,
|
||||
node.attribute("opcodetype").value, node.attribute("operandtype").value,
|
||||
node.attribute("stackbehaviourpop").value, node.attribute("stackbehaviourpush").value,
|
||||
node.attribute("requires").nil? ? nil : node.attribute("requires").value))
|
||||
}
|
||||
|
||||
$ops.sort!() { |a, b|
|
||||
if a.op1 == b.op1
|
||||
eval(a.op2) <=> eval(b.op2)
|
||||
elsif a.op1 == "0xff"
|
||||
-1
|
||||
else
|
||||
1
|
||||
end
|
||||
}
|
||||
|
||||
doc.root.each_element("/cecil/collections//collection") { |node|
|
||||
$colls.push(Cecil::Collection.new(node.attribute("type").value, node.attribute("container").value,
|
||||
(node.attribute("visit").nil? ? nil : node.attribute("visit").value),
|
||||
(node.attribute("name").nil? ? nil : node.attribute("name").value),
|
||||
(node.attribute("lazyload").nil? ? false : node.attribute("lazyload").value == "true"),
|
||||
(node.attribute("pathtoloader").nil? ? nil : node.attribute("pathtoloader").value),
|
||||
node.attribute("target").value,
|
||||
(node.attribute("indexed").nil? ? false : node.attribute("indexed").value == "true"),
|
||||
(node.attribute("usecontainerinterface").nil? ? false : node.attribute("usecontainerinterface").value == "true")))
|
||||
}
|
||||
|
||||
def cecil_compile(file, template)
|
||||
|
||||
erb = ERB.new(IO.read(template))
|
||||
res = erb.result
|
||||
|
||||
if (!File.exists?(file))
|
||||
|
||||
File.open(file, File::CREAT|File::WRONLY|File::TRUNC) { |cur_file|
|
||||
cur_file.write(res)
|
||||
}
|
||||
|
||||
puts("#Created: #{file}")
|
||||
|
||||
else
|
||||
|
||||
ext = ".tmp"
|
||||
|
||||
File.open(file + ext, File::CREAT|File::WRONLY|File::TRUNC) { |temp_file|
|
||||
temp_file.write(res)
|
||||
}
|
||||
|
||||
save = Array.new
|
||||
|
||||
[file, file + ext].each { |fileloc|
|
||||
File.open(fileloc, File::RDONLY) { |f|
|
||||
buf = f.readlines
|
||||
buf.each { |line|
|
||||
line.chomp!()
|
||||
}
|
||||
buf = buf.join
|
||||
buf = buf[buf.index("SOFTWARE."), buf.length]
|
||||
save.push(buf)
|
||||
}
|
||||
}
|
||||
|
||||
if (save[0] != save[1]) then
|
||||
File.delete(file) if File.exists?(file)
|
||||
File.rename(file + ext, file)
|
||||
puts("#Modified: #{file}")
|
||||
else
|
||||
File.delete(file + ext)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
$tables.each { |table|
|
||||
$cur_table = table
|
||||
filename = "../Mono.Cecil.Metadata/" + table.name + ".cs"
|
||||
cecil_compile(filename, "./templates/Table.cs")
|
||||
}
|
||||
$cur_table = nil
|
||||
|
||||
[ "MetadataTableReader.cs", "MetadataRowReader.cs",
|
||||
"MetadataTableWriter.cs", "MetadataRowWriter.cs", "BaseMetadataVisitor.cs",
|
||||
"CodedIndex.cs", "Utilities.cs" ].each { |file|
|
||||
cecil_compile("../Mono.Cecil.Metadata/" + file, "./templates/" + file)
|
||||
}
|
||||
|
||||
cecil_compile("../Mono.Cecil.Metadata/IMetadataVisitor.cs", "./templates/IMetadataVisitor.cs")
|
||||
|
||||
cecil_compile("../Mono.Cecil.Cil/OpCodes.cs", "./templates/OpCodes.cs")
|
||||
cecil_compile("../Mono.Cecil.Cil/Code.cs", "./templates/Code.cs")
|
||||
|
||||
$colls.each { |coll|
|
||||
$cur_coll = coll
|
||||
file = "../#{coll.target}/" + coll.name + ".cs"
|
||||
type = coll.indexed ? "Indexed" : "Named"
|
||||
template = "./templates/#{type}Collection.cs"
|
||||
|
||||
cecil_compile(file, template)
|
||||
}
|
||||
$cur_coll = nil
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
#
|
||||
# usage cecil-mig.rb directory
|
||||
#
|
||||
|
||||
dir = ARGV.length > 0 ? ARGV[0] : "."
|
||||
|
||||
$replaces = {
|
||||
"GenericParamAttributes" => "GenericParameterAttributes",
|
||||
"ParamAttributes" => "ParameterAttributes",
|
||||
"IParameterReference" => "ParameterDefinition",
|
||||
"IPropertyReference" => "PropertyDefinition",
|
||||
"IEventReference" => "EventDefinition",
|
||||
"IVariableReference" => "VariableDefinition",
|
||||
"IMarshalDesc" => "MarshalSpec",
|
||||
"MarshalDesc" => "MarshalSpec",
|
||||
"IArrayMarshalDesc" => "ArrayMarshalSpec",
|
||||
"ArrayMarshalDesc" => "ArrayMarshalSpec",
|
||||
"ICustomMarshalerDesc" => "CustomMarshalerSpec",
|
||||
"CustomMarshalerDesc" => "CustomMarshalerSpec",
|
||||
"ISafeArrayDesc" => "SafeArraySpec",
|
||||
"SafeArrayDesc" => "SafeArraySpec",
|
||||
"IFixedArrayDesc" => "FixedArraySpec",
|
||||
"FixedArrayDesc" => "FixedArraySpec",
|
||||
"IFixedSysStringDesc" => "FixedSysStringSpec",
|
||||
"FixedSysStringDesc" => "FixedSysStringSpec",
|
||||
"IModifierType" => "ModType"
|
||||
}
|
||||
|
||||
$collections = [
|
||||
"AssemblyNameReferenceCollection",
|
||||
"ModuleReferenceCollection",
|
||||
"ModuleDefinitionCollection",
|
||||
"ResourceCollection",
|
||||
"TypeDefinitionCollection",
|
||||
"TypeReferenceCollection",
|
||||
"InterfaceCollection",
|
||||
"ParameterDefinitionCollection",
|
||||
"OverrideCollection",
|
||||
"MethodDefinitionCollection",
|
||||
"ConstructorCollection",
|
||||
"EventDefinitionCollection",
|
||||
"FieldDefinitionCollection",
|
||||
"PropertyDefinitionCollection",
|
||||
"InstructionCollection",
|
||||
"ExceptionHandlerCollection",
|
||||
"VariableDefinitionCollection",
|
||||
"ArrayDimensionCollection",
|
||||
"CustomAttributeCollection",
|
||||
"ExternTypeCollection",
|
||||
"NestedTypeCollection",
|
||||
"SecurityDeclarationCollection",
|
||||
"MemberReferenceCollection",
|
||||
"GenericParameterCollection",
|
||||
"GenericArgumentCollection",
|
||||
"ConstraintCollection"
|
||||
]
|
||||
|
||||
$types = [
|
||||
"AssemblyDefinition",
|
||||
"ArrayDimension",
|
||||
"ArrayType",
|
||||
"AssemblyLinkedResource",
|
||||
"AssemblyNameReference",
|
||||
"AssemblyNameDefinition",
|
||||
"CallSite",
|
||||
"CustomAttribute",
|
||||
"EmbeddedResource",
|
||||
"EventDefinition",
|
||||
"EventReference",
|
||||
"FieldDefinition",
|
||||
"FieldReference",
|
||||
"FunctionPointerType",
|
||||
"GenericInstanceMethod",
|
||||
"GenericInstanceType",
|
||||
"GenericParameter",
|
||||
"LinkedResource",
|
||||
"MethodDefinition",
|
||||
"MethodReference",
|
||||
"MethodReturnType",
|
||||
"ModifierOptional",
|
||||
"ModifierRequired",
|
||||
"ModuleDefinition",
|
||||
"ModuleReference",
|
||||
"ParameterDefinition",
|
||||
"ParameterReference",
|
||||
"PinnedType",
|
||||
"PInvokeInfo",
|
||||
"PropertyDefinition",
|
||||
"PropertyReference",
|
||||
"ReferenceType",
|
||||
"Resource",
|
||||
"SecurityDeclaration",
|
||||
"TypeDefinition",
|
||||
"TypeReference",
|
||||
"TypeSpecification",
|
||||
|
||||
"Instruction",
|
||||
"ExceptionHandler",
|
||||
"MethodBody",
|
||||
"VariableDefinition",
|
||||
"VariableReference"
|
||||
]
|
||||
|
||||
def iface(name)
|
||||
return "I" + name
|
||||
end
|
||||
|
||||
def bang(buffer, re, str)
|
||||
nl = "([\\W])"
|
||||
buffer.gsub!(Regexp.new("#{nl}(#{re})#{nl}"), "\\1" + str + "\\3")
|
||||
end
|
||||
|
||||
def process_replaces(buffer)
|
||||
$replaces.each_key { |key|
|
||||
bang(buffer, key, $replaces[key])
|
||||
}
|
||||
end
|
||||
|
||||
def process_collections(buffer)
|
||||
$collections.each { |name|
|
||||
bang(buffer, iface(name), name)
|
||||
}
|
||||
end
|
||||
|
||||
def process_types(buffer)
|
||||
$types.each { |name|
|
||||
bang(buffer, iface(name), name)
|
||||
}
|
||||
end
|
||||
|
||||
def process_unbreak(buffer)
|
||||
$unbreak.each { |name|
|
||||
bang(buffer, name, iface(name))
|
||||
}
|
||||
end
|
||||
|
||||
def process(file)
|
||||
buffer = ""
|
||||
original = ""
|
||||
File.open(file, File::RDONLY) { |f|
|
||||
original = f.read()
|
||||
buffer = original.clone
|
||||
process_replaces(buffer)
|
||||
process_collections(buffer)
|
||||
process_types(buffer)
|
||||
}
|
||||
|
||||
File.open(file, File::WRONLY | File::TRUNC) { |f|
|
||||
f.write(buffer)
|
||||
puts("#{file} processed")
|
||||
} if (original != buffer)
|
||||
|
||||
end
|
||||
|
||||
Dir[File.join(dir, "**", "*.*")].each { |file|
|
||||
process(file) if not File.directory?(file)
|
||||
}
|
||||
@@ -1,608 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<cecil>
|
||||
|
||||
<types>
|
||||
<type name="byte" size="1" />
|
||||
<type name="ushort" size="2" />
|
||||
<type name="short" size="2" />
|
||||
<type name="uint" size="4" />
|
||||
<type name="int" size="4" />
|
||||
<type name="Mono.Cecil.Binary.DataDirectory" size="8" />
|
||||
<type name="Mono.Cecil.Binary.ImageCharacteristics" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.Binary.DebugStoreType" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.Binary.SubSystem" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.Binary.SectionCharacteristics" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.Binary.RVA" size="4" />
|
||||
<type name="Mono.Cecil.Binary.RuntimeImage" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.AssemblyHashAlgorithm" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.AssemblyFlags" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.EventAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.TypeAttributes" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.FieldAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.FileAttributes" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.GenericParameterAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.PInvokeAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.ParameterAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.PropertyAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.ManifestResourceAttributes" underlying="uint" size="4" />
|
||||
<type name="Mono.Cecil.MethodAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.MethodImplAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.MethodSemanticsAttributes" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.SecurityAction" underlying="short" size="2" />
|
||||
<type name="Mono.Cecil.Metadata.ElementType" underlying="ushort" size="2" />
|
||||
<type name="Mono.Cecil.Metadata.MetadataToken" underlying="uint" size="4" />
|
||||
</types>
|
||||
|
||||
<!--
|
||||
All details about the Metadata
|
||||
reader and writer of Cecil
|
||||
-->
|
||||
<metadata>
|
||||
|
||||
<!--
|
||||
This part contains ECMA spec
|
||||
about CIL tables and rows positions
|
||||
in a valid CLI image
|
||||
-->
|
||||
<tables>
|
||||
<table name="Assembly" rid="0x20">
|
||||
<column name="HashAlgId" type="Mono.Cecil.AssemblyHashAlgorithm" />
|
||||
<column name="MajorVersion" type="ushort" />
|
||||
<column name="MinorVersion" type="ushort" />
|
||||
<column name="BuildNumber" type="ushort" />
|
||||
<column name="RevisionNumber" type="ushort" />
|
||||
<column name="Flags" type="Mono.Cecil.AssemblyFlags" />
|
||||
<column name="PublicKey" type="uint" target="BlobHeap" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Culture" type="uint" target="StringsHeap" />
|
||||
</table>
|
||||
<table name="AssemblyOS" rid="0x22">
|
||||
<column name="OSPlatformID" type="uint" />
|
||||
<column name="OSMajorVersion" type="uint" />
|
||||
<column name="OSMinorVersion" type="uint" />
|
||||
</table>
|
||||
<table name="AssemblyProcessor" rid="0x21">
|
||||
<column name="Processor" type="uint" />
|
||||
</table>
|
||||
<table name="AssemblyRef" rid="0x23">
|
||||
<column name="MajorVersion" type="ushort" />
|
||||
<column name="MinorVersion" type="ushort" />
|
||||
<column name="BuildNumber" type="ushort" />
|
||||
<column name="RevisionNumber" type="ushort" />
|
||||
<column name="Flags" type="Mono.Cecil.AssemblyFlags" />
|
||||
<column name="PublicKeyOrToken" type="uint" target="BlobHeap" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Culture" type="uint" target="StringsHeap" />
|
||||
<column name="HashValue" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="AssemblyRefOS" rid="0x25">
|
||||
<column name="OSPlatformID" type="uint" />
|
||||
<column name="OSMajorVersion" type="uint" />
|
||||
<column name="OSMinorVersion" type="uint" />
|
||||
<column name="AssemblyRef" type="uint" target="AssemblyRef" />
|
||||
</table>
|
||||
<table name="AssemblyRefProcessor" rid="0x24">
|
||||
<column name="Processor" type="uint" />
|
||||
<column name="AssemblyRef" type="uint" target="AssemblyRef" />
|
||||
</table>
|
||||
<table name="ClassLayout" rid="0x0f">
|
||||
<column name="PackingSize" type="ushort" />
|
||||
<column name="ClassSize" type="uint" />
|
||||
<column name="Parent" type="uint" target="TypeDef" />
|
||||
</table>
|
||||
<table name="Constant" rid="0x0b">
|
||||
<column name="Type" type="Mono.Cecil.Metadata.ElementType" />
|
||||
<column name="Parent" type="Mono.Cecil.Metadata.MetadataToken" target="HasConstant" />
|
||||
<column name="Value" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="CustomAttribute" rid="0x0c">
|
||||
<column name="Parent" type="Mono.Cecil.Metadata.MetadataToken" target="HasCustomAttribute" />
|
||||
<column name="Type" type="Mono.Cecil.Metadata.MetadataToken" target="CustomAttributeType" />
|
||||
<column name="Value" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="DeclSecurity" rid="0x0e">
|
||||
<column name="Action" type="Mono.Cecil.SecurityAction" />
|
||||
<column name="Parent" type="Mono.Cecil.Metadata.MetadataToken" target="HasDeclSecurity" />
|
||||
<column name="PermissionSet" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="EventMap" rid="0x12">
|
||||
<column name="Parent" type="uint" target="TypeDef" />
|
||||
<column name="EventList" type="uint" target="Event" />
|
||||
</table>
|
||||
<table name="Event" rid="0x14">
|
||||
<column name="EventFlags" type="Mono.Cecil.EventAttributes" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="EventType" type="Mono.Cecil.Metadata.MetadataToken" target="TypeDefOrRef" />
|
||||
</table>
|
||||
<table name="EventPtr" rid="0x13">
|
||||
<column name="Event" type="uint" target="Event" />
|
||||
</table>
|
||||
<table name="ExportedType" rid="0x27">
|
||||
<column name="Flags" type="Mono.Cecil.TypeAttributes" />
|
||||
<column name="TypeDefId" type="uint" />
|
||||
<column name="TypeName" type="uint" target="StringsHeap" />
|
||||
<column name="TypeNamespace" type="uint" target="StringsHeap" />
|
||||
<column name="Implementation" type="Mono.Cecil.Metadata.MetadataToken" target="Implementation" />
|
||||
</table>
|
||||
<table name="Field" rid="0x04">
|
||||
<column name="Flags" type="Mono.Cecil.FieldAttributes" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Signature" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="FieldLayout" rid="0x10">
|
||||
<column name="Offset" type="uint" />
|
||||
<column name="Field" type="uint" target="Field" />
|
||||
</table>
|
||||
<table name="FieldMarshal" rid="0x0d">
|
||||
<column name="Parent" type="Mono.Cecil.Metadata.MetadataToken" target="HasFieldMarshal" />
|
||||
<column name="NativeType" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="FieldPtr" rid="0x03">
|
||||
<column name="Field" type="uint" target="Field" />
|
||||
</table>
|
||||
<table name="FieldRVA" rid="0x1d">
|
||||
<column name="RVA" type="Mono.Cecil.Binary.RVA" />
|
||||
<column name="Field" type="uint" target="Field" />
|
||||
</table>
|
||||
<table name="File" rid="0x26">
|
||||
<column name="Flags" type="Mono.Cecil.FileAttributes" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="HashValue" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="GenericParam" rid="0x2a" requires="NET_2_0">
|
||||
<column name="Number" type="ushort" />
|
||||
<column name="Flags" type="Mono.Cecil.GenericParameterAttributes" />
|
||||
<column name="Owner" type="Mono.Cecil.Metadata.MetadataToken" target="TypeOrMethodDef" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
</table>
|
||||
<table name="GenericParamConstraint" rid="0x2c" requires="NET_2_0">
|
||||
<column name="Owner" type="uint" target="GenericParam" />
|
||||
<column name="Constraint" type="Mono.Cecil.Metadata.MetadataToken" target="TypeDefOrRef" />
|
||||
</table>
|
||||
<table name="ImplMap" rid="0x1c">
|
||||
<column name="MappingFlags" type="Mono.Cecil.PInvokeAttributes" />
|
||||
<column name="MemberForwarded" type="Mono.Cecil.Metadata.MetadataToken" target="MemberForwarded" />
|
||||
<column name="ImportName" type="uint" target="StringsHeap" />
|
||||
<column name="ImportScope" type="uint" target="ModuleRef" />
|
||||
</table>
|
||||
<table name="InterfaceImpl" rid="0x09">
|
||||
<column name="Class" type="uint" target="TypeDef" />
|
||||
<column name="Interface" type="Mono.Cecil.Metadata.MetadataToken" target="TypeDefOrRef" />
|
||||
</table>
|
||||
<table name="ManifestResource" rid="0x28">
|
||||
<column name="Offset" type="uint" />
|
||||
<column name="Flags" type="Mono.Cecil.ManifestResourceAttributes" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Implementation" type="Mono.Cecil.Metadata.MetadataToken" target="Implementation" />
|
||||
</table>
|
||||
<table name="MemberRef" rid="0x0a">
|
||||
<column name="Class" type="Mono.Cecil.Metadata.MetadataToken" target="MemberRefParent" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Signature" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="Method" rid="0x06">
|
||||
<column name="RVA" type="Mono.Cecil.Binary.RVA" />
|
||||
<column name="ImplFlags" type="Mono.Cecil.MethodImplAttributes" />
|
||||
<column name="Flags" type="Mono.Cecil.MethodAttributes" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Signature" type="uint" target="BlobHeap" />
|
||||
<column name="ParamList" type="uint" target="Param" />
|
||||
</table>
|
||||
<table name="MethodImpl" rid="0x19">
|
||||
<column name="Class" type="uint" target="TypeDef" />
|
||||
<column name="MethodBody" type="Mono.Cecil.Metadata.MetadataToken" target="MethodDefOrRef" />
|
||||
<column name="MethodDeclaration" type="Mono.Cecil.Metadata.MetadataToken" target="MethodDefOrRef" />
|
||||
</table>
|
||||
<table name="MethodPtr" rid="0x05">
|
||||
<column name="Method" type="uint" target="Method" />
|
||||
</table>
|
||||
<table name="MethodSemantics" rid="0x18">
|
||||
<column name="Semantics" type="Mono.Cecil.MethodSemanticsAttributes" />
|
||||
<column name="Method" type="uint" target="Method" />
|
||||
<column name="Association" type="Mono.Cecil.Metadata.MetadataToken" target="HasSemantics" />
|
||||
</table>
|
||||
<table name="MethodSpec" rid="0x2b" requires="NET_2_0">
|
||||
<column name="Method" type="Mono.Cecil.Metadata.MetadataToken" target="MethodDefOrRef" />
|
||||
<column name="Instantiation" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="Module" rid="0x00">
|
||||
<column name="Generation" type="ushort" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Mvid" type="uint" target="GuidHeap" />
|
||||
<column name="EncId" type="uint" target="GuidHeap" />
|
||||
<column name="EncBaseId" type="uint" target="GuidHeap" />
|
||||
</table>
|
||||
<table name="ModuleRef" rid="0x1a">
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
</table>
|
||||
<table name="NestedClass" rid="0x29">
|
||||
<column name="NestedClass" type="uint" target="TypeDef" />
|
||||
<column name="EnclosingClass" type="uint" target="TypeDef" />
|
||||
</table>
|
||||
<table name="Param" rid="0x08">
|
||||
<column name="Flags" type="Mono.Cecil.ParameterAttributes" />
|
||||
<column name="Sequence" type="ushort" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
</table>
|
||||
<table name="ParamPtr" rid="0x07">
|
||||
<column name="Param" type="uint" target="Param" />
|
||||
</table>
|
||||
<table name="Property" rid="0x17">
|
||||
<column name="Flags" type="Mono.Cecil.PropertyAttributes" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Type" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="PropertyMap" rid="0x15">
|
||||
<column name="Parent" type="uint" target="TypeDef" />
|
||||
<column name="PropertyList" type="uint" target="Property" />
|
||||
</table>
|
||||
<table name="PropertyPtr" rid="0x16">
|
||||
<column name="Property" type="uint" target="Property" />
|
||||
</table>
|
||||
<table name="StandAloneSig" rid="0x11">
|
||||
<column name="Signature" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
<table name="TypeDef" rid="0x02">
|
||||
<column name="Flags" type="Mono.Cecil.TypeAttributes" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Namespace" type="uint" target="StringsHeap" />
|
||||
<column name="Extends" type="Mono.Cecil.Metadata.MetadataToken" target="TypeDefOrRef" />
|
||||
<column name="FieldList" type="uint" target="Field" />
|
||||
<column name="MethodList" type="uint" target="Method" />
|
||||
</table>
|
||||
<table name="TypeRef" rid="0x01">
|
||||
<column name="ResolutionScope" type="Mono.Cecil.Metadata.MetadataToken" target="ResolutionScope" />
|
||||
<column name="Name" type="uint" target="StringsHeap" />
|
||||
<column name="Namespace" type="uint" target="StringsHeap" />
|
||||
</table>
|
||||
<table name="TypeSpec" rid="0x1b">
|
||||
<column name="Signature" type="uint" target="BlobHeap" />
|
||||
</table>
|
||||
</tables>
|
||||
|
||||
<codedindexes>
|
||||
<codedindex name="TypeDefOrRef" size="2">
|
||||
<table name="TypeDef" tag="0" />
|
||||
<table name="TypeRef" tag="1" />
|
||||
<table name="TypeSpec" tag="2" />
|
||||
</codedindex>
|
||||
<codedindex name="HasConstant" size="2">
|
||||
<table name="Field" tag="0" />
|
||||
<table name="Param" tag="1" />
|
||||
<table name="Property" tag="2" />
|
||||
</codedindex>
|
||||
<codedindex name="HasCustomAttribute" size="5">
|
||||
<table name="Method" tag="0" />
|
||||
<table name="Field" tag="1" />
|
||||
<table name="TypeRef" tag="2" />
|
||||
<table name="TypeDef" tag="3" />
|
||||
<table name="Param" tag="4" />
|
||||
<table name="InterfaceImpl" tag="5" />
|
||||
<table name="MemberRef" tag="6" />
|
||||
<table name="Module" tag="7" />
|
||||
<table name="DeclSecurity" tag="8" />
|
||||
<table name="Property" tag="9" />
|
||||
<table name="Event" tag="10" />
|
||||
<table name="StandAloneSig" tag="11" />
|
||||
<table name="ModuleRef" tag="12" />
|
||||
<table name="TypeSpec" tag="13" />
|
||||
<table name="Assembly" tag="14" />
|
||||
<table name="AssemblyRef" tag="15" />
|
||||
<table name="File" tag="16" />
|
||||
<table name="ExportedType" tag="17" />
|
||||
<table name="ManifestResource" tag="18" />
|
||||
<table name="GenericParam" tag="19" />
|
||||
</codedindex>
|
||||
<codedindex name="HasFieldMarshal" size="1">
|
||||
<table name="Field" tag="0" />
|
||||
<table name="Param" tag="1" />
|
||||
</codedindex>
|
||||
<codedindex name="HasDeclSecurity" size="2">
|
||||
<table name="TypeDef" tag="0" />
|
||||
<table name="Method" tag="1" />
|
||||
<table name="Assembly" tag="2" />
|
||||
</codedindex>
|
||||
<codedindex name="MemberRefParent" size="3">
|
||||
<table name="TypeDef" tag="0" />
|
||||
<table name="TypeRef" tag="1" />
|
||||
<table name="ModuleRef" tag="2" />
|
||||
<table name="Method" tag="3" />
|
||||
<table name="TypeSpec" tag="4" />
|
||||
</codedindex>
|
||||
<codedindex name="HasSemantics" size="1">
|
||||
<table name="Event" tag="0" />
|
||||
<table name="Property" tag="1" />
|
||||
</codedindex>
|
||||
<codedindex name="MethodDefOrRef" size="1">
|
||||
<table name="Method" tag="0" />
|
||||
<table name="MemberRef" tag="1" />
|
||||
</codedindex>
|
||||
<codedindex name="MemberForwarded" size="1">
|
||||
<table name="Field" tag="0" />
|
||||
<table name="Method" tag="1" />
|
||||
</codedindex>
|
||||
<codedindex name="Implementation" size="2">
|
||||
<table name="File" tag="0" />
|
||||
<table name="AssemblyRef" tag="1" />
|
||||
<table name="ExportedType" tag="2" />
|
||||
</codedindex>
|
||||
<codedindex name="CustomAttributeType" size="3">
|
||||
<table name="Method" tag="2" />
|
||||
<table name="MemberRef" tag="3" />
|
||||
</codedindex>
|
||||
<codedindex name="ResolutionScope" size="2">
|
||||
<table name="Module" tag="0" />
|
||||
<table name="ModuleRef" tag="1" />
|
||||
<table name="AssemblyRef" tag="2" />
|
||||
<table name="TypeRef" tag="3" />
|
||||
</codedindex>
|
||||
<codedindex name="TypeOrMethodDef" size="1" requires="NET_2_0">
|
||||
<table name="TypeDef" tag="0" />
|
||||
<table name="Method" tag="1" />
|
||||
</codedindex>
|
||||
</codedindexes>
|
||||
|
||||
<!--
|
||||
This part contains all the standards opcodes
|
||||
-->
|
||||
<opcodes>
|
||||
<opcode name="nop" op1="0xff" op2="0x00" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="break" op1="0xff" op2="0x01" flowcontrol="Break" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldarg.0" op1="0xff" op2="0x02" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldarg.1" op1="0xff" op2="0x03" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldarg.2" op1="0xff" op2="0x04" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldarg.3" op1="0xff" op2="0x05" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldloc.0" op1="0xff" op2="0x06" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldloc.1" op1="0xff" op2="0x07" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldloc.2" op1="0xff" op2="0x08" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldloc.3" op1="0xff" op2="0x09" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="stloc.0" op1="0xff" op2="0x0a" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="stloc.1" op1="0xff" op2="0x0b" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="stloc.2" op1="0xff" op2="0x0c" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="stloc.3" op1="0xff" op2="0x0d" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldarg.s" op1="0xff" op2="0x0e" flowcontrol="Next" opcodetype="Macro" operandtype="ShortInlineParam" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldarga.s" op1="0xff" op2="0x0f" flowcontrol="Next" opcodetype="Macro" operandtype="ShortInlineParam" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="starg.s" op1="0xff" op2="0x10" flowcontrol="Next" opcodetype="Macro" operandtype="ShortInlineParam" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldloc.s" op1="0xff" op2="0x11" flowcontrol="Next" opcodetype="Macro" operandtype="ShortInlineVar" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldloca.s" op1="0xff" op2="0x12" flowcontrol="Next" opcodetype="Macro" operandtype="ShortInlineVar" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="stloc.s" op1="0xff" op2="0x13" flowcontrol="Next" opcodetype="Macro" operandtype="ShortInlineVar" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldnull" op1="0xff" op2="0x14" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushref" />
|
||||
<opcode name="ldc.i4.m1" op1="0xff" op2="0x15" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.0" op1="0xff" op2="0x16" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.1" op1="0xff" op2="0x17" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.2" op1="0xff" op2="0x18" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.3" op1="0xff" op2="0x19" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.4" op1="0xff" op2="0x1a" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.5" op1="0xff" op2="0x1b" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.6" op1="0xff" op2="0x1c" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.7" op1="0xff" op2="0x1d" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.8" op1="0xff" op2="0x1e" flowcontrol="Next" opcodetype="Macro" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4.s" op1="0xff" op2="0x1f" flowcontrol="Next" opcodetype="Macro" operandtype="ShortInlineI" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i4" op1="0xff" op2="0x20" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineI" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldc.i8" op1="0xff" op2="0x21" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineI8" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="ldc.r4" op1="0xff" op2="0x22" flowcontrol="Next" opcodetype="Primitive" operandtype="ShortInlineR" stackbehaviourpop="Pop0" stackbehaviourpush="Pushr4" />
|
||||
<opcode name="ldc.r8" op1="0xff" op2="0x23" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineR" stackbehaviourpop="Pop0" stackbehaviourpush="Pushr8" />
|
||||
<opcode name="dup" op1="0xff" op2="0x25" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push1_push1" />
|
||||
<opcode name="pop" op1="0xff" op2="0x26" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="jmp" op1="0xff" op2="0x27" flowcontrol="Call" opcodetype="Primitive" operandtype="InlineMethod" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="call" op1="0xff" op2="0x28" flowcontrol="Call" opcodetype="Primitive" operandtype="InlineMethod" stackbehaviourpop="Varpop" stackbehaviourpush="Varpush" />
|
||||
<opcode name="calli" op1="0xff" op2="0x29" flowcontrol="Call" opcodetype="Primitive" operandtype="InlineSig" stackbehaviourpop="Varpop" stackbehaviourpush="Varpush" />
|
||||
<opcode name="ret" op1="0xff" op2="0x2a" flowcontrol="Return" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Varpop" stackbehaviourpush="Push0" />
|
||||
<opcode name="br.s" op1="0xff" op2="0x2b" flowcontrol="Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="brfalse.s" op1="0xff" op2="0x2c" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="brtrue.s" op1="0xff" op2="0x2d" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="beq.s" op1="0xff" op2="0x2e" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bge.s" op1="0xff" op2="0x2f" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bgt.s" op1="0xff" op2="0x30" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ble.s" op1="0xff" op2="0x31" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="blt.s" op1="0xff" op2="0x32" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bne.un.s" op1="0xff" op2="0x33" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bge.un.s" op1="0xff" op2="0x34" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bgt.un.s" op1="0xff" op2="0x35" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ble.un.s" op1="0xff" op2="0x36" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="blt.un.s" op1="0xff" op2="0x37" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="br" op1="0xff" op2="0x38" flowcontrol="Branch" opcodetype="Primitive" operandtype="InlineBrTarget" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="brfalse" op1="0xff" op2="0x39" flowcontrol="Cond_Branch" opcodetype="Primitive" operandtype="InlineBrTarget" stackbehaviourpop="Popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="brtrue" op1="0xff" op2="0x3a" flowcontrol="Cond_Branch" opcodetype="Primitive" operandtype="InlineBrTarget" stackbehaviourpop="Popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="beq" op1="0xff" op2="0x3b" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bge" op1="0xff" op2="0x3c" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bgt" op1="0xff" op2="0x3d" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ble" op1="0xff" op2="0x3e" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="blt" op1="0xff" op2="0x3f" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bne.un" op1="0xff" op2="0x40" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bge.un" op1="0xff" op2="0x41" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="bgt.un" op1="0xff" op2="0x42" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ble.un" op1="0xff" op2="0x43" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="blt.un" op1="0xff" op2="0x44" flowcontrol="Cond_Branch" opcodetype="Macro" operandtype="InlineBrTarget" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="switch" op1="0xff" op2="0x45" flowcontrol="Cond_Branch" opcodetype="Primitive" operandtype="InlineSwitch" stackbehaviourpop="Popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldind.i1" op1="0xff" op2="0x46" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldind.u1" op1="0xff" op2="0x47" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldind.i2" op1="0xff" op2="0x48" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldind.u2" op1="0xff" op2="0x49" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldind.i4" op1="0xff" op2="0x4a" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldind.u4" op1="0xff" op2="0x4b" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldind.i8" op1="0xff" op2="0x4c" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="ldind.i" op1="0xff" op2="0x4d" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldind.r4" op1="0xff" op2="0x4e" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushr4" />
|
||||
<opcode name="ldind.r8" op1="0xff" op2="0x4f" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushr8" />
|
||||
<opcode name="ldind.ref" op1="0xff" op2="0x50" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushref" />
|
||||
<opcode name="stind.ref" op1="0xff" op2="0x51" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stind.i1" op1="0xff" op2="0x52" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stind.i2" op1="0xff" op2="0x53" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stind.i4" op1="0xff" op2="0x54" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stind.i8" op1="0xff" op2="0x55" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi8" stackbehaviourpush="Push0" />
|
||||
<opcode name="stind.r4" op1="0xff" op2="0x56" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popr4" stackbehaviourpush="Push0" />
|
||||
<opcode name="stind.r8" op1="0xff" op2="0x57" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popr8" stackbehaviourpush="Push0" />
|
||||
<opcode name="add" op1="0xff" op2="0x58" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="sub" op1="0xff" op2="0x59" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="mul" op1="0xff" op2="0x5a" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="div" op1="0xff" op2="0x5b" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="div.un" op1="0xff" op2="0x5c" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="rem" op1="0xff" op2="0x5d" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="rem.un" op1="0xff" op2="0x5e" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="and" op1="0xff" op2="0x5f" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="or" op1="0xff" op2="0x60" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="xor" op1="0xff" op2="0x61" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="shl" op1="0xff" op2="0x62" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="shr" op1="0xff" op2="0x63" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="shr.un" op1="0xff" op2="0x64" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="neg" op1="0xff" op2="0x65" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="not" op1="0xff" op2="0x66" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="conv.i1" op1="0xff" op2="0x67" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.i2" op1="0xff" op2="0x68" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.i4" op1="0xff" op2="0x69" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.i8" op1="0xff" op2="0x6a" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="conv.r4" op1="0xff" op2="0x6b" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushr4" />
|
||||
<opcode name="conv.r8" op1="0xff" op2="0x6c" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushr8" />
|
||||
<opcode name="conv.u4" op1="0xff" op2="0x6d" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.u8" op1="0xff" op2="0x6e" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="callvirt" op1="0xff" op2="0x6f" flowcontrol="Call" opcodetype="Objmodel" operandtype="InlineMethod" stackbehaviourpop="Varpop" stackbehaviourpush="Varpush" />
|
||||
<opcode name="cpobj" op1="0xff" op2="0x70" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldobj" op1="0xff" op2="0x71" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popi" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldstr" op1="0xff" op2="0x72" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineString" stackbehaviourpop="Pop0" stackbehaviourpush="Pushref" />
|
||||
<opcode name="newobj" op1="0xff" op2="0x73" flowcontrol="Call" opcodetype="Objmodel" operandtype="InlineMethod" stackbehaviourpop="Varpop" stackbehaviourpush="Pushref" />
|
||||
<opcode name="castclass" op1="0xff" op2="0x74" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popref" stackbehaviourpush="Pushref" />
|
||||
<opcode name="isinst" op1="0xff" op2="0x75" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popref" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.r.un" op1="0xff" op2="0x76" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushr8" />
|
||||
<opcode name="unbox" op1="0xff" op2="0x79" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineType" stackbehaviourpop="Popref" stackbehaviourpush="Pushi" />
|
||||
<opcode name="throw" op1="0xff" op2="0x7a" flowcontrol="Throw" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldfld" op1="0xff" op2="0x7b" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineField" stackbehaviourpop="Popref" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldflda" op1="0xff" op2="0x7c" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineField" stackbehaviourpop="Popref" stackbehaviourpush="Pushi" />
|
||||
<opcode name="stfld" op1="0xff" op2="0x7d" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineField" stackbehaviourpop="Popref_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldsfld" op1="0xff" op2="0x7e" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineField" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldsflda" op1="0xff" op2="0x7f" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineField" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="stsfld" op1="0xff" op2="0x80" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineField" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="stobj" op1="0xff" op2="0x81" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popi_pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="conv.ovf.i1.un" op1="0xff" op2="0x82" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.i2.un" op1="0xff" op2="0x83" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.i4.un" op1="0xff" op2="0x84" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.i8.un" op1="0xff" op2="0x85" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="conv.ovf.u1.un" op1="0xff" op2="0x86" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u2.un" op1="0xff" op2="0x87" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u4.un" op1="0xff" op2="0x88" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u8.un" op1="0xff" op2="0x89" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="conv.ovf.i.un" op1="0xff" op2="0x8a" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u.un" op1="0xff" op2="0x8b" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="box" op1="0xff" op2="0x8c" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineType" stackbehaviourpop="Pop1" stackbehaviourpush="Pushref" />
|
||||
<opcode name="newarr" op1="0xff" op2="0x8d" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popi" stackbehaviourpush="Pushref" />
|
||||
<opcode name="ldlen" op1="0xff" op2="0x8e" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelema" op1="0xff" op2="0x8f" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.i1" op1="0xff" op2="0x90" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.u1" op1="0xff" op2="0x91" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.i2" op1="0xff" op2="0x92" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.u2" op1="0xff" op2="0x93" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.i4" op1="0xff" op2="0x94" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.u4" op1="0xff" op2="0x95" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.i8" op1="0xff" op2="0x96" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="ldelem.i" op1="0xff" op2="0x97" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldelem.r4" op1="0xff" op2="0x98" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushr4" />
|
||||
<opcode name="ldelem.r8" op1="0xff" op2="0x99" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushr8" />
|
||||
<opcode name="ldelem.ref" op1="0xff" op2="0x9a" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi" stackbehaviourpush="Pushref" />
|
||||
<opcode name="stelem.i" op1="0xff" op2="0x9b" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stelem.i1" op1="0xff" op2="0x9c" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stelem.i2" op1="0xff" op2="0x9d" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stelem.i4" op1="0xff" op2="0x9e" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="stelem.i8" op1="0xff" op2="0x9f" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popi8" stackbehaviourpush="Push0" />
|
||||
<opcode name="stelem.r4" op1="0xff" op2="0xa0" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popr4" stackbehaviourpush="Push0" />
|
||||
<opcode name="stelem.r8" op1="0xff" op2="0xa1" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popr8" stackbehaviourpush="Push0" />
|
||||
<opcode name="stelem.ref" op1="0xff" op2="0xa2" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Popref_popi_popref" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldelem.any" op1="0xff" op2="0xa3" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popref_popi" stackbehaviourpush="Push1" requires="NET_2_0" />
|
||||
<opcode name="stelem.any" op1="0xff" op2="0xa4" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popref_popi_popref" stackbehaviourpush="Push0" requires="NET_2_0" />
|
||||
<opcode name="unbox.any" op1="0xff" op2="0xa5" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popref" stackbehaviourpush="Push1" requires="NET_2_0" />
|
||||
<opcode name="conv.ovf.i1" op1="0xff" op2="0xb3" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u1" op1="0xff" op2="0xb4" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.i2" op1="0xff" op2="0xb5" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u2" op1="0xff" op2="0xb6" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.i4" op1="0xff" op2="0xb7" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u4" op1="0xff" op2="0xb8" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.i8" op1="0xff" op2="0xb9" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="conv.ovf.u8" op1="0xff" op2="0xba" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi8" />
|
||||
<opcode name="refanyval" op1="0xff" op2="0xc2" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineType" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ckfinite" op1="0xff" op2="0xc3" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushr8" />
|
||||
<opcode name="mkrefany" op1="0xff" op2="0xc6" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineType" stackbehaviourpop="Popi" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldtoken" op1="0xff" op2="0xd0" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineTok" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.u2" op1="0xff" op2="0xd1" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.u1" op1="0xff" op2="0xd2" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.i" op1="0xff" op2="0xd3" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.i" op1="0xff" op2="0xd4" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="conv.ovf.u" op1="0xff" op2="0xd5" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="add.ovf" op1="0xff" op2="0xd6" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="add.ovf.un" op1="0xff" op2="0xd7" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="mul.ovf" op1="0xff" op2="0xd8" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="mul.ovf.un" op1="0xff" op2="0xd9" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="sub.ovf" op1="0xff" op2="0xda" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="sub.ovf.un" op1="0xff" op2="0xdb" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Push1" />
|
||||
<opcode name="endfinally" op1="0xff" op2="0xdc" flowcontrol="Return" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="leave" op1="0xff" op2="0xdd" flowcontrol="Branch" opcodetype="Primitive" operandtype="InlineBrTarget" stackbehaviourpop="PopAll" stackbehaviourpush="Push0" />
|
||||
<opcode name="leave.s" op1="0xff" op2="0xde" flowcontrol="Branch" opcodetype="Macro" operandtype="ShortInlineBrTarget" stackbehaviourpop="PopAll" stackbehaviourpush="Push0" />
|
||||
<opcode name="stind.i" op1="0xff" op2="0xdf" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="conv.u" op1="0xff" op2="0xe0" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="arglist" op1="0xfe" op2="0x00" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ceq" op1="0xfe" op2="0x01" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="cgt" op1="0xfe" op2="0x02" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="cgt.un" op1="0xfe" op2="0x03" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="clt" op1="0xfe" op2="0x04" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="clt.un" op1="0xfe" op2="0x05" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1_pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldftn" op1="0xfe" op2="0x06" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineMethod" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldvirtftn" op1="0xfe" op2="0x07" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineMethod" stackbehaviourpop="Popref" stackbehaviourpush="Pushi" />
|
||||
<opcode name="ldarg" op1="0xfe" op2="0x09" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineParam" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldarga" op1="0xfe" op2="0x0a" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineParam" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="starg" op1="0xfe" op2="0x0b" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineParam" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="ldloc" op1="0xfe" op2="0x0c" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineVar" stackbehaviourpop="Pop0" stackbehaviourpush="Push1" />
|
||||
<opcode name="ldloca" op1="0xfe" op2="0x0d" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineVar" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="stloc" op1="0xfe" op2="0x0e" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineVar" stackbehaviourpop="Pop1" stackbehaviourpush="Push0" />
|
||||
<opcode name="localloc" op1="0xfe" op2="0x0f" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Pushi" />
|
||||
<opcode name="endfilter" op1="0xfe" op2="0x11" flowcontrol="Return" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="unaligned." op1="0xfe" op2="0x12" flowcontrol="Meta" opcodetype="Prefix" operandtype="ShortInlineI" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="volatile." op1="0xfe" op2="0x13" flowcontrol="Meta" opcodetype="Prefix" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="tail." op1="0xfe" op2="0x14" flowcontrol="Meta" opcodetype="Prefix" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="initobj" op1="0xfe" op2="0x15" flowcontrol="Next" opcodetype="Objmodel" operandtype="InlineType" stackbehaviourpop="Popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="constrained." op1="0xfe" op2="0x16" flowcontrol="Next" opcodetype="Prefix" operandtype="InlineTok" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="cpblk" op1="0xfe" op2="0x17" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="initblk" op1="0xfe" op2="0x18" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Popi_popi_popi" stackbehaviourpush="Push0" />
|
||||
<opcode name="no." op1="0xfe" op2="0x19" flowcontrol="Next" opcodetype="Prefix" operandtype="ShortInlineI" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="rethrow" op1="0xfe" op2="0x1a" flowcontrol="Throw" opcodetype="Objmodel" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
<opcode name="sizeof" op1="0xfe" op2="0x1c" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineType" stackbehaviourpop="Pop0" stackbehaviourpush="Pushi" />
|
||||
<opcode name="refanytype" op1="0xfe" op2="0x1d" flowcontrol="Next" opcodetype="Primitive" operandtype="InlineNone" stackbehaviourpop="Pop1" stackbehaviourpush="Pushi" />
|
||||
<opcode name="readonly." op1="0xfe" op2="0x1e" flowcontrol="Next" opcodetype="Prefix" operandtype="InlineNone" stackbehaviourpop="Pop0" stackbehaviourpush="Push0" />
|
||||
</opcodes>
|
||||
|
||||
</metadata>
|
||||
|
||||
<!--
|
||||
This part contains all the collections
|
||||
that will be used in the Reflection ns
|
||||
-->
|
||||
<collections>
|
||||
<collection type="AssemblyNameReference" container="ModuleDefinition" visit="IReflectionStructure" target="Mono.Cecil" indexed="true" />
|
||||
<collection type="ModuleReference" container="ModuleDefinition" visit="IReflectionStructure" indexed="true" target="Mono.Cecil" />
|
||||
<collection type="ModuleDefinition" container="AssemblyDefinition" visit="IReflectionStructure" indexed="true" target="Mono.Cecil" />
|
||||
<collection type="Resource" container="ModuleDefinition" visit="IReflectionStructure" target="Mono.Cecil" indexed="true" />
|
||||
<collection type="TypeDefinition" container="ModuleDefinition" visit="IReflection" target="Mono.Cecil" />
|
||||
<collection type="TypeReference" container="ModuleDefinition" visit="IReflection" target="Mono.Cecil" />
|
||||
<collection type="TypeReference" container="TypeDefinition" visit="IReflection" name="Interface" indexed="true" target="Mono.Cecil" />
|
||||
<collection type="ParameterDefinition" container="IMemberReference" visit="IReflection" indexed="true" target="Mono.Cecil" />
|
||||
<collection type="MethodReference" container="MethodDefinition" visit="IReflection" name="Override" indexed="true" target="Mono.Cecil" />
|
||||
<collection type="MethodDefinition" container="TypeDefinition" visit="IReflection" indexed="true" target="Mono.Cecil" />
|
||||
<collection type="MethodDefinition" container="TypeDefinition" visit="IReflection" name="Constructor" indexed="true" target="Mono.Cecil" />
|
||||
<collection type="EventDefinition" container="TypeDefinition" visit="IReflection" target="Mono.Cecil" indexed="true" />
|
||||
<collection type="FieldDefinition" container="TypeDefinition" visit="IReflection" target="Mono.Cecil" indexed="true" />
|
||||
<collection type="PropertyDefinition" container="TypeDefinition" visit="IReflection" target="Mono.Cecil" indexed="true" />
|
||||
<collection type="Instruction" container="MethodBody" visit="ICode" indexed="true" target="Mono.Cecil.Cil" />
|
||||
<collection type="ExceptionHandler" container="MethodBody" visit="ICode" indexed="true" target="Mono.Cecil.Cil" />
|
||||
<collection type="VariableDefinition" container="IVariableDefinitionProvider" visit="ICode" indexed="true" target="Mono.Cecil.Cil" />
|
||||
<collection type="ArrayDimension" container="ArrayType" target="Mono.Cecil" indexed="true" />
|
||||
<!-- modified behaviour
|
||||
<collection type="SecurityDeclaration" container="IHasSecurity" usecontainerinterface="true" target="Mono.Cecil" indexed="true" visit="IReflection" />
|
||||
-->
|
||||
<collection type="CustomAttribute" container="ICustomAttributeProvider" usecontainerinterface="true" target="Mono.Cecil" indexed="true" visit="IReflection" />
|
||||
<collection type="TypeReference" container="ModuleDefinition" target="Mono.Cecil" visit="IReflection" name="ExternType" />
|
||||
<collection type="TypeDefinition" container="TypeDefinition" target="Mono.Cecil" visit="IReflection" name="NestedType" indexed="true" />
|
||||
<collection type="MemberReference" container="ModuleDefinition" target="Mono.Cecil" visit="IReflection" indexed="true" />
|
||||
<collection type="GenericParameter" container="IGenericParameterProvider" usecontainerinterface="true" target="Mono.Cecil" indexed="true" visit="IReflection" />
|
||||
<collection type="TypeReference" name="GenericArgument" container="IGenericInstance" target="Mono.Cecil" indexed="true" />
|
||||
<collection type="TypeReference" name="Constraint" container="GenericParameter" target="Mono.Cecil" indexed="true" />
|
||||
<collection type="Scope" container="IScopeProvider" visit="ICode" target="Mono.Cecil.Cil" indexed="true" />
|
||||
</collections>
|
||||
|
||||
</cecil>
|
||||
@@ -1,112 +0,0 @@
|
||||
//
|
||||
// BaseMetadataVisitor.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
public abstract class BaseMetadataVisitor : IMetadataVisitor {
|
||||
|
||||
public virtual void VisitMetadataRoot (MetadataRoot root)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitMetadataRootHeader (MetadataRoot.MetadataRootHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitMetadataStreamCollection (MetadataStreamCollection streams)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitMetadataStream (MetadataStream stream)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitMetadataStreamHeader (MetadataStream.MetadataStreamHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitGuidHeap (GuidHeap heap)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitStringsHeap (StringsHeap heap)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitTablesHeap (TablesHeap heap)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitBlobHeap (BlobHeap heap)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitUserStringsHeap (UserStringsHeap heap)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void TerminateMetadataRoot (MetadataRoot root)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class BaseMetadataTableVisitor : IMetadataTableVisitor {
|
||||
|
||||
public virtual void VisitTableCollection (TableCollection coll)
|
||||
{
|
||||
}
|
||||
|
||||
<% $tables.each { |table| %> public virtual void Visit<%=table.table_name%> (<%=table.table_name%> table)
|
||||
{
|
||||
}
|
||||
|
||||
<% } %> public virtual void TerminateTableCollection (TableCollection coll)
|
||||
{
|
||||
}
|
||||
|
||||
public abstract IMetadataRowVisitor GetRowVisitor();
|
||||
}
|
||||
|
||||
public abstract class BaseMetadataRowVisitor : IMetadataRowVisitor {
|
||||
|
||||
public virtual void VisitRowCollection (RowCollection coll)
|
||||
{
|
||||
}
|
||||
|
||||
<% $tables.each { |table| %> public virtual void Visit<%=table.row_name%> (<%=table.row_name%> row)
|
||||
{
|
||||
}
|
||||
|
||||
<% } %> public virtual void TerminateRowCollection (RowCollection coll)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// Code.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2007 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Cil {
|
||||
|
||||
public enum Code {
|
||||
<% $ops.each { |op| %> <%=op.field_name%>,
|
||||
<% } %> }
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// CodedIndex.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
public enum CodedIndex {
|
||||
<% $coded_indexes.each { |ci| %> <%=ci.name%><% if ci != $coded_indexes.last %>,<% end %>
|
||||
<% }
|
||||
%> }
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
//
|
||||
// IMetadataVisitor.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
public interface IMetadataVisitor {
|
||||
void VisitMetadataRoot (MetadataRoot root);
|
||||
void VisitMetadataRootHeader (MetadataRoot.MetadataRootHeader header);
|
||||
void VisitMetadataStreamCollection (MetadataStreamCollection streams);
|
||||
void VisitMetadataStream (MetadataStream stream);
|
||||
void VisitMetadataStreamHeader (MetadataStream.MetadataStreamHeader header);
|
||||
void VisitGuidHeap (GuidHeap heap);
|
||||
void VisitStringsHeap (StringsHeap heap);
|
||||
void VisitTablesHeap (TablesHeap heap);
|
||||
void VisitBlobHeap (BlobHeap heap);
|
||||
void VisitUserStringsHeap (UserStringsHeap heap);
|
||||
|
||||
void TerminateMetadataRoot (MetadataRoot root);
|
||||
}
|
||||
|
||||
public interface IMetadataTableVisitor {
|
||||
void VisitTableCollection (TableCollection coll);
|
||||
|
||||
<% $tables.each { |table| %> void Visit<%=table.table_name%> (<%=table.table_name%> table);
|
||||
<% } %>
|
||||
void TerminateTableCollection (TableCollection coll);
|
||||
IMetadataRowVisitor GetRowVisitor();
|
||||
}
|
||||
|
||||
public interface IMetadataRowVisitor {
|
||||
void VisitRowCollection (RowCollection coll);
|
||||
|
||||
<% $tables.each { |table| %> void Visit<%=table.row_name%> (<%=table.row_name%> row);
|
||||
<% } %>
|
||||
void TerminateRowCollection (RowCollection coll);
|
||||
}
|
||||
}
|
||||
@@ -1,296 +0,0 @@
|
||||
//
|
||||
// <%=$cur_coll.name%>.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
<%
|
||||
def member_visibility()
|
||||
return $cur_coll.type == "Instruction" ? "internal" : "public"
|
||||
end
|
||||
|
||||
def use_event?()
|
||||
case $cur_coll.name
|
||||
when "NestedTypeCollection", "MethodDefinitionCollection", "ConstructorCollection", "FieldDefinitionCollection", "EventDefinitionCollection", "PropertyDefinitionCollection"
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
%>
|
||||
namespace <%=$cur_coll.target%> {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
public sealed class <%=$cur_coll.name%> : CollectionBase<% if (!$cur_coll.visitable.nil?) then %>, <%=$cur_coll.visitable%><% end %> {
|
||||
|
||||
<%=$cur_coll.container_impl%> m_container;<%
|
||||
if $cur_coll.type == "Instruction" %>
|
||||
public readonly Instruction Outside = new Instruction (int.MaxValue, OpCodes.Nop);<% end %>
|
||||
|
||||
public <%=$cur_coll.type%> this [int index] {
|
||||
get { return List [index] as <%=$cur_coll.type%>; }
|
||||
set { List [index] = value; }
|
||||
}
|
||||
|
||||
public <%=$cur_coll.container%> Container {
|
||||
get { return m_container; }
|
||||
}
|
||||
|
||||
public <%=$cur_coll.name%> (<%=$cur_coll.container_impl%> container)
|
||||
{
|
||||
m_container = container;
|
||||
}
|
||||
|
||||
<%= member_visibility() %> void Add (<%=$cur_coll.type%> value)
|
||||
{<%
|
||||
if use_event?() %>
|
||||
Attach (value);
|
||||
<% end %>
|
||||
List.Add (value);
|
||||
}
|
||||
<%
|
||||
if use_event?() %>
|
||||
|
||||
public new void Clear ()
|
||||
{
|
||||
foreach (<%=$cur_coll.type%> item in this)
|
||||
Detach (item);
|
||||
|
||||
base.Clear ();
|
||||
}
|
||||
<% end %>
|
||||
public bool Contains (<%=$cur_coll.type%> value)
|
||||
{
|
||||
return List.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (<%=$cur_coll.type%> value)
|
||||
{
|
||||
return List.IndexOf (value);
|
||||
}
|
||||
|
||||
<%= member_visibility() %> void Insert (int index, <%=$cur_coll.type%> value)
|
||||
{<%
|
||||
if use_event?() %>
|
||||
Attach (value);
|
||||
<% end %>
|
||||
List.Insert (index, value);
|
||||
}
|
||||
|
||||
<%= member_visibility() %> void Remove (<%=$cur_coll.type%> value)
|
||||
{
|
||||
List.Remove (value);
|
||||
<% if use_event?() %>
|
||||
Detach (value);
|
||||
<% end %> }
|
||||
<%
|
||||
if use_event?() %>
|
||||
|
||||
<%= member_visibility() %> new void RemoveAt (int index)
|
||||
{
|
||||
<%=$cur_coll.type%> item = this [index];
|
||||
Remove (item);
|
||||
}
|
||||
<% end %>
|
||||
protected override void OnValidate (object o)
|
||||
{
|
||||
if (! (o is <%=$cur_coll.type%>))
|
||||
throw new ArgumentException ("Must be of type " + typeof (<%=$cur_coll.type%>).FullName);
|
||||
}
|
||||
<%
|
||||
case $cur_coll.item_name
|
||||
when "MethodDefinition"
|
||||
%>
|
||||
public MethodDefinition [] GetMethod (string name)
|
||||
{
|
||||
ArrayList ret = new ArrayList ();
|
||||
foreach (MethodDefinition meth in this)
|
||||
if (meth.Name == name)
|
||||
ret.Add (meth);
|
||||
|
||||
return ret.ToArray (typeof (MethodDefinition)) as MethodDefinition [];
|
||||
}
|
||||
|
||||
internal MethodDefinition GetMethodInternal (string name, IList parameters)
|
||||
{
|
||||
foreach (MethodDefinition meth in this) {
|
||||
if (meth.Name != name || meth.Parameters.Count != parameters.Count)
|
||||
continue;
|
||||
|
||||
bool match = true;
|
||||
for (int i = 0; i < parameters.Count; i++) {
|
||||
string pname;
|
||||
object param = parameters [i];
|
||||
if (param is Type)
|
||||
pname = ReflectionHelper.GetTypeSignature (param as Type);
|
||||
else if (param is TypeReference)
|
||||
pname = (param as TypeReference).FullName;
|
||||
else if (param is ParameterDefinition)
|
||||
pname = (param as ParameterDefinition).ParameterType.FullName;
|
||||
else
|
||||
throw new NotSupportedException ();
|
||||
|
||||
if (meth.Parameters [i].ParameterType.FullName != pname) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match)
|
||||
return meth;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public MethodDefinition GetMethod (string name, Type [] parameters)
|
||||
{
|
||||
return GetMethodInternal (name, parameters);
|
||||
}
|
||||
|
||||
public MethodDefinition GetMethod (string name, TypeReference [] parameters)
|
||||
{
|
||||
return GetMethodInternal (name, parameters);
|
||||
}
|
||||
|
||||
public MethodDefinition GetMethod (string name, ParameterDefinitionCollection parameters)
|
||||
{
|
||||
return GetMethodInternal (name, parameters);
|
||||
}
|
||||
<%
|
||||
when "FieldDefinition"
|
||||
%>
|
||||
public FieldDefinition GetField (string name)
|
||||
{
|
||||
foreach (FieldDefinition field in this)
|
||||
if (field.Name == name)
|
||||
return field;
|
||||
|
||||
return null;
|
||||
}
|
||||
<%
|
||||
when "Constructor"
|
||||
%>
|
||||
internal MethodDefinition GetConstructorInternal (bool isStatic, IList parameters)
|
||||
{
|
||||
foreach (MethodDefinition ctor in this) {
|
||||
if (ctor.IsStatic != isStatic || ctor.Parameters.Count != parameters.Count)
|
||||
continue;
|
||||
|
||||
bool match = true;
|
||||
for (int i = 0; i < parameters.Count; i++) {
|
||||
string pname;
|
||||
object param = parameters [i];
|
||||
if (param is Type)
|
||||
pname = ReflectionHelper.GetTypeSignature (param as Type);
|
||||
else if (param is TypeReference)
|
||||
pname = (param as TypeReference).FullName;
|
||||
else if (param is ParameterDefinition)
|
||||
pname = (param as ParameterDefinition).ParameterType.FullName;
|
||||
else
|
||||
throw new NotSupportedException ();
|
||||
|
||||
if (ctor.Parameters [i].ParameterType.FullName != pname) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (match)
|
||||
return ctor;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public MethodDefinition GetConstructor (bool isStatic, Type [] parameters)
|
||||
{
|
||||
return GetConstructorInternal (isStatic, parameters);
|
||||
}
|
||||
|
||||
public MethodDefinition GetConstructor (bool isStatic, TypeReference [] parameters)
|
||||
{
|
||||
return GetConstructorInternal (isStatic, parameters);
|
||||
}
|
||||
|
||||
public MethodDefinition GetConstructor (bool isStatic, ParameterDefinitionCollection parameters)
|
||||
{
|
||||
return GetConstructorInternal (isStatic, parameters);
|
||||
}
|
||||
<%
|
||||
when "EventDefinition"
|
||||
%>
|
||||
public EventDefinition GetEvent (string name)
|
||||
{
|
||||
foreach (EventDefinition evt in this)
|
||||
if (evt.Name == name)
|
||||
return evt;
|
||||
|
||||
return null;
|
||||
}
|
||||
<%
|
||||
when "PropertyDefinition"
|
||||
%>
|
||||
public PropertyDefinition [] GetProperties (string name)
|
||||
{
|
||||
ArrayList ret = new ArrayList ();
|
||||
foreach (PropertyDefinition prop in this)
|
||||
if (prop.Name == name)
|
||||
ret.Add (prop);
|
||||
|
||||
return ret.ToArray (typeof (PropertyDefinition)) as PropertyDefinition [];
|
||||
}
|
||||
<%
|
||||
end
|
||||
|
||||
if use_event?()
|
||||
%>
|
||||
void Attach (MemberReference member)
|
||||
{
|
||||
if (member.DeclaringType != null)
|
||||
throw new ReflectionException ("Member already attached, clone it instead");
|
||||
|
||||
member.DeclaringType = m_container;
|
||||
}
|
||||
|
||||
void Detach (MemberReference member)
|
||||
{
|
||||
member.DeclaringType = null;
|
||||
}
|
||||
<% end
|
||||
if !$cur_coll.visitor.nil? then %>
|
||||
public void Accept (<%=$cur_coll.visitor%> visitor)
|
||||
{
|
||||
visitor.<%=$cur_coll.visitThis%> (this);
|
||||
}
|
||||
<% end %> }
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
//
|
||||
// MetadataRowReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
using Mono.Cecil.Binary;
|
||||
|
||||
class MetadataRowReader : BaseMetadataRowVisitor {
|
||||
|
||||
MetadataTableReader m_mtrv;
|
||||
BinaryReader m_binaryReader;
|
||||
MetadataRoot m_metadataRoot;
|
||||
IDictionary m_ciCache;
|
||||
|
||||
int m_blobHeapIdxSz;
|
||||
int m_stringsHeapIdxSz;
|
||||
int m_guidHeapIdxSz;
|
||||
|
||||
public MetadataRowReader (MetadataTableReader mtrv)
|
||||
{
|
||||
m_mtrv = mtrv;
|
||||
m_binaryReader = mtrv.GetReader ();
|
||||
m_metadataRoot = mtrv.GetMetadataRoot ();
|
||||
m_ciCache = new Hashtable ();
|
||||
}
|
||||
|
||||
int GetIndexSize (int rid)
|
||||
{
|
||||
return m_mtrv.GetNumberOfRows (rid) < (1 << 16) ? 2 : 4;
|
||||
}
|
||||
|
||||
int GetCodedIndexSize (CodedIndex ci)
|
||||
{
|
||||
return Utilities.GetCodedIndexSize (ci,
|
||||
new Utilities.TableRowCounter (m_mtrv.GetNumberOfRows), m_ciCache);
|
||||
}
|
||||
|
||||
uint ReadByIndexSize (int size)
|
||||
{
|
||||
if (size == 2) {
|
||||
return (uint) m_binaryReader.ReadUInt16 ();
|
||||
} else if (size == 4) {
|
||||
return m_binaryReader.ReadUInt32 ();
|
||||
} else {
|
||||
throw new MetadataFormatException ("Non valid size for indexing");
|
||||
}
|
||||
}
|
||||
|
||||
public override void VisitRowCollection (RowCollection coll)
|
||||
{
|
||||
m_blobHeapIdxSz = m_metadataRoot.Streams.BlobHeap != null ?
|
||||
m_metadataRoot.Streams.BlobHeap.IndexSize : 2;
|
||||
m_stringsHeapIdxSz = m_metadataRoot.Streams.StringsHeap != null ?
|
||||
m_metadataRoot.Streams.StringsHeap.IndexSize : 2;
|
||||
m_guidHeapIdxSz = m_metadataRoot.Streams.GuidHeap != null ?
|
||||
m_metadataRoot.Streams.GuidHeap.IndexSize : 2;
|
||||
}
|
||||
|
||||
<% $tables.each { |table| %> public override void Visit<%=table.row_name%> (<%=table.row_name%> row)
|
||||
{
|
||||
<% table.columns.each { |col|
|
||||
if (col.target.nil?)
|
||||
%> row.<%=col.property_name%> = <%=col.read_binary("m_binaryReader")%>;
|
||||
<% elsif (col.target == "BlobHeap")
|
||||
%> row.<%=col.property_name%> = ReadByIndexSize (m_blobHeapIdxSz);
|
||||
<% elsif (col.target == "StringsHeap")
|
||||
%> row.<%=col.property_name%> = ReadByIndexSize (m_stringsHeapIdxSz);
|
||||
<% elsif (col.target == "GuidHeap")
|
||||
%> row.<%=col.property_name%> = ReadByIndexSize (m_guidHeapIdxSz);
|
||||
<% elsif (col.type == "MetadataToken")
|
||||
%> row.<%=col.property_name%> = Utilities.GetMetadataToken (CodedIndex.<%=col.target%>,
|
||||
ReadByIndexSize (GetCodedIndexSize (CodedIndex.<%=col.target%>)));
|
||||
<% else
|
||||
%> row.<%=col.property_name%> = ReadByIndexSize (GetIndexSize (<%=col.target%>Table.RId));
|
||||
<% end
|
||||
}%> }
|
||||
<% } %> }
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
//
|
||||
// MetadataRowWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
using Mono.Cecil.Binary;
|
||||
|
||||
class MetadataRowWriter : BaseMetadataRowVisitor {
|
||||
|
||||
MetadataRoot m_root;
|
||||
MemoryBinaryWriter m_binaryWriter;
|
||||
IDictionary m_ciCache;
|
||||
|
||||
int m_blobHeapIdxSz;
|
||||
int m_stringsHeapIdxSz;
|
||||
int m_guidHeapIdxSz;
|
||||
|
||||
public MetadataRowWriter (MetadataTableWriter mtwv)
|
||||
{
|
||||
m_binaryWriter = mtwv.GetWriter ();
|
||||
m_root = mtwv.GetMetadataRoot ();
|
||||
m_ciCache = new Hashtable ();
|
||||
}
|
||||
|
||||
void WriteBlobPointer (uint pointer)
|
||||
{
|
||||
WriteByIndexSize (pointer, m_blobHeapIdxSz);
|
||||
}
|
||||
|
||||
void WriteStringPointer (uint pointer)
|
||||
{
|
||||
WriteByIndexSize (pointer, m_stringsHeapIdxSz);
|
||||
}
|
||||
|
||||
void WriteGuidPointer (uint pointer)
|
||||
{
|
||||
WriteByIndexSize (pointer, m_guidHeapIdxSz);
|
||||
}
|
||||
|
||||
void WriteTablePointer (uint pointer, int rid)
|
||||
{
|
||||
WriteByIndexSize (pointer, GetNumberOfRows (rid) < (1 << 16) ? 2 : 4);
|
||||
}
|
||||
|
||||
void WriteMetadataToken (MetadataToken token, CodedIndex ci)
|
||||
{
|
||||
WriteByIndexSize (Utilities.CompressMetadataToken (ci, token),
|
||||
Utilities.GetCodedIndexSize (
|
||||
ci, new Utilities.TableRowCounter (GetNumberOfRows), m_ciCache));
|
||||
}
|
||||
|
||||
int GetNumberOfRows (int rid)
|
||||
{
|
||||
IMetadataTable t = m_root.Streams.TablesHeap [rid];
|
||||
if (t == null || t.Rows == null)
|
||||
return 0;
|
||||
return t.Rows.Count;
|
||||
}
|
||||
|
||||
void WriteByIndexSize (uint value, int size)
|
||||
{
|
||||
if (size == 4)
|
||||
m_binaryWriter.Write (value);
|
||||
else if (size == 2)
|
||||
m_binaryWriter.Write ((ushort) value);
|
||||
else
|
||||
throw new MetadataFormatException ("Non valid size for indexing");
|
||||
}
|
||||
|
||||
<% $tables.each { |table|
|
||||
parameters = ""
|
||||
table.columns.each { |col|
|
||||
parameters += col.type
|
||||
parameters += " "
|
||||
parameters += col.field_name[1..col.field_name.length]
|
||||
parameters += ", " if (table.columns.last != col)
|
||||
}
|
||||
%> public <%=table.row_name%> Create<%=table.row_name%> (<%=parameters%>)
|
||||
{
|
||||
<%=table.row_name%> row = new <%=table.row_name%> ();
|
||||
<% table.columns.each { |col| %> row.<%=col.property_name%> = <%=col.field_name[1..col.field_name.length]%>;
|
||||
<% } %> return row;
|
||||
}
|
||||
|
||||
<% } %> public override void VisitRowCollection (RowCollection coll)
|
||||
{
|
||||
m_blobHeapIdxSz = m_root.Streams.BlobHeap != null ?
|
||||
m_root.Streams.BlobHeap.IndexSize : 2;
|
||||
m_stringsHeapIdxSz = m_root.Streams.StringsHeap != null ?
|
||||
m_root.Streams.StringsHeap.IndexSize : 2;
|
||||
m_guidHeapIdxSz = m_root.Streams.GuidHeap != null ?
|
||||
m_root.Streams.GuidHeap.IndexSize : 2;
|
||||
}
|
||||
|
||||
<% $tables.each { |table| %> public override void Visit<%=table.row_name%> (<%=table.row_name%> row)
|
||||
{
|
||||
<% table.columns.each { |col|
|
||||
if (col.target.nil?)
|
||||
%> <%=col.write_binary("row", "m_binaryWriter")%>;
|
||||
<% elsif (col.target == "BlobHeap")
|
||||
%> WriteBlobPointer (row.<%=col.property_name%>);
|
||||
<% elsif (col.target == "StringsHeap")
|
||||
%> WriteStringPointer (row.<%=col.property_name%>);
|
||||
<% elsif (col.target == "GuidHeap")
|
||||
%> WriteGuidPointer (row.<%=col.property_name%>);
|
||||
<% elsif (col.type == "MetadataToken")
|
||||
%> WriteMetadataToken (row.<%=col.property_name%>, CodedIndex.<%=col.target%>);
|
||||
<% else
|
||||
%> WriteTablePointer (row.<%=col.property_name%>, <%=col.target%>Table.RId);
|
||||
<% end
|
||||
}%> }
|
||||
|
||||
<% } %> }
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
//
|
||||
// MetadataTableReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
class MetadataTableReader : BaseMetadataTableVisitor {
|
||||
|
||||
MetadataRoot m_metadataRoot;
|
||||
TablesHeap m_heap;
|
||||
MetadataRowReader m_mrrv;
|
||||
BinaryReader m_binaryReader;
|
||||
|
||||
int [] m_rows = new int [TablesHeap.MaxTableCount];
|
||||
|
||||
public MetadataTableReader (MetadataReader mrv)
|
||||
{
|
||||
m_metadataRoot = mrv.GetMetadataRoot ();
|
||||
m_heap = m_metadataRoot.Streams.TablesHeap;
|
||||
m_binaryReader = new BinaryReader (new MemoryStream (m_heap.Data));
|
||||
m_binaryReader.BaseStream.Position = 24;
|
||||
m_mrrv = new MetadataRowReader (this);
|
||||
}
|
||||
|
||||
public MetadataRoot GetMetadataRoot ()
|
||||
{
|
||||
return m_metadataRoot;
|
||||
}
|
||||
|
||||
public BinaryReader GetReader ()
|
||||
{
|
||||
return m_binaryReader;
|
||||
}
|
||||
|
||||
public override IMetadataRowVisitor GetRowVisitor ()
|
||||
{
|
||||
return m_mrrv;
|
||||
}
|
||||
|
||||
public int GetNumberOfRows (int rid)
|
||||
{
|
||||
return m_rows [rid];
|
||||
}
|
||||
<% $tables.each { |table| %>
|
||||
public <%=table.table_name%> Get<%=table.table_name%> ()
|
||||
{
|
||||
return (<%=table.table_name%>) m_heap [<%=table.table_name%>.RId];
|
||||
}
|
||||
<% } %>
|
||||
public override void VisitTableCollection (TableCollection coll)
|
||||
{
|
||||
<% $stables.each { |table| %> if (m_heap.HasTable (<%=table.table_name%>.RId)) {
|
||||
coll.Add (new <%=table.table_name%> ());
|
||||
m_rows [<%=table.table_name%>.RId] = m_binaryReader.ReadInt32 ();
|
||||
}
|
||||
<% } %> }
|
||||
|
||||
<% $tables.each { |table| %> public override void Visit<%=table.table_name%> (<%=table.table_name%> table)
|
||||
{
|
||||
int number = m_rows [<%=table.table_name%>.RId];
|
||||
table.Rows = new RowCollection (number);
|
||||
for (int i = 0; i < number; i++)
|
||||
table.Rows.Add (new <%=table.row_name%> ());
|
||||
}
|
||||
<% } %> }
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
//
|
||||
// MetadataTableWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
using Mono.Cecil.Binary;
|
||||
|
||||
internal sealed class MetadataTableWriter : BaseMetadataTableVisitor {
|
||||
|
||||
MetadataRoot m_root;
|
||||
TablesHeap m_heap;
|
||||
MetadataRowWriter m_mrrw;
|
||||
MemoryBinaryWriter m_binaryWriter;
|
||||
|
||||
public MetadataTableWriter (MetadataWriter mrv, MemoryBinaryWriter writer)
|
||||
{
|
||||
m_root = mrv.GetMetadataRoot ();
|
||||
m_heap = m_root.Streams.TablesHeap;
|
||||
m_binaryWriter = writer;
|
||||
m_mrrw = new MetadataRowWriter (this);
|
||||
}
|
||||
|
||||
public MetadataRoot GetMetadataRoot ()
|
||||
{
|
||||
return m_root;
|
||||
}
|
||||
|
||||
public override IMetadataRowVisitor GetRowVisitor ()
|
||||
{
|
||||
return m_mrrw;
|
||||
}
|
||||
|
||||
public MemoryBinaryWriter GetWriter ()
|
||||
{
|
||||
return m_binaryWriter;
|
||||
}
|
||||
|
||||
void InitializeTable (IMetadataTable table)
|
||||
{
|
||||
table.Rows = new RowCollection ();
|
||||
m_heap.Valid |= 1L << table.Id;
|
||||
m_heap.Tables.Add (table);
|
||||
}
|
||||
|
||||
void WriteCount (int rid)
|
||||
{
|
||||
if (m_heap.HasTable (rid))
|
||||
m_binaryWriter.Write (m_heap [rid].Rows.Count);
|
||||
}
|
||||
|
||||
<% $tables.each { |table| %> public <%=table.table_name%> Get<%=table.table_name%> ()
|
||||
{
|
||||
<%=table.table_name%> table = m_heap [<%=table.table_name%>.RId] as <%=table.table_name%>;
|
||||
if (table != null)
|
||||
return table;
|
||||
|
||||
table = new <%=table.table_name%> ();
|
||||
InitializeTable (table);
|
||||
return table;
|
||||
}
|
||||
|
||||
<% } %> public override void VisitTableCollection (TableCollection coll)
|
||||
{
|
||||
<% $stables.each { |table| %> WriteCount (<%=table.table_name%>.RId);
|
||||
<% } %> }
|
||||
}
|
||||
}
|
||||
@@ -1,232 +0,0 @@
|
||||
//
|
||||
// <%=$cur_coll.name%>.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
<%
|
||||
def use_event?()
|
||||
case $cur_coll.name
|
||||
when "TypeDefinitionCollection", "TypeReferenceCollection", "ExternTypeCollection"
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
%>
|
||||
namespace <%=$cur_coll.target%> {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
using Hcp = Mono.Cecil.HashCodeProvider;
|
||||
using Cmp = System.Collections.Comparer;
|
||||
|
||||
public sealed class <%=$cur_coll.name%> : NameObjectCollectionBase, IList<% if (!$cur_coll.visitable.nil?) then %>, <%=$cur_coll.visitable%><% end %> {
|
||||
|
||||
<%=$cur_coll.container%> m_container;
|
||||
|
||||
public <%=$cur_coll.type%> this [int index] {
|
||||
get { return this.BaseGet (index) as <%=$cur_coll.type%>; }
|
||||
set { this.BaseSet (index, value); }
|
||||
}
|
||||
|
||||
public <%=$cur_coll.type%> this [string fullName] {
|
||||
get { return this.BaseGet (fullName) as <%=$cur_coll.type%>; }
|
||||
set { this.BaseSet (fullName, value); }
|
||||
}
|
||||
|
||||
public <%=$cur_coll.container%> Container {
|
||||
get { return m_container; }
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get { return this; }
|
||||
}
|
||||
|
||||
bool IList.IsReadOnly {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
bool IList.IsFixedSize {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
object IList.this [int index] {
|
||||
get { return BaseGet (index); }
|
||||
set {
|
||||
Check (value);
|
||||
BaseSet (index, value);
|
||||
}
|
||||
}
|
||||
|
||||
public <%=$cur_coll.name%> (<%=$cur_coll.container%> container) :
|
||||
base (Hcp.Instance, Cmp.Default)
|
||||
{
|
||||
m_container = container;
|
||||
}
|
||||
|
||||
public void Add (<%=$cur_coll.type%> value)
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
|
||||
<% if use_event?() %>Attach (value);<% end %>
|
||||
|
||||
this.BaseAdd (value.FullName, value);
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{<%
|
||||
if use_event?() %>
|
||||
foreach (<%=$cur_coll.type%> item in this)
|
||||
Detach (item);
|
||||
<% end %>
|
||||
this.BaseClear ();
|
||||
}
|
||||
|
||||
public bool Contains (<%=$cur_coll.type%> value)
|
||||
{
|
||||
return Contains (value.FullName);
|
||||
}
|
||||
|
||||
public bool Contains (string fullName)
|
||||
{
|
||||
return this.BaseGet (fullName) != null;
|
||||
}
|
||||
|
||||
public int IndexOf (<%=$cur_coll.type%> value)
|
||||
{
|
||||
string [] keys = this.BaseGetAllKeys ();
|
||||
return Array.IndexOf (keys, value.FullName, 0, keys.Length);
|
||||
}
|
||||
|
||||
public void Remove (<%=$cur_coll.type%> value)
|
||||
{
|
||||
this.BaseRemove (value.FullName);
|
||||
<% if use_event?() %>
|
||||
Detach (value);
|
||||
<% end %> }
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
<%=$cur_coll.type%> item = this [index];
|
||||
Remove (item);
|
||||
<% if use_event?() %>
|
||||
Detach (item);
|
||||
<% end %> }
|
||||
|
||||
public void CopyTo (Array ary, int index)
|
||||
{
|
||||
this.BaseGetAllValues ().CopyTo (ary, index);
|
||||
}
|
||||
|
||||
public new IEnumerator GetEnumerator ()
|
||||
{
|
||||
return this.BaseGetAllValues ().GetEnumerator ();
|
||||
}
|
||||
<% if !$cur_coll.visitor.nil? then %>
|
||||
public void Accept (<%=$cur_coll.visitor%> visitor)
|
||||
{
|
||||
visitor.<%=$cur_coll.visitThis%> (this);
|
||||
}
|
||||
<% end %>
|
||||
#if CF_1_0 || CF_2_0
|
||||
internal object [] BaseGetAllValues ()
|
||||
{
|
||||
object [] values = new object [this.Count];
|
||||
for (int i=0; i < values.Length; ++i) {
|
||||
values [i] = this.BaseGet (i);
|
||||
}
|
||||
return values;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Check (object value)
|
||||
{
|
||||
if (!(value is <%=$cur_coll.type%>))
|
||||
throw new ArgumentException ();
|
||||
}
|
||||
|
||||
int IList.Add (object value)
|
||||
{
|
||||
Check (value);
|
||||
Add (value as <%=$cur_coll.type%>);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool IList.Contains (object value)
|
||||
{
|
||||
Check (value);
|
||||
return Contains (value as <%=$cur_coll.type%>);
|
||||
}
|
||||
|
||||
int IList.IndexOf (object value)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
void IList.Insert (int index, object value)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
void IList.Remove (object value)
|
||||
{
|
||||
Check (value);
|
||||
Remove (value as <%=$cur_coll.type%>);
|
||||
}
|
||||
<%
|
||||
if use_event?()
|
||||
%>
|
||||
void Detach (TypeReference type)
|
||||
{
|
||||
type.Module = null;
|
||||
}
|
||||
|
||||
void Attach (TypeReference type)
|
||||
{
|
||||
if (type.Module != null)
|
||||
throw new ReflectionException ("Type is already attached, clone it instead");
|
||||
|
||||
type.Module = m_container;<%
|
||||
if $cur_coll.type == "TypeDefinition" %>
|
||||
type.AttachToScope (m_container);
|
||||
<% end %>
|
||||
}<%
|
||||
|
||||
end
|
||||
%>
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
//
|
||||
// OpCodes.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
<%
|
||||
oboc = Array.new
|
||||
tboc = Array.new
|
||||
$ops.each { |op|
|
||||
if op.op1 == "0xff"
|
||||
oboc.push(op)
|
||||
else
|
||||
tboc.push(op)
|
||||
end
|
||||
}
|
||||
%>
|
||||
namespace Mono.Cecil.Cil {
|
||||
|
||||
public sealed class OpCodes {
|
||||
|
||||
internal static readonly OpCode [] OneByteOpCode = new OpCode [<%=oboc[oboc.length - 1].op2%> + 1];
|
||||
internal static readonly OpCode [] TwoBytesOpCode = new OpCode [<%=tboc[tboc.length - 1].op2%> + 1];
|
||||
|
||||
<% $ops.each { |op| %> public static readonly OpCode <%=op.field_name%> = new OpCode (
|
||||
"<%=op.name%>", <%=op.op1%>, <%=op.op2%>, <%=op.size%>,
|
||||
Code.<%=op.field_name%>, <%=op.flowcontrol%>,
|
||||
<%=op.opcodetype%>, <%=op.operandtype%>,
|
||||
<%=op.stackbehaviourpop%>, <%=op.stackbehaviourpush%>);
|
||||
|
||||
<% } %> OpCodes()
|
||||
{
|
||||
}
|
||||
|
||||
public static OpCode GetOpCode (Code code)
|
||||
{
|
||||
switch (code) {
|
||||
<% $ops.each { |op| %> case Code.<%=op.field_name%> : return OpCodes.<%=op.field_name%>;
|
||||
<% } %> default : return OpCodes.Nop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
//
|
||||
// <%=$cur_table.table_name%>.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
<% $cur_table.ref_ns.each { |ns| %>
|
||||
using <%=ns%>;
|
||||
<% }
|
||||
%>
|
||||
public sealed class <%=$cur_table.table_name%> : IMetadataTable {
|
||||
|
||||
public const int RId = <%=$cur_table.rid%>;
|
||||
|
||||
RowCollection m_rows;
|
||||
|
||||
public <%=$cur_table.row_name%> this [int index] {
|
||||
get { return m_rows [index] as <%=$cur_table.row_name%>; }
|
||||
set { m_rows [index] = value; }
|
||||
}
|
||||
|
||||
public RowCollection Rows {
|
||||
get { return m_rows; }
|
||||
set { m_rows = value; }
|
||||
}
|
||||
|
||||
public int Id {
|
||||
get { return RId; }
|
||||
}
|
||||
|
||||
internal <%=$cur_table.table_name%> ()
|
||||
{
|
||||
}
|
||||
|
||||
public void Accept (IMetadataTableVisitor visitor)
|
||||
{
|
||||
visitor.Visit<%=$cur_table.table_name%> (this);
|
||||
this.Rows.Accept (visitor.GetRowVisitor ());
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class <%=$cur_table.row_name%> : IMetadataRow {
|
||||
|
||||
<% $cur_table.columns.each { |col| %> public <%=col.type%> <%=col.property_name%>;
|
||||
<% } %>
|
||||
internal <%=$cur_table.row_name%> ()
|
||||
{
|
||||
}
|
||||
|
||||
public void Accept (IMetadataRowVisitor visitor)
|
||||
{
|
||||
visitor.Visit<%=$cur_table.row_name%> (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
//
|
||||
// Tests.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen-tests.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Tests {
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using Mono.Cecil;
|
||||
|
||||
class Language {
|
||||
|
||||
string m_compiler;
|
||||
string m_command;
|
||||
|
||||
public string Compiler {
|
||||
get { return m_compiler; }
|
||||
}
|
||||
|
||||
public string Command {
|
||||
get { return m_command; }
|
||||
}
|
||||
|
||||
public Language (string compiler, string command)
|
||||
{
|
||||
m_compiler = compiler;
|
||||
m_command = command;
|
||||
}
|
||||
|
||||
static IDictionary m_languages = new Hashtable ();
|
||||
|
||||
static Language ()
|
||||
{
|
||||
<%
|
||||
$languages.each { |l|
|
||||
%>
|
||||
m_languages.Add ("<%= l.name %>", new Language (
|
||||
"<%= l.compiler %>",
|
||||
"<%= l.command %>"
|
||||
));
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
|
||||
public static Language GetLanguage (string name)
|
||||
{
|
||||
return (Language) m_languages [name];
|
||||
}
|
||||
}
|
||||
|
||||
class TestCase {
|
||||
|
||||
Language m_lang;
|
||||
FileInfo m_file;
|
||||
|
||||
public TestCase (Language lang, string file)
|
||||
{
|
||||
m_lang = lang;
|
||||
m_file = new FileInfo (file);
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
class GeneratedTests {
|
||||
|
||||
void Test (TestCase test)
|
||||
{
|
||||
}
|
||||
|
||||
<%
|
||||
$tests.each { |test|
|
||||
%>
|
||||
[Test]
|
||||
public void <%= test.method %> ()
|
||||
{
|
||||
Test (new TestCase (
|
||||
Language.GetLanguage ("<%= test.lang.name %>"),
|
||||
@"<%= test.file %>"));
|
||||
}
|
||||
<%
|
||||
}
|
||||
%>
|
||||
}
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
//
|
||||
// Utilities.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// Generated by /CodeGen/cecil-gen.rb do not edit
|
||||
// <%=Time.now%>
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Metadata {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
class Utilities {
|
||||
|
||||
Utilities ()
|
||||
{
|
||||
}
|
||||
|
||||
public static int ReadCompressedInteger (byte [] data, int pos, out int start)
|
||||
{
|
||||
int integer = 0;
|
||||
start = pos;
|
||||
if ((data [pos] & 0x80) == 0) {
|
||||
integer = data [pos];
|
||||
start++;
|
||||
} else if ((data [pos] & 0x40) == 0) {
|
||||
integer = (data [start] & ~0x80) << 8;
|
||||
integer |= data [pos + 1];
|
||||
start += 2;
|
||||
} else {
|
||||
integer = (data [start] & ~0xc0) << 24;
|
||||
integer |= data [pos + 1] << 16;
|
||||
integer |= data [pos + 2] << 8;
|
||||
integer |= data [pos + 3];
|
||||
start += 4;
|
||||
}
|
||||
return integer;
|
||||
}
|
||||
|
||||
public static int WriteCompressedInteger (BinaryWriter writer, int value)
|
||||
{
|
||||
if (value < 0x80)
|
||||
writer.Write ((byte) value);
|
||||
else if (value < 0x4000) {
|
||||
writer.Write ((byte) (0x80 | (value >> 8)));
|
||||
writer.Write ((byte) (value & 0xff));
|
||||
} else {
|
||||
writer.Write ((byte) ((value >> 24) | 0xc0));
|
||||
writer.Write ((byte) ((value >> 16) & 0xff));
|
||||
writer.Write ((byte) ((value >> 8) & 0xff));
|
||||
writer.Write ((byte) (value & 0xff));
|
||||
}
|
||||
return (int) writer.BaseStream.Position;
|
||||
}
|
||||
|
||||
public static MetadataToken GetMetadataToken (CodedIndex cidx, uint data)
|
||||
{
|
||||
uint rid = 0;
|
||||
switch (cidx) {
|
||||
<% $coded_indexes.each { |ci| %> case CodedIndex.<%=ci.name%> :
|
||||
rid = data >> <%=ci.size%>;
|
||||
switch (data & <%=(2 ** ci.size.to_i - 1).to_s%>) {
|
||||
<% ci.tables.each { |tbl|
|
||||
name = tbl.name
|
||||
if (name == "DeclSecurity")
|
||||
name = "Permission"
|
||||
elsif (name == "StandAloneSig")
|
||||
name = "Signature"
|
||||
end
|
||||
%> case <%=tbl.tag%> :
|
||||
return new MetadataToken (TokenType.<%=name%>, rid);
|
||||
<% }
|
||||
%> default :
|
||||
return MetadataToken.Zero;
|
||||
}
|
||||
<% } %> default :
|
||||
return MetadataToken.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
public static uint CompressMetadataToken (CodedIndex cidx, MetadataToken token)
|
||||
{
|
||||
uint ret = 0;
|
||||
if (token.RID == 0)
|
||||
return ret;
|
||||
switch (cidx) {
|
||||
<% $coded_indexes.each { |ci| %> case CodedIndex.<%=ci.name%> :
|
||||
ret = token.RID << <%=ci.size%>;
|
||||
switch (token.TokenType) {
|
||||
<% ci.tables.each { |tbl|
|
||||
name = tbl.name
|
||||
if (name == "DeclSecurity")
|
||||
name = "Permission"
|
||||
elsif (name == "StandAloneSig")
|
||||
name = "Signature"
|
||||
end
|
||||
%> case TokenType.<%=name%> :
|
||||
return ret | <%=tbl.tag%>;
|
||||
<% }
|
||||
%> default :
|
||||
throw new MetadataFormatException("Non valid Token for <%=ci.name%>");
|
||||
}
|
||||
<% } %> default :
|
||||
throw new MetadataFormatException ("Non valid CodedIndex");
|
||||
}
|
||||
}
|
||||
|
||||
internal static Type GetCorrespondingTable (TokenType t)
|
||||
{
|
||||
switch (t) {
|
||||
case TokenType.Assembly :
|
||||
return typeof (AssemblyTable);
|
||||
case TokenType.AssemblyRef :
|
||||
return typeof (AssemblyRefTable);
|
||||
case TokenType.CustomAttribute :
|
||||
return typeof (CustomAttributeTable);
|
||||
case TokenType.Event :
|
||||
return typeof (EventTable);
|
||||
case TokenType.ExportedType :
|
||||
return typeof (ExportedTypeTable);
|
||||
case TokenType.Field :
|
||||
return typeof (FieldTable);
|
||||
case TokenType.File :
|
||||
return typeof (FileTable);
|
||||
case TokenType.InterfaceImpl :
|
||||
return typeof (InterfaceImplTable);
|
||||
case TokenType.MemberRef :
|
||||
return typeof (MemberRefTable);
|
||||
case TokenType.Method :
|
||||
return typeof (MethodTable);
|
||||
case TokenType.Module :
|
||||
return typeof (ModuleTable);
|
||||
case TokenType.ModuleRef :
|
||||
return typeof (ModuleRefTable);
|
||||
case TokenType.Param :
|
||||
return typeof (ParamTable);
|
||||
case TokenType.Permission :
|
||||
return typeof (DeclSecurityTable);
|
||||
case TokenType.Property :
|
||||
return typeof (PropertyTable);
|
||||
case TokenType.Signature :
|
||||
return typeof (StandAloneSigTable);
|
||||
case TokenType.TypeDef :
|
||||
return typeof (TypeDefTable);
|
||||
case TokenType.TypeRef :
|
||||
return typeof (TypeRefTable);
|
||||
case TokenType.TypeSpec :
|
||||
return typeof (TypeSpecTable);
|
||||
default :
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
internal delegate int TableRowCounter (int rid);
|
||||
|
||||
internal static int GetCodedIndexSize (CodedIndex ci, TableRowCounter rowCounter, IDictionary codedIndexCache)
|
||||
{
|
||||
int bits = 0, max = 0;
|
||||
if (codedIndexCache [ci] != null)
|
||||
return (int) codedIndexCache [ci];
|
||||
|
||||
int res = 0;
|
||||
int [] rids;
|
||||
switch (ci) {
|
||||
<% $coded_indexes.each { |ci| %> case CodedIndex.<%=ci.name%> :
|
||||
bits = <%=ci.size%>;
|
||||
rids = new int [<%=ci.tables.length%>];
|
||||
<% ci.tables.each_with_index { |tbl, i|
|
||||
%> rids [<%=i%>] = <%=tbl.name%>Table.RId;
|
||||
<% }
|
||||
%> break;
|
||||
<% } %> default :
|
||||
throw new MetadataFormatException ("Non valid CodedIndex");
|
||||
}
|
||||
|
||||
for (int i = 0; i < rids.Length; i++) {
|
||||
int rows = rowCounter (rids [i]);
|
||||
if (rows > max) max = rows;
|
||||
}
|
||||
|
||||
res = max < (1 << (16 - bits)) ? 2 : 4;
|
||||
codedIndexCache [ci] = res;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
thisdir = class/Mono.Cecil
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.Cecil.dll
|
||||
LIBRARY_SNK = ../mono.snk
|
||||
LIBRARY_PACKAGE = none
|
||||
|
||||
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll -keyfile:$(LIBRARY_SNK)
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include ../../build/library.make
|
||||
@@ -1,101 +0,0 @@
|
||||
//
|
||||
// BaseImageVisitor.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2005 - 2007 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Binary {
|
||||
|
||||
public abstract class BaseImageVisitor : IBinaryVisitor {
|
||||
|
||||
public virtual void VisitImage (Image img)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitDOSHeader (DOSHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitPEFileHeader (PEFileHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitPEOptionalHeader (PEOptionalHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitStandardFieldsHeader (PEOptionalHeader.StandardFieldsHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitNTSpecificFieldsHeader (PEOptionalHeader.NTSpecificFieldsHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitDataDirectoriesHeader (PEOptionalHeader.DataDirectoriesHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitSectionCollection (SectionCollection coll)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitSection (Section section)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitImportAddressTable (ImportAddressTable iat)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitDebugHeader (DebugHeader dh)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitCLIHeader (CLIHeader header)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitImportTable (ImportTable it)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitImportLookupTable (ImportLookupTable ilt)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitHintNameTable (HintNameTable hnt)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitExportTable (ExportTable et)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void TerminateImage (Image img)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
//
|
||||
// CLIHeader.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Binary {
|
||||
|
||||
public sealed class CLIHeader : IHeader, IBinaryVisitable {
|
||||
|
||||
public uint Cb;
|
||||
public ushort MajorRuntimeVersion;
|
||||
public ushort MinorRuntimeVersion;
|
||||
public DataDirectory Metadata;
|
||||
public RuntimeImage Flags;
|
||||
public uint EntryPointToken;
|
||||
public DataDirectory Resources;
|
||||
public DataDirectory StrongNameSignature;
|
||||
public DataDirectory CodeManagerTable;
|
||||
public DataDirectory VTableFixups;
|
||||
public DataDirectory ExportAddressTableJumps;
|
||||
public DataDirectory ManagedNativeHeader;
|
||||
|
||||
public byte [] ImageHash;
|
||||
|
||||
internal CLIHeader ()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetDefaultValues ()
|
||||
{
|
||||
Cb = 0x48;
|
||||
MajorRuntimeVersion = 2;
|
||||
MinorRuntimeVersion = 0;
|
||||
Flags = RuntimeImage.ILOnly;
|
||||
CodeManagerTable = DataDirectory.Zero;
|
||||
ExportAddressTableJumps = DataDirectory.Zero;
|
||||
ManagedNativeHeader = DataDirectory.Zero;
|
||||
}
|
||||
|
||||
public void Accept (IBinaryVisitor visitor)
|
||||
{
|
||||
visitor.VisitCLIHeader (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
//
|
||||
// CopyImageVisitor.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Binary {
|
||||
|
||||
class CopyImageVisitor : BaseImageVisitor {
|
||||
|
||||
Image m_newImage;
|
||||
Image m_originalImage;
|
||||
|
||||
public CopyImageVisitor (Image originalImage)
|
||||
{
|
||||
m_originalImage = originalImage;
|
||||
}
|
||||
|
||||
public override void VisitImage (Image img)
|
||||
{
|
||||
m_newImage = img;
|
||||
if (m_originalImage.DebugHeader != null)
|
||||
m_newImage.AddDebugHeader ();
|
||||
}
|
||||
|
||||
public override void VisitDebugHeader (DebugHeader dbgHeader)
|
||||
{
|
||||
DebugHeader old = m_originalImage.DebugHeader;
|
||||
dbgHeader.Age = old.Age;
|
||||
dbgHeader.Characteristics = old.Characteristics;
|
||||
dbgHeader.FileName = old.FileName;
|
||||
dbgHeader.Signature = old.Signature;
|
||||
dbgHeader.TimeDateStamp = ImageInitializer.TimeDateStampFromEpoch();
|
||||
dbgHeader.Type = old.Type;
|
||||
}
|
||||
|
||||
public override void VisitSectionCollection (SectionCollection sections)
|
||||
{
|
||||
Section old = null;
|
||||
foreach (Section s in m_originalImage.Sections)
|
||||
if (s.Name == Section.Resources)
|
||||
old = s;
|
||||
|
||||
if (old == null)
|
||||
return;
|
||||
|
||||
Section rsrc = new Section ();
|
||||
rsrc.Characteristics = old.Characteristics;
|
||||
rsrc.Name = old.Name;
|
||||
|
||||
sections.Add (rsrc);
|
||||
}
|
||||
|
||||
public override void TerminateImage (Image img)
|
||||
{
|
||||
if (m_originalImage.ResourceDirectoryRoot == null)
|
||||
return;
|
||||
|
||||
m_newImage.ResourceDirectoryRoot = CloneResourceDirectoryTable (m_originalImage.ResourceDirectoryRoot);
|
||||
}
|
||||
|
||||
ResourceDirectoryTable CloneResourceDirectoryTable (ResourceDirectoryTable old)
|
||||
{
|
||||
ResourceDirectoryTable rdt = new ResourceDirectoryTable ();
|
||||
foreach (ResourceDirectoryEntry oldEntry in old.Entries)
|
||||
rdt.Entries.Add (CloneResourceDirectoryEntry (oldEntry));
|
||||
|
||||
return rdt;
|
||||
}
|
||||
|
||||
ResourceDirectoryEntry CloneResourceDirectoryEntry (ResourceDirectoryEntry old)
|
||||
{
|
||||
ResourceDirectoryEntry rde;
|
||||
if (old.IdentifiedByName)
|
||||
rde = new ResourceDirectoryEntry(old.Name);
|
||||
else
|
||||
rde = new ResourceDirectoryEntry (old.ID);
|
||||
|
||||
if (old.Child is ResourceDirectoryTable)
|
||||
rde.Child = CloneResourceDirectoryTable (old.Child as ResourceDirectoryTable);
|
||||
else
|
||||
rde.Child = CloneResourceDataEntry (old.Child as ResourceDataEntry);
|
||||
|
||||
return rde;
|
||||
}
|
||||
|
||||
ResourceDataEntry CloneResourceDataEntry (ResourceDataEntry old)
|
||||
{
|
||||
ResourceDataEntry rde = new ResourceDataEntry ();
|
||||
rde.Size = old.Size;
|
||||
rde.Codepage = old.Codepage;
|
||||
rde.ResourceData = old.ResourceData;
|
||||
|
||||
return rde;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// DOSHeader.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Binary {
|
||||
|
||||
public sealed class DOSHeader : IHeader, IBinaryVisitable {
|
||||
|
||||
public byte [] Start;
|
||||
public byte [] End;
|
||||
|
||||
public uint Lfanew;
|
||||
|
||||
internal DOSHeader ()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetDefaultValues ()
|
||||
{
|
||||
Start = new byte [60] {
|
||||
0x4d, 0x5a, 0x90, 0x00, 0x03, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
Lfanew = 128;
|
||||
End = new byte [64] {
|
||||
0x0e, 0x1f, 0xba, 0x0e, 0x00, 0xb4, 0x09,
|
||||
0xcd, 0x21, 0xb8, 0x01, 0x4c, 0xcd, 0x21,
|
||||
0x54, 0x68, 0x69, 0x73, 0x20, 0x70, 0x72,
|
||||
0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x63,
|
||||
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x62,
|
||||
0x65, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x69,
|
||||
0x6e, 0x20, 0x44, 0x4f, 0x53, 0x20, 0x6d,
|
||||
0x6f, 0x64, 0x65, 0x2e, 0x0d, 0x0d, 0x0a,
|
||||
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00
|
||||
};
|
||||
}
|
||||
|
||||
public void Accept (IBinaryVisitor visitor)
|
||||
{
|
||||
visitor.VisitDOSHeader (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
//
|
||||
// DataDirectory.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Binary {
|
||||
|
||||
using Mono.Cecil.Metadata;
|
||||
|
||||
public struct DataDirectory {
|
||||
|
||||
public static readonly DataDirectory Zero = new DataDirectory(RVA.Zero, 0);
|
||||
|
||||
RVA m_virtualAddress;
|
||||
uint m_size;
|
||||
|
||||
public RVA VirtualAddress {
|
||||
get { return m_virtualAddress; }
|
||||
set { m_virtualAddress = value; }
|
||||
}
|
||||
|
||||
public uint Size {
|
||||
get { return m_size; }
|
||||
set { m_size = value; }
|
||||
}
|
||||
|
||||
public DataDirectory (RVA virtualAddress, uint size)
|
||||
{
|
||||
m_virtualAddress = virtualAddress;
|
||||
m_size = size;
|
||||
}
|
||||
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return (m_virtualAddress.GetHashCode () ^ (int) m_size << 1);
|
||||
}
|
||||
|
||||
public override bool Equals (object other)
|
||||
{
|
||||
if (other is DataDirectory) {
|
||||
DataDirectory odd = (DataDirectory)other;
|
||||
return (this.m_virtualAddress == odd.m_virtualAddress &&
|
||||
this.m_size == odd.m_size);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return string.Format ("{0} [{1}]",
|
||||
m_virtualAddress.ToString (), m_size.ToString ("X"));
|
||||
}
|
||||
|
||||
public static bool operator == (DataDirectory one, DataDirectory other)
|
||||
{
|
||||
return one.Equals (other);
|
||||
}
|
||||
|
||||
public static bool operator != (DataDirectory one, DataDirectory other)
|
||||
{
|
||||
return !one.Equals (other);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
//
|
||||
// DebugHeader.cs
|
||||
//
|
||||
// Author:
|
||||
// Jb Evain ([email protected])
|
||||
//
|
||||
// (C) 2005 Jb Evain
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Mono.Cecil.Binary {
|
||||
|
||||
using System;
|
||||
|
||||
public sealed class DebugHeader : IHeader, IBinaryVisitable {
|
||||
|
||||
public uint Characteristics;
|
||||
public uint TimeDateStamp;
|
||||
public ushort MajorVersion;
|
||||
public ushort MinorVersion;
|
||||
public DebugStoreType Type;
|
||||
public uint SizeOfData;
|
||||
public RVA AddressOfRawData;
|
||||
public uint PointerToRawData;
|
||||
|
||||
public uint Magic;
|
||||
public Guid Signature;
|
||||
public uint Age;
|
||||
public string FileName;
|
||||
|
||||
internal DebugHeader ()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetDefaultValues ()
|
||||
{
|
||||
Characteristics = 0;
|
||||
|
||||
this.Magic = 0x53445352;
|
||||
this.Age = 0;
|
||||
this.Type = DebugStoreType.CodeView;
|
||||
this.FileName = string.Empty;
|
||||
}
|
||||
|
||||
public uint GetSize ()
|
||||
{
|
||||
return 0x34 + (uint) FileName.Length + 1;
|
||||
}
|
||||
|
||||
public void Accept (IBinaryVisitor visitor)
|
||||
{
|
||||
visitor.VisitDebugHeader (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 809 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user