Compare commits

..
697 Commits
Author SHA1 Message Date
nobody 5bafbfd341 This commit was manufactured by cvs2svn to create tag 'MONO_0_7'.
svn path=/tags/MONO_0_7/mono/; revision=871
2001-09-18 20:20:55 +00:00
Miguel de Icaza c0b183f58c Flush
svn path=/trunk/mono/; revision=870
2001-09-18 20:20:55 +00:00
Miguel de Icaza 50d0989617 2001-09-18 Miguel de Icaza <[email protected]>
* expression.cs (This::Emit): Implement.
	(This::Resolve): Implement.
	(TypeOf:Resolve): Implement.
	(Expression::ResolveSimpleName): Add an implicit this to instance
	field references.
	(MemberAccess::Resolve): Deal with Parameters and Fields.
	Bind instance variable to Field expressions.
	(FieldExpr::Instance): New field used to track the expression that
	represents the object instance.
	(FieldExpr::Resolve): Track potential errors from MemberLookup not
	binding
	(FieldExpr::Emit): Implement.

	* codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
	the last instruction contains a return opcode to avoid generating
	the last `ret' instruction (this generates correct code, and it is
	nice to pass the peverify output).

	* class.cs (TypeContainer::EmitFieldInitializers): Implement field
	initializer for static and instance variables.
	(Constructor::Emit): Allow initializer to be null in the case of
	static constructors.  Only emit initializer for instance
	constructors.

	(TypeContainer::FindMembers): Return a null array if there are no
	matches.

	Also fix the code for the MemberTypes.Method branch, as it was not
	scanning that for operators (or tried to access null variables before).

	* assign.cs (Assign::Emit): Handle instance and static fields.

	* TODO: Updated.

	* driver.cs: Stop compilation if there are parse errors.

	* cs-parser.jay (constructor_declaration): Provide default base
	initializer for non-static constructors.
	(constructor_declarator): Do not provide a default base
	initializers if none was specified.
	Catch the fact that constructors should not have parameters.

	* class.cs: Do not emit parent class initializers for static
	constructors, that should be flagged as an error.

svn path=/trunk/mcs/; revision=869
2001-09-18 20:20:18 +00:00
Ravi Pratap M d8107236e5 2001-09-18 Ravi Pratap <[email protected]>
* class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
	Move back code into TypeContainer::Populate.

svn path=/trunk/mcs/; revision=868
2001-09-18 14:59:49 +00:00
Ravi Pratap M f30241c0e5 2001-09-18 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::AddConstructor): Fix the check to
	compare against Name, not Basename.
	(Operator::OpType): Change Plus and Minus to Add and Subtract.

	* cs-parser.jay : Update accordingly.

	* class.cs (TypeContainer::FindMembers): For the case where we are searching
	for methods, don't forget to look into the operators too.
	(RegisterMethodBuilder): Helper method to take care of this for
	methods, constructors and operators.
	(Operator::Define): Completely revamp.
	(Operator.OperatorMethod, MethodName): New fields.
	(TypeContainer::Populate): Move the registering of builders into
	RegisterMethodBuilder.
	(Operator::Emit): Re-write.

	* expression.cs (Binary::Emit): Comment out code path to emit method
	invocation stuff for the case when we have a user defined operator. I am
	just not able to get it right !

svn path=/trunk/mcs/; revision=867
2001-09-18 09:28:49 +00:00
Dietmar Maurer a6ec683fbb 2001-09-18 Dietmar Maurer <[email protected]>
* x86.brg: added some rules to optimize code

	* testjit.c (get_address): use a binary search to get the address
	(main): added an option to debug the jit (-d)

svn path=/trunk/mono/; revision=866
2001-09-18 09:01:31 +00:00
Paolo Molaro 188721d669 Tue Sep 18 13:23:59 CEST 2001 Paolo Molaro <[email protected]>
* x86/x86-codegen.h: remove C++ comments.

svn path=/trunk/mono/; revision=865
2001-09-18 07:26:43 +00:00
Paolo Molaro a805685fb4 Tue Sep 18 13:21:33 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: fix some 64 bit issues. Safer support for delegates.

svn path=/trunk/mono/; revision=864
2001-09-18 07:25:48 +00:00
Paolo Molaro ee60cd3ab4 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <[email protected]>
* testjit.c: better/faster align code. Handle ldloc.s and stloc.s.

svn path=/trunk/mono/; revision=863
2001-09-18 07:23:06 +00:00
Paolo Molaro bab9560d9d Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <[email protected]>
* class.h, class.c: add mono_class_get_field_from_name ().
	* *: Fix C comments and other ANSI C issues.

svn path=/trunk/mono/; revision=862
2001-09-18 07:20:30 +00:00
Paolo Molaro 124d42f34b Tue Sep 18 13:15:12 CEST 2001 Paolo Molaro <[email protected]>
* monoburg.y: fix ANSI C issue.

svn path=/trunk/mono/; revision=861
2001-09-18 07:18:13 +00:00
Paolo Molaro da7059d825 Updates.
svn path=/trunk/mono/; revision=860
2001-09-18 07:17:01 +00:00
Miguel de Icaza c4d5517dad 2001-09-17 Miguel de Icaza <[email protected]>
* expression.cs (Expression::OverloadResolve): Drop TypeContainer
	argument.

	(Expression::MemberLookup): Provide a version that allows to
	specify the MemberTypes and BindingFlags.

	* statement.cs (Block::GetVariableInfo): Forgot to recurse here,
	so it was not fetching variable information from outer blocks.

	* modifiers.cs: (Modifiers::TypeAttr): Invert condition on
	Beforefieldinit as it was buggy.

	* rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
	that Ravi put here.

	* class.cs (Constructor::Emit): Only emit if block is not null.
	(TypeContainer::EmitDefaultConstructor): Removed routine, now we
	deal with this by semantically definining it as if the user had
	done it.

	(TypeContainer::FindMembers): Removed ad-hoc hack to deal with
	constructors as we now "emit" them at a higher level.

	(TypeContainer::DefineDefaultConstructor): Used to define the
	default constructors if none was provided.

	(ConstructorInitializer): Add methods Resolve and Emit.

	* expression.cs: Cast to ConstructorInfo instead of MethodInfo

svn path=/trunk/mcs/; revision=857
2001-09-18 01:58:47 +00:00
Miguel de Icaza 5e760e666a 2001-09-17 Miguel de Icaza <[email protected]>
* testjit.c (mono_compile_method): Provide better error reporting.

svn path=/trunk/mono/; revision=856
2001-09-17 20:53:35 +00:00
Miguel de Icaza e7d7c89e36 Unfinished work
svn path=/trunk/mcs/; revision=855
2001-09-17 20:52:42 +00:00
Miguel de Icaza 2cdc5c62fe Plata
svn path=/trunk/mono/; revision=854
2001-09-17 15:26:31 +00:00
Miguel de Icaza 363278bbda Gigante
svn path=/trunk/mono/; revision=853
2001-09-17 15:22:09 +00:00
Ravi Pratap M ec14f26566 2001-09-17 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::EmitDefaultConstructor): Register
	the default constructor builder with our hashtable for methodbuilders
	to methodcores.

	* expression.cs (Invocation::OverloadResolve): Add a check for pd == null
	and argument_count is 0 in which case we have a match.
	(Binary::ResolveOperator): More null checking and miscellaneous coding
	style cleanup.

svn path=/trunk/mcs/; revision=852
2001-09-17 14:38:01 +00:00
Miguel de Icaza 44befb2bd9 Include Calendar.cs to the build
svn path=/trunk/mcs/; revision=851
2001-09-17 14:34:30 +00:00
Miguel de Icaza fc5fe85286 Updated sources file
svn path=/trunk/mcs/; revision=850
2001-09-17 14:30:29 +00:00
Miguel de Icaza ceaabec533 Add new files from Wictor Wilen
svn path=/trunk/mcs/; revision=849
2001-09-17 14:29:52 +00:00
Miguel de Icaza 0976a979c4 More updates
svn path=/trunk/mono/; revision=848
2001-09-17 14:26:41 +00:00
Miguel de Icaza ecad30ea4c Update
svn path=/trunk/mono/; revision=847
2001-09-17 14:15:24 +00:00
Miguel de Icaza 1e729049da Add the CVS download information
svn path=/trunk/mono/; revision=846
2001-09-17 13:18:30 +00:00
Dietmar Maurer f50c820235 (tree_get_address): make sure that we can only jump to the first
instruction of a tree.

svn path=/trunk/mono/; revision=845
2001-09-17 12:31:44 +00:00
Dietmar Maurer 717eb7c323 2001-09-17 Dietmar Maurer <[email protected]>
* testjit.c (tree_get_address): impl. to fix address bug

svn path=/trunk/mono/; revision=844
2001-09-17 11:42:03 +00:00
Ravi Pratap M 4f3a253569 2001-09-17 Ravi Pratap <[email protected]>
* rootcontext.cs (IsNameSpace): Compare against null.

	* everywhere : Correct spelling to 'Greater' and to 'Subtract'

	* class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
	and Unary::Operator.

	* cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
	accordingly.

	* expression.cs (Binary::method): New member to hold the MethodBase for the case when
	we have overloaded operators.
	(Binary::ResolveOperator): Implement the part which does the operator overload
	resolution.

	* class.cs (Operator::Emit): Implement.
	(TypeContainer::Emit): Emit the operators we have too.

	* expression.cs (Binary::Emit): Update to emit the appropriate code for
	the case when we have a user-defined operator.

svn path=/trunk/mcs/; revision=843
2001-09-17 09:24:42 +00:00
Dietmar Maurer c93716ea19 2001-09-17 Dietmar Maurer <[email protected]>
* x86.brg: emit real code for calls

	* testjit.c (create_jit_trampoline): creates a function to trigger jit
	compilation.
	(mono_compile_method): reversed argument order

svn path=/trunk/mono/; revision=842
2001-09-17 09:10:44 +00:00
Dietmar Maurer e1a26d23b8 2001-09-17 Dietmar Maurer <[email protected]>
* x86/x86-codegen.h (x86_alu_reg_reg): replaced src/dest

svn path=/trunk/mono/; revision=841
2001-09-17 07:18:11 +00:00
Miguel de Icaza 83e01843f1 Checked in updates from Gaurav Vaish
svn path=/trunk/mcs/; revision=840
2001-09-17 00:39:57 +00:00
Miguel de Icaza b3b3db1716 2001-09-17 Miguel de Icaza <[email protected]>
* rootcontext.cs: Fix bug: tree.Namespaces might be null.

svn path=/trunk/mcs/; revision=839
2001-09-17 00:32:53 +00:00
Miguel de Icaza dac6469d03 Add news item on Gtk#
svn path=/trunk/mono/; revision=838
2001-09-17 00:25:19 +00:00
Sergey Chaban 056bbcc693 * Added a bunch of Token structs (all are generated from template).
* common.src: added new structs to the build and fixed a small typo.

svn path=/trunk/mcs/; revision=833
2001-09-16 11:29:38 +00:00
Ravi Pratap M 3077d452d6 2001-09-16 Ravi Pratap <[email protected]>
* class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
	(TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
	(Constructor::Emit): Implement.
	(EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
	if we have no work to do.
	(TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's
	Emit method.

	* interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
	(Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.

	* class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
	of parent.parent.

svn path=/trunk/mcs/; revision=832
2001-09-16 09:56:36 +00:00
Sergey Chaban 96461ab598 * common.src: added PackingSize.cs;
svn path=/trunk/mcs/; revision=831
2001-09-16 09:04:23 +00:00
Sergey Chaban 4053b51507 * PackingSize.cs: Initial check-in.
svn path=/trunk/mcs/; revision=830
2001-09-16 08:55:27 +00:00
Dietmar Maurer f733d4f3f2 2001-09-15 Dietmar Maurer <[email protected]>
* x86.brg (stmt): don't emit unnecessary register moves

	* testjit.c (tree_allocate_regs): free registers earlier

svn path=/trunk/mono/; revision=829
2001-09-15 08:27:41 +00:00
Dietmar Maurer 951a13548a added more ideas
svn path=/trunk/mono/; revision=828
2001-09-15 07:58:08 +00:00
Ravi Pratap M c904eddfaa 2001-09-15 Ravi Pratap <[email protected]>
* tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
	in the source.
	(Tree::RecordNamespace): Method to do what the name says ;-)
	(Tree::Namespaces): Property to get at the namespaces hashtable.

	* cs-parser.jay (namespace_declaration): Call RecordNamespace to
	keep track.

	* rootcontext.cs (IsNamespace): Fixed it :-)

svn path=/trunk/mcs/; revision=827
2001-09-15 03:47:14 +00:00
Miguel de Icaza 02d4e46471 2001-09-14 Miguel de Icaza <[email protected]>
* class.cs (TypeContainer::FindMembers): Add support for
	constructors.
	(MethodCore): New class that encapsulates both the shared aspects
	of a Constructor and a Method.
	(Method, Constructor): Factored pieces into MethodCore.

	* driver.cs: Added --fatal which makes errors throw exceptions.
	Load System assembly as well as part of the standard library.

	* report.cs: Allow throwing exceptions on errors for debugging.

	* modifiers.cs: Do not use `parent', instead use the real type
	container to evaluate permission settings.

	* class.cs: Put Ravi's patch back in.  He is right, and we will
	have to cope with the

svn path=/trunk/mcs/; revision=826
2001-09-14 19:06:23 +00:00
Ravi Pratap M 5cd224a06b 2001-09-14 Ravi Pratap <[email protected]>
* modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
	FamORAssem, not FamANDAssem.

svn path=/trunk/mcs/; revision=825
2001-09-14 15:16:12 +00:00
Miguel de Icaza 0a078c0a18 2001-09-14 Miguel de Icaza <[email protected]>
* driver.cs: Added --parse option that only parses its input files
	and terminates.

svn path=/trunk/mcs/; revision=824
2001-09-14 14:01:44 +00:00
Miguel de Icaza 12ba5a24c4 2001-09-14 Miguel de Icaza <[email protected]>
* class.cs: Reveted lsat change from Ravi to IsTopLevel.  That is
	incorrect.  IsTopLevel is not used to tell whether an object is
	root_types or not (that can be achieved by testing this ==
	root_types).  But to see if this is a top-level *class* (not
	necessarly our "toplevel" container).

svn path=/trunk/mcs/; revision=823
2001-09-14 13:57:23 +00:00
Dietmar Maurer fe2e9c56ce 2001-09-14 Dietmar Maurer <[email protected]>
* x86.brg: branch addresses are now resolved

	* testjit.c (compute_branches): compute address of branches

	* x86.brg: emit real x86 instructions

	* testjit.c: call objdump to disassemble the output

svn path=/trunk/mono/; revision=822
2001-09-14 12:40:14 +00:00
Dick Porter d2bf75c0f7 2001-09-14 Dick Porter <[email protected]>
* class.xml: Added System.Threading classes

	* maintainers.xml: Added myself

svn path=/trunk/mono/; revision=821
2001-09-14 12:03:33 +00:00
Ravi Pratap M 950b9f6973 2001-09-14 Ravi Pratap <[email protected]>
* enum.cs (Enum::Define): Modify to call the Lookup method on the
	parent instead of a direct call to GetType.

svn path=/trunk/mcs/; revision=820
2001-09-14 12:00:53 +00:00
Paolo Molaro 40bf103146 Mostly stubs.
svn path=/trunk/mcs/; revision=819
2001-09-14 11:16:30 +00:00
Paolo Molaro c9ee427524 Fri Sep 14 16:12:08 CEST 2001 Paolo Molaro <[email protected]>
* MethodBase.cs, MethodInfo.cs: added.

svn path=/trunk/mcs/; revision=818
2001-09-14 10:14:48 +00:00
Paolo Molaro cc12678a22 Updates.
svn path=/trunk/mono/; revision=817
2001-09-14 10:05:58 +00:00
Ravi Pratap M 3c670719c4 2001-09-14 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::TypeAttr): Remove property code and move it into
	Modifiers.TypeAttr. This should just be a call to that method.

	* modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
	object so that we can determine if we are top-level or not.

	* delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the
	TypeContainer too.

	* enum.cs (Enum::Define): Ditto.

	* modifiers.cs (FieldAttr): Re-write.

	* class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
	(TypeContainer::HaveStaticConstructor): New property to provide access
	to precisely that info.

	* modifiers.cs (MethodAttr): Re-write.
	(EventAttr): Remove altogether as there seems to be no ostensible use for it.

	* class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
	of top-level types as claimed.

svn path=/trunk/mcs/; revision=816
2001-09-14 03:53:33 +00:00
Nick Drochak f541c605cc 2001-09-14 Nick Drochak <[email protected]>
* /mcs/class/makefile:
	  /mcs/class/corlib/makefile:
	  /mcs/mcs/makefile:
	  /toos/makefile:
		use /cygdrive/ instead of //. Old method of
		accessing drives under cygwin is now obsolete with version
		1.3.3 of the cygwin DLL

	* /mcs/System/System.Collections.Specialized/ChangeLog:
		Forgot to commit this for a while.  Sorry 'bout that.

svn path=/trunk/mcs/; revision=815
2001-09-14 01:57:07 +00:00
Miguel de Icaza 0c6144f4fa 2001-09-13 Miguel de Icaza <[email protected]>
* expression.cs (MemberLookup): Fruitless attempt to lookup
	constructors.  Maybe I need to emit default constructors?  That
	might be it (currently .NET emits this for me automatically).
	(Invocation::OverloadResolve): Cope with Arguments == null.
	(Invocation::EmitArguments): new function, shared by the new
	constructor and us.
	(Invocation::Emit): Handle static and instance methods.  Emit
	proper call instruction for virtual or non-virtual invocations.
	(New::Emit): Implement.
	(New::Resolve): Implement.
	(MemberAccess:Resolve): Implement.
	(MethodGroupExpr::InstanceExpression): used conforming to the spec
	to track instances.
	(FieldExpr::Resolve): Set type.

	* support.cs: Handle empty arguments.

	* cs-parser.jay (CompositeLookup, QualifierIdentifier,
	SimpleLookup): Auxiliary routines to help parse a qualifier
	identifier.

	Update qualifier_identifier rule.

	* codegen.cs: Removed debugging messages.

	* class.cs: Make this a global thing, this acts just as a "key" to
	objects that we might have around.

	(Populate): Only initialize method_builders_to_methods once.

	* expression.cs (PropertyExpr): Initialize type from the
	PropertyType.

svn path=/trunk/mcs/; revision=814
2001-09-13 18:47:55 +00:00
Ravi Pratap M 215a882d6d Whitspace :-)
svn path=/trunk/mcs/; revision=813
2001-09-13 14:02:27 +00:00
Dick Porter f2489d11af Set the correct enum values.
svn path=/trunk/mcs/; revision=812
2001-09-13 13:02:35 +00:00
Dick Porter 30a82dcb2e More System.Threading stubs, in the System assembly.
svn path=/trunk/mcs/; revision=811
2001-09-13 12:49:58 +00:00
Dick Porter 58b4ee1b2c System.Threading class stubs.
svn path=/trunk/mcs/; revision=810
2001-09-13 12:47:25 +00:00
Dick Porter f10537f007 Added a stub for the IsValueType property.
svn path=/trunk/mcs/; revision=809
2001-09-13 12:42:19 +00:00
Dick Porter f8f97557a9 Added the other constructor, so that System.Threading exceptions can
inherit it.

svn path=/trunk/mcs/; revision=808
2001-09-13 12:41:14 +00:00
Paolo Molaro 277a57ffdf Thu Sep 13 18:04:23 CEST 2001 Paolo Molaro <[email protected]>
* FileLoadException.cs, FileNotFoundException.cs: added.


Thu Sep 13 18:05:16 CEST 2001 Paolo Molaro <[email protected]>

	* Assembly.cs: added stub code.

svn path=/trunk/mcs/; revision=807
2001-09-13 12:09:03 +00:00
Miguel de Icaza bc0caaf7ac 2001-09-13 Miguel de Icaza <[email protected]>
* codegen.cs (EmitContext::EmitBoolExpression): Use propper
	Resolve pattern.  Attempt to implicitly convert value to boolean.
	Emit code.

	* expression.cs: Set the type for the int32/int32 argument case.
	(Binary::ResolveOperator): Set the return type to boolean for
	comparission operators

	* typemanager.cs: Remove debugging print code.

	(Invocation::Resolve): resolve type.

svn path=/trunk/mcs/; revision=806
2001-09-13 11:57:57 +00:00
Miguel de Icaza 3550dff255 2001-09-13 Miguel de Icaza <[email protected]>
* class.cs: Allocate a MemberInfo of the correct size, as the code
	elsewhere depends on the test to reflect the correct contents.

	(Method::) Keep track of parameters, due to System.Reflection holes

	(TypeContainer::Populate): Keep track of MethodBuilders to Method
	mapping here.

	(TypeContainer::FindMembers): Use ArrayList and then copy an array
	of the exact size and return that.

	(Class::LookupMethodByBuilder): New function that maps
	MethodBuilders to its methods.  Required to locate the information
	on methods because System.Reflection bit us again.

	* support.cs: New file, contains an interface ParameterData and
	two implementations: ReflectionParameters and InternalParameters
	used to access Parameter information.  We will need to grow this
	as required.

	* expression.cs (Invocation::GetParameterData): implement a cache
	and a wrapper around the ParameterData creation for methods.
	(Invocation::OverloadResolve): Use new code.

svn path=/trunk/mcs/; revision=805
2001-09-13 11:09:26 +00:00
Dietmar Maurer 9179a06878 *** empty log message ***
svn path=/trunk/mono/; revision=804
2001-09-13 10:24:11 +00:00
Dietmar Maurer bfb56e54da 2001-09-13 Dietmar Maurer <[email protected]>
* x86.brg: use the right offsets to access local variables
	and arguments.

	* emit-x86.c: only save/restore callee saved registers if they are
	really modified.

	* testjit.c (tree_allocate_regs): use the new MonoRegSet to
	allocate registers.
	(mono_compile_method): changed the tree for mothod calls

	* regset.h: impl.

	* regset.c: impl.

svn path=/trunk/mono/; revision=803
2001-09-13 10:23:27 +00:00
Dietmar Maurer 649ad548c7 added some thoughts
svn path=/trunk/mono/; revision=802
2001-09-13 10:14:22 +00:00
Dietmar Maurer 123f4ab491 *** empty log message ***
svn path=/trunk/mono/; revision=801
2001-09-13 09:26:57 +00:00
Miguel de Icaza 8837e87920 Replace 811 = 811 with 811 =
svn path=/trunk/mcs/; revision=800
2001-09-13 07:00:04 +00:00
Ravi Pratap M 7b615d84d5 2001-09-13 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::EmitField): Remove and move into
	(Field::Define): here and modify accordingly.
	(Field.FieldBuilder): New member.
	(TypeContainer::Populate): Update accordingly.
	(TypeContainer::FindMembers): Implement.

svn path=/trunk/mcs/; revision=799
2001-09-13 05:01:46 +00:00
Miguel de Icaza 90f515e800 2001-09-13 Miguel de Icaza <[email protected]>
* statement.cs: (VariableInfo::VariableType): New field to be
	initialized with the full type once it is resolved.

svn path=/trunk/mcs/; revision=798
2001-09-13 00:08:45 +00:00
Miguel de Icaza 985fca6fd2 2001-09-12 Miguel de Icaza <[email protected]>
* parameter.cs (GetParameterInfo): Use a type cache to compute
	things only once, and to reuse this information

	* expression.cs (LocalVariableReference::Emit): Implement.
	(OpcodeCast::Emit): fix.

	(ParameterReference::Resolve): Implement.
	(ParameterReference::Emit): Implement.

	* cs-parser.jay: Fix bug introduced by Ravi, variable initializers
	that are expressions need to stay as Expressions.

	* typemanager.cs (CSharpName): Returns the C# name of a type if
	possible.

	* expression.cs (Expression::ConvertImplicit): New function that
	implements implicit type conversions.

svn path=/trunk/mcs/; revision=797
2001-09-13 00:06:51 +00:00
Miguel de Icaza 6f31d5d6d8 2001-09-12 Miguel de Icaza <[email protected]>
* expression.cs (LocalVariableReference::Emit): Implement.
	(OpcodeCast::Emit): fix.

	* cs-parser.jay: Fix bug introduced by Ravi, variable initializers
	that are expressions need to stay as Expressions.

svn path=/trunk/mcs/; revision=796
2001-09-12 23:31:37 +00:00
Miguel de Icaza 58b91fe89d 2001-09-12 Miguel de Icaza <[email protected]>
* typemanager.cs (CSharpName): Returns the C# name of a type if
	possible.

	* expression.cs (Expression::ConvertImplicit): New function that
	implements implicit type conversions.

	(Expression::ImplicitReferenceConversion): Implements implicit
	reference conversions.

	(EmptyCast): New type for transparent casts.

	(OpcodeCast): New type for casts of types that are performed with
	a sequence of bytecodes.

	(BoxedCast): New type used for casting value types into reference
	types.  Emits a box opcode.

	(Binary::DoNumericPromotions): Implements numeric promotions of
	and computation of the Binary::Type.

	(Binary::EmitBranchable): Optimization.

	(Binary::Emit): Implement code emission for expressions.

	* typemanager.cs (TypeManager): Added two new core types: sbyte
	and byte.

svn path=/trunk/mcs/; revision=795
2001-09-12 22:45:05 +00:00
Miguel de Icaza 83302e4089 2001-09-12 Miguel de Icaza <[email protected]>
* interp.c (ves_exec_method): implement conv.u8 opcode.

svn path=/trunk/mono/; revision=794
2001-09-12 19:47:07 +00:00
Ravi Pratap M 9a157ef0a9 2001-09-12 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::FindMembers): Method which does exactly
	what Type.FindMembers does, only we don't have to use reflection. No
	implementation yet.

	* typemanager.cs (typecontainers): New hashtable to hold the corresponding
	typecontainer objects as we need to get at them.
	(TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.

	* rootcontext.cs : Correspondingly modify called to AddUserType to pass the
	typecontainer object.

	* expression.cs (MemberLookup): Modify signature to take a RootContext object instead
	of just a Report object.

svn path=/trunk/mcs/; revision=793
2001-09-12 14:17:56 +00:00
Dietmar Maurer 0afddf3cce *** empty log message ***
svn path=/trunk/mono/; revision=792
2001-09-12 03:47:43 +00:00
Ravi Pratap M a65125a125 2001-09-11 Ravi Pratap <[email protected]>
* class.cs (Event::Define): Go back to using the prefixes "add_" and
	"remove_"
	(TypeContainer::Populate): Now define the delegates of the type too.
	(TypeContainer.Delegates): Property to access the list of delegates defined
	in the type.

	* delegates.cs (Delegate::Define): Implement partially.

	* modifiers.cs (TypeAttr): Handle more flags.

svn path=/trunk/mcs/; revision=791
2001-09-11 10:05:32 +00:00
Paolo Molaro 82bf0081a8 Tue Sep 11 13:46:35 CEST 2001 Paolo Molaro <[email protected]>
* Makefile.am: get it to work on platforms that insist on having
	a weird extension at the end of an executable name.

svn path=/trunk/mono/; revision=790
2001-09-11 07:50:55 +00:00
Ravi Pratap M d76ab92357 2001-09-11 Ravi Pratap <[email protected]>
* class.cs (Indexer::Define): Fix for loop iteration condition to be just <
	and not <=
	(Operator::Define): Re-write logic to get types by using the LookupType method
	instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
 	(Indexer::Define): Ditto.
	(Event::Define): Ditto.
	(Property::Define): Ditto.

svn path=/trunk/mcs/; revision=789
2001-09-11 03:13:23 +00:00
Miguel de Icaza f0610365ae 2001-09-10 Miguel de Icaza <[email protected]>
* x86.brg: Use Unix assembly syntax.

	* emit-x86.c: support code, should be moved

	* testjit.c: Use GPtrArrays instead of GLists, as those are very
	inefficient at appends.

svn path=/trunk/mono/; revision=788
2001-09-10 20:13:51 +00:00
Miguel de Icaza 680c61d7e1 2001-09-10 Miguel de Icaza <[email protected]>
* testjit.c: Use GPtrArrays instead of GLists, as those are very
	inefficient at appends.

	* Renamed `create_new_leave' to `create_new_leaf'

svn path=/trunk/mono/; revision=787
2001-09-10 20:12:47 +00:00
Ravi Pratap M 24a83ed220 2001-09-10 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::Populate): Now define operators too.
	(TypeContainer.Operators): New property to access the list of operators
	in a type.
	(Operator.OperatorMethodBuilder): New member to hold the method builder
	for the operator we are defining.
	(Operator::Define): Implement.

svn path=/trunk/mcs/; revision=786
2001-09-10 16:17:30 +00:00
Ravi Pratap M ec96431976 2001-09-10 Ravi Pratap <[email protected]>
* class.cs (Event::Define): Make the prefixes of the accessor methods
	addOn_ and removeOn_

	* genericparser.cs (GenericParser::error): Overloaded method to handle the case
	of the location being passed in too. Ideally, this should go later since all
	error reporting should be done through the Report object.

	* class.cs (TypeContainer.Indexers): New property to access the list of indexers.
	(Populate): Iterate thru the indexers we have and define them too.
	(Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
	for the get and set accessors.
	(Indexer::Define): Implement.

svn path=/trunk/mcs/; revision=785
2001-09-10 15:43:45 +00:00
Miguel de Icaza d31d273a2d 2001-09-10 Miguel de Icaza <[email protected]>
* Renamed `create_new_leave' to `create_new_leaf'

svn path=/trunk/mono/; revision=784
2001-09-10 14:52:35 +00:00
Paolo Molaro fd9ebd8238 Mon Sep 10 20:19:00 CEST 2001 Paolo Molaro <[email protected]>
* configure.in: check for sizeof(void*) and for the architecture.

Mon Sep 10 17:26:06 CEST 2001 Paolo Molaro <[email protected]>

	* Makefile.am, x86/Makefile.am: conditional compile logic
	to make porting to different targets easier.

Mon Sep 10 17:24:45 CEST 2001 Paolo Molaro <[email protected]>

	* Makefile.am: make it work for make distcheck.

Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <[email protected]>

	* endian.h, assembly.c: fix some endianness issues.

Mon Sep 10 20:20:36 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: endian fixes, comments.

svn path=/trunk/mono/; revision=783
2001-09-10 14:26:02 +00:00
Miguel de Icaza e3cc1a6593 Add WebControls
svn path=/trunk/mcs/; revision=782
2001-09-10 13:18:14 +00:00
Dietmar Maurer 9462946e40 *** empty log message ***
svn path=/trunk/mono/; revision=781
2001-09-10 09:34:11 +00:00
Dietmar Maurer 06432d606a added the jit prototype, small fixes
svn path=/trunk/mono/; revision=780
2001-09-10 09:14:46 +00:00
Jim Richardson cd1a10df73 updated status
svn path=/trunk/mono/; revision=779
2001-09-10 09:10:34 +00:00
Jim Richardson 08ba173da1 added additional implementation
svn path=/trunk/mcs/; revision=778
2001-09-10 09:09:07 +00:00
Jim Richardson e2b6b41921 updated to reflect wrapper changes
svn path=/trunk/mcs/; revision=777
2001-09-10 09:04:34 +00:00
Jim Richardson af1c89512a added errno constant ENOTDIR
svn path=/trunk/mono/; revision=776
2001-09-10 09:03:07 +00:00
Jim Richardson cad5380989 added functions unlink and stat
svn path=/trunk/mono/; revision=775
2001-09-10 07:39:00 +00:00
Nick Drochak 42f22afd91 2001-09-09 Nick Drochak <[email protected]>
* BooleanSwitch.cs: Make this class use it's parent class's features.
		Namely, use SwitchSetting so that we can get OnSwitchSettingChanged()
		to fire for free.

svn path=/trunk/mcs/; revision=774
2001-09-09 10:50:56 +00:00
Nick Drochak 578624f79e 2001-09-09 Nick Drochak <[email protected]>
* ChangeLog: added this file

	* Switch.cs: call OnSwitchSettingChanged() when the switch setting is,
		yes you gessed it, changed.

svn path=/trunk/mcs/; revision=773
2001-09-09 10:07:15 +00:00
Nick Drochak 3cc07e9e58 2001-09-09 Nick Drochak <[email protected]>
* Makefile.am: change CLEANFILES line to use just '=' instead of '+='
                some versions of automake complain if you try to '+=' before you '='

svn path=/trunk/mono/; revision=772
2001-09-09 09:38:07 +00:00
Miguel de Icaza 79686b5870 oops
svn path=/trunk/mcs/; revision=771
2001-09-09 02:15:46 +00:00
Miguel de Icaza 5bf35b1a43 2001-09-09 Miguel de Icaza <[email protected]>
* expression.cs (Binary::Resolve): Beginning of it.  I scratched
	my previous implementation, did not work.

	* typemanager.cs: Add a couple of missing types (the longs).

	* literal.cs: Use TypeManager.bool_type instead of getting it.

	* expression.cs (EventExpr): New kind of expressions.
	(Expressio::ExprClassFromMemberInfo): finish

svn path=/trunk/mcs/; revision=770
2001-09-09 02:15:21 +00:00
Miguel de Icaza c5170d4e17 2001-09-09 Miguel de Icaza <[email protected]>
* expression.cs (EventExpr): New kind of expressions.
	(Expressio::ExprClassFromMemberInfo): finish

svn path=/trunk/mcs/; revision=769
2001-09-09 00:08:39 +00:00
Miguel de Icaza a5e85deeb0 2001-09-08 Miguel de Icaza <[email protected]>
* assign.cs: Emit stores to static fields differently.

svn path=/trunk/mcs/; revision=768
2001-09-08 23:24:03 +00:00
Jeffrey Stedfast 2bac0ddf51 2001-09-08 Jeffrey Stedfast <[email protected]>
* String.cs (TrimStart): Don't keep looping through the trimchars
	once we've found a match.
	(TrimEnd): Same here.
	(Trim): And finally here.

svn path=/trunk/mcs/; revision=767
2001-09-08 21:11:01 +00:00
Jim Richardson 74f11c48e8 checked in updated Wrapper autogenerated class
modifed FileStream.cs using directive to reflect new namespace for Wrapper.cs

svn path=/trunk/mcs/; revision=766
2001-09-08 12:06:29 +00:00
Ravi Pratap M 6365147e75 2001-09-08 Ravi Pratap <[email protected]>
* Merge in changes and adjust code to tackle conflicts. Backed out my
	code in Assign::Resolve ;-)

2001-09-08  Ravi Pratap  <[email protected]>

	* cs-parser.jay (CheckAttributeTarget): Modify call to error to use
	instead Report.Error and also pass in the location.
	(CSharpParser::Lexer): New readonly property to return the reference
	to the Tokenizer object.
	(declare_local_variables): Use Report.Error with location instead of plain
	old error.
	(CheckDef): Ditto.

	* class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
	(Operator.CheckBinaryOperator): Ditto.

	* cs-parser.jay (operator_declarator): Update accordingly.

	* cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
	(CheckBinaryOperator): Same here.

	* rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
	on the name without any prefixes of namespace names etc. This is because we
	already might have something already fully qualified like
	'System.Console.WriteLine'

	* assign.cs (Resolve): Begin implementation. Stuck ;-)

2001-09-07  Ravi Pratap  <[email protected]>

	* cs-tokenizer.cs (location): Return a string which also contains
	the file name.

	* expression.cs (ElementAccess): New class for expressions of the
	type 'element access.'
	(BaseAccess): New class for expressions of the type 'base access.'
	(CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
	respectively.

	* cs-parser.jay (element_access): Implement action.
	(base_access): Implement actions.
	(checked_expression, unchecked_expression): Implement.

	* cs-parser.jay (local_variable_type): Correct and implement.
	(type_suffixes, type_suffix_list, type_suffix): Implement actions.

	* cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.

	* cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
	name and the specifiers.

	* interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes

	* rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of
	making them all public ;-)

	* cs-parser.jay (error): Remove entirely as we have an implementation in the base
	class anyways.

svn path=/trunk/mcs/; revision=765
2001-09-08 11:18:21 +00:00
Ravi Pratap M c359b00bef 2001-09-07 Ravi Pratap <[email protected]>
* Char.cs (IsLetterOrDigit): Implement.
	(IsLower): Implement, but we need to be Unicode aware.
	(IsNumber): Implement.
	(IsPunctuation): Implement.
	(IsWhiteSpace): Implement.
	(ToUpper): Fix to subtract 32 from the ASCII value, not 33 :)
	(ToLower): Same here.

svn path=/trunk/mcs/; revision=764
2001-09-08 10:58:09 +00:00
Dietmar Maurer b358ec1260 2001-09-08 Dietmar Maurer <[email protected]>
* monoburg.c (emit_header): added some convenient macros

	* monoburg.y (optcfunc): allow arbitrary cost functions

svn path=/trunk/mono/; revision=763
2001-09-08 07:43:17 +00:00
Dietmar Maurer da356f957b run automake, aotoconf, ...
svn path=/trunk/mono/; revision=762
2001-09-08 04:01:08 +00:00
Miguel de Icaza 10ec700ce6 Update errors file
svn path=/trunk/mcs/; revision=761
2001-09-07 21:19:21 +00:00
Miguel de Icaza a978c0c7d6 Update passport doc
svn path=/trunk/mono/; revision=760
2001-09-07 16:05:14 +00:00
Sergey Chaban 33f04f45a6 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=759
2001-09-07 16:01:44 +00:00
Miguel de Icaza 3dee69390e Add man page
svn path=/trunk/mono/; revision=758
2001-09-07 15:43:45 +00:00
Sergey Chaban f415eb4ef5 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=757
2001-09-07 15:36:23 +00:00
Sergey Chaban 81ebe522c4 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=756
2001-09-07 15:30:28 +00:00
Sergey Chaban 69868c1712 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=755
2001-09-07 15:22:03 +00:00
Sergey Chaban 4c8bdd6194 Replaced with specs-compliant enum.
svn path=/trunk/mcs/; revision=754
2001-09-07 15:19:30 +00:00
Sergey Chaban 4fee956984 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=753
2001-09-07 15:15:18 +00:00
Sergey Chaban e7bceb0966 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=752
2001-09-07 14:44:09 +00:00
Sergey Chaban 375aea2107 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=751
2001-09-07 14:35:29 +00:00
Sergey Chaban 5419818ad6 Removed auto-generated comments.
svn path=/trunk/mcs/; revision=750
2001-09-07 14:27:42 +00:00
Sergey Chaban 9bed5ef97a * DateTimeStyles.cs: removed auto-generated comments.
NumberStyles.cs: added [Flags] attribute (according to specs).

svn path=/trunk/mcs/; revision=749
2001-09-07 14:22:00 +00:00
Sergey Chaban ee08df0317 Removed autogenerated comments.
svn path=/trunk/mcs/; revision=748
2001-09-07 13:48:54 +00:00
Miguel de Icaza e1a7c130d4 Integrate System.Reflection.Emit to the build
svn path=/trunk/mcs/; revision=747
2001-09-07 13:01:46 +00:00
Miguel de Icaza f316306712 2001-09-04 Miguel de Icaza <[email protected]>
* Object.cs: Shortcut, if (a == b) then return true.

svn path=/trunk/mcs/; revision=746
2001-09-07 12:59:56 +00:00
Paolo Molaro 7f4b0c2fb6 Fri Sep 7 18:43:06 CEST 2001 Paolo Molaro <[email protected]>
* x86/x86-codegen.h: fixes and x86_mov_membase_imm ().
	* x86/tramp.c: implemented mono_create_method_pointer ():
	creates a native pointer to a method implementation that can be
	used as a normal C callback.


Fri Sep 7 18:45:38 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c, interp.h: make ves_exec_method () and stackval_from_data ()
	non static. Implement a couple of runtime methods needed to
	use delegates (ves_runtime_method ()).
	Implemented ldftn opcode.

svn path=/trunk/mono/; revision=745
2001-09-07 12:53:34 +00:00
Paolo Molaro dd833782a9 Add delegate test.
svn path=/trunk/mono/; revision=744
2001-09-07 12:52:44 +00:00
Paolo Molaro 1b050ad238 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <[email protected]>
* loader.h, load.c: add delegate_class to mono_defaults.
	Handle runtime provided methods in mono_get_method ().

svn path=/trunk/mono/; revision=743
2001-09-07 12:43:32 +00:00
Paolo Molaro 293a40c526 Fri Sep 7 18:34:48 CEST 2001 Paolo Molaro <[email protected]>
* Delegate.cs: we need a pointer to the method thunk in
	the delegate object.

svn path=/trunk/mcs/; revision=742
2001-09-07 12:37:33 +00:00
Sergey Chaban 4fa777c4d0 Initial check-in.
svn path=/trunk/mcs/; revision=741
2001-09-07 12:31:51 +00:00
Nick Drochak 593516f985 2001-09-07 Nick Drochak <[email protected]>
* Makefile.am: Use '=' to set CLEANFILES instead of '+=' since
		it's the first assignment.

	* ChangeLog: added this file.

svn path=/trunk/mono/; revision=740
2001-09-07 09:30:26 +00:00
Dietmar Maurer 018c18efee *** empty log message ***
svn path=/trunk/mono/; revision=739
2001-09-07 08:11:51 +00:00
Dietmar Maurer 73cf174c07 bug fixes, added ChangeLog
svn path=/trunk/mono/; revision=738
2001-09-07 08:11:24 +00:00
Paolo Molaro 720a2aa448 Fri Sep 7 12:28:01 CEST 2001 Paolo Molaro <[email protected]>
* AsyncCallback.cs, common.src: add AsyncCallback delegate.

svn path=/trunk/mcs/; revision=737
2001-09-07 06:32:33 +00:00
Miguel de Icaza dc91508692 2001-09-07 Miguel de Icaza <[email protected]>
* expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
	PropertyExprs.
	(FieldExpr, PropertyExprs): New resolved expressions.
	(SimpleName::MemberStaticCheck): Perform static checks for access
	to non-static fields on static methods. Maybe this should be
	generalized for MemberAccesses.
	(SimpleName::ResolveSimpleName): More work on simple name
	resolution.

	* cs-parser.jay (primary_expression/qualified_identifier): track
	the parameter index.

	* codegen.cs (CodeGen::Save): Catch save exception, report error.
	(EmitContext::EmitBoolExpression): Chain to expression generation
	instead of temporary hack.
	(::EmitStatementExpression): Put generic expression code generation.

	* assign.cs (Assign::Emit): Implement variable assignments to
	local variables, parameters and fields.

2001-09-06  Miguel de Icaza  <[email protected]>

	* statement.cs (Block::GetVariableInfo): New method, returns the
	VariableInfo for a variable name in a block.
	(Block::GetVariableType): Implement in terms of GetVariableInfo

	* literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
	DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement

svn path=/trunk/mcs/; revision=736
2001-09-07 02:36:48 +00:00
Nick Drochak 2ad629d1b7 2001-09-07 Nick Drochak <[email protected]>
* c-sharp: Put in reference to jb2csharp project on Sourceforge
		for those interested in helping with the port.

svn path=/trunk/mono/; revision=735
2001-09-06 19:06:00 +00:00
Miguel de Icaza a6933952be New update from Leen Toelen
svn path=/trunk/mcs/; revision=734
2001-09-06 17:24:29 +00:00
Sergey Chaban cebe9567f9 * Added couple enums;
svn path=/trunk/mcs/; revision=733
2001-09-06 16:23:12 +00:00
Ravi Pratap M 19aaa14f37 2001-09-06 Ravi Pratap <[email protected]>
* cs-parser.jay (operator_declaration): Continue on my quest : update
	to take attributes argument.
	(event_declaration): Ditto.
	(enum_declaration): Ditto.
	(indexer_declaration): Ditto.

	* class.cs (Operator::Operator): Update constructor accordingly.
	(Event::Event): Ditto.

	* delegate.cs (Delegate::Delegate): Same here.

	* enum.cs (Enum::Enum): Same here.

svn path=/trunk/mcs/; revision=732
2001-09-06 15:34:55 +00:00
Jeffrey Stedfast 72f7da2166 commit the changelog too
svn path=/trunk/mcs/; revision=731
2001-09-06 14:21:51 +00:00
Jeffrey Stedfast 58b79fded9 2001-09-06 Jeffrey Stedfast <[email protected]>
* String.cs (System): Don't mix uint and int.

svn path=/trunk/mcs/; revision=730
2001-09-06 14:21:30 +00:00
Miguel de Icaza 762ca13d71 2001-09-06 Miguel de Icaza <[email protected]>
* monodis.1: Update man page.

svn path=/trunk/mono/; revision=729
2001-09-06 14:07:26 +00:00
Paolo Molaro 13fdd7e052 Thu Sep 6 15:38:00 CEST 2001 Paolo Molaro <[email protected]>
* x86/x86-codegen.h: added x86_rdtsc() and fixes.
	* x86/tramp.c: create trampolines to call pinvoke methods.
	* x86/Makefile.am: create a libmonoarch convenience library.


Thu Sep 6 15:41:24 CEST 2001 Paolo Molaro <[email protected]>

	* Makefile.am: link to libmonoarch.
	* interp.h, interp.c: use mono_create_trampoline ().
	Pass the command line arguments to Main (String[]) methods.

svn path=/trunk/mono/; revision=728
2001-09-06 09:46:03 +00:00
Ravi Pratap M 20bfbda6f9 added errors/cs0658.cs which I forgot to last time ;-) [ as usual ! ]
svn path=/trunk/mcs/; revision=727
2001-09-06 01:15:50 +00:00
Ravi Pratap M f8dcea9267 2001-09-05 Ravi Pratap <[email protected]>
* cs-parser.jay (CheckAttributeTarget): Update to use the right error number.

	* ../tests/cs0658.cs : New file to demonstrate error 0658.

	* attribute.cs (Attributes): New class to encapsulate all attributes which were
	being passed around as an arraylist.
	(Attributes::AddAttribute): Method to add attribute sections.

	* cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
	(struct_declaration): Update accordingly.
	(constant_declaration): Update.
	(field_declaration): Update.
	(method_header): Update.
	(fixed_parameter): Update.
	(parameter_array): Ditto.
	(property_declaration): Ditto.
	(destructor_declaration): Ditto.

	* class.cs (Struct::Struct): Update constructors accordingly.
	(Class::Class): Ditto.
	(Field::Field): Ditto.
	(Method::Method): Ditto.
	(Property::Property): Ditto.
	(TypeContainer::OptAttribute): update property's return type.

	* interface.cs (Interface.opt_attributes): New member.
	(Interface::Interface): Update to take the extra Attributes argument.

	* parameter.cs (Parameter::Parameter): Ditto.

	* constant.cs (Constant::Constant): Ditto.

	* interface.cs (InterfaceMemberBase): New OptAttributes field.
	(InterfaceMemberBase::InterfaceMemberBase): Update constructor to take
	the attributes as a parameter.
	(InterfaceProperty): Update constructor call.
	(InterfaceEvent): Ditto.
	(InterfaceMethod): Ditto.
	(InterfaceIndexer): Ditto.

	* cs-parser.jay (interface_indexer_declaration): Update call to constructor to
	pass the attributes too.
	(interface_event_declaration): Ditto.
	(interface_property_declaration): Ditto.
	(interface_method_declaration): Ditto.
	(interface_declaration): Ditto.

svn path=/trunk/mcs/; revision=726
2001-09-05 22:58:50 +00:00
Miguel de Icaza 905d1ba7c6 Update
svn path=/trunk/mono/; revision=725
2001-09-05 21:26:08 +00:00
Miguel de Icaza d0cd6059c1 Remove libffi
svn path=/trunk/mono/; revision=724
2001-09-05 21:23:36 +00:00
Miguel de Icaza afc2fe1fd2 Remove the recursive configuration process
svn path=/trunk/mono/; revision=723
2001-09-05 21:22:50 +00:00
Miguel de Icaza ba2296d7f8 UPdatey update
svn path=/trunk/mono/; revision=722
2001-09-05 21:10:59 +00:00
Miguel de Icaza 766c9da08c 2001-09-05 Miguel de Icaza <[email protected]>
* class.cs (Method::Define): Track the "static Main" definition to
	create an entry point.

	* rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
	EntryPoint if we find it.

	* codegen.cs (EmitContext::EmitInvocation): Emit invocations.
	(EmitContext::ig): Make this variable public.

	* driver.cs: Make the default output file be the first file name
	with the .exe extension.

	Detect empty compilations

	Handle various kinds of output targets.  Handle --target and
	rename -t to --dumper.

	* expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
	methods inherited from Expression return now an Expression.  This
	will is used during the tree rewriting as we resolve them during
	semantic analysis.

	(Expression::MemberLookup): Implements the MemberLookup (7.3) from
	the spec.  Missing entirely is the information about
	accessability of elements of it.

	(Expression::ExprClassFromMemberInfo): New constructor for
	Expressions that creates a fully initialized Expression based on
	a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
	a Type.

	(Invocation::Resolve): Begin implementing resolution of invocations.

	* literal.cs (StringLiteral):  Implement Emit.

svn path=/trunk/mcs/; revision=721
2001-09-05 21:07:50 +00:00
Dietmar Maurer e925c01893 added reachability check
svn path=/trunk/mono/; revision=720
2001-09-05 12:24:14 +00:00
Paolo Molaro 917620718a Wed Sep 5 15:54:47 CEST 2001 Paolo Molaro <[email protected]>
* opcode.def: cvs add to reduce build dependencies for
	people using the snapshots or cvs.

svn path=/trunk/mono/; revision=719
2001-09-05 09:58:06 +00:00
Dick Porter f93aad6f51 2001-09-05 Dick Porter <[email protected]>
* autogen.sh: Fixed the section that adds $ACLOCAL_FLAGS to the
	aclocal invocation, so putting aclocal files in /usr/local works

svn path=/trunk/mono/; revision=718
2001-09-05 09:52:21 +00:00
Dietmar Maurer 278a0b3d57 monoburg implementation
svn path=/trunk/mono/; revision=717
2001-09-05 09:36:42 +00:00
Alexander Klyubin ce8e511137 Fixed bug in 'runtests' target. NUnitConsole.exe is not in NUNIT_HOME/bin but in NUNIT_HOME.
svn path=/trunk/mcs/; revision=716
2001-09-05 03:53:33 +00:00
Ravi Pratap M 10cea2de37 2001-09-05 Ravi Pratap <[email protected]>
* cs-parser.jay (error): Add new modifier because we are hiding an inherited
	member.

2001-09-04  Ravi Pratap  <[email protected]>

	* cs-parser.jay (attribute_arguments): Implement actions.
	(attribute): Fix bug in production. Implement action.
	(attribute_list): Implement.
	(attribute_target): Implement.
	(attribute_target_specifier, opt_target_specifier): Implement
	(CheckAttributeTarget): New method to check if the attribute target
	is valid.
	(attribute_section): Implement.
	(opt_attributes): Implement.

	* attribute.cs : New file to handle attributes.
	(Attribute): Class to hold attribute info.

	* cs-parser.jay (opt_attribute_target_specifier): Remove production
	(attribute_section): Modify production to use 2 different rules to
	achieve the same thing. 1 s/r conflict down !
	Clean out commented, useless, non-reducing dimension_separator rules.

	* class.cs (TypeContainer.attributes): New member to hold list
	of attributes for a type.
	(Struct::Struct): Modify to take one more argument, the attribute list.
	(Class::Class): Ditto.
	(Field::Field): Ditto.
	(Method::Method): Ditto.
	(Property::Property): Ditto.

	* cs-parser.jay (struct_declaration): Update constructor call to
	pass in the attributes too.
	(class_declaration): Ditto.
	(constant_declaration): Ditto.
	(field_declaration): Ditto.
	(method_header): Ditto.
	(fixed_parameter): Ditto.
	(parameter_array): Ditto.
	(property_declaration): Ditto.

	* constant.cs (Constant::Constant): Update constructor similarly.
	Use System.Collections.

svn path=/trunk/mcs/; revision=715
2001-09-05 00:29:50 +00:00
Jeffrey Stedfast c7ed150170 2001-09-04 Jeffrey Stedfast <[email protected]>
* String.cs (BoyerMoore): Modified to not use pointers and to instead
	use indexes.
	(IndexOf): Use BoyerMoore.

svn path=/trunk/mcs/; revision=714
2001-09-04 19:50:35 +00:00
Miguel de Icaza a08d38d2e8 Add new files
svn path=/trunk/mcs/; revision=713
2001-09-04 14:38:29 +00:00
Miguel de Icaza 67c693c673 Add System.Diagnostics to System assembly
svn path=/trunk/mcs/; revision=712
2001-09-04 14:37:55 +00:00
Miguel de Icaza 7fd95cdcb6 Add skeleton patch
svn path=/trunk/mcs/; revision=711
2001-09-04 00:33:06 +00:00
Miguel de Icaza 1f19db0759 Use genericparser.cs
svn path=/trunk/mcs/; revision=710
2001-09-04 00:31:46 +00:00
Bob Smith a430140b9e HtmlAnchor.cs, HtmlTextArea.cs: Initial implementation. - Leen Toelen
svn path=/trunk/mcs/; revision=709
2001-09-03 03:13:23 +00:00
Miguel de Icaza fe83089363 Flush
svn path=/trunk/mcs/; revision=708
2001-09-02 18:13:16 +00:00
Miguel de Icaza 050e0c86e7 Added new enumerations
svn path=/trunk/mcs/; revision=707
2001-09-02 18:12:17 +00:00
Miguel de Icaza ef6d4453d5 Use our version of NUnit
svn path=/trunk/mcs/; revision=706
2001-09-02 18:08:25 +00:00
Miguel de Icaza 282e4d0325 Added files
svn path=/trunk/mcs/; revision=705
2001-09-02 18:07:13 +00:00
Miguel de Icaza 540c0081d8 Remove corrupt files
svn path=/trunk/mcs/; revision=704
2001-09-02 18:06:53 +00:00
Miguel de Icaza 8046e96cd0 Updates with new enumerations that match the ones in ECMA and contain
[Flags] attributes where they should be, from Sergey

svn path=/trunk/mcs/; revision=703
2001-09-02 17:59:47 +00:00
Miguel de Icaza e6dccbce05 Added piles of new enumerations from Sergey.
Updates the enumerations to contain [Flags] (Sergey)
Updated enumerations to have the same values as ECMA (Sergey).
Added various new methods to Type.cs
Added all the classes that were not being compiled in the past to the build.
Fix various small typos to get things compiling

Miguel

svn path=/trunk/mcs/; revision=702
2001-09-02 17:50:38 +00:00
Miguel de Icaza e30df57f69 Implemented SerializableAttribute
svn path=/trunk/mcs/; revision=701
2001-09-02 16:28:03 +00:00
Miguel de Icaza cdbd8464b5 Update
svn path=/trunk/mono/; revision=700
2001-09-02 16:23:55 +00:00
Ravi Pratap M b2b162922d 2001-09-02 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::AddDelegate): New method to add a delegate.
	(TypeContainer.delegates): New member to hold list of delegates.

	* cs-parser.jay (delegate_declaration): Implement the action correctly
	this time as I seem to be on crack ;-)

svn path=/trunk/mcs/; revision=699
2001-09-02 16:03:53 +00:00
Miguel de Icaza a4decf81b1 2001-09-02 Miguel de Icaza <[email protected]>
* rootcontext.cs (RootContext::IsNamespace): new function, used to
	tell whether an identifier represents a namespace.

	* expression.cs (NamespaceExpr): A namespace expression, used only
	temporarly during expression resolution.
	(Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
	utility functions to resolve names on expressions.

2001-09-01  Miguel de Icaza  <[email protected]>

	* codegen.cs: Add hook for StatementExpressions.

	* class.cs: Fix inverted test for static flag in methods.

svn path=/trunk/mcs/; revision=698
2001-09-02 15:49:21 +00:00
Ravi Pratap M a3d16a719c Actually add mcs/delegate.cs which I forgot to last time ;-)
svn path=/trunk/mcs/; revision=697
2001-09-02 15:39:52 +00:00
Ravi Pratap M 3f3a2a5036 2001-09-02 Ravi Pratap <[email protected]>
* class.cs (Operator::CheckUnaryOperator): Correct error number used
	to make it coincide with MS' number.
	(Operator::CheckBinaryOperator): Ditto.

	* ../errors/errors.txt : Remove error numbers added earlier.

	* ../errors/cs1019.cs : Test case for error # 1019

	* ../errros/cs1020.cs : Test case for error # 1020

	* cs-parser.jay : Clean out commented cruft.
	(dimension_separators, dimension_separator): Comment out. Ostensibly not
	used anywhere - non-reducing rule.
	(namespace_declarations): Non-reducing rule - comment out.

	* enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
	with TypeContainer::AddEnum.

	* delegate.cs : New file for delegate handling classes.
	(Delegate): Class for declaring delegates.

	* makefile : Update.

	* cs-parser.jay (delegate_declaration): Implement.

svn path=/trunk/mcs/; revision=696
2001-09-02 15:37:11 +00:00
Gleb Novodran e4eac5b64d Initial implementation
svn path=/trunk/mcs/; revision=695
2001-09-01 12:50:26 +00:00
Ravi Pratap M 674353fbf4 2001-09-01 Ravi Pratap <[email protected]>
* class.cs (Event::Define): Implement.
	(Event.EventBuilder): New member.

	* class.cs (TypeContainer::Populate): Update to define all enums and events
	we have.
	(Events): New property for the events arraylist we hold. Shouldn't we move to using
	readonly fields for all these cases ?

2001-08-31  Ravi Pratap  <[email protected]>

	* class.cs (Property): Revamp to use the convention of making fields readonly.
	Accordingly modify code elsewhere.

	* class.cs : Apply patch from Mr. Mandar <[email protected]> for implementing
	the Define method of the Property class.

	* class.cs : Clean up applied patch and update references to variables etc. Fix
	trivial bug.
	(TypeContainer::Populate): Update to define all the properties we have. Also
	define all enumerations.

	* enum.cs (Define): Implement.

svn path=/trunk/mcs/; revision=694
2001-09-01 06:39:06 +00:00
Nick Drochak 150ab4ad5c 2001-09-01 Nick Drochak <[email protected]>
* Added NUnitConsole.exe

svn path=/trunk/mcs/; revision=693
2001-09-01 05:39:46 +00:00
Nick Drochak 069cb21ffa 2001-09-01 Nick Drochak <[email protected]>
* added NunitCore.dll

svn path=/trunk/mcs/; revision=692
2001-09-01 05:38:32 +00:00
Sergey Chaban be18387f31 * verifier.cs: Fixed bug in AbstractTypeStuff::operator ==;
Added support for enums;
   Removed duplicated checks in Compare.Parameters;
   Now has option to ignore missing types instead of reporting fatal-erros;

svn path=/trunk/mcs/; revision=691
2001-09-01 05:30:52 +00:00
Jim Richardson 49c06dd26d Changed enum value for first mono platform to allow growth for windows systems
svn path=/trunk/mcs/; revision=690
2001-08-31 08:57:30 +00:00
Jim Richardson 1cc52c8b7a Added CheckArgument.cs and CheckPermission.cs to common.src
svn path=/trunk/mcs/; revision=689
2001-08-31 08:56:12 +00:00
Ravi Pratap M 6b8008cfd9 2001-08-31 Ravi Pratap <[email protected]>
* cs-parser.jay (overloadable_operator): The semantic value is an
	enum of the Operator class.
	(operator_declarator): Implement actions.
	(operator_declaration): Implement.

	* class.cs (Operator::CheckUnaryOperator): New static method to help in checking
	validity of definitions.
	(Operator::CheckBinaryOperator): Static method to check for binary operators
	(TypeContainer::AddOperator): New method to add an operator to a type.

	* cs-parser.jay (indexer_declaration): Added line to actually call the
	AddIndexer method so it gets added ;-)

	* ../errors/errors.txt : Update to include new error numbers. Are these numbers
	already taken care of by the MS compiler ?

2001-08-29  Ravi Pratap  <[email protected]>

	* class.cs (Operator): New class for operator declarations.
	(Operator::OpType): Enum for the various operators.

svn path=/trunk/mcs/; revision=688
2001-08-31 03:35:11 +00:00
Bob Smith 73933c6bc1 *** empty log message ***
svn path=/trunk/mono/; revision=687
2001-08-30 20:45:44 +00:00
Bob Smith c6154f2470 More implementation/stubbing.
svn path=/trunk/mcs/; revision=686
2001-08-30 20:41:15 +00:00
Dietmar Maurer 2b574ba7f9 remove libffi
svn path=/trunk/mono/; revision=685
2001-08-30 13:04:52 +00:00
Dietmar Maurer 148cc634b7 2001-08-30 Dietmar Maurer <[email protected]>
* *: removed the libffi dependency, mono now compiles on cygwin

	* mono/wrapper/build-dll: new file.

svn path=/trunk/mono/; revision=684
2001-08-30 13:01:42 +00:00
Christopher Podurgiel 7f47838587 Added Files.
svn path=/trunk/mcs/; revision=683
2001-08-30 08:03:12 +00:00
Jim Richardson 2888bfd5fa Added [Flags] attribute to enums.
svn path=/trunk/mcs/; revision=682
2001-08-30 02:06:35 +00:00
Jim Richardson 6fad6fb4a8 Additional implementation
svn path=/trunk/mcs/; revision=681
2001-08-30 02:03:50 +00:00
Jim Richardson 735f5b298d Additional implemenation
svn path=/trunk/mcs/; revision=680
2001-08-30 01:59:49 +00:00
Jim Richardson d4e3f47dab Added two utility classes for argument and permission checks that
required throughout the System.IO namespace

svn path=/trunk/mcs/; revision=679
2001-08-30 01:52:03 +00:00
Miguel de Icaza 4256d92823 Flush
svn path=/trunk/mono/; revision=678
2001-08-29 20:11:29 +00:00
Alexander Klyubin 49681f0f27 Added targets to build and run tests
svn path=/trunk/mcs/; revision=677
2001-08-29 13:58:55 +00:00
Alexander Klyubin 18e1e59417 Fixed 'clean' target
svn path=/trunk/mcs/; revision=676
2001-08-29 13:58:37 +00:00
Alexander Klyubin 213632594b Added 'clean' target to make files
svn path=/trunk/mcs/; revision=675
2001-08-29 13:21:03 +00:00
Dietmar Maurer 2773ac0f87 2001-08-29 Dietmar Maurer <[email protected]>
* loader.c (mono_get_method): use pinvoke for internal call

	* icall.c: use pinvoke for internal call

	* loader.c (method_from_memberref): set the method name

	* interp.c (ves_array_set): moved from icall.c
	(ves_array_get): moved from icall.c

	* icall.c: moved to metadata/icall.c

svn path=/trunk/mono/; revision=674
2001-08-29 11:04:59 +00:00
Paolo Molaro f6447b56ba Wed Aug 29 12:46:06 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: some small optimizations. Fixes to do signed
	compares when needed. Change C++ comments into C.
	Implemented cgt, clt. Added --opcode-count cmdline switch.

svn path=/trunk/mono/; revision=673
2001-08-29 06:53:31 +00:00
Paolo Molaro a710ecedb5 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <[email protected]>
* metadata.c: help the compiler generate better code for
	mono_class_from_mono_type ().

svn path=/trunk/mono/; revision=672
2001-08-29 06:45:55 +00:00
Alexander Klyubin 600712d9b5 Fixed invalid format in class status
svn path=/trunk/mono/; revision=671
2001-08-29 06:14:33 +00:00
Alexander Klyubin e1bff32dd2 Updated status of System.Diagnostics.StackFrame and System.Diagnostics.StackTrace
svn path=/trunk/mono/; revision=670
2001-08-29 05:59:48 +00:00
Alexander Klyubin 7e5d85bca4 Added tests for System.Diagnostics.StackFrame and System.Diagnostics.StackTrace
svn path=/trunk/mcs/; revision=669
2001-08-29 05:53:35 +00:00
Alexander Klyubin 687ff3837c Added skeletal implementation of StackFrame and StackTrace
svn path=/trunk/mcs/; revision=668
2001-08-29 05:50:17 +00:00
Ravi Pratap M 83ae63a185 2001-08-29 Ravi Pratap <[email protected]>
* class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
	ostensibly handle this in semantic analysis.

	* cs-parser.jay (general_catch_clause): Comment out
	(specific_catch_clauses, specific_catch_clause): Ditto.
	(opt_general_catch_clause, opt_specific_catch_clauses): Ditto
	(catch_args, opt_catch_args): New productions.
	(catch_clause): Rewrite to use the new productions above
	(catch_clauses): Modify accordingly.
	(opt_catch_clauses): New production to use in try_statement
	(try_statement): Revamp. Basically, we get rid of one unnecessary rule
	and re-write the code in the actions to extract the specific and
	general catch clauses by being a little smart ;-)

	* ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
	Hooray, try and catch statements parse fine !

2001-08-28  Ravi Pratap  <[email protected]>

	* statement.cs (Block::GetVariableType): Fix logic to extract the type
	string from the hashtable of variables.

	* cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
	I end up making that mistake ;-)
	(catch_clauses): Fixed gross error which made Key and Value of the
	DictionaryEntry the same : $1 !!

svn path=/trunk/mcs/; revision=667
2001-08-29 04:35:25 +00:00
Bob Smith 42c1887426 *** empty log message ***
svn path=/trunk/mono/; revision=666
2001-08-29 03:57:20 +00:00
Bob Smith d16c58b858 HttpWorkerRequest.cs: Partial Implementation.
svn path=/trunk/mcs/; revision=665
2001-08-29 03:55:44 +00:00
Nick Drochak 702c1d78a0 2001-08-24 Nick Drochak <[email protected]>
* NameObjectCollectionBase.cs: Add stub implementation
        * common.src: Add NameObjectCollectionBase to the build
        * NameValueCollection.cs: add 'override' to CopyTo().  Maybe
                this code actually belongs in the superclass.

svn path=/trunk/mcs/; revision=664
2001-08-29 01:17:18 +00:00
Christopher Podurgiel fc79231a00 Christopher Podurgiel <[email protected]>
Updated last activity dates for System.Configuration

svn path=/trunk/mono/; revision=663
2001-08-28 22:38:08 +00:00
Christopher Podurgiel 2812083512 2001-08-28 Christopher Podurgiel <[email protected]>
* IConfigurationSectionHandler.cs: Added reference to System.Xml.

	* SingleTagSectionHandler.cs: Added Implementation of Create() method.

	* NameValueSectionHandler.cs: Added Implementation of Create() method.

	* ConfigurationException.cs: Now returns proper message rather than "System Exception".

svn path=/trunk/mcs/; revision=662
2001-08-28 22:30:10 +00:00
Christopher Podurgiel 2cd0a23ee2 Now returns proper message rather than "System Exception".
svn path=/trunk/mcs/; revision=661
2001-08-28 22:29:13 +00:00
Christopher Podurgiel 0c9c748965 Added reference to System.Xml.
svn path=/trunk/mcs/; revision=660
2001-08-28 22:28:43 +00:00
Christopher Podurgiel 11d015e36a Added Implementation of Create() method.
svn path=/trunk/mcs/; revision=659
2001-08-28 22:28:27 +00:00
Bob Smith 32cee6c01e Control.cs: Figured out some undocumented API.
svn path=/trunk/mcs/; revision=658
2001-08-28 20:50:33 +00:00
Dietmar Maurer 43f3e90e35 2001-08-28 Dietmar Maurer <[email protected]>
* TextReader.cs: implemented the Read method

	* StreamReader.cs: impl. stubs

	* Console.cs: implemented the stdin stuff

svn path=/trunk/mcs/; revision=657
2001-08-28 13:26:34 +00:00
Miguel de Icaza 3a0f9b5e7c Add more details to the compiler documentation
svn path=/trunk/mcs/; revision=656
2001-08-28 12:36:19 +00:00
Dietmar Maurer abaa8e2d48 2001-08-28 Dietmar Maurer <[email protected]>
* interp.c (ves_exec_method): better check for value types (get
	the class to detect if we have a value type), implemented CEE_CONV_U1,
	CEE_CONV_U2, CEE_CEQ

	* class.c (mono_class_metadata_init): delayed computing of the
	class size to mono_class_metadata_init ()

	* mono/tests/console.cs: impl.

	* mono/tests/box.cs: impl.

	* mono/tests/stream-writer.cs: impl.

svn path=/trunk/mono/; revision=655
2001-08-28 10:47:36 +00:00
Dietmar Maurer 9de03899f8 2001-08-28 Dietmar Maurer <[email protected]>
* Console.cs: impl. (write only)

	* Int32.cs: impl. real op_Equal

	* UTF8Encoding.cs: impl. clumsy GetBytes

	* StreamWriter.cs: impl.

	* TextWriter.cs: implemented Write and WriteLine methods

svn path=/trunk/mcs/; revision=654
2001-08-28 10:37:08 +00:00
Paolo Molaro 385f53e537 Tue Aug 28 15:54:45 CEST 2001 Paolo Molaro <[email protected]>
* main.c, dump.c, dump.h, get.c: added dump_table_interfaceimpl ().
	Output info about interfaces when disassembling a type. Many small
	changes to make the output correct assembler.

svn path=/trunk/mono/; revision=653
2001-08-28 09:59:38 +00:00
Paolo Molaro bd989b3a73 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <[email protected]>
* class.c, class.h: add an interfaces member to MonoClass.
	* image.c, image.h: add assembly_name field to MonoImage
	from the assembly table.
	* metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().

svn path=/trunk/mono/; revision=652
2001-08-28 09:55:41 +00:00
Ravi Pratap M 918362d795 2001-08-28 Ravi Pratap <[email protected]>
* cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'

	* cs-parser.jay (event_declaration): Correct to remove the semicolon
	when the add and remove accessors are specified.

svn path=/trunk/mcs/; revision=651
2001-08-28 06:45:13 +00:00
Ravi Pratap M f6a28123f6 2001-08-28 Ravi Pratap <[email protected]>
* cs-parser.jay (IndexerDeclaration): New helper class to hold
	information about indexer_declarator.
	(indexer_declarator): Implement actions.
	(parsing_indexer): New local boolean used to keep track of whether
	we are parsing indexers or properties. This is necessary because
	implicit_parameters come into picture even for the get accessor in the
	case of an indexer.
	(get_accessor_declaration, set_accessor_declaration): Correspondingly modified.

	* class.cs (Indexer): New class for indexer declarations.
	(TypeContainer::AddIndexer): New method to add an indexer to a type.
	(TypeContainer::indexers): New member to hold list of indexers for the
	type.

2001-08-27  Ravi Pratap  <[email protected]>

	* cs-parser.jay (add_accessor_declaration): Implement action.
	(remove_accessor_declaration): Implement action.
	(event_accessors_declaration): Implement
	(variable_declarators): swap statements for first rule - trivial.

	* class.cs (Event): New class to hold information about event
	declarations.
	(TypeContainer::AddEvent): New method to add an event to a type
	(TypeContainer::events): New member to hold list of events.

	* cs-parser.jay (event_declaration): Implement actions.

svn path=/trunk/mcs/; revision=650
2001-08-28 06:17:23 +00:00
Bob Smith e22c6058e7 *** empty log message ***
svn path=/trunk/mono/; revision=649
2001-08-28 03:50:08 +00:00
Bob Smith 35dc2263fe Lots of implementations.
svn path=/trunk/mcs/; revision=648
2001-08-28 03:43:43 +00:00
Bob Smith 01b04fb75b Control.cs: Bug fixes and implementations.
svn path=/trunk/mcs/; revision=647
2001-08-27 20:09:30 +00:00
Paolo Molaro 7327def057 Mon Aug 27 21:30:30 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: warn and exit when Main () expects the cmdline arguments
	instead of creashing.

svn path=/trunk/mono/; revision=646
2001-08-27 15:33:36 +00:00
Paolo Molaro f86420142b Mon Aug 27 20:24:26 CEST 2001 Paolo Molaro <[email protected]>
* mono/tests/*: New test cases, mostly for virtual method dispatch.
	Use make testb for the slow benchmarking programs,
	make test for the usual regression test checks.

svn path=/trunk/mono/; revision=645
2001-08-27 14:26:43 +00:00
Paolo Molaro 768dfe1c93 Mon Aug 27 20:16:37 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: merge isinst/castclass handling. Hopefully implement
	the right semantics for handling callvirt correctly (changes
	here and there to support it). Integrate bugfix from Dietmar quickly
	so he needs to handle the cvs conflict:-)

svn path=/trunk/mono/; revision=644
2001-08-27 14:23:41 +00:00
Paolo Molaro 670e904d76 Mon Aug 27 20:13:49 CEST 2001 Paolo Molaro <[email protected]>
* dis-cil.c, get.c: some endian fixes.
	* main.c: colon-separate version numbers. Print also namespace
	when outputting class information.

svn path=/trunk/mono/; revision=643
2001-08-27 14:17:37 +00:00
Paolo Molaro 8efdf1f8f9 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <[email protected]>
* class.c: Handle Array in mono_class_from_mono_type ().
	* metadata.c, pedump.c: some endian fixes.

svn path=/trunk/mono/; revision=642
2001-08-27 14:14:53 +00:00
Sergey Chaban 4ad48b7689 * OpCode.cs, OpCodes.cs: Initial check-in;
svn path=/trunk/mcs/; revision=641
2001-08-27 12:47:25 +00:00
Paolo Molaro 9e8775846f Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <[email protected]>
* class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
	* metadata.c: fix small problem introduced with the latest commit.

svn path=/trunk/mono/; revision=640
2001-08-27 09:26:47 +00:00
Paolo Molaro e9d47c0525 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <[email protected]>
* loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
	We don't need a MonoMetadata pointer anymore to compare signatures in
	mono_metadata_signature_equal (), update callers.
	Reduced memory usage an number of allocations for MonoMethodHeader and
	MonoMethodSignature.


Mon Aug 27 12:20:32 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: fix compilation and updates for changes in metadata/.

svn path=/trunk/mono/; revision=639
2001-08-27 06:25:25 +00:00
stefan 9fe8399e58 added better GetHashCode() implementation
svn path=/trunk/mcs/; revision=638
2001-08-27 05:06:50 +00:00
Ravi Pratap M 551710fe5a 2001-08-27 Ravi Pratap <[email protected]>
* cs-parser.jay (dim_separators): Implement. Make it a string
	concatenating all the commas together, just as they appear.
	(opt_dim_separators): Modify accordingly
	(rank_specifiers): Update accordingly. Basically do the same
	thing - instead, collect the brackets here.
	(opt_rank_sepcifiers): Modify accordingly.
	(array_type): Modify to actually return the complete type string
	instead of ignoring the rank_specifiers.
	(expression_list): Implement to collect the expressions
	(variable_initializer): Implement. We make it a list of expressions
	essentially so that we can handle the array_initializer case neatly too.
	(variable_initializer_list): Implement.
	(array_initializer): Make it a list of variable_initializers
	(opt_array_initializer): Modify accordingly.

	* expression.cs (New::NType): Add enumeration to help us
	keep track of whether we have an object/delegate creation
	or an array creation.
	(New:NewType, New::Rank, New::Indices, New::Initializers): New
	members to hold data about array creation.
	(New:New): Modify to update NewType
	(New:New): New Overloaded contructor for the array creation
	case.

	* cs-parser.jay (array_creation_expression): Implement to call
	the overloaded New constructor.

2001-08-26  Ravi Pratap  <[email protected]>

	* class.cs (TypeContainer::Constructors): Return member
	constructors instead of returning null.

svn path=/trunk/mcs/; revision=637
2001-08-27 04:37:08 +00:00
Paolo Molaro a07ae80ab5 Mon Aug 27 09:29:00 CEST 2001 Paolo Molaro <[email protected]>
* x86/x86-codegen.h: fix x86_call_code (). x86_mov_regp_reg () added.

svn path=/trunk/mono/; revision=636
2001-08-27 03:43:09 +00:00
Miguel de Icaza 144b21b88b Add a couple of new errors and a compiler roadmap.
svn path=/trunk/mcs/; revision=635
2001-08-27 02:42:30 +00:00
Miguel de Icaza 92d3c11183 2001-08-26 Miguel de Icaza <[email protected]>
* interp.c (main): Add option handling for the interpreter,
	support the `--trace' option.

svn path=/trunk/mono/; revision=634
2001-08-26 23:52:03 +00:00
Christopher Podurgiel 4182b80859 No longer references the NameValueSectionHandler directly. Instead it uses System.Reflection to call the Create() method for the appropriate SectionHandler as defined in the .config file.
svn path=/trunk/mcs/; revision=633
2001-08-26 22:42:24 +00:00
Miguel de Icaza 2ca4ca638d 2001-08-26 Miguel de Icaza <[email protected]>
* typemanager.cs (InitCoreTypes): Initialize the various core
	types after we have populated the type manager with the user
	defined types (this distinction will be important later while
	compiling corlib.dll)

	* expression.cs, literal.cs, assign.cs, constant.cs: Started work
	on Expression Classification.  Now all expressions have a method
	`Resolve' and a method `Emit'.

	* codegen.cs, cs-parser.jay: Fixed the bug that stopped code
	generation from working.     Also add some temporary debugging
	code.

svn path=/trunk/mcs/; revision=632
2001-08-26 22:36:41 +00:00
Paolo Molaro 2f45d0163d Expand stream.cs to cover read and write testing.
I should work now, with an updated corlib.

svn path=/trunk/mono/; revision=631
2001-08-26 17:14:15 +00:00
Paolo Molaro f1ad7143d4 Sun Aug 26 23:04:46 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: get in a dummy virtual method dispatch.
	Added support for int64, native int and native uint as arguments.
	Added debug enter/leave for icall and pinvoke methods, too.
	Implement opcodes conv.i, conv.i8, ldelema.

svn path=/trunk/mono/; revision=630
2001-08-26 17:13:14 +00:00
Paolo Molaro d5afc18c3b Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <[email protected]>
* metadata.c: added compare for szarray.

svn path=/trunk/mono/; revision=629
2001-08-26 17:05:51 +00:00
Paolo Molaro 5e5823ba07 Sun Aug 26 23:01:41 CEST 2001 Paolo Molaro <[email protected]>
* FileAccess.cs, FileMode.cs: change values to be compatible with
	the ms ones.

svn path=/trunk/mcs/; revision=628
2001-08-26 17:04:13 +00:00
Christopher Podurgiel 3fbbb1ed80 ConfigurationSettings.cs: No longer references the NameValueSectionHandler directly. Instead it uses System.Reflection to call the Create() method for the appropriate SectionHandler as defined in the .config file.
svn path=/trunk/mcs/; revision=627
2001-08-26 15:19:48 +00:00
Sergey Chaban 7fdd45e4ee * verifier.cs: fixed bug in AssemblyLoader::LoadFrom in ReflectionTypeLoadException handler;
svn path=/trunk/mcs/; revision=626
2001-08-26 13:12:31 +00:00
Paolo Molaro 0b20e44943 Add System.IO.IOException info.
svn path=/trunk/mono/; revision=625
2001-08-26 05:52:47 +00:00
Paolo Molaro 1143d8b807 Sun Aug 26 11:47:56 CEST 2001 Paolo Molaro <[email protected]>
* IoException.cs: Implemented System.IO.Exception.

svn path=/trunk/mcs/; revision=624
2001-08-26 05:51:23 +00:00
Paolo Molaro ebba64bd25 Sun Aug 26 11:37:30 CEST 2001 Paolo Molaro <[email protected]>
* interp.h, interp.c: load also a MonoClass pointer when we load
	an address on the stack. Implemented conv.i1, conv.i2, con.i4,
	conv.u4, conv.r4, conv.r8. Print the arguments in the stack trace
	and the name of the exception.

svn path=/trunk/mono/; revision=623
2001-08-26 05:43:56 +00:00
Paolo Molaro 0576036dcb Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <[email protected]>
* class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
	and add a couple more types to it and mono_defaults. Give an hint on
	classes that need implementing in our corlib and are referenced
	in mscorlib.

svn path=/trunk/mono/; revision=622
2001-08-26 05:37:47 +00:00
Jim Richardson 513d52e3ea Added the [Flags] attribute to the enumeration
svn path=/trunk/mcs/; revision=621
2001-08-25 11:04:53 +00:00
Paolo Molaro 78bd4ffd47 Sat Aug 25 15:56:03 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: Implemented some opcodes: starg.s, ldobj, isinst,
	ldarg, starg, ldloc, ldloca, stloc, initobj, cpblk, sizeof.

svn path=/trunk/mono/; revision=620
2001-08-25 09:59:51 +00:00
Paolo Molaro 7efa7ceb1e Sat Aug 25 12:57:36 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: handle enumerations specially (not as valuetypes).

svn path=/trunk/mono/; revision=619
2001-08-25 07:00:28 +00:00
Paolo Molaro e97efda0d8 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <[email protected]>
* class.h, class.c: keep track if a class is also an Enum.
	* loader.c: Implement a couple more types for use in libffi
	marshalling. Gives better diagnostics when failing to dlopen
	a library. Set method->klass for P/Invoke methods, too.

svn path=/trunk/mono/; revision=618
2001-08-25 06:56:32 +00:00
Sergey Chaban ef52f7d0aa * added support for fields;
* added support for non-public types;
* fixed types comparison bug,
  types must be compared by-hand, Equals won't work;
* now methods also compared by their access modifiers and inheritance options;
* more extensive error reporting;
* minor internal changes;

svn path=/trunk/mcs/; revision=617
2001-08-25 04:27:39 +00:00
Miguel de Icaza cd7b3d9f9e 2001-08-24 Miguel de Icaza <[email protected]>
* codegen.cs: Lots of code generation pieces.  This is only the
	beginning, will continue tomorrow with more touches of polish.  We
	handle the fundamentals of if, while, do, for, return.  Others are
	trickier and I need to start working on invocations soon.

	* gen-treedump.cs: Bug fix, use s.Increment here instead of
	s.InitStatement.

	* codegen.cs (EmitContext): New struct, used during code
	emission to keep a context.   Most of the code generation will be
	here.

	* cs-parser.jay: Add embedded blocks to the list of statements of
	this block.  So code generation proceeds in a top down fashion.

svn path=/trunk/mcs/; revision=616
2001-08-24 22:10:10 +00:00
Miguel de Icaza 366f1bbace Add new file
svn path=/trunk/mono/; revision=615
2001-08-24 21:29:09 +00:00
stefan 6986a3738e updated System.Drawing.Drawing2D.* class entries
svn path=/trunk/mono/; revision=614
2001-08-24 18:53:40 +00:00
Miguel de Icaza dd5ee0c135 Add back IAsyncResult to the build
svn path=/trunk/mcs/; revision=613
2001-08-24 17:32:06 +00:00
Michael Lambert 1a63d6f651 Updated class.xml
svn path=/trunk/mono/; revision=612
2001-08-24 16:38:11 +00:00
Michael Lambert d86723c17a 2001-08-23 Michael Lambert <[email protected]>
* IAsyncResult.cs: Added

svn path=/trunk/mcs/; revision=611
2001-08-24 16:16:21 +00:00
Miguel de Icaza 3ab846cb69 2001-08-24 Miguel de Icaza <[email protected]>
* (common.src): Removed IAsyncResult as it is not on CVS yet.

	* UIntPtr.cs: Removed CLSCompliant attribute before the namespace,
	as it breaks the build.

svn path=/trunk/mcs/; revision=610
2001-08-24 16:07:04 +00:00
Miguel de Icaza e650510012 Remove IASyncResult to get the build going
svn path=/trunk/mcs/; revision=609
2001-08-24 15:59:51 +00:00
Miguel de Icaza edd7df2604 Add System.Drawing.Drawing2D
svn path=/trunk/mcs/; revision=608
2001-08-24 15:54:40 +00:00
Bob Smith 68dae9923e Control.cs: Bug fixes.
svn path=/trunk/mcs/; revision=607
2001-08-24 15:04:13 +00:00
Michael Lambert 8486b66a01 *** empty log message ***
svn path=/trunk/mcs/; revision=606
2001-08-24 14:20:03 +00:00
Michael Lambert 065107592a *** empty log message ***
svn path=/trunk/mcs/; revision=605
2001-08-24 13:56:21 +00:00
Paolo Molaro b9b84ff5b8 Enhanced test for valuetypes.
svn path=/trunk/mono/; revision=604
2001-08-24 13:39:12 +00:00
Paolo Molaro ed71230f05 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <[email protected]>
* class.c, class.h: add a MonoType this_arg to MonoClass that
	represents a pointer to an object of the class' type that
	can be used by the interpreter and later the type cache.
	Add best guess alignment info for valuetype objects.


Fri Aug 24 19:34:04 CEST 2001 Paolo Molaro <[email protected]>

	* interp.h, interp.c: add support for valuetypes.

svn path=/trunk/mono/; revision=603
2001-08-24 13:38:27 +00:00
Paolo Molaro 214aea5486 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <[email protected]>
* metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
	into MonoType: one less level of indirection and allocation and
	simplifies quite a bit of code. Added cache for MonoTypes that are
	used frequently, so that we don't need to allocate them all the time.


Fri Aug 24 16:09:20 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: updates for merge of MonoParam in MonoType.


Fri Aug 24 16:10:12 CEST 2001 Paolo Molaro <[email protected]>

	* get.c, main.c, get.h: updates for MonoParam merge in MonoType.

svn path=/trunk/mono/; revision=602
2001-08-24 10:26:14 +00:00
Christopher Podurgiel 4c0ea544d8 2001-08-24 Christopher Podurgiel <[email protected]>
* SingleTagSectionHandler.cs: Added.
	* DictionarySectionHandler.cs: Added.
	
	* NameValueSectionHandler.cs: Compile errors are now fixed.
	* IgnoreSectionHandler.cs: Compile errors are now fixed.

	* ConfigurationSettings.cs: Added Implementation code for the entire class.
	  Note the LAMESPEC: in GetConfig().

svn path=/trunk/mcs/; revision=601
2001-08-24 08:10:04 +00:00
Dietmar Maurer 071257b8a3 added MonoDummy.cs and TimeSpan.cs to common.src
svn path=/trunk/mcs/; revision=600
2001-08-24 06:44:09 +00:00
Dietmar Maurer b564e43fbc 2001-08-24 Dietmar Maurer <[email protected]>
* class.c (mono_class_create_from_typedef): System.Enum is also a
	value type, although it does not derive from System.ValueType
	(maybe a bug in the ms compiler?)

	* metadata.c (mono_type_size): return the right size for value types

	* loader.c (mono_get_method): only initialize method header if not abstract

svn path=/trunk/mono/; revision=599
2001-08-24 06:36:05 +00:00
Nick Drochak 21a11f619d 2001-08-24 Nick Drochak <[email protected]>
* SerializationInfo.cs: Added all the public methods so that the compile would not break

svn path=/trunk/mcs/; revision=598
2001-08-24 05:39:12 +00:00
Dietmar Maurer ef30eaa555 2001-08-24 Dietmar Maurer <[email protected]>
* class.c (mono_class_from_mono_type): use mono_default values.

svn path=/trunk/mono/; revision=597
2001-08-24 03:17:19 +00:00
Dietmar Maurer bc35f40d67 2001-08-23 Dietmar Maurer <[email protected]>
* *: use MonoClass pointers instead of <type_tokens>

	* class.h: new flag: metadata_inited.

	* class.c (mono_class_metadata_init): impl.
	(mono_class_instance_size): impl.
	(mono_class_data_size): impl.

svn path=/trunk/mono/; revision=596
2001-08-24 02:30:51 +00:00
Michael Lambert 19ed1f5afc *** empty log message ***
svn path=/trunk/mcs/; revision=595
2001-08-23 21:43:03 +00:00
Michael Lambert 7f4fbdf125 *** empty log message ***
svn path=/trunk/mcs/; revision=594
2001-08-23 21:04:10 +00:00
Miguel de Icaza b156a2774b Flush and move to laptop
svn path=/trunk/mcs/; revision=593
2001-08-23 20:57:15 +00:00
Rodrigo Moya b6f9d6943b 2001-08-22 Rodrigo Moya <[email protected]>
* mono/cil/Makefile.am:
	* mono/wrapper/Makefile.am: use correct variables for installation
	directories

svn path=/trunk/mono/; revision=592
2001-08-23 19:14:38 +00:00
Bob Smith 9efa35f799 Control.cs: More implementation. Events reworked for performance.
svn path=/trunk/mcs/; revision=591
2001-08-23 19:07:24 +00:00
Miguel de Icaza a74d0d4f28 Integrate into build
svn path=/trunk/mcs/; revision=590
2001-08-23 18:15:18 +00:00
Miguel de Icaza 39e63e300d Add ClientTargetSectioHandler.cs from Toelen
svn path=/trunk/mcs/; revision=589
2001-08-23 18:14:30 +00:00
Miguel de Icaza c37722acdb Love the web site
svn path=/trunk/mono/; revision=588
2001-08-23 17:12:01 +00:00
Miguel de Icaza 796624c394 Update
svn path=/trunk/mono/; revision=587
2001-08-23 13:48:33 +00:00
Miguel de Icaza a770270656 Fix url
svn path=/trunk/mono/; revision=586
2001-08-23 13:41:00 +00:00
Paolo Molaro 9c85873407 Thu Aug 23 12:04:34 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: removed beforefieldinit check, it's a useless flag.
	Added a couple more test cases to tests/ dir.

svn path=/trunk/mono/; revision=585
2001-08-23 06:06:57 +00:00
Jim Richardson c1b919e4fe Added missing public attribute to FileStream class to allow File and
FileInfo classes compile

svn path=/trunk/mcs/; revision=584
2001-08-23 01:18:18 +00:00
Jim Richardson d8fc82a8da I suppose it helps when using CodeWright with C# to look at the output
for errors because the status line that says No Errors found "lies"
Fixed the compiler errors and vow to be more careful with copy/paste

svn path=/trunk/mcs/; revision=583
2001-08-23 01:16:08 +00:00
Miguel de Icaza fa43d92d1f Remove ConfigurationSetting from the compilation until we have an implementation of the NameValueCollection
svn path=/trunk/mcs/; revision=582
2001-08-23 00:48:39 +00:00
Miguel de Icaza 5448b37ffd Minor web site fixes
svn path=/trunk/mono/; revision=581
2001-08-23 00:38:09 +00:00
Jim Richardson 72b0e79d7f Updated status
svn path=/trunk/mono/; revision=580
2001-08-23 00:20:23 +00:00
Jim Richardson 280124d5b8 Added additional platform specific items
svn path=/trunk/mcs/; revision=579
2001-08-23 00:09:22 +00:00
Jim Richardson ffd78abac4 Added more PlatformSpecific items
svn path=/trunk/mcs/; revision=578
2001-08-23 00:05:19 +00:00
Jim Richardson a986601643 Implemented various methods that were previously just do nothing stubs.
Verified compilation and added files to common.src

svn path=/trunk/mcs/; revision=577
2001-08-23 00:00:46 +00:00
Miguel de Icaza bdecca6838 Minor web site fixes
svn path=/trunk/mono/; revision=576
2001-08-22 23:57:18 +00:00
Miguel de Icaza 3839716253 Update for 0.6 release
svn path=/trunk/mono/; revision=575
2001-08-22 23:54:45 +00:00
Miguel de Icaza 17228003d3 2001-08-22 Miguel de Icaza <[email protected]>
* codegen.cs (EmitCode): New function, will emit the code for a
	Block of code given a TypeContainer and its ILGenerator.

	* statement.cs (Block): Standard public readonly optimization.
	(Block::Block constructors): Link children.
	(Block::Child): Child Linker.
	(Block::EmitVariables): Emits IL variable declarations.

	* class.cs: Drop support for MethodGroups here, delay until
	Semantic Analysis.
	(Method::): Applied the same simplification that I did before, and
	move from Properties to public readonly fields.
	(Method::ParameterTypes): Returns the parameter types for the
	function, and implements a cache that will be useful later when I
	do error checking and the semantic analysis on the methods is
	performed.
	(Constructor::GetCallingConvention): Renamed from CallingConvetion
	and made a method, optional argument tells whether this is a class
	or a structure to apply the `has-this' bit.
	(Method::GetCallingConvention): Implement, returns the calling
	convention.
	(Method::Define): Defines the type, a second pass is performed
	later to populate the methods.

	(Constructor::ParameterTypes): implement a cache similar to the
	one on Method::ParameterTypes, useful later when we do semantic
	analysis.

	(TypeContainer::EmitMethod):  New method.  Emits methods.

	* expression.cs: Removed MethodGroup class from here.

	* parameter.cs (Parameters::GetCallingConvention): new method.

svn path=/trunk/mcs/; revision=573
2001-08-22 23:32:44 +00:00
Nick Drochak a026988bb8 2001-08-23 Nick Drochak <[email protected]>
* ccvs: added '-Pd' to the cvs update command with an explanation

svn path=/trunk/mono/; revision=571
2001-08-22 21:26:35 +00:00
Bob Smith 409bb35a33 LiteralControl implemented, and HtmlContainerControl bugfixed.
svn path=/trunk/mcs/; revision=570
2001-08-22 19:46:35 +00:00
Nick Drochak 95af7dd69b 2001-08-21 Nick Drochak <[email protected]>
* Added ChangeLog file

svn path=/trunk/mcs/; revision=569
2001-08-22 19:08:09 +00:00
Miguel de Icaza 9e93720b51 2001-08-22 Miguel de Icaza <[email protected]>
* interp.c (usage): Add version information

svn path=/trunk/mono/; revision=568
2001-08-22 18:35:19 +00:00
Miguel de Icaza 52c2071e89 2001-08-22 Miguel de Icaza <[email protected]>
* interp.c (ves_pinvoke_method): Typo fix.

svn path=/trunk/mono/; revision=567
2001-08-22 18:33:16 +00:00
Bob Smith 75becf30e1 Updated class.xml
svn path=/trunk/mono/; revision=566
2001-08-22 16:17:45 +00:00
Bob Smith f417e9e65d More implementations.
svn path=/trunk/mcs/; revision=565
2001-08-22 16:07:36 +00:00
Paolo Molaro 4d0be295fa Wed Aug 22 20:37:51 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: simplified init_class (). Make sure a class
	is fully initialized before executing a method in the class.
	Search for the class constructor only on beforefieldinit classes.
	Implement a bunch of opcodes: br, brfalse, brtrue, beq, bge,
	bgt, blt, ble, bne.un, bge.un, bgt.un, ble.un, blt.un, stind.i,
	ldflda, ldsflda, ldelem.i8, stelem.i8, leave.

svn path=/trunk/mono/; revision=564
2001-08-22 14:44:45 +00:00
John Barnette cc59b1d1d6 Updated StringDictionary entry.
svn path=/trunk/mono/; revision=563
2001-08-22 13:39:49 +00:00
John Barnette 448f93455a Vanity commit: added self to AUTHORS.
svn path=/trunk/mcs/; revision=562
2001-08-22 13:37:42 +00:00
John Barnette d07c387db5 Initial add of StringDictionary.
svn path=/trunk/mcs/; revision=561
2001-08-22 13:36:27 +00:00
Miguel de Icaza cfc72f5639 Rename Windoze.cs to Windows.cs
svn path=/trunk/mcs/; revision=560
2001-08-22 11:50:46 +00:00
Paolo Molaro c5922f55ad Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <[email protected]>
* metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
	MonoClass now has the name and name_space fields.
	MonoMethod has a pointer to its MonoClass, instead of MonoImage.
	mono_get_method () takes and optional MonoClass as argument.
	Removed mono_typedef_from_name() and added mono_class_token_from_name()
	instead that takes advantage of a map from class names to typedef
	tokens in MonoImage.


Wed Aug 22 16:34:03 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: Updates for changes in metadata/. Better output in debug mode
	and in the stack trace. Completed rethrow handling

svn path=/trunk/mono/; revision=559
2001-08-22 10:38:20 +00:00
Paolo Molaro 9913163486 Wed Aug 22 16:22:22 CEST 2001 Paolo Molaro <[email protected]>
* dis-cil.c: add a newline after branch instructions. Move
	end of exception handler code at the end.

svn path=/trunk/mono/; revision=558
2001-08-22 10:27:23 +00:00
Jim Richardson b2921f3b60 Corrected a compilation issue in Environment.cs and added it to common.src
svn path=/trunk/mcs/; revision=557
2001-08-22 09:24:48 +00:00
Jim Richardson d937d1508e Added PlatformID.cs and OperatingSystem.cs to common.src
svn path=/trunk/mcs/; revision=556
2001-08-22 09:10:05 +00:00
Jim Richardson e24740f7ec Implemented additional functionality.
Verified compilation.
Added to appropriate .src files.

svn path=/trunk/mcs/; revision=555
2001-08-22 08:44:07 +00:00
Jim Richardson 3a88605c0e Created a namespace System.Private.PlatformSpecific.
Added implementations in Unix.cs and Windows.cs for retrieving
environment variables in a platform specific manner.
Implementations are called from Environment.cs

svn path=/trunk/mcs/; revision=554
2001-08-22 08:41:45 +00:00
Jim Richardson 40055a32f4 Corrected some minor issues that were preventing compilation.
svn path=/trunk/mcs/; revision=553
2001-08-22 07:56:24 +00:00
Sergey Chaban b4fcf4f94a Lots of changes, it was basically rewritten from scratch.
svn path=/trunk/mcs/; revision=552
2001-08-22 06:25:23 +00:00
John Barnette f0cc7693e1 Updated entries for ListDictionary and StringCollection.
svn path=/trunk/mono/; revision=551
2001-08-22 02:25:09 +00:00
John Barnette bac0f8e2f8 Initial add of ListDictionary.
svn path=/trunk/mcs/; revision=550
2001-08-22 02:18:15 +00:00
John Barnette 10968ac70e Initial implementation of ListDictionary.
svn path=/trunk/mcs/; revision=549
2001-08-22 02:17:16 +00:00
Miguel de Icaza 6e429b89e5 Fix xml
svn path=/trunk/mono/; revision=548
2001-08-21 23:47:10 +00:00
Miguel de Icaza 0e0f2c05ea Add Chris classes
svn path=/trunk/mono/; revision=547
2001-08-21 23:41:58 +00:00
Miguel de Icaza c7d8b7633c Add Chris to the maintainers list
svn path=/trunk/mono/; revision=546
2001-08-21 23:39:01 +00:00
Miguel de Icaza c868a9d062 Add System.Configuration classes from Chris Podurgiel
svn path=/trunk/mcs/; revision=545
2001-08-21 23:37:54 +00:00
Miguel de Icaza 4d8197f95c 2001-08-21 Miguel de Icaza <[email protected]>
* class.cs (TypeContainer::Populate): Drop RootContext from the
	argument.

	(Constructor::CallingConvention): Returns the calling convention.
	(Constructor::ParameterTypes): Returns the constructor parameter
	types.

	(TypeContainer::AddConstructor): Keep track of default constructor
	and the default static constructor.

	(Constructor::) Another class that starts using `public readonly'
	instead of properties.

	(Constructor::IsDefault): Whether this is a default constructor.

	(Field::) use readonly public fields instead of properties also.

	(TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
	track of static constructors;  If none is used, turn on
	BeforeFieldInit in the TypeAttributes.

	* cs-parser.jay (opt_argument_list): now the return can be null
	for the cases where there are no arguments.

	(constructor_declarator): If there is no implicit `base' or
	`this', then invoke the default parent constructor.

	* modifiers.cs (MethodAttr): New static function maps a set of
	modifiers flags into a MethodAttributes enum
	(FieldAttr): renamed from `Map'.  So now we have FieldAttr,
	MethodAttr, TypeAttr to represent the various mappings where the
	modifiers are used.
	(FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'

svn path=/trunk/mcs/; revision=544
2001-08-21 23:17:19 +00:00
Bob Smith 94e5d7320c Added more notes for later use.
svn path=/trunk/mcs/; revision=543
2001-08-21 15:55:20 +00:00
Dietmar Maurer b87a157b27 replaced mono-int with mint, disable debugging mode
svn path=/trunk/mono/; revision=542
2001-08-21 13:55:45 +00:00
Dietmar Maurer 62ddcbd7f5 added mint to cvsignore
svn path=/trunk/mono/; revision=541
2001-08-21 13:49:29 +00:00
Dietmar Maurer b275833dd4 added some documentation
svn path=/trunk/mono/; revision=540
2001-08-21 13:48:09 +00:00
Paolo Molaro 52195d8136 Tue Aug 21 18:54:06 CEST 2001 Paolo Molaro <[email protected]>
* mono/tests/exceptions*: enhanced and added more tests for
	exceptions.


Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <[email protected]>

	* metadata.c: zero is not a valid alignment boundary.
	Merge MONO_TYPE_VOID in default decoding code.


Tue Aug 21 18:56:19 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: new macro INIT_FRAME() to properly
	initialize a MonoInvocation. Fixed a couple of buglets in exception code:
	increase stack pointer when pushing the exception for catch blocks,
	initialize frame->ex_handler to NULL, correctly try all the
	catch blocks (don't incorrectly fallback on filter handling).
	Added a couple more checks where we may need to throw an
	exception. Added more exception creation functions.
	Changed stackval_from_data() to take the target stackval as
	argument. Implemented a couple more opcodes.
	* interp.h: prepare stackval for value type code.

svn path=/trunk/mono/; revision=539
2001-08-21 13:13:44 +00:00
Paolo Molaro 629b052e6a Tue Aug 21 18:51:05 CEST 2001 Paolo Molaro <[email protected]>
* dis-cil.c: correctly print the label for multi-byte opcodes.

svn path=/trunk/mono/; revision=538
2001-08-21 12:52:58 +00:00
Miguel de Icaza dba26a4e11 oops, fix web site
svn path=/trunk/mono/; revision=537
2001-08-21 12:47:34 +00:00
Miguel de Icaza 8bded4344d 2001-08-21 Miguel de Icaza <[email protected]>
* Makefile.am (mint_LDADD): Renamed interpreter to mint.

svn path=/trunk/mono/; revision=536
2001-08-21 12:08:49 +00:00
Dietmar Maurer d38dd14b24 2001-08-21 Dietmar Maurer <[email protected]>
* image.h: merged MonoMetadata into MonoImage

svn path=/trunk/mono/; revision=535
2001-08-21 09:39:08 +00:00
Mike Kestner 218c01c7ee Removed duplicate class nodes I accidentally committed.
svn path=/trunk/mono/; revision=534
2001-08-21 09:00:13 +00:00
Dietmar Maurer ec61ac002c removed some unused code
svn path=/trunk/mono/; revision=533
2001-08-21 04:10:23 +00:00
Dietmar Maurer f28fe3bcc3 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
identify the type of elements.
* interp.c (get_named_exception): use the right constructor.

svn path=/trunk/mono/; revision=532
2001-08-21 03:58:11 +00:00
Nick Drochak 479b9d7c4d 2001-08-21 Nick Drochak <[email protected]>
* class.xml : made myself maintainer of System.Diagnostics.DebuggableAttribute

svn path=/trunk/mono/; revision=531
2001-08-21 03:11:20 +00:00
Dietmar Maurer bef5110c2a added ltconfig to .cvsignore
svn path=/trunk/mono/; revision=530
2001-08-21 02:54:06 +00:00
Dietmar Maurer 726d99ab5b merged the cli and metadata directories - everything is now in metadata
svn path=/trunk/mono/; revision=529
2001-08-21 02:51:33 +00:00
Miguel de Icaza 18667dfc0d Added .cvsinogre
svn path=/trunk/mono/; revision=528
2001-08-20 23:41:53 +00:00
Miguel de Icaza 11e62b9394 2001-08-20 Miguel de Icaza <[email protected]>
* mono/Makefile.am (SUBDIRS): Remove `test' from here to allow us
	to pass make distcheck

	* mono/wrapper/Makefile.am (EXTRA_DIST): Include genwrapper.pl

	* configure.in, Makefile.am, runtime/Makefile.am (dist-hook,
	install-data-hook): Added mechanism to distribute and install the
	dll files.

svn path=/trunk/mono/; revision=527
2001-08-20 23:41:34 +00:00
Miguel de Icaza a8d6eb7e1a Unify, need to fix the whole biuld process
svn path=/trunk/mcs/; revision=526
2001-08-20 22:25:34 +00:00
Miguel de Icaza 1347f6ddb2 Add new src files
svn path=/trunk/mcs/; revision=525
2001-08-20 22:18:35 +00:00
Miguel de Icaza eaeb89ee36 Make compilation work with windows target, we do not need the 'monolib2' target
svn path=/trunk/mcs/; revision=524
2001-08-20 22:17:59 +00:00
Miguel de Icaza 6fe5a311b2 Updated the contributing section
svn path=/trunk/mono/; revision=523
2001-08-20 20:48:33 +00:00
Bob Smith 134538f13a Control.cs: More implementation.
svn path=/trunk/mcs/; revision=522
2001-08-20 20:24:35 +00:00
Miguel de Icaza e55403fded Update
svn path=/trunk/mono/; revision=521
2001-08-20 20:04:31 +00:00
Miguel de Icaza 07e948ecc5 Add contribution from Leen Toelen
svn path=/trunk/mcs/; revision=520
2001-08-20 20:02:39 +00:00
Miguel de Icaza 58ac87646c Mention the compilation service
svn path=/trunk/mono/; revision=519
2001-08-20 19:59:22 +00:00
Nick Drochak 035d611f13 2001-08-21 Nick Drochak <[email protected]>
* Implemented ConditionalAttribute.cs and DebuggableAttribute.cs
	* Forgot to cvs add them before I commited (cvs-newbie error, sorry)

svn path=/trunk/mcs/; revision=518
2001-08-20 19:26:43 +00:00
Miguel de Icaza bdba3c13a8 Add tools to the biuld process
svn path=/trunk/mcs/; revision=517
2001-08-20 17:30:51 +00:00
Miguel de Icaza 83c29547ee Add copyright information
svn path=/trunk/mcs/; revision=516
2001-08-20 17:29:19 +00:00
Miguel de Icaza 2e28ca97ee Add Serge's verifier
svn path=/trunk/mcs/; revision=515
2001-08-20 17:26:38 +00:00
Miguel de Icaza 6fa717e133 Updated contributions
svn path=/trunk/mono/; revision=514
2001-08-20 15:35:06 +00:00
Miguel de Icaza c634df75a3 Add System.Web to the make process
Flush my changes to Component.cs
Update mono.src
Fix compiler report.cs class

svn path=/trunk/mcs/; revision=513
2001-08-20 14:57:40 +00:00
Dietmar Maurer 2f4757bcb8 fixes to make it compile again
svn path=/trunk/mcs/; revision=512
2001-08-20 14:20:16 +00:00
Paolo Molaro cfd0ebeef7 Mon Aug 20 19:33:34 CEST 2001 Paolo Molaro <[email protected]>
* util.c: add a space when decoding multiple flags.
	* dump.c, dump.h, main.c: decode the property map and
	methodsemantics tables. Disassemble property information
	to .property IL directives.
	* get.c: allow passing a NULL as method in dis_stringify_method ()
	if a methoddef_row is given.

Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <[email protected]>

	* blob.h: fix MONO_TYPE_TYPEDBYREF value.
	* cil-coff.h: split MonoMSDOSHeader and add size info.
	* image.c: add some consistency checks.
	* metadata.c: fix row size computation: one programmer
	error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
	add explanation for the locator routine.
	Fix decoding of size in method header.

svn path=/trunk/mono/; revision=511
2001-08-20 13:46:59 +00:00
Miguel de Icaza 74efe882e5 2001-08-20 Miguel de Icaza <[email protected]>
* assembly.c 	(g_concat_dir_and_file): Use _S for string concat.

svn path=/trunk/mono/; revision=510
2001-08-20 13:37:31 +00:00
Miguel de Icaza 4364c7cdf2 Compilation fixes
svn path=/trunk/mcs/; revision=509
2001-08-20 13:31:12 +00:00
Miguel de Icaza c804653371 2001-08-20 Miguel de Icaza <[email protected]>
* assembly.c (g_concat_dir_and_file): Bring g_concat_dir_and_file
	function from gnome-libs.  This uses the right path separator
	based on the OS, and also works around a bug in some systems where
	a double slash is not allowed.
	(default_assembly_name_resolver): Use g_concat_dir_and_file
	(mono_assembly_open): ditto.

svn path=/trunk/mono/; revision=508
2001-08-20 13:26:33 +00:00
Miguel de Icaza 06d27b1891 More web site updates
svn path=/trunk/mono/; revision=507
2001-08-20 13:26:07 +00:00
Paolo Molaro f5e5dd46bc Mon Aug 20 18:58:36 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: fix buglet with the leave.s opcode.

svn path=/trunk/mono/; revision=506
2001-08-20 13:00:33 +00:00
Nick Drochak 77567f5ddd 2001-08-21 Nick Drochak <[email protected]>
* Added DebuggableAttribute.cs and ConditionalAttribute.cs to compile list

svn path=/trunk/mcs/; revision=505
2001-08-20 12:02:44 +00:00
Nick Drochak f201bea041 2001-08-21 Nick Drochak <[email protected]>
* Component.cs: Eliminated compile errors by removing redundant fields and
        using the ISite member instead.  Also raised the Disposed event, but not
        sure if it's correct now.  Look for FIXME in the comments.

svn path=/trunk/mcs/; revision=504
2001-08-20 11:32:49 +00:00
Dietmar Maurer 6bf6ad75d1 2001-08-20 Dietmar Maurer <[email protected]>
* object.c (mono_new_string): impl.

	* loader.c (mono_init): impl.

	* object.c (mono_new_utf16_string): impl.

svn path=/trunk/mono/; revision=503
2001-08-20 10:10:04 +00:00
Dietmar Maurer 00938302f3 2001-08-20 Dietmar Maurer <[email protected]>
* mono/tests/stream.cs: new tests for the Stream class

        * configure.in: I really need LIBTOOL for libmonowrapper.so, so I
        added it again.

        * class.h: replaced 'struct MonoMethod' with 'MonoMethod'

        * cli.h: removed #include <mono/cli/object.h>

        * icall.c: changed everything to support the new calling convention

        * hacks.h: added some macros for FreeBSD

        * interp.c (get_named_exception): use mono_object_new instead of
        newobj, initialize the stack before we call the constructor.

        * metadata.c (mono_metadata_signature_equal): impl.

        * *: void is now a realy MonoType (instead of using NULL)

        * metadata.c (do_mono_metadata_parse_type): use
        mono_metadata_parse_type to parse void value.

svn path=/trunk/mono/; revision=502
2001-08-20 08:52:40 +00:00
Dietmar Maurer a9cb3de8c9 added UnixWrapper, FileStream and Stream Class + various fixes
svn path=/trunk/mcs/; revision=501
2001-08-20 08:14:36 +00:00
Sergey Chaban 9d380f37af DES classes update.
svn path=/trunk/mcs/; revision=500
2001-08-20 08:02:20 +00:00
Sergey Chaban 265702cfc0 Added PKCS-5 padding.
svn path=/trunk/mcs/; revision=499
2001-08-20 08:00:13 +00:00
Sergey Chaban 12d2fc51c5 Encryption core is approximately 30% faster than previous version.
svn path=/trunk/mcs/; revision=498
2001-08-20 07:58:31 +00:00
Miguel de Icaza f16d84213a Update class.xml
svn path=/trunk/mono/; revision=497
2001-08-19 23:06:15 +00:00
Miguel de Icaza 2e36329273 2001-08-19 Miguel de Icaza <[email protected]>
* parameter.cs (GetParameterInfo): Fix bug where there would be no
	method arguments.

	* interface.cs (PopulateIndexer): Implemented the code generator

svn path=/trunk/mcs/; revision=496
2001-08-19 22:59:53 +00:00
Miguel de Icaza 469ec11c7b Add more tests for the compiler
svn path=/trunk/mcs/; revision=495
2001-08-19 22:59:25 +00:00
Miguel de Icaza 8879961456 Add a couple of attributes -miguel
svn path=/trunk/mcs/; revision=494
2001-08-19 22:59:11 +00:00
Paolo Molaro 607997cab6 Sat Aug 18 12:40:32 CEST 2001 Paolo Molaro <[email protected]>
* x86/x86-codegen.h: fix a couple of buglets and add x86_regp_emit().

Sat Aug 18 12:42:26 CEST 2001 Paolo Molaro <[email protected]>

	* class.c, class.h: load also the methods when loading a class.

Sat Aug 18 12:43:38 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c, interp.h: added support code to create exceptions.
	Changed interncal calling convnetion over to MonoInvocation, to support
	exceptions, walking the stack back and forward and passing the 'this'
	pointer separately (remove the cludges required before to pass this on the
	stack). Use alloca heavily for both local vars and a copy of the incoming
	arguments. Init local vars to zero.
	Simplify stackval_from_data() and stackval_to_data() to only take a pointer
	instead of pointer + offset.
	Implement a few exceptions-related opcodes and the code to run finally, fault and
	catch blocks as well as a stack trace if no handler is found.

Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <[email protected]>

	* metadata.c, metadata.h: in the signature and method header store
	only the space required for holding the loca vars and incoming arguments.

svn path=/trunk/mono/; revision=493
2001-08-18 06:55:29 +00:00
Paolo Molaro ea934d2234 Sat Aug 18 11:24:07 CEST 2001 Paolo Molaro <[email protected]>
* dump.c, get.c, get.h, main.c: dis_stringify_method_signature()
	gets an optional methodef_row index instead of a name, so it
	can figure out also the names and attributes of params.
	parse_method_signature() and free_method_signature() removed as
	they are useless now.

svn path=/trunk/mono/; revision=492
2001-08-18 05:38:22 +00:00
Mike Kestner b95a8a8c90 Mark the implementation status as complete for Point, PointF, Size, and SizeF
in System.Drawing.

svn path=/trunk/mono/; revision=491
2001-08-17 17:27:06 +00:00
Mike Kestner bd02735dae Added the PointF, Size, and SizeF structures to System.Drawing.
svn path=/trunk/mcs/; revision=490
2001-08-17 17:19:15 +00:00
Bob Smith b043d30366 Took ownership of System.Web.UI.Control
svn path=/trunk/mono/; revision=489
2001-08-17 15:36:22 +00:00
Bob Smith d2688d7fc5 Started work on System.Web.UI.Control
svn path=/trunk/mcs/; revision=488
2001-08-17 15:30:43 +00:00
Miguel de Icaza 11d450f1e0 2001-08-17 Miguel de Icaza <[email protected]>
* interface.cs (InterfaceMemberBase): Now we track the new status
	here.

	(PopulateProperty): Implement property population.  Woohoo!  Got
	Methods and Properties going today.

	Removed all the properties for interfaces, and replaced them with
	`public readonly' fields.

svn path=/trunk/mcs/; revision=487
2001-08-17 04:06:44 +00:00
Alex Graveley 4cfb23b911 Add fficonfig.h
svn path=/trunk/mono/; revision=486
2001-08-16 20:10:17 +00:00
Alex Graveley 9bf5b00931 2001-08-16 Alex Graveley <[email protected]>
* configure.in: Replace AM_PROG_LIBTOOL with AC_PROG_RANLIB. This
	removes libtool dependency on all of Mono.

svn path=/trunk/mono/; revision=485
2001-08-16 20:09:33 +00:00
Alex Graveley 04453aac7f Add .cvsignore files
svn path=/trunk/mono/; revision=484
2001-08-16 18:40:40 +00:00
Alex Graveley b31adbaf59 2001-08-16 Alex Graveley <[email protected]>
* libffi/include/fficonfig.h: Remove as this is auto generated.

	* Makefile.am: Only generate libffi.a.

	* configure.in: replace A[CM]_PROG_LIBTOOL with AC_PROG_RANLIB.

2001-08-16  Alex Graveley  <[email protected]>

	* Makefile.am (mono_int_LDADD): Link with ../../libffi/libffi.a
	instead of ../../libffi/.libs/libffi.a.

svn path=/trunk/mono/; revision=483
2001-08-16 18:20:02 +00:00
Bob Smith 756e79f366 Bug fixes.
svn path=/trunk/mcs/; revision=482
2001-08-16 14:39:49 +00:00
Miguel de Icaza 5c19abc1c6 Update errors listing
svn path=/trunk/mcs/; revision=481
2001-08-16 13:57:05 +00:00
Nick Drochak 98b88b5cc5 2001-08-16 Nick Drochak <[email protected]>
* Added myself as maintainer of System.Attribute which is 95% done.

	* Made myself maintainer of System.ConditionalAttribute

svn path=/trunk/mono/; revision=480
2001-08-16 13:22:36 +00:00
Nick Drochak 10444ba7ba 2001-08-16 Nick Drochak <[email protected]>
* Attribute.cs: implemented all methods except GetHashCode()

	* common.src: added Attribute.cs so it would compile in

svn path=/trunk/mcs/; revision=479
2001-08-16 13:20:02 +00:00
Mike Kestner bf8172a6c0 Add the System.Drawing.Point struct implementation a fix a buglet in the
System.Drawing makefile.

svn path=/trunk/mcs/; revision=478
2001-08-16 12:42:08 +00:00
Miguel de Icaza beeee0059e More work
svn path=/trunk/mcs/; revision=477
2001-08-15 19:56:19 +00:00
Jim Richardson fa145bef84 Added stubbed implementations for classes.
svn path=/trunk/mcs/; revision=476
2001-08-14 02:30:47 +00:00
Jim Richardson a6ea9689dc Moved PlatformID enum from OperatingSystem.cs to PlatformID.cs
svn path=/trunk/mcs/; revision=475
2001-08-14 02:28:00 +00:00
Jim Richardson 6544d50ab1 Updated status of System.IO.Path. Entered System.IO.Directory and assigned
maintainer as myself as Path and Directory are quite complimentary.

svn path=/trunk/mono/; revision=474
2001-08-13 23:38:59 +00:00
Jim Richardson cb23450a88 Corrected a couple of minor typos.
svn path=/trunk/mcs/; revision=473
2001-08-13 23:28:30 +00:00
Bob Smith 0cf1dc9018 Compile fixes.
svn path=/trunk/mcs/; revision=472
2001-08-13 14:33:01 +00:00
Marcin Szczepanski e8302e6cfd Updated for System.IO.Path + updated Jim Richardson's email address to his
preferred one.

svn path=/trunk/mono/; revision=471
2001-08-13 05:13:50 +00:00
Marcin Szczepanski ee466ce369 System.IO.Path implementation from Jim Richardson
svn path=/trunk/mcs/; revision=470
2001-08-13 05:09:03 +00:00
Miguel de Icaza 00545ed9d2 2001-08-11 Miguel de Icaza <[email protected]>
* class.cs (MakeConstant): Code to define constants.

	* rootcontext.cs (LookupType): New function.  Used to locate types

svn path=/trunk/mcs/; revision=469
2001-08-13 01:40:19 +00:00
Miguel de Icaza b03eee1c99 Updated
svn path=/trunk/mono/; revision=468
2001-08-12 20:15:38 +00:00
Miguel de Icaza 83a5933975 Added Stub implementations of Environment and OperatingSystem from Jim Richardson
svn path=/trunk/mcs/; revision=467
2001-08-12 20:09:53 +00:00
Derek Holden 43f5873521 initial checkin
svn path=/trunk/mcs/; revision=466
2001-08-12 16:32:12 +00:00
Mike Kestner e7524be356 2001-08-10 Mike Kestner <[email protected]>
* mono/status/class.xml : Added System.Drawing structs.

svn path=/trunk/mono/; revision=465
2001-08-10 23:32:38 +00:00
Bob Smith ba55af6fc1 Notes added.
svn path=/trunk/mcs/; revision=464
2001-08-10 20:45:21 +00:00
Dietmar Maurer a8e168b8ef * object.c (mono_object_clone): impl.
* interp.c (ves_exec_method): impl CASTCLASS

* implemented System.Object::MemberwiseClone

svn path=/trunk/mono/; revision=463
2001-08-10 09:08:14 +00:00
Dietmar Maurer 46b1d4a334 *** empty log message ***
svn path=/trunk/mcs/; revision=462
2001-08-10 08:32:01 +00:00
Dietmar Maurer b02148f4ac * Object.cs: changed MemberWiseClone to MemberwiseClone, and
marked it as InternalCall

svn path=/trunk/mcs/; revision=461
2001-08-10 08:30:33 +00:00
Dietmar Maurer d67614986b 2001-08-10 Dietmar Maurer <[email protected]>
* Object.cs: changed MemberWiseClone to MemberwiseClone

svn path=/trunk/mcs/; revision=460
2001-08-10 08:28:33 +00:00
Dietmar Maurer a02f49ec02 2001-08-10 Dietmar Maurer <[email protected]>
* icall.c: moved the internal call stuff to this file

svn path=/trunk/mono/; revision=459
2001-08-10 08:24:23 +00:00
Dietmar Maurer 5112ab77f7 2001-08-10 Dietmar Maurer <[email protected]>
* common.src: removed UriFormatException.cs because the file is
	not there.

	* RuntimeTypeHandle.cs: replaced IntrPtr with IntPtr
	* Char.cs: replaced byte with char

	* Array.cs: make it work with the mono interpreter

svn path=/trunk/mcs/; revision=458
2001-08-10 07:03:40 +00:00
Dietmar Maurer a1dc393e45 *** empty log message ***
svn path=/trunk/mono/; revision=457
2001-08-10 05:25:17 +00:00
Dietmar Maurer 2d1589a995 2001-08-10 Dietmar Maurer <[email protected]>
* interp.c (ves_exec_method): impl. BOX/UNBOX
	(ves_icall_System_Array_GetValue): impl.
	(ves_icall_System_Array_SetValue): impl.

	* mono/tests/array.cs: more array tests

svn path=/trunk/mono/; revision=456
2001-08-10 05:24:01 +00:00
Miguel de Icaza c1753262d5 Added new version of TimeSpan from Duco Fijma
svn path=/trunk/mcs/; revision=455
2001-08-10 00:07:02 +00:00
Miguel de Icaza 1a1cef73cd More documentation updates
svn path=/trunk/mono/; revision=454
2001-08-09 23:59:21 +00:00
Miguel de Icaza 934a7e1fb0 Doc Update, Version update
svn path=/trunk/mcs/; revision=453
2001-08-09 19:03:51 +00:00
Dietmar Maurer db2912b8f4 2001-08-09 Dietmar Maurer <[email protected]>
* implemented arrays, but you will need a modified version of
	Array.cs to get arrays working (will commit soon)

	* interp.c (ves_icall_array_Set): impl.
	(ves_icall_array_Get): impl.
	(ves_icall_array_ctor): impl.
	(ves_icall_System_Array_GetRank): impl.
	(ves_icall_System_Array_GetLength): impl.
	(ves_icall_System_Array_GetLowerBound): impl.
	(mono_lookup_internal_call): impl.

	* object.c (mono_new_szarray): impl.

	* loader.c (mono_typedef_from_name): return the token, not the index
	(mono_get_corlib): impl.
	(mono_get_array_class_info): impl.
	(method_from_memberref): add array support
	(mono_get_method): support INTERNAL_CALL

	* class.c (mono_class_create_from_typedef): Array support,
	code cleanup, store the token_type, not the token index, added
	flag for value types.
	(mono_type_to_tydedef): impl.
	(mono_class_create_from_typespec): impl.
	(mono_array_class_get): impl.
	(mono_class_get): support TYPE_SPEC token.

svn path=/trunk/mono/; revision=452
2001-08-09 18:06:41 +00:00
Bob Smith 77e1380c49 Class.xml update
svn path=/trunk/mono/; revision=451
2001-08-09 17:23:52 +00:00
Bob Smith abcb02c77b System.Web: New Implementations.
svn path=/trunk/mcs/; revision=450
2001-08-09 17:08:56 +00:00
Sergey Chaban 72e9c582ab Update (Base64/DES stuff).
svn path=/trunk/mcs/; revision=449
2001-08-09 14:13:08 +00:00
Sergey Chaban d653162562 Base64Table now supports both encoding and decoding tables.
svn path=/trunk/mcs/; revision=448
2001-08-09 14:10:56 +00:00
Sergey Chaban ce0d4534ee Initial check-in.
svn path=/trunk/mcs/; revision=447
2001-08-09 14:07:31 +00:00
Sergey Chaban e14e65df25 Initial check-in.
svn path=/trunk/mcs/; revision=446
2001-08-09 13:56:48 +00:00
Nick Drochak f7ac0c141d 2001-08-09 Nick Drochak <[email protected]>
* class/makefile & mcs/makefile:
	  change hardcoded path to csc.exe to use SYSTEMROOT

svn path=/trunk/mcs/; revision=445
2001-08-09 13:30:04 +00:00
Bob Smith 48a76a09b5 RandomTest.cs: Better testing.
svn path=/trunk/mcs/; revision=444
2001-08-08 20:11:15 +00:00
Bob Smith d953404a7c RandomTest.cs: Sync with new Random.cs.
svn path=/trunk/mcs/; revision=443
2001-08-08 20:05:16 +00:00
Bob Smith 15fae9029b Random.cs: API sync.
svn path=/trunk/mcs/; revision=442
2001-08-08 20:03:00 +00:00
Paolo Molaro 6aa31876e3 Fixed x86_mov_reg_imm().
svn path=/trunk/mono/; revision=441
2001-08-08 17:21:29 +00:00
Miguel de Icaza 94b2ec9aaa Update copyright
svn path=/trunk/mono/; revision=440
2001-08-08 16:48:32 +00:00
Bob Smith f67f87d3d9 More RandomTest.cs compile fixes.
svn path=/trunk/mcs/; revision=439
2001-08-08 16:07:45 +00:00
Bob Smith c359c05efc Another Random.cs compile fix.
svn path=/trunk/mcs/; revision=438
2001-08-08 16:04:31 +00:00
Bob Smith abbc53df24 RandomTest.cs compile fixes.
svn path=/trunk/mcs/; revision=437
2001-08-08 15:36:23 +00:00
Bob Smith b8f1f68afd Random.cs compile fixes.
svn path=/trunk/mcs/; revision=436
2001-08-08 15:26:24 +00:00
Paolo Molaro 851a800d67 Wed Aug 8 15:30:05 CEST 2001 Paolo Molaro <[email protected]>
* x86/x86-codegen.h, x86/test.c: added x86 code emitter with
	test.

svn path=/trunk/mono/; revision=435
2001-08-08 13:32:23 +00:00
Miguel de Icaza 37a738ae84 Updated introduction
svn path=/trunk/mono/; revision=434
2001-08-08 08:23:30 +00:00
Miguel de Icaza af5e6538dc 2001-08-08 Miguel de Icaza <[email protected]>
* rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
	this System.Reflection code is.  Kudos to Microsoft

	* typemanager.cs: Implement a type cache and avoid loading all
	types at boot time.  Wrap in LookupType the internals.  This made
	the compiler so much faster.  Wow.  I rule!

	* driver.cs: Make sure we always load mscorlib first (for
	debugging purposes, nothing really important).

	* Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
	have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!

	* rootcontext.cs: Lookup types on their namespace;  Lookup types
	on namespaces that have been imported using the `using' keyword.

svn path=/trunk/mcs/; revision=433
2001-08-08 08:15:23 +00:00
Miguel de Icaza 1ee8bca867 Add missing enumerations UriPartial and UriHostNameType
svn path=/trunk/mcs/; revision=432
2001-08-08 07:09:46 +00:00
Miguel de Icaza 720c9e4100 Moved Uri.cs and UriFormatException to System assembly
svn path=/trunk/mcs/; revision=431
2001-08-08 07:04:06 +00:00
Miguel de Icaza ccce5baefb Fix Makefile
svn path=/trunk/mcs/; revision=430
2001-08-08 06:13:53 +00:00
Miguel de Icaza 864e85dae7 2001-08-08 Miguel de Icaza <[email protected]>
* class.cs (TypeContainer::TypeAttr): Virtualize.
	(Class::TypeAttr): Return attributes suitable for this bad boy.
	(Struct::TypeAttr): ditto.
	Handle nested classes.
	(TypeContainer::) Remove all the type visiting code, it is now
	replaced with the rootcontext.cs code

	* rootcontext.cs (GetClassBases): Added support for structs.

svn path=/trunk/mcs/; revision=429
2001-08-08 06:04:25 +00:00
Nick Drochak 1d5a3786f1 2001-08-08 Nick Drochak <[email protected]>
* Updated status of CollectionBase and ReadOnlyCollectionBase

svn path=/trunk/mono/; revision=428
2001-08-07 17:17:27 +00:00
Nick Drochak 798ee7d352 2001-08-08 Nick Drochak <[email protected]>
* Changed my email address from work to personal one

svn path=/trunk/mono/; revision=427
2001-08-07 17:01:14 +00:00
Nick Drochak 8139457d4e 2001-08-08 Nick Drochak <[email protected]>
* ReadOnlyCollectionBase.cs: Initialized private member.
         * CollectionBase.cs: Initialized private member.
	 * common.src : Added ReadOnlyCollectionBase.cs and CollectionBase.cs
	 * /mcs/class/makefile: Used $(SYSTEMROOT) instead of hard coded //c/winnt
	 * /mcs/makefile: Used $(SYSTEMROOT) instead of hard coded //c/winnt

svn path=/trunk/mcs/; revision=426
2001-08-07 16:59:34 +00:00
Nick Drochak 1192da80ac 2001-08-08 Nick Drochak <[email protected]>
* CollectionBase.cs: Add
         * ReadOnlyCollectionBase.cs: Add
         * CollectionBaseTest.cs: Add
         * ReadOnlyCollectionBaseTest.cs: Add

svn path=/trunk/mcs/; revision=425
2001-08-07 16:09:37 +00:00
Nick Drochak 76a9d42012 2001-08-08 Nick Drochak <[email protected]>
* CollectionBase.cs: Add
         * ReadOnlyCollectionBase.cs: Add
         * CollectionBaseTest.cs: Add
         * ReadOnlyCollectionBaseTest.cs: Add


--------------------------------------------------------------------

svn path=/trunk/mcs/; revision=424
2001-08-07 16:04:06 +00:00
Miguel de Icaza 70f5d8e095 Update docs
svn path=/trunk/mono/; revision=423
2001-08-07 01:40:26 +00:00
Miguel de Icaza 825f207690 Added a few more objects.
svn path=/trunk/mcs/; revision=422
2001-08-07 01:27:15 +00:00
Miguel de Icaza c42aade8ed Update
svn path=/trunk/mono/; revision=421
2001-08-07 01:24:51 +00:00
Miguel de Icaza 456ac53ebb 2001-08-06 Miguel de Icaza <[email protected]>
* interface.cs, statement.cs, class.cs, parameter.cs,
	rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
	Drop use of TypeRefs, and use strings instead.

svn path=/trunk/mcs/; revision=420
2001-08-07 00:51:56 +00:00
Miguel de Icaza aed8a46541 2001-08-06 Miguel de Icaza <[email protected]>
* IntPtr.cs: Added and Completed implementation.

svn path=/trunk/mcs/; revision=419
2001-08-07 00:11:48 +00:00
Bob Smith 45e3209277 Updated class.xml
svn path=/trunk/mono/; revision=418
2001-08-06 18:28:48 +00:00
Bob Smith 70ec919985 Added System.Random NUnit test.
svn path=/trunk/mcs/; revision=417
2001-08-06 18:24:35 +00:00
Miguel de Icaza 2231eaa247 Update on the FAQ
svn path=/trunk/mono/; revision=416
2001-08-06 17:58:24 +00:00
Miguel de Icaza d2bc65903b 2001-08-06 Miguel de Icaza <[email protected]>
* IntPtr.cs: Added.

	* Uri.cs: Add a note.

svn path=/trunk/mcs/; revision=415
2001-08-06 17:56:13 +00:00
Bob Smith 27bd9c4170 Random.cs compile fix.
svn path=/trunk/mcs/; revision=414
2001-08-06 17:13:47 +00:00
Dietmar Maurer edeb781a88 pinvoke bug fix
svn path=/trunk/mono/; revision=413
2001-08-06 13:26:40 +00:00
Dietmar Maurer 89ab22e255 2001-08-06 Dietmar Maurer <[email protected]>
* interp.c (mono_lookup_internal_call): impl.
	(ves_exec_method): implemented internal calls
	* cli.h: renamed MonoMethodManaged to MonoMethodNormal

	* loader.h: removed.

	* object.h: added MonoArrayObject and MonoStringObject

svn path=/trunk/mono/; revision=412
2001-08-06 13:16:52 +00:00
Garrett Rooney ad1df20a0c Add Uri.cs to common
svn path=/trunk/mcs/; revision=411
2001-08-06 13:00:47 +00:00
Garrett Rooney 4cb20d0f94 Oops, axe some debugging code that slipped in.
svn path=/trunk/mcs/; revision=410
2001-08-06 12:53:38 +00:00
Garrett Rooney 8fcbefdc81 Bring info on my classes up to date.
svn path=/trunk/mono/; revision=409
2001-08-06 12:51:40 +00:00
Garrett Rooney af58434ba6 2001-08-06 Garrett Rooney <[email protected]>
* Uri.cs: Initial Implementation.  Parsing needs to be fixed to take
	into account IPv6 addresses, url encoding needs to be implemented, and
	various minor methods need to be written, but this is a decent start.

svn path=/trunk/mcs/; revision=408
2001-08-06 12:48:43 +00:00
Dietmar Maurer 151094a2b3 2001-08-06 Dietmar Maurer <[email protected]>
* common.src: added Object.cs

	* mono.src: added ValueType.cs

	* Math.cs: replaced libc with libm

svn path=/trunk/mcs/; revision=407
2001-08-06 10:36:16 +00:00
Dietmar Maurer 57d320d107 2001-08-06 Dietmar Maurer <[email protected]>
* object.h: added MonoArrayObject and MonoStringObject

	* loader.c (mono_typedef_from_name):
	s/typedef_from_name/(mono_typedef_from_name and made it public.

	* class.c (class_compute_field_layout): skip the FIELD signature
	(mono_class_create_from_typedef): bug fix: field.last was wrong
	(class_compute_field_layout): added some code to make it work for
	classes with EXPLICIT_LAYOUT but no offsets specified (I observed
	that behaviour on System.Array)

	* interp.c (ves_exec_method): impl. NEWARR
	(ves_exec_method): impl. most LDELEM/STELEM opcodes, LDLEN
	(newarr): impl.
	(mono_get_ansi_string): impl.

	* mono/tests/pinvoke.cs: we can now print strings ;-)

	* mono/tests/array.cs: new test for arrays

svn path=/trunk/mono/; revision=406
2001-08-06 09:56:57 +00:00
Miguel de Icaza 37dcf16ecb Add more test cases for the compiler, we rule!!!
svn path=/trunk/mcs/; revision=405
2001-08-05 17:08:07 +00:00
Miguel de Icaza 08e726c19d 2001-08-04 Miguel de Icaza <[email protected]>
* rootcontext.cs:

	* class.cs (Struct::Struct): set the SEALED flags after
	checking the modifiers.
	(TypeContainer::TypeAttr): new property, returns the
	TypeAttributes for a class.

	* cs-parser.jay (type_list): Oops, list production was creating a
	new list of base types.

	* rootcontext.cs (StdLib): New property.
	(GetInterfaceTypeByName): returns an interface by type name, and
	encapsulates error handling here.
	(GetInterfaces): simplified.
	(ResolveTree): Encapsulated all the tree resolution here.
	(CreateClass, GetClassBases, GetInterfaceOrClass): Create class
	types.

	* driver.cs: Add support for --nostdlib, to avoid loading the
	default assemblies.
	(Main): Do not put tree resolution here.

	* rootcontext.cs: Beginning of the class resolution.

svn path=/trunk/mcs/; revision=404
2001-08-05 17:06:56 +00:00
Paolo Molaro 31e67dbbe3 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <[email protected]>
* metadata.h, metadata.c: add mono_metadata_decode_row_col () to
	decode a single column from a row in a metadata table and changes
	to take advantage of it in the typedef locator (gives a nice speed up).
	Store offset info for function params.


Sat Aug 4 12:36:54 CEST 2001 Paolo Molaro <[email protected]>

	* get.c, get.h, main.c, dump.c: implement dis_stringify_method_signature().
	More magic constants replaced by enum values (spotted at least 3 real bugs
	doing this). Print usage information if an unknown option is given.
	Print the full signature when dumping the method table.
	Changed method and field table dumps to show the typedef name the field
	or method belongs to.

svn path=/trunk/mono/; revision=403
2001-08-04 13:32:08 +00:00
Miguel de Icaza ff28f75cc7 Add EventHandlerList.cs
svn path=/trunk/mcs/; revision=402
2001-08-04 04:06:53 +00:00
Miguel de Icaza 69b9fdb22a 2001-08-04 Miguel de Icaza <[email protected]>
* rootcontext.cs: Beginning of the class resolution.

svn path=/trunk/mcs/; revision=401
2001-08-04 04:05:59 +00:00
Miguel de Icaza c4e0e0a69a More contributors
svn path=/trunk/mono/; revision=400
2001-08-04 04:01:04 +00:00
Miguel de Icaza 61fcd0dabb 2001-08-03 Miguel de Icaza <[email protected]>
* cs-parser.jay (interface_base): set our $$ to be interfaces.

svn path=/trunk/mcs/; revision=399
2001-08-04 01:39:12 +00:00
Miguel de Icaza 2619944732 Added VisualStudio files
svn path=/trunk/mcs/; revision=398
2001-08-04 01:28:46 +00:00
Miguel de Icaza 64f74a749b Added tests for compiler
svn path=/trunk/mcs/; revision=397
2001-08-04 01:15:00 +00:00
Miguel de Icaza 27ddde64e5 2001-08-03 Miguel de Icaza <[email protected]>
* rootcontext.cs (CreateInterface): Handle the case where there
	are no parent interfaces.

svn path=/trunk/mcs/; revision=396
2001-08-04 01:02:08 +00:00
Miguel de Icaza ee782bf506 2001-08-03 Miguel de Icaza <[email protected]>
* rootcontext.cs (CloseTypes): Routine to flush types at the end.
	(CreateInterface): Track types.
	(GetInterfaces): Returns an array of Types from the list of
	defined interfaces.

	* typemanager.c (AddUserType): Mechanism to track user types (puts
	the type on the global type hash, and allows us to close it at the
	end).

svn path=/trunk/mcs/; revision=395
2001-08-04 00:44:58 +00:00
Miguel de Icaza fa62c464f4 Flush
svn path=/trunk/mcs/; revision=394
2001-08-04 00:23:10 +00:00
Miguel de Icaza ed5023f76b Add information on daily snapshots
svn path=/trunk/mono/; revision=393
2001-08-03 20:05:12 +00:00
Paolo Molaro 3ddb0dbeb2 Fri Aug 3 18:30:16 CEST 2001 Paolo Molaro <[email protected]>
* get.c (get_method): fix use of unitialized variable and
	remove magic constants all over the place.

svn path=/trunk/mono/; revision=392
2001-08-03 16:54:12 +00:00
Dietmar Maurer 055c070440 removed a typo
svn path=/trunk/mono/; revision=391
2001-08-03 05:38:15 +00:00
Bob Smith b8257ee75f Implemented the System.Random class. I dont have a C# compiler, so someone will need to test it when (s)he has time.
svn path=/trunk/mcs/; revision=390
2001-08-02 23:04:31 +00:00
Miguel de Icaza ac653e22ed *** empty log message ***
svn path=/trunk/mcs/; revision=389
2001-08-02 22:11:17 +00:00
Miguel de Icaza 316b3938fb Update classes
svn path=/trunk/mono/; revision=388
2001-08-02 21:58:01 +00:00
Miguel de Icaza b691f286c7 2001-08-02 Miguel de Icaza <[email protected]>
* Container.cs, Component.cs, IContainer.cs, IComponent.cs,
	ComponentCollection.cs, ISite.cs: New classes

2001-08-02  Miguel de Icaza  <[email protected]>

	* IServiceProvider.cs, EventHandler.cs: New files.

svn path=/trunk/mcs/; revision=387
2001-08-02 21:57:41 +00:00
Alex Graveley 686c0d0681 Update
svn path=/trunk/mono/; revision=386
2001-08-02 19:37:15 +00:00
Alex Graveley ab1d77939e Update
svn path=/trunk/mono/; revision=385
2001-08-02 19:36:48 +00:00
Alex Graveley 6ff1b314c0 Add forgotten libffi headers.
svn path=/trunk/mono/; revision=384
2001-08-02 19:33:38 +00:00
Alex Graveley 44162175c8 2001-08-02 Alex Graveley <[email protected]>
* libffi/*: Import libffi CVS version, with minor changes to make it
          compile.

        * mono/interpreter/Makefile.am: Link against
          ../../libffi/.libs/libffi.a.

        * Makefile.am: Add libffi

        * autogen.sh: Replace with adapted gnome autogen.sh

        * configure.in: Add AC_CONFIG_SUBDIRS(libffi).

svn path=/trunk/mono/; revision=383
2001-08-02 19:31:56 +00:00
Marcel Narings 6c99809873 2001-08-02 Marcel Narings <[email protected]>
* DateTime.cs: Cleaned up a bit. Added the Add* family members.
        Added exceptions. Added IConvertible. Still needs some platform
        dependend stuff, the Parse and ToString members

svn path=/trunk/mcs/; revision=382
2001-08-02 19:14:40 +00:00
Miguel de Icaza b690b5bb2f 2001-08-02 Miguel de Icaza <[email protected]>
* tree.cs: Removed RecordType, added RecordClass, RecordStruct and
	RecordInterface instead.

	* cs-parser.jay: Updated to reflect changes above.

	* decl.cs (Definition): Keep track of the TypeBuilder type that
	represents this type here.  Not sure we will use it in the long
	run, but wont hurt for now.

	* driver.cs: Smaller changes to accomodate the new code.

	Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
	when done.

	* rootcontext.cs (CreateInterface):  New method, used to create
	the System.TypeBuilder type for interfaces.
	(ResolveInterfaces): new entry point to resolve the interface
	hierarchy.
	(CodeGen): Property, used to keep track of the code generator.

svn path=/trunk/mcs/; revision=381
2001-08-02 14:19:45 +00:00
Dietmar Maurer d6111f3c10 2001-08-02 Dietmar Maurer <[email protected]>
* interp.c (ves_exec_method): found a way to do unordered
	compares, implemented CEE_BNE_UN_S, CEE_BGE_UN_S, CEE_BGT_UN_S,
	CEE_BLE_UN_S, CEE_BLT_UN_S
	* loader.c(mono_map_dll): impl.
	(mono_get_method): bug fix: pass index - 1 to fill_pinvoke_info
        * mono/tests/pinvoke.cs: impl.

svn path=/trunk/mono/; revision=380
2001-08-02 11:28:08 +00:00
Dietmar Maurer 4ce63bc801 * loader.c (mono_get_string_class_info): do a strcmp to check
if it is System.String instead of using magic numbers.
	* class.c (mono_class_create_from_typedef): do a strcmp to check
	if it is System.Object instead of using magic numbers.
	* image.h (MONO_IMAGE_IS_CORLIB): removed

svn path=/trunk/mono/; revision=379
2001-08-02 06:46:33 +00:00
Miguel de Icaza a1670be543 Update menus
svn path=/trunk/mono/; revision=378
2001-08-02 02:17:37 +00:00
Miguel de Icaza 2d59fbc933 More web page updates + more class updates
svn path=/trunk/mono/; revision=377
2001-08-02 02:17:08 +00:00
Miguel de Icaza 2a091f407b Include ToBase64 in compile
svn path=/trunk/mcs/; revision=376
2001-08-02 02:04:49 +00:00
Miguel de Icaza aea66710df Added ToBase64TransformTest from Sergey
svn path=/trunk/mcs/; revision=375
2001-08-02 01:55:45 +00:00
Miguel de Icaza a4e78886e1 More FAQ updates; Updated class status
svn path=/trunk/mono/; revision=374
2001-08-01 23:44:33 +00:00
Miguel de Icaza 41038acb57 Add ChangeLog
svn path=/trunk/mcs/; revision=373
2001-08-01 23:07:32 +00:00
Miguel de Icaza 245459fe01 Add missing files
svn path=/trunk/mcs/; revision=372
2001-08-01 23:05:44 +00:00
Miguel de Icaza baa39453fc Matthew Ford's initial implementation and test classes for
System.Security.Cryptography.

svn path=/trunk/mcs/; revision=371
2001-08-01 23:05:07 +00:00
Miguel de Icaza 30577d2746 Update documentation; FAQ; Download information; Status update
svn path=/trunk/mono/; revision=370
2001-08-01 23:03:50 +00:00
Paolo Molaro 1101305d69 Wed Aug 1 22:46:45 CEST 2001 Paolo Molaro <[email protected]>
* dis-cil.c: properly decode the switch opcode.

Wed Aug 1 22:48:29 CEST 2001 Paolo Molaro <[email protected]>

	* class.c, class.h: mono_field_type_size () moved to metadata.
	Take correctly into account alignment when laying out
	class fields. Fix 5 to 0 magc number (to check for System.Object).


Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <[email protected]>

	* assembly.c: how could mono_assembly_close () had ever worked?
	* metadata.c, metadata.h: provide offset info for local vars.
	Implement mono_type_size () to take care of alignment as well
	as size (it was mono_field_type_size in cli/class.c before).

Wed Aug 1 22:51:38 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: handle also MONO_TYPE_CLASS to/from the stack.
	Change locals to be a memory blob, instead of the structured
	(but wrong) stackval. Implement bne.un.s opcode. Make the program
	exit with the error code from Main().

svn path=/trunk/mono/; revision=369
2001-08-01 21:01:30 +00:00
Paolo Molaro ca0c0e74b8 Missed this change from previous commit.
svn path=/trunk/mono/; revision=368
2001-08-01 20:44:53 +00:00
Paolo Molaro e7a3ce9740 Wed Aug 1 22:34:52 CEST 2001 Paolo Molaro <[email protected]>
* configure.in, mono/tests: added some tests for the interpreter.

svn path=/trunk/mono/; revision=367
2001-08-01 20:38:13 +00:00
Dietmar Maurer f7db85e696 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
* assembly.h (CORLIB_NAME): set to corlib.dll
	* assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
	* interp.c (ves_exec_method): implemented LDSTR
	* loader.c (mono_get_string_class_info): impl.
	(methoddef_from_memberref): added check for references into mscorlib
	* class.c (mono_class_create_from_typedef): better check for root
	object

svn path=/trunk/mono/; revision=366
2001-08-01 18:12:02 +00:00
Garrett Rooney bcc894914f 2001-07-31 Garrett Rooney <[email protected]>
* StackTest.cs: Add Test case for System.Collections.Stack.
	Contributed by Chris Hynes <[email protected]>

svn path=/trunk/mcs/; revision=365
2001-08-01 12:51:25 +00:00
Dietmar Maurer b371649eaa 2001-08-01 Dietmar Maurer <[email protected]>
* assembly.c (mono_assembly_open): set the corlib before we continue.
	(mono_assembly_open): replaced strcmp() with !strcmp()

svn path=/trunk/mono/; revision=364
2001-08-01 09:29:18 +00:00
Dietmar Maurer 19958ecf5e 2001-08-01 Dietmar Maurer <[email protected]>
* Type.cs (GetTypeFromHandle): added placeholder

svn path=/trunk/mcs/; revision=363
2001-08-01 07:13:42 +00:00
Miguel de Icaza 7fad175c3b Make Configure point people to the libffi library
svn path=/trunk/mono/; revision=362
2001-08-01 06:59:29 +00:00
Miguel de Icaza 79bac871d3 2001-07-31 Miguel de Icaza <[email protected]>
* interp.c (GET_NATI): Switched from using nati_t to cli/types.h
	m_i type.  Maybe we should rename the types to be m_i_t instead of
	m_i alone.

	Make the code compile after I broke it.

svn path=/trunk/mono/; revision=361
2001-07-31 21:54:03 +00:00
Paolo Molaro 84c89ad40a Tue Jul 31 23:46:33 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: fix cleanup.
	* Makefile.am: don't link with disassembler library.

svn path=/trunk/mono/; revision=360
2001-07-31 21:47:47 +00:00
Miguel de Icaza 70d6adbef8 Add CVS instructions and Developer FAQ
svn path=/trunk/mono/; revision=359
2001-07-31 21:13:05 +00:00
Miguel de Icaza f42bcd22d0 Update to the FAQ.
Beautified the code.

svn path=/trunk/mono/; revision=358
2001-07-31 21:12:47 +00:00
Paolo Molaro 889c389860 Tue Jul 31 20:13:59 CEST 2001 Paolo Molaro <[email protected]>
* interp.c: implement stind.*, ldind.*, ldloca.s opcodes.
	Provide better tracing with DEBUG_INTERP.

svn path=/trunk/mono/; revision=357
2001-07-31 18:26:51 +00:00
Paolo Molaro e8d4a08a24 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <[email protected]>
* metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
	cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
	tokentype.h: massive namespace cleanup.

Tue Jul 31 17:52:53 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: massive namespace cleanup.

Tue Jul 31 17:48:11 CEST 2001 Paolo Molaro <[email protected]>

	* dis-cil.c, dis-cil.h, dump.c, dump.h, get.c, get.h, main.c, push-pop.h:
	massive namespace cleanup.
	* main.c: dis_locals() now just strigifies a MonoMethodHeader.

Tue Jul 31 17:45:44 CEST 2001 Paolo Molaro <[email protected]>

	* class.c, cli.h, loader.c: massive namespace cleanup.

svn path=/trunk/mono/; revision=356
2001-07-31 16:06:17 +00:00
Dietmar Maurer de8614b8f1 *** empty log message ***
svn path=/trunk/mono/; revision=355
2001-07-31 13:42:52 +00:00
Dietmar Maurer d08d1ca18b 2001-07-31 Dietmar Maurer <[email protected]>
* cli.h: added pinvoke flags to MonoMethodPInvoke, moved method
	implementation flags to MonoMethod

svn path=/trunk/mono/; revision=354
2001-07-31 13:40:15 +00:00
Dietmar Maurer 8a8a30bebc Dietmar Maurer <[email protected]>
* main.c (pinvoke_flags): impl.

svn path=/trunk/mono/; revision=353
2001-07-31 13:13:01 +00:00
Dietmar Maurer c5a70b766b *** empty log message ***
svn path=/trunk/mono/; revision=352
2001-07-31 13:10:56 +00:00
Garrett Rooney 6da3c2a99f Ego boost commit. Add myself to AUTHORS.
svn path=/trunk/mcs/; revision=351
2001-07-31 13:05:42 +00:00
Garrett Rooney 6ab3b5b5f8 *Stack.cs: Clone() doesn't need to check if it's synchronized, since
we override it in SyncStack anyway.

*Stack.cs: Pop() now shrinks the array if we drop below 1/4 full, to
avoid using massive amounts of memory that are not necessary.  We only
drop to half the current size, which i hope will avoid the 'ping-pong'
effect.

*Stack.cs: SyncStack.IsReadOnly should return stack.IsReadOnly
instead of just returning false, since we may have a ReadOnly wrapper
in the future (although i can't imagine why).  Thanks to David
Menestrina <[email protected]> for pointing this out.

svn path=/trunk/mcs/; revision=350
2001-07-31 12:51:28 +00:00
Marcin Szczepanski 6b0503acb3 Add test cases for System.IO.Path These might need to be fleshed out
a bit to deal with more complex scenarios, but as is they cover most of
the functions to some extent.

svn path=/trunk/mcs/; revision=349
2001-07-31 07:57:51 +00:00
Miguel de Icaza ecf8515a0f Flush
svn path=/trunk/mono/; revision=348
2001-07-31 01:56:13 +00:00
Miguel de Icaza 7377cbc403 Flush
svn path=/trunk/mono/; revision=347
2001-07-31 01:53:03 +00:00
Miguel de Icaza bfc0820e28 Some details fixed, but Queue does not work
svn path=/trunk/mcs/; revision=346
2001-07-31 00:59:58 +00:00
Miguel de Icaza 6073d77a9c Add Queue class from Ricardo Fernandez
svn path=/trunk/mcs/; revision=345
2001-07-31 00:53:21 +00:00
Paolo Molaro f2fde84b45 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <[email protected]>
* metadata.h, metadata.c: decode exception clauses when parsing method header.

Mon Jul 30 20:08:37 CEST 2001 Paolo Molaro <[email protected]>

	* dis-cil.c, dis-cil.h, main.c: changes to disassemble also
	the information about try/catch/finally blocks.

Mon Jul 30 20:05:23 CEST 2001 Paolo Molaro <[email protected]>

	* cli.h, loader.c: usa a char *name field in MonoMethod instead
	of the name_idx token.

Mon Jul 30 20:09:58 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: update to use mono_method->name.

svn path=/trunk/mono/; revision=344
2001-07-30 18:17:11 +00:00
Miguel de Icaza 637f7a9220 Mono 0.5
svn path=/trunk/mono/; revision=342
2001-07-30 00:23:41 +00:00
Miguel de Icaza 51a41340c6 Flush
svn path=/trunk/mono/; revision=341
2001-07-29 23:58:17 +00:00
Miguel de Icaza f22591bb38 Revert Tigert's change, because it breaks IE
svn path=/trunk/mono/; revision=340
2001-07-29 22:42:55 +00:00
Miguel de Icaza 31df0b838f CVS doc update + Maintainers update
svn path=/trunk/mono/; revision=339
2001-07-29 04:50:15 +00:00
Miguel de Icaza 5a8d2bbd2c Documentation update, plus cvs docs
svn path=/trunk/mono/; revision=338
2001-07-28 17:45:16 +00:00
Miguel de Icaza 52214d0f8a Flush
svn path=/trunk/mono/; revision=337
2001-07-27 22:57:52 +00:00
Paolo Molaro 7e1f2cb2d6 Fri Jul 27 20:51:47 CEST 2001 Paolo Molaro <[email protected]>
* class.h, class.c: add inited field to MonoClass.

Fri Jul 27 20:54:00 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: start implementing callvirt. Classes with
	class constructors are properly initialized when needed.
	Fix error introduced in version 1.17.

svn path=/trunk/mono/; revision=336
2001-07-27 19:05:30 +00:00
Paolo Molaro 044dc4073b D'oh, forgot to actually commit my previous changes.
Fri Jul 27 14:03:19 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: implement static field loading and storing.

Fri Jul 27 13:51:11 CEST 2001 Paolo Molaro <[email protected]>

	* class.h, class.c: add a class_size member to MonoClass. We store
	the static fields after the other class data. Offsets for static
	fields are offsets from the MonoClass pointer.
	Properly initialize class->instance_size and deal with static
	fields when layouting them.

svn path=/trunk/mono/; revision=333
2001-07-27 15:48:34 +00:00
Dietmar Maurer a1bbd38c28 *** empty log message ***
svn path=/trunk/mono/; revision=332
2001-07-27 15:17:59 +00:00
Miguel de Icaza 5d9e9cbeec TODO
svn path=/trunk/mcs/; revision=331
2001-07-27 13:56:06 +00:00
Miguel de Icaza a4b6322ed4 2001-07-26 Miguel de Icaza <[email protected]>
* cs-parser.jay: Add a second production for delegate_declaration
	with `VOID'.

	(enum_body): Put an opt_comma here instead of putting it on
	enum_body or enum_member_declarations so we can handle trailing
	commas on enumeration members.  Gets rid of a shift/reduce.

	(type_list): Need a COMMA in the middle.

	(indexer_declaration): Tell tokenizer to recognize get/set

	* Remove old targets.

	* Re-add the parser target.

svn path=/trunk/mcs/; revision=330
2001-07-27 13:51:10 +00:00
Miguel de Icaza b82c9bc4b1 Updated
svn path=/trunk/mono/; revision=329
2001-07-27 13:50:46 +00:00
Paolo Molaro 794af1025b Fri Jul 27 11:46:09 CEST 2001 Paolo Molaro <[email protected]>
* loader.c: implemented lookup of methods in a different MonoImage
	(needed to call the Syste.Object constructor, for example). Fixed the cache
	code to only check for methods defined in the image.

Fri Jul 27 11:49:19 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: Removed some debugging printouts. Made stackval_to_data
	static. Handle also instance methods in CALL opcode. Fix ret to properly
	deal with void functions. Fixed constructor to leave the object on
	the stack.

svn path=/trunk/mono/; revision=328
2001-07-27 10:53:38 +00:00
Paolo Molaro 2afbf3642f Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <[email protected]>
* metadata.h, row_indexes.h: added header with enumerations to use
	to index in the columns from tables in metadata and to decode coded
	tokens: we should start using this instead of embedding magic numbers
	all over the code.

svn path=/trunk/mono/; revision=327
2001-07-26 17:17:40 +00:00
Paolo Molaro 8525a9e126 Thu Jul 26 15:31:01 CEST 2001 Paolo Molaro <[email protected]>
* loader.c: forgot to insert the method in the cache, not nice
	with a recursive fibonacci test case :-)

svn path=/trunk/mono/; revision=326
2001-07-26 13:32:29 +00:00
Paolo Molaro a3aba01b57 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <[email protected]>
* assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
	Move metadata_t info from cli_image_info_t to MonoImage, where
	it's easily accessible. Changed all the uses accordingly.
	Added the method and class caches to MonoImage.
	* metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
	and mono_metadata_decode_value () signature to be more consistent
	with the other parse functions (and simplify code). Taken advantage
	of zero-length array allocation with GCC. Removed reduntant (and
	wrong) MonoFieldType struct and use MonoParam instead. Changed
	mono_metadata_parse_field_type () to use common code for parsing.
	Added mono_metadata_typedef_from_field () and
	mono_metadata_typedef_from_method () to lookup a typedef index from a
	field or method token.
	Pack the MonoRetType structure more tightly (fits in 8 bytes now).

Thu Jul 26 13:17:22 CEST 2001 Paolo Molaro <[email protected]>

	* class.c: updates to match changes in metadata.
	Fix off by one errors. Implement creation of classes by typeref.
	Remove custom cache and use the class cache in MonoImage.
	* cli.h, loader.c: add MonoImage field to MonoMethod. Fill method cache
	in MonoImage. Updates to match changes in metadata.

Thu Jul 26 13:22:28 CEST 2001 Paolo Molaro <[email protected]>

	* dis-cil.c, dump.c, get.c, main.c: updates to match changes in metadata.
	Removed dead code.

Thu Jul 26 13:24:51 CEST 2001 Paolo Molaro <[email protected]>

	* interp.c: ves_exec_method () doesn't take a MonoImage arg
	anymore. Use the method cache in MonoImage. Updates to
	mache recent changes in metadata.
	Fix newobj code to use new metadata features. Call the class
	constructor after allocationg the object. Implemented load field
	and store field opcodes (the support functions need to be finished).

svn path=/trunk/mono/; revision=325
2001-07-26 11:51:50 +00:00
Miguel de Icaza 630ce00c86 does not compile yet
svn path=/trunk/mcs/; revision=324
2001-07-25 21:20:16 +00:00
Miguel de Icaza a4279f3803 Add SortedList contirbution
svn path=/trunk/mcs/; revision=323
2001-07-25 21:14:59 +00:00
Miguel de Icaza 2c94aa3c7a Add NameValueCollection contribution
svn path=/trunk/mcs/; revision=322
2001-07-25 21:09:54 +00:00
Tuomas Kuosmanen 53dcde3453 In an attempt to fix the broken-on-mozilla links that get overlapped by the
text, I changed the main links a bit, so they are now pretty orange when
you mouseover them.

Turned out the thing was a mozilla bug afterwards, though the new color
stuff looks pretty cute, so I left it in.

Doh.

Tuomas

svn path=/trunk/mono/; revision=321
2001-07-25 07:30:59 +00:00
Miguel de Icaza 99f0f65965 2001-07-24 Derek Holden <[email protected]>
* NumberStyles.cs: Added ECMA values for Allow types and default
	styles.
2001-07-24  Derek Holden  <[email protected]>

	* Boolean.cs: Formatted to code style standard. Added GetTypeCode
	which is really an IConvertible defined method.

	* Byte.cs: Added a missing Parse method. Put in Parse and ToString
	behavior, still need to do the main Parse and ToString.

	* Char.cs: Added a bunch of missing ECMA methods. Commented a
	specification discrepency. Still didn't any unicode stuff, though
	every IsFoo(char c) method has an IsFoo(string, index)
	counterpart, added wrappers for those.

	* Convert.cs: Fixed NaN/Inf checking and double/float
	rounding. Added ToType for IConvertible classes

	* Double.cs: Fixed ECMA min and max values. Added IsInfinity /
	IsNaN methods. Changed Inf/NaN internals.

	* IConvertible.cs: Added comments for using
	Convert.ToType. Changed return values to draft base values.

	* Int16.cs: Added a missing Parse statement. Put in behavior for
	overloaded ToString and Parse methods.

	* Int32.cs: Added a missing Parse statement. Put in behavior for
	overloaded ToString and Parse methods.

	* Int64.cs: Added a missing Parse statement. Put in behavior for
	overloaded ToString and Parse methods.

	* Single.cs: Put in ECMA epsilon value. Added IsInfinity / IsNaN
	methods. Changed Inf/NaN internals.

	* SByte.cs: Added a missing Parse method. Put in Parse and
	ToString behavior, still need to do the main Parse and ToString.

	* UInt16.cs: Added a missing Parse statement. Put in behavior for
	overloaded ToString and Parse methods.

	* UInt32.cs: Added a missing Parse statement. Put in behavior for
	overloaded ToString and Parse methods.

	* UInt64.cs: Added a missing Parse statement. Put in behavior for
	overloaded ToString and Parse methods.

svn path=/trunk/mcs/; revision=320
2001-07-25 05:15:40 +00:00
Miguel de Icaza 1a95ed2365 Class
svn path=/trunk/mono/; revision=319
2001-07-24 17:34:41 +00:00
Miguel de Icaza 9129c087c9 updated classes
svn path=/trunk/mono/; revision=318
2001-07-24 17:25:32 +00:00
Paolo Molaro 9f391f06f7 missing file.
svn path=/trunk/mono/; revision=317
2001-07-24 16:07:13 +00:00
Paolo Molaro e2f5d94b4d Tue Jul 24 16:51:09 CEST 2001 Paolo Molaro <[email protected]>
* interp.c, hacks.h: moved a few ugly macros out of the code.
	Implemented switch opcode.

svn path=/trunk/mono/; revision=316
2001-07-24 16:06:38 +00:00
Miguel de Icaza 15ce719fae 2001-07-24 Miguel de Icaza <[email protected]>
* class.c (mono_class_create_from_typedef): Take into account
	parent classes for the size of a structure.

	Still not ideal, but better than before.

	For the case of the interpreter, Paolo is right, there is not much
	use for a Field Map, as the way the Fields are located is through
	a token.

	(mono_class_init): Remove, initialize automatically.

	(mono_class_get_field): new function, returns the information
	about a field given a class and its token.

2001-07-23  Miguel de Icaza  <[email protected]>

	* interp.c (newobj): Added function to handle newobj opcode.

2001-07-23  Miguel de Icaza  <[email protected]>

	* metadata.c (mono_metadata_parse_field_type): Implement.
	(do_mono_metadata_parse_type): Split engine from
	mono_metadata_parse_type, so that we can create smaller structures
	for things that just have one pointer to the MonoType (look at
	the MonoFieldType)

svn path=/trunk/mono/; revision=315
2001-07-24 06:58:04 +00:00
Miguel de Icaza f9b4f1d807 Updates
svn path=/trunk/mono/; revision=314
2001-07-24 04:56:42 +00:00
Miguel de Icaza 644ddb6663 2001-07-23 Sergey Chaban <[email protected]>
*  Hashtable.cs: Fixed bug in Clear(), the Count wasn't zeroed.
           From now, Clear() increases modification count.
           Fixed HCP bug in GetHash(object) - hcp.GetHashCode() was used
           instead of hcp.GetHashCode(key). This was resulted in the
           insanely long lookup times when HashCodeProvider was used to
           construct Hashtable. Added thread-safe wrapper.

svn path=/trunk/mcs/; revision=313
2001-07-24 04:54:27 +00:00
Miguel de Icaza 3cbb51830a 2001-07-23 Miguel de Icaza <[email protected]>
* interp.c (newobj): Added function to handle newobj opcode.

2001-07-23  Miguel de Icaza  <[email protected]>

	* object.h, object.c, class.h, class.c: Implemented the beginning
	of the object system. x

2001-07-23  Miguel de Icaza  <[email protected]>

	* metadata.c (mono_metadata_parse_field_type): Implement.
	(do_mono_metadata_parse_type): Split engine from
	mono_metadata_parse_type, so that we can create smaller structures
	for things that just have one pointer to the MonoType (look at
	the MonoFieldType)

svn path=/trunk/mono/; revision=312
2001-07-23 23:54:34 +00:00
Miguel de Icaza 1ebef995ee Reorganization
svn path=/trunk/mono/; revision=289
2001-07-23 04:30:21 +00:00
Miguel de Icaza 8c415b9652 Flushety flush
svn path=/trunk/mono/; revision=288
2001-07-22 03:59:57 +00:00
Chema Celorio 1b23214ad3 fix a typo s/gnome-config/monodis
svn path=/trunk/mono/; revision=287
2001-07-21 08:42:36 +00:00
Miguel de Icaza bf9b40d503 Flushage
svn path=/trunk/mcs/; revision=286
2001-07-21 03:50:13 +00:00
Miguel de Icaza 75800470b0 Flush
svn path=/trunk/mono/; revision=285
2001-07-21 03:43:14 +00:00
Miguel de Icaza 70a513e889 Update README
svn path=/trunk/mono/; revision=284
2001-07-21 02:00:36 +00:00
Miguel de Icaza 8dd5362cd5 More contributors
svn path=/trunk/mono/; revision=283
2001-07-20 23:41:59 +00:00
Miguel de Icaza b7feffe294 2001-07-20 Miguel de Icaza <[email protected]>
* metadata.c (mono_metadata_parse_mh): Correct the implementation,
	as Jan Gray found out, it is incorrect.

svn path=/trunk/mono/; revision=282
2001-07-20 20:27:48 +00:00
Miguel de Icaza 7c4a24533e Commit
svn path=/trunk/mcs/; revision=281
2001-07-20 19:38:02 +00:00
Miguel de Icaza d54ab5c35b More
svn path=/trunk/mono/; revision=280
2001-07-20 19:25:31 +00:00
Miguel de Icaza 86d29a8406 More
svn path=/trunk/mono/; revision=279
2001-07-20 19:23:21 +00:00
Miguel de Icaza a20f123a6d Add more classes
svn path=/trunk/mcs/; revision=278
2001-07-20 19:19:46 +00:00
Miguel de Icaza 074fa6d0ff Oopsety
svn path=/trunk/mono/; revision=277
2001-07-20 18:34:26 +00:00
Miguel de Icaza 0a99fb8a57 Wooohooo! System.Web.Cache from Patrick!
svn path=/trunk/mcs/; revision=276
2001-07-20 17:48:40 +00:00
Miguel de Icaza a4d35f7ec9 Flush
svn path=/trunk/mono/; revision=275
2001-07-20 16:16:45 +00:00
Miguel de Icaza ced4972289 PUsh
svn path=/trunk/mono/; revision=274
2001-07-20 16:16:14 +00:00
Miguel de Icaza 8030ee68e4 Just one extra bit
svn path=/trunk/mono/; revision=267
2001-07-20 06:28:35 +00:00
Miguel de Icaza 9eaf726688 Perform nested assembly loading. Use assembly loading instead of
image loading.

svn path=/trunk/mono/; revision=266
2001-07-20 06:23:55 +00:00
Tuomas Kuosmanen aab87ccda7 Added the TM to the mono logo, also moved it a bit to the left.
/tigert

svn path=/trunk/mono/; revision=265
2001-07-20 05:10:37 +00:00
Miguel de Icaza cb9e7419be Add Mono files
svn path=/trunk/mcs/; revision=264
2001-07-20 05:02:47 +00:00
Miguel de Icaza ed9ec7475a Commit new files, almost compiles with /nostdlib
svn path=/trunk/mcs/; revision=263
2001-07-20 04:54:58 +00:00
Miguel de Icaza 5db9f4c938 Got enumerations to work!
svn path=/trunk/mcs/; revision=262
2001-07-20 02:31:25 +00:00
Miguel de Icaza 4519dd4972 Enumerations from Michael Lambert
svn path=/trunk/mcs/; revision=261
2001-07-20 02:25:33 +00:00
Jeffrey Stedfast da5ea45637 2001-07-19 Jeffrey Stedfast <[email protected]>
* Char.cs: Made ToUpper and ToLower public methods.

	* String.cs: Lots and lots of compile fixes - just need to write
	DateTime.cs and this should build completely now.

svn path=/trunk/mcs/; revision=260
2001-07-20 02:17:59 +00:00
Miguel de Icaza ce407bb9e8 Flush
svn path=/trunk/mcs/; revision=259
2001-07-20 02:02:23 +00:00
Miguel de Icaza df52d0d6f9 Fixes
svn path=/trunk/mono/; revision=258
2001-07-20 01:32:46 +00:00
Miguel de Icaza eac858025b 2001-07-19 Bob Smith ([email protected])
* Math.cs: Implemented.

svn path=/trunk/mcs/; revision=257
2001-07-20 01:30:32 +00:00
Miguel de Icaza f9ef817353 flush
svn path=/trunk/mono/; revision=256
2001-07-20 01:07:03 +00:00
Miguel de Icaza 5090da62b5 *** empty log message ***
svn path=/trunk/mcs/; revision=255
2001-07-20 00:50:39 +00:00
Miguel de Icaza 08fc57666c *** empty log message ***
svn path=/trunk/mcs/; revision=254
2001-07-20 00:49:13 +00:00
Miguel de Icaza ea46dbef94 Add Byte, Char, Double, SByte, Single
svn path=/trunk/mcs/; revision=253
2001-07-20 00:37:51 +00:00
Miguel de Icaza 38fc0b7e52 Flush:
svn path=/trunk/mono/; revision=252
2001-07-19 23:46:41 +00:00
Miguel de Icaza c08e245ba4 2001-07-19 Duco Fijma ([email protected])
* TimeSpan.cs: New implementation.

svn path=/trunk/mcs/; revision=251
2001-07-19 23:46:16 +00:00
Miguel de Icaza 1dfd3f149b more classes
svn path=/trunk/mono/; revision=250
2001-07-19 23:31:14 +00:00
Miguel de Icaza 7d1ca46e56 Doc
svn path=/trunk/mono/; revision=249
2001-07-19 23:31:08 +00:00
Miguel de Icaza efb1694a28 UPdate
svn path=/trunk/mcs/; revision=248
2001-07-19 21:22:28 +00:00
Miguel de Icaza fab4b76caf UPdate
svn path=/trunk/mono/; revision=247
2001-07-19 20:54:25 +00:00
Miguel de Icaza 20e0bdccf7 Build two libraries for corlib
svn path=/trunk/mcs/; revision=246
2001-07-19 20:06:30 +00:00
Miguel de Icaza f8a7e2e43a 2001-07-19 Marcin Szczepanski <[email protected]>
* System.IO.MemoryStream.cs: Added.  Had quite a few cases of
	"LAMESPEC", but the tests work against the MS implementation so
	the major functions are right (ie. Read/Write/Seek).  Some more
	tests required for the various constructors and exceptions.

svn path=/trunk/mcs/; revision=245
2001-07-19 20:05:24 +00:00
Miguel de Icaza 44f9f53049 MemoryStream implementation from Marcin
svn path=/trunk/mcs/; revision=244
2001-07-19 20:04:24 +00:00
Miguel de Icaza 82ead61c46 Fix
svn path=/trunk/mcs/; revision=243
2001-07-19 20:02:00 +00:00
Miguel de Icaza c6315db4f2 More contributions
svn path=/trunk/mcs/; revision=242
2001-07-19 20:00:18 +00:00
Miguel de Icaza c9a179253e 2001-07-17 John Barnette <[email protected]>
* StringCollection.cs:
		Implemented and working according to spec.
	* StringIterator.cs:
		(ADDED) Implemented and working according to spec.
	* StringCollectionTest.cs:
		(ADDED) Initial revision contains 17 tests; all of 'em
		run correctly.  More complicated tests to follow.

svn path=/trunk/mcs/; revision=241
2001-07-19 19:44:01 +00:00
Miguel de Icaza 5f74e488d7 Add StrinEnumerator.cs and StringCollection.cs
svn path=/trunk/mcs/; revision=240
2001-07-19 19:43:32 +00:00
Miguel de Icaza 6c1e7d54f6 flush
svn path=/trunk/mono/; revision=239
2001-07-19 19:36:31 +00:00
Miguel de Icaza f9731130a0 More XML work
svn path=/trunk/mcs/; revision=238
2001-07-19 19:21:59 +00:00
Miguel de Icaza d1064be6fc Add cvsignore
svn path=/trunk/mcs/; revision=237
2001-07-19 19:12:32 +00:00
Miguel de Icaza ae13bcc209 Make compile
svn path=/trunk/mcs/; revision=236
2001-07-19 19:11:57 +00:00
Miguel de Icaza 1f57f2aefe Update
svn path=/trunk/mono/; revision=235
2001-07-19 18:54:11 +00:00
Miguel de Icaza 27cc06c335 Update for Sergey
svn path=/trunk/mcs/; revision=234
2001-07-19 18:48:56 +00:00
Miguel de Icaza da65ba8477 2001-07-18 Miguel de Icaza <[email protected]>
* assembly.c: Implement asssembly loading.  This loads an image
	and loads all the referenced assemblies.  Come to think of it, we
	could always do lazy loading of the assemblies.

	* image.c (mono_image_open): Keep loaded images in a hashtable.

	* image.h (MonoImage): Add reference count.

svn path=/trunk/mono/; revision=233
2001-07-19 02:06:21 +00:00
Miguel de Icaza 4e9bf00c8b *** empty log message ***
svn path=/trunk/mcs/; revision=232
2001-07-19 01:14:32 +00:00
Miguel de Icaza e565ef3cf4 Flushage
svn path=/trunk/mono/; revision=231
2001-07-19 00:51:23 +00:00
Miguel de Icaza 3370b81664 Fix
svn path=/trunk/mono/; revision=230
2001-07-19 00:50:27 +00:00
Miguel de Icaza 1890ca523a More updates
svn path=/trunk/mono/; revision=229
2001-07-19 00:41:46 +00:00
Miguel de Icaza 370d1051c9 ChangeLog
svn path=/trunk/mcs/; revision=228
2001-07-19 00:39:16 +00:00
Miguel de Icaza c006e942cd New version of BitArray
svn path=/trunk/mcs/; revision=227
2001-07-19 00:38:57 +00:00
Jeffrey Stedfast 7ba0609a3f 2001-07-17 Jeffrey Stedfast <[email protected]>
* String.cs (IndexOf): Slight optimization that allows skipping
	over a few chars here and there. This isn't as good as using my
	Boyer-Moore implementation, however, Boyer-Moore is only really
	good for long strings (I plan on making the code decide which
	string search algorithm it should use on-the-fly at some point).
	(LastIndexOf): Fix to work correctly.
	(BoyerMoore): Took out some unneeded code and fixed an edge-case.

svn path=/trunk/mcs/; revision=226
2001-07-18 20:52:10 +00:00
Miguel de Icaza cd5b27470d Update
svn path=/trunk/mono/; revision=225
2001-07-18 20:09:38 +00:00
Miguel de Icaza 5ffbfe9aff 2001-07-18 Miguel de Icaza <[email protected]>
* IDictionary.cs (Collections): IDictionary implements ICollection
	as well.  Thanks Sergey!

svn path=/trunk/mcs/; revision=224
2001-07-18 19:49:19 +00:00
Miguel de Icaza 950795ac2a 2001-07-17 David Menestrina <[email protected]>
* Added implementation of BitArray.

svn path=/trunk/mcs/; revision=223
2001-07-18 18:17:55 +00:00
Miguel de Icaza 0c8294b691 Flush
svn path=/trunk/mono/; revision=222
2001-07-18 04:35:45 +00:00
Miguel de Icaza f2a3141efd Add shared Common Language Infrastructure directory
svn path=/trunk/mono/; revision=221
2001-07-18 04:34:41 +00:00
Miguel de Icaza 1b0c8991e2 Renamed MonoAssembly to MonoImage to reflect better reality
svn path=/trunk/mono/; revision=220
2001-07-18 04:33:51 +00:00
Miguel de Icaza 74e1498136 2001-07-18 Miguel de Icaza <[email protected]>
* interp.c (ves_exec_method): Make the interpreter abort with more
	information than it currently does.

	Enable the slow processor, as it is easier to debug.

svn path=/trunk/mono/; revision=219
2001-07-18 04:32:29 +00:00
Miguel de Icaza 6ea509c10d 2001-07-17 Miguel de Icaza <[email protected]>
* metadata.h: Fixed Paolo's quick hack.  Put the documnentation
	from get.c here.

2001-07-17  Miguel de Icaza  <[email protected]>

	* main.c (usage): Print out all the arguments.

	* get.c, main.c, dump.c: Remove `expand', `get_encoded_value',
	`get_blob_encoded_size' and replaced with the proper functions
	from metadata.c

:

svn path=/trunk/mono/; revision=218
2001-07-18 02:48:19 +00:00
Miguel de Icaza d2bbe69ce9 release 17
svn path=/trunk/mono/; revision=217
2001-07-18 00:45:44 +00:00
Miguel de Icaza 5fddaa130d Add .src files
svn path=/trunk/mcs/; revision=215
2001-07-18 00:28:32 +00:00
Miguel de Icaza a6e4a33c8d Compile
svn path=/trunk/mcs/; revision=214
2001-07-18 00:28:00 +00:00
Miguel de Icaza f1d8c30e0c Update .cvsinogre
svn path=/trunk/mono/; revision=213
2001-07-17 23:55:10 +00:00
Miguel de Icaza 6757939478 More classes contributed
svn path=/trunk/mono/; revision=212
2001-07-17 23:50:31 +00:00
Miguel de Icaza df4c7333d1 Fixes from the Linux machine
svn path=/trunk/mono/; revision=211
2001-07-17 23:49:53 +00:00
Miguel de Icaza 21032d6471 System.Configuration.Assemblies contributions
svn path=/trunk/mcs/; revision=210
2001-07-17 23:46:03 +00:00
Miguel de Icaza 732aad5b3c Add Hashtable
svn path=/trunk/mcs/; revision=209
2001-07-17 23:11:25 +00:00
Miguel de Icaza bb3b9ee4a8 Flush
svn path=/trunk/mono/; revision=208
2001-07-17 22:58:45 +00:00
Miguel de Icaza 85c1bd5a40 changes
svn path=/trunk/mono/; revision=207
2001-07-17 22:44:39 +00:00
Miguel de Icaza 29bb08eef1 2001-07-17 Miguel de Icaza <[email protected]>
* tree.cs: moved IGenerator interface and renamed it to ITreeDump
	and put it here.

	Get rid of old crufty code.

	* rootcontext.cs: Use this to keep track of the parsed
	representation and the defined types available to the program.

	* gen-treedump.cs: adjust for new convention.

	* type.cs: Split out the type manager, and the assembly builder
	from here.

	* typemanager.cs: the type manager will live here now.

svn path=/trunk/mcs/; revision=206
2001-07-17 22:36:02 +00:00
Miguel de Icaza 4307dfe19b Update
svn path=/trunk/mono/; revision=205
2001-07-17 22:16:29 +00:00
Miguel de Icaza d0816bbaf5 Flush
svn path=/trunk/mono/; revision=204
2001-07-17 22:05:04 +00:00
Sean MacIsaac 572b585623 Updates need to push class status info to web pages.
svn path=/trunk/mono/; revision=203
2001-07-17 21:55:28 +00:00
Miguel de Icaza 6df61cf597 Flush
svn path=/trunk/mono/; revision=202
2001-07-17 20:19:34 +00:00
Sean MacIsaac 1c6a95d5c5 * ByNamespace.xsl: removed bug for improper handling of namespace.
eg System.Collections.Blah was showing up in System list.

svn path=/trunk/mono/; revision=201
2001-07-17 17:07:02 +00:00
Miguel de Icaza 1810099995 More classes
svn path=/trunk/mcs/; revision=200
2001-07-17 16:19:12 +00:00
Miguel de Icaza e9eac38d6d Add more files
svn path=/trunk/mcs/; revision=199
2001-07-17 16:14:11 +00:00
Miguel de Icaza 23694e8df9 Add code for System.Diagnostics
svn path=/trunk/mcs/; revision=198
2001-07-17 16:13:07 +00:00
Miguel de Icaza fa43078dab Flush
svn path=/trunk/mono/; revision=197
2001-07-17 06:06:40 +00:00
Miguel de Icaza 1d138da62c Pushety push
svn path=/trunk/mono/; revision=196
2001-07-17 06:04:00 +00:00
Miguel de Icaza 698c69f4f3 Add Stack.cs
svn path=/trunk/mcs/; revision=195
2001-07-17 05:45:59 +00:00
Miguel de Icaza 6d5b30bc68 Flush
svn path=/trunk/mono/; revision=194
2001-07-17 05:42:01 +00:00
Miguel de Icaza f182491301 flush
svn path=/trunk/mono/; revision=193
2001-07-17 05:26:15 +00:00
Miguel de Icaza e268c79ca9 More contributors
svn path=/trunk/mono/; revision=192
2001-07-17 04:18:02 +00:00
Miguel de Icaza bc07f59304 More volunteers! YAY!
svn path=/trunk/mono/; revision=191
2001-07-16 22:45:05 +00:00
Miguel de Icaza 4c395b4418 Update it
svn path=/trunk/mono/; revision=190
2001-07-16 22:40:28 +00:00
Miguel de Icaza 20884f6d29 Update to the site
svn path=/trunk/mono/; revision=189
2001-07-16 22:34:44 +00:00
Miguel de Icaza a8c250b215 Update maintainers
svn path=/trunk/mono/; revision=188
2001-07-16 22:34:18 +00:00
Miguel de Icaza d069c98174 Make it compile
svn path=/trunk/mcs/; revision=187
2001-07-16 22:31:13 +00:00
Miguel de Icaza ac9aaea8d4 Source files
svn path=/trunk/mcs/; revision=186
2001-07-16 22:25:35 +00:00
Miguel de Icaza b00d04aaa4 Add new files
svn path=/trunk/mcs/; revision=185
2001-07-16 22:02:05 +00:00
Miguel de Icaza 4dc202d35e 2001-07-16 Marcin Szczepanski <[email protected]>
* StringReader.cs, StringWriter.cs, TextReader.cs, TextWriter.cs:
	New class implemenations.

	* StringReaderTest.cs, StringWriterTest.cs: Test suite for the above.

2001-07-16  Marcin Szczepanski <[email protected]>

	* StringBuilder.cs (Text): Fixed.

	* StringBuilderTest.cs: Implement Test suite.

svn path=/trunk/mcs/; revision=184
2001-07-16 22:01:34 +00:00
Miguel de Icaza c62ebf3662 2001-07-16 Miguel de Icaza <[email protected]>
* Version.cs: Remove my buggy comment.

svn path=/trunk/mcs/; revision=183
2001-07-16 20:28:41 +00:00
Sean MacIsaac dace380b08 * class.xml: added all classes from corlib.
* maintainers.xml: maintainers from corlib.

svn path=/trunk/mono/; revision=182
2001-07-16 09:30:20 +00:00
Sean MacIsaac a43966b183 Typos in comments.
svn path=/trunk/mcs/; revision=181
2001-07-16 09:21:28 +00:00
Sean MacIsaac 2bfb6c885d * ByNamespace.xsl: Needed by ByNamespace.cs.
* ByNamespace.cs: Generates html by namespace..

* ByMaintainer.xsl: Needed by ByMaintainer.cs.

* ByMaintainer.cs: Generates html by maintainer.

* class.xml: Class maintainers go here.

* maintainers.xml: Only maintaining email/name pairs here.

* compare-assembly.cs: Started refactoring to give what Migee
wants.

svn path=/trunk/mono/; revision=180
2001-07-16 08:11:12 +00:00
Miguel de Icaza dd1f100f5c 2001-07-15 Miguel de Icaza <[email protected]>
* main.c (dis_code): Only display .entrypoint when we are dealing
	with a module that contains an entry point.  This removes a bunch
	of warnings for .dll dumping

svn path=/trunk/mono/; revision=179
2001-07-16 03:20:23 +00:00
Sean MacIsaac ef1fdf5b8b * status/compare-assembly.cs: basedir should be there if
parameters are provided.

* status/makefile: made targets to dump info.

svn path=/trunk/mono/; revision=178
2001-07-16 03:00:31 +00:00
Miguel de Icaza ccb226ef75 more contributors
svn path=/trunk/mono/; revision=177
2001-07-16 02:45:22 +00:00
Miguel de Icaza 7417a4d8e4 Update
svn path=/trunk/mono/; revision=176
2001-07-16 02:39:13 +00:00
Miguel de Icaza a5a212f642 0.4
svn path=/trunk/mono/; revision=174
2001-07-16 02:06:13 +00:00
Miguel de Icaza 5d709bcdb5 Add release notes
svn path=/trunk/mono/; revision=173
2001-07-16 02:01:00 +00:00
Miguel de Icaza 70ece6c4a0 Flushage
svn path=/trunk/mono/; revision=172
2001-07-16 01:50:36 +00:00
Miguel de Icaza 405dc3ea6c Add System.XML
svn path=/trunk/mcs/; revision=170
2001-07-16 01:07:36 +00:00
Miguel de Icaza 39a57ed2e5 Add .cvsignore
svn path=/trunk/mono/; revision=169
2001-07-16 00:49:43 +00:00
Miguel de Icaza 57def253ae Build doc directory
svn path=/trunk/mono/; revision=168
2001-07-16 00:49:19 +00:00
Miguel de Icaza 3bc2a24a3a Flush
svn path=/trunk/mono/; revision=167
2001-07-16 00:46:46 +00:00
Miguel de Icaza 92f0a06788 Flush
svn path=/trunk/mono/; revision=166
2001-07-16 00:45:31 +00:00
Miguel de Icaza ba11592b2c John
svn path=/trunk/mono/; revision=165
2001-07-15 22:03:51 +00:00
Miguel de Icaza 0992611bf0 Add spaces
svn path=/trunk/mono/; revision=164
2001-07-15 21:57:26 +00:00
Joe Shaw 800c8c64cf Flush. Add comments about IList
svn path=/trunk/mcs/; revision=163
2001-07-15 20:45:16 +00:00
Joe Shaw b529037728 Added some info about System.Array
svn path=/trunk/mcs/; revision=162
2001-07-15 20:41:19 +00:00
Joe Shaw 7404b2e846 2001-07-15 Joe Shaw <[email protected]>
* configure.in: Don't create doc/Makefile as there's nothing there
	to make.

	* Makefile.am: Don't build the doc directory because there's no
	Makefile.am there.

svn path=/trunk/mono/; revision=161
2001-07-15 20:33:14 +00:00
Joe Shaw cfc2593d84 2001-07-15 Joe Shaw <[email protected]>
* autogen.sh: Call aclocal with the $ACLOCAL_FLAGS env var.

svn path=/trunk/mono/; revision=160
2001-07-15 20:30:07 +00:00
Miguel de Icaza a84f29dc6d Flush documentation changes, and update maintainers
svn path=/trunk/mono/; revision=159
2001-07-15 18:59:26 +00:00
Miguel de Icaza 2abd9a70e2 Flush documentation changes, and update maintainers
svn path=/trunk/mono/; revision=158
2001-07-15 18:57:59 +00:00
Paolo Molaro f462287294 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <[email protected]>
* metadata.c, metadata.h: decode local vars in method header
	parse function. Change callers accordingly.

svn path=/trunk/mono/; revision=157
2001-07-15 17:41:25 +00:00
Paolo Molaro e0a57962b1 Sun Jul 15 17:50:23 CEST 2001 Paolo Molaro <[email protected]>
* Started changelog.
	* interp.c: use new mono_get_method () function to get the complete
	info on a method invocation: we support now method invocation with
	multiple (or zero) simple arguments and with or without a return value.
	Implement also a couple more opcodes.

svn path=/trunk/mono/; revision=156
2001-07-15 16:26:06 +00:00
Paolo Molaro ab9d0406da Fix typo and remove debug prints.
svn path=/trunk/mono/; revision=155
2001-07-15 16:25:17 +00:00
Paolo Molaro 8c1647dc82 Sun Jul 15 17:29:10 CEST 2001 Paolo Molaro <[email protected]>
* get.h,get.c: added some dis_stringify_object() functions:
	metadata decoding is now done in libmetadata. Still need to use
	them throughhout the code (and move other decode code to
	metadata). Fix also field decoding (band-aid until we load
	also referenced assemblies).
	* dis/main.c: start using the new routines.

svn path=/trunk/mono/; revision=154
2001-07-15 16:14:11 +00:00
Paolo Molaro c67de2d075 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <[email protected]>
* metadata.h, cil-coff.h: protect against multiple inclusion.
	Added some new structures to hold information decoded from metadata:
	MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
	and relevant decoding/free functions.
	* metadata.c: implement decoding functions. Add warning for out of bounds
	index in mono_metadata_locate(). Implement mono_get_method () to retreive
	all the info about a method signature and invocation. Remove check on
	uninitialized local var in parse_mh() and fix memory leak.

svn path=/trunk/mono/; revision=153
2001-07-15 16:13:54 +00:00
Sean MacIsaac a6ffb6c02a * String.cs: Spelling error of IComparable, object's
MemberwiseClone cannot be overridden.  Made indexer valid for now,
but not sure what to do about this in the long run.  Seems to be a
couple bugs in csc.exe having to do with multiple pointer defs in
the same statement, and returning subclasses of a class in the
return type of an interface function implementation.  Also moved
operators inside of class definition.

svn path=/trunk/mcs/; revision=152
2001-07-15 08:02:44 +00:00
Sean MacIsaac da54cf461f * IDictionary.cs: Clear was clear.
svn path=/trunk/mcs/; revision=151
2001-07-15 07:39:54 +00:00
Sean MacIsaac 9a5ade334f * makefile: added windows and unix targets.
svn path=/trunk/mcs/; revision=150
2001-07-15 05:46:41 +00:00
Sean MacIsaac 3dfc511a33 * StringCollection.cs: Added so that CodeDom.* would compile.
svn path=/trunk/mcs/; revision=149
2001-07-15 05:45:23 +00:00
Sean MacIsaac 1fe22719b1 * MemberAttributes.cs: Added so rest of classes would compile.
* FieldDirection.cs: Added so rest of classes would compile.

* CodeTypeMember.cs: Added so rest of classes would compile.

* CodeTypeDeclaration.cs: Added so rest of classes would compile.

* CodeObject.cs: Added so rest of classes would compile.

* CodeBinaryOperatorType.cs: Added so rest of classes would compile.

svn path=/trunk/mcs/; revision=148
2001-07-15 05:44:59 +00:00
Sean MacIsaac c0d11bde1d * CodeGenerator.cs: moved using statement out of namespace
declaration.

svn path=/trunk/mcs/; revision=147
2001-07-15 05:44:43 +00:00
Sean MacIsaac 6fb3de52cb makefile *.src easy compilation stuff.
svn path=/trunk/mcs/; revision=146
2001-07-15 04:57:07 +00:00
Sean MacIsaac 210c1115e9 Removing uneccessary files.
svn path=/trunk/mcs/; revision=145
2001-07-15 04:27:43 +00:00
Sean MacIsaac abb7a6759f Removing unnecessary files.
svn path=/trunk/mcs/; revision=144
2001-07-15 04:27:10 +00:00
Sean MacIsaac bf879a9795 Changes to the makefiles to allow cleaner builds.
svn path=/trunk/mcs/; revision=143
2001-07-15 04:21:27 +00:00
Jeffrey Stedfast 393b396ebf 2001-07-14 Jeffrey Stedfast <[email protected]>
* String.cs: A tom of compile fixes, although we still don't compile.

	* IConvertible.cs: The To*Int64() methods return *Int64's, not
	*Int32's. Also, it's ToDateTime() not ToDateType().

svn path=/trunk/mcs/; revision=142
2001-07-15 04:11:49 +00:00
Sean MacIsaac a6d6ebabe6 .cvsignore
svn path=/trunk/mcs/; revision=141
2001-07-15 03:37:52 +00:00
Miguel de Icaza 60df095c46 Flushety flush
svn path=/trunk/mcs/; revision=140
2001-07-15 01:02:13 +00:00
Sean MacIsaac 6702db9247 Removed cs-parser.cs, as this is generated by jay
svn path=/trunk/mcs/; revision=139
2001-07-14 23:34:24 +00:00
Sean MacIsaac d021bf6bad Added the jay directory, compiler should be okay now.
svn path=/trunk/mcs/; revision=138
2001-07-14 23:30:42 +00:00
Jeffrey Stedfast 96e6f83423 2001-07-14 Jeffrey Stedfast <[email protected]>
* String.cs: Apparently I needed to at least write stubs for the
	IConvertible interfaces. *sigh*

svn path=/trunk/mcs/; revision=137
2001-07-14 22:55:48 +00:00
Jeffrey Stedfast bf760518ef more logic fixes and some code simplification
svn path=/trunk/mcs/; revision=136
2001-07-14 21:07:13 +00:00
Jeffrey Stedfast fff7bcfca2 2001-07-14 Jeffrey Stedfast <[email protected]>
* String.cs: Many logic/other fixes and better usage of the
	features of c#
	(tolower): New convenience method to help condense code.
	(toupper): Another new helper method.
	(Compare): Use the new helper methods.
	(ToLower): use tolower().
	(ToUpper): use toupper().
	(LastIndexOfAny): Implemented.
	(BoyerMoore): New private helper method that implements a modified
	version of the Boyer-Moore search algorithm. Noothing uses it yet
	as I'm not 100% sure it even works properly with unicode strings
	not to mention it uses a huge lookup-table :-)
	(Split): Implemented.

svn path=/trunk/mcs/; revision=135
2001-07-14 19:22:43 +00:00
Miguel de Icaza 7e002902d5 further web page loving
svn path=/trunk/mono/; revision=134
2001-07-14 19:04:58 +00:00
Miguel de Icaza feef427cdf Update authors
svn path=/trunk/mcs/; revision=133
2001-07-14 18:58:53 +00:00
944 changed files with 92607 additions and 11591 deletions

No files matched your search

+15 -9
View File
@@ -1,11 +1,17 @@
config.h
Makefile
config.cache
stamp-h.in
config.status
aclocal.m4
configure
stamp-h
libtool
Makefile.in
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
libtool
ltmain.sh
ltconfig
Makefile
Makefile.in
mono-*.tar.gz
stamp-h
stamp-h.in
+1
View File
@@ -1 +1,2 @@
Miguel de Icaza ([email protected])
Paolo Molaro ([email protected])
+128
View File
@@ -1,3 +1,131 @@
Mon Sep 10 20:19:00 CEST 2001 Paolo Molaro <[email protected]>
* configure.in: check for sizeof(void*) and for the architecture.
2001-09-05 Dick Porter <[email protected]>
* autogen.sh: Fixed the section that adds $ACLOCAL_FLAGS to the
aclocal invocation, so putting aclocal files in /usr/local works
2001-08-30 Dietmar Maurer <[email protected]>
* *: removed the libffi dependency, mono now compiles on cygwin
* mono/wrapper/build-dll: new file.
2001-08-28 Dietmar Maurer <[email protected]>
* mono/tests/console.cs: impl.
* mono/tests/box.cs: impl.
* mono/tests/stream-writer.cs: impl.
Mon Aug 27 20:24:26 CEST 2001 Paolo Molaro <[email protected]>
* mono/tests/*: New test cases, mostly for virtual method dispatch.
Use make testb for the slow benchmarking programs,
make test for the usual regression test checks.
2001-08-22 Rodrigo Moya <[email protected]>
* mono/cil/Makefile.am:
* mono/wrapper/Makefile.am: use correct variables for installation
directories
Tue Aug 21 18:54:06 CEST 2001 Paolo Molaro <[email protected]>
* mono/tests/exceptions*: enhanced and added more tests for
exceptions.
2001-08-20 Miguel de Icaza <[email protected]>
* mono/Makefile.am (SUBDIRS): Remove `test' from here to allow us
to pass make distcheck
* mono/wrapper/Makefile.am (EXTRA_DIST): Include genwrapper.pl
* configure.in, Makefile.am, runtime/Makefile.am (dist-hook,
install-data-hook): Added mechanism to distribute and install the
dll files.
2001-08-20 Dietmar Maurer <[email protected]>
* mono/tests/stream.cs: new tests for the Stream class
* configure.in: I really need LIBTOOL for libmonowrapper.so, so I
added it again.
2001-08-16 Alex Graveley <[email protected]>
* configure.in: Replace AM_PROG_LIBTOOL with AC_PROG_RANLIB. This
removes libtool dependency on all of Mono.
2001-08-10 Dietmar Maurer <[email protected]>
* mono/tests/array.cs: more array tests
2001-08-09 Dietmar Maurer <[email protected]>
* mono/tests/array.cs: more array tests
2001-08-06 Dietmar Maurer <[email protected]>
* mono/tests/pinvoke.cs: we can now print strings ;-)
* mono/tests/array.cs: new test for arrays
2001-08-02 Alex Graveley <[email protected]>
* libffi/*: Import libffi CVS version, with minor changes to make it
compile.
* mono/interpreter/Makefile.am: Link against
../../libffi/.libs/libffi.a.
* Makefile.am: Add libffi
* autogen.sh: Replace with adapted gnome autogen.sh
* configure.in: Add AC_CONFIG_SUBDIRS(libffi).
2001-08-02 Dietmar Maurer <[email protected]>
* mono/tests/pinvoke.cs: impl.
Wed Aug 1 22:34:52 CEST 2001 Paolo Molaro <[email protected]>
* configure.in, mono/tests: added some tests for the interpreter.
2001-07-15 Sean MacIsaac <[email protected]>
* doc/download: added instructions for cygwin
* doc/c-sharp: removed bit about compiling
* status/compare-assembly.cs: basedir should be there if
parameters are provided.
* status/makefile: made targets to dump info.
2001-07-15 Joe Shaw <[email protected]>
* configure.in: Don't create doc/Makefile as there's nothing there
to make.
* Makefile.am: Don't build the doc directory because there's no
Makefile.am there.
* autogen.sh: Call aclocal with the $ACLOCAL_FLAGS env var.
2001-07-15 Miguel de Icaza <[email protected]>
* doc/class-library (A): Updated FAQ with question on error 1595.
2001-07-14 Miguel de Icaza <[email protected]>
* doc/index:
Wed Jul 11 00:36:36 CEST 2001 Paolo Molaro <[email protected]>
* status/*: scripts and data to create statistics about the
+1 -1
View File
@@ -1 +1 @@
SUBDIRS = mono doc
SUBDIRS = mono doc runtime
+39 -5
View File
@@ -1,8 +1,42 @@
This is MonoNet.
This is Mono.
Ximian's portable implementation of .NET
A directory roadmap:
doc/
Contains documentation and the web site contents.
mono/
The core of the executable.
metadata/
The library to deal with executables and libraries for
.NET
dis/
CIL executable Disassembler
cli/
Common code for the JIT and the interpreter.
cil/
Common Intermediate Representation, XML
definition of the CIL bytecodes.
interp/
Interpreter for CLI executables.
* Using Mono
Once you have installed the software, you can run a few programs:
monodis program.exe
That will dump the bytecodes for program.exe. Monodis support
a number of options that dumps various metadata tables
(chapter 23 of the Partition III).
You can try the interpreter like this:
mono-int program.exe
----------
To edit the go-mono website, see doc/README.
+120 -6
View File
@@ -1,6 +1,120 @@
libtoolize --automake
automake -a
autoheader
aclocal
autoconf
./configure $*
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# Ripped off from GNOME macros version
DIE=0
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
if [ -n "$MONO_PATH" ]; then
ACLOCAL_FLAGS="-I $MONO_PATH/share/aclocal $ACLOCAL_FLAGS"
PATH="$MONO_PATH/bin:$PATH"
export PATH
fi
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to compile Mono."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
(gettext --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`gettext' installed to compile Mono."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed to compile Mono."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude || {
echo
echo "**Error**: aclocal failed. This may mean that you have not"
echo "installed all of the packages you need, or you may need to"
echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
echo "for the prefix where you installed the packages whose"
echo "macros were not found"
exit 1
}
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..."
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt ||
{ echo "**Error**: automake failed."; exit 1; }
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
else
echo Skipping configure process.
fi
+48 -1
View File
@@ -1,8 +1,10 @@
AC_INIT(README)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono, 0.3)
AM_INIT_AUTOMAKE(mono, 0.6)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
@@ -11,6 +13,8 @@ AC_PROG_INSTALL
AC_HEADER_STDC
AM_PROG_LIBTOOL
AC_CHECK_SIZEOF(void *)
dnl ***************************
dnl *** Checks for glib 1.2 ***
dnl ***************************
@@ -23,7 +27,43 @@ GLIB_LIBS=`glib-config --libs glib`
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
GMODULE_CFLAGS=`glib-config --cflags gmodule`
GMODULE_LIBS=`glib-config --libs gmodule`
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
TARGET="unknown"
case "$host" in
#mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS;;
i*86-*-*) TARGET=X86; arch_target=x86;;
#sparc-sun-4*) TARGET=SPARC;;
#sparc-sun-*) TARGET=SPARC;;
#sparc*-*-linux*) TARGET=SPARC;;
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA;;
#m68k-*-linux*) TARGET=M68K;;
#powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC;;
#arm-*-linux-*) TARGET=ARM;;
esac
if test ${TARGET} = unknown; then
CFLAGS="$CFLAGS -DNO_PORT"
AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
fi
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
AC_SUBST(arch_target)
AC_SUBST(CFLAGS)
AC_OUTPUT([
@@ -32,6 +72,13 @@ mono/Makefile
mono/metadata/Makefile
mono/dis/Makefile
mono/cil/Makefile
mono/arch/Makefile
mono/arch/x86/Makefile
mono/interpreter/Makefile
mono/tests/Makefile
mono/wrapper/Makefile
mono/monoburg/Makefile
mono/jit/Makefile
runtime/Makefile
doc/Makefile
])
+3
View File
@@ -0,0 +1,3 @@
Makefile.in
Makefile
all-docs
+19
View File
@@ -0,0 +1,19 @@
WEB_FILES= \
c-sharp class-library contact contributing documentation download \
faq gcc-frontend ideas index passport rationale resources \
roadmap runtime status team testing thanks tools
OTHERS= pending resources-pending todo
EXTRA_DIST = $(WEB_FILES) README $(OTHERS)
all-docs: $(WEB_FILES)
cat rationale roadmap c-sharp tools class-library \
runtime documentation download faq contributing \
resources status > all-docs
webit:
(cd web; make && make push)
push-notes:
scp release-notes/mono* www@www:/web/cvsmodules/mono/archive
+71 -30
View File
@@ -5,6 +5,10 @@
programs and create an internal tree representation of the
program. MCS can parse itself.
MCS now does type checking at the class, interface and struct
levels and can resolve the class hierarchy and as of last week
can generate interface code.
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
@@ -42,10 +46,11 @@
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.
* Code generation: The compiler recently started generating IL
executables that contain interfaces. Work is
progressing in other areas.
The code generation is done through the System.Reflection.Emit API.
</ul>
<a name="tasks">
@@ -67,27 +72,20 @@
* Jay does not work correctly with `error'
productions, making parser errors hard to point. It
would be best to port the Bison-To-Java compiler to
become Bison-to-C# compiler ([email protected]
might have more information)
become Bison-to-C# compiler.
Nick Drochak has started a project on SourceForge for this.
You can find the project at: <a href="http://sourceforge.net/projects/jb2csharp/">
http://sourceforge.net/projects/jb2csharp/</a>
</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:
Interesting and Fun hacks to the compiler:
<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).
interested in working on this, please contact the project admin on SourceForge:
<a href="http://sourceforge.net/projects/jb2csharp/">
http://sourceforge.net/projects/jb2csharp/</a>
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>
@@ -95,6 +93,15 @@
JB will allow us to move from the Berkeley Yacc
based Jay to a Bison-based compiler (better error
reporting and recovery).
* Semantic Analysis: Return path coverage and
initialization before use coverage are two great
features of C# that help reduce the number of bugs
in applications. It is one interesting hack.
* Enum resolutions: it is another fun hack, as enums can be defined
in terms of themselves (<tt>enum X { a = b + 1, b = 5 }</tt>).
</ul>
** Questions and Answers
@@ -133,19 +140,53 @@ A: No, currently I am using Jay which is a port of Berkeley Yacc to
In the future I want to port one of the Bison/Java ports to C# for
the parser.
Q: How do I compile it?
Q: Should someone work on a GCC front-end to C#?
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.
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.
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.
We can provide help and assistance to anyone who would like to work
on this task.
It might be simple to port Jay.cs to Windows, but I have not tried
this.
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.
Again, we would love to provide help and assistance to anyone
interested in working in such a project.
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.
Again, we would love to provide help and assistance to anyone
interested in working in such a project.
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.
You might also want to look at the <a href="faq.html#gcc">GCC</a>
section on the main FAQ
+112
View File
@@ -0,0 +1,112 @@
* CVS Access
If you are an active Mono developer, you can get a CVS account
that hosts the Mono source code.
Send an e-mail to miguel with your public SSH key for this
purpose. Please specify if the key was generated with SSH1 or SSH2.
If you are using SSH2, please generate your key using:
<pre>
ssh-keygen -t rsa
</pre>
And mail me the id_rsa.pub file.
If you are using SSH1, run:
<pre>
ssh-keygen
</pre>
And mail me your identity.pub file.
You will need CVS and SSH. Windows users can get both by
installing Cygwin (<a
href="http://www.cygwin.com">http://www.cygwin.com</a>)
Unix users will probably have those tools installed already.
** Checking out the sources
To check out the sources for the first time from the
repository, use this command:
<pre>
export CVS_RSH=ssh
export [email protected]:/cvs/public
cvs -z3 co mcs mono
</pre>
** Updating your sources
Every day people will be making changes, to get your latest
updated sources, use:
<pre>
cvs -z3 update -Pd mcs mono
</pre>
Note: The '-z3' enables compression for the whole cvs action.
The '-Pd' makes the update operation (P)rune directories that
have been deleted and get new (d)irectories added to the
repository.
** Making patches
Usually you will want to make a patch to contribute, and let
other people review it before commiting it. To obtain such a
"patch", you type:
<pre>
cd directory-you-want-to-diff
cvs -z3 diff -u > file.diff
mail [email protected] < file.diff
</pre>
** Commiting your work
Once you get approval to commit to the CVS, or if you are
commiting code that you are the maintainer of, you will want
to commit your code to CVS.
To do this, you have to "add" any new files that you created:
<pre>
cvs add new-file.cs
</pre>
And then commit your changes to the repository:
<pre>
cvs commit file-1.cs file-2.cs
</pre>
** The Mailing List
To keep track of the various development and changes to the
CVS tree, you can subscribe to the [email protected].
To subscribe, send an email message to
[email protected] and in the body of the
message put `subscribe'.
This will send you an email message every time a change is
made to the CVS repository, together with the information that
the author of the changes submitted.
** Recommendations
Please do not commit code that would break the compile to the
CVS, because that normally wastes everybody's time.
Make sure that you add all the files before you do a commit.
Use ChangeLog entries so we can keep textual descriptions of
your work, and use the contents of your ChangeLog file as the
CVS commit message (ie, paste the contents of this into the
editor buffer).
If you are making changes to someone else's code, please make
sure you get in touch with the maintainer of that code before
applying patches. You want to avoid commiting conflicting
work to someone else's code.
+41 -7
View File
@@ -3,10 +3,36 @@
The Class Library should be compatible with Microsoft's .NET
implementation.
Please see the <a href="class-status.html">Class Status</a>
page for a status of who is working on which classes.
We will write as much code as possible in C#. We may need to
interface with code written in C to gain access to the
functionality of
libraries like libart, Gtk+, and libc.
functionality of libraries like libart, Gtk+, and libc.
** Contributing
We welcome contributions to the the Class Library. To get
started, check the status page for information about which
APIs are being worked on, and how to get in touch with
individual maintainers.
If you want to work on a class, first check the <a
href="download.html">Classes Distribution</a> to see if it is
not implemented yet, if not, check the <a
href="class-status.html">Class Status</a> to see if someone is
already working on it, and maybe contact them.
If nobody is working on it, mail <a
href="mailto:[email protected]">[email protected]</a>
with the class you want to implement and CC <a
href="mailto:[email protected]">[email protected]</a>.
You can also track live the activities of the Mono CVS module
by subscribing to the <a
href="http://mail.ximian.com/mailman/listinfo/mono-cvs-list">mono-cvs-list</a>
** Layout
@@ -105,6 +131,9 @@
the correctness of the class library, compiler, and JIT
engine.
Please write your regression tests using <a
href="http://nunit.sourceforge.net">NUnit</a>
** Coding conventions
Please follow the conventions on the ECMA specification (On
@@ -140,10 +169,15 @@
In those cases, use the keyword "LAMESPEC".
** Contributing
** FAQ
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.
Frequently asked questions about the class library:
Q: I am writing a new class that overrides one of the system classes,
and I am getting a 1595 warning from the compiler. Should we use a
different namespace?
A: There is a quick solution to the problem, you can pass the command
line argument /nowarn:1595 and this will effectively let you use
your implementation of the code, while overriding the ones from the
system assemblies.
+16
View File
@@ -0,0 +1,16 @@
* Status of the various pieces of the class library
You can browse the status of the class library and see who has
registered to work on what parts of the system. These list
work-in-progress components currently.
Browse the current <a href="class-status/index.html">status</a>.
You can also download the XML <a
href="class-status/maintainers.xml">maintainers</a> file that
contains the actual maintainers list.
You can also download the master <a
href="class-status/class.xml">Class Status XML</a> file.
+1 -1
View File
@@ -1,7 +1,7 @@
* Contacting the Mono team.
You can contact the Mono Team by sending e-mail to `<a
href="mailto:[email protected]">mailto:[email protected]</a>'.
href="mailto:[email protected]">[email protected]</a>'.
You can contact the general forum of discussion by sending
e-mail to <a href="mailto:[email protected]">[email protected]</a>
+55 -3
View File
@@ -10,7 +10,7 @@
href="tools.html">the tools</a>, the <a
href="testing.html">testing framework</a>
* <b>Writers:</b> You can help us with writing <a
* <b>Writers:</b> You can help us bywriting <a
href="documentation.html">documentation</a>.
</ul>
@@ -18,6 +18,28 @@
something that would help tremendously would be to help with
small duties in the project that need to be addressed.
** To start contributing
To start developing classes or to contribute to the compiler,
you only need Windows and the .NET Beta 2 SDK. Please notice
that you do not need Visual Studio (although you can use it if
you want).
You can get it <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
Alternatively you can use the <a
href="#compile-service">compilation service</a> that was setup by
Derek.
** Bug reporting
If you find bugs in Mono, please make sure you enter a bug
report so we can keep track of problems in Mono.
To enter bug reports go to <a href="http://bugzilla.ximian.com">
http://bugzilla.ximian.com</a> and enter bug reports against
your favorite component (Mono, Runtime, C# compiler).
** Small tasks
A few smaller tasks are here, dropped in no particular order:
@@ -29,10 +51,40 @@
* <b>Mono/doc and web site:</b> They need to be
packaged up in the official `distribution'
* <b>Enthusiasts: </b>
</ul>
<a name="compile-service">
* C# Compilation Service
If you are working on a class for the Mono project, but do not
have a C# compiler available or a Windows machine to run the
.NET SDK, you can use the compilation service that Derek
Holden setup in the following URL: <a
href="http://toilet.2y.net:8080/">http://toilet.2y.net:8080/</a>
The service will let you compile a source file and get back a
list of errors in the class file. You will not be able to run
the code, but at least you can get some code written that will
help us further down the line.
You can contact (and thank) Derek for this service by sending
him nice email at <a
href="mailto:[email protected]">[email protected]</a>
* Books on C# and DotNet.
<ul>
* Dotnet Books (<a href="http://www.dotnetbooks.com">http://www.dotnetbooks.com</a>)
* Dotnet Resources (<a href="http://www.dotnetexperts.com/resources/">
http://www.dotnetexperts.com/resources</a>)
* O'Really C# Essentials (<a href="http://www.oreilly.com/catalog/csharpess/">
http://www.oreally.com/catalog/csharpess</a>)
* O'Really .NET Essentials (<a href="http://www.oreilly.com/catalog/dotnetfrmess/">
http://www.oreally.com/catalog/dotnetfrmess</a>)
* Special note
If you have looked at Microsoft's implementation of .NET or
+190
View File
@@ -0,0 +1,190 @@
* Developer FAQ
** New classes
Q: Should we write classes which are not part of the .NET or ECMA specs?
A: Yes. The ECMA and .NET specifications are far from complete, and
to produce a complete platform we will need a number of other
classes and components.
Any new classes that are not part of .NET or ECMA should be
designed to be reusable on anyone's CLI implementation. So that
Windows developers can also use any new classes that we come up
with.
We have a few existing <a href="ideas.html">Ideas on missing
classes</a>
** Language Compatibility
Q: What is the magic that allow multiple languages to co-exist?
A: From Fergus Henderson:
<i><blockquote>
There are different levels of interoperability.
The ECMA spec defines different categories of
CLS (Common Language Specification) conformance.
There are also some useful categories that don't
correspond to any of the levels defined in the ECMA spec.
In increasing degree of difficulty, your language implementation
can
<ul>
* (a) just generate IL
* (b) be a CLS "consumer", which means that it can read in
meta-data describing component interfaces,
and that it provides a way to declare variables of
CLS-complaint types and to call CLS-complaint methods.
* (c) be a CLS "extender", which means that it can in addition
derive from CLS-compliant classes
and implement CLS-compliant interfaces
* (d) be able to produce components with *any* CLS-compliant
component interface.
</ul>
Supporting some of these may require extending your language. However,
you can get quite a lot of interoperability by just putting appropriate
functionality in your compiler, without extending your language.
For some things, e.g. ASP.NET, your language implementation also needs to be
able to
<ul>
* (e) consume CodeDom trees. CodeDom trees are an abstract
representation of programs in a form similar to a C# parse
tree, with embedded code snippets (unparsed strings).
Given a CodeDom tree, with the snippets in your language,
your language implementation needs to generate a (i) .NET
assembly and possibly also (ii) a source file in your language.
* (f) produce CodeDom trees. For some applications,
your language implementation also needs to be able to
round-trip from CodeDom -> your language -> CodeDom.
</ul>
and for some things it needs to
<ul>
* (g) generate *verifiable* IL
</ul>
So when you hear all the hype about how language XYZ is a
".NET language", make sure you ask which of these different
things are supported.
[For the record, Mercury currently supports (a). We're working on
(b) and (g), and on parts of (c) and (e). We're never going to do (f), I very
strongly doubt we'll ever do (d), and for (c) we might only ever support
implementing interfaces, not deriving from classes.]
</blockquote></i>
** PInvoke
Q: What are the two major initiatives to implement PInvoke?
A: Fergus Henderson answers:
<i><blockquote>
Many of the .NET APIs will need to be implemented using code that calls C/Unix
APIs, such as stat(). The standard way of interfacing with native code from
.NET code is to use "PInvoke". However, there is a difficulty: many of
these APIs are defined in terms of types such as C's `long' or `size_t'
or the Posix `struct stat' whose representation varies depending on the
platform (architecture/OS/C compiler). There's no *portable* way of
accessing those from .NET managed code.
So, there are a couple of different approaches.
One possibility is to access such routines by writing a wrapper, e.g. in C,
that provides the same functionality without using types with a system-dependent
representation. The wrapper can then be directly accessed from portable
.NET code. The .NET code remains both source- and binary-portable;
the wrapper code is source-portable, but needs to be compiled
seperately for each target platform. The drawback of this approach is
that you have to write a lot of cumbersome wrapper code.
Another possibility is to extend the .NET VM with support for an
additional custom attribute, e.g. "[PosixType]". The VM would then
represent types tagged with this attribute in the same way that the
underlying system represents those types. With this approach, no
wrapper code would be needed. A drawback of this approach is that it
pushes quite a bit of complexity into the VM; the VM would have to know
the native representation of all types annotated with this attribute.
Another drawback is that code using this extension might not work on
different VMs.
There have also been some other suggestions, but those are the two that
I think are the best.
</blockquote></i>
Q: What is the problem implementing PInvoke?
A: Again, from Fergus Henderson:
<i><blockquote>
There's no problem implementing PInvoke as specified in the ECMA
specs and/or MS documentation. It's just that PInvoke by itself
doesn't solve all of the problems; in particular it doesn't solve
the problem of C types whose representation is different on different
systems.
</blockquote></i>
** CVS use
Q: Why do we keep ChangeLogs and make the CVS commit messages be the
same? One could be generated from the other
A: There are a number of reasons for keeping ChangeLog files as well as
CVS commit files:
<ul>
* Offline programming: when people are traveling, CVS logs are
not available.
* Slow CVS access: Many people work over modem lines (very
typical for contributors in Europe, Asia, Latin America)
using CVS is slow and might not be available to you (cvs
server down, no anoncvs server available).
* ChangeLogs travel in a released tarball package, so it is
possible to study the rationale of changes even after a
project is long "released", or you only have the sources for
the code.
* ChangeLog are not metadata for each file, they are live
files that you can browse in the package that is being
distributed.
</ul>
Making the CVS commit message be the same as the ChangeLog has other
benefits:
<ul>
* You can track down with `cvs log' what things were changed,
and match those to meaningful reports on the intentions of
the commit.
* When reading the commits-list, you can get a glimpse of the
changes without having to diff out or cvs update your tree.
* You can read off-line the changes that are being made
(asyncrouns operation).
</ul>
This mechanism works very well for GNOME and other projects.
Q: Should I use any of the special RCS keywords like $Id: devel-faq,v 1.1 2001/07/31 21:13:05 miguel Exp $, $Author: miguel $,
$Date: 2001/07/31 21:13:05 $, or $Revision: 1.1 $?
A: Please avoid using those in the source code in the CVS. They
are not really useful, and they cause a lot of conflicts when
people have separate CVS trees.
It was a nightmare with the Linux kernel when two people had their
private CVS trees and were submitting patches to the core.
+156 -11
View File
@@ -10,33 +10,178 @@
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'.
In order to make mcs and the class libraries you will need the
GNU make tools. These may be obtained for the Windows
environment from <a href="http://www.cygwin.com">cygwin.com</a>.
You will also need to get GLIB, from: <a
href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz</a>
<a name="sources">
** Sources
Currently we will be providing CVS snapshots every day, until
we make the first tarball release.
We provide both <a href="#packaged">packaged and tested</a>
tarballs (those are known to compile and pass `make
distcheck') as well as <a href="snapshots">daily snapshots</a> done
at 10pm Boston Time
<a name="snapshots">
*** Snapshots
The daily snapshots are available <a
href="http://www.go-mono.com/snapshots">here</a>. These
snapshots are done every day at 10pm EST (Boston Time).
They are not guaranteed to build, but most of the time they
should. They should give you a window to see what we are up to.
You might also want to track our development using the <a
href="http://mail.ximian.com/mailman/listinfo/mono-cvs-list">mono-cvs-list</a>
mailing list.
<a name="packaged">
*** Released and tested packages
<ul>
<b>July 12th, 2001</b>
<a name="august-22">
<b>August 22, 2001</b>
<ul>
* <a href="archive/mono-0.6.tar.gz">mono-0.6.tar.gz</a>: Mono Runtime 0.6 release.
* <a href="archive/mono-compiler-classes-0.6.tar.gz">mono-compiler-classes-0.6.tar.gz</a>: Mono Compiler and Classes 0.6 release.
* <a href="archive/mono-0.6">Release Notes.</a>
</ul>
<a name="july-29">
<b>July 29, 2001</b>
<ul>
* <a href="archive/mono-0.5.tar.gz">mono-0.5.tar.gz</a>: Mono Runtime 0.5 release.
* <a href="archive/mono-0.5">Release Notes.</a>
</ul>
<a name="july-22">
<b>July 22, 2001</b>
<ul>
* <a href="archive/mcs-22-Jul-2001.tar.gz">mcs-22-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mcs-Jul-22-Jul-19-2001.tar.gz">Differences since 19</a>: CVS snapshot.
* <a href="archive/mcs-22">Release Notes.</a>
</ul>
<a name="july-19">
<b>July 19th, 2001</b>
<ul>
* <a href="archive/mcs-19-Jul-2001.tar.gz">mcs-19-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mcs-Jul-17-Jul-19-2001.tar.gz">Differences since 17</a>: CVS snapshot.
* <a href="archive/mcs-19">Release Notes.</a>
</ul>
<a name="july-17">
<b>July 17th, 2001</b>
<ul>
* <a href="archive/mcs-17-Jul-2001.tar.gz">mcs-17-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mcs-Jul-15-Jul-17-2001.tar.gz">Differences since 15</a>: CVS snapshot.
* <a href="archive/mcs-17">Release Notes.</a>
</ul>
<a name="july-15">
<b>July 15th, 2001</b>
<ul>
* <a href="archive/mcs-15-Jul-2001.tar.gz">mcs-15-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mono-0.4.tar.gz">mono-0.4.tar.gz</a>: Packaged Source Code.
* <a href="archive/mono-0.4">Release Notes.</a>
</ul>
<a name="july-14">
<b>July 14th, 2001</b>
<ul>
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources to Jay.
* <a href="archive/mcs-12-Jul-2001.tar.gz">mcs-12-Jul-2001.tar.gz</a>: CVS snapshot.
* <a href="archive/mono-0.3.tar.gz">mono-0.3.tar.gz</a>: Packaged Source Code.
</ul>
<a name="july-8">
<b>July 8th, 2001</b>
<ul>
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources.
* <a href="archive/mcs-08-Jul-2001.tar.gz">mcs-08-Jul-2001.tar.gz</a>: CVS Snapshot
* <a href="archive/mono-08-Jul-2001.tar.gz">mono-08-Jul-2001.tar.gz</a>: CVS Snapshot
</ul>
</ul>
** CVS
<a name="install">
** Installing the software
To install and work on the compiler and the class libraries,
follow these instructions:
<ul>
* Install <a href="http://www.cygwin.com">CygWin</a> first.
* Untar the MCS distribution (see below for information).
* Go into the MCS directory and type `make windows'
</ul>
To compile the mono runtime on windows:
<ul>
* Install <a href="http://www.cygwin.com">CygWin</a> first.
* Once installed, in a terminal window or a cygwin
window (a shortcut should be on your desktop), untar the glib
distribution:
<pre>
tar xzvf glib-1.2.10.tar.gz
</pre>
* Configure, compile and install glib, like this:
<pre>
./configure --prefix=/usr
make
make install
</pre>
* Unpack the mono distribution:
<pre>
tar xzvf mono-XXX.tar.gz
</pre>
* Configure, compile and install:
<pre>
./configure --prefix=//c/mono
make
make install
</pre>
* Some people observed problems with autoconf 2.52. Installing
autoconf 2.13 helped in those cases (don't forget to do a
`make maintainer-clean' after the update)
</ul>
To compile the mono runtime on Unix:
<ul>
* Download the mono distribution
* Unpack the mono distribution:
<pre>
tar xzvf mono-XXX.tar.gz
</pre>
* Configure, compile and install:
<pre>
./configure
make
make install
</pre>
</ul>
We are trying to figure out where to put our CVS repository.
We are debating between the GNOME CVS or SourceForge. Watch
this spot.
+137 -24
View File
@@ -69,6 +69,9 @@ Q: What does Mono stand for?
A: Mono is the word for `Monkey' in Spanish. We like monkeys.
It only means a number of other things: monochromatic (hence the
gray theme used in the Web site).
Q: When will you ship it?
A: We do not know when the code will be shipped. The more
@@ -138,8 +141,8 @@ A: We like the features that the CLI and its related technologies
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.
A: Yes. The licensing scheme is planned to allow proprietary
developers to write applications with Mono.
Q: What license is Mono on?
@@ -147,10 +150,8 @@ 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:
Since the LGPL is not suitable for embedded systems development, we
are also licensing the libraries under the GPL 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
@@ -162,6 +163,15 @@ A: The C# Compiler is released under the terms of the GPL. The class
href="http://www.gnu.org/software/classpath/classpath.html">GNU
Classpath.</a>
Q: But in Object Oriented Programming I need to subclass your library
functions, does that mean that I am making modifications to your
library and hence I would have to distribute my sources under the
LGPL?
A: No. Object Oriented Programming in the class library is a well
understood interface barrier, so you can actually develop
proprietary applications with the Mono libraries.
Q: Will you accept code under the XXX License?
A: If the XXX License is compatible with the license we use in that
@@ -230,11 +240,28 @@ A: No. That just means that applications might use that API to
documented and whether we will be able to talk to
passport.com
Q: But that must mean that you are tied to Passport!
A: All the contrary. The implementation could keep the interface (for
the sake of simplicity, lets say it implements the method `Login'
and `GetUserName').
We could implement `Login' and `GetUserName' by talking to XNS or
any other decentralized systems. Or any other system that the
industry standarizes on.
Q: What is your opinion?
A: You can read my personal <a href="passport.html">opinion on
passport</a>.
Q: Will Mono running on Linux make Passport available for Linux?
A: The Passport toolkit for Linux-based web servers is available from
Microsoft.
Again, Mono has nothing to do with Passport.
** Mono and Windows
Q: Will Mono allow me to run Microsoft Office on Linux?
@@ -287,6 +314,15 @@ 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.
Q: Does Mono replace Bonobo?
A: Bonobo is very focused on cross-application component reuse. Mono
will provide a Bonobo framework to allow you to develop Bonobo
components and use Bonobo components on Unix.
Mono should allow you to write Bonobo components more easily, just
like .NET on Windows allows you to export .NET components to COM.
** Mono and the Web
Q: Is Mono a way of running Java applets?
@@ -389,6 +425,12 @@ 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.
Q: Could Java target the CLI?
A: Yes, Java could target the CLI. We have details on a <a
href="ideas.html#guavac">project</a> that someone could take on to
make this happen.
** Extending Mono
Q: Would you allow other classes other than those in the
@@ -443,8 +485,40 @@ A: We are also researching <a
href="http://www.gnu.org/software/lightning/lightning.html">GNU
Lightning</a>.
<a name="ximian-and-microsoft">
** Ximian and Microsoft
Q: I read that Microsoft is helping out Ximian, is this true?
A: Initial contact between David Stutz and Miguel de Icaza happened.
It was a friendly conversation. Microsoft is interested in other
implementing .NET and are willing to help make the ECMA spec more
accurate for this purpose.
We were initially contacted by Sam Ruby at the ECMA TG3 committee
to discuss the same issue. And we are glad to have good contacts
to ask questions about the specs.
Q: Is Microsoft paying Ximian to do this?
A: No, we are doing this for purely selfish reasons. We are upgrading
our development platform to build better applications on Unix and other
systems.
Q: Do you fear that Microsoft will change the spec and render Mono useless?
A: No. Microsoft proved with the CLI and the C# language that it was
possible to create a powerful foundation for many languages to
interoperate. We will always have that.
Even if changes happened in the platform which were undocumented
(which is very unlikely), the existing platform has a value on its
own.
Miguel once explained its motivation for working on Mono to Dave
Winer, and his mail got posted <a
href="http://scriptingnews.userland.com/stories/storyReader$1275">here</a>
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
@@ -484,6 +558,29 @@ 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
Q: What happens if Microsoft `Embraces and Extends' the CLI standard
and keeps Mono out of the play?
A: There are various explanations to this question. The first one is
that the benefits that you can get from the CLI are going to be
there with or without `embracing and extending'. We might not be
able to run every .NET Windows application on Mono. But remember:
it was already easy for someone to just use PInvoke to tie their
application to Windows.
The bottom line is that the advantages of having a CLI runtime will
be with us, no matter if Microsoft forks their version to be
incompatible.
Q: What if Microsoft changes the interface, and all of a sudden
applications break?
A: If they change their released API, every application that was
developed against it will break.
That being said, Microsoft have a pretty good record of keeping
backwards binary compatibility.
** Acronyms
Q: What is the difference between CLR (Common Language Runtime) and
@@ -507,6 +604,9 @@ A: I would love if someone does, and we would love to help anyone that
personally to work on C# on a C# compiler, which has an intrinsic
beauty.
We can provide help and assistance to anyone who would like to work
on this task.
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
@@ -514,6 +614,9 @@ A: I would love to see a backend to GCC that generates CIL images. It
code. This is something that people would want to look into
anyways for Windows interoperation in the future.
Again, we would love to provide help and assistance to anyone
interested in working in such a project.
Q: What about making a front-end to GCC that takes CIL images and
generates native code?
@@ -527,6 +630,9 @@ A: I would love to see this, specially since GCC supports this same
library that could be linked with your application as its runtime
support.
Again, we would love to provide help and assistance to anyone
interested in working in such a project.
Q: But would this work around the GPL in the GCC compiler and allow
people to work on non-free front-ends?
@@ -538,12 +644,6 @@ 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?
@@ -588,22 +688,35 @@ A: We can not predict the future, but a conservative estimate is that
expected to contain the same object types independently of how the
instructions was reached.
** Mono and Portable.NET
Q: What are the differences between Mono and Portable.NET?
A: Most of Mono is being written using C#, the only pieces written in
C are those who have to absolutely be built using C (The JIT
engine, the runtime, the interfaces to the garbage collection
system).
The C# compiler and the tools will become reusable C# components.
Portable.NET is building its components out of C pieces.
** 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.
A: The key difference between CORBA (and COM) and the CLI is that the
CLI allows "data-level interoperability" because every
language/component uses the same data layout and memory management.
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
This means you can operate directly upon the datatypes that someone
else provides, without having to go via their interfaces. It also
means you don't have to "marshall" (convert) parameters (data
layouts are the same, so you can just pass components directly) and
you don't have to worry about memory managment, because all
languages/components share the same garbage collector and address
space. This means much less copying and no need for reference
counting.
+80 -1
View File
@@ -3,13 +3,28 @@
Here are a few ideas of tools, classes and projects that you
could start. More are forthcoming.
<a name="runtime">
** Runtime
We need a verifier that can be run on an executable (assembly)
and tells whether the metadata for the executable is correct
or not. It should report any anomalies.
For a list of anomalies in assemblies, check the various assertions
that are described on the ECMA documentation.
This will help test our generated executables and can be also
used as an external verifier.
<a name="classes">
** Classes
<ul>
TODO=jxta,The JXTA Peer to Peer foundation
* Implement a JXTA protocol implementation:
<a href="http://www.jxta.org">http://www.jxta.org</a>
TODO=camel,Mail API
* Implement a Mail API, similar to Camel or JavaMail (Camel has
significant architecture features that are required on a real
mailer).
@@ -18,23 +33,87 @@
<a href="http://cvs.gnome.org/bonsai/rview.cgi?dir=evolution%2Fcamel">
Camel implementation</a>.
Such an implementation could be used both with
Microsoft .NET and Mono.
TODO=multimedia
* Interfacing to Multimedia systems. You might want
to look into the Quicktime API. I know <a
href="mailto:[email protected]">Vladimir</a> has
researched the problem before
TODO=gtk,Gtk+ wrappers for Mono and .NET
* Wrap the Gtk+ API. This is simple and can be done
on Windows as Gtk+ 2.0 works on Windows.
This work can also be used on Windows and will
enable developers on Windows to use some of Gtk+'s
advanced features.
The idea is to wrap the Gtk+ API and allow us to
build GUI applications using Gtk+ and in the future
other Gtk+-based libraries from Mono (Gal, GtkHTML).
There is extensive knowledge on wrapping Gtk+ in
other languages (this has been done this for Perl,
Python, Java, Scheme, Haskel and other languages in
the past).
</ul>
<a name="projects">
** Projects
<ul>
TODO=xmlStorage,
* Implement an xmlStorageSystem for the CLI:
<a href="http://www.soapware.org/xmlStorageSystem">
http://www.soapware.org/xmlStorageSystem</a>
TODO=guavac,Java compiler for .NET
* You could take one of the existing Java compilers
(Guavac comes to mind as it is so nice) and modify
it to generate .NET code rather than JVM byte
codes.
This should be a pretty straightforward task.
Guavac has the advantage of being written in C++ and
it could be compiled with the Microsoft Managed C++
compiler and produce a .NET executable with it.
TODO=CORBA,CORBA implementation
* 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).
href="http://www.omg.org">The OMG site</a> has the
CORBA specs).
Get in touch with David Taylor (dtaylo11 at bigpond
dot net dot au) as he has been working on this
project.
TODO=Bonobo,Bonobo for Mono
* Once CORBA is done, implement the Bonobo interfaces
to allow people to use Bonobo components in Mono and
Mono components with Bonobo. The best of both worlds!
TODO=moniker,Object Naming System with Monikers
* A naming space for Mono. An object naming space is
a very powerful tool. Bonobo implements a moniker
system that is more powerful than the original
moniker concept that was pioneered by COM/OLE in the
Microsoft world.
Our implementation builds on a concept, and we have
made it simpler, more powerful, more extensible and
a much better mechanism than the equivalent monikers
on Windows.
Implementing Mono monikers would benefit both
Windows users using .NET and Mono users on Unix and
Windows.
Here is <a
href="http://primates.ximian.com/~miguel/monikers.html">an
overview of the moniker system</a> in Bonobo.
</ul>
+138 -16
View File
@@ -1,23 +1,20 @@
** Jul 12, 2001
<a href="http://www.ximian.com">Ximian</a> announced the
launch of the Mono project, an effort to create an Open Source
implementation of the .NET Development Framework.
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>
Mono includes: <a href="c-sharp.html">a compiler</a> for the
C# language, a <a href="runtime.html">runtime</a> for the
Common Language Infrastructure and a set of <a
href="class-library.html">class libraries</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 can read our <a href="rationale.html">rationale</a> for
this project. If you have questions about the project, please
read our list of <a href="faq.html">Frequently Asked
Questions</a> or <a href="mailto:[email protected]">contact us.</a>
You might also want to <a href="download.html">Download the
source</a> for our work so far.
source</a> for our work so far. Or you can grab a <a
href="snapshots">snapshot</a> of our current work.
You might want to <a
href="resources.html#mailing">subscribe</a> to our mono-list
@@ -26,6 +23,131 @@
You can contact the team at: <a
href="mailto:[email protected]">[email protected]</a>
** Sep 17, 2001
Mike Kestner's Gtk# (Gtk-sharp) was checked into the CVS
repository. Gtk# can run a simple hello world application.
The binding is nice, as it maps Gtk+ signals to delegates in
C#. You can see the Gtk# Hello World program <a href="src/HelloWorld.cs">here</a>
Gtk-sharp should be available on the next snapshot set.
** Sep 10, 2001
Dietmar checked in his CIL tree/forest regeneration and most
importantly, the x86 instruction selector burg grammar.
** Sep 5, 2001
The MCS compiler <b>can compile the sample Hello World</b>
application and generate a Windows/CIL executable that runs!
This executable runs with the Mono Interpreter of course (see
August 28)
** Sep 4, 2001
Dietmar checked into CVS the `monoburg' architecture
independent instruction selector for the JIT engine.
** Aug 28, 2001
<b>.NET Hello World is working under Mono!</b> The latest snapshots
will let you run it.
Hello World consits of 1821 CIL instructions,
performs 66 subroutine calls and loads 12 classes from the corlib.dll
Good work Mono team!
** Aug 23, 2001
Lloyd Dupont has announced his OpenGL bindings for C#, they
are available here: <a
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
** Aug 22, 2001
New version of the Mono Runtime, Compiler and Classes has been
<a
href="download.html#august-22">released.</a> Check the <a
href="archive/mono-0.6">0.6 announcement</a>.
** Aug 20, 2001
A new <a href="contributing.html#compile-service">Compilation
service</a> has been made available by Derek to allow people
without access to the <a
href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">.NET SDK</a>
** Aug 3, 2001
Daily snapshots of mcs and mono are now available, they will
run every night at 10pm Boston time.
** Jul 29, 2001
Mono Runtime 0.5 has been <a
href="download.html#july-29">released.</a> Check the <a
href="archive/mono-0.5">release notes</a>
** Jul 25, 2001
The slides for <A href="Presentations/O-Reilly">my
presentation</a> at <a href="http://www.oreilly.com">O'Reilly
Open Source Software Convention</a>
** Jul 22, 2001
Another release of the class libraries is out, check the <a
href="archive/mcs-22">MCS 22-July Release Notes</a>. You can
get the new class libraries from <a
href="download.html#july-22">here</a>
** Jul 19, 2001
Another release of the class libraries is out, check the <a
href="archive/mcs-19">MCS 19-July Release Notes</a>. You can
get the new class libraries from <a
href="download.html#july-19">here</a>
** Jul 17, 2001
Another release of the class libraries is out, check the <a
href="archive/mcs-17">MCS 17-July Release Notes</a>. You can
get the new class libraries from <a
href="download.html#july-17">here</a>
Do not forget to check out the updated <a href="faq.html">FAQ</a>.
Got Sean's new <a href="class-status/index.html">Class
Status</a> web pages up. These are a lot better than mine, and
we are now keeping better track of contributors.
** Jul 15, 2001
Another release of Mono is out, check the <a
href="archive/mono-0.4">Mono 0.4 Release Notes</a>. Get it <a
href="download.html#july-15">here</a>.
** Jul 14, 2001
A <a
href="http://mail.ximian.com/archives/public/mono-list/2001-July/000399.html">new
release</a> of the
runtime, compiler and classes has been made. Get it <a href="download.html#july-14">here</a>
** Jul 12, 2001
I keep getting questions about my opinion on Passport, even when
Mono has <b>nothing</b> to do with it. I finally <a
href="passport.html">wrote something.</a>
** Jul 9, 2001
Project launched.
** O'Reilly
Brian posted a story on <a
+68 -16
View File
@@ -1,3 +1,19 @@
* Updates
For an analysis of security problems with passport, check <a
href="http://avirubin.com/passport.html">http://avirubin.com/passport.html</a>.
The bottom line is that you should not put any sensitive
information on passport.
I have received many comments from people, and I have updated
the page accordingly. From removing incorrect statements, to
fixing typos, to include mentions to other software pieces.
I also corrected my statement about IIS and a trojan horse, I
should read a more educated press in the future. My apologies
to Microsoft and its employees on this particular topic. IIS
did not have a trojan horse built in.
* Microsoft Hailstorm and Passport
Microsoft Passport is a centralized database hosted by
@@ -14,7 +30,7 @@
** Passport
Passport is important not because of it being breaktrough
Passport is important not because of it being a breakthrough
technologically speaking, but because the company is in a
position to drive most people toward being suscribers of it.
@@ -75,12 +91,7 @@
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.
into the products by malicious engineers.
* <b>Security:</b> With a centralized system like
Passport, imagine the repercussions of a malicious
@@ -91,7 +102,21 @@
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.
unable to figure out for how long their systems had
been hacked.
Security holes have been found in <a
href="http://slashdot.org/articles/00/04/14/0619206.shtml">IIS
in the past.</a> If all the world's data is stored on
a central location, when a single security hole is
detected, it would allow an intruder to install a
backdoor within seconds into the corporate network
without people ever noticing.
Microsoft itself has been recently hit by worms,
imagine if all your business depended on a single
provider for providing all or your authentication
needs
</ul>
Microsoft might or might not realize this. The idea behind
@@ -112,6 +137,15 @@
system should not create an internet `blackout' in the
case of failure.
A distributed system using different software
platforms and different vendors would be more
resistent to an attack, as holes in a particular
implementation of the server software would not affect
every person at the same time.
A security hole attack might not even be relevant to
other software vendors software.
* <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
@@ -129,13 +163,14 @@
possibility of replicating and caching public information
about the user.
For instant messaging (another pieces of the Hailstorm bit),
For instant messaging (another piece 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.
mention Jabber as a messaging platform and other people
pointed out to the <a
href="http://java.sun.com/products/jms/">Java Message
Service</a>. The JMS does support a number of very
interesting features that are worth researching.
It could also just use the user e-mail address as the `key' to
choose the registrar (msn.com, hotmail.com -> passport.com;
@@ -166,7 +201,7 @@
** Deploying it
The implementation of such a system should be a pretty
straightforward tasks once security cryptographers have
straightforward task once security cryptographers have
designed such a beast.
The major problems are:
@@ -191,7 +226,7 @@
** Passport and Mono
The .NET class libraries includes a Passport class that
The .NET class libraries include 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.
@@ -210,6 +245,18 @@
Currently, we are too far from the point where this is a real
issue.
** Passport and endangering Open Source.
A few people have said: `Mono will allow Passport to be
available for Linux and that is bad'. This is plain
missinformation.
Currently, you can obtain Passport for Linux from Microsoft
itself and deploy it today on your Web server. Mono does not
even enter the picture here. Go to passport.com and download
the toolkit and you will see with your own eyes that passport
is <B>already</b> available for Linux.
** Disclaimer
This is just a group of personal thoughts of mine that I have
@@ -222,7 +269,12 @@
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.
<a href="http://www.nat.org/">him</a> post his own story.
** Other Passport Comments
An interesting study on the security of passport is available at: <a
href="http://avirubin.com/passport.html">http://avirubin.com/passport.html</a>
** Other Alternatives
+46
View File
@@ -0,0 +1,46 @@
To: [email protected], [email protected]
Subject: July 12 snapshots.
FCC: ~/Mail/outbox.txt
X-Windows: Sometimes you fill a vacuum and it still sucks.
--text follows this line--
Hey!
July 12 snapshots of class libraries, the compiler and the mono
runtime are available.
New on this release:
* Runtime (module: mono)
The beginning of a simple interpreter that Paolo started
workign on (can run really simple .NET programs).
Disassembler copes with more elements of the binary format and
more tokens are decoded. Paolo is working now on moving some
of these to the metadata library.
More tables are dumped.
* Class libraries (module: mcs/class)
Many new more classes are in from Joe, Vladimir, Jeff, Sean
and yours truly.
Sean fixed the build process, and it is now possible to
compile with a single command the assemblies. We will be
revisiting this mechanism in the future to compile per-OS
assemblies (ie, Unix, Windows, MacOS, etc).
* Compiler (module mcs/mcs)
Not much done this week, just a few fixes here and there, and
more work to make it easy to compiler.
* Documentation (module: mono/doc)
All the changes to the web site are there for your browsing
pleasure. We still need to integrate the status system in
there.
Miguel.
+43
View File
@@ -0,0 +1,43 @@
To: [email protected]
Subject: Sunday snapshot available.
Gcc: mail.2001-07
--text follows this line--
Hey guys,
I promise I will not be doing these so often once we have the CVS
server up. In the meantime:
* MCS
Sean got the classes to compile in a single go. You
will need CygWin (www.cygwin.org) to compile though
(GNU make and stuff is required).
System.Xml.XmlReader contribution from Jason
(WOOHHOO!!). It also contains a nice test-suite for
his functions, and in his new code bit, his
implementation is faster than Microsoft's
We now ship `jay' as part of the distribution to allow
you to compile the compiler with the same `make'
command. Small fixes to the parser as well were
introduced.
* Mono 0.4
Paolo's interpreter supports call instructions and has
the test suite program that he posted about.
All documentation ships now in the mono-0.4.tar.gz
Notes:
As usual, MCS is targeted to be compiled on a Windows machine
(you will need Cygwin).
Mono is targeted to be compiled on a Unix machine or a Windows
machine running Cygwin.
Miguel.
+27 -2
View File
@@ -7,6 +7,16 @@
If you want to send suggestions for links, address them to <a
mailto="[email protected]">[email protected]</a>.
** Mono related sites.
Sergey's web page on Mono resources:
<a href="http://mono.eurosoft.od.ua">http://mono.eurosoft.od.ua</a>
Got Dot Net:
<a href="http://www.gotdotnet.com">Got Dot Net</a>
** ECMA Documentation.
You can get the documentation for the ECMA specs from a number of sites:
@@ -45,6 +55,12 @@
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-gc-list">mono-gc-list:</a></b>
Discussion on the GC system of Mono.
* <b><a
href="http://mail.ximian.com/mailman/listinfo/mono-cvs-list">mono-cvs-list:</a></b>
Track the CVS activity of Mono on this mailing list. You can get <a href="http://www.go-mono.com/snapshots">daily snapshots</a> as well.
* <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
@@ -75,17 +91,26 @@
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
Develop:</a> an IDE for the C# language written in C#.
* <a
href="http://janet-js.sourceforge.net/">Janet:</a>
an implemention of ECMAScript (the standarized
version of JavaScript) in C#
* <a
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
Another implementation of the CLI and C# compiler.
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
testing framework for .NET classes.
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.
JIT/VM/GC system from Intel.
* C# bindings for OpenGL are available here: <a
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
</ul>
** GNOME Documentation
+65 -39
View File
@@ -1,17 +1,13 @@
The MonoNet runtime
* The Mono runtime
The MonoNet runtime will implement the JIT engine (and a byte
The Mono 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".
Currently the runtime has an image loader and metadata access
entry points. The runtime comes with a simple interpreter
that can execute very simple programs.
** Executing MSIL/CIL images
@@ -19,26 +15,28 @@
external assemblies to our own version of the assemblies on
GNU/Linux.
Our roadmap looks like this:
Our roadmap looks like this, this has been updated as of
<b>Jul 15, 2001</b>:
<ul>
* Milestone 1: Fully read and parse all CIL byte-codes
and metadata tokens (ie, a disassembler).
* Milestone 1: <b> Done</b> 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 3: Define an <i>lburg</i>-like instruction
selector for the JITer for Intel. Although slower
at JITing than a streaming JITer, it generates
better code. The same grammar can later be used for
the stream jitter.
* Milestone 4: non-Intel port of the JIT engine.
* Milestone 4: Implement JITer.
* Milestone 5: Optimizing JIT engine port for IA32.
* Milestone 6: non-Intel port of the Optimizing JIT
engine.
* Milestone 5: Port of the JITer to non IA32 systems.
</ul>
A setup similar to the Kaffe JIT engine can be used to
@@ -46,25 +44,38 @@
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
will need to install the CygWin32 development tools to get a
Unix-like compilation environment.
** JIT Engine
** JIT Engine (<b>updated, Jul 14th, 2001</b>)
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 will be using a code-generator generator approach for our
JITer. Given the properties of CIL byte codes, we can take
full advantage of a real instruction selector for our code
generator.
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
There are a couple of books that deal with this technique: "A
Retargetable C Compiler" and "Advanced Compiler Design and
Implementation").
Implementation" are good references. You can also get a
technical description of <a
href="http://research.microsoft.com/copyright/accept.asp?path=http://www.research.microsoft.com/~drh/pubs/iburg.pdf&pub=ACM">lbrug</a>
Previously we had looked at a number of JIT engines and tools,
but they would not take full advantage of the CIL properties:
<ul>
* <a
href="http://www.intel.com/research/mrl/orp/">ORP</a>
* <a
href="http://www.gnu.org/software/lightning/">GNU
Lightning</a>
* <a href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine
Toolkit</a>.).
* VCODE.
</ul>
** Garbage Collection
@@ -76,6 +87,11 @@
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>
Another consideration is to use the same interface that ORP
uses to its Garbage Collection system and reuse that GC system
instead of rolling our own, as the ORP system is pretty advanced
and is independent of the rest of ORP.
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
@@ -85,9 +101,17 @@
* 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>
* "GC points in a Threaded Environment":<br>
<a href="http://research.sun.com/techrep/1998/abstract-70.html">
http://research.sun.com/techrep/1998/abstract-70.html</a>
* "A Generational Mostly-concurrent Garbage Collector":
<a href="http://research.sun.com/techrep/2000/abstract-88.html">
http://research.sun.com/techrep/2000/abstract-88.html</a>
* Details on 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/GCI2.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI2.asp</a>
</ul>
** Useful links
@@ -95,7 +119,6 @@
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>
@@ -112,7 +135,10 @@
** 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.
PInvoke is the mechanism we are using to wrap Unix API calls
as well as talking to system libraries.
We hvae implemented PInvoke through libffi, but we are likely
going to roll our own system as the runtime matures, specially
as the interpreter is approaching completion, and we move into
the JITer.
+11 -17
View File
@@ -1,6 +1,6 @@
* Project Status
Pieces of Mono that have been implemented:
<ul>
@@ -10,35 +10,29 @@
* 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).
files).
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.
* Class Libraries: You can check the current status in the
<a href="class-status.html">Class Status page</a>
</ul>
Tasks on the critical path:
<ul>
* Method and Field resolution.
* Bytecode interpreter: (Paolo is working on this).
* Bytecode interpreter: Not implemented yet.
* Simple JIT: Not implemented yet (Miguel is
researching the code-generator generator)
* Simple JIT: Not implemented yet.
* Garbage collection engine.
* Garbage collection engine (Dick is working on this, his contact is <a
href="mailto:[email protected]">[email protected]</a>
</ul>
If you want to work on any task here, please mail <a
href="mailto:[email protected]">[email protected]</a>
+48 -6
View File
@@ -4,22 +4,64 @@
Mono-based solution. Some of these tools can be developed on
Windows before Mono is fully finished.
All of these tools should be written using C#.
For the tools that are typically command line tools: Try to
write these as components that could load their input from
streams or collections of streams, and implement the command
line tools as wrappers around those classes.
For example, we will be making the C# compiler a component
that could be reused by applications that might have a use for
the various bits of the compiler (either to embed the
compiler, or reuse the code generator part of it).
This is important so that these components (compiler,
assembler, linker, etc) can be integrated later into the
visual development environment (hopefully with the help of the
SharpDevelop hackers).
TODO=ilasm,IL Assembler
** IL Assembler.
This assembler should basically take as input a file
containing IL bytecodes as specified in the `Partition II' of
the ECMA spec, and produce a binary file.
TODO=al,Assembly Linker
** Assembly Linker.
This tool is used to construct assemblies, which are basically
deployment units for CLI executables.
TODO=debugger,Debugger
** Debugger
We will need a debugging API to debug CLI applications and
then a debugger component that can be used in an IDE
environment.
TODO=ide,Integrated Development 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.
environment: <a
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">SharpDevelop</a>.
People should work with the SharpDevelop hackers to produce a
unified development environment.
Please work with the SharpDevelop hackers to build a good IDE.
We will work on creating an embedable compiler component and
an embeddable debugger component that can be used withing
SharpDevelop
TODO=hbrowser,Help Browser
** Help Browser
We need a good help browser that can be used to browse all the
Mono documentation.
We need a good help browser that can be used to browse
documentation. Ideally this help browser can accept as input
XML Docbook input and an assorted set of file formats
(Microsoft Help, Unix manual pages, Unix Info pages)
Look at the GNOME DevHelp for a good set of ideas on how to
implement this.
+3 -1
View File
@@ -3,13 +3,15 @@
0,Mono,rationale.html,rationale.src
1,Runtime,runtime.html,runtime.src
1,Classes,class-library.html,class-library.src
2,Class Status,class-status.html,class-status.src
1,C# Compiler,c-sharp.html,c-sharp.src
1,Status,status.html,status.src
0,Download,download.html,download.src
1,CVS access,ccvs.html,ccvs.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
+4 -2
View File
@@ -14,11 +14,13 @@ while (<>){
} elsif (/^\t\t\* (.*)$/) {
print "<li>$1\n";
} elsif (/^Q: (.*)$/){
print "<p><a name=\"q$q\"><b>Question $q:</b> $1\n";
print "<p><a name=\"q$q\"></a><b>Question $q:</b> $1\n";
$q++;
} elsif (/^A: (.*)$/){
print "$1\n";
} else {
} elsif (/^TODO=(.*),$/){
print "<a name=\"$1\">\n";
} else {
print "$_\n";
}
}
+76
View File
@@ -0,0 +1,76 @@
#!/usr/bin/perl
$q = 1;
# Modified by Edwin Lima ([email protected]; [email protected])
# Date: 08/21/01, The Netherlands
# $f: Variable used as a flag to create the list of questions on top of the question-answers set. This
# is the only way that I found to scan the questions which have a <CR><LF>, in such a way that I will not
# scan the answer together at same time.
# @aname: Buffer used to store the question-answers set to print them out just after the print of the
# questions.
# @href: Buffer used to store the anchors (only questions) to the questions-answers set on the bottom
# of the page.
# I opened explicitly the file for input (input.txt) but U can change this as it was originally.
#
#
#comment this line if you are not open the file explicitly
#open(IN, "input.txt") || die "cannot open file input.txt" ;
print("<A name=TOP>") ;
#Uncomment line bellow to make it work as it was originally.
while (<>){
#comment line bellow
#while (<IN>){
chop;
if (/^\* (.*)$/){
push(@aname,"<h1>$1</h1>\n");
# print $body;
} elsif (/^\*\* (.*)$/) {
push(@aname, "<h2>$1</h2>\n");
push(@href, "<h2>$1</h2>\n");
} elsif (/^\*\*\* (.*)$/) {
push(@aname, "<h3>$1</h3>\n");
} elsif (/^$/) {
push(@aname, "<p>\n");
# push(@href, "<p>\n"); NOT NEEDED
} elsif (/^\t\t\* (.*)$/) {
push(@aname, "<li>$1\n");
} elsif (/^Q: (.*)$/){
push(@aname, "<p><a name=\"q$q\"></a><b>Question $q:</b> $1\n");
push(@href,"<p><a href=\"#q$q\"><b>Question $q:</b></a> $1\n");
$f=1;
$q++;
} elsif (/^A: (.*)$/){
push(@aname,"<P>\n<A HREF=#TOP>Top</A>\n<P>");
push(@aname,"$1\n");
$f=0;
} elsif (/^TODO=(.*),$/){
push(@aname, "<a name=\"$1\">\n");
#push(@href, "<a name=\"$1\">\n");
} else {
push(@aname,"$_\n");
if ($f==1) {
push(@href,"$_\n");
}
}
}
foreach $line (@href) #"\n\n";
{
print $line;
}
foreach $line (@aname) #"\n\n";
{
print $line;
}
#comment this line if you are not open the file explicitly
# close(IN) || die "cannot close file" ;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

+3
View File
@@ -1,8 +1,10 @@
SOURCES= \
../contributing \
../class-library \
../class-status \
../contact \
../c-sharp \
../ccvs \
../documentation \
../download \
../faq \
@@ -33,6 +35,7 @@ clean:
push:
scp *.html [email protected]:/web/cvsmodules/mono
scp *.html [email protected]:/home/groups/m/mo/mononet/htdocs
push2:
scp *.html primates:public_html/xxx
+3 -3
View File
@@ -30,7 +30,7 @@
<tr>
<td><img src="images/pixel.gif"></td><!-- left border -->
<td colspan="4">
<a href="/"><img src="images/mono.gif" border="0"></a></td>
<a href="http://www.go-mono.com"><img src="images/mono.gif" border="0"></a></td>
<td><img src="images/pixel.gif"></td><!-- right border -->
</tr>
<tr>
@@ -47,13 +47,13 @@
</table>
</td>
<td bgcolor="black" width="1"><img src="images/pixel.gif" width="1"></td>
<td bgcolor="white">
<td bgcolor="white" align="left" width="80%" valign="top">
<table cellpadding="16">
<tr><td>
#CONTENT#
</td></tr>
</table>
</td>
</td>
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
<td width="100"><img src="images/pixel.gif"></td>
</tr>
+151
View File
@@ -0,0 +1,151 @@
Just some thoughts for the JITer:
General issues:
===============
We are designing a JIT compiler, so we have to consider two things:
- the quality of the generated code
- the time needed to generate that code
The current approach is to keep the JITer as simple as possible, and thus as
fast as possible. The generated code quality will suffer from that.
We do not map local variables to registers at the moment, and this makes the
whole JIT much easier, for example we do not need to identify basic block
boundaries or the lifetime of local variables, or select the variables which
are worth to put into a register.
Register allocation is thus done only inside the trees of the forest, and each
tree can use the full set of registers. We simply split a tree if we get out of
registers, for example the following tree:
add(R0)
/ \
/ \
a(R0) add(R1)
/ \
/ \
b(R1) add(R2)
/ \
/ \
c(R2) b(R3)
can be transformed to:
stloc(t1) add(R0)
| / \
| / \
add(R0) a(R0) add(R1)
/ \ / \
/ \ / \
c(R0) b(R1) b(R1) t1(R2)
Please notice that the split trees use less registers than the original
tree.
Triggering JIT compilation:
===========================
The current approach is to call functions indirectly. The address to call is
stored in the MonoMethod structure. For each method we create a trampoline
function. When called, this function does the JIT compilation and replaces the
trampoline with the compiled method address.
Register Allocation:
====================
With lcc you can assign a fixed register to a tree before register
allocation. For example this is needed by call, which return the value always
in EAX on x86. The current implementation works without such system, due to
special forest generation.
X86 Register Allocation:
========================
We can use 8bit or 16bit registers on the x86. If we use that feature we have
more registers to allocate, which maybe prevents some register spills. We
currently ignore that ability and always allocate 32 bit registers, because I
think we would gain very little from that optimisation and it would complicate
the code.
Different Register Sets:
========================
Most processors have more that one register set, at least one for floating
point values, and one for integers. Should we support architectures with more
that two sets? Does someone knows such an architecture?
64bit Integer Values:
=====================
I can imagine two different implementation. On possibility would be to treat
long (64bit) values simply like any other value type. This implies that we
call class methods for ALU operations like add or sub. Sure, this method will
be be a bit inefficient.
The more performant solution is to allocate two 32bit registers for each 64bit
value. We add a new non terminal to the monoburg grammar called long_reg. The
register allocation routines takes care of this non terminal and allocates two
registers for them.
Forest generation:
==================
It seems that trees generated from the CIL language have some special
properties, i.e. the trees already represents basic blocks, so there can be no
branches to the inside of such a tree. All results of those trees are stored to
memory.
One idea was to drive the code generation directly from the CIL code, without
generating an intermediate forest of trees. I think this is not possible,
because you always have to gather some attributes and attach it to the
instruction (for example the register allocation info). So I thing generating a
tree is the right thing and that also works perfectly with monoburg. IMO we
would not get any benefit from trying to feed monoburg directly with CIL
instructions.
DAG handling:
=============
Monoburg can't handle DAGs, instead we need real trees as input for
the code generator. So we have two problems:
1.) DUP instruction: This one is obvious - we need to store the value
into a temporary variable to solve the problem.
2.) function calls: Chapter 12.8, page 343 of "A retargetable C compiler"
explains that: "because listing a call node will give it a hidden reference
from the code list". I don't understand that (can someone explain that?), but
there is another reason to save return values to temporaries: Consider the
following code:
x = f(y) + g(z); // all functions return integers
We could generate such a tree for this expression: STLOC(ADD(CALL,CALL))
The problem is that both calls returns the value in the same register,
so it is non trivial to generate code for that tree. We must copy one
register into another one, which make register allocation more complex.
The easier solution is store the result of function calls to
temporaries. This leads to the following forest:
STLOC(CALL)
STLOC(CALL)
STLOC(ADD (LDLOC, LDLOC))
This is what lcc is doing, if I understood 12.8, page 342, 343?
Value Types:
============
The only CLI instructions which can handle value types are loads and stores,
either to local variable, to the stack or to array elements. Value types with a
size smaller than sizeof(int) are handled like any other basic type. For other
value types we load the base address and emit block copies to store them.
+12 -1
View File
@@ -1 +1,12 @@
Miguel de Icaza ([email protected])
C# Compiler:
Miguel de Icaza ([email protected])
Class Libraries:
Jeff Stedfast ([email protected])
Joe Shaw ([email protected])
Miguel de Icaza ([email protected])
Sean MacIsaac ([email protected])
Vladimir Vukicevic ([email protected])
Garrett Rooney ([email protected])
Bob Smith ([email protected])
John Barnette ([email protected])
+20 -1
View File
@@ -1,2 +1,21 @@
This is the Ximian MCS C# compiler written in C#
This contains the Mono C# compiler as well as the Mono runtime
library.
Layout:
class/
Class libraries
errors/
Sample programs that should generate errors by the compiler.
jay/
Yacc-based parser generator.
mcs/
The Mono C# compiler
tests/
Sample tests
+22
View File
@@ -0,0 +1,22 @@
//
// System.Data.AcceptRejectRule.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Determines the action that occurs when the AcceptChanges or RejectChanges method is invoked on a DataTable with a ForeignKeyConstraint.
/// </summary>
public enum AcceptRejectRule
{
Cascade,
None
}
}
View File
Whitespace-only changes.
+42
View File
@@ -0,0 +1,42 @@
2001-08-30 Christopher Podurgiel <[email protected]>
*AcceptRejectRule.cs: Added
*CommandBehavior.cs: Added
*CommandType.cs: Added
*ConnectionState.cs: Added
*DataColumnChangeEventHandler.cs: Added
*DataRowAction.cs: Added
*DataRowChangeEventHandler.cs: Added
*DataRowState.cs: Added
*DataRowVersion.cs: Added
*DataViewRowState.cs: Added
*DbType.cs: Added
*FillErrorEventHandler.cs: Added
*IColumnMapping.cs: Added
*IColumnMappingCollection.cs: Added
*IDataAdapter.cs: Added
*IDataParameter.cs: Added
*IDataParameterCollection.cs: Added
*IDataReader.cs: Added
*IDataRecord.cs: Added
*IDbCommand.cs: Added
*IDbConnection.cs: Added
*IDbDataAdapter.cs: Added
*IDbTransaction.cs: Added
*IsolationLevel.cs: Added
*ITableMapping.cs: Added
*ITableMappingCollection.cs: Added
*MappingType.cs: Added
*MergeFailedEventHandler.cs: Added
*MissingMappingAction.cs: Added
*MissingSchemaAction.cs: Added
*ParameterDirection.cs: Added
*PropertyAttributes.cs: Added
*Rule.cs: Added
*SchemaType.cs: Added
*SqlDbType.cs: Added
*StateChangeEventHandler.cs: Added
*StatementType.cs: Added
*UpdateRowSource.cs: Added
*UpdateStatus.cs: Added
*XmlReadMode.cs: Added
*XmlWriteMode.cs: Added
+26
View File
@@ -0,0 +1,26 @@
//
// System.Data.CommandBehavior.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies a description of the results and the affect on the database of the query command.
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
/// </summary>
public enum CommandBehavior
{
CloseConnection,
KeyInfo,
SchemaOnly,
SequentialAccess,
SingleResult,
SingleRow
}
}
+21
View File
@@ -0,0 +1,21 @@
//
// System.Data.CommandType.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies how a command string is interpreted.
/// </summary>
public enum CommandType
{
StoredProcedure,
TableDirect,
Text
}
}
+26
View File
@@ -0,0 +1,26 @@
//
// System.Data.ConnectionState.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Returns the current state of the connection to a data source.
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
/// </summary>
public enum ConnectionState
{
Broken,
Closed,
Connecting,
Executing,
Fetching,
Open
}
}
@@ -0,0 +1,17 @@
//
// System.Data.DataColumnChangeEventHandler.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents the method that will handle the the ColumnChanging event.
/// </summary>
public delegate void DataColumnChangeEventHandler(object sender, DataColumnChangeEventArgs e);
}
+26
View File
@@ -0,0 +1,26 @@
//
// System.Data.DataRowAction.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Describes the action taken on a DataRow.
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
/// </summary>
public enum DataRowAction
{
Add,
Change,
Commit,
Delete,
Nothing,
Rollback
}
}
@@ -0,0 +1,17 @@
//
// System.Data.DataRowChangeEventHandler.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents the method that will handle the RowChanging, RowChanged, RowDeleting, and RowDeleted events of a DataTable.
/// </summary>
public delegate void DataRowChangeEventHandler(object sender, DataRowChangeEventArgs e);
}
+24
View File
@@ -0,0 +1,24 @@
//
// System.Data.DataRowState.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Gets the state of a DataRow object.
/// </summary>
public enum DataRowState
{
Added,
Deleted,
Detached,
Modified,
Unchanged
}
}
+22
View File
@@ -0,0 +1,22 @@
//
// System.Data.DataRowVersion.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Describes the version of a DataRow.
/// </summary>
public enum DataRowVersion
{
Current,
Default,
Original,
Proposed
}
}
+27
View File
@@ -0,0 +1,27 @@
//
// System.Data.DataViewRowState.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Describes the version of data in a DataRow.
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
/// </summary>
public enum DataViewRowState
{
Added,
CurrentRows,
Deleted,
ModifiedCurrent,
ModifiedOriginal,
None,
OriginalRows,
Unchanged
}
}
+41
View File
@@ -0,0 +1,41 @@
//
// System.Data.DbType.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Gets the data type of a field, a property, or a Parameter object of a .NET data provider.
/// </summary>
public enum DbType
{
AnsiString,
Binary,
Boolean,
Byte,
Currency,
Date,
DateTime,
Decimal,
Double,
Guid,
Int16,
Int32,
Int64,
Object,
SByte,
Single,
String,
Time,
UInt16,
UInt32,
UInt64,
VarNumeric
}
}
@@ -0,0 +1,17 @@
//
// System.Data.FillErrorEventHandler.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents the method that will handle the FillError event.
/// </summary>
public delegate void FillErrorEventHandler(object sender, FillErrorEventArgs e);
}
+37
View File
@@ -0,0 +1,37 @@
//
// System.Data.IColumnMapping.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Associates a data source column with a DataSet column, and is implemented by the DataColumnMapping class, which is used in common by .NET data providers.
/// </summary>
public interface IColumnMapping
{
string DataSetColumn
{
get
{
}
set
{
}
}
string SourceColumn
{
get
{
}
set
{
}
}
}
}
@@ -0,0 +1,47 @@
//
// System.Data.IColumnMappingCollection.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Contains a collection of ColumnMapping objects, and is implemented by the DataColumnMappingCollection, which is used in common by .NET data providers.
/// </summary>
public interface IColumnMappingCollection : IList, ICollection, IEnumerable
{
IColumnMapping Add(string sourceColumnName, string dataSetColumnName)
{
}
bool Contains(string sourceColumnName)
{
}
IColumnMapping GetByDataSetColumn(string dataSetColumnName)
{
}
int IndexOf(string sourceColumnName)
{
}
void RemoveAt(string sourceColumnName)
{
}
object this[string index]
{
get
{
}
set
{
}
}
}
}
+63
View File
@@ -0,0 +1,63 @@
//
// System.Data.IDataAdapter.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Allows an object to implement a DataAdapter, and represents a set of methods and mapping action-related properties used to fill and refresh a DataSet and update a data source.
/// </summary>
public interface IDataAdapter
{
int Fill(DataSet dataSet)
{
}
DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType)
{
}
IDataParameter[] GetFillParameters();
int Update(DataSet dataSet)
{
}
MissingMappingAction MissingMappingAction
{
get
{
}
set
{
}
}
MissingSchemaAction MissingSchemaAction
{
get
{
}
set
{
}
}
ITableMappingCollection TableMappings
{
get
{
}
set
{
}
}
}
}
+77
View File
@@ -0,0 +1,77 @@
//
// System.Data.IDataParameter.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
/// </summary>
public interface IDataParameter
{
DbType DbType
{
get
{
}
set
{
}
}
ParameterDirection Direction
{
get
{
}
set
{
}
}
bool IsNullable
{
get
{
}
}
string ParameterName
{
get
{
}
set
{
}
}
string SourceColumn
{
get
{
}
set
{
}
}
DataRowVersion SourceVersion
{
get
{
}
set
{
}
}
}
}
@@ -0,0 +1,39 @@
//
// System.Data.IDataParameterCollection.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Collects all parameters relevant to a Command object and their mappings to DataSet columns, and is implemented by .NET data providers that access data sources.
/// </summary>
public interface IDataParameterCollection : IList, ICollection, IEnumerable
{
void RemoveAt(string parameterName)
{
}
int IndexOf(string parameterName)
{
}
bool Contains(string parameterName)
{
}
object this[string parameterName]
{
get
{
}
set
{
}
}
}
}
+56
View File
@@ -0,0 +1,56 @@
//
// System.Data.IDataReader.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a data source, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDataReader : IDataRecord
{
void Close()
{
}
DataTable GetSchemaTable()
{
}
bool NextResult()
{
}
bool Read()
{
}
int Depth
{
get
{
}
}
bool IsClosed
{
get
{
}
}
int RecordsAffected
{
get
{
}
}
}
}
+126
View File
@@ -0,0 +1,126 @@
//
// System.Data.IDataRecord.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Provides access to the column values within each row for a DataReader, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDataRecord
{
bool GetBoolean(int i)
{
}
byte GetByte(int i)
{
}
long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferOffset, int length)
{
}
char GetChar(int i)
{
}
long GetChars(int i, long fieldOffset, char[] buffer, int bufferOffset, int length)
{
}
IDataReader GetDate(int i)
{
}
string GetDataTypeName(int i)
{
}
DateTime GetDateTime(int i)
{
}
decimal GetDecimal(int i)
{
}
double GetDouble(int i)
{
}
Type GetFieldType(int i)
{
}
float GetFloat(int i)
{
}
Guid GetGuid(int i)
{
}
short GetInt16(int i)
{
}
int GetInt32(int i)
{
}
long GetInt64(int i)
{
}
string GetName(int i)
{
}
int GetOrdinal(string name)
{
}
string GetString(int i)
{
}
object GetValue(int i)
{
}
int GetValues(object[] values)
{
}
bool IsDBNull(int i)
{
}
int FieldCount
{
get
{
}
}
object this[string name]
{
get
{
}
}
object this[int i]
{
get
{
}
}
}
}
+113
View File
@@ -0,0 +1,113 @@
//
// System.Data.IDBCommand.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents a SQL statement that is executed while connected to a data source, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDBCommand
{
void Cancel()
{
}
IDataParameter CreateParameter()
{
}
int ExecuteNonQuery()
{
}
IDataReader ExecuteReader()
{
}
IDataReader ExecuteReader(CommandBehavior behavior)
{
}
object ExecuteScalar()
{
}
void Prepare()
{
}
string CommandText
{
get
{
}
set
{
}
}
int CommandTimeout
{
get
{
}
set
{
}
}
CommandTpe CommandType
{
get
{
}
set
{
}
}
IDbConnection Connection
{
get
{
}
set
{
}
}
IDataParameterCollection Parameters
{
get
{
}
}
IDbTransaction Transaction
{
get
{
}
set
{
}
}
UpdateRowSource UpdatedRowSource
{
get
{
}
set
{
}
}
}
}
+74
View File
@@ -0,0 +1,74 @@
//
// System.Data.IDBConnection.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents an open connection to a data source, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDBConnection
{
IDbTransaction BeginTransaction()
{
}
IDbTransaction BeginTransaction(IsolationLevel il)
{
}
void ChangeDatabase(string databaseName)
{
}
void Close()
{
}
IDbCommand CreateCommand()
{
}
void Open()
{
}
string ConnectionString
{
get
{
}
set
{
}
}
int ConnectionTimeout
{
get
{
}
}
string Database
{
get
{
}
}
ConnectionState State
{
get
{
}
}
}
}
+61
View File
@@ -0,0 +1,61 @@
//
// System.Data.IDbDataAdapter.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDbDataAdapter : IDataAdapter
{
IDbCommand DeleteCommand
{
get
{
}
set
{
}
}
IDbCommand InsertCommand
{
get
{
}
set
{
}
}
IDbCommand SelectCommand
{
get
{
}
set
{
}
}
IDbCommand UpdateCommand
{
get
{
}
set
{
}
}
}
}
+33
View File
@@ -0,0 +1,33 @@
//
// System.Data.IDbTransaction.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents a transaction to be performed at a data source, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDbTransaction
{
void Commit()
{
}
void Rollback()
{
}
IsolationLevel IsolationLevel
{
get
{
}
}
}
}
+45
View File
@@ -0,0 +1,45 @@
//
// System.Data.ITableMapping.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Associates a source table with a table in a DataSet, and is implemented by the DataTableMapping class, which is used in common by .NET data providers.
/// </summary>
public interface ITableMapping
{
IColumnMappingCollection ColumnMappings
{
get
{
}
}
string DataSetTable
{
get
{
}
set
{
}
}
string SourceTable
{
get
{
}
set
{
}
}
}
}
@@ -0,0 +1,47 @@
//
// System.Data.ITableMappingCollection.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Contains a collection of TableMapping objects, and is implemented by the DataTableMappingCollection, which is used in common by .NET data providers.
/// </summary>
public interface ITableMappingCollection : IList, ICollection, IEnumerable
{
ITableMapping Add(string sourceTableName, string dataSetTableName)
{
}
bool Contains(string sourceTableName)
{
}
ITableMapping GetByDataSetTable(string dataSetTableName)
{
}
int IndexOf(string sourceTableName)
{
}
void RemoveAt(string sourceTableName)
{
}
object this[string index]
{
get
{
}
set
{
}
}
}
}
+26
View File
@@ -0,0 +1,26 @@
//
// System.Data.IsolationLevel.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies the transaction locking behavior for the connection.
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
/// </summary>
public enum IsolationLevel
{
Chaos,
ReadCommitted,
ReadUnCommitted,
RepeatableRead,
Serializable,
Unspecified
}
}
+22
View File
@@ -0,0 +1,22 @@
//
// System.Data.MappingType.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies how a DataColumn is mapped.
/// </summary>
public enum MappingType
{
Attribute,
Element,
Hidden,
SimpleContent
}
}
@@ -0,0 +1,17 @@
//
// System.Data.MergeFailedEventHandler.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents the method that will handle the MergeFailed event.
/// </summary>
public delegate void MergeFailedEventHandler(object sender, MergeFailedEventArgs e);
}
@@ -0,0 +1,21 @@
//
// System.Data.MissingMappingAction.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Determines the action that occurs when a mapping is missing from a source table or a source column.
/// </summary>
public enum MissingMappingAction
{
Error,
Ignore,
Passthrough
}
}
@@ -0,0 +1,22 @@
//
// System.Data.MissingSchemaAction.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies the action to take when adding data to the DataSet and the required DataTable or DataColumn is missing.
/// </summary>
public enum MissingSchemaAction
{
Add,
AddWithKey,
Error,
Ignore
}
}
@@ -0,0 +1,22 @@
//
// System.Data.ParameterDirection.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies the type of a parameter within a query relative to the DataSet.
/// </summary>
public enum ParameterDirection
{
Input,
InputOutput,
Output,
ReturnValue
}
}
@@ -0,0 +1,24 @@
//
// System.Data.PropertyAttributes.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies the attributes of a property.
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values
/// </summary>
public enum PropertyAttributes
{
NotSupported,
Optional,
Read,
Required,
Write
}
}
+22
View File
@@ -0,0 +1,22 @@
//
// System.Data.Rule.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Indicates the action that occurs when a ForeignKeyConstraint is enforced.
/// </summary>
public enum Rule
{
Cascade,
None,
SetDefault,
SetNull
}
}
+20
View File
@@ -0,0 +1,20 @@
//
// System.Data.SchemaType.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies how to handle existing schema mappings when performing a FillSchema operation.
/// </summary>
public enum SchemaType
{
Mapped,
Source
}
}
+42
View File
@@ -0,0 +1,42 @@
//
// System.Data.SqlDbType.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies SQL Server data types.
/// </summary>
public enum SqlDbType
{
BigInt,
Binary,
Bit,
Char,
DateTime,
Decimal,
Float,
Image,
Int,
Money,
NChar,
NText,
NVarChar,
Real,
SmallDateTime,
SmallInt,
SmallMoney,
Text,
Timestamp,
TinyInt,
UniqueIdentifier,
VarBinary,
VarChar,
Variant
}
}
@@ -0,0 +1,17 @@
//
// System.Data.StateChangeEventHandler.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Represents the method that will handle the StateChange event.
/// </summary>
public delegate void StateChangeEventHandler(object sender, StateChangeEventArgs e);
}
+22
View File
@@ -0,0 +1,22 @@
//
// System.Data.StatementType.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies the type of SQL query to be used by the OleDbRowUpdatedEventArgs, OleDbRowUpdatingEventArgs, SqlRowUpdatedEventArgs, or SqlRowUpdatingEventArgs class.
/// </summary>
public enum StatementType
{
Delete,
Insert,
Select,
Update
}
}
+22
View File
@@ -0,0 +1,22 @@
//
// System.Data.UpdateRowSource.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies how query command results are applied to the row being updated.
/// </summary>
public enum UpdateRowSource
{
Both,
FirstReturnedRecord,
None,
OutputParameters
}
}
+22
View File
@@ -0,0 +1,22 @@
//
// System.Data.UpdateStatus.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies the action to take with regard to the current and remaining rows during an Update.
/// </summary>
public enum UpdateStatus
{
Continue,
ErrorsOccurred,
SkipAllRemainingRows,
SkipCurrentRow
}
}
+24
View File
@@ -0,0 +1,24 @@
//
// System.Data.XmlReadMode.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Specifies how to read XML data and a relational schema into a DataSet.
/// </summary>
public enum XmlReadMode
{
Auto,
DiffGram,
Fragment,
IgnoreSchema,
InferSchema,
ReadSchema
}
}
+21
View File
@@ -0,0 +1,21 @@
//
// System.Data.XmlWriteMode.cs
//
// Author:
// Christopher Podurgiel ([email protected])
//
// (C) Chris Podurgiel
//
namespace System.Data
{
/// <summary>
/// Use the members of this enumeration when setting the WriteMode parameter of the WriteXml method.
/// </summary>
public enum XmlWriteMode
{
DiffGram,
IgnoreSchema,
WriteSchema
}
}
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
@@ -0,0 +1,258 @@
//
// System.Drawing.Drawing2D.Matrix.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
//
// (C) Ximian, Inc. http://www.ximian.com
//
namespace System.Drawing.Drawing2D
{
public enum CombineMode
{
Complement,
Exclude,
Intersect,
Replace,
Union,
Xor
}
public enum CompositingMode
{
SourceCopy,
SourceOver
}
public enum CompositingQuality
{
AssumeLinear,
Default,
GammaCorrected,
HighQuality,
HighSpeed,
Invalid
}
public enum CoordinateSpace
{
Device,
Page,
World
}
public enum DashCap
{
Flat,
Round,
Triangle
}
public enum DashStyle
{
Custom,
Dash,
DashDot,
DashDotDot,
Dot,
Solid
}
public enum FillMode
{
Alternate,
Winding
}
public enum FlushIntention
{
Flush,
Sync
}
public enum HatchStyle
{
BackwardDiagonal,
Cross,
DarkDownwardDiagonal,
DarkHorizontal,
DarkUpwardDiagonal,
DarkVertical,
DashedDownwardDiagonal,
DashedHorizontal,
DashedUpwardDiagonal,
DashedVertical,
DiagonalBrick,
DiagonalCross,
Divot,
DottedDiamond,
DottedGrid,
ForwardDiagonal,
Horizontal,
HorizontalBrick,
LargeCheckerBoard,
LargeConfetti,
LargeGrid,
LightDownwardDiagonal,
LightHorizontal,
LightUpwardDiagonal,
LightVertical,
Max,
Min,
NarrowHorizontal,
NarrowVertical,
OutlinedDiamond,
Percent05,
Percent10,
Percent20,
Percent25,
Percent30,
Percent40,
Percent50,
Percent60,
Percent70,
Percent75,
Percent80,
Percent90,
Plaid,
Shingle,
SmallCheckerBoard,
SmallConfetti,
SmallGrid,
SolidDiamond,
Sphere,
Trellis,
Vertical,
Wave,
Weave,
WideDownwardDiagonal,
WideUpwardDiagonal,
ZigZag
}
public enum InterpolationMode
{
Bicubic,
Bilinear,
Default,
High,
HighQualityBicubic,
HighQualityBilinear,
Invalid,
Low,
NearestNeighbour
}
public enum LinearGradientMode
{
BackwardDiagonal,
ForwardDiagonal,
Horizontal,
Vertical
}
public enum LineCap
{
AnchorMask,
ArrowAnchor,
Custom,
DiamondAnchor,
Flat,
NoAnchor,
Round,
RoundAnchor,
Square,
SquareAnchor,
Triangle
}
public enum LineJoin
{
Bevel,
Miter,
MiterClipped,
Round
}
public enum MatrixOrder
{
Append,
Prepend
}
public enum PathPointType
{
Bezier,
Bezier3,
CloseSubpath,
DashMode,
Line,
PathMarker,
PathTypeMask,
Start
}
public enum PenAlignment
{
Center,
Inset,
Left,
Outset,
Right
}
public enum PenType
{
HatchFill,
LinearGradient,
PathGradient,
SolidColor,
TextureFill
}
public enum PixelOffsetMode
{
Default,
Half,
HighQuality,
HighSpeed,
Invalid,
None
}
public enum QualityMode
{
Default,
Hight,
Invalid,
Low
}
public enum SmoothingMode
{
AntiAlias,
Default,
HighQuality,
HighSpeed,
Invalid,
None
}
public enum WarpMode
{
Bilinear,
Perspective
}
public enum WrapMode
{
Clamp,
Tile,
TileFlipX,
TileFlipXY,
TileFlipY
}
}
@@ -0,0 +1,452 @@
//
// System.Drawing.Drawing2D.Matrix.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
using System.Drawing;
using System.Runtime.InteropServices;
namespace System.Drawing.Drawing2D
{
public sealed class Matrix : MarshalByRefObject, IDisposable
{
// initialize to identity
private float[] m = {1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f};
// constructors
public Matrix() { }
/* TODO: depends on System.Drawing.Drawing2D.Rectangle
public Matrix(Rectangle rect , Point[] plgpts)
{
// TODO
}
*/
/* TODO: depends on System.Drawing.Drawing2D.RectangleF
public Matrix(RectangleF rect , PointF[] pa)
{
// TODO
}
*/
public Matrix(float m11, float m12,
float m21, float m22,
float dx, float dy)
{
m[0] = m11; m[1] = m12;
m[2] = m21; m[3] = m22;
m[4] = dx; m[5] = dy;
}
// properties
public float[] Elements
{
get { return m; }
}
public bool IsIdentity
{
get
{
if ( (m[0] == 1.0f) && (m[1] == 0.0f) &&
(m[2] == 0.0f) && (m[3] == 1.0f) &&
(m[4] == 0.0f) && (m[5] == 0.0f) )
return true;
else
return false;
}
}
public bool IsInvertible
{
get
{
// matrix M is invertible if det(M) != 0
float det = m[0] * m[3] - m[2] * m[1];
if (det != 0.0f) return true;
else return false;
}
}
public float OffsetX
{
get { return m[4]; }
}
public float OffsetY
{
get { return m[5]; }
}
// methods
public Matrix Clone()
{
return new Matrix(m[0], m[1], m[2], m[3], m[4], m[5]);
}
public void Dispose() { }
public override bool Equals(object obj)
{
if (obj is Matrix)
{
float[] a = ((Matrix)obj).Elements;
if ( m[0] == a[0] && m[1] == a[1] &&
m[2] == a[2] && m[3] == a[3] &&
m[4] == a[4] && m[5] == a[5] )
return true;
else
return false;
}
else
{
return false;
}
}
~Matrix() {}
[StructLayout(LayoutKind.Explicit)]
internal struct BitConverter
{
[FieldOffset(0)] public float f;
[FieldOffset(0)] public int i;
}
public override int GetHashCode()
{
BitConverter b;
// compiler is not smart
b.i = 0;
int h = 0;
for (int i = 0; i < 6; i++)
{
b.f = m[i];
h ^= b.i >> i;
}
return h;
}
public void Invert()
{
float det = m[0] * m[3] - m[2] * m[1];
if (det != 0.0f) // if invertible
{
float[] r =
{
m[3] / det,
-m[1] / det,
-m[2] / det,
m[0] / det,
(-m[3] * m[4] + m[1] * m[5]) / det,
(m[2] * m[4] - m[0] * m[5]) / det
};
m = r;
}
}
public void Multiply(Matrix matrix)
{
Multiply(matrix, MatrixOrder.Prepend);
}
public void Multiply(Matrix matrix, MatrixOrder order)
{
switch (order)
{
case MatrixOrder.Prepend:
// this = matrix * this
float[] p = matrix.Elements;
float[] r0 =
{
p[0] * m[0] + p[1] * m[2],
p[0] * m[1] + p[1] * m[3],
p[2] * m[0] + p[3] * m[2],
p[2] * m[1] + p[3] * m[3],
p[4] * m[0] + p[5] * m[2] + m[4],
p[4] * m[1] + p[5] * m[3] + m[5]
};
m = r0;
break;
case MatrixOrder.Append:
// this = this * matrix
float[] a = matrix.Elements;
float[] r1 =
{
m[0] * a[0] + m[1] * a[2],
m[0] * a[1] + m[1] * a[3],
m[2] * a[0] + m[3] * a[2],
m[2] * a[1] + m[3] * a[3],
m[4] * a[0] + m[5] * a[2] + a[4],
m[4] * a[1] + m[5] * a[3] + a[5]
};
m = r1;
break;
}
}
public void Reset()
{
m[0] = 1.0f; m[1] = 0.0f;
m[2] = 0.0f; m[3] = 1.0f;
m[4] = 0.0f; m[5] = 0.0f;
}
public void Rotate(float angle)
{
Rotate(angle, MatrixOrder.Prepend);
}
public void Rotate(float angle, MatrixOrder order)
{
angle *= (float)(Math.PI / 180.0); // degrees to randians
float cos = (float)Math.Cos(angle);
float sin = (float)Math.Sin(angle);
switch (order)
{
case MatrixOrder.Prepend:
// this = rotation * this
float[] r0 =
{
cos * m[0] + sin * m[2],
cos * m[1] + sin * m[3],
-sin * m[0] + cos * m[2],
-sin * m[1] + cos * m[3],
m[4],
m[5]
};
m = r0;
break;
case MatrixOrder.Append:
// this = this * rotation
float[] r1 =
{
m[0] * cos + m[1] * -sin,
m[0] * sin + m[1] * cos,
m[2] * cos + m[3] * -sin,
m[2] * sin + m[3] * cos,
m[4] * cos + m[5] * -sin,
m[4] * sin + m[5] * cos
};
m = r1;
break;
}
}
public void RotateAt(float angle, PointF point)
{
RotateAt(angle, point, MatrixOrder.Prepend);
}
public void RotateAt(float angle, PointF point, MatrixOrder order)
{
angle *= (float)(Math.PI / 180.0); // degrees to randians
float cos = (float)Math.Cos(angle);
float sin = (float)Math.Sin(angle);
float e4 = -point.X * cos + point.Y * sin + point.X;
float e5 = -point.X * sin - point.Y * cos + point.Y;
switch (order)
{
case MatrixOrder.Prepend:
// this = rotation * this
float[] r0 =
{
cos * m[0] + sin * m[2],
cos * m[1] + sin * m[3],
-sin * m[0] + cos * m[2],
-sin * m[1] + cos * m[3],
e4 * m[0] + e5 * m[2] + m[4],
e4 * m[1] + e5 * m[3] + m[5]
};
m = r0;
break;
case MatrixOrder.Append:
// this = this * rotation
float[] r1 =
{
m[0] * cos + m[1] * -sin,
m[0] * sin + m[1] * cos,
m[2] * cos + m[3] * -sin,
m[2] * sin + m[3] * cos,
m[4] * cos + m[5] * -sin + e4,
m[4] * sin + m[5] * cos + e5
};
m = r1;
break;
}
}
public void Scale(float scaleX, float scaleY)
{
Scale(scaleX, scaleY, MatrixOrder.Prepend);
}
public void Scale(float scaleX, float scaleY, MatrixOrder order)
{
switch (order)
{
case MatrixOrder.Prepend:
// this = scale * this
m[0] *= scaleX; m[1] *= scaleX;
m[2] *= scaleY; m[3] *= scaleY;
break;
case MatrixOrder.Append:
// this = this * scale
m[0] *= scaleX; m[1] *= scaleY;
m[2] *= scaleX; m[3] *= scaleY;
m[4] *= scaleX; m[5] *= scaleY;
break;
}
}
public void Shear(float shearX, float shearY)
{
Shear(shearX, shearY, MatrixOrder.Prepend);
}
// LAMESPEC: quote from beta 2 sdk docs: "[To be supplied!]"
//
// assuming transformation matrix:
//
// (1 shearY 0)
// (shearX 1 0)
// (0 0 1)
//
public void Shear(float shearX, float shearY, MatrixOrder order)
{
switch (order)
{
case MatrixOrder.Prepend:
// this = shear * this
float[] r0 =
{
m[0] + shearY * m[2],
m[1] + shearY * m[3],
shearX * m[0] + m[2],
shearX * m[1] + m[3],
m[4],
m[5]
};
m = r0;
break;
case MatrixOrder.Append:
// this = this * shear
float[] r1 =
{
m[0] + m[1] * shearX,
m[0] * shearY + m[1],
m[2] + m[3] * shearX,
m[2] * shearY + m[3],
m[4] + m[5] * shearX ,
m[4] * shearY + m[5]
};
m = r1;
break;
}
}
public void TransformPoints(Point[] pts)
{
for (int i = 0; i < pts.Length; i++)
{
float x = (float)pts[i].X;
float y = (float)pts[i].Y;
pts[i].X = (int)(x * m[0] + y * m[2] + m[4]);
pts[i].Y = (int)(x * m[1] + y * m[3] + m[5]);
}
}
public void TransformPoints(PointF[] pts)
{
for (int i = 0; i < pts.Length; i++)
{
float x = pts[i].X;
float y = pts[i].Y;
pts[i].X = x * m[0] + y * m[2] + m[4];
pts[i].Y = x * m[1] + y * m[3] + m[5];
}
}
public void TransformVectors(Point[] pts)
{
for (int i = 0; i < pts.Length; i++)
{
float x = (float)pts[i].X;
float y = (float)pts[i].Y;
pts[i].X = (int)(x * m[0] + y * m[2]);
pts[i].Y = (int)(x * m[1] + y * m[3]);
}
}
public void TransformVectors(PointF[] pts)
{
for (int i = 0; i < pts.Length; i++)
{
float x = pts[i].X;
float y = pts[i].Y;
pts[i].X = x * m[0] + y * m[2];
pts[i].Y = x * m[1] + y * m[3];
}
}
public void Translate(float offsetX, float offsetY)
{
Translate(offsetX, offsetY, MatrixOrder.Prepend);
}
public void Translate(float offsetX, float offsetY, MatrixOrder order)
{
switch (order)
{
case MatrixOrder.Prepend:
// this = translation * this
m[4] = offsetX * m[0] + offsetY * m[2] + m[4];
m[5] = offsetX * m[1] + offsetY * m[3] + m[5];
break;
case MatrixOrder.Append:
// this = this * translation
m[4] += offsetX;
m[5] += offsetY;
break;
}
}
// LAMESPEC: quote from beta 2 sdk docs: "[To be supplied!]"
public void VectorTransformPoints(Point[] pts)
{
// TODO
}
// some simple test (TODO: remove)
/*
public static void Main()
{
PointF[] p = {new PointF(1.0f, 2.0f)};
Console.WriteLine("(" + p[0].X + " " + p[0].Y + ")");
Matrix m = new Matrix();
m.Translate(1.0f, 1.0f);
m.Scale(2.0f, 2.0f);
m.Rotate(180.0f);
m.TransformPoints(p);
Console.WriteLine("(" + p[0].X + " " + p[0].Y + ")");
m.Invert();
m.TransformPoints(p);
Console.WriteLine("(" + p[0].X + " " + p[0].Y + ")");
Matrix a = new Matrix(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f);
Matrix b = new Matrix(2.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f);
Console.WriteLine("h(a) = " + a.GetHashCode());
Console.WriteLine("h(b) = " + b.GetHashCode());
}
*/
}
}
@@ -0,0 +1,2 @@
Enums.cs
Matrix.cs
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,8 @@
2001-08-17 Mike Kestner <[email protected]>
* PointF.cs, Size.cs, SizeF.cs : New struct implementations.
2001-08-16 Mike Kestner <[email protected]>
* Point.cs : New. Implementation of System.Drawing.Point struct.
@@ -0,0 +1,339 @@
//
// System.Drawing.Point.cs
//
// Author:
// Mike Kestner ([email protected])
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
namespace System.Drawing {
public struct Point {
// Private x and y coordinate fields.
int cx, cy;
// -----------------------
// Public Shared Members
// -----------------------
/// <summary>
/// Empty Shared Field
/// </summary>
///
/// <remarks>
/// An uninitialized Point Structure.
/// </remarks>
public static readonly Point Empty;
/// <summary>
/// Ceiling Shared Method
/// </summary>
///
/// <remarks>
/// Produces a Point structure from a PointF structure by
/// taking the ceiling of the X and Y properties.
/// </remarks>
public static Point Ceiling (PointF value)
{
int x, y;
checked {
x = (int) Math.Ceiling (value.X);
y = (int) Math.Ceiling (value.Y);
}
return new Point (x, y);
}
/// <summary>
/// Round Shared Method
/// </summary>
///
/// <remarks>
/// Produces a Point structure from a PointF structure by
/// rounding the X and Y properties.
/// </remarks>
public static Point Round (PointF value)
{
int x, y;
checked {
x = (int) Math.Round (value.X);
y = (int) Math.Round (value.Y);
}
return new Point (x, y);
}
/// <summary>
/// Truncate Shared Method
/// </summary>
///
/// <remarks>
/// Produces a Point structure from a PointF structure by
/// truncating the X and Y properties.
/// </remarks>
// LAMESPEC: Should this be floor, or a pure cast to int?
public static Point Truncate (PointF value)
{
int x, y;
checked {
x = (int) value.X;
y = (int) value.Y;
}
return new Point (x, y);
}
/// <summary>
/// Addition Operator
/// </summary>
///
/// <remarks>
/// Translates a Point using the Width and Height
/// properties of the given <typeref>Size</typeref>.
/// </remarks>
public static Point operator + (Point pt, Size sz)
{
return new Point (pt.X + sz.Width, pt.Y + sz.Height);
}
/// <summary>
/// Equality Operator
/// </summary>
///
/// <remarks>
/// Compares two Point objects. The return value is
/// based on the equivalence of the X and Y properties
/// of the two points.
/// </remarks>
public static bool operator == (Point pt_a, Point pt_b)
{
return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y));
}
/// <summary>
/// Inequality Operator
/// </summary>
///
/// <remarks>
/// Compares two Point objects. The return value is
/// based on the equivalence of the X and Y properties
/// of the two points.
/// </remarks>
public static bool operator != (Point pt_a, Point pt_b)
{
return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y));
}
/// <summary>
/// Subtraction Operator
/// </summary>
///
/// <remarks>
/// Translates a Point using the negation of the Width
/// and Height properties of the given Size.
/// </remarks>
public static Point operator - (Point pt, Size sz)
{
return new Point (pt.X - sz.Width, pt.Y - sz.Height);
}
/// <summary>
/// Point to Size Conversion
/// </summary>
///
/// <remarks>
/// Returns a Size based on the Coordinates of a given
/// Point. Requires explicit cast.
/// </remarks>
public static explicit operator Size (Point pt)
{
return new Size (pt.X, pt.Y);
}
/// <summary>
/// Point to PointF Conversion
/// </summary>
///
/// <remarks>
/// Creates a PointF based on the coordinates of a given
/// Point. No explicit cast is required.
/// </remarks>
public static implicit operator PointF (Point pt)
{
return new PointF (pt.X, pt.Y);
}
// -----------------------
// Public Constructors
// -----------------------
/// <summary>
/// Point Constructor
/// </summary>
///
/// <remarks>
/// Creates a Point from an integer which holds the X
/// coordinate in the high order 16 bits and the Y
/// coordinate in the low order 16 bits.
/// </remarks>
public Point (int dw)
{
cx = dw >> 16;
cy = dw & 0xffff;
}
/// <summary>
/// Point Constructor
/// </summary>
///
/// <remarks>
/// Creates a Point from a Size value.
/// </remarks>
public Point (Size sz)
{
cx = sz.Width;
cy = sz.Height;
}
/// <summary>
/// Point Constructor
/// </summary>
///
/// <remarks>
/// Creates a Point from a specified x,y coordinate pair.
/// </remarks>
public Point (int x, int y)
{
cx = x;
cy = y;
}
// -----------------------
// Public Instance Members
// -----------------------
/// <summary>
/// IsEmpty Property
/// </summary>
///
/// <remarks>
/// Indicates if both X and Y are zero.
/// </remarks>
public bool IsEmpty {
get {
return ((cx == 0) && (cy == 0));
}
}
/// <summary>
/// X Property
/// </summary>
///
/// <remarks>
/// The X coordinate of the Point.
/// </remarks>
public int X {
get {
return cx;
}
set {
cx = value;
}
}
/// <summary>
/// Y Property
/// </summary>
///
/// <remarks>
/// The Y coordinate of the Point.
/// </remarks>
public int Y {
get {
return cy;
}
set {
cy = value;
}
}
/// <summary>
/// Equals Method
/// </summary>
///
/// <remarks>
/// Checks equivalence of this Point and another object.
/// </remarks>
public override bool Equals (object o)
{
if (!(o is Point))
return false;
return (this == (Point) o);
}
/// <summary>
/// GetHashCode Method
/// </summary>
///
/// <remarks>
/// Calculates a hashing value.
/// </remarks>
public override int GetHashCode ()
{
return cx^cy;
}
/// <summary>
/// Offset Method
/// </summary>
///
/// <remarks>
/// Moves the Point a specified distance.
/// </remarks>
public void Offset (int dx, int dy)
{
cx += dx;
cy += dy;
}
/// <summary>
/// ToString Method
/// </summary>
///
/// <remarks>
/// Formats the Point as a string in coordinate notation.
/// </remarks>
public override string ToString ()
{
return String.Format ("[{0},{1}]", cx, cy);
}
}
}
@@ -0,0 +1,204 @@
//
// System.Drawing.PointF.cs
//
// Author:
// Mike Kestner ([email protected])
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
namespace System.Drawing {
public struct PointF {
// Private x and y coordinate fields.
float cx, cy;
// -----------------------
// Public Shared Members
// -----------------------
/// <summary>
/// Empty Shared Field
/// </summary>
///
/// <remarks>
/// An uninitialized PointF Structure.
/// </remarks>
public static readonly PointF Empty;
/// <summary>
/// Addition Operator
/// </summary>
///
/// <remarks>
/// Translates a PointF using the Width and Height
/// properties of the given Size.
/// </remarks>
public static PointF operator + (PointF pt, Size sz)
{
return new PointF (pt.X + sz.Width, pt.Y + sz.Height);
}
/// <summary>
/// Equality Operator
/// </summary>
///
/// <remarks>
/// Compares two PointF objects. The return value is
/// based on the equivalence of the X and Y properties
/// of the two points.
/// </remarks>
public static bool operator == (PointF pt_a, PointF pt_b)
{
return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y));
}
/// <summary>
/// Inequality Operator
/// </summary>
///
/// <remarks>
/// Compares two PointF objects. The return value is
/// based on the equivalence of the X and Y properties
/// of the two points.
/// </remarks>
public static bool operator != (PointF pt_a, PointF pt_b)
{
return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y));
}
/// <summary>
/// Subtraction Operator
/// </summary>
///
/// <remarks>
/// Translates a PointF using the negation of the Width
/// and Height properties of the given Size.
/// </remarks>
public static PointF operator - (PointF pt, Size sz)
{
return new PointF (pt.X - sz.Width, pt.Y - sz.Height);
}
// -----------------------
// Public Constructor
// -----------------------
/// <summary>
/// PointF Constructor
/// </summary>
///
/// <remarks>
/// Creates a PointF from a specified x,y coordinate pair.
/// </remarks>
public PointF (float x, float y)
{
cx = x;
cy = y;
}
// -----------------------
// Public Instance Members
// -----------------------
/// <summary>
/// IsEmpty Property
/// </summary>
///
/// <remarks>
/// Indicates if both X and Y are zero.
/// </remarks>
public bool IsEmpty {
get {
return ((cx == 0.0) && (cy == 0.0));
}
}
/// <summary>
/// X Property
/// </summary>
///
/// <remarks>
/// The X coordinate of the PointF.
/// </remarks>
public float X {
get {
return cx;
}
set {
cx = value;
}
}
/// <summary>
/// Y Property
/// </summary>
///
/// <remarks>
/// The Y coordinate of the PointF.
/// </remarks>
public float Y {
get {
return cy;
}
set {
cy = value;
}
}
/// <summary>
/// Equals Method
/// </summary>
///
/// <remarks>
/// Checks equivalence of this PointF and another object.
/// </remarks>
public override bool Equals (object o)
{
if (!(o is PointF))
return false;
return (this == (PointF) o);
}
/// <summary>
/// GetHashCode Method
/// </summary>
///
/// <remarks>
/// Calculates a hashing value.
/// </remarks>
public override int GetHashCode ()
{
return (int) cx ^ (int) cy;
}
/// <summary>
/// ToString Method
/// </summary>
///
/// <remarks>
/// Formats the PointF as a string in coordinate notation.
/// </remarks>
public override string ToString ()
{
return String.Format ("[{0},{1}]", cx, cy);
}
}
}
@@ -0,0 +1,309 @@
//
// System.Drawing.Size.cs
//
// Author:
// Mike Kestner ([email protected])
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
namespace System.Drawing {
public struct Size {
// Private height and width fields.
int wd, ht;
// -----------------------
// Public Shared Members
// -----------------------
/// <summary>
/// Empty Shared Field
/// </summary>
///
/// <remarks>
/// An uninitialized Size Structure.
/// </remarks>
public static readonly Size Empty;
/// <summary>
/// Ceiling Shared Method
/// </summary>
///
/// <remarks>
/// Produces a Size structure from a SizeF structure by
/// taking the ceiling of the Width and Height properties.
/// </remarks>
public static Size Ceiling (SizeF value)
{
int w, h;
checked {
w = (int) Math.Ceiling (value.Width);
h = (int) Math.Ceiling (value.Height);
}
return new Size (w, h);
}
/// <summary>
/// Round Shared Method
/// </summary>
///
/// <remarks>
/// Produces a Size structure from a SizeF structure by
/// rounding the Width and Height properties.
/// </remarks>
public static Size Round (SizeF value)
{
int w, h;
checked {
w = (int) Math.Round (value.Width);
h = (int) Math.Round (value.Height);
}
return new Size (w, h);
}
/// <summary>
/// Truncate Shared Method
/// </summary>
///
/// <remarks>
/// Produces a Size structure from a SizeF structure by
/// truncating the Width and Height properties.
/// </remarks>
public static Size Truncate (SizeF value)
{
int w, h;
checked {
w = (int) value.Width;
h = (int) value.Height;
}
return new Size (w, h);
}
/// <summary>
/// Addition Operator
/// </summary>
///
/// <remarks>
/// Addition of two Size structures.
/// </remarks>
public static Size operator + (Size sz1, Size sz2)
{
return new Size (sz1.Width + sz2.Width,
sz1.Height + sz2.Height);
}
/// <summary>
/// Equality Operator
/// </summary>
///
/// <remarks>
/// Compares two Size objects. The return value is
/// based on the equivalence of the Width and Height
/// properties of the two Sizes.
/// </remarks>
public static bool operator == (Size sz_a, Size sz_b)
{
return ((sz_a.Width == sz_b.Width) &&
(sz_a.Height == sz_b.Height));
}
/// <summary>
/// Inequality Operator
/// </summary>
///
/// <remarks>
/// Compares two Size objects. The return value is
/// based on the equivalence of the Width and Height
/// properties of the two Sizes.
/// </remarks>
public static bool operator != (Size sz_a, Size sz_b)
{
return ((sz_a.Width != sz_b.Width) ||
(sz_a.Height != sz_b.Height));
}
/// <summary>
/// Subtraction Operator
/// </summary>
///
/// <remarks>
/// Subtracts two Size structures.
/// </remarks>
public static Size operator - (Size sz1, Size sz2)
{
return new Size (sz1.Width - sz2.Width,
sz1.Height - sz2.Height);
}
/// <summary>
/// Size to Point Conversion
/// </summary>
///
/// <remarks>
/// Returns a Point based on the dimensions of a given
/// Size. Requires explicit cast.
/// </remarks>
public static explicit operator Point (Size sz)
{
return new Point (sz.Width, sz.Height);
}
/// <summary>
/// Size to SizeF Conversion
/// </summary>
///
/// <remarks>
/// Creates a SizeF based on the dimensions of a given
/// Size. No explicit cast is required.
/// </remarks>
public static implicit operator SizeF (Size sz)
{
return new SizeF (sz.Width, sz.Height);
}
// -----------------------
// Public Constructors
// -----------------------
/// <summary>
/// Size Constructor
/// </summary>
///
/// <remarks>
/// Creates a Size from a Point value.
/// </remarks>
public Size (Point pt)
{
wd = pt.X;
ht = pt.Y;
}
/// <summary>
/// Size Constructor
/// </summary>
///
/// <remarks>
/// Creates a Size from specified dimensions.
/// </remarks>
public Size (int width, int height)
{
wd = width;
ht = height;
}
// -----------------------
// Public Instance Members
// -----------------------
/// <summary>
/// IsEmpty Property
/// </summary>
///
/// <remarks>
/// Indicates if both Width and Height are zero.
/// </remarks>
public bool IsEmpty {
get {
return ((wd == 0) && (ht == 0));
}
}
/// <summary>
/// Width Property
/// </summary>
///
/// <remarks>
/// The Width coordinate of the Size.
/// </remarks>
public int Width {
get {
return wd;
}
set {
wd = value;
}
}
/// <summary>
/// Height Property
/// </summary>
///
/// <remarks>
/// The Height coordinate of the Size.
/// </remarks>
public int Height {
get {
return ht;
}
set {
ht = value;
}
}
/// <summary>
/// Equals Method
/// </summary>
///
/// <remarks>
/// Checks equivalence of this Size and another object.
/// </remarks>
public override bool Equals (object o)
{
if (!(o is Size))
return false;
return (this == (Size) o);
}
/// <summary>
/// GetHashCode Method
/// </summary>
///
/// <remarks>
/// Calculates a hashing value.
/// </remarks>
public override int GetHashCode ()
{
return wd^ht;
}
/// <summary>
/// ToString Method
/// </summary>
///
/// <remarks>
/// Formats the Size as a string in coordinate notation.
/// </remarks>
public override string ToString ()
{
return String.Format ("[{0},{1}]", wd, ht);
}
}
}
@@ -0,0 +1,249 @@
//
// System.Drawing.SizeF.cs
//
// Author:
// Mike Kestner ([email protected])
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
namespace System.Drawing {
public struct SizeF {
// Private height and width fields.
float wd, ht;
// -----------------------
// Public Shared Members
// -----------------------
/// <summary>
/// Empty Shared Field
/// </summary>
///
/// <remarks>
/// An uninitialized SizeF Structure.
/// </remarks>
public static readonly SizeF Empty;
/// <summary>
/// Addition Operator
/// </summary>
///
/// <remarks>
/// Addition of two SizeF structures.
/// </remarks>
public static SizeF operator + (SizeF sz1, SizeF sz2)
{
return new SizeF (sz1.Width + sz2.Width,
sz1.Height + sz2.Height);
}
/// <summary>
/// Equality Operator
/// </summary>
///
/// <remarks>
/// Compares two SizeF objects. The return value is
/// based on the equivalence of the Width and Height
/// properties of the two Sizes.
/// </remarks>
public static bool operator == (SizeF sz_a, SizeF sz_b)
{
return ((sz_a.Width == sz_b.Width) &&
(sz_a.Height == sz_b.Height));
}
/// <summary>
/// Inequality Operator
/// </summary>
///
/// <remarks>
/// Compares two SizeF objects. The return value is
/// based on the equivalence of the Width and Height
/// properties of the two Sizes.
/// </remarks>
public static bool operator != (SizeF sz_a, SizeF sz_b)
{
return ((sz_a.Width != sz_b.Width) ||
(sz_a.Height != sz_b.Height));
}
/// <summary>
/// Subtraction Operator
/// </summary>
///
/// <remarks>
/// Subtracts two SizeF structures.
/// </remarks>
public static SizeF operator - (SizeF sz1, SizeF sz2)
{
return new SizeF (sz1.Width - sz2.Width,
sz1.Height - sz2.Height);
}
/// <summary>
/// SizeF to PointF Conversion
/// </summary>
///
/// <remarks>
/// Returns a PointF based on the dimensions of a given
/// SizeF. Requires explicit cast.
/// </remarks>
public static explicit operator PointF (SizeF sz)
{
return new PointF (sz.Width, sz.Height);
}
// -----------------------
// Public Constructors
// -----------------------
/// <summary>
/// SizeF Constructor
/// </summary>
///
/// <remarks>
/// Creates a SizeF from a PointF value.
/// </remarks>
public SizeF (PointF pt)
{
wd = pt.X;
ht = pt.Y;
}
/// <summary>
/// SizeF Constructor
/// </summary>
///
/// <remarks>
/// Creates a SizeF from an existing SizeF value.
/// </remarks>
public SizeF (SizeF sz)
{
wd = sz.Width;
ht = sz.Height;
}
/// <summary>
/// SizeF Constructor
/// </summary>
///
/// <remarks>
/// Creates a SizeF from specified dimensions.
/// </remarks>
public SizeF (float width, float height)
{
wd = width;
ht = height;
}
// -----------------------
// Public Instance Members
// -----------------------
/// <summary>
/// IsEmpty Property
/// </summary>
///
/// <remarks>
/// Indicates if both Width and Height are zero.
/// </remarks>
public bool IsEmpty {
get {
return ((wd == 0.0) && (ht == 0.0));
}
}
/// <summary>
/// Width Property
/// </summary>
///
/// <remarks>
/// The Width coordinate of the SizeF.
/// </remarks>
public float Width {
get {
return wd;
}
set {
wd = value;
}
}
/// <summary>
/// Height Property
/// </summary>
///
/// <remarks>
/// The Height coordinate of the SizeF.
/// </remarks>
public float Height {
get {
return ht;
}
set {
ht = value;
}
}
/// <summary>
/// Equals Method
/// </summary>
///
/// <remarks>
/// Checks equivalence of this SizeF and another object.
/// </remarks>
public override bool Equals (object o)
{
if (!(o is SizeF))
return false;
return (this == (SizeF) o);
}
/// <summary>
/// GetHashCode Method
/// </summary>
///
/// <remarks>
/// Calculates a hashing value.
/// </remarks>
public override int GetHashCode ()
{
return (int) wd ^ (int) ht;
}
/// <summary>
/// ToString Method
/// </summary>
///
/// <remarks>
/// Formats the SizeF as a string in coordinate notation.
/// </remarks>
public override string ToString ()
{
return String.Format ("[{0},{1}]", wd, ht);
}
}
}
+6 -1
View File
@@ -1,4 +1,9 @@
all: windows
windows:
$(csc) /target:library /out:System.Drawing.dll /nowarn:1595 /recurse:*.cs
$(CSC) /target:library /out:System.Drawing.dll /nowarn:1595 /recurse:*.cs
clean:
if test -e System.Drawing.dll; then \
rm System.Drawing.dll; \
fi; \
+16
View File
@@ -0,0 +1,16 @@
2001-08-22 Bob Smith <[email protected]>
* Added directory: System.Web.UI.HtmlControls
* Added directory: Test
2001-08-17 Bob Smith <[email protected]>
* Added directory: System.Web.UI
2001-08-09 Bob Smith <[email protected]>
* Added directory: System.Web
2001-07-20 Patrik Torstensson ([email protected])
* Added directory: System.Web.Caching
@@ -0,0 +1,520 @@
//
// System.Web.Caching
//
// Author:
// Patrik Torstensson ([email protected])
//
// (C) Copyright Patrik Torstensson, 2001
//
namespace System.Web.Caching
{
/// <summary>
/// Implements a cache for Web applications and other. The difference from the MS.NET implementation is that we
/// support to use the Cache object as cache in our applications.
/// </summary>
/// <remarks>
/// The Singleton cache is created per application domain, and it remains valid as long as the application domain remains active.
/// </remarks>
/// <example>
/// Usage of the singleton cache:
///
/// Cache objManager = Cache.SingletonCache;
///
/// String obj = "tobecached";
/// objManager.Add("kalle", obj);
/// </example>
public class Cache : System.Collections.IEnumerable, System.IDisposable
{
// Declarations
// MS.NET Does only have the cache connected to the HttpRuntime and we don't have the HttpRuntime (yet)
static Cache objSingletonCache = new Cache();
private bool _boolDisposed;
// Helper objects
private CacheExpires _objExpires;
// The data storage
// Todo: Make a specialized storage for the cache entries?
// todo: allow system to replace the storage?
private System.Collections.Hashtable _arrEntries;
private System.Threading.ReaderWriterLock _lockEntries;
static private System.TimeSpan _datetimeOneYear = System.TimeSpan.FromDays(365);
// Number of items in the cache
private long _longItems;
// Constructor
public Cache()
{
_boolDisposed = false;
_longItems = 0;
_lockEntries = new System.Threading.ReaderWriterLock();
_arrEntries = new System.Collections.Hashtable();
_objExpires = new CacheExpires(this);
}
// Public methods and properties
//
/// <summary>
/// Returns a static version of the cache. In MS.NET the cache is stored in the System.Web.HttpRuntime
/// but we keep it here as a singleton (right now anyway).
/// </summary>
public static Cache SingletonCache
{
get
{
if (objSingletonCache == null)
{
throw new System.InvalidOperationException();
}
return objSingletonCache;
}
}
/// <summary>
/// Used in the absoluteExpiration parameter in an Insert method call to indicate the item should never expire. This field is read-only.
/// </summary>
public static readonly System.DateTime NoAbsoluteExpiration = System.DateTime.MaxValue;
/// <summary>
/// Used as the slidingExpiration parameter in an Insert method call to disable sliding expirations. This field is read-only.
/// </summary>
public static readonly System.TimeSpan NoSlidingExpiration = System.TimeSpan.Zero;
/// <summary>
/// Internal method to create a enumerator and over all public items in the cache and is used by GetEnumerator method.
/// </summary>
/// <returns>Returns IDictionaryEnumerator that contains all public items in the cache</returns>
private System.Collections.IDictionaryEnumerator CreateEnumerator()
{
System.Collections.Hashtable objTable;
_lockEntries.AcquireReaderLock(int.MaxValue);
try
{
// Create a new hashtable to return as collection of public items
objTable = new System.Collections.Hashtable(_arrEntries.Count);
foreach(System.Collections.DictionaryEntry objEntry in _arrEntries)
{
if (objEntry.Key != null)
{
// Check if this is a public entry
if (((CacheEntry) objEntry.Value).TestFlag(CacheEntry.Flags.Public))
{
// Add to the collection
objTable.Add(objEntry.Key, ((CacheEntry) objEntry.Value).Item);
}
}
}
}
finally
{
_lockEntries.ReleaseReaderLock();
}
return objTable.GetEnumerator();
}
/// <summary>
/// Implementation of IEnumerable interface and calls the GetEnumerator that returns
/// IDictionaryEnumerator.
/// </summary>
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
/// <summary>
/// Virtual override of the IEnumerable.GetEnumerator() method, returns a specialized enumerator.
/// </summary>
public virtual System.Collections.IDictionaryEnumerator GetEnumerator()
{
return CreateEnumerator();
}
/// <summary>
/// Touches a object in the cache. Used to update expire time and hit count.
/// </summary>
/// <param name="strKey">The identifier for the cache item to retrieve.</param>
public void Touch(string strKey)
{
// Just touch the object
Get(strKey);
}
/// <summary>
/// Adds the specified item to the Cache object with dependencies, expiration and priority policies, and a
/// delegate you can use to notify your application when the inserted item is removed from the Cache.
/// </summary>
/// <param name="strKey">The cache key used to reference the item.</param>
/// <param name="objItem">The item to be added to the cache.</param>
/// <param name="objDependency">The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.</param>
/// <param name="absolutExpiration">The time at which the added object expires and is removed from the cache. </param>
/// <param name="slidingExpiration">The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.</param>
/// <param name="enumPriority">The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.</param>
/// <param name="enumPriorityDecay">The rate at which an object in the cache decays in importance. Objects that decay quickly are more likely to be removed.</param>
/// <param name="eventRemoveCallback">A delegate that, if provided, is called when an object is removed from the cache. You can use this to notify applications when their objects are deleted from the cache.</param>
/// <returns>The Object item added to the Cache.</returns>
public object Add(string strKey, object objItem, CacheDependency objDependency, System.DateTime absolutExpiration, System.TimeSpan slidingExpiration, CacheItemPriority enumPriority, CacheItemPriorityDecay enumPriorityDecay, CacheItemRemovedCallback eventRemoveCallback)
{
if (_boolDisposed)
{
throw new System.ObjectDisposedException("System.Web.Cache");
}
if (strKey == null)
{
throw new System.ArgumentNullException("strKey");
}
if (objItem == null)
{
throw new System.ArgumentNullException("objItem");
}
if (slidingExpiration > _datetimeOneYear)
{
throw new System.ArgumentOutOfRangeException("slidingExpiration");
}
CacheEntry objEntry;
CacheEntry objNewEntry;
long longHitRange = 10000;
// todo: check decay and make up the minHit range
objEntry = new CacheEntry(this, strKey, objItem, objDependency, eventRemoveCallback, absolutExpiration, slidingExpiration, longHitRange, true, enumPriority);
System.Threading.Interlocked.Increment(ref _longItems);
// If we have any kind of expiration add into the CacheExpires class
if (objEntry.HasSlidingExpiration || objEntry.HasAbsoluteExpiration)
{
// Add it to CacheExpires
_objExpires.Add(objEntry);
}
// Check and get the new item..
objNewEntry = UpdateCache(strKey, objEntry, true, CacheItemRemovedReason.Removed);
if (objNewEntry != null)
{
// Return added item
return objEntry.Item;
}
else
{
return null;
}
}
/// <summary>
/// Inserts an item into the Cache object with a cache key to reference its location and using default values
/// provided by the CacheItemPriority and CacheItemPriorityDecay enumerations.
/// </summary>
/// <param name="strKey">The cache key used to reference the item.</param>
/// <param name="objItem">The item to be added to the cache.</param>
public void Insert(string strKey, object objItem)
{
Add(strKey, objItem, null, System.DateTime.MaxValue, System.TimeSpan.Zero, CacheItemPriority.Default, CacheItemPriorityDecay.Default, null);
}
/// <summary>
/// Inserts an object into the Cache that has file or key dependencies.
/// </summary>
/// <param name="strKey">The cache key used to reference the item.</param>
/// <param name="objItem">The item to be added to the cache.</param>
/// <param name="objDependency">The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.</param>
public void Insert(string strKey, object objItem, CacheDependency objDependency)
{
Add(strKey, objItem, objDependency, System.DateTime.MaxValue, System.TimeSpan.Zero, CacheItemPriority.Default, CacheItemPriorityDecay.Default, null);
}
/// <summary>
/// Inserts an object into the Cache with dependencies and expiration policies.
/// </summary>
/// <param name="strKey">The cache key used to reference the item.</param>
/// <param name="objItem">The item to be added to the cache.</param>
/// <param name="objDependency">The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.</param>
/// <param name="absolutExpiration">The time at which the added object expires and is removed from the cache. </param>
/// <param name="slidingExpiration">The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.</param>
public void Insert(string strKey, object objItem, CacheDependency objDependency, System.DateTime absolutExpiration, System.TimeSpan slidingExpiration)
{
Add(strKey, objItem, objDependency, absolutExpiration, slidingExpiration, CacheItemPriority.Default, CacheItemPriorityDecay.Default, null);
}
/// <summary>
/// Inserts an object into the Cache object with dependencies, expiration and priority policies, and a delegate
/// you can use to notify your application when the inserted item is removed from the Cache.
/// </summary>
/// <param name="strKey">The cache key used to reference the item.</param>
/// <param name="objItem">The item to be added to the cache.</param>
/// <param name="objDependency">The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.</param>
/// <param name="absolutExpiration">The time at which the added object expires and is removed from the cache. </param>
/// <param name="slidingExpiration">The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.</param>
/// <param name="enumPriority">The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.</param>
/// <param name="enumPriorityDecay">The rate at which an object in the cache decays in importance. Objects that decay quickly are more likely to be removed.</param>
/// <param name="eventRemoveCallback">A delegate that, if provided, is called when an object is removed from the cache. You can use this to notify applications when their objects are deleted from the cache.</param>
public void Insert(string strKey, object objItem, CacheDependency objDependency, System.DateTime absolutExpiration, System.TimeSpan slidingExpiration, CacheItemPriority enumPriority, CacheItemPriorityDecay enumPriorityDecay, CacheItemRemovedCallback eventRemoveCallback)
{
Add(strKey, objItem, objDependency, absolutExpiration, slidingExpiration, enumPriority, enumPriorityDecay, eventRemoveCallback);
}
/// <summary>
/// Removes the specified item from the Cache object.
/// </summary>
/// <param name="strKey">The cache key for the cache item to remove.</param>
/// <returns>The item removed from the Cache. If the value in the key parameter is not found, returns a null reference.</returns>
public object Remove(string strKey)
{
return Remove(strKey, CacheItemRemovedReason.Removed);
}
/// <summary>
/// Internal method that updates the cache, decremenents the number of existing items and call close on the cache entry. This method
/// is also used from the ExpiresBuckets class to remove an item during GC flush.
/// </summary>
/// <param name="strKey">The cache key for the cache item to remove.</param>
/// <param name="enumReason">Reason why the item is removed.</param>
/// <returns>The item removed from the Cache. If the value in the key parameter is not found, returns a null reference.</returns>
internal object Remove(string strKey, CacheItemRemovedReason enumReason)
{
CacheEntry objEntry = UpdateCache(strKey, null, true, enumReason);
if (objEntry != null)
{
System.Threading.Interlocked.Decrement(ref _longItems);
// Close the cache entry (calls the remove delegate)
objEntry.Close(enumReason);
return objEntry.Item;
} else
{
return null;
}
}
/// <summary>
/// Retrieves the specified item from the Cache object.
/// </summary>
/// <param name="strKey">The identifier for the cache item to retrieve.</param>
/// <returns>The retrieved cache item, or a null reference.</returns>
public object Get(string strKey)
{
CacheEntry objEntry = UpdateCache(strKey, null, false, CacheItemRemovedReason.Expired);
if (objEntry == null)
{
return null;
} else
{
return objEntry.Item;
}
}
/// <summary>
/// Internal method used for removing, updating and adding CacheEntries into the cache.
/// </summary>
/// <param name="strKey">The identifier for the cache item to modify</param>
/// <param name="objEntry">CacheEntry to use for overwrite operation, if this parameter is null and overwrite true the item is going to be removed</param>
/// <param name="boolOverwrite">If true the objEntry parameter is used to overwrite the strKey entry</param>
/// <param name="enumReason">Reason why an item was removed</param>
/// <returns></returns>
private CacheEntry UpdateCache(string strKey, CacheEntry objEntry, bool boolOverwrite, CacheItemRemovedReason enumReason)
{
if (_boolDisposed)
{
throw new System.ObjectDisposedException("System.Web.Cache", "Can't update item(s) in a disposed cache");
}
if (strKey == null)
{
throw new System.ArgumentNullException("System.Web.Cache");
}
long ticksNow = System.DateTime.Now.Ticks;
long ticksExpires = long.MaxValue;
bool boolGetItem = false;
bool boolExpiried = false;
bool boolWrite = false;
bool boolRemoved = false;
// Are we getting the item from the hashtable
if (boolOverwrite == false && strKey.Length > 0 && objEntry == null)
{
boolGetItem = true;
}
// TODO: Optimize this method, move out functionality outside the lock
_lockEntries.AcquireReaderLock(int.MaxValue);
try
{
if (boolGetItem)
{
objEntry = (CacheEntry) _arrEntries[strKey];
if (objEntry == null)
{
return null;
}
}
if (objEntry != null)
{
// Check if we have expired
if (objEntry.HasSlidingExpiration || objEntry.HasAbsoluteExpiration)
{
if (objEntry.Expires < ticksNow)
{
// We have expired, remove the item from the cache
boolWrite = true;
boolExpiried = true;
}
}
}
// Check if we going to modify the hashtable
if (boolWrite || (boolOverwrite && !boolExpiried))
{
// Upgrade our lock to write
System.Threading.LockCookie objCookie = _lockEntries.UpgradeToWriterLock(int.MaxValue);
try
{
// Check if we going to just modify an existing entry (or add)
if (boolOverwrite && objEntry != null)
{
_arrEntries[strKey] = objEntry;
}
else
{
// We need to remove the item, fetch the item first
objEntry = (CacheEntry) _arrEntries[strKey];
if (objEntry != null)
{
_arrEntries.Remove(strKey);
}
boolRemoved = true;
}
}
finally
{
_lockEntries.DowngradeFromWriterLock(ref objCookie);
}
}
// If the entry haven't expired or been removed update the info
if (!boolExpiried && !boolRemoved)
{
// Update that we got a hit
objEntry.Hits++;
if (objEntry.HasSlidingExpiration)
{
ticksExpires = ticksNow + objEntry.SlidingExpiration;
}
}
}
finally
{
_lockEntries.ReleaseLock();
}
// If the item was removed we need to remove it from the CacheExpired class also
if (boolRemoved)
{
if (objEntry != null)
{
if (objEntry.HasAbsoluteExpiration || objEntry.HasSlidingExpiration)
{
_objExpires.Remove(objEntry);
}
}
// Return the entry, it's not up to the UpdateCache to call Close on the entry
return objEntry;
}
// If we have sliding expiration and we have a correct hit, update the expiration manager
if (objEntry.HasSlidingExpiration)
{
_objExpires.Update(objEntry, ticksExpires);
}
// Return the cache entry
return objEntry;
}
/// <summary>
/// Gets the number of items stored in the cache.
/// </summary>
long Count
{
get
{
return _longItems;
}
}
/// <summary>
/// Gets or sets the cache item at the specified key.
/// </summary>
public object this[string strKey]
{
get
{
return Get(strKey);
}
set
{
Insert(strKey, value);
}
}
/// <summary>
/// Called to close the cache when the AppDomain is closing down or the GC has decided it's time to destroy the object.
/// </summary>
public void Dispose()
{
_boolDisposed = true;
_lockEntries.AcquireReaderLock(int.MaxValue);
try
{
foreach(System.Collections.DictionaryEntry objEntry in _arrEntries)
{
if (objEntry.Key != null)
{
// Check if this is active
if ( ((CacheEntry) objEntry.Value).TestFlag(CacheEntry.Flags.Removed) )
{
try
{
((CacheEntry) objEntry.Value).Close(CacheItemRemovedReason.Removed);
}
catch (System.Exception objException)
{
System.Diagnostics.Debug.Fail("System.Web.Cache.Dispose() Exception when closing cache entry", "Message: " + objException.Message + " Stack: " + objException.StackTrace + " Source:" + objException.Source);
}
}
}
}
}
finally
{
_lockEntries.ReleaseReaderLock();
}
}
}
}
@@ -0,0 +1,53 @@
//
// System.Web.Caching
//
// Author:
// Patrik Torstensson ([email protected])
//
// (C) Copyright Patrik Torstensson, 2001
//
namespace System.Web.Caching
{
/// <summary>
/// Specifies the relative priority of items stored in the Cache.
/// </summary>
public enum CacheItemPriority {
AboveNormal,
BelowNormal,
Default,
High,
Low,
Normal,
NotRemovable
}
/// <summary>
/// Specifies the rate at which the priority of items stored in the Cache are downgraded when not accessed frequently.
/// </summary>
public enum CacheItemPriorityDecay {
Default,
Fast,
Medium,
Never,
Slow
}
/// <summary>
/// Specifies the reason an item was removed from the Cache.
/// </summary>
public enum CacheItemRemovedReason {
DependencyChanged,
Expired,
Removed,
Underused
}
/// <summary>
/// Defines a callback method for notifying applications when a cached item is removed from the Cache.
/// </summary>
/// <param name="key">The index location for the item removed from the cache. </param>
/// <param name="value">The Object item removed from the cache. </param>
/// <param name="reason">The reason the item was removed from the cache, as specified by the CacheItemRemovedReason enumeration.</param>
public delegate void CacheItemRemovedCallback(string key, object value, CacheItemRemovedReason reason);
}
@@ -0,0 +1,79 @@
//
// System.Web.Caching
//
// Author:
// Patrik Torstensson ([email protected])
//
// (C) Copyright Patrik Torstensson, 2001
//
namespace System.Web.Caching
{
/// <summary>
/// Class to handle cache dependency, right now this class is only a mookup
/// </summary>
public class CacheDependency : System.IDisposable
{
private bool _boolDisposed;
public CacheDependency()
{
_boolDisposed = false;
}
public delegate void CacheDependencyCallback(CacheDependency objDependency);
public event CacheDependencyCallback Changed;
public void OnChanged()
{
if (_boolDisposed)
{
throw new System.ObjectDisposedException("System.Web.CacheDependency");
}
if (Changed != null)
{
Changed(this);
}
}
public bool IsDisposed
{
get
{
return _boolDisposed;
}
}
public bool HasEvents
{
get
{
if (_boolDisposed)
{
throw new System.ObjectDisposedException("System.Web.CacheDependency");
}
if (Changed != null)
{
return true;
}
return false;
}
}
public void Dispose()
{
_boolDisposed = true;
}
/// <summary>
/// Used in testing.
/// </summary>
public void Signal()
{
OnChanged();
}
}
}
@@ -0,0 +1,363 @@
//
// System.Web.Caching
//
// Author:
// Patrik Torstensson ([email protected])
//
// (C) Copyright Patrik Torstensson, 2001
//
namespace System.Web.Caching
{
/// <summary>
/// Class responsible for representing a cache entry.
/// </summary>
public class CacheEntry
{
/// <summary>
/// Defines the status of the current cache entry
/// </summary>
public enum Flags
{
Removed = 0,
Public = 1
}
private CacheItemPriority _enumPriority;
private long _longHits;
private byte _byteExpiresBucket;
private int _intExpiresIndex;
private long _ticksExpires;
private long _ticksSlidingExpiration;
private string _strKey;
private object _objItem;
private long _longMinHits;
private Flags _enumFlags;
private CacheDependency _objDependency;
private Cache _objCache;
/// <summary>
/// Constructs a new cache entry
/// </summary>
/// <param name="strKey">The cache key used to reference the item.</param>
/// <param name="objItem">The item to be added to the cache.</param>
/// <param name="objDependency">The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.</param>
/// <param name="dtExpires">The time at which the added object expires and is removed from the cache. </param>
/// <param name="tsSpan">The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.</param>
/// <param name="longMinHits">Used to detect and control if the item should be flushed due to under usage</param>
/// <param name="boolPublic">Defines if the item is public or not</param>
/// <param name="enumPriority">The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.</param>
public CacheEntry( Cache objManager, string strKey, object objItem, CacheDependency objDependency, CacheItemRemovedCallback eventRemove,
System.DateTime dtExpires, System.TimeSpan tsSpan, long longMinHits, bool boolPublic, CacheItemPriority enumPriority )
{
if (boolPublic)
{
SetFlag(Flags.Public);
}
_strKey = strKey;
_objItem = objItem;
_objCache = objManager;
_onRemoved += eventRemove;
_enumPriority = enumPriority;
_ticksExpires = dtExpires.Ticks;
_ticksSlidingExpiration = tsSpan.Ticks;
// If we have a sliding expiration it overrides the absolute expiration (MS behavior)
if (tsSpan.Ticks != System.TimeSpan.Zero.Ticks)
{
_ticksExpires = System.DateTime.Now.AddTicks(_ticksSlidingExpiration).Ticks;
}
_objDependency = objDependency;
if (_objDependency != null)
{
if (_objDependency.IsDisposed)
{
throw new System.ObjectDisposedException("System.Web.CacheDependency");
}
// Add the entry to the cache dependency handler (we support multiple entries per handler)
_objDependency.Changed += new CacheDependency.CacheDependencyCallback(OnChanged);
}
_longMinHits = longMinHits;
}
private event CacheItemRemovedCallback _onRemoved;
public void OnChanged(CacheDependency objDependency)
{
_objCache.Remove(_strKey, CacheItemRemovedReason.DependencyChanged);
}
/// <summary>
/// Cleans up the cache entry, removes the cache dependency and calls the remove delegate.
/// </summary>
/// <param name="enumReason">The reason why the cache entry are going to be removed</param>
public void Close(CacheItemRemovedReason enumReason)
{
lock(this)
{
// Check if the item already is removed
if (TestFlag(Flags.Removed))
{
return;
}
SetFlag(Flags.Removed);
if (_onRemoved != null)
{
// Call the delegate to tell that we are now removing the entry
try
{
_onRemoved(_strKey, _objItem, enumReason);
}
catch (System.Exception objException)
{
System.Diagnostics.Debug.Fail("System.Web.CacheEntry.Close() Exception when calling remove delegate", "Message: " + objException.Message + " Stack: " + objException.StackTrace + " Source:" + objException.Source);
}
}
// If we have a dependency, remove the entry
if (_objDependency != null)
{
_objDependency.Changed -= new CacheDependency.CacheDependencyCallback(OnChanged);
if (!_objDependency.HasEvents)
{
_objDependency.Dispose();
}
}
}
}
/// <summary>
/// Tests a specific flag is set or not.
/// </summary>
/// <param name="oFlag">Flag to test agains</param>
/// <returns>Returns true if the flag is set.</returns>
public bool TestFlag(Flags oFlag)
{
lock(this)
{
if ((_enumFlags & oFlag) != 0)
{
return true;
}
return false;
}
}
/// <summary>
/// Sets a specific flag.
/// </summary>
/// <param name="oFlag">Flag to set.</param>
public void SetFlag(Flags oFlag)
{
lock (this)
{
_enumFlags |= oFlag;
}
}
/// <summary>
/// Returns true if the object has minimum hit usage flushing enabled.
/// </summary>
public bool HasUsage
{
get {
if (_longMinHits == System.Int64.MaxValue)
{
return false;
}
return true;
}
}
/// <summary>
/// Returns true if the entry has absolute expiration.
/// </summary>
public bool HasAbsoluteExpiration
{
get
{
if (_ticksExpires == System.DateTime.MaxValue.Ticks)
{
return false;
}
return true;
}
}
/// <summary>
/// Returns true if the entry has sliding expiration enabled.
/// </summary>
public bool HasSlidingExpiration
{
get
{
if (_ticksSlidingExpiration == System.TimeSpan.Zero.Ticks)
{
return false;
}
return true;
}
}
/// <summary>
/// Gets and sets the current expires bucket the entry is active in.
/// </summary>
public byte ExpiresBucket
{
get
{
lock (this)
{
return _byteExpiresBucket;
}
}
set
{
lock (this)
{
_byteExpiresBucket = ExpiresBucket;
}
}
}
/// <summary>
/// Gets and sets the current index in the expires bucket of the current cache entry.
/// </summary>
public int ExpiresIndex
{
get
{
lock (this)
{
return _intExpiresIndex;
}
}
set
{
lock (this)
{
_intExpiresIndex = ExpiresIndex;
}
}
}
/// <summary>
/// Gets and sets the expiration of the cache entry.
/// </summary>
public long Expires
{
get
{
lock (this)
{
return _ticksExpires;
}
}
set
{
lock (this)
{
_ticksExpires = Expires;
}
}
}
/// <summary>
/// Gets the sliding expiration value. The return value is in ticks (since 0/0-01 in 100nanosec)
/// </summary>
public long SlidingExpiration
{
get
{
return _ticksSlidingExpiration;
}
}
/// <summary>
/// Returns the current cached item.
/// </summary>
public object Item
{
get
{
return _objItem;
}
}
/// <summary>
/// Returns the current cache identifier.
/// </summary>
public string Key
{
get
{
return _strKey;
}
}
/// <summary>
/// Gets and sets the current number of hits on the cache entry.
/// </summary>
public long Hits
{
// todo: Could be optimized by using interlocked methods..
get
{
lock (this)
{
return _longHits;
}
}
set
{
lock (this)
{
_longHits = Hits;
}
}
}
/// <summary>
/// Returns minimum hits for the usage flushing rutine.
/// </summary>
public long MinimumHits
{
get
{
return _longMinHits;
}
}
/// <summary>
/// Returns the priority of the cache entry.
/// </summary>
public CacheItemPriority Priority
{
get
{
return _enumPriority;
}
}
}
}
@@ -0,0 +1,145 @@
//
// System.Web.Caching
//
// Author:
// Patrik Torstensson ([email protected])
//
// (C) Copyright Patrik Torstensson, 2001
//
namespace System.Web.Caching
{
/// <summary>
/// Class responsible for handling time based flushing of entries in the cache. The class creates
/// and manages 60 buckets each holding every item that expires that minute. The bucket calculated
/// for an entry is one minute more than the timeout just to make sure that the item end up in the
/// bucket where it should be flushed.
/// </summary>
public class CacheExpires : System.IDisposable
{
static int _intFlush;
static long _ticksPerBucket = 600000000;
static long _ticksPerCycle = _ticksPerBucket * 60;
private ExpiresBucket[] _arrBuckets;
private System.Threading.Timer _objTimer;
private Cache _objManager;
/// <summary>
/// Constructor
/// </summary>
/// <param name="objManager">The cache manager, used when flushing items in a bucket.</param>
public CacheExpires(Cache objManager)
{
_objManager = objManager;
Initialize();
}
/// <summary>
/// Initializes the class.
/// </summary>
private void Initialize()
{
// Create one bucket per minute
_arrBuckets = new ExpiresBucket[60];
byte bytePos = 0;
do
{
_arrBuckets[bytePos] = new ExpiresBucket(bytePos, _objManager);
bytePos++;
} while (bytePos < 60);
// GC Bucket controller
_intFlush = System.DateTime.Now.Minute - 1;
_objTimer = new System.Threading.Timer(new System.Threading.TimerCallback(GarbageCleanup), null, 10000, 60000);
}
/// <summary>
/// Adds a Cache entry to the correct flush bucket.
/// </summary>
/// <param name="objEntry">Cache entry to add.</param>
public void Add(CacheEntry objEntry)
{
long ticksNow = System.DateTime.Now.Ticks;
lock(this)
{
// If the entry doesn't have a expires time we assume that the entry is due to expire now.
if (objEntry.Expires == 0)
{
objEntry.Expires = ticksNow;
}
_arrBuckets[GetHashBucket(objEntry.Expires)].Add(objEntry);
}
}
public void Remove(CacheEntry objEntry)
{
long ticksNow = System.DateTime.Now.Ticks;
lock(this)
{
// If the entry doesn't have a expires time we assume that the entry is due to expire now.
if (objEntry.Expires == 0)
{
objEntry.Expires = ticksNow;
}
_arrBuckets[GetHashBucket(objEntry.Expires)].Remove(objEntry);
}
}
public void Update(CacheEntry objEntry, long ticksExpires)
{
long ticksNow = System.DateTime.Now.Ticks;
lock(this)
{
// If the entry doesn't have a expires time we assume that the entry is due to expire now.
if (objEntry.Expires == 0)
{
objEntry.Expires = ticksNow;
}
_arrBuckets[GetHashBucket(objEntry.Expires)].Update(objEntry, ticksExpires);
}
}
public void GarbageCleanup(object State)
{
ExpiresBucket objBucket;
lock(this)
{
// Do cleanup of the bucket
objBucket = _arrBuckets[(++_intFlush) % 60];
}
// Flush expired items in the current bucket (defined by _intFlush)
objBucket.FlushExpiredItems();
}
private int GetHashBucket(long ticks)
{
// Get bucket to add expire item into, add one minute to the bucket just to make sure that we get it in the bucket gc
return (int) (((((ticks + 60000) % _ticksPerCycle) / _ticksPerBucket) + 1) % 60);
}
/// <summary>
/// Called by the cache for cleanup.
/// </summary>
public void Dispose()
{
lock(this)
{
// Cleanup the internal timer
if (_objTimer != null)
{
_objTimer.Dispose();
_objTimer = null;
}
}
}
}
}
@@ -0,0 +1,8 @@
2001-07-20 Patrik Torstensson ([email protected])
* Cache.cs: Implemented. (90% ready)
* CacheDefinitions.cs: Implemented.
* CacheDependency.cs: Added. (20% ready)
* CacheExpires: Implemented.
* CacheEntry.cs: Implemented. (95% ready, going to be changed due to CacheDependecy support)
* ExpiresBuckets.cs: Implemented.
Loaded 100 of 944 files, more files were not shown because too many files have changed in this diff. Show more