mono.git
22 years ago2001-10-04 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 4 Oct 2001 21:39:50 +0000 (21:39 -0000)]
2001-10-04  Miguel de Icaza  <miguel@ximian.com>

* modifiers.cs: If the ABSTRACT keyword is present, also set the
virtual and newslot bits.

svn path=/trunk/mcs/; revision=1082

22 years agoUpdate todo
Miguel de Icaza [Thu, 4 Oct 2001 21:29:13 +0000 (21:29 -0000)]
Update todo

svn path=/trunk/mcs/; revision=1081

22 years ago2001-10-04 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 4 Oct 2001 21:24:28 +0000 (21:24 -0000)]
2001-10-04  Miguel de Icaza  <miguel@ximian.com>

* class.cs (TypeContainer::RegisterRequiredImplementations):
Record methods we need.

(TypeContainer::MakeKey): Helper function to make keys for
MethodBases, since the Methodbase key is useless.

(TypeContainer::Populate): Call RegisterRequiredImplementations
before defining the methods.

Create a mapping for method_builders_to_methods ahead of time
instead of inside a tight loop.

(::RequireMethods):  Accept an object as the data to set into the
hashtable so we can report interface vs abstract method mismatch.

svn path=/trunk/mcs/; revision=1080

22 years agoAdd more tests
Miguel de Icaza [Thu, 4 Oct 2001 21:21:13 +0000 (21:21 -0000)]
Add more tests

svn path=/trunk/mcs/; revision=1079

22 years agoAdd more errors, and fix some error tests
Miguel de Icaza [Thu, 4 Oct 2001 20:34:02 +0000 (20:34 -0000)]
Add more errors, and fix some error tests

svn path=/trunk/mcs/; revision=1077

22 years agoFlush
Miguel de Icaza [Thu, 4 Oct 2001 17:51:34 +0000 (17:51 -0000)]
Flush

svn path=/trunk/mcs/; revision=1075

22 years agoUPdate web page
Miguel de Icaza [Thu, 4 Oct 2001 17:47:44 +0000 (17:47 -0000)]
UPdate web page

svn path=/trunk/mono/; revision=1074

22 years agoTemporary kludge to work around older linuxthreads implementations that
Dick Porter [Thu, 4 Oct 2001 14:27:02 +0000 (14:27 -0000)]
Temporary kludge to work around older linuxthreads implementations that
are missing pthread_mutex_timedlock()

svn path=/trunk/mono/; revision=1073

22 years agoUpdates and fixes.
Paolo Molaro [Thu, 4 Oct 2001 13:34:37 +0000 (13:34 -0000)]
Updates and fixes.

svn path=/trunk/mcs/; revision=1072

22 years agoThu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Thu, 4 Oct 2001 13:32:23 +0000 (13:32 -0000)]
Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>

* class.c: MonoTypes stored in MonoClass are stored as
fundamental MonoTypes when the class represents a
fundamental type (System.Int32, ...).
The TypeHandle return by ldtoken is a MonoType*.
* icall.c: ves_icall_get_data_chunk () write out all the
PE/COFF stuff. Implement ves_icall_define_method (),
ves_icall_set_method_body (), ves_icall_type_from_handle ().
* image.c: properly skip unknown streams.
* loader.h, loader.c: add type_class to mono_defaults.
* metadata.c, metadata.h: export compute_size () as
mono_metadata_compute_size () with a better interface.
Typo and C&P fixes.
* pedump.c: don't try to print the entry point RVA if there is no entry point.
* reflection.c, reflection.h: many cleanups, fixes, output method
signatures and headers, typedef and typeref info, compress the metadata
tables, output all the heap streams, cli header etc.
* row-indexes.h: typo fixes.

Thu Oct 4 19:09:13 CEST 2001 Paolo Molaro <lupus@ximian.com>

* x86/tramp.c: allow marshalling valuetypes if they are
4 bytes long.

Thu Oct 4 19:05:56 CEST 2001 Paolo Molaro <lupus@ximian.com>

* dis-cil.c: fix printing of exception stuff.
* dump.c: display some more info in the typedef table dump.
* main.c: typo fix and method list fix.

svn path=/trunk/mono/; revision=1071

22 years ago2001-10-03 Dick Porter <dick@ximian.com>
Dick Porter [Thu, 4 Oct 2001 09:44:14 +0000 (09:44 -0000)]
2001-10-03  Dick Porter  <dick@ximian.com>

* Monitor.cs: Implemented all methods except the two Wait()
methods that take boolean parameters

svn path=/trunk/mcs/; revision=1070

22 years ago2001-10-04 Dick Porter <dick@ximian.com>
Dick Porter [Thu, 4 Oct 2001 09:43:37 +0000 (09:43 -0000)]
2001-10-04  Dick Porter  <dick@ximian.com>

* configure.in: Do some deeper checks on pthreads for some of the
more interesting functions

2001-10-04  Dick Porter  <dick@ximian.com>

* object.h: Add a synchronisation mutex struct to MonoObject

* object.c (mono_new_object): Initialise the object
synchronisation mutexes

* icall.c: System.Threading.Monitor internal calls

* threads-pthread.h:
* threads-pthread.c: System.Threading.Monitor internal calls

* threads-types.h: New file, includes the system-specific thread
structures

* threads-pthread-types.h:
* threads-pthread-types.c: New files, handle pthread-specific
synchronisation types

* threads-dummy-types.h:
* threads-dummy-types.c: New files of dummy support for
thread-specific types

* metadata.c:
* image.c:
* pedump.c: include mono-endian.h not endian.h

* Makefile.am: More threads files.
Name mono-endian.h not endian.h

2001-10-04  Dick Porter  <dick@ximian.com>

* meta.h: include mono-endian.h not endian.h

2001-10-04  Dick Porter  <dick@ximian.com>

* interp.c (ves_runtime_method): init_class() the
mono_defaults.delegate_class
Include mono-endian.h not endian.h

2001-10-04  Dick Porter  <dick@ximian.com>

* testjit.c:
* emit-x86.c: include mono-endian.h not endian.h

svn path=/trunk/mono/; revision=1069

22 years agoFlush
Miguel de Icaza [Wed, 3 Oct 2001 21:37:52 +0000 (21:37 -0000)]
Flush

svn path=/trunk/mcs/; revision=1068

22 years ago*** empty log message ***
Miguel de Icaza [Wed, 3 Oct 2001 14:27:05 +0000 (14:27 -0000)]
*** empty log message ***

svn path=/trunk/mcs/; revision=1067

22 years ago2001-10-03 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Wed, 3 Oct 2001 14:10:23 +0000 (14:10 -0000)]
2001-10-03  Ravi Pratap  <ravi@ximian.com>

* test-16.cs : Update to make the test more correct.

svn path=/trunk/mcs/; revision=1066

22 years ago2001-10-03 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Wed, 3 Oct 2001 13:04:16 +0000 (13:04 -0000)]
2001-10-03  Ravi Pratap  <ravi@ximian.com>

* expression.cs (Binary::DoNumericPromotions): Fix the case when
we do a forcible conversion regardless of type, to check if
ForceConversion returns a null.

(Binary::error19): Use location to report error.

(Unary::error23): Use location here too.

* ../errors/cs0019.cs : Check in.

* ../errors/cs0023.cs : Check in.

* expression.cs (Expression.MemberLookup): Return null for a rather esoteric
case of a non-null MethodInfo object with a length of 0 !

(Binary::ResolveOperator): Flag error if overload resolution fails to find
an applicable member - according to the spec :-)
Also fix logic to find members in base types.

(Unary::ResolveOperator): Same here.

(Unary::report23): Change name to error23 and make first argument a TypeContainer
as I was getting thoroughly confused between this and error19 :-)

* expression.cs (Expression::ImplicitUserConversion): Re-write fully
(::FindMostEncompassedType): Implement.
(::FindMostEncompassingType): Implement.
(::StandardConversionExists): Implement.

(UserImplicitCast): Re-vamp. We now need info about most specific
source and target types so that we can do the necessary conversions.

(Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
mathematical union with no duplicates.

svn path=/trunk/mcs/; revision=1065

22 years agoAdded files for errors CS0019 and CS0023
Ravi Pratap M [Wed, 3 Oct 2001 13:01:18 +0000 (13:01 -0000)]
Added files for errors CS0019 and CS0023

svn path=/trunk/mcs/; revision=1064

22 years ago2001-10-03 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Wed, 3 Oct 2001 12:59:16 +0000 (12:59 -0000)]
2001-10-03  Ravi Pratap  <ravi@ximian.com>

* test-16.cs : Add.

* makefile : update accordingly.

svn path=/trunk/mcs/; revision=1063

22 years agoanother test (does not work at the moment)
Dietmar Maurer [Wed, 3 Oct 2001 10:04:41 +0000 (10:04 -0000)]
another test (does not work at the moment)

svn path=/trunk/mono/; revision=1062

22 years ago2001-10-02 Dietmar Maurer <dietmar@ximian.com>
Dietmar Maurer [Wed, 3 Oct 2001 02:28:04 +0000 (02:28 -0000)]
2001-10-02  Dietmar Maurer  <dietmar@ximian.com>

* get.c (get_method): always write namespace and class name.

svn path=/trunk/mono/; revision=1061

22 years ago*** empty log message ***
Miguel de Icaza [Wed, 3 Oct 2001 01:26:24 +0000 (01:26 -0000)]
*** empty log message ***

svn path=/trunk/mcs/; revision=1060

22 years agoTue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Tue, 2 Oct 2001 14:42:07 +0000 (14:42 -0000)]
Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>

* Makefile.am, reflection.h, reflection.c: move here the reflection related
stuff and implement a few more bits.
* icall.c: a field needs to be dereferenced twice. Do not use the same
name for two variables in the same scope.
* image.c, image.h: cleanups.

svn path=/trunk/mono/; revision=1059

22 years agoAdd new test
Miguel de Icaza [Tue, 2 Oct 2001 13:52:13 +0000 (13:52 -0000)]
Add new test

svn path=/trunk/mcs/; revision=1058

22 years agoadded tests for System.Int64
Martin Weindel [Tue, 2 Oct 2001 13:31:45 +0000 (13:31 -0000)]
added tests for System.Int64

svn path=/trunk/mcs/; revision=1057

22 years agoAdd more tests
Miguel de Icaza [Tue, 2 Oct 2001 13:05:15 +0000 (13:05 -0000)]
Add more tests

svn path=/trunk/mcs/; revision=1056

22 years ago*** empty log message ***
Miguel de Icaza [Tue, 2 Oct 2001 13:00:47 +0000 (13:00 -0000)]
*** empty log message ***

svn path=/trunk/mcs/; revision=1055

22 years agoTue Oct 2 18:51:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Tue, 2 Oct 2001 12:55:21 +0000 (12:55 -0000)]
Tue Oct 2 18:51:25 CEST 2001 Paolo Molaro <lupus@ximian.com>

* interp.c: set frame->ip in the leave opcode. Make db_methods static.

svn path=/trunk/mono/; revision=1054

22 years ago2001-10-02 Dietmar Maurer <dietmar@ximian.com>
Dietmar Maurer [Tue, 2 Oct 2001 06:52:58 +0000 (06:52 -0000)]
2001-10-02  Dietmar Maurer  <dietmar@ximian.com>

* testjit.c (ctree_create_dup): really duplicate the tree.
attach the arguments to the CALL node. Added a neiw macro to
make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).

svn path=/trunk/mono/; revision=1053

22 years ago2001-10-02 Dietmar Maurer <dietmar@ximian.com>
Dietmar Maurer [Tue, 2 Oct 2001 03:37:40 +0000 (03:37 -0000)]
2001-10-02  Dietmar Maurer  <dietmar@ximian.com>

* class.c (mono_class_metadata_init): bug fix: compute the right size

svn path=/trunk/mono/; revision=1052

22 years ago2001-10-02 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Tue, 2 Oct 2001 01:52:35 +0000 (01:52 -0000)]
2001-10-02  Ravi Pratap  <ravi@ximian.com>

* test-13.cs : Added.

* makefile : update accordingly.

svn path=/trunk/mcs/; revision=1051

22 years ago2001-10-02 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Tue, 2 Oct 2001 01:45:42 +0000 (01:45 -0000)]
2001-10-02  Ravi Pratap  <ravi@ximian.com>

* expression.cs (Unary::ResolveOperator): Find operators on base type
too - we now conform exactly to the spec.

(Binary::ResolveOperator): Same here.

* class.cs (Operator::Define): Fix minor quirk in the tests.

* ../errors/cs0215.cs : Added.

* ../errors/cs0556.cs : Added.

* ../errors/cs0555.cs : Added.

svn path=/trunk/mcs/; revision=1050

22 years agoAdded more files for errors that we catch.
Ravi Pratap M [Tue, 2 Oct 2001 01:41:26 +0000 (01:41 -0000)]
Added more files for errors that we catch.

svn path=/trunk/mcs/; revision=1049

22 years ago2001-10-01 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Tue, 2 Oct 2001 00:00:09 +0000 (00:00 -0000)]
2001-10-01  Miguel de Icaza  <miguel@ximian.com>

* cs-tokenizer.cs: Reimplemented Location to be a struct with a
single integer which is really efficient

svn path=/trunk/mcs/; revision=1047

22 years agoUpdates and some implementation bits.
Paolo Molaro [Mon, 1 Oct 2001 14:53:39 +0000 (14:53 -0000)]
Updates and some implementation bits.

svn path=/trunk/mcs/; revision=1046

22 years agoMon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Mon, 1 Oct 2001 14:53:07 +0000 (14:53 -0000)]
Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>

* icall.c: implemented some of the Reflection internalcalls.
* image.c, image.h: start writing out the PE/COFF image.
* metadata.h, metadata.c: implement mono_metadata_encode_value ()
that does the reverse than decode_blob_size ().
* object.c: use mono_metadata_encode_value (). Move here
temporary implementation of mono_string_to_utf8 ().
* rawbuffer.c: make malloc_map static.

svn path=/trunk/mono/; revision=1045

22 years agoFix values for O_CREAT O_EXCL O_TRUNC O_APPEND to work on Linux,
Paolo Molaro [Mon, 1 Oct 2001 13:26:23 +0000 (13:26 -0000)]
Fix values for O_CREAT O_EXCL O_TRUNC O_APPEND to work on Linux,
these need to be taken from the wrapper generation tool, later.

svn path=/trunk/mcs/; revision=1044

22 years agoNo need to flush a filehandle (and anyway you can't since fflush
Paolo Molaro [Mon, 1 Oct 2001 13:12:32 +0000 (13:12 -0000)]
No need to flush a filehandle (and anyway you can't since fflush
needs a _file_ handle).
Idem, avoid corruption calling fseek on a file handle (use lseek instead).
This file should be reworked to be 64 bits clean.

svn path=/trunk/mcs/; revision=1043

22 years agoMon Oct 1 18:48:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Mon, 1 Oct 2001 13:07:53 +0000 (13:07 -0000)]
Mon Oct 1 18:48:27 CEST 2001 Paolo Molaro <lupus@ximian.com>

* x86/tramp.c: fix thinko (s/SUB/ADD/) in stack adjustment
and avoid a couple of unnecessary instructions.

svn path=/trunk/mono/; revision=1042

22 years ago2001-10-01 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Mon, 1 Oct 2001 13:01:54 +0000 (13:01 -0000)]
2001-10-01  Ravi Pratap  <ravi@ximian.com>

*  expression.cs (Expression::ImplicitUserConversion): Use location
        even in the case when we are examining True operators.

        * class.cs (Operator::Define): Perform extensive checks to conform
        with the rules for operator overloading in the spec.

* expression.cs (Expression::ImplicitReferenceConversion): Implement
some of the other conversions mentioned in the spec.

* typemanager.cs (array_type): New static member for the System.Array built-in
type.

(cloneable_interface): For System.ICloneable interface.

* driver.cs (Driver::Driver): Initialize TypeManager's core types even before
we start resolving the tree and populating types.

* ../errors/errors.txt : Update for error numbers -7, -8, -9, -10

svn path=/trunk/mcs/; revision=1041

22 years agoUpdate errors.txt for the new errors that only we catch.
Ravi Pratap M [Mon, 1 Oct 2001 12:56:17 +0000 (12:56 -0000)]
Update errors.txt for the new errors that only we catch.

svn path=/trunk/mcs/; revision=1040

22 years ago2001-10-01 Dietmar Maurer <dietmar@ximian.com>
Dietmar Maurer [Mon, 1 Oct 2001 08:53:31 +0000 (08:53 -0000)]
2001-10-01  Dietmar Maurer  <dietmar@ximian.com>

* interp.brg: the burm based interpreter: added the file as example.

svn path=/trunk/mono/; revision=1039

22 years ago2001-10-01 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Mon, 1 Oct 2001 01:29:38 +0000 (01:29 -0000)]
2001-10-01  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Expression::ExprClassFromMemberInfo,
Expression::Literalize): Create literal expressions from
FieldInfos which are literals.

(ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
type casts, because they were wrong.  The test suite in tests
caught these ones.

(ImplicitNumericConversion): ushort to ulong requires a widening
cast.

Int32 constant to long requires widening cast as well.

* literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
for integers because the type on the stack is not i4.

svn path=/trunk/mcs/; revision=1038

22 years agoSun Sep 30 11:57:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Sun, 30 Sep 2001 06:04:32 +0000 (06:04 -0000)]
Sun Sep 30 11:57:15 CEST 2001 Paolo Molaro <lupus@ximian.com>

* interp.c: compiler and ANSI C portability fixes.

svn path=/trunk/mono/; revision=1037

22 years ago2001-09-30 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Sun, 30 Sep 2001 03:03:54 +0000 (03:03 -0000)]
2001-09-30  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (report118): require location argument.

* parameter.cs: Do not dereference potential null value.

* class.cs: Catch methods that lack the `new' keyword when
overriding a name.  Report warnings when `new' is used without
anything being there to override.

* modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.

svn path=/trunk/mcs/; revision=1036

22 years ago2001-09-30 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Sun, 30 Sep 2001 02:22:09 +0000 (02:22 -0000)]
2001-09-30  Miguel de Icaza  <miguel@ximian.com>

* class.cs: Only add constructor to hashtable if it is non-null
(as now constructors can fail on define).

(TypeManager, Class, Struct): Take location arguments.

Catch field instance initialization in structs as errors.

accepting_filter: a new filter for FindMembers that is static so
that we dont create an instance per invocation.

(Constructor::Define): Catch errors where a struct constructor is
parameterless

* cs-parser.jay: Pass location information for various new
constructs.

* delegate.cs (Delegate): take a location argument.

* driver.cs: Do not call EmitCode if there were problesm in the
Definition of the types, as many Builders wont be there.

* decl.cs (Decl::Decl): Require a location argument.

* cs-tokenizer.cs: Handle properly hex constants that can not fit
into integers, and find the most appropiate integer for it.

* literal.cs: Implement ULongLiteral.

* rootcontext.cs: Provide better information about the location of
failure when CreateType fails.

2001-09-29  Miguel de Icaza  <miguel@ximian.com>

* rootcontext.cs (RootContext::PopulateTypes): Populates structs
as well.

* expression.cs (Binary::CheckShiftArguments): Add missing type
computation.
(Binary::ResolveOperator): Add type to the logical and and logical
or, Bitwise And/Or and Exclusive Or code paths, it was missing
before.

(Binary::DoNumericPromotions): In the case where either argument
is ulong (and most signed types combined with ulong cause an
error) perform implicit integer constant conversions as well.

svn path=/trunk/mcs/; revision=1035

22 years agoAdded MethodImplAttribute and AttributeUsage classes
Miguel de Icaza [Sat, 29 Sep 2001 16:57:38 +0000 (16:57 -0000)]
Added MethodImplAttribute and AttributeUsage classes

svn path=/trunk/mcs/; revision=1033

22 years agoAdded required 'Using' directive
Dick Porter [Sat, 29 Sep 2001 16:41:20 +0000 (16:41 -0000)]
Added required 'Using' directive

svn path=/trunk/mcs/; revision=1032

22 years ago2001-09-28 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Fri, 28 Sep 2001 20:27:52 +0000 (20:27 -0000)]
2001-09-28  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (UserImplicitCast): Method should always be
non-null.
(Invocation::BetterConversion): Simplified test for IntLiteral.

(Expression::ImplicitNumericConversion): Split this routine out.
Put the code that performs implicit constant integer conversions
here.

(Expression::Resolve): Become a wrapper around DoResolve so we can
check eclass and type being set after resolve.

(Invocation::Badness): Remove this dead function

(Binary::ResolveOperator): Do not compute the expensive argumnets
unless we have a union for it.

svn path=/trunk/mcs/; revision=1031

22 years ago2001-09-28 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Fri, 28 Sep 2001 18:10:28 +0000 (18:10 -0000)]
2001-09-28  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Probe::Emit): Is needs to do an isinst and then
compare against null.

(::CanConvert): Added Location argument.  If the Location argument
is null (Location.Null), then we do not report errors.  This is
used by the `probe' mechanism of the Explicit conversion.  We do
not want to generate an error for something that the user
explicitly requested to be casted.  But the pipeline for an
explicit cast first tests for potential implicit casts.

So for now, if the Location is null, it means `Probe only' to
avoid adding another argument.   Might have to revise this
strategy later.

(ClassCast): New class used to type cast objects into arbitrary
classes (used in Explicit Reference Conversions).

Implement `as' as well.

Reverted all the patches from Ravi below: they were broken:

* The use of `level' as a mechanism to stop recursive
  invocations is wrong.  That was there just to catch the
  bug with a strack trace but not as a way of addressing
  the problem.

  To fix the problem we have to *understand* what is going
  on and the interactions and come up with a plan, not
  just get things going.

* The use of the type conversion cache that I proposed
  last night had an open topic: How does this work across
  protection domains.  A user defined conversion might not
  be public in the location where we are applying the
  conversion, a different conversion might be selected
  (ie, private A->B (better) but public B->A (worse),
  inside A, A->B applies, but outside it, B->A will
  apply).

* On top of that (ie, even if the above is solved),
  conversions in a cache need to be abstract.  Ie, `To
  convert from an Int to a Short use an OpcodeCast', not
  `To convert from an Int to a Short use the OpcodeCast on
  the variable 5' (which is what this patch was doing).

svn path=/trunk/mcs/; revision=1029

22 years agoSome fixes and some implementation bits. More classes.
Paolo Molaro [Fri, 28 Sep 2001 13:54:46 +0000 (13:54 -0000)]
Some fixes and some implementation bits. More classes.

svn path=/trunk/mcs/; revision=1028

22 years agoFri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Fri, 28 Sep 2001 13:49:47 +0000 (13:49 -0000)]
Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>

* metadata.c: fix type comparison for arrays.
* loader.h, loader.c: half-assed fix to get more tests work in cygwin.
Added a couple of new classes to monodefaults.
* icall.c: added a couple of Reflection-related internalcalls.
* class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
Added a byval_arg MonoType to MonoClass.

Fri Sep 28 19:43:12 CEST 2001 Paolo Molaro <lupus@ximian.com>

* x86/tramp.c: marshal valuetypes that are enums.

Fri Sep 28 19:37:46 CEST 2001 Paolo Molaro <lupus@ximian.com>

* interp.c: Implemented ldtoken, conv.ovf.i. Use MonoClass->byval_arg
(and remove related kludges). Don't choke on access to arrays of
references. Throw an exception when an internalcall or P/Invoke
function don't have an implementation. Throw and EngineException
for unimplemented opcodes.

svn path=/trunk/mono/; revision=1027

22 years ago2001-09-28 Dick Porter <dick@ximian.com>
Dick Porter [Fri, 28 Sep 2001 13:39:47 +0000 (13:39 -0000)]
2001-09-28  Dick Porter  <dick@ximian.com>

* icall.c:
* threads-pthread.h:
* threads-pthread.c: Implemented internal calls for
LocalDataStoreSlot operations.  Applied mutexes around all shared
data.  Reworked the thread creation and Start() operations to
avoid a race condition.

* threads-dummy.h:
* threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations

svn path=/trunk/mono/; revision=1026

22 years ago2001-09-28 Dick Porter <dick@ximian.com>
Dick Porter [Fri, 28 Sep 2001 13:38:52 +0000 (13:38 -0000)]
2001-09-28  Dick Porter  <dick@ximian.com>

* Thread.cs: Implemented AllocateDataSlot(),
AllocateNamedDataSlot(), FreeNamedDataSlot(), GetData(),
GetNamedDataSlot(), SetData(), IsBackground.  Reworked Thread()
and Start() to avoid a race condition. Added thread-safe state
changing private operations.

* Monitor.cs: Comment out the GetType() calls because it isn't implemented yet

2001-09-28  Dick Porter  <dick@ximian.com>

* LocalDataStoreSlot.cs: Implemented

svn path=/trunk/mcs/; revision=1025

22 years agoRevert Ravi's patch, it was completely broken
Miguel de Icaza [Fri, 28 Sep 2001 12:43:53 +0000 (12:43 -0000)]
Revert Ravi's patch, it was completely broken

svn path=/trunk/mcs/; revision=1024

22 years ago2001-09-28 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Fri, 28 Sep 2001 12:28:56 +0000 (12:28 -0000)]
2001-09-28  Ravi Pratap  <ravi@ximian.com>

        * expression.cs (Invocation::ConversionExists): Re-write to use
        the conversion cache

        (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
        cache all conversions done, not just user-defined ones.

        (Invocation::BetterConversion): The real culprit. Use ConversionExists
        to determine if a conversion exists instead of acutually trying to
        perform the conversion. It's faster too.

        (Expression::ConvertExplicit): Modify to use ConversionExists to check
        and only then attempt the implicit conversion.

svn path=/trunk/mcs/; revision=1023

22 years agoSmall updates
Miguel de Icaza [Fri, 28 Sep 2001 12:02:35 +0000 (12:02 -0000)]
Small updates

svn path=/trunk/mono/; revision=1022

22 years agoexpression.cs (ConvertImplicit): Implement cache to prevent looping
Ravi Pratap M [Fri, 28 Sep 2001 05:01:14 +0000 (05:01 -0000)]
expression.cs (ConvertImplicit): Implement cache to prevent looping

[I am unable to past my ChangeLog entries here !!! Help !]

svn path=/trunk/mcs/; revision=1021

22 years agocleanup
Dietmar Maurer [Fri, 28 Sep 2001 03:22:30 +0000 (03:22 -0000)]
cleanup

svn path=/trunk/mono/; revision=1020

22 years agoAdd new test
Miguel de Icaza [Fri, 28 Sep 2001 01:40:11 +0000 (01:40 -0000)]
Add new test

svn path=/trunk/mcs/; revision=1019

22 years ago2001-09-28 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Fri, 28 Sep 2001 01:33:54 +0000 (01:33 -0000)]
2001-09-28  Miguel de Icaza  <miguel@ximian.com>

* typemanager.cs (string_concat_string_string, string_concat_object_object):
Export standard methods that we expect for string operations.

* statement.cs (Block::UsageWarning): Track usage of variables and
report the errors for not used variables.

* expression.cs (Conditional::Resolve, ::Emit): Implement ?:
operator.

svn path=/trunk/mcs/; revision=1018

22 years ago2001-09-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 27 Sep 2001 23:56:17 +0000 (23:56 -0000)]
2001-09-27  Miguel de Icaza  <miguel@ximian.com>

* expression.cs: Removed BuiltinTypeAccess class

svn path=/trunk/mcs/; revision=1016

22 years agoAdd box test
Miguel de Icaza [Thu, 27 Sep 2001 23:54:27 +0000 (23:54 -0000)]
Add box test

svn path=/trunk/mcs/; revision=1015

22 years agoUpdated tests
Miguel de Icaza [Thu, 27 Sep 2001 23:54:02 +0000 (23:54 -0000)]
Updated tests

svn path=/trunk/mcs/; revision=1014

22 years ago2001-09-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 27 Sep 2001 23:51:44 +0000 (23:51 -0000)]
2001-09-27  Miguel de Icaza  <miguel@ximian.com>

* expression.cs: Fix the order in which implicit conversions are
done.

The previous fixed dropped support for boxed conversions (adding a
test to the test suite now)

(UserImplicitCast::CanConvert): Remove test for source being null,
that code is broken.  We should not feed a null to begin with, if
we do, then we should track the bug where the problem originates
and not try to cover it up here.

Return a resolved expression of type UserImplicitCast on success
rather than true/false.  Ravi: this is what I was talking about,
the pattern is to use a static method as a "constructor" for
objects.

Also, do not create arguments until the very last minute,
otherwise we always create the arguments even for lookups that
will never be performed.

(UserImplicitCast::Resolve): Eliminate, objects of type
UserImplicitCast are born in a fully resolved state.

svn path=/trunk/mcs/; revision=1013

22 years ago2001-09-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 27 Sep 2001 18:23:44 +0000 (18:23 -0000)]
2001-09-27  Miguel de Icaza  <miguel@ximian.com>

* typemanager.cs (InitCoreTypes): Init also value_type
(System.ValueType).

svn path=/trunk/mcs/; revision=1011

22 years ago2001-09-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 27 Sep 2001 17:43:26 +0000 (17:43 -0000)]
2001-09-27  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Cast::Resolve): First resolve the child expression.

svn path=/trunk/mcs/; revision=1010

22 years ago2001-09-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 27 Sep 2001 17:36:55 +0000 (17:36 -0000)]
2001-09-27  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (LValue): Add new method AddressOf to be used by
the `&' operator.

Change the argument of Store to take an EmitContext instead of an
ILGenerator, because things like FieldExpr need to be able to call
their children expression to generate the instance code.

(Expression::Error, Expression::Warning): Sugar functions for
reporting errors.

(Expression::MemberLookup): Accept a TypeContainer instead of a
Report as the first argument.

(Expression::ResolvePrimary): Killed.  I still want to improve
this as currently the code is just not right.

(Expression::ResolveMemberAccess): Simplify, but it is still
wrong.

(Unary::Resolve): Catch errors in AddressOf operators.

(LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
index to a byte for the short-version, or the compiler will choose
the wrong Emit call, which generates the wrong data.

(ParameterReference::Emit, ::Store): same.

(FieldExpr::AddressOf): Implement.

* typemanager.cs: TypeManager: made public variable instead of
property.

* driver.cs: document --fatal.

* report.cs (ErrorMessage, WarningMessage): new names for the old
Error and Warning classes.

* cs-parser.jay (member_access): Turn built-in access to types
into a normal simplename

svn path=/trunk/mcs/; revision=1009

22 years agoFix bug in BetterConversion and in ConvertImplicit
Ravi Pratap M [Thu, 27 Sep 2001 17:17:18 +0000 (17:17 -0000)]
Fix bug in BetterConversion and in ConvertImplicit

svn path=/trunk/mcs/; revision=1007

22 years agoAdd tests again so that they are included in make dist.
Paolo Molaro [Thu, 27 Sep 2001 17:05:26 +0000 (17:05 -0000)]
Add tests again so that they are included in make dist.

svn path=/trunk/mono/; revision=1006

22 years agoThu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Thu, 27 Sep 2001 15:49:54 +0000 (15:49 -0000)]
Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>

* rawbuffer.c: disable mmap on cygwin since it seems to be broken there.

svn path=/trunk/mono/; revision=1005

22 years agoThu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Thu, 27 Sep 2001 13:57:46 +0000 (13:57 -0000)]
Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>

* class.c, loader.c: warn and return NULL instead of erroring out.
* icall.c: added System.AppDomain::getCurDomain().
* loader.c: we don't need to lookup the typedef again for p/invoke calls.

svn path=/trunk/mono/; revision=1004

22 years agoSome more stubs and fixes.
Paolo Molaro [Thu, 27 Sep 2001 13:51:14 +0000 (13:51 -0000)]
Some more stubs and fixes.

svn path=/trunk/mcs/; revision=1003

22 years agoAdd more tests to compare our cast code
Miguel de Icaza [Thu, 27 Sep 2001 13:39:40 +0000 (13:39 -0000)]
Add more tests to compare our cast code

svn path=/trunk/mcs/; revision=1002

22 years ago2001-09-27 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Thu, 27 Sep 2001 12:51:06 +0000 (12:51 -0000)]
2001-09-27  Ravi Pratap  <ravi@ximian.com>

* expression.cs (UserImplicitCast::Resolve): Fix bug.

svn path=/trunk/mcs/; revision=1001

22 years ago2001-09-27 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Thu, 27 Sep 2001 12:43:56 +0000 (12:43 -0000)]
2001-09-27  Ravi Pratap  <ravi@ximian.com>

* test-7.cs : Uncomment lines True operator overload now works.

svn path=/trunk/mcs/; revision=1000

22 years agoAdd a comment to Cast type
Miguel de Icaza [Thu, 27 Sep 2001 12:27:08 +0000 (12:27 -0000)]
Add a comment to Cast type

svn path=/trunk/mcs/; revision=999

22 years agocleanup
Dietmar Maurer [Thu, 27 Sep 2001 11:43:34 +0000 (11:43 -0000)]
cleanup

svn path=/trunk/mono/; revision=998

22 years ago2001-09-27 Dietmar Maurer <dietmar@ximian.com>
Dietmar Maurer [Thu, 27 Sep 2001 10:41:13 +0000 (10:41 -0000)]
2001-09-27  Dietmar Maurer  <dietmar@ximian.com>

* testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
data.
(map_stind_type): support enum types
(map_ldind_type): support enum types

* emit-x86.c (tree_allocate_regs): added code to support
register allocation for addressing modes trees.
(tree_emit): bug fix: we have to emit all mono_burg_functins. The
previous impl. did not work for chain rules.
(compute_branches): support for SWITCH statements

* x86.brg: added rules to model x86 addressing modes

svn path=/trunk/mono/; revision=997

22 years agoTypo fix
Miguel de Icaza [Thu, 27 Sep 2001 10:32:32 +0000 (10:32 -0000)]
Typo fix

svn path=/trunk/mono/; revision=996

22 years agoThu Sep 27 15:34:37 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Thu, 27 Sep 2001 09:38:19 +0000 (09:38 -0000)]
Thu Sep 27 15:34:37 CEST 2001 Paolo Molaro <lupus@ximian.com>

* x86/x86-codegen.h: in memindex operand you can use X86_NOBASEREG
as basereg.

svn path=/trunk/mono/; revision=995

22 years ago2001-09-27 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Thu, 27 Sep 2001 08:24:07 +0000 (08:24 -0000)]
2001-09-27  Ravi Pratap  <ravi@ximian.com>

* class.cs (TypeContainer::AddConstructor): Fix a stupid bug
I had introduced long ago (what's new ?).

* expression.cs (UserImplicitCast::CanConvert): Static method to do
the work of all the checking.
(ConvertImplicit): Call CanConvert and only then create object if necessary.
(UserImplicitCast::CanConvert, ::Resolve): Re-write.

(Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
that is the right way.

(Invocation::MakeUnionSet): Convenience function to make unions of sets for
overloading resolution. Use everywhere instead of cutting and pasting code.

(Binary::ResolveOperator): Use MakeUnionSet.

(UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when
we have to convert to bool types. Not complete yet.

svn path=/trunk/mcs/; revision=994

22 years ago2001-09-27 Ravi Pratap <ravi@ximian.com>
Ravi Pratap M [Thu, 27 Sep 2001 08:19:38 +0000 (08:19 -0000)]
2001-09-27  Ravi Pratap  <ravi@ximian.com>

* test-7.cs : Revamp and add more operator tests. Still in progress.

* test-9,10.cs : Added by Miguel earlier.

svn path=/trunk/mcs/; revision=993

22 years ago2001-09-27 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Thu, 27 Sep 2001 01:16:47 +0000 (01:16 -0000)]
2001-09-27  Miguel de Icaza  <miguel@ximian.com>

* typemanager.cs (TypeManager::CSharpName): support ushort.

* expression.cs (Expression::TryImplicitIntConversion): Attempts
to provide an expression that performsn an implicit constant int
conversion (section 6.1.6).
(Expression::ConvertImplicitRequired): Reworked to include
implicit constant expression conversions.

(Expression::ConvertNumericExplicit): Finished.

(Invocation::Emit): If InstanceExpression is null, then it means
that we perform a call on this.

svn path=/trunk/mcs/; revision=992

22 years agoAdd Explicit Number Conversion operator test
Miguel de Icaza [Thu, 27 Sep 2001 00:43:59 +0000 (00:43 -0000)]
Add Explicit Number Conversion operator test

svn path=/trunk/mcs/; revision=991

22 years ago*** empty log message ***
Miguel de Icaza [Wed, 26 Sep 2001 20:40:58 +0000 (20:40 -0000)]
*** empty log message ***

svn path=/trunk/mcs/; revision=990

22 years ago2001-09-26 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Wed, 26 Sep 2001 18:56:23 +0000 (18:56 -0000)]
2001-09-26  Miguel de Icaza  <miguel@ximian.com>

* expression.cs (Unary::Emit): Remove some dead code.

svn path=/trunk/mcs/; revision=989

22 years ago2001-09-26 Miguel de Icaza <miguel@ximian.com>
Miguel de Icaza [Wed, 26 Sep 2001 18:32:27 +0000 (18:32 -0000)]
2001-09-26  Miguel de Icaza  <miguel@ximian.com>

* cs-parser.jay: Update operator constants.

* parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
(Parameters::GetSignature): Hook up VerifyArgs here.
(Parameters::VerifyArgs): Verifies that no two arguments have the
same name.

* class.cs (Operator): Update the operator names to reflect the
ones that the spec expects (as we are just stringizing the
operator names).

* expression.cs (Unary::ResolveOperator): Fix bug: Use
MethodInfo's ReturnType instead of LookupMethodByBuilder as the
previous usage did only work for our methods.
(Expression::ConvertImplicit): Handle decimal implicit numeric
conversions as well.
(Expression::InternalTypeConstructor): Used to invoke constructors
on internal types for default promotions.

(Unary::Emit): Implement special handling for the pre/post
increment/decrement for overloaded operators, as they need to have
the same semantics as the other operators.

(Binary::ResolveOperator): ditto.
(Invocation::ConversionExists): ditto.
(UserImplicitCast::Resolve): ditto.

svn path=/trunk/mcs/; revision=988

22 years agofixed clean target
Sean MacIsaac [Wed, 26 Sep 2001 16:08:28 +0000 (16:08 -0000)]
fixed clean target

svn path=/trunk/mcs/; revision=987

22 years agoDon't build classes that reference WebRequest.
Sean MacIsaac [Wed, 26 Sep 2001 16:04:13 +0000 (16:04 -0000)]
Don't build classes that reference WebRequest.

svn path=/trunk/mcs/; revision=986

22 years agonew version of nant that shouldn't cause security exception for win98
Sean MacIsaac [Wed, 26 Sep 2001 11:17:23 +0000 (11:17 -0000)]
new version of nant that shouldn't cause security exception for win98
(lupus).  i just removed the offending code.  i'll look into a better
solution.

svn path=/trunk/mcs/; revision=985

22 years agoWed Sep 26 16:29:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
Paolo Molaro [Wed, 26 Sep 2001 10:33:18 +0000 (10:33 -0000)]
Wed Sep 26 16:29:36 CEST 2001 Paolo Molaro <lupus@ximian.com>

* x86/x86-codegen.h: added memindex addressing mode encoding
(and mov to/from register opcodes).

svn path=/trunk/mono/; revision=984

22 years agochanged target from unix to linux
Sean MacIsaac [Wed, 26 Sep 2001 09:58:25 +0000 (09:58 -0000)]
changed target from unix to linux

svn path=/trunk/mcs/; revision=983

22 years agoFixed some build problems (related to targets)
Sean MacIsaac [Wed, 26 Sep 2001 09:53:17 +0000 (09:53 -0000)]
Fixed some build problems (related to targets)

svn path=/trunk/mcs/; revision=982

22 years agomakefile: calls NAnt to build class libs
Sean MacIsaac [Wed, 26 Sep 2001 09:51:04 +0000 (09:51 -0000)]
makefile: calls NAnt to build class libs

System/System.build: Exclude broken source files

corlib/Test/corlib_test.build: Exclude broken source files

svn path=/trunk/mcs/; revision=981

22 years ago*** empty log message ***
Dietmar Maurer [Wed, 26 Sep 2001 09:48:13 +0000 (09:48 -0000)]
*** empty log message ***

svn path=/trunk/mono/; revision=980

22 years agoMoved to corlib/Test
Sean MacIsaac [Wed, 26 Sep 2001 09:46:28 +0000 (09:46 -0000)]
Moved to corlib/Test

svn path=/trunk/mcs/; revision=979

22 years agoMoved to corlib/Test Directory
Sean MacIsaac [Wed, 26 Sep 2001 09:44:54 +0000 (09:44 -0000)]
Moved to corlib/Test Directory

svn path=/trunk/mcs/; revision=978

22 years agoNo longer used. New Platform Abstraction Layer used instead.
Sean MacIsaac [Wed, 26 Sep 2001 09:42:52 +0000 (09:42 -0000)]
No longer used.  New Platform Abstraction Layer used instead.

svn path=/trunk/mcs/; revision=977

22 years agoNAnt executable
Sean MacIsaac [Wed, 26 Sep 2001 09:38:27 +0000 (09:38 -0000)]
NAnt executable

svn path=/trunk/mcs/; revision=976

22 years agoNAnt build files and System.Data files moved to appropriate directory.
Sean MacIsaac [Wed, 26 Sep 2001 09:35:13 +0000 (09:35 -0000)]
NAnt build files and System.Data files moved to appropriate directory.

svn path=/trunk/mcs/; revision=975