Ravi Pratap M [Mon, 8 Oct 2001 13:02:52 +0000 (13:02 -0000)]
2001-10-07 Ravi Pratap <ravi@ximian.com>
* cs-parser.jay (type_suffix*): Remove - they are redundant. Use
rank_specifiers instead.
(rank_specifiers): Change the order in which the rank specifiers are stored
(local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
* expression.cs (ElementAccess): Implement the LValue interface too.
2001-10-06 Ravi Pratap <ravi@ximian.com>
* expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
except that user defined conversions are not included.
(UserDefinedConversion): Update to use the ConvertExplicitStandard to
perform the conversion of the return type, if necessary.
(New::DoResolve): Check whether we are creating an array or an object
and accordingly do the needful.
(New::Emit): Same here.
(New::DoResolve): Implement guts of array creation.
(New::FormLookupType): Helper function.
svn path=/trunk/mcs/; revision=1121
Paolo Molaro [Mon, 8 Oct 2001 12:02:19 +0000 (12:02 -0000)]
Added copyright notices.
svn path=/trunk/mcs/; revision=1120
Dick Porter [Mon, 8 Oct 2001 09:28:07 +0000 (09:28 -0000)]
Fixed syntax errors
svn path=/trunk/mcs/; revision=1119
Paolo Molaro [Mon, 8 Oct 2001 04:48:43 +0000 (04:48 -0000)]
Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
* class.c: set the correct type for all the fundamental
type when loading the class.
Mon Oct 8 10:44:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
* interp.c: fixes for changes in metadata.
svn path=/trunk/mono/; revision=1118
Miguel de Icaza [Sun, 7 Oct 2001 21:01:57 +0000 (21:01 -0000)]
2001-10-07 Miguel de Icaza <miguel@ximian.com>
* codegen.cs: Added support for try/catch/finalize and throw.
* cs-parser.jay: Added support for try/catch/finalize.
svn path=/trunk/mcs/; revision=1117
Miguel de Icaza [Sun, 7 Oct 2001 02:13:01 +0000 (02:13 -0000)]
Add AllTests file from Mario
svn path=/trunk/mcs/; revision=1115
Miguel de Icaza [Sun, 7 Oct 2001 01:54:54 +0000 (01:54 -0000)]
Make the build pass
svn path=/trunk/mcs/; revision=1114
Miguel de Icaza [Sun, 7 Oct 2001 01:39:01 +0000 (01:39 -0000)]
Some warning reduction:
2001-10-07 Miguel de Icaza <miguel@ximian.com>
* Exception.cs: Implement bits of serialization.
* RuntimeFieldHandle.cs: Implement Serialization features.
* Type.cs: Implement TypeHandle property.
2001-10-07 Miguel de Icaza <miguel@ximian.com>
* AssemblyBuilder.cs: Reformatted.
Added override keywords to those that needed them.
Removed methods that we do not override, but just inherit
2001-10-07 Miguel de Icaza <miguel@ximian.com>
* Encoding.cs, UTF8Encoding.cs, UTF7Encoding.cs, ASCIIEncoding.cs,
UnicodeEncoding.cs: Corrected API.
* UTF8Encoding.cs: Checked in changes from Rafael.
svn path=/trunk/mcs/; revision=1113
Miguel de Icaza [Sun, 7 Oct 2001 00:36:47 +0000 (00:36 -0000)]
Added updated UTF8Encoding from Rafael
svn path=/trunk/mcs/; revision=1111
Miguel de Icaza [Sun, 7 Oct 2001 00:23:41 +0000 (00:23 -0000)]
Update TODO
svn path=/trunk/mcs/; revision=1110
Miguel de Icaza [Sun, 7 Oct 2001 00:12:49 +0000 (00:12 -0000)]
2001-10-07 Miguel de Icaza <miguel@ximian.com>
* expression.cs (UserCast): This user cast was not really doing
what it was supposed to do. Which is to be born in fully resolved
state. Parts of the resolution were being performed at Emit time!
Fixed this code.
svn path=/trunk/mcs/; revision=1109
Thomas Neidhart [Sat, 6 Oct 2001 19:04:22 +0000 (19:04 -0000)]
* updated status
svn path=/trunk/mono/; revision=1108
Thomas Neidhart [Sat, 6 Oct 2001 17:25:25 +0000 (17:25 -0000)]
* AsymmetricAlgorithm.cs: Initial version
* AsymmetricKeyExchangeDeformatter.cs: Initial version
* AsymmetricKeyExchangeFormatter.cs: Initial version
* AsymmetricSignatureDeformatter.cs: Initial version
* AsymmetricSignatureFormatter.cs: Initial version
* PaddingMode.cs: Added PaddingMode.None
* SignatureDescription.cs: Initial version
* SymmetricAlgorithm.cs: Implemented CreateDecryptor, CreateEncryptor and Create() methods
svn path=/trunk/mcs/; revision=1107
Dick Porter [Sat, 6 Oct 2001 06:14:04 +0000 (06:14 -0000)]
Fixed thinko in usec/nsec time compare in pthread_mutex_timedlock()
svn path=/trunk/mono/; revision=1106
Thomas Neidhart [Sat, 6 Oct 2001 05:40:36 +0000 (05:40 -0000)]
SymmetricAlgorithm.cs: Implemented CreateDecryptor and CreateEncryptor methods
CryptographicException.cs: Initial version
CryptographicUnknownOperationException.cs: Initial version
svn path=/trunk/mcs/; revision=1105
Miguel de Icaza [Fri, 5 Oct 2001 21:13:47 +0000 (21:13 -0000)]
Work to get foreach working and analyzed.
ChangeLog comming later
svn path=/trunk/mcs/; revision=1103
Miguel de Icaza [Fri, 5 Oct 2001 17:03:10 +0000 (17:03 -0000)]
2001-10-05 Miguel de Icaza <miguel@ximian.com>
* expression.cs: Implicity convert the result from UserCast.
Include the test from Ravi that exhibits the bug.
New classes from Toelen.
svn path=/trunk/mcs/; revision=1102
Miguel de Icaza [Fri, 5 Oct 2001 16:09:01 +0000 (16:09 -0000)]
More files from Toelen
svn path=/trunk/mcs/; revision=1101
Ravi Pratap M [Fri, 5 Oct 2001 15:46:29 +0000 (15:46 -0000)]
2001-10-05 Ravi Pratap <ravi@ximian.com>
* expression.cs (Expression::FindMostEncompassingType): Fix bug which
prevented it from working correctly.
(ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
merely ConvertImplicit.
svn path=/trunk/mcs/; revision=1100
Ravi Pratap M [Fri, 5 Oct 2001 15:41:21 +0000 (15:41 -0000)]
2001-10-05 Ravi Pratap <ravi@ximian.com>
* test-16.cs : Update to exercise the code which selects the best
conversion operator based on "most encompassing/encompassed type"
* test-7.cs : Update here too.
svn path=/trunk/mcs/; revision=1099
Miguel de Icaza [Fri, 5 Oct 2001 15:01:37 +0000 (15:01 -0000)]
*** empty log message ***
svn path=/trunk/mcs/; revision=1098
Dick Porter [Fri, 5 Oct 2001 12:44:18 +0000 (12:44 -0000)]
Updated status
svn path=/trunk/mono/; revision=1097
Dick Porter [Fri, 5 Oct 2001 12:15:07 +0000 (12:15 -0000)]
2001-10-05 Dick Porter <dick@ximian.com>
* threads-pthread.c (pthread_mutex_timedlock): Simple
compatibility version for C libraries that lack this call.
svn path=/trunk/mono/; revision=1096
Miguel de Icaza [Fri, 5 Oct 2001 11:14:03 +0000 (11:14 -0000)]
Add new files from Chris Hynes
svn path=/trunk/mcs/; revision=1094
Miguel de Icaza [Fri, 5 Oct 2001 11:07:40 +0000 (11:07 -0000)]
Add new files from Chris Hynes
svn path=/trunk/mcs/; revision=1093
Miguel de Icaza [Fri, 5 Oct 2001 10:54:02 +0000 (10:54 -0000)]
More News Items
svn path=/trunk/mono/; revision=1092
Ravi Pratap M [Fri, 5 Oct 2001 08:39:39 +0000 (08:39 -0000)]
2001-10-05 Ravi Pratap <ravi@ximian.com>
* expression.cs (Expression::ImplicitUserConversion): Rename to
UserDefinedConversion.
(Expression::UserDefinedConversion): Take an extra argument specifying
whether we look for explicit user conversions too.
(Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
(UserDefinedConversion): Incorporate support for user defined explicit conversions.
(ExplicitUserConversion): Make it a call to UserDefinedConversion
with the appropriate arguments.
* cs-parser.jay (cast_expression): Record location too.
* expression.cs (Cast): Record location info.
(Expression::ConvertExplicit): Take location argument.
(UserImplicitCast): Change name to UserCast. Take an extra constructor argument
to determine if we are doing explicit conversions.
(UserCast::Emit): Update accordingly.
(Expression::ConvertExplicit): Report an error if everything fails.
* ../errors/cs0030.cs : Add.
svn path=/trunk/mcs/; revision=1091
Ravi Pratap M [Fri, 5 Oct 2001 08:37:06 +0000 (08:37 -0000)]
2001-10-05 Ravi Pratap <ravi@ximian.com>
* test-7.cs : Update to do explicit conversion tests.
* makefile : small fix.
svn path=/trunk/mcs/; revision=1090
Ravi Pratap M [Fri, 5 Oct 2001 08:35:28 +0000 (08:35 -0000)]
Add a file for error CS0030
svn path=/trunk/mcs/; revision=1089
Dietmar Maurer [Fri, 5 Oct 2001 05:03:42 +0000 (05:03 -0000)]
more tests
svn path=/trunk/mono/; revision=1088
Miguel de Icaza [Fri, 5 Oct 2001 02:03:44 +0000 (02:03 -0000)]
Updated
svn path=/trunk/mono/; revision=1087
Miguel de Icaza [Fri, 5 Oct 2001 01:52:52 +0000 (01:52 -0000)]
More News Items
svn path=/trunk/mono/; revision=1086
Miguel de Icaza [Fri, 5 Oct 2001 01:49:16 +0000 (01:49 -0000)]
Added SymmetricAlgorithm from Thomas Neidhart
svn path=/trunk/mcs/; revision=1085
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
Miguel de Icaza [Thu, 4 Oct 2001 21:29:13 +0000 (21:29 -0000)]
Update todo
svn path=/trunk/mcs/; revision=1081
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
Miguel de Icaza [Thu, 4 Oct 2001 21:21:13 +0000 (21:21 -0000)]
Add more tests
svn path=/trunk/mcs/; revision=1079
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
Miguel de Icaza [Thu, 4 Oct 2001 17:51:34 +0000 (17:51 -0000)]
Flush
svn path=/trunk/mcs/; revision=1075
Miguel de Icaza [Thu, 4 Oct 2001 17:47:44 +0000 (17:47 -0000)]
UPdate web page
svn path=/trunk/mono/; revision=1074
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
Paolo Molaro [Thu, 4 Oct 2001 13:34:37 +0000 (13:34 -0000)]
Updates and fixes.
svn path=/trunk/mcs/; revision=1072
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
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
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
Miguel de Icaza [Wed, 3 Oct 2001 21:37:52 +0000 (21:37 -0000)]
Flush
svn path=/trunk/mcs/; revision=1068
Miguel de Icaza [Wed, 3 Oct 2001 14:27:05 +0000 (14:27 -0000)]
*** empty log message ***
svn path=/trunk/mcs/; revision=1067
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
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
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
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
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
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
Miguel de Icaza [Wed, 3 Oct 2001 01:26:24 +0000 (01:26 -0000)]
*** empty log message ***
svn path=/trunk/mcs/; revision=1060
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
Miguel de Icaza [Tue, 2 Oct 2001 13:52:13 +0000 (13:52 -0000)]
Add new test
svn path=/trunk/mcs/; revision=1058
Martin Weindel [Tue, 2 Oct 2001 13:31:45 +0000 (13:31 -0000)]
added tests for System.Int64
svn path=/trunk/mcs/; revision=1057
Miguel de Icaza [Tue, 2 Oct 2001 13:05:15 +0000 (13:05 -0000)]
Add more tests
svn path=/trunk/mcs/; revision=1056
Miguel de Icaza [Tue, 2 Oct 2001 13:00:47 +0000 (13:00 -0000)]
*** empty log message ***
svn path=/trunk/mcs/; revision=1055
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
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
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
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
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
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
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
Paolo Molaro [Mon, 1 Oct 2001 14:53:39 +0000 (14:53 -0000)]
Updates and some implementation bits.
svn path=/trunk/mcs/; revision=1046
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
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
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
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
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
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
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
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
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
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
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
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
Dick Porter [Sat, 29 Sep 2001 16:41:20 +0000 (16:41 -0000)]
Added required 'Using' directive
svn path=/trunk/mcs/; revision=1032
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
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
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
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
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
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
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
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
Miguel de Icaza [Fri, 28 Sep 2001 12:02:35 +0000 (12:02 -0000)]
Small updates
svn path=/trunk/mono/; revision=1022
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
Dietmar Maurer [Fri, 28 Sep 2001 03:22:30 +0000 (03:22 -0000)]
cleanup
svn path=/trunk/mono/; revision=1020
Miguel de Icaza [Fri, 28 Sep 2001 01:40:11 +0000 (01:40 -0000)]
Add new test
svn path=/trunk/mcs/; revision=1019
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
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
Miguel de Icaza [Thu, 27 Sep 2001 23:54:27 +0000 (23:54 -0000)]
Add box test
svn path=/trunk/mcs/; revision=1015
Miguel de Icaza [Thu, 27 Sep 2001 23:54:02 +0000 (23:54 -0000)]
Updated tests
svn path=/trunk/mcs/; revision=1014
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
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
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
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