diff options
296 files changed, 24485 insertions, 2873 deletions
diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 00000000000..907d24aede5 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,11 @@ +config.h +Makefile +config.cache +stamp-h.in +config.status +aclocal.m4 +configure +stamp-h +libtool +Makefile.in +config.log diff --git a/ChangeLog b/ChangeLog index 1a76f446632..754bf0f211b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Wed Jul 11 00:36:36 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * status/*: scripts and data to create statistics about the + class library status. + +2001-07-09 Alex Graveley <alex@ximian.com> + + * doc/makefile (clean): Add clean target. + * doc/web/makefile (clean): Ditto. + +2001-07-09 Alex Graveley <alex@ximian.com> + + * doc/makefile (all-docs): Fix typo. + 2001-05-30 Miguel de Icaza <miguel@ximian.com> * NEWS: diff --git a/Makefile.am b/Makefile.am index 7a0d4a47da8..fc581a79c21 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = mono +SUBDIRS = mono doc @@ -1,3 +1,13 @@ +2001-07-12 Miguel de Icaza <miguel@ximian.com> + + 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 <miguel@ximian.com> Project started @@ -1,3 +1,8 @@ This is MonoNet. Ximian's portable implementation of .NET + + +---------- + +To edit the go-mono website, see doc/README. diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000000..0d9b2e31ff6 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,6 @@ +libtoolize --automake +automake -a +autoheader +aclocal +autoconf +./configure $*
\ No newline at end of file diff --git a/config.h.in b/config.h.in deleted file mode 100644 index f871c4edf55..00000000000 --- a/config.h.in +++ /dev/null @@ -1,11 +0,0 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Name of package */ -#undef PACKAGE - -/* Version number of package */ -#undef VERSION - diff --git a/configure.in b/configure.in index b146447d4d7..357572e2315 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ AC_INIT(README) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(mononet, 0.1) +AM_INIT_AUTOMAKE(mono, 0.3) AM_MAINTAINER_MODE AC_PROG_CC @@ -31,4 +31,7 @@ Makefile mono/Makefile mono/metadata/Makefile mono/dis/Makefile -])
\ No newline at end of file +mono/cil/Makefile +mono/interpreter/Makefile +doc/Makefile +]) diff --git a/doc/README b/doc/README new file mode 100644 index 00000000000..333d133943f --- /dev/null +++ b/doc/README @@ -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 diff --git a/doc/c-sharp b/doc/c-sharp new file mode 100644 index 00000000000..c37fe559200 --- /dev/null +++ b/doc/c-sharp @@ -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 (bjepson@oreilly.com + 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 diff --git a/doc/class-library b/doc/class-library new file mode 100644 index 00000000000..64fe3fd9d88 --- /dev/null +++ b/doc/class-library @@ -0,0 +1,149 @@ +* The Class Library + + The Class Library should be compatible with Microsoft's .NET + implementation. + + 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. + +** 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". + +** 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. + diff --git a/doc/contact b/doc/contact new file mode 100644 index 00000000000..f5e1b98c115 --- /dev/null +++ b/doc/contact @@ -0,0 +1,16 @@ +* Contacting the Mono team. + + You can contact the Mono Team by sending e-mail to `<a + href="mailto:mono-hackers@ximian.com">mailto:mono-hackers@ximian.com</a>'. + + You can contact the general forum of discussion by sending + e-mail to <a href="mailto:mono-list@ximian.com">mono-list@ximian.com</a> + + You can contact me (Miguel de Icaza) by sending e-mail to <a + href="mailto:miguel@ximian.com">miguel@ximian.com</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> + diff --git a/doc/contributing b/doc/contributing new file mode 100644 index 00000000000..7e64a96ab21 --- /dev/null +++ b/doc/contributing @@ -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. diff --git a/doc/documentation b/doc/documentation new file mode 100644 index 00000000000..166e0e8ccfe --- /dev/null +++ b/doc/documentation @@ -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. + + + + + diff --git a/doc/download b/doc/download new file mode 100644 index 00000000000..0d234b21562 --- /dev/null +++ b/doc/download @@ -0,0 +1,42 @@ +* 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> + <b>July 12th, 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> + + <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. diff --git a/doc/faq b/doc/faq new file mode 100644 index 00000000000..8f9f8f199f4 --- /dev/null +++ b/doc/faq @@ -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 + + + diff --git a/doc/gcc-frontend b/doc/gcc-frontend new file mode 100644 index 00000000000..2b15346db69 --- /dev/null +++ b/doc/gcc-frontend @@ -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. + diff --git a/doc/ideas b/doc/ideas new file mode 100644 index 00000000000..acc584d95cf --- /dev/null +++ b/doc/ideas @@ -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:vladimir@ximian.com">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> diff --git a/doc/index b/doc/index new file mode 100644 index 00000000000..8430614344f --- /dev/null +++ b/doc/index @@ -0,0 +1,32 @@ +** 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:mono-list@ximian.com">mono-list@ximian.com</a> + +** O'Reilly + + Brian posted a story on <a + href="http://www.oreillynet.com/dotnet">O'Reilly Network .NET</a> diff --git a/doc/passport b/doc/passport new file mode 100644 index 00000000000..ea99f9c77fd --- /dev/null +++ b/doc/passport @@ -0,0 +1,234 @@ +* 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. Jabber suffers from + the same problems that a centralized Passport has. If you + want to do things right, you want to start with a fully + distributed system. + + 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:miguel@ximian.com">miguel@ximian.com</a>) + diff --git a/doc/pending b/doc/pending new file mode 100644 index 00000000000..e243a10dedf --- /dev/null +++ b/doc/pending @@ -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. + diff --git a/doc/rationale b/doc/rationale new file mode 100644 index 00000000000..1027d292286 --- /dev/null +++ b/doc/rationale @@ -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.
\ No newline at end of file diff --git a/doc/resources b/doc/resources new file mode 100644 index 00000000000..7ef28be7c12 --- /dev/null +++ b/doc/resources @@ -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="web-mono@ximian.com">web-mono@ximian.com</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> + + +
\ No newline at end of file diff --git a/doc/resources-pending b/doc/resources-pending new file mode 100644 index 00000000000..fd9b9073d64 --- /dev/null +++ b/doc/resources-pending @@ -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 + diff --git a/doc/roadmap b/doc/roadmap new file mode 100644 index 00000000000..6cdfa1366a8 --- /dev/null +++ b/doc/roadmap @@ -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) + + +
\ No newline at end of file diff --git a/doc/runtime b/doc/runtime new file mode 100644 index 00000000000..052b46d4c7f --- /dev/null +++ b/doc/runtime @@ -0,0 +1,118 @@ + 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: + + <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: IA32 translating-JIT engine. + + * Milestone 4: non-Intel port of the JIT engine. + + * Milestone 5: Optimizing JIT engine port for IA32. + + * Milestone 6: non-Intel port of the Optimizing JIT + engine. + </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 + might need to install the CygWin32 development tools to get a + Unix-like compilation environment. + +** JIT Engine + + Currently we are evaluating various mechanisms for our JIT + engine (<a + href="http://www.intel.com/research/mrl/orp/">ORP</a>, <a + href="http://www.gnu.org/software/lightning/">GNU + Lightning</a>, and <a + href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine + Toolkit</a>.). + + We have not made a decision yet, but we might want to use a + Code Generator Generator for the Common Intermediate Language, + as that is likely going to allow us to create better code + (There are a couple of books that deal with this technique: "A + Retargetable C Compiler" and "Advanced Compiler Design and + Implementation"). + +** 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. diff --git a/doc/status b/doc/status new file mode 100644 index 00000000000..0002c33134d --- /dev/null +++ b/doc/status @@ -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> + + + + + diff --git a/doc/team b/doc/team new file mode 100644 index 00000000000..eff7bc9d3d5 --- /dev/null +++ b/doc/team @@ -0,0 +1,2 @@ +* The MonoNet Team + diff --git a/doc/testing b/doc/testing new file mode 100644 index 00000000000..febabf6550e --- /dev/null +++ b/doc/testing @@ -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>. diff --git a/doc/thanks b/doc/thanks new file mode 100644 index 00000000000..5f2df36f9cd --- /dev/null +++ b/doc/thanks @@ -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. diff --git a/doc/todo b/doc/todo new file mode 100644 index 00000000000..abae8cdfb40 --- /dev/null +++ b/doc/todo @@ -0,0 +1 @@ +Discuss with write new JIT
\ No newline at end of file diff --git a/doc/tools b/doc/tools new file mode 100644 index 00000000000..1a7065d58aa --- /dev/null +++ b/doc/tools @@ -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. + + + diff --git a/doc/web/.cvsignore b/doc/web/.cvsignore new file mode 100644 index 00000000000..a023a6f9c7c --- /dev/null +++ b/doc/web/.cvsignore @@ -0,0 +1,2 @@ +*.src +*.html diff --git a/doc/web/commands b/doc/web/commands new file mode 100644 index 00000000000..b28827810b7 --- /dev/null +++ b/doc/web/commands @@ -0,0 +1,16 @@ +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 +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 diff --git a/doc/web/htmlify b/doc/web/htmlify new file mode 100644 index 00000000000..d0e163eaab5 --- /dev/null +++ b/doc/web/htmlify @@ -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"; + } +} diff --git a/doc/web/images/bgsquares.gif b/doc/web/images/bgsquares.gif Binary files differnew file mode 100644 index 00000000000..864bcd44038 --- /dev/null +++ b/doc/web/images/bgsquares.gif diff --git a/doc/web/images/bgsquares.png b/doc/web/images/bgsquares.png Binary files differnew file mode 100644 index 00000000000..54de2ad1e6d --- /dev/null +++ b/doc/web/images/bgsquares.png diff --git a/doc/web/images/bgsquares.xcf.gz b/doc/web/images/bgsquares.xcf.gz Binary files differnew file mode 100644 index 00000000000..200b5805615 --- /dev/null +++ b/doc/web/images/bgsquares.xcf.gz diff --git a/doc/web/images/mono.gif b/doc/web/images/mono.gif Binary files differnew file mode 100644 index 00000000000..5ce7a218ac7 --- /dev/null +++ b/doc/web/images/mono.gif diff --git a/doc/web/images/mono.png b/doc/web/images/mono.png Binary files differnew file mode 100644 index 00000000000..a19e38acedd --- /dev/null +++ b/doc/web/images/mono.png diff --git a/doc/web/images/pixel.gif b/doc/web/images/pixel.gif Binary files differnew file mode 100644 index 00000000000..a4f37d7e02e --- /dev/null +++ b/doc/web/images/pixel.gif diff --git a/doc/web/images/pixel.png b/doc/web/images/pixel.png Binary files differnew file mode 100644 index 00000000000..d8f33a2a3e4 --- /dev/null +++ b/doc/web/images/pixel.png diff --git a/doc/web/makefile b/doc/web/makefile new file mode 100644 index 00000000000..4746d74832a --- /dev/null +++ b/doc/web/makefile @@ -0,0 +1,38 @@ +SOURCES= \ + ../contributing \ + ../class-library \ + ../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 www@www.ximian.com:/web/cvsmodules/mono + +push2: + scp *.html primates:public_html/xxx diff --git a/doc/web/process.pl b/doc/web/process.pl new file mode 100755 index 00000000000..157ae9bb08f --- /dev/null +++ b/doc/web/process.pl @@ -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; +} diff --git a/doc/web/template.html.in b/doc/web/template.html.in new file mode 100644 index 00000000000..7b3e5986494 --- /dev/null +++ b/doc/web/template.html.in @@ -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: webmaster@go-mono.com">webmaster@go-mono.com</a> + </td> + <td colspan="2"></td> + </tr> +</tr> +</table> + +</body> +</html> diff --git a/mcs/class/README b/mcs/class/README new file mode 100644 index 00000000000..d64070d314e --- /dev/null +++ b/mcs/class/README @@ -0,0 +1,34 @@ +The class libraries are grouped together in the assemblies they belong. + +Each directory here represents an assembly, and inside each directory we +divide the code based on the namespace they implement. + +* 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". + +* Coding consideration + + 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. + diff --git a/mcs/class/System.Data/makefile b/mcs/class/System.Data/makefile new file mode 100644 index 00000000000..0309fce6107 --- /dev/null +++ b/mcs/class/System.Data/makefile @@ -0,0 +1,4 @@ +all: windows + +windows: + $(csc) /target:library /out:System.Data.dll /nowarn:1595 /recurse:*.cs diff --git a/mcs/class/System.Drawing/makefile b/mcs/class/System.Drawing/makefile new file mode 100644 index 00000000000..6ce10de0043 --- /dev/null +++ b/mcs/class/System.Drawing/makefile @@ -0,0 +1,4 @@ +all: windows + +windows: + $(csc) /target:library /out:System.Drawing.dll /nowarn:1595 /recurse:*.cs diff --git a/mcs/class/System.Management/makefile b/mcs/class/System.Management/makefile new file mode 100644 index 00000000000..c7e57cf750a --- /dev/null +++ b/mcs/class/System.Management/makefile @@ -0,0 +1,4 @@ +all: windows + +windows: + $(csc) /target:library /out:System.Management.dll /nowarn:1595 /recurse:*.cs diff --git a/mcs/class/System/System.CodeDom.Compiler/AssemblyInfo.cs b/mcs/class/System/System.CodeDom.Compiler/AssemblyInfo.cs new file mode 100755 index 00000000000..bd38af4bfeb --- /dev/null +++ b/mcs/class/System/System.CodeDom.Compiler/AssemblyInfo.cs @@ -0,0 +1,51 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Revision
+// Build Number
+//
+// You can specify all the value or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified - the assembly cannot be signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine.
+// (*) If the key file and a key name attributes are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP - that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the file is installed into the CSP and used.
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs new file mode 100755 index 00000000000..1f4bef39e35 --- /dev/null +++ b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs @@ -0,0 +1,237 @@ +// +// System.CodeDom.Compiler CodeGenerator class +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom.Compiler { + + using System.CodeDom; + using System.Reflection; + using System.IO; + + public abstract class CodeGenerator : ICodeGenerator { + protected TextWriter output; + + protected virtual void ContinueOnNewLine (string st) + { + } + + CodeGenerator () + { + indent = 8; + } + + // + // Code Generation methods + // + protected abstract void GenerateArrayCreateExpression (CodeArrayCreateExpression e); + protected abstract void GenerateAssignStatement (CodeAssignStatement s); + protected abstract void GenerateAttachEventStatement (CodeAttachEventStatement s); + protected abstract void GenerateBaseReferenceExpression (CodeBaseReferenceExpression e); + protected abstract void GenerateBinaryOperatorExpression (CodeBinaryOperatorExpression x); + protected abstract void GenerateCastExpression (CodeCastExpression x); + protected abstract void GenerateClasses (CodeNamespace x); + protected abstract void GenerateCommentStatement (CodeCommentStatement x); + protected abstract void GenerateConstructor (CodeConstructor x, CodeTypeDeclaration c); + protected abstract void GenerateDelegateCreateExpression (CodeDelegateCreateExpression x); + protected abstract void GenerateDelegateInvokeExpression (CodeDelegateInvokeExpression x); + protected abstract void GenerateEvent (CodeMemberEvent x, CodeTypeDeclaration c); + protected abstract void GenerateExpression (CodeExpression x); + protected abstract void GenerateField (CodeMemberField x); + protected abstract void GenerateFieldReferenceExpression (CodeFieldReferenceExpression x); + protected abstract void GenerateIndexerExpression (CodeIndexerExpression x); + protected abstract void GenerateLinePragmaStart (CodeLinePragma x); + protected abstract void GenerateLinePragmaEnd (CodeLinePragma x); + protected abstract void GenerateMethod (CodeMemberMethod m, CodeTypeDeclaration c); + protected abstract void GenerateMethodInvokeExpression (CodeMethodInvokeExpression x); + protected abstract void GenerateMethodReturnStatement (CodeMethodReturnStatement x); + protected abstract void GenerateNamespace (CodeNamespace x); + protected abstract void GenerateNamespaceStart (CodeNamespace x); + protected abstract void GenerateNamespaceEnd (CodeNamespace x); + protected abstract void GenerateNamespaceImport (CodeNamespaceImport i); + protected abstract void GenerateNamespaceImports (CodeNamespace i); + protected abstract void GenerateObjectCreateExpression (CodeObjectCreateExpression x); + protected abstract void GenerateParameterDeclarationExpression (CodeParameterDeclarationExpression x); + protected abstract void GeneratePrimitiveExpression (CodePrimitiveExpression x); + protected abstract void GenerateProperty (CodeMemberProperty e, CodeTypeDeclaration c); + protected abstract void GeneratePropertyReferenceExpression (CodePropertyReferenceExpression x); + protected abstract void GenerateStatement (CodeStatement x); + protected abstract void GenerateStatementCollection (CodeStatementCollection x); + protected abstract void GenerateThisReferenceExpression (CodeThisReferenceExpression x); + protected abstract void GenerateThrowExceptionStatement (CodeThrowExceptionStatement x); + protected abstract void GenerateTryCatchFinallyStatement (CodeTryCatchFinallyStatement x); + protected abstract void GenerateTypeOfExpression (CodeTypeOfExpression x); + protected abstract void GenerateTypeReferenceExpression (CodeTypeReferenceExpression x); + protected abstract void GenerateVariableDeclarationStatement (CodeVariableDeclarationStatement x); + + // + // Other members + // + protected abstract string GetNullToken (); + + public abstract bool IsValidIdentifier (string value); + + public static bool IsValidLanguateIndependentIdentifier (string value) + { + /* FIXME: implement */ + return true; + } + + // + // Output functions + // + protected virtual void OutputAttributeArgument (CodeAttributeArgument arg) + { + } + + protected virtual void OutputDirection (FieldDirection dir) + { + } + + protected virtual void OutputExpressionList (CodeExpressionCollection c) + { + } + + protected virtual void OutputExpressionLIst (CodeExpressionCollection c, bool useNewlines) + { + } + + protected virtual void OutputFieldScopeModifier (MemberAttributes attrs) + { + } + + protected virtual void OutputIdentifier (string ident) + { + } + + protected virtual void OutputMemberAccessModifier (MemberAttributes attrs) + { + } + + protected virtual void OutputMemberScopeModifier (MemberAttributes attrs) + { + } + + protected virtual void OutputOperator (CodeBinaryOperatorType op) + { + } + + protected virtual void OutputParameters (CodeParameterDeclarationExpressionCollection pars) + { + } + + protected virtual void OutputType (string typeRef) + { + } + + protected virtual void OutputTypeAttributes (TypeAttributes attrs) + { + } + + protected virtual void OutputTypeNamePair (string typeRef, string name) + { + } + + + protected abstract string QuoteLiteralString (string value); + + public virtual void ValidateIdentifier (string value) + { + } + + // + // Properties + // + protected string currentClassName; + protected string CurrentClassName { + get { + return currentClassName; + } + } + + protected CodeTypeMember codeClassMember; + protected CodeTypeMember CurrentMember { + get { + return codeClassMember; + } + } + + protected string CurrentMemberName { + get { + return codeClassMember.Name; + } + } + + int indent; + protected int Indent { + get { + return indent; + } + + set { + indent = value; + } + } + + // + // This concept seems broken, I should not really be using + // a flag, I should be "probing" what is being generated. + // at least the Start/End + // functions should not be abstract, or abstract could + // have an implementation piece? + // + public bool isCurrentClass; + protected bool IsCurrentClass { + get { + return isCurrentClass; + } + } + + public bool isCurrentDelegate; + protected bool IsCurrentDelegate { + get { + return isCurrentDelegate; + } + } + public bool isCurrentEnum; + protected bool IsCurrentEnum { + get { + return isCurrentEnum; + } + } + public bool isCurrentInterface; + protected bool IsCurrentInterface { + get { + return isCurrentInterface; + } + } + + public bool isCurrentStruct; + protected bool IsCurrentStruct { + get { + return isCurrentStruct; + } + } + + protected TextWriter Output { + get { + return output; + } + + set { + output = value; + } + } + + public abstract void GenerateCodeFromExpression (TextWriter output, CodeExpression expression); + + public abstract void GenerateCodeFromNamespace (TextWriter output, CodeExpression expression); + + public abstract void GenerateCodeFromStatement (TextWriter output, CodeStatement expression); + + } +} diff --git a/mcs/class/System/System.CodeDom.Compiler/ICodeGenerator.cs b/mcs/class/System/System.CodeDom.Compiler/ICodeGenerator.cs new file mode 100755 index 00000000000..3cdbb32c7f6 --- /dev/null +++ b/mcs/class/System/System.CodeDom.Compiler/ICodeGenerator.cs @@ -0,0 +1,30 @@ +// +// System.CodeDom.Compiler ICodeGenerator Interface +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom.Compiler { + using System.CodeDom; + using System.IO; + + public interface ICodeGenerator { + + + // <summary> + // Generates code for @expression on @output + // </summary> + void GenerateCodeFromExpression (TextWriter output, CodeExpression expression); + + void GenerateCodeFromNamespace (TextWriter output, CodeExpression expression); + + void GenerateCodeFromStatement (TextWriter output, CodeStatement expression); + + bool IsValidIdentifier (string value); + + void ValidateIdentifier (string value); + } +} diff --git a/mcs/class/System/System.CodeDom/AssemblyInfo.cs b/mcs/class/System/System.CodeDom/AssemblyInfo.cs new file mode 100755 index 00000000000..bd38af4bfeb --- /dev/null +++ b/mcs/class/System/System.CodeDom/AssemblyInfo.cs @@ -0,0 +1,51 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Revision
+// Build Number
+//
+// You can specify all the value or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified - the assembly cannot be signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine.
+// (*) If the key file and a key name attributes are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP - that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the file is installed into the CSP and used.
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/mcs/class/System/System.CodeDom/ChangeLog b/mcs/class/System/System.CodeDom/ChangeLog new file mode 100644 index 00000000000..5a8290907cf --- /dev/null +++ b/mcs/class/System/System.CodeDom/ChangeLog @@ -0,0 +1,5 @@ +2001-07-12 Sean MacIsaac <macisaac@ximian.com> + + * All files implementing IList: Added IsFixedSize property. + + * All files: Changed CodeDOM to CodeDom. diff --git a/mcs/class/System/System.CodeDom/Code-X-Collection.cs b/mcs/class/System/System.CodeDom/Code-X-Collection.cs new file mode 100755 index 00000000000..8e4731656b4 --- /dev/null +++ b/mcs/class/System/System.CodeDom/Code-X-Collection.cs @@ -0,0 +1,159 @@ +// +// System.CodeDOM Code@CONTAINEE@Collection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDOM { + + using System.Collections; + + public class Code@CONTAINEE@Collection : IList, ICollection, IEnumerable { + + ArrayList @arrayname@; + + // + // Constructors + // + public Code@CONTAINEE@Collection () + { + @arrayname@ = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return @arrayname@.Count; + } + } + + // + // Methods + // + public void Add (Code@CONTAINEE@ value) + { + @arrayname@.Add (value); + } + + public void AddRange (Code@CONTAINEE@ [] values) + { + foreach (Code@CONTAINEE@ ca in values) + @arrayname@.Add (ca); + + } + + public void Clear () + { + @arrayname@.Clear (); + } + + private class Enumerator : IEnumerator { + private Code@CONTAINEE@Collection collection; + private int currentIndex = -1; + + internal Enumerator (Code@CONTAINEE@Collection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new Code@CONTAINEE@Collection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return @arrayname@.Add (value); + } + + public bool Contains (Object value) + { + return @arrayname@.Contains (value); + } + + public int IndexOf (Object value) + { + return @arrayname@.IndexOf (value); + } + + public void Insert (int index, Object value) + { + @arrayname@ [index] = value; + } + + public object this[int index] { + get { + return @arrayname@ [index]; + } + + set { + @arrayname@ [index] = value; + } + } + + public void Remove (object value) + { + @arrayname@.Remove (value); + } + + public void RemoveAt (int index) + { + @arrayname@.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + @arrayname@.CopyTo (array, index); + } + + public object SyncRoot { + get { + return @arrayname@.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return @arrayname@.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeArrayCreateExpression.cs b/mcs/class/System/System.CodeDom/CodeArrayCreateExpression.cs new file mode 100755 index 00000000000..17a4a455db3 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeArrayCreateExpression.cs @@ -0,0 +1,89 @@ +// +// System.CodeDom CodeArrayCreateExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// +namespace System.CodeDom { + + public class CodeArrayCreateExpression : CodeExpression { + string createType; + CodeExpressionCollection initializers; + CodeExpression sizeExpression; + int size; + + // + // Constructors + // + public CodeArrayCreateExpression () + { + + } + + public CodeArrayCreateExpression (string createType, CodeExpression size) + { + this.createType = createType; + this.sizeExpression = size; + } + + public CodeArrayCreateExpression (string createType, int size) + { + this.createType = createType; + this.size = size; + } + + public CodeArrayCreateExpression (string createType, CodeExpression [] initializers) + { + this.createType = createType; + this.initializers = new CodeExpressionCollection (); + + this.initializers.AddRange (initializers); + } + + // + // Properties + // + public CodeExpression SizeExpression { + get { + return sizeExpression; + } + + set { + sizeExpression = value; + } + } + + public int Size { + get { + return size; + } + + set { + size = value; + } + } + + public CodeExpressionCollection Initializers { + get { + return initializers; + } + + set { + initializers = value; + } + } + + public string CreateType { + get { + return createType; + } + + set { + createType = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeAssignStatement.cs b/mcs/class/System/System.CodeDom/CodeAssignStatement.cs new file mode 100755 index 00000000000..0e1bb9750ad --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeAssignStatement.cs @@ -0,0 +1,52 @@ +// +// System.CodeDom CodeArrayCreateExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeAssignStatement : CodeStatement { + + CodeExpression left, right; + + // + // Constructors + // + public CodeAssignStatement () + { + } + + public CodeAssignStatement (CodeExpression left, CodeExpression right) + { + this.left = left; + this.right = right; + } + + // + // Properties + // + public CodeExpression Left { + get { + return left; + } + + set { + left = value; + } + } + + public CodeExpression Right { + get { + return right; + } + + set { + right = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeAttachEventStatement.cs b/mcs/class/System/System.CodeDom/CodeAttachEventStatement.cs new file mode 100755 index 00000000000..d85a61d8ea9 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeAttachEventStatement.cs @@ -0,0 +1,62 @@ +// +// System.CodeDom CodeAttachEventStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// +namespace System.CodeDom { + + public class CodeAttachEventStatement : CodeStatement { + CodeExpression targetObject; + string eventName; + CodeExpression newListener; + + public CodeAttachEventStatement () + { + } + + public CodeAttachEventStatement (CodeExpression targetObject, + string eventName, + CodeExpression newListener) + { + this.targetObject = targetObject; + this.eventName = eventName; + this.newListener = newListener; + } + + // + // Properties + // + public string EventName { + get { + return eventName; + } + + set { + eventName = value; + } + } + + public CodeExpression NewListener { + get { + return newListener; + } + + set { + newListener = value; + } + } + + public CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeAttributeArgument.cs b/mcs/class/System/System.CodeDom/CodeAttributeArgument.cs new file mode 100755 index 00000000000..50fa7efcd6e --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeAttributeArgument.cs @@ -0,0 +1,60 @@ +// +// System.CodeDom CodeAttributeArgument Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeAttributeArgument { + string name; + CodeExpression val; + + // + // Constructors + // + public CodeAttributeArgument () + { + } + + public CodeAttributeArgument (CodeExpression value) + { + } + + public CodeAttributeArgument (string name, CodeExpression val) + { + this.name = name; + this.val = val; + } + + // + // Properties + // + + public string Name { + get { + return name; + } + + set { + name = value; + } + } + + public CodeExpression Value { + get { + return val; + } + + set { + val = value; + } + } + + + } + +} diff --git a/mcs/class/System/System.CodeDom/CodeAttributeArgumentCollection.cs b/mcs/class/System/System.CodeDom/CodeAttributeArgumentCollection.cs new file mode 100755 index 00000000000..d318732320a --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeAttributeArgumentCollection.cs @@ -0,0 +1,166 @@ +// +// System.CodeDom CodeAttributeArgumentCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeAttributeArgumentCollection : IList, ICollection, IEnumerable { + + ArrayList attributeArgs; + + // + // Constructors + // + public CodeAttributeArgumentCollection () + { + attributeArgs = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return attributeArgs.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + + public void Add (CodeAttributeArgument value) + { + attributeArgs.Add (value); + } + + public void AddRange (CodeAttributeArgument [] values) + { + foreach (CodeAttributeArgument ca in values) + attributeArgs.Add (ca); + + } + + public void Clear () + { + attributeArgs.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeAttributeArgumentCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeAttributeArgumentCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeAttributeArgumentCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return attributeArgs.Add (value); + } + + public bool Contains (Object value) + { + return attributeArgs.Contains (value); + } + + public int IndexOf (Object value) + { + return attributeArgs.IndexOf (value); + } + + public void Insert (int index, Object value) + { + attributeArgs [index] = value; + } + + public object this[int index] { + get { + return attributeArgs [index]; + } + + set { + attributeArgs [index] = value; + } + } + + public void Remove (object value) + { + attributeArgs.Remove (value); + } + + public void RemoveAt (int index) + { + attributeArgs.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + attributeArgs.CopyTo (array, index); + } + + public object SyncRoot { + get { + return attributeArgs.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return attributeArgs.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeAttributeBlock.cs b/mcs/class/System/System.CodeDom/CodeAttributeBlock.cs new file mode 100755 index 00000000000..16ed71265ba --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeAttributeBlock.cs @@ -0,0 +1,42 @@ +// +// System.CodeDom CodeAttributeBlock Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeAttributeBlock { + + CodeAttributeDeclarationCollection attributes; + + // + // Constructors + // + public CodeAttributeBlock () + { + } + + public CodeAttributeBlock (CodeAttributeDeclaration [] attributes) + { + this.attributes = new CodeAttributeDeclarationCollection (); + this.attributes.AddRange (attributes); + } + + // + // Prpoperties + // + public CodeAttributeDeclarationCollection Attributes { + get { + return attributes; + } + + set { + attributes = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeAttributeDeclaration.cs b/mcs/class/System/System.CodeDom/CodeAttributeDeclaration.cs new file mode 100755 index 00000000000..8c9105ce236 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeAttributeDeclaration.cs @@ -0,0 +1,60 @@ +// +// System.CodeDom CodeAttributeDeclaration Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeAttributeDeclaration { + + string name; + CodeAttributeArgumentCollection arguments; + + // + // Constructors + // + public CodeAttributeDeclaration () + { + } + + public CodeAttributeDeclaration (string name) + { + this.name = name; + } + + public CodeAttributeDeclaration (string name, CodeAttributeArgument [] arguments) + { + this.name = name; + this.arguments = new CodeAttributeArgumentCollection (); + this.arguments.AddRange (arguments); + } + + // + // Properties + // + public CodeAttributeArgumentCollection Arguments { + get { + return arguments; + } + + set { + arguments = value; + } + } + + public string Name { + get { + return name; + } + + set { + name = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeAttributeDeclarationCollection.cs b/mcs/class/System/System.CodeDom/CodeAttributeDeclarationCollection.cs new file mode 100755 index 00000000000..48aa3b48965 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeAttributeDeclarationCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeAttributeDeclarationCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeAttributeDeclarationCollection : IList, ICollection, IEnumerable { + + ArrayList attributeDecls; + + // + // Constructors + // + public CodeAttributeDeclarationCollection () + { + attributeDecls = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return attributeDecls.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeAttributeDeclaration value) + { + attributeDecls.Add (value); + } + + public void AddRange (CodeAttributeDeclaration [] values) + { + foreach (CodeAttributeDeclaration ca in values) + attributeDecls.Add (ca); + + } + + public void Clear () + { + attributeDecls.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeAttributeDeclarationCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeAttributeDeclarationCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeAttributeDeclarationCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return attributeDecls.Add (value); + } + + public bool Contains (Object value) + { + return attributeDecls.Contains (value); + } + + public int IndexOf (Object value) + { + return attributeDecls.IndexOf (value); + } + + public void Insert (int index, Object value) + { + attributeDecls [index] = value; + } + + public object this[int index] { + get { + return attributeDecls [index]; + } + + set { + attributeDecls [index] = value; + } + } + + public void Remove (object value) + { + attributeDecls.Remove (value); + } + + public void RemoveAt (int index) + { + attributeDecls.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + attributeDecls.CopyTo (array, index); + } + + public object SyncRoot { + get { + return attributeDecls.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return attributeDecls.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeBaseReferenceExpression.cs b/mcs/class/System/System.CodeDom/CodeBaseReferenceExpression.cs new file mode 100755 index 00000000000..dee01e013af --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeBaseReferenceExpression.cs @@ -0,0 +1,15 @@ +// +// System.CodeDom CodeBaseReferenceExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeBaseReferenceExpression : CodeExpression { + public CodeBaseReferenceExpression () {} + } +} diff --git a/mcs/class/System/System.CodeDom/CodeBinaryOperatorExpression.cs b/mcs/class/System/System.CodeDom/CodeBinaryOperatorExpression.cs new file mode 100755 index 00000000000..775b29bf90f --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeBinaryOperatorExpression.cs @@ -0,0 +1,88 @@ +// +// System.CodeDom CodeBinaryOperatorExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeBinaryOperatorExpression : CodeExpression { + + CodeExpression left, right; + CodeBinaryOperatorType oper; + + public enum CodeBinaryOperatorType { + Add, + Substract, + Multiply, + Divide, + Modulus, + Assign, + IdentityInequality, + IdentityEquality, + ValueEquality, + BitwiseOr, + BitwiseAnd, + BooleanOr, + BooleanAnd, + LessThan, + LessThanOrEqual, + GreatherThan, + GreatherThanOrEqual, + } + + // + // Constructors + // + public CodeBinaryOperatorExpression () + { + } + + + public CodeBinaryOperatorExpression (CodeExpression left, + CodeBinaryOperatorType oper, + CodeExpression right) + { + this.left = left; + this.oper = oper; + this.right = right; + } + + // + // Properties + // + public CodeExpression Left { + get { + return left; + } + + set { + left = value; + } + } + + public CodeExpression Right { + get { + return right; + } + + set { + right = value; + } + } + + public CodeBinaryOperatorType Operator { + get { + return oper; + } + + set { + oper = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeCastExpression.cs b/mcs/class/System/System.CodeDom/CodeCastExpression.cs new file mode 100755 index 00000000000..3c3bef51042 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeCastExpression.cs @@ -0,0 +1,52 @@ +// +// System.CodeDom CodeCastExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeCastExpression : CodeExpression { + string targetType; + CodeExpression expression; + + // + // Constructors + // + public CodeCastExpression () + { + } + + public CodeCastExpression (string targetType, CodeExpression expression) + { + this.targetType = targetType; + this.expression = expression; + } + + // + // Properties + // + public CodeExpression Expression { + get { + return expression; + } + + set { + expression = value; + } + } + + public string TargetType { + get { + return targetType; + } + + set { + targetType = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeCatchClause.cs b/mcs/class/System/System.CodeDom/CodeCatchClause.cs new file mode 100755 index 00000000000..4af7a18f4a2 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeCatchClause.cs @@ -0,0 +1,46 @@ +// +// System.CodeDom CodeCatchClaus Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeCatchClause { + + CodeParameterDeclarationExpression condition; + CodeStatementCollection statements; + + public CodeCatchClause () + { + this.statements = new CodeStatementCollection (); + } + + public CodeCatchClause (CodeParameterDeclarationExpression condition, + CodeStatement [] statements) + { + this.condition = condition; + this.statements = new CodeStatementCollection (); + this.statements.AddRange (statements); + } + + public CodeStatementCollection Statements { + get { + return statements; + } + } + + public CodeParameterDeclarationExpression Condition { + get { + return condition; + } + + set { + condition = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeCatchClauseCollection.cs b/mcs/class/System/System.CodeDom/CodeCatchClauseCollection.cs new file mode 100755 index 00000000000..7b4a284bac5 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeCatchClauseCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeCatchClauseCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeCatchClauseCollection : IList, ICollection, IEnumerable { + + ArrayList catchClauses; + + // + // Constructors + // + public CodeCatchClauseCollection () + { + catchClauses = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return catchClauses.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeCatchClause value) + { + catchClauses.Add (value); + } + + public void AddRange (CodeCatchClause [] values) + { + foreach (CodeCatchClause ca in values) + catchClauses.Add (ca); + + } + + public void Clear () + { + catchClauses.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeCatchClauseCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeCatchClauseCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeCatchClauseCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return catchClauses.Add (value); + } + + public bool Contains (Object value) + { + return catchClauses.Contains (value); + } + + public int IndexOf (Object value) + { + return catchClauses.IndexOf (value); + } + + public void Insert (int index, Object value) + { + catchClauses [index] = value; + } + + public object this[int index] { + get { + return catchClauses [index]; + } + + set { + catchClauses [index] = value; + } + } + + public void Remove (object value) + { + catchClauses.Remove (value); + } + + public void RemoveAt (int index) + { + catchClauses.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + catchClauses.CopyTo (array, index); + } + + public object SyncRoot { + get { + return catchClauses.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return catchClauses.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeClass.cs b/mcs/class/System/System.CodeDom/CodeClass.cs new file mode 100755 index 00000000000..146cfb474ea --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeClass.cs @@ -0,0 +1,107 @@ +// +// System.CodeDom CodeClass Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +using System.Collections.Specialized; + +namespace System.CodeDom { + using System.Reflection; + using System.Collections; + + public class CodeClass : CodeClassMember { + CodeClassMemberCollection members; + TypeAttributes attrs; + StringCollection baseTypes; + bool isClass, isEnum, isInterface, isStruct; + + string name; + + // + // Constructors + // + public CodeClass () + { + } + + public CodeClass (string name) + { + this.name = name; + } + + // + // Properties + // + public TypeAttributes attributes { + get { + return attrs; + } + + set { + attrs = value; + } + } + + public StringCollection BaseTypes { + get { + return baseTypes; + } + + set { + baseTypes = value; + } + } + + public bool IsClass { + get { + return isClass; + } + + set { + isClass = value; + } + } + public bool IsEnum { + get { + return isEnum; + } + + set { + isEnum = value; + } + } + + public bool IsInterface { + get { + return isInterface; + } + + set { + isInterface = value; + } + } + public bool IsStruct { + get { + return isStruct; + } + + set { + isStruct = value; + } + } + + public CodeClassMemberCollection Members { + get { + return members; + } + + set { + members = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeClassCollection.cs b/mcs/class/System/System.CodeDom/CodeClassCollection.cs new file mode 100755 index 00000000000..d38055a32b8 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeClassCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeClassCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeClassCollection : IList, ICollection, IEnumerable { + + ArrayList classes; + + // + // Constructors + // + public CodeClassCollection () + { + classes = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return classes.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeClass value) + { + classes.Add (value); + } + + public void AddRange (CodeClass [] values) + { + foreach (CodeClass ca in values) + classes.Add (ca); + + } + + public void Clear () + { + classes.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeClassCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeClassCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeClassCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return classes.Add (value); + } + + public bool Contains (Object value) + { + return classes.Contains (value); + } + + public int IndexOf (Object value) + { + return classes.IndexOf (value); + } + + public void Insert (int index, Object value) + { + classes [index] = value; + } + + public object this[int index] { + get { + return classes [index]; + } + + set { + classes [index] = value; + } + } + + public void Remove (object value) + { + classes.Remove (value); + } + + public void RemoveAt (int index) + { + classes.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + classes.CopyTo (array, index); + } + + public object SyncRoot { + get { + return classes.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return classes.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeClassConstructor.cs b/mcs/class/System/System.CodeDom/CodeClassConstructor.cs new file mode 100755 index 00000000000..a778cf5d82d --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeClassConstructor.cs @@ -0,0 +1,17 @@ +// +// System.CodeDom CodeClassConstructor Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + public class CodeClassConstructor : CodeMemberMethod { + + public CodeClassConstructor () + { + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeClassDelegate.cs b/mcs/class/System/System.CodeDom/CodeClassDelegate.cs new file mode 100755 index 00000000000..cf4be20b3fe --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeClassDelegate.cs @@ -0,0 +1,52 @@ +// +// System.CodeDom CodeClassDelegate Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeClassDelegate : CodeClass { + CodeParameterDeclarationExpressionCollection parameters; + string returnType; + string name; + + // + // Constructors + // + public CodeClassDelegate () + { + } + + public CodeClassDelegate (string name) + { + this.name = name; + } + + // + // Properties + // + public CodeParameterDeclarationExpressionCollection Parameters { + get { + return parameters; + } + + set { + parameters = value; + } + } + + public string ReturnType { + get { + return returnType; + } + + set { + returnType = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeClassMember.cs b/mcs/class/System/System.CodeDom/CodeClassMember.cs new file mode 100755 index 00000000000..51d8b0476a7 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeClassMember.cs @@ -0,0 +1,80 @@ +// +// System.CodeDom CodeClassMember Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeClassMember : CodeStatement { + MemberAttributes attributes; + CodeAttributeBlock customAttributes; + + string name; + + // + // Yeah, this is a strange way of defining this + // + public enum MemberAttributes { + Abstract = 0x0001, + Final = 0x0002, + Override = 0x0004, + Const = 0x0005, + Assembly = 0x1000, + AccessMask = 0xf000, + FamANDAssem = 0x2000, + Family = 0x3000, + FamORAssem = 0x4000, + New = 0x0010, + Private = 0x5000, + Public = 0x6000, + ScopeMask = 0x000f, + Static = 0x0003, + VTableMask = 0x00f0 + } + + // + // Constructors + // + public CodeClassMember () + { + } + + // + // Properties + // + + public MemberAttributes Attributes { + get { + return attributes; + } + + set { + attributes = value; + } + } + + public CodeAttributeBlock CustomAttributes { + get { + return customAttributes; + } + + set { + customAttributes = value; + } + } + + public string Name { + get { + return name; + } + + set { + name = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeClassMemberCollection.cs b/mcs/class/System/System.CodeDom/CodeClassMemberCollection.cs new file mode 100755 index 00000000000..f081ad3a45b --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeClassMemberCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeClassMemberCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeClassMemberCollection : IList, ICollection, IEnumerable { + + ArrayList classMembers; + + // + // Constructors + // + public CodeClassMemberCollection () + { + classMembers = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return classMembers.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeClassMember value) + { + classMembers.Add (value); + } + + public void AddRange (CodeClassMember [] values) + { + foreach (CodeClassMember ca in values) + classMembers.Add (ca); + + } + + public void Clear () + { + classMembers.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeClassMemberCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeClassMemberCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeClassMemberCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return classMembers.Add (value); + } + + public bool Contains (Object value) + { + return classMembers.Contains (value); + } + + public int IndexOf (Object value) + { + return classMembers.IndexOf (value); + } + + public void Insert (int index, Object value) + { + classMembers [index] = value; + } + + public object this[int index] { + get { + return classMembers [index]; + } + + set { + classMembers [index] = value; + } + } + + public void Remove (object value) + { + classMembers.Remove (value); + } + + public void RemoveAt (int index) + { + classMembers.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + classMembers.CopyTo (array, index); + } + + public object SyncRoot { + get { + return classMembers.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return classMembers.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeCommentStatement.cs b/mcs/class/System/System.CodeDom/CodeCommentStatement.cs new file mode 100755 index 00000000000..9dba6528a70 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeCommentStatement.cs @@ -0,0 +1,39 @@ +// +// System.CodeDom CodeCommentStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeCommentStatement : CodeStatement { + string text; + + // + // Constructors + // + public CodeCommentStatement () + { + } + + public CodeCommentStatement (string text) + { + this.text = text; + } + + string Text { + get { + return text; + } + + set { + text = value; + } + } + } +} + + diff --git a/mcs/class/System/System.CodeDom/CodeConstructor.cs b/mcs/class/System/System.CodeDom/CodeConstructor.cs new file mode 100755 index 00000000000..0d6a707ac15 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeConstructor.cs @@ -0,0 +1,43 @@ +// +// System.CodeDom CodeConstructor Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeConstructor : CodeMemberMethod { + CodeExpressionCollection baseConstructorArgs; + CodeExpressionCollection chainedConstructorArgs; + + // + // Constructors + // + public CodeConstructor () + { + } + + public CodeExpressionCollection BaseConstructorArgs { + get { + return baseConstructorArgs; + } + + set { + baseConstructorArgs = value; + } + } + + public CodeExpressionCollection ChainedConstructorArgs { + get { + return chainedConstructorArgs; + } + + set { + chainedConstructorArgs = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeDelegateCreateExpression.cs b/mcs/class/System/System.CodeDom/CodeDelegateCreateExpression.cs new file mode 100755 index 00000000000..1be84cc27ad --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeDelegateCreateExpression.cs @@ -0,0 +1,66 @@ +// +// System.CodeDom CodeDelegateCreateExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeDelegateCreateExpression : CodeExpression { + string delegateType, methodName; + CodeExpression targetObject; + + // + // Constructors + // + public CodeDelegateCreateExpression (string delegateType, + CodeExpression targetObject, + string methodName) + { + this.delegateType = delegateType; + this.targetObject = targetObject; + this.methodName = methodName; + } + + public CodeDelegateCreateExpression () + { + } + + // + // Properties + // + + string DelegateType { + get { + return delegateType; + } + + set { + delegateType = value; + } + } + + string MethodName { + get { + return methodName; + } + + set { + methodName = value; + } + } + + CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeDelegateInvokeExpression.cs b/mcs/class/System/System.CodeDom/CodeDelegateInvokeExpression.cs new file mode 100755 index 00000000000..9b918c4cd0b --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeDelegateInvokeExpression.cs @@ -0,0 +1,59 @@ +// +// System.CodeDom CodeDelegateInvokeExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeDelegateInvokeExpression : CodeExpression { + CodeExpressionCollection parameters; + CodeExpression targetObject; + + // + // Constructors + // + public CodeDelegateInvokeExpression () + { + } + + public CodeDelegateInvokeExpression (CodeExpression targetObject, + CodeExpression [] parameters) + { + this.targetObject = targetObject; + this.parameters = new CodeExpressionCollection (); + this.parameters.AddRange (parameters); + } + + public CodeDelegateInvokeExpression (CodeExpression targetObject) + { + this.targetObject = targetObject; + } + + // + // Properties + // + public CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + + public CodeExpressionCollection Parameters { + get { + return parameters; + } + + set { + parameters = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeDelegateInvokeStatement.cs b/mcs/class/System/System.CodeDom/CodeDelegateInvokeStatement.cs new file mode 100755 index 00000000000..299e107a8ed --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeDelegateInvokeStatement.cs @@ -0,0 +1,55 @@ +// +// System.CodeDom CodeDelegateInvokeStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeDelegateInvokeStatement : CodeStatement { + CodeStatementCollection parameters; + CodeStatement targetObject; + CodeDelegateInvokeExpression delegateInvoke; + + // + // Constructors + // + public CodeDelegateInvokeStatement () + { + } + + public CodeDelegateInvokeStatement (CodeStatement targetObject) + { + this.targetObject = targetObject; + } + + public CodeDelegateInvokeStatement (CodeDelegateInvokeExpression delegateInvoke) + { + this.delegateInvoke = delegateInvoke; + } + + public CodeDelegateInvokeStatement (CodeStatement targetObject, + CodeStatement [] parameters) + { + this.targetObject = targetObject; + this.parameters = new CodeStatementCollection (); + this.parameters.AddRange (parameters); + } + + // + // Properties + // + public CodeDelegateInvokeExpression DelegateInvoke { + get { + return delegateInvoke; + } + + set { + delegateInvoke = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeDetachEventStatement.cs b/mcs/class/System/System.CodeDom/CodeDetachEventStatement.cs new file mode 100755 index 00000000000..5998b73cf2d --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeDetachEventStatement.cs @@ -0,0 +1,62 @@ +// +// System.CodeDom CodeDetachEventStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeDetachEventStatement : CodeStatement { + string eventName; + CodeExpression targetObject, newListener; + + // + // Constructors + // + public CodeDetachEventStatement () + { + } + + public CodeDetachEventStatement (CodeExpression targetObject, + string eventName, + CodeExpression newListener) + { + this.targetObject = targetObject; + this.eventName = eventName; + this.newListener = newListener; + } + + public string EventName { + get { + return eventName; + } + + set { + eventName = value; + } + } + + public CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + + public CodeExpression NewListener { + get { + return newListener; + } + + set { + newListener = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeExpression.cs b/mcs/class/System/System.CodeDom/CodeExpression.cs new file mode 100755 index 00000000000..f140c9d0d5e --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeExpression.cs @@ -0,0 +1,35 @@ +// +// System.CodeDom CodeExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeExpression { + object userData; + + // + // Constructors + // + public CodeExpression () + { + } + + // + // Properties + // + public object UserData { + get { + return userData; + } + + set { + userData = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeExpressionCollection.cs b/mcs/class/System/System.CodeDom/CodeExpressionCollection.cs new file mode 100755 index 00000000000..10622c3b0e4 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeExpressionCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeExpressionCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeExpressionCollection : IList, ICollection, IEnumerable { + + ArrayList expressions; + + // + // Constructors + // + public CodeExpressionCollection () + { + expressions = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return expressions.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeExpression value) + { + expressions.Add (value); + } + + public void AddRange (CodeExpression [] values) + { + foreach (CodeExpression ca in values) + expressions.Add (ca); + + } + + public void Clear () + { + expressions.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeExpressionCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeExpressionCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeExpressionCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return expressions.Add (value); + } + + public bool Contains (Object value) + { + return expressions.Contains (value); + } + + public int IndexOf (Object value) + { + return expressions.IndexOf (value); + } + + public void Insert (int index, Object value) + { + expressions [index] = value; + } + + public object this[int index] { + get { + return expressions [index]; + } + + set { + expressions [index] = value; + } + } + + public void Remove (object value) + { + expressions.Remove (value); + } + + public void RemoveAt (int index) + { + expressions.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + expressions.CopyTo (array, index); + } + + public object SyncRoot { + get { + return expressions.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return expressions.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeFieldReferenceExpression.cs b/mcs/class/System/System.CodeDom/CodeFieldReferenceExpression.cs new file mode 100755 index 00000000000..66581e84f22 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeFieldReferenceExpression.cs @@ -0,0 +1,71 @@ +// +// System.CodeDom CodeFieldReferenceExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeFieldReferenceExpression : CodeExpression { + CodeExpression targetObject; + string fieldName; + FieldDirection direction; + + public enum FieldDirection { + In, + Out, + Ref + } + + // + // Constructors + // + public CodeFieldReferenceExpression () + { + } + + public CodeFieldReferenceExpression (CodeExpression targetObject, + string fieldName) + { + this.targetObject = targetObject; + this.fieldName = fieldName; + } + + // + // Properties + // + public FieldDirection Direction { + get { + return direction; + } + + set { + direction = value; + } + } + + public string FieldName { + get { + return fieldName; + } + + set { + fieldName = value; + } + } + + public CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + + } +} diff --git a/mcs/class/System/System.CodeDom/CodeForLoopStatement.cs b/mcs/class/System/System.CodeDom/CodeForLoopStatement.cs new file mode 100755 index 00000000000..c0b0a46ea53 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeForLoopStatement.cs @@ -0,0 +1,78 @@ +// +// System.CodeDom CodeForLoopStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeForLoopStatement : CodeExpression { + CodeStatement initStatement, incrementStatement; + CodeExpression testExpression; + CodeStatementCollection statements; + + // + // Constructors + // + public CodeForLoopStatement () + { + statements = new CodeStatementCollection (); + } + + public CodeForLoopStatement (CodeStatement initStatement, + CodeExpression testExpression, + CodeStatement incrementStatement, + CodeStatement [] statements) + { + this.initStatement = initStatement; + this.testExpression = testExpression; + this.incrementStatement = incrementStatement; + this.statements = new CodeStatementCollection (); + this.statements.AddRange (statements); + } + + // + // Properties + // + + public CodeStatement InitStatement { + get { + return initStatement; + } + + set { + initStatement = value; + } + } + + public CodeStatement IncrementStatement { + get { + return incrementStatement; + } + + set { + incrementStatement = value; + } + } + + public CodeStatementCollection Statements { + get { + return statements; + } + } + + public CodeExpression TestExpression { + get { + return testExpression; + } + + set { + testExpression = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeIfStatement.cs b/mcs/class/System/System.CodeDom/CodeIfStatement.cs new file mode 100755 index 00000000000..4ca158416b6 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeIfStatement.cs @@ -0,0 +1,73 @@ +// +// System.CodeDom CodeIfStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeIfStatement : CodeStatement { + + CodeExpression condition; + CodeStatementCollection trueStatements; + CodeStatementCollection falseStatements; + + // + // Constructors + // + public CodeIfStatement () + { + trueStatements = new CodeStatementCollection (); + falseStatements = new CodeStatementCollection (); + } + + public CodeIfStatement (CodeExpression condition, CodeStatement [] trueStatements) + { + this.condition = condition; + this.trueStatements = new CodeStatementCollection (); + this.trueStatements.AddRange (trueStatements); + this.falseStatements = new CodeStatementCollection (); + } + + public CodeIfStatement (CodeExpression condition, + CodeStatement [] trueStatements, + CodeStatement [] falseStatements) + { + this.condition = condition; + + this.trueStatements = new CodeStatementCollection (); + this.trueStatements.AddRange (trueStatements); + + this.falseStatements = new CodeStatementCollection (); + this.falseStatements.AddRange (falseStatements); + } + + // + // Properties + // + public CodeExpression Condition { + get { + return condition; + } + + set { + condition = value; + } + } + + public CodeStatementCollection FalseStatements { + get { + return falseStatements; + } + } + + public CodeStatementCollection TrueStatements { + get { + return trueStatements; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeIndexerExpression.cs b/mcs/class/System/System.CodeDom/CodeIndexerExpression.cs new file mode 100755 index 00000000000..8dbc95b44a2 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeIndexerExpression.cs @@ -0,0 +1,34 @@ +// +// System.CodeDom CodeFieldReferenceExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeIndexerExpression : CodeExpression { + CodeExpression targetObject; + CodeExpression index; + + // + // Constructors + // + public CodeIndexerExpression () + { + } + + public CodeIndexerExpression (CodeExpression targetObject, CodeExpression index) + { + this.index = index; + this.targetObject = targetObject; + } + + // + // Properties + // + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeLinePragma.cs b/mcs/class/System/System.CodeDom/CodeLinePragma.cs new file mode 100755 index 00000000000..d83a9f6c8c5 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeLinePragma.cs @@ -0,0 +1,50 @@ +// +// System.CodeDom CodeLinePragma Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// +using System; + +namespace System.CodeDom { + + // <summary> + // Use objects of this class to keep track of locations where + // statements are defined + // </summary> + public class CodeLinePragma { + string fileName; + int lineNumber; + + public CodeLinePragma (string fileName, int lineNumber) + { + this.fileName = fileName; + this.lineNumber = lineNumber; + } + + // + // Properties + // + public string FileName { + get { + return fileName; + } + + set { + fileName = value; + } + } + + public int LineNumber { + get { + return lineNumber; + } + + set { + lineNumber = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeLiteralClassMember.cs b/mcs/class/System/System.CodeDom/CodeLiteralClassMember.cs new file mode 100755 index 00000000000..0733b786a7f --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeLiteralClassMember.cs @@ -0,0 +1,40 @@ +// +// System.CodeDom CodeLiteralClassMember Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeLiteralClassMember : CodeClassMember { + string text; + + // + // Constructors + // + public CodeLiteralClassMember () + { + } + + public CodeLiteralClassMember (string text) + { + this.text = text; + } + + // + // Properties + // + string Text { + get { + return text; + } + + set { + text = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeLiteralExpression.cs b/mcs/class/System/System.CodeDom/CodeLiteralExpression.cs new file mode 100755 index 00000000000..36ca6908b2c --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeLiteralExpression.cs @@ -0,0 +1,40 @@ +// +// System.CodeDom CodeLiteralExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeLiteralExpression : CodeExpression { + string val; + + // + // Constructors + // + public CodeLiteralExpression () + { + } + + public CodeLiteralExpression (string value) + { + val = value; + } + + // + // Properties + // + string Value { + get { + return val; + } + + set { + val = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeLiteralNamespace.cs b/mcs/class/System/System.CodeDom/CodeLiteralNamespace.cs new file mode 100755 index 00000000000..7cbf4c46b9e --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeLiteralNamespace.cs @@ -0,0 +1,48 @@ +// +// System.CodeDom CodeLiteralNamespace Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeLiteralNamespace : CodeNamespace { + CodeLinePragma linePragma; + string value; + + // + // Constructors + // + public CodeLiteralNamespace (string value) + { + this.value = value; + } + + // + // Properties + // + string Value { + get { + return value; + } + + set { + this.value = value; + } + } + + CodeLinePragma LinePragma { + get { + return linePragma; + } + + set { + linePragma = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeLiteralStatement.cs b/mcs/class/System/System.CodeDom/CodeLiteralStatement.cs new file mode 100755 index 00000000000..63e1fec6bbb --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeLiteralStatement.cs @@ -0,0 +1,36 @@ +// +// System.CodeDom CodeLiteralStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeLiteralStatement : CodeStatement { + string value; + + // + // Constructors + // + public CodeLiteralStatement (string value) + { + this.value = value; + } + + // + // Properties + // + string Value { + get { + return value; + } + + set { + this.value = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeMemberEvent.cs b/mcs/class/System/System.CodeDom/CodeMemberEvent.cs new file mode 100755 index 00000000000..46f1fee42d9 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeMemberEvent.cs @@ -0,0 +1,50 @@ +// +// System.CodeDom CodeMemberEvent Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeMemberEvent : CodeClassMember { + string implementsType, type; + bool privateImplements; + + public CodeMemberEvent () + { + } + + public string ImplementsType { + get { + return implementsType; + } + + set { + implementsType = value; + } + } + + public bool PrivateImplements { + get { + return privateImplements; + } + + set { + privateImplements = value; + } + } + + public string Type { + get { + return type; + } + + set { + type = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeMemberField.cs b/mcs/class/System/System.CodeDom/CodeMemberField.cs new file mode 100755 index 00000000000..ac8b1d3ab79 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeMemberField.cs @@ -0,0 +1,49 @@ +// +// System.CodeDom CodeMemberField Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeMemberField : CodeClassMember { + CodeExpression initExpression; + string type, name; + + public CodeMemberField () + { + } + + public CodeMemberField (string type, string name) + { + this.type = type; + this.name = name; + } + + // + // Properties + // + public CodeExpression InitExpression { + get { + return initExpression; + } + + set { + initExpression = value; + } + } + + public string Type { + get { + return type; + } + + set { + type = name; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeMemberMethod.cs b/mcs/class/System/System.CodeDom/CodeMemberMethod.cs new file mode 100755 index 00000000000..aa417a2aeee --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeMemberMethod.cs @@ -0,0 +1,73 @@ +// +// System.CodeDom CodeMemberMethod Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeMemberMethod : CodeClassMember { + CodeParameterDeclarationExpressionCollection parameters; + CodeStatementCollection statements; + string implementsType; + string returnType; + bool privateImplements; + + public CodeMemberMethod () + { + } + + public string ImplementsType { + get { + return implementsType; + } + + set { + implementsType = value; + } + } + + public bool PrivateImplements { + get { + return privateImplements; + } + + set { + privateImplements = value; + } + } + + public string ReturnType { + get { + return returnType; + } + + set { + returnType = value; + } + } + + public CodeParameterDeclarationExpressionCollection Parameters { + get { + return parameters; + } + + set { + parameters = value; + } + } + + public CodeStatementCollection Statements { + get { + return statements; + } + + set { + statements = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeMemberProperty.cs b/mcs/class/System/System.CodeDom/CodeMemberProperty.cs new file mode 100755 index 00000000000..8889de098a0 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeMemberProperty.cs @@ -0,0 +1,108 @@ +// +// System.CodeDom CodeMemberProperty Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeMemberProperty : CodeClassMember { + CodeParameterDeclarationExpressionCollection parameters; + CodeStatementCollection getStatements, setStatements; + bool hasGet, hasSet; + string implementsType, type; + bool privateImplements; + + public CodeMemberProperty () + { + } + + // + // Properties + // + + public string ImplementsType { + get { + return implementsType; + } + + set { + implementsType = value; + } + } + + public bool PrivateImplements { + get { + return privateImplements; + } + + set { + privateImplements = value; + } + } + + public CodeParameterDeclarationExpressionCollection Parameters { + get { + return parameters; + } + + set { + parameters = value; + } + } + + public CodeStatementCollection SetStatements { + get { + return setStatements; + } + + set { + setStatements = value; + } + } + + public CodeStatementCollection GetStatements { + get { + return getStatements; + } + + set { + getStatements = value; + } + } + + public string Type { + get { + return type; + } + + set { + type = value; + } + } + + public bool HasGet { + get { + return hasGet; + } + + set { + hasGet = value; + } + } + + public bool HasSet { + get { + return hasSet; + } + + set { + hasSet = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeMethodInvokeExpression.cs b/mcs/class/System/System.CodeDom/CodeMethodInvokeExpression.cs new file mode 100755 index 00000000000..cb51ff9b5d4 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeMethodInvokeExpression.cs @@ -0,0 +1,68 @@ +// +// System.CodeDom CodeMethodInvokeExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeMethodInvokeExpression : CodeExpression { + string methodName; + CodeExpression targetObject; + CodeExpressionCollection parameters; + + // + // Constructors + // + public CodeMethodInvokeExpression () {} + + public CodeMethodInvokeExpression (CodeExpression targetObject, string methodName) + { + this.targetObject = targetObject; + this.methodName = methodName; + } + + public CodeMethodInvokeExpression (CodeExpression targetObject, + string methodName, + CodeExpression [] parameters) + { + this.targetObject = targetObject; + this.methodName = methodName; + this.parameters = new CodeExpressionCollection (); + this.parameters.AddRange (parameters); + } + + public string MethodName { + get { + return methodName; + } + + set { + methodName = value; + } + } + + public CodeExpressionCollection Parameters { + get { + return parameters; + } + + set { + parameters = value; + } + } + + public CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeMethodInvokeStatement.cs b/mcs/class/System/System.CodeDom/CodeMethodInvokeStatement.cs new file mode 100755 index 00000000000..519e4164ad5 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeMethodInvokeStatement.cs @@ -0,0 +1,84 @@ +// +// System.CodeDom CodeMethodInvokeStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeMethodInvokeStatement : CodeStatement { + string methodName; + CodeExpression targetObject; + CodeExpressionCollection parameters; + CodeMethodInvokeExpression methodInvoke; + + // + // Constructors + // + public CodeMethodInvokeStatement () {} + + public CodeMethodInvokeStatement (CodeMethodInvokeExpression methodInvoke) + { + this.methodInvoke = methodInvoke; + } + + public CodeMethodInvokeStatement (CodeExpression targetObject, string methodName) + { + this.targetObject = targetObject; + this.methodName = methodName; + } + + public CodeMethodInvokeStatement (CodeExpression targetObject, + string methodName, + CodeExpression [] parameters) + { + this.targetObject = targetObject; + this.methodName = methodName; + this.parameters = new CodeExpressionCollection (); + this.parameters.AddRange (parameters); + } + + public string MethodName { + get { + return methodName; + } + + set { + methodName = value; + } + } + + public CodeExpressionCollection Parameters { + get { + return parameters; + } + + set { + parameters = value; + } + } + + public CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + + public CodeMethodInvokeExpression MethodInvoke { + get { + return methodInvoke; + } + + set { + methodInvoke = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeMethodReturnStatement.cs b/mcs/class/System/System.CodeDom/CodeMethodReturnStatement.cs new file mode 100755 index 00000000000..c7844934f5b --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeMethodReturnStatement.cs @@ -0,0 +1,37 @@ +// +// System.CodeDom CodeReturnStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeReturnStatement : CodeStatement { + CodeExpression expression; + + public CodeReturnStatement () + { + } + + public CodeReturnStatement (CodeExpression expression) + { + this.expression = expression; + } + + // + // Properties + // + CodeExpression Expression { + get { + return expression; + } + + set { + expression = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeNamespace.cs b/mcs/class/System/System.CodeDom/CodeNamespace.cs new file mode 100755 index 00000000000..0794653cfd8 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeNamespace.cs @@ -0,0 +1,92 @@ +// +// System.CodeDom CodeNamespace Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeNamespace { + CodeClassCollection classes; + CodeNamespaceImportCollection imports; + bool allowLateBound, requireVariableDeclaration; + string name; + object userData; + + public CodeNamespace () + { + } + + public CodeNamespace (string name) + { + this.name = name; + } + + // + // Properties + // + + public bool AllowLateBound { + get { + return allowLateBound; + } + + set { + allowLateBound = value; + } + } + + public CodeClassCollection Classes { + get { + return classes; + } + + set { + classes = value; + } + } + + public CodeNamespaceImportCollection Imports { + get { + return imports; + } + + set { + imports = value; + } + } + + public string Name { + get { + return name; + } + + set { + name = value; + } + } + + public bool RequireVariableDeclaration { + get { + return requireVariableDeclaration; + } + + set { + requireVariableDeclaration = value; + } + } + + public object UserData { + get { + return userData; + } + + set { + userData = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeNamespaceImport.cs b/mcs/class/System/System.CodeDom/CodeNamespaceImport.cs new file mode 100755 index 00000000000..d13767c588e --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeNamespaceImport.cs @@ -0,0 +1,36 @@ +// +// System.CodeDom CodeNamespaceImport Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeNamespaceImport : CodeStatement { + string nameSpace; + + public CodeNamespaceImport () {} + + public CodeNamespaceImport (string nameSpace) + { + this.nameSpace = nameSpace; + } + + // + // Properties + // + + public string Namespace { + get { + return nameSpace; + } + + set { + nameSpace = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeNamespaceImportCollection.cs b/mcs/class/System/System.CodeDom/CodeNamespaceImportCollection.cs new file mode 100755 index 00000000000..d65ee247c4d --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeNamespaceImportCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeNamespaceImportCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeNamespaceImportCollection : IList, ICollection, IEnumerable { + + ArrayList namespaceImports; + + // + // Constructors + // + public CodeNamespaceImportCollection () + { + namespaceImports = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return namespaceImports.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeNamespaceImport value) + { + namespaceImports.Add (value); + } + + public void AddRange (CodeNamespaceImport [] values) + { + foreach (CodeNamespaceImport ca in values) + namespaceImports.Add (ca); + + } + + public void Clear () + { + namespaceImports.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeNamespaceImportCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeNamespaceImportCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeNamespaceImportCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return namespaceImports.Add (value); + } + + public bool Contains (Object value) + { + return namespaceImports.Contains (value); + } + + public int IndexOf (Object value) + { + return namespaceImports.IndexOf (value); + } + + public void Insert (int index, Object value) + { + namespaceImports [index] = value; + } + + public object this[int index] { + get { + return namespaceImports [index]; + } + + set { + namespaceImports [index] = value; + } + } + + public void Remove (object value) + { + namespaceImports.Remove (value); + } + + public void RemoveAt (int index) + { + namespaceImports.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + namespaceImports.CopyTo (array, index); + } + + public object SyncRoot { + get { + return namespaceImports.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return namespaceImports.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeObjectCreateExpression.cs b/mcs/class/System/System.CodeDom/CodeObjectCreateExpression.cs new file mode 100755 index 00000000000..421d2aa29de --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeObjectCreateExpression.cs @@ -0,0 +1,54 @@ +// +// System.CodeDom CodeObjectCreateExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeObjectCreateExpression : CodeExpression { + string createType; + CodeExpressionCollection parameters; + + public CodeObjectCreateExpression () {} + + public CodeObjectCreateExpression (string createType) + { + this.createType = createType; + } + + public CodeObjectCreateExpression (string createType, CodeExpression [] parameters) + { + this.createType = createType; + this.parameters = new CodeExpressionCollection (); + this.parameters.AddRange (parameters); + } + + // + // Properties + // + public string CreateType { + get { + return createType; + } + + set { + createType = value; + } + } + + public CodeExpressionCollection Parameters { + get { + return parameters; + } + + set { + parameters = value; + } + } + + } +} diff --git a/mcs/class/System/System.CodeDom/CodeParameterDeclarationExpression.cs b/mcs/class/System/System.CodeDom/CodeParameterDeclarationExpression.cs new file mode 100755 index 00000000000..93f4b0ee7b0 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeParameterDeclarationExpression.cs @@ -0,0 +1,68 @@ +// +// System.CodeDom CodeParameterDeclarationExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeParameterDeclarationExpression : CodeExpression { + FieldDirection direction; + CodeAttributeBlock customAttributes; + string type, name; + + public CodeParameterDeclarationExpression () + { + } + + public CodeParameterDeclarationExpression (string type, string name) + { + this.type = type; + this.name = name; + } + + public string Type { + get { + return type; + } + + set { + type = value; + } + } + + public string Name { + get { + return name; + } + + set { + name = value; + } + } + + public CodeAttributeBlock CustomAttributes { + get { + return customAttributes; + } + + set { + customAttributes = value; + } + } + + public FieldDirection Direction { + get { + return direction; + } + + set { + direction = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeParameterDeclarationExpressionCollection.cs b/mcs/class/System/System.CodeDom/CodeParameterDeclarationExpressionCollection.cs new file mode 100755 index 00000000000..970e9ec78e7 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeParameterDeclarationExpressionCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeParameterDeclarationExpressionCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeParameterDeclarationExpressionCollection : IList, ICollection, IEnumerable { + + ArrayList parameterDeclExprs; + + // + // Constructors + // + public CodeParameterDeclarationExpressionCollection () + { + parameterDeclExprs = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return parameterDeclExprs.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeParameterDeclarationExpression value) + { + parameterDeclExprs.Add (value); + } + + public void AddRange (CodeParameterDeclarationExpression [] values) + { + foreach (CodeParameterDeclarationExpression ca in values) + parameterDeclExprs.Add (ca); + + } + + public void Clear () + { + parameterDeclExprs.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeParameterDeclarationExpressionCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeParameterDeclarationExpressionCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeParameterDeclarationExpressionCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return parameterDeclExprs.Add (value); + } + + public bool Contains (Object value) + { + return parameterDeclExprs.Contains (value); + } + + public int IndexOf (Object value) + { + return parameterDeclExprs.IndexOf (value); + } + + public void Insert (int index, Object value) + { + parameterDeclExprs [index] = value; + } + + public object this[int index] { + get { + return parameterDeclExprs [index]; + } + + set { + parameterDeclExprs [index] = value; + } + } + + public void Remove (object value) + { + parameterDeclExprs.Remove (value); + } + + public void RemoveAt (int index) + { + parameterDeclExprs.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + parameterDeclExprs.CopyTo (array, index); + } + + public object SyncRoot { + get { + return parameterDeclExprs.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return parameterDeclExprs.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodePrimitiveExpression.cs b/mcs/class/System/System.CodeDom/CodePrimitiveExpression.cs new file mode 100755 index 00000000000..98d64e3ae0a --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodePrimitiveExpression.cs @@ -0,0 +1,33 @@ +// +// System.CodeDom CodePrimitiveExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodePrimitiveExpression : CodeExpression { + object value; + + public CodePrimitiveExpression () {} + + public CodePrimitiveExpression (Object value) + { + this.value = value; + } + + public object Value { + get { + return value; + } + + set { + this.value = value; + } + } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodePropertyReferenceExpression.cs b/mcs/class/System/System.CodeDom/CodePropertyReferenceExpression.cs new file mode 100755 index 00000000000..13f4471ce0c --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodePropertyReferenceExpression.cs @@ -0,0 +1,59 @@ +// +// System.CodeDom CodePropertyReferenceExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodePropertyReferenceExpression : CodeExpression { + CodeExpressionCollection parameters; + CodeExpression targetObject; + string propertyName; + + public CodePropertyReferenceExpression () {} + + public CodePropertyReferenceExpression (CodeExpression targetObject, + string propertyName) + { + this.targetObject = targetObject; + this.propertyName = propertyName; + } + + // + // Properties + // + public CodeExpressionCollection Parameter { + get { + return parameters; + } + + set { + parameters = value; + } + } + + public string PropertyName { + get { + return propertyName; + } + + set { + propertyName = value; + } + } + + public CodeExpression TargetObject { + get { + return targetObject; + } + + set { + targetObject = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeStatement.cs b/mcs/class/System/System.CodeDom/CodeStatement.cs new file mode 100755 index 00000000000..50ce346857e --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeStatement.cs @@ -0,0 +1,47 @@ +// +// System.CodeDom CodeStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeStatement { + + CodeLinePragma codeLinePragma; + object userData; + + // + // Constructors + // + public CodeStatement () + { + } + + // + // Properties + // + public CodeLinePragma LinePragma { + get { + return codeLinePragma; + } + + set { + codeLinePragma = value; + } + } + + public object UserData { + get { + return userData; + } + + set { + userData = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeStatementCollection.cs b/mcs/class/System/System.CodeDom/CodeStatementCollection.cs new file mode 100755 index 00000000000..6a70aeafd2a --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeStatementCollection.cs @@ -0,0 +1,165 @@ +// +// System.CodeDom CodeStatementCollection Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + using System.Collections; + + public class CodeStatementCollection : IList, ICollection, IEnumerable { + + ArrayList statements; + + // + // Constructors + // + public CodeStatementCollection () + { + statements = new ArrayList (); + } + + // + // Properties + // + public int Count { + get { + return statements.Count; + } + } + + public bool IsFixedSize { + get { + return true; + } + } + + // + // Methods + // + public void Add (CodeStatement value) + { + statements.Add (value); + } + + public void AddRange (CodeStatement [] values) + { + foreach (CodeStatement ca in values) + statements.Add (ca); + + } + + public void Clear () + { + statements.Clear (); + } + + private class Enumerator : IEnumerator { + private CodeStatementCollection collection; + private int currentIndex = -1; + + internal Enumerator (CodeStatementCollection collection) + { + this.collection = collection; + } + + public object Current { + get { + if (currentIndex == collection.Count) + throw new InvalidOperationException (); + return collection [currentIndex]; + } + } + + public bool MoveNext () + { + if (currentIndex > collection.Count) + throw new InvalidOperationException (); + return ++currentIndex < collection.Count; + } + + public void Reset () + { + currentIndex = -1; + } + } + + public IEnumerator GetEnumerator () + { + return new CodeStatementCollection.Enumerator (this); + } + + // + // IList method implementations + // + public int Add (object value) + { + return statements.Add (value); + } + + public bool Contains (Object value) + { + return statements.Contains (value); + } + + public int IndexOf (Object value) + { + return statements.IndexOf (value); + } + + public void Insert (int index, Object value) + { + statements [index] = value; + } + + public object this[int index] { + get { + return statements [index]; + } + + set { + statements [index] = value; + } + } + + public void Remove (object value) + { + statements.Remove (value); + } + + public void RemoveAt (int index) + { + statements.RemoveAt (index); + } + + // + // ICollection method implementations + // + public void CopyTo (Array array, int index) + { + statements.CopyTo (array, index); + } + + public object SyncRoot { + get { + return statements.SyncRoot; + } + } + + public bool IsReadOnly { + get { + return false; + } + } + + public bool IsSynchronized { + get { + return statements.IsSynchronized; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeThisReferenceExpression.cs b/mcs/class/System/System.CodeDom/CodeThisReferenceExpression.cs new file mode 100755 index 00000000000..4084e04f7b2 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeThisReferenceExpression.cs @@ -0,0 +1,16 @@ +// +// System.CodeDom CodeParameterDeclarationExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeThisReferenceExpression : CodeExpression { + public CodeThisReferenceExpression () { } + } +} + diff --git a/mcs/class/System/System.CodeDom/CodeThrowExceptionStatement.cs b/mcs/class/System/System.CodeDom/CodeThrowExceptionStatement.cs new file mode 100755 index 00000000000..4b3071515be --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeThrowExceptionStatement.cs @@ -0,0 +1,31 @@ +// +// System.CodeDom CodeThrowExceptionStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeThrowExceptionStatement : CodeStatement { + CodeExpression toThrow; + + public CodeThrowExceptionStatement () {} + public CodeThrowExceptionStatement (CodeExpression toThrow) + { + this.toThrow = toThrow; + } + + public CodeExpression ToThrow { + get { + return toThrow; + } + + set { + toThrow = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeTryCatchFinallyStatement.cs b/mcs/class/System/System.CodeDom/CodeTryCatchFinallyStatement.cs new file mode 100755 index 00000000000..2ad078a9d4e --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeTryCatchFinallyStatement.cs @@ -0,0 +1,70 @@ +// +// System.CodeDom CodeTryCatchFinallyStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeTryCatchFinallyStatement : CodeStatement { + CodeStatementCollection tryStatements, finallyStatements; + CodeCatchClauseCollection catchClauses; + + public CodeTryCatchFinallyStatement () {} + + public CodeTryCatchFinallyStatement (CodeStatement [] tryStatements, + CodeCatchClause [] catchClauses) + { + this.tryStatements = new CodeStatementCollection (); + this.catchClauses = new CodeCatchClauseCollection (); + + this.tryStatements.AddRange (tryStatements); + this.catchClauses.AddRange (catchClauses); + } + + public CodeTryCatchFinallyStatement (CodeStatement [] tryStatements, + CodeCatchClause [] catchClauses, + CodeStatement [] finallyStatements) + { + this.tryStatements = new CodeStatementCollection (); + this.catchClauses = new CodeCatchClauseCollection (); + this.finallyStatements = new CodeStatementCollection (); + + this.tryStatements.AddRange (tryStatements); + this.catchClauses.AddRange (catchClauses); + this.finallyStatements.AddRange (finallyStatements); + } + + public CodeStatementCollection FinallyStatements{ + get { + return finallyStatements; + } + + set { + finallyStatements = value; + } + } + + public CodeStatementCollection TryStatements { + get { + return tryStatements; + } + + set { + tryStatements = value; + } + } + public CodeCatchClauseCollection CatchClauses { + get { + return catchClauses; + } + + set { + catchClauses = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeTypeOfExpression.cs b/mcs/class/System/System.CodeDom/CodeTypeOfExpression.cs new file mode 100755 index 00000000000..3a496f95923 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeTypeOfExpression.cs @@ -0,0 +1,32 @@ +// +// System.CodeDom CodeTypeOfExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeTypeOfExpression : CodeExpression { + string type; + + public CodeTypeOfExpression () {} + + public CodeTypeOfExpression (string type) + { + this.type = type; + } + + public string Type { + get { + return type; + } + + set { + type = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeTypeReferenceExpression.cs b/mcs/class/System/System.CodeDom/CodeTypeReferenceExpression.cs new file mode 100755 index 00000000000..8fcbc04ef77 --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeTypeReferenceExpression.cs @@ -0,0 +1,32 @@ +// +// System.CodeDom CodeTypeReferenceExpression Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeTypeReferenceExpression : CodeExpression { + string type; + + public CodeTypeReferenceExpression () {} + + public CodeTypeReferenceExpression (string type) + { + this.type = type; + } + + public string Type { + get { + return type; + } + + set { + type = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/CodeVariableDeclarationStatement.cs b/mcs/class/System/System.CodeDom/CodeVariableDeclarationStatement.cs new file mode 100755 index 00000000000..faff810835f --- /dev/null +++ b/mcs/class/System/System.CodeDom/CodeVariableDeclarationStatement.cs @@ -0,0 +1,62 @@ +// +// System.CodeDom CodeVariableDeclarationStatement Class implementation +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) 2001 Ximian, Inc. +// + +namespace System.CodeDom { + + public class CodeVariableDeclarationStatement : CodeStatement { + CodeExpression initExpression; + string type, name; + + public CodeVariableDeclarationStatement () {} + + public CodeVariableDeclarationStatement (string type, string name) + { + this.type = type; + this.name = name; + } + + public CodeVariableDeclarationStatement (string type, string name, + CodeExpression initExpression) + { + this.type = type; + this.name = name; + this.initExpression = initExpression; + } + + public CodeExpression InitExpression { + get { + return initExpression; + } + + set { + initExpression = value; + } + } + + public string Name { + get { + return name; + } + + set { + name = value; + } + } + + public string Type { + get { + return type; + } + + set { + type = value; + } + } + } +} diff --git a/mcs/class/System/System.CodeDom/makefile b/mcs/class/System/System.CodeDom/makefile new file mode 100755 index 00000000000..58af6697c82 --- /dev/null +++ b/mcs/class/System/System.CodeDom/makefile @@ -0,0 +1,2 @@ +CodeClassCollection.cs: Code-X-Collection.cs + sed -e 's/@CONTAINEE@/Class/g' -e 's/@arrayname@/classes/g' < Code-X-Collection.cs > CodeClassCollection.cs
\ No newline at end of file diff --git a/mcs/class/System/System.CodeDom/makeit b/mcs/class/System/System.CodeDom/makeit new file mode 100755 index 00000000000..07dcc7f61de --- /dev/null +++ b/mcs/class/System/System.CodeDom/makeit @@ -0,0 +1,15 @@ +#!/bin/sh +dx () +{ + sed -e "s/@CONTAINEE@/$1/g" -e "s/@arrayname@/$2/g" < Code-X-Collection.cs > Code$1Collection.cs +} + +dx AttributeArgument attributeArgs +dx AttributeDeclaration attributeDecls +dx CatchClause catchClauses +dx Class classes +dx ClassMember classMembers +dx Expression expressions +dx NamespaceImport namespaceImports +dx ParameterDeclarationExpression parameterDeclExprs +dx Statement statements
\ No newline at end of file diff --git a/mcs/class/System/System.Collections.Specialized/BitVector32.cs b/mcs/class/System/System.Collections.Specialized/BitVector32.cs new file mode 100644 index 00000000000..e04a44d7234 --- /dev/null +++ b/mcs/class/System/System.Collections.Specialized/BitVector32.cs @@ -0,0 +1,67 @@ +// +// System.Collections.Specialized.BitVector32.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System.Collections.Specialized { + + public struct BitVector32 { + int value; + + public struct Section { + public short maxval; + } + + public static Section CreateSection (short maxval) + { + Section s = new Section(); + + // FIXME: Imeplemtn me + + return s; + } + + public static int CreateMask () + { + return 1; + } + + public static int CreateMask (int prev) + { + return prev << 1; + } + + public BitVector32 (BitVector32 source) + { + value = source.value; + } + + public BitVector32 (int init) + { + value = init; + } + + public override bool Equals (object o) + { + if (!(o is BitVector32)) + return false; + + return value == ((BitVector32) o).value; + } + + public override int GetHashCode () + { + return 0; + } + + public int Data { + get { + return value; + } + } + } +} diff --git a/mcs/class/System/System.Net/AuthenticationManager.cs b/mcs/class/System/System.Net/AuthenticationManager.cs index d1c3e48b291..fd723a11005 100755 --- a/mcs/class/System/System.Net/AuthenticationManager.cs +++ b/mcs/class/System/System.Net/AuthenticationManager.cs @@ -7,6 +7,8 @@ // (C) Ximian, Inc. http://www.ximian.com // +using System.Collections; + namespace System.Net { public class AuthenticationManager { @@ -15,41 +17,34 @@ namespace System.Net { public static IEnumerator RegisteredModules { get { - if (!modules) + if (modules == null) modules = new ArrayList (); - return modules; + return modules as IEnumerator; } } public static Authorization PreAuthenticate (WebRequest request, - ICredentialLookup credentials) + ICredentials credentials) { // FIXME: implement + return null; } public static void Register (IAuthenticationModule authenticationModule) { - if (!modules) + if (modules == null) modules = new ArrayList (); modules.Add (authenticationModule); } - public static Authorization Respond (WebHeaders ResponseHeaders, - WebRequest Request, - ICredentialLookup credentials) - { - // FIXME: implement - return null; - } - public static void Unregister (IAuthenticationModule authenticationModule) { // FIXME: implement } - pubilc static void Unregister (string authenticationScheme) + public static void Unregister (string authenticationScheme) { // FIXME: implement } diff --git a/mcs/class/System/System.Net/Authorization.cs b/mcs/class/System/System.Net/Authorization.cs index e3866b0119e..60e8c889f22 100755 --- a/mcs/class/System/System.Net/Authorization.cs +++ b/mcs/class/System/System.Net/Authorization.cs @@ -27,7 +27,7 @@ namespace System.Net { public bool Complete { get { - return finished; + return complete; } } diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog new file mode 100644 index 00000000000..241bc2a2fbb --- /dev/null +++ b/mcs/class/System/System.Net/ChangeLog @@ -0,0 +1,13 @@ +2001-07-12 Sean MacIsaac <macisaac@ximian.com> + + * Authorization.cs: Fixed compiler error. + + * IAuthenticationModule.cs: Changes for Beta2. + + * IPAddress.cs: Internal storage changed to be uint not int. + + * IPEndPoint.cs: Fixed compiler error. + + * EndPoint.cs: Fixed compiler error. + + * AuthenticationManager.cs: Fixed typo. diff --git a/mcs/class/System/System.Net/EndPoint.cs b/mcs/class/System/System.Net/EndPoint.cs index d35cad86757..9078f4d1bdc 100755 --- a/mcs/class/System/System.Net/EndPoint.cs +++ b/mcs/class/System/System.Net/EndPoint.cs @@ -12,18 +12,21 @@ namespace System.Net { public class EndPoint { public virtual EndPoint Create (SocketAddress address) { + return null; } public virtual SocketAddress Serialize () { + return null; } protected EndPoint () { } - public int AddressFamily { - virtual get { + public virtual int AddressFamily { + get { + return 0; } } diff --git a/mcs/class/System/System.Net/IAuthenticationModule.cs b/mcs/class/System/System.Net/IAuthenticationModule.cs index 089cdd9d930..15119f74da3 100755 --- a/mcs/class/System/System.Net/IAuthenticationModule.cs +++ b/mcs/class/System/System.Net/IAuthenticationModule.cs @@ -23,8 +23,8 @@ namespace System.Net { bool CanRespond (string challenge); - Authorization PreAuthenticate (WebRequest request, ICredentialLookup credentials); + Authorization PreAuthenticate (WebRequest request, ICredentials credentials); - Authorization Respond (string challenge, WebRequest request, ICredentialLookup credentials); + Authorization Respond (string challenge, WebRequest request, ICredentials credentials); } } diff --git a/mcs/class/System/System.Net/IPAdress.cs b/mcs/class/System/System.Net/IPAdress.cs index fc4e2d8e79f..5255744a013 100755 --- a/mcs/class/System/System.Net/IPAdress.cs +++ b/mcs/class/System/System.Net/IPAdress.cs @@ -13,17 +13,17 @@ namespace System.Net { // Encapsulates an IP Address. // </remarks> public class IPAddress { - public int Address; + public uint address; - public const int InaddrAny = 0; - public const int InaddrBroadcast = 0xffffffff; - public const int InaddrLoopback = 0x7f000001; - public const int InaddrNone = 0xffffffff; + public const uint InaddrAny = 0; + public const uint InaddrBroadcast = 0xffffffff; + public const uint InaddrLoopback = 0x7f000001; + public const uint InaddrNone = 0xffffffff; // <summary> // Constructor from a 32-bit constant. // </summary> - public IPAddress (int address) + public IPAddress (uint address) { this.address = address; } @@ -33,13 +33,14 @@ namespace System.Net { // </summary> public IPAddress (string ip) { - string ips = ip.Split ("."); - int i, a = 0; + string[] ips = ip.Split (new char[] {'.'}); + int i; + uint a = 0; - for (i = 0; i < ips.Count; i++) - a = (a << 8) | (ips [i].ToInt16 ()); + for (i = 0; i < ips.Length; i++) + a = (a << 8) | (UInt16.Parse(ips [i])); - Address = a; + address = a; } // <summary> @@ -49,7 +50,7 @@ namespace System.Net { // <returns></returns> public static bool IsLoopback (IPAddress addr) { - return addr.Address == InaddrLoopback; + return addr.address == InaddrLoopback; } // <summary> @@ -58,13 +59,13 @@ namespace System.Net { // </summary> public override string ToString () { - System.Net.IPAddress.ToString (Address); + return ToString (address); } // <summary> // Returns this object rendered in a quad-dotted notation // </summary> - public static string ToString (int addr) + public static string ToString (uint addr) { return (addr >> 24).ToString () + "." + ((addr >> 16) & 0xff).ToString () + "." + @@ -75,13 +76,18 @@ namespace System.Net { // <returns> // Whether both objects are equal. // </returns> - public override bool Equal (object other) + public override bool Equals (object other) { - if (typeof (other) is System.Net.IPAddress){ - return Address == ((System.Net.IPAddress) other).Address; + if (other is System.Net.IPAddress){ + return address == ((System.Net.IPAddress) other).address; } return false; } + + public override int GetHashCode () + { + return (int)address; + } } } diff --git a/mcs/class/System/System.Net/IPEndPoint.cs b/mcs/class/System/System.Net/IPEndPoint.cs index 3d3809faade..e4d2bcf1582 100755 --- a/mcs/class/System/System.Net/IPEndPoint.cs +++ b/mcs/class/System/System.Net/IPEndPoint.cs @@ -15,7 +15,15 @@ namespace System.Net { public const int MaxPort = 65535; public const int MinPort = 0; - public short Port; + private int port; + public int Port { + get { + return port; + } + set { + port = value; + } + } public IPEndPoint (IPAddress address, int port) { @@ -23,15 +31,16 @@ namespace System.Net { Port = port; } - public IPEndPoint (int iaddr, int port) + public IPEndPoint (long iaddr, int port) { - IPAddress address = new IPAddress (iaddr); + IPAddress address = new IPAddress ((uint)iaddr); - IPEndPoint (address, port); + Address = address; + this.port = port; } - public int AddressFamily { - override get { + public override int AddressFamily { + get { return 2; } } diff --git a/mcs/class/System/makefile b/mcs/class/System/makefile new file mode 100644 index 00000000000..979b1986a52 --- /dev/null +++ b/mcs/class/System/makefile @@ -0,0 +1,4 @@ +all: windows + +windows: + $(csc) /target:library /out:System.dll /nowarn:1595 /recurse:*.cs diff --git a/mcs/class/corlib/System.Collections/ArrayList.cs b/mcs/class/corlib/System.Collections/ArrayList.cs new file mode 100644 index 00000000000..26243e5c3ef --- /dev/null +++ b/mcs/class/corlib/System.Collections/ArrayList.cs @@ -0,0 +1,462 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.ArrayList +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public class ArrayList : IList, ICollection, IEnumerable, ICloneable { + // constructors + + public ArrayList () { + dataArray = new object[capacity]; + } + + public ArrayList (ICollection c) { + } + + public ArrayList (int capacity) { + dataArray = new object[capacity]; + this.capacity = capacity; + } + + private ArrayList (object[] dataArray, int count, int capacity, + bool fixedSize, bool readOnly, bool synchronized) + { + this.dataArray = dataArray; + this.count = count; + this.capacity = capacity; + this.fixedSize = fixedSize; + this.readOnly = readOnly; + this.synchronized = synchronized; + } + + public static ArrayList ReadOnly (ArrayList list) { + throw new NotImplementedException ("System.Collections.ArrayList.ReadOnly"); + } + + public static ArrayList ReadOnly (IList list) { + throw new NotImplementedException ("System.Collections.ArrayList.ReadOnly"); + } + + public static ArrayList Synchronized (ArrayList list) { + throw new NotImplementedException ("System.Collections.ArrayList.Synchronized"); + } + + public static ArrayList Synchronized (IList list) { + throw new NotImplementedException ("System.Collections.ArrayList.Synchronized"); + } + + public static ArrayList FixedSize (ArrayList list) { + throw new NotImplementedException ("System.Collections.ArrayList.FixedSize"); + } + + public static ArrayList FixedSize (IList list) { + throw new NotImplementedException ("System.Collections.ArrayList.FixedSize"); + } + + public static ArrayList Repeat (object value, int count) { + ArrayList al = new ArrayList (count); + for (int i = 0; i < count; i++) { + al.dataArray[i] = value; + } + al.count = count; + + return al; + } + + public static ArrayList Adapter (IList list) { + throw new NotImplementedException ("System.Collections.ArrayList.Adapter"); + } + + // properties + + private bool fixedSize = false; + private bool readOnly = false; + private bool synchronized = false; + + private int count = 0; + private int capacity = 16; + + private object[] dataArray; + + private void copyDataArray (object[] outArray) { + for (int i = 0; i < count; i++) { + outArray[i] = dataArray[i]; + } + } + + private void setSize (int newSize) { + if (newSize == capacity) { + return; + } + + // note that this assumes that we've already sanity-checked + // the new size + object[] newDataArray = new object[newSize]; + copyDataArray (newDataArray); + dataArray = newDataArray; + + capacity = newSize; + } + + // note that this DOES NOT update count + private void shiftElements (int startIndex, int numshift) { + if (numshift == 0) { + return; + } + + if (count + numshift > capacity) { + setSize (capacity * 2); + shiftElements (startIndex, numshift); + } else { + if (numshift > 0) { + int numelts = count - startIndex; + for (int i = numelts-1; i >= 0; i--) { + dataArray[startIndex + numshift + i] = dataArray[startIndex + i]; + } + + for (int i = startIndex; i < startIndex + numshift; i++) { + dataArray[i] = null; + } + } else { + int numelts = count - startIndex + numshift; + for (int i = startIndex; i < numelts; i++) { + dataArray[i] = dataArray[i - numshift]; + } + for (int i = count + numshift; i < count; i++) { + dataArray[i] = null; + } + } + } + } + + public virtual int Capacity { + get { + return capacity; + } + + set { + if (readOnly) { + throw new NotSupportedException + ("Collection is read-only."); + } + + if (value < count) { + throw new ArgumentOutOfRangeException + ("ArrayList Capacity being set to less than Count"); + } + + if (fixedSize && value != capacity) { + throw new NotSupportedException + ("Collection is fixed size."); + } + + setSize (value); + } + } + + public virtual int Count { + get { + return count; + } + } + + public virtual bool IsFixedSize { + get { + return fixedSize; + } + } + + public virtual bool IsReadOnly { + get { + return readOnly; + } + } + + public virtual bool IsSynchronized { + get { + return synchronized; + } + } + + public virtual object this[int index] { + get { + if (index < 0) { + throw new ArgumentOutOfRangeException ("index < 0"); + } + + if (index >= count) { + throw new ArgumentOutOfRangeException ("index out of range"); + } + + return dataArray[index]; + } + set { + if (index < 0) { + throw new ArgumentOutOfRangeException ("index < 0"); + } + // FIXME -- should setting an index implicitly extend the array? + // the docs aren't clear -- I'm assuming not, since the exception + // is listed for both get and set + if (index >= count) { + throw new ArgumentOutOfRangeException ("index out of range"); + } + + if (readOnly) { + throw new NotSupportedException ("Collection is read-only."); + } + + dataArray[index] = value; + } + } + + public virtual object SyncRoot { + get { + throw new NotImplementedException ("System.Collections.ArrayList.SyncRoot.get"); + } + } + + + // methods + + public virtual int Add (object value) { + if (readOnly) { + throw new NotSupportedException ("Collection is read-only."); + } + + if (count + 1 >= capacity) { + setSize (capacity * 2); + } + + dataArray[count++] = value; + return count-1; + } + + public virtual void AddRange (ICollection c) { + throw new NotImplementedException ("System.Collections.ArrayList.AddRange"); + } + + public virtual int BinarySearch (object value) { + throw new NotImplementedException ("System.Collections.ArrayList.BinarySearch"); + } + + public virtual int BinarySearch (object value, IComparer comparer) { + throw new NotImplementedException ("System.Collections.ArrayList.BinarySearch"); + } + + public virtual int BinarySearch (int index, int count, + object value, IComparer comparer) { + throw new NotImplementedException ("System.Collections.ArrayList.BinarySearch"); + } + + public virtual void Clear () { + count = 0; + setSize(capacity); + } + + public virtual object Clone () { + return new ArrayList (dataArray, count, capacity, + fixedSize, readOnly, synchronized); + } + + public virtual bool Contains (object item) { + for (int i = 0; i < count; i++) { + if (Object.Equals (dataArray[i], item)) { + return true; + } + } + + return false; + } + + public virtual void CopyTo (Array array) { + } + + public virtual void CopyTo (Array array, int arrayIndex) { + } + + public virtual void CopyTo (int index, Array array, + int arrayIndex, int count) { + } + + public virtual IEnumerator GetEnumerator () { + return null; + } + + public virtual IEnumerator GetEnumerator (int index, int count) { + return null; + } + + public virtual ArrayList GetRange (int index, int count) { + return null; + } + + public virtual int IndexOf (object value) { + return IndexOf (value, 0, count); + } + + public virtual int IndexOf (object value, int startIndex) { + return IndexOf (value, startIndex, count - startIndex); + } + + public virtual int IndexOf (object value, int startIndex, int count) { + if (startIndex < 0 || startIndex + count > this.count || count < 0) { + throw new ArgumentOutOfRangeException ("IndexOf arguments out of range"); + } + for (int i = startIndex; i < (startIndex + count); i++) { + if (Object.Equals (dataArray[i], value)) { + return i; + } + } + + return -1; + } + + public virtual void Insert (int index, object value) { + if (readOnly) { + throw new NotSupportedException + ("Collection is read-only."); + } + + if (fixedSize) { + throw new NotSupportedException + ("Collection is fixed size."); + } + + if (index < 0 || index >= count) { + throw new ArgumentOutOfRangeException ("index < 0 or index >= count"); + } + + shiftElements (index, 1); + dataArray[index] = value; + count++; + } + + public virtual void InsertRange (int index, ICollection c) { + } + + public virtual int LastIndexOf (object value) { + return LastIndexOf (value, 0, count); + } + + public virtual int LastIndexOf (object value, int startIndex) { + return LastIndexOf (value, startIndex, count - startIndex); + } + + public virtual int LastIndexOf (object value, int StartIndex, + int count) + { + for (int i = count - 1; i >= 0; i--) { + if (Object.Equals (dataArray[i], value)) { + return i; + } + } + + return -1; + } + + public virtual void Remove (object obj) { + int objIndex = IndexOf (obj); + + if (objIndex == -1) { + // shouldn't an exception be thrown here?? + // the MS docs don't indicate one, and testing + // with the MS .net framework doesn't indicate one + return; + } + + RemoveRange (objIndex, 1); + } + + public virtual void RemoveAt (int index) { + RemoveRange (index, 1); + } + + public virtual void RemoveRange (int index, int count) { + if (readOnly) { + throw new NotSupportedException + ("Collection is read-only."); + } + + if (fixedSize) { + throw new NotSupportedException + ("Collection is fixed size."); + } + + if (index < 0 || index >= this.count || index + count > this.count) { + throw new ArgumentOutOfRangeException + ("index/count out of range"); + } + + shiftElements (index, - count); + this.count -= count; + } + + public virtual void Reverse () { + Reverse (0, count); + } + + public virtual void Reverse (int index, int count) { + if (readOnly) { + throw new NotSupportedException + ("Collection is read-only."); + } + + if (index < 0 || index + count > this.count) { + throw new ArgumentOutOfRangeException + ("index/count out of range"); + } + + Array.Reverse (dataArray, index, count); + } + + public virtual void SetRange (int index, ICollection c) { + } + + public virtual void Sort () { + Sort (0, count, null); + } + + public virtual void Sort (IComparer comparer) { + Sort (0, count, comparer); + } + + public virtual void Sort (int index, int count, IComparer comparer) { + if (readOnly) { + throw new NotSupportedException + ("Collection is read-only."); + } + + if (index < 0 || index + count > this.count) { + throw new ArgumentOutOfRangeException + ("index/count out of range"); + } + + Array.Sort (dataArray, index, count, comparer); + } + + public virtual object[] ToArray() { + object[] outArray = new object[count]; + Array.Copy (dataArray, outArray, count); + return outArray; + } + + public virtual Array ToArray (Type type) { + Array outArray = Array.CreateInstance (type, count); + Array.Copy (dataArray, outArray, count); + return outArray; + } + + public virtual void TrimToSize () { + // FIXME: implement this + } + } +} diff --git a/mcs/class/corlib/System.Collections/ChangeLog b/mcs/class/corlib/System.Collections/ChangeLog new file mode 100644 index 00000000000..f5f8d484ec5 --- /dev/null +++ b/mcs/class/corlib/System.Collections/ChangeLog @@ -0,0 +1,12 @@ +2001-07-13 Miguel de Icaza <miguel@ximian.com> + + * All files: Renamespace things to System. + +2001-07-05 Vladimir Vukicevic <vladimir@ximian.com> + + * ArrayList.cs: initial checkin and implementation + + * ICollection.cs, IComprarer.cs, IDictionary.cs, + IDictionaryEnumerator.cs, IEnumerable.cs, IHashCodeProvider.cs, + IList.cs: initial checkin + diff --git a/mcs/class/corlib/System.Collections/ICollection.cs b/mcs/class/corlib/System.Collections/ICollection.cs new file mode 100644 index 00000000000..2189931cae8 --- /dev/null +++ b/mcs/class/corlib/System.Collections/ICollection.cs @@ -0,0 +1,24 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.ICollection +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface ICollection : IEnumerable { + int Count { get; } + + bool IsSynchronized { get; } + + object SyncRoot { get; } + + void CopyTo (Array array, int index); + } +} diff --git a/mcs/class/corlib/System.Collections/IComparer.cs b/mcs/class/corlib/System.Collections/IComparer.cs new file mode 100644 index 00000000000..3d1ee2ef609 --- /dev/null +++ b/mcs/class/corlib/System.Collections/IComparer.cs @@ -0,0 +1,19 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.IComparer +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface IComparer { + int Compare (object x, object y); + } + +} diff --git a/mcs/class/corlib/System.Collections/IDictionary.cs b/mcs/class/corlib/System.Collections/IDictionary.cs new file mode 100644 index 00000000000..543954a7caf --- /dev/null +++ b/mcs/class/corlib/System.Collections/IDictionary.cs @@ -0,0 +1,40 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.IDictionary +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface IDictionary { + // properties + + bool IsFixedSize { get; } + + bool IsReadOnly { get; } + + object this[object key] { get; set; } + + ICollection Keys { get; } + + ICollection Values { get; } + + // methods + + void Add (object key, object value); + + void clear (); + + bool Contains (object key); + + IDictionaryEnumerator GetEnumerator (); + + void Remove (object key); + } +} diff --git a/mcs/class/corlib/System.Collections/IDictionaryEnumerator.cs b/mcs/class/corlib/System.Collections/IDictionaryEnumerator.cs new file mode 100644 index 00000000000..fb1998d55f0 --- /dev/null +++ b/mcs/class/corlib/System.Collections/IDictionaryEnumerator.cs @@ -0,0 +1,20 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.IDictionaryEnumerator +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface IDictionaryEnumerator : IEnumerator { + DictionaryEntry Entry { get; } + object Key { get; } + object Value { get; } + } +} diff --git a/mcs/class/corlib/System.Collections/IEnumerable.cs b/mcs/class/corlib/System.Collections/IEnumerable.cs new file mode 100644 index 00000000000..de0a57475dc --- /dev/null +++ b/mcs/class/corlib/System.Collections/IEnumerable.cs @@ -0,0 +1,18 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.IEnumerable +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface IEnumerable { + IEnumerator GetEnumerator(); + } +} diff --git a/mcs/class/corlib/System.Collections/IEnumerator.cs b/mcs/class/corlib/System.Collections/IEnumerator.cs new file mode 100644 index 00000000000..06d250c8b7e --- /dev/null +++ b/mcs/class/corlib/System.Collections/IEnumerator.cs @@ -0,0 +1,22 @@ +// +// System.Collections.IEnumerator +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface IEnumerator { + object Current { get; } + + bool MoveNext (); + + void Reset (); + } + +} diff --git a/mcs/class/corlib/System.Collections/IHashCodeProvider.cs b/mcs/class/corlib/System.Collections/IHashCodeProvider.cs new file mode 100644 index 00000000000..1cacfc103bd --- /dev/null +++ b/mcs/class/corlib/System.Collections/IHashCodeProvider.cs @@ -0,0 +1,18 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.IDictionary +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface IHashCodeProvider { + int GetHashCode (object obj); + } +} diff --git a/mcs/class/corlib/System.Collections/IList.cs b/mcs/class/corlib/System.Collections/IList.cs new file mode 100644 index 00000000000..e039a8358c3 --- /dev/null +++ b/mcs/class/corlib/System.Collections/IList.cs @@ -0,0 +1,40 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.Collections.IList +// +// Author: +// Vladimir Vukicevic (vladimir@pobox.com) +// +// (C) 2001 Vladimir Vukicevic +// + +using System; + +namespace System.Collections { + + public interface IList : ICollection, IEnumerable { + // properties + + bool IsFixedSize { get; } + + bool IsReadOnly { get; } + + object this[int index] { get; set; } + + // methods + + int Add (object value); + + void Clear (); + + bool Contains (object value); + + int IndexOf (object value); + + void Insert (int index, object value); + + void Remove (object value); + + void RemoveAt (int index); + } +} diff --git a/mcs/class/corlib/System.Globalization/Calendar.cs b/mcs/class/corlib/System.Globalization/Calendar.cs new file mode 100644 index 00000000000..f29d1c3e303 --- /dev/null +++ b/mcs/class/corlib/System.Globalization/Calendar.cs @@ -0,0 +1,58 @@ +// +// System.Globalization.Calendar.cs +// +// Nick made it. (nick@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com/ +// + +namespace System.Globalization +{ + public abstract class Calendar + { + protected Calendar (); + + public const int CurrentEra; + + public abstract int[] Eras {get;} + public virtual int TwoDigitYearMax {get; set;} + + public virtual DateTime AddDays ( DateTime time, int days ); + public virtual DateTime AddHours ( DateTime time, int hours ); + public virtual DateTime AddMilliseconds ( DateTime time, double milliseconds ); + public virtual DateTime AddMinutes ( DateTime time, int minutes ); + public virtual DateTime AddMonths ( DateTime time, int months ); + public virtual DateTime AddSeconds ( DateTime time, int seconds ); + public virtual DateTime AddWeeks ( DateTime time, int weeks ); + public virtual DateTime AddYears ( DateTime time, int years ); + + + public abstract int GetDayOfMonth ( DateTime time ); + public abstract DayOfWeek GetDayOfWeek ( DateTime time ); + public abstract GetDayOfYear ( DateTime time ); + public virtual int GetDaysInMonth ( int year, int month ); + public abstract int GetDaysInMonth ( int year, int month, int era ); + public virtual int GetDaysInYear ( int year ); + public abstract int GetDaysInYear ( int year, int era ); + public abstract int GetEra ( DateTime time ); + public virtual int GetHour ( DateTime time ); + public virtual double GetMilliseconds ( DateTime time ); + public virtual int GetMinute ( DateTime time ); + public abstract int GetMonth ( DateTime time ); + public virtual int GetMonthsInYear ( int year ); + public abstract int GetMonthsInYear ( int year, int era ); + public virtual int GetSecond ( DateTime time ); + public virtual int GetWeekOfYear ( DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek ); + public abstract int GetYear ( DateTime time ); + public virtual bool IsLeapDay ( int year, int month, int day ); + public abstract bool IsLeapDay ( int year, int month, int day, int era ); + public virtual bool IsLeapMonth ( int year, int month ); + public abstract bool IsLeapMonth ( int year, int month, int era ); + public virtual bool IsLeapYear ( int year ); + public abstract bool IsLeapYear ( int year, int era ); + public virtual DateTime ToDateTime ( int year, int month, int day, int hour, int minute, int second, int millisecond ); + public abstract DateTime ToDateTime ( int year, int month, int date, int hour, int minute, int second, int millisecond, int era ); + public virtual int ToFourDigitYear ( int year ); + } +} + diff --git a/mcs/class/corlib/System.Globalization/ChangeLog b/mcs/class/corlib/System.Globalization/ChangeLog new file mode 100644 index 00000000000..7a7b647fcfd --- /dev/null +++ b/mcs/class/corlib/System.Globalization/ChangeLog @@ -0,0 +1,3 @@ +2001-07-06 Joe Shaw <joe@ximian.com> + + * UnicodeCategory.cs: Added. diff --git a/mcs/class/corlib/System.Globalization/UnicodeCategory.cs b/mcs/class/corlib/System.Globalization/UnicodeCategory.cs new file mode 100644 index 00000000000..2cedb95b02d --- /dev/null +++ b/mcs/class/corlib/System.Globalization/UnicodeCategory.cs @@ -0,0 +1,44 @@ +// +// System.Globalization.UnicodeCategory.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System.Globalization { + + public enum UnicodeCategory { + UppercaseLetter = 0, + LowercaseLetter = 1, + TitlecaseLetter = 2, + ModifierLetter = 3, + OtherLetter = 4, + NonSpacingMark = 5, + SpaceCombiningMark = 6, + EnclosingMark = 7, + DecimalDigitNumber = 8, + LetterNumber = 9, + OtherNumber = 10, + SpaceSeperator = 11, + LineSeperator = 12, + ParagraphSeperator = 13, + Control = 14, + Format = 15, + Surrogate = 16, + PrivateUse = 17, + ConnectorPunctuation = 18, + DashPunctuation = 19, + OpenPunctuation = 20, + ClosePunctuation = 21, + InitialQuotePunctuation = 22, + FinalQuotePunctuation = 23, + OtherPunctuation = 24, + MathSymbol = 25, + CurrencySymbol = 26, + ModifierSymbol = 27, + OtherSymbol = 28, + OtherNotAssigned = 29, + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System.Text/ASCIIEncoding.cs b/mcs/class/corlib/System.Text/ASCIIEncoding.cs new file mode 100755 index 00000000000..2bfe091a40c --- /dev/null +++ b/mcs/class/corlib/System.Text/ASCIIEncoding.cs @@ -0,0 +1,40 @@ +// +// System.Text.ASCIIEncoding.cs +// +// Author: +// Sean MacIsaac (macisaac@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + + +namespace System.Text { + + public class ASCIIEncoding : Encoding { + public override int GetByteCount(char[] chars, int index, int count) { + // FIXME + return 0; + } + + public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { + // FIXME + return 0; + } + + public override char[] GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { + // FIXME + return null; + } + + public override int GetMaxByteCount(int charCount) { + // FIXME + return 0; + } + + public override int GetMaxCharCount(int byteCount) { + // FIXME + return 0; + } + } +} + diff --git a/mcs/class/corlib/System.Text/ChangeLog b/mcs/class/corlib/System.Text/ChangeLog new file mode 100755 index 00000000000..4f35ff849fa --- /dev/null +++ b/mcs/class/corlib/System.Text/ChangeLog @@ -0,0 +1,25 @@ +2001-07-12 Marcin Szczepanski <marcins@zipworld.com.au> + + * StringBuilder.cs: Implemented. + + The only methods left unimplemented are the AppendFormat( ... ) + ones just because it's probably better to wait until some of the + Format related classes are implemented. I've put that as a TODO + comment at the top and created the methods with a "nop" body. + +2001-06-26 Sean MacIsaac <macisaac@ximian.com> + + * UnicodeEncoding.cs: Members added so that a clean compile is + possible. + + * ASCIIEncoding.cs: Members added so that a clean compile is + possible. + + * UTF7Encoding.cs: Members added so that a clean compile is + possible. + + * UTF8Encoding.cs: Members added so that a clean compile is + possible. + + * Encoding.cs: All public members included. Most members + unimplemented. diff --git a/mcs/class/corlib/System.Text/Encoding.cs b/mcs/class/corlib/System.Text/Encoding.cs new file mode 100755 index 00000000000..49c43afec3e --- /dev/null +++ b/mcs/class/corlib/System.Text/Encoding.cs @@ -0,0 +1,262 @@ +// +// System.Text.Encoding.cs +// +// Author: +// Sean MacIsaac (macisaac@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + + +namespace System.Text { + + public abstract class Encoding { + + private static ASCIIEncoding asciiEncoding; + private static UnicodeEncoding bigEndianUnicode; + private static UnicodeEncoding unicodeEncoding; + private static UTF7Encoding utf7Encoding; + private static UTF8Encoding utf8Encoding; + + private int codepage; + protected string bodyName; + protected string encodingName; + protected string headerName; + + protected Encoding() { + } + + protected Encoding(int codepage) { + this.codepage = codepage; + } + + public static Encoding ASCII { + get { + if (asciiEncoding == null) + asciiEncoding = new ASCIIEncoding (); + return asciiEncoding; + } + } + + public static Encoding BigEndianUnicode { + get { + if (bigEndianUnicode == null) + bigEndianUnicode = new UnicodeEncoding (true, true); + return bigEndianUnicode; + } + } + + public virtual string BodyName { + get { + return bodyName; + } + } + + public virtual int CodePage { + get { + return codepage; + } + } + + public static Encoding Default { + get { + return ASCII; + } + } + + public virtual string EncodingName { + get { + return encodingName; + } + } + + public virtual string HeaderName { + get { + return headerName; + } + } + + public virtual bool IsBrowserDisplay { + get { + // FIXME + return false; + } + } + + public virtual bool IsBrowserSave { + get { + // FIXME + return false; + } + } + + public virtual bool IsMailNewsDisplay { + get { + // FIXME + return false; + } + } + + public virtual bool IsMailNewsSave { + get { + // FIXME + return false; + } + } + + public static Encoding Unicode { + get { + if (unicodeEncoding == null) { + unicodeEncoding = new UnicodeEncoding(); + } + return unicodeEncoding; + } + } + + public static Encoding UTF7 { + get { + if (utf7Encoding == null) { + utf7Encoding = new UTF7Encoding(); + } + return utf7Encoding; + } + } + + public static Encoding UTF8 { + get { + if (utf8Encoding == null) { + utf8Encoding = new UTF8Encoding(); + } + return utf8Encoding; + } + } + + public virtual string WebName { + get { + // FIXME + return ""; + } + } + + public virtual int WindowsCodePage { + get { + // FIXME + return 0; + } + } + + public static byte[] Convert(Encoding srcEncoding, Encoding dstEncoding, byte[] bytes) { + // FIXME + return null; + } + + public static byte[] Convert(Encoding srcEncoding, Encoding dstEncoding, byte[] bytes, int index, int count) { + // FIXME + return null; + } + + public override bool Equals(object value) { + // FIXME + return false; + } + + public virtual int GetByteCount(char[] chars) { + // FIXME + return 0; + } + + public virtual int GetByteCount(string s) { + // FIXME + return 0; + } + + public abstract int GetByteCount(char[] chars, int index, int count); + + public virtual byte[] GetBytes(char[] chars) { + // FIXME + return null; + } + + public virtual byte[] GetBytes(string s) { + // FIXME + return null; + } + + public virtual byte[] GetBytes(char[] chars, int index, int count) { + // FIXME + return null; + } + + public abstract int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex); + + public virtual byte[] GetBytes(string s, int charIndex, int charCount, byte[] bytes, int byteIndex) { + // FIXME + return null; + } + + public virtual int GetCharCount(byte[] bytes) { + // FIXME + return 0; + } + + public virtual int GetCharCount(byte[] bytes, int index, int count) { + // FIXME + return 0; + } + + public virtual char[] GetChars(byte[] bytes) { + // FIXME + return null; + } + + public virtual char[] GetChars(byte[] bytes, int index, int count) { + // FIXME + return null; + } + + public abstract char[] GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex); + + public virtual Decoder GetDecoder() { + // FIXME + return null; + } + + public virtual Encoder GetEncoder() { + // FIXME + return null; + } + + public virtual Encoding GetEncoding(int codepage) { + // FIXME + return null; + } + + public virtual Encoding GetEncoding(string name) { + return null; + } + + public override int GetHashCode() { + // FIXME + return 0; + } + + public abstract int GetMaxByteCount(int charCount); + + public abstract int GetMaxCharCount(int byteCount); + + public virtual byte[] GetPreamble() { + // FIXME + return null; + } + + public virtual string GetString(byte[] bytes) { + // FIXME + return null; + } + + public virtual string GetString(byte[] bytes, int index, int count) { + // FIXME + return null; + } + } +} diff --git a/mcs/class/corlib/System.Text/StringBuilder.cs b/mcs/class/corlib/System.Text/StringBuilder.cs new file mode 100644 index 00000000000..36780051691 --- /dev/null +++ b/mcs/class/corlib/System.Text/StringBuilder.cs @@ -0,0 +1,563 @@ +//
+// System.Text.StringBuilder
+//
+// Author: Marcin Szczepanski (marcins@zipworld.com.au)
+//
+// TODO: Implement the AppendFormat methods. Wasn't sure how
+// best to do this at this early stage, might want to see
+// how the String class and the IFormatProvide / IFormattable interfaces
+// pan out first.
+//
+// TODO: Make sure the coding complies to the ECMA draft, there's some
+// variable names that probably don't (like sString)
+//
+
+namespace System.Text {
+ public sealed class StringBuilder {
+
+ const int defaultCapacity = 16;
+
+ private int sCapacity;
+ private int sLength;
+ private char[] sString;
+
+ public StringBuilder() {
+
+ // The MS Implementation uses the default
+ // capacity for a StringBuilder. The spec
+ // says it's up to the implementer, but
+ // we'll do it the MS way just in case.
+
+ sString = new char[ defaultCapacity ];
+ sCapacity = defaultCapacity;
+ sLength = 0;
+ }
+
+ public StringBuilder( int capacity ) {
+ if( capacity < defaultCapacity ) {
+ // The spec says that the capacity
+ // has to be at least the default capacity
+ capacity = defaultCapacity;
+ }
+
+ sString = new char[capacity];
+ sCapacity = capacity;
+ sLength = 0;
+ }
+
+ public StringBuilder( string str ) {
+
+ if( str.Length < defaultCapacity ) {
+ char[] tString = str.ToCharArray();
+ sString = new char[ defaultCapacity ];
+ Array.Copy( tString, sString, str.Length );
+ sLength = str.Length;
+ sCapacity = defaultCapacity;
+ } else {
+ sString = str.ToCharArray();
+ sCapacity = sString.Length;
+ sLength = sString.Length;
+ }
+ }
+
+ public int Capacity {
+ get {
+ return sCapacity;
+ }
+
+ set {
+ if( value < sLength ) {
+ throw new ArgumentException( "Capacity must be > length" );
+ } else {
+ char[] tString = new char[value];
+ Array.Copy( sString, tString, sLength );
+ sString = tString;
+ sCapacity = sString.Length;
+ }
+ }
+ }
+
+
+ public int Length {
+ get {
+ return sLength;
+ }
+
+ set {
+ if( value < 0 || value > Int32.MaxValue) {
+ throw new ArgumentOutOfRangeException();
+ } else {
+ if( value < sLength ) {
+ // Truncate current string at value
+
+ // LAMESPEC: The spec is unclear as to what to do
+ // with the capacity when truncating the string.
+ //
+ // Don't change the capacity, as this is what
+ // the MS implementation does.
+
+ sLength = value;
+ } else {
+ // Expand the capacity to the new length and
+ // pad the string with spaces.
+
+ // LAMESPEC: The spec says to put the spaces on the
+ // left of the string however the MS implementation
+ // puts them on the right. We'll do that for
+ // compatibility (!)
+
+ char[] tString = new char[ value ];
+ int padLength = value - sLength;
+
+ string padding = new String( ' ', padLength );
+ Array.Copy( sString, tString, sLength );
+ Array.Copy( padding.ToCharArray(), 0, tString, sLength, padLength );
+ sString = tString;
+ sLength = sString.Length;
+ sCapacity = value;
+ }
+ }
+ }
+ }
+
+ public char this[ int index ] {
+ get {
+
+ if( index >= sLength || index < 0 ) {
+ throw new IndexOutOfRangeException();
+ }
+ return sString[ index ];
+ }
+
+ set {
+ if( index >= sLength || index < 0 ) {
+ throw new IndexOutOfRangeException();
+ }
+ sString[ index ] = value;
+ }
+ }
+
+ public override string ToString() {
+ return ToString(0, sLength);
+ }
+
+ public string ToString( int startIndex, int length ) {
+ if( startIndex < 0 || length < 0 || startIndex + length > sLength ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ return new String( sString, startIndex, length );
+ }
+
+ public int EnsureCapacity( int capacity ) {
+ if( capacity < 0 ) {
+ throw new ArgumentOutOfRangeException(
+ "Capacity must be greater than 0." );
+ }
+
+ if( capacity <= sCapacity ) {
+ return sCapacity;
+ } else {
+ Capacity = capacity;
+ return sCapacity;
+ }
+ }
+
+ public bool Equals( StringBuilder sb ) {
+ if( this.ToString() == sb.ToString() ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public StringBuilder Remove( int startIndex, int length ) {
+ if( startIndex < 0 || length < 0 || startIndex + length > sLength ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ // Copy everything after the 'removed' part to the start
+ // of the removed part and truncate the sLength
+
+ Array.Copy( sString, startIndex + length, sString,
+ startIndex, length );
+
+ sLength -= length;
+ return this;
+ }
+
+ public StringBuilder Replace( char oldChar, char newChar ) {
+
+ return Replace( oldChar, newChar, 0, sLength);
+ }
+
+ public StringBuilder Replace( char oldChar, char newChar, int startIndex, int count ) {
+ if( startIndex + count > sLength || startIndex < 0 || count < 0 ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ for( int replaceIterate = startIndex; replaceIterate < startIndex + count; replaceIterate++ ) {
+ if( this[replaceIterate] == oldChar ) {
+ this[replaceIterate] = newChar;
+ }
+ }
+
+ return this;
+ }
+
+ public StringBuilder Replace( string oldValue, string newValue ) {
+ return Replace( oldValue, newValue, 0, sLength );
+ }
+
+ public StringBuilder Replace( string oldValue, string newValue, int startIndex, int count ) {
+ string startString = this.ToString();
+ StringBuilder newStringB = new StringBuilder();
+ string newString;
+
+ if( oldValue == null ) {
+ throw new ArgumentNullException(
+ "The old value cannot be null.");
+ }
+
+ if( startIndex < 0 || count < 0 || startIndex + count > sLength ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ if( oldValue.Length == 0 ) {
+ throw new ArgumentException(
+ "The old value cannot be zero length.");
+ }
+
+ int nextIndex = startIndex; // Where to start the next search
+ int lastIndex = nextIndex; // Where the last search finished
+
+ while( nextIndex != -1 ) {
+ nextIndex = startString.IndexOf( oldValue, lastIndex);
+ if( nextIndex != -1 ) {
+ // The MS implementation won't replace a substring
+ // if that substring goes over the "count"
+ // boundary, so we'll make sure the behaviour
+ // here is the same.
+
+ if( nextIndex + oldValue.Length < startIndex + count ) {
+
+ // Add everything to the left of the old
+ // string
+ newStringB.Append( startString.Substring( lastIndex, nextIndex - lastIndex ) );
+
+ // Add the replacement string
+ newStringB.Append( newValue );
+
+ // Set the next start point to the
+ // end of the last match
+ lastIndex = nextIndex + oldValue.Length;
+ } else {
+ // We're past the "count" we're supposed to replace within
+ nextIndex = -1;
+ newStringB.Append(
+ startString.Substring( lastIndex ) );
+ }
+
+ } else {
+ // Append everything left over
+ newStringB.Append( startString.Substring( lastIndex ) );
+ }
+ }
+
+ newString = newStringB.ToString();
+
+ EnsureCapacity( newString.Length );
+ sString = newString.ToCharArray();
+ sLength = newString.Length;
+ return this;
+ }
+
+
+ /* The Append Methods */
+
+ // TODO: Currently most of these methods convert the
+ // parameter to a CharArray (via a String) and then pass
+ // it to Append( char[] ). There might be a faster way
+ // of doing this, but it's probably adequate and anything else
+ // would make it too messy.
+ //
+ // As an example, a sample test run of appending a 100 character
+ // string to the StringBuilder, and loooping this 50,000 times
+ // results in an elapsed time of 2.4s using the MS StringBuilder
+ // and 2.7s using this StringBuilder. Note that this results
+ // in a 5 million character string. I believe MS uses a lot
+ // of "native" DLLs for the "meat" of the base classes.
+
+
+ public StringBuilder Append( char[] value ) {
+ if( sLength + value.Length > sCapacity ) {
+ // Need more capacity, double the capacity StringBuilder
+ // and make sure we have at least enough for the value
+ // if that's going to go over double.
+
+ Capacity = value.Length + ( sCapacity + sCapacity);
+ }
+
+ Array.Copy( value, 0, sString, sLength, value.Length );
+ sLength += value.Length;
+
+ return this;
+ }
+
+ public StringBuilder Append( string value ) {
+ if( value != null ) {
+ return Append( value.ToCharArray() );
+ } else {
+ return null;
+ }
+ }
+
+ public StringBuilder Append( bool value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( byte value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( int index, char value) {
+ char[] appendChar = new char[1];
+
+ appendChar[0] = value;
+ return Append( appendChar );
+ }
+
+
+ public StringBuilder Append( decimal value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( double value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( short value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( int value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( long value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( object value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( sbyte value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( float value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( ushort value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( uint value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( ulong value ) {
+ return Append( value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Append( char value, int repeatCount ) {
+ if( repeatCount < 0 ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ return Append( new String( value, repeatCount) );
+ }
+
+ public StringBuilder Append( char[] value, int startIndex, int charCount ) {
+
+ if( (charCount < 0 || startIndex < 0) ||
+ ( charCount + startIndex > value.Length ) ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ if( value == null ) {
+ if( !(startIndex == 0 && charCount == 0) ) {
+ throw new ArgumentNullException();
+ } else {
+ return this;
+ }
+ } else {
+ char[] appendChars = new char[ charCount ];
+
+ Array.Copy( value, startIndex, appendChars, 0, charCount );
+ return Append( appendChars );
+ }
+ }
+
+ public StringBuilder Append( string value, int startIndex, int count ) {
+ if( (count < 0 || startIndex < 0) ||
+ ( startIndex + count > value.Length ) ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ return Append( value.Substring( startIndex, count ).ToCharArray() );
+ }
+
+ public StringBuilder AppendFormat( string format, object arg0 ) {
+ // TODO: Implement
+ return this;
+ }
+
+ public StringBuilder AppendFormat( string format, params object[] args ) {
+ // TODO: Implement
+ return this;
+ }
+
+ public StringBuilder AppendFormat( IFormatProvider provider, string format,
+ params object[] args ) {
+ // TODO: Implement
+ return this;
+ }
+
+ public StringBuilder AppendFormat( string format, object arg0, object arg1 ) {
+ // TODO: Implement;
+ return this;
+ }
+
+ public StringBuilder AppendFormat( string format, object arg0, object arg1, object arg2 ) {
+ // TODO Implement
+ return this;
+ }
+
+ /* The Insert Functions */
+
+ // Similarly to the Append functions, get everything down to a CharArray
+ // and insert that.
+
+ public StringBuilder Insert( int index, char[] value ) {
+ if( index > sLength || index < 0) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ if( value == null || value.Length == 0 ) {
+ return this;
+ } else {
+ // Check we have the capacity to insert this array
+ if( sCapacity < sLength + value.Length ) {
+ Capacity = value.Length + ( sCapacity + sCapacity );
+ }
+
+ // Move everything to the right of the insert point across
+ Array.Copy( sString, index, sString, index + value.Length, sLength - index);
+
+ // Copy in stuff from the insert buffer
+ Array.Copy( value, 0, sString, index, value.Length );
+
+ sLength += value.Length;
+ return this;
+ }
+ }
+
+ public StringBuilder Insert( int index, string value ) {
+ return Insert( index, value.ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, bool value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, byte value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, char value) {
+ char[] insertChar = new char[1];
+
+ insertChar[0] = value;
+ return Insert( index, insertChar );
+ }
+
+ public StringBuilder Insert( int index, decimal value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, double value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, short value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, int value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, long value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, object value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, sbyte value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, float value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, ushort value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, uint value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, ulong value ) {
+ return Insert( index, value.ToString().ToCharArray() );
+ }
+
+ public StringBuilder Insert( int index, string value, int count ) {
+ if ( count < 0 ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ if( value != null ) {
+ if( value != "" ) {
+ for( int insertCount = 0; insertCount < count;
+ insertCount++ ) {
+ Insert( index, value.ToCharArray() );
+ }
+ }
+ }
+ return this;
+ }
+
+ public StringBuilder Insert( int index, char[] value, int startIndex,
+ int charCount ) {
+
+ if( value != null ) {
+ if( charCount < 0 || startIndex < 0 || startIndex + charCount > value.Length ) {
+ throw new ArgumentOutOfRangeException();
+ }
+
+ char[] insertChars = new char[ charCount ];
+ Array.Copy( value, startIndex, insertChars, 0, charCount );
+ return Insert( index, insertChars );
+ } else {
+ return this;
+ }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Text/UTF7Encoding.cs b/mcs/class/corlib/System.Text/UTF7Encoding.cs new file mode 100755 index 00000000000..c21389b7e8a --- /dev/null +++ b/mcs/class/corlib/System.Text/UTF7Encoding.cs @@ -0,0 +1,40 @@ +// +// System.Text.UTF7Encoding.cs +// +// Author: +// Sean MacIsaac (macisaac@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + + +namespace System.Text { + + public class UTF7Encoding : Encoding { + public override int GetByteCount(char[] chars, int index, int count) { + // FIXME + return 0; + } + + public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { + // FIXME + return 0; + } + + public override char[] GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { + // FIXME + return null; + } + + public override int GetMaxByteCount(int charCount) { + // FIXME + return 0; + } + + public override int GetMaxCharCount(int byteCount) { + // FIXME + return 0; + } + } +} + diff --git a/mcs/class/corlib/System.Text/UTF8Encoding.cs b/mcs/class/corlib/System.Text/UTF8Encoding.cs new file mode 100755 index 00000000000..eb7ddffaf7d --- /dev/null +++ b/mcs/class/corlib/System.Text/UTF8Encoding.cs @@ -0,0 +1,40 @@ +// +// System.Text.UTF8Encoding.cs +// +// Author: +// Sean MacIsaac (macisaac@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + + +namespace System.Text { + + public class UTF8Encoding : Encoding { + public override int GetByteCount(char[] chars, int index, int count) { + // FIXME + return 0; + } + + public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { + // FIXME + return 0; + } + + public override char[] GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { + // FIXME + return null; + } + + public override int GetMaxByteCount(int charCount) { + // FIXME + return 0; + } + + public override int GetMaxCharCount(int byteCount) { + // FIXME + return 0; + } + } +} + diff --git a/mcs/class/corlib/System.Text/UnicodeEncoding.cs b/mcs/class/corlib/System.Text/UnicodeEncoding.cs new file mode 100755 index 00000000000..057f5dfd766 --- /dev/null +++ b/mcs/class/corlib/System.Text/UnicodeEncoding.cs @@ -0,0 +1,46 @@ +// +// System.Text.UnicodeEncoding.cs +// +// Author: +// Sean MacIsaac (macisaac@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + + +namespace System.Text { + + public class UnicodeEncoding : Encoding { + public UnicodeEncoding() { + } + + public UnicodeEncoding(bool bigEndian, bool byteOrderMark) { + } + + public override int GetByteCount(char[] chars, int index, int count) { + // FIXME + return 0; + } + + public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex) { + // FIXME + return 0; + } + + public override char[] GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) { + // FIXME + return null; + } + + public override int GetMaxByteCount(int charCount) { + // FIXME + return 0; + } + + public override int GetMaxCharCount(int byteCount) { + // FIXME + return 0; + } + } +} + diff --git a/mcs/class/corlib/System/ApplicationException.cs b/mcs/class/corlib/System/ApplicationException.cs new file mode 100644 index 00000000000..9bb597644aa --- /dev/null +++ b/mcs/class/corlib/System/ApplicationException.cs @@ -0,0 +1,29 @@ +// +// System.ApplicationException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class ApplicationException : Exception { + // Constructors + public ApplicationException () + : base ("An application exception has occurred.") + { + } + + public ApplicationException (string message) + : base (message) + { + } + + public ApplicationException (string message, Exception inner) + : base (message, inner) + { + } + } +} diff --git a/mcs/class/corlib/System/ArgumentException.cs b/mcs/class/corlib/System/ArgumentException.cs new file mode 100644 index 00000000000..c97c57cac12 --- /dev/null +++ b/mcs/class/corlib/System/ArgumentException.cs @@ -0,0 +1,50 @@ +// +// System.ArgumentException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class ArgumentException : SystemException { + private string param_name; + + // Constructors + public ArgumentException () + : base ("An invalid argument was specified.") + { + } + + public ArgumentException (string message) + : base (message) + { + } + + public ArgumentException (string message, Exception inner) + : base (message, inner) + { + } + + public ArgumentException (string message, string param_name) + : base (message) + { + this.param_name = param_name; + } + + public ArgumentException (string message, string param_name, Exception inner) + : base (message, inner) + { + this.param_name = param_name; + } + + // Properties + public virtual string ParamName { + get { + return param_name; + } + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/ArgumentNullException.cs b/mcs/class/corlib/System/ArgumentNullException.cs new file mode 100644 index 00000000000..d35a9648e63 --- /dev/null +++ b/mcs/class/corlib/System/ArgumentNullException.cs @@ -0,0 +1,29 @@ +// +// System.ArgumentNullException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class ArgumentNullException : ArgumentException { + // Constructors + public ArgumentNullException () + : base ("Argument cannot be null") + { + } + + public ArgumentNullException (string param_name) + : base ("Argument cannot be null", param_name) + { + } + + public ArgumentNullException (string param_name, string message) + : base (message, param_name) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/ArgumentOutOfRangeException.cs b/mcs/class/corlib/System/ArgumentOutOfRangeException.cs new file mode 100644 index 00000000000..26acf91cf46 --- /dev/null +++ b/mcs/class/corlib/System/ArgumentOutOfRangeException.cs @@ -0,0 +1,44 @@ +// +// System.ArgumentOutOfRangeException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class ArgumentOutOfRangeException : ArgumentException { + private object actual_value; + + // Constructors + public ArgumentOutOfRangeException () + : base ("Argument is out of range") + { + } + + public ArgumentOutOfRangeException (string param_name) + : base ("Argument is out of range", param_name) + { + } + + public ArgumentOutOfRangeException (string param_name, string message) + : base (message, param_name) + { + } + + public ArgumentOutOfRangeException (string param_name, object actual_value, string message) + : base (message, param_name) + { + this.actual_value = actual_value; + } + + // Properties + public virtual object ActualValue { + get { + return actual_value; + } + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/ArithmeticException.cs b/mcs/class/corlib/System/ArithmeticException.cs new file mode 100644 index 00000000000..cc5bfa92477 --- /dev/null +++ b/mcs/class/corlib/System/ArithmeticException.cs @@ -0,0 +1,29 @@ +// +// System.ArithmeticException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class ArithmeticException : SystemException { + // Constructors + public ArithmeticException () + : base ("The arithmetic operation is not allowed") + { + } + + public ArithmeticException (string message) + : base (message) + { + } + + public ArithmeticException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs new file mode 100644 index 00000000000..814d991c7e4 --- /dev/null +++ b/mcs/class/corlib/System/Array.cs @@ -0,0 +1,381 @@ +// +// System.Array.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +using System.Collections; +using System.Runtime.CompilerServices; + +namespace System
+{ + + public abstract class Array : ICloneable
+ { + public int lower_bound = 0; + protected int length; + protected int rank; + + // Properties + public int Length
+ { + get
+ { + return length; + } + } + + public int Rank
+ { + get
+ { + return rank; + } + } + + // Methods + public static int BinarySearch (Array array, object value) + { + return BinarySearch (array, array.lower_bound, array.length, value, null); + } + + public static int BinarySearch (Array array, object value, IComparer comparer) + { + return BinarySearch (array, array.lower_bound, array.length, value, comparer); + } + + public static int BinarySearch (Array array, int index, int length, object value) + { + return BinarySearch (array, index, length, value, null); + } + + public static int BinarySearch (Array array, int index, int length, object value, IComparer comparer) + { + if (array == null) + throw new ArgumentNullException (); + + if (array.Rank > 1) + throw new RankException (); + + if (index < array.lower_bound || length < 0) + throw new ArgumentOutOfRangeException (); + + if (index + length > array.lower_bound + array.Length) + throw new ArgumentException (); + + if (comparer == null && !(value is IComparable)) + throw new ArgumentException (); + + // FIXME: Throw an ArgumentException if comparer + // is null and value is not of the same type as the + // elements of array. + + for (int i = 0; i < length; i++)
+ { + int result; + + if (comparer == null && !(array.GetValue(index + i) is IComparable)) + throw new ArgumentException (); + + if (comparer == null) + result = (value as IComparable).CompareTo(array.GetValue(index + i)); + else + result = comparer.Compare(value, array.GetValue(index + i)); + + if (result == 0) + return index + i; + else if (result < 0) + return ~(index + i); + } + + return ~(index + length); + } + + public static void Clear (Array array, int index, int length) + { + if (array == null) + throw new ArgumentNullException (); + + if (index < array.lower_bound || length < 0 || + index + length > array.lower_bound + array.length) + throw new ArgumentOutOfRangeException (); + + for (int i = 0; i < length; i++)
+ { + if (array.GetValue(index + i) is bool) + array.SetValue(false, index + i); + else if (array.GetValue(index + i) is ValueType) + array.SetValue(0, index + i); + else + array.SetValue(null, index + i); + } + } + + public virtual object Clone () + { + // Array is abstract -- Array a = new Array(); + Array a = (Array)this.Clone(); + + for (int i = 0; i < this.length; i++)
+ { + int index = this.lower_bound + i; + + a.SetValue(this.GetValue(index), index); + } + + return a; + } + + public static void Copy (Array source, Array dest, int length) + { + Copy (source, source.lower_bound, dest, dest.lower_bound, length); + } + + public static void Copy (Array source, int source_idx, Array dest, int dest_idx, int length) + { + if (length < 0) + throw new ArgumentOutOfRangeException (); + + if (source == null || dest == null) + throw new ArgumentNullException (); + + if (source_idx < source.lower_bound || source_idx + length > source.lower_bound + source.Length || dest_idx < dest.lower_bound || dest_idx + length > dest.lower_bound + dest.Length) + throw new ArgumentException (); + + if (source.Rank != dest.Rank) + throw new RankException (); + + for (int i = 0; i < length; i++)
+ { + int index = source.lower_bound + i; + + dest.SetValue(source.GetValue(index), index); + } + } + + [MethodImplAttribute(MethodImplOptions.InternalCall)] + private extern object InternalGetValue (int index); + + public object GetValue (int index) + { + if (this.rank > 1) + throw new ArgumentException (); + + if (index < this.lower_bound || + index > this.lower_bound + this.length) + throw new ArgumentOutOfRangeException (); + + return InternalGetValue (index); + } + + [MethodImplAttribute(MethodImplOptions.InternalCall)] + private extern void InternalSetValue (object value, int index); + + public void SetValue (object value, int index) + { + if (this.rank > 1) + throw new ArgumentException (); + + if (index < this.lower_bound || + index > this.lower_bound + this.length) + throw new ArgumentOutOfRangeException (); + + InternalSetValue (value, index); + } + + public static int IndexOf (Array array, object value) + { + return IndexOf (array, value, 0, array.Length); + } + + public static int IndexOf (Array array, object value, int index) + { + return IndexOf (array, value, index, array.Length - index); + } + + public static int IndexOf (Array array, object value, int index, int length) + { + if (array == null) + throw new ArgumentNullException (); + + if (length < 0 || index < array.lower_bound || index > array.lower_bound + length) + throw new ArgumentOutOfRangeException (); + + for (int i = 0; i < length; i++)
+ { + if (array.GetValue(index + i) == value) + return index + i; + } + + return array.lower_bound - 1; + } + + public static int LastIndexOf (Array array, object value) + { + return LastIndexOf (array, value, 0, array.Length); + } + + public static int LastIndexOf (Array array, object value, int index) + { + return LastIndexOf (array, value, index, array.Length - index); + } + + public static int LastIndexOf (Array array, object value, int index, int length) + { + if (array == null) + throw new ArgumentNullException (); + + if (length < 0 || index < array.lower_bound || index > array.lower_bound + length) + throw new ArgumentOutOfRangeException (); + + for (int i = length - 1; i >= 0; i--)
+ { + if (array.GetValue(index + i) == value) + return index + i; + } + + return array.lower_bound - 1; + } + + public static void Reverse (Array array) + { + Reverse (array, array.lower_bound, array.Length); + } + + public static void Reverse (Array array, int index, int length) + { + if (array == null) + throw new ArgumentNullException (); + + if (array.Rank > 1) + throw new RankException (); + + if (index < array.lower_bound || length < 0) + throw new ArgumentOutOfRangeException (); + + if (index + length > array.lower_bound + array.Length) + throw new ArgumentException (); + + for (int i = 0; i < length/2; i++)
+ { + object tmp; + + tmp = array.GetValue(index + i); + array.SetValue(array.GetValue(index + length - i - 1), index + i); + array.SetValue(tmp, index + length - i - 1); + } + } + + public static void Sort (Array array) + { + Sort (array, null, array.lower_bound, array.Length, null); + } + + public static void Sort (Array keys, Array items) + { + Sort (keys, items, keys.lower_bound, keys.Length, null); + } + + public static void Sort (Array array, IComparer comparer) + { + Sort (array, null, array.lower_bound, array.Length, comparer); + } + + public static void Sort (Array array, int index, int length) + { + Sort (array, null, index, length, null); + } + + public static void Sort (Array keys, Array items, IComparer comparer) + { + Sort (keys, items, keys.lower_bound, keys.Length, comparer); + } + + public static void Sort (Array keys, Array items, int index, int length) + { + Sort (keys, items, index, length, null); + } + + public static void Sort (Array array, int index, int length, IComparer comparer) + { + Sort (array, null, index, length, comparer); + } + + public static void Sort (Array keys, Array items, int index, int length, IComparer comparer) + { + int low0 = index; + int high0 = index + length - 1; + + qsort (keys, items, index, index + length - 1, comparer); + } + + private static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer) + { + int pivot; + int low = low0; + int high = high0; + + if (low >= high) + return; + + pivot = (low + high) / 2; + + if (compare(keys.GetValue(low), keys.GetValue(pivot), comparer) > 0) + swap(keys, items, low, pivot); + + if (compare(keys.GetValue(pivot), keys.GetValue(high), comparer) > 0) + swap(keys, items, pivot, high); + + while (low < high)
+ { + // Move the walls in + while (low < high && compare(keys.GetValue(low), keys.GetValue(pivot), comparer) < 0) + low++; + while (low < high && compare(keys.GetValue(pivot), keys.GetValue(high), comparer) < 0) + high--; + + if (low < high)
+ { + swap(keys, items, low, high); + low++; + high--; + } + } + + qsort (keys, items, low0, low - 1, comparer); + qsort (keys, items, high + 1, high0, comparer); + } + + private static void swap (Array keys, Array items, int i, int j) + { + object tmp; + + tmp = keys.GetValue(i); + keys.SetValue(keys.GetValue(j), i); + keys.SetValue(tmp, j); + + if (items != null)
+ { + tmp = items.GetValue(i); + items.SetValue(items.GetValue(j), i); + items.SetValue(tmp, j); + } + } + + private static int compare (object value1, object value2, IComparer comparer) + { + if (comparer == null) + return ((IComparable) value1).CompareTo(value2); + else + return comparer.Compare(value1, value2); + } + + public static Array CreateInstance(Type elementType, int length) + { + return null; + } + } +} diff --git a/mcs/class/corlib/System/ArrayTypeMismatchException.cs b/mcs/class/corlib/System/ArrayTypeMismatchException.cs new file mode 100644 index 00000000000..ecfc88a4cc8 --- /dev/null +++ b/mcs/class/corlib/System/ArrayTypeMismatchException.cs @@ -0,0 +1,29 @@ +// +// System.ArrayTypeMismatchException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class ArrayTypeMismatchException : SystemException { + // Constructors + public ArrayTypeMismatchException () + : base ("Source array type cannot be assigned to destination array type") + { + } + + public ArrayTypeMismatchException (string message) + : base (message) + { + } + + public ArrayTypeMismatchException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog new file mode 100644 index 00000000000..5930d0531d8 --- /dev/null +++ b/mcs/class/corlib/System/ChangeLog @@ -0,0 +1,115 @@ +2001-07-13 Jeffrey Stedfast <fejj@ximian.com> + + * TODO: Added things that need to be finished in System.String + + * String.cs: New source file implementing the System.String class + +2001-07-12 Sean MacIsaac <macisaac@ximian.com> + + * TypeCode.cs: UInt64 was UInt63. + + * Object.cs: Fixed a numer of compiler errors. + + * Array.cs: Fixed some compiler errors. + + * IComparable.cs: Fixed some compiler errors. + + * ICloneable.cs: Fixed some compiler errors. + + * IConvertible.cs: Fixed some compiler errors. + + * IFormattable.cs: Fixed a compiler error. + + * IFormatProvider.cs: Fixed a compiler error. + + * IDisposable.cs: Fixed a compiler error. + + * IFormatProvider.cs: Added public accesability type to + IFormatProvider. + + * Exception.cs: Added a using statement to remove compile time + error. + + * ApplicationException.cs: Removed a ; that was causing a compiler + error. + + * Int16.cs: Fixed some compiler errors. + + * Int32.cs: Fixed some compiler errors. + + * Int64.cs: Fixed some compiler errors. + + * SystemException.cs: Fixed a compiler error. + + * UInt16.cs: Fixed some compiler errors. + + * UInt32.cs: Fixed some compiler errors. + + * UInt64.cs: Fixed some compiler errors. + + * Void.cs: Fixed a compiler error. + +2001-07-12 Joe Shaw <joe@ximian.com> + + * Array.cs: Fix backwards parameters to Array.SetValue() + throughout. + (BinarySearch): Fix backward logic surrounding whether to call + value.CompareTo or comparer.Compare. + (LastIndexOf): Stop being stupid. I am so not used to strongly + bounded arrays... + (Sort): Implement a quicksort. + +2001-07-11 Joe Shaw <joe@ximian.com> + + * Array.cs: Change all instances of trying to access an array with + the index operator to calls to GetValue and SetValue, and add + InternalGetValue and InternalSetValue which are internal calls + into the runtime. Ew. + +2001-07-10 Joe Shaw <joe@ximian.com> + + * Array.cs: Implemented everything but Sort(). + +2001-07-09 Jeffrey Stedfast <fejj@ximian.com> + + * Object.cs (Object::Equals): Object variable name is `o'. + +2001-07-06 Joe Shaw <joe@ximian.com> + + * Int16.cs, Int32.cs, Int64.cs, UInt16.cs, UInt32.cs, UInt64.cs: + Implement the IComparable and IFormattable interfaces. Fix a typo + (publig -> public) + + * ApplicationException.cs, ArgumentException.cs, + ArgumentNullException.cs, ArgumentOutOfRangeException.cs, + ArtithmeticException.cs, ArrayTypeMismatchException.cs, + DivideByZeroException.cs, DuplicateWaitObjectException.cs, + ExecutionEngineException.cs, FormatException.cs, + IndexOutOfRangeException.cs, InvalidCastException.cs, + InvalidOperationException.cs, InvalidProgramException.cs, + MulticateNotSupportedException.cs, NotFiniteNumberException.cs, + NotSupportedException.cs, NullReferenceException.cs, + OutOfMemoryException.cs, OverflowException.cs, RankException.cs, + StackOverflowException.cs, SystemException.cs, + TypeInitializationException.cs: Added all of the exceptions + specified by the language spec. Mmmm... bloat. + +2001-07-06 Miguel de Icaza <miguel@ximian.com> + + * Int64.cs, Int32.cs: Put. Parsing and ToString missing. Should + do a generic routine all of these guys use. + + * Int16.cs: identified missing methods. + + * UInt16.cs, UInt32.cs, UInt64.cs: Add. + +2001-06-26 Miguel de Icaza <miguel@ximian.com> + + * TypeCode.cs: Implement + + * Void.cs: Implement. + + * TODO: Add file to keep track of pending tasks. + + * Object.cs, ValueType.cs: Implement. + diff --git a/mcs/class/corlib/System/DivideByZeroException.cs b/mcs/class/corlib/System/DivideByZeroException.cs new file mode 100644 index 00000000000..5b94f587222 --- /dev/null +++ b/mcs/class/corlib/System/DivideByZeroException.cs @@ -0,0 +1,29 @@ +// +// System.DivideByZeroException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class DivideByZeroException : ArithmeticException { + // Constructors + public DivideByZeroException () + : base ("Division by zero") + { + } + + public DivideByZeroException (string message) + : base (message) + { + } + + public DivideByZeroException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/DuplicateWaitObjectException.cs b/mcs/class/corlib/System/DuplicateWaitObjectException.cs new file mode 100644 index 00000000000..72ccc25483d --- /dev/null +++ b/mcs/class/corlib/System/DuplicateWaitObjectException.cs @@ -0,0 +1,29 @@ +// +// System.DuplicateWaitObjectException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class DuplicateWaitObjectException : ArgumentException { + // Constructors + public DuplicateWaitObjectException () + : base ("Duplicate objects in argument") + { + } + + public DuplicateWaitObjectException (string param_name) + : base ("Duplicate objects in argument", param_name) + { + } + + public DuplicateWaitObjectException (string param_name, string message) + : base (message, param_name) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/Exception.cs b/mcs/class/corlib/System/Exception.cs new file mode 100644 index 00000000000..00994103c41 --- /dev/null +++ b/mcs/class/corlib/System/Exception.cs @@ -0,0 +1,137 @@ +// +// System.Exception.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +using System.Runtime.Serialization; +using System.Reflection; + +namespace System { + + public class Exception : ISerializable { + Exception inner_exception; + string message; + string help_link; + string stack_trace = "TODO: implement stack traces"; + int hresult; + private string source; + + public Exception () + { + inner_exception = null; + message = ""; + } + + public Exception (string msg) + { + inner_exception = null; + message = msg; + } + + protected Exception (SerializationInfo info, StreamingContext sc) + { + if (info == null){ + throw new ArgumentNullException ("info"); + } + + // TODO: Implement the restoration of an Exception + // from a stream. + } + + public Exception (string msg, Exception e) + { + inner_exception = e; + message = msg; + } + + public Exception InnerException { + get { + return inner_exception; + } + } + + public string HelpLink { + get { + return help_link; + } + + set { + help_link = value; + } + } + + protected int HResult { + get { + return hresult; + } + + set { + hresult = value; + } + } + + public string Message { + get { + return message; + } + } + + public string Source { + get { + // TODO: if source is null, we must return + // the name of the assembly where the error + // originated. + return source; + } + + set { + source = value; + } + } + + public string StackTrace { + get { + return stack_trace; + } + } + + public MethodBase TargetSite { + get { + // TODO: Implement this. + return null; + } + } + + public virtual Exception GetBaseException () + { + Exception inner = inner_exception; + + while (inner != null){ + if (inner.InnerException != null) + inner = inner.InnerException; + else + return inner; + } + + return null; + } + + public virtual void GetObjectData (SerializationInfo info, StreamingContext context) + { + // TODO: implement me. + } + + public override string ToString () + { + return this.GetType ().FullName + "\n" + + message + + GetBaseException ().GetType ().FullName + + stack_trace; + } + } +} + diff --git a/mcs/class/corlib/System/ExecutionEngineException.cs b/mcs/class/corlib/System/ExecutionEngineException.cs new file mode 100644 index 00000000000..db1e2b555c7 --- /dev/null +++ b/mcs/class/corlib/System/ExecutionEngineException.cs @@ -0,0 +1,29 @@ +// +// System.ExecutionEngineException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public sealed class ExecutionEngineException : SystemException { + // Constructors + public ExecutionEngineException () + : base ("Internal error occurred") // Haha. Nice. + { + } + + public ExecutionEngineException (string message) + : base (message) + { + } + + public ExecutionEngineException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/FormatException.cs b/mcs/class/corlib/System/FormatException.cs new file mode 100644 index 00000000000..332d50e1b52 --- /dev/null +++ b/mcs/class/corlib/System/FormatException.cs @@ -0,0 +1,29 @@ +// +// System.FormatException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class FormatException : SystemException { + // Constructors + public FormatException () + : base ("Invalid format") + { + } + + public FormatException (string message) + : base (message) + { + } + + public FormatException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/ICloneable.cs b/mcs/class/corlib/System/ICloneable.cs new file mode 100644 index 00000000000..792550db1f5 --- /dev/null +++ b/mcs/class/corlib/System/ICloneable.cs @@ -0,0 +1,15 @@ +// +// System.ICloneable.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public interface ICloneable { + object Clone (); + } +} diff --git a/mcs/class/corlib/System/IComparable.cs b/mcs/class/corlib/System/IComparable.cs new file mode 100644 index 00000000000..bee64989f4f --- /dev/null +++ b/mcs/class/corlib/System/IComparable.cs @@ -0,0 +1,15 @@ +// +// System.CoreInterfaces.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public interface IComparable { + int CompareTo (object obj); + } +} diff --git a/mcs/class/corlib/System/IConvertible.cs b/mcs/class/corlib/System/IConvertible.cs new file mode 100644 index 00000000000..73d1c65192d --- /dev/null +++ b/mcs/class/corlib/System/IConvertible.cs @@ -0,0 +1,33 @@ +// +// System.IConvertible.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public interface IConvertible { + + TypeCode GetTypeCode (); + + bool ToBoolean (IFormatProvider provider); + byte ToByte (IFormatProvider provider); + char ToChar (IFormatProvider provider); + DateTime ToDateType (IFormatProvider provider); + Decimal ToDecimal (IFormatProvider provider); + Double ToDouble (IFormatProvider provider); + Int16 ToInt16 (IFormatProvider provider); + Int32 ToInt32 (IFormatProvider provider); + Int32 ToInt64 (IFormatProvider provider); + SByte ToSByte (IFormatProvider provider); + float ToSingle (IFormatProvider provider); + string ToString (IFormatProvider provider); + object ToType (Type conversionType, IFormatProvider provider); + UInt16 ToUInt16 (IFormatProvider provider); + UInt32 ToUInt32 (IFormatProvider provider); + UInt32 ToUInt64 (IFormatProvider provider); + } +} diff --git a/mcs/class/corlib/System/ICustomFormatter.cs b/mcs/class/corlib/System/ICustomFormatter.cs new file mode 100644 index 00000000000..a370647f37f --- /dev/null +++ b/mcs/class/corlib/System/ICustomFormatter.cs @@ -0,0 +1,15 @@ +// +// System.ICustomFormatter.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + interface ICustomFormatter { + string Format (string format, object arg, IFormatProvider formatProvider); + } +} diff --git a/mcs/class/corlib/System/IDisposable.cs b/mcs/class/corlib/System/IDisposable.cs new file mode 100644 index 00000000000..6c3ca1b6367 --- /dev/null +++ b/mcs/class/corlib/System/IDisposable.cs @@ -0,0 +1,17 @@ +// +// System.IDisposable.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public interface IDisposable { + + void Dispose (); + + } +} diff --git a/mcs/class/corlib/System/IFormatProvider.cs b/mcs/class/corlib/System/IFormatProvider.cs new file mode 100644 index 00000000000..266c62d1295 --- /dev/null +++ b/mcs/class/corlib/System/IFormatProvider.cs @@ -0,0 +1,15 @@ +// +// System.IFormatProvider.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public interface IFormatProvider { + object GetFormat (Type format_type); + } +} diff --git a/mcs/class/corlib/System/IFormattable.cs b/mcs/class/corlib/System/IFormattable.cs new file mode 100644 index 00000000000..1769f4034c0 --- /dev/null +++ b/mcs/class/corlib/System/IFormattable.cs @@ -0,0 +1,15 @@ +// +// System.IFormattable.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public interface IFormattable { + string ToString (string format, IFormatProvider format_provider); + } +} diff --git a/mcs/class/corlib/System/IndexOutOfRangeException.cs b/mcs/class/corlib/System/IndexOutOfRangeException.cs new file mode 100644 index 00000000000..62a690bd6ac --- /dev/null +++ b/mcs/class/corlib/System/IndexOutOfRangeException.cs @@ -0,0 +1,29 @@ +// +// System.IndexOutOfRangeException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public sealed class IndexOutOfRangeException : SystemException { + // Constructors + public IndexOutOfRangeException () + : base ("Array index is out of range") + { + } + + public IndexOutOfRangeException (string message) + : base (message) + { + } + + public IndexOutOfRangeException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/Int16.cs b/mcs/class/corlib/System/Int16.cs new file mode 100644 index 00000000000..ae05006d17a --- /dev/null +++ b/mcs/class/corlib/System/Int16.cs @@ -0,0 +1,91 @@ +// +// System.Int16.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +using System.Globalization; + +namespace System { + + public struct Int16 : IComparable, IFormattable { + public const short MinValue = -32768; + public const short MaxValue = 32767; + + // VES needs to know about value. public is workaround + // so source will compile + public short value; + + public int CompareTo (object v) + { + if (!(v is System.Int16)) + throw new ArgumentException ("Value is not a System.Int16"); + + return value - ((short) v); + } + + public override bool Equals (object o) + { + if (!(o is System.Int16)) + return false; + + return ((short) o) == value; + } + + public override int GetHashCode () + { + return value; + } + + public TypeCode GetTypeCode () + { + return TypeCode.Int16; + } + + public static short Parse (string s) + { + // TODO: Implement me + return 0; + } + + public static short Parse (string s, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public static short Parse (string s, NumberStyles style, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public override string ToString () + { + // TODO: Implement me + + return ""; + } + + public string ToString (IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format, IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + } +} diff --git a/mcs/class/corlib/System/Int32.cs b/mcs/class/corlib/System/Int32.cs new file mode 100644 index 00000000000..57496ffa9b6 --- /dev/null +++ b/mcs/class/corlib/System/Int32.cs @@ -0,0 +1,89 @@ +// +// System.Int32.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +using System.Globalization; + +namespace System { + + public struct Int32 : IComparable, IFormattable { + public const int MinValue = -2147483648; + public const int MaxValue = 0x7fffffff; + + public int value; + + public int CompareTo (object v) + { + if (!(v is System.Int32)) + throw new ArgumentException ("Value is not a System.Int32"); + + return value - (int) v; + } + + public override bool Equals (object o) + { + if (!(o is System.Int32)) + return false; + + return ((int) o) == value; + } + + public override int GetHashCode () + { + return value; + } + + public TypeCode GetTypeCode () + { + return TypeCode.Int32; + } + + public static int Parse (string s) + { + // TODO: Implement me + return 0; + } + + public static int Parse (string s, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public static int Parse (string s, NumberStyles style, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public override string ToString () + { + // TODO: Implement me + + return ""; + } + + public string ToString (IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format, IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + } +} diff --git a/mcs/class/corlib/System/Int64.cs b/mcs/class/corlib/System/Int64.cs new file mode 100644 index 00000000000..4744b6d0817 --- /dev/null +++ b/mcs/class/corlib/System/Int64.cs @@ -0,0 +1,95 @@ +// +// System.Int64.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +using System.Globalization; + +namespace System { + + public struct Int64 : IComparable, IFormattable { + public const long MinValue = -9223372036854775808; + public const long MaxValue = 0x7fffffffffffffff; + + public long value; + + public int CompareTo (object v) + { + if (!(v is System.Int64)) + throw new ArgumentException ("Value is not a System.Int64"); + + if (value == (long) v) + return 0; + + if (value < (long) v) + return -1; + + return 1; + } + + public override bool Equals (object o) + { + if (!(o is System.Int64)) + return false; + + return ((long) o) == value; + } + + public override int GetHashCode () + { + return (int)(value & 0xffffffff) ^ (int)(value >> 32); + } + + public TypeCode GetTypeCode () + { + return TypeCode.Int64; + } + + public static long Parse (string s) + { + // TODO: Implement me + return 0; + } + + public static long Parse (string s, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public static long Parse (string s, NumberStyles style, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public override string ToString () + { + // TODO: Implement me + + return ""; + } + + public string ToString (IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format, IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + } +} diff --git a/mcs/class/corlib/System/InvalidCastException.cs b/mcs/class/corlib/System/InvalidCastException.cs new file mode 100644 index 00000000000..23989794e71 --- /dev/null +++ b/mcs/class/corlib/System/InvalidCastException.cs @@ -0,0 +1,29 @@ +// +// System.InvalidCastException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class InvalidCastException : SystemException { + // Constructors + public InvalidCastException () + : base ("Cannot cast from source type to destination type") + { + } + + public InvalidCastException (string message) + : base (message) + { + } + + public InvalidCastException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/InvalidOperationException.cs b/mcs/class/corlib/System/InvalidOperationException.cs new file mode 100644 index 00000000000..c57029a110b --- /dev/null +++ b/mcs/class/corlib/System/InvalidOperationException.cs @@ -0,0 +1,29 @@ +// +// System.InvalidOperationException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class InvalidOperationException : SystemException { + // Constructors + public InvalidOperationException () + : base ("The requested operation cannot be performed") + { + } + + public InvalidOperationException (string message) + : base (message) + { + } + + public InvalidOperationException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/InvalidProgramException.cs b/mcs/class/corlib/System/InvalidProgramException.cs new file mode 100644 index 00000000000..88150558cc5 --- /dev/null +++ b/mcs/class/corlib/System/InvalidProgramException.cs @@ -0,0 +1,29 @@ +// +// System.InvalidProgramException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public sealed class InvalidProgramException : SystemException { + // Constructors + public InvalidProgramException () + : base ("Metadata is incorrect") + { + } + + public InvalidProgramException (string message) + : base (message) + { + } + + public InvalidProgramException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/MulticastNotSupportedException.cs b/mcs/class/corlib/System/MulticastNotSupportedException.cs new file mode 100644 index 00000000000..02d2a7900c6 --- /dev/null +++ b/mcs/class/corlib/System/MulticastNotSupportedException.cs @@ -0,0 +1,29 @@ +// +// System.MulticastNotSupportedException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public sealed class MulticastNotSupportedException : SystemException { + // Constructors + public MulticastNotSupportedException () + : base ("This operation cannot be performed with the specified delagates") + { + } + + public MulticastNotSupportedException (string message) + : base (message) + { + } + + public MulticastNotSupportedException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/NotFiniteNumberException.cs b/mcs/class/corlib/System/NotFiniteNumberException.cs new file mode 100644 index 00000000000..f460a356033 --- /dev/null +++ b/mcs/class/corlib/System/NotFiniteNumberException.cs @@ -0,0 +1,49 @@ +// +// System.NotFiniteNumberException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class NotFiniteNumberException : ArithmeticException { + double offending_number; + + // Constructors + public NotFiniteNumberException () + : base ("The number encountered was not a finite quantity") + { + } + + public NotFiniteNumberException (double offending_number) + { + this.offending_number = offending_number; + } + + public NotFiniteNumberException (string message) + : base (message) + { + } + + public NotFiniteNumberException (string message, double offending_number) + { + this.offending_number = offending_number; + } + + public NotFiniteNumberException (string message, double offending_number, Exception inner) + : base (message, inner) + { + this.offending_number = offending_number; + } + + // Properties + public virtual double OffendingNumber { + get { + return offending_number; + } + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/NotSupportedException.cs b/mcs/class/corlib/System/NotSupportedException.cs new file mode 100644 index 00000000000..8a6078a9396 --- /dev/null +++ b/mcs/class/corlib/System/NotSupportedException.cs @@ -0,0 +1,29 @@ +// +// System.NotSupportedException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class NotSupportedException : SystemException { + // Constructors + public NotSupportedException () + : base ("Operation is not supported") + { + } + + public NotSupportedException (string message) + : base (message) + { + } + + public NotSupportedException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/NullReferenceException.cs b/mcs/class/corlib/System/NullReferenceException.cs new file mode 100644 index 00000000000..5f712bbb09d --- /dev/null +++ b/mcs/class/corlib/System/NullReferenceException.cs @@ -0,0 +1,29 @@ +// +// System.NullReferenceException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class NullReferenceException : SystemException { + // Constructors + public NullReferenceException () + : base ("A null value was found where an object instance was required") + { + } + + public NullReferenceException (string message) + : base (message) + { + } + + public NullReferenceException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/Object.cs b/mcs/class/corlib/System/Object.cs new file mode 100644 index 00000000000..375a6ccf09a --- /dev/null +++ b/mcs/class/corlib/System/Object.cs @@ -0,0 +1,111 @@ +// +// System.Object.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// +// This should probably be implemented in IL instead of C#, to +// use internalcalls to get its hands on the underlying Type +// of an object. +// + +namespace System { + + public class Object { + + // <summary> + // Compares this object to the specified object. + // Returns true if they are equal, false otherwise. + // </summary> + public virtual bool Equals (object o) + { + return this == o; + } + + // <summary> + // Compares two objects for equality + // </summary> + public static bool Equals (object a, object b) + { + if (a == null) { + if (b == null) + return true; + return false; + } else { + if (b == null) + return false; + return a.Equals (b); + } + } + + // <summary> + // Initializes a new instance of the object class. + // </summary> + public Object () + { + } + + // <summary> + // Object destructor. + // </summary> + ~Object () + { + } + + // <summary> + // Returns a hashcode for this object. Each derived + // class should return a hash code that makes sense + // for that particular implementation of the object. + // </summary> + public virtual int GetHashCode () + { + return 0; + } + + // <summary> + // Returns the Type associated with the object. + // </summary> + public Type GetType () + { + // TODO: This probably needs to be tied up + // with the Type system. Private communications + // channel? + // Type is abstract, so the following line won't cut it. + //return new Type (); + return null; + } + + // <summary> + // Shallow copy of the object. + // </summary> + protected object MemberWiseClone () + { + return null; + } + + // <summary> + // Returns a stringified representation of the object. + // This is not supposed to be used for user presentation, + // use Format() for that and IFormattable. + // + // ToString is mostly used for debugging purposes. + // </summary> + public virtual string ToString () + { + return GetType().FullName; + } + + // <summary> + // Tests whether a is equal to b. + // Can not figure out why this even exists + // </summary> + public static bool ReferenceEquals (object a, object b) + { + return (a == b); + } + + + } +} diff --git a/mcs/class/corlib/System/OutOfMemoryException.cs b/mcs/class/corlib/System/OutOfMemoryException.cs new file mode 100644 index 00000000000..597f68156c9 --- /dev/null +++ b/mcs/class/corlib/System/OutOfMemoryException.cs @@ -0,0 +1,29 @@ +// +// System.OutOfMemoryException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class OutOfMemoryException : SystemException { + // Constructors + public OutOfMemoryException () + : base ("There is insufficient memory to continue execution") + { + } + + public OutOfMemoryException (string message) + : base (message) + { + } + + public OutOfMemoryException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/OverflowException.cs b/mcs/class/corlib/System/OverflowException.cs new file mode 100644 index 00000000000..5bee3b461a5 --- /dev/null +++ b/mcs/class/corlib/System/OverflowException.cs @@ -0,0 +1,29 @@ +// +// System.OverflowExceptionException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class OverflowExceptionException : ArithmeticException { + // Constructors + public OverflowExceptionException () + : base ("Number overflow") + { + } + + public OverflowExceptionException (string message) + : base (message) + { + } + + public OverflowExceptionException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/RankException.cs b/mcs/class/corlib/System/RankException.cs new file mode 100644 index 00000000000..5eb3709d4ac --- /dev/null +++ b/mcs/class/corlib/System/RankException.cs @@ -0,0 +1,29 @@ +// +// System.RankException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class RankException : SystemException { + // Constructors + public RankException () + : base ("Two arrays must have the same number of dimensions") + { + } + + public RankException (string message) + : base (message) + { + } + + public RankException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/StackOverflowException.cs b/mcs/class/corlib/System/StackOverflowException.cs new file mode 100644 index 00000000000..f389346d6f8 --- /dev/null +++ b/mcs/class/corlib/System/StackOverflowException.cs @@ -0,0 +1,29 @@ +// +// System.StackOverflowException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class StackOverflowException : SystemException { + // Constructors + public StackOverflowException () + : base ("The requested operation caused a stack overflow") + { + } + + public StackOverflowException (string message) + : base (message) + { + } + + public StackOverflowException (string message, Exception inner) + : base (message, inner) + { + } + } +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs new file mode 100644 index 00000000000..6706995a15e --- /dev/null +++ b/mcs/class/corlib/System/String.cs @@ -0,0 +1,1374 @@ +// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- +// +// System.String.cs +// +// Author: +// Jeffrey Stedfast (fejj@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +// FIXME: from what I gather from msdn, when a function is to return an empty string +// we should be returning this.Empty - some methods do this and others don't. + +// FIXME: I didn't realise until later that `string' has a .Length method and so +// I am missing some proper bounds-checking in some methods. Find these +// instances and throw the ArgumentOutOfBoundsException at the programmer. + +using System; + +namespace System { + + public sealed class String : IComparable, IClonable, IConvertable, IEnumerable { + public static string Empty = ""; + private char c_str[]; + private int length; + + // Constructors + unsafe public String (char *value) + { + int i; + + if (value == null) { + this.length = 0; + } else { + for (i = 0; *(value + i) != '\0'; i++); + this.length = i; + } + + this.c_str = new char [this.length + 1]; + for (i = 0; i < this.length; i++) + this.c_str[i] = *(value + i); + this.c_str[i] = '\0'; + } + + public String (char[] value) + { + int i, len = 0; + + if (value != null) + for (this.len = 0; value[len] != '\0'; len++); + + this.length = len; + this.c_str = new char [len + 1]; + for (i = 0; i < len; i++) + this.c_str[i] = value[i]; + this.c_str[i] = '\0'; + } + + unsafe public String (sbyte *value) + { + // FIXME: consider unicode? + int i; + + if (value == null) { + this.length = 0; + } else { + for (i = 0; *(value + i) != '\0'; i++); + this.length = i; + } + + this.c_str = new char [this.length + 1]; + for (i = 0; i < this.length; i++) + this.c_str[i] = *(value + i); + this.c_str[i] = '\0'; + } + + public String (char c, int count) + { + int i; + + this.length = count; + this.c_str = new char [count + 1]; + for (i = 0; i < count; i++) + this.c_str[i] = c; + this.c_str[i] = '\0'; + } + + unsafe public String (char *value, int startIndex, int length) + { + int i; + + if (value == null && startIndex != 0 && length != 0) + throw new ArgumentNullException (); + + if (startIndex < 0 || length < 0) + throw new ArgumentOutOfRangeException (); + + this.length = length; + this.c_str = new char [length + 1]; + for (i = 0; i < length; i++) + this.c_str[i] = *(value + startIndex + i); + this.c_str[i] = '\0'; + } + + public String (char[] value, int startIndex, int length) + { + int i; + + if (value == null && startIndex != 0 && length != 0) + throw new ArgumentNullException (); + + if (startIndex < 0 || length < 0) + throw new ArgumentOutOfRangeException (); + + this.length = length; + this.c_str = new char [length + 1]; + for (i = 0; i < length; i++) + this.c_str[i] = value[startIndex + i]; + this.c_str[i] = '\0'; + } + + unsafe public String (sbyte *value, int startIndex, int length) + { + // FIXME: consider unicode? + int i; + + if (value == null && startIndex != 0 && length != 0) + throw new ArgumentNullException (); + + if (startIndex < 0 || length < 0) + throw new ArgumentOutOfRangeException (); + + this.length = length; + this.c_str = new char [length + 1]; + for (i = 0; i < length; i++) + this.c_str[i] = *(value + startIndex + i); + this.c_str[i] = '\0'; + } + + unsafe public String (sbyte *value, int startIndex, in length, Encoding enc) + { + // FIXME: implement me + } + + protected ~String () + { + delete this.c_str; + } + + protected string MemberwiseClone () + { + // FIXME: implement me + } + + // Properties + public int Length { + get { + return this.length; + } + } + + // FIXME: is this correct syntax?? + public char Chars (int index) { + get { + if (index > this.length) + throw new ArgumentOutOfRangeException (); + + return this.c_str[index]; + } + } + + // Methods + public object Clone () + { + // FIXME: implement me + } + + public static int Compare (string strA, string strB) + { + int i; + + /* Does this remind anyone of the nautilus string.h wrappers? :-) */ + if (strA == null) { + if (strB == null) + return 0; + else + return -1; + } else if (strB == null) + return 1; + + for (i = 0; strA[i] != strB[i] && strA[i] != '\0'; i++); + + return ((int) (strA[i] - strB[i])); + } + + public static int Compare (string strA, string strB, bool ignoreCase) + { + int i; + + if (!ignoreCase) + return Compare (strA, strB); + + /* + * And here I thought Eazel developers were on crack... + * if a string is null it should throw an exception damnit! + */ + if (strA == null) { + if (strB == null) + return 0; + else + return -1; + } else if (strB == null) + return 1; + + for (i = 0; strA[i] != '\0' && strB[i] != '\0'; i++) { + char cA, cB; + + cA = strA[i] >= 'A' && strA[i] <= 'Z' ? strA[i] + 33 : strA[i]; + cB = strB[i] >= 'A' && strB[i] <= 'Z' ? strB[i] + 33 : strB[i]; + + if (cA != cB) + break; + } + + return ((int) (strA[i] - strB[i])); + } + + public static int Compare (string strA, string strB, bool ignoreCase, CultureInfo culture) + { + // FIXME: implement me + } + + public static int Compare (string strA, int indexA, string strB, int indexB, int length) + { + int i; + + if (length < 0 || indexA < 0 || indexB < 0) + throw new ArgumentOutOfRangeException (); + + if (indexA > strA.Length || indexB > strB.Length) + throw new ArgumentOutOfRangeException (); + + /* And again with the ("" > null) logic... lord have mercy! */ + if (strA == null) { + if (strB == null) + return 0; + else + return -1; + } else if (strB == null) + return 1; + + for (i = 0; i < length; i++) { + if (strA[indexA + i] != strB[indexB + i]) + break; + } + + return ((int) (strA[indexA + i] - strB[indexB + i])); + } + + public static int Compare (string strA, int indexA, string strB, int indexB, + int length, bool ignoreCase) + { + int i; + + if (!ignoreCase) + return Compare (strA, indexA, strB, indexB, length); + + if (length < 0 || indexA < 0 || indexB < 0) + throw new ArgumentOutOfRangeException (); + + if (indexA > strA.Length || indexB > strB.Length) + throw new ArgumentOutOfRangeException (); + + /* When will the hurting stop!?!? */ + if (strA == null) { + if (strB == null) + return 0; + else + return -1; + } else if (strB == null) + return 1; + + for (i = 0; i < length; i++) { + int iA = indexA + i; + int iB = indexB + i; + char cA, cB; + + cA = strA[iA] >= 'A' && strA[iA] <= 'Z' ? strA[iA] + 33 : strA[iA]; + cB = strB[iB] >= 'A' && strB[iB] <= 'Z' ? strB[iB] + 33 : strB[iB]; + + if (cA != cB) + break; + } + + return ((int) (strA[indexA + i] - strB[indexB + i])); + } + + public static int Compare (string strA, int indexA, string strB, int indexB, + int length, bool ignoreCase, CultureInfo culture) + { + if (culture == null) + throw new ArgumentNullException (); + + if (length < 0 || indexA < 0 || indexB < 0) + throw new ArgumentOutOfRangeException (); + + if (indexA > strA.Length || indexB > strB.Length) + throw new ArgumentOutOfRangeException (); + + /* I can't take it anymore! */ + if (strA == null) { + if (strB == null) + return 0; + else + return -1; + } else if (strB == null) + return 1; + // FIXME: implement me + } + + private static char toLowerOrdinal (char value) + { + // FIXME: implement me + return value; + } + + public static int CompareOrdinal (string strA, string strB) + { + int i; + + /* Please God, make it stop! */ + if (strA == null) { + if (strB == null) + return 0; + else + return -1; + } else if (strB == null) + return 1; + + for (i = 0; strA[i] != '\0'; i++) { + char cA, cB; + + cA = toLowerOrdinal (strA[i]); + cB = toLowerOrdinal (strB[i]); + + if (cA != cB) + break; + } + + return ((int) (strA[i] - strB[i])); + } + + public static int CompareOrdinal (string strA, int indexA, string strB, int indexB, + int length) + { + int i; + + if (length < 0 || indexA < 0 || indexB < 0) + throw new ArgumentOutOfRangeException (); + + /* Nooooooooo!! */ + if (strA == null) { + if (strB == null) + return 0; + else + return -1; + } else if (strB == null) + return 1; + + for (i = 0; i < length; i++) { + char cA, cB; + + cA = toLowerOrdinal (strA[indexA + i]); + cB = toLowerOrdinal (strB[indexB + i]); + + if (cA != cB) + break; + } + + return ((int) (strA[indexA + i] - strB[indexB + i])); + } + + public int CompareTo (object obj) + { + return Compare (this, obj == null ? null : obj.ToString); + } + + public int CompareTo (string str) + { + return Compare (this, str); + } + + public static string Concat (object arg) + { + return Concat (this, arg ? arg.ToString () : this.Empty); + } + + public static string Concat (params object[] args) + { + // FIXME: I guess I don't have to `delete' strings and it's elements? + string strings[], str; + int len, i, j, k; + + if (args == null) + throw new ArgumentNullException (); + + strings = new string [args.Length]; + len = 0; + for (i = 0; i < args.Length; i++) { + /* use Empty for each null argument */ + if (args[i] == null) + strings[i] = this.Empty; + else + strings[i] = args[i].ToString (); + len += strings[i].Length; + } + + if (len == 0) + return this.Empty; + + str = new string [len + 1]; + i = 0; + for (j = 0; j < args.Length; j++) + for (k = 0; k < strings[j].Length; k++) + str[i++] = strings[j][k]; + str[i] = '\0'; + + return str; + } + + public static string Concat (params string[] values) + { + int len, i, j, k; + string str; + + if (values == null) + throw new ArgumentNullException (); + + len = 0; + for (i = 0; i < values.Length; i++) + len += values[i] ? values[i].Length : 0; + + if (len == 0) + return this.Empty; + + str = new string [len + 1]; + i = 0; + for (j = 0; j < values.Length; j++) { + if (values[j] == null) + continue; + + for (k = 0; k < values[j].Length; k++) + str[i++] = values[j][k]; + } + str[i] = '\0'; + + return str; + } + + public static string Concat (object arg0, object arg1) + { + string str0 = arg0 ? arg0.ToString () : this.Empty; + string str1 = arg1 ? arg1.ToString () : this.Empty; + + return Concat (str0, str1); + } + + public static string Concat (string str0, string str1) + { + string concat; + int i, j, len; + + if (str0 == null) + str0 = this.Empty; + if (str1 == null) + str1 == this.Empty; + + len = str0.Length + str1.Length; + if (len == 0) + return this.Empty; + + concat = new string [len + 1]; + for (i = 0; i < str0.Length; i++) + concat[i] = str0[i]; + for (j = 0 ; j < str1.Length; j++) + concat[i + j] = str1[j]; + concat[len] = '\0'; + + return concat; + } + + public static string Concat (object arg0, object arg1, object arg2) + { + string str0 = arg0 ? arg0.ToString () : this.Empty; + string str1 = arg1 ? arg1.ToString () : this.Empty; + string str2 = arg2 ? arg2.ToString () : this.Empty; + + return Concat (str0, str1, str2); + } + + public static string Concat (string str0, string str1, string str2) + { + string concat; + int i, j, k, len; + + if (str0 == null) + str0 = this.Empty; + if (str1 == null) + str1 = this.Empty; + if (str2 == null) + str2 = this.Empty; + + len = str0.Length + str1.Length + str2.Length; + if (len == 0) + return this.Empty; + + concat = new string [len + 1]; + for (i = 0; i < str0.Length; i++) + concat[i] = str0[i]; + for (j = 0; j < str1.Length; j++) + concat[i + j] = str1[j]; + for (k = 0; k < str2.Length; k++) + concat[i + j + k] = str2[k]; + concat[len] = '\0'; + + return concat; + } + + public static string Concat (string str0, string str1, string str2, string str3) + { + string concat; + int i, j, k, l, len; + + if (str0 == null) + str0 = this.Empty; + if (str1 == null) + str1 = this.Empty; + if (str2 == null) + str2 = this.Empty; + if (str3 == null) + str3 = this.Empty; + + len = str0.Length + str1.Length + str2.Length + str3.Length; + if (len == 0) + return this.Empty; + + concat = new string [len + 1]; + for (i = 0; i < str0.Length; i++) + concat[i] = str0[i]; + for (j = 0; j < str1.Length; j++) + concat[i + j] = str1[j]; + for (k = 0; k < str2.Length; k++) + concat[i + j + k] = str2[k]; + for (l = 0; l < str3.Length; l++) + concat[i + j + k + l] = str3[l]; + concat[len] = '\0'; + + return concat; + } + + public static string Copy (string str) + { + if (str == null) + throw new ArgumentNullException (); + + return new String (str); + } + + public void CopyTo (int sourceIndex, char[] destination, int destinationIndex, int count) + { + // FIXME: should I null-terminate? + int i, len; + + if (destination == null) + throw new ArgumentNullException (); + + if (sourceIndex < 0 || destinationIndex < 0 || count < 0) + throw new ArgumentOutOfRangeException (); + + if (sourceIndex + count > this.length) + throw new ArgumentOutOfRangeException (); + + if (destinationIndex + count > destination.Length) + throw new ArgumentOutOfRangeException (); + + for (i = 0; i < count; i++) + destination[destinationIndex + i] = this.c_str[sourceIndex + i]; + } + + public bool EndsWith (string value) + { + bool endswith = true; + int start, i; + + if (value == null) + throw new ArgumentNullException (); + + start = this.length - value.Length; + if (start < 0) + return false; + + for (i = start; i < this.length && endswith; i++) + endswith = this.c_str[i] == value[i - start]; + + return endswith; + } + + public override bool Equals (object obj) + { + if (!(obj is String)) + return false; + + return this == (String) obj; + } + + public new bool Equals (string value) + { + return this == value; + } + + public static new bool Equals (string a, string b) + { + return a == b; + } + + public static string Format (string format, object arg0) + { + // FIXME: implement me + } + + public static string Format (string format, params object[] args) + { + // FIXME: implement me + } + + public static string Format (IFormatProvider provider, string format, params object[] args) + { + // FIXME: implement me + } + + public static string Format (string format, object arg0, object arg1) + { + // FIXME: implement me + } + + public static string Format (string format, object arg0, object arg1, object arg2) + { + // FIXME: implement me + } + + public CharEnumerator GetEnumerator () + { + // FIXME: implement me + } + + public override int GetHashCode () + { + // FIXME: implement me + } + + public Type GetType () + { + // FIXME: implement me + } + + public TypeCode GetTypeCode () + { + // FIXME: implement me + } + + public int IndexOf (char value) + { + return IndexOf (value, 0, this.length); + } + + public int IndexOf (string value) + { + return IndexOf (value, 0, this.length); + } + + public int IndexOf (char value, int startIndex) + { + return IndexOf (value, startIndex, this.length - startIndex); + } + + public int IndexOf (string value, int startIndex) + { + return IndexOf (value, startIndex, this.length - startIndex); + } + + public int IndexOf (char value, int startIndex, int count) + { + int i; + + if (startIndex < 0 || count < 0 || startIndex + count > this.length) + throw new ArgumentOutOfRangeException (); + + for (i = startIndex; i - startIndex < count; i++) + if (this.c_str[i] == value) + return i; + + return -1; + } + + public int IndexOf (string value, int startIndex, int count) + { + // FIXME: Use a modified Boyer-Moore algorithm to work with unicode? + int i; + + if (value == null) + throw new ArgumentNullException (); + + if (startIndex < 0 || count < 0 || startIndex + count > this.length) + throw new ArgumentOutOfRangeException (); + + for (i = startIndex; i - startIndex < count; i++) { + if (this.c_str[i] == value[0]) { + bool equal = true; + int j, offset; + + offset = i - startIndex; + for (j = 1; equal && value[j] != '\0' && offset + j < count; j++) + equal = this.c_str[i + j] == value[j]; + + if (equal) + return i; + } + } + + return -1; + } + + public int IndexOfAny (char[] values) + { + return IndexOfAny (values, 0, this.length); + } + + public int IndexOfAny (char[] values, int startIndex) + { + return IndexOfAny (values, startIndex, this.length); + } + + public int IndexOfAny (char[] values, int startIndex, int count) + { + int i, valuelen; + + if (values == null) + throw new ArgumentNullException (); + + if (startIndex < 0 || count < 0 || startIndex + count > this.length) + throw new ArgumentOutOfRangeException (); + + for (valuelen = 0; values[valuelen] != '\0'; valuelen++); + + if (valuelen == 0) + return -1; + + for (i = startIndex, i < startIndex + count, i++) { + for (int j = 0; j < vlen; j++) { + if (this.c_str[i] == values[j]) + return i; + } + } + + return -1; + } + + public string Insert (int startIndex, string value) + { + string str; + int i, j; + + if (value == null) + throw new ArgumentNullException (); + + if (startIndex < 0 || startIndex > this.length) + throw new ArgumentOutOfRangeException (); + + str = new string [value.Length + this.length + 1]; + for (i = 0; i < startIndex; i++) + str[i] = this.c_str[i]; + for (j = 0; j < value.Length; j++) + str[i + j] = value[j]; + for ( ; i < this.length; i++) + str[i + j] = this.c_str[i]; + str[i + j] = '\0'; + + return str; + } + + public static string Intern (string str) + { + if (str == null) + throw new ArgumentNullException (); + // FIXME: implement me + } + + public static string IsInterned (string str) + { + if (str == null) + throw new ArgumentNullException (); + // FIXME: implement me + } + + public static string Join (string separator, string[] value) + { + // FIXME: msdn doesn't specify what happens when separator is null + // or what to do if value[0] is null or if even value is a + // NULL terminated array (I'm just assuming it is) + // NOTE: this does not call Join (string, string[], int, int) + // because to do so would mean counting the # of elements twice + string str; + int len, i, j; + + if (separator == null || value == null) + throw new ArgumentNullException (); + + if (value[0] == null) + return this.Empty; + + len = value[0].Length; + for (i = 1; value[i] != null; i++) + len += separator.Length + value[i].Length; + + str = new string [len + 1]; + for (i = 0; i < value[0].Length; i++) + str[i] = value[0][i]; + for (j = 1; value[j] != null; j++) { + int k; + + for (k = 0; k < separator.Length; k++) + str[i++] = separator[k]; + for (k = 0; k < value[j].Length; k++) + str[i++] = value[j][k]; + } + str[i] = '\0'; + + return str; + } + + public static string Join (string separator, string[] value, int startIndex, int count) + { + // FIXME: msdn doesn't specify what happens when separator is null + // or what to do if value[0] is null + // FIXME: does value.Length give me the length of the array? + int len, i, j, elements, used; + string str; + + if (separator == null || value == null) + throw new ArgumentNullException (); + + len = 0; + used = 0; + elements = 0; + for (i = 0; value[i] != null; i++, elements++) { + if (i == startIndex) { + len = value[i].Length; + used = 1; + } else if (i > startIndex && used < count) { + len += separator.Length + value[i].Length; + used++; + } + } + + if (startIndex + count > elements) + throw new ArgumentOutOfRangeException (); + + // We have no elements to join? + if (i == 0) + return this.Empty; + + str = new string [len + 1]; + for (i = 0; i < value[startIndex].Length; i++) + str[i] = value[startIndex][i]; + + used = 0; + for (j = startIndex + 1; used < count; j++, used++) { + int k; + + for (k = 0; k < separator.Length; k++) + str[i++] = separator[k]; + for (k = 0; k < value[j].Length; k++) + str[i++] = value[j][k]; + } + str[i] = '\0'; + + return str; + } + + public int LastIndexOf (char value) + { + int i; + + for (i = this.length; i >= 0; i--) { + if (this.c_str[i] == value) + return i; + } + + return -1; + } + + public int LastIndexOf (string value) + { + return LastIndexOf (value, this.length, this.length); + } + + public int LastIndexOf (char value, int startIndex) + { + int i; + + if (startIndex < 0 || startIndex > this.length) + throw new ArgumentOutOfRangeException (); + + for (i = startIndex; i >= 0; i--) { + if (this.c_str[i] == value) + return i; + } + + return -1; + } + + public int LastIndexOf (string value, int startIndex) + { + return LastIndexOf (value, startIndex, this.length); + } + + public int LastIndexOf (char value, int startIndex, int count) + { + int i; + + if (startIndex < 0 || count < 0) + throw new ArgumentOutOfRangeException (); + + if (startIndex > this.length || startIndex - count < 0) + throw new ArgumentOutOfRangeException (); + + for (i = startIndex; i >= startIndex - count; i--) { + if (this.c_str[i] == value) + return i; + } + + return -1; + } + + public int LastIndexOf (string value, int startIndex, int count) + { + // FIXME: currently I'm using startIndex as the 0-position in the comparison, + // but maybe it's the end-position in MS's implementation? + // msdn is unclear on this point. I think this is correct though. + int i, len; + + if (value == null) + throw new ArgumentNullException (); + + if (startIndex < 0 || startIndex > this.length) + throw new ArgumentOutOfRangeException (); + + if (count < 0 || startIndex - count < 0) + throw new ArgumentOutOfRangeException (); + + if (value == this.Empty) + return startIndex; + + if (startIndex + value.Length > this.length) { + /* just a little optimization */ + int start; + + start = this.length - value.Length; + count -= startIndex - start; + startIndex = start; + } + + // FIXME: use a reversed-unicode-safe-Boyer-Moore? + len = value.Length; + for (i = startIndex; i >= startIndex - count; i--) { + if (this.c_str[i + len] == value[len]) { + bool equal = true; + int j; + + for (j = len - 1; equal && j >= 0; j--) + equal = this.c_str[i + j] == value[j]; + + if (equal) + return i; + } + } + + return -1; + } + + public int LastIndexOfAny (char[] values) + { + // FIXME: implement me + } + + public int LastIndexOfAny (char[] values, int startIndex) + { + // FIXME: implement me + } + + public int LastIndexOfAny (char[] values, int startIndex, int count) + { + // FIXME: implement me + } + + public string PadLeft (int totalWidth) + { + return PadLeft (totalWidth, ' '); + } + + public string PadLeft (int totalWidth, char padChar) + { + string str; + int i, j; + + if (totalWidth < 0) + throw new ArgumentException (); + + str = new string [totalWidth > this.length ? totalWidth : this.length + 1]; + for (i = 0; i < totalWidth - this.length; i++) + str[i] = padChar; + + for (j = 0; j < this.length; i++, j++) + str[i] = this.c_str[j]; + + str[i] = '\0'; + + return str; + } + + public string PadRight (int totalWidth) + { + return PadRight (totalWidth, ' '); + } + + public string PadRight (int totalWidth, char padChar) + { + string str; + int i; + + if (totalWidth < 0) + throw new ArgumentException (); + + str = new string [totalWidth > this.length ? totalWidth : this.length + 1]; + for (i = 0; i < this.length; i++) + str[i] = this.c_str[i]; + + for ( ; j < str.Length; i++) + str[i] = padChar; + + str[i] = '\0'; + + return str; + } + + public string Remove (int startIndex, int count) + { + string str; + int i, j, len; + + if (startIndex < 0 || count < 0 || startIndex + count > this.length) + throw new ArgumentOutOfRangeException (); + + len = this.length - count; + if (len == 0) + return this.Empty; + + str = new string [len + 1]; + for (i = 0; i < startIndex; i++) + str[i] = this.c_str[i]; + for (j = i + count; j < this.length; j++) + str[i++] = this.c_str[j]; + str[i] = '\0'; + + return str; + } + + public string Replace (char oldChar, char newChar) + { + string str; + int i; + + str = new string [this.length + 1]; + for (i = 0; i < this.length; i++) { + if (this.c_str[i] == oldChar) + str[i] = newChar; + else + str[i] = this.c_str[i]; + } + str[i] = '\0'; + + return str; + } + + public string Replace (string oldValue, string newValue) + { + // FIXME: msdn doesn't specify what to do if either args is null + int index, len, i, j; + string str; + + if (oldValue == null || newValue == null) + throw new ArgumentNullException (); + + // Use IndexOf in case I later rewrite it to use Boyer-Moore + index = IndexOf (oldValue, 0); + if (index == -1) { + // This is the easy one ;-) + return Substring (0, this.length); + } + + len = this.length - oldValue.Length + newValue.Length; + if (len == 0) + return this.Empty; + + str = new string [len + 1]; + for (i = 0; i < index; i++) + str[i] = this.c_str[i]; + for (j = 0; j < newValue.Length; j++) + str[i++] = newValue[j]; + for (j = index + oldValue.Length; j < this.length; j++) + str[i++] = this.c_str[j]; + str[i] = '\0'; + + return str; + } + + public string[] Split (params char[] separator) + { + /** + * split: + * @separator: delimiting chars or null to split on whtspc + * + * Returns: 1. An array consisting of a single + * element (@this) if none of the delimiting + * chars appear in @this. 2. An array of + * substrings which are delimited by one of + * the separator chars. 3. An array of + * substrings separated by whitespace if + * @separator is null. The Empty string should + * be returned wherever 2 delimiting chars are + * adjacent. + **/ + + // FIXME: implement me + } + + public string[] Split (params char[] separator, int maxCount) + { + // FIXME: implement me + } + + public bool StartsWith (string value) + { + bool startswith = true; + int i; + + if (value == null) + throw new ArgumentNullException (); + + if (value.Length > this.length) + return false; + + for (i = 0; i < value.Length && startswith; i++) + startswith = startswith && value[i] == this.c_str[i]; + + return startswith; + } + + public string Substring (int startIndex) + { + string str; + int i, len; + + if (startIndex < 0 || startIndex > this.length) + throw new ArgumentOutOfRangeException (); + + len = this.length - startIndex; + if (len == 0) + return this.Empty; + + str = new string [len + 1]; + for (i = startIndex; i < this.length; i++) + str[i - startIndex] = this.c_str[i]; + str[i] = '\0'; + + return str; + } + + public string Substring (int startIndex, int length) + { + string str; + int i; + + if (startIndex < 0 || length < 0 || startIndex + length > this.length) + throw new ArgumentOutOfRangeException (); + + if (length == 0) + return this.Empty; + + str = new string [length + 1]; + for (i = startIndex; i < startIndex + length; i++) + str[i - startIndex] = this.c_str[i]; + str[i] = '\0'; + + return str; + } + + public char[] ToCharArray () + { + return ToCharArray (0, this.length); + } + + public char[] ToCharArray (int startIndex, int length) + { + char [] chars; + int i, j; + + if (startIndex < 0 || length < 0 || startIndex + length > this.length) + throw new ArgumentOutOfRangeException (); + + chars = new char [length + 1]; + for (i = startIndex, i < length; i++) + chars[i - startIndex] = this.c_str[i]; + + chars[length] = '\0'; + + return chars; + } + + public string ToLower () + { + string str; + int i; + + str = new string [this.length + 1]; + for (i = 0; i < this.length; i++) { + char c = this.c_str[i]; + + str[i] = c >= 'A' && c <= 'Z' ? c + 33 : c; + } + + str[i] = '\0'; + + return str; + } + + public string ToLower (CultureInfo culture) + { + // FIXME: implement me + } + + public override string ToString () + { + return Substring (0, this.length); + } + + public string ToString (IFormatProvider format) + { + // FIXME: implement me + } + + public string ToUpper () + { + string str; + int i; + + str = new string [this.length + 1]; + for (i = 0; i < this.length; i++) { + char c = this.c_str[i]; + + str[i] = c >= 'a' && c <= 'z' ? c - 33 : c; + } + str[i] = '\0'; + + return str; + } + + public string ToUpper (CultureInfo culture) + { + // FIXME: implement me + } + + private bool is_lwsp (char c) + { + /* this comes from the msdn docs for String.Trim() */ + if ((c >= '0x9' && c <= '0xD') || c == '0x20' || c == '0xA0' || + (c >= '0x2000' && c <= '0x200B') || c == '0x3000' || c == '0xFEFF') + return true; + else + return false; + } + + public string Trim () + { + return Trim (null); + } + + public string Trim (params char[] trimChars) + { + // FIXME: this implementation seems lame to me... + int begin, end, i; + bool matches; + + matches = true; + for (begin = 0; matches && begin < this.length; begin++) { + if (trimChars != null) { + matches = false; + for (i = 0; !matches && i < trimChars.Length; i++) + matches = this.c_str[begin] == trimChars[i]; + } else { + matches = is_lwsp (this.c_str[begin]); + } + } + + matches = true; + for (end = this.length; end > begin; end--) { + if (trimChars != null) { + matches = false; + for (i = 0; !matches && i < trimChars.Length; i++) + matches = this.c_str[end] == trimChars[i]; + } else { + matches = is_lwsp (this.c_str[end]); + } + } + + if (begin == end) + return this.Empty; + + return Substring (begin, end - begin); + } + + public string TrimEnd (params char[] trimChars) + { + bool matches = true; + int end, i; + + for (end = this.length; end > 0; end--) { + if (trimChars != null) { + matches = false; + for (i = 0; !matches && i < trimChars.Length; i++) + matches = this.c_str[end] == trimChars[i]; + } else { + matches = is_lwsp (this.c_str[end]); + } + } + + if (end == 0) + return this.Empty; + + return Substring (0, end); + } + + public string TrimStart (params char[] trimChars) + { + bool matches = true; + int begin, i; + + for (begin = 0; matches && begin < this.length; begin++) { + if (trimChars != null) { + matches = false; + for (i = 0; !matches && i < trimChars.Length; i++) + matches = this.c_str[begin] == trimChars[i]; + } else { + matches = is_lwsp (this.c_str[begin]); + } + } + + if (begin == this.length) + return this.Empty; + + return Substring (begin, this.length - begin); + } + } +} diff --git a/mcs/class/corlib/System/SystemException.cs b/mcs/class/corlib/System/SystemException.cs new file mode 100644 index 00000000000..79fa92ca2ec --- /dev/null +++ b/mcs/class/corlib/System/SystemException.cs @@ -0,0 +1,29 @@ +// +// System.SystemException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class SystemException : Exception { + // Constructors + public SystemException () + : base ("A system exception has occurred.") + { + } + + public SystemException (string message) + : base (message) + { + } + + public SystemException (string message, Exception inner) + : base (message, inner) + { + } + } +} diff --git a/mcs/class/corlib/System/TODO b/mcs/class/corlib/System/TODO new file mode 100644 index 00000000000..e5b679dd963 --- /dev/null +++ b/mcs/class/corlib/System/TODO @@ -0,0 +1,12 @@ +System.Object: + Need a mechanism for getting an object underlying type. + +System.ValueType: + Need to lock memory and "scan" the actual contents to compute + hash code and do comparissions. Should be simple to do with + C#, the problem is figuring out the size of the object. + +System.String: + Need to implement the Format() and CompareOrdincal() methods + as we all implement all of the methods that take into account + CultureInfo.
\ No newline at end of file diff --git a/mcs/class/corlib/System/TypeCode.cs b/mcs/class/corlib/System/TypeCode.cs new file mode 100644 index 00000000000..a11a1054022 --- /dev/null +++ b/mcs/class/corlib/System/TypeCode.cs @@ -0,0 +1,32 @@ +// +// System.TypeCode.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public enum TypeCode { + Empty = 0, + Object = 1, + DBNull = 2, + Boolean = 3, + Char = 4, + SByte = 5, + Byte = 6, + Int16 = 7, + UInt16 = 8, + Int32 = 9, + UInt32 = 10, + Int64 = 11, + UInt64 = 12, + Single = 13, + Double = 14, + Decimal = 15, + DateTime = 16, + String = 18, + } +} diff --git a/mcs/class/corlib/System/TypeInitializationException.cs b/mcs/class/corlib/System/TypeInitializationException.cs new file mode 100644 index 00000000000..2adbb2f89e6 --- /dev/null +++ b/mcs/class/corlib/System/TypeInitializationException.cs @@ -0,0 +1,30 @@ +// +// System.TypeInitializationException.cs +// +// Author: +// Joe Shaw (joe@ximian.com) +// +// (C) 2001 Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class TypeInitializationException : SystemException { + string type_name; + + // Constructors + public TypeInitializationException (string type_name, Exception inner) + : base ("An exception was thrown by the type initializer for " + type_name, inner) + { + this.type_name = type_name; + } + + // Properties + public string TypeName { + get { + return type_name; + } + } + } + +}
\ No newline at end of file diff --git a/mcs/class/corlib/System/UInt16.cs b/mcs/class/corlib/System/UInt16.cs new file mode 100644 index 00000000000..b8c025d1797 --- /dev/null +++ b/mcs/class/corlib/System/UInt16.cs @@ -0,0 +1,89 @@ +// +// System.UInt16.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +using System.Globalization; + +namespace System { + + public struct UInt16 : IComparable, IFormattable { + public const ushort MinValue = 0; + public const ushort MaxValue = 0xffff; + + public ushort value; + + public int CompareTo (object v) + { + if (!(v is System.UInt16)) + throw new ArgumentException ("Value is not a System.UInt16"); + + return value - ((ushort) v); + } + + public override bool Equals (object o) + { + if (!(o is System.UInt16)) + return false; + + return ((ushort) o) == value; + } + + public override int GetHashCode () + { + return value; + } + + public TypeCode GetTypeCode () + { + return TypeCode.UInt16; + } + + public static ushort Parse (string s) + { + // TODO: Implement me + return 0; + } + + public static ushort Parse (string s, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public static ushort Parse (string s, NumberStyles style, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public override string ToString () + { + // TODO: Implement me + + return ""; + } + + public string ToString (IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format, IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + } +} diff --git a/mcs/class/corlib/System/UInt32.cs b/mcs/class/corlib/System/UInt32.cs new file mode 100644 index 00000000000..c65744d9def --- /dev/null +++ b/mcs/class/corlib/System/UInt32.cs @@ -0,0 +1,95 @@ +// +// System.UInt32.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +using System.Globalization; + +namespace System { + + public struct UInt32 : IComparable, IFormattable { + public const uint MinValue = 0; + public const uint MaxValue = 0xffffffff; + + public uint value; + + public int CompareTo (object v) + { + if (!(v is System.UInt32)) + throw new ArgumentException ("Value is not a System.UInt32"); + + if (value == (uint) v) + return 0; + + if (value < (uint) v) + return -1; + + return 1; + } + + public override bool Equals (object o) + { + if (!(o is System.UInt32)) + return false; + + return ((uint) o) == value; + } + + public override int GetHashCode () + { + return (int) value; + } + + public TypeCode GetTypeCode () + { + return TypeCode.UInt32; + } + + public static uint Parse (string s) + { + // TODO: Implement me + return 0; + } + + public static uint Parse (string s, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public static uint Parse (string s, NumberStyles style, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public override string ToString () + { + // TODO: Implement me + + return ""; + } + + public string ToString (IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format, IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + } +} diff --git a/mcs/class/corlib/System/UInt64.cs b/mcs/class/corlib/System/UInt64.cs new file mode 100644 index 00000000000..1008bbe684d --- /dev/null +++ b/mcs/class/corlib/System/UInt64.cs @@ -0,0 +1,95 @@ +// +// System.UInt64.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +using System.Globalization; + +namespace System { + + public struct UInt64 : IComparable, IFormattable { + public const ulong MinValue = 0; + public const ulong MaxValue = 0xffffffffffffffff; + + public ulong value; + + public int CompareTo (object v) + { + if (!(v is System.UInt64)) + throw new ArgumentException ("Value is not a System.UInt64"); + + if (value == (ulong) v) + return 0; + + if (value < (ulong) v) + return -1; + + return 1; + } + + public override bool Equals (object o) + { + if (!(o is System.UInt64)) + return false; + + return ((ulong) o) == value; + } + + public override int GetHashCode () + { + return (int)(value & 0xffffffff) ^ (int)(value >> 32); + } + + public TypeCode GetTypeCode () + { + return TypeCode.UInt64; + } + + public static ulong Parse (string s) + { + // TODO: Implement me + return 0; + } + + public static ulong Parse (string s, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public static ulong Parse (string s, NumberStyles style, IFormatProvider fp) + { + // TODO: Implement me + return 0; + } + + public override string ToString () + { + // TODO: Implement me + + return ""; + } + + public string ToString (IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format) + { + // TODO: Implement me. + return ""; + } + + public string ToString (string format, IFormatProvider fp) + { + // TODO: Implement me. + return ""; + } + } +} diff --git a/mcs/class/corlib/System/ValueType.cs b/mcs/class/corlib/System/ValueType.cs new file mode 100644 index 00000000000..1781418e2d5 --- /dev/null +++ b/mcs/class/corlib/System/ValueType.cs @@ -0,0 +1,66 @@ +// +// System.ValueType.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public abstract class ValueType { + + // <summary> + // ValueType constructor + // </summary> + protected ValueType () + { + } + + // <summary> + // True if this instance and o represent the same type + // and have the same value. + // </summary> + public override bool Equals (object o) + { + if (o == null){ + throw new ArgumentNullException ("Null argument to Equals"); + } + + if (o.GetType() != this.GetType()) + return false; + + // TODO: + // Now implement bit compare here. + + // TODO: Implement me! + return false; + } + + // <summary> + // Gets a hashcode for this value type using the + // bits in the structure + // </summary> + public override int GetHashCode () + { + if (this == null) + return 0; + + // TODO: compute a hashcode based on the actual + // contents. + + return 0; + } + + // <summary> + // Stringified representation of this ValueType. + // Must be overriden for better results, by default + // it just returns the Type name. + // </summary> + public override string ToString () + { + return GetType().FullName; + } + } +} diff --git a/mcs/class/corlib/System/Version.cs b/mcs/class/corlib/System/Version.cs new file mode 100644 index 00000000000..e3919fa682e --- /dev/null +++ b/mcs/class/corlib/System/Version.cs @@ -0,0 +1,200 @@ +// +// System.Version.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public class Version : ICloneable, IComparable { + int major, minor, build, revision; + + const int MAXINT = int.MaxValue; + + public Version (string version) + { + int n; + string [] vals = version.Split (new Char [] {'.'}); + + n = vals.Length; + if (n > 0) + major = int.Parse (vals [0]); + if (n > 1) + minor = int.Parse (vals [1]); + if (n > 2) + build = int.Parse (vals [2]); + if (n > 3) + build = int.Parse (vals [3]); + } + + public Version (int major, int minor) + { + this.major = major; + this.minor = minor; + this.build = MAXINT; + this.revision = MAXINT; + } + + public Version (int major, int minor, int build) + { + this.major = major; + this.minor = minor; + this.build = build; + this.revision = MAXINT; + } + + public Version (int major, int minor, int build, int revision) + { + this.major = major; + this.minor = minor; + this.build = build; + this.revision = revision; + } + + public int Build { + get { + return build; + } + } + + public int Major { + get { + return major; + } + } + + public int Minor { + get { + return minor; + } + } + + public int Revision { + get { + return revision; + } + } + + public object Clone () + { + return new Version (major, minor, build, revision); + } + + public int CompareTo (object version) + { + Version v; + + if (version == null) + throw new ArgumentNullException ("version"); + if (! (version is Version)) + throw new ArgumentException ("version"); + + v = version as Version; + + if (this.major > v.major) + return 1; + else if (this.major < v.major) + return -1; + + if (this.minor > v.minor) + return 1; + else if (this.minor < this.minor) + return -1; + + if (this.build > v.build) + return 1; + else if (this.build < this.build) + return -1; + + // FIXME: Compare revision or build first? + if (this.revision > v.revision) + return 1; + else if (this.revision < v.revision) + return -1; + + return 0; + } + + public override bool Equals (object obj) + { + Version x; + + if (obj == null) + throw new ArgumentNullException ("obj"); + if (!(obj is Version)) + return false; + + x = (Version) obj; + + if ((x.major == major) && + (x.minor == minor) && + (x.build == build) && + (x.revision == revision)) + return true; + return false; + } + + // <summary> + // This is sort of lame: the documentation claims that the + // return value is a 32-bit integer, but "int" can be 64 + // on Alphas for example. + // </summary> + public override int GetHashCode () + { + return (revision << 24) | (build << 16) | (minor << 8) | major; + } + + // <summary> + // Returns a stringified representation of the version, format: + // major.minor[.build[.revision]] + // </summary> + public override string ToString () + { + string mm = major.ToString () + "." + minor.ToString (); + + if (build != MAXINT) + mm = mm + "." + build.ToString (); + if (revision != MAXINT) + mm = mm + "." + revision.ToString (); + + return mm; + } + + // <summary> + // LAME: This API is lame, since there is no way of knowing + // how many fields a Version object has, it is unfair to throw + // an ArgumentException, but this is what the spec claims. + // + // ie, Version a = new Version (1, 2); a.ToString (3) should + // throw the expcetion. + // </summary> + public string ToString (int fields) + { + if (fields == 0) + return ""; + if (fields == 1) + return major.ToString (); + if (fields == 2) + return major.ToString () + "." + minor.ToString (); + if (fields == 3){ + if (build == MAXINT) + throw new ArgumentException ("fields is larger than the number of components defined in this instance"); + return major.ToString () + "." + minor.ToString () + "." + + build.ToString (); + } + if (fields == 4){ + if (build == MAXINT || revision == MAXINT) + throw new ArgumentException ("fields is larger than the number of components defined in this instance"); + return major.ToString () + "." + minor.ToString () + "." + + build.ToString () + "." + revision.ToString (); + } + throw new ArgumentException ("Invalid fields parameter: " + fields.ToString()); + } + } +} + + + diff --git a/mcs/class/corlib/System/Void.cs b/mcs/class/corlib/System/Void.cs new file mode 100644 index 00000000000..1ad4e1c5b2c --- /dev/null +++ b/mcs/class/corlib/System/Void.cs @@ -0,0 +1,14 @@ +// +// System.Void.cs +// +// Author: +// Miguel de Icaza (miguel@ximian.com) +// +// (C) Ximian, Inc. http://www.ximian.com +// + +namespace System { + + public struct Void { + } +} diff --git a/mcs/class/corlib/makefile b/mcs/class/corlib/makefile new file mode 100644 index 00000000000..cda54a52244 --- /dev/null +++ b/mcs/class/corlib/makefile @@ -0,0 +1,4 @@ +all: windows + +windows: + $(csc) /target:library /out:corlib.dll /nowarn:1595 /recurse:*.cs diff --git a/mcs/class/makefile b/mcs/class/makefile new file mode 100644 index 00000000000..30b93f02bb8 --- /dev/null +++ b/mcs/class/makefile @@ -0,0 +1,9 @@ +SUBDIRS=corlib System +csc=/c/winnt/microsoft.net/framework/v1.0.2914/csc.exe + +all: windows + +windows: + for subdir in $(SUBDIRS); do \ + cd $$subdir; csc=$(csc) make windows; cd ..; \ + done; diff --git a/mcs/class/notes/BitVecto32.txt b/mcs/class/notes/BitVecto32.txt new file mode 100644 index 00000000000..fad747dfe76 --- /dev/null +++ b/mcs/class/notes/BitVecto32.txt @@ -0,0 +1,6 @@ +* Why does CreateSection take a short for the range number? + + It would seem like it should be possible to have numbers between 0 + and UInt32.MaxValue in there. Why is the API limiting things to 16 + bits? + diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog index 202a33903dc..547dd70354d 100755 --- a/mcs/mcs/ChangeLog +++ b/mcs/mcs/ChangeLog @@ -1,3 +1,21 @@ +2001-07-13 Simon Cozens <simon@simon-cozens.org> + + * cs-parser.jay (rank_specifier): Remove a conflict by reordering + the + + (unary_expression): Expand pre_increment_expression and + post_decrement_expression to reduce a shift/reduce. + +2001-07-11 Simon Cozens + + * cs-tokenizer.cs: Hex numbers should begin with a 0. + + Improve allow_keyword_as_indent name. + +2001-06-19 Miguel de Icaza <miguel@ximian.com> + + * Adjustments for Beta2. + 2001-06-13 Miguel de Icaza <miguel@ximian.com> * decl.cs: Added `Define' abstract method. diff --git a/mcs/mcs/cs-parser.cs b/mcs/mcs/cs-parser.cs index 90add9f4dd5..89ab3318e1c 100755 --- a/mcs/mcs/cs-parser.cs +++ b/mcs/mcs/cs-parser.cs @@ -33,14 +33,13 @@ using System; namespace CSC
{
using System.Collections;
- using Compiler;
using CSC;
using CIR;
/// <summary>
/// The C# Parser
/// </summary>
- public class CSharpParser : Parser {
+ public class CSharpParser {
static int global_errors;
Namespace current_namespace;
@@ -77,7 +76,19 @@ namespace CSC // Here we keep track of type references.
// </summary>
TypeRefManager type_references;
-#line 81 "-" +
+ // <summary>
+ // Used to record all types defined
+ // </summary>
+ CIR.Tree tree;
+
+ // Name of the file we are parsing
+ public string name;
+
+ // Input stream to parse from.
+ public System.IO.Stream input;
+
+#line 92 "-" /** simplified error message. @see <a href="#yyerror(java.lang.String, java.lang.String[])">yyerror</a> @@ -143,10 +154,7 @@ namespace CSC "type_declaration : enum_declaration", "type_declaration : delegate_declaration", "opt_attributes :", - "opt_attributes : attributes", - "attributes : attribute_sections", - "attribute_sections : attribute_section", - "attribute_sections : attribute_sections attribute_section", + "opt_attributes : attribute_section opt_attributes", "attribute_section : OPEN_BRACKET opt_attribute_target_specifier attribute_list CLOSE_BRACKET", "opt_attribute_target_specifier :", "opt_attribute_target_specifier : attribute_target_specifier", @@ -415,7 +423,7 @@ namespace CSC "opt_rank_specifier :", "opt_rank_specifier : rank_specifiers", "rank_specifiers : rank_specifier", - "rank_specifiers : rank_specifiers rank_specifier", + "rank_specifiers : rank_specifier rank_specifiers", "rank_specifier : OPEN_BRACKET opt_dim_separators CLOSE_BRACKET", "opt_dim_separators :", "opt_dim_separators : dim_separators", @@ -842,46 +850,46 @@ namespace CSC yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]); switch (yyN) { case 1: -#line 240 "cs-parser.jay" +#line 251 "cs-parser.jay" {
/* At some point check that using only comes *before* any namespaces
*/ } break; case 6: -#line 257 "cs-parser.jay" +#line 268 "cs-parser.jay" {
} break; case 7: -#line 263 "cs-parser.jay" +#line 274 "cs-parser.jay" {
current_namespace.Using ((string) yyVals[-1+yyTop]);
} break; case 10: -#line 274 "cs-parser.jay" +#line 285 "cs-parser.jay" {
current_namespace = new Namespace (current_namespace, (string) yyVals[0+yyTop]);
} break; case 11: -#line 278 "cs-parser.jay" +#line 289 "cs-parser.jay" {
current_namespace = current_namespace.Parent;
} break; case 17: -#line 295 "cs-parser.jay" +#line 306 "cs-parser.jay" {
yyVal = ((yyVals[-2+yyTop]).ToString ()) + "." + (yyVals[0+yyTop].ToString ()); } break; case 19: -#line 308 "cs-parser.jay" +#line 319 "cs-parser.jay" {
} break; case 26: -#line 329 "cs-parser.jay" +#line 340 "cs-parser.jay" {
int mod_flags = 0;
string name = "";
@@ -905,19 +913,19 @@ case 26: /*}
*/ } break; -case 42: -#line 396 "cs-parser.jay" +case 39: +#line 398 "cs-parser.jay" {
/* if (Collection.Contains ($$))... FIXME
*/ note ("Allows: assembly, field, method, module, param, property, type");
} break; -case 49: -#line 415 "cs-parser.jay" +case 46: +#line 417 "cs-parser.jay" { /* reserved attribute name or identifier: 17.4 */ } break; -case 73: -#line 471 "cs-parser.jay" +case 70: +#line 473 "cs-parser.jay" {
Struct new_struct;
string full_struct_name = MakeName ((string) yyVals[0+yyTop]);
@@ -925,10 +933,11 @@ case 73: new_struct = new Struct (current_container, full_struct_name, (int) yyVals[-2+yyTop]);
current_container = new_struct;
current_container.Namespace = current_namespace;
+ tree.RecordType (full_struct_name, new_struct);
} break; -case 74: -#line 482 "cs-parser.jay" +case 71: +#line 485 "cs-parser.jay" {
Struct new_struct = (Struct) current_container;
@@ -937,8 +946,8 @@ case 74: yyVal = new_struct;
} break; -case 94: -#line 538 "cs-parser.jay" +case 91: +#line 541 "cs-parser.jay" {
Modifiers.Check (Constant.AllowedModifiers, (int) yyVals[-4+yyTop], Modifiers.PRIVATE);
@@ -951,30 +960,30 @@ case 94: }
} break; -case 95: -#line 553 "cs-parser.jay" +case 92: +#line 556 "cs-parser.jay" {
ArrayList constants = new ArrayList ();
constants.Add (yyVals[0+yyTop]);
yyVal = constants;
} break; -case 96: -#line 559 "cs-parser.jay" +case 93: +#line 562 "cs-parser.jay" {
ArrayList constants = (ArrayList) yyVals[-2+yyTop];
constants.Add (yyVals[0+yyTop]);
} break; -case 97: -#line 567 "cs-parser.jay" +case 94: +#line 570 "cs-parser.jay" {
yyVal = new DictionaryEntry (yyVals[-2+yyTop], yyVals[0+yyTop]);
} break; -case 98: -#line 578 "cs-parser.jay" +case 95: +#line 581 "cs-parser.jay" {
TypeRef typeref = (TypeRef) yyVals[-2+yyTop];
int mod = (int) yyVals[-3+yyTop];
@@ -987,36 +996,36 @@ case 98: }
} break; -case 99: -#line 594 "cs-parser.jay" +case 96: +#line 597 "cs-parser.jay" {
ArrayList decl = new ArrayList ();
yyVal = decl;
decl.Add (yyVals[0+yyTop]);
} break; -case 100: -#line 600 "cs-parser.jay" +case 97: +#line 603 "cs-parser.jay" {
ArrayList decls = (ArrayList) yyVals[-2+yyTop];
decls.Add (yyVals[0+yyTop]);
yyVal = yyVals[-2+yyTop];
} break; -case 101: -#line 609 "cs-parser.jay" +case 98: +#line 612 "cs-parser.jay" {
yyVal = new VariableDeclaration ((string) yyVals[-2+yyTop], yyVals[0+yyTop]);
} break; -case 102: -#line 613 "cs-parser.jay" +case 99: +#line 616 "cs-parser.jay" {
yyVal = new VariableDeclaration ((string) yyVals[0+yyTop], null);
} break; -case 105: -#line 626 "cs-parser.jay" +case 102: +#line 629 "cs-parser.jay" {
Method method = (Method) yyVals[-1+yyTop];
@@ -1026,8 +1035,8 @@ case 105: current_local_parameters = null;
} break; -case 106: -#line 642 "cs-parser.jay" +case 103: +#line 645 "cs-parser.jay" {
Method method = new Method ((TypeRef) yyVals[-4+yyTop], (int) yyVals[-5+yyTop], (string) yyVals[-3+yyTop], (Parameters) yyVals[-1+yyTop]);
@@ -1036,8 +1045,8 @@ case 106: yyVal = method;
} break; -case 107: -#line 654 "cs-parser.jay" +case 104: +#line 657 "cs-parser.jay" {
Method method = new Method (type ("void"), (int) yyVals[-5+yyTop], (string) yyVals[-3+yyTop], (Parameters) yyVals[-1+yyTop]);
@@ -1045,83 +1054,83 @@ case 107: yyVal = method;
} break; -case 109: -#line 664 "cs-parser.jay" +case 106: +#line 667 "cs-parser.jay" { yyVal = null; } break; -case 110: -#line 668 "cs-parser.jay" +case 107: +#line 671 "cs-parser.jay" { yyVal = new Parameters (null, null); } break; -case 112: -#line 674 "cs-parser.jay" +case 109: +#line 677 "cs-parser.jay" {
yyVal = new Parameters ((ParameterCollection) yyVals[0+yyTop], null);
} break; -case 113: -#line 678 "cs-parser.jay" +case 110: +#line 681 "cs-parser.jay" {
yyVal = new Parameters ((ParameterCollection) yyVals[-2+yyTop], (Parameter) yyVals[0+yyTop]);
} break; -case 114: -#line 682 "cs-parser.jay" +case 111: +#line 685 "cs-parser.jay" {
yyVal = new Parameters (null, (Parameter) yyVals[0+yyTop]);
} break; -case 115: -#line 689 "cs-parser.jay" +case 112: +#line 692 "cs-parser.jay" {
ParameterCollection pars = new ParameterCollection ();
pars.Add ((Parameter) yyVals[0+yyTop]);
yyVal = pars;
} break; -case 116: -#line 695 "cs-parser.jay" +case 113: +#line 698 "cs-parser.jay" {
ParameterCollection pars = (ParameterCollection) yyVals[-2+yyTop];
pars.Add ((Parameter) yyVals[0+yyTop]);
yyVal = yyVals[-2+yyTop];
} break; -case 117: -#line 707 "cs-parser.jay" +case 114: +#line 710 "cs-parser.jay" {
yyVal = new Parameter ((TypeRef) yyVals[-1+yyTop], (string) yyVals[0+yyTop], (Parameter.Modifier) yyVals[-2+yyTop]);
} break; -case 118: -#line 713 "cs-parser.jay" +case 115: +#line 716 "cs-parser.jay" { yyVal = Parameter.Modifier.NONE; } break; -case 120: -#line 718 "cs-parser.jay" +case 117: +#line 721 "cs-parser.jay" { yyVal = Parameter.Modifier.REF; } break; -case 121: -#line 719 "cs-parser.jay" +case 118: +#line 722 "cs-parser.jay" { yyVal = Parameter.Modifier.OUT; } break; -case 122: -#line 724 "cs-parser.jay" +case 119: +#line 727 "cs-parser.jay" {
yyVal = new Parameter ((TypeRef) yyVals[-1+yyTop], (string) yyVals[0+yyTop], Parameter.Modifier.PARAMS);
note ("type must be a single-dimension array type");
} break; -case 123: -#line 731 "cs-parser.jay" +case 120: +#line 734 "cs-parser.jay" { yyVal = yyVals[0+yyTop].ToString (); } break; -case 124: -#line 732 "cs-parser.jay" +case 121: +#line 735 "cs-parser.jay" { yyVal = yyVals[-2+yyTop].ToString () + "." + yyVals[0+yyTop].ToString (); } break; -case 125: -#line 740 "cs-parser.jay" +case 122: +#line 743 "cs-parser.jay" {
Parameter implicit_value_parameter;
implicit_value_parameter = new Parameter ((TypeRef) yyVals[-2+yyTop], "value", Parameter.Modifier.NONE);
@@ -1132,14 +1141,14 @@ case 125: implicit_value_parameters.Add (implicit_value_parameter);
} break; -case 126: -#line 750 "cs-parser.jay" +case 123: +#line 753 "cs-parser.jay" {
lexer.properties = false;
} break; -case 127: -#line 754 "cs-parser.jay" +case 124: +#line 757 "cs-parser.jay" {
Property prop;
DictionaryEntry pair = (DictionaryEntry) yyVals[-2+yyTop];
@@ -1157,51 +1166,51 @@ case 127: implicit_value_parameters = null;
} break; -case 128: -#line 774 "cs-parser.jay" +case 125: +#line 777 "cs-parser.jay" {
yyVal = new DictionaryEntry (yyVals[-1+yyTop], yyVals[0+yyTop]);
} break; -case 129: -#line 778 "cs-parser.jay" +case 126: +#line 781 "cs-parser.jay" {
yyVal = new DictionaryEntry (yyVals[0+yyTop], yyVals[-1+yyTop]);
} break; -case 130: -#line 784 "cs-parser.jay" +case 127: +#line 787 "cs-parser.jay" { yyVal = null; } break; -case 132: -#line 789 "cs-parser.jay" +case 129: +#line 792 "cs-parser.jay" { yyVal = null; } break; -case 134: -#line 795 "cs-parser.jay" +case 131: +#line 798 "cs-parser.jay" {
yyVal = yyVals[0+yyTop];
} break; -case 135: -#line 802 "cs-parser.jay" +case 132: +#line 805 "cs-parser.jay" {
current_local_parameters = new Parameters (implicit_value_parameters, null);
} break; -case 136: -#line 806 "cs-parser.jay" +case 133: +#line 809 "cs-parser.jay" {
yyVal = yyVals[0+yyTop];
current_local_parameters = null;
} break; -case 138: -#line 814 "cs-parser.jay" +case 135: +#line 817 "cs-parser.jay" { yyVal = new Block (null); } break; -case 139: -#line 821 "cs-parser.jay" +case 136: +#line 824 "cs-parser.jay" {
Interface new_interface;
string full_interface_name = MakeName ((string) yyVals[0+yyTop]);
@@ -1210,10 +1219,11 @@ case 139: if (current_interface != null)
error (-2, "Internal compiler error: interface inside interface");
current_interface = new_interface;
+ tree.RecordType (full_interface_name, new_interface);
} break; -case 140: -#line 832 "cs-parser.jay" +case 137: +#line 836 "cs-parser.jay" {
Interface new_interface = (Interface) current_interface;
@@ -1224,92 +1234,92 @@ case 140: CheckDef (current_container.AddInterface (new_interface), new_interface.Name);
} break; -case 141: -#line 844 "cs-parser.jay" +case 138: +#line 848 "cs-parser.jay" { yyVal = null; } break; -case 143: -#line 849 "cs-parser.jay" +case 140: +#line 853 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 144: -#line 854 "cs-parser.jay" +case 141: +#line 858 "cs-parser.jay" {
ArrayList interfaces = new ArrayList ();
interfaces.Add (yyVals[0+yyTop]);
} break; -case 145: -#line 860 "cs-parser.jay" +case 142: +#line 864 "cs-parser.jay" {
ArrayList interfaces = (ArrayList) yyVals[-2+yyTop];
interfaces.Add (yyVals[0+yyTop]);
yyVal = interfaces;
} break; -case 151: -#line 885 "cs-parser.jay" +case 148: +#line 889 "cs-parser.jay" {
InterfaceMethod m = (InterfaceMethod) yyVals[0+yyTop];
CheckDef (current_interface.AddMethod (m), m.Name);
} break; -case 152: -#line 891 "cs-parser.jay" +case 149: +#line 895 "cs-parser.jay" {
InterfaceProperty p = (InterfaceProperty) yyVals[0+yyTop];
CheckDef (current_interface.AddProperty (p), p.Name);
} break; -case 153: -#line 897 "cs-parser.jay" +case 150: +#line 901 "cs-parser.jay" {
InterfaceEvent e = (InterfaceEvent) yyVals[0+yyTop];
CheckDef (current_interface.AddEvent (e), e.Name);
} break; -case 154: -#line 903 "cs-parser.jay" +case 151: +#line 907 "cs-parser.jay" {
InterfaceIndexer i = (InterfaceIndexer) yyVals[0+yyTop];
CheckDef (current_interface.AddIndexer (i), "indexer");
} break; -case 155: -#line 911 "cs-parser.jay" +case 152: +#line 915 "cs-parser.jay" { yyVal = false; } break; -case 156: -#line 912 "cs-parser.jay" +case 153: +#line 916 "cs-parser.jay" { yyVal = true; } break; -case 157: -#line 919 "cs-parser.jay" +case 154: +#line 923 "cs-parser.jay" {
yyVal = new InterfaceMethod ((TypeRef) yyVals[-5+yyTop], (string) yyVals[-4+yyTop], (bool) yyVals[-6+yyTop], (Parameters) yyVals[-2+yyTop]);
} break; -case 158: -#line 925 "cs-parser.jay" +case 155: +#line 929 "cs-parser.jay" {
yyVal = new InterfaceMethod (type ("void"), (string) yyVals[-4+yyTop], (bool) yyVals[-6+yyTop], (Parameters) yyVals[-2+yyTop]);
} break; -case 159: -#line 935 "cs-parser.jay" +case 156: +#line 939 "cs-parser.jay" { lexer.properties = true; } break; -case 160: -#line 937 "cs-parser.jay" +case 157: +#line 941 "cs-parser.jay" { lexer.properties = false; } break; -case 161: -#line 939 "cs-parser.jay" +case 158: +#line 943 "cs-parser.jay" {
int gs = (int) yyVals[-2+yyTop];
@@ -1317,38 +1327,38 @@ case 161: (gs & 1) == 1, (gs & 2) == 2);
} break; -case 162: -#line 948 "cs-parser.jay" +case 159: +#line 952 "cs-parser.jay" { yyVal = 1; } break; -case 163: -#line 949 "cs-parser.jay" +case 160: +#line 953 "cs-parser.jay" { yyVal = 2; } break; -case 164: -#line 951 "cs-parser.jay" +case 161: +#line 955 "cs-parser.jay" { yyVal = 3; } break; -case 165: -#line 953 "cs-parser.jay" +case 162: +#line 957 "cs-parser.jay" { yyVal = 3; } break; -case 166: -#line 958 "cs-parser.jay" +case 163: +#line 962 "cs-parser.jay" {
yyVal = new InterfaceEvent ((TypeRef) yyVals[-2+yyTop], (string) yyVals[-1+yyTop], (bool) yyVals[-4+yyTop]);
} break; -case 167: -#line 967 "cs-parser.jay" +case 164: +#line 971 "cs-parser.jay" { lexer.properties = true; } break; -case 168: -#line 969 "cs-parser.jay" +case 165: +#line 973 "cs-parser.jay" { lexer.properties = false; } break; -case 169: -#line 971 "cs-parser.jay" +case 166: +#line 975 "cs-parser.jay" {
int a_flags = (int) yyVals[-2+yyTop];
@@ -1358,28 +1368,28 @@ case 169: yyVal = new InterfaceIndexer ((TypeRef) yyVals[-9+yyTop], (Parameters) yyVals[-6+yyTop], do_get, do_set, (bool) yyVals[-10+yyTop]);
} break; -case 170: -#line 983 "cs-parser.jay" +case 167: +#line 987 "cs-parser.jay" {
/* FIXME: validate that opt_modifiers is exactly: PUBLIC and STATIC
*/ } break; -case 171: -#line 991 "cs-parser.jay" +case 168: +#line 995 "cs-parser.jay" {
/* FIXME: since reduce/reduce on this
*/ /* rule, validate overloadable_operator is unary
*/ } break; -case 172: -#line 1000 "cs-parser.jay" +case 169: +#line 1004 "cs-parser.jay" {
/* FIXME: because of the reduce/reduce on PLUS and MINUS
*/ /* validate overloadable_operator is binary
*/ } break; -case 198: -#line 1045 "cs-parser.jay" +case 195: +#line 1049 "cs-parser.jay" {
Constructor c = (Constructor) yyVals[-1+yyTop];
c.Block = (Block) yyVals[0+yyTop];
@@ -1395,8 +1405,8 @@ case 198: current_local_parameters = null;
} break; -case 199: -#line 1065 "cs-parser.jay" +case 196: +#line 1069 "cs-parser.jay" {
ConstructorInitializer i = null;
@@ -1408,24 +1418,24 @@ case 199: current_local_parameters = (Parameters) yyVals[-2+yyTop];
} break; -case 200: -#line 1078 "cs-parser.jay" +case 197: +#line 1082 "cs-parser.jay" { yyVal = null; } break; -case 202: -#line 1084 "cs-parser.jay" +case 199: +#line 1088 "cs-parser.jay" {
yyVal = new ConstructorBaseInitializer ((ArrayList) yyVals[-1+yyTop]);
} break; -case 203: -#line 1088 "cs-parser.jay" +case 200: +#line 1092 "cs-parser.jay" {
yyVal = new ConstructorThisInitializer ((ArrayList) yyVals[-1+yyTop]);
} break; -case 204: -#line 1095 "cs-parser.jay" +case 201: +#line 1099 "cs-parser.jay" {
Method d = new Method (type ("void"), 0, "Finalize", new Parameters (null, null));
@@ -1433,24 +1443,24 @@ case 204: CheckDef (current_container.AddMethod (d), d.Name);
} break; -case 205: -#line 1107 "cs-parser.jay" +case 202: +#line 1111 "cs-parser.jay" { note ("validate that the flags only contain new public protected internal private static virtual sealed override abstract"); } break; -case 206: -#line 1112 "cs-parser.jay" +case 203: +#line 1116 "cs-parser.jay" { note ("validate that the flags only contain new public protected internal private static virtual sealed override abstract"); } break; -case 211: -#line 1131 "cs-parser.jay" +case 208: +#line 1135 "cs-parser.jay" {
/* The signature is computed from the signature of the indexer. Look
*/ /* at section 3.6 on the spec
*/ note ("verify modifiers are NEW PUBLIC PROTECTED INTERNAL PRIVATE VIRTUAL SEALED OVERRIDE ABSTRACT");
} break; -case 214: -#line 1150 "cs-parser.jay" +case 211: +#line 1154 "cs-parser.jay" {
string name = (string) yyVals[-3+yyTop];
Enum e = new Enum ((TypeRef) yyVals[-2+yyTop], (int) yyVals[-5+yyTop], name);
@@ -1466,36 +1476,36 @@ case 214: CheckDef (current_container.AddEnum (e), name);
} break; -case 215: -#line 1167 "cs-parser.jay" +case 212: +#line 1171 "cs-parser.jay" { yyVal = type ("System.Int32"); } break; -case 216: -#line 1168 "cs-parser.jay" +case 213: +#line 1172 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 217: -#line 1173 "cs-parser.jay" +case 214: +#line 1177 "cs-parser.jay" {
yyVal = yyVals[-1+yyTop];
} break; -case 218: -#line 1177 "cs-parser.jay" +case 215: +#line 1181 "cs-parser.jay" {
yyVal = yyVals[-2+yyTop];
} break; -case 219: -#line 1183 "cs-parser.jay" +case 216: +#line 1187 "cs-parser.jay" { yyVal = new ArrayList (); } break; -case 220: -#line 1184 "cs-parser.jay" +case 217: +#line 1188 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 221: -#line 1189 "cs-parser.jay" +case 218: +#line 1193 "cs-parser.jay" {
ArrayList l = new ArrayList ();
@@ -1503,8 +1513,8 @@ case 221: yyVal = l;
} break; -case 222: -#line 1196 "cs-parser.jay" +case 219: +#line 1200 "cs-parser.jay" {
ArrayList l = (ArrayList) yyVals[-2+yyTop];
@@ -1513,24 +1523,24 @@ case 222: yyVal = l;
} break; -case 223: -#line 1207 "cs-parser.jay" +case 220: +#line 1211 "cs-parser.jay" {
yyVal = new VariableDeclaration ((string) yyVals[0+yyTop], null);
} break; -case 224: -#line 1211 "cs-parser.jay" +case 221: +#line 1215 "cs-parser.jay" {
yyVal = new VariableDeclaration ((string) yyVals[-2+yyTop], yyVals[0+yyTop]);
} break; -case 225: -#line 1224 "cs-parser.jay" +case 222: +#line 1228 "cs-parser.jay" { note ("validate that modifiers only contains NEW PUBLIC PROTECTED INTERNAL PRIVATE"); } break; -case 228: -#line 1242 "cs-parser.jay" +case 225: +#line 1246 "cs-parser.jay" { /* class_type */
/*
This does interfaces, delegates, struct_types, class_types,
@@ -1539,8 +1549,8 @@ case 228: yyVal = type ((string) yyVals[0+yyTop]);
} break; -case 231: -#line 1255 "cs-parser.jay" +case 228: +#line 1259 "cs-parser.jay" {
ArrayList types = new ArrayList ();
@@ -1548,90 +1558,90 @@ case 231: yyVal = types;
} break; -case 232: -#line 1262 "cs-parser.jay" +case 229: +#line 1266 "cs-parser.jay" {
ArrayList types = new ArrayList ();
types.Add (yyVals[0+yyTop]);
yyVal = types;
} break; -case 233: -#line 1274 "cs-parser.jay" +case 230: +#line 1278 "cs-parser.jay" { yyVal = type ("System.Object"); } break; -case 234: -#line 1275 "cs-parser.jay" +case 231: +#line 1279 "cs-parser.jay" { yyVal = type ("System.String"); } break; -case 235: -#line 1276 "cs-parser.jay" +case 232: +#line 1280 "cs-parser.jay" { yyVal = type ("System.Boolean"); } break; -case 236: -#line 1277 "cs-parser.jay" +case 233: +#line 1281 "cs-parser.jay" { yyVal = type ("System.Decimal"); } break; -case 237: -#line 1278 "cs-parser.jay" +case 234: +#line 1282 "cs-parser.jay" { yyVal = type ("System.Single"); } break; -case 238: -#line 1279 "cs-parser.jay" +case 235: +#line 1283 "cs-parser.jay" { yyVal = type ("System.Double"); } break; -case 240: -#line 1284 "cs-parser.jay" +case 237: +#line 1288 "cs-parser.jay" { yyVal = type ("System.SByte"); } break; -case 241: -#line 1285 "cs-parser.jay" +case 238: +#line 1289 "cs-parser.jay" { yyVal = type ("System.Byte"); } break; -case 242: -#line 1286 "cs-parser.jay" +case 239: +#line 1290 "cs-parser.jay" { yyVal = type ("System.Int16"); } break; -case 243: -#line 1287 "cs-parser.jay" +case 240: +#line 1291 "cs-parser.jay" { yyVal = type ("System.UInt16"); } break; -case 244: -#line 1288 "cs-parser.jay" +case 241: +#line 1292 "cs-parser.jay" { yyVal = type ("System.Int32"); } break; -case 245: -#line 1289 "cs-parser.jay" +case 242: +#line 1293 "cs-parser.jay" { yyVal = type ("System.UInt32"); } break; -case 246: -#line 1290 "cs-parser.jay" +case 243: +#line 1294 "cs-parser.jay" { yyVal = type ("System.Int64"); } break; -case 247: -#line 1291 "cs-parser.jay" +case 244: +#line 1295 "cs-parser.jay" { yyVal = type ("System.UInt64"); } break; -case 248: -#line 1292 "cs-parser.jay" +case 245: +#line 1296 "cs-parser.jay" { yyVal = type ("System.Char"); } break; -case 250: -#line 1301 "cs-parser.jay" +case 247: +#line 1305 "cs-parser.jay" {
yyVal = yyVals[-1+yyTop];
/* FIXME: We need to create a type for the nested thing.
*/ } break; -case 251: -#line 1312 "cs-parser.jay" +case 248: +#line 1316 "cs-parser.jay" {
/* 7.5.1: Literals
*/ } break; -case 252: -#line 1318 "cs-parser.jay" +case 249: +#line 1322 "cs-parser.jay" {
string name = (string) yyVals[0+yyTop];
@@ -1656,60 +1666,60 @@ case 252: yyVal = new SimpleName (name);
} break; -case 269: -#line 1360 "cs-parser.jay" +case 266: +#line 1364 "cs-parser.jay" { yyVal = new CharLiteral ((char) lexer.Value); } break; -case 270: -#line 1361 "cs-parser.jay" +case 267: +#line 1365 "cs-parser.jay" { yyVal = new StringLiteral ((string) lexer.Value); } break; -case 271: -#line 1362 "cs-parser.jay" +case 268: +#line 1366 "cs-parser.jay" { yyVal = new NullLiteral (); } break; -case 272: -#line 1366 "cs-parser.jay" +case 269: +#line 1370 "cs-parser.jay" { yyVal = new FloatLiteral ((float) lexer.Value); } break; -case 273: -#line 1367 "cs-parser.jay" +case 270: +#line 1371 "cs-parser.jay" { yyVal = new DoubleLiteral ((double) lexer.Value); } break; -case 274: -#line 1368 "cs-parser.jay" +case 271: +#line 1372 "cs-parser.jay" { yyVal = new DecimalLiteral ((decimal) lexer.Value); } break; -case 275: -#line 1372 "cs-parser.jay" +case 272: +#line 1376 "cs-parser.jay" { yyVal = new IntLiteral ((Int32) lexer.Value); } break; -case 276: -#line 1376 "cs-parser.jay" +case 273: +#line 1380 "cs-parser.jay" { yyVal = new BoolLiteral (true); } break; -case 277: -#line 1377 "cs-parser.jay" +case 274: +#line 1381 "cs-parser.jay" { yyVal = new BoolLiteral (false); } break; -case 278: -#line 1382 "cs-parser.jay" +case 275: +#line 1386 "cs-parser.jay" { yyVal = yyVals[-1+yyTop]; } break; -case 279: -#line 1387 "cs-parser.jay" +case 276: +#line 1391 "cs-parser.jay" {
yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], (string) yyVals[0+yyTop]);
} break; -case 280: -#line 1391 "cs-parser.jay" +case 277: +#line 1395 "cs-parser.jay" {
yyVal = new BuiltinTypeAccess ((TypeRef) yyVals[-2+yyTop], (string) yyVals[0+yyTop]);
} break; -case 282: -#line 1402 "cs-parser.jay" +case 279: +#line 1406 "cs-parser.jay" {
/* FIXME:
*/ /* if $1 is MethodGroup
*/ @@ -1722,80 +1732,80 @@ case 282: yyVal = new Invocation ((Expression) yyVals[-3+yyTop], (ArrayList) yyVals[-1+yyTop]);
} break; -case 283: -#line 1416 "cs-parser.jay" +case 280: +#line 1420 "cs-parser.jay" { yyVal = new ArrayList (); } break; -case 285: -#line 1422 "cs-parser.jay" +case 282: +#line 1426 "cs-parser.jay" {
ArrayList list = new ArrayList ();
list.Add (yyVals[0+yyTop]);
yyVal = list;
} break; -case 286: -#line 1428 "cs-parser.jay" +case 283: +#line 1432 "cs-parser.jay" {
ArrayList list = (ArrayList) yyVals[-2+yyTop];
list.Add (yyVals[0+yyTop]);
yyVal = list;
} break; -case 287: -#line 1437 "cs-parser.jay" +case 284: +#line 1441 "cs-parser.jay" {
yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Expression);
} break; -case 288: -#line 1441 "cs-parser.jay" +case 285: +#line 1445 "cs-parser.jay" {
yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref);
} break; -case 289: -#line 1445 "cs-parser.jay" +case 286: +#line 1449 "cs-parser.jay" {
yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out);
} break; -case 290: -#line 1451 "cs-parser.jay" +case 287: +#line 1455 "cs-parser.jay" { note ("section 5.4"); yyVal = yyVals[0+yyTop]; } break; -case 294: -#line 1466 "cs-parser.jay" +case 291: +#line 1470 "cs-parser.jay" {
yyVal = new This ();
} break; -case 297: -#line 1480 "cs-parser.jay" +case 294: +#line 1484 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.PostIncrement, (Expression) yyVals[-1+yyTop]);
} break; -case 298: -#line 1487 "cs-parser.jay" +case 295: +#line 1491 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.PostDecrement, (Expression) yyVals[-1+yyTop]);
} break; -case 301: -#line 1499 "cs-parser.jay" +case 298: +#line 1503 "cs-parser.jay" {
yyVal = new New ((TypeRef) yyVals[-3+yyTop], (ArrayList) yyVals[-1+yyTop]);
} break; -case 319: -#line 1559 "cs-parser.jay" +case 316: +#line 1563 "cs-parser.jay" {
yyVal = new TypeOf ((TypeRef) yyVals[-1+yyTop]);
} break; -case 320: -#line 1565 "cs-parser.jay" +case 317: +#line 1569 "cs-parser.jay" {
yyVal = new SizeOf ((TypeRef) yyVals[-1+yyTop]);
@@ -1803,220 +1813,220 @@ case 320: note ("if (5.8) builtin, yield constant expression");
} break; -case 324: -#line 1583 "cs-parser.jay" +case 321: +#line 1587 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.Plus, (Expression) yyVals[0+yyTop]);
} break; -case 325: -#line 1587 "cs-parser.jay" +case 322: +#line 1591 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.Minus, (Expression) yyVals[0+yyTop]);
} break; -case 326: -#line 1591 "cs-parser.jay" +case 323: +#line 1595 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.Negate, (Expression) yyVals[0+yyTop]);
} break; -case 327: -#line 1595 "cs-parser.jay" +case 324: +#line 1599 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.BitComplement, (Expression) yyVals[0+yyTop]);
} break; -case 328: -#line 1599 "cs-parser.jay" +case 325: +#line 1603 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.Indirection, (Expression) yyVals[0+yyTop]);
} break; -case 329: -#line 1603 "cs-parser.jay" +case 326: +#line 1607 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop]);
} break; -case 333: -#line 1618 "cs-parser.jay" +case 330: +#line 1622 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.PreIncrement, (Expression) yyVals[0+yyTop]);
} break; -case 334: -#line 1625 "cs-parser.jay" +case 331: +#line 1629 "cs-parser.jay" {
yyVal = new Unary (Unary.Operator.PreDecrement, (Expression) yyVals[0+yyTop]);
} break; -case 335: -#line 1635 "cs-parser.jay" +case 332: +#line 1639 "cs-parser.jay" {
yyVal = new Cast (type ((string) yyVals[-2+yyTop]), (Expression) yyVals[0+yyTop]);
} break; -case 336: -#line 1639 "cs-parser.jay" +case 333: +#line 1643 "cs-parser.jay" {
yyVal = new Cast ((TypeRef) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 338: -#line 1647 "cs-parser.jay" +case 335: +#line 1651 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.Multiply,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 339: -#line 1652 "cs-parser.jay" +case 336: +#line 1656 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.Divide,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 340: -#line 1657 "cs-parser.jay" +case 337: +#line 1661 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.Modulo,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 342: -#line 1666 "cs-parser.jay" +case 339: +#line 1670 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.Add,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 343: -#line 1671 "cs-parser.jay" +case 340: +#line 1675 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.Substract,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 345: -#line 1680 "cs-parser.jay" +case 342: +#line 1684 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.ShiftLeft,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 346: -#line 1685 "cs-parser.jay" +case 343: +#line 1689 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.ShiftRight,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 348: -#line 1694 "cs-parser.jay" +case 345: +#line 1698 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.LessThan,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 349: -#line 1699 "cs-parser.jay" +case 346: +#line 1703 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.GreatherThan,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 350: -#line 1704 "cs-parser.jay" +case 347: +#line 1708 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.LessOrEqual,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 351: -#line 1709 "cs-parser.jay" +case 348: +#line 1713 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.GreatherOrEqual,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 352: -#line 1714 "cs-parser.jay" +case 349: +#line 1718 "cs-parser.jay" {
yyVal = new Probe (Probe.Operator.Is,
(Expression) yyVals[-2+yyTop], (TypeRef) yyVals[0+yyTop]);
} break; -case 353: -#line 1719 "cs-parser.jay" +case 350: +#line 1723 "cs-parser.jay" {
yyVal = new Probe (Probe.Operator.As,
(Expression) yyVals[-2+yyTop], (TypeRef) yyVals[0+yyTop]);
} break; -case 355: -#line 1728 "cs-parser.jay" +case 352: +#line 1732 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.Equal,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 356: -#line 1733 "cs-parser.jay" +case 353: +#line 1737 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.NotEqual,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 358: -#line 1742 "cs-parser.jay" +case 355: +#line 1746 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.BitwiseAnd,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 360: -#line 1751 "cs-parser.jay" +case 357: +#line 1755 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.ExclusiveOr,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 362: -#line 1760 "cs-parser.jay" +case 359: +#line 1764 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.BitwiseOr,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 364: -#line 1769 "cs-parser.jay" +case 361: +#line 1773 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.LogicalAnd,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 366: -#line 1778 "cs-parser.jay" +case 363: +#line 1782 "cs-parser.jay" {
yyVal = new Binary (Binary.Operator.LogicalOr,
(Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 368: -#line 1787 "cs-parser.jay" +case 365: +#line 1791 "cs-parser.jay" {
yyVal = new Conditional ((Expression) yyVals[-4+yyTop], (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 369: -#line 1794 "cs-parser.jay" +case 366: +#line 1798 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
} break; -case 370: -#line 1798 "cs-parser.jay" +case 367: +#line 1802 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.Multiply,
@@ -2024,8 +2034,8 @@ case 370: (Expression) yyVals[0+yyTop]));
} break; -case 371: -#line 1805 "cs-parser.jay" +case 368: +#line 1809 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.Divide,
@@ -2033,8 +2043,8 @@ case 371: (Expression) yyVals[0+yyTop]));
} break; -case 372: -#line 1812 "cs-parser.jay" +case 369: +#line 1816 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.Modulo,
@@ -2042,8 +2052,8 @@ case 372: (Expression) yyVals[0+yyTop]));
} break; -case 373: -#line 1819 "cs-parser.jay" +case 370: +#line 1823 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.Add,
@@ -2051,8 +2061,8 @@ case 373: (Expression) yyVals[0+yyTop]));
} break; -case 374: -#line 1826 "cs-parser.jay" +case 371: +#line 1830 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.Substract,
@@ -2060,8 +2070,8 @@ case 374: (Expression) yyVals[0+yyTop]));
} break; -case 375: -#line 1833 "cs-parser.jay" +case 372: +#line 1837 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.ShiftLeft,
@@ -2069,8 +2079,8 @@ case 375: (Expression) yyVals[0+yyTop]));
} break; -case 376: -#line 1840 "cs-parser.jay" +case 373: +#line 1844 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.ShiftRight,
@@ -2078,8 +2088,8 @@ case 376: (Expression) yyVals[0+yyTop]));
} break; -case 377: -#line 1847 "cs-parser.jay" +case 374: +#line 1851 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.BitwiseAnd,
@@ -2087,8 +2097,8 @@ case 377: (Expression) yyVals[0+yyTop]));
} break; -case 378: -#line 1854 "cs-parser.jay" +case 375: +#line 1858 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.BitwiseOr,
@@ -2096,8 +2106,8 @@ case 378: (Expression) yyVals[0+yyTop]));
} break; -case 379: -#line 1861 "cs-parser.jay" +case 376: +#line 1865 "cs-parser.jay" {
yyVal = new Assign ((Expression) yyVals[-2+yyTop],
new Binary (Binary.Operator.ExclusiveOr,
@@ -2105,12 +2115,12 @@ case 379: (Expression) yyVals[0+yyTop]));
} break; -case 383: -#line 1879 "cs-parser.jay" +case 380: +#line 1883 "cs-parser.jay" { CheckBoolean ((Expression) yyVals[0+yyTop]); yyVal = yyVals[0+yyTop]; } break; -case 384: -#line 1889 "cs-parser.jay" +case 381: +#line 1893 "cs-parser.jay" {
Class new_class;
string full_class_name = MakeName ((string) yyVals[0+yyTop]);
@@ -2118,10 +2128,11 @@ case 384: new_class = new Class (current_container, full_class_name, (int) yyVals[-2+yyTop]);
current_container = new_class;
current_container.Namespace = current_namespace;
+ tree.RecordType (full_class_name, new_class);
} break; -case 385: -#line 1900 "cs-parser.jay" +case 382: +#line 1905 "cs-parser.jay" {
Class new_class = (Class) current_container;
@@ -2134,12 +2145,12 @@ case 385: yyVal = new_class;
} break; -case 386: -#line 1914 "cs-parser.jay" +case 383: +#line 1919 "cs-parser.jay" { yyVal = (int) 0; } break; -case 389: -#line 1920 "cs-parser.jay" +case 386: +#line 1925 "cs-parser.jay" {
int m1 = (int) yyVals[-1+yyTop];
int m2 = (int) yyVals[0+yyTop];
@@ -2150,74 +2161,74 @@ case 389: yyVal = (int) (m1 | m2);
} break; -case 390: -#line 1932 "cs-parser.jay" +case 387: +#line 1937 "cs-parser.jay" { yyVal = Modifiers.NEW; } break; -case 391: -#line 1933 "cs-parser.jay" +case 388: +#line 1938 "cs-parser.jay" { yyVal = Modifiers.PUBLIC; } break; -case 392: -#line 1934 "cs-parser.jay" +case 389: +#line 1939 "cs-parser.jay" { yyVal = Modifiers.PROTECTED; } break; -case 393: -#line 1935 "cs-parser.jay" +case 390: +#line 1940 "cs-parser.jay" { yyVal = Modifiers.INTERNAL; } break; -case 394: -#line 1936 "cs-parser.jay" +case 391: +#line 1941 "cs-parser.jay" { yyVal = Modifiers.PRIVATE; } break; -case 395: -#line 1937 "cs-parser.jay" +case 392: +#line 1942 "cs-parser.jay" { yyVal = Modifiers.ABSTRACT; } break; -case 396: -#line 1938 "cs-parser.jay" +case 393: +#line 1943 "cs-parser.jay" { yyVal = Modifiers.SEALED; } break; -case 397: -#line 1939 "cs-parser.jay" +case 394: +#line 1944 "cs-parser.jay" { yyVal = Modifiers.STATIC; } break; -case 398: -#line 1940 "cs-parser.jay" +case 395: +#line 1945 "cs-parser.jay" { yyVal = Modifiers.READONLY; } break; -case 399: -#line 1941 "cs-parser.jay" +case 396: +#line 1946 "cs-parser.jay" { yyVal = Modifiers.VIRTUAL; } break; -case 400: -#line 1942 "cs-parser.jay" +case 397: +#line 1947 "cs-parser.jay" { yyVal = Modifiers.OVERRIDE; } break; -case 401: -#line 1943 "cs-parser.jay" +case 398: +#line 1948 "cs-parser.jay" { yyVal = Modifiers.EXTERN; } break; -case 402: -#line 1947 "cs-parser.jay" +case 399: +#line 1952 "cs-parser.jay" { yyVal = null; } break; -case 403: -#line 1948 "cs-parser.jay" +case 400: +#line 1953 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 404: -#line 1952 "cs-parser.jay" +case 401: +#line 1957 "cs-parser.jay" { yyVal = yyVals[0+yyTop]; } break; -case 405: -#line 1970 "cs-parser.jay" +case 402: +#line 1975 "cs-parser.jay" {
current_block = new Block (current_block);
} break; -case 406: -#line 1974 "cs-parser.jay" +case 403: +#line 1979 "cs-parser.jay" {
while (current_block.Implicit)
current_block = current_block.Parent;
@@ -2225,8 +2236,8 @@ case 406: current_block = current_block.Parent;
} break; -case 411: -#line 1994 "cs-parser.jay" +case 408: +#line 1999 "cs-parser.jay" {
if ((Block) yyVals[0+yyTop] != current_block){
current_block.AddStatement ((Statement) yyVals[0+yyTop]);
@@ -2234,26 +2245,26 @@ case 411: }
} break; -case 412: -#line 2001 "cs-parser.jay" +case 409: +#line 2006 "cs-parser.jay" {
current_block.AddStatement ((Statement) yyVals[0+yyTop]);
} break; -case 413: -#line 2005 "cs-parser.jay" +case 410: +#line 2010 "cs-parser.jay" {
current_block.AddStatement ((Statement) yyVals[0+yyTop]);
} break; -case 425: -#line 2026 "cs-parser.jay" +case 422: +#line 2031 "cs-parser.jay" {
yyVal = new EmptyStatement ();
} break; -case 426: -#line 2033 "cs-parser.jay" +case 423: +#line 2038 "cs-parser.jay" {
string lab = (String) yyVals[-2+yyTop];
Block block;
@@ -2268,8 +2279,8 @@ case 426: }
} break; -case 429: -#line 2061 "cs-parser.jay" +case 426: +#line 2066 "cs-parser.jay" {
/* FIXME: Do something smart here regarding the composition of the type.
*/ /*
*/ @@ -2291,93 +2302,93 @@ case 429: }
} break; -case 430: -#line 2082 "cs-parser.jay" +case 427: +#line 2087 "cs-parser.jay" {
/* FIXME: Do something smart with the type here.
*/ yyVal = yyVals[-1+yyTop];
} break; -case 431: -#line 2087 "cs-parser.jay" +case 428: +#line 2092 "cs-parser.jay" {
yyVal = type ("VOID SOMETHING TYPE");
} break; -case 437: -#line 2109 "cs-parser.jay" +case 434: +#line 2114 "cs-parser.jay" {
yyVal = declare_local_variables ((TypeRef) yyVals[-1+yyTop], (ArrayList) yyVals[0+yyTop]);
} break; -case 439: -#line 2121 "cs-parser.jay" +case 436: +#line 2126 "cs-parser.jay" {
yyVal = yyVals[-1+yyTop];
} break; -case 440: -#line 2131 "cs-parser.jay" +case 437: +#line 2136 "cs-parser.jay" { yyVal = new StatementExpression ((Expression) yyVals[0+yyTop]); } break; -case 441: -#line 2132 "cs-parser.jay" +case 438: +#line 2137 "cs-parser.jay" { yyVal = new StatementExpression ((Expression) yyVals[0+yyTop]); } break; -case 442: -#line 2133 "cs-parser.jay" +case 439: +#line 2138 "cs-parser.jay" { yyVal = new StatementExpression ((Expression) yyVals[0+yyTop]); } break; -case 443: -#line 2134 "cs-parser.jay" +case 440: +#line 2139 "cs-parser.jay" { yyVal = new StatementExpression ((Expression) yyVals[0+yyTop]); } break; -case 444: -#line 2135 "cs-parser.jay" +case 441: +#line 2140 "cs-parser.jay" { yyVal = new StatementExpression ((Expression) yyVals[0+yyTop]); } break; -case 445: -#line 2136 "cs-parser.jay" +case 442: +#line 2141 "cs-parser.jay" { yyVal = new StatementExpression ((Expression) yyVals[0+yyTop]); } break; -case 446: -#line 2137 "cs-parser.jay" +case 443: +#line 2142 "cs-parser.jay" { yyVal = new StatementExpression ((Expression) yyVals[0+yyTop]); } break; -case 447: -#line 2142 "cs-parser.jay" +case 444: +#line 2147 "cs-parser.jay" { note ("complain if this is a delegate maybe?"); } break; -case 450: -#line 2153 "cs-parser.jay" +case 447: +#line 2158 "cs-parser.jay" {
yyVal = new If ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop]);
} break; -case 451: -#line 2158 "cs-parser.jay" +case 448: +#line 2163 "cs-parser.jay" {
yyVal = new If ((Expression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop]);
} break; -case 452: -#line 2166 "cs-parser.jay" +case 449: +#line 2171 "cs-parser.jay" {
yyVal = new Switch ((Expression) yyVals[-2+yyTop], (ArrayList) yyVals[0+yyTop]);
} break; -case 453: -#line 2175 "cs-parser.jay" +case 450: +#line 2180 "cs-parser.jay" {
yyVal = yyVals[-1+yyTop];
} break; -case 454: -#line 2181 "cs-parser.jay" +case 451: +#line 2186 "cs-parser.jay" { yyVal = new ArrayList (); } break; -case 456: -#line 2187 "cs-parser.jay" +case 453: +#line 2192 "cs-parser.jay" {
ArrayList sections = new ArrayList ();
@@ -2385,8 +2396,8 @@ case 456: yyVal = sections;
} break; -case 457: -#line 2194 "cs-parser.jay" +case 454: +#line 2199 "cs-parser.jay" {
ArrayList sections = (ArrayList) yyVals[-1+yyTop];
@@ -2394,14 +2405,14 @@ case 457: yyVal = sections;
} break; -case 458: -#line 2204 "cs-parser.jay" +case 455: +#line 2209 "cs-parser.jay" {
current_block = new Block (current_block);
} break; -case 459: -#line 2208 "cs-parser.jay" +case 456: +#line 2213 "cs-parser.jay" {
while (current_block.Implicit)
current_block = current_block.Parent;
@@ -2409,8 +2420,8 @@ case 459: current_block = current_block.Parent;
} break; -case 460: -#line 2218 "cs-parser.jay" +case 457: +#line 2223 "cs-parser.jay" {
ArrayList labels = new ArrayList ();
@@ -2418,8 +2429,8 @@ case 460: yyVal = labels;
} break; -case 461: -#line 2225 "cs-parser.jay" +case 458: +#line 2230 "cs-parser.jay" {
ArrayList labels = (ArrayList) (yyVals[-1+yyTop]);
labels.Add (yyVals[0+yyTop]);
@@ -2427,46 +2438,46 @@ case 461: yyVal = labels;
} break; -case 462: -#line 2234 "cs-parser.jay" +case 459: +#line 2239 "cs-parser.jay" { yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop]); } break; -case 463: -#line 2235 "cs-parser.jay" +case 460: +#line 2240 "cs-parser.jay" { yyVal = new SwitchLabel (null); } break; -case 468: -#line 2247 "cs-parser.jay" +case 465: +#line 2252 "cs-parser.jay" {
yyVal = new While ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop]);
} break; -case 469: -#line 2255 "cs-parser.jay" +case 466: +#line 2260 "cs-parser.jay" {
yyVal = new Do ((Statement) yyVals[-5+yyTop], (Expression) yyVals[-2+yyTop]);
} break; -case 470: -#line 2266 "cs-parser.jay" +case 467: +#line 2271 "cs-parser.jay" {
yyVal = new For ((Statement) yyVals[-6+yyTop], (Expression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop]);
} break; -case 471: -#line 2272 "cs-parser.jay" +case 468: +#line 2277 "cs-parser.jay" { yyVal = new EmptyStatement (); } break; -case 475: -#line 2282 "cs-parser.jay" +case 472: +#line 2287 "cs-parser.jay" { yyVal = new BoolLiteral (true); } break; -case 477: -#line 2287 "cs-parser.jay" +case 474: +#line 2292 "cs-parser.jay" { yyVal = new EmptyStatement (); } break; -case 480: -#line 2297 "cs-parser.jay" +case 477: +#line 2302 "cs-parser.jay" {
Block b = new Block (null, true);
@@ -2474,8 +2485,8 @@ case 480: yyVal = b;
} break; -case 481: -#line 2304 "cs-parser.jay" +case 478: +#line 2309 "cs-parser.jay" {
Block b = (Block) yyVals[-2+yyTop];
@@ -2483,8 +2494,8 @@ case 481: yyVal = yyVals[-2+yyTop];
} break; -case 482: -#line 2315 "cs-parser.jay" +case 479: +#line 2320 "cs-parser.jay" {
string temp_id = current_block.MakeInternalID ();
Expression assign_e, ma;
@@ -2517,38 +2528,38 @@ case 482: yyVal = foreach_block;
} break; -case 488: -#line 2358 "cs-parser.jay" +case 485: +#line 2363 "cs-parser.jay" {
yyVal = new Break ();
} break; -case 489: -#line 2365 "cs-parser.jay" +case 486: +#line 2370 "cs-parser.jay" {
yyVal = new Continue ();
} break; -case 490: -#line 2372 "cs-parser.jay" +case 487: +#line 2377 "cs-parser.jay" {
yyVal = new Goto ((string) yyVals[-1+yyTop]);
} break; -case 493: -#line 2381 "cs-parser.jay" +case 490: +#line 2386 "cs-parser.jay" {
yyVal = new Return ((Expression) yyVals[-1+yyTop]);
} break; -case 494: -#line 2388 "cs-parser.jay" +case 491: +#line 2393 "cs-parser.jay" {
yyVal = new Throw ((Expression) yyVals[-1+yyTop]);
} break; -case 497: -#line 2400 "cs-parser.jay" +case 494: +#line 2405 "cs-parser.jay" {
DictionaryEntry cc = (DictionaryEntry) yyVals[0+yyTop];
ArrayList s = null;
@@ -2559,14 +2570,14 @@ case 497: yyVal = new Try ((Block) yyVals[-1+yyTop], s, (Catch) cc.Value, null);
} break; -case 498: -#line 2410 "cs-parser.jay" +case 495: +#line 2415 "cs-parser.jay" {
yyVal = new Try ((Block) yyVals[-1+yyTop], null, null, (Block) yyVals[0+yyTop]);
} break; -case 499: -#line 2414 "cs-parser.jay" +case 496: +#line 2419 "cs-parser.jay" {
DictionaryEntry cc = (DictionaryEntry) yyVals[-1+yyTop];
ArrayList s = null;
@@ -2577,8 +2588,8 @@ case 499: yyVal = new Try ((Block) yyVals[-2+yyTop], s, (Catch) cc.Value, (Block) yyVals[0+yyTop]);
} break; -case 500: -#line 2427 "cs-parser.jay" +case 497: +#line 2432 "cs-parser.jay" {
DictionaryEntry pair = new DictionaryEntry ();
@@ -2588,8 +2599,8 @@ case 500: yyVal = pair;
} break; -case 501: -#line 2436 "cs-parser.jay" +case 498: +#line 2441 "cs-parser.jay" {
DictionaryEntry pair = new DictionaryEntry ();
pair.Key = yyVals[-1+yyTop];
@@ -2598,16 +2609,16 @@ case 501: yyVal = pair;
} break; -case 502: -#line 2446 "cs-parser.jay" +case 499: +#line 2451 "cs-parser.jay" { yyVal = null; } break; -case 504: -#line 2451 "cs-parser.jay" +case 501: +#line 2456 "cs-parser.jay" { yyVal = null; } break; -case 506: -#line 2457 "cs-parser.jay" +case 503: +#line 2462 "cs-parser.jay" {
ArrayList l = new ArrayList ();
@@ -2615,8 +2626,8 @@ case 506: yyVal = l;
} break; -case 507: -#line 2464 "cs-parser.jay" +case 504: +#line 2469 "cs-parser.jay" {
ArrayList l = (ArrayList) yyVals[-1+yyTop];
@@ -2624,8 +2635,8 @@ case 507: yyVal = l;
} break; -case 508: -#line 2474 "cs-parser.jay" +case 505: +#line 2479 "cs-parser.jay" {
string id = null;
@@ -2635,41 +2646,41 @@ case 508: yyVal = new Catch ((TypeRef) yyVals[-3+yyTop], id, (Block) yyVals[0+yyTop]);
} break; -case 509: -#line 2485 "cs-parser.jay" +case 506: +#line 2490 "cs-parser.jay" { yyVal = null; } break; -case 511: -#line 2491 "cs-parser.jay" +case 508: +#line 2496 "cs-parser.jay" {
yyVal = new Catch (null, null, (Block) yyVals[0+yyTop]);
} break; -case 512: -#line 2498 "cs-parser.jay" +case 509: +#line 2503 "cs-parser.jay" {
yyVal = yyVals[0+yyTop];
} break; -case 513: -#line 2505 "cs-parser.jay" +case 510: +#line 2510 "cs-parser.jay" {
yyVal = new Checked ((Block) yyVals[0+yyTop]);
} break; -case 514: -#line 2512 "cs-parser.jay" +case 511: +#line 2517 "cs-parser.jay" {
yyVal = new Unchecked ((Block) yyVals[0+yyTop]);
} break; -case 515: -#line 2519 "cs-parser.jay" +case 512: +#line 2524 "cs-parser.jay" {
yyVal = new Lock ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop]);
} break; -#line 2673 "-" +#line 2684 "-" } yyTop -= yyLen[yyN]; yyState = yyStates[yyTop]; @@ -2703,1576 +2714,1577 @@ case 515: 0, 4, 4, 5, 5, 6, 7, 10, 10, 14, 11, 15, 15, 16, 16, 12, 12, 9, 13, 1, 1, 3, 3, 17, 17, 18, 18, 19, 19, 19, - 19, 19, 2, 2, 25, 26, 26, 27, 28, 28, - 30, 31, 31, 31, 29, 29, 32, 32, 33, 34, - 34, 36, 36, 38, 38, 39, 39, 40, 41, 41, - 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 55, 21, 54, 54, 57, 57, 58, 56, - 60, 60, 61, 61, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 44, 64, 64, 65, 45, 67, 67, - 68, 68, 69, 69, 46, 71, 71, 72, 72, 74, - 74, 76, 76, 76, 77, 77, 79, 80, 80, 81, - 81, 78, 73, 73, 84, 85, 47, 83, 83, 89, - 89, 87, 87, 86, 91, 88, 90, 90, 93, 22, - 92, 92, 95, 96, 96, 94, 97, 97, 98, 98, - 99, 99, 99, 99, 104, 104, 100, 100, 106, 107, - 101, 105, 105, 105, 105, 102, 108, 109, 103, 50, - 110, 110, 110, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 112, 112, 51, 113, 114, - 114, 115, 115, 52, 48, 48, 117, 117, 118, 119, - 49, 120, 120, 23, 121, 121, 122, 122, 124, 124, - 125, 125, 126, 126, 24, 35, 8, 63, 63, 63, - 59, 59, 127, 127, 127, 127, 127, 127, 127, 123, - 123, 123, 123, 123, 123, 123, 123, 123, 82, 128, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 131, 131, 131, 131, 131, - 131, 147, 147, 147, 146, 145, 145, 132, 133, 133, - 148, 134, 116, 116, 149, 149, 150, 150, 150, 151, - 135, 152, 152, 136, 137, 137, 138, 139, 140, 140, - 153, 154, 155, 155, 129, 129, 157, 158, 158, 159, - 159, 156, 156, 70, 70, 70, 160, 160, 141, 142, - 143, 144, 161, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 162, 163, 164, 164, 165, 165, 165, 165, - 166, 166, 166, 167, 167, 167, 168, 168, 168, 168, - 168, 168, 168, 169, 169, 169, 170, 170, 171, 171, - 172, 172, 173, 173, 174, 174, 175, 175, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 37, - 37, 66, 177, 179, 20, 53, 53, 180, 180, 181, - 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, - 181, 178, 178, 182, 184, 75, 183, 183, 185, 185, - 186, 186, 186, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 190, 189, 187, 187, 202, 202, - 202, 203, 203, 204, 204, 205, 200, 201, 191, 206, - 206, 206, 206, 206, 206, 206, 207, 192, 192, 208, - 208, 209, 210, 211, 211, 212, 212, 215, 213, 214, - 214, 216, 216, 193, 193, 193, 193, 217, 218, 219, - 221, 221, 224, 224, 222, 222, 223, 223, 226, 225, - 225, 220, 194, 194, 194, 194, 194, 227, 228, 229, - 229, 229, 230, 231, 232, 232, 195, 195, 195, 233, - 233, 236, 236, 237, 237, 235, 235, 239, 240, 240, - 238, 234, 196, 197, 198, 199, 241, + 19, 19, 2, 2, 25, 26, 26, 28, 29, 29, + 29, 27, 27, 30, 30, 31, 32, 32, 34, 34, + 36, 36, 37, 37, 38, 39, 39, 40, 40, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 53, + 21, 52, 52, 55, 55, 56, 54, 58, 58, 59, + 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 42, 62, 62, 63, 43, 65, 65, 66, 66, 67, + 67, 44, 69, 69, 70, 70, 72, 72, 74, 74, + 74, 75, 75, 77, 78, 78, 79, 79, 76, 71, + 71, 82, 83, 45, 81, 81, 87, 87, 85, 85, + 84, 89, 86, 88, 88, 91, 22, 90, 90, 93, + 94, 94, 92, 95, 95, 96, 96, 97, 97, 97, + 97, 102, 102, 98, 98, 104, 105, 99, 103, 103, + 103, 103, 100, 106, 107, 101, 48, 108, 108, 108, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 110, 110, 49, 111, 112, 112, 113, 113, + 50, 46, 46, 115, 115, 116, 117, 47, 118, 118, + 23, 119, 119, 120, 120, 122, 122, 123, 123, 124, + 124, 24, 33, 8, 61, 61, 61, 57, 57, 125, + 125, 125, 125, 125, 125, 125, 121, 121, 121, 121, + 121, 121, 121, 121, 121, 80, 126, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 129, 129, 129, 129, 129, 129, 145, 145, + 145, 144, 143, 143, 130, 131, 131, 146, 132, 114, + 114, 147, 147, 148, 148, 148, 149, 133, 150, 150, + 134, 135, 135, 136, 137, 138, 138, 151, 152, 153, + 153, 127, 127, 155, 156, 156, 157, 157, 154, 154, + 68, 68, 68, 158, 158, 139, 140, 141, 142, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 160, + 161, 162, 162, 163, 163, 163, 163, 164, 164, 164, + 165, 165, 165, 166, 166, 166, 166, 166, 166, 166, + 167, 167, 167, 168, 168, 169, 169, 170, 170, 171, + 171, 172, 172, 173, 173, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 35, 35, 64, 175, + 177, 20, 51, 51, 178, 178, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 176, 176, + 180, 182, 73, 181, 181, 183, 183, 184, 184, 184, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 188, 187, 185, 185, 200, 200, 200, 201, 201, + 202, 202, 203, 198, 199, 189, 204, 204, 204, 204, + 204, 204, 204, 205, 190, 190, 206, 206, 207, 208, + 209, 209, 210, 210, 213, 211, 212, 212, 214, 214, + 191, 191, 191, 191, 215, 216, 217, 219, 219, 222, + 222, 220, 220, 221, 221, 224, 223, 223, 218, 192, + 192, 192, 192, 192, 225, 226, 227, 227, 227, 228, + 229, 230, 230, 193, 193, 193, 231, 231, 234, 234, + 235, 235, 233, 233, 237, 238, 238, 236, 232, 194, + 195, 196, 197, 239, }; static short [] yyLen = { 2, 4, 1, 2, 1, 1, 5, 3, 1, 2, 0, 5, 0, 1, 0, 1, 1, 3, 1, 4, 0, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 2, 4, 0, 1, - 2, 1, 1, 1, 1, 3, 1, 1, 1, 0, - 3, 1, 3, 0, 1, 1, 2, 3, 0, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 8, 0, 1, 1, 2, 2, 3, - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 6, 1, 3, 3, 5, 1, 3, - 3, 1, 1, 1, 2, 7, 7, 1, 1, 0, - 1, 1, 3, 1, 1, 3, 4, 0, 1, 1, - 1, 4, 1, 3, 0, 0, 9, 2, 2, 0, - 1, 0, 1, 3, 0, 4, 1, 1, 0, 7, - 0, 1, 2, 1, 3, 3, 0, 1, 1, 2, - 1, 1, 1, 1, 0, 1, 8, 8, 0, 0, - 9, 3, 3, 6, 6, 6, 0, 0, 12, 4, - 7, 10, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 2, 4, 0, 1, 2, 1, 1, + 1, 1, 3, 1, 1, 1, 0, 3, 1, 3, + 0, 1, 1, 2, 3, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 8, 0, 1, 1, 2, 2, 3, 0, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 6, 1, 3, 3, 5, 1, 3, 3, 1, 1, + 1, 2, 7, 7, 1, 1, 0, 1, 1, 3, + 1, 1, 3, 4, 0, 1, 1, 1, 4, 1, + 3, 0, 0, 9, 2, 2, 0, 1, 0, 1, + 3, 0, 4, 1, 1, 0, 7, 0, 1, 2, + 1, 3, 3, 0, 1, 1, 2, 1, 1, 1, + 1, 0, 1, 8, 8, 0, 0, 9, 3, 3, + 6, 6, 6, 0, 0, 12, 4, 7, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 7, 7, 4, 5, 0, - 1, 5, 5, 6, 6, 9, 2, 2, 3, 3, - 6, 5, 7, 7, 0, 2, 3, 4, 0, 1, - 1, 3, 2, 4, 9, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 7, 7, 4, 5, 0, 1, 5, 5, + 6, 6, 9, 2, 2, 3, 3, 6, 5, 7, + 7, 0, 2, 3, 4, 0, 1, 1, 3, 2, + 4, 9, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, - 1, 4, 0, 1, 1, 3, 1, 2, 2, 1, - 4, 1, 3, 1, 3, 4, 2, 2, 1, 1, - 5, 7, 0, 1, 1, 2, 3, 0, 1, 1, - 2, 0, 1, 2, 3, 4, 1, 3, 4, 4, - 4, 4, 1, 2, 2, 2, 2, 2, 2, 1, - 1, 1, 2, 2, 4, 4, 1, 3, 3, 3, - 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, - 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, - 1, 3, 1, 3, 1, 3, 1, 5, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, - 1, 1, 1, 0, 8, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 2, 0, 4, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, - 2, 0, 1, 1, 2, 3, 2, 3, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, - 7, 5, 3, 0, 1, 1, 2, 0, 3, 1, - 2, 3, 2, 1, 1, 1, 1, 5, 7, 9, - 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, - 3, 8, 1, 1, 1, 1, 1, 2, 2, 3, - 4, 3, 3, 3, 0, 1, 3, 3, 4, 2, - 2, 0, 1, 0, 1, 1, 2, 6, 0, 1, - 2, 2, 2, 2, 5, 5, 2, + 1, 1, 1, 1, 3, 3, 3, 1, 4, 0, + 1, 1, 3, 1, 2, 2, 1, 4, 1, 3, + 1, 3, 4, 2, 2, 1, 1, 5, 7, 0, + 1, 1, 2, 3, 0, 1, 1, 2, 0, 1, + 2, 3, 4, 1, 3, 4, 4, 4, 4, 1, + 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, + 2, 4, 4, 1, 3, 3, 3, 1, 3, 3, + 1, 3, 3, 1, 3, 3, 3, 3, 3, 3, + 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, + 3, 1, 3, 1, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, + 0, 8, 0, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, + 2, 0, 4, 0, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 2, 2, 2, 2, 2, 0, 1, + 1, 2, 3, 2, 3, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 5, 7, 5, 3, + 0, 1, 1, 2, 0, 3, 1, 2, 3, 2, + 1, 1, 1, 1, 5, 7, 9, 0, 1, 1, + 1, 0, 1, 0, 1, 1, 1, 3, 8, 1, + 1, 1, 1, 1, 2, 2, 3, 4, 3, 3, + 3, 0, 1, 3, 3, 4, 2, 2, 0, 1, + 0, 1, 1, 2, 6, 0, 1, 2, 2, 2, + 2, 5, 5, 2, }; static short [] yyDefRed = { 0, 0, 0, 0, 0, 2, 4, 5, 0, 18, 0, - 0, 0, 0, 34, 0, 36, 3, 0, 7, 0, - 43, 44, 42, 0, 40, 0, 0, 0, 0, 27, - 0, 24, 26, 28, 29, 30, 31, 32, 37, 16, - 0, 17, 0, 226, 0, 45, 47, 48, 49, 41, - 0, 395, 401, 393, 390, 400, 394, 392, 391, 398, - 396, 397, 399, 0, 0, 388, 1, 25, 6, 0, - 235, 241, 248, 0, 236, 238, 277, 237, 244, 246, - 0, 271, 233, 240, 242, 0, 234, 294, 276, 0, - 245, 247, 0, 243, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 275, 272, 273, 274, 269, 270, 0, - 0, 52, 239, 281, 0, 251, 253, 254, 255, 256, - 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 0, 299, 300, 0, 330, 331, 332, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, - 381, 38, 0, 0, 0, 0, 0, 0, 0, 389, - 0, 0, 0, 228, 0, 229, 230, 0, 0, 0, - 0, 0, 0, 327, 324, 325, 326, 329, 328, 333, - 334, 51, 0, 0, 0, 0, 297, 298, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 7, 0, 40, 41, + 39, 0, 37, 0, 0, 0, 0, 27, 0, 24, + 26, 28, 29, 30, 31, 32, 34, 16, 0, 17, + 0, 223, 0, 42, 44, 45, 46, 38, 0, 392, + 398, 390, 387, 397, 391, 389, 388, 395, 393, 394, + 396, 0, 0, 385, 1, 25, 6, 0, 232, 238, + 245, 0, 233, 235, 274, 234, 241, 243, 0, 268, + 230, 237, 239, 0, 231, 291, 273, 0, 242, 244, + 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 272, 269, 270, 271, 266, 267, 0, 0, 49, + 236, 278, 0, 248, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 0, 296, 297, 0, 327, 328, 329, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 377, 378, 35, + 0, 0, 0, 0, 0, 0, 0, 386, 0, 0, + 0, 225, 0, 226, 227, 0, 0, 0, 0, 0, + 0, 324, 321, 322, 323, 326, 325, 330, 331, 48, + 0, 0, 0, 0, 294, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 46, 0, 0, 384, 0, 0, 139, 73, 292, - 0, 295, 0, 0, 0, 0, 305, 0, 0, 0, - 0, 278, 0, 53, 0, 0, 0, 287, 0, 0, - 285, 279, 280, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 379, 378, 338, 340, 339, 337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 13, 11, 0, - 0, 0, 0, 0, 0, 0, 296, 0, 321, 310, - 0, 0, 0, 0, 306, 320, 319, 322, 335, 336, - 291, 290, 289, 288, 282, 0, 0, 0, 0, 0, - 403, 0, 216, 0, 0, 0, 0, 142, 0, 0, - 0, 77, 293, 0, 307, 311, 301, 286, 368, 19, - 0, 0, 0, 0, 0, 0, 0, 114, 115, 0, - 0, 0, 221, 214, 249, 144, 0, 0, 140, 0, - 0, 0, 78, 0, 0, 0, 0, 72, 0, 0, - 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 0, 385, 121, 0, 120, 0, 119, 0, 0, 0, - 217, 0, 0, 0, 0, 0, 149, 151, 152, 153, - 154, 0, 93, 85, 86, 87, 88, 89, 90, 91, - 92, 0, 0, 83, 74, 0, 313, 302, 0, 0, - 58, 62, 405, 109, 105, 108, 0, 0, 225, 113, - 116, 0, 218, 222, 145, 156, 0, 146, 150, 80, - 84, 314, 103, 317, 104, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 173, 0, 0, 0, 122, - 117, 224, 0, 0, 0, 315, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, + 0, 0, 381, 0, 0, 136, 70, 289, 0, 292, + 0, 0, 0, 247, 0, 0, 0, 0, 0, 275, + 0, 50, 0, 0, 0, 284, 0, 0, 282, 276, + 277, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 376, 375, 335, 337, 336, 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 99, 0, 0, 170, 198, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 13, 11, 0, 0, 0, + 0, 0, 0, 0, 293, 0, 318, 307, 0, 0, + 0, 0, 303, 317, 316, 319, 332, 333, 288, 287, + 286, 285, 279, 0, 0, 0, 0, 0, 400, 0, + 213, 0, 0, 0, 0, 139, 0, 0, 0, 74, + 290, 0, 304, 308, 298, 283, 365, 19, 0, 0, + 0, 0, 0, 0, 0, 111, 112, 0, 0, 0, + 218, 211, 246, 141, 0, 0, 137, 0, 0, 0, + 75, 301, 0, 0, 0, 69, 0, 0, 58, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 0, 382, + 118, 0, 117, 0, 116, 0, 0, 0, 214, 0, + 0, 0, 0, 0, 146, 148, 149, 150, 151, 0, + 90, 82, 83, 84, 85, 86, 87, 88, 89, 0, + 0, 80, 71, 0, 310, 299, 0, 0, 55, 59, + 402, 106, 102, 105, 0, 0, 222, 110, 113, 0, + 215, 219, 142, 153, 0, 143, 147, 77, 81, 311, + 100, 314, 101, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 0, 0, 0, 119, 114, 221, + 0, 0, 0, 312, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, + 0, 167, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 425, 0, 414, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 442, 0, 0, 409, - 411, 412, 413, 415, 416, 417, 418, 419, 420, 421, - 422, 423, 424, 0, 0, 0, 0, 441, 448, 449, - 464, 465, 466, 467, 483, 484, 485, 486, 487, 0, - 0, 0, 0, 316, 318, 0, 0, 0, 95, 0, - 0, 0, 0, 0, 0, 0, 111, 179, 178, 175, - 180, 181, 174, 193, 192, 185, 186, 182, 184, 183, - 187, 176, 177, 188, 189, 195, 194, 190, 191, 0, - 0, 0, 0, 98, 125, 0, 0, 0, 0, 0, - 0, 488, 513, 0, 489, 0, 0, 0, 0, 0, - 0, 0, 0, 496, 0, 0, 0, 0, 514, 0, - 0, 431, 0, 434, 0, 0, 430, 0, 429, 406, - 410, 427, 428, 0, 0, 439, 0, 0, 0, 159, - 0, 204, 0, 0, 94, 205, 0, 0, 0, 0, - 124, 0, 0, 0, 101, 100, 0, 0, 0, 0, - 135, 211, 0, 128, 133, 0, 131, 129, 438, 0, - 473, 480, 0, 472, 0, 0, 382, 0, 492, 490, - 383, 0, 0, 493, 0, 494, 0, 0, 0, 498, - 0, 0, 506, 0, 0, 0, 0, 0, 435, 0, - 426, 166, 0, 0, 0, 0, 97, 96, 0, 0, - 0, 0, 0, 0, 107, 0, 199, 201, 0, 212, - 126, 106, 0, 138, 137, 134, 0, 0, 0, 0, - 0, 491, 0, 0, 0, 0, 512, 499, 0, 500, - 503, 507, 0, 501, 517, 0, 436, 0, 0, 0, - 0, 160, 0, 0, 0, 0, 0, 207, 0, 208, - 0, 0, 0, 0, 0, 0, 0, 136, 0, 476, - 0, 481, 0, 0, 515, 0, 452, 0, 511, 516, - 468, 158, 167, 0, 0, 0, 157, 209, 210, 206, - 197, 196, 0, 0, 171, 0, 127, 213, 0, 0, - 0, 0, 0, 0, 0, 0, 456, 0, 460, 510, - 0, 0, 0, 0, 161, 0, 0, 0, 469, 0, - 0, 478, 0, 451, 0, 463, 453, 457, 0, 461, - 0, 168, 0, 0, 202, 203, 0, 0, 482, 462, - 0, 508, 0, 0, 0, 172, 470, 169, 164, 165, + 0, 0, 422, 0, 411, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 439, 0, 0, 406, 408, 409, + 410, 412, 413, 414, 415, 416, 417, 418, 419, 420, + 421, 0, 0, 0, 0, 438, 445, 446, 461, 462, + 463, 464, 480, 481, 482, 483, 484, 0, 0, 0, + 0, 313, 315, 0, 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 108, 176, 175, 172, 177, 178, + 171, 190, 189, 182, 183, 179, 181, 180, 184, 173, + 174, 185, 186, 192, 191, 187, 188, 0, 0, 0, + 0, 95, 122, 0, 0, 0, 0, 0, 0, 485, + 510, 0, 486, 0, 0, 0, 0, 0, 0, 0, + 0, 493, 0, 0, 0, 0, 511, 0, 0, 428, + 0, 431, 0, 0, 427, 0, 426, 403, 407, 424, + 425, 0, 0, 436, 0, 0, 0, 156, 0, 201, + 0, 0, 91, 202, 0, 0, 0, 0, 121, 0, + 0, 0, 98, 97, 0, 0, 0, 0, 132, 208, + 0, 125, 130, 0, 128, 126, 435, 0, 470, 477, + 0, 469, 0, 0, 379, 0, 489, 487, 380, 0, + 0, 490, 0, 491, 0, 0, 0, 495, 0, 0, + 503, 0, 0, 0, 0, 0, 432, 0, 423, 163, + 0, 0, 0, 0, 94, 93, 0, 0, 0, 0, + 0, 0, 104, 0, 196, 198, 0, 209, 123, 103, + 0, 135, 134, 131, 0, 0, 0, 0, 0, 488, + 0, 0, 0, 0, 509, 496, 0, 497, 500, 504, + 0, 498, 514, 0, 433, 0, 0, 0, 0, 157, + 0, 0, 0, 0, 0, 204, 0, 205, 0, 0, + 0, 0, 0, 0, 0, 133, 0, 473, 0, 478, + 0, 0, 512, 0, 449, 0, 508, 513, 465, 155, + 164, 0, 0, 0, 154, 206, 207, 203, 194, 193, + 0, 0, 168, 0, 124, 210, 0, 0, 0, 0, + 0, 0, 0, 0, 453, 0, 457, 507, 0, 0, + 0, 0, 158, 0, 0, 0, 466, 0, 0, 475, + 0, 448, 0, 460, 450, 454, 0, 458, 0, 165, + 0, 0, 199, 200, 0, 0, 479, 459, 0, 505, + 0, 0, 0, 169, 467, 166, 161, 162, }; protected static short [] yyDgoto = { 2, - 3, 345, 29, 4, 5, 6, 7, 44, 10, 0, - 30, 110, 224, 154, 289, 0, 31, 32, 33, 34, - 35, 36, 37, 38, 14, 15, 16, 24, 45, 25, - 26, 46, 47, 48, 164, 111, 248, 0, 0, 344, + 3, 343, 27, 4, 5, 6, 7, 42, 10, 0, + 28, 108, 222, 152, 287, 0, 29, 30, 31, 32, + 33, 34, 35, 36, 14, 22, 43, 23, 24, 44, + 45, 46, 162, 109, 246, 0, 0, 342, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, - 379, 380, 420, 330, 296, 362, 331, 332, 341, 412, - 413, 414, 342, 558, 559, 678, 480, 481, 444, 445, - 381, 425, 474, 566, 507, 567, 347, 348, 349, 386, - 387, 475, 599, 657, 766, 600, 664, 601, 668, 726, - 727, 327, 295, 359, 328, 357, 395, 396, 397, 398, - 399, 400, 401, 437, 752, 705, 786, 812, 843, 455, - 590, 456, 457, 717, 718, 249, 710, 711, 712, 458, - 294, 325, 113, 351, 352, 353, 114, 167, 236, 115, + 418, 328, 294, 360, 329, 330, 339, 410, 411, 412, + 340, 556, 557, 676, 478, 479, 442, 443, 379, 423, + 472, 564, 505, 565, 345, 346, 347, 384, 385, 473, + 597, 655, 764, 598, 662, 599, 666, 724, 725, 325, + 293, 357, 326, 355, 393, 394, 395, 396, 397, 398, + 399, 435, 750, 703, 784, 810, 841, 453, 588, 454, + 455, 715, 716, 247, 708, 709, 710, 456, 292, 323, + 111, 349, 350, 351, 112, 165, 234, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 250, 251, - 313, 245, 134, 135, 365, 418, 237, 302, 303, 446, + 126, 127, 128, 129, 130, 131, 248, 249, 311, 243, + 132, 133, 363, 416, 235, 300, 301, 444, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 682, 320, 290, 65, - 66, 321, 518, 459, 519, 520, 521, 522, 523, 524, + 146, 147, 148, 149, 680, 318, 288, 63, 64, 319, + 516, 457, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, - 535, 536, 629, 623, 624, 537, 538, 539, 540, 777, - 805, 806, 807, 808, 829, 809, 541, 542, 543, 544, - 673, 771, 820, 674, 675, 822, 545, 546, 547, 548, - 549, 615, 689, 690, 691, 740, 692, 741, 693, 811, - 697, + 627, 621, 622, 535, 536, 537, 538, 775, 803, 804, + 805, 806, 827, 807, 539, 540, 541, 542, 671, 769, + 818, 672, 673, 820, 543, 544, 545, 546, 547, 613, + 687, 688, 689, 738, 690, 739, 691, 809, 695, }; - protected static short [] yySindex = { -312, - -236, 0, -116, -312, 0, 0, 0, -97, 0, -56, - -15, -273, -90, 0, -116, 0, 0, -49, 0, -44, - 0, 0, 0, -328, 0, 69, -49, 4393, 166, 0, - -90, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 63, 0, 8029, 0, -58, 0, 0, 0, 0, 0, - -15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 36, 4393, 0, 0, 0, 0, 19, - 0, 0, 0, 86, 0, 0, 0, 0, 0, 0, - 468, 0, 0, 0, 0, 90, 0, 0, 0, 95, - 0, 0, 98, 0, 8029, 8029, 8029, 8029, 8029, 8029, - 8029, 8029, 8029, 0, 0, 0, 0, 0, 0, -15, - 88, 0, 0, 0, 74, 0, 0, 0, 0, 0, + protected static short [] yySindex = { -287, + -347, 0, -253, -287, 0, 0, 0, -202, 0, -91, + -69, -269, -250, -253, 0, -114, 0, -83, 0, 0, + 0, -325, 0, -54, -114, 4292, 98, 0, -250, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -5, 0, + 7928, 0, -97, 0, 0, 0, 0, 0, -69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 111, 0, 0, 429, 0, 0, 0, -9, - -51, 78, -155, 73, 112, 118, 126, 96, -295, 0, - 0, 0, -328, 158, 83, 468, 87, 91, 100, 0, - 8029, 101, 8029, 0, 116, 0, 0, 468, 468, 8029, - -293, 168, 171, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 8029, 8029, 6957, 102, 0, 0, 103, 8029, - 8029, 8029, 8029, 8029, 8029, 8029, 8029, 8029, 8029, 8029, - 8029, 8029, 8029, 8029, 8029, 8029, 8029, 468, 468, 8029, - 8029, 8029, 8029, 8029, 8029, 8029, 8029, 8029, 8029, 8029, - 8029, 0, -312, 173, 0, -310, 175, 0, 0, 0, - 33, 0, 179, 7493, 6957, 184, 0, -186, -87, 182, - 8029, 0, 8029, 0, 34, 8029, 8029, 0, 183, 185, + 0, 12, 4292, 0, 0, 0, 0, -13, 0, 0, + 0, 17, 0, 0, 0, 0, 0, 0, 8595, 0, + 0, 0, 0, 24, 0, 0, 0, 41, 0, 0, + 93, 0, 7928, 7928, 7928, 7928, 7928, 7928, 7928, 7928, + 7928, 0, 0, 0, 0, 0, 0, -69, 76, 0, + 0, 0, -68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -9, -9, - -51, -51, 184, 184, 78, 78, 78, 78, -155, -155, - 73, 112, 118, 126, 193, 96, -90, 0, 0, 194, - 186, 187, 31, 190, 196, 199, 0, 8029, 0, 0, - 35, 200, 201, 204, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6957, 8029, 210, 468, 213, - 0, -116, 0, -116, 173, -49, 216, 0, 468, 217, - 199, 0, 0, 184, 0, 0, 0, 0, 0, 0, - 468, 184, -116, 173, 38, 215, 218, 0, 0, 149, - 222, 221, 0, 0, 0, 0, 223, -116, 0, 468, - -116, 173, 0, 184, 224, 184, 4236, 0, 230, -116, + 31, 0, 0, 1411, 0, 0, 0, 40, -130, 58, + -165, 51, 65, 105, 82, 75, -167, 0, 0, 0, + -325, 120, 64, 8595, 74, 79, 80, 0, 7928, 81, + 7928, 0, 88, 0, 0, 8595, 8595, 7928, 106, 125, + 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7928, 7928, 6856, 84, 0, 0, 85, 7928, 7928, 7928, + 7928, 7928, 7928, 7928, 7928, 7928, 7928, 7928, 7928, 7928, + 7928, 7928, 7928, 7928, 7928, 8595, 8595, 7928, 7928, 7928, + 7928, 7928, 7928, 7928, 7928, 7928, 7928, 7928, 7928, 0, + -287, 151, 0, -324, 157, 0, 0, 0, 2, 0, + 162, 7392, 6856, 0, 164, -321, 33, 163, 7928, 0, + 7928, 0, 4, 7928, 7928, 0, 165, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -299, 0, 0, 468, 0, 468, 0, 225, -116, 219, - 0, -19, -49, 275, 235, -116, 0, 0, 0, 0, - 0, 4393, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 236, -116, 0, 0, 7091, 0, 0, 162, 8233, - 0, 0, 0, 0, 0, 0, -305, -287, 0, 0, - 0, 8029, 0, 0, 0, 0, 8585, 0, 0, 0, - 0, 0, 0, 0, 0, -60, 234, 468, 468, 276, - 278, 164, 240, -208, 249, 0, 249, 251, 4633, 0, - 0, 0, 468, 174, -265, 0, 7225, 250, -276, -266, - 468, 468, 0, 254, 247, -116, 661, 252, 246, 119, - 0, 43, 255, 0, 0, -116, 256, 54, 468, 258, - 4947, 259, 266, -263, 267, 269, 8029, 272, 8029, 249, - 64, 274, 279, 280, 0, 277, 0, 279, 79, 0, - 0, 0, 0, 429, 0, 0, 0, 281, 4633, 0, + 0, 0, 0, 0, 0, 0, 40, 40, -130, -130, + 164, 164, 58, 58, 58, 58, -165, -165, 51, 65, + 105, 82, 170, 75, -250, 0, 0, 171, 173, 178, + 43, 177, 176, 180, 0, 7928, 0, 0, 13, 166, + 179, 185, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6856, 7928, 184, 8595, 193, 0, -253, + 0, -253, 151, -114, 194, 0, 8595, 197, 180, 0, + 0, 164, 0, 0, 0, 0, 0, 0, 8595, 164, + -253, 151, -170, 186, 192, 0, 0, 122, 201, 199, + 0, 0, 0, 0, 200, -253, 0, 8595, -253, 151, + 0, 0, 198, 164, 4135, 0, 203, -253, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -96, 0, + 0, 8595, 0, 8595, 0, 202, -253, 195, 0, -157, + -114, 211, 209, -253, 0, 0, 0, 0, 0, 4292, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, + -253, 0, 0, 6990, 0, 0, 143, -217, 0, 0, + 0, 0, 0, 0, -322, -312, 0, 0, 0, 7928, + 0, 0, 0, 0, 8433, 0, 0, 0, 0, 0, + 0, 0, 0, -124, 216, 8595, 8595, 259, 260, 147, + 224, -270, 230, 0, 230, 232, 4532, 0, 0, 0, + 8595, 155, -305, 0, 7124, 234, -306, -303, 8595, 8595, + 0, 225, 228, -253, 587, 235, 226, 89, 0, 23, + 236, 0, 0, -253, 238, 29, 8595, 240, 4846, 248, + 249, -240, 254, 255, 7928, 258, 7928, 230, 36, 263, + 266, 274, 0, 271, 0, 266, -16, 0, 0, 0, + 0, 1411, 0, 0, 0, 280, 4532, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 271, 282, 209, 285, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -256, - 284, 288, 70, 0, 0, 249, 283, 125, 0, 134, - 286, 145, 146, -116, 227, 291, 0, 0, 0, 0, + 0, 273, 275, 205, 277, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -302, 283, 288, + 52, 0, 0, 230, 278, 94, 0, 97, 294, 103, + 114, -253, 217, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 295, - -116, 7627, 209, 0, 0, -116, -308, 155, 299, -116, - -116, 0, 0, -276, 0, 311, 7761, 468, 8029, 300, - 301, 8029, 8029, 0, 305, 8029, 308, -241, 0, 8163, - 186, 0, 279, 0, 8029, 4633, 0, 7493, 0, 0, - 0, 0, 0, 246, 312, 0, 309, -116, -116, 0, - -116, 0, 8029, 243, 0, 0, -116, 468, 468, 317, - 0, 315, 468, 321, 0, 0, -116, 322, 329, -36, - 0, 0, 334, 0, 0, 339, 0, 0, 0, 336, - 0, 0, 332, 0, 331, -239, 0, 333, 0, 0, - 0, 338, 340, 0, 342, 0, 344, 249, 400, 0, - 422, 423, 0, 8029, 79, 8029, 348, 351, 0, 350, - 0, 0, 352, 353, -116, 359, 0, 0, -212, 364, - -116, -116, -238, -233, 0, -240, 0, 0, -231, 0, - 0, 0, -116, 0, 0, 0, -36, 8029, 8029, 8029, - 414, 0, 4947, 4947, 369, 468, 0, 0, 75, 0, - 0, 0, 249, 0, 0, 4947, 0, 4947, 361, 371, - 156, 0, 363, 249, 249, 367, 405, 0, 452, 0, - 377, 378, 380, 381, 152, 386, 385, 0, 384, 0, - 383, 0, 8029, 456, 0, -61, 0, -226, 0, 0, - 0, 0, 0, 388, 389, 394, 0, 0, 0, 0, - 0, 0, 6957, 6957, 0, 468, 0, 0, 391, 8029, - 397, 4947, 8029, 382, 403, -61, 0, -61, 0, 0, - 406, -116, -116, -116, 0, 407, 410, -194, 0, 413, - 331, 0, 4947, 0, 415, 0, 0, 0, 4633, 0, - 249, 0, 427, 412, 0, 0, 424, 4947, 0, 0, - 4633, 0, 430, 419, 426, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 298, -253, 7526, + 205, 0, 0, -253, -309, 127, 297, -253, -253, 0, + 0, -306, 0, 305, 7660, 8595, 7928, 295, 299, 7928, + 7928, 0, 303, 7928, 306, -87, 0, 8062, 173, 0, + 266, 0, 7928, 4532, 0, 7392, 0, 0, 0, 0, + 0, 226, 309, 0, 310, -253, -253, 0, -253, 0, + 7928, 227, 0, 0, -253, 8595, 8595, 315, 0, 313, + 8595, 300, 0, 0, -253, 317, 323, -80, 0, 0, + 329, 0, 0, 333, 0, 0, 0, 326, 0, 0, + 324, 0, 331, -300, 0, 327, 0, 0, 0, 335, + 336, 0, 337, 0, 342, 230, 403, 0, 421, 424, + 0, 7928, -16, 7928, 347, 350, 0, 349, 0, 0, + 351, 352, -253, 357, 0, 0, -230, 362, -253, -253, + -274, -267, 0, -234, 0, 0, -264, 0, 0, 0, + -253, 0, 0, 0, -80, 7928, 7928, 7928, 412, 0, + 4846, 4846, 368, 8595, 0, 0, 66, 0, 0, 0, + 230, 0, 0, 4846, 0, 4846, 360, 370, 128, 0, + 365, 230, 230, 367, 398, 0, 457, 0, 374, 375, + 377, 378, 134, 382, 381, 0, 380, 0, 379, 0, + 7928, 448, 0, 48, 0, -258, 0, 0, 0, 0, + 0, 384, 385, 386, 0, 0, 0, 0, 0, 0, + 6856, 6856, 0, 8595, 0, 0, 388, 7928, 393, 4846, + 7928, 383, 389, 48, 0, 48, 0, 0, 394, -253, + -253, -253, 0, 395, 397, -241, 0, 399, 331, 0, + 4846, 0, 401, 0, 0, 0, 4532, 0, 230, 0, + 391, 415, 0, 0, 407, 4846, 0, 0, 4532, 0, + 414, 404, 411, 0, 0, 0, 0, 0, }; - protected static short [] yyRindex = { 8996, - 0, 0, 9143, 8886, 0, 0, 0, -76, 0, 0, - 2129, 28, 9198, 0, 813, 0, 0, 0, 0, 0, - 0, 0, 0, 81, 0, 0, 0, 85, 0, 0, - 9051, 0, 0, 0, 0, 0, 0, 0, 0, 0, + protected static short [] yyRindex = { 8851, + 0, 0, 8994, 8741, 0, 0, 0, 38, 0, 0, + 2162, -4, 9036, 760, 0, 0, 0, 0, 0, 0, + 0, 19, 0, 0, 0, 22, 0, 0, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 433, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8315, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 8132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1681, - 0, 0, 0, 0, 1838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1995, 0, 0, 0, 2397, - 2799, 2933, 5081, 5483, 5751, 5885, 6287, 6555, 6823, 0, - 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1714, 0, 0, + 0, 0, 1871, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8741, 0, 432, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 434, 0, 0, 0, 0, 0, + 0, 0, 0, 2028, 0, 0, 0, 2296, 2698, 2832, + 4980, 5382, 5650, 5784, 6186, 6454, 6722, 0, 0, 0, + 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8593, 0, + 417, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 419, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 9073, 8941, 0, 0, 440, 0, 0, 0, - 0, 0, 0, 442, 434, 2263, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 443, + 8895, 8796, 0, 0, 422, 0, 0, 0, 0, 0, + 0, 423, 419, 0, 1243, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2531, 2665, - 3067, 3201, 3335, 3469, 3603, 3737, 3871, 4005, 5215, 5349, - 5617, 6019, 6153, 6421, 0, 6689, 9126, 0, 0, 449, - 442, 0, 0, 0, 450, 451, 0, 0, 0, 0, - 0, 0, 454, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2430, 2564, 2966, 3100, + 3234, 3368, 3502, 3636, 3770, 3904, 5114, 5248, 5516, 5918, + 6052, 6320, 0, 6588, 8939, 0, 0, 427, 423, 0, + 0, 0, 428, 429, 0, 0, 0, 0, 0, 0, + 431, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 8376, + 0, -327, 841, 0, 0, 0, 0, 0, 436, 0, + 0, 1400, 0, 0, 0, 0, 0, 0, 437, 8452, + 922, 841, 8601, 0, 142, 0, 0, 0, 0, 438, + 0, 0, 0, 0, 440, 8238, 0, -161, 1084, 841, + 0, 0, 1557, 8509, 8214, 0, 0, 1003, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8553, 0, -318, -235, 0, 0, 0, 0, 0, - 453, 0, 0, 1210, 0, 0, 0, 0, 0, 0, - 458, 8632, 889, -235, 8742, 0, 157, 0, 0, 0, - 0, 459, 0, 0, 0, 0, 461, 8426, 0, -80, - 1051, -235, 0, 1367, 1524, 8668, 8382, 0, 0, 970, + 0, 0, 0, 0, 0, 0, 8376, -48, 0, 363, + 0, 8528, 0, 8290, 0, 0, 0, 0, 0, 8214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8553, -29, - 0, 374, 0, 8720, 0, 8478, 0, 0, 0, 0, - 0, 8382, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1130, 0, 0, 0, 0, 0, 0, 0, + 1163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -225, 0, 0, 0, 0, 0, 463, 0, + -281, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 160, 0, 0, 8509, 0, 0, -12, 0, - 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 445, 0, 445, 0, - 0, 0, 387, 0, 0, 9299, 0, -327, -108, 9155, - 9178, 9237, 9248, 0, 584, 1195, 0, 0, 465, 0, + 145, 0, 0, 8357, 0, 0, -61, 0, 0, 0, + 0, 0, 0, 150, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 434, 0, 434, 0, 0, 0, + 371, 0, 0, 9137, 0, -299, 1224, 8993, 9016, 9075, + 9086, 0, 1385, 1542, 0, 0, 444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 8509, 0, 0, 0, 0, 0, 0, + 0, 8357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8376, 0, + 0, 0, 0, 8357, 0, 0, 0, 77, -41, 0, + 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 423, 0, + 376, 0, 0, 0, 0, 423, 0, 0, 0, 0, + 0, 7258, 7794, 0, 0, 8357, 8376, 0, 8357, 0, + 0, 0, 0, 0, -206, 0, 0, 0, 0, 446, + 0, 0, 0, 0, 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8553, 0, 0, 0, 0, 8509, 0, 0, 0, 2, - -150, 0, 0, 0, 0, 0, 462, 0, 0, 0, + 0, 0, 447, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4218, 0, 4061, 0, + 0, 0, 371, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 150, 0, 0, 0, 0, 0, 465, 532, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 442, 0, 402, 0, 0, 0, 0, 442, 0, 0, - 0, 0, 0, 7359, 7895, 0, 0, 8509, 8553, 0, - 8509, 0, 0, 0, 0, 0, -115, 0, 0, 0, - 0, 467, 0, 0, 0, 0, 172, 0, 0, 0, + 8376, 0, 0, 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 473, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4319, 0, - 4162, 0, 0, 0, 387, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, - 499, 563, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 8553, 0, 0, 0, 0, 0, 481, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4375, 0, 456, 0, 454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 4476, 0, 491, 0, 489, 0, 0, + 419, 419, 0, 0, 0, 0, 0, 464, 0, 0, + 0, 0, 0, 469, 0, 4689, 0, 0, 0, 150, + 78, -26, 0, 0, 0, 0, 0, 0, 466, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 434, 434, 0, 0, 0, 0, 0, 490, - 0, 0, 0, 0, 0, 496, 0, 4790, 0, 0, - 0, 172, 48, 5, 0, 0, 0, 0, 0, 0, - 493, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -123, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -184, 0, + 0, 0, 0, 0, 0, 0, 0, 0, }; protected static short [] yyGindex = { 0, - 618, -3, 555, 0, 839, 0, 0, 195, 0, 0, - 0, 8, 0, 0, -45, 0, 0, 814, -158, 0, - 0, 0, 0, 0, 0, 0, 834, 0, 0, 0, - 0, 698, 0, 0, -22, 0, -25, 0, 0, 0, - 0, 0, 482, -206, -161, -156, -153, -146, -135, -110, - -107, 0, 825, 0, 0, 0, 0, 523, 528, 0, - 0, 446, 229, 0, -454, -624, -415, 268, -453, 501, - 0, 0, -272, -501, -192, -319, 0, 475, 478, 0, - 0, -321, 212, 0, 0, 270, 0, 273, 0, 147, - 0, 0, 0, 0, 0, 0, 0, 0, 476, 0, - 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -234, 0, 163, 165, 0, - 0, 0, 586, 0, 0, 494, 67, 0, 549, -429, - 0, 0, 0, -193, 0, 0, 0, 17, 114, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 572, - 643, -10, 151, 0, 0, 0, -223, -306, 0, 0, - 27, 161, 208, 0, 198, 248, 253, 298, 676, 681, - 675, 682, 679, 0, 0, 263, -609, 0, 0, 0, - 837, 0, 0, 0, 76, -513, 0, -484, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -558, - 0, 0, -134, 0, 287, -596, 0, 0, 0, 0, - 0, 0, 97, 0, 0, 104, 0, 0, 0, 0, - 0, 0, 0, 0, 106, 0, 0, 0, 0, 0, - 0, 416, 0, 228, 0, 0, 0, 226, 220, 0, - 0, + 592, -3, 533, 0, 813, 0, 0, 44, 0, 0, + 0, 8, 0, 0, -75, 0, 0, 790, -159, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, + 0, 0, -18, 0, -25, 0, 0, 0, 0, 0, + 453, -215, -158, -156, -155, -154, -148, -146, -142, 0, + 796, 0, 0, 0, 0, 494, 497, 0, 0, 418, + 229, 0, -448, -624, -387, 237, -460, 467, 0, 0, + -401, -488, -195, -317, 0, 451, 452, 0, 0, -311, + 181, 0, 0, 241, 0, 233, 0, 108, 0, 0, + 0, 0, 0, 0, 0, 0, 455, 0, 0, 0, + 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -232, 0, 124, 136, 0, 0, 0, + 555, 0, 0, 460, 67, 0, -227, -429, 0, 0, + 0, -418, 0, 0, 0, 5, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 537, 602, -101, + 60, 0, 0, 0, 0, -436, 0, 0, 27, 161, + 169, 0, 119, 270, 204, 284, 639, 641, 643, 640, + 645, 0, 0, 191, -587, 0, 0, 0, 799, 0, + 0, 0, 42, -515, 0, -482, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -393, 0, 0, + -225, 0, 244, -599, 0, 0, 0, 0, 0, 0, + 63, 0, 0, 62, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 0, 0, 0, 0, 0, 0, 387, + 0, 187, 0, 0, 0, 182, 188, 0, 0, }; protected static short [] yyTable = { 13, - 304, 49, 346, 609, 356, 631, 606, 21, 11, 28, - 672, 610, 305, 555, 659, 700, 43, 112, 707, 281, - 1, 12, 763, 219, 12, 11, 687, 28, 12, 509, - 12, 11, 291, 12, 51, 12, 12, 291, 12, 22, - 12, 423, 12, 688, 12, 12, 12, 12, 671, 754, - 424, 12, 241, 20, 560, 291, 12, 552, 12, 12, - 12, 696, 650, 12, 12, 12, 291, 12, 220, 172, - 12, 435, 12, 12, 12, 12, 291, 291, 16, 12, - 12, 12, 764, 12, 12, 12, 291, 221, 11, 509, - 40, 432, 12, 12, 658, 477, 12, 16, 12, 12, - 33, 755, 171, 291, 291, 208, 12, 12, 292, 291, - 651, 291, 701, 460, 478, 12, 291, 16, 769, 770, - 635, 16, 174, 175, 176, 177, 178, 179, 180, 181, - 49, 461, 483, 772, 291, 230, 703, 233, 655, 706, - 305, 209, 557, 459, 240, 23, 33, 166, 291, 669, - 231, 459, 479, 553, 404, 611, 291, 244, 230, 306, - 11, 173, 637, 11, 254, 255, 256, 257, 258, 259, - 260, 261, 262, 263, 264, 11, 11, 509, 825, 731, - 761, 482, 8, 12, 368, 762, 33, 765, 426, 708, - 695, 130, 810, 16, 285, 9, 509, 561, 33, 405, - 210, 211, 403, 672, 406, 803, 404, 407, 230, 27, - 479, 368, 41, 804, 408, 11, 11, 212, 459, 213, - 312, 312, 166, 301, 837, 409, 12, 265, 266, 267, - 268, 268, 268, 268, 166, 166, 268, 268, 268, 268, - 268, 268, 268, 268, 268, 268, 323, 268, 774, 775, - 410, 405, 12, 411, 403, 291, 406, 18, 307, 407, - 79, 780, 484, 781, 485, 510, 408, 309, 79, 310, - 16, 654, 333, 16, 166, 166, 323, 409, 323, 354, - 323, 466, 323, 28, 323, 152, 323, 467, 323, 153, - 323, 339, 323, 19, 323, 603, 72, 510, 382, 73, - 204, 205, 410, 355, 423, 411, 155, 618, 619, 165, - 432, 156, 223, 724, 698, 157, 415, 824, 223, 704, - 350, 698, 433, 12, 79, 510, 11, 631, 123, 80, - 158, 20, 123, 11, 16, 102, 11, 102, 839, 367, - 33, 33, 383, 132, 384, 84, 163, 85, 11, 385, - 201, 202, 203, 847, 394, 386, 159, 402, 91, 92, - 386, 161, 94, 642, 386, 162, 367, 11, 622, 40, - 355, 39, 39, 627, 42, 39, 297, 311, 334, 386, - 298, 298, 298, 595, 226, 166, 33, 596, 350, 162, - 443, 11, 394, 11, 423, 166, 238, 239, 163, 509, - 11, 269, 270, 767, 423, 386, 462, 166, 170, 402, - 640, 509, 69, 510, 641, 423, 184, 50, 185, 736, - 186, 628, 67, 185, 50, 186, 166, 11, 50, 355, - 163, 355, 510, 182, 168, 183, 273, 274, 187, 169, - 188, 443, 170, 187, 11, 188, 206, 355, 207, 214, - 166, 215, 166, 271, 272, 11, 11, 189, 234, 11, - 235, 11, 275, 276, 277, 278, 593, 725, 594, 216, - 11, 614, 644, 614, 645, 511, 219, 11, 11, 11, - 217, 593, 598, 646, 218, 514, 166, 291, 291, 648, - 649, 660, 784, 661, 785, 737, 11, 795, 223, 796, - 112, 225, 112, 166, 123, 227, 16, 511, 33, 228, - 33, 279, 280, 242, 166, 166, 243, 514, 229, 232, - 252, 253, 288, 293, 299, 508, 291, 308, 315, 166, - 324, 322, 316, 300, 725, 511, 510, 166, 166, 510, - 510, 317, 319, 335, 326, 514, 779, 329, 336, 337, - 779, 340, 510, 343, 510, 166, 358, 361, 816, 817, - 388, 788, 789, 391, 416, 389, 443, 390, 392, 366, - 393, 421, 512, 432, 429, 436, 438, 440, 468, 471, - 447, 472, 473, 677, 476, 508, 681, 683, 366, 423, - 685, 486, 551, 565, 591, 556, 663, 666, 564, 681, - 592, 597, 230, 607, 512, 602, 510, 605, 510, 513, - 608, 612, 427, 613, 428, 11, 616, 677, 620, 515, - 632, 621, 630, 511, 625, 626, 647, 634, 638, 510, - 639, 633, 512, 514, 636, 510, 652, 643, 842, 653, - 662, 513, 511, 709, 510, 651, 670, 510, 454, 679, - 680, 515, 514, 598, 684, 11, 11, 686, 702, 593, - 11, 557, 715, 716, 720, 465, 516, 722, 172, 513, - 745, 723, 661, 508, 166, 660, 469, 470, 730, 515, - 728, 729, 732, 733, 688, 734, 508, 735, 736, 739, - 743, 550, 508, 746, 747, 748, 750, 749, 516, 562, - 563, 751, 681, 681, 753, 756, 773, 757, 759, 776, - 782, 783, 787, 754, 166, 166, 790, 604, 755, 166, - 512, 517, 791, 792, 793, 794, 516, 797, 798, 799, - 826, 71, 800, 72, 802, 815, 73, 813, 814, 512, - 819, 75, 823, 11, 827, 76, 511, 801, 845, 511, - 511, 831, 835, 517, 78, 836, 514, 513, 838, 514, - 514, 79, 511, 840, 511, 844, 80, 515, 849, 846, - 83, 848, 514, 10, 514, 850, 513, 677, 281, 283, - 215, 517, 84, 190, 85, 308, 515, 87, 284, 402, - 141, 75, 33, 76, 495, 91, 92, 309, 404, 94, - 220, 143, 166, 11, 407, 432, 408, 200, 751, 833, - 834, 471, 33, 191, 516, 192, 511, 193, 511, 194, - 433, 195, 474, 196, 33, 197, 514, 198, 514, 199, - 475, 200, 454, 516, 509, 477, 676, 455, 479, 511, - 287, 318, 17, 512, 68, 511, 512, 512, 39, 514, - 222, 422, 64, 363, 511, 514, 360, 511, 441, 512, - 656, 512, 166, 430, 514, 417, 431, 514, 721, 517, - 667, 439, 665, 768, 760, 758, 713, 714, 323, 832, - 513, 719, 364, 513, 513, 434, 40, 338, 517, 314, - 515, 281, 283, 515, 515, 508, 513, 282, 513, 286, - 284, 160, 828, 0, 841, 821, 515, 508, 515, 699, - 742, 830, 0, 512, 617, 512, 738, 744, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 445, - 0, 445, 0, 445, 0, 0, 512, 516, 330, 0, - 516, 516, 512, 0, 568, 0, 0, 0, 0, 0, - 513, 512, 513, 516, 512, 516, 0, 0, 0, 0, - 515, 0, 515, 0, 778, 0, 0, 0, 330, 0, - 330, 0, 330, 513, 330, 0, 330, 0, 330, 513, - 330, 0, 330, 515, 330, 569, 330, 0, 513, 515, - 0, 513, 517, 0, 0, 517, 517, 0, 515, 0, - 0, 515, 0, 0, 0, 0, 0, 516, 517, 516, - 517, 570, 571, 572, 573, 0, 574, 575, 576, 577, - 578, 579, 580, 581, 818, 582, 0, 583, 0, 584, - 516, 585, 0, 586, 0, 587, 516, 588, 0, 589, - 0, 0, 0, 0, 0, 516, 0, 0, 516, 0, + 302, 629, 344, 47, 553, 670, 604, 303, 11, 26, + 37, 19, 354, 657, 216, 110, 705, 550, 289, 41, + 289, 289, 16, 11, 304, 26, 607, 507, 761, 11, + 289, 752, 49, 475, 608, 698, 289, 289, 508, 289, + 289, 16, 289, 20, 9, 1, 69, 278, 70, 25, + 480, 71, 476, 153, 446, 33, 73, 229, 154, 39, + 74, 16, 155, 447, 448, 16, 559, 170, 289, 76, + 508, 8, 289, 648, 449, 289, 77, 156, 289, 433, + 558, 78, 456, 753, 289, 81, 11, 507, 762, 12, + 456, 33, 12, 38, 290, 206, 458, 82, 508, 83, + 169, 289, 85, 157, 362, 656, 459, 33, 699, 649, + 89, 90, 555, 551, 92, 477, 635, 450, 729, 429, + 172, 173, 174, 175, 176, 177, 178, 179, 770, 653, + 299, 207, 47, 228, 381, 231, 382, 16, 767, 768, + 481, 383, 238, 402, 759, 164, 633, 701, 477, 21, + 704, 760, 16, 667, 763, 242, 228, 456, 11, 171, + 808, 11, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 11, 11, 507, 823, 835, 609, 76, + 685, 366, 696, 424, 431, 12, 508, 76, 693, 696, + 208, 209, 283, 706, 507, 402, 218, 686, 670, 401, + 403, 451, 404, 405, 406, 508, 228, 210, 366, 211, + 407, 669, 408, 11, 11, 219, 409, 464, 310, 310, + 164, 202, 203, 465, 694, 263, 264, 265, 266, 266, + 266, 266, 164, 164, 266, 266, 266, 266, 266, 266, + 266, 266, 266, 266, 421, 266, 150, 352, 772, 773, + 151, 401, 403, 422, 404, 405, 406, 482, 17, 483, + 421, 778, 407, 779, 408, 307, 380, 308, 409, 722, + 331, 652, 164, 164, 182, 620, 183, 18, 184, 120, + 625, 26, 153, 120, 413, 16, 99, 154, 99, 337, + 601, 155, 383, 220, 48, 33, 185, 383, 186, 220, + 127, 383, 616, 617, 38, 353, 156, 163, 70, 508, + 33, 71, 508, 508, 801, 160, 383, 822, 348, 702, + 267, 268, 802, 629, 11, 508, 626, 508, 183, 159, + 184, 11, 157, 160, 11, 40, 77, 365, 837, 36, + 36, 78, 383, 36, 67, 295, 11, 309, 185, 296, + 186, 296, 392, 845, 65, 400, 332, 82, 640, 83, + 296, 161, 47, 593, 365, 11, 47, 594, 166, 421, + 89, 90, 353, 161, 92, 289, 421, 187, 305, 508, + 168, 508, 224, 164, 16, 167, 348, 16, 441, 11, + 392, 11, 638, 164, 236, 237, 639, 507, 11, 199, + 200, 201, 508, 765, 460, 164, 421, 400, 508, 507, + 734, 273, 274, 275, 276, 33, 33, 508, 129, 159, + 508, 180, 214, 181, 164, 11, 204, 212, 205, 213, + 232, 353, 233, 353, 271, 272, 591, 168, 592, 441, + 216, 642, 11, 643, 591, 289, 644, 646, 164, 353, + 164, 239, 18, 11, 11, 217, 289, 11, 647, 11, + 221, 509, 723, 658, 782, 659, 783, 215, 11, 612, + 240, 612, 510, 269, 270, 11, 11, 11, 241, 793, + 596, 794, 223, 512, 164, 109, 33, 109, 33, 120, + 735, 16, 225, 509, 11, 277, 278, 226, 227, 230, + 286, 164, 250, 251, 510, 291, 289, 297, 306, 333, + 313, 434, 164, 164, 314, 512, 511, 322, 315, 317, + 298, 509, 320, 506, 324, 338, 334, 164, 327, 723, + 335, 386, 510, 341, 356, 164, 164, 359, 414, 387, + 388, 777, 389, 512, 419, 777, 390, 391, 511, 430, + 436, 427, 23, 164, 438, 33, 786, 787, 814, 815, + 466, 445, 469, 470, 441, 471, 33, 364, 474, 562, + 421, 33, 484, 549, 563, 33, 511, 589, 33, 554, + 590, 675, 595, 506, 679, 681, 364, 600, 683, 603, + 33, 33, 605, 606, 661, 664, 33, 679, 610, 611, + 228, 33, 614, 33, 33, 33, 33, 618, 619, 509, + 425, 33, 426, 11, 33, 675, 33, 513, 623, 624, + 510, 628, 630, 632, 631, 514, 634, 636, 509, 33, + 637, 512, 641, 840, 645, 649, 650, 23, 660, 510, + 668, 707, 651, 718, 677, 555, 452, 515, 678, 513, + 512, 596, 682, 11, 11, 684, 591, 514, 11, 700, + 713, 714, 720, 463, 511, 721, 170, 659, 743, 658, + 726, 506, 164, 727, 467, 468, 730, 513, 728, 515, + 731, 732, 733, 511, 506, 514, 734, 686, 737, 548, + 506, 741, 744, 745, 746, 748, 747, 560, 561, 749, + 679, 679, 751, 754, 771, 755, 757, 515, 774, 780, + 781, 753, 164, 164, 785, 602, 788, 164, 752, 789, + 790, 791, 792, 795, 796, 797, 800, 813, 798, 842, + 825, 824, 509, 811, 812, 509, 509, 817, 821, 829, + 833, 11, 834, 510, 836, 799, 510, 510, 509, 838, + 509, 843, 844, 847, 512, 846, 10, 512, 512, 510, + 848, 510, 212, 278, 280, 513, 305, 399, 138, 72, + 512, 281, 512, 514, 306, 675, 73, 401, 33, 217, + 140, 33, 404, 492, 513, 405, 197, 511, 468, 429, + 511, 511, 514, 33, 430, 515, 471, 451, 472, 506, + 164, 11, 509, 511, 509, 511, 749, 831, 832, 474, + 452, 476, 285, 510, 515, 510, 15, 316, 66, 220, + 420, 62, 361, 358, 512, 509, 512, 654, 439, 415, + 663, 509, 766, 758, 674, 719, 510, 428, 429, 665, + 509, 830, 510, 509, 756, 321, 312, 512, 437, 432, + 336, 510, 279, 512, 510, 280, 282, 511, 281, 511, + 164, 158, 512, 284, 697, 512, 826, 828, 839, 819, + 566, 742, 0, 736, 711, 712, 740, 0, 0, 717, + 511, 0, 0, 615, 0, 0, 511, 0, 513, 0, + 0, 513, 513, 506, 0, 511, 514, 0, 511, 514, + 514, 0, 0, 0, 513, 506, 513, 0, 0, 0, + 0, 567, 514, 0, 514, 0, 0, 0, 515, 0, + 0, 515, 515, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 515, 0, 515, 568, 569, 570, + 571, 0, 572, 573, 574, 575, 576, 577, 578, 579, + 0, 580, 0, 581, 0, 582, 0, 583, 513, 584, + 513, 585, 776, 586, 0, 587, 514, 0, 514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 517, 0, 517, 0, 0, 0, 0, 35, - 0, 0, 35, 0, 35, 0, 35, 0, 35, 0, - 0, 35, 0, 35, 35, 517, 35, 0, 35, 0, - 35, 517, 35, 35, 35, 35, 0, 0, 0, 35, - 517, 0, 0, 517, 35, 0, 35, 35, 35, 0, - 0, 35, 35, 35, 0, 35, 0, 35, 35, 35, - 35, 35, 35, 35, 35, 0, 35, 35, 35, 35, - 0, 35, 35, 35, 0, 0, 0, 0, 0, 0, - 35, 35, 0, 0, 35, 0, 35, 35, 33, 35, - 0, 35, 33, 0, 33, 0, 0, 33, 0, 33, - 33, 0, 33, 35, 33, 0, 33, 0, 33, 33, - 33, 33, 0, 0, 0, 33, 0, 0, 0, 0, - 33, 0, 33, 33, 33, 0, 0, 33, 0, 33, - 0, 33, 0, 0, 33, 0, 33, 33, 33, 33, - 0, 0, 0, 33, 33, 33, 0, 33, 33, 33, - 0, 0, 0, 0, 0, 0, 33, 33, 0, 0, - 33, 0, 33, 33, 0, 0, 0, 0, 0, 33, - 59, 35, 0, 33, 0, 33, 0, 0, 33, 33, + 0, 513, 0, 0, 0, 0, 0, 513, 515, 514, + 515, 0, 0, 0, 0, 514, 513, 0, 0, 513, + 0, 0, 0, 0, 514, 0, 0, 514, 0, 0, + 0, 515, 0, 0, 0, 0, 33, 515, 0, 33, + 0, 33, 816, 33, 0, 33, 515, 0, 33, 515, 33, 33, 0, 33, 0, 33, 0, 33, 0, 33, 33, 33, 33, 0, 0, 0, 33, 0, 0, 0, - 0, 33, 0, 33, 33, 33, 0, 0, 33, 0, - 33, 0, 33, 0, 0, 33, 0, 33, 33, 33, - 33, 0, 0, 0, 33, 33, 33, 0, 33, 33, + 0, 33, 0, 33, 33, 33, 0, 0, 33, 33, + 33, 0, 33, 0, 33, 33, 33, 33, 33, 33, + 33, 33, 0, 33, 33, 33, 33, 0, 33, 33, 33, 0, 0, 0, 0, 0, 0, 33, 33, 0, - 0, 33, 0, 33, 33, 0, 0, 33, 0, 0, - 33, 60, 0, 0, 33, 0, 33, 0, 0, 33, - 33, 33, 33, 0, 33, 0, 33, 0, 33, 0, - 33, 33, 33, 33, 0, 0, 0, 33, 0, 0, - 0, 0, 33, 0, 33, 33, 33, 0, 0, 33, - 0, 33, 0, 33, 0, 0, 33, 0, 33, 33, - 33, 33, 0, 0, 0, 33, 33, 33, 0, 33, - 33, 33, 0, 0, 0, 0, 0, 0, 33, 33, - 0, 0, 33, 0, 33, 33, 0, 0, 33, 33, - 0, 0, 81, 33, 0, 33, 0, 0, 33, 0, - 33, 33, 0, 33, 0, 33, 0, 33, 0, 33, - 33, 33, 33, 0, 0, 0, 33, 0, 0, 0, - 0, 33, 0, 33, 33, 33, 0, 0, 33, 0, - 33, 0, 33, 0, 0, 33, 0, 33, 33, 33, - 33, 0, 0, 0, 33, 33, 33, 0, 33, 33, - 33, 0, 0, 0, 0, 0, 0, 33, 33, 0, - 0, 33, 0, 33, 33, 0, 0, 0, 0, 33, - 303, 82, 303, 303, 0, 303, 0, 0, 303, 303, - 0, 0, 0, 303, 0, 0, 0, 303, 0, 0, - 0, 0, 0, 303, 0, 0, 303, 0, 0, 0, - 0, 0, 0, 303, 0, 0, 303, 0, 303, 0, - 303, 303, 303, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 303, 0, 303, 303, 0, 303, - 0, 0, 303, 0, 303, 0, 303, 303, 303, 303, - 446, 303, 446, 0, 446, 0, 0, 0, 33, 331, - 303, 303, 0, 303, 303, 303, 303, 303, 303, 303, - 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, - 303, 303, 303, 303, 303, 0, 303, 0, 303, 331, - 303, 331, 303, 331, 303, 331, 303, 331, 303, 331, - 303, 331, 303, 331, 303, 331, 303, 331, 303, 0, - 303, 0, 303, 0, 303, 0, 303, 0, 303, 0, - 303, 0, 303, 0, 0, 0, 303, 0, 303, 0, - 303, 0, 303, 0, 303, 0, 303, 304, 303, 304, - 304, 0, 304, 0, 0, 304, 304, 0, 0, 0, - 304, 0, 0, 0, 304, 0, 0, 0, 0, 0, - 304, 0, 0, 304, 0, 0, 0, 0, 0, 0, - 304, 0, 0, 304, 0, 304, 0, 304, 304, 304, + 0, 33, 0, 33, 33, 0, 33, 12, 33, 0, + 12, 0, 0, 0, 12, 0, 12, 0, 0, 12, + 33, 12, 12, 0, 12, 0, 12, 0, 12, 0, + 12, 12, 12, 12, 0, 0, 0, 12, 0, 0, + 0, 0, 12, 0, 12, 12, 12, 0, 0, 12, + 12, 12, 0, 12, 0, 0, 12, 0, 12, 12, + 12, 12, 0, 0, 0, 12, 12, 12, 0, 12, + 12, 12, 0, 0, 0, 0, 0, 0, 12, 12, + 0, 0, 12, 0, 12, 12, 0, 0, 33, 0, + 0, 33, 12, 12, 0, 33, 0, 33, 0, 0, + 33, 12, 33, 33, 0, 33, 0, 33, 0, 33, + 0, 33, 33, 33, 33, 0, 0, 0, 33, 0, + 0, 0, 0, 33, 0, 33, 33, 33, 0, 0, + 33, 0, 33, 0, 33, 0, 0, 33, 0, 33, + 33, 33, 33, 0, 0, 0, 33, 33, 33, 0, + 33, 33, 33, 0, 0, 0, 0, 0, 0, 33, + 33, 0, 0, 33, 0, 33, 33, 0, 0, 12, + 0, 0, 33, 56, 0, 0, 33, 0, 33, 0, + 0, 33, 33, 33, 33, 0, 33, 0, 33, 0, + 33, 0, 33, 33, 33, 33, 0, 0, 0, 33, + 0, 0, 0, 0, 33, 0, 33, 33, 33, 0, + 0, 33, 0, 33, 0, 33, 0, 0, 33, 0, + 33, 33, 33, 33, 0, 0, 0, 33, 33, 33, + 0, 33, 33, 33, 0, 0, 0, 0, 0, 0, + 33, 33, 0, 0, 33, 0, 33, 33, 0, 0, + 33, 0, 0, 33, 57, 0, 0, 33, 0, 33, + 0, 0, 33, 33, 33, 33, 0, 33, 0, 33, + 0, 33, 0, 33, 33, 33, 33, 0, 0, 0, + 33, 0, 0, 0, 0, 33, 0, 33, 33, 33, + 0, 0, 33, 0, 33, 0, 33, 0, 0, 33, + 0, 33, 33, 33, 33, 0, 0, 0, 33, 33, + 33, 0, 33, 33, 33, 0, 0, 0, 0, 0, + 0, 33, 33, 0, 0, 33, 0, 33, 33, 0, + 0, 33, 33, 0, 0, 78, 33, 0, 33, 0, + 0, 33, 0, 33, 33, 0, 33, 0, 33, 0, + 33, 0, 33, 33, 33, 33, 0, 0, 0, 33, + 0, 0, 0, 0, 33, 0, 33, 33, 33, 0, + 0, 33, 0, 33, 0, 33, 0, 0, 33, 0, + 33, 33, 33, 33, 0, 0, 0, 33, 33, 33, + 0, 33, 33, 33, 0, 0, 0, 0, 0, 0, + 33, 33, 0, 0, 33, 0, 33, 33, 0, 0, + 0, 0, 33, 302, 79, 302, 302, 0, 302, 0, + 0, 302, 302, 0, 0, 0, 302, 0, 0, 0, + 302, 0, 0, 0, 0, 0, 302, 0, 0, 302, + 0, 0, 0, 0, 0, 0, 302, 0, 0, 302, + 0, 302, 0, 302, 302, 302, 302, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 302, 0, 302, + 302, 0, 302, 0, 0, 302, 0, 302, 0, 302, + 302, 302, 302, 0, 302, 0, 0, 0, 320, 0, + 0, 33, 0, 302, 302, 0, 302, 302, 302, 302, + 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, + 302, 302, 302, 302, 302, 302, 302, 302, 320, 302, + 320, 302, 320, 302, 320, 302, 320, 302, 320, 302, + 320, 302, 320, 302, 320, 302, 320, 302, 0, 302, + 0, 302, 0, 302, 0, 302, 0, 302, 0, 302, + 0, 302, 429, 302, 0, 302, 0, 0, 0, 302, + 0, 302, 0, 302, 0, 302, 0, 302, 0, 302, + 300, 302, 300, 300, 0, 300, 0, 0, 300, 300, + 0, 0, 0, 300, 0, 0, 0, 300, 0, 0, + 0, 0, 0, 300, 0, 0, 300, 0, 0, 0, + 0, 0, 0, 300, 0, 0, 300, 0, 300, 0, + 300, 300, 300, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 300, 0, 300, 300, 0, 300, + 0, 0, 300, 0, 300, 0, 300, 300, 300, 300, + 442, 300, 442, 0, 442, 0, 0, 0, 0, 327, + 300, 300, 0, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 188, 300, 0, 300, 327, + 300, 327, 300, 327, 300, 327, 300, 327, 300, 327, + 300, 327, 300, 327, 300, 327, 300, 327, 300, 0, + 300, 0, 300, 0, 300, 189, 300, 190, 300, 191, + 300, 192, 300, 193, 0, 194, 300, 195, 300, 196, + 300, 197, 300, 198, 300, 0, 300, 309, 300, 309, + 309, 0, 309, 0, 0, 309, 309, 0, 0, 0, + 309, 0, 0, 0, 309, 0, 0, 0, 0, 0, + 309, 0, 0, 309, 0, 0, 0, 0, 0, 0, + 309, 0, 0, 309, 0, 309, 0, 309, 309, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 304, 0, 304, 304, 0, 304, 0, 0, 304, - 0, 304, 0, 304, 304, 304, 304, 0, 304, 0, - 0, 0, 0, 0, 0, 0, 0, 304, 304, 0, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 0, 304, 0, 304, 0, 304, 0, 304, - 0, 304, 0, 304, 0, 304, 0, 304, 0, 304, - 0, 304, 0, 304, 0, 304, 0, 304, 0, 304, - 0, 304, 0, 304, 0, 304, 0, 304, 0, 304, - 0, 0, 0, 304, 0, 304, 0, 304, 0, 304, - 0, 304, 0, 304, 312, 304, 312, 312, 0, 312, - 0, 0, 312, 312, 0, 0, 0, 312, 0, 0, - 0, 312, 0, 0, 0, 0, 0, 312, 0, 0, - 312, 0, 0, 0, 0, 0, 0, 312, 0, 0, - 312, 0, 312, 0, 312, 312, 312, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 312, 0, - 312, 312, 0, 312, 0, 0, 312, 0, 312, 0, - 312, 312, 312, 312, 0, 312, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 312, 312, 312, 312, 312, - 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, - 312, 312, 312, 312, 312, 312, 312, 312, 312, 0, - 312, 0, 312, 0, 312, 0, 312, 0, 312, 0, - 312, 0, 312, 0, 312, 0, 312, 0, 312, 0, - 312, 0, 312, 0, 312, 0, 312, 0, 312, 0, - 312, 0, 312, 0, 312, 0, 312, 0, 0, 0, - 312, 0, 312, 0, 312, 0, 312, 0, 312, 0, - 312, 252, 312, 252, 252, 0, 252, 0, 0, 252, - 252, 0, 0, 0, 252, 0, 0, 0, 252, 0, - 0, 0, 0, 0, 252, 0, 0, 252, 0, 0, - 0, 0, 0, 0, 252, 0, 0, 252, 0, 252, - 0, 252, 252, 252, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 252, 0, 252, 252, 0, - 252, 0, 0, 252, 0, 252, 0, 252, 252, 252, - 252, 0, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 252, 252, 252, 252, 252, 0, 252, 252, - 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, - 252, 252, 252, 252, 252, 252, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 252, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 252, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 252, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 0, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 252, 0, 252, 323, 252, - 323, 323, 0, 323, 0, 0, 323, 323, 0, 0, - 0, 323, 0, 0, 0, 323, 0, 0, 0, 0, - 0, 323, 0, 0, 323, 0, 0, 0, 0, 0, - 0, 323, 0, 0, 323, 0, 323, 0, 323, 323, - 323, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 323, 0, 323, 323, 0, 323, 0, 0, - 323, 0, 323, 0, 323, 323, 323, 323, 0, 323, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 323, - 0, 323, 0, 323, 0, 323, 323, 323, 323, 323, - 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, - 323, 323, 0, 0, 0, 0, 323, 0, 323, 0, - 323, 0, 323, 0, 323, 0, 323, 0, 323, 0, - 323, 0, 323, 0, 323, 0, 323, 0, 323, 0, - 323, 0, 323, 0, 323, 0, 323, 0, 323, 0, - 323, 0, 0, 0, 323, 0, 323, 0, 323, 0, - 323, 0, 323, 0, 323, 337, 323, 337, 337, 0, - 337, 0, 0, 337, 337, 0, 0, 0, 337, 0, - 0, 0, 337, 0, 0, 0, 0, 0, 337, 0, - 0, 337, 0, 0, 0, 0, 0, 0, 337, 0, - 0, 337, 0, 337, 0, 337, 337, 337, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 337, - 0, 337, 337, 0, 337, 0, 0, 337, 0, 337, - 0, 337, 337, 337, 337, 0, 337, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 337, 0, 337, 337, - 337, 0, 337, 337, 337, 337, 337, 337, 337, 0, - 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, - 0, 337, 0, 337, 0, 337, 0, 337, 0, 337, - 0, 337, 0, 337, 0, 337, 0, 337, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 227, - 0, 227, 227, 0, 227, 0, 0, 227, 227, 0, - 0, 337, 227, 337, 0, 337, 227, 337, 0, 337, - 0, 337, 227, 337, 0, 227, 0, 0, 0, 0, - 0, 0, 227, 0, 0, 227, 0, 227, 0, 227, - 227, 227, 227, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 227, 0, 227, 227, 0, 227, 0, - 0, 227, 0, 227, 0, 227, 227, 227, 227, 0, - 227, 0, 0, 0, 0, 0, 0, 0, 0, 227, - 227, 227, 227, 227, 227, 0, 227, 227, 227, 227, - 227, 227, 227, 0, 227, 227, 227, 227, 227, 0, - 0, 227, 227, 227, 0, 227, 0, 0, 0, 0, - 0, 227, 0, 227, 0, 227, 0, 227, 0, 227, - 0, 227, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 250, 0, 250, 250, 0, 250, 0, - 0, 250, 250, 0, 0, 227, 250, 227, 0, 227, - 250, 227, 0, 227, 0, 227, 250, 227, 0, 250, - 0, 0, 0, 0, 0, 0, 250, 0, 0, 250, - 0, 250, 0, 250, 250, 250, 250, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 250, 0, 250, - 250, 0, 250, 0, 0, 250, 0, 250, 0, 250, - 250, 250, 250, 0, 250, 0, 0, 0, 0, 0, - 0, 0, 0, 250, 250, 0, 250, 250, 250, 0, - 250, 250, 250, 250, 250, 250, 250, 0, 250, 250, - 250, 250, 250, 0, 0, 250, 250, 250, 0, 250, - 0, 0, 0, 0, 0, 250, 0, 250, 0, 250, - 0, 250, 0, 250, 0, 250, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 341, 0, 341, - 341, 0, 341, 0, 0, 341, 341, 0, 0, 250, - 341, 250, 0, 250, 341, 250, 0, 250, 0, 250, - 341, 250, 0, 341, 0, 0, 0, 0, 0, 0, - 341, 0, 0, 341, 0, 341, 0, 341, 341, 341, + 0, 309, 0, 309, 309, 0, 309, 0, 0, 309, + 0, 309, 0, 309, 309, 309, 309, 443, 309, 443, + 0, 443, 0, 0, 0, 0, 328, 0, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 0, 309, 0, 309, 328, 309, 328, 309, + 328, 309, 328, 309, 328, 309, 328, 309, 328, 309, + 328, 309, 328, 309, 328, 309, 0, 309, 0, 309, + 0, 309, 0, 309, 0, 309, 0, 309, 0, 309, + 0, 0, 0, 309, 0, 309, 0, 309, 0, 309, + 0, 309, 0, 309, 249, 309, 249, 249, 0, 249, + 0, 0, 249, 249, 0, 0, 0, 249, 0, 0, + 0, 249, 0, 0, 0, 0, 0, 249, 0, 0, + 249, 0, 0, 0, 0, 0, 0, 249, 0, 0, + 249, 0, 249, 0, 249, 249, 249, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 249, 0, + 249, 249, 0, 249, 0, 0, 249, 0, 249, 0, + 249, 249, 249, 249, 0, 249, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 249, 249, 249, 249, 249, + 0, 249, 249, 249, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 249, 0, + 249, 0, 249, 0, 249, 0, 249, 0, 249, 0, + 249, 0, 249, 0, 249, 0, 249, 0, 249, 0, + 249, 0, 249, 0, 249, 0, 249, 0, 249, 0, + 249, 0, 249, 0, 249, 0, 249, 0, 0, 0, + 249, 0, 249, 0, 249, 0, 249, 0, 249, 0, + 249, 320, 249, 320, 320, 0, 320, 0, 0, 320, + 320, 0, 0, 0, 320, 0, 0, 0, 320, 0, + 0, 0, 0, 0, 320, 0, 0, 320, 0, 0, + 0, 0, 0, 0, 320, 0, 0, 320, 0, 320, + 0, 320, 320, 320, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 320, 0, 320, 320, 0, + 320, 0, 0, 320, 0, 320, 0, 320, 320, 320, + 320, 0, 320, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 320, 0, 320, 0, 320, 0, 320, 320, + 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, + 320, 320, 320, 320, 320, 0, 0, 0, 0, 320, + 0, 320, 0, 320, 0, 320, 0, 320, 0, 320, + 0, 320, 0, 320, 0, 320, 0, 320, 0, 320, + 0, 320, 0, 320, 0, 320, 0, 320, 0, 320, + 0, 320, 0, 320, 0, 0, 0, 320, 0, 320, + 0, 320, 0, 320, 0, 320, 0, 320, 334, 320, + 334, 334, 0, 334, 0, 0, 334, 334, 0, 0, + 0, 334, 0, 0, 0, 334, 0, 0, 0, 0, + 0, 334, 0, 0, 334, 0, 0, 0, 0, 0, + 0, 334, 0, 0, 334, 0, 334, 0, 334, 334, + 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 334, 0, 334, 334, 0, 334, 0, 0, + 334, 0, 334, 0, 334, 334, 334, 334, 0, 334, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, + 0, 334, 334, 334, 0, 334, 334, 334, 334, 334, + 334, 334, 0, 334, 334, 334, 334, 334, 334, 334, + 334, 334, 334, 0, 334, 0, 334, 0, 334, 0, + 334, 0, 334, 0, 334, 0, 334, 0, 334, 0, + 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 224, 0, 224, 224, 0, 224, 0, 0, + 224, 224, 0, 0, 334, 224, 334, 0, 334, 224, + 334, 0, 334, 0, 334, 224, 334, 0, 224, 0, + 0, 0, 0, 0, 0, 224, 0, 0, 224, 0, + 224, 0, 224, 224, 224, 224, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 224, 0, 224, 224, + 0, 224, 0, 0, 224, 0, 224, 0, 224, 224, + 224, 224, 0, 224, 0, 0, 0, 0, 0, 0, + 0, 0, 224, 224, 224, 224, 224, 224, 0, 224, + 224, 224, 224, 224, 224, 224, 0, 224, 224, 224, + 224, 224, 0, 0, 224, 224, 224, 0, 224, 0, + 0, 0, 0, 0, 224, 0, 224, 0, 224, 0, + 224, 0, 224, 0, 224, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 338, 0, 338, 338, + 0, 338, 0, 0, 338, 338, 0, 0, 224, 338, + 224, 0, 224, 338, 224, 0, 224, 0, 224, 338, + 224, 0, 338, 0, 0, 0, 0, 0, 0, 338, + 0, 0, 338, 0, 338, 0, 338, 338, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 341, 0, 341, 341, 0, 341, 0, 0, 341, - 0, 341, 0, 341, 341, 341, 341, 0, 341, 0, + 338, 0, 338, 338, 0, 338, 0, 0, 338, 0, + 338, 0, 338, 338, 338, 338, 0, 338, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 338, 0, 338, + 338, 338, 0, 338, 338, 338, 338, 338, 338, 338, + 0, 338, 338, 338, 338, 0, 0, 0, 338, 338, + 338, 0, 338, 0, 338, 0, 338, 0, 338, 0, + 338, 0, 338, 0, 338, 0, 338, 0, 338, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 339, 0, 339, 339, 0, 339, 0, 0, 339, 339, + 0, 0, 338, 339, 338, 0, 338, 339, 338, 0, + 338, 0, 338, 339, 338, 0, 339, 0, 0, 0, + 0, 0, 0, 339, 0, 0, 339, 0, 339, 0, + 339, 339, 339, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 339, 0, 339, 339, 0, 339, + 0, 0, 339, 0, 339, 0, 339, 339, 339, 339, + 0, 339, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 339, 0, 339, 339, 339, 0, 339, 339, 339, + 339, 339, 339, 339, 0, 339, 339, 339, 339, 0, + 0, 0, 339, 339, 339, 0, 339, 0, 339, 0, + 339, 0, 339, 0, 339, 0, 339, 0, 339, 0, + 339, 0, 339, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 340, 0, 340, 340, 0, 340, + 0, 0, 340, 340, 0, 0, 339, 340, 339, 0, + 339, 340, 339, 0, 339, 0, 339, 340, 339, 0, + 340, 0, 0, 0, 0, 0, 0, 340, 0, 0, + 340, 0, 340, 0, 340, 340, 340, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 340, 0, + 340, 340, 0, 340, 0, 0, 340, 0, 340, 0, + 340, 340, 340, 340, 0, 340, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 340, 0, 340, 340, 340, + 0, 340, 340, 340, 340, 340, 340, 340, 0, 340, + 340, 340, 340, 0, 0, 0, 340, 340, 340, 0, + 340, 0, 340, 0, 340, 0, 340, 0, 340, 0, + 340, 0, 340, 0, 340, 0, 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, - 341, 341, 341, 0, 341, 341, 341, 341, 341, 341, - 341, 0, 341, 341, 341, 341, 0, 0, 0, 341, - 341, 341, 0, 341, 0, 341, 0, 341, 0, 341, - 0, 341, 0, 341, 0, 341, 0, 341, 0, 341, + 341, 341, 0, 341, 0, 0, 341, 341, 0, 0, + 340, 341, 340, 0, 340, 341, 340, 0, 340, 0, + 340, 341, 340, 0, 341, 0, 0, 0, 0, 0, + 0, 341, 0, 0, 341, 0, 341, 0, 341, 341, + 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 341, 0, 341, 341, 0, 341, 0, 0, + 341, 0, 341, 0, 341, 341, 341, 341, 0, 341, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, + 0, 341, 341, 341, 0, 341, 341, 341, 341, 0, + 0, 341, 0, 341, 341, 341, 341, 341, 0, 0, + 341, 341, 341, 0, 341, 0, 341, 0, 341, 0, + 341, 0, 341, 0, 341, 0, 341, 0, 341, 0, + 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 344, 0, 344, 344, 0, 344, 0, 0, + 344, 344, 0, 0, 341, 344, 341, 0, 341, 344, + 341, 0, 341, 0, 341, 344, 341, 0, 344, 0, + 0, 0, 0, 0, 0, 344, 0, 0, 344, 0, + 344, 0, 344, 344, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 344, 0, 344, 344, + 0, 344, 0, 0, 344, 0, 344, 0, 344, 344, + 344, 344, 0, 344, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 344, 0, 344, 344, 344, 0, 344, + 344, 344, 344, 344, 344, 344, 0, 344, 344, 344, + 344, 344, 0, 0, 344, 344, 344, 0, 344, 0, + 0, 0, 0, 0, 344, 0, 344, 0, 344, 0, + 344, 0, 344, 0, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 342, 0, 342, 342, + 0, 342, 0, 0, 342, 342, 0, 0, 344, 342, + 344, 0, 344, 342, 344, 0, 344, 0, 344, 342, + 344, 0, 342, 0, 0, 0, 0, 0, 0, 342, + 0, 0, 342, 0, 342, 0, 342, 342, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 342, 0, 342, 342, 0, 342, 0, 0, 342, - 342, 0, 0, 341, 342, 341, 0, 341, 342, 341, - 0, 341, 0, 341, 342, 341, 0, 342, 0, 0, - 0, 0, 0, 0, 342, 0, 0, 342, 0, 342, - 0, 342, 342, 342, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 342, 0, 342, 342, 0, - 342, 0, 0, 342, 0, 342, 0, 342, 342, 342, - 342, 0, 342, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 342, 0, 342, 342, 342, 0, 342, 342, - 342, 342, 342, 342, 342, 0, 342, 342, 342, 342, - 0, 0, 0, 342, 342, 342, 0, 342, 0, 342, - 0, 342, 0, 342, 0, 342, 0, 342, 0, 342, - 0, 342, 0, 342, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 343, 0, 343, 343, 0, - 343, 0, 0, 343, 343, 0, 0, 342, 343, 342, - 0, 342, 343, 342, 0, 342, 0, 342, 343, 342, - 0, 343, 0, 0, 0, 0, 0, 0, 343, 0, - 0, 343, 0, 343, 0, 343, 343, 343, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 343, - 0, 343, 343, 0, 343, 0, 0, 343, 0, 343, - 0, 343, 343, 343, 343, 0, 343, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 343, 0, 343, 343, - 343, 0, 343, 343, 343, 343, 343, 343, 343, 0, - 343, 343, 343, 343, 0, 0, 0, 343, 343, 343, - 0, 343, 0, 343, 0, 343, 0, 343, 0, 343, - 0, 343, 0, 343, 0, 343, 0, 343, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 344, - 0, 344, 344, 0, 344, 0, 0, 344, 344, 0, - 0, 343, 344, 343, 0, 343, 344, 343, 0, 343, - 0, 343, 344, 343, 0, 344, 0, 0, 0, 0, - 0, 0, 344, 0, 0, 344, 0, 344, 0, 344, - 344, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 344, 0, 344, 344, 0, 344, 0, - 0, 344, 0, 344, 0, 344, 344, 344, 344, 0, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 344, 0, 344, 344, 344, 0, 344, 344, 344, 344, - 0, 0, 344, 0, 344, 344, 344, 344, 344, 0, - 0, 344, 344, 344, 0, 344, 0, 344, 0, 344, - 0, 344, 0, 344, 0, 344, 0, 344, 0, 344, - 0, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 347, 0, 347, 347, 0, 347, 0, - 0, 347, 347, 0, 0, 344, 347, 344, 0, 344, - 347, 344, 0, 344, 0, 344, 347, 344, 0, 347, - 0, 0, 0, 0, 0, 0, 347, 0, 0, 347, - 0, 347, 0, 347, 347, 347, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 347, 0, 347, - 347, 0, 347, 0, 0, 347, 0, 347, 0, 347, - 347, 347, 347, 0, 347, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 347, 0, 347, 347, 347, 0, - 347, 347, 347, 347, 347, 347, 347, 0, 347, 347, - 347, 347, 347, 0, 0, 347, 347, 347, 0, 347, - 0, 0, 0, 0, 0, 347, 0, 347, 0, 347, - 0, 347, 0, 347, 0, 347, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 345, 0, 345, - 345, 0, 345, 0, 0, 345, 345, 0, 0, 347, - 345, 347, 0, 347, 345, 347, 0, 347, 0, 347, - 345, 347, 0, 345, 0, 0, 0, 0, 0, 0, - 345, 0, 0, 345, 0, 345, 0, 345, 345, 345, + 342, 0, 342, 342, 0, 342, 0, 0, 342, 0, + 342, 0, 342, 342, 342, 342, 0, 342, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 342, 0, 342, + 342, 342, 0, 342, 342, 342, 342, 0, 0, 342, + 0, 342, 342, 342, 342, 342, 0, 0, 342, 342, + 342, 0, 342, 0, 342, 0, 342, 0, 342, 0, + 342, 0, 342, 0, 342, 0, 342, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 345, 0, 345, 345, 0, 345, 0, 0, 345, - 0, 345, 0, 345, 345, 345, 345, 0, 345, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 345, 0, - 345, 345, 345, 0, 345, 345, 345, 345, 0, 0, - 345, 0, 345, 345, 345, 345, 345, 0, 0, 345, - 345, 345, 0, 345, 0, 345, 0, 345, 0, 345, - 0, 345, 0, 345, 0, 345, 0, 345, 0, 345, + 343, 0, 343, 343, 0, 343, 0, 0, 343, 343, + 0, 0, 342, 343, 342, 0, 342, 343, 342, 0, + 342, 0, 342, 343, 342, 0, 343, 0, 0, 0, + 0, 0, 0, 343, 0, 0, 343, 0, 343, 0, + 343, 343, 343, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 343, 0, 343, 343, 0, 343, + 0, 0, 343, 0, 343, 0, 343, 343, 343, 343, + 0, 343, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 343, 0, 343, 343, 343, 0, 343, 343, 343, + 343, 0, 0, 343, 0, 343, 343, 343, 343, 343, + 0, 0, 343, 343, 343, 0, 343, 0, 343, 0, + 343, 0, 343, 0, 343, 0, 343, 0, 343, 0, + 343, 0, 343, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 350, 0, 350, 350, 0, 350, + 0, 0, 350, 350, 0, 0, 343, 350, 343, 0, + 343, 350, 343, 0, 343, 0, 343, 350, 343, 0, + 350, 0, 0, 0, 0, 0, 0, 350, 0, 0, + 350, 0, 350, 0, 350, 350, 350, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 350, 0, + 350, 350, 0, 350, 0, 0, 350, 0, 350, 0, + 350, 350, 350, 350, 0, 350, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 350, 0, 350, 350, 350, + 0, 350, 350, 350, 350, 350, 350, 350, 0, 350, + 350, 350, 350, 350, 0, 0, 350, 350, 350, 0, + 350, 0, 0, 0, 0, 0, 350, 0, 350, 0, + 350, 0, 350, 0, 350, 0, 350, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 349, 0, + 349, 349, 0, 349, 0, 0, 349, 349, 0, 0, + 350, 349, 350, 0, 350, 349, 350, 0, 350, 0, + 350, 349, 350, 0, 349, 0, 0, 0, 0, 0, + 0, 349, 0, 0, 349, 0, 349, 0, 349, 349, + 349, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 349, 0, 349, 349, 0, 349, 0, 0, + 349, 0, 349, 0, 349, 349, 349, 349, 0, 349, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 349, + 0, 349, 349, 349, 0, 349, 349, 349, 349, 349, + 349, 349, 0, 349, 349, 349, 349, 349, 0, 0, + 349, 349, 349, 0, 349, 0, 0, 0, 0, 0, + 349, 0, 349, 0, 349, 0, 349, 0, 349, 0, + 349, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 345, 0, 345, 345, 0, 345, 0, 0, + 345, 345, 0, 0, 349, 345, 349, 0, 349, 345, + 349, 0, 349, 0, 349, 345, 349, 0, 345, 0, + 0, 0, 0, 0, 0, 345, 0, 0, 345, 0, + 345, 0, 345, 345, 345, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 0, 345, 345, + 0, 345, 0, 0, 345, 0, 345, 0, 345, 345, + 345, 345, 0, 345, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 345, 0, 345, 345, 345, 0, 345, + 345, 345, 345, 345, 345, 345, 0, 345, 345, 345, + 345, 345, 0, 0, 345, 345, 345, 0, 345, 0, + 0, 0, 0, 0, 345, 0, 345, 0, 345, 0, + 345, 0, 345, 0, 345, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 346, 0, 346, 346, + 0, 346, 0, 0, 346, 346, 0, 0, 345, 346, + 345, 0, 345, 346, 345, 0, 345, 0, 345, 346, + 345, 0, 346, 0, 0, 0, 0, 0, 0, 346, + 0, 0, 346, 0, 346, 0, 346, 346, 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 346, 0, 346, 346, 0, 346, 0, 0, 346, - 346, 0, 0, 345, 346, 345, 0, 345, 346, 345, - 0, 345, 0, 345, 346, 345, 0, 346, 0, 0, - 0, 0, 0, 0, 346, 0, 0, 346, 0, 346, - 0, 346, 346, 346, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 346, 0, 346, 346, 0, - 346, 0, 0, 346, 0, 346, 0, 346, 346, 346, - 346, 0, 346, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 346, 0, 346, 346, 346, 0, 346, 346, - 346, 346, 0, 0, 346, 0, 346, 346, 346, 346, - 346, 0, 0, 346, 346, 346, 0, 346, 0, 346, - 0, 346, 0, 346, 0, 346, 0, 346, 0, 346, - 0, 346, 0, 346, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 353, 0, 353, 353, 0, - 353, 0, 0, 353, 353, 0, 0, 346, 353, 346, - 0, 346, 353, 346, 0, 346, 0, 346, 353, 346, - 0, 353, 0, 0, 0, 0, 0, 0, 353, 0, - 0, 353, 0, 353, 0, 353, 353, 353, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, - 0, 353, 353, 0, 353, 0, 0, 353, 0, 353, - 0, 353, 353, 353, 353, 0, 353, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 353, 0, 353, 353, - 353, 0, 353, 353, 353, 353, 353, 353, 353, 0, - 353, 353, 353, 353, 353, 0, 0, 353, 353, 353, - 0, 353, 0, 0, 0, 0, 0, 353, 0, 353, - 0, 353, 0, 353, 0, 353, 0, 353, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 352, - 0, 352, 352, 0, 352, 0, 0, 352, 352, 0, - 0, 353, 352, 353, 0, 353, 352, 353, 0, 353, - 0, 353, 352, 353, 0, 352, 0, 0, 0, 0, - 0, 0, 352, 0, 0, 352, 0, 352, 0, 352, - 352, 352, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 352, 0, 352, 352, 0, 352, 0, - 0, 352, 0, 352, 0, 352, 352, 352, 352, 0, - 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 352, 0, 352, 352, 352, 0, 352, 352, 352, 352, - 352, 352, 352, 0, 352, 352, 352, 352, 352, 0, - 0, 352, 352, 352, 0, 352, 0, 0, 0, 0, - 0, 352, 0, 352, 0, 352, 0, 352, 0, 352, - 0, 352, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 348, 0, 348, 348, 0, 348, 0, - 0, 348, 348, 0, 0, 352, 348, 352, 0, 352, - 348, 352, 0, 352, 0, 352, 348, 352, 0, 348, - 0, 0, 0, 0, 0, 0, 348, 0, 0, 348, - 0, 348, 0, 348, 348, 348, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 348, 0, 348, - 348, 0, 348, 0, 0, 348, 0, 348, 0, 348, - 348, 348, 348, 0, 348, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 348, 0, 348, 348, 348, 0, - 348, 348, 348, 348, 348, 348, 348, 0, 348, 348, - 348, 348, 348, 0, 0, 348, 348, 348, 0, 348, - 0, 0, 0, 0, 0, 348, 0, 348, 0, 348, - 0, 348, 0, 348, 0, 348, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 349, 0, 349, - 349, 0, 349, 0, 0, 349, 349, 0, 0, 348, - 349, 348, 0, 348, 349, 348, 0, 348, 0, 348, - 349, 348, 0, 349, 0, 0, 0, 0, 0, 0, - 349, 0, 0, 349, 0, 349, 0, 349, 349, 349, + 346, 0, 346, 346, 0, 346, 0, 0, 346, 0, + 346, 0, 346, 346, 346, 346, 0, 346, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 346, 0, 346, + 346, 346, 0, 346, 346, 346, 346, 346, 346, 346, + 0, 346, 346, 346, 346, 346, 0, 0, 346, 346, + 346, 0, 346, 0, 0, 0, 0, 0, 346, 0, + 346, 0, 346, 0, 346, 0, 346, 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 349, 0, 349, 349, 0, 349, 0, 0, 349, - 0, 349, 0, 349, 349, 349, 349, 0, 349, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 349, 0, - 349, 349, 349, 0, 349, 349, 349, 349, 349, 349, - 349, 0, 349, 349, 349, 349, 349, 0, 0, 349, - 349, 349, 0, 349, 0, 0, 0, 0, 0, 349, - 0, 349, 0, 349, 0, 349, 0, 349, 0, 349, + 347, 0, 347, 347, 0, 347, 0, 0, 347, 347, + 0, 0, 346, 347, 346, 0, 346, 347, 346, 0, + 346, 0, 346, 347, 346, 0, 347, 0, 0, 0, + 0, 0, 0, 347, 0, 0, 347, 0, 347, 0, + 347, 347, 347, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 347, 0, 347, 347, 0, 347, + 0, 0, 347, 0, 347, 0, 347, 347, 347, 347, + 0, 347, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 347, 0, 347, 347, 347, 0, 347, 347, 347, + 347, 347, 347, 347, 0, 347, 347, 347, 347, 347, + 0, 0, 347, 347, 347, 0, 347, 0, 0, 0, + 0, 0, 347, 0, 347, 0, 347, 0, 347, 0, + 347, 0, 347, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 348, 0, 348, 348, 0, 348, + 0, 0, 348, 348, 0, 0, 347, 348, 347, 0, + 347, 348, 347, 0, 347, 0, 347, 348, 347, 0, + 348, 0, 0, 0, 0, 0, 0, 348, 0, 0, + 348, 0, 348, 0, 348, 348, 348, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 348, 0, + 348, 348, 0, 348, 0, 0, 348, 0, 348, 0, + 348, 348, 348, 348, 0, 348, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 348, 0, 348, 348, 348, + 0, 348, 348, 348, 348, 348, 348, 348, 0, 348, + 348, 348, 348, 348, 0, 0, 348, 348, 348, 0, + 348, 0, 0, 0, 0, 0, 348, 0, 348, 0, + 348, 0, 348, 0, 348, 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 350, 0, 350, 350, 0, 350, 0, 0, 350, - 350, 0, 0, 349, 350, 349, 0, 349, 350, 349, - 0, 349, 0, 349, 350, 349, 0, 350, 0, 0, - 0, 0, 0, 0, 350, 0, 0, 350, 0, 350, - 0, 350, 350, 350, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 350, 0, 350, 350, 0, - 350, 0, 0, 350, 0, 350, 0, 350, 350, 350, - 350, 0, 350, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 350, 0, 350, 350, 350, 0, 350, 350, - 350, 350, 350, 350, 350, 0, 350, 350, 350, 350, - 350, 0, 0, 350, 350, 350, 0, 350, 0, 0, - 0, 0, 0, 350, 0, 350, 0, 350, 0, 350, - 0, 350, 0, 350, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 351, 0, 351, 351, 0, - 351, 0, 0, 351, 351, 0, 0, 350, 351, 350, - 0, 350, 351, 350, 0, 350, 0, 350, 351, 350, - 0, 351, 0, 0, 0, 0, 0, 0, 351, 0, - 0, 351, 0, 351, 0, 351, 351, 351, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, - 0, 351, 351, 0, 351, 0, 0, 351, 0, 351, - 0, 351, 351, 351, 351, 0, 351, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 351, 0, 351, 351, - 351, 0, 351, 351, 351, 351, 351, 351, 351, 0, - 351, 351, 351, 351, 351, 0, 0, 351, 351, 351, - 0, 351, 0, 0, 0, 0, 0, 351, 0, 351, - 0, 351, 0, 351, 0, 351, 0, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 348, 0, 348, 0, 348, 0, 348, 0, 348, 0, + 348, 0, 348, 499, 499, 499, 499, 499, 0, 499, + 499, 0, 499, 499, 499, 499, 0, 499, 499, 499, + 0, 0, 0, 0, 499, 499, 0, 499, 499, 499, + 499, 499, 0, 0, 499, 0, 0, 0, 499, 499, + 0, 499, 499, 499, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 499, 0, 499, 0, 499, 499, 0, + 499, 0, 499, 499, 499, 499, 499, 499, 499, 499, + 499, 0, 499, 499, 50, 499, 499, 0, 0, 0, + 0, 499, 499, 0, 0, 499, 0, 0, 0, 0, + 499, 499, 499, 499, 499, 0, 0, 51, 499, 0, + 499, 0, 0, 0, 0, 499, 0, 499, 0, 0, + 52, 0, 0, 0, 0, 53, 0, 0, 0, 0, + 54, 0, 55, 56, 57, 58, 0, 0, 0, 0, + 59, 0, 0, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 499, 61, 499, + 0, 499, 0, 499, 0, 499, 0, 499, 0, 499, + 494, 494, 494, 494, 494, 417, 494, 494, 0, 494, + 494, 494, 494, 0, 494, 494, 494, 0, 0, 0, + 0, 494, 0, 0, 494, 494, 494, 494, 494, 0, + 0, 494, 0, 0, 0, 494, 494, 0, 494, 494, + 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 494, 0, 494, 0, 494, 494, 0, 494, 0, 494, + 494, 494, 494, 494, 494, 494, 494, 494, 0, 494, + 494, 50, 494, 494, 0, 0, 0, 0, 494, 494, + 0, 0, 494, 0, 0, 0, 0, 494, 494, 494, + 494, 494, 0, 0, 51, 494, 0, 494, 0, 0, + 0, 0, 494, 0, 494, 0, 0, 52, 0, 0, + 0, 0, 53, 0, 0, 0, 0, 54, 0, 55, + 56, 57, 58, 0, 0, 0, 0, 59, 0, 0, + 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 494, 61, 494, 0, 494, 0, + 494, 0, 494, 0, 494, 0, 494, 447, 447, 447, + 447, 447, 0, 447, 447, 0, 447, 447, 447, 447, + 0, 447, 447, 0, 0, 0, 0, 0, 447, 0, + 0, 447, 447, 447, 447, 447, 0, 0, 447, 0, + 0, 0, 447, 447, 0, 447, 447, 447, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 447, 0, 447, + 0, 447, 447, 0, 447, 0, 447, 447, 447, 447, + 447, 447, 447, 447, 447, 0, 447, 447, 0, 447, + 447, 0, 0, 0, 0, 447, 447, 0, 0, 447, + 0, 0, 0, 0, 447, 447, 447, 447, 447, 0, + 0, 0, 447, 0, 447, 0, 0, 0, 0, 447, + 0, 447, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 351, 0, 351, 0, 351, 0, 351, 0, 351, - 0, 351, 0, 351, 502, 502, 502, 502, 502, 0, - 502, 502, 0, 502, 502, 502, 502, 0, 502, 502, - 502, 0, 0, 0, 0, 502, 502, 0, 502, 502, - 502, 502, 502, 0, 0, 502, 0, 0, 0, 502, - 502, 0, 502, 502, 502, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 502, 0, 502, 0, 502, 502, - 0, 502, 0, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 0, 502, 502, 52, 502, 502, 0, 0, - 0, 0, 502, 502, 0, 0, 502, 0, 0, 0, - 0, 502, 502, 502, 502, 502, 0, 0, 53, 502, - 0, 502, 0, 0, 0, 0, 502, 0, 502, 0, - 0, 54, 0, 0, 0, 0, 55, 0, 0, 0, - 0, 56, 0, 57, 58, 59, 60, 0, 0, 0, - 0, 61, 0, 0, 62, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 502, 63, - 502, 0, 502, 0, 502, 0, 502, 0, 502, 0, - 502, 497, 497, 497, 497, 497, 419, 497, 497, 0, - 497, 497, 497, 497, 0, 497, 497, 497, 0, 0, - 0, 0, 497, 0, 0, 497, 497, 497, 497, 497, - 0, 0, 497, 0, 0, 0, 497, 497, 0, 497, - 497, 497, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 497, 0, 497, 0, 497, 497, 0, 497, 0, - 497, 497, 497, 497, 497, 497, 497, 497, 497, 0, - 497, 497, 52, 497, 497, 0, 0, 0, 0, 497, - 497, 0, 0, 497, 0, 0, 0, 0, 497, 497, - 497, 497, 497, 0, 0, 53, 497, 0, 497, 0, - 0, 0, 0, 497, 0, 497, 0, 0, 54, 0, - 0, 0, 0, 55, 0, 0, 0, 0, 56, 0, - 57, 58, 59, 60, 0, 0, 0, 0, 61, 0, - 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 63, 497, 0, 497, - 0, 497, 0, 497, 0, 497, 0, 497, 450, 450, - 450, 450, 450, 0, 450, 450, 0, 450, 450, 450, - 450, 0, 450, 450, 0, 0, 0, 0, 0, 450, - 0, 0, 450, 450, 450, 450, 450, 0, 0, 450, - 0, 0, 0, 450, 450, 0, 450, 450, 450, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 450, 0, 450, 450, 0, 450, 0, 450, 450, 450, - 450, 450, 450, 450, 450, 450, 0, 450, 450, 0, - 450, 450, 0, 0, 0, 0, 450, 450, 0, 0, - 450, 0, 0, 0, 0, 450, 450, 450, 450, 450, - 0, 0, 0, 450, 0, 450, 0, 0, 0, 0, - 450, 0, 450, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 447, 0, 447, 0, 447, 0, 447, 0, 447, + 0, 447, 0, 447, 68, 69, 485, 70, 0, 0, + 71, 486, 0, 487, 488, 73, 0, 0, 489, 74, + 0, 0, 0, 0, 0, 75, 0, 0, 76, 490, + 491, 492, 493, 0, 0, 77, 0, 0, 0, 494, + 78, 0, 79, 80, 81, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 495, 0, 82, 0, 83, 84, + 0, 85, 0, 496, 86, 497, 87, 498, 88, 89, + 90, 499, 0, 92, 500, 0, 501, 502, 0, 0, + 0, 0, 421, 0, 0, 0, 93, 0, 0, 0, + 0, 503, 94, 95, 96, 97, 0, 0, 0, 98, + 0, 99, 0, 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 450, 0, 450, 0, 450, 0, 450, 0, - 450, 0, 450, 0, 450, 70, 71, 487, 72, 0, - 0, 73, 488, 0, 489, 490, 75, 0, 0, 491, - 76, 0, 0, 0, 0, 0, 77, 0, 0, 78, - 492, 493, 494, 495, 0, 0, 79, 0, 0, 0, - 496, 80, 0, 81, 82, 83, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 0, 84, 0, 85, - 86, 0, 87, 0, 498, 88, 499, 89, 500, 90, - 91, 92, 501, 0, 94, 502, 0, 503, 504, 0, - 0, 0, 0, 423, 0, 0, 0, 95, 0, 0, - 0, 0, 505, 96, 97, 98, 99, 0, 0, 0, - 100, 0, 101, 0, 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, + 103, 0, 104, 0, 105, 0, 106, 0, 107, 0, + 504, 455, 455, 455, 455, 0, 0, 455, 455, 0, + 455, 455, 455, 0, 0, 455, 455, 0, 0, 0, + 0, 0, 455, 0, 0, 455, 455, 455, 455, 455, + 0, 0, 455, 0, 0, 0, 455, 455, 0, 455, + 455, 455, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 455, 0, 455, 0, 455, 455, 0, 455, 0, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 0, + 455, 455, 0, 455, 455, 0, 0, 0, 0, 455, + 0, 0, 0, 455, 0, 0, 0, 0, 455, 455, + 455, 455, 455, 0, 0, 0, 455, 0, 455, 0, + 0, 0, 0, 455, 0, 455, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, - 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, - 0, 506, 458, 458, 458, 458, 0, 0, 458, 458, - 0, 458, 458, 458, 0, 0, 458, 458, 0, 0, - 0, 0, 0, 458, 0, 0, 458, 458, 458, 458, - 458, 0, 0, 458, 0, 0, 0, 458, 458, 0, - 458, 458, 458, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 458, 0, 458, 0, 458, 458, 0, 458, - 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 0, 458, 458, 0, 458, 458, 0, 0, 0, 0, - 458, 0, 0, 0, 458, 0, 0, 0, 0, 458, - 458, 458, 458, 458, 0, 0, 0, 458, 0, 458, - 0, 0, 0, 0, 458, 0, 458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 455, 0, 455, 0, 455, + 0, 455, 0, 455, 0, 455, 0, 455, 68, 69, + 485, 70, 0, 0, 71, 486, 0, 0, 488, 73, + 0, 0, 489, 74, 0, 0, 0, 0, 0, 75, + 0, 0, 76, 490, 491, 492, 493, 0, 0, 77, + 0, 0, 0, 494, 78, 0, 79, 80, 81, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 495, 0, + 82, 0, 83, 84, 0, 85, 0, 496, 86, 497, + 87, 498, 88, 89, 90, 499, 0, 92, 500, 0, + 0, 502, 0, 0, 0, 0, 421, 0, 0, 0, + 93, 0, 0, 0, 0, 503, 94, 95, 96, 97, + 0, 0, 0, 98, 0, 99, 0, 0, 0, 0, + 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 458, 0, 458, 0, - 458, 0, 458, 0, 458, 0, 458, 0, 458, 70, - 71, 487, 72, 0, 0, 73, 488, 0, 0, 490, - 75, 0, 0, 491, 76, 0, 0, 0, 0, 0, - 77, 0, 0, 78, 492, 493, 494, 495, 0, 0, - 79, 0, 0, 0, 496, 80, 0, 81, 82, 83, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, - 0, 84, 0, 85, 86, 0, 87, 0, 498, 88, - 499, 89, 500, 90, 91, 92, 501, 0, 94, 502, - 0, 0, 504, 0, 0, 0, 0, 423, 0, 0, - 0, 95, 0, 0, 0, 0, 505, 96, 97, 98, - 99, 0, 0, 0, 100, 0, 101, 0, 0, 0, - 0, 102, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 351, 351, 0, 351, 0, 0, 351, 351, + 0, 0, 102, 351, 103, 0, 104, 351, 105, 0, + 106, 0, 107, 351, 38, 0, 351, 0, 0, 0, + 0, 0, 0, 351, 0, 0, 0, 0, 351, 0, + 351, 351, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 351, 0, 351, 351, 0, 351, + 0, 0, 351, 0, 351, 0, 351, 351, 351, 351, + 0, 351, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 351, 0, 351, 351, 351, 0, 351, 351, 351, + 351, 351, 351, 351, 0, 0, 0, 351, 351, 351, + 0, 0, 351, 351, 351, 0, 351, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 351, 0, 351, 0, + 351, 0, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 352, 352, 0, 352, + 0, 0, 352, 352, 0, 0, 351, 352, 351, 0, + 351, 352, 351, 0, 351, 0, 351, 352, 351, 0, + 352, 0, 0, 0, 0, 0, 0, 352, 0, 0, + 0, 0, 352, 0, 352, 352, 352, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 352, 0, + 352, 352, 0, 352, 0, 0, 352, 0, 352, 0, + 352, 352, 352, 352, 0, 352, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 352, 0, 352, 352, 352, + 0, 352, 352, 352, 352, 352, 352, 352, 0, 0, + 0, 352, 352, 352, 0, 0, 352, 352, 352, 0, + 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 352, 0, 352, 0, 352, 0, 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 354, 354, 0, 354, 0, 0, 354, - 354, 0, 0, 104, 354, 105, 0, 106, 354, 107, - 0, 108, 0, 109, 354, 40, 0, 354, 0, 0, - 0, 0, 0, 0, 354, 0, 0, 0, 0, 354, - 0, 354, 354, 354, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 354, 0, 354, 354, 0, - 354, 0, 0, 354, 0, 354, 0, 354, 354, 354, - 354, 0, 354, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 354, 0, 354, 354, 354, 0, 354, 354, - 354, 354, 354, 354, 354, 0, 0, 0, 354, 354, - 354, 0, 0, 354, 354, 354, 0, 354, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 354, 0, 354, - 0, 354, 0, 354, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 355, 355, 0, - 355, 0, 0, 355, 355, 0, 0, 354, 355, 354, - 0, 354, 355, 354, 0, 354, 0, 354, 355, 354, - 0, 355, 0, 0, 0, 0, 0, 0, 355, 0, - 0, 0, 0, 355, 0, 355, 355, 355, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 355, - 0, 355, 355, 0, 355, 0, 0, 355, 0, 355, - 0, 355, 355, 355, 355, 0, 355, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 355, 0, 355, 355, - 355, 0, 355, 355, 355, 355, 355, 355, 355, 0, - 0, 0, 355, 355, 355, 0, 0, 355, 355, 355, - 0, 355, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 355, 0, 355, 0, 355, 0, 355, 0, 0, + 353, 353, 0, 353, 0, 0, 353, 353, 0, 0, + 352, 353, 352, 0, 352, 353, 352, 0, 352, 0, + 352, 353, 352, 0, 353, 0, 0, 0, 0, 0, + 0, 353, 0, 0, 0, 0, 353, 0, 353, 353, + 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 353, 0, 353, 353, 0, 353, 0, 0, + 353, 0, 353, 0, 353, 353, 353, 353, 0, 353, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, + 0, 353, 353, 353, 0, 353, 353, 353, 353, 353, + 353, 353, 0, 0, 0, 353, 353, 353, 0, 0, + 353, 353, 353, 0, 353, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 353, 0, 353, 0, 353, 0, + 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 354, 354, 0, 354, 0, 0, + 354, 354, 0, 0, 353, 354, 353, 0, 353, 354, + 353, 0, 353, 0, 353, 354, 353, 0, 354, 0, + 0, 0, 0, 0, 0, 354, 0, 0, 0, 0, + 354, 0, 354, 354, 354, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 354, 0, 354, 354, + 0, 354, 0, 0, 354, 0, 354, 0, 354, 354, + 354, 354, 0, 354, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 354, 0, 354, 354, 354, 0, 354, + 354, 354, 354, 354, 354, 354, 0, 0, 0, 354, + 354, 354, 0, 0, 354, 354, 354, 0, 354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 356, 356, 0, 356, 0, 0, 356, 356, 0, - 0, 355, 356, 355, 0, 355, 356, 355, 0, 355, - 0, 355, 356, 355, 0, 356, 0, 0, 0, 0, - 0, 0, 356, 0, 0, 0, 0, 356, 0, 356, - 356, 356, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 356, 0, 356, 356, 0, 356, 0, - 0, 356, 0, 356, 0, 356, 356, 356, 356, 0, - 356, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 356, 0, 356, 356, 356, 0, 356, 356, 356, 356, - 356, 356, 356, 0, 0, 0, 356, 356, 356, 0, - 0, 356, 356, 356, 0, 356, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 356, 0, 356, 0, 356, - 0, 356, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 357, 357, 0, 357, 0, - 0, 357, 357, 0, 0, 356, 357, 356, 0, 356, - 357, 356, 0, 356, 0, 356, 357, 356, 0, 357, - 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, - 0, 357, 0, 357, 357, 357, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 357, 0, 357, - 357, 0, 357, 0, 0, 357, 0, 357, 0, 357, - 357, 357, 357, 0, 357, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 357, 0, 357, 357, 357, 0, - 357, 357, 357, 357, 357, 357, 357, 0, 0, 0, - 357, 357, 357, 0, 0, 357, 357, 357, 0, 357, + 0, 0, 354, 0, 354, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 355, 355, + 0, 355, 0, 0, 355, 355, 0, 0, 354, 355, + 354, 0, 354, 355, 354, 0, 354, 0, 354, 355, + 354, 0, 355, 0, 0, 0, 0, 0, 0, 355, + 0, 0, 0, 0, 355, 0, 355, 355, 355, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 355, 0, 355, 355, 0, 355, 0, 0, 355, 0, + 355, 0, 355, 355, 355, 355, 0, 355, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 355, 0, 355, + 355, 355, 0, 355, 355, 355, 355, 355, 355, 355, + 0, 0, 0, 355, 355, 355, 0, 0, 355, 355, + 355, 0, 355, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 355, 0, 355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 357, 0, 357, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, - 358, 0, 358, 0, 0, 358, 358, 0, 0, 357, - 358, 357, 0, 357, 358, 357, 0, 357, 0, 357, - 358, 357, 0, 358, 0, 0, 0, 0, 0, 0, - 358, 0, 0, 0, 0, 358, 0, 358, 358, 358, + 0, 0, 356, 356, 0, 356, 0, 0, 356, 356, + 0, 0, 355, 356, 355, 0, 355, 356, 355, 0, + 355, 0, 355, 356, 355, 0, 356, 0, 0, 0, + 0, 0, 0, 356, 0, 0, 0, 0, 356, 0, + 356, 356, 356, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 356, 0, 356, 356, 0, 356, + 0, 0, 356, 0, 356, 0, 356, 356, 356, 356, + 0, 356, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 356, 0, 356, 356, 356, 0, 356, 356, 356, + 356, 356, 356, 356, 0, 0, 0, 0, 356, 356, + 0, 0, 356, 356, 356, 0, 356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 358, 0, 358, 358, 0, 358, 0, 0, 358, - 0, 358, 0, 358, 358, 358, 358, 0, 358, 0, + 356, 0, 356, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 358, 358, 0, 358, + 0, 0, 358, 358, 0, 0, 356, 358, 356, 0, + 356, 358, 356, 0, 356, 0, 356, 358, 356, 0, + 358, 0, 0, 0, 0, 0, 0, 358, 0, 0, + 0, 0, 358, 0, 358, 358, 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, - 358, 358, 358, 0, 358, 358, 358, 358, 358, 358, - 358, 0, 0, 0, 358, 358, 358, 0, 0, 358, - 358, 358, 0, 358, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 358, 0, 358, + 358, 358, 0, 358, 0, 0, 358, 0, 358, 0, + 358, 358, 358, 358, 0, 358, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 358, 0, 358, 358, 358, + 0, 358, 358, 358, 358, 358, 358, 358, 0, 0, + 0, 358, 358, 358, 0, 0, 0, 358, 358, 0, + 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 358, 0, 358, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 357, 357, 0, 357, 0, 0, 357, 357, 0, 0, + 358, 357, 358, 0, 358, 357, 358, 0, 358, 0, + 358, 357, 358, 0, 357, 0, 0, 0, 0, 0, + 0, 357, 0, 0, 0, 0, 357, 0, 357, 357, + 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 357, 0, 357, 357, 0, 357, 0, 0, + 357, 0, 357, 0, 357, 357, 357, 357, 0, 357, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, + 0, 357, 357, 357, 0, 357, 357, 357, 357, 357, + 357, 357, 0, 0, 0, 0, 357, 357, 0, 0, + 357, 357, 357, 0, 357, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, + 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 359, 359, 0, 359, 0, 0, + 359, 359, 0, 0, 357, 359, 357, 0, 357, 359, + 357, 0, 357, 0, 357, 359, 357, 0, 359, 0, + 0, 0, 0, 0, 0, 359, 0, 0, 0, 0, + 359, 0, 359, 359, 359, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 359, 0, 359, 359, + 0, 359, 0, 0, 359, 0, 359, 0, 359, 359, + 359, 359, 0, 359, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 359, 0, 359, 359, 359, 0, 359, + 359, 359, 359, 359, 359, 359, 0, 0, 0, 359, + 359, 359, 0, 0, 0, 359, 359, 0, 359, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 359, 0, 359, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 360, 360, + 0, 360, 0, 0, 360, 360, 0, 0, 359, 360, + 359, 0, 359, 360, 359, 0, 359, 0, 359, 360, + 359, 0, 360, 0, 0, 0, 0, 0, 0, 360, + 0, 0, 0, 0, 360, 0, 360, 360, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 359, 359, 0, 359, 0, 0, 359, - 359, 0, 0, 358, 359, 358, 0, 358, 359, 358, - 0, 358, 0, 358, 359, 358, 0, 359, 0, 0, - 0, 0, 0, 0, 359, 0, 0, 0, 0, 359, - 0, 359, 359, 359, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 359, 0, 359, 359, 0, - 359, 0, 0, 359, 0, 359, 0, 359, 359, 359, - 359, 0, 359, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 359, 0, 359, 359, 359, 0, 359, 359, - 359, 359, 359, 359, 359, 0, 0, 0, 0, 359, - 359, 0, 0, 359, 359, 359, 0, 359, 0, 0, + 360, 0, 360, 360, 0, 360, 0, 0, 360, 0, + 360, 0, 360, 360, 360, 360, 0, 360, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 360, 0, 360, + 360, 360, 0, 360, 360, 360, 360, 360, 360, 360, + 0, 0, 0, 360, 0, 360, 0, 0, 0, 360, + 360, 0, 360, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 360, 0, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 359, 0, 359, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 361, 361, 0, - 361, 0, 0, 361, 361, 0, 0, 359, 361, 359, - 0, 359, 361, 359, 0, 359, 0, 359, 361, 359, - 0, 361, 0, 0, 0, 0, 0, 0, 361, 0, - 0, 0, 0, 361, 0, 361, 361, 361, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 361, - 0, 361, 361, 0, 361, 0, 0, 361, 0, 361, - 0, 361, 361, 361, 361, 0, 361, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 361, 0, 361, 361, - 361, 0, 361, 361, 361, 361, 361, 361, 361, 0, - 0, 0, 361, 361, 361, 0, 0, 0, 361, 361, + 0, 0, 361, 361, 0, 361, 0, 0, 361, 361, + 0, 0, 360, 361, 360, 0, 360, 361, 360, 0, + 360, 0, 360, 361, 360, 0, 361, 0, 0, 0, + 0, 0, 0, 361, 0, 0, 0, 0, 361, 0, + 361, 361, 361, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 361, 0, 361, 361, 0, 361, + 0, 0, 361, 0, 361, 0, 361, 361, 361, 361, 0, 361, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 361, 0, 361, 0, 0, + 0, 361, 0, 361, 361, 361, 0, 361, 361, 361, + 361, 361, 361, 361, 0, 0, 0, 361, 0, 361, + 0, 0, 0, 361, 361, 0, 361, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 360, 360, 0, 360, 0, 0, 360, 360, 0, - 0, 361, 360, 361, 0, 361, 360, 361, 0, 361, - 0, 361, 360, 361, 0, 360, 0, 0, 0, 0, - 0, 0, 360, 0, 0, 0, 0, 360, 0, 360, - 360, 360, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 360, 0, 360, 360, 0, 360, 0, - 0, 360, 0, 360, 0, 360, 360, 360, 360, 0, - 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 360, 0, 360, 360, 360, 0, 360, 360, 360, 360, - 360, 360, 360, 0, 0, 0, 0, 360, 360, 0, - 0, 360, 360, 360, 0, 360, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, - 0, 360, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 362, 362, 0, 362, 0, - 0, 362, 362, 0, 0, 360, 362, 360, 0, 360, - 362, 360, 0, 360, 0, 360, 362, 360, 0, 362, + 361, 0, 361, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 362, 362, 0, 362, + 0, 0, 362, 362, 0, 0, 361, 362, 361, 0, + 361, 362, 361, 0, 361, 0, 361, 362, 361, 0, + 362, 0, 0, 0, 0, 0, 0, 362, 0, 0, + 0, 0, 362, 0, 362, 362, 362, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, + 362, 362, 0, 362, 0, 0, 362, 0, 362, 0, + 362, 362, 362, 362, 0, 362, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 362, 0, 362, 362, 362, + 0, 362, 362, 362, 362, 362, 362, 362, 0, 0, + 0, 362, 0, 362, 0, 0, 0, 362, 362, 0, + 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, - 0, 362, 0, 362, 362, 362, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 362, 0, 362, - 362, 0, 362, 0, 0, 362, 0, 362, 0, 362, - 362, 362, 362, 0, 362, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 362, 0, 362, 362, 362, 0, - 362, 362, 362, 362, 362, 362, 362, 0, 0, 0, - 362, 362, 362, 0, 0, 0, 362, 362, 0, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 362, 0, 362, 0, 0, 0, 0, + 363, 363, 0, 363, 0, 0, 363, 363, 0, 0, + 362, 363, 362, 0, 362, 363, 362, 0, 362, 0, + 362, 363, 362, 0, 363, 0, 0, 0, 0, 0, + 0, 363, 0, 0, 0, 0, 363, 0, 363, 363, + 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 363, 0, 363, 363, 0, 363, 0, 0, + 363, 0, 363, 0, 363, 363, 363, 363, 0, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 363, - 363, 0, 363, 0, 0, 363, 363, 0, 0, 362, - 363, 362, 0, 362, 363, 362, 0, 362, 0, 362, - 363, 362, 0, 363, 0, 0, 0, 0, 0, 0, - 363, 0, 0, 0, 0, 363, 0, 363, 363, 363, + 0, 363, 363, 363, 0, 363, 363, 363, 363, 363, + 363, 363, 0, 0, 0, 363, 0, 363, 0, 0, + 0, 363, 363, 0, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 363, 0, 363, 363, 0, 363, 0, 0, 363, - 0, 363, 0, 363, 363, 363, 363, 0, 363, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 363, 0, - 363, 363, 363, 0, 363, 363, 363, 363, 363, 363, - 363, 0, 0, 0, 363, 0, 363, 0, 0, 0, - 363, 363, 0, 363, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 363, 0, 363, + 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 364, 364, 0, 364, 0, 0, + 364, 364, 0, 0, 363, 364, 363, 0, 363, 364, + 363, 0, 363, 0, 363, 364, 363, 0, 364, 0, + 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, + 364, 0, 364, 364, 364, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 364, 0, 364, 364, + 0, 364, 0, 0, 364, 0, 364, 0, 364, 364, + 364, 364, 0, 364, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 364, 0, 364, 364, 364, 0, 364, + 364, 364, 364, 364, 364, 364, 0, 0, 0, 364, + 0, 364, 0, 0, 0, 0, 364, 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 364, 364, 0, 364, 0, 0, 364, - 364, 0, 0, 363, 364, 363, 0, 363, 364, 363, - 0, 363, 0, 363, 364, 363, 0, 364, 0, 0, - 0, 0, 0, 0, 364, 0, 0, 0, 0, 364, - 0, 364, 364, 364, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 364, 0, 364, 364, 0, - 364, 0, 0, 364, 0, 364, 0, 364, 364, 364, - 364, 0, 364, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 364, 0, 364, 364, 364, 0, 364, 364, - 364, 364, 364, 364, 364, 0, 0, 0, 364, 0, - 364, 0, 0, 0, 364, 364, 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 364, 0, 364, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 365, 365, 0, - 365, 0, 0, 365, 365, 0, 0, 364, 365, 364, - 0, 364, 365, 364, 0, 364, 0, 364, 365, 364, - 0, 365, 0, 0, 0, 0, 0, 0, 365, 0, - 0, 0, 0, 365, 0, 365, 365, 365, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, - 0, 365, 365, 0, 365, 0, 0, 365, 0, 365, - 0, 365, 365, 365, 365, 0, 365, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 365, 0, 365, 365, - 365, 0, 365, 365, 365, 365, 365, 365, 365, 0, - 0, 0, 365, 0, 365, 0, 0, 0, 365, 365, - 0, 365, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 69, + 0, 70, 0, 0, 71, 72, 0, 0, 364, 73, + 364, 0, 364, 74, 364, 0, 364, 0, 364, 75, + 364, 0, 76, 0, 0, 0, 0, 0, 0, 77, + 0, 0, 0, 0, 78, 0, 79, 80, 81, 0, + 244, 0, 0, 0, 0, 0, 0, 245, 0, 0, + 82, 0, 83, 84, 0, 85, 0, 0, 86, 0, + 87, 0, 88, 89, 90, 91, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 366, 366, 0, 366, 0, 0, 366, 366, 0, - 0, 365, 366, 365, 0, 365, 366, 365, 0, 365, - 0, 365, 366, 365, 0, 366, 0, 0, 0, 0, - 0, 0, 366, 0, 0, 0, 0, 366, 0, 366, - 366, 366, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 366, 0, 366, 366, 0, 366, 0, - 0, 366, 0, 366, 0, 366, 366, 366, 366, 0, - 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 366, 0, 366, 366, 366, 0, 366, 366, 366, 366, - 366, 366, 366, 0, 0, 0, 366, 0, 366, 0, - 0, 0, 366, 366, 0, 366, 0, 0, 0, 0, + 93, 0, 0, 0, 0, 0, 94, 95, 96, 97, + 0, 0, 0, 98, 0, 99, 0, 0, 0, 0, + 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 366, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 367, 367, 0, 367, 0, - 0, 367, 367, 0, 0, 366, 367, 366, 0, 366, - 367, 366, 0, 366, 0, 366, 367, 366, 0, 367, - 0, 0, 0, 0, 0, 0, 367, 0, 0, 0, - 0, 367, 0, 367, 367, 367, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 367, 0, 367, - 367, 0, 367, 0, 0, 367, 0, 367, 0, 367, - 367, 367, 367, 0, 367, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 367, 0, 367, 367, 367, 0, - 367, 367, 367, 367, 367, 367, 367, 0, 0, 0, - 367, 0, 367, 0, 0, 0, 0, 367, 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 68, 69, 0, 70, 0, 0, 71, 72, + 0, 0, 102, 73, 103, 0, 104, 74, 105, 0, + 106, 0, 107, 75, 38, 0, 76, 0, 0, 0, + 0, 0, 0, 77, 0, 0, 0, 0, 78, 0, + 79, 80, 81, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 82, 0, 83, 84, 0, 85, + 0, 0, 86, 0, 87, 0, 88, 89, 90, 91, + 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, + 414, 440, 0, 0, 93, 0, 0, 0, 0, 0, + 94, 95, 96, 97, 0, 0, 0, 98, 0, 99, + 0, 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, - 71, 0, 72, 0, 0, 73, 74, 0, 0, 367, - 75, 367, 0, 367, 76, 367, 0, 367, 0, 367, - 77, 367, 0, 78, 0, 0, 0, 0, 0, 0, - 79, 0, 0, 0, 0, 80, 0, 81, 82, 83, - 0, 246, 0, 0, 0, 0, 0, 0, 247, 0, - 0, 84, 0, 85, 86, 0, 87, 0, 0, 88, - 0, 89, 0, 90, 91, 92, 93, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 95, 0, 0, 0, 0, 0, 96, 97, 98, - 99, 0, 0, 0, 100, 0, 101, 0, 0, 0, - 0, 102, 0, 103, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 68, 69, 0, 70, + 0, 0, 71, 72, 0, 0, 102, 73, 103, 0, + 104, 74, 105, 0, 106, 0, 107, 75, 38, 0, + 76, 0, 0, 0, 0, 0, 0, 77, 0, 0, + 0, 0, 78, 0, 79, 80, 81, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 0, + 83, 84, 0, 85, 0, 0, 86, 0, 87, 0, + 88, 89, 90, 91, 0, 92, 0, 0, 0, 0, + 0, 0, 0, 0, 414, 552, 0, 0, 93, 0, + 0, 0, 0, 0, 94, 95, 96, 97, 0, 0, + 0, 98, 0, 99, 0, 0, 0, 0, 100, 0, + 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 70, 71, 0, 72, 0, 0, 73, - 74, 0, 0, 104, 75, 105, 0, 106, 76, 107, - 0, 108, 0, 109, 77, 40, 0, 78, 0, 0, - 0, 0, 0, 0, 79, 0, 0, 0, 0, 80, - 0, 81, 82, 83, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 84, 0, 85, 86, 0, - 87, 0, 0, 88, 0, 89, 0, 90, 91, 92, - 93, 0, 94, 0, 0, 0, 0, 0, 0, 0, - 0, 416, 442, 0, 0, 95, 0, 0, 0, 0, - 0, 96, 97, 98, 99, 0, 0, 0, 100, 0, - 101, 0, 0, 0, 0, 102, 0, 103, 0, 0, + 99, 99, 0, 99, 0, 0, 99, 99, 0, 0, + 102, 99, 103, 0, 104, 99, 105, 0, 106, 0, + 107, 99, 38, 0, 99, 0, 0, 0, 0, 0, + 0, 99, 0, 0, 0, 0, 99, 0, 99, 99, + 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 99, 0, 99, 99, 0, 99, 0, 0, + 99, 0, 99, 0, 99, 99, 99, 99, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 99, 0, 0, 99, 0, 99, 99, 99, + 99, 99, 0, 0, 0, 99, 0, 99, 0, 0, + 0, 0, 99, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 70, 71, 0, - 72, 0, 0, 73, 74, 0, 0, 104, 75, 105, - 0, 106, 76, 107, 0, 108, 0, 109, 77, 40, - 0, 78, 0, 0, 0, 0, 0, 0, 79, 0, - 0, 0, 0, 80, 0, 81, 82, 83, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, - 0, 85, 86, 0, 87, 0, 0, 88, 0, 89, - 0, 90, 91, 92, 93, 0, 94, 0, 0, 0, - 0, 0, 0, 0, 0, 416, 554, 0, 0, 95, - 0, 0, 0, 0, 0, 96, 97, 98, 99, 0, - 0, 0, 100, 0, 101, 0, 0, 0, 0, 102, - 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 69, 0, 70, 0, 0, + 71, 72, 0, 0, 99, 73, 99, 0, 99, 74, + 99, 0, 99, 0, 99, 75, 99, 0, 76, 0, + 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, + 78, 0, 79, 80, 81, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 82, 0, 83, 84, + 0, 85, 0, 0, 86, 0, 87, 0, 88, 89, + 90, 91, 0, 92, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 93, 0, 0, 298, + 0, 0, 94, 95, 96, 97, 0, 0, 0, 98, + 0, 99, 0, 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 102, 102, 0, 102, 0, 0, 102, 102, 0, - 0, 104, 102, 105, 0, 106, 102, 107, 0, 108, - 0, 109, 102, 40, 0, 102, 0, 0, 0, 0, - 0, 0, 102, 0, 0, 0, 0, 102, 0, 102, - 102, 102, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 102, 0, 102, 102, 0, 102, 0, - 0, 102, 0, 102, 0, 102, 102, 102, 102, 0, - 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 102, 0, 0, 102, 0, 102, 102, - 102, 102, 102, 0, 0, 0, 102, 0, 102, 0, - 0, 0, 0, 102, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 69, + 0, 70, 0, 0, 71, 72, 0, 0, 102, 73, + 103, 0, 104, 74, 105, 0, 106, 0, 107, 75, + 38, 0, 76, 0, 0, 0, 0, 0, 0, 77, + 0, 0, 0, 0, 78, 0, 79, 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 70, 71, 0, 72, 0, - 0, 73, 74, 0, 0, 102, 75, 102, 0, 102, - 76, 102, 0, 102, 0, 102, 77, 102, 0, 78, - 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, - 0, 80, 0, 81, 82, 83, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 84, 0, 85, - 86, 0, 87, 0, 0, 88, 0, 89, 0, 90, - 91, 92, 93, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 95, 0, 0, - 300, 0, 0, 96, 97, 98, 99, 0, 0, 0, - 100, 0, 101, 0, 0, 0, 0, 102, 0, 103, + 82, 0, 83, 84, 0, 85, 0, 0, 86, 0, + 87, 0, 88, 89, 90, 91, 0, 92, 0, 0, + 0, 0, 0, 0, 0, 0, 414, 0, 0, 0, + 93, 0, 0, 0, 0, 0, 94, 95, 96, 97, + 0, 0, 0, 98, 0, 99, 0, 0, 0, 0, + 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, - 71, 0, 72, 0, 0, 73, 74, 0, 0, 104, - 75, 105, 0, 106, 76, 107, 0, 108, 0, 109, - 77, 40, 0, 78, 0, 0, 0, 0, 0, 0, - 79, 0, 0, 0, 0, 80, 0, 81, 82, 83, + 0, 0, 68, 69, 0, 70, 0, 0, 71, 72, + 0, 0, 102, 73, 103, 0, 104, 74, 105, 0, + 106, 0, 107, 75, 38, 0, 76, 0, 0, 0, + 0, 0, 0, 77, 0, 0, 0, 0, 78, 0, + 79, 80, 81, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 82, 0, 83, 84, 0, 85, + 0, 0, 86, 0, 87, 0, 88, 89, 90, 91, + 0, 92, 0, 0, 501, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, + 94, 95, 96, 97, 0, 0, 0, 98, 0, 99, + 0, 0, 0, 0, 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 84, 0, 85, 86, 0, 87, 0, 0, 88, - 0, 89, 0, 90, 91, 92, 93, 0, 94, 0, - 0, 0, 0, 0, 0, 0, 0, 416, 0, 0, - 0, 95, 0, 0, 0, 0, 0, 96, 97, 98, - 99, 0, 0, 0, 100, 0, 101, 0, 0, 0, - 0, 102, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 434, 434, 0, 434, + 0, 0, 434, 434, 0, 0, 102, 434, 103, 0, + 104, 434, 105, 0, 106, 0, 107, 434, 38, 0, + 434, 0, 0, 0, 0, 0, 0, 434, 0, 0, + 0, 0, 434, 0, 434, 434, 434, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 434, 0, + 434, 434, 0, 434, 0, 0, 434, 0, 434, 0, + 434, 434, 434, 434, 0, 434, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 434, 0, + 0, 0, 0, 434, 434, 434, 434, 434, 0, 0, + 0, 434, 0, 434, 0, 0, 0, 0, 434, 0, + 434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 70, 71, 0, 72, 0, 0, 73, - 74, 0, 0, 104, 75, 105, 0, 106, 76, 107, - 0, 108, 0, 109, 77, 40, 0, 78, 0, 0, - 0, 0, 0, 0, 79, 0, 0, 0, 0, 80, - 0, 81, 82, 83, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 84, 0, 85, 86, 0, - 87, 0, 0, 88, 0, 89, 0, 90, 91, 92, - 93, 0, 94, 0, 0, 503, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, - 0, 96, 97, 98, 99, 0, 0, 0, 100, 0, - 101, 0, 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 69, 0, 70, 0, 0, 71, 72, 0, 0, + 434, 73, 434, 0, 434, 74, 434, 0, 434, 0, + 434, 75, 434, 0, 76, 0, 0, 0, 0, 0, + 0, 77, 0, 0, 0, 0, 78, 0, 79, 80, + 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 82, 0, 83, 84, 0, 85, 0, 0, + 86, 0, 87, 0, 88, 89, 90, 91, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 437, 437, 0, - 437, 0, 0, 437, 437, 0, 0, 104, 437, 105, - 0, 106, 437, 107, 0, 108, 0, 109, 437, 40, - 0, 437, 0, 0, 0, 0, 0, 0, 437, 0, - 0, 0, 0, 437, 0, 437, 437, 437, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 437, - 0, 437, 437, 0, 437, 0, 0, 437, 0, 437, - 0, 437, 437, 437, 437, 0, 437, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 437, - 0, 0, 0, 0, 437, 437, 437, 437, 437, 0, - 0, 0, 437, 0, 437, 0, 0, 0, 0, 437, - 0, 437, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 93, 0, 0, 0, 0, 0, 94, 95, + 96, 97, 0, 0, 0, 98, 0, 99, 0, 0, + 0, 0, 100, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 70, 71, 0, 72, 0, 0, 73, 74, 0, - 0, 437, 75, 437, 0, 437, 76, 437, 0, 437, - 0, 437, 77, 437, 0, 78, 0, 0, 0, 0, - 0, 0, 79, 0, 0, 0, 0, 80, 0, 81, - 82, 83, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 84, 0, 85, 86, 0, 87, 0, - 0, 88, 0, 89, 0, 90, 91, 92, 93, 0, - 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 95, 0, 0, 0, 0, 0, 96, - 97, 98, 99, 0, 0, 0, 100, 0, 101, 0, - 0, 0, 0, 102, 0, 103, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 70, 71, 0, 72, 0, - 0, 73, 74, 0, 0, 104, 75, 105, 0, 106, - 76, 107, 0, 108, 0, 109, 77, 40, 0, 78, - 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, - 0, 80, 0, 81, 82, 83, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 84, 0, 85, - 86, 0, 87, 0, 0, 88, 0, 89, 0, 90, - 91, 92, 93, 0, 94, 0, 71, 503, 72, 0, - 0, 73, 0, 155, 448, 0, 75, 694, 156, 0, - 76, 0, 157, 449, 450, 0, 0, 0, 0, 78, - 0, 0, 0, 0, 451, 0, 79, 158, 0, 0, - 0, 80, 0, 0, 0, 83, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 84, 0, 85, - 0, 0, 87, 159, 0, 0, 0, 0, 0, 0, - 91, 92, 0, 0, 94, 0, 0, 452, 0, 104, - 0, 105, 0, 106, 0, 107, 0, 108, 387, 109, - 387, 40, 0, 387, 0, 387, 387, 0, 387, 0, - 387, 0, 387, 0, 387, 387, 387, 0, 0, 0, - 0, 387, 0, 0, 0, 0, 387, 0, 387, 387, - 0, 0, 0, 387, 0, 0, 0, 387, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 387, - 0, 387, 0, 0, 387, 387, 0, 0, 0, 0, - 0, 0, 387, 387, 0, 386, 387, 386, 0, 387, - 386, 453, 386, 386, 0, 386, 0, 386, 0, 386, - 0, 386, 386, 386, 0, 0, 0, 0, 386, 0, - 0, 0, 0, 386, 0, 386, 386, 0, 0, 0, - 386, 0, 0, 0, 386, 0, 0, 0, 0, 33, - 0, 33, 0, 0, 33, 0, 386, 0, 386, 33, - 0, 386, 386, 33, 0, 0, 33, 0, 0, 386, - 386, 0, 33, 386, 0, 0, 386, 0, 0, 33, - 0, 0, 0, 0, 33, 0, 33, 0, 33, 0, - 0, 0, 0, 387, 0, 0, 0, 0, 0, 0, - 33, 33, 33, 33, 0, 33, 33, 0, 0, 0, - 0, 33, 0, 33, 33, 33, 0, 33, 33, 0, - 33, 0, 0, 0, 33, 0, 0, 147, 0, 0, - 0, 33, 33, 0, 33, 0, 33, 33, 33, 0, - 33, 0, 33, 0, 0, 0, 33, 0, 0, 0, - 0, 0, 33, 0, 33, 33, 0, 33, 0, 0, - 386, 0, 33, 0, 0, 33, 33, 33, 0, 33, - 0, 33, 33, 33, 0, 33, 33, 0, 33, 148, - 33, 33, 0, 33, 0, 33, 33, 0, 33, 0, - 33, 0, 0, 0, 0, 0, 33, 33, 0, 33, - 33, 0, 0, 0, 33, 0, 33, 0, 71, 0, - 72, 33, 0, 73, 110, 33, 0, 33, 75, 33, - 0, 0, 76, 0, 33, 463, 0, 33, 0, 33, - 0, 78, 33, 0, 0, 0, 0, 0, 79, 0, - 33, 33, 0, 80, 33, 0, 0, 83, 0, 0, - 0, 0, 0, 0, 0, 231, 33, 231, 0, 84, - 231, 85, 0, 0, 87, 231, 0, 0, 0, 231, - 0, 0, 91, 92, 0, 0, 94, 0, 231, 464, - 0, 0, 0, 0, 0, 231, 0, 33, 0, 0, - 231, 232, 0, 232, 231, 0, 232, 0, 0, 0, - 0, 232, 0, 0, 0, 232, 231, 0, 231, 0, - 0, 231, 0, 0, 232, 0, 0, 0, 0, 231, - 231, 232, 0, 231, 0, 0, 232, 0, 0, 0, - 232, 33, 231, 0, 0, 0, 0, 0, 0, 0, - 231, 0, 232, 155, 232, 155, 0, 232, 155, 0, - 0, 0, 0, 155, 0, 232, 232, 155, 0, 232, - 155, 252, 0, 40, 0, 118, 155, 118, 232, 0, - 118, 0, 0, 155, 0, 118, 232, 0, 155, 118, - 0, 0, 155, 0, 0, 0, 0, 0, 118, 0, - 0, 0, 0, 0, 155, 118, 155, 252, 0, 155, - 118, 0, 0, 0, 118, 0, 0, 155, 155, 0, - 231, 155, 0, 0, 155, 0, 118, 0, 118, 0, - 0, 118, 0, 0, 0, 0, 0, 0, 0, 118, - 118, 0, 0, 118, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 252, 0, 252, 232, 0, 0, 0, - 0, 0, 252, 252, 0, 252, 252, 252, 252, 252, - 252, 252, 252, 252, 252, 252, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 252, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 252, 0, 252, 0, 252, - 0, 252, 0, 252, 0, 252, 0, 252, 155, 252, - 0, 252, 21, 252, 0, 21, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, - 118, 21, 0, 0, 0, 21, 0, 0, 21, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 21, 21, 0, 0, 0, 21, 21, 0, 0, 0, - 0, 21, 0, 21, 21, 21, 21, 12, 0, 0, - 12, 21, 0, 0, 21, 0, 21, 0, 0, 0, - 0, 12, 0, 0, 0, 0, 12, 0, 0, 21, - 12, 0, 0, 12, 0, 0, 0, 21, 21, 0, - 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, - 12, 12, 0, 0, 0, 0, 12, 0, 12, 12, - 12, 12, 20, 0, 0, 20, 12, 0, 0, 12, - 0, 12, 0, 0, 0, 0, 20, 0, 0, 0, - 0, 20, 0, 0, 12, 20, 0, 0, 20, 0, - 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, - 20, 20, 0, 0, 0, 20, 20, 0, 0, 0, - 0, 20, 0, 20, 20, 20, 20, 23, 0, 0, - 33, 20, 0, 0, 20, 0, 20, 0, 0, 0, - 0, 33, 0, 0, 0, 0, 33, 0, 0, 20, - 33, 0, 20, 33, 0, 0, 0, 0, 20, 0, - 0, 0, 0, 20, 0, 33, 33, 0, 20, 0, - 0, 33, 20, 0, 0, 20, 33, 0, 33, 33, - 33, 33, 0, 0, 0, 0, 33, 20, 20, 33, - 0, 33, 20, 20, 0, 0, 0, 0, 20, 0, - 20, 20, 20, 20, 33, 33, 0, 0, 20, 0, - 0, 20, 23, 20, 0, 0, 33, 0, 0, 33, - 0, 33, 33, 0, 0, 33, 20, 0, 33, 0, - 0, 0, 0, 33, 20, 20, 0, 0, 33, 0, - 33, 33, 33, 0, 0, 33, 33, 0, 0, 0, - 0, 33, 0, 33, 33, 33, 33, 33, 33, 0, - 0, 33, 33, 33, 33, 0, 33, 0, 33, 0, - 33, 33, 33, 33, 22, 0, 0, 33, 33, 33, - 0, 33, 0, 33, 0, 0, 0, 22, 33, 0, - 0, 0, 0, 33, 0, 0, 33, 33, 0, 0, - 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 33, 33, 0, 0, 0, 255, 33, 255, - 440, 255, 440, 33, 440, 33, 33, 33, 33, 255, - 0, 0, 0, 33, 0, 0, 33, 0, 33, 255, - 259, 255, 259, 443, 259, 443, 0, 443, 0, 0, - 0, 33, 259, 0, 0, 0, 0, 0, 0, 255, - 0, 255, 259, 255, 259, 255, 0, 255, 0, 255, - 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, - 0, 0, 259, 0, 259, 0, 259, 0, 259, 0, - 259, 0, 259, 255, 259, 0, 259, 0, 259, 260, - 259, 260, 444, 260, 444, 0, 444, 0, 0, 0, - 299, 260, 299, 447, 299, 447, 259, 447, 0, 0, - 0, 260, 299, 260, 0, 0, 0, 0, 0, 0, - 0, 0, 299, 0, 299, 0, 0, 0, 0, 0, - 0, 260, 0, 260, 0, 260, 0, 260, 0, 260, - 0, 260, 299, 260, 299, 260, 299, 260, 299, 260, - 299, 16, 299, 16, 299, 16, 299, 0, 299, 0, - 299, 0, 0, 16, 0, 260, 0, 0, 0, 0, - 0, 0, 0, 16, 0, 16, 299, 0, 0, 0, + 0, 0, 0, 0, 68, 69, 0, 70, 0, 0, + 71, 72, 0, 0, 102, 73, 103, 0, 104, 74, + 105, 0, 106, 0, 107, 75, 38, 0, 76, 0, + 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, + 78, 0, 79, 80, 81, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 82, 0, 83, 84, + 0, 85, 0, 0, 86, 0, 87, 0, 88, 89, + 90, 91, 0, 92, 0, 384, 501, 384, 0, 0, + 384, 0, 384, 384, 0, 384, 692, 384, 0, 384, + 0, 384, 384, 384, 0, 0, 0, 0, 384, 0, + 0, 0, 0, 384, 0, 384, 384, 0, 0, 0, + 384, 0, 0, 0, 384, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 384, 0, 384, 0, + 0, 384, 384, 0, 0, 0, 0, 0, 0, 384, + 384, 0, 0, 384, 0, 0, 384, 0, 102, 0, + 103, 0, 104, 0, 105, 0, 106, 383, 107, 383, + 38, 0, 383, 0, 383, 383, 0, 383, 0, 383, + 0, 383, 0, 383, 383, 383, 0, 0, 0, 0, + 383, 33, 0, 33, 0, 383, 33, 383, 383, 0, + 0, 33, 383, 0, 0, 33, 383, 0, 33, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 383, 0, + 383, 33, 0, 383, 383, 0, 33, 0, 33, 0, + 33, 383, 383, 0, 0, 383, 0, 0, 383, 0, + 384, 0, 33, 33, 33, 33, 0, 33, 33, 0, + 0, 0, 0, 33, 0, 33, 33, 33, 0, 33, + 33, 0, 33, 0, 0, 0, 33, 0, 0, 144, + 0, 0, 0, 33, 0, 0, 0, 0, 33, 0, + 33, 0, 33, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 33, 0, 0, 33, + 0, 0, 0, 0, 0, 0, 0, 33, 33, 0, + 33, 33, 33, 0, 33, 33, 0, 0, 0, 0, + 33, 145, 383, 0, 33, 0, 0, 0, 0, 33, + 0, 33, 0, 33, 33, 0, 0, 0, 0, 33, + 33, 0, 0, 33, 0, 33, 33, 0, 0, 33, + 0, 33, 33, 33, 0, 0, 0, 0, 33, 33, + 0, 33, 0, 33, 33, 0, 33, 0, 33, 0, + 33, 0, 33, 0, 33, 33, 0, 33, 33, 0, + 33, 0, 33, 0, 0, 33, 69, 0, 70, 0, + 0, 71, 107, 33, 33, 0, 73, 33, 33, 0, + 74, 0, 0, 461, 0, 228, 0, 228, 0, 76, + 228, 0, 0, 0, 0, 228, 77, 0, 0, 228, + 0, 78, 0, 0, 0, 81, 0, 0, 228, 0, + 0, 0, 0, 0, 0, 228, 0, 82, 0, 83, + 228, 0, 85, 0, 228, 0, 0, 0, 0, 0, + 89, 90, 0, 0, 92, 0, 228, 462, 228, 0, + 0, 228, 229, 0, 229, 33, 0, 229, 0, 228, + 228, 0, 229, 228, 0, 0, 229, 0, 0, 0, + 0, 152, 228, 152, 33, 229, 152, 0, 0, 0, + 228, 152, 229, 0, 0, 152, 0, 229, 152, 0, + 0, 229, 0, 0, 152, 0, 0, 0, 0, 0, + 0, 152, 0, 229, 0, 229, 152, 0, 229, 0, + 152, 0, 0, 0, 0, 0, 229, 229, 0, 0, + 229, 0, 152, 0, 152, 0, 0, 152, 0, 229, + 0, 38, 0, 249, 0, 152, 152, 229, 69, 152, + 70, 0, 152, 71, 115, 0, 115, 0, 73, 115, + 228, 0, 74, 0, 115, 0, 0, 0, 115, 0, + 0, 76, 0, 0, 0, 0, 0, 115, 77, 249, + 0, 0, 0, 78, 115, 0, 0, 81, 0, 115, + 0, 0, 0, 115, 0, 0, 0, 0, 0, 82, + 0, 83, 0, 0, 85, 115, 0, 115, 0, 0, + 115, 0, 89, 90, 0, 0, 92, 229, 115, 115, + 0, 0, 115, 0, 0, 249, 0, 249, 0, 0, + 0, 0, 0, 0, 249, 249, 152, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 249, 249, 0, 249, + 0, 249, 0, 249, 0, 249, 0, 249, 0, 249, + 0, 249, 0, 249, 0, 249, 0, 249, 0, 249, + 0, 249, 0, 249, 0, 249, 0, 249, 0, 249, + 0, 249, 0, 249, 0, 249, 0, 21, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 0, 38, 0, 0, 21, 0, 0, 115, + 21, 0, 0, 21, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 21, 21, 0, 0, 0, + 21, 21, 0, 0, 0, 0, 21, 0, 21, 21, + 21, 21, 12, 0, 0, 12, 21, 0, 0, 21, + 0, 21, 0, 0, 0, 0, 12, 0, 0, 0, + 0, 12, 0, 0, 21, 12, 0, 0, 12, 0, + 0, 0, 21, 21, 0, 0, 0, 0, 0, 0, + 12, 12, 0, 0, 0, 12, 12, 0, 0, 0, + 0, 12, 0, 12, 12, 12, 12, 20, 0, 0, + 20, 12, 0, 0, 12, 0, 12, 0, 0, 0, + 0, 20, 0, 0, 0, 0, 20, 0, 0, 12, + 20, 0, 0, 20, 0, 0, 0, 12, 12, 0, + 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, + 20, 20, 0, 0, 20, 0, 20, 0, 20, 20, + 20, 20, 0, 0, 0, 20, 20, 0, 0, 20, + 20, 20, 0, 0, 20, 0, 0, 20, 0, 0, + 0, 0, 0, 0, 20, 0, 0, 0, 0, 20, + 20, 0, 0, 20, 20, 20, 0, 0, 33, 0, + 20, 0, 20, 20, 20, 20, 0, 0, 0, 33, + 20, 0, 0, 20, 33, 20, 0, 0, 33, 0, + 0, 33, 0, 0, 0, 0, 0, 0, 20, 0, + 0, 0, 0, 33, 33, 0, 20, 20, 0, 33, + 0, 0, 0, 0, 33, 0, 33, 33, 33, 33, + 33, 0, 0, 33, 33, 0, 0, 33, 0, 33, + 0, 0, 0, 0, 33, 0, 0, 0, 0, 33, + 0, 0, 33, 33, 0, 0, 33, 0, 0, 0, + 22, 0, 0, 0, 0, 0, 0, 0, 33, 33, + 0, 0, 22, 33, 33, 33, 0, 0, 0, 33, + 0, 33, 33, 33, 33, 0, 33, 0, 0, 33, + 0, 33, 33, 0, 33, 33, 0, 0, 33, 0, + 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, + 33, 33, 0, 0, 0, 252, 33, 252, 437, 252, + 437, 33, 437, 33, 33, 33, 33, 252, 0, 0, + 0, 33, 0, 0, 33, 0, 33, 252, 256, 252, + 256, 440, 256, 440, 0, 440, 0, 0, 0, 33, + 256, 0, 0, 0, 0, 0, 0, 252, 0, 252, + 256, 252, 256, 252, 0, 252, 0, 252, 0, 252, + 0, 252, 0, 252, 0, 252, 0, 0, 0, 0, + 256, 0, 256, 0, 256, 0, 256, 0, 256, 0, + 256, 252, 256, 0, 256, 0, 256, 257, 256, 257, + 441, 257, 441, 0, 441, 0, 0, 0, 296, 257, + 296, 444, 296, 444, 256, 444, 0, 0, 0, 257, + 296, 257, 0, 0, 0, 0, 0, 0, 0, 0, + 296, 0, 296, 0, 0, 0, 0, 0, 0, 257, + 0, 257, 0, 257, 0, 257, 0, 257, 0, 257, + 296, 257, 296, 257, 296, 257, 296, 257, 296, 16, + 296, 16, 296, 16, 296, 0, 296, 0, 296, 0, + 0, 16, 0, 257, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 16, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 16, + 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 16, }; protected static short [] yyCheck = { 3, - 235, 24, 322, 267, 326, 519, 491, 281, 1, 13, - 607, 275, 236, 467, 323, 625, 345, 43, 643, 347, - 333, 257, 263, 342, 260, 18, 268, 31, 264, 459, - 266, 24, 343, 269, 27, 271, 272, 343, 274, 313, - 276, 341, 278, 285, 280, 281, 282, 283, 607, 262, - 350, 287, 346, 347, 470, 343, 292, 323, 294, 295, - 296, 620, 564, 299, 300, 301, 343, 303, 364, 95, - 306, 393, 308, 309, 310, 311, 343, 343, 304, 315, - 316, 317, 323, 319, 320, 321, 343, 383, 81, 519, - 419, 419, 328, 329, 596, 304, 332, 323, 334, 335, - 419, 314, 95, 343, 343, 261, 342, 343, 419, 343, - 419, 343, 626, 419, 323, 351, 343, 343, 728, 729, - 536, 347, 96, 97, 98, 99, 100, 101, 102, 103, - 153, 419, 454, 730, 343, 161, 638, 163, 592, 641, - 364, 297, 419, 267, 170, 419, 262, 81, 343, 604, - 161, 275, 419, 419, 361, 419, 343, 183, 184, 346, - 153, 95, 419, 156, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 168, 169, 607, 803, 419, - 419, 454, 419, 419, 343, 419, 337, 419, 381, 644, - 620, 342, 419, 419, 220, 1, 626, 470, 314, 361, - 356, 357, 361, 800, 361, 267, 413, 361, 234, 300, - 419, 370, 18, 275, 361, 208, 209, 373, 342, 375, - 246, 247, 156, 234, 419, 361, 343, 201, 202, 203, - 204, 205, 206, 207, 168, 169, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 355, 221, 733, 734, - 361, 413, 343, 361, 413, 343, 413, 355, 346, 413, - 341, 746, 455, 748, 457, 459, 413, 241, 349, 243, - 347, 591, 298, 350, 208, 209, 385, 413, 387, 325, - 389, 342, 391, 287, 393, 344, 395, 348, 397, 348, - 399, 317, 401, 350, 403, 488, 266, 491, 344, 269, - 352, 353, 413, 326, 341, 413, 271, 500, 501, 81, - 419, 276, 342, 350, 621, 280, 362, 802, 348, 639, - 324, 628, 342, 343, 294, 519, 319, 841, 341, 299, - 295, 347, 345, 326, 347, 348, 329, 350, 823, 343, - 339, 337, 305, 342, 307, 315, 342, 317, 341, 312, - 360, 361, 362, 838, 358, 271, 321, 361, 328, 329, - 276, 343, 332, 556, 280, 347, 370, 360, 503, 419, - 393, 344, 345, 508, 419, 348, 344, 344, 344, 295, - 348, 348, 348, 341, 156, 319, 339, 345, 392, 342, - 416, 384, 396, 386, 341, 329, 168, 169, 345, 829, - 393, 204, 205, 723, 341, 321, 432, 341, 345, 413, - 341, 841, 350, 607, 345, 341, 343, 349, 345, 345, - 347, 343, 257, 345, 344, 347, 360, 420, 348, 452, - 345, 454, 626, 346, 345, 348, 208, 209, 365, 345, - 367, 467, 345, 365, 437, 367, 369, 470, 371, 377, - 384, 379, 386, 206, 207, 448, 449, 347, 343, 452, - 345, 454, 210, 211, 212, 213, 348, 660, 350, 358, - 463, 497, 348, 499, 350, 459, 381, 470, 471, 472, - 363, 348, 486, 350, 359, 459, 420, 343, 343, 345, - 345, 337, 337, 339, 339, 688, 489, 346, 341, 348, - 344, 419, 346, 437, 345, 419, 347, 491, 337, 419, - 339, 214, 215, 346, 448, 449, 346, 491, 419, 419, - 419, 419, 350, 349, 346, 459, 343, 346, 346, 463, - 341, 345, 348, 348, 727, 519, 730, 471, 472, 733, - 734, 349, 349, 344, 349, 519, 739, 349, 348, 346, - 743, 342, 746, 341, 748, 489, 341, 341, 793, 794, - 346, 754, 755, 342, 341, 348, 592, 419, 348, 341, - 348, 342, 459, 355, 350, 301, 342, 342, 345, 304, - 419, 304, 419, 609, 345, 519, 612, 613, 360, 341, - 616, 341, 419, 347, 343, 346, 600, 601, 345, 625, - 355, 347, 628, 345, 491, 350, 800, 350, 802, 459, - 345, 345, 384, 345, 386, 608, 345, 643, 345, 459, - 350, 343, 342, 607, 345, 349, 341, 419, 345, 823, - 343, 350, 519, 607, 350, 829, 346, 355, 831, 345, - 342, 491, 626, 647, 838, 419, 336, 841, 420, 350, - 350, 491, 626, 657, 350, 648, 649, 350, 350, 348, - 653, 419, 346, 349, 344, 437, 459, 346, 694, 519, - 696, 343, 339, 607, 608, 337, 448, 449, 348, 519, - 345, 350, 350, 346, 285, 346, 620, 346, 345, 268, - 268, 463, 626, 346, 344, 346, 344, 346, 491, 471, - 472, 705, 728, 729, 346, 342, 293, 711, 712, 341, - 350, 341, 350, 262, 648, 649, 350, 489, 314, 653, - 607, 459, 346, 346, 345, 345, 519, 342, 344, 346, - 349, 264, 350, 266, 279, 342, 269, 350, 350, 626, - 350, 274, 346, 736, 342, 278, 730, 773, 337, 733, - 734, 346, 346, 491, 287, 346, 730, 607, 346, 733, - 734, 294, 746, 349, 748, 339, 299, 607, 350, 346, - 303, 342, 746, 341, 748, 350, 626, 803, 347, 346, - 341, 519, 315, 355, 317, 344, 626, 320, 346, 341, - 341, 341, 419, 341, 350, 328, 329, 344, 341, 332, - 342, 341, 736, 796, 342, 419, 342, 341, 812, 813, - 814, 350, 314, 385, 607, 387, 800, 389, 802, 391, - 419, 393, 350, 395, 262, 397, 800, 399, 802, 401, - 350, 403, 342, 626, 346, 346, 608, 342, 346, 823, - 223, 287, 4, 730, 31, 829, 733, 734, 15, 823, - 153, 370, 28, 331, 838, 829, 329, 841, 413, 746, - 593, 748, 796, 389, 838, 365, 389, 841, 657, 607, - 601, 396, 600, 727, 712, 711, 648, 649, 293, 812, - 730, 653, 334, 733, 734, 392, 419, 316, 626, 247, - 730, 216, 218, 733, 734, 829, 746, 217, 748, 221, - 219, 65, 806, -1, 829, 800, 746, 841, 748, 623, - 691, 808, -1, 800, 499, 802, 689, 692, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 346, - -1, 348, -1, 350, -1, -1, 823, 730, 355, -1, - 733, 734, 829, -1, 284, -1, -1, -1, -1, -1, - 800, 838, 802, 746, 841, 748, -1, -1, -1, -1, - 800, -1, 802, -1, 736, -1, -1, -1, 385, -1, - 387, -1, 389, 823, 391, -1, 393, -1, 395, 829, - 397, -1, 399, 823, 401, 325, 403, -1, 838, 829, - -1, 841, 730, -1, -1, 733, 734, -1, 838, -1, - -1, 841, -1, -1, -1, -1, -1, 800, 746, 802, - 748, 351, 352, 353, 354, -1, 356, 357, 358, 359, - 360, 361, 362, 363, 796, 365, -1, 367, -1, 369, - 823, 371, -1, 373, -1, 375, 829, 377, -1, 379, - -1, -1, -1, -1, -1, 838, -1, -1, 841, -1, + 233, 517, 320, 22, 465, 605, 489, 235, 1, 13, + 14, 281, 324, 323, 342, 41, 641, 323, 343, 345, + 343, 343, 304, 16, 346, 29, 267, 457, 263, 22, + 343, 262, 25, 304, 275, 623, 343, 343, 457, 343, + 343, 323, 343, 313, 1, 333, 264, 347, 266, 300, + 452, 269, 323, 271, 272, 262, 274, 159, 276, 16, + 278, 343, 280, 281, 282, 347, 468, 93, 343, 287, + 489, 419, 343, 562, 292, 343, 294, 295, 343, 391, + 468, 299, 267, 314, 343, 303, 79, 517, 323, 343, + 275, 419, 343, 419, 419, 261, 419, 315, 517, 317, + 93, 343, 320, 321, 332, 594, 419, 314, 624, 419, + 328, 329, 419, 419, 332, 419, 419, 335, 419, 419, + 94, 95, 96, 97, 98, 99, 100, 101, 728, 590, + 232, 297, 151, 159, 305, 161, 307, 419, 726, 727, + 452, 312, 168, 359, 419, 79, 534, 636, 419, 419, + 639, 419, 355, 602, 419, 181, 182, 342, 151, 93, + 419, 154, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 166, 167, 605, 801, 419, 419, 341, + 268, 341, 619, 379, 342, 343, 605, 349, 618, 626, + 356, 357, 218, 642, 624, 411, 364, 285, 798, 359, + 359, 419, 359, 359, 359, 624, 232, 373, 368, 375, + 359, 605, 359, 206, 207, 383, 359, 342, 244, 245, + 154, 352, 353, 348, 618, 199, 200, 201, 202, 203, + 204, 205, 166, 167, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 341, 219, 344, 323, 731, 732, + 348, 411, 411, 350, 411, 411, 411, 453, 350, 455, + 341, 744, 411, 746, 411, 239, 342, 241, 411, 350, + 296, 589, 206, 207, 343, 501, 345, 347, 347, 341, + 506, 285, 271, 345, 360, 347, 348, 276, 350, 315, + 486, 280, 271, 342, 349, 337, 365, 276, 367, 348, + 342, 280, 498, 499, 419, 324, 295, 79, 266, 728, + 337, 269, 731, 732, 267, 342, 295, 800, 322, 637, + 202, 203, 275, 839, 317, 744, 343, 746, 345, 343, + 347, 324, 321, 347, 327, 419, 294, 341, 821, 344, + 345, 299, 321, 348, 350, 344, 339, 344, 365, 348, + 367, 348, 356, 836, 257, 359, 344, 315, 554, 317, + 348, 345, 344, 341, 368, 358, 348, 345, 345, 341, + 328, 329, 391, 345, 332, 343, 341, 347, 346, 798, + 345, 800, 154, 317, 347, 345, 390, 350, 414, 382, + 394, 384, 341, 327, 166, 167, 345, 827, 391, 360, + 361, 362, 821, 721, 430, 339, 341, 411, 827, 839, + 345, 208, 209, 210, 211, 339, 339, 836, 342, 342, + 839, 346, 358, 348, 358, 418, 369, 377, 371, 379, + 343, 450, 345, 452, 206, 207, 348, 345, 350, 465, + 359, 348, 435, 350, 348, 343, 350, 345, 382, 468, + 384, 346, 347, 446, 447, 381, 343, 450, 345, 452, + 341, 457, 658, 337, 337, 339, 339, 363, 461, 495, + 346, 497, 457, 204, 205, 468, 469, 470, 346, 346, + 484, 348, 419, 457, 418, 344, 337, 346, 339, 345, + 686, 347, 419, 489, 487, 212, 213, 419, 419, 419, + 350, 435, 419, 419, 489, 349, 343, 346, 346, 344, + 346, 301, 446, 447, 348, 489, 457, 341, 349, 349, + 348, 517, 345, 457, 349, 342, 348, 461, 349, 725, + 346, 346, 517, 341, 341, 469, 470, 341, 341, 348, + 419, 737, 342, 517, 342, 741, 348, 348, 489, 355, + 342, 350, 257, 487, 342, 260, 752, 753, 791, 792, + 345, 419, 304, 304, 590, 419, 271, 339, 345, 345, + 341, 276, 341, 419, 347, 280, 517, 343, 283, 346, + 355, 607, 347, 517, 610, 611, 358, 350, 614, 350, + 295, 296, 345, 345, 598, 599, 301, 623, 345, 345, + 626, 306, 345, 308, 309, 310, 311, 345, 343, 605, + 382, 316, 384, 606, 319, 641, 321, 457, 345, 349, + 605, 342, 350, 419, 350, 457, 350, 345, 624, 334, + 343, 605, 355, 829, 341, 419, 346, 342, 342, 624, + 336, 645, 345, 344, 350, 419, 418, 457, 350, 489, + 624, 655, 350, 646, 647, 350, 348, 489, 651, 350, + 346, 349, 346, 435, 605, 343, 692, 339, 694, 337, + 345, 605, 606, 350, 446, 447, 350, 517, 348, 489, + 346, 346, 346, 624, 618, 517, 345, 285, 268, 461, + 624, 268, 346, 344, 346, 344, 346, 469, 470, 703, + 726, 727, 346, 342, 293, 709, 710, 517, 341, 350, + 341, 314, 646, 647, 350, 487, 350, 651, 262, 346, + 346, 345, 345, 342, 344, 346, 279, 342, 350, 339, + 342, 349, 728, 350, 350, 731, 732, 350, 346, 346, + 346, 734, 346, 728, 346, 771, 731, 732, 744, 349, + 746, 337, 346, 350, 728, 342, 341, 731, 732, 744, + 350, 746, 341, 347, 346, 605, 344, 341, 341, 341, + 744, 346, 746, 605, 344, 801, 341, 341, 314, 342, + 341, 419, 342, 350, 624, 342, 341, 728, 350, 419, + 731, 732, 624, 262, 419, 605, 350, 342, 350, 346, + 734, 794, 798, 744, 800, 746, 810, 811, 812, 346, + 342, 346, 221, 798, 624, 800, 4, 285, 29, 151, + 368, 26, 329, 327, 798, 821, 800, 591, 411, 363, + 598, 827, 725, 710, 606, 655, 821, 387, 387, 599, + 836, 810, 827, 839, 709, 291, 245, 821, 394, 390, + 314, 836, 214, 827, 839, 215, 217, 798, 216, 800, + 794, 63, 836, 219, 621, 839, 804, 806, 827, 798, + 284, 690, -1, 687, 646, 647, 689, -1, -1, 651, + 821, -1, -1, 497, -1, -1, 827, -1, 728, -1, + -1, 731, 732, 827, -1, 836, 728, -1, 839, 731, + 732, -1, -1, -1, 744, 839, 746, -1, -1, -1, + -1, 325, 744, -1, 746, -1, -1, -1, 728, -1, + -1, 731, 732, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 744, -1, 746, 351, 352, 353, + 354, -1, 356, 357, 358, 359, 360, 361, 362, 363, + -1, 365, -1, 367, -1, 369, -1, 371, 798, 373, + 800, 375, 734, 377, -1, 379, 798, -1, 800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 800, -1, 802, -1, -1, -1, -1, 257, - -1, -1, 260, -1, 262, -1, 264, -1, 266, -1, - -1, 269, -1, 271, 272, 823, 274, -1, 276, -1, - 278, 829, 280, 281, 282, 283, -1, -1, -1, 287, - 838, -1, -1, 841, 292, -1, 294, 295, 296, -1, - -1, 299, 300, 301, -1, 303, -1, 305, 306, 307, - 308, 309, 310, 311, 312, -1, 314, 315, 316, 317, - -1, 319, 320, 321, -1, -1, -1, -1, -1, -1, - 328, 329, -1, -1, 332, -1, 334, 335, 260, 337, - -1, 339, 264, -1, 266, -1, -1, 269, -1, 271, - 272, -1, 274, 351, 276, -1, 278, -1, 280, 281, - 282, 283, -1, -1, -1, 287, -1, -1, -1, -1, - 292, -1, 294, 295, 296, -1, -1, 299, -1, 301, - -1, 303, -1, -1, 306, -1, 308, 309, 310, 311, - -1, -1, -1, 315, 316, 317, -1, 319, 320, 321, - -1, -1, -1, -1, -1, -1, 328, 329, -1, -1, - 332, -1, 334, 335, -1, -1, -1, -1, -1, 260, - 342, 419, -1, 264, -1, 266, -1, -1, 269, 351, + -1, 821, -1, -1, -1, -1, -1, 827, 798, 821, + 800, -1, -1, -1, -1, 827, 836, -1, -1, 839, + -1, -1, -1, -1, 836, -1, -1, 839, -1, -1, + -1, 821, -1, -1, -1, -1, 257, 827, -1, 260, + -1, 262, 794, 264, -1, 266, 836, -1, 269, 839, 271, 272, -1, 274, -1, 276, -1, 278, -1, 280, 281, 282, 283, -1, -1, -1, 287, -1, -1, -1, - -1, 292, -1, 294, 295, 296, -1, -1, 299, -1, - 301, -1, 303, -1, -1, 306, -1, 308, 309, 310, - 311, -1, -1, -1, 315, 316, 317, -1, 319, 320, + -1, 292, -1, 294, 295, 296, -1, -1, 299, 300, + 301, -1, 303, -1, 305, 306, 307, 308, 309, 310, + 311, 312, -1, 314, 315, 316, 317, -1, 319, 320, 321, -1, -1, -1, -1, -1, -1, 328, 329, -1, - -1, 332, -1, 334, 335, -1, -1, 419, -1, -1, - 260, 342, -1, -1, 264, -1, 266, -1, -1, 269, + -1, 332, -1, 334, 335, -1, 337, 257, 339, -1, + 260, -1, -1, -1, 264, -1, 266, -1, -1, 269, 351, 271, 272, -1, 274, -1, 276, -1, 278, -1, 280, 281, 282, 283, -1, -1, -1, 287, -1, -1, -1, -1, 292, -1, 294, 295, 296, -1, -1, 299, - -1, 301, -1, 303, -1, -1, 306, -1, 308, 309, + 300, 301, -1, 303, -1, -1, 306, -1, 308, 309, 310, 311, -1, -1, -1, 315, 316, 317, -1, 319, 320, 321, -1, -1, -1, -1, -1, -1, 328, 329, - -1, -1, 332, -1, 334, 335, -1, -1, 419, 260, - -1, -1, 342, 264, -1, 266, -1, -1, 269, -1, - 271, 272, -1, 274, -1, 276, -1, 278, -1, 280, - 281, 282, 283, -1, -1, -1, 287, -1, -1, -1, - -1, 292, -1, 294, 295, 296, -1, -1, 299, -1, - 301, -1, 303, -1, -1, 306, -1, 308, 309, 310, - 311, -1, -1, -1, 315, 316, 317, -1, 319, 320, - 321, -1, -1, -1, -1, -1, -1, 328, 329, -1, - -1, 332, -1, 334, 335, -1, -1, -1, -1, 419, - 261, 342, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 332, -1, 334, 335, -1, -1, 419, -1, + -1, 260, 342, 343, -1, 264, -1, 266, -1, -1, + 269, 351, 271, 272, -1, 274, -1, 276, -1, 278, + -1, 280, 281, 282, 283, -1, -1, -1, 287, -1, + -1, -1, -1, 292, -1, 294, 295, 296, -1, -1, + 299, -1, 301, -1, 303, -1, -1, 306, -1, 308, + 309, 310, 311, -1, -1, -1, 315, 316, 317, -1, + 319, 320, 321, -1, -1, -1, -1, -1, -1, 328, + 329, -1, -1, 332, -1, 334, 335, -1, -1, 419, + -1, -1, 260, 342, -1, -1, 264, -1, 266, -1, + -1, 269, 351, 271, 272, -1, 274, -1, 276, -1, + 278, -1, 280, 281, 282, 283, -1, -1, -1, 287, + -1, -1, -1, -1, 292, -1, 294, 295, 296, -1, + -1, 299, -1, 301, -1, 303, -1, -1, 306, -1, + 308, 309, 310, 311, -1, -1, -1, 315, 316, 317, + -1, 319, 320, 321, -1, -1, -1, -1, -1, -1, + 328, 329, -1, -1, 332, -1, 334, 335, -1, -1, + 419, -1, -1, 260, 342, -1, -1, 264, -1, 266, + -1, -1, 269, 351, 271, 272, -1, 274, -1, 276, + -1, 278, -1, 280, 281, 282, 283, -1, -1, -1, + 287, -1, -1, -1, -1, 292, -1, 294, 295, 296, + -1, -1, 299, -1, 301, -1, 303, -1, -1, 306, + -1, 308, 309, 310, 311, -1, -1, -1, 315, 316, + 317, -1, 319, 320, 321, -1, -1, -1, -1, -1, + -1, 328, 329, -1, -1, 332, -1, 334, 335, -1, + -1, 419, 260, -1, -1, 342, 264, -1, 266, -1, + -1, 269, -1, 271, 272, -1, 274, -1, 276, -1, + 278, -1, 280, 281, 282, 283, -1, -1, -1, 287, + -1, -1, -1, -1, 292, -1, 294, 295, 296, -1, + -1, 299, -1, 301, -1, 303, -1, -1, 306, -1, + 308, 309, 310, 311, -1, -1, -1, 315, 316, 317, + -1, 319, 320, 321, -1, -1, -1, -1, -1, -1, + 328, 329, -1, -1, 332, -1, 334, 335, -1, -1, + -1, -1, 419, 261, 342, 263, 264, -1, 266, -1, + -1, 269, 270, -1, -1, -1, 274, -1, -1, -1, + 278, -1, -1, -1, -1, -1, 284, -1, -1, 287, + -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, + -1, 299, -1, 301, 302, 303, 304, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, + 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, + 328, 329, 330, -1, 332, -1, -1, -1, 355, -1, + -1, 419, -1, 341, 342, -1, 344, 345, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 385, 367, + 387, 369, 389, 371, 391, 373, 393, 375, 395, 377, + 397, 379, 399, 381, 401, 383, 403, 385, -1, 387, + -1, 389, -1, 391, -1, 393, -1, 395, -1, 397, + -1, 399, 419, 401, -1, 403, -1, -1, -1, 407, + -1, 409, -1, 411, -1, 413, -1, 415, -1, 417, + 261, 419, 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, -1, 274, -1, -1, -1, 278, -1, -1, -1, -1, -1, 284, -1, -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, - 346, 332, 348, -1, 350, -1, -1, -1, 419, 355, + 346, 332, 348, -1, 350, -1, -1, -1, -1, 355, 341, 342, -1, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, - 361, 362, 363, 364, 365, -1, 367, -1, 369, 385, + 361, 362, 363, 364, 365, 355, 367, -1, 369, 385, 371, 387, 373, 389, 375, 391, 377, 393, 379, 395, 381, 397, 383, 399, 385, 401, 387, 403, 389, -1, - 391, -1, 393, -1, 395, -1, 397, -1, 399, -1, - 401, -1, 403, -1, -1, -1, 407, -1, 409, -1, - 411, -1, 413, -1, 415, -1, 417, 261, 419, 263, + 391, -1, 393, -1, 395, 385, 397, 387, 399, 389, + 401, 391, 403, 393, -1, 395, 407, 397, 409, 399, + 411, 401, 413, 403, 415, -1, 417, 261, 419, 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, -1, 274, -1, -1, -1, 278, -1, -1, -1, -1, -1, 284, -1, -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, - -1, -1, -1, -1, -1, -1, -1, 341, 342, -1, + -1, 325, -1, 327, 328, 329, 330, 346, 332, 348, + -1, 350, -1, -1, -1, -1, 355, -1, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, -1, 367, -1, 369, -1, 371, -1, 373, - -1, 375, -1, 377, -1, 379, -1, 381, -1, 383, - -1, 385, -1, 387, -1, 389, -1, 391, -1, 393, + 364, 365, -1, 367, -1, 369, 385, 371, 387, 373, + 389, 375, 391, 377, 393, 379, 395, 381, 397, 383, + 399, 385, 401, 387, 403, 389, -1, 391, -1, 393, -1, 395, -1, 397, -1, 399, -1, 401, -1, 403, -1, -1, -1, 407, -1, 409, -1, 411, -1, 413, -1, 415, -1, 417, 261, 419, 263, 264, -1, 266, @@ -4284,7 +4296,7 @@ case 515: 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, 342, 343, 344, 345, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + -1, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, -1, 367, -1, 369, -1, 371, -1, 373, -1, 375, -1, 377, -1, 379, -1, 381, -1, 383, -1, 385, -1, @@ -4299,9 +4311,9 @@ case 515: -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, 343, 344, 345, 346, -1, 348, 349, + -1, -1, 342, -1, 344, -1, 346, -1, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, -1, 367, -1, 369, + 360, 361, 362, 363, 364, -1, -1, -1, -1, 369, -1, 371, -1, 373, -1, 375, -1, 377, -1, 379, -1, 381, -1, 383, -1, 385, -1, 387, -1, 389, -1, 391, -1, 393, -1, 395, -1, 397, -1, 399, @@ -4315,711 +4327,672 @@ case 515: -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, 342, - -1, 344, -1, 346, -1, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, 364, -1, -1, -1, -1, 369, -1, 371, -1, + -1, 344, 345, 346, -1, 348, 349, 350, 351, 352, + 353, 354, -1, 356, 357, 358, 359, 360, 361, 362, + 363, 364, 365, -1, 367, -1, 369, -1, 371, -1, 373, -1, 375, -1, 377, -1, 379, -1, 381, -1, - 383, -1, 385, -1, 387, -1, 389, -1, 391, -1, - 393, -1, 395, -1, 397, -1, 399, -1, 401, -1, - 403, -1, -1, -1, 407, -1, 409, -1, 411, -1, - 413, -1, 415, -1, 417, 261, 419, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, -1, 274, -1, - -1, -1, 278, -1, -1, -1, -1, -1, 284, -1, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, 344, 345, - 346, -1, 348, 349, 350, 351, 352, 353, 354, -1, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - -1, 367, -1, 369, -1, 371, -1, 373, -1, 375, - -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, 297, -1, 299, -1, 301, - 302, 303, 304, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, 341, - 342, 343, 344, 345, 346, -1, 348, 349, 350, 351, - 352, 353, 354, -1, 356, 357, 358, 359, 360, -1, - -1, 363, 364, 365, -1, 367, -1, -1, -1, -1, - -1, 373, -1, 375, -1, 377, -1, 379, -1, 381, - -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 261, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, - -1, 299, -1, 301, 302, 303, 304, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, - -1, -1, -1, 341, 342, -1, 344, 345, 346, -1, - 348, 349, 350, 351, 352, 353, 354, -1, 356, 357, - 358, 359, 360, -1, -1, 363, 364, 365, -1, 367, - -1, -1, -1, -1, -1, 373, -1, 375, -1, 377, - -1, 379, -1, 381, -1, 383, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 261, -1, 263, - 264, -1, 266, -1, -1, 269, 270, -1, -1, 407, - 274, 409, -1, 411, 278, 413, -1, 415, -1, 417, - 284, 419, -1, 287, -1, -1, -1, -1, -1, -1, - 294, -1, -1, 297, -1, 299, -1, 301, 302, 303, + 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 261, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, 297, -1, + 299, -1, 301, 302, 303, 304, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, + -1, -1, 341, 342, 343, 344, 345, 346, -1, 348, + 349, 350, 351, 352, 353, 354, -1, 356, 357, 358, + 359, 360, -1, -1, 363, 364, 365, -1, 367, -1, + -1, -1, -1, -1, 373, -1, 375, -1, 377, -1, + 379, -1, 381, -1, 383, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 261, -1, 263, 264, + -1, 266, -1, -1, 269, 270, -1, -1, 407, 274, + 409, -1, 411, 278, 413, -1, 415, -1, 417, 284, + 419, -1, 287, -1, -1, -1, -1, -1, -1, 294, + -1, -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 342, -1, - 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, - 354, -1, 356, 357, 358, 359, -1, -1, -1, 363, - 364, 365, -1, 367, -1, 369, -1, 371, -1, 373, - -1, 375, -1, 377, -1, 379, -1, 381, -1, 383, + 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, + 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 342, -1, 344, + 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, + -1, 356, 357, 358, 359, -1, -1, -1, 363, 364, + 365, -1, 367, -1, 369, -1, 371, -1, 373, -1, + 375, -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 261, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, 297, -1, 299, - -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, -1, 344, 345, 346, -1, 348, 349, - 350, 351, 352, 353, 354, -1, 356, 357, 358, 359, - -1, -1, -1, 363, 364, 365, -1, 367, -1, 369, - -1, 371, -1, 373, -1, 375, -1, 377, -1, 379, - -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 261, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, 344, 345, - 346, -1, 348, 349, 350, 351, 352, 353, 354, -1, - 356, 357, 358, 359, -1, -1, -1, 363, 364, 365, - -1, 367, -1, 369, -1, 371, -1, 373, -1, 375, - -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, 297, -1, 299, -1, 301, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 342, -1, 344, 345, 346, -1, 348, 349, 350, 351, - -1, -1, 354, -1, 356, 357, 358, 359, 360, -1, - -1, 363, 364, 365, -1, 367, -1, 369, -1, 371, - -1, 373, -1, 375, -1, 377, -1, 379, -1, 381, - -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 261, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, - -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 342, -1, 344, 345, 346, -1, - 348, 349, 350, 351, 352, 353, 354, -1, 356, 357, - 358, 359, 360, -1, -1, 363, 364, 365, -1, 367, - -1, -1, -1, -1, -1, 373, -1, 375, -1, 377, - -1, 379, -1, 381, -1, 383, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 261, -1, 263, - 264, -1, 266, -1, -1, 269, 270, -1, -1, 407, - 274, 409, -1, 411, 278, 413, -1, 415, -1, 417, - 284, 419, -1, 287, -1, -1, -1, -1, -1, -1, - 294, -1, -1, 297, -1, 299, -1, 301, 302, 303, + 261, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, 297, -1, 299, -1, + 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 342, -1, 344, 345, 346, -1, 348, 349, 350, + 351, 352, 353, 354, -1, 356, 357, 358, 359, -1, + -1, -1, 363, 364, 365, -1, 367, -1, 369, -1, + 371, -1, 373, -1, 375, -1, 377, -1, 379, -1, + 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 261, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 342, -1, 344, 345, 346, + -1, 348, 349, 350, 351, 352, 353, 354, -1, 356, + 357, 358, 359, -1, -1, -1, 363, 364, 365, -1, + 367, -1, 369, -1, 371, -1, 373, -1, 375, -1, + 377, -1, 379, -1, 381, -1, 383, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 261, -1, + 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, + 407, 274, 409, -1, 411, 278, 413, -1, 415, -1, + 417, 284, 419, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, -1, 297, -1, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, + 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 342, + -1, 344, 345, 346, -1, 348, 349, 350, 351, -1, + -1, 354, -1, 356, 357, 358, 359, 360, -1, -1, + 363, 364, 365, -1, 367, -1, 369, -1, 371, -1, + 373, -1, 375, -1, 377, -1, 379, -1, 381, -1, + 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 261, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, 297, -1, + 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 342, -1, 344, 345, 346, -1, 348, + 349, 350, 351, 352, 353, 354, -1, 356, 357, 358, + 359, 360, -1, -1, 363, 364, 365, -1, 367, -1, + -1, -1, -1, -1, 373, -1, 375, -1, 377, -1, + 379, -1, 381, -1, 383, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 261, -1, 263, 264, + -1, 266, -1, -1, 269, 270, -1, -1, 407, 274, + 409, -1, 411, 278, 413, -1, 415, -1, 417, 284, + 419, -1, 287, -1, -1, -1, -1, -1, -1, 294, + -1, -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 342, -1, - 344, 345, 346, -1, 348, 349, 350, 351, -1, -1, - 354, -1, 356, 357, 358, 359, 360, -1, -1, 363, - 364, 365, -1, 367, -1, 369, -1, 371, -1, 373, - -1, 375, -1, 377, -1, 379, -1, 381, -1, 383, + 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, + 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 342, -1, 344, + 345, 346, -1, 348, 349, 350, 351, -1, -1, 354, + -1, 356, 357, 358, 359, 360, -1, -1, 363, 364, + 365, -1, 367, -1, 369, -1, 371, -1, 373, -1, + 375, -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 261, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, 297, -1, 299, - -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, -1, 344, 345, 346, -1, 348, 349, - 350, 351, -1, -1, 354, -1, 356, 357, 358, 359, - 360, -1, -1, 363, 364, 365, -1, 367, -1, 369, - -1, 371, -1, 373, -1, 375, -1, 377, -1, 379, - -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 261, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, 344, 345, - 346, -1, 348, 349, 350, 351, 352, 353, 354, -1, - 356, 357, 358, 359, 360, -1, -1, 363, 364, 365, - -1, 367, -1, -1, -1, -1, -1, 373, -1, 375, - -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, 297, -1, 299, -1, 301, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 342, -1, 344, 345, 346, -1, 348, 349, 350, 351, - 352, 353, 354, -1, 356, 357, 358, 359, 360, -1, - -1, 363, 364, 365, -1, 367, -1, -1, -1, -1, - -1, 373, -1, 375, -1, 377, -1, 379, -1, 381, - -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 261, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, 297, - -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 342, -1, 344, 345, 346, -1, - 348, 349, 350, 351, 352, 353, 354, -1, 356, 357, - 358, 359, 360, -1, -1, 363, 364, 365, -1, 367, - -1, -1, -1, -1, -1, 373, -1, 375, -1, 377, - -1, 379, -1, 381, -1, 383, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 261, -1, 263, - 264, -1, 266, -1, -1, 269, 270, -1, -1, 407, - 274, 409, -1, 411, 278, 413, -1, 415, -1, 417, - 284, 419, -1, 287, -1, -1, -1, -1, -1, -1, - 294, -1, -1, 297, -1, 299, -1, 301, 302, 303, + 261, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, 297, -1, 299, -1, + 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 342, -1, 344, 345, 346, -1, 348, 349, 350, + 351, -1, -1, 354, -1, 356, 357, 358, 359, 360, + -1, -1, 363, 364, 365, -1, 367, -1, 369, -1, + 371, -1, 373, -1, 375, -1, 377, -1, 379, -1, + 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 261, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 342, -1, 344, 345, 346, + -1, 348, 349, 350, 351, 352, 353, 354, -1, 356, + 357, 358, 359, 360, -1, -1, 363, 364, 365, -1, + 367, -1, -1, -1, -1, -1, 373, -1, 375, -1, + 377, -1, 379, -1, 381, -1, 383, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 261, -1, + 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, + 407, 274, 409, -1, 411, 278, 413, -1, 415, -1, + 417, 284, 419, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, -1, 297, -1, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, + 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 342, + -1, 344, 345, 346, -1, 348, 349, 350, 351, 352, + 353, 354, -1, 356, 357, 358, 359, 360, -1, -1, + 363, 364, 365, -1, 367, -1, -1, -1, -1, -1, + 373, -1, 375, -1, 377, -1, 379, -1, 381, -1, + 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 261, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, 297, -1, + 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 342, -1, 344, 345, 346, -1, 348, + 349, 350, 351, 352, 353, 354, -1, 356, 357, 358, + 359, 360, -1, -1, 363, 364, 365, -1, 367, -1, + -1, -1, -1, -1, 373, -1, 375, -1, 377, -1, + 379, -1, 381, -1, 383, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 261, -1, 263, 264, + -1, 266, -1, -1, 269, 270, -1, -1, 407, 274, + 409, -1, 411, 278, 413, -1, 415, -1, 417, 284, + 419, -1, 287, -1, -1, -1, -1, -1, -1, 294, + -1, -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 342, -1, - 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, - 354, -1, 356, 357, 358, 359, 360, -1, -1, 363, - 364, 365, -1, 367, -1, -1, -1, -1, -1, 373, - -1, 375, -1, 377, -1, 379, -1, 381, -1, 383, + 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, + 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 342, -1, 344, + 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, + -1, 356, 357, 358, 359, 360, -1, -1, 363, 364, + 365, -1, 367, -1, -1, -1, -1, -1, 373, -1, + 375, -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 261, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, 297, -1, 299, + 261, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, 297, -1, 299, -1, + 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 342, -1, 344, 345, 346, -1, 348, 349, 350, + 351, 352, 353, 354, -1, 356, 357, 358, 359, 360, + -1, -1, 363, 364, 365, -1, 367, -1, -1, -1, + -1, -1, 373, -1, 375, -1, 377, -1, 379, -1, + 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 261, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + 297, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 342, -1, 344, 345, 346, + -1, 348, 349, 350, 351, 352, 353, 354, -1, 356, + 357, 358, 359, 360, -1, -1, 363, 364, 365, -1, + 367, -1, -1, -1, -1, -1, 373, -1, 375, -1, + 377, -1, 379, -1, 381, -1, 383, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 407, -1, 409, -1, 411, -1, 413, -1, 415, -1, + 417, -1, 419, 263, 264, 265, 266, 267, -1, 269, + 270, -1, 272, 273, 274, 275, -1, 277, 278, 279, + -1, -1, -1, -1, 284, 285, -1, 287, 288, 289, + 290, 291, -1, -1, 294, -1, -1, -1, 298, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, -1, 344, 345, 346, -1, 348, 349, - 350, 351, 352, 353, 354, -1, 356, 357, 358, 359, - 360, -1, -1, 363, 364, 365, -1, 367, -1, -1, - -1, -1, -1, 373, -1, 375, -1, 377, -1, 379, - -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 261, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, 297, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, 344, 345, - 346, -1, 348, 349, 350, 351, 352, 353, 354, -1, - 356, 357, 358, 359, 360, -1, -1, 363, 364, 365, - -1, 367, -1, -1, -1, -1, -1, 373, -1, 375, - -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, + -1, -1, -1, 313, -1, 315, -1, 317, 318, -1, + 320, -1, 322, 323, 324, 325, 326, 327, 328, 329, + 330, -1, 332, 333, 260, 335, 336, -1, -1, -1, + -1, 341, 342, -1, -1, 345, -1, -1, -1, -1, + 350, 351, 352, 353, 354, -1, -1, 283, 358, -1, + 360, -1, -1, -1, -1, 365, -1, 367, -1, -1, + 296, -1, -1, -1, -1, 301, -1, -1, -1, -1, + 306, -1, 308, 309, 310, 311, -1, -1, -1, -1, + 316, -1, -1, 319, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 407, 334, 409, + -1, 411, -1, 413, -1, 415, -1, 417, -1, 419, + 263, 264, 265, 266, 267, 351, 269, 270, -1, 272, + 273, 274, 275, -1, 277, 278, 279, -1, -1, -1, + -1, 284, -1, -1, 287, 288, 289, 290, 291, -1, + -1, 294, -1, -1, -1, 298, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 313, -1, 315, -1, 317, 318, -1, 320, -1, 322, + 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, + 333, 260, 335, 336, -1, -1, -1, -1, 341, 342, + -1, -1, 345, -1, -1, -1, -1, 350, 351, 352, + 353, 354, -1, -1, 283, 358, -1, 360, -1, -1, + -1, -1, 365, -1, 367, -1, -1, 296, -1, -1, + -1, -1, 301, -1, -1, -1, -1, 306, -1, 308, + 309, 310, 311, -1, -1, -1, -1, 316, -1, -1, + 319, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 407, 334, 409, -1, 411, -1, + 413, -1, 415, -1, 417, -1, 419, 263, 264, 265, + 266, 267, -1, 269, 270, -1, 272, 273, 274, 275, + -1, 277, 278, -1, -1, -1, -1, -1, 284, -1, + -1, 287, 288, 289, 290, 291, -1, -1, 294, -1, + -1, -1, 298, 299, -1, 301, 302, 303, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 313, -1, 315, + -1, 317, 318, -1, 320, -1, 322, 323, 324, 325, + 326, 327, 328, 329, 330, -1, 332, 333, -1, 335, + 336, -1, -1, -1, -1, 341, 342, -1, -1, 345, + -1, -1, -1, -1, 350, 351, 352, 353, 354, -1, + -1, -1, 358, -1, 360, -1, -1, -1, -1, 365, + -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, -1, 409, -1, 411, -1, 413, -1, 415, - -1, 417, -1, 419, 263, 264, 265, 266, 267, -1, - 269, 270, -1, 272, 273, 274, 275, -1, 277, 278, - 279, -1, -1, -1, -1, 284, 285, -1, 287, 288, + -1, 417, -1, 419, 263, 264, 265, 266, -1, -1, + 269, 270, -1, 272, 273, 274, -1, -1, 277, 278, + -1, -1, -1, -1, -1, 284, -1, -1, 287, 288, 289, 290, 291, -1, -1, 294, -1, -1, -1, 298, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, 313, -1, 315, -1, 317, 318, -1, 320, -1, 322, 323, 324, 325, 326, 327, 328, - 329, 330, -1, 332, 333, 260, 335, 336, -1, -1, - -1, -1, 341, 342, -1, -1, 345, -1, -1, -1, - -1, 350, 351, 352, 353, 354, -1, -1, 283, 358, + 329, 330, -1, 332, 333, -1, 335, 336, -1, -1, + -1, -1, 341, -1, -1, -1, 345, -1, -1, -1, + -1, 350, 351, 352, 353, 354, -1, -1, -1, 358, -1, 360, -1, -1, -1, -1, 365, -1, 367, -1, - -1, 296, -1, -1, -1, -1, 301, -1, -1, -1, - -1, 306, -1, 308, 309, 310, 311, -1, -1, -1, - -1, 316, -1, -1, 319, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 407, 334, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 407, -1, 409, -1, 411, -1, 413, -1, 415, -1, 417, -1, - 419, 263, 264, 265, 266, 267, 351, 269, 270, -1, - 272, 273, 274, 275, -1, 277, 278, 279, -1, -1, + 419, 263, 264, 265, 266, -1, -1, 269, 270, -1, + 272, 273, 274, -1, -1, 277, 278, -1, -1, -1, -1, -1, 284, -1, -1, 287, 288, 289, 290, 291, -1, -1, 294, -1, -1, -1, 298, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, 313, -1, 315, -1, 317, 318, -1, 320, -1, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, - 332, 333, 260, 335, 336, -1, -1, -1, -1, 341, - 342, -1, -1, 345, -1, -1, -1, -1, 350, 351, - 352, 353, 354, -1, -1, 283, 358, -1, 360, -1, - -1, -1, -1, 365, -1, 367, -1, -1, 296, -1, - -1, -1, -1, 301, -1, -1, -1, -1, 306, -1, - 308, 309, 310, 311, -1, -1, -1, -1, 316, -1, - -1, 319, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 407, 334, 409, -1, 411, + 332, 333, -1, 335, 336, -1, -1, -1, -1, 341, + -1, -1, -1, 345, -1, -1, -1, -1, 350, 351, + 352, 353, 354, -1, -1, -1, 358, -1, 360, -1, + -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 407, -1, 409, -1, 411, -1, 413, -1, 415, -1, 417, -1, 419, 263, 264, - 265, 266, 267, -1, 269, 270, -1, 272, 273, 274, - 275, -1, 277, 278, -1, -1, -1, -1, -1, 284, + 265, 266, -1, -1, 269, 270, -1, -1, 273, 274, + -1, -1, 277, 278, -1, -1, -1, -1, -1, 284, -1, -1, 287, 288, 289, 290, 291, -1, -1, 294, -1, -1, -1, 298, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, 313, -1, 315, -1, 317, 318, -1, 320, -1, 322, 323, 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, -1, - 335, 336, -1, -1, -1, -1, 341, 342, -1, -1, + -1, 336, -1, -1, -1, -1, 341, -1, -1, -1, 345, -1, -1, -1, -1, 350, 351, 352, 353, 354, -1, -1, -1, 358, -1, 360, -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 407, -1, 409, -1, 411, -1, 413, -1, - 415, -1, 417, -1, 419, 263, 264, 265, 266, -1, - -1, 269, 270, -1, 272, 273, 274, -1, -1, 277, - 278, -1, -1, -1, -1, -1, 284, -1, -1, 287, - 288, 289, 290, 291, -1, -1, 294, -1, -1, -1, - 298, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 313, -1, 315, -1, 317, - 318, -1, 320, -1, 322, 323, 324, 325, 326, 327, - 328, 329, 330, -1, 332, 333, -1, 335, 336, -1, - -1, -1, -1, 341, -1, -1, -1, 345, -1, -1, - -1, -1, 350, 351, 352, 353, 354, -1, -1, -1, - 358, -1, 360, -1, -1, -1, -1, 365, -1, 367, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 407, - -1, 409, -1, 411, -1, 413, -1, 415, -1, 417, - -1, 419, 263, 264, 265, 266, -1, -1, 269, 270, - -1, 272, 273, 274, -1, -1, 277, 278, -1, -1, - -1, -1, -1, 284, -1, -1, 287, 288, 289, 290, - 291, -1, -1, 294, -1, -1, -1, 298, 299, -1, + -1, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 313, -1, 315, -1, 317, 318, -1, 320, - -1, 322, 323, 324, 325, 326, 327, 328, 329, 330, - -1, 332, 333, -1, 335, 336, -1, -1, -1, -1, - 341, -1, -1, -1, 345, -1, -1, -1, -1, 350, - 351, 352, 353, 354, -1, -1, -1, 358, -1, 360, - -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 407, -1, 409, -1, - 411, -1, 413, -1, 415, -1, 417, -1, 419, 263, - 264, 265, 266, -1, -1, 269, 270, -1, -1, 273, - 274, -1, -1, 277, 278, -1, -1, -1, -1, -1, - 284, -1, -1, 287, 288, 289, 290, 291, -1, -1, - 294, -1, -1, -1, 298, 299, -1, 301, 302, 303, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 313, - -1, 315, -1, 317, 318, -1, 320, -1, 322, 323, - 324, 325, 326, 327, 328, 329, 330, -1, 332, 333, - -1, -1, 336, -1, -1, -1, -1, 341, -1, -1, - -1, 345, -1, -1, -1, -1, 350, 351, 352, 353, - 354, -1, -1, -1, 358, -1, 360, -1, -1, -1, - -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 342, -1, 344, 345, 346, -1, 348, 349, 350, + 351, 352, 353, 354, -1, -1, -1, 358, 359, 360, + -1, -1, 363, 364, 365, -1, 367, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 377, -1, 379, -1, + 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 342, -1, 344, 345, 346, + -1, 348, 349, 350, 351, 352, 353, 354, -1, -1, + -1, 358, 359, 360, -1, -1, 363, 364, 365, -1, + 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 377, -1, 379, -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, + 407, 274, 409, -1, 411, 278, 413, -1, 415, -1, + 417, 284, 419, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, -1, -1, -1, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, + 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 342, + -1, 344, 345, 346, -1, 348, 349, 350, 351, 352, + 353, 354, -1, -1, -1, 358, 359, 360, -1, -1, + 363, 364, 365, -1, 367, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 377, -1, 379, -1, 381, -1, + 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, -1, -1, + 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 342, -1, 344, 345, 346, -1, 348, + 349, 350, 351, 352, 353, 354, -1, -1, -1, 358, + 359, 360, -1, -1, 363, 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, -1, -1, 299, - -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, -1, 344, 345, 346, -1, 348, 349, - 350, 351, 352, 353, 354, -1, -1, -1, 358, 359, - 360, -1, -1, 363, 364, 365, -1, 367, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 377, -1, 379, - -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, 344, 345, - 346, -1, 348, 349, 350, 351, 352, 353, 354, -1, - -1, -1, 358, 359, 360, -1, -1, 363, 364, 365, - -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 377, -1, 379, -1, 381, -1, 383, -1, -1, + -1, -1, 381, -1, 383, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 263, 264, + -1, 266, -1, -1, 269, 270, -1, -1, 407, 274, + 409, -1, 411, 278, 413, -1, 415, -1, 417, 284, + 419, -1, 287, -1, -1, -1, -1, -1, -1, 294, + -1, -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, -1, -1, 299, -1, 301, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 342, -1, 344, 345, 346, -1, 348, 349, 350, 351, - 352, 353, 354, -1, -1, -1, 358, 359, 360, -1, - -1, 363, 364, 365, -1, 367, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 377, -1, 379, -1, 381, - -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, -1, - -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 342, -1, 344, 345, 346, -1, - 348, 349, 350, 351, 352, 353, 354, -1, -1, -1, - 358, 359, 360, -1, -1, 363, 364, 365, -1, 367, + 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, + 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 342, -1, 344, + 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, + -1, -1, -1, 358, 359, 360, -1, -1, 363, 364, + 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 381, -1, 383, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 263, - 264, -1, 266, -1, -1, 269, 270, -1, -1, 407, - 274, 409, -1, 411, 278, 413, -1, 415, -1, 417, - 284, 419, -1, 287, -1, -1, -1, -1, -1, -1, - 294, -1, -1, -1, -1, 299, -1, 301, 302, 303, + -1, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, -1, -1, 299, -1, + 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 342, -1, 344, 345, 346, -1, 348, 349, 350, + 351, 352, 353, 354, -1, -1, -1, -1, 359, 360, + -1, -1, 363, 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 342, -1, - 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, - 354, -1, -1, -1, 358, 359, 360, -1, -1, 363, - 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 381, -1, 383, + 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 342, -1, 344, 345, 346, + -1, 348, 349, 350, 351, 352, 353, 354, -1, -1, + -1, 358, 359, 360, -1, -1, -1, 364, 365, -1, + 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, -1, -1, 299, - -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, -1, 344, 345, 346, -1, 348, 349, - 350, 351, 352, 353, 354, -1, -1, -1, -1, 359, - 360, -1, -1, 363, 364, 365, -1, 367, -1, -1, + 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, + 407, 274, 409, -1, 411, 278, 413, -1, 415, -1, + 417, 284, 419, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, -1, -1, -1, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, + 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 342, + -1, 344, 345, 346, -1, 348, 349, 350, 351, 352, + 353, 354, -1, -1, -1, -1, 359, 360, -1, -1, + 363, 364, 365, -1, 367, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 381, -1, + 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, -1, -1, + 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 342, -1, 344, 345, 346, -1, 348, + 349, 350, 351, 352, 353, 354, -1, -1, -1, 358, + 359, 360, -1, -1, -1, 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, 344, 345, - 346, -1, 348, 349, 350, 351, 352, 353, 354, -1, - -1, -1, 358, 359, 360, -1, -1, -1, 364, 365, - -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 381, -1, 383, -1, -1, + -1, -1, 381, -1, 383, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 263, 264, + -1, 266, -1, -1, 269, 270, -1, -1, 407, 274, + 409, -1, 411, 278, 413, -1, 415, -1, 417, 284, + 419, -1, 287, -1, -1, -1, -1, -1, -1, 294, + -1, -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, -1, -1, 299, -1, 301, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 342, -1, 344, 345, 346, -1, 348, 349, 350, 351, - 352, 353, 354, -1, -1, -1, -1, 359, 360, -1, - -1, 363, 364, 365, -1, 367, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, - -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, -1, - -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 342, -1, 344, 345, 346, -1, - 348, 349, 350, 351, 352, 353, 354, -1, -1, -1, - 358, 359, 360, -1, -1, -1, 364, 365, -1, 367, + 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, + 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 342, -1, 344, + 345, 346, -1, 348, 349, 350, 351, 352, 353, 354, + -1, -1, -1, 358, -1, 360, -1, -1, -1, 364, + 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 381, -1, 383, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 263, - 264, -1, 266, -1, -1, 269, 270, -1, -1, 407, - 274, 409, -1, 411, 278, 413, -1, 415, -1, 417, - 284, 419, -1, 287, -1, -1, -1, -1, -1, -1, - 294, -1, -1, -1, -1, 299, -1, 301, 302, 303, + -1, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, -1, -1, 299, -1, + 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 342, -1, 344, 345, 346, -1, 348, 349, 350, + 351, 352, 353, 354, -1, -1, -1, 358, -1, 360, + -1, -1, -1, 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 342, -1, - 344, 345, 346, -1, 348, 349, 350, 351, 352, 353, - 354, -1, -1, -1, 358, -1, 360, -1, -1, -1, - 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 381, -1, 383, + 381, -1, 383, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 342, -1, 344, 345, 346, + -1, 348, 349, 350, 351, 352, 353, 354, -1, -1, + -1, 358, -1, 360, -1, -1, -1, 364, 365, -1, + 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, -1, -1, 299, - -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 342, -1, 344, 345, 346, -1, 348, 349, - 350, 351, 352, 353, 354, -1, -1, -1, 358, -1, - 360, -1, -1, -1, 364, 365, -1, 367, -1, -1, + 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, + 407, 274, 409, -1, 411, 278, 413, -1, 415, -1, + 417, 284, 419, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, -1, -1, -1, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, + 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 342, + -1, 344, 345, 346, -1, 348, 349, 350, 351, 352, + 353, 354, -1, -1, -1, 358, -1, 360, -1, -1, + -1, 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 381, -1, 383, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 342, -1, 344, 345, - 346, -1, 348, 349, 350, 351, 352, 353, 354, -1, - -1, -1, 358, -1, 360, -1, -1, -1, 364, 365, - -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 383, -1, -1, + 383, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, -1, -1, + 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 342, -1, 344, 345, 346, -1, 348, + 349, 350, 351, 352, 353, 354, -1, -1, -1, 358, + -1, 360, -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, -1, -1, 299, -1, 301, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 342, -1, 344, 345, 346, -1, 348, 349, 350, 351, - 352, 353, 354, -1, -1, -1, 358, -1, 360, -1, - -1, -1, 364, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 383, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, -1, - -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 342, -1, 344, 345, 346, -1, - 348, 349, 350, 351, 352, 353, 354, -1, -1, -1, - 358, -1, 360, -1, -1, -1, -1, 365, -1, 367, + -1, -1, -1, -1, -1, -1, -1, -1, 263, 264, + -1, 266, -1, -1, 269, 270, -1, -1, 407, 274, + 409, -1, 411, 278, 413, -1, 415, -1, 417, 284, + 419, -1, 287, -1, -1, -1, -1, -1, -1, 294, + -1, -1, -1, -1, 299, -1, 301, 302, 303, -1, + 305, -1, -1, -1, -1, -1, -1, 312, -1, -1, + 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, + 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 345, -1, -1, -1, -1, -1, 351, 352, 353, 354, + -1, -1, -1, 358, -1, 360, -1, -1, -1, -1, + 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 263, - 264, -1, 266, -1, -1, 269, 270, -1, -1, 407, - 274, 409, -1, 411, 278, 413, -1, 415, -1, 417, - 284, 419, -1, 287, -1, -1, -1, -1, -1, -1, - 294, -1, -1, -1, -1, 299, -1, 301, 302, 303, - -1, 305, -1, -1, -1, -1, -1, -1, 312, -1, - -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 345, -1, -1, -1, -1, -1, 351, 352, 353, - 354, -1, -1, -1, 358, -1, 360, -1, -1, -1, - -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, + -1, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, -1, -1, 299, -1, + 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, + 341, 342, -1, -1, 345, -1, -1, -1, -1, -1, + 351, 352, 353, 354, -1, -1, -1, 358, -1, 360, + -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, -1, -1, 299, - -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, - -1, 341, 342, -1, -1, 345, -1, -1, -1, -1, - -1, 351, 352, 353, 354, -1, -1, -1, 358, -1, - 360, -1, -1, -1, -1, 365, -1, 367, -1, -1, + -1, -1, -1, -1, -1, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, 341, 342, -1, -1, 345, -1, + -1, -1, -1, -1, 351, 352, 353, 354, -1, -1, + -1, 358, -1, 360, -1, -1, -1, -1, 365, -1, + 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, 341, 342, -1, -1, 345, - -1, -1, -1, -1, -1, 351, 352, 353, 354, -1, - -1, -1, 358, -1, 360, -1, -1, -1, -1, 365, - -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, + 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, + 407, 274, 409, -1, 411, 278, 413, -1, 415, -1, + 417, 284, 419, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, -1, -1, -1, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, + 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 345, -1, -1, 348, -1, 350, 351, 352, + 353, 354, -1, -1, -1, 358, -1, 360, -1, -1, + -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, -1, -1, 299, -1, 301, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 345, -1, -1, 348, -1, 350, 351, - 352, 353, 354, -1, -1, -1, 358, -1, 360, -1, - -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, -1, -1, + 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 345, -1, -1, 348, + -1, -1, 351, 352, 353, 354, -1, -1, -1, 358, + -1, 360, -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, -1, - -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 345, -1, -1, - 348, -1, -1, 351, 352, 353, 354, -1, -1, -1, - 358, -1, 360, -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 263, 264, + -1, 266, -1, -1, 269, 270, -1, -1, 407, 274, + 409, -1, 411, 278, 413, -1, 415, -1, 417, 284, + 419, -1, 287, -1, -1, -1, -1, -1, -1, 294, + -1, -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 263, - 264, -1, 266, -1, -1, 269, 270, -1, -1, 407, - 274, 409, -1, 411, 278, 413, -1, 415, -1, 417, - 284, 419, -1, 287, -1, -1, -1, -1, -1, -1, - 294, -1, -1, -1, -1, 299, -1, 301, 302, 303, + 315, -1, 317, 318, -1, 320, -1, -1, 323, -1, + 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, + -1, -1, -1, -1, -1, -1, 341, -1, -1, -1, + 345, -1, -1, -1, -1, -1, 351, 352, 353, 354, + -1, -1, -1, 358, -1, 360, -1, -1, -1, -1, + 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 315, -1, 317, 318, -1, 320, -1, -1, 323, - -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, - -1, -1, -1, -1, -1, -1, -1, 341, -1, -1, - -1, 345, -1, -1, -1, -1, -1, 351, 352, 353, - 354, -1, -1, -1, 358, -1, 360, -1, -1, -1, - -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 263, 264, -1, 266, -1, -1, 269, 270, + -1, -1, 407, 274, 409, -1, 411, 278, 413, -1, + 415, -1, 417, 284, 419, -1, 287, -1, -1, -1, + -1, -1, -1, 294, -1, -1, -1, -1, 299, -1, + 301, 302, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, 318, -1, 320, + -1, -1, 323, -1, 325, -1, 327, 328, 329, 330, + -1, 332, -1, -1, 335, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 345, -1, -1, -1, -1, -1, + 351, 352, 353, 354, -1, -1, -1, 358, -1, 360, + -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 263, 264, -1, 266, -1, -1, 269, - 270, -1, -1, 407, 274, 409, -1, 411, 278, 413, - -1, 415, -1, 417, 284, 419, -1, 287, -1, -1, - -1, -1, -1, -1, 294, -1, -1, -1, -1, 299, - -1, 301, 302, 303, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 315, -1, 317, 318, -1, - 320, -1, -1, 323, -1, 325, -1, 327, 328, 329, - 330, -1, 332, -1, -1, 335, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 345, -1, -1, -1, -1, - -1, 351, 352, 353, 354, -1, -1, -1, 358, -1, - 360, -1, -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 263, 264, -1, 266, + -1, -1, 269, 270, -1, -1, 407, 274, 409, -1, + 411, 278, 413, -1, 415, -1, 417, 284, 419, -1, + 287, -1, -1, -1, -1, -1, -1, 294, -1, -1, + -1, -1, 299, -1, 301, 302, 303, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 315, -1, + 317, 318, -1, 320, -1, -1, 323, -1, 325, -1, + 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 345, -1, + -1, -1, -1, 350, 351, 352, 353, 354, -1, -1, + -1, 358, -1, 360, -1, -1, -1, -1, 365, -1, + 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 263, 264, -1, - 266, -1, -1, 269, 270, -1, -1, 407, 274, 409, - -1, 411, 278, 413, -1, 415, -1, 417, 284, 419, - -1, 287, -1, -1, -1, -1, -1, -1, 294, -1, - -1, -1, -1, 299, -1, 301, 302, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, 318, -1, 320, -1, -1, 323, -1, 325, - -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 345, - -1, -1, -1, -1, 350, 351, 352, 353, 354, -1, - -1, -1, 358, -1, 360, -1, -1, -1, -1, 365, - -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 263, 264, -1, 266, -1, -1, 269, 270, -1, -1, + 407, 274, 409, -1, 411, 278, 413, -1, 415, -1, + 417, 284, 419, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, -1, -1, -1, 299, -1, 301, 302, + 303, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 315, -1, 317, 318, -1, 320, -1, -1, + 323, -1, 325, -1, 327, 328, 329, 330, -1, 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 263, 264, -1, 266, -1, -1, 269, 270, -1, - -1, 407, 274, 409, -1, 411, 278, 413, -1, 415, - -1, 417, 284, 419, -1, 287, -1, -1, -1, -1, - -1, -1, 294, -1, -1, -1, -1, 299, -1, 301, - 302, 303, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 315, -1, 317, 318, -1, 320, -1, - -1, 323, -1, 325, -1, 327, 328, 329, 330, -1, - 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 345, -1, -1, -1, -1, -1, 351, - 352, 353, 354, -1, -1, -1, 358, -1, 360, -1, - -1, -1, -1, 365, -1, 367, -1, -1, -1, -1, + -1, -1, 345, -1, -1, -1, -1, -1, 351, 352, + 353, 354, -1, -1, -1, 358, -1, 360, -1, -1, + -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 263, 264, -1, 266, -1, - -1, 269, 270, -1, -1, 407, 274, 409, -1, 411, - 278, 413, -1, 415, -1, 417, 284, 419, -1, 287, - -1, -1, -1, -1, -1, -1, 294, -1, -1, -1, - -1, 299, -1, 301, 302, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - 318, -1, 320, -1, -1, 323, -1, 325, -1, 327, - 328, 329, 330, -1, 332, -1, 264, 335, 266, -1, - -1, 269, -1, 271, 272, -1, 274, 345, 276, -1, - 278, -1, 280, 281, 282, -1, -1, -1, -1, 287, - -1, -1, -1, -1, 292, -1, 294, 295, -1, -1, - -1, 299, -1, -1, -1, 303, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 315, -1, 317, - -1, -1, 320, 321, -1, -1, -1, -1, -1, -1, - 328, 329, -1, -1, 332, -1, -1, 335, -1, 407, - -1, 409, -1, 411, -1, 413, -1, 415, 264, 417, - 266, 419, -1, 269, -1, 271, 272, -1, 274, -1, - 276, -1, 278, -1, 280, 281, 282, -1, -1, -1, - -1, 287, -1, -1, -1, -1, 292, -1, 294, 295, - -1, -1, -1, 299, -1, -1, -1, 303, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 315, - -1, 317, -1, -1, 320, 321, -1, -1, -1, -1, - -1, -1, 328, 329, -1, 264, 332, 266, -1, 335, - 269, 419, 271, 272, -1, 274, -1, 276, -1, 278, + -1, -1, -1, -1, 263, 264, -1, 266, -1, -1, + 269, 270, -1, -1, 407, 274, 409, -1, 411, 278, + 413, -1, 415, -1, 417, 284, 419, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, -1, -1, -1, + 299, -1, 301, 302, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, 318, + -1, 320, -1, -1, 323, -1, 325, -1, 327, 328, + 329, 330, -1, 332, -1, 264, 335, 266, -1, -1, + 269, -1, 271, 272, -1, 274, 345, 276, -1, 278, -1, 280, 281, 282, -1, -1, -1, -1, 287, -1, -1, -1, -1, 292, -1, 294, 295, -1, -1, -1, - 299, -1, -1, -1, 303, -1, -1, -1, -1, 264, - -1, 266, -1, -1, 269, -1, 315, -1, 317, 274, - -1, 320, 321, 278, -1, -1, 281, -1, -1, 328, - 329, -1, 287, 332, -1, -1, 335, -1, -1, 294, - -1, -1, -1, -1, 299, -1, 301, -1, 303, -1, - -1, -1, -1, 419, -1, -1, -1, -1, -1, -1, - 315, 264, 317, 266, -1, 320, 269, -1, -1, -1, - -1, 274, -1, 328, 329, 278, -1, 332, 281, -1, - 335, -1, -1, -1, 287, -1, -1, 342, -1, -1, - -1, 294, 264, -1, 266, -1, 299, 269, 301, -1, - 303, -1, 274, -1, -1, -1, 278, -1, -1, -1, - -1, -1, 315, -1, 317, 287, -1, 320, -1, -1, - 419, -1, 294, -1, -1, 328, 329, 299, -1, 332, - -1, 303, 335, 305, -1, 307, 264, -1, 266, 342, - 312, 269, -1, 315, -1, 317, 274, -1, 320, -1, - 278, -1, -1, -1, -1, -1, 328, 329, -1, 287, - 332, -1, -1, -1, 419, -1, 294, -1, 264, -1, - 266, 299, -1, 269, 346, 303, -1, 305, 274, 307, - -1, -1, 278, -1, 312, 281, -1, 315, -1, 317, - -1, 287, 320, -1, -1, -1, -1, -1, 294, -1, - 328, 329, -1, 299, 332, -1, -1, 303, -1, -1, - -1, -1, -1, -1, -1, 264, 419, 266, -1, 315, - 269, 317, -1, -1, 320, 274, -1, -1, -1, 278, - -1, -1, 328, 329, -1, -1, 332, -1, 287, 335, - -1, -1, -1, -1, -1, 294, -1, 419, -1, -1, - 299, 264, -1, 266, 303, -1, 269, -1, -1, -1, - -1, 274, -1, -1, -1, 278, 315, -1, 317, -1, - -1, 320, -1, -1, 287, -1, -1, -1, -1, 328, - 329, 294, -1, 332, -1, -1, 299, -1, -1, -1, - 303, 419, 341, -1, -1, -1, -1, -1, -1, -1, - 349, -1, 315, 264, 317, 266, -1, 320, 269, -1, + 299, -1, -1, -1, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 315, -1, 317, -1, + -1, 320, 321, -1, -1, -1, -1, -1, -1, 328, + 329, -1, -1, 332, -1, -1, 335, -1, 407, -1, + 409, -1, 411, -1, 413, -1, 415, 264, 417, 266, + 419, -1, 269, -1, 271, 272, -1, 274, -1, 276, + -1, 278, -1, 280, 281, 282, -1, -1, -1, -1, + 287, 264, -1, 266, -1, 292, 269, 294, 295, -1, + -1, 274, 299, -1, -1, 278, 303, -1, 281, -1, + -1, -1, -1, -1, 287, -1, -1, -1, 315, -1, + 317, 294, -1, 320, 321, -1, 299, -1, 301, -1, + 303, 328, 329, -1, -1, 332, -1, -1, 335, -1, + 419, -1, 315, 264, 317, 266, -1, 320, 269, -1, -1, -1, -1, 274, -1, 328, 329, 278, -1, 332, - 281, 261, -1, 419, -1, 264, 287, 266, 341, -1, - 269, -1, -1, 294, -1, 274, 349, -1, 299, 278, - -1, -1, 303, -1, -1, -1, -1, -1, 287, -1, - -1, -1, -1, -1, 315, 294, 317, 297, -1, 320, - 299, -1, -1, -1, 303, -1, -1, 328, 329, -1, - 419, 332, -1, -1, 335, -1, 315, -1, 317, -1, - -1, 320, -1, -1, -1, -1, -1, -1, -1, 328, - 329, -1, -1, 332, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 343, -1, 345, 419, -1, -1, -1, - -1, -1, 352, 353, -1, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, -1, 367, -1, 369, - -1, 371, -1, 373, -1, 375, -1, 377, -1, 379, - -1, 381, -1, 383, -1, 385, -1, 387, -1, 389, - -1, 391, -1, 393, -1, 395, -1, 397, 419, 399, - -1, 401, 257, 403, -1, 260, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 271, -1, -1, -1, - 419, 276, -1, -1, -1, 280, -1, -1, 283, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 295, 296, -1, -1, -1, 300, 301, -1, -1, -1, - -1, 306, -1, 308, 309, 310, 311, 257, -1, -1, - 260, 316, -1, -1, 319, -1, 321, -1, -1, -1, - -1, 271, -1, -1, -1, -1, 276, -1, -1, 334, - 280, -1, -1, 283, -1, -1, -1, 342, 343, -1, + 281, -1, 335, -1, -1, -1, 287, -1, -1, 342, + -1, -1, -1, 294, -1, -1, -1, -1, 299, -1, + 301, -1, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 315, -1, 317, -1, -1, 320, + -1, -1, -1, -1, -1, -1, -1, 328, 329, -1, + 264, 332, 266, -1, 335, 269, -1, -1, -1, -1, + 274, 342, 419, -1, 278, -1, -1, -1, -1, 264, + -1, 266, -1, 287, 269, -1, -1, -1, -1, 274, + 294, -1, -1, 278, -1, 299, 419, -1, -1, 303, + -1, 305, 287, 307, -1, -1, -1, -1, 312, 294, + -1, 315, -1, 317, 299, -1, 320, -1, 303, -1, + 305, -1, 307, -1, 328, 329, -1, 312, 332, -1, + 315, -1, 317, -1, -1, 320, 264, -1, 266, -1, + -1, 269, 346, 328, 329, -1, 274, 332, 419, -1, + 278, -1, -1, 281, -1, 264, -1, 266, -1, 287, + 269, -1, -1, -1, -1, 274, 294, -1, -1, 278, + -1, 299, -1, -1, -1, 303, -1, -1, 287, -1, + -1, -1, -1, -1, -1, 294, -1, 315, -1, 317, + 299, -1, 320, -1, 303, -1, -1, -1, -1, -1, + 328, 329, -1, -1, 332, -1, 315, 335, 317, -1, + -1, 320, 264, -1, 266, 419, -1, 269, -1, 328, + 329, -1, 274, 332, -1, -1, 278, -1, -1, -1, + -1, 264, 341, 266, 419, 287, 269, -1, -1, -1, + 349, 274, 294, -1, -1, 278, -1, 299, 281, -1, + -1, 303, -1, -1, 287, -1, -1, -1, -1, -1, + -1, 294, -1, 315, -1, 317, 299, -1, 320, -1, + 303, -1, -1, -1, -1, -1, 328, 329, -1, -1, + 332, -1, 315, -1, 317, -1, -1, 320, -1, 341, + -1, 419, -1, 261, -1, 328, 329, 349, 264, 332, + 266, -1, 335, 269, 264, -1, 266, -1, 274, 269, + 419, -1, 278, -1, 274, -1, -1, -1, 278, -1, + -1, 287, -1, -1, -1, -1, -1, 287, 294, 297, + -1, -1, -1, 299, 294, -1, -1, 303, -1, 299, + -1, -1, -1, 303, -1, -1, -1, -1, -1, 315, + -1, 317, -1, -1, 320, 315, -1, 317, -1, -1, + 320, -1, 328, 329, -1, -1, 332, 419, 328, 329, + -1, -1, 332, -1, -1, 343, -1, 345, -1, -1, + -1, -1, -1, -1, 352, 353, 419, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, -1, 367, + -1, 369, -1, 371, -1, 373, -1, 375, -1, 377, + -1, 379, -1, 381, -1, 383, -1, 385, -1, 387, + -1, 389, -1, 391, -1, 393, -1, 395, -1, 397, + -1, 399, -1, 401, -1, 403, -1, 257, -1, -1, + 260, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 271, -1, 419, -1, -1, 276, -1, -1, 419, + 280, -1, -1, 283, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 295, 296, -1, -1, -1, 300, 301, -1, -1, -1, -1, 306, -1, 308, 309, 310, 311, 257, -1, -1, 260, 316, -1, -1, 319, @@ -5030,48 +5003,52 @@ case 515: -1, 306, -1, 308, 309, 310, 311, 257, -1, -1, 260, 316, -1, -1, 319, -1, 321, -1, -1, -1, -1, 271, -1, -1, -1, -1, 276, -1, -1, 334, - 280, -1, 260, 283, -1, -1, -1, -1, 343, -1, - -1, -1, -1, 271, -1, 295, 296, -1, 276, -1, - -1, 301, 280, -1, -1, 283, 306, -1, 308, 309, - 310, 311, -1, -1, -1, -1, 316, 295, 296, 319, - -1, 321, 300, 301, -1, -1, -1, -1, 306, -1, - 308, 309, 310, 311, 334, 260, -1, -1, 316, -1, - -1, 319, 342, 321, -1, -1, 271, -1, -1, 257, - -1, 276, 260, -1, -1, 280, 334, -1, 283, -1, - -1, -1, -1, 271, 342, 343, -1, -1, 276, -1, - 295, 296, 280, -1, -1, 283, 301, -1, -1, -1, - -1, 306, -1, 308, 309, 310, 311, 295, 296, -1, - -1, 316, 300, 301, 319, -1, 321, -1, 306, -1, - 308, 309, 310, 311, 257, -1, -1, 260, 316, 334, - -1, 319, -1, 321, -1, -1, -1, 342, 271, -1, - -1, -1, -1, 276, -1, -1, 334, 280, -1, -1, - 283, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 295, 296, -1, -1, -1, 343, 301, 345, - 346, 347, 348, 306, 350, 308, 309, 310, 311, 355, - -1, -1, -1, 316, -1, -1, 319, -1, 321, 365, - 343, 367, 345, 346, 347, 348, -1, 350, -1, -1, - -1, 334, 355, -1, -1, -1, -1, -1, -1, 385, - -1, 387, 365, 389, 367, 391, -1, 393, -1, 395, - -1, 397, -1, 399, -1, 401, -1, 403, -1, -1, - -1, -1, 385, -1, 387, -1, 389, -1, 391, -1, - 393, -1, 395, 419, 397, -1, 399, -1, 401, 343, - 403, 345, 346, 347, 348, -1, 350, -1, -1, -1, - 343, 355, 345, 346, 347, 348, 419, 350, -1, -1, - -1, 365, 355, 367, -1, -1, -1, -1, -1, -1, - -1, -1, 365, -1, 367, -1, -1, -1, -1, -1, + 280, -1, -1, 283, -1, -1, -1, 342, 343, -1, + -1, -1, -1, -1, -1, 295, 296, -1, -1, -1, + 300, 301, -1, -1, 260, -1, 306, -1, 308, 309, + 310, 311, -1, -1, -1, 271, 316, -1, -1, 319, + 276, 321, -1, -1, 280, -1, -1, 283, -1, -1, + -1, -1, -1, -1, 334, -1, -1, -1, -1, 295, + 296, -1, -1, 343, 300, 301, -1, -1, 260, -1, + 306, -1, 308, 309, 310, 311, -1, -1, -1, 271, + 316, -1, -1, 319, 276, 321, -1, -1, 280, -1, + -1, 283, -1, -1, -1, -1, -1, -1, 334, -1, + -1, -1, -1, 295, 296, -1, 342, 343, -1, 301, + -1, -1, -1, -1, 306, -1, 308, 309, 310, 311, + 257, -1, -1, 260, 316, -1, -1, 319, -1, 321, + -1, -1, -1, -1, 271, -1, -1, -1, -1, 276, + -1, -1, 334, 280, -1, -1, 283, -1, -1, -1, + 342, -1, -1, -1, -1, -1, -1, -1, 295, 296, + -1, -1, 257, 300, 301, 260, -1, -1, -1, 306, + -1, 308, 309, 310, 311, -1, 271, -1, -1, 316, + -1, 276, 319, -1, 321, 280, -1, -1, 283, -1, + -1, -1, -1, -1, -1, -1, -1, 334, -1, -1, + 295, 296, -1, -1, -1, 343, 301, 345, 346, 347, + 348, 306, 350, 308, 309, 310, 311, 355, -1, -1, + -1, 316, -1, -1, 319, -1, 321, 365, 343, 367, + 345, 346, 347, 348, -1, 350, -1, -1, -1, 334, + 355, -1, -1, -1, -1, -1, -1, 385, -1, 387, + 365, 389, 367, 391, -1, 393, -1, 395, -1, 397, + -1, 399, -1, 401, -1, 403, -1, -1, -1, -1, + 385, -1, 387, -1, 389, -1, 391, -1, 393, -1, + 395, 419, 397, -1, 399, -1, 401, 343, 403, 345, + 346, 347, 348, -1, 350, -1, -1, -1, 343, 355, + 345, 346, 347, 348, 419, 350, -1, -1, -1, 365, + 355, 367, -1, -1, -1, -1, -1, -1, -1, -1, + 365, -1, 367, -1, -1, -1, -1, -1, -1, 385, + -1, 387, -1, 389, -1, 391, -1, 393, -1, 395, + 385, 397, 387, 399, 389, 401, 391, 403, 393, 343, + 395, 345, 397, 347, 399, -1, 401, -1, 403, -1, + -1, 355, -1, 419, -1, -1, -1, -1, -1, -1, + -1, 365, -1, 367, 419, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 385, -1, 387, -1, 389, -1, 391, -1, 393, - -1, 395, 385, 397, 387, 399, 389, 401, 391, 403, - 393, 343, 395, 345, 397, 347, 399, -1, 401, -1, - 403, -1, -1, 355, -1, 419, -1, -1, -1, -1, - -1, -1, -1, 365, -1, 367, 419, -1, -1, -1, + -1, 395, -1, 397, -1, 399, -1, 401, -1, 403, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 385, -1, 387, -1, 389, -1, 391, - -1, 393, -1, 395, -1, 397, -1, 399, -1, 401, - -1, 403, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 419, + -1, -1, -1, -1, -1, 419, }; -#line 2535 "cs-parser.jay" +#line 2540 "cs-parser.jay" // <summary>
@@ -5239,17 +5216,19 @@ TypeRef type (string type_name) Tokenizer lexer;
public CSharpParser(CIR.Tree tree, string name, System.IO.Stream input)
- : base (tree, name, input)
{
current_namespace = new Namespace (null, "");
+ this.tree = tree;
+ this.name = name;
+ this.input = input;
current_container = tree.Types;
current_container.Namespace = current_namespace;
lexer = new Tokenizer (input, name);
- type_references = new TypeRefManager ();
+ type_references = new TypeRefManager ();
}
-public override int parse ()
+public int parse ()
{
StringBuilder value = new StringBuilder ();
@@ -5285,7 +5264,7 @@ public bool yacc_verbose { }
}
-#line 5289 "-" +#line 5268 "-" namespace yydebug { using System; public interface yyDebug { diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay index 3b792896953..9a87c6b38ec 100755 --- a/mcs/mcs/cs-parser.jay +++ b/mcs/mcs/cs-parser.jay @@ -30,14 +30,13 @@ using System; namespace CSC
{
using System.Collections;
- using Compiler;
using CSC;
using CIR;
/// <summary>
/// The C# Parser
/// </summary>
- public class CSharpParser : Parser {
+ public class CSharpParser {
static int global_errors;
Namespace current_namespace;
@@ -79,6 +78,13 @@ namespace CSC // Used to record all types defined
// </summary>
CIR.Tree tree;
+
+ // Name of the file we are parsing
+ public string name;
+
+ // Input stream to parse from.
+ public System.IO.Stream input;
+
%}
%token EOF
@@ -369,16 +375,7 @@ type_declaration //
opt_attributes
: /* empty */
- | attributes
- ;
-
-attributes
- : attribute_sections
- ;
-
-attribute_sections
- : attribute_section
- | attribute_sections attribute_section
+ | attribute_section opt_attributes
;
attribute_section
@@ -480,7 +477,7 @@ struct_declaration new_struct = new Struct (current_container, full_struct_name, (int) $2);
current_container = new_struct;
current_container.Namespace = current_namespace;
- tree.RecordType (full_class_name, new_struct);
+ tree.RecordType (full_struct_name, new_struct);
}
opt_struct_interfaces
struct_body
@@ -832,7 +829,7 @@ interface_declaration if (current_interface != null)
error (-2, "Internal compiler error: interface inside interface");
current_interface = new_interface;
- tree.RecordType (full_class_name, new_interface);
+ tree.RecordType (full_interface_name, new_interface);
}
opt_interface_base
interface_body
@@ -1522,7 +1519,7 @@ opt_rank_specifier rank_specifiers
: rank_specifier
- | rank_specifiers rank_specifier
+ | rank_specifier rank_specifiers
// finishme
;
@@ -2707,18 +2704,19 @@ TypeRef type (string type_name) Tokenizer lexer;
public CSharpParser(CIR.Tree tree, string name, System.IO.Stream input)
- : base (tree, name, input)
{
current_namespace = new Namespace (null, "");
this.tree = tree;
+ this.name = name;
+ this.input = input;
current_container = tree.Types;
current_container.Namespace = current_namespace;
lexer = new Tokenizer (input, name);
- type_references = tree.TypeRefManager;
+ type_references = new TypeRefManager ();
}
-public override int parse ()
+public int parse ()
{
StringBuilder value = new StringBuilder ();
diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs index 5cb184e93f7..1d4b500dee8 100755 --- a/mcs/mcs/cs-tokenizer.cs +++ b/mcs/mcs/cs-tokenizer.cs @@ -260,12 +260,12 @@ namespace CSC bool is_identifier_start_character (char c)
{
- return CharacterInfo.IsLetter (c) || c == '_' ;
+ return Char.IsLetter (c) || c == '_' ;
}
bool is_identifier_part_character (char c)
{
- return (CharacterInfo.IsLetter (c) || CharacterInfo.IsDigit (c) || c == '_');
+ return (Char.IsLetter (c) || Char.IsDigit (c) || c == '_');
}
int is_punct (char c, ref bool doread)
@@ -441,7 +441,7 @@ namespace CSC number.Append ((char) c);
while ((d = peekChar ()) != -1){
- if (CharacterInfo.IsDigit ((char)d)){
+ if (Char.IsDigit ((char)d)){
number.Append ((char) d);
getChar ();
seen_digits = true;
@@ -460,7 +460,7 @@ namespace CSC while ((d = peekChar ()) != -1){
char e = Char.ToUpper ((char) d);
- if (CharacterInfo.IsDigit (e) ||
+ if (Char.IsDigit (e) ||
(e >= 'A' && e <= 'F')){
number.Append ((char) e);
getChar ();
@@ -547,8 +547,8 @@ namespace CSC number.Length = 0;
- if (CharacterInfo.IsDigit ((char)c)){
- if (peekChar () == 'x' || peekChar () == 'X'){
+ if (Char.IsDigit ((char)c)){
+ if (c == '0' && peekChar () == 'x' || peekChar () == 'X'){
getChar ();
hex_digits (-1);
val = new System.Int32 ();
@@ -700,7 +700,7 @@ namespace CSC public int xtoken ()
{
int t;
- bool allow_keyword = false;
+ bool allow_keyword_as_ident = false;
bool doread = false;
int c;
@@ -722,34 +722,24 @@ namespace CSC }
ids = id.ToString ();
-
- if (!is_keyword (ids)){
- val = id.ToString ();
- return Token.IDENTIFIER;
- }
-
- if (allow_keyword) {
+
+ if (!is_keyword (ids) || allow_keyword_as_ident) {
val = ids;
return Token.IDENTIFIER;
}
- if (ids == "true")
- return Token.TRUE;
- else if (ids == "false")
- return Token.FALSE;
- else if (ids == "null")
- return Token.NULL;
-
+ // true, false and null are in the hash anyway.
return getKeyword (ids);
+
}
if (c == '.'){
- if (CharacterInfo.IsDigit ((char) peekChar ()))
+ if (Char.IsDigit ((char) peekChar ()))
return is_number (c);
return Token.DOT;
}
- if (CharacterInfo.IsDigit ((char) c))
+ if (Char.IsDigit ((char) c))
return is_number (c);
// Handle double-slash comments.
@@ -874,7 +864,7 @@ namespace CSC }
if (c == '@'){
- allow_keyword = true;
+ allow_keyword_as_ident = true;
continue;
}
diff --git a/mcs/mcs/driver.cs b/mcs/mcs/driver.cs index f4b36acfc59..c796d8b552e 100755 --- a/mcs/mcs/driver.cs +++ b/mcs/mcs/driver.cs @@ -107,16 +107,24 @@ namespace CSC Assembly a;
foreach (string dir in link_paths){
- string full_path = dir + "\\" + assembly;
+ string full_path = dir + "/" + assembly;
try {
- a = Assembly.Load (full_path);
- } catch (FileNotFoundException) {
+ a = Assembly.Load (assembly);
+ } catch (FileNotFoundException f) {
error ("// File not found: " + full_path);
+ error ("Log: " + f.FusionLog);
return 1;
} catch (BadImageFormatException) {
error ("// Bad file format: " + full_path);
return 1;
+ } catch (FileLoadException f){
+ error ("// File Load Exception: " + full_path);
+ error ("Log: " + f.FusionLog);
+ return 1;
+ } catch (ArgumentNullException){
+ error ("// Argument Null exception " + full_path);
+ return 1;
}
context.AddAssembly (a);
@@ -149,8 +157,8 @@ namespace CSC //
// Setup defaults
//
- references.Add ("mscorlib.dll");
- link_paths.Add ("C://WINNT/Microsoft.Net/Framework/v1.0.2204");
+ references.Add ("mscorlib");
+ link_paths.Add ("file:///C:/WINNT/Microsoft.NET/Framework/v1.0.2914");
for (i = 0; i < args.Length; i++){
string arg = args [i];
diff --git a/mcs/mcs/makefile b/mcs/mcs/makefile index 56a8664f1e0..3301ac2e52c 100755 --- a/mcs/mcs/makefile +++ b/mcs/mcs/makefile @@ -1,6 +1,6 @@ VERSION=0.13 -COMMON_SOURCES = cs-parser.cs cs-tokenizer.cs parser.cs errors.cs tree.cs +COMMON_SOURCES = cs-parser.cs cs-tokenizer.cs errors.cs tree.cs COMPILER_SOURCES = \ assign.cs \ @@ -42,6 +42,9 @@ bison: bison --debug --verbose x.y parser: + ./jay -tv cs-parser.jay > cs-parser.cs + +migparser: jay -tv cs-parser.jay > cs-parser.cs parsernoline: diff --git a/mcs/mcs/parameterCollection.cs b/mcs/mcs/parameterCollection.cs index 77d895c3b4b..86a7c0ce1ae 100755 --- a/mcs/mcs/parameterCollection.cs +++ b/mcs/mcs/parameterCollection.cs @@ -156,5 +156,11 @@ namespace CIR { return parameters.IsSynchronized; } } + + public bool IsFixedSize { + get { + return false; + } + } } } diff --git a/mcs/mcs/parser.cs b/mcs/mcs/parser.cs index 08cca9bb487..7c12cf96c7b 100755 --- a/mcs/mcs/parser.cs +++ b/mcs/mcs/parser.cs @@ -5,7 +5,6 @@ namespace Compiler { abstract public class Parser {
public string name;
public System.IO.Stream input;
- public CIR.Tree tree;
public Parser (CIR.Tree tree, string name, System.IO.Stream stream)
{
diff --git a/mcs/mcs/statementCollection.cs b/mcs/mcs/statementCollection.cs index 475b17b1279..9d235ce6c78 100755 --- a/mcs/mcs/statementCollection.cs +++ b/mcs/mcs/statementCollection.cs @@ -156,5 +156,11 @@ namespace CIR { return statements.IsSynchronized; } } + + public bool IsFixedSize { + get { + return false; + } + } } } diff --git a/mono/.cvsignore b/mono/.cvsignore new file mode 100644 index 00000000000..282522db034 --- /dev/null +++ b/mono/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/mono/Makefile.am b/mono/Makefile.am index 89d68d86d83..dd16095408d 100644 --- a/mono/Makefile.am +++ b/mono/Makefile.am @@ -1 +1 @@ -SUBDIRS = metadata dis
\ No newline at end of file +SUBDIRS = metadata cil dis interpreter diff --git a/mono/cil/.cvsignore b/mono/cil/.cvsignore new file mode 100644 index 00000000000..10dae49ad16 --- /dev/null +++ b/mono/cil/.cvsignore @@ -0,0 +1,3 @@ +Makefile +Makefile.in +opcode.def diff --git a/mono/cil/ChangeLog b/mono/cil/ChangeLog new file mode 100644 index 00000000000..d9869c03c99 --- /dev/null +++ b/mono/cil/ChangeLog @@ -0,0 +1,19 @@ +Wed Jul 11 18:50:12 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * cil-opcodes.xml: change duplicate unused entry. + +Mon Jul 2 15:31:31 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * cil-opcodes.xml: use a more proper XML format (single root tag). + * make-opcodes-def.pl: use XML::Parser, remove debugging print that + broke compilation, corrected opcode byte len. + +2001-07-01 Miguel de Icaza <miguel@ximian.com> + + * cil-opcodes.xml: New file that describes the CIL opcodes in + XML format. + + * make-opcodes-def.pl: Perl script that parses the above file and + generates a Annex V/C.2 compliant opcode.def file. + + diff --git a/mono/cil/Makefile.am b/mono/cil/Makefile.am new file mode 100644 index 00000000000..4fa1bade5f6 --- /dev/null +++ b/mono/cil/Makefile.am @@ -0,0 +1,11 @@ + +opcode.def: make-opcodes-def.pl cil-opcodes.xml + perl make-opcodes-def.pl < $(srcdir)/cil-opcodes.xml > opcode.def + +defdir = $(includedir)/mono/cil +def_DATA = opcode.def + +xmldir = $(share)/mono/cil +xml_DATA = cil-opcodes.xml + +EXTRA_DIST=opcode.def make-opcodes-def.pl make-opcode-def.xsl $(xml_DATA) $(def_DATA)
\ No newline at end of file diff --git a/mono/cil/TODO b/mono/cil/TODO new file mode 100644 index 00000000000..6175693d3f6 --- /dev/null +++ b/mono/cil/TODO @@ -0,0 +1,3 @@ +* Replace make-opcodes-def.pl with XLST process + + We should use an XSLT file to do the conversion there. diff --git a/mono/cil/cil-opcodes.xml b/mono/cil/cil-opcodes.xml new file mode 100644 index 00000000000..dfd5fb106cb --- /dev/null +++ b/mono/cil/cil-opcodes.xml @@ -0,0 +1,297 @@ +<opdesc>
+<opcode name="nop" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0x00" flow="next"/>
+<opcode name="break" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0x01" flow="break"/>
+<opcode name="ldarg.0" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x02" flow="next"/>
+<opcode name="ldarg.1" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x03" flow="next"/>
+<opcode name="ldarg.2" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x04" flow="next"/>
+<opcode name="ldarg.3" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x05" flow="next"/>
+<opcode name="ldloc.0" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x06" flow="next"/>
+<opcode name="ldloc.1" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x07" flow="next"/>
+<opcode name="ldloc.2" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x08" flow="next"/>
+<opcode name="ldloc.3" input="Pop0" output="Push1" args="InlineNone" o1="0xFF" o2="0x09" flow="next"/>
+<opcode name="stloc.0" input="Pop1" output="Push0" args="InlineNone" o1="0xFF" o2="0x0A" flow="next"/>
+<opcode name="stloc.1" input="Pop1" output="Push0" args="InlineNone" o1="0xFF" o2="0x0B" flow="next"/>
+<opcode name="stloc.2" input="Pop1" output="Push0" args="InlineNone" o1="0xFF" o2="0x0C" flow="next"/>
+<opcode name="stloc.3" input="Pop1" output="Push0" args="InlineNone" o1="0xFF" o2="0x0D" flow="next"/>
+<opcode name="ldarg.s" input="Pop0" output="Push1" args="ShortInlineVar" o1="0xFF" o2="0x0E" flow="next"/>
+<opcode name="ldarga.s" input="Pop0" output="PushI" args="ShortInlineVar" o1="0xFF" o2="0x0F" flow="next"/>
+<opcode name="starg.s" input="Pop1" output="Push0" args="ShortInlineVar" o1="0xFF" o2="0x10" flow="next"/>
+<opcode name="ldloc.s" input="Pop0" output="Push1" args="ShortInlineVar" o1="0xFF" o2="0x11" flow="next"/>
+<opcode name="ldloca.s" input="Pop0" output="PushI" args="ShortInlineVar" o1="0xFF" o2="0x12" flow="next"/>
+<opcode name="stloc.s" input="Pop1" output="Push0" args="ShortInlineVar" o1="0xFF" o2="0x13" flow="next"/>
+<opcode name="ldnull" input="Pop0" output="PushRef" args="InlineNone" o1="0xFF" o2="0x14" flow="next"/>
+<opcode name="ldc.i4.m1" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x15" flow="next"/>
+<opcode name="ldc.i4.0" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x16" flow="next"/>
+<opcode name="ldc.i4.1" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x17" flow="next"/>
+<opcode name="ldc.i4.2" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x18" flow="next"/>
+<opcode name="ldc.i4.3" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x19" flow="next"/>
+<opcode name="ldc.i4.4" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x1A" flow="next"/>
+<opcode name="ldc.i4.5" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x1B" flow="next"/>
+<opcode name="ldc.i4.6" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x1C" flow="next"/>
+<opcode name="ldc.i4.7" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x1D" flow="next"/>
+<opcode name="ldc.i4.8" input="Pop0" output="PushI" args="InlineNone" o1="0xFF" o2="0x1E" flow="next"/>
+<opcode name="ldc.i4.s" input="Pop0" output="PushI" args="ShortInlineI" o1="0xFF" o2="0x1F" flow="next"/>
+<opcode name="ldc.i4" input="Pop0" output="PushI" args="InlineI" o1="0xFF" o2="0x20" flow="next"/>
+<opcode name="ldc.i8" input="Pop0" output="PushI8" args="InlineI8" o1="0xFF" o2="0x21" flow="next"/>
+<opcode name="ldc.r4" input="Pop0" output="PushR4" args="ShortInlineR" o1="0xFF" o2="0x22" flow="next"/>
+<opcode name="ldc.r8" input="Pop0" output="PushR8" args="InlineR" o1="0xFF" o2="0x23" flow="next"/>
+<opcode name="unused99" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0x24" flow="next"/>
+<opcode name="dup" input="Pop1" output="Push1+Push1" args="InlineNone" o1="0xFF" o2="0x25" flow="next"/>
+<opcode name="pop" input="Pop1" output="Push0" args="InlineNone" o1="0xFF" o2="0x26" flow="next"/>
+<opcode name="jmp" input="Pop0" output="Push0" args="InlineMethod" o1="0xFF" o2="0x27" flow="call"/>
+<opcode name="call" input="VarPop" output="VarPush" args="InlineMethod" o1="0xFF" o2="0x28" flow="call"/>
+<opcode name="calli" input="VarPop" output="VarPush" args="InlineSig" o1="0xFF" o2="0x29" flow="call"/>
+<opcode name="ret" input="VarPop" output="Push0" args="InlineNone" o1="0xFF" o2="0x2A" flow="return"/>
+<opcode name="br.s" input="Pop0" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x2B" flow="branch"/>
+<opcode name="brfalse.s" input="PopI" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x2C" flow="cond-branch"/>
+<opcode name="brtrue.s" input="PopI" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x2D" flow="cond-branch"/>
+<opcode name="beq.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x2E" flow="cond-branch"/>
+<opcode name="bge.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x2F" flow="cond-branch"/>
+<opcode name="bgt.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x30" flow="cond-branch"/>
+<opcode name="ble.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x31" flow="cond-branch"/>
+<opcode name="blt.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x32" flow="cond-branch"/>
+<opcode name="bne.un.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x33" flow="cond-branch"/>
+<opcode name="bge.un.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x34" flow="cond-branch"/>
+<opcode name="bgt.un.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x35" flow="cond-branch"/>
+<opcode name="ble.un.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x36" flow="cond-branch"/>
+<opcode name="blt.un.s" input="Pop1+Pop1" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0x37" flow="cond-branch"/>
+<opcode name="br" input="Pop0" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x38" flow="branch"/>
+<opcode name="brfalse" input="PopI" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x39" flow="cond-branch"/>
+<opcode name="brtrue" input="PopI" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x3A" flow="cond-branch"/>
+<opcode name="beq" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x3B" flow="cond-branch"/>
+<opcode name="bge" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x3C" flow="cond-branch"/>
+<opcode name="bgt" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x3D" flow="cond-branch"/>
+<opcode name="ble" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x3E" flow="cond-branch"/>
+<opcode name="blt" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x3F" flow="cond-branch"/>
+<opcode name="bne.un" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x40" flow="cond-branch"/>
+<opcode name="bge.un" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x41" flow="cond-branch"/>
+<opcode name="bgt.un" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x42" flow="cond-branch"/>
+<opcode name="ble.un" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x43" flow="cond-branch"/>
+<opcode name="blt.un" input="Pop1+Pop1" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0x44" flow="cond-branch"/>
+<opcode name="switch" input="PopI" output="Push0" args="InlineSwitch" o1="0xFF" o2="0x45" flow="cond-branch"/>
+<opcode name="ldind.i1" input="PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x46" flow="next"/>
+<opcode name="ldind.u1" input="PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x47" flow="next"/>
+<opcode name="ldind.i2" input="PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x48" flow="next"/>
+<opcode name="ldind.u2" input="PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x49" flow="next"/>
+<opcode name="ldind.i4" input="PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x4A" flow="next"/>
+<opcode name="ldind.u4" input="PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x4B" flow="next"/>
+<opcode name="ldind.i8" input="PopI" output="PushI8" args="InlineNone" o1="0xFF" o2="0x4C" flow="next"/>
+<opcode name="ldind.i" input="PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x4D" flow="next"/>
+<opcode name="ldind.r4" input="PopI" output="PushR4" args="InlineNone" o1="0xFF" o2="0x4E" flow="next"/>
+<opcode name="ldind.r8" input="PopI" output="PushR8" args="InlineNone" o1="0xFF" o2="0x4F" flow="next"/>
+<opcode name="ldind.ref" input="PopI" output="PushRef" args="InlineNone" o1="0xFF" o2="0x50" flow="next"/>
+<opcode name="stind.ref" input="PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x51" flow="next"/>
+<opcode name="stind.i1" input="PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x52" flow="next"/>
+<opcode name="stind.i2" input="PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x53" flow="next"/>
+<opcode name="stind.i4" input="PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x54" flow="next"/>
+<opcode name="stind.i8" input="PopI+PopI8" output="Push0" args="InlineNone" o1="0xFF" o2="0x55" flow="next"/>
+<opcode name="stind.r4" input="PopI+PopR4" output="Push0" args="InlineNone" o1="0xFF" o2="0x56" flow="next"/>
+<opcode name="stind.r8" input="PopI+PopR8" output="Push0" args="InlineNone" o1="0xFF" o2="0x57" flow="next"/>
+<opcode name="add" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x58" flow="next"/>
+<opcode name="sub" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x59" flow="next"/>
+<opcode name="mul" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x5A" flow="next"/>
+<opcode name="div" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x5B" flow="next"/>
+<opcode name="div.un" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x5C" flow="next"/>
+<opcode name="rem" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x5D" flow="next"/>
+<opcode name="rem.un" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x5E" flow="next"/>
+<opcode name="and" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x5F" flow="next"/>
+<opcode name="or" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x60" flow="next"/>
+<opcode name="xor" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x61" flow="next"/>
+<opcode name="shl" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x62" flow="next"/>
+<opcode name="shr" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x63" flow="next"/>
+<opcode name="shr.un" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x64" flow="next"/>
+<opcode name="neg" input="Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x65" flow="next"/>
+<opcode name="not" input="Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0x66" flow="next"/>
+<opcode name="conv.i1" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x67" flow="next"/>
+<opcode name="conv.i2" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x68" flow="next"/>
+<opcode name="conv.i4" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x69" flow="next"/>
+<opcode name="conv.i8" input="Pop1" output="PushI8" args="InlineNone" o1="0xFF" o2="0x6A" flow="next"/>
+<opcode name="conv.r4" input="Pop1" output="PushR4" args="InlineNone" o1="0xFF" o2="0x6B" flow="next"/>
+<opcode name="conv.r8" input="Pop1" output="PushR8" args="InlineNone" o1="0xFF" o2="0x6C" flow="next"/>
+<opcode name="conv.u4" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x6D" flow="next"/>
+<opcode name="conv.u8" input="Pop1" output="PushI8" args="InlineNone" o1="0xFF" o2="0x6E" flow="next"/>
+<opcode name="callvirt" input="VarPop" output="VarPush" args="InlineMethod" o1="0xFF" o2="0x6F" flow="call"/>
+<opcode name="cpobj" input="PopI+PopI" output="Push0" args="InlineType" o1="0xFF" o2="0x70" flow="next"/>
+<opcode name="ldobj" input="PopI" output="Push1" args="InlineType" o1="0xFF" o2="0x71" flow="next"/>
+<opcode name="ldstr" input="Pop0" output="PushRef" args="InlineString" o1="0xFF" o2="0x72" flow="next"/>
+<opcode name="newobj" input="VarPop" output="PushRef" args="InlineMethod" o1="0xFF" o2="0x73" flow="call"/>
+<opcode name="castclass" input="PopRef" output="PushRef" args="InlineType" o1="0xFF" o2="0x74" flow="next"/>
+<opcode name="isinst" input="PopRef" output="PushI" args="InlineType" o1="0xFF" o2="0x75" flow="next"/>
+<opcode name="conv.r.un" input="Pop1" output="PushR8" args="InlineNone" o1="0xFF" o2="0x76" flow="next"/>
+<opcode name="unused58" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0x77" flow="next"/>
+<opcode name="unused1" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0x78" flow="next"/>
+<opcode name="unbox" input="PopRef" output="PushI" args="InlineType" o1="0xFF" o2="0x79" flow="next"/>
+<opcode name="throw" input="PopRef" output="Push0" args="InlineNone" o1="0xFF" o2="0x7A" flow="throw"/>
+<opcode name="ldfld" input="PopRef" output="Push1" args="InlineField" o1="0xFF" o2="0x7B" flow="next"/>
+<opcode name="ldflda" input="PopRef" output="PushI" args="InlineField" o1="0xFF" o2="0x7C" flow="next"/>
+<opcode name="stfld" input="PopRef+Pop1" output="Push0" args="InlineField" o1="0xFF" o2="0x7D" flow="next"/>
+<opcode name="ldsfld" input="Pop0" output="Push1" args="InlineField" o1="0xFF" o2="0x7E" flow="next"/>
+<opcode name="ldsflda" input="Pop0" output="PushI" args="InlineField" o1="0xFF" o2="0x7F" flow="next"/>
+<opcode name="stsfld" input="Pop1" output="Push0" args="InlineField" o1="0xFF" o2="0x80" flow="next"/>
+<opcode name="stobj" input="PopI+Pop1" output="Push0" args="InlineType" o1="0xFF" o2="0x81" flow="next"/>
+<opcode name="conv.ovf.i1.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x82" flow="next"/>
+<opcode name="conv.ovf.i2.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x83" flow="next"/>
+<opcode name="conv.ovf.i4.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x84" flow="next"/>
+<opcode name="conv.ovf.i8.un" input="Pop1" output="PushI8" args="InlineNone" o1="0xFF" o2="0x85" flow="next"/>
+<opcode name="conv.ovf.u1.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x86" flow="next"/>
+<opcode name="conv.ovf.u2.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x87" flow="next"/>
+<opcode name="conv.ovf.u4.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x88" flow="next"/>
+<opcode name="conv.ovf.u8.un" input="Pop1" output="PushI8" args="InlineNone" o1="0xFF" o2="0x89" flow="next"/>
+<opcode name="conv.ovf.i.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x8A" flow="next"/>
+<opcode name="conv.ovf.u.un" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0x8B" flow="next"/>
+<opcode name="box" input="Pop1" output="PushRef" args="InlineType" o1="0xFF" o2="0x8C" flow="next"/>
+<opcode name="newarr" input="PopI" output="PushRef" args="InlineType" o1="0xFF" o2="0x8D" flow="next"/>
+<opcode name="ldlen" input="PopRef" output="PushI" args="InlineNone" o1="0xFF" o2="0x8E" flow="next"/>
+<opcode name="ldelema" input="PopRef+PopI" output="PushI" args="InlineType" o1="0xFF" o2="0x8F" flow="next"/>
+<opcode name="ldelem.i1" input="PopRef+PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x90" flow="next"/>
+<opcode name="ldelem.u1" input="PopRef+PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x91" flow="next"/>
+<opcode name="ldelem.i2" input="PopRef+PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x92" flow="next"/>
+<opcode name="ldelem.u2" input="PopRef+PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x93" flow="next"/>
+<opcode name="ldelem.i4" input="PopRef+PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x94" flow="next"/>
+<opcode name="ldelem.u4" input="PopRef+PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x95" flow="next"/>
+<opcode name="ldelem.i8" input="PopRef+PopI" output="PushI8" args="InlineNone" o1="0xFF" o2="0x96" flow="next"/>
+<opcode name="ldelem.i" input="PopRef+PopI" output="PushI" args="InlineNone" o1="0xFF" o2="0x97" flow="next"/>
+<opcode name="ldelem.r4" input="PopRef+PopI" output="PushR4" args="InlineNone" o1="0xFF" o2="0x98" flow="next"/>
+<opcode name="ldelem.r8" input="PopRef+PopI" output="PushR8" args="InlineNone" o1="0xFF" o2="0x99" flow="next"/>
+<opcode name="ldelem.ref" input="PopRef+PopI" output="PushRef" args="InlineNone" o1="0xFF" o2="0x9A" flow="next"/>
+<opcode name="stelem.i" input="PopRef+PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x9B" flow="next"/>
+<opcode name="stelem.i1" input="PopRef+PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x9C" flow="next"/>
+<opcode name="stelem.i2" input="PopRef+PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x9D" flow="next"/>
+<opcode name="stelem.i4" input="PopRef+PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0x9E" flow="next"/>
+<opcode name="stelem.i8" input="PopRef+PopI+PopI8" output="Push0" args="InlineNone" o1="0xFF" o2="0x9F" flow="next"/>
+<opcode name="stelem.r4" input="PopRef+PopI+PopR4" output="Push0" args="InlineNone" o1="0xFF" o2="0xA0" flow="next"/>
+<opcode name="stelem.r8" input="PopRef+PopI+PopR8" output="Push0" args="InlineNone" o1="0xFF" o2="0xA1" flow="next"/>
+<opcode name="stelem.ref" input="PopRef+PopI+PopRef" output="Push0" args="InlineNone" o1="0xFF" o2="0xA2" flow="next"/>
+<opcode name="unused2" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA3" flow="next"/>
+<opcode name="unused3" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA4" flow="next"/>
+<opcode name="unused4" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA5" flow="next"/>
+<opcode name="unused5" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA6" flow="next"/>
+<opcode name="unused6" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA7" flow="next"/>
+<opcode name="unused7" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA8" flow="next"/>
+<opcode name="unused8" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xA9" flow="next"/>
+<opcode name="unused9" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xAA" flow="next"/>
+<opcode name="unused10" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xAB" flow="next"/>
+<opcode name="unused11" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xAC" flow="next"/>
+<opcode name="unused12" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xAD" flow="next"/>
+<opcode name="unused13" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xAE" flow="next"/>
+<opcode name="unused14" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xAF" flow="next"/>
+<opcode name="unused15" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xB0" flow="next"/>
+<opcode name="unused16" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xB1" flow="next"/>
+<opcode name="unused17" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xB2" flow="next"/>
+<opcode name="conv.ovf.i1" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xB3" flow="next"/>
+<opcode name="conv.ovf.u1" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xB4" flow="next"/>
+<opcode name="conv.ovf.i2" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xB5" flow="next"/>
+<opcode name="conv.ovf.u2" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xB6" flow="next"/>
+<opcode name="conv.ovf.i4" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xB7" flow="next"/>
+<opcode name="conv.ovf.u4" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xB8" flow="next"/>
+<opcode name="conv.ovf.i8" input="Pop1" output="PushI8" args="InlineNone" o1="0xFF" o2="0xB9" flow="next"/>
+<opcode name="conv.ovf.u8" input="Pop1" output="PushI8" args="InlineNone" o1="0xFF" o2="0xBA" flow="next"/>
+<opcode name="unused50" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xBB" flow="next"/>
+<opcode name="unused18" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xBC" flow="next"/>
+<opcode name="unused19" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xBD" flow="next"/>
+<opcode name="unused20" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xBE" flow="next"/>
+<opcode name="unused21" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xBF" flow="next"/>
+<opcode name="unused22" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xC0" flow="next"/>
+<opcode name="unused23" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xC1" flow="next"/>
+<opcode name="refanyval" input="Pop1" output="PushI" args="InlineType" o1="0xFF" o2="0xC2" flow="next"/>
+<opcode name="ckfinite" input="Pop1" output="PushR8" args="InlineNone" o1="0xFF" o2="0xC3" flow="next"/>
+<opcode name="unused24" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xC4" flow="next"/>
+<opcode name="unused25" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xC5" flow="next"/>
+<opcode name="mkrefany" input="PopI" output="Push1" args="InlineType" o1="0xFF" o2="0xC6" flow="next"/>
+<opcode name="unused59" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xC7" flow="next"/>
+<opcode name="unused60" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xC8" flow="next"/>
+<opcode name="unused61" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xC9" flow="next"/>
+<opcode name="unused62" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xCA" flow="next"/>
+<opcode name="unused63" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xCB" flow="next"/>
+<opcode name="unused64" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xCC" flow="next"/>
+<opcode name="unused65" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xCD" flow="next"/>
+<opcode name="unused66" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xCE" flow="next"/>
+<opcode name="unused67" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xCF" flow="next"/>
+<opcode name="ldtoken" input="Pop0" output="PushI" args="InlineTok" o1="0xFF" o2="0xD0" flow="next"/>
+<opcode name="conv.u2" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xD1" flow="next"/>
+<opcode name="conv.u1" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xD2" flow="next"/>
+<opcode name="conv.i" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xD3" flow="next"/>
+<opcode name="conv.ovf.i" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xD4" flow="next"/>
+<opcode name="conv.ovf.u" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xD5" flow="next"/>
+<opcode name="add.ovf" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0xD6" flow="next"/>
+<opcode name="add.ovf.un" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0xD7" flow="next"/>
+<opcode name="mul.ovf" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0xD8" flow="next"/>
+<opcode name="mul.ovf.un" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0xD9" flow="next"/>
+<opcode name="sub.ovf" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0xDA" flow="next"/>
+<opcode name="sub.ovf.un" input="Pop1+Pop1" output="Push1" args="InlineNone" o1="0xFF" o2="0xDB" flow="next"/>
+<opcode name="endfinally" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xDC" flow="return"/>
+<opcode name="leave" input="Pop0" output="Push0" args="InlineBrTarget" o1="0xFF" o2="0xDD" flow="branch"/>
+<opcode name="leave.s" input="Pop0" output="Push0" args="ShortInlineBrTarget" o1="0xFF" o2="0xDE" flow="branch"/>
+<opcode name="stind.i" input="PopI+PopI" output="Push0" args="InlineNone" o1="0xFF" o2="0xDF" flow="next"/>
+<opcode name="conv.u" input="Pop1" output="PushI" args="InlineNone" o1="0xFF" o2="0xE0" flow="next"/>
+<opcode name="unused26" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE1" flow="next"/>
+<opcode name="unused27" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE2" flow="next"/>
+<opcode name="unused28" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE3" flow="next"/>
+<opcode name="unused29" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE4" flow="next"/>
+<opcode name="unused30" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE5" flow="next"/>
+<opcode name="unused31" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE6" flow="next"/>
+<opcode name="unused32" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE7" flow="next"/>
+<opcode name="unused33" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE8" flow="next"/>
+<opcode name="unused34" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xE9" flow="next"/>
+<opcode name="unused35" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xEA" flow="next"/>
+<opcode name="unused36" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xEB" flow="next"/>
+<opcode name="unused37" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xEC" flow="next"/>
+<opcode name="unused38" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xED" flow="next"/>
+<opcode name="unused39" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xEE" flow="next"/>
+<opcode name="unused40" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xEF" flow="next"/>
+<opcode name="unused41" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF0" flow="next"/>
+<opcode name="unused42" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF1" flow="next"/>
+<opcode name="unused43" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF2" flow="next"/>
+<opcode name="unused44" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF3" flow="next"/>
+<opcode name="unused45" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF4" flow="next"/>
+<opcode name="unused46" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF5" flow="next"/>
+<opcode name="unused47" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF6" flow="next"/>
+<opcode name="unused48" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF7" flow="next"/>
+<opcode name="prefix7" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF8" flow="meta"/>
+<opcode name="prefix6" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xF9" flow="meta"/>
+<opcode name="prefix5" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xFA" flow="meta"/>
+<opcode name="prefix4" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xFB" flow="meta"/>
+<opcode name="prefix3" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xFC" flow="meta"/>
+<opcode name="prefix2" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xFD" flow="meta"/>
+<opcode name="prefix1" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xFE" flow="meta"/>
+<opcode name="prefixref" input="Pop0" output="Push0" args="InlineNone" o1="0xFF" o2="0xFF" flow="meta"/>
+<opcode name="arglist" input="Pop0" output="PushI" args="InlineNone" o1="0xFE" o2="0x00" flow="next"/>
+<opcode name="ceq" input="Pop1+Pop1" output="PushI" args="InlineNone" o1="0xFE" o2="0x01" flow="next"/>
+<opcode name="cgt" input="Pop1+Pop1" output="PushI" args="InlineNone" o1="0xFE" o2="0x02" flow="next"/>
+<opcode name="cgt.un" input="Pop1+Pop1" output="PushI" args="InlineNone" o1="0xFE" o2="0x03" flow="next"/>
+<opcode name="clt" input="Pop1+Pop1" output="PushI" args="InlineNone" o1="0xFE" o2="0x04" flow="next"/>
+<opcode name="clt.un" input="Pop1+Pop1" output="PushI" args="InlineNone" o1="0xFE" o2="0x05" flow="next"/>
+<opcode name="ldftn" input="Pop0" output="PushI" args="InlineMethod" o1="0xFE" o2="0x06" flow="next"/>
+<opcode name="ldvirtftn" input="PopRef" output="PushI" args="InlineMethod" o1="0xFE" o2="0x07" flow="next"/>
+<opcode name="unused56" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x08" flow="next"/>
+<opcode name="ldarg" input="Pop0" output="Push1" args="InlineVar" o1="0xFE" o2="0x09" flow="next"/>
+<opcode name="ldarga" input="Pop0" output="PushI" args="InlineVar" o1="0xFE" o2="0x0A" flow="next"/>
+<opcode name="starg" input="Pop1" output="Push0" args="InlineVar" o1="0xFE" o2="0x0B" flow="next"/>
+<opcode name="ldloc" input="Pop0" output="Push1" args="InlineVar" o1="0xFE" o2="0x0C" flow="next"/>
+<opcode name="ldloca" input="Pop0" output="PushI" args="InlineVar" o1="0xFE" o2="0x0D" flow="next"/>
+<opcode name="stloc" input="Pop1" output="Push0" args="InlineVar" o1="0xFE" o2="0x0E" flow="next"/>
+<opcode name="localloc" input="PopI" output="PushI" args="InlineNone" o1="0xFE" o2="0x0F" flow="next"/>
+<opcode name="unused57" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x10" flow="next"/>
+<opcode name="endfilter" input="PopI" output="Push0" args="InlineNone" o1="0xFE" o2="0x11" flow="return"/>
+<opcode name="unaligned." input="Pop0" output="Push0" args="ShortInlineI" o1="0xFE" o2="0x12" flow="meta"/>
+<opcode name="volatile." input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x13" flow="meta"/>
+<opcode name="tail." input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x14" flow="meta"/>
+<opcode name="initobj" input="PopI" output="Push0" args="InlineType" o1="0xFE" o2="0x15" flow="next"/>
+<opcode name="unused68" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x16" flow="next"/>
+<opcode name="cpblk" input="PopI+PopI+PopI" output="Push0" args="InlineNone" o1="0xFE" o2="0x17" flow="next"/>
+<opcode name="initblk" input="PopI+PopI+PopI" output="Push0" args="InlineNone" o1="0xFE" o2="0x18" flow="next"/>
+<opcode name="unused69" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x19" flow="next"/>
+<opcode name="rethrow" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1A" flow="throw"/>
+<opcode name="unused" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1B" flow="next"/>
+<opcode name="sizeof" input="Pop0" output="PushI" args="InlineType" o1="0xFE" o2="0x1C" flow="next"/>
+<opcode name="refanytype" input="Pop1" output="PushI" args="InlineNone" o1="0xFE" o2="0x1D" flow="next"/>
+<opcode name="unused52" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1E" flow="next"/>
+<opcode name="unused53" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x1F" flow="next"/>
+<opcode name="unused54" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x20" flow="next"/>
+<opcode name="unused55" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x21" flow="next"/>
+<opcode name="unused70" input="Pop0" output="Push0" args="InlineNone" o1="0xFE" o2="0x22" flow="next"/>
+<opcode name="illegal" input="Pop0" output="Push0" args="InlineNone" o1="0x00" o2="0x00" flow="meta"/>
+<opcode name="endmac" input="Pop0" output="Push0" args="InlineNone" o1="0x00" o2="0x00" flow="meta"/>
+
+
+</opdesc>
diff --git a/mono/cil/make-opcode-def.xsl b/mono/cil/make-opcode-def.xsl new file mode 100644 index 00000000000..9ad799f4ba9 --- /dev/null +++ b/mono/cil/make-opcode-def.xsl @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+
+
+<!--
+ | make-opcode-def.xsl: Translates opcodes from the CIL-opcodes.xml into
+ | a spec compliant opcodes.def file
+ | Converted to XSLT from make-opcodes-def.pl
+ |
+ | See: Common Language Infrastructure (CLI) Part 5: Annexes
+ |
+ | Author: Sergey Chaban
+ |
+ | $Id: make-opcode-def.xsl,v 1.1 2001/07/13 01:04:23 miguel Exp $
+ -->
+
+
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+
+<xsl:output method="text"/>
+
+
+<xsl:template match="/">
+ <xsl:apply-templates/>
+ <xsl:call-template name="print-trailer"/>
+</xsl:template>
+
+<xsl:template name="to-upper">
+ <xsl:param name="string"/>
+ <xsl:value-of select="translate($string,
+ 'abcdefghijklmnopqrstuvwxyz.-',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ__')"/>
+</xsl:template>
+
+
+<xsl:template name="get-flow">
+ <xsl:param name="flow" select="@flow"/>
+ <xsl:choose>
+ <xsl:when
+ test="contains('next call return branch meta cond-branch',$flow)">
+ <xsl:call-template name="to-upper">
+ <xsl:with-param name="string" select="$flow"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="'ERROR'"/></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="opdesc/opcode">
+ <xsl:variable name="uname">
+ <xsl:call-template name="to-upper">
+ <xsl:with-param name="string" select="@name"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="o1">
+ <xsl:call-template name="to-upper">
+ <xsl:with-param name="string" select="@o1"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="f">
+ <xsl:call-template name="get-flow"/>
+ </xsl:variable>
+ <xsl:variable name="count"
+ select="number(not(contains($o1,'FF')))+1"/>OPDEF(CEE_<xsl:value-of
+ select="concat($uname,', "',@name,'", ',
+ @input,', ',@output,', ',@args,', X, ',
+ $count,', ',@o1,', ',@o2,', ',$f
+ )"/>)
+</xsl:template>
+
+
+<xsl:template name="print-trailer">
+#ifndef OPALIAS
+#define _MONO_CIL_OPALIAS_DEFINED_
+#define OPALIAS(a,s,r)
+#endif
+
+OPALIAS(CEE_BRNULL, "brnull", CEE_BRFALSE)
+OPALIAS(CEE_BRNULL_S, "brnull.s", CEE_BRFALSE_S)
+OPALIAS(CEE_BRZERO, "brzero", CEE_BRFALSE)
+OPALIAS(CEE_BRZERO_S, "brzero.s", CEE_BRFALSE_S)
+OPALIAS(CEE_BRINST, "brinst", CEE_BRTRUE)
+OPALIAS(CEE_BRINST_S, "brinst.s", CEE_BRTRUE_S)
+OPALIAS(CEE_LDIND_U8, "ldind.u8", CEE_LDIND_I8)
+OPALIAS(CEE_LDELEM_U8, "ldelem.u8", CEE_LDELEM_I8)
+OPALIAS(CEE_LDX_I4_MIX, "ldc.i4.M1", CEE_LDC_I4_M1)
+OPALIAS(CEE_ENDFAULT, "endfault", CEE_ENDFINALLY)
+
+#ifdef _MONO_CIL_OPALIAS_DEFINED_
+#undef OPALIAS
+#undef _MONO_CIL_OPALIAS_DEFINED_
+#endif
+</xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/mono/cil/make-opcodes-def.pl b/mono/cil/make-opcodes-def.pl new file mode 100644 index 00000000000..3114918bb65 --- /dev/null +++ b/mono/cil/make-opcodes-def.pl @@ -0,0 +1,80 @@ +#!/usr/bin/perl +# +# make-opcodes-def.pl: Loads the opcodes from the CIL-opcodes.xml and +# generates a spec compliant opcodes.def file +# +# Author: +# Miguel de Icaza (miguel@ximian.com) +# +# (C) 2001 Ximian, Inc. +# +# We should really be doing this with XSLT, but I know nothing about XSLT +# ;-) +# or maybe just an XML::Parser... - lupus + +use strict; +use XML::Parser; + +my %valid_flow; +# the XML file also includes "throw" +@valid_flow{qw(next call return branch meta cond-branch)} = (); + +open OUTPUT, ">opcode.def" || die "Can not create opcode.def file: $!"; + +my $parser = new XML::Parser (Handlers => {Start => \&handle_opcode}); +$parser->parsefile("cil-opcodes.xml"); +print_trailer(); +close(OUTPUT) || die "Can not close file: $!"; + +sub handle_opcode { + my ($parser, $elem, %attrs) = @_; + my ($name, $input, $output, $args, $o1, $o2, $flow, $uname, $count, $ff); + + return if ($elem ne 'opcode'); + + ($name, $input, $output, $args, $o1, $o2, $flow) = + @attrs{qw(name input output args o1 o2 flow)}; + + $uname = uc $name; + $uname =~ tr/./_/; + if (hex($o1) == 0xff){ + $count = 1; + } else { + $count = 2; + } + + $ff = "ERROR"; + if (exists $valid_flow{$flow}) { + $ff = uc $flow; + $ff =~ tr/-/_/; + } + + print OUTPUT "OPDEF(CEE_$uname, \"$name\", $input, $output, $args, X, $count, $o1, $o2, $ff)\n"; + +} + +sub print_trailer { +print OUTPUT<<EOF; +#ifndef OPALIAS +#define _MONO_CIL_OPALIAS_DEFINED_ +#define OPALIAS(a,s,r) +#endif + +OPALIAS(CEE_BRNULL, "brnull", CEE_BRFALSE) +OPALIAS(CEE_BRNULL_S, "brnull.s", CEE_BRFALSE_S) +OPALIAS(CEE_BRZERO, "brzero", CEE_BRFALSE) +OPALIAS(CEE_BRZERO_S, "brzero.s", CEE_BRFALSE_S) +OPALIAS(CEE_BRINST, "brinst", CEE_BRTRUE) +OPALIAS(CEE_BRINST_S, "brinst.s", CEE_BRTRUE_S) +OPALIAS(CEE_LDIND_U8, "ldind.u8", CEE_LDIND_I8) +OPALIAS(CEE_LDELEM_U8, "ldelem.u8", CEE_LDELEM_I8) +OPALIAS(CEE_LDX_I4_MIX, "ldc.i4.M1", CEE_LDC_I4_M1) +OPALIAS(CEE_ENDFAULT, "endfault", CEE_ENDFINALLY) + +#ifdef _MONO_CIL_OPALIAS_DEFINED_ +#undef OPALIAS +#undef _MONO_CIL_OPALIAS_DEFINED_ +#endif +EOF +} + diff --git a/mono/dis/.cvsignore b/mono/dis/.cvsignore new file mode 100644 index 00000000000..45b45b2bee5 --- /dev/null +++ b/mono/dis/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.libs +.deps +monodis diff --git a/mono/dis/ChangeLog b/mono/dis/ChangeLog new file mode 100644 index 00000000000..3b269e4019f --- /dev/null +++ b/mono/dis/ChangeLog @@ -0,0 +1,68 @@ +2001-07-13 Miguel de Icaza <miguel@ximian.com> + + * get.c (get_method): GOOD. Implemented this other bad boy. + +2001-07-12 Miguel de Icaza <miguel@ximian.com> + + * get.c (get_token_type): Implement TOKEN_TYPE_TYPE_SPEC. + (get_typespec): Implement. + (get_typedef_or_ref): Use get_typespec. + + * dis-cil.c (dissasemble_cil): Implement InlineField + (dissasemble_cil): Implement InlineTok. + + * get.c (get_token, get_field): Implemented. Worked around lame + tables in the spec. + +Wed Jul 11 18:52:15 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * dis-cil.c: output real name of local var. + * dump.c: output more info about fields (flags and type). Properly decode + Property signatures. Decode also method table. + * main.c: Fix local variable info. Hopefully fix field and property list. + +Mon Jul 9 16:39:41 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * dump.c: write stuff to output, not stderr. Give more info for properties. + * dump.c,dump.h,main.c: implement dump_table_event(), dump_table_file(), + dump_table_moduleref(). + * get.c: first attempt to decode string constants, need to find if and where + this is actually specified. + +Fri Jul 6 19:49:21 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * dump.c,dump.h: implement dump_table_property(). + * main.c: implement local variable info disassembling. + Annotate entrypoint method. Remove memory leak in + parse_method_signature (). + +2001-07-04 Miguel de Icaza <miguel@ximian.com> + + * get.c (get_methodref_signature): Implement. + + * dump.c (dump_table_memberref): Add memberref dumping. + +Tue, 3 Jul 2001 18:32:10 +0200 Paolo Molaro <lupus@ximian.com> + + * main.c: return on failure. + +2001-07-02 Miguel de Icaza <miguel@ximian.com> + + * dis-cil.c (get_encoded_user_string): Return a string from the + #US heap. o + + * get.c (get_blob_encoded_size): Implement 23.1.4 decoding. + +2001-07-01 Miguel de Icaza <miguel@ximian.com> + + * dis-cil.c: New file. CIL opcode dissasembler. + +2001-06-27 Miguel de Icaza <miguel@ximian.com> + + * main.c: Split code. + +2001-06-22 Miguel de Icaza <miguel@ximian.com> + + * main.c: More work on the disassembler and on the understanding + of the metadata file format. + diff --git a/mono/dis/Makefile.am b/mono/dis/Makefile.am index fdb8662c28c..9cb1baad6ad 100644 --- a/mono/dis/Makefile.am +++ b/mono/dis/Makefile.am @@ -3,8 +3,21 @@ INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir) bin_PROGRAMS = monodis monodis_SOURCES = \ - main.c + get.c \ + get.h \ + dis-cil.c \ + dis-cil.h \ + dump.c \ + dump.h \ + main.c \ + meta.h \ + util.c \ + util.h monodis_LDADD = \ ../metadata/libmetadata.a \ $(GLIB_LIBS) + +man_MANS = monodis.1 + +EXTRA_DIST = $(man_MANS)
\ No newline at end of file diff --git a/mono/dis/TODO b/mono/dis/TODO new file mode 100644 index 00000000000..fb42dc0758a --- /dev/null +++ b/mono/dis/TODO @@ -0,0 +1,5 @@ +* Write test cases + + Write test cases to stress test TypeSpec. This is done by + creating arrays of various dimensions, sizes, and lower + bounds. diff --git a/mono/dis/dis-cil.c b/mono/dis/dis-cil.c new file mode 100644 index 00000000000..8f57ceb067c --- /dev/null +++ b/mono/dis/dis-cil.c @@ -0,0 +1,253 @@ +/* + * dis-cil.c: Disassembles CIL byte codes + * + * Author: + * Miguel de Icaza (miguel@ximian.com) + * + * (C) 2001 Ximian, Inc. + */ +#include <config.h> +#include <glib.h> +#include <stdio.h> +#include <wchar.h> +#include "meta.h" +#include "get.h" +#include "dump.h" +#include "dis-cil.h" + +enum { + InlineBrTarget, + InlineField, + InlineI, + InlineI8, + InlineMethod, + InlineNone, + InlineR, + InlineSig, + InlineString, + InlineSwitch, + InlineTok, + InlineType, + InlineVar, + ShortInlineBrTarget, + ShortInlineI, + ShortInlineR, + ShortInlineVar +}; + +#define OPDEF(a,b,c,d,e,f,g,h,i,j) \ + { b, e, g, h, i }, + +typedef struct { + char *name; + int argument; + + /* + * we are not really using any of the following: + */ + int bytes; + unsigned char o1, o2; +} opcode_t; + +static opcode_t opcodes [300] = { +#include "mono/cil/opcode.def" +}; + +/* + * Strings on the US heap are encoded using UTF-16. Poor man's + * UTF-16 to UTF-8. I know its broken, use libunicode later. + */ +static char * +get_encoded_user_string (const char *ptr) +{ + char *res; + int len, i, j; + + ptr = get_blob_encoded_size (ptr, &len); + res = g_malloc (len + 1); + + /* + * I should really use some kind of libunicode here + */ + for (i = 0, j = 0; i < len; j++, i += 2) + res [j] = ptr [i]; + + res [j] = 0; + + return res; +} + +void +dissasemble_cil (metadata_t *m, const unsigned char *start, int size) +{ + const unsigned char *end = start + size; + const unsigned char *ptr = start; + opcode_t *entry; + + while (ptr < end){ + if (*ptr == 0xfe){ + ptr++; + entry = &opcodes [*ptr + 256]; + } else + entry = &opcodes [*ptr]; + + fprintf (output, "\tIL_%04x: %s ", (int) (ptr - start), entry->name); + ptr++; + switch (entry->argument){ + case InlineBrTarget: { + gint target = *(gint32 *) ptr; + fprintf (output, "IL_%04x", ((int) (ptr - start)) + 4 + target); + ptr += 4; + break; + } + + case InlineField: { + guint32 token = *(guint32 *) ptr; + char *s; + + s = get_field (m, token); + fprintf (output, "%s", s); + g_free (s); + ptr += 4; + break; + } + + case InlineI: { + int value = *(int *) ptr; + + fprintf (output, "%d", value); + ptr += 4; + break; + } + + case InlineI8: { + gint64 top = *(guint64 *) ptr; + + fprintf (output, "%lld", (long long) top); + ptr += 8; + break; + } + + case InlineMethod: { + guint32 token = *(guint32 *) ptr; + char *s; + + s = get_method (m, token); + fprintf (output, "%s", s); + g_free (s); + ptr += 4; + break; + } + + case InlineNone: + break; + + case InlineR: { + double r = *(double *) ptr; + fprintf (output, "%g", r); + ptr += 8; + break; + } + + case InlineSig: { + guint32 token = *(guint32 *) ptr; + fprintf (output, "signature-0x%08x", token); + ptr += 4; + break; + } + + case InlineString: { + guint32 token = *(guint32 *) ptr; + + char *s = get_encoded_user_string ( + mono_metadata_user_string (m, token & 0xffffff)); + + /* + * See section 23.1.4 on the encoding of the #US heap + */ + fprintf (output, "\"%s\"", s); + g_free (s); + ptr += 4; + break; + } + + case InlineSwitch: { + guint32 count = *(guint32 *) ptr; + guint32 i; + + ptr += 4; + fprintf (output, "(\n\t\t\t"); + for (i = 0; i < count; i++){ + fprintf (output, "IL_%x", *(guint32 *) ptr); + ptr += 4; + } + fprintf (output, "\t\t\t)"); + break; + } + + case InlineTok: { + guint32 token = *(guint32 *) ptr; + char *s; + + s = get_token (m, token); + fprintf (output, "%s", s); + g_free (s); + + ptr += 4; + break; + } + + case InlineType: { + guint32 token = *(guint32 *) ptr; + char *s = get_token_type (m, token); + fprintf (output, "%s", s); + g_free (s); + ptr += 4; + break; + } + + case InlineVar: { + gint16 var_idx = *(gint16 *) ptr; + + fprintf (output, "variable-%d\n", var_idx); + ptr += 2; + break; + } + + case ShortInlineBrTarget: { + signed char x = *ptr; + + fprintf (output, "IL_%04x", ptr - start + 1 + x); + ptr++; + break; + } + + case ShortInlineI: { + char x = *ptr; + + fprintf (output, "0x%02x", x); + ptr++; + break; + } + + case ShortInlineR: { + float f = *(float *) ptr; + + fprintf (output, "%g", (double) f); + ptr += 4; + break; + } + + case ShortInlineVar: { + signed char x = *ptr; + + fprintf (output, "V_%d", (int) x); + ptr++; + break; + } + + } + + fprintf (output, "\n"); + } +} diff --git a/mono/dis/dis-cil.h b/mono/dis/dis-cil.h new file mode 100644 index 00000000000..7874d4e7ff1 --- /dev/null +++ b/mono/dis/dis-cil.h @@ -0,0 +1 @@ +void dissasemble_cil (metadata_t *m, const unsigned char *ptr, int size); diff --git a/mono/dis/dump.c b/mono/dis/dump.c new file mode 100644 index 00000000000..bd110dbbc25 --- /dev/null +++ b/mono/dis/dump.c @@ -0,0 +1,370 @@ +/* + * dump.c: Dumping routines for the disassembler. + * + * Author: + * Miguel de Icaza (miguel@ximian.com) + * + * (C) 2001 Ximian, Inc. + */ +#include <config.h> +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include "meta.h" +#include "util.h" +#include "dump.h" +#include "get.h" + +void +dump_table_assembly (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_ASSEMBLY]; + guint32 cols [9]; + const char *ptr; + int len; + + expand (t, 0, cols, CSIZE (cols)); + fprintf (output, "Assembly Table\n"); + + fprintf (output, "Name: %s\n", mono_metadata_string_heap (m, cols [7])); + fprintf (output, "Hash Algoritm: 0x%08x\n", cols [0]); + fprintf (output, "Version: %d.%d.%d.%d\n", cols [1], cols [2], cols [3], cols [4]); + fprintf (output, "Flags: 0x%08x\n", cols [5]); + fprintf (output, "PublicKey: BlobPtr (0x%08x)\n", cols [6]); + + ptr = mono_metadata_blob_heap (m, cols [6]); + ptr = get_encoded_value (ptr, &len); + if (len > 0){ + fprintf (output, "\tDump:"); + hex_dump (ptr, 0, len); + fprintf (output, "\n"); + } else + fprintf (output, "\tZero sized public key\n"); + + fprintf (output, "Culture: %s\n", mono_metadata_string_heap (m, cols [8])); + fprintf (output, "\n"); +} + +void +dump_table_typeref (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_TYPEREF]; + int i; + + fprintf (output, "Typeref Table\n"); + + for (i = 1; i <= t->rows; i++){ + char *s = get_typeref (m, i); + + fprintf (output, "%d: %s\n", i, s); + g_free (s); + } + fprintf (output, "\n"); +} + +void +dump_table_typedef (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_TYPEDEF]; + int i; + + fprintf (output, "Typedef Table\n"); + + for (i = 1; i <= t->rows; i++){ + char *s = get_typedef (m, i); + guint32 cols [6]; + + expand (&m->tables [META_TABLE_TYPEDEF], i - 1, cols, CSIZE (cols)); + + fprintf (output, "%d: %s (flist=%d, mlist=%d)\n", i, s, cols [4], cols [5]); + g_free (s); + } + fprintf (output, "\n"); +} + +void +dump_table_assemblyref (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_ASSEMBLYREF]; + int i; + + fprintf (output, "AssemblyRef Table\n"); + + for (i = 0; i < t->rows; i++){ + const char *ptr; + int len; + guint32 cols [9]; + + expand (t, i, cols, CSIZE (cols)); + fprintf (output, "%d: Version=%d.%d.%d.%d\n\tName=%s\n", i, + cols [0], cols [1], cols [2], cols [3], + mono_metadata_string_heap (m, cols [6])); + ptr = mono_metadata_blob_heap (m, cols [6]); + ptr = get_encoded_value (ptr, &len); + if (len > 0){ + fprintf (output, "\tPublic Key:"); + hex_dump (ptr, 0, len); + fprintf (output, "\n"); + } else + fprintf (output, "\tZero sized public key\n"); + + } + fprintf (output, "\n"); +} + +void +dump_table_param (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_PARAM]; + int i; + + fprintf (output, "Param Table\n"); + + for (i = 0; i < t->rows; i++){ + guint32 cols [3]; + + expand (t, i, cols, CSIZE (cols)); + fprintf (output, "%d: 0x%04x %d %s\n", + i, + cols [0], cols [1], + mono_metadata_string_heap (m, cols [2])); + } + fprintf (output, "\n"); +} + +void +dump_table_field (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_FIELD]; + int i; + + fprintf (output, "Field Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [3]; + char *sig, *flags; + + expand (t, i, cols, CSIZE (cols)); + sig = get_field_signature (m, cols [2]); + flags = field_flags (cols [0]); + fprintf (output, "%d: %s %s: %s\n", + i, + sig, + mono_metadata_string_heap (m, cols [1]), + flags); + g_free (sig); + g_free (flags); + } + fprintf (output, "\n"); +} + +void +dump_table_memberref (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_MEMBERREF]; + int i, kind, idx; + char *ks, *x, *xx; + + fprintf (output, "MemberRef Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [3]; + + expand (t, i, cols, CSIZE (cols)); + + kind = cols [0] & 7; + idx = cols [0] >> 3; + + x = g_strdup ("UNHANDLED CASE"); + + switch (kind){ + case 0: + ks = "TypeDef"; break; + case 1: + ks = "TypeRef"; + xx = get_typeref (m, idx); + x = g_strconcat (xx, ".", mono_metadata_string_heap (m, cols [1]), NULL); + g_free (xx); + break; + case 2: + ks = "ModuleRef"; break; + case 3: + ks = "MethodDef"; break; + case 4: + ks = "TypeSpec"; break; + default: + g_error ("Unknown tag: %d\n", kind); + } + + fprintf (output, "%d: %s[%d] %s\n\tResolved: %s\n\tSignature: %s\n\t\n", + i, + ks, idx, + mono_metadata_string_heap (m, cols [1]), + x ? x : "", + get_methodref_signature (m, cols [2], NULL)); + + if (x) + g_free (x); + } +} + +void +dump_table_class_layout (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_CLASSLAYOUT]; + int i; + fprintf (output, "ClassLayout Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [3]; + + expand (t, i, cols, CSIZE (cols)); + + fprintf (output, "%d: PackingSize=%d ClassSize=%d Parent=%s\n", + i, cols [0], cols [1], get_typedef (m, cols [2])); + } +} + +void +dump_table_constant (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_CONSTANT]; + int i; + fprintf (output, "Constant Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [4]; + + expand (t, i, cols, CSIZE (cols)); + + fprintf (output, "%d: Parent=0x%08x %s\n", + i, cols [2], get_constant (m, (ElementTypeEnum) cols [0], cols [3])); + } + +} + +void +dump_table_property (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_PROPERTY]; + int i, j, pcount; + const char *ptr; + char flags[128]; + + fprintf (output, "Property Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [3]; + char *type; + int bsize; + + expand (t, i, cols, CSIZE (cols)); + flags [0] = 0; + if (cols [0] & 0x0200) + strcat (flags, "special "); + if (cols [0] & 0x0400) + strcat (flags, "runtime "); + if (cols [0] & 0x1000) + strcat (flags, "hasdefault "); + + ptr = mono_metadata_blob_heap (m, cols [2]); + ptr = get_blob_encoded_size (ptr, &bsize); + /* ECMA claims 0x08 ... */ + if (*ptr != 0x28 && *ptr != 0x08) + g_warning("incorrect signature in propert blob: 0x%x", *ptr); + ptr++; + ptr = get_encoded_value (ptr, &pcount); + ptr = get_type (m, ptr, &type); + fprintf (output, "%d: %s %s (", + i, type, mono_metadata_string_heap (m, cols [1])); + g_free (type); + + for (j = 0; j < pcount; j++){ + ptr = get_param (m, ptr, &type); + fprintf (output, "%s%s", j > 0? ", " : "",type); + g_free (type); + } + fprintf (output, ") %s\n", flags); + } +} + +void +dump_table_event (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_EVENT]; + int i; + fprintf (output, "Event Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [3]; + const char *name; + char *type; + + expand (t, i, cols, CSIZE (cols)); + + name = mono_metadata_string_heap (m, cols [1]); + type = get_typedef_or_ref (m, cols [2]); + fprintf (output, "%d: %s %s %s\n", i, type, name, + cols [0] & 0x200 ? "specialname " : ""); + g_free (type); + } + +} + +void +dump_table_file (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_FILE]; + int i; + fprintf (output, "File Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [3]; + const char *name; + + expand (t, i, cols, CSIZE (cols)); + + name = mono_metadata_string_heap (m, cols[1]); + fprintf (output, "%d: %s %s\n", i, name, cols[2]&0x1?"nometadata":"containsmetadata"); + } + +} + +void +dump_table_moduleref (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_MODULEREF]; + int i; + fprintf (output, "ModuleRef Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [1]; + const char *name; + + expand (t, i, cols, CSIZE (cols)); + + name = mono_metadata_string_heap (m, cols[0]); + fprintf (output, "%d: %s\n", i, name); + } + +} + +void +dump_table_method (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_METHOD]; + int i; + fprintf (output, "Method Table (0..%d)\n", t->rows); + + for (i = 0; i < t->rows; i++){ + guint32 cols [6]; + const char *name; + + expand (t, i, cols, CSIZE (cols)); + + name = mono_metadata_string_heap (m, cols[3]); + fprintf (output, "%d: %s\n", i, name); + } + +} + diff --git a/mono/dis/dump.h b/mono/dis/dump.h new file mode 100644 index 00000000000..8f37c994113 --- /dev/null +++ b/mono/dis/dump.h @@ -0,0 +1,16 @@ +extern FILE *output; + +void dump_table_assembly (metadata_t *m); +void dump_table_assemblyref (metadata_t *m); +void dump_table_class_layout (metadata_t *m); +void dump_table_constant (metadata_t *m); +void dump_table_property (metadata_t *m); +void dump_table_event (metadata_t *m); +void dump_table_file (metadata_t *m); +void dump_table_moduleref (metadata_t *m); +void dump_table_method (metadata_t *m); +void dump_table_field (metadata_t *m); +void dump_table_memberref (metadata_t *m); +void dump_table_param (metadata_t *m); +void dump_table_typedef (metadata_t *m); +void dump_table_typeref (metadata_t *m); diff --git a/mono/dis/get.c b/mono/dis/get.c new file mode 100644 index 00000000000..64ed0bca3bd --- /dev/null +++ b/mono/dis/get.c @@ -0,0 +1,1156 @@ +/* + * get.c: Functions to get stringified values from the metadata tables. + * + * Author: + * Miguel de Icaza (miguel@ximian.com) + * + * (C) 2001 Ximian, Inc. + */ +#include <config.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <glib.h> +#include "meta.h" +#include "util.h" +#include "get.h" + +/** + * expand: + * @t: table to extract information from. + * @idx: index in table. + * @res: array of @res_size cols to store the results in + * + * This decompresses the metadata element @idx in table @t + * into the guint32 @res array that has res_size elements + */ +void +expand (metadata_tableinfo_t *t, int idx, guint32 *res, int res_size) + +{ + guint32 bitfield = t->size_bitfield; + int i, count = meta_table_count (bitfield); + char *data = t->base + idx * t->row_size; + + g_assert (res_size == count); + + for (i = 0; i < count; i++){ + int n = meta_table_size (bitfield, i); + + switch (n){ + case 1: + res [i] = *data; break; + case 2: + res [i] = read16 (data); break; + + case 4: + res [i] = read32 (data); break; + + default: + g_assert_not_reached (); + } + data += n; + } +} + +/** + * get_encoded_value: + * @ptr: pointer to decode from + * @len: result value is stored here. + * + * This routine decompresses 32-bit values as specified in the "Blob and + * Signature" section (22.2) + * + * Returns: updated pointer location + */ +const char * +get_encoded_value (const char *_ptr, guint32 *len) +{ + const unsigned char *ptr = (unsigned char *) _ptr; + unsigned char b = *ptr; + + if ((b & 0x80) == 0){ + *len = b; + return ptr+1; + } else if ((b & 0x40) == 0){ + *len = ((b & 0x3f) << 8 | ptr [1]); + return ptr + 2; + } + *len = ((b & 0x1f) << 24) | + (ptr [1] << 16) | + (ptr [2] << 8) | + ptr [3]; + + return ptr + 4; +} + +char * +get_typedef (metadata_t *m, int idx) +{ + guint32 cols [6]; + + expand (&m->tables [META_TABLE_TYPEDEF], idx - 1, cols, CSIZE (cols)); + + return g_strdup_printf ( + "%s.%s", + mono_metadata_string_heap (m, cols [2]), + mono_metadata_string_heap (m, cols [1])); +} + +char * +get_module (metadata_t *m, int idx) +{ + guint32 cols [5]; + + /* + * There MUST BE only one module in the Module table + */ + g_assert (idx == 1); + + expand (&m->tables [META_TABLE_MODULEREF], idx - 1, cols, CSIZE (cols)); + + return g_strdup (mono_metadata_string_heap (m, cols [6])); +} + +char * +get_assemblyref (metadata_t *m, int idx) +{ + guint32 cols [9]; + + expand (&m->tables [META_TABLE_ASSEMBLYREF], idx - 1, cols, CSIZE (cols)); + + return g_strdup (mono_metadata_string_heap (m, cols [6])); +} + +/* + * + * Returns a string representing the ArrayShape (22.2.16). + */ +static const char * +get_array_shape (metadata_t *m, const char *ptr, char **result) +{ + GString *res = g_string_new ("["); + guint32 rank, num_sizes, num_lo_bounds; + guint32 *sizes = NULL, *lo_bounds = NULL; + int i, r; + char buffer [80]; + + ptr = get_encoded_value (ptr, &rank); + ptr = get_encoded_value (ptr, &num_sizes); + + if (num_sizes > 0) + sizes = g_new (guint32, num_sizes); + + for (i = 0; i < num_sizes; i++) + ptr = get_encoded_value (ptr, &(sizes [i])); + + ptr = get_encoded_value (ptr, &num_lo_bounds); + if (num_lo_bounds > 0) + lo_bounds = g_new (guint32, num_lo_bounds); + + for (i = 0; i < num_lo_bounds; i++) + ptr = get_encoded_value (ptr, &(lo_bounds [i])); + + for (r = 0; r < rank; r++){ + if (r < num_sizes){ + if (r < num_lo_bounds){ + sprintf (buffer, "%d..%d", lo_bounds [r], lo_bounds [r] + sizes [r] - 1); + } else { + sprintf (buffer, "0..%d", sizes [r] - 1); + } + } else + buffer [0] = 0; + + g_string_append (res, buffer); + if ((r + 1) != rank) + g_string_append (res, ", "); + } + g_string_append (res, "]"); + + if (sizes) + g_free (sizes); + + if (lo_bounds) + g_free (lo_bounds); + + *result = res->str; + g_string_free (res, FALSE); + + return ptr; +} + +/** + * get_typespec: + * @m: metadata context + * @blob_idx: index into the blob heap + * + * Returns the stringified representation of a TypeSpec signature (22.2.17) + */ +char * +get_typespec (metadata_t *m, guint32 idx) +{ + guint32 cols [1]; + const char *ptr; + char *s, *result; + GString *res = g_string_new (""); + int len; + + expand (&m->tables [META_TABLE_TYPESPEC], idx-1, cols, CSIZE (cols)); + ptr = mono_metadata_blob_heap (m, cols [0]); + ptr = get_encoded_value (ptr, &len); + + switch (*ptr++){ + case ELEMENT_TYPE_PTR: + ptr = get_custom_mod (m, ptr, &s); + if (s){ + g_string_append (res, s); + g_string_append_c (res, ' '); + g_free (s); + } + + if (*ptr == ELEMENT_TYPE_VOID) + g_string_append (res, "void"); + else { + ptr = get_type (m, ptr, &s); + if (s) + g_string_append (res, s); + } + break; + + case ELEMENT_TYPE_FNPTR: + g_string_append (res, "FNPTR "); + /* + * we assume MethodRefSig, as we do not know + * whether it is a MethodDefSig or a MethodRefSig. + */ + printf ("\n FNPTR:\n"); + + hex_dump (ptr, 0, 40); + break; + + case ELEMENT_TYPE_ARRAY: + ptr = get_type (m, ptr, &s); + g_string_append (res, s); + g_free (s); + g_string_append_c (res, ' '); + ptr = get_array_shape (m, ptr, &s); + g_string_append (res, s); + g_free (s); + break; + + case ELEMENT_TYPE_SZARRAY: + ptr = get_custom_mod (m, ptr, &s); + if (s){ + g_string_append (res, s); + g_string_append_c (res, ' '); + g_free (s); + } + ptr = get_type (m, ptr, &s); + g_string_append (res, s); + g_string_append (res, "[]"); + g_free (s); + } + + result = res->str; + g_string_free (res, FALSE); + + return result; +} + +char * +get_typeref (metadata_t *m, int idx) +{ + guint32 cols [3]; + const char *s, *t; + char *x, *ret; + guint32 rs_idx, table; + + expand (&m->tables [META_TABLE_TYPEREF], idx - 1, cols, CSIZE (cols)); + + t = mono_metadata_string_heap (m, cols [1]); + s = mono_metadata_string_heap (m, cols [2]); + + rs_idx = cols [0] >> 2; + /* + * Two bits in Beta2. + * ECMA spec claims 3 bits + */ + table = cols [0] & 3; + + switch (table){ + case 0: /* Module */ + x = get_module (m, rs_idx); + ret = g_strdup_printf ("TODO:TypeRef-Module [%s] %s.%s", x, s, t); + g_free (x); + break; + + case 1: /* ModuleRef */ + ret = g_strdup_printf ("TODO:TypeRef-ModuleRef (%s.%s)", s, t); + break; + + case 2: /* + * AssemblyRef (ECMA docs claim it is 3, but it looks to + * me like it is 2 (tokens are prefixed with 0x23) + */ + x = get_assemblyref (m, rs_idx); + ret = g_strdup_printf ("[%s] %s.%s", x, s, t); + g_free (x); + break; + + case 4: /* TypeRef */ + ret = g_strdup_printf ("TODO:TypeRef-TypeRef: TYPEREF! (%s.%s)", s, t); + break; + + default: + ret = g_strdup_printf ("Unknown table in TypeRef %d", table); + } + + return ret; +} + +/** + * get_typedef_or_ref: + * @m: metadata context + * @dor_token: def or ref encoded index + * + * Low two bits contain table to lookup from + * high bits contain the index into the def or ref table + * + * Returns: a stringified version of the MethodDef or MethodRef + * at (dor_token >> 2) + */ +char * +get_typedef_or_ref (metadata_t *m, guint32 dor_token) +{ + char *temp = NULL, *s; + int table, idx; + + /* + * low 2 bits contain encoding + */ + table = dor_token & 0x03; + idx = dor_token >> 2; + + switch (table){ + case 0: /* TypeDef */ + temp = get_typedef (m, idx); + s = g_strdup_printf ("%s", temp); + break; + + case 1: /* TypeRef */ + temp = get_typeref (m, idx); + s = g_strdup_printf ("%s", temp); + break; + + case 2: /* TypeSpec */ + s = get_typespec (m, idx); + break; + + default: + g_error ("Unhandled encoding for typedef-or-ref coded index"); + + } + + if (temp) + g_free (temp); + + return s; +} + +/** + * get_encoded_typedef_or_ref: + * @m: metadata context + * @ptr: location to decode from. + * @result: pointer to string where resulting decoded string is stored + * + * result will point to a g_malloc()ed string. + * + * Returns: the new ptr to continue decoding + */ +const char * +get_encoded_typedef_or_ref (metadata_t *m, const char *ptr, char **result) +{ + guint32 token; + + ptr = get_encoded_value (ptr, &token); + + *result = get_typedef_or_ref (m, token); + + return ptr; +} + +/** + * get_custom_mod: + * + * Decodes a CustomMod (22.2.7) + * + * Returns: updated pointer location + */ +const char * +get_custom_mod (metadata_t *m, const char *ptr, char **return_value) +{ + char *s; + + if ((*ptr == ELEMENT_TYPE_CMOD_OPT) || + (*ptr == ELEMENT_TYPE_CMOD_REQD)){ + ptr++; + ptr = get_encoded_typedef_or_ref (m, ptr, &s); + + *return_value = g_strconcat ("CMOD ", s, NULL); + g_free (s); + } else + *return_value = NULL; + return ptr; +} + + +/** + * methoddefref_signature: + * @m: metadata context + * @ptr: location to decode from. + * @result: pointer to string where resulting decoded string is stored + * + * This routine decodes into a string a MethodDef or a MethodRef. + * + * result will point to a g_malloc()ed string. + * + * Returns: the new ptr to continue decoding + */ +static const char * +methoddefref_signature (metadata_t *m, const char *ptr, char **result) +{ + *result = g_strdup ("method-def-or-ref"); + + return ptr; +} + +static map_t element_type_map [] = { + { ELEMENT_TYPE_END , "end" }, + { ELEMENT_TYPE_VOID , "void" }, + { ELEMENT_TYPE_BOOLEAN , "bool" }, + { ELEMENT_TYPE_CHAR , "char" }, + { ELEMENT_TYPE_I1 , "sbyte" }, + { ELEMENT_TYPE_U1 , "byte" }, + { ELEMENT_TYPE_I2 , "int16" }, + { ELEMENT_TYPE_U2 , "uint16" }, + { ELEMENT_TYPE_I4 , "int32" }, + { ELEMENT_TYPE_U4 , "uint32" }, + { ELEMENT_TYPE_I8 , "int64" }, + { ELEMENT_TYPE_U8 , "uint64" }, + { ELEMENT_TYPE_R4 , "float32" }, + { ELEMENT_TYPE_R8 , "float64" }, + { ELEMENT_TYPE_STRING , "string" }, + { ELEMENT_TYPE_TYPEDBYREF , "TypedByRef" }, + { ELEMENT_TYPE_I , "native int" }, + { ELEMENT_TYPE_U , "native unsigned int" }, + { ELEMENT_TYPE_OBJECT , "object" }, + { 0, NULL } +}; + +/** + * get_type: + * @m: metadata context + * @ptr: location to decode from. + * @result: pointer to string where resulting decoded string is stored + * + * This routine returs in @result the stringified type pointed by @ptr. + * (22.2.12) + * + * Returns: the new ptr to continue decoding + */ +const char * +get_type (metadata_t *m, const char *ptr, char **result) +{ + char c; + + c = *ptr++; + + switch (c){ + case ELEMENT_TYPE_BOOLEAN: + case ELEMENT_TYPE_CHAR: + case ELEMENT_TYPE_I1: + case ELEMENT_TYPE_U1: + case ELEMENT_TYPE_I2: + case ELEMENT_TYPE_U2: + case ELEMENT_TYPE_I4: + case ELEMENT_TYPE_U4: + case ELEMENT_TYPE_I8: + case ELEMENT_TYPE_U8: + case ELEMENT_TYPE_R4: + case ELEMENT_TYPE_R8: + case ELEMENT_TYPE_I: + case ELEMENT_TYPE_STRING: + case ELEMENT_TYPE_OBJECT: + *result = g_strdup (map (c, element_type_map)); + break; + + case ELEMENT_TYPE_VALUETYPE: + case ELEMENT_TYPE_CLASS: + ptr = get_encoded_typedef_or_ref (m, ptr, result); + break; + + case ELEMENT_TYPE_FNPTR: + ptr = methoddefref_signature (m, ptr, result); + break; + + case ELEMENT_TYPE_SZARRAY: { + char *child_type; + + ptr = get_type (m, ptr, &child_type); + *result = g_strdup_printf ("%s[]", child_type); + g_free (child_type); + break; + } + + case ELEMENT_TYPE_ARRAY: + + *result = g_strdup ("ARRAY:TODO"); + } + + return ptr; +} + +/** + * + * Returns a stringified representation of a FieldSig (22.2.4) + */ +char * +get_field_signature (metadata_t *m, guint32 blob_signature) +{ + char *allocated_modifier_string, *allocated_type_string; + const char *ptr = mono_metadata_blob_heap (m, blob_signature); + const char *base; + char *res; + int len; + + ptr = get_encoded_value (ptr, &len); + base = ptr; + /* FIELD is 0x06 */ + g_assert (*ptr == 0x06); +/* hex_dump (ptr, 0, len); */ + ptr++; len--; + + ptr = get_custom_mod (m, ptr, &allocated_modifier_string); + ptr = get_type (m, ptr, &allocated_type_string); + + res = g_strdup_printf ( + "%s %s", + allocated_modifier_string ? allocated_modifier_string : "", + allocated_type_string); + + if (allocated_modifier_string) + g_free (allocated_modifier_string); + if (allocated_type_string) + g_free (allocated_modifier_string); + + return res; +} + +ElementTypeEnum +get_field_literal_type (metadata_t *m, guint32 blob_signature) +{ + const char *ptr = mono_metadata_blob_heap (m, blob_signature); + int len; + char *allocated_modifier_string; + + ptr = get_encoded_value (ptr, &len); + + /* FIELD is 0x06 */ + g_assert (*ptr == 0x06); + ptr++; len--; + + ptr = get_custom_mod (m, ptr, &allocated_modifier_string); + if (allocated_modifier_string) + g_free (allocated_modifier_string); + + return (ElementTypeEnum) *ptr; + +} + +/** + * decode_literal: + * @m: metadata context + * @token: token to decode + * + * decodes the literal indexed by @token. + */ +char * +decode_literal (metadata_t *m, guint32 token) +{ + return g_strdup ("LITERAL_VALUE"); +} + +/** + * get_ret_type: + * @m: metadata context + * @ptr: location to decode from. + * @result: pointer to string where resulting decoded string is stored + * + * This routine returns in @result the stringified RetType (22.2.11) + * + * Returns: the new ptr to continue decoding. + */ +const char * +get_ret_type (metadata_t *m, const char *ptr, char **ret_type) +{ + GString *str = g_string_new (""); + char *mod = NULL; + char *allocated_type_string; + + ptr = get_custom_mod (m, ptr, &mod); + if (mod){ + g_string_append (str, mod); + g_string_append_c (str, ' '); + g_free (mod); + } + + if (*ptr == ELEMENT_TYPE_TYPEDBYREF){ + /* TODO: what does `typedbyref' mean? */ + g_string_append (str, "/* FIXME: What does this mean? */ typedbyref "); + ptr++; + } else if (*ptr == ELEMENT_TYPE_VOID){ + g_string_append (str, "void"); + ptr++; + } else { + if (*ptr == ELEMENT_TYPE_BYREF){ + g_string_append (str, "[out] "); + ptr++; + } + + ptr = get_type (m, ptr, &allocated_type_string); + g_string_append (str, allocated_type_string); + g_free (allocated_type_string); + } + + *ret_type = str->str; + g_string_free (str, FALSE); + + return ptr; +} + +/** + * get_param: + * @m: metadata context + * @ptr: location to decode from. + * @result: pointer to string where resulting decoded string is stored + * + * This routine returns in @result the stringified Param (22.2.10) + * + * Returns: the new ptr to continue decoding. + */ +const char * +get_param (metadata_t *m, const char *ptr, char **retval) +{ + GString *str = g_string_new (""); + char *allocated_mod_string, *allocated_type_string; + + ptr = get_custom_mod (m, ptr, &allocated_mod_string); + if (allocated_mod_string){ + g_string_append (str, allocated_mod_string); + g_string_append_c (str, ' '); + g_free (allocated_mod_string); + } + + if (*ptr == ELEMENT_TYPE_TYPEDBYREF){ + g_string_append (str, "/*FIXME: what does typedbyref mean? */ typedbyref "); + ptr++; + } else { + if (*ptr == ELEMENT_TYPE_BYREF){ + g_string_append (str, "[out] "); + ptr++; + } + ptr = get_type (m, ptr, &allocated_type_string); + g_string_append (str, allocated_type_string); + g_free (allocated_type_string); + } + + *retval = str->str; + g_string_free (str, FALSE); + return ptr; +} + +static map_t param_map [] = { + { PARAM_ATTRIBUTE_IN, "[in] " }, + { PARAM_ATTRIBUTE_OUT, "[out] " }, + { PARAM_ATTRIBUTE_OPTIONAL, "optional " }, + { PARAM_ATTRIBUTE_HAS_DEFAULT, "hasdefault " }, + { PARAM_ATTRIBUTE_HAS_FIELD_MARSHAL, "fieldmarshal " }, + { 0, NULL } +}; + +char * +param_flags (guint32 f) +{ + return g_strdup (flags (f, param_map)); +} + +static map_t field_access_map [] = { + { FIELD_ATTRIBUTE_COMPILER_CONTROLLED, "compilercontrolled " }, + { FIELD_ATTRIBUTE_PRIVATE, "private " }, + { FIELD_ATTRIBUTE_FAM_AND_ASSEM, "famandassem " }, + { FIELD_ATTRIBUTE_ASSEMBLY, "assembly " }, + { FIELD_ATTRIBUTE_FAMILY, "family " }, + { FIELD_ATTRIBUTE_FAM_OR_ASSEM, "famorassem " }, + { FIELD_ATTRIBUTE_PUBLIC, "public " }, + { 0, NULL } +}; + +static map_t field_flags_map [] = { + { FIELD_ATTRIBUTE_STATIC, "static " }, + { FIELD_ATTRIBUTE_INIT_ONLY, "initonly " }, + { FIELD_ATTRIBUTE_LITERAL, "literal " }, + { FIELD_ATTRIBUTE_NOT_SERIALIZED, "notserialized " }, + { FIELD_ATTRIBUTE_SPECIAL_NAME, "specialname " }, + { FIELD_ATTRIBUTE_PINVOKE_IMPL, "FIXME:pinvokeimpl " }, + { 0, NULL } +}; + +/** + * field_flags: + * + * Returns a stringified version of a Field's flags + */ +char * +field_flags (guint32 f) +{ + static char buffer [1024]; + int access = f & FIELD_ATTRIBUTE_FIELD_ACCESS_MASK; + + buffer [0] = 0; + + strcat (buffer, map (access, field_access_map)); + strcat (buffer, flags (f, field_flags_map)); + return g_strdup (buffer); +} + +/** + * get_blob_encoded_size: + * @ptr: pointer to a blob object + * @size: where we return the size of the object + * + * This decodes a compressed size as described by 23.1.4 + * + * Returns: the position to start decoding a blob or user string object + * from. + */ +const char * +get_blob_encoded_size (const char *xptr, int *size) +{ + const unsigned char *ptr = xptr; + + if ((*ptr & 0x80) == 0){ + *size = ptr [0] & 0x7f; + ptr++; + } else if ((*ptr & 0x40) == 0){ + *size = ((ptr [0] & 0x3f) << 8) + ptr [1]; + ptr += 2; + } else { + *size = ((ptr [0] & 0x1f) << 24) + + (ptr [1] << 16) + + (ptr [2] << 8) + + ptr [3]; + ptr += 4; + } + + return (char *) ptr; +} + +/** + * Returns a stringifed representation of a MethodRefSig (22.2.2) + */ +char * +get_methodref_signature (metadata_t *m, guint32 blob_signature, const char *fancy_name) +{ + GString *res = g_string_new (""); + const char *ptr = mono_metadata_blob_heap (m, blob_signature); + char *allocated_ret_type, *s; + gboolean seen_vararg = 0; + int param_count, signature_len; + int i; + + ptr = get_encoded_value (ptr, &signature_len); + + if (*ptr & 0x20){ + if (*ptr & 0x40) + g_string_append (res, "explicit-this "); + else + g_string_append (res, "instance "); /* has-this */ + } + + if (*ptr & 0x05) + seen_vararg = 1; + + ptr++; + ptr = get_encoded_value (ptr, ¶m_count); + ptr = get_ret_type (m, ptr, &allocated_ret_type); + + g_string_append (res, allocated_ret_type); + + if (fancy_name){ + g_string_append_c (res, ' '); + g_string_append (res, fancy_name); + } + + g_string_append (res, " ("); + + /* + * param_count describes parameters *before* and *after* + * the vararg sentinel + */ + for (i = 0; i < param_count; i++){ + char *param = NULL; + + /* + * If ptr is a SENTINEL + */ + if (*ptr == 0x41){ + g_string_append (res, " varargs "); + continue; + } + + ptr = get_param (m, ptr, ¶m); + g_string_append (res, param); + if (i+1 != param_count) + g_string_append (res, ", "); + g_free (param); + } + g_string_append (res, ")"); + + /* + * cleanup and return + */ + g_free (allocated_ret_type); + s = res->str; + g_string_free (res, FALSE); + return s; +} + +/* + * We use this to pass context information to the typedef locator + */ +typedef struct { + int idx; /* The field index that we are trying to locate */ + metadata_t *m; /* the metadata context */ + metadata_tableinfo_t *t; /* pointer to the typedef table */ + guint32 result; +} locator_t; + +static int +typedef_locator (const void *a, const void *b) +{ + locator_t *loc = (locator_t *) a; + char *bb = (char *) b; + int typedef_index = (bb - loc->t->base) / loc->t->row_size; + guint32 cols [6], cols_next [6]; + + expand (loc->t, typedef_index, cols, CSIZE (cols)); + expand (loc->t, typedef_index + 1, cols_next, CSIZE (cols_next)); + + if (loc->idx < cols [4]) + return -1; + + if (loc->idx >= cols_next [4]) + return 1; + + if (cols [5] == cols_next [4]) + return 1; + + loc->result = typedef_index; + + return 0; +} + +/** + * get_field: + * @m: metadata context + * @token: a FIELD_DEF token + * + * This routine has to locate the TypeDef that "owns" this Field. + * Since there is no backpointer in the Field table, we have to scan + * the TypeDef table and locate the actual "owner" of the field + */ +char * +get_field (metadata_t *m, guint32 token) +{ + int idx = mono_metadata_token_index (token); + metadata_tableinfo_t *tdef = &m->tables [META_TABLE_TYPEDEF]; + guint32 cols [3]; + char *sig, *res, *type; + locator_t loc; + + g_assert (mono_metadata_token_code (token) == TOKEN_TYPE_FIELD_DEF); + + expand (&m->tables [META_TABLE_FIELD], idx - 1, cols, CSIZE (cols)); + sig = get_field_signature (m, cols [2]); + + /* + * To locate the actual "container" for this field, we have to scan + * the TypeDef table. LAME! + */ + loc.idx = idx; + loc.m = m; + loc.t = tdef; + + if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, typedef_locator)) + g_assert_not_reached (); + + /* loc_result is 0..1, needs to be mapped to table index (that is +1) */ + type = get_typedef (m, loc.result + 1); + res = g_strdup_printf ("%s %s %s", + sig, type, + mono_metadata_string_heap (m, cols [1])); + g_free (type); + g_free (sig); + + return res; +} + +static char * +get_memberref_parent (metadata_t *m, guint32 mrp_token) +{ + /* + * mrp_index is a MemberRefParent coded index + */ + guint32 table = mrp_token & 7; + guint32 idx = mrp_token >> 3; + + switch (table){ + case 0: /* TypeDef */ + return get_typedef (m, idx); + + case 1: /* TypeRef */ + return get_typeref (m, idx); + + case 2: /* ModuleRef */ + return g_strdup_printf ("TODO:MemberRefParent-ModuleRef"); + + case 3: /* MethodDef */ + return g_strdup ("TODO:MethodDef"); + + case 4: /* TypeSpec */ + return get_typespec (m, idx); + } + g_assert_not_reached (); + return NULL; +} + +/** + * get_method: + * @m: metadata context + * @token: a METHOD_DEF or MEMBER_REF token + * + * This routine has to locate the TypeDef that "owns" this Field. + * Since there is no backpointer in the Field table, we have to scan + * the TypeDef table and locate the actual "owner" of the field + */ +char * +get_method (metadata_t *m, guint32 token) +{ + int idx = mono_metadata_token_index (token); + guint32 member_cols [3]; + char *res, *class, *fancy_name; + + switch (mono_metadata_token_code (token)){ + case TOKEN_TYPE_METHOD_DEF: + return g_strdup_printf ("TODO:MethodDef call [%x]", token); + + case TOKEN_TYPE_MEMBER_REF: { + char *sig; + + expand (&m->tables [META_TABLE_MEMBERREF], idx - 1, member_cols, CSIZE (member_cols)); + class = get_memberref_parent (m, member_cols [0]); + fancy_name = g_strconcat (class, "::", + mono_metadata_string_heap (m, member_cols [1]), + NULL); + + sig = get_methodref_signature ( + m, member_cols [2], fancy_name); + res = g_strdup_printf ("%s", sig); + g_free (sig); + + return res; + } + + default: + g_assert_not_reached (); + } + g_assert_not_reached (); + return NULL; +} + +/** + * get_constant: + * @m: metadata context + * @blob_index: index into the blob where the constant is stored + * + * Returns: An allocated value representing a stringified version of the + * constant. + */ +char * +get_constant (metadata_t *m, ElementTypeEnum t, guint32 blob_index) +{ + const char *ptr = mono_metadata_blob_heap (m, blob_index); + int len; + + ptr = get_encoded_value (ptr, &len); + + switch (t){ + case ELEMENT_TYPE_BOOLEAN: + return g_strdup_printf ("%s", *ptr ? "true" : "false"); + + case ELEMENT_TYPE_CHAR: + return g_strdup_printf ("%c", *ptr); + + case ELEMENT_TYPE_U1: + return g_strdup_printf ("0x%02x", (int) (*ptr)); + break; + + case ELEMENT_TYPE_I2: + return g_strdup_printf ("%d", (int) (*(gint16 *) ptr)); + + case ELEMENT_TYPE_I4: + return g_strdup_printf ("%d", *(gint32 *) ptr); + + case ELEMENT_TYPE_I8: + /* + * FIXME: This is not endian portable, does only + * matter for debugging, but still. + */ + return g_strdup_printf ("0x%08x%08x", *(guint32 *) ptr, *(guint32 *) (ptr + 4)); + + case ELEMENT_TYPE_U8: + return g_strdup_printf ("0x%08x%08x", *(guint32 *) ptr, *(guint32 *) (ptr + 4)); + case ELEMENT_TYPE_R4: + return g_strdup_printf ("%g", (double) (* (float *) ptr)); + + case ELEMENT_TYPE_R8: + return g_strdup_printf ("%g", * (double *) ptr); + + case ELEMENT_TYPE_STRING: { + int len, i, j, e; + char *res; + e = len = 0; + for (i = 0; !ptr [i+1]; i += 2){ + len++; + switch (ptr [i]) { + case '"': + case '\\': + case '\n': /* add more */ + e++; + } + } + res = g_malloc (len + e + 3); + j = 1; + res [0] = '"'; + + for (i = 0; i < len; i += 2){ + switch(ptr[i]) { + case '"': + res[j++] = '\\'; + res[j++] = '"'; + case '\\': + res[j++] = '\\'; + res[j++] = '\\'; + case '\n': + res[j++] = '\\'; + res[j++] = 'n'; + break; + default: + res[j++] = isprint (ptr [i]) ? ptr [i] : '.'; + break; + } + } + res[j++] = '"'; + res[j] = 0; + return res; + } + + case ELEMENT_TYPE_CLASS: + return g_strdup ("CLASS CONSTANT. MUST BE ZERO"); + + /* + * These are non CLS compliant: + */ + case ELEMENT_TYPE_I1: + return g_strdup_printf ("%d", (int) *ptr); + + case ELEMENT_TYPE_U2: + return g_strdup_printf ("0x%04x", (unsigned int) (*(guint16 *) ptr)); + + case ELEMENT_TYPE_U4: + return g_strdup_printf ("0x%04x", (unsigned int) (*(guint32 *) ptr)); + + default: + g_error ("Unknown ELEMENT_TYPE (%d) on constant at Blob index (0x%08x)\n", + (int) *ptr, blob_index); + return g_strdup_printf ("Unknown"); + } + +} + +/** + * get_token: + * @m: metadata context + * @token: token that we want to decode. + * + * Returns: An allocated value representing a stringified version of the + * constant. + */ +char * +get_token (metadata_t *m, guint32 token) +{ + switch (mono_metadata_token_code (token)){ + case TOKEN_TYPE_FIELD_DEF: + return (get_field (m, token)); + + default: + g_error ("Do not know how to decode tokens of type 0x%08x", token); + } + + g_assert_not_reached (); + return g_strdup ("ERROR"); +} + +/** + * get_token_type: + * @m: metadata context + * @token: the token can belong to any of the following tables: + * TOKEN_TYPE_TYPE_REF, TOKEN_TYPE_TYPE_DEF, TOKEN_TYPE_TYPE_SPEC + * + * Returns: a stringified version of the MethodDef or MethodRef or TypeSpecn + * at (token & 0xffffff) + */ +char * +get_token_type (metadata_t *m, guint32 token) +{ + char *temp = NULL, *s; + int idx; + + idx = mono_metadata_token_index (token); + + switch (mono_metadata_token_code (token)){ + case TOKEN_TYPE_TYPE_DEF: + temp = get_typedef (m, idx); + s = g_strdup_printf ("%s", temp); + break; + + case TOKEN_TYPE_TYPE_REF: + temp = get_typeref (m, idx); + s = g_strdup_printf ("%s", temp); + break; + + case TOKEN_TYPE_TYPE_SPEC: + s = get_typespec (m, idx); + break; + + default: + g_error ("Unhandled encoding for typedef-or-ref coded index"); + + } + + if (temp) + g_free (temp); + + return s; +} diff --git a/mono/dis/get.h b/mono/dis/get.h new file mode 100644 index 00000000000..caa86c272ea --- /dev/null +++ b/mono/dis/get.h @@ -0,0 +1,49 @@ + +/* + * These return allocated strings + */ +char *get_typedef (metadata_t *m, int idx); +char *get_module (metadata_t *m, int idx); +char *get_assemblyref (metadata_t *m, int idx); +char *get_typeref (metadata_t *m, int idx); +char *get_typedef_or_ref (metadata_t *m, guint32 dor_token); +char *get_field_signature (metadata_t *m, guint32 blob_signature); +char *decode_literal (metadata_t *m, guint32 token); +char *get_field (metadata_t *m, guint32 token); +char *param_flags (guint32 f); +char *field_flags (guint32 f); +char *get_methodref_signature (metadata_t *m, guint32 blob_signature, const char *fancy); +char *get_constant (metadata_t *m, ElementTypeEnum t, guint32 blob_index); +char *get_token (metadata_t *m, guint32 token); +char *get_token_type (metadata_t *m, guint32 token); +char *get_typespec (metadata_t *m, guint32 blob_idx); +char *get_method (metadata_t *m, guint32 token); + + +/* + * These functions are used during the decoding of streams in the + * metadata heaps (a simple parsing). + * + * They return the `next' location to continue parsing from (ptr is + * the starting location). + * + * Results are returning in the pointer argument. + */ +const char *get_encoded_typedef_or_ref (metadata_t *m, const char *ptr, + char **result); +const char *get_encoded_value (const char *_ptr, + guint32 *len); +const char *get_custom_mod (metadata_t *m, const char *ptr, + char **return_value); +const char *get_type (metadata_t *m, const char *ptr, + char **result); +const char *get_ret_type (metadata_t *m, const char *ptr, + char **ret_type); +const char *get_param (metadata_t *m, const char *ptr, + char **retval); +const char *get_blob_encoded_size (const char *ptr, int *size); + +void expand (metadata_tableinfo_t *t, int idx, guint32 *res, int res_size); + + +ElementTypeEnum get_field_literal_type (metadata_t *m, guint32 blob_signature); diff --git a/mono/dis/main.c b/mono/dis/main.c index 49f9027c1e2..51458a77b8a 100644 --- a/mono/dis/main.c +++ b/mono/dis/main.c @@ -1,22 +1,34 @@ /* - * dis.c: Sample disassembler + * main.c: Sample disassembler * * Author: * Miguel de Icaza (miguel@ximian.com) * * (C) 2001 Ximian, Inc. + * + * TODO: + * Investigate how interface inheritance works and how it should be dumped. + * Structs are not being labeled as `valuetype' classes + * + * How are fields with literals mapped to constants? */ #include <config.h> #include <stdio.h> +#include <string.h> #include <glib.h> -#include <mono/metadata/assembly.h> -#include <mono/metadata/cil-coff.h> +#include "meta.h" +#include "util.h" +#include "dump.h" +#include "get.h" +#include "dis-cil.h" FILE *output; /* True if you want to get a dump of the header data */ gboolean dump_header_data_p = FALSE; +int dump_table = -1; + static void dump_header_data (MonoAssembly *ass) { @@ -29,26 +41,592 @@ dump_header_data (MonoAssembly *ass) } static void +dis_directive_assembly (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_ASSEMBLY]; + guint32 cols [9]; + + if (t->base == NULL) + return; + + expand (t, 0, cols, CSIZE (cols)); + + fprintf (output, + ".assembly %s\n" + "{\n" + " .hash algorithm 0x%08x\n" + " .ver %d.%d.%d.%d" + "%s %s" + "%s" + "\n" + "}\n", + mono_metadata_string_heap (m, cols [7]), + cols [0], + cols [1], cols [2], cols [3], cols [4], + cols [8] ? "\n .locale" : "", + cols [8] ? mono_metadata_string_heap (m, cols [8]) : "", + cols [6] ? "\n .publickey" : "" + ); +} + +static void +dis_directive_assemblyref (metadata_t *m) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_ASSEMBLYREF]; + guint32 cols [9]; + int i; + + if (t->base == NULL) + return; + + for (i = 0; i < t->rows; i++){ + expand (t, i, cols, CSIZE (cols)); + + fprintf (output, + ".assembly extern %s\n" + "{\n" + " .ver %d.%d.%d.%d\n" + "}\n", + mono_metadata_string_heap (m, cols [6]), + cols [0], cols [1], cols [2], cols [3] + ); + } +} + +static map_t visibility_map [] = { + { TYPE_ATTRIBUTE_NOT_PUBLIC, "private " }, + { TYPE_ATTRIBUTE_PUBLIC, "public " }, + { TYPE_ATTRIBUTE_NESTED_PUBLIC, "nested-public " }, + { TYPE_ATTRIBUTE_NESTED_PRIVATE, "nested-private " }, + { TYPE_ATTRIBUTE_NESTED_FAMILY, "family " }, + { TYPE_ATTRIBUTE_NESTED_ASSEMBLY, "nested-assembly" }, + { TYPE_ATTRIBUTE_NESTED_FAM_AND_ASSEM, "nested-fam-and-assembly" }, + { TYPE_ATTRIBUTE_NESTED_FAM_OR_ASSEM, "nested-fam-or-assembly" }, + { 0, NULL } +}; + +static map_t layout_map [] = { + { TYPE_ATTRIBUTE_AUTO_LAYOUT, "auto " }, + { TYPE_ATTRIBUTE_SEQUENTIAL_LAYOUT, "sequential " }, + { TYPE_ATTRIBUTE_EXPLICIT_LAYOUT, "explicit " }, + { 0, NULL } +}; + +static map_t format_map [] = { + { TYPE_ATTRIBUTE_ANSI_CLASS, "ansi " }, + { TYPE_ATTRIBUTE_UNICODE_CLASS, "unicode " }, + { TYPE_ATTRIBUTE_AUTO_CLASS, "auto " }, + { 0, NULL } +}; + +static char * +typedef_flags (guint32 flags) +{ + static char buffer [1024]; + int visibility = flags & TYPE_ATTRIBUTE_VISIBILITY_MASK; + int layout = flags & TYPE_ATTRIBUTE_LAYOUT_MASK; + int format = flags & TYPE_ATTRIBUTE_STRING_FORMAT_MASK; + + buffer [0] = 0; + + strcat (buffer, map (visibility, visibility_map)); + strcat (buffer, map (layout, layout_map)); + strcat (buffer, map (format, format_map)); + + if (flags & TYPE_ATTRIBUTE_ABSTRACT) + strcat (buffer, "abstract "); + if (flags & TYPE_ATTRIBUTE_SEALED) + strcat (buffer, "sealed "); + if (flags & TYPE_ATTRIBUTE_SPECIAL_NAME) + strcat (buffer, "special-name "); + if (flags & TYPE_ATTRIBUTE_IMPORT) + strcat (buffer, "import "); + if (flags & TYPE_ATTRIBUTE_SERIALIZABLE) + strcat (buffer, "serializable "); + if (flags & TYPE_ATTRIBUTE_BEFORE_FIELD_INIT) + strcat (buffer, "beforefieldinit "); + + return buffer; +} + +/** + * dis_field_list: + * @m: metadata context + * @start: starting index into the Field Table. + * @end: ending index into Field table. + * + * This routine displays all the decoded fields from @start to @end + */ +static void +dis_field_list (metadata_t *m, guint32 start, guint32 end) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_FIELD]; + guint32 cols [3]; + int i; + + if (end > t->rows + 1) { + g_warning ("ERROR index out of range in fields"); + end = t->rows; + } + + for (i = start; i < end; i++){ + char *sig, *flags; + + expand (t, i, cols, CSIZE (cols)); + sig = get_field_signature (m, cols [2]); + flags = field_flags (cols [0]); + + if (cols [0] & FIELD_ATTRIBUTE_LITERAL){ + ElementTypeEnum type; + char *lit; + + type = get_field_literal_type (m, cols [2]); + lit = g_strdup ("FIXME:Do-not-know-how-to-get-this-from-the-constants-table"); + /* get_constant (m, type, cols [2]); */ + + fprintf (output, " .field %s %s %s = ", + flags, sig, + mono_metadata_string_heap (m, cols [1])); + fprintf (output, "%s\n", lit); + g_free (lit); + } else + fprintf (output, " .field %s %s %s\n", + flags, sig, + mono_metadata_string_heap (m, cols [1])); + g_free (flags); + g_free (sig); + } +} + +static map_t method_access_map [] = { + { METHOD_ATTRIBUTE_COMPILER_CONTROLLED, "compilercontrolled " }, + { METHOD_ATTRIBUTE_PRIVATE, "private" }, + { METHOD_ATTRIBUTE_FAM_AND_ASSEM, "famandassem" }, + { METHOD_ATTRIBUTE_ASSEM, "assembly " }, + { METHOD_ATTRIBUTE_FAMILY, "family " }, + { METHOD_ATTRIBUTE_FAM_OR_ASSEM, "famorassem " }, + { METHOD_ATTRIBUTE_PUBLIC, "public " }, + { 0, NULL } +}; + +static map_t method_flags_map [] = { + { METHOD_ATTRIBUTE_STATIC, "static " }, + { METHOD_ATTRIBUTE_FINAL, "final " }, + { METHOD_ATTRIBUTE_VIRTUAL, "virtual " }, + { METHOD_ATTRIBUTE_HIDE_BY_SIG, "hidebysig " }, + { METHOD_ATTRIBUTE_VTABLE_LAYOUT_MASK, "newslot " }, + { METHOD_ATTRIBUTE_ABSTRACT, "abstract " }, + { METHOD_ATTRIBUTE_SPECIAL_NAME, "specialname " }, + { METHOD_ATTRIBUTE_RT_SPECIAL_NAME, "rtspecialname " }, + { METHOD_ATTRIBUTE_PINVOKE_IMPL, "pinvokeimpl " }, + { METHOD_ATTRIBUTE_UNMANAGED_EXPORT, "export " }, + { METHOD_ATTRIBUTE_HAS_SECURITY, "hassecurity" }, + { METHOD_ATTRIBUTE_REQUIRE_SEC_OBJECT, "requiresecobj" }, + { 0, NULL } +}; + +/** + * method_flags: + * + * Returns a stringified version of the Method's flags + */ +static char * +method_flags (guint32 f) +{ + GString *str = g_string_new (""); + int access = f & METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK; + char *s; + + g_string_append (str, map (access, method_access_map)); + g_string_append (str, flags (f, method_flags_map)); + + s = str->str; + g_string_free (str, FALSE); + + return s; +} + +static map_t method_impl_map [] = { + { METHOD_IMPL_ATTRIBUTE_IL, "cil " }, + { METHOD_IMPL_ATTRIBUTE_NATIVE, "native " }, + { METHOD_IMPL_ATTRIBUTE_OPTIL, "optil " }, + { METHOD_IMPL_ATTRIBUTE_RUNTIME, "runtime " }, + { 0, NULL } +}; + +static map_t managed_type_map [] = { + { METHOD_IMPL_ATTRIBUTE_UNMANAGED, "unmanaged " }, + { METHOD_IMPL_ATTRIBUTE_MANAGED, "managed " }, + { 0, NULL } +}; + +static map_t managed_impl_flags [] = { + { METHOD_IMPL_ATTRIBUTE_FORWARD_REF, "fwdref " }, + { METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG, "preservesig " }, + { METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL, "internalcall " }, + { METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED, "synchronized " }, + { METHOD_IMPL_ATTRIBUTE_NOINLINING, "noinline " }, + { 0, NULL } +}; + +static char * +method_impl_flags (guint32 f) +{ + GString *str = g_string_new (""); + char *s; + int code_type = f & METHOD_IMPL_ATTRIBUTE_CODE_TYPE_MASK; + int managed_type = f & METHOD_IMPL_ATTRIBUTE_MANAGED_MASK; + + g_string_append (str, map (code_type, method_impl_map)); + g_string_append (str, map (managed_type, managed_type_map)); + g_string_append (str, flags (f, managed_impl_flags)); + + s = str->str; + g_string_free (str, FALSE); + return s; +} + +static void +dis_locals (metadata_t *m, guint32 token) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_STANDALONESIG]; + const char *ptr; + guint32 cols[1]; + int len=0, i, bsize; + + expand (t, (token&0xffffff)-1, cols, CSIZE(cols)); + ptr = mono_metadata_blob_heap (m, cols[0]); + ptr = get_blob_encoded_size (ptr, &bsize); + if (*ptr != 0x07) + g_warning("wrong signature for locals blob"); + ptr++; + ptr = get_encoded_value (ptr, &len); + fprintf(output, "\t.locals ( // %d\n", len); + for (i=0; i < len; ++i) { + int val; + char * desc = NULL; + const char *p = ptr; + ptr = get_encoded_value (ptr, &val); + if (val == ELEMENT_TYPE_PINNED) { + fprintf(output, "//pinned\n"); + p = ptr; + ptr = get_encoded_value (ptr, &val); + } + if (val == ELEMENT_TYPE_BYREF) { + fprintf(output, "// byref\n"); + p = ptr; + } + ptr = get_type(m, p, &desc); + fprintf(output, "\t\t%s\tV_%d\n", desc, i); + g_free(desc); + } + fprintf(output, "\t)\n"); +} + +static void +dis_code (metadata_t *m, cli_image_info_t *ii, guint32 rva) +{ + MonoMetaMethodHeader *mh; + const char *ptr = cli_rva_map (ii, rva); + char *loc; + + if (rva == 0) + return; + + mh = mono_metadata_parse_mh (ptr); + loc = mono_metadata_locate_token (m, ii->cli_cli_header.ch_entry_point); + if (rva == read32(loc)) + fprintf (output, "\t.entrypoint\n"); + fprintf (output, "\t.maxstack %d\n", mh->max_stack); + fprintf (output, "\t// Code size=%d (0x%x)\n", mh->code_size, mh->code_size); + printf ("\t// Values Code Size=%d/0x%x\n\t// LocalTok=%x\n\n", + mh->code_size, mh->code_size, mh->local_var_sig_tok); + if (mh->local_var_sig_tok) + dis_locals (m, mh->local_var_sig_tok); + dissasemble_cil (m, mh->code, mh->code_size); + +/* + hex_dump (mh->code, 0, mh->code_size); + printf ("\nAfter the code\n"); + hex_dump (mh->code + mh->code_size, 0, 64); +*/ + mono_metadata_free_mh (mh); +} + +typedef struct { + char flags; + char *ret_type; + int param_count; + char **param; +} MethodSignature; + +/** + * parse_method_signature: + * @m: metadata context + * @blob_signature: pointer to the signature in the Blob heap + * + * 22.2.1: MethodDefSig. + * + * Returns the parsed information in the MethodSignature structure + * needs to be deallocated with free_method_signature(). + */ +static MethodSignature * +parse_method_signature (metadata_t *m, guint32 blob_signature) +{ + const char *ptr = mono_metadata_blob_heap (m, blob_signature); + MethodSignature *ms = g_new0 (MethodSignature, 1); + int i, len; + + ptr = get_encoded_value (ptr, &len); + fprintf (output, " // SIG: "); + hex_dump (ptr, 0, -len); + fprintf (output, "\n"); + + ms->flags = *ptr++; + + ptr = get_encoded_value (ptr, &ms->param_count); + ptr = get_ret_type (m, ptr, &ms->ret_type); + ms->param = g_new (char *, ms->param_count); + + for (i = 0; i < ms->param_count; i++) + ptr = get_param (m, ptr, &(ms->param [i])); + + return ms; +} + +static void +free_method_signature (MethodSignature *ms) +{ + int i; + + for (i = 0; i < ms->param_count; i++) + g_free (ms->param [i]); + g_free (ms->param); + g_free (ms->ret_type); + g_free (ms); +} + +/** + * dis_method_list: + * @m: metadata context + * @start: starting index into the Method Table. + * @end: ending index into Method table. + * + * This routine displays the methods in the Method Table from @start to @end + */ +static void +dis_method_list (metadata_t *m, cli_image_info_t *ii, guint32 start, guint32 end) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_METHOD]; + metadata_tableinfo_t *p = &m->tables [META_TABLE_PARAM]; + guint32 cols [6]; + guint32 cols_next [6]; + guint32 param_cols [3]; + int i; + + if (end > t->rows){ + fprintf (output, "ERROR index out of range in methods"); + /*exit (1);*/ + end = t->rows; + } + + for (i = start; i < end; i++){ + MethodSignature *ms; + char *flags, *impl_flags; + + expand (t, i, cols, CSIZE (cols)); + expand (t, i + 1, cols_next, CSIZE (cols_next)); + + flags = method_flags (cols [2]); + impl_flags = method_impl_flags (cols [1]); + + ms = parse_method_signature (m, cols [4]); + + fprintf (output, + " .method %s\n", + flags); + fprintf (output, + " %s %s", + ms->ret_type, + mono_metadata_string_heap (m, cols [3])); + if (ms->param_count > 0){ + int i; + + fprintf (output, "(\n"); + for (i = 0; i < ms->param_count; i++){ + char *pf; + + expand (p, i, param_cols, CSIZE (param_cols)); + pf = param_flags (param_cols [0]); + fprintf ( + output, "\t\t%s %s %s%s", pf, ms->param [i], + mono_metadata_string_heap (m, param_cols [2]), + (i+1 == ms->param_count) ? ")" : ",\n"); + + g_free (pf); + } + + } + fprintf (output, " %s\n", impl_flags); + g_free (flags); + g_free (impl_flags); + + fprintf (output, " {\n"); + fprintf (output, " // Method begins at RVA 0x%x\n", cols [0]); + dis_code (m, ii, cols [0]); + fprintf (output, " }\n\n"); + free_method_signature (ms); + } +} + +/** + * dis_type: + * @m: metadata context + * @n: index of type to disassemble + * + * Disassembles the type whose index in the TypeDef table is @n. + */ +static void +dis_type (metadata_t *m, cli_image_info_t *ii, int n) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_TYPEDEF]; + guint32 cols [6]; + guint32 cols_next [6]; + const char *name; + gboolean next_is_valid, last; + + expand (t, n, cols, CSIZE (cols)); + + if (t->rows > n+1){ + expand (t, n + 1, cols_next, CSIZE (cols_next)); + next_is_valid = 1; + } else + next_is_valid = 0; + + fprintf (output, ".namespace %s\n{\n", mono_metadata_string_heap (m, cols [2])); + name = mono_metadata_string_heap (m, cols [1]); + + if ((cols [0] & TYPE_ATTRIBUTE_CLASS_SEMANTIC_MASK) == TYPE_ATTRIBUTE_CLASS){ + char *base = get_typedef_or_ref (m, cols [3]); + fprintf (output, " .class %s%s\n", typedef_flags (cols [0]), name); + fprintf (output, " \textends %s\n", base); + g_free (base); + } else + fprintf (output, " .class interface %s%s\n", typedef_flags (cols [0]), name); + + fprintf (output, " {\n"); + + /* + * The value in the table is always valid, we know we have fields + * if the value stored is different than the next record. + */ + + if (next_is_valid) + last = cols_next [4] - 1; + else + last = m->tables [META_TABLE_FIELD].rows; + + /*if (cols [4] != cols_next [4] && cols_next [4] != 0) + dis_field_list (m, cols [4] - 1, last);*/ + if (cols[4] && cols[4] <= m->tables [META_TABLE_FIELD].rows) + dis_field_list (m, cols [4] - 1, last); + /*fprintf (output, "cols[4] -> %d cols_next[4] -> %d last -> %d rows -> %d\n", cols[4], cols_next[4], last, m->tables [META_TABLE_FIELD].rows);*/ + fprintf (output, "\n"); + + if (next_is_valid) + last = cols_next [5] - 1; + else + last = m->tables [META_TABLE_METHOD].rows; + + /*if (cols [4] != cols_next [5] && cols_next [5] != 0) + dis_method_list (m, ii, cols [5] - 1, last);*/ + /*fprintf (output, "method(%d): cols[5] -> %d cols_next[5] -> %d last -> %d rows -> %d\n", next_is_valid, cols[5], cols_next[5], last, m->tables [META_TABLE_METHOD].rows);*/ + if (cols [5] < m->tables [META_TABLE_METHOD].rows) + dis_method_list (m, ii, cols [5]-1, last); + + fprintf (output, " }\n}\n\n"); +} + +/** + * dis_types: + * @m: metadata context + * + * disassembles all types in the @m context + */ +static void +dis_types (metadata_t *m, cli_image_info_t *ii) +{ + metadata_tableinfo_t *t = &m->tables [META_TABLE_TYPEDEF]; + int i; + + for (i = 1; i < t->rows; i++) + dis_type (m, ii, i); +} + +struct { + char *name; + int table; + void (*dumper) (metadata_t *m); +} table_list [] = { + { "--assembly", META_TABLE_ASSEMBLY, dump_table_assembly }, + { "--assemblyref", META_TABLE_ASSEMBLYREF, dump_table_assemblyref }, + { "--fields", META_TABLE_FIELD, dump_table_field }, + { "--memberref", META_TABLE_MEMBERREF, dump_table_memberref }, + { "--param", META_TABLE_PARAM, dump_table_param }, + { "--typedef", META_TABLE_TYPEDEF, dump_table_typedef }, + { "--typeref", META_TABLE_TYPEREF, dump_table_typeref }, + { "--classlayout", META_TABLE_CLASSLAYOUT, dump_table_class_layout }, + { "--constant", META_TABLE_CONSTANT, dump_table_constant }, + { "--property", META_TABLE_PROPERTY, dump_table_property }, + { "--event", META_TABLE_EVENT, dump_table_event }, + { "--file", META_TABLE_FILE, dump_table_file }, + { "--moduleref", META_TABLE_MODULEREF, dump_table_moduleref }, + { "--method", META_TABLE_METHOD, dump_table_method }, + { NULL, -1 } +}; + +/** + * disassemble_file: + * @file: file containing CIL code. + * + * Disassembles the @file file. + */ +static void disassemble_file (const char *file) { enum MonoAssemblyOpenStatus status; MonoAssembly *ass; + cli_image_info_t *ii; + metadata_t *m; + + fprintf (output, "// Disassembling %s\n", file); ass = mono_assembly_open (file, &status); if (ass == NULL){ fprintf (stderr, "Error while trying to process %s\n", file); - + return; } - dump_header_data (ass); - + ii = ass->image_info; + m = &ii->cli_metadata; + + if (dump_table != -1){ + (*table_list [dump_table].dumper) (m); + } else { + dump_header_data (ass); + + dis_directive_assemblyref (m); + dis_directive_assembly (m); + dis_types (m, ii); + } + mono_assembly_close (ass); } static void usage (void) { - fprintf (stderr, "Usage is: monodis file1 ..\n"); + fprintf (stderr, "Usage is: monodis [--typeref][--typedef][--assemblyref][--param][--fields][--memberref] file ..\n"); exit (1); } @@ -56,7 +634,7 @@ int main (int argc, char *argv []) { GList *input_files = NULL, *l; - int i; + int i, j; output = stdout; for (i = 1; i < argc; i++){ @@ -65,6 +643,11 @@ main (int argc, char *argv []) usage (); else if (argv [i][1] == 'd') dump_header_data_p = TRUE; + else if (strcmp (argv [i], "--help") == 0) + usage (); + for (j = 0; table_list [j].name != NULL; j++) + if (strcmp (argv [i], table_list [j].name) == 0) + dump_table = j; } else input_files = g_list_append (input_files, argv [i]); } @@ -74,4 +657,6 @@ main (int argc, char *argv []) for (l = input_files; l; l = l->next) disassemble_file (l->data); + + return 0; } diff --git a/mono/dis/meta.h b/mono/dis/meta.h new file mode 100644 index 00000000000..8d8629d921d --- /dev/null +++ b/mono/dis/meta.h @@ -0,0 +1,10 @@ +#include <mono/metadata/assembly.h> +#include <mono/metadata/cil-coff.h> +#include <mono/metadata/endian.h> +#include <mono/metadata/typeattr.h> +#include <mono/metadata/fieldattr.h> +#include <mono/metadata/methodattr.h> +#include <mono/metadata/eltype.h> +#include <mono/metadata/blobsig.h> +#include <mono/metadata/paramattr.h> +#include <mono/metadata/tokentype.h> diff --git a/mono/dis/monodis.1 b/mono/dis/monodis.1 new file mode 100644 index 00000000000..7880d8d4aa2 --- /dev/null +++ b/mono/dis/monodis.1 @@ -0,0 +1,41 @@ +.\" +.\" monodis manual page. +.\" (C) Ximian, Inc. +.\" Author: +.\" Miguel de Icaza (miguel@gnu.org) +.\" +.TH Mono "Mono 1.0" +.SH NAME +monodis \- CIL image content dumper and disassembler. +.SH SYNOPSIS +.PP +.B monodis +[\-hd] [\-\-help] +[\-\-typeref] +[\-\-typedefl] +[\-\-assemblyref] +[FILES...] +.SH DESCRIPTION +The \fImonodis\fP program is used to dump the contents a CIL image +(contained in .EXE files that contain extended PE/COFF CIL code). +.SH OPTIONS +The following Generic options are supported: +.TP +.I "--help", "-h" +Displays usage instructions. +.TP +.I "--typeref" +Dumps the contents of the typeref table. +.TP +.I "--typedef" +Dumps the contents of the typedef table. +.TP +.I "--assemblyref" +Dumps the contents of the assemblyref table. +.PP +If no flags are specified the program dumps the content of the image +in a format that can be used to rountrip the code. +.SH AUTHOR +gnome-config was written by Miguel de Icaza +.SH SEE ALSO +.BR pedump(1), diff --git a/mono/dis/push-pop.h b/mono/dis/push-pop.h new file mode 100644 index 00000000000..f74252e4327 --- /dev/null +++ b/mono/dis/push-pop.h @@ -0,0 +1,265 @@ +/* Poping */ +/* 1 bit */ +#define Pop0 1 +/* 2 bits */ +#define Pop1 2 +/* 3 bits */ +#define PopI 8 +/* 1 bit */ +#define PopI8 64 +/* 1 bit */ +#define Pop8 128 +/* 1 bit */ +#define PopR4 256 +/* 1 bit */ +#define PopR8 512 +/* 1 bit */ +#define PopRef 1024 +/* 1 bit */ +#define VarPop 2048 + +/* Pushing */ +#define Push0 1 +#define PushI 2 +#define PushI8 4 +#define PushR4 8 +#define PushR8 16 +#define PushRef 32 +#define VarPush 64 +#define Push1 128 + +/* + * dis-cil.c: Disassembles CIL byte codes + * + * Author: + * Miguel de Icaza (miguel@ximian.com) + * + * (C) 2001 Ximian, Inc. + */ +#include <config.h> +#include <glib.h> +#include <stdio.h> +#include "meta.h" +#include "dump.h" +#include "dis-cil.h" + +/* Poping */ +/* 1 bit */ +#define Pop0 1 +/* 2 bits */ +#define Pop1 2 +/* 3 bits */ +#define PopI 8 +/* 1 bit */ +#define PopI8 64 +/* 1 bit */ +#define Pop8 128 +/* 1 bit */ +#define PopR4 256 +/* 1 bit */ +#define PopR8 512 +/* 1 bit */ +#define PopRef 1024 +/* 1 bit */ +#define VarPop 2048 + +/* Pushing */ +#define Push0 1 +#define PushI 2 +#define PushI8 4 +#define PushR4 8 +#define PushR8 16 +#define PushRef 32 +#define VarPush 64 +#define Push1 128 + +enum { + InlineBrTarget, + InlineField, + InlineI, + InlineI8, + InlineMethod, + InlineNone, + InlineR, + InlineSig, + InlineString, + InlineSwitch, + InlineTok, + InlineType, + InlineVar, + ShortInlineBrTarget, + ShortInlineI, + ShortInlineR, + ShortInlineVar +}; + +#define OPDEF(a,b,c,d,e,f,g,h,i,j) \ + { b, c, d, e, g, h, i }, + +typedef struct { + char *name; + int pop, push; + int argument; + int bytes; + unsigned char o1, o2; +} opcode_t; + +static opcode_t opcodes [300] = { +#include "mono/cil/opcode.def" +}; + +void +dissasemble_cil (metadata_t *m, const unsigned char *start, int size) +{ + const unsigned char *end = start + size; + const unsigned char *ptr = start; + opcode_t *entry; + + while (ptr < end){ + if (*ptr == 0xfe){ + ptr++; + entry = &opcodes [*ptr + 256]; + } else + entry = &opcodes [*ptr]; + + ptr++; + + fprintf (output, "\tIL_%04x: %s ", ptr - start, entry->name); + switch (entry->argument){ + case InlineBrTarget: { + gint target = *(gint32 *) ptr; + fprintf (output, "IL_%04x", ptr + 4 + target); + ptr += 4; + break; + } + + case InlineField: { + token = *(guint32 *) ptr; + fprintf (output, "fieldref-0x%08x", token); + ptr += 4; + break; + } + + case InlineI: { + int value = *(int *) ptr; + + fprintf (output, "%d", value); + ptr += 4; + break; + } + + case InlineI8: { + gint64 top = *(guint64 *) value; + + fprintf (output, "%ld", top); + ptr += 8; + break; + } + + case InlineMethod: { + token = *(guint32 *) ptr; + fprintf (output, "method-0x%08x", token); + ptr += 4; + break; + } + + case InlineNone: + break; + + case InlineR: { + double r = *(double *) ptr; + fprintf (output, "%g", r); + ptr += 8; + break; + } + + case InlineSig: { + guint32 token = *(guint32 *) ptr; + fprintf (output, "signature-0x%08x", token); + ptr += 4; + break; + } + + case InlineString: { + guint32 token = *(guint32 *) ptr; + + fprintf (output, "string-%0x08x", token); + ptr += 4; + break; + } + + case InlineSwitch: { + guint32 count = *(guint32 *) ptr; + guint32 i; + + ptr += 4; + fprintf (output, "(\n\t\t\t"); + for (i = 0; i < count; i++){ + fprintf (output, "IL_%x", *(guint32 *) ptr); + ptr += 4; + } + fprintf (output, "\t\t\t)"); + break; + } + + case InlineTok: { + guint32 token = *(guint32 *) ptr; + + fprintf (output, "TOKEN_%08x", token); + ptr += 4; + break; + } + + case InlineType: { + guint32 token = *(guint32 *) ptr; + + fprintf (output, "Type-%08x", token); + ptr += 4; + break; + } + + case InlineVar: { + gint16 var_idx = *(gint16 *) ptr; + + fprintf (output, "variable-%d\n", var_idx); + ptr += 2; + break; + } + + case ShortInlineBrTarget: { + signed char x = *ptr; + + fprintf (output, "IL_%04x", ptr - start + 1 + x); + ptr++: + break; + } + + case ShortInlineI: { + char x = *ptr; + + fprintf (output, "0x%02x", x); + ptr++; + break; + } + + case ShortInlineR: { + float f = *(float *) ptr; + + fprintf (output, "%g", (double) f); + ptr += 4; + break; + } + + case ShortInlineVar: { + signed char x = *ptr; + + fprintf (output, "Varidx-%d", (int) x); + ptr++; + break; + }m + + } + + fprintf (output, "\n"); + } +} diff --git a/mono/dis/util.c b/mono/dis/util.c new file mode 100644 index 00000000000..2debbbf1eff --- /dev/null +++ b/mono/dis/util.c @@ -0,0 +1,82 @@ +/* + * util.c: Assorted utilities for the dissasembler + * + * Author: + * Miguel de Icaza (miguel@ximian.com) + * + * (C) 2001 Ximian, Inc (http://www.ximian.com) + */ +#include <config.h> +#include <glib.h> +#include <string.h> +#include <stdio.h> +#include "util.h" + +/** + * map: + * @code: code to lookup in table + * @table: table to decode code + * + * Warning: returns static buffer. + */ +const char * +map (guint32 code, map_t *table) +{ + int i; + + for (i = 0; table [i].str != NULL; i++) + if (table [i].code == code) + return table [i].str; + g_assert_not_reached (); + return ""; +} + +/** + * flags: + * @code: bitfield + * @table: table to decode bitfield + * + * Warning: returns static buffer. + */ +const char * +flags (guint32 code, map_t *table) +{ + static char buffer [1024]; + int i; + + buffer [0] = 0; + + for (i = 0; table [i].str != NULL; i++) + if (table [i].code & code) + strcat (buffer, table [i].str); + + return buffer; +} + +/** + * hex_dump: + * @buffer: pointer to buffer to dump + * @base: numbering base to use + * @count: number of bytes to dump + */ +void +hex_dump (const char *buffer, int base, int count) +{ + int show_header = 1; + int i; + + if (count < 0){ + count = -count; + show_header = 0; + } + + for (i = 0; i < count; i++){ + if (show_header) + if ((i % 16) == 0) + printf ("\n0x%08x: ", (unsigned char) base + i); + + printf ("%02x ", (unsigned char) (buffer [i])); + } + fflush (stdout); +} + diff --git a/mono/dis/util.h b/mono/dis/util.h new file mode 100644 index 00000000000..c6647c7d2ec --- /dev/null +++ b/mono/dis/util.h @@ -0,0 +1,11 @@ + +typedef struct { + int code; + char *str; +} map_t; + +const char *map (guint32 code, map_t *table); +const char *flags (guint32 code, map_t *table); +void hex_dump (const char *buffer, int base, int count); + +#define CSIZE(x) (sizeof (x) / 4) diff --git a/mono/interpreter/.cvsignore b/mono/interpreter/.cvsignore new file mode 100644 index 00000000000..aac5927f938 --- /dev/null +++ b/mono/interpreter/.cvsignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +mono-int +*.o +.libs +.deps diff --git a/mono/interpreter/Makefile.am b/mono/interpreter/Makefile.am new file mode 100644 index 00000000000..d75aaac3a2e --- /dev/null +++ b/mono/interpreter/Makefile.am @@ -0,0 +1,12 @@ +INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir) + +bin_PROGRAMS = mono-int + +mono_int_SOURCES = \ + interp.c \ + interp.h + +mono_int_LDADD = \ + ../metadata/libmetadata.a \ + $(GLIB_LIBS) + diff --git a/mono/interpreter/interp.c b/mono/interpreter/interp.c new file mode 100644 index 00000000000..b391a5d1544 --- /dev/null +++ b/mono/interpreter/interp.c @@ -0,0 +1,882 @@ +/* + * PLEASE NOTE: This is a research prototype. + * + * + * interp.c: Interpreter for CIL byte codes + * + * Author: + * Paolo Molaro (lupus@ximian.com) + * + * (C) 2001 Ximian, Inc. + */ +#include <config.h> +#include <stdio.h> +#include <string.h> +#include <glib.h> +#include <alloca.h> + +#include "interp.h" +/* trim excessive headers */ +#include <mono/metadata/assembly.h> +#include <mono/metadata/cil-coff.h> +#include <mono/metadata/endian.h> +#include <mono/metadata/typeattr.h> +#include <mono/metadata/fieldattr.h> +#include <mono/metadata/methodattr.h> +#include <mono/metadata/eltype.h> +#include <mono/metadata/blobsig.h> +#include <mono/metadata/paramattr.h> + +#define OPDEF(a,b,c,d,e,f,g,h,i,j) \ + a = i, + +enum { +#include "mono/cil/opcode.def" + LAST = 0xff +}; +#undef OPDEF + +/* this needs to be metadata,token indexed, not only token */ +static GHashTable * method_cache = 0; + +/* FIXME: check in configure */ +typedef gint32 nati_t; + +#define GET_NATI(sp) ((guint32)(sp).data.i) + +static int count = 0; + +/* + * Attempt at using the goto label construct of GNU GCC: + * it turns out this does give some benefit: 5-15% speedup. + * Don't look at these macros, it hurts... + */ +#define GOTO_LABEL +#ifdef GOTO_LABEL +#define SWITCH(a) goto *goto_map[a]; +#define BREAK SWITCH(*ip) +#define CASE(l) l ## _LABEL: +#define SUB_SWITCH \ + CEE_PREFIX1_LABEL: \ + CEE_ARGLIST_LABEL: \ + CEE_CEQ_LABEL: \ + CEE_CGT_LABEL: \ + CEE_CGT_UN_LABEL: \ + CEE_CLT_LABEL: \ + CEE_CLT_UN_LABEL: \ + CEE_LDFTN_LABEL: \ + CEE_LDVIRTFTN_LABEL: \ + CEE_UNUSED56_LABEL: \ + CEE_LDARG_LABEL: \ + CEE_LDARGA_LABEL: \ + CEE_STARG_LABEL: \ + CEE_LDLOC_LABEL: \ + CEE_LDLOCA_LABEL: \ + CEE_STLOC_LABEL: \ + CEE_LOCALLOC_LABEL: \ + CEE_UNUSED57_LABEL: \ + CEE_ENDFILTER_LABEL: \ + CEE_UNALIGNED__LABEL: \ + CEE_VOLATILE__LABEL: \ + CEE_TAIL__LABEL: \ + CEE_INITOBJ_LABEL: \ + CEE_UNUSED68_LABEL: \ + CEE_CPBLK_LABEL: \ + CEE_INITBLK_LABEL: \ + CEE_UNUSED69_LABEL: \ + CEE_RETHROW_LABEL: \ + CEE_UNUSED_LABEL: \ + CEE_SIZEOF_LABEL: \ + CEE_REFANYTYPE_LABEL: \ + CEE_UNUSED52_LABEL: \ + CEE_UNUSED53_LABEL: \ + CEE_UNUSED54_LABEL: \ + CEE_UNUSED55_LABEL: \ + CEE_UNUSED70_LABEL: +#else +#define SWITCH(a) switch(a) +#define BREAK break +#define CASE(l) case l: +#define SUB_SWITCH case 0xFE: +#endif + +/* + * Need to optimize ALU ops when natural int == int32 + * + * Need to design how exceptions are supposed to work... + * + * IDEA: if we maintain a stack of ip, sp to be checked + * in the return opcode, we could inline simple methods that don't + * use the stack or local variables.... + * + * The {,.S} versions of many opcodes can/should be merged to reduce code + * duplication. + * + */ +static void +ves_exec_method (cli_image_info_t *iinfo, MonoMetaMethodHeader *mh, stackval *args) +{ + /* + * with alloca we get the expected huge performance gain + * stackval *stack = g_new0(stackval, mh->max_stack); + */ + stackval *stack = alloca(sizeof(stackval) * mh->max_stack); + register const unsigned char *ip = mh->code; + register stackval *sp = stack; + /* FIXME: remove this hack */ + static int fake_field = 42; + + /* need to figure out how many of these, too */ + stackval locals [16]; + +#ifdef GOTO_LABEL + const static void * const goto_map [] = { +#define OPDEF(a,b,c,d,e,f,g,h,i,j) \ + && a ## _LABEL, +#include "mono/cil/opcode.def" +#undef OPDEF + &&START + }; +#endif + + /* + * using while (ip < end) may result in a 15% performance drop, + * but it may be useful for debug + */ + while (1) { + /*count++;*/ +#ifdef GOTO_LABEL + START: +#endif + /*g_print ("0x%04x %02x\n", ip-(unsigned char*)mh->code, *ip); + if (sp > stack) + printf ("\t[%d] %d 0x%08x %0.5f\n", sp-stack, sp[-1].type, sp[-1].data.i, sp[-1].data.f); + */ + SWITCH (*ip) { + CASE (CEE_NOP) + ++ip; + BREAK; + CASE (CEE_BREAK) + ++ip; + G_BREAKPOINT(); /* this is not portable... */ + BREAK; + CASE (CEE_LDARG_0) + CASE (CEE_LDARG_1) + CASE (CEE_LDARG_2) + CASE (CEE_LDARG_3) + *sp = args[(*ip)-CEE_LDARG_0]; + ++sp; + ++ip; + BREAK; + CASE (CEE_LDLOC_0) + CASE (CEE_LDLOC_1) + CASE (CEE_LDLOC_2) + CASE (CEE_LDLOC_3) + *sp = locals [(*ip)-CEE_LDLOC_0]; + ++ip; + ++sp; + BREAK; + CASE (CEE_STLOC_0) + CASE (CEE_STLOC_1) + CASE (CEE_STLOC_2) + CASE (CEE_STLOC_3) + --sp; + locals[(*ip)-CEE_STLOC_0] = *sp; + ++ip; + BREAK; + CASE (CEE_LDARG_S) + ++ip; + *sp = args[*ip]; + ++sp; + ++ip; + BREAK; + CASE (CEE_LDARGA_S) + ++ip; + sp->type = VAL_TP; + sp->data.p = &(args[*ip]); + ++sp; + ++ip; + BREAK; + CASE (CEE_STARG_S) g_assert_not_reached(); BREAK; + CASE (CEE_LDLOC_S) + ++ip; + *sp = locals[*ip]; + ++sp; + ++ip; + BREAK; + CASE (CEE_LDLOCA_S) g_assert_not_reached(); BREAK; + CASE (CEE_STLOC_S) + ++ip; + --sp; + locals[*ip] = *sp; + ++ip; + BREAK; + CASE (CEE_LDNULL) + ++ip; + sp->type = VAL_OBJ; + sp->data.p = NULL; + ++sp; + BREAK; + CASE (CEE_LDC_I4_M1) + ++ip; + sp->type = VAL_I32; + sp->data.i = -1; + ++sp; + BREAK; + CASE (CEE_LDC_I4_0) + CASE (CEE_LDC_I4_1) + CASE (CEE_LDC_I4_2) + CASE (CEE_LDC_I4_3) + CASE (CEE_LDC_I4_4) + CASE (CEE_LDC_I4_5) + CASE (CEE_LDC_I4_6) + CASE (CEE_LDC_I4_7) + CASE (CEE_LDC_I4_8) + sp->type = VAL_I32; + sp->data.i = (*ip) - CEE_LDC_I4_0; + ++sp; + ++ip; + BREAK; + CASE (CEE_LDC_I4_S) + ++ip; + sp->type = VAL_I32; + sp->data.i = *ip; /* FIXME: signed? */ + ++ip; + ++sp; + BREAK; + CASE (CEE_LDC_I4) + ++ip; + sp->type = VAL_I32; + sp->data.i = read32(ip); + ip += 4; + ++sp; + BREAK; + CASE (CEE_LDC_I8) + ++ip; + sp->type = VAL_I64; + sp->data.i = read64(ip); + ip += 8; + ++sp; + BREAK; + CASE (CEE_LDC_R4) + ++ip; + sp->type = VAL_DOUBLE; + /* FIXME: ENOENDIAN */ + sp->data.f = *(float*)(ip); + ip += sizeof(float); + ++sp; + BREAK; + CASE (CEE_LDC_R8) + ++ip; + sp->type = VAL_DOUBLE; + /* FIXME: ENOENDIAN */ + sp->data.f = *(double*)(ip); + ip += sizeof(double); + ++sp; + BREAK; + CASE (CEE_UNUSED99) g_assert_not_reached(); BREAK; + CASE (CEE_DUP) + *sp = sp[-1]; + ++sp; + ++ip; + BREAK; + CASE (CEE_POP) + ++ip; + --sp; + BREAK; + CASE (CEE_JMP) g_assert_not_reached(); BREAK; + CASE (CEE_CALL) { + /* lookup mh, numargs, retval*/ + char *loc; + gint32 entryp; + guint32 token; + MonoMetaMethodHeader *cmh; + + ++ip; + token = read32(ip); + ip += 4; + if (!(cmh=g_hash_table_lookup(method_cache, GINT_TO_POINTER(token)))) { + loc = mono_metadata_locate_token (&iinfo->cli_metadata, token); + entryp = read32(loc); + loc = cli_rva_map (iinfo, entryp); + cmh = mono_metadata_parse_mh (loc); + g_hash_table_insert (method_cache, GINT_TO_POINTER(token), cmh); + } + /* decrement by the actual number of args */ + sp--; + /* we need to truncate according to the type of args ... */ + ves_exec_method (iinfo, cmh, sp); + /* we assume we got a value here */ + sp++; + BREAK; + } + CASE (CEE_CALLI) g_assert_not_reached(); BREAK; + CASE (CEE_RET) + --sp; + *args = *sp; + if (sp != stack) + g_warning ("more values on stack: %d", sp-stack); + /*if (sp->type == VAL_DOUBLE) + g_print("%.9f\n", sp->data.f);*/ + /*g_free (stack);*/ + return; + CASE (CEE_BR_S) + ++ip; + ip += (signed char)*ip; + ++ip; + BREAK; + CASE (CEE_BRFALSE_S) { + int result; + ++ip; + --sp; + switch (sp->type) { + case VAL_I32: result = sp->data.i == 0; break; + case VAL_I64: result = sp->data.l == 0; break; + case VAL_DOUBLE: result = sp->data.f ? 0: 1; break; + default: result = sp->data.p == NULL; break; + } + if (result) + ip += (signed char)*ip; + ++ip; + BREAK; + } + CASE (CEE_BRTRUE_S) { + int result; + ++ip; + --sp; + switch (sp->type) { + case VAL_I32: result = sp->data.i != 0; break; + case VAL_I64: result = sp->data.l != 0; break; + case VAL_DOUBLE: result = sp->data.f? 1 : 0; break; + default: result = sp->data.p != NULL; break; + } + if (result) + ip += (signed char)*ip; + ++ip; + BREAK; + } + CASE (CEE_BEQ_S) { + int result; + ++ip; + sp -= 2; + if (sp->type == VAL_I32) + result = sp[0].data.i == GET_NATI(sp[1]); + else if (sp->type == VAL_I64) + result = sp[0].data.l == sp[1].data.l; + else if (sp->type == VAL_DOUBLE) + result = sp[0].data.f == sp[1].data.f; + else + result = GET_NATI(sp[0]) == GET_NATI(sp[1]); + if (result) + ip += (signed char)*ip; + ++ip; + BREAK; + } + CASE (CEE_BGE_S) { + int result; + ++ip; + sp -= 2; + if (sp->type == VAL_I32) + result = sp[0].data.i >= GET_NATI(sp[1]); + else if (sp->type == VAL_I64) + result = sp[0].data.l >= sp[1].data.l; + else if (sp->type == VAL_DOUBLE) + result = sp[0].data.f >= sp[1].data.f; + else + result = GET_NATI(sp[0]) >= GET_NATI(sp[1]); + if (result) + ip += (signed char)*ip; + ++ip; + BREAK; + } + CASE (CEE_BGT_S) { + int result; + ++ip; + sp -= 2; + if (sp->type == VAL_I32) + result = sp[0].data.i > GET_NATI(sp[1]); + else if (sp->type == VAL_I64) + result = sp[0].data.l > sp[1].data.l; + else if (sp->type == VAL_DOUBLE) + result = sp[0].data.f > sp[1].data.f; + else + result = GET_NATI(sp[0]) > GET_NATI(sp[1]); + if (result) + ip += (signed char)*ip; + ++ip; + BREAK; + } + CASE (CEE_BLT_S) { + int result; + ++ip; + sp -= 2; + if (sp->type == VAL_I32) + result = sp[0].data.i < GET_NATI(sp[1]); + else if (sp->type == VAL_I64) + result = sp[0].data.l < sp[1].data.l; + else if (sp->type == VAL_DOUBLE) + result = sp[0].data.f < sp[1].data.f; + else + result = GET_NATI(sp[0]) < GET_NATI(sp[1]); + if (result) + ip += (signed char)*ip; + ++ip; + BREAK; + } + CASE (CEE_BLE_S) { + int result; + ++ip; + sp -= 2; + if (sp->type == VAL_I32) + result = sp[0].data.i <= GET_NATI(sp[1]); + else if (sp->type == VAL_I64) + result = sp[0].data.l <= sp[1].data.l; + else if (sp->type == VAL_DOUBLE) + result = sp[0].data.f <= sp[1].data.f; + else /* FIXME: here and in other places GET_NATI on the left side + _will_ be wrong when we change the macro to work on 64 buts + systems. + */ + result = GET_NATI(sp[0]) <= GET_NATI(sp[1]); + if (result) + ip += (signed char)*ip; + ++ip; + BREAK; + } + CASE (CEE_BNE_UN_S) g_assert_not_reached(); BREAK; + CASE (CEE_BGE_UN_S) g_assert_not_reached(); BREAK; + CASE (CEE_BGT_UN_S) g_assert_not_reached(); BREAK; + CASE (CEE_BLE_UN_S) g_assert_not_reached(); BREAK; + CASE (CEE_BLT_UN_S) g_assert_not_reached(); BREAK; + CASE (CEE_BR) g_assert_not_reached(); BREAK; + CASE (CEE_BRFALSE) g_assert_not_reached(); BREAK; + CASE (CEE_BRTRUE) g_assert_not_reached(); BREAK; + CASE (CEE_BEQ) g_assert_not_reached(); BREAK; + CASE (CEE_BGE) g_assert_not_reached(); BREAK; + CASE (CEE_BGT) g_assert_not_reached(); BREAK; + CASE (CEE_BLE) g_assert_not_reached(); BREAK; + CASE (CEE_BLT) g_assert_not_reached(); BREAK; + CASE (CEE_BNE_UN) g_assert_not_reached(); BREAK; + CASE (CEE_BGE_UN) g_assert_not_reached(); BREAK; + CASE (CEE_BGT_UN) g_assert_not_reached(); BREAK; + CASE (CEE_BLE_UN) g_assert_not_reached(); BREAK; + CASE (CEE_BLT_UN) g_assert_not_reached(); BREAK; + CASE (CEE_SWITCH) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_I1) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_U1) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_I2) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_U2) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_I4) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_U4) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_I8) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_I) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_R4) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_R8) g_assert_not_reached(); BREAK; + CASE (CEE_LDIND_REF) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_REF) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_I1) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_I2) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_I4) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_I8) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_R4) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_R8) g_assert_not_reached(); BREAK; + CASE (CEE_ADD) + ++ip; + --sp; + /* should probably consider the pointers as unsigned */ + if (sp->type == VAL_I32) + sp[-1].data.i += GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l += sp[0].data.l; + else if (sp->type == VAL_DOUBLE) + sp[-1].data.f += sp[0].data.f; + else + (char*)sp[-1].data.p += GET_NATI(sp[0]); + BREAK; + CASE (CEE_SUB) + ++ip; + --sp; + /* should probably consider the pointers as unsigned */ + if (sp->type == VAL_I32) + sp[-1].data.i -= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l -= sp[0].data.l; + else if (sp->type == VAL_DOUBLE) + sp[-1].data.f -= sp[0].data.f; + else + (char*)sp[-1].data.p -= GET_NATI(sp[0]); + BREAK; + CASE (CEE_MUL) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i *= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l *= sp[0].data.l; + else if (sp->type == VAL_DOUBLE) + sp[-1].data.f *= sp[0].data.f; + BREAK; + CASE (CEE_DIV) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i /= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l /= sp[0].data.l; + else if (sp->type == VAL_DOUBLE) + sp[-1].data.f /= sp[0].data.f; + BREAK; + CASE (CEE_DIV_UN) g_assert_not_reached(); BREAK; + CASE (CEE_REM) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i %= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l %= sp[0].data.l; + else if (sp->type == VAL_DOUBLE) + /* FIXME: what do we actually fo here? */ + sp[-1].data.f = 0; + else + GET_NATI(sp[-1]) %= GET_NATI(sp[0]); + BREAK; + CASE (CEE_REM_UN) g_assert_not_reached(); BREAK; + CASE (CEE_AND) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i &= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l &= sp[0].data.l; + else + GET_NATI(sp[-1]) &= GET_NATI(sp[0]); + BREAK; + CASE (CEE_OR) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i |= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l |= sp[0].data.l; + else + GET_NATI(sp[-1]) |= GET_NATI(sp[0]); + BREAK; + CASE (CEE_XOR) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i ^= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l ^= sp[0].data.l; + else + GET_NATI(sp[-1]) ^= GET_NATI(sp[0]); + BREAK; + CASE (CEE_SHL) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i <<= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l <<= GET_NATI(sp[0]); + else + GET_NATI(sp[-1]) <<= GET_NATI(sp[0]); + BREAK; + CASE (CEE_SHR) + ++ip; + --sp; + if (sp->type == VAL_I32) + sp[-1].data.i >>= GET_NATI(sp[0]); + else if (sp->type == VAL_I64) + sp[-1].data.l >>= GET_NATI(sp[0]); + else + GET_NATI(sp[-1]) >>= GET_NATI(sp[0]); + BREAK; + CASE (CEE_SHR_UN) g_assert_not_reached(); BREAK; + CASE (CEE_NEG) + ++ip; + if (sp->type == VAL_I32) + sp->data.i = - sp->data.i; + else if (sp->type == VAL_I64) + sp->data.l = - sp->data.l; + else if (sp->type == VAL_DOUBLE) + sp->data.f = - sp->data.f; + else if (sp->type == VAL_NATI) + sp->data.p = (gpointer)(- (nati_t)sp->data.p); + BREAK; + CASE (CEE_NOT) + ++ip; + if (sp->type == VAL_I32) + sp->data.i = ~ sp->data.i; + else if (sp->type == VAL_I64) + sp->data.l = ~ sp->data.l; + else if (sp->type == VAL_NATI) + sp->data.p = (gpointer)(~ (nati_t)sp->data.p); + BREAK; + CASE (CEE_CONV_I1) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_I2) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_I4) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_I8) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_R4) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_R8) + ++ip; + /* FIXME: handle other cases. what about sign? */ + sp[-1].data.f = (double)sp[-1].data.i; + sp[-1].type = VAL_DOUBLE; + BREAK; + CASE (CEE_CONV_U4) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_U8) g_assert_not_reached(); BREAK; + CASE (CEE_CALLVIRT) g_assert_not_reached(); BREAK; + CASE (CEE_CPOBJ) g_assert_not_reached(); BREAK; + CASE (CEE_LDOBJ) g_assert_not_reached(); BREAK; + CASE (CEE_LDSTR) g_assert_not_reached(); BREAK; + CASE (CEE_NEWOBJ) g_assert_not_reached(); BREAK; + CASE (CEE_CASTCLASS) g_assert_not_reached(); BREAK; + CASE (CEE_ISINST) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_R_UN) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED58) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED1) g_assert_not_reached(); BREAK; + CASE (CEE_UNBOX) g_assert_not_reached(); BREAK; + CASE (CEE_THROW) g_assert_not_reached(); BREAK; + CASE (CEE_LDFLD) g_assert_not_reached(); BREAK; + CASE (CEE_LDFLDA) g_assert_not_reached(); BREAK; + CASE (CEE_STFLD) g_assert_not_reached(); BREAK; + CASE (CEE_LDSFLD) + /* FIXME: get the real field here */ + ip += 5; + sp->type = VAL_I32; + sp->data.i = fake_field; + ++sp; + BREAK; + CASE (CEE_LDSFLDA) g_assert_not_reached(); BREAK; + CASE (CEE_STSFLD) + /* FIXME: get the real field here */ + ip += 5; + --sp; + fake_field = sp->data.i; + BREAK; + CASE (CEE_STOBJ) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I1_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I2_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I4_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I8_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U1_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U2_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U4_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U8_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I_UN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U_UN) g_assert_not_reached(); BREAK; + CASE (CEE_BOX) g_assert_not_reached(); BREAK; + CASE (CEE_NEWARR) g_assert_not_reached(); BREAK; + CASE (CEE_LDLEN) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEMA) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_I1) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_U1) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_I2) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_U2) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_I4) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_U4) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_I8) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_I) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_R4) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_R8) g_assert_not_reached(); BREAK; + CASE (CEE_LDELEM_REF) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_I) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_I1) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_I2) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_I4) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_I8) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_R4) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_R8) g_assert_not_reached(); BREAK; + CASE (CEE_STELEM_REF) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED2) + CASE (CEE_UNUSED3) + CASE (CEE_UNUSED4) + CASE (CEE_UNUSED5) + CASE (CEE_UNUSED6) + CASE (CEE_UNUSED7) + CASE (CEE_UNUSED8) + CASE (CEE_UNUSED9) + CASE (CEE_UNUSED10) + CASE (CEE_UNUSED11) + CASE (CEE_UNUSED12) + CASE (CEE_UNUSED13) + CASE (CEE_UNUSED14) + CASE (CEE_UNUSED15) + CASE (CEE_UNUSED16) + CASE (CEE_UNUSED17) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I1) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U1) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I2) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U2) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I4) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U4) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I8) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U8) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED50) + CASE (CEE_UNUSED18) + CASE (CEE_UNUSED19) + CASE (CEE_UNUSED20) + CASE (CEE_UNUSED21) + CASE (CEE_UNUSED22) + CASE (CEE_UNUSED23) g_assert_not_reached(); BREAK; + CASE (CEE_REFANYVAL) g_assert_not_reached(); BREAK; + CASE (CEE_CKFINITE) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED24) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED25) g_assert_not_reached(); BREAK; + CASE (CEE_MKREFANY) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED59) + CASE (CEE_UNUSED60) + CASE (CEE_UNUSED61) + CASE (CEE_UNUSED62) + CASE (CEE_UNUSED63) + CASE (CEE_UNUSED64) + CASE (CEE_UNUSED65) + CASE (CEE_UNUSED66) + CASE (CEE_UNUSED67) g_assert_not_reached(); BREAK; + CASE (CEE_LDTOKEN) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_U2) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_U1) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_I) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_I) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_OVF_U) g_assert_not_reached(); BREAK; + CASE (CEE_ADD_OVF) g_assert_not_reached(); BREAK; + CASE (CEE_ADD_OVF_UN) g_assert_not_reached(); BREAK; + CASE (CEE_MUL_OVF) g_assert_not_reached(); BREAK; + CASE (CEE_MUL_OVF_UN) g_assert_not_reached(); BREAK; + CASE (CEE_SUB_OVF) g_assert_not_reached(); BREAK; + CASE (CEE_SUB_OVF_UN) g_assert_not_reached(); BREAK; + CASE (CEE_ENDFINALLY) g_assert_not_reached(); BREAK; + CASE (CEE_LEAVE) g_assert_not_reached(); BREAK; + CASE (CEE_LEAVE_S) g_assert_not_reached(); BREAK; + CASE (CEE_STIND_I) g_assert_not_reached(); BREAK; + CASE (CEE_CONV_U) g_assert_not_reached(); BREAK; + CASE (CEE_UNUSED26) + CASE (CEE_UNUSED27) + CASE (CEE_UNUSED28) + CASE (CEE_UNUSED29) + CASE (CEE_UNUSED30) + CASE (CEE_UNUSED31) + CASE (CEE_UNUSED32) + CASE (CEE_UNUSED33) + CASE (CEE_UNUSED34) + CASE (CEE_UNUSED35) + CASE (CEE_UNUSED36) + CASE (CEE_UNUSED37) + CASE (CEE_UNUSED38) + CASE (CEE_UNUSED39) + CASE (CEE_UNUSED40) + CASE (CEE_UNUSED41) + CASE (CEE_UNUSED42) + CASE (CEE_UNUSED43) + CASE (CEE_UNUSED44) + CASE (CEE_UNUSED45) + CASE (CEE_UNUSED46) + CASE (CEE_UNUSED47) + CASE (CEE_UNUSED48) g_assert_not_reached(); BREAK; + CASE (CEE_PREFIX7) g_assert_not_reached(); BREAK; + CASE (CEE_PREFIX6) g_assert_not_reached(); BREAK; + CASE (CEE_PREFIX5) g_assert_not_reached(); BREAK; + CASE (CEE_PREFIX4) g_assert_not_reached(); BREAK; + CASE (CEE_PREFIX3) g_assert_not_reached(); BREAK; + CASE (CEE_PREFIX2) g_assert_not_reached(); BREAK; + CASE (CEE_PREFIXREF) g_assert_not_reached(); BREAK; + SUB_SWITCH + ++ip; + switch (*ip) { + case CEE_ARGLIST: g_assert_not_reached(); break; + case CEE_CEQ: g_assert_not_reached(); break; + case CEE_CGT: g_assert_not_reached(); break; + case CEE_CGT_UN: g_assert_not_reached(); break; + case CEE_CLT: g_assert_not_reached(); break; + case CEE_CLT_UN: g_assert_not_reached(); break; + case CEE_LDFTN: g_assert_not_reached(); break; + case CEE_LDVIRTFTN: g_assert_not_reached(); break; + case CEE_UNUSED56: g_assert_not_reached(); break; + case CEE_LDARG: g_assert_not_reached(); break; + case CEE_LDARGA: g_assert_not_reached(); break; + case CEE_STARG: g_assert_not_reached(); break; + case CEE_LDLOC: g_assert_not_reached(); break; + case CEE_LDLOCA: g_assert_not_reached(); break; + case CEE_STLOC: g_assert_not_reached(); break; + case CEE_LOCALLOC: g_assert_not_reached(); break; + case CEE_UNUSED57: g_assert_not_reached(); break; + case CEE_ENDFILTER: g_assert_not_reached(); break; + case CEE_UNALIGNED_: g_assert_not_reached(); break; + case CEE_VOLATILE_: g_assert_not_reached(); break; + case CEE_TAIL_: g_assert_not_reached(); break; + case CEE_INITOBJ: g_assert_not_reached(); break; + case CEE_UNUSED68: g_assert_not_reached(); break; + case CEE_CPBLK: g_assert_not_reached(); break; + case CEE_INITBLK: g_assert_not_reached(); break; + case CEE_UNUSED69: g_assert_not_reached(); break; + case CEE_RETHROW: g_assert_not_reached(); break; + case CEE_UNUSED: g_assert_not_reached(); break; + case CEE_SIZEOF: g_assert_not_reached(); break; + case CEE_REFANYTYPE: g_assert_not_reached(); break; + case CEE_UNUSED52: + case CEE_UNUSED53: + case CEE_UNUSED54: + case CEE_UNUSED55: + case CEE_UNUSED70: + default: +#ifdef GOTO_LABEL + CEE_ILLEGAL_LABEL: + CEE_ENDMAC_LABEL: +#endif + g_error ("Unimplemented opcode: 0xFE %02x at 0x%x\n", *ip, ip-(unsigned char*)mh->code); + } + continue; +#ifndef GOTO_LABEL + default: + g_error ("Unimplemented opcode: %x at 0x%x\n", *ip, ip-(unsigned char*)mh->code); +#endif + } + } + + g_assert_not_reached(); +} + +static int +ves_exec (cli_image_info_t *iinfo) +{ + gint32 entryp; + char * loc, *ptr; + stackval result; + MonoMetaMethodHeader *mh; + + /* we need to exec the class and object constructors... */ + method_cache = g_hash_table_new (g_direct_hash, g_direct_equal); + ptr = loc = mono_metadata_locate_token (&iinfo->cli_metadata, iinfo->cli_cli_header.ch_entry_point); + entryp = read32(loc); + loc = cli_rva_map (iinfo, entryp); + mh = mono_metadata_parse_mh (loc); + ves_exec_method (iinfo, mh, &result); + mono_metadata_free_mh (mh); + fprintf (stderr, "result: %d\n", result.data.i); + + return 0; +} + +int +main (int argc, char *argv []) +{ + cli_image_info_t *iinfo; + MonoAssembly *assembly; + int retval = 0; + char *file = argv [1]; + + assembly = mono_assembly_open (file, NULL); + if (!assembly){ + fprintf (stderr, "Can not open assembly %s\n", file); + exit (1); + } + iinfo = assembly->image_info; + retval = ves_exec (iinfo); + mono_assembly_close (assembly); + printf("count: %d\n", count); + + return retval; +} + + + diff --git a/mono/interpreter/interp.h b/mono/interpreter/interp.h new file mode 100644 index 00000000000..584e058ba51 --- /dev/null +++ b/mono/interpreter/interp.h @@ -0,0 +1,24 @@ + +#include <glib.h> + +enum { + VAL_I32, + VAL_I64, + VAL_DOUBLE, + VAL_NATI, + VAL_MP, + VAL_TP, + VAL_OBJ +}; + +typedef struct { + union { + gint32 i; + gint64 l; + double f; + /* native size integer and pointer types */ + gpointer p; + } data; + int type; +} stackval; + diff --git a/mono/metadata/.cvsignore b/mono/metadata/.cvsignore new file mode 100644 index 00000000000..896769d89cf --- /dev/null +++ b/mono/metadata/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +pedump +.libs +.deps diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog new file mode 100644 index 00000000000..c13bbebb765 --- /dev/null +++ b/mono/metadata/ChangeLog @@ -0,0 +1,70 @@ +2001-07-12 Miguel de Icaza <miguel@ximian.com> + + * metadata.h: More macros. + + * tokentype.h: New file. + +Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * assembly.c: added a consistency check and initialize + some structures with g_new0(). + * metadata.c: fixed a couple more bugs in table size computation + and add other checks for out-of bound access to metadata. + +Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * metatada.c: fix bugs computing table sizes. Spew a + warning when index in string heap is out of bounds. + +2001-07-04 Miguel de Icaza <miguel@ximian.com> + + * metadata.h: Add a couple of macros to manipulate tokens. + +Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com> + + * assembly.c: g_free(ii->cli_sections) (and avoid double free of + cli_section_tables). + +2001-07-01 Miguel de Icaza <miguel@ximian.com> + + * metadata.c (mono_metadata_user_string): New function, provides + access to the UserString heap. + +2001-06-27 Miguel de Icaza <miguel@ximian.com> + + * metadata.c: Add inline documentation. + +2001-06-26 Miguel de Icaza <miguel@ximian.com> + + * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New + files. + +2001-06-22 Miguel de Icaza <miguel@ximian.com> + + * typeattr.h: New file, TypeAttribute flags. + +2001-06-21 Miguel de Icaza <miguel@ximian.com> + + * mono/metadata/assembly.c (mono_assembly_ensure_section_idx, + mono_assembly_ensure_section): Section loading code. + (load_section_tables): Load the sections. + + * mono/metadata/metadata.c (mono_metadata_locate_token, + mono_metadata_locate): Functions to locate the information + definition given a token or a table and an index. + (mono_metadata_compute_table_bases): New. + (compute_size): New function to compute the sizes of the various + tables. + + * mono/metadata/metadata.h: Finish listing the different index + types. + + * mono/metadata/pedump.c: Improve to dump new information. + +2001-06-19 Miguel de Icaza <miguel@ximian.com> + + * mono/metadata/metadata.c: Entered all the tables matching + Beta2. + + * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2 + diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am index 505141d5abc..2966a60a0b0 100644 --- a/mono/metadata/Makefile.am +++ b/mono/metadata/Makefile.am @@ -5,13 +5,28 @@ lib_LIBRARIES = libmetadata.a INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir) libmetadata_a_SOURCES = \ - assembly.h \ assembly.c \ - cil-coff.h \ metadata.c \ + rawbuffer.c + +libmetadataincludedir = $(includedir)/mono/metadata + +libmetadatainclude_HEADERS = \ + assembly.h \ + blobsig.h \ + cil-coff.h \ + eltype.h \ + endian.h \ + fieldattr.h \ metadata.h \ - rawbuffer.c \ - rawbuffer.h + methodattr.h \ + methodheader.h \ + methodsem.h \ + paramattr.h \ + propertyattr.h \ + rawbuffer.h \ + tokentype.h \ + typeattr.h pedump_SOURCES = \ pedump.c $(libmetadata_a_SOURCES) diff --git a/mono/metadata/TODO b/mono/metadata/TODO new file mode 100644 index 00000000000..7c7da2c7aef --- /dev/null +++ b/mono/metadata/TODO @@ -0,0 +1,5 @@ + +* Rename assembly.c to module.c + + * Rename all symbols called `assembly' to module, because that is + what they actually are.
\ No newline at end of file diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c index 6d6b2602d7f..ec5e16c57c9 100644 --- a/mono/metadata/assembly.c +++ b/mono/metadata/assembly.c @@ -8,7 +8,7 @@ * (C) 2001 Ximian, Inc. http://www.ximian.com * * TODO: - * Do byteswaps for big-endian systems on the various headers. + * Implement big-endian versions of the reading routines. */ #include <config.h> #include <stdio.h> @@ -18,22 +18,15 @@ #include "assembly.h" #include "cil-coff.h" #include "rawbuffer.h" +#include "endian.h" #define INVALID_ADDRESS 0xffffffff -/* FIXME: implement big endian versions */ -#define le64_to_cpu(x) (x) -#define le32_to_cpu(x) (x) -#define le16_to_cpu(x) (x) -#define read32(x) le32_to_cpu (*((guint32 *) (x))) -#define read16(x) le16_to_cpu (*((guint16 *) (x))) -#define read64(x) le64_to_cpu (*((guint64 *) (x))) - -static guint32 -coff_map (dotnet_image_info_t *iinfo, guint32 addr) +guint32 +cli_rva_image_map (cli_image_info_t *iinfo, guint32 addr) { - const int top = iinfo->dn_section_count; - section_table_t *tables = iinfo->dn_section_tables; + const int top = iinfo->cli_section_count; + section_table_t *tables = iinfo->cli_section_tables; int i; for (i = 0; i < top; i++){ @@ -46,17 +39,97 @@ coff_map (dotnet_image_info_t *iinfo, guint32 addr) return INVALID_ADDRESS; } -static int -load_section_tables (MonoAssembly *assembly, dotnet_image_info_t *iinfo) +char * +cli_rva_map (cli_image_info_t *iinfo, guint32 addr) { - const int top = iinfo->dn_header.coff.coff_sections; + const int top = iinfo->cli_section_count; + section_table_t *tables = iinfo->cli_section_tables; int i; + + for (i = 0; i < top; i++){ + if ((addr >= tables->st_virtual_address) && + (addr < tables->st_virtual_address + tables->st_raw_data_size)){ + return iinfo->cli_sections [i] + + (addr - tables->st_virtual_address); + } + tables++; + } + return NULL; +} + +/** + * mono_assembly_ensure_section_idx: + * @assembly: The image we are operating on + * @section: section number that we will load/map into memory + * + * This routine makes sure that we have an in-memory copy of + * an image section (.text, .rsrc, .data). + * + * Returns: TRUE on success + */ +int +mono_assembly_ensure_section_idx (MonoAssembly *assembly, int section) +{ + cli_image_info_t *iinfo = assembly->image_info; + section_table_t *sect; + gboolean writable; + + g_return_val_if_fail (section < iinfo->cli_section_count, FALSE); - iinfo->dn_section_count = top; - iinfo->dn_section_tables = g_new (section_table_t, top); + if (iinfo->cli_sections [section] != NULL) + return TRUE; + sect = &iinfo->cli_section_tables [section]; + + writable = sect->st_flags & SECT_FLAGS_MEM_WRITE; + + iinfo->cli_sections [section] = raw_buffer_load ( + fileno (assembly->f), writable, + sect->st_raw_data_ptr, sect->st_raw_data_size); + + if (iinfo->cli_sections [section] == NULL) + return FALSE; + + return TRUE; +} + +/** + * mono_assembly_ensure_section: + * @assembly: The image we are operating on + * @section: section name that we will load/map into memory + * + * This routine makes sure that we have an in-memory copy of + * an image section (.text, .rsrc, .data). + * + * Returns: TRUE on success + */ +int +mono_assembly_ensure_section (MonoAssembly *assembly, const char *section) +{ + cli_image_info_t *ii = assembly->image_info; + int i; + + for (i = 0; i < ii->cli_section_count; i++){ + if (strncmp (ii->cli_section_tables [i].st_name, section, 8) != 0) + continue; + + return mono_assembly_ensure_section_idx (assembly, i); + } + return FALSE; +} + +static int +load_section_tables (MonoAssembly *assembly, cli_image_info_t *iinfo) +{ + const int top = iinfo->cli_header.coff.coff_sections; + int i; + + iinfo->cli_section_count = top; + iinfo->cli_section_tables = g_new0 (section_table_t, top); + iinfo->cli_sections = g_new0 (void *, top); + for (i = 0; i < top; i++){ - section_table_t *t = &iinfo->dn_section_tables [i]; + section_table_t *t = &iinfo->cli_section_tables [i]; if (fread (t, sizeof (section_table_t), 1, assembly->f) != 1) return FALSE; @@ -71,36 +144,40 @@ load_section_tables (MonoAssembly *assembly, dotnet_image_info_t *iinfo) t->st_line_count = le16_to_cpu (t->st_line_count); } + for (i = 0; i < top; i++) + if (!mono_assembly_ensure_section_idx (assembly, i)) + return FALSE; + return TRUE; } static gboolean -load_cli_header (MonoAssembly *assembly, dotnet_image_info_t *iinfo) +load_cli_header (MonoAssembly *assembly, cli_image_info_t *iinfo) { guint32 offset; int n; - offset = coff_map (iinfo, iinfo->dn_header.datadir.pe_cli_header.rva); + offset = cli_rva_image_map (iinfo, iinfo->cli_header.datadir.pe_cli_header.rva); if (offset == INVALID_ADDRESS) return FALSE; if (fseek (assembly->f, offset, 0) != 0) return FALSE; - if ((n = fread (&iinfo->dn_cli_header, sizeof (cli_header_t), 1, assembly->f)) != 1) + if ((n = fread (&iinfo->cli_cli_header, sizeof (cli_header_t), 1, assembly->f)) != 1) return FALSE; /* Catch new uses of the fields that are supposed to be zero */ - if ((iinfo->dn_cli_header.ch_eeinfo_table.rva != 0) || - (iinfo->dn_cli_header.ch_helper_table.rva != 0) || - (iinfo->dn_cli_header.ch_dynamic_info.rva != 0) || - (iinfo->dn_cli_header.ch_delay_load_info.rva != 0) || - (iinfo->dn_cli_header.ch_module_image.rva != 0) || - (iinfo->dn_cli_header.ch_external_fixups.rva != 0) || - (iinfo->dn_cli_header.ch_ridmap.rva != 0) || - (iinfo->dn_cli_header.ch_debug_map.rva != 0) || - (iinfo->dn_cli_header.ch_ip_map.rva != 0)){ + if ((iinfo->cli_cli_header.ch_eeinfo_table.rva != 0) || + (iinfo->cli_cli_header.ch_helper_table.rva != 0) || + (iinfo->cli_cli_header.ch_dynamic_info.rva != 0) || + (iinfo->cli_cli_header.ch_delay_load_info.rva != 0) || + (iinfo->cli_cli_header.ch_module_image.rva != 0) || + (iinfo->cli_cli_header.ch_external_fixups.rva != 0) || + (iinfo->cli_cli_header.ch_ridmap.rva != 0) || + (iinfo->cli_cli_header.ch_debug_map.rva != 0) || + (iinfo->cli_cli_header.ch_ip_map.rva != 0)){ g_message ("Some fields in the CLI header which should have been zero are not zero"); } @@ -108,16 +185,16 @@ load_cli_header (MonoAssembly *assembly, dotnet_image_info_t *iinfo) } static gboolean -load_metadata_ptrs (MonoAssembly *assembly, dotnet_image_info_t *iinfo) +load_metadata_ptrs (MonoAssembly *assembly, cli_image_info_t *iinfo) { - metadata_t *metadata = &iinfo->dn_metadata; + metadata_t *metadata = &iinfo->cli_metadata; guint32 offset, size; - guint16 records; + guint16 streams; int i; char *ptr; - offset = coff_map (iinfo, iinfo->dn_cli_header.ch_metadata.rva); - size = iinfo->dn_cli_header.ch_metadata.size; + offset = cli_rva_image_map (iinfo, iinfo->cli_cli_header.ch_metadata.rva); + size = iinfo->cli_cli_header.ch_metadata.size; metadata->raw_metadata = raw_buffer_load (fileno (assembly->f), FALSE, offset, size); if (metadata->raw_metadata == NULL) @@ -125,25 +202,25 @@ load_metadata_ptrs (MonoAssembly *assembly, dotnet_image_info_t *iinfo) ptr = metadata->raw_metadata; - /* - * Handle Beta 1 and ECMA versions of the metadata root - */ - if (strncmp (ptr, "COM+", 4) == 0){ - ptr += 10; - } else if (strncmp (ptr, "BSJB", 4) == 0){ + if (strncmp (ptr, "BSJB", 4) == 0){ guint32 version_string_len; - ptr += 8; + ptr += 12; version_string_len = read32 (ptr); + ptr += 4; ptr += version_string_len; if (((guint32) ptr) % 4) ptr += 4 - (((guint32) ptr) %4); - } + } else + return FALSE; - records = read16 (ptr); + /* skip over flags */ + ptr += 2; + + streams = read16 (ptr); ptr += 2; - for (i = 0; i < records; i++){ + for (i = 0; i < streams; i++){ if (strncmp (ptr + 8, "#~", 3) == 0){ metadata->heap_tables.sh_offset = read32 (ptr); metadata->heap_tables.sh_size = read32 (ptr + 4); @@ -173,6 +250,9 @@ load_metadata_ptrs (MonoAssembly *assembly, dotnet_image_info_t *iinfo) return TRUE; } +/* + * Load representation of logical metadata tables, from the "#~" stream + */ static gboolean load_tables (MonoAssembly *assembly, metadata_t *meta) { @@ -180,47 +260,70 @@ load_tables (MonoAssembly *assembly, metadata_t *meta) guint32 *rows; guint64 valid_mask; int valid = 0, table; + int heap_sizes; + + heap_sizes = heap_tables [6]; + meta->idx_string_wide = ((heap_sizes & 0x01) == 1); + meta->idx_guid_wide = ((heap_sizes & 0x02) == 2); + meta->idx_blob_wide = ((heap_sizes & 0x04) == 4); valid_mask = read64 (heap_tables + 8); rows = (guint32 *) (heap_tables + 24); for (table = 0; table < 64; table++){ if ((valid_mask & ((guint64) 1 << table)) == 0){ - meta->rows [table] = 0; + meta->tables [table].rows = 0; continue; } - meta->rows [table] = *rows; + if (table > 0x2b) { + g_warning("bits in valid must be zero above 0x2b (II - 23.1.6)"); + } + meta->tables [table].rows = read32 (rows); rows++; valid++; } + meta->tables_base = (heap_tables + 24) + (4 * valid); + + /* They must be the same */ + g_assert ((void *) meta->tables_base == (void *) rows); + + mono_metadata_compute_table_bases (meta); return TRUE; } static gboolean -load_metadata (MonoAssembly *assembly, dotnet_image_info_t *iinfo) +load_metadata (MonoAssembly *assembly, cli_image_info_t *iinfo) { if (!load_metadata_ptrs (assembly, iinfo)) return FALSE; - return load_tables (assembly, &iinfo->dn_metadata); + return load_tables (assembly, &iinfo->cli_metadata); } +/** + * mono_assembly_open: + * @fname: filename that points to the module we want to open + * @status: An error condition is returned in this field + * + * Retuns: An open assembly of type %MonoAssembly or NULL on error. + * if NULL, then check the value of @status for details on the error + */ MonoAssembly * mono_assembly_open (const char *fname, enum MonoAssemblyOpenStatus *status) { - dotnet_image_info_t *iinfo; + cli_image_info_t *iinfo; dotnet_header_t *header; msdos_header_t msdos; MonoAssembly *assembly; int n; - assembly = g_new (MonoAssembly, 1); + assembly = g_new0 (MonoAssembly, 1); assembly->f = fopen (fname, "r"); - iinfo = g_new (dotnet_image_info_t, 1); + iinfo = g_new0 (cli_image_info_t, 1); assembly->image_info = iinfo; - header = &iinfo->dn_header; + header = &iinfo->cli_header; if (assembly->f == NULL){ if (status) @@ -265,6 +368,13 @@ invalid_image: return NULL; } +/** + * mono_assembly_close: + * @assembly: The image file we wish to close + * + * Closes an image file, deallocates all memory consumed and + * unmaps all possible sections of the file + */ void mono_assembly_close (MonoAssembly *assembly) { @@ -274,26 +384,39 @@ mono_assembly_close (MonoAssembly *assembly) fclose (assembly->f); if (assembly->image_info){ - dotnet_image_info_t *ii = assembly->image_info; + cli_image_info_t *ii = assembly->image_info; + int i; - if (ii->dn_metadata.raw_metadata != NULL) - raw_buffer_free (ii->dn_metadata.raw_metadata); + if (ii->cli_metadata.raw_metadata != NULL) + raw_buffer_free (ii->cli_metadata.raw_metadata); - if (ii->dn_section_tables) - g_free (ii->dn_section_tables); - + for (i = 0; i < ii->cli_section_count; i++){ + if (!ii->cli_sections [i]) + continue; + raw_buffer_free (ii->cli_sections [i]); + } + if (ii->cli_section_tables) + g_free (ii->cli_section_tables); + if (ii->cli_sections) + g_free (ii->cli_sections); g_free (assembly->image_info); } g_free (assembly); } +/** + * mono_assembly_strerror: + * @status: an code indicating the result from a recent operation + * + * Returns: a string describing the error + */ const char * mono_assembly_strerror (enum MonoAssemblyOpenStatus status) { switch (status){ case MONO_ASSEMBLY_OK: - return "succes"; + return "success"; case MONO_ASSEMBLY_ERROR_ERRNO: return strerror (errno); case MONO_ASSEMBLY_IMAGE_INVALID: @@ -301,3 +424,4 @@ mono_assembly_strerror (enum MonoAssemblyOpenStatus status) } return "Internal error"; } + diff --git a/mono/metadata/assembly.h b/mono/metadata/assembly.h index dcec354f007..bcb592eec89 100644 --- a/mono/metadata/assembly.h +++ b/mono/metadata/assembly.h @@ -12,9 +12,15 @@ enum MonoAssemblyOpenStatus { MONO_ASSEMBLY_IMAGE_INVALID }; -MonoAssembly *mono_assembly_open (const char *fname, enum MonoAssemblyOpenStatus *status); -void mono_assembly_close (MonoAssembly *assembly); - +MonoAssembly *mono_assembly_open (const char *fname, + enum MonoAssemblyOpenStatus *status); +void mono_assembly_close (MonoAssembly *assembly); const char *mono_assembly_strerror (enum MonoAssemblyOpenStatus status); + + +int mono_assembly_ensure_section (MonoAssembly *assembly, + const char *section); +int mono_assembly_ensure_section_idx (MonoAssembly *assembly, + int section); #endif diff --git a/mono/metadata/blobsig.h b/mono/metadata/blobsig.h new file mode 100644 index 00000000000..a6d01b810c1 --- /dev/null +++ b/mono/metadata/blobsig.h @@ -0,0 +1,8 @@ +#ifndef _MONO_METADATA_BLOB_SIG_H_ +#define _MONO_METADATA_BLOB_SIG_H_ + +#define SIGNATURE_HAS_THIS 0x20 +#define SIGNATURE_EXPLICIT_THIS 0x40 +#define SIGNATURE_VARARG 0x05 + +#endif diff --git a/mono/metadata/cil-coff.h b/mono/metadata/cil-coff.h index ee4f001e2b0..6a11852422b 100644 --- a/mono/metadata/cil-coff.h +++ b/mono/metadata/cil-coff.h @@ -110,6 +110,7 @@ typedef struct { #define SECT_FLAGS_MEM_READ 0x40000000 #define SECT_FLAGS_MEM_WRITE 0x80000000 guint32 st_flags; + } section_table_t; typedef struct { @@ -144,13 +145,15 @@ typedef struct { /* This is not an on-disk structure */ typedef struct { - dotnet_header_t dn_header; - int dn_section_count; - section_table_t *dn_section_tables; - cli_header_t dn_cli_header; - - metadata_t dn_metadata; -} dotnet_image_info_t; + dotnet_header_t cli_header; + int cli_section_count; + section_table_t *cli_section_tables; + void **cli_sections; + cli_header_t cli_cli_header; + metadata_t cli_metadata; +} cli_image_info_t; +guint32 cli_rva_image_map (cli_image_info_t *iinfo, guint32 rva); +char *cli_rva_map (cli_image_info_t *iinfo, guint32 rva); diff --git a/mono/metadata/eltype.h b/mono/metadata/eltype.h new file mode 100644 index 00000000000..f7cb5c796a6 --- /dev/null +++ b/mono/metadata/eltype.h @@ -0,0 +1,43 @@ +#ifndef _MONO_METADATA_ELTYPE_H_ +#define _MONO_METADATA_ELTYPE_H_ + +/* + * Encoding for type signatures used in the Metadata + */ +typedef enum { + ELEMENT_TYPE_END = 0x00, /* End of List */ + ELEMENT_TYPE_VOID = 0x01, + ELEMENT_TYPE_BOOLEAN = 0x02, + ELEMENT_TYPE_CHAR = 0x03, + ELEMENT_TYPE_I1 = 0x04, + ELEMENT_TYPE_U1 = 0x05, + ELEMENT_TYPE_I2 = 0x06, + ELEMENT_TYPE_U2 = 0x07, + ELEMENT_TYPE_I4 = 0x08, + ELEMENT_TYPE_U4 = 0x09, + ELEMENT_TYPE_I8 = 0x0a, + ELEMENT_TYPE_U8 = 0x0b, + ELEMENT_TYPE_R4 = 0x0c, + ELEMENT_TYPE_R8 = 0x0d, + ELEMENT_TYPE_STRING = 0x0e, + ELEMENT_TYPE_PTR = 0x0f, /* arg: <type> token */ + ELEMENT_TYPE_BYREF = 0x10, /* arg: <type> token */ + ELEMENT_TYPE_VALUETYPE = 0x11, /* arg: <type> token */ + ELEMENT_TYPE_CLASS = 0x12, /* arg: <type> token */ + ELEMENT_TYPE_ARRAY = 0x14, /* type, rank, boundsCount, bound1, loCount, lo1 */ + ELEMENT_TYPE_TYPEDBYREF = 0x15, + ELEMENT_TYPE_I = 0x18, + ELEMENT_TYPE_U = 0x19, + ELEMENT_TYPE_FNPTR = 0x1b, /* arg: full method signature */ + ELEMENT_TYPE_OBJECT = 0x1c, + ELEMENT_TYPE_SZARRAY = 0x1d, /* 0-based one-dim-array */ + ELEMENT_TYPE_CMOD_REQD = 0x1f, /* arg: typedef or typeref token */ + ELEMENT_TYPE_CMOD_OPT = 0x20, /* optional arg: typedef or typref token */ + ELEMENT_TYPE_INTERNAL = 0x21, /* CLR internal type */ + + ELEMENT_TYPE_MODIFIER = 0x40, /* Or with the following types */ + ELEMENT_TYPE_SENTINEL = 0x41, /* Sentinel for varargs method signature */ + ELEMENT_TYPE_PINNED = 0x45, /* Local var that points to pinned object */ +} ElementTypeEnum; + +#endif /* _MONO_METADATA_ELTYPE_H_ */ diff --git a/mono/metadata/endian.h b/mono/metadata/endian.h new file mode 100644 index 00000000000..8da0e4126e0 --- /dev/null +++ b/mono/metadata/endian.h @@ -0,0 +1,13 @@ +#ifndef _MONO_METADATA_ENDIAN_H_ +#define _MONO_METADATA_ENDIAN_H_ 1 + +/* FIXME: implement big endian versions */ + +#define le64_to_cpu(x) (x) +#define le32_to_cpu(x) (x) +#define le16_to_cpu(x) (x) +#define read32(x) le32_to_cpu (*((guint32 *) (x))) +#define read16(x) le16_to_cpu (*((guint16 *) (x))) +#define read64(x) le64_to_cpu (*((guint64 *) (x))) + +#endif /* _MONO_METADATA_ENDIAN_H_ */ diff --git a/mono/metadata/fieldattr.h b/mono/metadata/fieldattr.h new file mode 100644 index 00000000000..8b2e50e3680 --- /dev/null +++ b/mono/metadata/fieldattr.h @@ -0,0 +1,34 @@ +#ifndef _MONO_METADATA_FIELDATTR_H_ +#define _MONO_METADATA_FIELDATTR_H_ +/* + * Flags for bitmasks in the metadata tables + */ + +/* + * Field Attributes (21.1.5). + */ + +#define FIELD_ATTRIBUTE_FIELD_ACCESS_MASK 0x0007 +#define FIELD_ATTRIBUTE_COMPILER_CONTROLLED 0x0000 +#define FIELD_ATTRIBUTE_PRIVATE 0x0001 +#define FIELD_ATTRIBUTE_FAM_AND_ASSEM 0x0002 +#define FIELD_ATTRIBUTE_ASSEMBLY 0x0003 +#define FIELD_ATTRIBUTE_FAMILY 0x0004 +#define FIELD_ATTRIBUTE_FAM_OR_ASSEM 0x0005 +#define FIELD_ATTRIBUTE_PUBLIC 0x0006 + +#define FIELD_ATTRIBUTE_STATIC 0x0010 +#define FIELD_ATTRIBUTE_INIT_ONLY 0x0020 +#define FIELD_ATTRIBUTE_LITERAL 0x0040 +#define FIELD_ATTRIBUTE_NOT_SERIALIZED 0x0080 +#define FIELD_ATTRIBUTE_SPECIAL_NAME 0x0200 +#define FIELD_ATTRIBUTE_PINVOKE_IMPL 0x2000 + +/* For runtime use only */ +#define FIELD_ATTRIBUTE_RESERVED_MASK 0x9500 +#define FIELD_ATTRIBUTE_RT_SPECIAL_NAME 0x0400 +#define FIELD_ATTRIBUTE_HAS_FIELD_MARSHAL 0x1000 +#define FIELD_ATTRIBUTE_HAS_DEFAULT 0x8000 +#define FIELD_ATTRIBUTE_HAS_FIELD_RVA 0x0100 + +#endif diff --git a/mono/metadata/metadata.c b/mono/metadata/metadata.c index 02db6e5c04b..65dd4a76620 100644 --- a/mono/metadata/metadata.c +++ b/mono/metadata/metadata.c @@ -8,6 +8,883 @@ */ #include <config.h> +#include <stdio.h> #include <glib.h> #include "metadata.h" +#include "methodheader.h" +#include "endian.h" +/* + * Encoding of the "description" argument: + * + * identifier [CODE ARG] + * + * If CODE is ':', then a lookup on table ARG is performed + * If CODE is '=', then a lookup in the aliased-table ARG is performed + * If CODE is '#', then this encodes a flag, ARG is the flag name. + * + * Aliased table for example is `CustomAttributeType' which depending on the + * information might refer to different tables. + */ + +static MonoMetaTable AssemblySchema [] = { + { MONO_MT_UINT32, "HashId" }, + { MONO_MT_UINT16, "Major" }, + { MONO_MT_UINT16, "Minor" }, + { MONO_MT_UINT16, "BuildNumber" }, + { MONO_MT_UINT16, "RevisionNumber" }, + { MONO_MT_UINT32, "Flags" }, + { MONO_MT_BLOB_IDX, "PublicKey" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_STRING_IDX, "Culture" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable AssemblyOSSchema [] = { + { MONO_MT_UINT32, "OSPlatformID" }, + { MONO_MT_UINT32, "OSMajor" }, + { MONO_MT_UINT32, "OSMinor" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable AssemblyProcessorSchema [] = { + { MONO_MT_UINT32, "Processor" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable AssemblyRefSchema [] = { + { MONO_MT_UINT16, "Major" }, + { MONO_MT_UINT16, "Minor" }, + { MONO_MT_UINT16, "Build" }, + { MONO_MT_UINT16, "Revision" }, + { MONO_MT_UINT32, "Flags" }, + { MONO_MT_BLOB_IDX, "PublicKeyOrToken" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_STRING_IDX, "Culture" }, + { MONO_MT_BLOB_IDX, "HashValue" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable AssemblyRefOSSchema [] = { + { MONO_MT_UINT32, "OSPlatformID" }, + { MONO_MT_UINT32, "OSMajorVersion" }, + { MONO_MT_UINT32, "OSMinorVersion" }, + { MONO_MT_TABLE_IDX, "AssemblyRef:AssemblyRef" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable AssemblyRefProcessorSchema [] = { + { MONO_MT_UINT32, "Processor" }, + { MONO_MT_TABLE_IDX, "AssemblyRef:AssemblyRef" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ClassLayoutSchema [] = { + { MONO_MT_UINT16, "PackingSize" }, + { MONO_MT_UINT32, "ClassSize" }, + { MONO_MT_TABLE_IDX, "Parent:TypeDef" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ConstantSchema [] = { + { MONO_MT_UINT8, "Type" }, + { MONO_MT_UINT8, "PaddingZero" }, + { MONO_MT_CONST_IDX, "Parent" }, + { MONO_MT_BLOB_IDX, "Value" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable CustomAttributeSchema [] = { + { MONO_MT_HASCAT_IDX, "Parent" }, + { MONO_MT_CAT_IDX, "Type" }, + { MONO_MT_BLOB_IDX, "Value" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable DeclSecuritySchema [] = { + { MONO_MT_UINT16, "Action" }, + { MONO_MT_HASDEC_IDX, "Parent" }, + { MONO_MT_BLOB_IDX, "PermissionSet" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable EventMapSchema [] = { + { MONO_MT_TABLE_IDX, "Parent:TypeDef" }, + { MONO_MT_TABLE_IDX, "EventList:Event" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable EventSchema [] = { + { MONO_MT_UINT16, "EventFlags#EventAttribute" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_TABLE_IDX, "EventType" }, /* TypeDef or TypeRef */ + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ExportedTypeSchema [] = { + { MONO_MT_UINT32, "Flags" }, + { MONO_MT_TABLE_IDX, "TypeDefId" }, + { MONO_MT_STRING_IDX, "TypeName" }, + { MONO_MT_STRING_IDX, "TypeNameSpace" }, + { MONO_MT_IMPL_IDX, "Implementation" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable FieldSchema [] = { + { MONO_MT_UINT16, "Flags" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_BLOB_IDX, "Signature" }, + { MONO_MT_END, NULL } +}; +static MonoMetaTable FieldLayoutSchema [] = { + { MONO_MT_UINT32, "Offset" }, + { MONO_MT_TABLE_IDX, "Field:Field" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable FieldMarshalSchema [] = { + { MONO_MT_HFM_IDX, "Parent" }, + { MONO_MT_BLOB_IDX, "NativeType" }, + { MONO_MT_END, NULL } +}; +static MonoMetaTable FieldRVASchema [] = { + { MONO_MT_UINT32, "RVA" }, + { MONO_MT_TABLE_IDX, "Field:Field" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable FileSchema [] = { + { MONO_MT_UINT32, "Flags" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_BLOB_IDX, "Value" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ImplMapSchema [] = { + { MONO_MT_UINT16, "MappingFlag" }, + { MONO_MT_MF_IDX, "MemberForwarded" }, + { MONO_MT_STRING_IDX, "ImportName" }, + { MONO_MT_TABLE_IDX, "ImportScope:ModuleRef" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable InterfaceImplSchema [] = { + { MONO_MT_TABLE_IDX, "Class:TypeDef" }, + { MONO_MT_TDOR_IDX, "Interface=TypeDefOrRef" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ManifestResourceSchema [] = { + { MONO_MT_UINT32, "Offset" }, + { MONO_MT_UINT32, "Flags" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_IMPL_IDX, "Implementation" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable MemberRefSchema [] = { + { MONO_MT_MRP_IDX, "Class" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_BLOB_IDX, "Signature" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable MethodSchema [] = { + { MONO_MT_UINT32, "RVA" }, + { MONO_MT_UINT16, "ImplFlags#MethodImplAttributes" }, + { MONO_MT_UINT16, "Flags#MethodAttribute" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_BLOB_IDX, "Signature" }, + { MONO_MT_TABLE_IDX, "ParamList:Param" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable MethodImplSchema [] = { + { MONO_MT_TABLE_IDX, "Class:TypeDef" }, + { MONO_MT_MDOR_IDX, "MethodBody" }, + { MONO_MT_MDOR_IDX, "MethodDeclaration" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable MethodSemanticsSchema [] = { + { MONO_MT_UINT16, "MethodSemantic" }, + { MONO_MT_TABLE_IDX, "Method:Method" }, + { MONO_MT_HS_IDX, "Association" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ModuleSchema [] = { + { MONO_MT_UINT16, "Generation" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_GUID_IDX, "MVID" }, + { MONO_MT_GUID_IDX, "EncID" }, + { MONO_MT_GUID_IDX, "EncBaseID" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ModuleRefSchema [] = { + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable NestedClassSchema [] = { + { MONO_MT_TABLE_IDX, "NestedClass:TypeDef" }, + { MONO_MT_TABLE_IDX, "EnclosingClass:TypeDef" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable ParamSchema [] = { + { MONO_MT_UINT16, "Flags" }, + { MONO_MT_UINT16, "Sequence" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable PropertySchema [] = { + { MONO_MT_UINT16, "Flags" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_BLOB_IDX, "Type" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable PropertyMapSchema [] = { + { MONO_MT_TABLE_IDX, "Parent:TypeDef" }, + { MONO_MT_TABLE_IDX, "PropertyList:Property" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable StandaloneSigSchema [] = { + { MONO_MT_BLOB_IDX, "Signature" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable TypeDefSchema [] = { + { MONO_MT_UINT32, "Flags" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_STRING_IDX, "Namespace" }, + { MONO_MT_TDOR_IDX, "Extends" }, + { MONO_MT_TABLE_IDX, "FieldList:Field" }, + { MONO_MT_TABLE_IDX, "MethodList:Method" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable TypeRefSchema [] = { + { MONO_MT_RS_IDX, "ResolutionScope=ResolutionScope" }, + { MONO_MT_STRING_IDX, "Name" }, + { MONO_MT_STRING_IDX, "Namespace" }, + { MONO_MT_END, NULL } +}; + +static MonoMetaTable TypeSpecSchema [] = { + { MONO_MT_BLOB_IDX, "Signature" }, + { MONO_MT_END, NULL } +}; + +static struct { + MonoMetaTable *table; + const char *name; +} tables [] = { + /* 0 */ { ModuleSchema, "Module" }, + /* 1 */ { TypeRefSchema, "TypeRef" }, + /* 2 */ { TypeDefSchema, "TypeDef" }, + /* 3 */ { NULL, NULL }, + /* 4 */ { FieldSchema, "Field" }, + /* 5 */ { NULL, NULL }, + /* 6 */ { MethodSchema, "Method" }, + /* 7 */ { NULL, NULL }, + /* 8 */ { ParamSchema, "Param" }, + /* 9 */ { InterfaceImplSchema, "InterfaceImpl" }, + /* A */ { MemberRefSchema, "MemberRef" }, + /* B */ { ConstantSchema, "Constant" }, + /* C */ { CustomAttributeSchema, "CustomAttribute" }, + /* D */ { FieldMarshalSchema, "FieldMarshal" }, + /* E */ { DeclSecuritySchema, "DeclSecurity" }, + /* F */ { ClassLayoutSchema, "ClassLayout" }, + /* 10 */ { FieldLayoutSchema, "FieldLayout" }, + /* 11 */ { StandaloneSigSchema, "StandaloneSig" }, + /* 12 */ { EventMapSchema, "EventMap" }, + /* 13 */ { NULL, NULL }, + /* 14 */ { EventSchema, "Event" }, + /* 15 */ { PropertyMapSchema, "PropertyMap" }, + /* 16 */ { NULL, NULL }, + /* 17 */ { PropertySchema, "PropertyTable" }, + /* 18 */ { MethodSemanticsSchema, "MethodSemantics" }, + /* 19 */ { MethodImplSchema, "MethodImpl" }, + /* 1A */ { ModuleRefSchema, "ModuleRef" }, + /* 1B */ { TypeSpecSchema, "TypeSpec" }, + /* 1C */ { ImplMapSchema, "ImplMap" }, + /* 1D */ { FieldRVASchema, "FieldRVA" }, + /* 1E */ { NULL, NULL }, + /* 1F */ { NULL, NULL }, + /* 20 */ { AssemblySchema, "Assembly" }, + /* 21 */ { AssemblyProcessorSchema, "AssemblyProcessor" }, + /* 22 */ { AssemblyOSSchema, "AssemblyOS" }, + /* 23 */ { AssemblyRefSchema, "AssemblyRef" }, + /* 24 */ { AssemblyRefProcessorSchema, "AssemblyRefProcessor" }, + /* 25 */ { AssemblyRefOSSchema, "AssemblyRefOS" }, + /* 26 */ { FileSchema, "File" }, + /* 27 */ { ExportedTypeSchema, "ExportedType" }, + /* 28 */ { ManifestResourceSchema, "ManifestResource" }, + /* 29 */ { NestedClassSchema, "NestedClass" }, + /* 2A */ { NULL, NULL }, + /* 2B */ { NULL, NULL }, +}; + +/** + * mono_meta_table_name: + * @table: table index + * + * Returns the name for the @table index + */ +const char * +mono_meta_table_name (int table) +{ + if ((table < 0) || (table > 0x29)) + return ""; + + return tables [table].name; +} + +/* The guy who wrote the spec for this should not be allowed near a + * computer again. + +If e is a coded token(see clause 23.1.7) that points into table ti out of n possible tables t0, .. tn-1, +then it is stored as e << (log n) & tag{ t0, .. tn-1}[ ti] using 2 bytes if the maximum number of +rows of tables t0, ..tn-1, is less than 2^16 - (log n), and using 4 bytes otherwise. The family of +finite maps tag{ t0, ..tn-1} is defined below. Note that to decode a physical row, you need the +inverse of this mapping. + + */ +#define rtsize(s,b) (((s) < (1 << (b)) ? 2 : 4)) +#define idx_size(tableidx) (meta->tables [(tableidx)].rows < 65536 ? 2 : 4) + +/* Reference: Partition II - 23.2.6 */ +static int +compute_size (metadata_t *meta, MonoMetaTable *table, int tableindex, guint32 *result_bitfield) +{ + guint32 bitfield = 0; + int size = 0, field_size; + int i, n, code; + int shift = 0; + + for (i = 0; (code = table [i].code) != MONO_MT_END; i++){ + switch (code){ + case MONO_MT_UINT32: + field_size = 4; break; + + case MONO_MT_UINT16: + field_size = 2; break; + + case MONO_MT_UINT8: + field_size = 1; break; + + case MONO_MT_BLOB_IDX: + field_size = meta->idx_blob_wide ? 4 : 2; break; + + case MONO_MT_STRING_IDX: + field_size = meta->idx_string_wide ? 4 : 2; break; + + case MONO_MT_GUID_IDX: + field_size = meta->idx_guid_wide ? 4 : 2; break; + + case MONO_MT_TABLE_IDX: + /* Uhm, a table index can point to other tables besides the current one + * so, it's not correct to use the rowcount of the current table to + * get the size for this column - lupus + */ + switch (tableindex) { + case META_TABLE_ASSEMBLYREFOS: + g_assert (i == 3); + field_size = idx_size (META_TABLE_ASSEMBLYREF); break; + case META_TABLE_ASSEMBLYPROCESSOR: + g_assert (i == 1); + field_size = idx_size (META_TABLE_ASSEMBLYREF); break; + case META_TABLE_CLASSLAYOUT: + g_assert (i == 2); + field_size = idx_size (META_TABLE_TYPEDEF); break; + case META_TABLE_EVENTMAP: + g_assert (i == 0 || i == 1); + field_size = i ? idx_size (META_TABLE_EVENT): + idx_size(META_TABLE_TYPEDEF); + break; + case META_TABLE_EVENT: + g_assert (i == 2); + field_size = MAX (idx_size (META_TABLE_TYPEDEF), idx_size(META_TABLE_TYPEREF)); + field_size = MAX (field_size, idx_size(META_TABLE_TYPESPEC)); + break; + case META_TABLE_EXPORTEDTYPE: + g_assert (i == 1); + field_size = idx_size (META_TABLE_TYPEDEF); break; + case META_TABLE_FIELDLAYOUT: + g_assert (i == 1); + field_size = idx_size (META_TABLE_FIELD); break; + case META_TABLE_FIELDRVA: + g_assert (i == 1); + field_size = idx_size (META_TABLE_FIELD); break; + case META_TABLE_IMPLMAP: + g_assert (i == 3); + field_size = idx_size (META_TABLE_MODULEREF); break; + case META_TABLE_INTERFACEIMPL: + g_assert (i == 0); + field_size = idx_size (META_TABLE_TYPEDEF); break; + case META_TABLE_METHOD: + g_assert (i == 5); + field_size = idx_size (META_TABLE_PARAM); break; + case META_TABLE_METHODIMPL: + g_assert (i == 0); + field_size = idx_size (META_TABLE_TYPEDEF); break; + case META_TABLE_METHODSEMANTICS: + g_assert (i == 1); + field_size = idx_size (META_TABLE_METHOD); break; + case META_TABLE_NESTEDCLASS: + g_assert (i == 0 || i == 1); + field_size = idx_size (META_TABLE_TYPEDEF); break; + case META_TABLE_PROPERTYMAP: + g_assert (i == 0 || i == 1); + field_size = i ? idx_size (META_TABLE_PROPERTY): + idx_size(META_TABLE_TYPEDEF); + break; + case META_TABLE_TYPEDEF: + g_assert (i == 4 || i == 5); + field_size = i == 4 ? idx_size (META_TABLE_FIELD): + idx_size(META_TABLE_METHOD); + break; + default: + g_assert_not_reached (); + } + if (field_size != idx_size (tableindex)) + g_warning ("size changed (%d to %d)", idx_size (tableindex), field_size); + + break; + + /* + * HasConstant: ParamDef, FieldDef, Property + */ + case MONO_MT_CONST_IDX: + n = MAX (meta->tables [META_TABLE_PARAM].rows, + meta->tables [META_TABLE_FIELD].rows); + n = MAX (n, meta->tables [META_TABLE_PROPERTY].rows); + + /* 2 bits to encode tag */ + field_size = rtsize (n, 16-2); + break; + + /* + * HasCustomAttribute: points to any table but + * itself. + */ + case MONO_MT_HASCAT_IDX: + /* + * We believe that since the signature and + * permission are indexing the Blob heap, + * we should consider the blob size first + */ + /* I'm not a believer - lupus + if (meta->idx_blob_wide){ + field_size = 4; + break; + }*/ + + n = MAX (meta->tables [META_TABLE_METHOD].rows, + meta->tables [META_TABLE_FIELD].rows); + n = MAX (n, meta->tables [META_TABLE_TYPEREF].rows); + n = MAX (n, meta->tables [META_TABLE_TYPEDEF].rows); + n = MAX (n, meta->tables [META_TABLE_PARAM].rows); + n = MAX (n, meta->tables [META_TABLE_INTERFACEIMPL].rows); + n = MAX (n, meta->tables [META_TABLE_MEMBERREF].rows); + n = MAX (n, meta->tables [META_TABLE_MODULE].rows); + /* Permission seems to be a blob heap pointer */ + n = MAX (n, meta->tables [META_TABLE_PROPERTY].rows); + n = MAX (n, meta->tables [META_TABLE_EVENT].rows); + /* Signature seems to be a blob heap pointer */ + n = MAX (n, meta->tables [META_TABLE_MODULEREF].rows); + n = MAX (n, meta->tables [META_TABLE_TYPESPEC].rows); + n = MAX (n, meta->tables [META_TABLE_ASSEMBLY].rows); + n = MAX (n, meta->tables [META_TABLE_ASSEMBLYREF].rows); + n = MAX (n, meta->tables [META_TABLE_FILE].rows); + n = MAX (n, meta->tables [META_TABLE_EXPORTEDTYPE].rows); + n = MAX (n, meta->tables [META_TABLE_MANIFESTRESOURCE].rows); + + /* 5 bits to encode */ + field_size = rtsize (n, 16-5); + break; + + /* + * CustomAttributeType: TypeDef, TypeRef, MethodDef, + * MemberRef and String. + */ + case MONO_MT_CAT_IDX: + /* String is a heap, if it is wide, we know the size */ + /* See above, nope. + if (meta->idx_string_wide){ + field_size = 4; + break; + }*/ + + n = MAX (meta->tables [META_TABLE_TYPEREF].rows, + meta->tables [META_TABLE_TYPEDEF].rows); + n = MAX (n, meta->tables [META_TABLE_METHOD].rows); + n = MAX (n, meta->tables [META_TABLE_MEMBERREF].rows); + + /* 3 bits to encode */ + field_size = rtsize (n, 16-3); + break; + + /* + * HasDeclSecurity: Typedef, MethodDef, Assembly + */ + case MONO_MT_HASDEC_IDX: + n = MAX (meta->tables [META_TABLE_TYPEDEF].rows, + meta->tables [META_TABLE_METHOD].rows); + n = MAX (n, meta->tables [META_TABLE_ASSEMBLY].rows); + + /* 2 bits to encode */ + field_size = rtsize (n, 16-2); + break; + + /* + * Implementation: File, AssemblyRef, ExportedType + */ + case MONO_MT_IMPL_IDX: + n = MAX (meta->tables [META_TABLE_FILE].rows, + meta->tables [META_TABLE_ASSEMBLYREF].rows); + n = MAX (n, meta->tables [META_TABLE_EXPORTEDTYPE].rows); + + /* 2 bits to encode tag */ + field_size = rtsize (n, 16-2); + break; + + /* + * HasFieldMarshall: FieldDef, ParamDef + */ + case MONO_MT_HFM_IDX: + n = MAX (meta->tables [META_TABLE_FIELD].rows, + meta->tables [META_TABLE_PARAM].rows); + + /* 1 bit used to encode tag */ + field_size = rtsize (n, 16-1); + break; + + /* + * MemberForwarded: FieldDef, MethodDef + */ + case MONO_MT_MF_IDX: + n = MAX (meta->tables [META_TABLE_FIELD].rows, + meta->tables [META_TABLE_METHOD].rows); + + /* 1 bit used to encode tag */ + field_size = rtsize (n, 16-1); + break; + + /* + * TypeDefOrRef: TypeDef, ParamDef, TypeSpec + */ + case MONO_MT_TDOR_IDX: + n = MAX (meta->tables [META_TABLE_TYPEDEF].rows, + meta->tables [META_TABLE_PARAM].rows); + n = MAX (n, meta->tables [META_TABLE_TYPESPEC].rows); + + /* 2 bits to encode */ + field_size = rtsize (n, 16-2); + break; + + /* + * MemberRefParent: TypeDef, TypeRef, ModuleDef, ModuleRef, TypeSpec + */ + case MONO_MT_MRP_IDX: + n = MAX (meta->tables [META_TABLE_TYPEDEF].rows, + meta->tables [META_TABLE_TYPEREF].rows); + n = MAX (n, meta->tables [META_TABLE_MODULE].rows); + n = MAX (n, meta->tables [META_TABLE_MODULEREF].rows); + n = MAX (n, meta->tables [META_TABLE_TYPESPEC].rows); + + /* 3 bits to encode */ + field_size = rtsize (n, 16 - 3); + break; + + case MONO_MT_MDOR_IDX: + + /* + * MethodDefOrRef: MethodDef, MemberRef + */ + case MONO_MT_HS_IDX: + n = MAX (meta->tables [META_TABLE_METHOD].rows, + meta->tables [META_TABLE_MEMBERREF].rows); + + /* 1 bit used to encode tag */ + field_size = rtsize (n, 16-1); + break; + + /* + * ResolutionScope: Module, ModuleRef, AssemblyRef, TypeRef + */ + case MONO_MT_RS_IDX: + n = MAX (meta->tables [META_TABLE_MODULE].rows, + meta->tables [META_TABLE_MODULEREF].rows); + n = MAX (n, meta->tables [META_TABLE_ASSEMBLYREF].rows); + n = MAX (n, meta->tables [META_TABLE_TYPEREF].rows); + + /* 2 bits used to encode tag (ECMA spec claims 3) */ + field_size = rtsize (n, 16 - 2); + break; + } + + /* + * encode field size as follows (we just need to + * distinguish them). + * + * 4 -> 3 + * 2 -> 1 + * 1 -> 0 + */ + bitfield |= (field_size-1) << shift; + shift += 2; + size += field_size; + /*g_print ("table %02x field %d size %d\n", tableindex, i, field_size);*/ + } + + *result_bitfield = (i << 24) | bitfield; + return size; +} + +/** + * mono_metadata_compute_table_bases: + * @meta: metadata context to compute table values + * + * Computes the table bases for the metadata structure. + * This is an internal function used by the image loader code. + */ +void +mono_metadata_compute_table_bases (metadata_t *meta) +{ + int i; + char *base = meta->tables_base; + + for (i = 0; i < 64; i++){ + if (meta->tables [i].rows == 0) + continue; + + meta->tables [i].row_size = compute_size ( + meta, tables [i].table, i, + &meta->tables [i].size_bitfield); + meta->tables [i].base = base; + base += meta->tables [i].rows * meta->tables [i].row_size; + } +} + +/** + * mono_metadata_locate: + * @meta: metadata context + * @table: table code. + * @idx: index of element to retrieve from @table. + * + * Returns a pointer to the @idx element in the metadata table + * whose code is @table. + */ +char * +mono_metadata_locate (metadata_t *meta, int table, int idx) +{ + /* idx == 0 refers always to NULL */ + + return meta->tables [table].base + (meta->tables [table].row_size * (idx - 1)); +} + +char * +mono_metadata_locate_token (metadata_t *meta, guint32 token) +{ + return mono_metadata_locate (meta, token >> 24, token & 0xffffff); +} + +/** + * mono_metadata_get_table: + * @table: table to retrieve + * + * Returns the MonoMetaTable structure for table @table + */ +MonoMetaTable * +mono_metadata_get_table (MetaTableEnum table) +{ + int x = (int) table; + + g_return_val_if_fail ((x > 0) && (x <= META_TABLE_LAST), NULL); + + return tables [table].table; +} + +/** + * mono_metadata_string_heap: + * @meta: metadata context + * @index: index into the string heap. + * + * Returns: an in-memory pointer to the @index in the string heap. + */ +const char * +mono_metadata_string_heap (metadata_t *meta, guint32 index) +{ + g_return_val_if_fail (index < meta->heap_strings.sh_size, ""); + return meta->raw_metadata + meta->heap_strings.sh_offset + index; +} + +const char * +mono_metadata_user_string (metadata_t *meta, guint32 index) +{ + g_return_val_if_fail (index < meta->heap_us.sh_size, ""); + return meta->raw_metadata + meta->heap_us.sh_offset + index; +} + +/** + * mono_metadata_blob_heap: + * @meta: metadata context + * @index: index into the blob. + * + * Returns: an in-memory pointer to the @index in the Blob heap. + */ +const char * +mono_metadata_blob_heap (metadata_t *meta, guint32 index) +{ + g_return_val_if_fail (index < meta->heap_blob.sh_size, ""); + return meta->raw_metadata + meta->heap_blob.sh_offset + index; +} + +static const char * +dword_align (const char *ptr) +{ + return (const char *) (((guint32) (ptr + 3)) & ~3); +} + +static MonoMetaExceptionHandler * +parse_exception_handler (const char *ptr, gboolean is_fat) +{ + MonoMetaExceptionHandler *eh = g_new0 (MonoMetaExceptionHandler, 1); + int size; + + eh->kind = (MonoMetaExceptionEnum) *ptr; + ptr++; + if (is_fat) + size = (ptr [0] << 16) | (ptr [1] << 8) | ptr [2]; + else + size = (unsigned char) ptr [0]; + + /* + * It must be aligned + */ + ptr += 4; + g_assert ((((guint32) ptr) & 3) == 0); + + if (is_fat){ + printf ("Records: %d (%d)\n", size / 12, size); + + } else { + printf ("Records: %d (%d)\n", size / 12, size); + + } + + return eh; +} + +/** + * @mh: The Method header + * @ptr: Points to the beginning of the Section Data (25.3) + */ +static void +parse_section_data (MonoMetaMethodHeader *mh, const char *ptr) +{ +#if 0 + while ((*ptr) & METHOD_HEADER_SECTION_MORE_SECTS){ + /* align on 32-bit boundary */ + /* FIXME: not 64-bit clean code */ + ptr = dword_align (ptr); + + sect_data_flags = *ptr; + ptr++; + + if (sect_data_flags & METHOD_HEADER_SECTION_MORE_SECTS){ + g_error ("Can not deal with more sections"); + } + + if (sect_data_flags & METHOD_HEADER_SECTION_FAT_FORMAT){ + sect_data_len = + } else { + sect_data_len = ptr [0]; + ptr++; + } + + if (!(sect_data_flags & METHOD_HEADER_SECTION_EHTABLE)) + return mh; + + ptr = dword_align (ptr); + } +#endif +} + +MonoMetaMethodHeader * +mono_metadata_parse_mh (const char *ptr) +{ + MonoMetaMethodHeader *mh; + unsigned char flags = *(unsigned char *) ptr; + unsigned char format = flags & METHOD_HEADER_FORMAT_MASK; + guint16 fat_flags; + int hsize; + + g_return_val_if_fail (ptr != NULL, NULL); + g_return_val_if_fail (mh != NULL, NULL); + + mh = g_new0 (MonoMetaMethodHeader, 1); + switch (format){ + case METHOD_HEADER_TINY_FORMAT: + ptr++; + mh->max_stack = 8; + mh->local_var_sig_tok = 0; + mh->code_size = flags >> 2; + mh->code = ptr; + break; + + case METHOD_HEADER_TINY_FORMAT1: + ptr++; + mh->max_stack = 8; + mh->local_var_sig_tok = 0; + mh->code_size = flags >> 3; + mh->code = ptr; + break; + + case METHOD_HEADER_FAT_FORMAT: + fat_flags = read16 (ptr); + ptr += 2; + hsize = (fat_flags >> 12) & 0xf; + mh->max_stack = *(guint16 *) ptr; + ptr += 2; + mh->code_size = *(guint32 *) ptr; + ptr += 4; + mh->local_var_sig_tok = *(guint32 *) ptr; + ptr += 4; + + if (fat_flags & METHOD_HEADER_INIT_LOCALS) + mh->init_locals = 1; + else + mh->init_locals = 0; + + mh->code = ptr; + + if (!(fat_flags & METHOD_HEADER_MORE_SECTS)) + return mh; + + /* + * There are more sections + */ + ptr = mh->code + mh->code_size; + + parse_section_data (mh, ptr); + break; + + default: + return NULL; + } + + return mh; +} + +void +mono_metadata_free_mh (MonoMetaMethodHeader *mh) +{ + g_free (mh); +} diff --git a/mono/metadata/metadata.h b/mono/metadata/metadata.h index 6e34877013f..5a9c92f4123 100644 --- a/mono/metadata/metadata.h +++ b/mono/metadata/metadata.h @@ -1,18 +1,229 @@ typedef struct { - guint32 sh_offset; - guint32 sh_size; + guint32 sh_offset; + guint32 sh_size; } stream_header_t; +typedef enum { + META_TABLE_MODULE, + META_TABLE_TYPEREF, + META_TABLE_TYPEDEF, + META_TABLE_UNUSED1, + META_TABLE_FIELD, + META_TABLE_UNUSED2, + META_TABLE_METHOD, + META_TABLE_UNUSED3, + META_TABLE_PARAM, + META_TABLE_INTERFACEIMPL, + META_TABLE_MEMBERREF, + META_TABLE_CONSTANT, + META_TABLE_CUSTOMATTRIBUTE, + META_TABLE_FIELDMARSHAL, + META_TABLE_DECLSECURITY, + META_TABLE_CLASSLAYOUT, + META_TABLE_FIELDLAYOUT, + META_TABLE_STANDALONESIG, + META_TABLE_EVENTMAP, + META_TABLE_UNUSED4, + META_TABLE_EVENT, + META_TABLE_PROPERTYMAP, + META_TABLE_UNUSED5, + META_TABLE_PROPERTY, + META_TABLE_METHODSEMANTICS, + META_TABLE_METHODIMPL, + META_TABLE_MODULEREF, + META_TABLE_TYPESPEC, + META_TABLE_IMPLMAP, + META_TABLE_FIELDRVA, + META_TABLE_UNUSED6, + META_TABLE_UNUSED7, + META_TABLE_ASSEMBLY, + META_TABLE_ASSEMBLYPROCESSOR, + META_TABLE_ASSEMBLYOS, + META_TABLE_ASSEMBLYREF, + META_TABLE_ASSEMBLYREFPROCESSOR, + META_TABLE_ASSEMBLYREFOS, + META_TABLE_FILE, + META_TABLE_EXPORTEDTYPE, + META_TABLE_MANIFESTRESOURCE, + META_TABLE_NESTEDCLASS, + +#define META_TABLE_LAST META_TABLE_NESTEDCLASS +} MetaTableEnum; + typedef struct { - char *raw_metadata; + guint32 rows, row_size; + char *base; + + /* + * Tables contain up to 9 rows and the possible sizes of the + * fields in the documentation are 1, 2 and 4 bytes. So we + * can encode in 2 bits the size. + * + * A 32 bit value can encode the resulting size + * + * The top eight bits encode the number of columns in the table. + * we only need 4, but 8 is aligned no shift required. + */ + guint32 size_bitfield; +} metadata_tableinfo_t; - stream_header_t heap_strings; - stream_header_t heap_us; - stream_header_t heap_blob; - stream_header_t heap_guid; - stream_header_t heap_tables; +/* + * This macro is used to extract the size of the table encoded in + * the size_bitfield of metadata_tableinfo_t. + */ +#define meta_table_size(bitfield,table) ((((bitfield) >> ((table)*2)) & 0x3) + 1) +#define meta_table_count(bitfield) ((bitfield) >> 24) - guint32 rows [64]; +typedef struct { + char *raw_metadata; + + gboolean idx_string_wide, idx_guid_wide, idx_blob_wide; + + stream_header_t heap_strings; + stream_header_t heap_us; + stream_header_t heap_blob; + stream_header_t heap_guid; + stream_header_t heap_tables; + + char *tables_base; + + metadata_tableinfo_t tables [64]; } metadata_t; +/* + * This enumeration is used to describe the data types in the metadata + * tables + */ +enum { + MONO_MT_END, + + /* Sized elements */ + MONO_MT_UINT32, + MONO_MT_UINT16, + MONO_MT_UINT8, + + /* Index into Blob heap */ + MONO_MT_BLOB_IDX, + + /* Index into String heap */ + MONO_MT_STRING_IDX, + + /* GUID index */ + MONO_MT_GUID_IDX, + + /* Pointer into a table */ + MONO_MT_TABLE_IDX, + + /* HasConstant:Parent pointer (Param, Field or Property) */ + MONO_MT_CONST_IDX, + + /* HasCustomAttribute index. Indexes any table except CustomAttribute */ + MONO_MT_HASCAT_IDX, + + /* CustomAttributeType encoded index */ + MONO_MT_CAT_IDX, + + /* HasDeclSecurity index: TypeDef Method or Assembly */ + MONO_MT_HASDEC_IDX, + + /* Implementation coded index: File, Export AssemblyRef */ + MONO_MT_IMPL_IDX, + + /* HasFieldMarshal coded index: Field or Param table */ + MONO_MT_HFM_IDX, + + /* MemberForwardedIndex: Field or Method */ + MONO_MT_MF_IDX, + + /* TypeDefOrRef coded index: typedef, typeref, typespec */ + MONO_MT_TDOR_IDX, + + /* MemberRefParent coded index: typeref, moduleref, method, memberref, typesepc, typedef */ + MONO_MT_MRP_IDX, + + /* MethodDefOrRef coded index: Method or Member Ref table */ + MONO_MT_MDOR_IDX, + + /* HasSemantic coded index: Event or Property */ + MONO_MT_HS_IDX, + + /* ResolutionScope coded index: Module, ModuleRef, AssemblytRef, TypeRef */ + MONO_MT_RS_IDX +}; + +typedef struct { + int code; + char *def; +} MonoMetaTable; + +const char *mono_meta_table_name (int table); + +/* Internal functions */ +void mono_metadata_compute_table_bases (metadata_t *meta); + +MonoMetaTable *mono_metadata_get_table (MetaTableEnum table); + +/* + * + */ +char *mono_metadata_locate (metadata_t *meta, int table, int idx); +char *mono_metadata_locate_token (metadata_t *meta, guint32 token); + +const char *mono_metadata_string_heap (metadata_t *meta, guint32 index); +const char *mono_metadata_blob_heap (metadata_t *meta, guint32 index); +const char *mono_metadata_user_string (metadata_t *meta, guint32 index); + +typedef enum { + MONO_META_EXCEPTION_CLAUSE_NONE, + MONO_META_EXCEPTION_CLAUSE_FILTER, + MONO_META_EXCEPTION_CLAUSE_FINALLY, + MONO_META_EXCEPTION_CLAUSE_FAULT +} MonoMetaExceptionEnum; + + +typedef struct { + MonoMetaExceptionEnum kind; + int n_clauses; + void **clauses; +} MonoMetaExceptionHandler; + +typedef struct { + guint32 code_size; + const char *code; + short max_stack; + guint32 local_var_sig_tok; + + /* if local_var_sig_tok != 0, then the following apply: */ + unsigned int init_locals : 1; + + GList *exception_handler_list; +} MonoMetaMethodHeader; + +MonoMetaMethodHeader *mono_metadata_parse_mh (const char *ptr); +void mono_metadata_free_mh (MonoMetaMethodHeader *mh); + +/* + * Makes a token based on a table and an index + */ +#define mono_metadata_make_token(table,idx) (((table) << 24)| idx) + +/* + * Returns the table index that this token encodes. + */ +#define mono_metadata_token_table(token) ((token) >> 24) + +/* + * Returns the index that a token refers to + */ +#define mono_metadata_token_index(token) ((token & 0xffffff)) + + +#define mono_metadata_token_code(token) ((token & 0xff000000)) + +/* + * FIXME: put all of the table codes here + */ +enum { + TOKEN_TABLE_XXX = 0 +} MonoMetadataTableCodes; diff --git a/mono/metadata/methodattr.h b/mono/metadata/methodattr.h new file mode 100644 index 00000000000..dc3da757ded --- /dev/null +++ b/mono/metadata/methodattr.h @@ -0,0 +1,57 @@ +#ifndef _MONO_METADATA_METHODATTR_H_ +#define _MONO_METADATA_METHODATTR_H_ + +/* + * Method Attributes (22.1.9) + */ + +#define METHOD_IMPL_ATTRIBUTE_CODE_TYPE_MASK 0x0003 +#define METHOD_IMPL_ATTRIBUTE_IL 0x0000 +#define METHOD_IMPL_ATTRIBUTE_NATIVE 0x0001 +#define METHOD_IMPL_ATTRIBUTE_OPTIL 0x0002 +#define METHOD_IMPL_ATTRIBUTE_RUNTIME 0x0003 + +#define METHOD_IMPL_ATTRIBUTE_MANAGED_MASK 0x0004 +#define METHOD_IMPL_ATTRIBUTE_UNMANAGED 0x0004 +#define METHOD_IMPL_ATTRIBUTE_MANAGED 0x0000 + +#define METHOD_IMPL_ATTRIBUTE_FORWARD_REF 0x0010 +#define METHOD_IMPL_ATTRIBUTE_PRESERVE_SIG 0x0080 +#define METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL 0x1000 +#define METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED 0x0020 +#define METHOD_IMPL_ATTRIBUTE_NOINLINING 0x0008 +#define METHOD_IMPL_ATTRIBUTE_MAX_METHOD_IMPL_VAL 0xffff + +#define METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK 0x0007 +#define METHOD_ATTRIBUTE_COMPILER_CONTROLLED 0x0000 +#define METHOD_ATTRIBUTE_PRIVATE 0x0001 +#define METHOD_ATTRIBUTE_FAM_AND_ASSEM 0x0002 +#define METHOD_ATTRIBUTE_ASSEM 0x0003 +#define METHOD_ATTRIBUTE_FAMILY 0x0004 +#define METHOD_ATTRIBUTE_FAM_OR_ASSEM 0x0005 +#define METHOD_ATTRIBUTE_PUBLIC 0x0006 + +#define METHOD_ATTRIBUTE_STATIC 0x0010 +#define METHOD_ATTRIBUTE_FINAL 0x0020 +#define METHOD_ATTRIBUTE_VIRTUAL 0x0040 +#define METHOD_ATTRIBUTE_HIDE_BY_SIG 0x0080 + +#define METHOD_ATTRIBUTE_VTABLE_LAYOUT_MASK 0x0100 +#define METHOD_ATTRIBUTE_REUSE_SLOT 0x0000 +#define METHOD_ATTRIBUTE_NEW_SLOT 0x0100 + +#define METHOD_ATTRIBUTE_ABSTRACT 0x0400 +#define METHOD_ATTRIBUTE_SPECIAL_NAME 0x0800 + +#define METHOD_ATTRIBUTE_PINVOKE_IMPL 0x2000 +#define METHOD_ATTRIBUTE_UNMANAGED_EXPORT 0x0008 + +/* + * For runtime use only + */ +#define METHOD_ATTRIBUTE_RESERVED_MASK 0xd000 +#define METHOD_ATTRIBUTE_RT_SPECIAL_NAME 0x1000 +#define METHOD_ATTRIBUTE_HAS_SECURITY 0x4000 +#define METHOD_ATTRIBUTE_REQUIRE_SEC_OBJECT 0x8000 + +#endif diff --git a/mono/metadata/methodheader.h b/mono/metadata/methodheader.h new file mode 100644 index 00000000000..9993a29132b --- /dev/null +++ b/mono/metadata/methodheader.h @@ -0,0 +1,29 @@ +#ifndef _MONO_METADATA_METHOD_HEADER_H_ +#define _MONO_METADATA_METHOD_HEADER_H_ + +/* + * 25.2.1: Method header type values + */ +#define METHOD_HEADER_FORMAT_MASK 7 +#define METHOD_HEADER_TINY_FORMAT 2 +#define METHOD_HEADER_TINY_FORMAT1 6 +#define METHOD_HEADER_FAT_FORMAT 3 + +/* + * 25.2.3.1: Flags for method headers + */ +#define METHOD_HEADER_INIT_LOCALS 0x10 +#define METHOD_HEADER_MORE_SECTS 0x08 + +/* + * For section data (25.3) + */ +#define METHOD_HEADER_SECTION_RESERVED 0 +#define METHOD_HEADER_SECTION_EHTABLE 1 +#define METHOD_HEADER_SECTION_OPTIL_TABLE 2 +#define METHOD_HEADER_SECTION_FAT_FORMAT 0x40 +#define METHOD_HEADER_SECTION_MORE_SECTS 0x80 + +#endif /* _MONO_METADATA_METHOD_HEADER_H_ */ + + diff --git a/mono/metadata/methodsem.h b/mono/metadata/methodsem.h new file mode 100644 index 00000000000..ffd6f2803aa --- /dev/null +++ b/mono/metadata/methodsem.h @@ -0,0 +1,15 @@ +#ifndef _MONO_METADATA_METHODSEM_H_ +#define _MONO_METADATA_METHODSEM_H_ + +/* + * Method Semantics ([MethodSemanticAttributes]) 22.1.10 + */ + +#define METHOD_SEMANTIC_SETTER 0x0001 +#define METHOD_SEMANTIC_GETTER 0x0002 +#define METHOD_SEMANTIC_OTHER 0x0004 +#define METHOD_SEMANTIC_ADD_ON 0x0008 +#define METHOD_SEMANTIC_REMOVE_ON 0x0010 +#define METHOD_SEMANTIC_FIRE 0x0020 + +#endif diff --git a/mono/metadata/mono-endian.h b/mono/metadata/mono-endian.h new file mode 100644 index 00000000000..8da0e4126e0 --- /dev/null +++ b/mono/metadata/mono-endian.h @@ -0,0 +1,13 @@ +#ifndef _MONO_METADATA_ENDIAN_H_ +#define _MONO_METADATA_ENDIAN_H_ 1 + +/* FIXME: implement big endian versions */ + +#define le64_to_cpu(x) (x) +#define le32_to_cpu(x) (x) +#define le16_to_cpu(x) (x) +#define read32(x) le32_to_cpu (*((guint32 *) (x))) +#define read16(x) le16_to_cpu (*((guint16 *) (x))) +#define read64(x) le64_to_cpu (*((guint64 *) (x))) + +#endif /* _MONO_METADATA_ENDIAN_H_ */ diff --git a/mono/metadata/paramattr.h b/mono/metadata/paramattr.h new file mode 100644 index 00000000000..f6ff9ba1c5f --- /dev/null +++ b/mono/metadata/paramattr.h @@ -0,0 +1,12 @@ +#ifndef _MONO_METADATA_PARAMATTR_H_ +#define _MONO_METADATA_PARAMATTR_H_ + +#define PARAM_ATTRIBUTE_IN 0x0001 +#define PARAM_ATTRIBUTE_OUT 0x0002 +#define PARAM_ATTRIBUTE_OPTIONAL 0x0004 +#define PARAM_ATTRIBUTE_RESERVED_MASK 0xf000 +#define PARAM_ATTRIBUTE_HAS_DEFAULT 0x1000 +#define PARAM_ATTRIBUTE_HAS_FIELD_MARSHAL 0x2000 +#define PARAM_ATTRIBUTE_UNUSED 0xcfe0 + +#endif diff --git a/mono/metadata/pedump.c b/mono/metadata/pedump.c index 7a716cf3ea7..3415dee7039 100644 --- a/mono/metadata/pedump.c +++ b/mono/metadata/pedump.c @@ -8,10 +8,14 @@ */ #include <config.h> #include <stdio.h> +#include <string.h> #include "assembly.h" #include <glib.h> #include "cil-coff.h" +gboolean dump_data = TRUE; +gboolean dump_tables = FALSE; + static void hex_dump (char *buffer, int base, int count) { @@ -166,13 +170,13 @@ dump_section_table (section_table_t *st) } static void -dump_sections (dotnet_image_info_t *iinfo) +dump_sections (cli_image_info_t *iinfo) { - const int top = iinfo->dn_header.coff.coff_sections; + const int top = iinfo->cli_header.coff.coff_sections; int i; for (i = 0; i < top; i++) - dump_section_table (&iinfo->dn_section_tables [i]); + dump_section_table (&iinfo->cli_section_tables [i]); } static void @@ -195,7 +199,7 @@ dump_cli_header (cli_header_t *ch) } static void -dsh (char *label, dotnet_image_info_t *iinfo, stream_header_t *sh) +dsh (char *label, cli_image_info_t *iinfo, stream_header_t *sh) { printf ("%s: 0x%08x - 0x%08x [%d == 0x%08x]\n", label, @@ -204,9 +208,9 @@ dsh (char *label, dotnet_image_info_t *iinfo, stream_header_t *sh) } static void -dump_metadata_ptrs (dotnet_image_info_t *iinfo) +dump_metadata_ptrs (cli_image_info_t *iinfo) { - metadata_t *meta = &iinfo->dn_metadata; + metadata_t *meta = &iinfo->cli_metadata; printf ("\nMetadata pointers:\n"); dsh ("\tTables (#~)", iinfo, &meta->heap_tables); @@ -216,70 +220,67 @@ dump_metadata_ptrs (dotnet_image_info_t *iinfo) dsh ("\t GUID", iinfo, &meta->heap_guid); } -static const char * -table_to_string (int table) +static void +dump_table (metadata_t *meta, int table) { - char *map_table_to_string [] = { - /* 0 */ "Module", "TypeRef", "TypeDef", "FieldPtr", - /* 4 */ "FieldDef", "MethodPtr", "MethodDef", "ParamPtr", - /* 8 */ "ParamDef", "InterfaceImpl", "MemberRef", "FieldInit", - /* 12 */ "CustomAttr", "MarshalDef", "Permission", "LayoutDef", - /* 16 */ "FieldOffset", "Signature", "EventAssoc", "EventPtr", - /* 20 */ "Event", "PropertyAssoc", "PropertyPtr", "Property", - /* 24 */ "MethodAssoc", "MethodImpl", "ModuleRef", "TypeSpec", - /* 28 */ "PInvoke", "Data", "EncLog", "EncAssoc", - /* 32 */ "Assembly", "ProcessorDef", "OSDef", "AssemblyRef", - /* 36 */ "ProcessorRef", "OSRef", "File", "ComType", - /* 40 */ "ManifestResource", "ExeLocation", "42", "43", - /* 44 */ "44", "45", "NestedClass", "47" - /* 48 */ "48", "49", "50", "51", - /* 52 */ "52", "53", "54", "55" - /* 56 */ "56", "57", "58", "59" - /* 60 */ "60", "61", "62", "63" - }; - if (table < 0 || table > 63) - return "Unknown table name"; - - return map_table_to_string [table]; } static void -dump_metadata (dotnet_image_info_t *iinfo) +dump_metadata (cli_image_info_t *iinfo) { - metadata_t *meta = &iinfo->dn_metadata; + metadata_t *meta = &iinfo->cli_metadata; int table; dump_metadata_ptrs (iinfo); printf ("Rows:\n"); for (table = 0; table < 64; table++){ - if (meta->rows [table] == 0) + if (meta->tables [table].rows == 0) continue; - printf ("Table %s (%d): %d rows\n", table_to_string (table), table, meta->rows [table]); + printf ("Table %s: %d records (%d bytes, at %p)\n", + mono_meta_table_name (table), + meta->tables [table].rows, + meta->tables [table].row_size, + meta->tables [table].base + ); + if (dump_tables) + dump_table (meta, table); } } static void -dump_dotnet_iinfo (dotnet_image_info_t *iinfo) +dump_methoddef (cli_image_info_t *iinfo, guint32 token) { - dump_dotnet_header (&iinfo->dn_header); + char *loc; + + loc = mono_metadata_locate_token (&iinfo->cli_metadata, token); + + printf ("RVA for Entry Point: 0x%08x\n", (*(guint32 *)loc)); +} + +static void +dump_dotnet_iinfo (cli_image_info_t *iinfo) +{ + dump_dotnet_header (&iinfo->cli_header); dump_sections (iinfo); - dump_cli_header (&iinfo->dn_cli_header); + dump_cli_header (&iinfo->cli_cli_header); dump_metadata (iinfo); + + dump_methoddef (iinfo, iinfo->cli_cli_header.ch_entry_point); } static void usage (void) { - printf ("Usage is: pedump [-m] file.exe\n"); + printf ("Usage is: pedump [--tables] file.exe\n"); exit (1); } int main (int argc, char *argv []) { - dotnet_image_info_t *iinfo; + cli_image_info_t *iinfo; MonoAssembly *assembly; char *file = NULL; int i; @@ -290,18 +291,25 @@ main (int argc, char *argv []) continue; } - if (argv [i][1] == 'h') + if (strcmp (argv [i], "--help") == 0) usage (); + if (strcmp (argv [i], "--tables") == 0) + dump_tables = 1; } if (!file) usage (); assembly = mono_assembly_open (file, NULL); + if (!assembly){ + fprintf (stderr, "Can not open assembly %s\n", file); + exit (1); + } iinfo = assembly->image_info; - dump_dotnet_iinfo (iinfo); - + if (dump_data) + dump_dotnet_iinfo (iinfo); + mono_assembly_close (assembly); return 0; diff --git a/mono/metadata/propertyattr.h b/mono/metadata/propertyattr.h new file mode 100644 index 00000000000..5bb912d8663 --- /dev/null +++ b/mono/metadata/propertyattr.h @@ -0,0 +1,10 @@ +#ifndef _MONO_METADATA_PROPERTYATTR_H_ +#define _MONO_METADATA_PROPERTYATTR_H_ + +#define PROPERTY_ATTRIBUTE_SPECIAL_NAME 0x0200 +#define PROPERTY_ATTRIBUTE_RESERVED_MASK 0xf400 +#define PROPERTY_ATTRIBUTE_RT_SPECIAL_NAME 0x0400 +#define PROPERTY_ATTRIBUTE_HAS_DEFAULT 0x1000 +#define PROPERTY_ATTRIBUTE_UNUSED 0xe9ff + +#endif diff --git a/mono/metadata/tokentype.h b/mono/metadata/tokentype.h new file mode 100644 index 00000000000..06c75faecb0 --- /dev/null +++ b/mono/metadata/tokentype.h @@ -0,0 +1,39 @@ +#ifndef _MONO_METADATA_TOKENTYPE_H_ +#define _MONO_METADATA_TOKENTYPE_H_ + +/* + * These tokens match the table ID except for the last + * three (string, name and base type which are special) + */ + +typedef enum { + TOKEN_TYPE_MODULE = 0x00000000, + TOKEN_TYPE_TYPE_REF = 0x01000000, + TOKEN_TYPE_TYPE_DEF = 0x02000000, + TOKEN_TYPE_FIELD_DEF = 0x04000000, + TOKEN_TYPE_METHOD_DEF = 0x06000000, + TOKEN_TYPE_PARAM_DEF = 0x08000000, + TOKEN_TYPE_INTERFACE_IMPL = 0x09000000, + TOKEN_TYPE_MEMBER_REF = 0x0a000000, + TOKEN_TYPE_CUSTOM_ATTRIBUTE = 0x0c000000, + TOKEN_TYPE_PERMISSION = 0x0e000000, + TOKEN_TYPE_SIGNATURE = 0x11000000, + TOKEN_TYPE_EVENT = 0x14000000, + TOKEN_TYPE_PROPERTY = 0x17000000, + TOKEN_TYPE_MODULE_REF = 0x1a000000, + TOKEN_TYPE_TYPE_SPEC = 0x1b000000, + TOKEN_TYPE_ASSEMBLY = 0x20000000, + TOKEN_TYPE_ASSEMBLY_REF = 0x23000000, + TOKEN_TYPE_FILE = 0x26000000, + TOKEN_TYPE_EXPORTED_TYPE = 0x27000000, + TOKEN_TYPE_MANIFEST_RESOURCE = 0x28000000, + + /* + * These do not match metadata tables directly + */ + TOKEN_TYPE_STRING = 0x70000000, + TOKEN_TYPE_NAME = 0x71000000, + TOKEN_TYPE_BASE_TYPE = 0x72000000 +} TokenType; + +#endif /* _MONO_METADATA_TOKENTYPE_H_ */ diff --git a/mono/metadata/typeattr.h b/mono/metadata/typeattr.h new file mode 100644 index 00000000000..63b6481cea8 --- /dev/null +++ b/mono/metadata/typeattr.h @@ -0,0 +1,47 @@ +#ifndef _MONO_METADATA_BITMASK_H_ +#define _MONO_METADATA_BITMASK_H_ +/* + * Flags for bitmasks in the metadata tables + */ + +/* + * Type Attributes (21.1.13). + */ +#define TYPE_ATTRIBUTE_VISIBILITY_MASK 0x00000007 +#define TYPE_ATTRIBUTE_NOT_PUBLIC 0x00000000 +#define TYPE_ATTRIBUTE_PUBLIC 0x00000001 +#define TYPE_ATTRIBUTE_NESTED_PUBLIC 0x00000002 +#define TYPE_ATTRIBUTE_NESTED_PRIVATE 0x00000003 +#define TYPE_ATTRIBUTE_NESTED_FAMILY 0x00000004 +#define TYPE_ATTRIBUTE_NESTED_ASSEMBLY 0x00000005 +#define TYPE_ATTRIBUTE_NESTED_FAM_AND_ASSEM 0x00000006 +#define TYPE_ATTRIBUTE_NESTED_FAM_OR_ASSEM 0x00000007 + +#define TYPE_ATTRIBUTE_LAYOUT_MASK 0x00000018 +#define TYPE_ATTRIBUTE_AUTO_LAYOUT 0x00000000 +#define TYPE_ATTRIBUTE_SEQUENTIAL_LAYOUT 0x00000008 +#define TYPE_ATTRIBUTE_EXPLICIT_LAYOUT 0x00000010 + +#define TYPE_ATTRIBUTE_CLASS_SEMANTIC_MASK 0x00000020 +#define TYPE_ATTRIBUTE_CLASS 0x00000000 +#define TYPE_ATTRIBUTE_INTERFACE 0x00000020 + +#define TYPE_ATTRIBUTE_ABSTRACT 0x00000080 +#define TYPE_ATTRIBUTE_SEALED 0x00000100 +#define TYPE_ATTRIBUTE_SPECIAL_NAME 0x00000400 + +#define TYPE_ATTRIBUTE_IMPORT 0x00001000 +#define TYPE_ATTRIBUTE_SERIALIZABLE 0x00002000 + +#define TYPE_ATTRIBUTE_STRING_FORMAT_MASK 0x00030000 +#define TYPE_ATTRIBUTE_ANSI_CLASS 0x00000000 +#define TYPE_ATTRIBUTE_UNICODE_CLASS 0x00010000 +#define TYPE_ATTRIBUTE_AUTO_CLASS 0x00020000 + +#define TYPE_ATTRIBUTE_BEFORE_FIELD_INIT 0x00100000 + +#define TYPE_ATTRIBUTE_RESERVED_MASK 0x00040800 +#define TYPE_ATTRIBUTE_RT_SPECIAL_NAME 0x00000800 +#define TYPE_ATTRIBUTE_HAS_SECURITY 0x00040000 + +#endif diff --git a/notes/cil b/notes/cil new file mode 100644 index 00000000000..458aca543ba --- /dev/null +++ b/notes/cil @@ -0,0 +1,13 @@ +Random collection of notes + + * What is the point of having the InlineVar argument to + opcodes be a signed integer instead of unsigned? + + +Storage + + The CIL metadata is a very compressed file format, even the + sizes of blobs and strings are recorded in a compressed form. + Still, all strings are encoded using 16-bit chars, instead of the + more efficient UTF-8. + diff --git a/status/compare-assembly.cs b/status/compare-assembly.cs new file mode 100755 index 00000000000..263bcb163f3 --- /dev/null +++ b/status/compare-assembly.cs @@ -0,0 +1,231 @@ +/* +Tool #1: + + compare file1.dll file2.dll annotations.xml + + file1.dll: This is an assembly created by Microsoft. + + file2.dll: This is a Mono assembly (currently we have none + that build). + + annotations.xml: contains comments about a class: + + <class name="System.Object"> + <maintainer> + <email>miguel@ximian.com</email> + <name>Miguel de Icaza</name> + </maintainer> + <status test-suite="no" percent="XX"> + </class> + + That would generate an XML file with all the classes that are + implemented in the second library. If there is nothing for a + given class, it should generate an emtpy group: + + <class name="System.Object"> + </class> + +Tool #2: + + Using a Perl script that can grok XML, generate HTML pages + that we can put on the web site: + + Per assembly status. + Per maintainer status. + Per Percent status. + +*/ +namespace Mapper +{ + using System; + using System.Collections; + using System.Reflection; + + /// <summary> + /// Summary description for Class1. + /// </summary> + public class Mapper + { + Assembly a; + Hashtable nshash = new Hashtable(); + int indent = 0; + + public Mapper(string name) + { + a = Assembly.LoadFrom (name); + } + + void o (string s) + { + Console.WriteLine (s.PadLeft (s.Length + indent, ' ')); + } + + void DumpMember (MemberInfo mi) + { + string kind; + string more=""; + + switch (mi.MemberType) + { + case MemberTypes.Field: + kind = "field"; + break; + case MemberTypes.Method: + if (((MethodInfo)mi).IsSpecialName) { + return; + } + kind = "method"; + more = " signature='" + mi.ToString() +"'"; + break; + case MemberTypes.Event: + kind = "event"; + break; + case MemberTypes.Property: + kind = "property"; + break; + default: + kind = "***UNKOWN***"; + break; + } + + o ("<" + kind + " name='" + mi.Name + "'" + more + "/>"); + } + + void DumpType (Type t) + { + string kind, name, attrs = ""; + + name = t.Name; + + if (t.IsClass) { + kind = "class"; + } else if (t.IsInterface) { + kind = "interface"; + } else if (t.IsValueType) { + kind = "valueType"; + } else if (t.IsEnum) { + kind = "enum"; + } else return; + + if (t.IsAbstract) { + attrs += "abstract='true'"; + } else if (t.IsSealed) { + attrs += "sealed='true'"; + } else if (t.IsCOMObject) { + attrs += "comobject='true'"; + } + + o ("<" + kind + " name='" + name + (attrs == "" ? "'" : "' ") + attrs + ">"); + + indent += 4; + + /*o ("<maintainer></maintainer>"); + o ("<description></description>");*/ + + foreach (Type type in t.GetNestedTypes ()) + { + DumpType(type); + } + + foreach (FieldInfo field in t.GetFields ()) + { + DumpMember (field); + } + + foreach (MethodInfo method in t.GetMethods ()) + { + DumpMember (method); + } + + indent -= 4; + + o ("</" + kind + ">"); + } + + void LoadTypeList (Type [] types) + { + foreach (Type t in types) + { + ArrayList list = (ArrayList) nshash [t.Namespace]; + if (list == null) + { + list = new ArrayList (); + nshash.Add (t.Namespace, list); + } + list.Add (t); + } + } + + void DumpTypeList (Type [] types) + { + LoadTypeList (types); + + foreach (string ns in nshash.Keys) + { + o ("<namespace " + "name='" + ns + "'>"); + + indent += 4; + + foreach (Type t in (ArrayList) nshash [ns]) + { + DumpType (t); + } + + indent -= 4; + + o ("</namespace>"); + } + } + + public void Map () + { + string name; + Type [] types; + Module [] modules; + + name = a.GetName ().Name; + types = a.GetExportedTypes (); + modules = a.GetModules (); + + o ("<assembly name='" + name + "'>"); + + indent += 4; + + /*o ("<maintainer></maintainer>"); + o ("<description></description>");*/ + + DumpTypeList (types); + + indent -= 4; + + o ("</assembly>"); + } + + public static int Main(string[] args) + { + Mapper m; + string basedir = "c:\\WINDOWS\\Microsoft.NET\\Framework\\v1.0.2914\\"; + + if (args.Length > 0) { + foreach (string s in args){ + try { + m = new Mapper (basedir + s); + m.Map (); + } catch (Exception e) { + Console.WriteLine("Error: "+e.ToString()); + } + } + } else { + try { + m = new Mapper (basedir + "mscorlib.dll"); + m.Map (); + } catch (Exception e) { + Console.WriteLine("Error: "+e.ToString()); + } + } + + return 0; + } + } +} + diff --git a/status/maintainers.xml b/status/maintainers.xml new file mode 100755 index 00000000000..10ab4317f26 --- /dev/null +++ b/status/maintainers.xml @@ -0,0 +1,25 @@ +<maintainers> + <person email="miguel@ximian.com" name="Miguel de Icaza"> + <class name="System.Object"/> + <assembly name="mscorlib"/> + </person> + <person email="fejj@ximian.com" name="Jeffrey Stedfast"> + <class name="System.String"/> + </person> + <person email="jbarn@httcb.net" name="John Barnette"> + <class name="System.Collections.Hashtable"/> + </person> + <person email="iain@ximian.com" name="Iain"> + <class name="System.Collections.Queue"/> + </person> + <person email="bob@thestuff.net" name="Bob Smith"> + <class name="System.Math"/> + </person> + <person email="joe@ximian.com" name="Joe Shaw"> + <class name="System.Array"/> + </person> + <person email="marcins@zipworld.com.au" name="Marcin Szczepanski"> + <class name="System.StringBuilder"/> + </person> +</maintainers> + diff --git a/status/mono-stats b/status/mono-stats new file mode 100755 index 00000000000..64a2947df09 --- /dev/null +++ b/status/mono-stats @@ -0,0 +1,289 @@ +#!/usr/bin/perl -w + +use strict; +use XML::Parser; +#use Data::Dumper; + +# command line arguments: shell globs for the files containing the info +# for the ms assemblyes and mono's +my $msglob = shift || 'ms*.xml'; +my $monoglob = shift || 'mono*.xml'; +# maintainers file +my $mfile = 'maintainers.xml'; +my $curfile; + +# positions in array refs +use constant MNAME => 0; +use constant MASSEMBLY => 1; +use constant MCLASS => 2; + +use constant MAINTAINER => 0; +use constant PERCENT => 1; +use constant HASH => 2; +# we store all the data in some global hash tables +# $email => [$name, \%assembly, \%class] +my %maintainer; + +# $name => [$maintainer, $percent, \%classes]; +my %assembly; + +# $name => [$maintainer, $percent, \%methods] +my %class; + +# my parsing state machine +my @status; +# current maintainer, class and assembly pointers +my ($curm, $curc, $cura); +my $mono = 0; +my $namespace = ''; +my %status_action = ( + MAINTAINERS => sub { + my ($elem, %attrs) = @_; + malformed ($mfile, $elem, 'maintainers', \@status); + push @status, 'DUDE'; + }, + DUDE => sub { + my ($elem, %attrs) = @_; + malformed ($mfile, $elem, 'person', \@status); + foreach(qw(email name)) {die "$_ not included in person\n" unless defined $attrs{$_}} + $curm = $maintainer{$attrs{email}} = [$attrs{name}, {}, {}]; + push @status, 'DUDE_CONTENT'; + }, + DUDE_CONTENT => sub { + my ($elem, %attrs) = @_; + malformed ($mfile, $elem, 'class|assembly', \@status); + if ($elem eq 'class') { + $curm->[MCLASS]->{$attrs{name}} = ''; + } elsif ($elem eq 'assembly') { + $curm->[MASSEMBLY]->{$attrs{name}} = ''; + } + push @status, 'DUDE_CONTENT'; + }, + ASSEMBLY => sub { + my ($elem, %attrs) = @_; + malformed ($curfile, $elem, 'assembly', \@status); + $namespace = ''; + $cura = $assembly{$attrs{name}} = ['', 0, {}]; + push @status, 'NAMESPACE'; + }, + NAMESPACE => sub { + my ($elem, %attrs) = @_; + malformed ($curfile, $elem, 'namespace', \@status); + $namespace = $attrs{name}; + push @status, 'CLASS'; + }, + CLASS => sub { + my ($elem, %attrs) = @_; + malformed ($curfile, $elem, 'class|valueType|interface', \@status); + if ($elem eq 'class') { + my $name = $namespace ? $namespace.".".$attrs{name} : $attrs{name}; + if ($mono) { + warn "mono implements non exisistent class $name\n" + if (!exists $class{$name}); + $curc = $class{$name}; + } else { + $curc = $class{$name} = ['', 0, {}]; + } + $cura->[HASH]->{$name} = $mono; + push @status, 'METHOD'; + } else { + push @status, 'METHOD'; + } + }, + METHOD => sub { + my ($elem, %attrs) = @_; + malformed ($curfile, $elem, 'method|field|valueType', \@status); + if ($elem eq 'method') { + my $name = $attrs{signature}; + if ($mono) { + warn "mono implements non exisistent method $name\n" + if (!exists $curc->[HASH]->{$name}); + } + $curc->[HASH]->{$name} = $mono; + push @status, 'METHOD'; + } else { + push @status, 'METHOD'; + } + }, +); + + +my $parser = new XML::Parser (Handlers => {Start => \&handle_tag, End => \&end_tag}); + +# parse the maintainers info +if ($mfile) { + @status = 'MAINTAINERS'; + $parser->parsefile($mfile); + #print Dumper(\%maintainer); +} + +foreach (glob($msglob)) { + $curfile = $_; + @status = 'ASSEMBLY'; + $mono = 0; + $parser->parsefile($_); +} + +foreach (glob($monoglob)) { + $curfile = $_; + @status = 'ASSEMBLY'; + $mono = 1; + $parser->parsefile($_); +} + +create_stats(); +create_html(); +#print Dumper(\%assembly); +#print Dumper(\%class); +exit(0); + +sub malformed { + my ($file, $elem, $match, $data) = @_; + unless ($elem =~ /^$match$/) { + $data = Dumper($data) if defined $data; + die "file $file malformed ($elem instead of $match) $data\n" + } +} + +sub handle_tag { + my $parser = shift @_; + my $status = $status[-1]; + die "status $status unknown" unless exists $status_action{$status}; + $status_action{$status}->(@_); +} + +sub end_tag { + my $last = pop @status; + # print STDERR "done with $last\n"; +} + +sub assign_maintainer { + my ($m, $from, $to, $type) = @_; + foreach (keys %$from) { + if (!exists $to->{$_}) { + warn "$m maintains unknown $type $_\n"; + # fixup to avoid warnings + $to->{$_}->[MAINTAINER] = $m; + $to->{$_}->[PERCENT] = 0; + $to->{$_}->[HASH] = {}; + } else { + warn "$to->{$_}->[MAINTAINER] already maintains $_ (now $m)\n" if $to->{$_}->[MAINTAINER]; + $to->{$_}->[MAINTAINER] = $m; + } + } +} + +sub completeness { + my $hash = shift @_; + my $total = keys %$hash; + my $done = 0; + map {$done += $_} values %$hash; + return 0 unless $total; + return int($done*100/$total); +} + +sub create_stats { + # set maintainer field in assembly and class hashes + foreach my $m (sort keys %maintainer) { + assign_maintainer ($m, $maintainer{$m}->[MASSEMBLY], \%assembly, 'assembly'); + assign_maintainer ($m, $maintainer{$m}->[MCLASS], \%class, 'class'); + } + # assign completeness percent + foreach my $ass (values %assembly) { + $ass->[PERCENT] = completeness ($ass->[HASH]); + } + foreach my $class (values %class) { + $class->[PERCENT] = completeness ($class->[HASH]); + } +} + +sub html_header { + my ($title) = @_; +return <<"EOF"; +<html><head><title>$title</title></head><body bgcolor="#ffffff"> +<h1 ALIGN=center>$title</H1> +EOF + +} + +sub unimplemented ($) { + my ($c) = @_; + my $id = $c; + $id =~ tr/./-/; + return "<A HREF='per-unimplemented.html#$id'>$c</A>"; +} + +sub create_html { + + open(F, ">per-assembly.html") || die "Cannot open file: $!"; + print F html_header("Mono - per-assembly stats"); + print F "<TABLE BORDER=1><TR><TH>Assembly<TH>Maintainer<TH>Completion\n"; + foreach my $ass (sort keys %assembly) { + print F "\t<TR><TD>", join('<TD>', $ass, $assembly{$ass}->[MAINTAINER], $assembly{$ass}->[PERCENT]), "\n"; + } + print F "</TABLE>\n"; + print F "</body></html>\n"; + close(F); + + # per maintainer info + open(F, ">per-maintainer.html") || die "Cannot open file: $!"; + print F html_header("Mono - per-maintainer stats"); + print F "<TABLE BORDER=1><TR><TH>Maintainer<TH>Class<TH>Completion\n"; + foreach my $m (sort keys %maintainer) { + my @classes = sort keys %{$maintainer{$m}->[MCLASS]}; + my $count = @classes; + foreach my $c (@classes) { + my $start = $count?"\t<TR><TD ROWSPAN=$count>$m<TD>":"\t<TR><TD>"; + $count = 0; + print F $start, join('<TD>', $c, $class{$c}->[PERCENT]), "\n"; + } + } + my @unmantained = sort grep {!$class{$_}->[MAINTAINER]} keys %class; + my $count = @unmantained; + foreach my $c (@unmantained) { + my $start = $count?"\t<TR><TD ROWSPAN=$count>Unmantained<TD>":"\t<TR><TD>"; + $count = 0; + print F $start, join('<TD>', $c, $class{$c}->[PERCENT]), "\n"; + } + print F "</TABLE>\n"; + print F "</body></html>\n"; + close(F); + + # per-completion info + open(F, ">per-completion.html") || die "Cannot open file: $!"; + print F html_header("Mono - per-completion stats"); + print F "<TABLE BORDER=1><TR><TH>Completion<TH>Class<TH>Maintainer\n"; + foreach my $c (sort {$class{$b}->[PERCENT] <=> $class{$a}->[PERCENT]} keys %class) { + print F "\t<TR><TD>", join('<TD>', $class{$c}->[PERCENT], unimplemented($c), $class{$c}->[MAINTAINER]), "\n"; + } + print F "</TABLE>\n"; + print F "</body></html>\n"; + close(F); + + # unimplemented methods + # FIXME: this can create a very big file, split on assembly name + # and fix also the unimplemented() sub + open(F, ">per-unimplemented.html") || die "Cannot open file: $!"; + print F html_header("Mono - unimplemented methods stats"); + print F "<TABLE BORDER=1><TR><TH>Class<TH>Method\n"; + foreach my $c (sort grep {$class{$_}->[PERCENT] != 100} keys %class) { + my @methods = sort grep {!$class{$c}->[HASH]->{$_}} keys %{$class{$c}->[HASH]}; + my $count = @methods; + my $aname = ''; + if ($count) { + my $id = $c; + $id =~ tr/./-/; + $aname = "<A NAME='$id'></A>"; + } + foreach my $m (@methods) { + my $start = $count?"\t<TR><TD ROWSPAN=$count>$aname$c<TD>":"\t<TR><TD>"; + $count = 0; + print F $start, join('<TD>', $m), "\n"; + } + } + print F "</TABLE>\n"; + print F "</body></html>\n"; + close(F); + +} + diff --git a/web/README b/web/README new file mode 100644 index 00000000000..333d133943f --- /dev/null +++ b/web/README @@ -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 diff --git a/web/c-sharp b/web/c-sharp new file mode 100644 index 00000000000..c37fe559200 --- /dev/null +++ b/web/c-sharp @@ -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 (bjepson@oreilly.com + 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 diff --git a/web/class-library b/web/class-library new file mode 100644 index 00000000000..64fe3fd9d88 --- /dev/null +++ b/web/class-library @@ -0,0 +1,149 @@ +* The Class Library + + The Class Library should be compatible with Microsoft's .NET + implementation. + + 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. + +** 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". + +** 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. + diff --git a/web/contact b/web/contact new file mode 100644 index 00000000000..f5e1b98c115 --- /dev/null +++ b/web/contact @@ -0,0 +1,16 @@ +* Contacting the Mono team. + + You can contact the Mono Team by sending e-mail to `<a + href="mailto:mono-hackers@ximian.com">mailto:mono-hackers@ximian.com</a>'. + + You can contact the general forum of discussion by sending + e-mail to <a href="mailto:mono-list@ximian.com">mono-list@ximian.com</a> + + You can contact me (Miguel de Icaza) by sending e-mail to <a + href="mailto:miguel@ximian.com">miguel@ximian.com</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> + diff --git a/web/contributing b/web/contributing new file mode 100644 index 00000000000..7e64a96ab21 --- /dev/null +++ b/web/contributing @@ -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. diff --git a/web/documentation b/web/documentation new file mode 100644 index 00000000000..166e0e8ccfe --- /dev/null +++ b/web/documentation @@ -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. + + + + + diff --git a/web/download b/web/download new file mode 100644 index 00000000000..0d234b21562 --- /dev/null +++ b/web/download @@ -0,0 +1,42 @@ +* 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> + <b>July 12th, 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> + + <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. diff --git a/web/faq b/web/faq new file mode 100644 index 00000000000..8f9f8f199f4 --- /dev/null +++ b/web/faq @@ -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 + + + diff --git a/web/gcc-frontend b/web/gcc-frontend new file mode 100644 index 00000000000..2b15346db69 --- /dev/null +++ b/web/gcc-frontend @@ -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. + diff --git a/web/ideas b/web/ideas new file mode 100644 index 00000000000..acc584d95cf --- /dev/null +++ b/web/ideas @@ -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:vladimir@ximian.com">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> diff --git a/web/index b/web/index new file mode 100644 index 00000000000..8430614344f --- /dev/null +++ b/web/index @@ -0,0 +1,32 @@ +** 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:mono-list@ximian.com">mono-list@ximian.com</a> + +** O'Reilly + + Brian posted a story on <a + href="http://www.oreillynet.com/dotnet">O'Reilly Network .NET</a> diff --git a/web/passport b/web/passport new file mode 100644 index 00000000000..ea99f9c77fd --- /dev/null +++ b/web/passport @@ -0,0 +1,234 @@ +* 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. Jabber suffers from + the same problems that a centralized Passport has. If you + want to do things right, you want to start with a fully + distributed system. + + 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:miguel@ximian.com">miguel@ximian.com</a>) + diff --git a/web/pending b/web/pending new file mode 100644 index 00000000000..e243a10dedf --- /dev/null +++ b/web/pending @@ -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. + diff --git a/web/rationale b/web/rationale new file mode 100644 index 00000000000..1027d292286 --- /dev/null +++ b/web/rationale @@ -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.
\ No newline at end of file diff --git a/web/resources b/web/resources new file mode 100644 index 00000000000..7ef28be7c12 --- /dev/null +++ b/web/resources @@ -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="web-mono@ximian.com">web-mono@ximian.com</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> + + +
\ No newline at end of file diff --git a/web/resources-pending b/web/resources-pending new file mode 100644 index 00000000000..fd9b9073d64 --- /dev/null +++ b/web/resources-pending @@ -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 + diff --git a/web/roadmap b/web/roadmap new file mode 100644 index 00000000000..6cdfa1366a8 --- /dev/null +++ b/web/roadmap @@ -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) + + +
\ No newline at end of file diff --git a/web/runtime b/web/runtime new file mode 100644 index 00000000000..052b46d4c7f --- /dev/null +++ b/web/runtime @@ -0,0 +1,118 @@ + 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: + + <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: IA32 translating-JIT engine. + + * Milestone 4: non-Intel port of the JIT engine. + + * Milestone 5: Optimizing JIT engine port for IA32. + + * Milestone 6: non-Intel port of the Optimizing JIT + engine. + </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 + might need to install the CygWin32 development tools to get a + Unix-like compilation environment. + +** JIT Engine + + Currently we are evaluating various mechanisms for our JIT + engine (<a + href="http://www.intel.com/research/mrl/orp/">ORP</a>, <a + href="http://www.gnu.org/software/lightning/">GNU + Lightning</a>, and <a + href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine + Toolkit</a>.). + + We have not made a decision yet, but we might want to use a + Code Generator Generator for the Common Intermediate Language, + as that is likely going to allow us to create better code + (There are a couple of books that deal with this technique: "A + Retargetable C Compiler" and "Advanced Compiler Design and + Implementation"). + +** 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. diff --git a/web/status b/web/status new file mode 100644 index 00000000000..0002c33134d --- /dev/null +++ b/web/status @@ -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> + + + + + diff --git a/web/team b/web/team new file mode 100644 index 00000000000..eff7bc9d3d5 --- /dev/null +++ b/web/team @@ -0,0 +1,2 @@ +* The MonoNet Team + diff --git a/web/testing b/web/testing new file mode 100644 index 00000000000..febabf6550e --- /dev/null +++ b/web/testing @@ -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>. diff --git a/web/thanks b/web/thanks new file mode 100644 index 00000000000..5f2df36f9cd --- /dev/null +++ b/web/thanks @@ -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. diff --git a/web/todo b/web/todo new file mode 100644 index 00000000000..abae8cdfb40 --- /dev/null +++ b/web/todo @@ -0,0 +1 @@ +Discuss with write new JIT
\ No newline at end of file diff --git a/web/tools b/web/tools new file mode 100644 index 00000000000..1a7065d58aa --- /dev/null +++ b/web/tools @@ -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. + + + diff --git a/web/web/.cvsignore b/web/web/.cvsignore new file mode 100644 index 00000000000..a023a6f9c7c --- /dev/null +++ b/web/web/.cvsignore @@ -0,0 +1,2 @@ +*.src +*.html diff --git a/web/web/commands b/web/web/commands new file mode 100644 index 00000000000..b28827810b7 --- /dev/null +++ b/web/web/commands @@ -0,0 +1,16 @@ +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 +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 diff --git a/web/web/htmlify b/web/web/htmlify new file mode 100644 index 00000000000..d0e163eaab5 --- /dev/null +++ b/web/web/htmlify @@ -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"; + } +} diff --git a/web/web/images/bgsquares.gif b/web/web/images/bgsquares.gif Binary files differnew file mode 100644 index 00000000000..864bcd44038 --- /dev/null +++ b/web/web/images/bgsquares.gif diff --git a/web/web/images/bgsquares.png b/web/web/images/bgsquares.png Binary files differnew file mode 100644 index 00000000000..54de2ad1e6d --- /dev/null +++ b/web/web/images/bgsquares.png diff --git a/web/web/images/bgsquares.xcf.gz b/web/web/images/bgsquares.xcf.gz Binary files differnew file mode 100644 index 00000000000..200b5805615 --- /dev/null +++ b/web/web/images/bgsquares.xcf.gz diff --git a/web/web/images/mono.gif b/web/web/images/mono.gif Binary files differnew file mode 100644 index 00000000000..5ce7a218ac7 --- /dev/null +++ b/web/web/images/mono.gif diff --git a/web/web/images/mono.png b/web/web/images/mono.png Binary files differnew file mode 100644 index 00000000000..a19e38acedd --- /dev/null +++ b/web/web/images/mono.png diff --git a/web/web/images/pixel.gif b/web/web/images/pixel.gif Binary files differnew file mode 100644 index 00000000000..a4f37d7e02e --- /dev/null +++ b/web/web/images/pixel.gif diff --git a/web/web/images/pixel.png b/web/web/images/pixel.png Binary files differnew file mode 100644 index 00000000000..d8f33a2a3e4 --- /dev/null +++ b/web/web/images/pixel.png diff --git a/web/web/makefile b/web/web/makefile new file mode 100644 index 00000000000..4746d74832a --- /dev/null +++ b/web/web/makefile @@ -0,0 +1,38 @@ +SOURCES= \ + ../contributing \ + ../class-library \ + ../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 www@www.ximian.com:/web/cvsmodules/mono + +push2: + scp *.html primates:public_html/xxx diff --git a/web/web/process.pl b/web/web/process.pl new file mode 100755 index 00000000000..157ae9bb08f --- /dev/null +++ b/web/web/process.pl @@ -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; +} diff --git a/web/web/template.html.in b/web/web/template.html.in new file mode 100644 index 00000000000..7b3e5986494 --- /dev/null +++ b/web/web/template.html.in @@ -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: webmaster@go-mono.com">webmaster@go-mono.com</a> + </td> + <td colspan="2"></td> + </tr> +</tr> +</table> + +</body> +</html> |